Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
console
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
console
Commits
4af2c8cb
Commit
4af2c8cb
authored
Apr 27, 2017
by
nano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix his
parent
84129f23
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
210 additions
and
1213 deletions
+210
-1213
.idea/workspace.xml
.idea/workspace.xml
+139
-77
package/main.ts
package/main.ts
+1
-1
src/routes/package.ts
src/routes/package.ts
+1
-3
test.ts
test.ts
+4
-3
views/update.hbs
views/update.hbs
+3
-3
yarn.lock
yarn.lock
+62
-1126
No files found.
.idea/workspace.xml
View file @
4af2c8cb
This diff is collapsed.
Click to expand it.
package/main.ts
View file @
4af2c8cb
...
@@ -63,7 +63,7 @@ export async function bundle(...args) {
...
@@ -63,7 +63,7 @@ export async function bundle(...args) {
},
},
onDir
:
async
(
_files
,
_path
,
depth
)
=>
{
onDir
:
async
(
_files
,
_path
,
depth
)
=>
{
files
.
set
(
_path
,
{
files
.
set
(
_path
,
{
path
:
path
.
relative
(
package_path
,
_path
),
path
:
path
.
relative
(
package_path
,
_path
)
||
'
.
'
,
});
});
},
},
});
});
...
...
src/routes/package.ts
View file @
4af2c8cb
...
@@ -15,9 +15,7 @@ router.get('/v2/packages', async (ctx: Context, next) => {
...
@@ -15,9 +15,7 @@ router.get('/v2/packages', async (ctx: Context, next) => {
appId
:
ctx
.
request
.
query
.
appId
,
appId
:
ctx
.
request
.
query
.
appId
,
status
:
'
uploaded
'
status
:
'
uploaded
'
}).
toArray
();
}).
toArray
();
ctx
.
body
=
{
ctx
.
body
=
packs
[
ctx
.
request
.
query
.
appId
]:
packs
};
});
});
router
.
get
(
'
/v2/package/:id/checksum
'
,
async
(
ctx
:
Context
,
next
)
=>
{
router
.
get
(
'
/v2/package/:id/checksum
'
,
async
(
ctx
:
Context
,
next
)
=>
{
...
...
test.ts
View file @
4af2c8cb
...
@@ -5,13 +5,14 @@ import * as fetch from 'isomorphic-fetch';
...
@@ -5,13 +5,14 @@ import * as fetch from 'isomorphic-fetch';
import
*
as
_
from
'
lodash
'
;
import
*
as
_
from
'
lodash
'
;
import
{
XmlDocument
}
from
'
xmldoc
'
;
import
{
XmlDocument
}
from
'
xmldoc
'
;
// 配置
// 配置
const
old_apps_json
=
'
https://api.moecube.com/apps.json
'
;
const
old_apps_json
=
'
https://api.moecube.com/apps.json
'
;
const
new_apps_json
=
'
http://114.215.243.95:8001/v2/apps
'
;
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
old_metalinks
=
(
package_id
)
=>
`https://cdn01.moecube.com/release/metalinks/
${
package_id
}
.meta4`
;
const
new_metalinks
=
(
package_id
)
=>
`http
s://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
old_checksums
=
(
package_id
)
=>
`https://cdn01.moecube.com/release/checksums/
${
package_id
}
`
;
const
new_checksums
=
(
package_id
)
=>
`http
s://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
()
{
async
function
test_checksums
()
{
...
@@ -72,7 +73,7 @@ async function test_apps_json() {
...
@@ -72,7 +73,7 @@ async function test_apps_json() {
}
}
async
function
main
()
{
async
function
main
()
{
await
test_apps_json
();
//
await test_apps_json();
await
test_checksums
();
await
test_checksums
();
await
test_download
();
await
test_download
();
await
test_update
();
await
test_update
();
...
...
views/update.hbs
View file @
4af2c8cb
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
<file
name=
"
{{
name
}}
"
>
<file
name=
"
{{
name
}}
"
>
<size>
{{
size
}}
</size>
<size>
{{
size
}}
</size>
<hash
type=
"sha-256"
>
{{
hash
}}
</hash>
<hash
type=
"sha-256"
>
{{
hash
}}
</hash>
<url
priority=
"1"
>
https://
thief.mycard.moe/dist
/
{{
hash
}}
.tar.gz
</url>
<url
priority=
"1"
>
https://
cdn01.moecube.com/test-release
/
{{
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>
</file>
</file>
{{/
files
}}
{{/
files
}}
</metalink>
</metalink>
\ No newline at end of file
yarn.lock
View file @
4af2c8cb
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment