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
e464bca1
Commit
e464bca1
authored
May 02, 2017
by
nano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改remove逻辑
parent
ec3ca211
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
77 deletions
+77
-77
.idea/workspace.xml
.idea/workspace.xml
+62
-68
migrate.ts
migrate.ts
+9
-6
package/main.ts
package/main.ts
+2
-3
src/routes/upload.ts
src/routes/upload.ts
+4
-0
No files found.
.idea/workspace.xml
View file @
e464bca1
...
...
@@ -7,6 +7,7 @@
<list
default=
"true"
id=
"f0cbce64-0ebc-4f60-8c2d-2fe9e214a8c0"
name=
"Default"
comment=
""
>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/migrate.ts"
afterPath=
"$PROJECT_DIR$/migrate.ts"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/package/main.ts"
afterPath=
"$PROJECT_DIR$/package/main.ts"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/src/routes/upload.ts"
afterPath=
"$PROJECT_DIR$/src/routes/upload.ts"
/>
</list>
<ignored
path=
"mycard-console-backend.iws"
/>
<ignored
path=
".idea/workspace.xml"
/>
...
...
@@ -32,8 +33,8 @@
<file
leaf-file-name=
"migrate.ts"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/migrate.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
-107
"
>
<caret
line=
"
41"
column=
"87"
lean-forward=
"false"
selection-start-line=
"41"
selection-start-column=
"87"
selection-end-line=
"41"
selection-end-column=
"87
"
/>
<state
relative-caret-position=
"
296
"
>
<caret
line=
"
132"
column=
"15"
lean-forward=
"true"
selection-start-line=
"132"
selection-start-column=
"15"
selection-end-line=
"132"
selection-end-column=
"15
"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
...
...
@@ -51,34 +52,11 @@
</provider>
</entry>
</file>
<file
leaf-file-name=
"entrypoint.sh"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/entrypoint.sh"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"108"
>
<caret
line=
"6"
column=
"0"
lean-forward=
"false"
selection-start-line=
"6"
selection-start-column=
"0"
selection-end-line=
"6"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"test.ts"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/test.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"0"
>
<caret
line=
"0"
column=
"0"
lean-forward=
"false"
selection-start-line=
"0"
selection-start-column=
"0"
selection-end-line=
"2"
selection-end-column=
"3"
/>
<folding>
<element
signature=
"n#!!doc"
expanded=
"true"
/>
<element
signature=
"e#44#86#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"upload.ts"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/src/routes/upload.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
439
"
>
<caret
line=
"1
91"
column=
"0"
lean-forward=
"true"
selection-start-line=
"191"
selection-start-column=
"0"
selection-end-line=
"191"
selection-end-column=
"0
"
/>
<state
relative-caret-position=
"
372
"
>
<caret
line=
"1
19"
column=
"51"
lean-forward=
"true"
selection-start-line=
"119"
selection-start-column=
"51"
selection-end-line=
"119"
selection-end-column=
"51
"
/>
<folding>
<element
signature=
"e#0#28#0"
expanded=
"true"
/>
</folding>
...
...
@@ -119,12 +97,6 @@
</component>
<component
name=
"FindInProjectRecents"
>
<findStrings>
<find>
Can not change AppID
</find>
<find>
release
</find>
<find>
joi.ob
</find>
<find>
http://114.215.243.95:8001
</find>
<find>
joi
</find>
<find>
entri
</find>
<find>
admin
</find>
<find>
patch
</find>
<find>
files
</find>
...
...
@@ -149,6 +121,12 @@
<find>
fs.remove
</find>
<find>
remove
</find>
<find>
bundle
</find>
<find>
const fullSize \= \(await fs\.statAsync\(filePath\)\)\.size\;\n
</find>
<find>
f
</find>
<find>
stats
</find>
<find>
fs
</find>
<find>
rename
</find>
<find>
fs.stat
</find>
</findStrings>
</component>
<component
name=
"Git.Settings"
>
...
...
@@ -192,9 +170,9 @@
<option
value=
"$PROJECT_DIR$/package/utils.ts"
/>
<option
value=
"$PROJECT_DIR$/aria2.conf"
/>
<option
value=
"$PROJECT_DIR$/config.ts"
/>
<option
value=
"$PROJECT_DIR$/src/routes/upload.ts"
/>
<option
value=
"$PROJECT_DIR$/migrate.ts"
/>
<option
value=
"$PROJECT_DIR$/package/main.ts"
/>
<option
value=
"$PROJECT_DIR$/src/routes/upload.ts"
/>
</list>
</option>
</component>
...
...
@@ -283,6 +261,20 @@
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode"
/>
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option
name=
"myItemId"
value=
"moecube-console"
/>
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode"
/>
</PATH_ELEMENT>
<PATH_ELEMENT>
<option
name=
"myItemId"
value=
"moecube-console"
/>
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode"
/>
</PATH_ELEMENT>
<PATH_ELEMENT>
<option
name=
"myItemId"
value=
"package"
/>
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode"
/>
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
</panes>
...
...
@@ -458,12 +450,12 @@
<workItem
from=
"1493198225466"
duration=
"47067000"
/>
<workItem
from=
"1493371982129"
duration=
"6000"
/>
<workItem
from=
"1493372010655"
duration=
"3472000"
/>
<workItem
from=
"1493692283332"
duration=
"
2717
000"
/>
<workItem
from=
"1493692283332"
duration=
"
5723
000"
/>
</task>
<servers
/>
</component>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"20
4488
000"
/>
<option
name=
"totallyTimeSpent"
value=
"20
7494
000"
/>
</component>
<component
name=
"TodoView"
>
<todo-panel
id=
"selected-file"
>
...
...
@@ -476,18 +468,18 @@
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"55"
y=
"23"
width=
"1377"
height=
"872"
extended-state=
"0"
/>
<editor
active=
"true"
/>
<layout>
<window_info
id=
"TypeScript"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.32846716"
sideWeight=
"0.5"
order=
"7"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Project"
active=
"false"
anchor=
"left"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"true"
show_stripe_button=
"true"
weight=
"0.14011799"
sideWeight=
"0.49384886"
order=
"0"
side_tool=
"false"
content_ui=
"combo"
/>
<window_info
id=
"TODO"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"6"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"DB Browser"
active=
"false"
anchor=
"left"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"2"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"DB Execution Console"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"8"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Event Log"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"7"
side_tool=
"true"
content_ui=
"tabs"
/>
<window_info
id=
"Version Control"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.43941605"
sideWeight=
"0.5"
order=
"7"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Run"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.32975295"
sideWeight=
"0.5"
order=
"2"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Terminal"
active=
"true"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"true"
show_stripe_button=
"true"
weight=
"0.31794873"
sideWeight=
"0.5"
order=
"7"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"TypeScript"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.32820514"
sideWeight=
"0.5"
order=
"7"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Project"
active=
"false"
anchor=
"left"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"true"
show_stripe_button=
"true"
weight=
"0.14011799"
sideWeight=
"0.49384886"
order=
"0"
side_tool=
"false"
content_ui=
"combo"
/>
<window_info
id=
"Find"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.32846716"
sideWeight=
"0.5"
order=
"1"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Structure"
active=
"false"
anchor=
"left"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.25"
sideWeight=
"0.5"
order=
"1"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Terminal"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"true"
show_stripe_button=
"true"
weight=
"0.31794873"
sideWeight=
"0.5"
order=
"7"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Favorites"
active=
"false"
anchor=
"left"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.23725356"
sideWeight=
"0.50615114"
order=
"2"
side_tool=
"true"
content_ui=
"tabs"
/>
<window_info
id=
"Debug"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.4"
sideWeight=
"0.5"
order=
"3"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Cvs"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.25"
sideWeight=
"0.5"
order=
"4"
side_tool=
"false"
content_ui=
"tabs"
/>
...
...
@@ -496,7 +488,6 @@
<window_info
id=
"Inspection"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.4"
sideWeight=
"0.5"
order=
"5"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Thumbnails"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.32990867"
sideWeight=
"0.5"
order=
"9"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Hierarchy"
active=
"false"
anchor=
"right"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"true"
show_stripe_button=
"true"
weight=
"0.091216214"
sideWeight=
"0.5"
order=
"2"
side_tool=
"false"
content_ui=
"combo"
/>
<window_info
id=
"Find"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.32846716"
sideWeight=
"0.5"
order=
"1"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Ant Build"
active=
"false"
anchor=
"right"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.25"
sideWeight=
"0.5"
order=
"1"
side_tool=
"false"
content_ui=
"tabs"
/>
</layout>
<layout-to-restore>
...
...
@@ -795,14 +786,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/entrypoint.sh"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"108"
>
<caret
line=
"6"
column=
"0"
lean-forward=
"false"
selection-start-line=
"6"
selection-start-column=
"0"
selection-end-line=
"6"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/node_modules/@types/mime/index.d.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"144"
>
...
...
@@ -821,13 +804,6 @@
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"220"
>
<caret
line=
"64"
column=
"24"
lean-forward=
"false"
selection-start-line=
"64"
selection-start-column=
"24"
selection-end-line=
"64"
selection-end-column=
"24"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/server.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"471"
>
<caret
line=
"39"
column=
"0"
lean-forward=
"false"
selection-start-line=
"39"
selection-start-column=
"0"
selection-end-line=
"40"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
...
...
@@ -848,29 +824,37 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/package.json"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"342"
>
<caret
line=
"20"
column=
"23"
lean-forward=
"true"
selection-start-line=
"20"
selection-start-column=
"23"
selection-end-line=
"20"
selection-end-column=
"23"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/test.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
0
"
>
<state
relative-caret-position=
"
-1023
"
>
<caret
line=
"0"
column=
"0"
lean-forward=
"false"
selection-start-line=
"0"
selection-start-column=
"0"
selection-end-line=
"2"
selection-end-column=
"3"
/>
<folding>
<element
signature=
"n#!!doc"
expanded=
"
tru
e"
/>
<element
signature=
"e#44#86#0"
expanded=
"
tru
e"
/>
<element
signature=
"n#!!doc"
expanded=
"
fals
e"
/>
<element
signature=
"e#44#86#0"
expanded=
"
fals
e"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
package.json
"
>
<entry
file=
"file://$PROJECT_DIR$/
entrypoint.sh
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
342
"
>
<caret
line=
"
20"
column=
"23"
lean-forward=
"true"
selection-start-line=
"20"
selection-start-column=
"23"
selection-end-line=
"20"
selection-end-column=
"23
"
/>
<state
relative-caret-position=
"
108
"
>
<caret
line=
"
6"
column=
"0"
lean-forward=
"false"
selection-start-line=
"6"
selection-start-column=
"0"
selection-end-line=
"6"
selection-end-column=
"0
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/migrate.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
-107
"
>
<caret
line=
"
41"
column=
"87"
lean-forward=
"false"
selection-start-line=
"41"
selection-start-column=
"87"
selection-end-line=
"41"
selection-end-column=
"87
"
/>
<state
relative-caret-position=
"
296
"
>
<caret
line=
"
132"
column=
"15"
lean-forward=
"true"
selection-start-line=
"132"
selection-start-column=
"15"
selection-end-line=
"132"
selection-end-column=
"15
"
/>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
</folding>
...
...
@@ -879,16 +863,26 @@
</entry>
<entry
file=
"file://$PROJECT_DIR$/package/main.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"329"
>
<caret
line=
"81"
column=
"36"
lean-forward=
"true"
selection-start-line=
"81"
selection-start-column=
"36"
selection-end-line=
"81"
selection-end-column=
"36"
/>
<state
relative-caret-position=
"-951"
>
<caret
line=
"15"
column=
"5"
lean-forward=
"false"
selection-start-line=
"15"
selection-start-column=
"5"
selection-end-line=
"15"
selection-end-column=
"5"
/>
<folding>
<element
signature=
"e#0#29#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/server.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"471"
>
<caret
line=
"39"
column=
"0"
lean-forward=
"false"
selection-start-line=
"39"
selection-start-column=
"0"
selection-end-line=
"40"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/routes/upload.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
439
"
>
<caret
line=
"1
91"
column=
"0"
lean-forward=
"true"
selection-start-line=
"191"
selection-start-column=
"0"
selection-end-line=
"191"
selection-end-column=
"0
"
/>
<state
relative-caret-position=
"
372
"
>
<caret
line=
"1
19"
column=
"51"
lean-forward=
"true"
selection-start-line=
"119"
selection-start-column=
"51"
selection-end-line=
"119"
selection-end-column=
"51
"
/>
<folding>
<element
signature=
"e#0#28#0"
expanded=
"true"
/>
</folding>
...
...
migrate.ts
View file @
e464bca1
import
axios
from
'
axios
'
;
import
config
from
'
./config
'
;
import
*
as
uuid
from
'
uuid
'
;
import
*
as
_
from
'
lodash
'
import
{
XmlDocument
}
from
'
xmldoc
'
;
...
...
@@ -104,7 +103,7 @@ async function main() {
let
{
data
}
=
await
axios
.
get
(
config
.
old_apps_json
);
let
newApps
=
await
axios
.
get
(
config
.
new_apps_json
);
newApps
.
data
.
map
(
app
=>
{
apps
[
app
[
'
id
'
]]
=
app
;
});
...
...
@@ -116,15 +115,19 @@ async function main() {
}
}
// for (let app of
data
) {
// if (
['th10
'].includes(app['id'])) {
// for (let app of
_.sampleSize(data, 1)
) {
// if (
!['ygopro', 'desmume', 'test
'].includes(app['id'])) {
// await updateApp(app);
// }
// }
for
(
let
app
of
_
.
sampleSize
(
data
,
1
))
{
for
(
let
i
=
0
,
t
=
0
;
i
<=
data
.
length
;
i
+=
1
,
t
+=
60000
)
{
let
app
=
data
[
i
];
if
(
!
[
'
ygopro
'
,
'
desmume
'
,
'
test
'
].
includes
(
app
[
'
id
'
]))
{
await
updateApp
(
app
);
setTimeout
(
async
()
=>
{
console
.
log
(
`正在处理
${
app
[
'
id
'
]}
`
);
await
updateApp
(
app
);
},
t
);
}
}
}
catch
(
e
)
{
...
...
package/main.ts
View file @
e464bca1
...
...
@@ -78,10 +78,9 @@ export async function bundle(...args) {
let
fullPath
=
path
.
join
(
path
.
dirname
(
filePath
),
`
${
fullHash
}
.tar.gz`
);
await
fs
.
renameAsync
(
filePath
,
fullPath
);
await
fs
.
removeAsync
(
uploadFile_path
)
await
fs
.
removeAsync
(
package_path
)
return
{
uploadFilePath
:
uploadFile_path
,
pckagePath
:
package_path
,
distPath
:
dist_path
,
files
:
Array
.
from
(
files
.
values
()),
archives
:
Array
.
from
(
archives
.
values
()),
...
...
src/routes/upload.ts
View file @
e464bca1
...
...
@@ -118,6 +118,8 @@ export const UploadPackage = async (ctx: Context) => {
// 上传完,干掉本地目录
await
fs
.
removeAsync
(
bundled
.
distPath
);
await
fs
.
removeAsync
(
bundled
.
pckagePath
);
await
fs
.
removeAsync
(
bundled
.
uploadFilePath
);
}
catch
(
e
)
{
...
...
@@ -183,6 +185,8 @@ const uploadPackageUrl = async (ctx: Context) => {
// 上传完,干掉本地目录
await
fs
.
removeAsync
(
bundled
.
distPath
);
await
fs
.
removeAsync
(
bundled
.
pckagePath
);
await
fs
.
removeAsync
(
bundled
.
uploadFilePath
);
}
catch
(
e
)
{
console
.
trace
(
e
);
pack
!
.
status
=
'
failed
'
;
...
...
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