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
f319ba21
Commit
f319ba21
authored
Apr 26, 2017
by
nano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oss upload
parent
29f1a5a8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
121 additions
and
163 deletions
+121
-163
.idea/workspace.xml
.idea/workspace.xml
+92
-153
Dockerfile
Dockerfile
+4
-0
package/main.ts
package/main.ts
+1
-0
src/routes/upload.ts
src/routes/upload.ts
+7
-10
src/utils.ts
src/utils.ts
+17
-0
No files found.
.idea/workspace.xml
View file @
f319ba21
...
@@ -3,8 +3,10 @@
...
@@ -3,8 +3,10 @@
<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$/.idea/workspace.xml"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/Dockerfile"
afterPath=
"$PROJECT_DIR$/Dockerfile"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/package/main.ts"
afterPath=
"$PROJECT_DIR$/package/main.ts"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/package/main.ts"
afterPath=
"$PROJECT_DIR$/package/main.ts"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/src/routes/app.ts"
afterPath=
"$PROJECT_DIR$/src/routes/app.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/utils.ts"
afterPath=
"$PROJECT_DIR$/src/utils.ts"
/>
</list>
</list>
<ignored
path=
"mycard-console-backend.iws"
/>
<ignored
path=
"mycard-console-backend.iws"
/>
<ignored
path=
".idea/workspace.xml"
/>
<ignored
path=
".idea/workspace.xml"
/>
...
@@ -37,54 +39,27 @@
...
@@ -37,54 +39,27 @@
</provider>
</provider>
</entry>
</entry>
</file>
</file>
<file
leaf-file-name=
"entrypoint.sh"
pinned=
"false"
current-in-tab=
"false"
>
<file
leaf-file-name=
"upload.ts"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/entrypoint.sh"
>
<entry
file=
"file://$PROJECT_DIR$/src/routes/upload.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"54"
>
<caret
line=
"3"
column=
"0"
lean-forward=
"false"
selection-start-line=
"3"
selection-start-column=
"0"
selection-end-line=
"3"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"app.ts"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/routes/app.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"282"
>
<caret
line=
"46"
column=
"30"
lean-forward=
"false"
selection-start-line=
"46"
selection-start-column=
"30"
selection-end-line=
"46"
selection-end-column=
"30"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"App.ts"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/src/models/App.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"167"
>
<caret
line=
"49"
column=
"26"
lean-forward=
"true"
selection-start-line=
"49"
selection-start-column=
"26"
selection-end-line=
"49"
selection-end-column=
"26"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"package.ts"
pinned=
"false"
current-in-tab=
"false"
>
<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=
"
1098
"
>
<state
relative-caret-position=
"
373
"
>
<caret
line=
"
66"
column=
"0"
lean-forward=
"false"
selection-start-line=
"66"
selection-start-column=
"0"
selection-end-line=
"67"
selection-end-column=
"0
"
/>
<caret
line=
"
164"
column=
"39"
lean-forward=
"false"
selection-start-line=
"164"
selection-start-column=
"39"
selection-end-line=
"164"
selection-end-column=
"39
"
/>
<folding>
<folding>
<element
signature=
"e#39#74#0"
expanded=
"true"
/>
<element
signature=
"e#0#28#0"
expanded=
"true"
/>
<element
signature=
"e#355#397#0"
expanded=
"true"
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
</file>
</file>
<file
leaf-file-name=
"u
pload.ts"
pinned=
"false"
current-in-tab=
"fals
e"
>
<file
leaf-file-name=
"u
tils.ts"
pinned=
"false"
current-in-tab=
"tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/src/
routes/upload
.ts"
>
<entry
file=
"file://$PROJECT_DIR$/src/
utils
.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1764"
>
<state
relative-caret-position=
"184"
>
<caret
line=
"110"
column=
"34"
lean-forward=
"false"
selection-start-line=
"110"
selection-start-column=
"34"
selection-end-line=
"110"
selection-end-column=
"34"
/>
<caret
line=
"24"
column=
"30"
lean-forward=
"true"
selection-start-line=
"24"
selection-start-column=
"30"
selection-end-line=
"24"
selection-end-column=
"30"
/>
<folding
/>
<folding>
<element
signature=
"e#0#24#0"
expanded=
"true"
/>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
...
@@ -92,8 +67,8 @@
...
@@ -92,8 +67,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=
"
432
"
>
<state
relative-caret-position=
"
246
"
>
<caret
line=
"
27"
column=
"40"
lean-forward=
"false"
selection-start-line=
"27"
selection-start-column=
"40"
selection-end-line=
"27"
selection-end-column=
"40
"
/>
<caret
line=
"
79"
column=
"43"
lean-forward=
"false"
selection-start-line=
"79"
selection-start-column=
"43"
selection-end-line=
"79"
selection-end-column=
"43
"
/>
<folding>
<folding>
<element
signature=
"e#0#29#0"
expanded=
"true"
/>
<element
signature=
"e#0#29#0"
expanded=
"true"
/>
</folding>
</folding>
...
@@ -101,36 +76,6 @@
...
@@ -101,36 +76,6 @@
</provider>
</provider>
</entry>
</entry>
</file>
</file>
<file
leaf-file-name=
"Instance.d.ts"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/node_modules/iridium/dist/lib/Instance.d.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"558"
>
<caret
line=
"40"
column=
"21"
lean-forward=
"false"
selection-start-line=
"40"
selection-start-column=
"13"
selection-end-line=
"40"
selection-end-column=
"21"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"Package.ts"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/models/Package.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"54"
>
<caret
line=
"3"
column=
"0"
lean-forward=
"false"
selection-start-line=
"3"
selection-start-column=
"0"
selection-end-line=
"4"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"Dockerfile"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Dockerfile"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"234"
>
<caret
line=
"13"
column=
"12"
lean-forward=
"false"
selection-start-line=
"13"
selection-start-column=
"12"
selection-end-line=
"13"
selection-end-column=
"12"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
</leaf>
</leaf>
</component>
</component>
<component
name=
"FileTemplateManagerImpl"
>
<component
name=
"FileTemplateManagerImpl"
>
...
@@ -203,7 +148,6 @@
...
@@ -203,7 +148,6 @@
<option
value=
"$PROJECT_DIR$/src/models/Package.ts"
/>
<option
value=
"$PROJECT_DIR$/src/models/Package.ts"
/>
<option
value=
"$PROJECT_DIR$/src/inversify.config.ts"
/>
<option
value=
"$PROJECT_DIR$/src/inversify.config.ts"
/>
<option
value=
"$PROJECT_DIR$/src/types.ts"
/>
<option
value=
"$PROJECT_DIR$/src/types.ts"
/>
<option
value=
"$PROJECT_DIR$/src/utils.ts"
/>
<option
value=
"$PROJECT_DIR$/.travis.yml"
/>
<option
value=
"$PROJECT_DIR$/.travis.yml"
/>
<option
value=
"$PROJECT_DIR$/docker-compose.yml"
/>
<option
value=
"$PROJECT_DIR$/docker-compose.yml"
/>
<option
value=
"$PROJECT_DIR$/src/routes/package.ts"
/>
<option
value=
"$PROJECT_DIR$/src/routes/package.ts"
/>
...
@@ -211,11 +155,12 @@
...
@@ -211,11 +155,12 @@
<option
value=
"$PROJECT_DIR$/package.json"
/>
<option
value=
"$PROJECT_DIR$/package.json"
/>
<option
value=
"$PROJECT_DIR$/entrypoint.sh"
/>
<option
value=
"$PROJECT_DIR$/entrypoint.sh"
/>
<option
value=
"$PROJECT_DIR$/src/routes/upload.js"
/>
<option
value=
"$PROJECT_DIR$/src/routes/upload.js"
/>
<option
value=
"$PROJECT_DIR$/Dockerfile"
/>
<option
value=
"$PROJECT_DIR$/src/models/App.ts"
/>
<option
value=
"$PROJECT_DIR$/src/models/App.ts"
/>
<option
value=
"$PROJECT_DIR$/src/routes/upload.ts"
/>
<option
value=
"$PROJECT_DIR$/package/main.ts"
/>
<option
value=
"$PROJECT_DIR$/src/routes/app.ts"
/>
<option
value=
"$PROJECT_DIR$/src/routes/app.ts"
/>
<option
value=
"$PROJECT_DIR$/package/main.ts"
/>
<option
value=
"$PROJECT_DIR$/Dockerfile"
/>
<option
value=
"$PROJECT_DIR$/src/utils.ts"
/>
<option
value=
"$PROJECT_DIR$/src/routes/upload.ts"
/>
</list>
</list>
</option>
</option>
</component>
</component>
...
@@ -235,8 +180,8 @@
...
@@ -235,8 +180,8 @@
<handled-path
value=
"$PROJECT_DIR$/node_modules"
/>
<handled-path
value=
"$PROJECT_DIR$/node_modules"
/>
</component>
</component>
<component
name=
"ProjectFrameBounds"
>
<component
name=
"ProjectFrameBounds"
>
<option
name=
"x"
value=
"2
28
"
/>
<option
name=
"x"
value=
"2
69
"
/>
<option
name=
"y"
value=
"1
231
"
/>
<option
name=
"y"
value=
"1
154
"
/>
<option
name=
"width"
value=
"1232"
/>
<option
name=
"width"
value=
"1232"
/>
<option
name=
"height"
value=
"777"
/>
<option
name=
"height"
value=
"777"
/>
</component>
</component>
...
@@ -286,24 +231,6 @@
...
@@ -286,24 +231,6 @@
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode"
/>
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode"
/>
</PATH_ELEMENT>
</PATH_ELEMENT>
</PATH>
</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=
"src"
/>
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode"
/>
</PATH_ELEMENT>
<PATH_ELEMENT>
<option
name=
"myItemId"
value=
"models"
/>
<option
name=
"myItemType"
value=
"com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode"
/>
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH>
<PATH_ELEMENT>
<PATH_ELEMENT>
<option
name=
"myItemId"
value=
"moecube-console"
/>
<option
name=
"myItemId"
value=
"moecube-console"
/>
...
@@ -490,12 +417,12 @@
...
@@ -490,12 +417,12 @@
<workItem
from=
"1493107593448"
duration=
"867000"
/>
<workItem
from=
"1493107593448"
duration=
"867000"
/>
<workItem
from=
"1493174892830"
duration=
"25000"
/>
<workItem
from=
"1493174892830"
duration=
"25000"
/>
<workItem
from=
"1493174934848"
duration=
"6205000"
/>
<workItem
from=
"1493174934848"
duration=
"6205000"
/>
<workItem
from=
"1493198225466"
duration=
"
1212
000"
/>
<workItem
from=
"1493198225466"
duration=
"
3388
000"
/>
</task>
</task>
<servers
/>
<servers
/>
</component>
</component>
<component
name=
"TimeTrackingManager"
>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"15
2438
000"
/>
<option
name=
"totallyTimeSpent"
value=
"15
4614
000"
/>
</component>
</component>
<component
name=
"TodoView"
>
<component
name=
"TodoView"
>
<todo-panel
id=
"selected-file"
>
<todo-panel
id=
"selected-file"
>
...
@@ -507,7 +434,7 @@
...
@@ -507,7 +434,7 @@
</todo-panel>
</todo-panel>
</component>
</component>
<component
name=
"ToolWindowManager"
>
<component
name=
"ToolWindowManager"
>
<frame
x=
"2
28"
y=
"1231
"
width=
"1232"
height=
"777"
extended-state=
"0"
/>
<frame
x=
"2
69"
y=
"1154
"
width=
"1232"
height=
"777"
extended-state=
"0"
/>
<editor
active=
"true"
/>
<editor
active=
"true"
/>
<layout>
<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=
"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"
/>
...
@@ -671,13 +598,6 @@
...
@@ -671,13 +598,6 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/config.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"90"
>
<caret
line=
"5"
column=
"1"
lean-forward=
"false"
selection-start-line=
"5"
selection-start-column=
"1"
selection-end-line=
"5"
selection-end-column=
"1"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/node_modules/@types/mime/index.d.ts"
>
<entry
file=
"file://$PROJECT_DIR$/node_modules/@types/mime/index.d.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"126"
>
<state
relative-caret-position=
"126"
>
...
@@ -693,13 +613,6 @@
...
@@ -693,13 +613,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=
"72"
>
<caret
line=
"4"
column=
"0"
lean-forward=
"true"
selection-start-line=
"4"
selection-start-column=
"0"
selection-end-line=
"4"
selection-end-column=
"0"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/checksum.ts"
/>
<entry
file=
"file://$PROJECT_DIR$/src/checksum.ts"
/>
<entry
file=
"file://$PROJECT_DIR$/.editorconfig"
>
<entry
file=
"file://$PROJECT_DIR$/.editorconfig"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
...
@@ -791,21 +704,33 @@
...
@@ -791,21 +704,33 @@
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"18"
>
<state
relative-caret-position=
"18"
>
<caret
line=
"50"
column=
"3"
lean-forward=
"false"
selection-start-line=
"50"
selection-start-column=
"3"
selection-end-line=
"50"
selection-end-column=
"3"
/>
<caret
line=
"50"
column=
"3"
lean-forward=
"false"
selection-start-line=
"50"
selection-start-column=
"3"
selection-end-line=
"50"
selection-end-column=
"3"
/>
<folding>
<element
signature=
"e#77#104#0"
expanded=
"false"
/>
<element
signature=
"e#387#427#0"
expanded=
"false"
/>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$
PROJECT_DIR$/src/models/Iridium
.ts"
>
<entry
file=
"file://$
APPLICATION_HOME_DIR$/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external/lib.es6.d
.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
62
"
>
<state
relative-caret-position=
"1
37
"
>
<caret
line=
"
11"
column=
"0"
lean-forward=
"false"
selection-start-line=
"11"
selection-start-column=
"0"
selection-end-line=
"11"
selection-end-column=
"0
"
/>
<caret
line=
"
998"
column=
"4"
lean-forward=
"false"
selection-start-line=
"998"
selection-start-column=
"4"
selection-end-line=
"998"
selection-end-column=
"4
"
/>
<folding
/>
<folding
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
Dockerfile
"
>
<entry
file=
"file://$PROJECT_DIR$/
src/models/App.ts
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"234"
>
<state
relative-caret-position=
"864"
>
<caret
line=
"13"
column=
"12"
lean-forward=
"false"
selection-start-line=
"13"
selection-start-column=
"12"
selection-end-line=
"13"
selection-end-column=
"12"
/>
<caret
line=
"49"
column=
"26"
lean-forward=
"true"
selection-start-line=
"49"
selection-start-column=
"26"
selection-end-line=
"49"
selection-end-column=
"26"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/routes/app.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"541"
>
<caret
line=
"46"
column=
"30"
lean-forward=
"false"
selection-start-line=
"46"
selection-start-column=
"30"
selection-end-line=
"46"
selection-end-column=
"30"
/>
<folding
/>
<folding
/>
</state>
</state>
</provider>
</provider>
...
@@ -818,78 +743,92 @@
...
@@ -818,78 +743,92 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/
models/P
ackage.ts"
>
<entry
file=
"file://$PROJECT_DIR$/src/
routes/p
ackage.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"54"
>
<state
relative-caret-position=
"131"
>
<caret
line=
"3"
column=
"0"
lean-forward=
"false"
selection-start-line=
"3"
selection-start-column=
"0"
selection-end-line=
"4"
selection-end-column=
"0"
/>
<caret
line=
"66"
column=
"0"
lean-forward=
"false"
selection-start-line=
"66"
selection-start-column=
"0"
selection-end-line=
"67"
selection-end-column=
"0"
/>
<folding>
<element
signature=
"e#39#74#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/node_modules/iridium/dist/lib/Instance.d.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"558"
>
<caret
line=
"40"
column=
"21"
lean-forward=
"false"
selection-start-line=
"40"
selection-start-column=
"13"
selection-end-line=
"40"
selection-end-column=
"21"
/>
<folding
/>
<folding
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$
APPLICATION_HOME_DIR$/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external/lib.es6.d
.ts"
>
<entry
file=
"file://$
PROJECT_DIR$/src/models/Iridium
.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"137"
>
<state
relative-caret-position=
"162"
>
<caret
line=
"998"
column=
"4"
lean-forward=
"false"
selection-start-line=
"998"
selection-start-column=
"4"
selection-end-line=
"998"
selection-end-column=
"4"
/>
<caret
line=
"11"
column=
"0"
lean-forward=
"false"
selection-start-line=
"11"
selection-start-column=
"0"
selection-end-line=
"11"
selection-end-column=
"0"
/>
<folding
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
src/utils
.ts"
>
<entry
file=
"file://$PROJECT_DIR$/
config
.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
36
"
>
<state
relative-caret-position=
"
72
"
>
<caret
line=
"
2"
column=
"13"
lean-forward=
"false"
selection-start-line=
"2"
selection-start-column=
"13"
selection-end-line=
"2"
selection-end-column=
"13
"
/>
<caret
line=
"
4"
column=
"64"
lean-forward=
"true"
selection-start-line=
"4"
selection-start-column=
"64"
selection-end-line=
"4"
selection-end-column=
"64
"
/>
<folding
/>
<folding
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
node_modules/iridium/dist/lib/Instance.d.ts
"
>
<entry
file=
"file://$PROJECT_DIR$/
Dockerfile
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
558
"
>
<state
relative-caret-position=
"
100
"
>
<caret
line=
"
40"
column=
"21"
lean-forward=
"false"
selection-start-line=
"40"
selection-start-column=
"13"
selection-end-line=
"40"
selection-end-column=
"21
"
/>
<caret
line=
"
7"
column=
"57"
lean-forward=
"false"
selection-start-line=
"7"
selection-start-column=
"57"
selection-end-line=
"7"
selection-end-column=
"57
"
/>
<folding
/>
<folding
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/
routes/upload
.ts"
>
<entry
file=
"file://$PROJECT_DIR$/src/
models/Package
.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
764
"
>
<state
relative-caret-position=
"1
8
"
>
<caret
line=
"
110"
column=
"34"
lean-forward=
"false"
selection-start-line=
"110"
selection-start-column=
"34"
selection-end-line=
"110"
selection-end-column=
"34
"
/>
<caret
line=
"
3"
column=
"0"
lean-forward=
"false"
selection-start-line=
"3"
selection-start-column=
"0"
selection-end-line=
"4"
selection-end-column=
"0
"
/>
<folding
/>
<folding
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/package/
main
.ts"
>
<entry
file=
"file://$PROJECT_DIR$/package/
utils
.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"432"
>
<state
relative-caret-position=
"1134"
>
<caret
line=
"27"
column=
"40"
lean-forward=
"false"
selection-start-line=
"27"
selection-start-column=
"40"
selection-end-line=
"27"
selection-end-column=
"40"
/>
<caret
line=
"66"
column=
"76"
lean-forward=
"true"
selection-start-line=
"66"
selection-start-column=
"76"
selection-end-line=
"66"
selection-end-column=
"92"
/>
<folding>
<folding
/>
<element
signature=
"e#0#29#0"
expanded=
"true"
/>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
src/routes/package
.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=
"
1098
"
>
<state
relative-caret-position=
"
246
"
>
<caret
line=
"
66"
column=
"0"
lean-forward=
"false"
selection-start-line=
"66"
selection-start-column=
"0"
selection-end-line=
"67"
selection-end-column=
"0
"
/>
<caret
line=
"
79"
column=
"43"
lean-forward=
"false"
selection-start-line=
"79"
selection-start-column=
"43"
selection-end-line=
"79"
selection-end-column=
"43
"
/>
<folding>
<folding>
<element
signature=
"e#
39#74
#0"
expanded=
"true"
/>
<element
signature=
"e#
0#29
#0"
expanded=
"true"
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/routes/
app
.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=
"282"
>
<state
relative-caret-position=
"373"
>
<caret
line=
"46"
column=
"30"
lean-forward=
"false"
selection-start-line=
"46"
selection-start-column=
"30"
selection-end-line=
"46"
selection-end-column=
"30"
/>
<caret
line=
"164"
column=
"39"
lean-forward=
"false"
selection-start-line=
"164"
selection-start-column=
"39"
selection-end-line=
"164"
selection-end-column=
"39"
/>
<folding
/>
<folding>
<element
signature=
"e#0#28#0"
expanded=
"true"
/>
<element
signature=
"e#355#397#0"
expanded=
"true"
/>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/
models/App
.ts"
>
<entry
file=
"file://$PROJECT_DIR$/src/
utils
.ts"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"167"
>
<state
relative-caret-position=
"184"
>
<caret
line=
"49"
column=
"26"
lean-forward=
"true"
selection-start-line=
"49"
selection-start-column=
"26"
selection-end-line=
"49"
selection-end-column=
"26"
/>
<caret
line=
"24"
column=
"30"
lean-forward=
"true"
selection-start-line=
"24"
selection-start-column=
"30"
selection-end-line=
"24"
selection-end-column=
"30"
/>
<folding
/>
<folding>
<element
signature=
"e#0#24#0"
expanded=
"true"
/>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
...
...
Dockerfile
View file @
f319ba21
...
@@ -2,6 +2,10 @@ FROM node
...
@@ -2,6 +2,10 @@ FROM node
RUN
apt-get update
RUN
apt-get update
RUN
apt-get
install
aria2
-y
RUN
apt-get
install
aria2
-y
RUN
apt-get curl
RUN
curl
--location
--retry
5
--output
ossutil
'https://github.com/mycard/ossutil/releases/download/1.0.0.Beta2/ossutil
RUN
chmod
+x ossutil
&&
mv
ossutil /usr/local/bin/ossutil
RUN
mkdir
-p
/usr/src/app
RUN
mkdir
-p
/usr/src/app
WORKDIR
/usr/src/app
WORKDIR
/usr/src/app
...
...
package/main.ts
View file @
f319ba21
...
@@ -80,6 +80,7 @@ export async function bundle(...args) {
...
@@ -80,6 +80,7 @@ export async function bundle(...args) {
await
fs
.
renameAsync
(
filePath
,
fullPath
);
await
fs
.
renameAsync
(
filePath
,
fullPath
);
return
{
return
{
distPath
:
dist_path
,
files
:
Array
.
from
(
files
.
values
()),
files
:
Array
.
from
(
files
.
values
()),
archives
:
Array
.
from
(
archives
.
values
()),
archives
:
Array
.
from
(
archives
.
values
()),
fullSize
,
fullSize
,
...
...
src/routes/upload.ts
View file @
f319ba21
...
@@ -7,18 +7,12 @@ import * as Client from 'aliyun-oss-upload-stream';
...
@@ -7,18 +7,12 @@ import * as Client from 'aliyun-oss-upload-stream';
import
*
as
fs
from
'
fs-extra-promise
'
;
import
*
as
fs
from
'
fs-extra-promise
'
;
import
*
as
path
from
'
path
'
;
import
*
as
path
from
'
path
'
;
import
*
as
Aria2
from
'
aria2
'
;
import
*
as
Aria2
from
'
aria2
'
;
import
Router
=
require
(
'
koa-router
'
);
import
{
bundle
}
from
'
../../package/main
'
;
import
{
bundle
}
from
'
../../package/main
'
;
import
{
mongodb
}
from
'
../models/Iridium
'
;
import
{
mongodb
}
from
'
../models/Iridium
'
;
import
{
toObjectID
}
from
'
iridium
'
;
import
{
toObjectID
}
from
'
iridium
'
;
import
config
from
'
../../config
'
;
import
config
from
'
../../config
'
;
import
{
UploadOSS
}
from
'
../utils
'
// const Aria2Options = {
// host: 'localhost',
// port: 6800,
// secure: false,
// secret: '',
// path: path.join(__dirname, '../../test/upload')
// }
const
checkPackage
=
async
(
file
)
=>
{
const
checkPackage
=
async
(
file
)
=>
{
if
([
'
application/zip
'
,
'
application/gz
'
,
'
application/rar
'
,
'
application/7z
'
,
'
application/x-gzip
'
].
indexOf
(
file
.
mime
)
===
-
1
)
{
if
([
'
application/zip
'
,
'
application/gz
'
,
'
application/rar
'
,
'
application/7z
'
,
'
application/x-gzip
'
].
indexOf
(
file
.
mime
)
===
-
1
)
{
...
@@ -35,13 +29,13 @@ const checkImage = async (file) => {
...
@@ -35,13 +29,13 @@ const checkImage = async (file) => {
};
};
import
Router
=
require
(
'
koa-router
'
);
const
ossStream
=
Client
(
new
OSS
({
const
ossStream
=
Client
(
new
OSS
({
accessKeyId
:
process
.
env
[
'
OSS_ACCESS_ID
'
],
accessKeyId
:
process
.
env
[
'
OSS_ACCESS_ID
'
],
secretAccessKey
:
process
.
env
[
'
OSS_ACCESS_KEY
'
],
secretAccessKey
:
process
.
env
[
'
OSS_ACCESS_KEY
'
],
endpoint
:
process
.
env
[
'
OSS_ENDPOINT
'
],
endpoint
:
process
.
env
[
'
OSS_ENDPOINT
'
],
apiVersion
:
'
2013-10-15
'
apiVersion
:
'
2013-10-15
'
}));
}));
const
router
=
new
Router
();
const
router
=
new
Router
();
const
UploadImage
=
async
(
ctx
:
Context
)
=>
{
const
UploadImage
=
async
(
ctx
:
Context
)
=>
{
...
@@ -105,13 +99,15 @@ export const UploadPackage = async (ctx: Context) => {
...
@@ -105,13 +99,15 @@ export const UploadPackage = async (ctx: Context) => {
// 上传完, 打包
// 上传完, 打包
const
bundled
=
await
bundle
(
filename
);
const
bundled
=
await
bundle
(
filename
);
// 打包完,上传阿里云
await
UploadOSS
(
bundled
.
distPath
)
Object
.
assign
(
pack
,
bundled
);
Object
.
assign
(
pack
,
bundled
);
pack
!
.
status
=
'
uploaded
'
;
pack
!
.
status
=
'
uploaded
'
;
await
mongodb
.
Packages
.
update
({
id
:
pack
!
.
id
},
{
$set
:
{
status
:
'
deprecated
'
}},
{
multi
:
true
});
await
mongodb
.
Packages
.
update
({
id
:
pack
!
.
id
},
{
$set
:
{
status
:
'
deprecated
'
}},
{
multi
:
true
});
await
pack
!
.
save
();
await
pack
!
.
save
();
// 打包完,上传阿里云
}
catch
(
e
)
{
}
catch
(
e
)
{
pack
!
.
status
=
'
failed
'
;
pack
!
.
status
=
'
failed
'
;
...
@@ -166,6 +162,7 @@ const uploadPackageUrl = async (ctx: Context) => {
...
@@ -166,6 +162,7 @@ const uploadPackageUrl = async (ctx: Context) => {
const
bundled
=
await
bundle
(
path
.
basename
(
file
.
path
));
const
bundled
=
await
bundle
(
path
.
basename
(
file
.
path
));
// 打包完, 上传阿里云
// 打包完, 上传阿里云
await
UploadOSS
(
bundled
.
distPath
)
Object
.
assign
(
pack
,
bundled
);
Object
.
assign
(
pack
,
bundled
);
pack
!
.
status
=
'
uploaded
'
;
pack
!
.
status
=
'
uploaded
'
;
...
...
src/utils.ts
View file @
f319ba21
import
{
URL
}
from
'
url
'
;
import
{
URL
}
from
'
url
'
;
import
*
as
child_process
from
'
child_process
'
;
export
const
handleImg
=
(
img
)
=>
{
export
const
handleImg
=
(
img
)
=>
{
if
(
img
)
{
if
(
img
)
{
...
@@ -17,3 +18,19 @@ export const handleImg = (img) => {
...
@@ -17,3 +18,19 @@ export const handleImg = (img) => {
export
function
renderChecksum
(
files
:
{
path
:
string
,
hash
?:
string
}[])
{
export
function
renderChecksum
(
files
:
{
path
:
string
,
hash
?:
string
}[])
{
return
files
.
map
(({
path
,
hash
})
=>
`
${
hash
||
''
}
${
path
}
`
).
join
(
'
\n
'
);
return
files
.
map
(({
path
,
hash
})
=>
`
${
hash
||
''
}
${
path
}
`
).
join
(
'
\n
'
);
}
}
export
function
UploadOSS
(
dist
:
string
):
Promise
<
void
>
{
return
new
Promise
<
void
>
((
resolve
,
reject
)
=>
{
let
child
=
child_process
.
spawn
(
'
ossutil
'
,
[
'
cp
'
,
dist
,
'
oss://mycard/test-release
'
],
{
stdio
:
'
inherit
'
});
child
.
on
(
'
exit
'
,
(
code
)
=>
{
if
(
code
==
0
)
{
resolve
();
}
else
{
reject
(
code
);
}
});
child
.
on
(
'
error
'
,
(
error
)
=>
{
reject
(
error
);
});
});
}
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