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
f5212323
Commit
f5212323
authored
May 02, 2017
by
nano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only one arira2 socket channel
parent
c6a497f9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
64 deletions
+55
-64
.idea/workspace.xml
.idea/workspace.xml
+46
-56
package/main.ts
package/main.ts
+4
-3
src/routes/upload.ts
src/routes/upload.ts
+5
-5
No files found.
.idea/workspace.xml
View file @
f5212323
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<project
version=
"4"
>
<component
name=
"BookmarkManager"
>
<component
name=
"BookmarkManager"
>
<bookmark
url=
"file://$PROJECT_DIR$/src/routes/upload.ts"
line=
"
18
"
/>
<bookmark
url=
"file://$PROJECT_DIR$/src/routes/upload.ts"
line=
"
23
"
/>
</component>
</component>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"f0cbce64-0ebc-4f60-8c2d-2fe9e214a8c0"
name=
"Default"
comment=
""
>
<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"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/src/routes/upload.ts"
afterPath=
"$PROJECT_DIR$/src/routes/upload.ts"
/>
</list>
</list>
<ignored
path=
"mycard-console-backend.iws"
/>
<ignored
path=
"mycard-console-backend.iws"
/>
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<file
leaf-file-name=
"migrate.ts"
pinned=
"false"
current-in-tab=
"false"
>
<file
leaf-file-name=
"migrate.ts"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/migrate.ts"
>
<entry
file=
"file://$PROJECT_DIR$/migrate.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
192
"
>
<state
relative-caret-position=
"
353
"
>
<caret
line=
"128"
column=
"22"
lean-forward=
"true"
selection-start-line=
"128"
selection-start-column=
"22"
selection-end-line=
"128"
selection-end-column=
"22"
/>
<caret
line=
"128"
column=
"22"
lean-forward=
"true"
selection-start-line=
"128"
selection-start-column=
"22"
selection-end-line=
"128"
selection-end-column=
"22"
/>
<folding>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
...
@@ -54,8 +54,8 @@
...
@@ -54,8 +54,8 @@
<file
leaf-file-name=
"main.ts"
pinned=
"false"
current-in-tab=
"false"
>
<file
leaf-file-name=
"main.ts"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/package/main.ts"
>
<entry
file=
"file://$PROJECT_DIR$/package/main.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
124
"
>
<state
relative-caret-position=
"
409
"
>
<caret
line=
"
10"
column=
"25"
lean-forward=
"true"
selection-start-line=
"10"
selection-start-column=
"25"
selection-end-line=
"10"
selection-end-column=
"25
"
/>
<caret
line=
"
85"
column=
"21"
lean-forward=
"false"
selection-start-line=
"85"
selection-start-column=
"21"
selection-end-line=
"85"
selection-end-column=
"21
"
/>
<folding>
<folding>
<element
signature=
"e#0#29#0"
expanded=
"true"
/>
<element
signature=
"e#0#29#0"
expanded=
"true"
/>
</folding>
</folding>
...
@@ -66,8 +66,8 @@
...
@@ -66,8 +66,8 @@
<file
leaf-file-name=
"upload.ts"
pinned=
"false"
current-in-tab=
"true"
>
<file
leaf-file-name=
"upload.ts"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/src/routes/upload.ts"
>
<entry
file=
"file://$PROJECT_DIR$/src/routes/upload.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
-213
"
>
<state
relative-caret-position=
"
342
"
>
<caret
line=
"19
2"
column=
"28"
lean-forward=
"false"
selection-start-line=
"192"
selection-start-column=
"28"
selection-end-line=
"192"
selection-end-column=
"28
"
/>
<caret
line=
"19
"
column=
"0"
lean-forward=
"true"
selection-start-line=
"19"
selection-start-column=
"0"
selection-end-line=
"19"
selection-end-column=
"0
"
/>
<folding>
<folding>
<element
signature=
"e#0#28#0"
expanded=
"true"
/>
<element
signature=
"e#0#28#0"
expanded=
"true"
/>
</folding>
</folding>
...
@@ -75,16 +75,6 @@
...
@@ -75,16 +75,6 @@
</provider>
</provider>
</entry>
</entry>
</file>
</file>
<file
leaf-file-name=
"utils.ts"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/utils.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"291"
>
<caret
line=
"32"
column=
"7"
lean-forward=
"true"
selection-start-line=
"32"
selection-start-column=
"7"
selection-end-line=
"32"
selection-end-column=
"7"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
</leaf>
</leaf>
</component>
</component>
<component
name=
"FileTemplateManagerImpl"
>
<component
name=
"FileTemplateManagerImpl"
>
...
@@ -98,7 +88,6 @@
...
@@ -98,7 +88,6 @@
</component>
</component>
<component
name=
"FindInProjectRecents"
>
<component
name=
"FindInProjectRecents"
>
<findStrings>
<findStrings>
<find>
files
</find>
<find>
author
</find>
<find>
author
</find>
<find>
paent
</find>
<find>
paent
</find>
<find>
parent
</find>
<find>
parent
</find>
...
@@ -122,12 +111,13 @@
...
@@ -122,12 +111,13 @@
<find>
const fullSize \= \(await fs\.statAsync\(filePath\)\)\.size\;\n
</find>
<find>
const fullSize \= \(await fs\.statAsync\(filePath\)\)\.size\;\n
</find>
<find>
f
</find>
<find>
f
</find>
<find>
stats
</find>
<find>
stats
</find>
<find>
fs
</find>
<find>
rename
</find>
<find>
rename
</find>
<find>
uploadFile_
</find>
<find>
uploadFile_
</find>
<find>
fs.stat
</find>
<find>
fs.stat
</find>
<find>
fs.rename
</find>
<find>
fs.rename
</find>
<find>
console.log
</find>
<find>
console.log
</find>
<find>
fs
</find>
<find>
fs.
</find>
</findStrings>
</findStrings>
</component>
</component>
<component
name=
"Git.Settings"
>
<component
name=
"Git.Settings"
>
...
@@ -164,15 +154,15 @@
...
@@ -164,15 +154,15 @@
<option
value=
"$PROJECT_DIR$/package.json"
/>
<option
value=
"$PROJECT_DIR$/package.json"
/>
<option
value=
"$PROJECT_DIR$/src/routes/package.ts"
/>
<option
value=
"$PROJECT_DIR$/src/routes/package.ts"
/>
<option
value=
"$PROJECT_DIR$/src/dot.ts"
/>
<option
value=
"$PROJECT_DIR$/src/dot.ts"
/>
<option
value=
"$PROJECT_DIR$/src/utils.ts"
/>
<option
value=
"$PROJECT_DIR$/test.ts"
/>
<option
value=
"$PROJECT_DIR$/test.ts"
/>
<option
value=
"$PROJECT_DIR$/src/routes/app.ts"
/>
<option
value=
"$PROJECT_DIR$/src/routes/app.ts"
/>
<option
value=
"$PROJECT_DIR$/src/models/App.ts"
/>
<option
value=
"$PROJECT_DIR$/src/models/App.ts"
/>
<option
value=
"$PROJECT_DIR$/package/utils.ts"
/>
<option
value=
"$PROJECT_DIR$/package/utils.ts"
/>
<option
value=
"$PROJECT_DIR$/aria2.conf"
/>
<option
value=
"$PROJECT_DIR$/aria2.conf"
/>
<option
value=
"$PROJECT_DIR$/config.ts"
/>
<option
value=
"$PROJECT_DIR$/config.ts"
/>
<option
value=
"$PROJECT_DIR$/package/main.ts"
/>
<option
value=
"$PROJECT_DIR$/migrate.ts"
/>
<option
value=
"$PROJECT_DIR$/migrate.ts"
/>
<option
value=
"$PROJECT_DIR$/package/main.ts"
/>
<option
value=
"$PROJECT_DIR$/src/utils.ts"
/>
<option
value=
"$PROJECT_DIR$/src/routes/upload.ts"
/>
<option
value=
"$PROJECT_DIR$/src/routes/upload.ts"
/>
</list>
</list>
</option>
</option>
...
@@ -451,12 +441,12 @@
...
@@ -451,12 +441,12 @@
<workItem
from=
"1493198225466"
duration=
"47067000"
/>
<workItem
from=
"1493198225466"
duration=
"47067000"
/>
<workItem
from=
"1493371982129"
duration=
"6000"
/>
<workItem
from=
"1493371982129"
duration=
"6000"
/>
<workItem
from=
"1493372010655"
duration=
"3472000"
/>
<workItem
from=
"1493372010655"
duration=
"3472000"
/>
<workItem
from=
"1493692283332"
duration=
"1
1014
000"
/>
<workItem
from=
"1493692283332"
duration=
"1
2870
000"
/>
</task>
</task>
<servers
/>
<servers
/>
</component>
</component>
<component
name=
"TimeTrackingManager"
>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"21
2785
000"
/>
<option
name=
"totallyTimeSpent"
value=
"21
4641
000"
/>
</component>
</component>
<component
name=
"TodoView"
>
<component
name=
"TodoView"
>
<todo-panel
id=
"selected-file"
>
<todo-panel
id=
"selected-file"
>
...
@@ -469,7 +459,6 @@
...
@@ -469,7 +459,6 @@
</component>
</component>
<component
name=
"ToolWindowManager"
>
<component
name=
"ToolWindowManager"
>
<frame
x=
"55"
y=
"23"
width=
"1377"
height=
"872"
extended-state=
"0"
/>
<frame
x=
"55"
y=
"23"
width=
"1377"
height=
"872"
extended-state=
"0"
/>
<editor
active=
"true"
/>
<layout>
<layout>
<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=
"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 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"
/>
...
@@ -477,7 +466,7 @@
...
@@ -477,7 +466,7 @@
<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=
"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=
"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=
"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=
"
fals
e"
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=
"Terminal"
active=
"
tru
e"
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=
"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=
"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=
"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"
/>
...
@@ -767,13 +756,6 @@
...
@@ -767,13 +756,6 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/package/utils.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"162"
>
<caret
line=
"12"
column=
"15"
lean-forward=
"true"
selection-start-line=
"12"
selection-start-column=
"15"
selection-end-line=
"12"
selection-end-column=
"15"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/aria2.conf"
>
<entry
file=
"file://$PROJECT_DIR$/aria2.conf"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"324"
>
<state
relative-caret-position=
"324"
>
...
@@ -803,14 +785,6 @@
...
@@ -803,14 +785,6 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/utils.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"291"
>
<caret
line=
"32"
column=
"7"
lean-forward=
"true"
selection-start-line=
"32"
selection-start-column=
"7"
selection-end-line=
"32"
selection-end-column=
"7"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/test.ts"
>
<entry
file=
"file://$PROJECT_DIR$/test.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-1023"
>
<state
relative-caret-position=
"-1023"
>
...
@@ -846,25 +820,27 @@
...
@@ -846,25 +820,27 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/s
rc/routes/package
.ts"
>
<entry
file=
"file://$PROJECT_DIR$/s
erver
.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
16
0"
>
<state
relative-caret-position=
"
-32
0"
>
<caret
line=
"
195"
column=
"15"
lean-forward=
"false"
selection-start-line=
"195"
selection-start-column=
"4"
selection-end-line=
"195"
selection-end-column=
"15
"
/>
<caret
line=
"
31"
column=
"7"
lean-forward=
"true"
selection-start-line=
"31"
selection-start-column=
"7"
selection-end-line=
"31"
selection-end-column=
"7
"
/>
<folding
/>
<folding
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
server
.ts"
>
<entry
file=
"file://$PROJECT_DIR$/
package/main
.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-320"
>
<state
relative-caret-position=
"409"
>
<caret
line=
"31"
column=
"7"
lean-forward=
"true"
selection-start-line=
"31"
selection-start-column=
"7"
selection-end-line=
"31"
selection-end-column=
"7"
/>
<caret
line=
"85"
column=
"21"
lean-forward=
"false"
selection-start-line=
"85"
selection-start-column=
"21"
selection-end-line=
"85"
selection-end-column=
"21"
/>
<folding
/>
<folding>
<element
signature=
"e#0#29#0"
expanded=
"true"
/>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/migrate.ts"
>
<entry
file=
"file://$PROJECT_DIR$/migrate.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
192
"
>
<state
relative-caret-position=
"
353
"
>
<caret
line=
"128"
column=
"22"
lean-forward=
"true"
selection-start-line=
"128"
selection-start-column=
"22"
selection-end-line=
"128"
selection-end-column=
"22"
/>
<caret
line=
"128"
column=
"22"
lean-forward=
"true"
selection-start-line=
"128"
selection-start-column=
"22"
selection-end-line=
"128"
selection-end-column=
"22"
/>
<folding>
<folding>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
<element
signature=
"e#0#26#0"
expanded=
"true"
/>
...
@@ -872,20 +848,34 @@
...
@@ -872,20 +848,34 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
package/main
.ts"
>
<entry
file=
"file://$PROJECT_DIR$/
src/routes/package
.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"124"
>
<state
relative-caret-position=
"187"
>
<caret
line=
"10"
column=
"25"
lean-forward=
"true"
selection-start-line=
"10"
selection-start-column=
"25"
selection-end-line=
"10"
selection-end-column=
"25"
/>
<caret
line=
"209"
column=
"36"
lean-forward=
"false"
selection-start-line=
"209"
selection-start-column=
"36"
selection-end-line=
"209"
selection-end-column=
"36"
/>
<folding>
<folding
/>
<element
signature=
"e#0#29#0"
expanded=
"true"
/>
</state>
</folding>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/utils.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"18"
>
<caret
line=
"2"
column=
"0"
lean-forward=
"true"
selection-start-line=
"2"
selection-start-column=
"0"
selection-end-line=
"2"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/package/utils.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"162"
>
<caret
line=
"12"
column=
"15"
lean-forward=
"true"
selection-start-line=
"12"
selection-start-column=
"15"
selection-end-line=
"12"
selection-end-column=
"15"
/>
<folding
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/routes/upload.ts"
>
<entry
file=
"file://$PROJECT_DIR$/src/routes/upload.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
-213
"
>
<state
relative-caret-position=
"
342
"
>
<caret
line=
"19
2"
column=
"28"
lean-forward=
"false"
selection-start-line=
"192"
selection-start-column=
"28"
selection-end-line=
"192"
selection-end-column=
"28
"
/>
<caret
line=
"19
"
column=
"0"
lean-forward=
"true"
selection-start-line=
"19"
selection-start-column=
"0"
selection-end-line=
"19"
selection-end-column=
"0
"
/>
<folding>
<folding>
<element
signature=
"e#0#28#0"
expanded=
"true"
/>
<element
signature=
"e#0#28#0"
expanded=
"true"
/>
</folding>
</folding>
...
...
package/main.ts
View file @
f5212323
...
@@ -75,12 +75,13 @@ export async function bundle(...args) {
...
@@ -75,12 +75,13 @@ export async function bundle(...args) {
const
fullHash
=
await
caculateSHA256
(
filePath
);
const
fullHash
=
await
caculateSHA256
(
filePath
);
const
fullSize
=
(
await
fs
.
statAsync
(
filePath
)).
size
;
const
fullSize
=
(
await
fs
.
statAsync
(
filePath
)).
size
;
let
fullPath
=
path
.
join
(
path
.
dirname
(
filePath
)
,
`
${
fullHash
}
.tar.gz`
);
let
fullPath
=
path
.
join
(
dist_path
,
`
${
fullHash
}
.tar.gz`
);
await
fs
.
renameAsync
(
filePath
,
fullPath
);
await
fs
.
renameAsync
(
filePath
,
fullPath
);
await
fs
.
removeAsync
(
uploadFile_path
);
await
fs
.
removeAsync
(
package_path
);
return
{
return
{
uploadFilePath
:
uploadFile_path
,
pckagePath
:
package_path
,
distPath
:
dist_path
,
distPath
:
dist_path
,
files
:
Array
.
from
(
files
.
values
()),
files
:
Array
.
from
(
files
.
values
()),
archives
:
Array
.
from
(
archives
.
values
()),
archives
:
Array
.
from
(
archives
.
values
()),
...
...
src/routes/upload.ts
View file @
f5212323
...
@@ -14,6 +14,11 @@ import config from '../../config';
...
@@ -14,6 +14,11 @@ import config from '../../config';
import
{
UploadOSS
}
from
'
../utils
'
;
import
{
UploadOSS
}
from
'
../utils
'
;
import
Router
=
require
(
'
koa-router
'
);
import
Router
=
require
(
'
koa-router
'
);
const
downloader
=
new
Aria2
;
downloader
.
open
();
const
checkFilePath
=
async
(
file
)
=>
{
const
checkFilePath
=
async
(
file
)
=>
{
if
([
'
.gz
'
,
'
.rar
'
,
'
.zip
'
,
'
.7z
'
].
indexOf
(
path
.
extname
(
file
.
path
))
===
-
1
)
{
if
([
'
.gz
'
,
'
.rar
'
,
'
.zip
'
,
'
.7z
'
].
indexOf
(
path
.
extname
(
file
.
path
))
===
-
1
)
{
console
.
log
(
file
);
console
.
log
(
file
);
...
@@ -148,15 +153,12 @@ const uploadPackageUrl = async (ctx: Context) => {
...
@@ -148,15 +153,12 @@ const uploadPackageUrl = async (ctx: Context) => {
}
}
// testUrl: https://r.my-card.in/release/dist/0c16a3ecb115fd7cf575ccdd64f62a8f3edc635b087950e4ed4f3f781972bbfd.tar.gz
// testUrl: https://r.my-card.in/release/dist/0c16a3ecb115fd7cf575ccdd64f62a8f3edc635b087950e4ed4f3f781972bbfd.tar.gz
const
downloader
=
new
Aria2
;
let
pack
=
await
mongodb
.
Packages
.
findOne
({
_id
:
toObjectID
(
ctx
.
request
.
body
.
_id
)});
let
pack
=
await
mongodb
.
Packages
.
findOne
({
_id
:
toObjectID
(
ctx
.
request
.
body
.
_id
)});
if
(
!
pack
)
{
if
(
!
pack
)
{
return
ctx
.
throw
(
400
,
'
pack not exists
'
);
return
ctx
.
throw
(
400
,
'
pack not exists
'
);
}
}
await
downloader
.
open
();
downloader
.
onDownloadStart
=
async
()
=>
{
downloader
.
onDownloadStart
=
async
()
=>
{
pack
!
.
status
=
'
uploading
'
;
pack
!
.
status
=
'
uploading
'
;
await
pack
!
.
save
();
await
pack
!
.
save
();
...
@@ -183,8 +185,6 @@ const uploadPackageUrl = async (ctx: Context) => {
...
@@ -183,8 +185,6 @@ const uploadPackageUrl = async (ctx: Context) => {
// 上传完,干掉本地目录
// 上传完,干掉本地目录
await
fs
.
removeAsync
(
bundled
.
distPath
);
await
fs
.
removeAsync
(
bundled
.
distPath
);
await
fs
.
removeAsync
(
bundled
.
pckagePath
);
await
fs
.
removeAsync
(
bundled
.
uploadFilePath
);
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
trace
(
e
);
console
.
trace
(
e
);
pack
!
.
status
=
'
failed
'
;
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