Commit 4af2c8cb authored by nano's avatar nano

fix his

parent 84129f23
This diff is collapsed.
......@@ -63,7 +63,7 @@ export async function bundle(...args) {
},
onDir: async (_files, _path, depth) => {
files.set(_path, {
path: path.relative(package_path, _path),
path: path.relative(package_path, _path) || '.',
});
},
});
......
......@@ -15,9 +15,7 @@ router.get('/v2/packages', async (ctx: Context, next) => {
appId: ctx.request.query.appId,
status: 'uploaded'
}).toArray();
ctx.body = {
[ctx.request.query.appId]: packs
};
ctx.body = packs
});
router.get('/v2/package/:id/checksum', async (ctx: Context, next) => {
......
......@@ -5,13 +5,14 @@ import * as fetch from 'isomorphic-fetch';
import * as _ from 'lodash';
import {XmlDocument} from 'xmldoc';
// 配置
const old_apps_json = 'https://api.moecube.com/apps.json';
const new_apps_json = 'http://114.215.243.95:8001/v2/apps';
const old_metalinks = (package_id) => `https://cdn01.moecube.com/release/metalinks/${package_id}.meta4`;
const new_metalinks = (package_id) => `https://cdn01.moecube.com/release/metalinks/${package_id}.meta4`; // 修改
const new_metalinks = (package_id) => `http://127.0.0.1:8001/v2/package/${package_id}/meta`; // 修改
const old_checksums = (package_id) => `https://cdn01.moecube.com/release/checksums/${package_id}`;
const new_checksums = (package_id) => `https://cdn01.moecube.com/release/checksums/${package_id}`; // 修改
const new_checksums = (package_id) => `http://127.0.0.1:8001/v2/package/${package_id}/checksum`; // 修改
async function test_checksums() {
......@@ -72,7 +73,7 @@ async function test_apps_json() {
}
async function main() {
await test_apps_json();
// await test_apps_json();
await test_checksums();
await test_download();
await test_update();
......
......@@ -4,8 +4,8 @@
<file name="{{name}}">
<size>{{size}}</size>
<hash type="sha-256">{{hash}}</hash>
<url priority="1">https://thief.mycard.moe/dist/{{hash}}.tar.gz</url>
<url priority="1">https://thief.my-card.in/dist/{{hash}}.tar.gz</url>
<url priority="1">https://cdn01.moecube.com/test-release/{{hash}}.tar.gz</url>
<url priority="1">https://cdn01.moecube.com/test-release/{{hash}}.tar.gz</url>
</file>
{{/files}}
</metalink>
\ No newline at end of file
</metalink>
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment