@things-factory/operato-codelingua 8.0.0-beta.9 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +6 -24
- package/client/bootstrap.ts +206 -0
- package/client/icons/menu-icons.ts +91 -0
- package/client/index.ts +0 -0
- package/client/pages/git-project/git-project-list-page.ts +427 -0
- package/client/route.ts +8 -0
- package/client/themes/dark.css +51 -0
- package/client/themes/light.css +51 -0
- package/client/tsconfig.json +12 -0
- package/client/viewparts/menu-tools.ts +170 -0
- package/client/viewparts/user-circle.ts +24 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/installer/config.production.js +40 -0
- package/installer/docker-compose.yml +42 -0
- package/installer/install.sh +54 -0
- package/installer/migrate.sh +1 -0
- package/installer/start.sh +18 -0
- package/installer/stop.sh +1 -0
- package/installer/upgrade.sh +1 -0
- package/package.json +48 -48
- package/server/controllers/github-controller.ts +98 -0
- package/server/controllers/index.ts +0 -0
- package/server/index.ts +7 -0
- package/server/middlewares/index.ts +3 -0
- package/server/migrations/index.ts +9 -0
- package/server/routers/github-webhook-router.ts +45 -0
- package/server/routes.ts +30 -0
- package/server/service/git-project/git-project-mutation.ts +179 -0
- package/server/service/git-project/git-project-query.ts +48 -0
- package/server/service/git-project/git-project-type.ts +76 -0
- package/server/service/git-project/git-project.ts +114 -0
- package/server/service/git-project/index.ts +7 -0
- package/server/service/index.ts +21 -0
- package/server/tsconfig.json +9 -0
package/.dockerignore
CHANGED
|
@@ -1,31 +1,13 @@
|
|
|
1
|
-
node_modules
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
installer/
|
|
6
|
-
attachments/
|
|
7
|
-
cache/
|
|
8
|
-
logs/
|
|
9
|
-
Dockerfile*
|
|
1
|
+
node_modules
|
|
2
|
+
installer
|
|
3
|
+
Dockerfile
|
|
4
|
+
logs
|
|
10
5
|
docker-compose.yml
|
|
11
6
|
db.sqlite
|
|
12
7
|
db*.sqlite
|
|
13
8
|
license.json
|
|
9
|
+
attachments
|
|
14
10
|
config.development.js
|
|
15
11
|
config.production.js
|
|
16
12
|
!config/config.development.js
|
|
17
|
-
!config/config.production.js
|
|
18
|
-
\_index.html
|
|
19
|
-
|
|
20
|
-
npm-debug.log
|
|
21
|
-
yarn-error.log
|
|
22
|
-
|
|
23
|
-
.env
|
|
24
|
-
.env.local
|
|
25
|
-
.env.production
|
|
26
|
-
.git/
|
|
27
|
-
.gitignore
|
|
28
|
-
.dockerignore
|
|
29
|
-
.vscode/
|
|
30
|
-
.idea/
|
|
31
|
-
.DS_Store
|
|
13
|
+
!config/config.production.js
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import '@things-factory/board-ui/dist-client'
|
|
2
|
+
import '@things-factory/notification/dist-client' /* for notification-badge */
|
|
3
|
+
import '@things-factory/setting-ui/dist-client' /* for theme-mode-setting-let */
|
|
4
|
+
import '@operato/i18n/ox-i18n.js'
|
|
5
|
+
import '@things-factory/context-ui/dist-client/title-on-page-header-setting-let' /* for title-on-page-header-setting-let */
|
|
6
|
+
|
|
7
|
+
import './viewparts/user-circle'
|
|
8
|
+
import './viewparts/menu-tools'
|
|
9
|
+
|
|
10
|
+
import { html } from 'lit'
|
|
11
|
+
|
|
12
|
+
import { registerDefaultGroups } from '@operato/board/register-default-groups.js'
|
|
13
|
+
import { appendViewpart, toggleOverlay, TOOL_POSITION, updateViewpart, VIEWPART_POSITION } from '@operato/layout'
|
|
14
|
+
import { APPEND_APP_TOOL, REMOVE_APP_TOOL } from '@things-factory/apptool-base/client'
|
|
15
|
+
import { setupAppToolPart } from '@things-factory/apptool-ui/dist-client'
|
|
16
|
+
import { setAuthManagementMenus } from '@things-factory/auth-ui/dist-client'
|
|
17
|
+
import { setupContextUIPart } from '@things-factory/context-ui/dist-client'
|
|
18
|
+
import { ADD_MORENDA } from '@things-factory/more-base/client'
|
|
19
|
+
import { ADD_SETTING } from '@things-factory/setting-base/dist-client'
|
|
20
|
+
import { navigate, store } from '@operato/shell'
|
|
21
|
+
|
|
22
|
+
console.log(
|
|
23
|
+
`%c
|
|
24
|
+
____ _ _ _
|
|
25
|
+
/ __\\ ___ __| | __ | | (_)_ __ __ _ _ _ __ _
|
|
26
|
+
| | / _ \\ / _\` |/ _ \\ | | | | '_ \\ / _\` | | | |/ _\` |
|
|
27
|
+
| |__| (_) | (_| | __/ | |___| | | | | (_| | |_| | (_| |
|
|
28
|
+
\\____/\\___/ \\__,_|\\___| |_____|_|_| |_|\\__, |\\__,_|\\__,_|
|
|
29
|
+
|___/
|
|
30
|
+
`,
|
|
31
|
+
'background: #222; color: #bada55'
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
export default async function bootstrap() {
|
|
35
|
+
/*
|
|
36
|
+
set board-modeller group and default templates - should be called befor BoardModeller open
|
|
37
|
+
*/
|
|
38
|
+
registerDefaultGroups()
|
|
39
|
+
|
|
40
|
+
await setupAppToolPart({
|
|
41
|
+
toolbar: true,
|
|
42
|
+
busybar: true,
|
|
43
|
+
mdibar: true
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
await setupContextUIPart({
|
|
47
|
+
titlebar: 'header',
|
|
48
|
+
contextToolbar: 'page-footer'
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
/* add setting morenda */
|
|
52
|
+
store.dispatch({
|
|
53
|
+
type: ADD_MORENDA,
|
|
54
|
+
morenda: {
|
|
55
|
+
icon: html` <md-icon>settings</md-icon> `,
|
|
56
|
+
name: html` <ox-i18n msgid="label.setting"></ox-i18n> `,
|
|
57
|
+
action: () => {
|
|
58
|
+
navigate('setting')
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
/* set auth management menus into more-panel */
|
|
64
|
+
setAuthManagementMenus()
|
|
65
|
+
|
|
66
|
+
store.dispatch({
|
|
67
|
+
type: ADD_MORENDA,
|
|
68
|
+
morenda: {
|
|
69
|
+
icon: html` <md-icon>help</md-icon> `,
|
|
70
|
+
name: html` <ox-i18n msgid="text.help"></ox-i18n> `,
|
|
71
|
+
action: () => {
|
|
72
|
+
navigate('help')
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
/* append viewpart anchor to asidebar */
|
|
78
|
+
appendViewpart({
|
|
79
|
+
name: 'asidebar-anchor',
|
|
80
|
+
viewpart: {
|
|
81
|
+
show: false,
|
|
82
|
+
hovering: 'edge',
|
|
83
|
+
backdrop: true
|
|
84
|
+
},
|
|
85
|
+
position: VIEWPART_POSITION.ASIDEBAR
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
/* append top-menu to layout */
|
|
89
|
+
var state = store.getState() as any
|
|
90
|
+
var width = state.layout?.width || 'WIDE'
|
|
91
|
+
|
|
92
|
+
if (width == 'WIDE') {
|
|
93
|
+
store.dispatch({
|
|
94
|
+
type: APPEND_APP_TOOL,
|
|
95
|
+
tool: {
|
|
96
|
+
name: 'app-brand',
|
|
97
|
+
template: html` <span style="font-size: 1.2em;">Code Lingua</span> `,
|
|
98
|
+
position: TOOL_POSITION.FRONT
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
appendViewpart({
|
|
104
|
+
name: 'codelingua-topmenu',
|
|
105
|
+
viewpart: {
|
|
106
|
+
show: true,
|
|
107
|
+
template: html` <menu-tools></menu-tools> `
|
|
108
|
+
},
|
|
109
|
+
position: width == 'WIDE' ? VIEWPART_POSITION.NAVBAR : VIEWPART_POSITION.FOOTERBAR
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
store.subscribe(async () => {
|
|
113
|
+
var state = store.getState() as any
|
|
114
|
+
|
|
115
|
+
if (state.layout.width == width) {
|
|
116
|
+
return
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
width = state.layout.width
|
|
120
|
+
|
|
121
|
+
store.dispatch({
|
|
122
|
+
type: width == 'WIDE' ? APPEND_APP_TOOL : REMOVE_APP_TOOL,
|
|
123
|
+
name: 'app-brand',
|
|
124
|
+
tool: {
|
|
125
|
+
name: 'app-brand',
|
|
126
|
+
template: html` <span style="font-size: 1.2em;">Code Lingua</span> `,
|
|
127
|
+
position: TOOL_POSITION.FRONT
|
|
128
|
+
}
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
updateViewpart('codelingua-topmenu', {
|
|
132
|
+
position: width == 'WIDE' ? VIEWPART_POSITION.NAVBAR : VIEWPART_POSITION.FOOTERBAR
|
|
133
|
+
})
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
/* setting app-tools */
|
|
137
|
+
store.dispatch({
|
|
138
|
+
type: APPEND_APP_TOOL,
|
|
139
|
+
tool: {
|
|
140
|
+
name: 'notification-badge',
|
|
141
|
+
template: html`
|
|
142
|
+
<notification-badge
|
|
143
|
+
@click=${e => {
|
|
144
|
+
toggleOverlay('notification', {
|
|
145
|
+
backdrop: true
|
|
146
|
+
})
|
|
147
|
+
}}
|
|
148
|
+
>
|
|
149
|
+
</notification-badge>
|
|
150
|
+
`,
|
|
151
|
+
position: TOOL_POSITION.REAR
|
|
152
|
+
}
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
appendViewpart({
|
|
156
|
+
name: 'notification',
|
|
157
|
+
viewpart: {
|
|
158
|
+
show: false,
|
|
159
|
+
hovering: 'edge',
|
|
160
|
+
template: html` <notification-list style="min-width: 300px;"></notification-list> `
|
|
161
|
+
},
|
|
162
|
+
position: VIEWPART_POSITION.ASIDEBAR
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
store.dispatch({
|
|
166
|
+
type: APPEND_APP_TOOL,
|
|
167
|
+
tool: {
|
|
168
|
+
name: 'user-circle',
|
|
169
|
+
template: html` <user-circle> </user-circle> `,
|
|
170
|
+
position: TOOL_POSITION.REAR
|
|
171
|
+
}
|
|
172
|
+
})
|
|
173
|
+
|
|
174
|
+
/* for settings */
|
|
175
|
+
store.dispatch({
|
|
176
|
+
type: ADD_SETTING,
|
|
177
|
+
setting: {
|
|
178
|
+
seq: 10,
|
|
179
|
+
template: html` <theme-mode-setting-let></theme-mode-setting-let> `
|
|
180
|
+
}
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
store.dispatch({
|
|
184
|
+
type: ADD_SETTING,
|
|
185
|
+
setting: {
|
|
186
|
+
seq: 20,
|
|
187
|
+
template: html` <infowindow-setting-let></infowindow-setting-let> `
|
|
188
|
+
}
|
|
189
|
+
})
|
|
190
|
+
|
|
191
|
+
store.dispatch({
|
|
192
|
+
type: ADD_SETTING,
|
|
193
|
+
setting: {
|
|
194
|
+
seq: 20,
|
|
195
|
+
template: html` <notification-setting-let></notification-setting-let> `
|
|
196
|
+
}
|
|
197
|
+
})
|
|
198
|
+
|
|
199
|
+
store.dispatch({
|
|
200
|
+
type: ADD_SETTING,
|
|
201
|
+
setting: {
|
|
202
|
+
seq: 22,
|
|
203
|
+
template: html` <title-on-page-header-setting-let></title-on-page-header-setting-let> `
|
|
204
|
+
}
|
|
205
|
+
})
|
|
206
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
const ICON_PROGRESS = `
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 40 40">
|
|
3
|
+
<defs>
|
|
4
|
+
<style>
|
|
5
|
+
.menu-svg {
|
|
6
|
+
fill: #fff;
|
|
7
|
+
stroke: {{strokecolor}};
|
|
8
|
+
stroke-width: 0px;
|
|
9
|
+
}
|
|
10
|
+
</style>
|
|
11
|
+
</defs>
|
|
12
|
+
|
|
13
|
+
<path class="menu-svg" d="M31,36.5c-.2,0-.4,0-.6,0-.2,0-.3-.2-.5-.3l-8.3-8.3c-.2-.2-.3-.3-.3-.5,0-.2,0-.4,0-.6s0-.4,0-.6c0-.2.2-.3.3-.5l3.1-3.1c.2-.2.3-.3.5-.3.2,0,.4,0,.6,0s.4,0,.6,0c.2,0,.3.2.5.3l8.3,8.3c.2.2.3.3.3.5,0,.2,0,.4,0,.6s0,.4,0,.6c0,.2-.2.3-.3.5l-3.1,3.1c-.2.2-.3.3-.5.3-.2,0-.4,0-.6,0ZM31,33.6l1.8-1.8-6.9-6.9-1.8,1.8,6.9,6.9ZM8.9,36.5c-.2,0-.4,0-.6-.1-.2,0-.3-.2-.5-.3l-3.1-3.1c-.2-.2-.3-.3-.3-.5,0-.2-.1-.4-.1-.6s0-.4.1-.6c0-.2.2-.3.3-.5l8.6-8.6h3.5l1.3-1.3-6.9-6.9h-2.4l-4.6-4.6,4.1-4.1,4.6,4.6v2.4l6.9,6.9,4.9-4.9-2.4-2.4,2.1-2.1h-4.2l-.9-.9,5.3-5.3.9.9v4.2l2.1-2.1,6.2,6.2c.4.4.8.9,1,1.5.2.5.3,1.1.3,1.7s0,1-.3,1.5c-.2.5-.5.9-.8,1.4l-3.5-3.5-2.3,2.3-1.8-1.8-8,8v3.5l-8.6,8.6c-.2.2-.3.3-.5.3-.2,0-.4.1-.6.1ZM8.9,33.6l7.6-7.6v-1.8h-1.8l-7.6,7.6,1.8,1.8ZM8.9,33.6l-1.8-1.8.9.9.9.9ZM31,33.6l1.8-1.8-1.8,1.8Z"/>
|
|
14
|
+
</svg>
|
|
15
|
+
`
|
|
16
|
+
|
|
17
|
+
const ICON_COMPLETED = `
|
|
18
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 40 40">
|
|
19
|
+
<defs>
|
|
20
|
+
<style>
|
|
21
|
+
.menu-svg {
|
|
22
|
+
fill: #fff;
|
|
23
|
+
stroke: {{strokecolor}};
|
|
24
|
+
stroke-width: 0px;
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
27
|
+
</defs>
|
|
28
|
+
|
|
29
|
+
<path class="menu-svg" d="M27.9,15.1h2.7v-2.8h-2.7v2.8ZM27.9,21.4h2.7v-2.8h-2.7v2.8ZM27.9,27.7h2.7v-2.8h-2.7v2.8ZM26.9,33.3v-2.4h6.9V9h-14.2v2.8l-2.3-1.7v-3.5h18.7v26.7s-9.1,0-9.1,0ZM4,33.3v-14.5l9.9-7.3,9.9,7.3v14.5h-8.1v-7.5h-3.5v7.5H4ZM6.3,31h3.6v-7.5h8v7.5h3.6v-11l-7.7-5.5-7.7,5.5v11h0ZM18,31v-7.5h-8v7.5-7.5h8v7.5Z"/>
|
|
30
|
+
</svg>
|
|
31
|
+
`
|
|
32
|
+
|
|
33
|
+
const ICON_STATUS = `
|
|
34
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 40 40">
|
|
35
|
+
<defs>
|
|
36
|
+
<style>
|
|
37
|
+
.menu-svg {
|
|
38
|
+
fill: #fff;
|
|
39
|
+
stroke: {{strokecolor}};
|
|
40
|
+
stroke-width: 0px;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
43
|
+
</defs>
|
|
44
|
+
|
|
45
|
+
<path class="menu-svg" d="M7.4,33.9c-.8,0-1.5-.3-2.1-.8-.6-.6-.8-1.3-.8-2.1V9c0-.8.3-1.5.8-2.1.6-.6,1.3-.8,2.1-.8h25.2c.8,0,1.5.3,2.1.8s.8,1.3.8,2.1v21.9c0,.8-.3,1.5-.8,2.1s-1.3.8-2.1.8H7.4ZM7.4,31.4h25.2c0,0,.3,0,.4-.2,0,0,.2-.2.2-.4V9c0,0,0-.3-.2-.4,0,0-.2-.2-.4-.2H7.4c0,0-.3,0-.4.2,0,0-.2.2-.2.4v21.9c0,0,0,.3.2.4,0,0,.2.2.4.2h0ZM8.9,27.7h7.3v-2.4h-7.3v2.4ZM24.2,24.3l7.5-7.5-1.8-1.8-5.7,5.8-2.4-2.4-1.7,1.8s4.1,4.1,4.1,4.1ZM8.9,21.2h7.3v-2.4h-7.3v2.4ZM8.9,14.6h7.3v-2.4h-7.3s0,2.4,0,2.4ZM6.9,31.4V8.5v22.9Z"/>
|
|
46
|
+
</svg>
|
|
47
|
+
`
|
|
48
|
+
|
|
49
|
+
const ICON_OPERATING = `
|
|
50
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 40 40">
|
|
51
|
+
<defs>
|
|
52
|
+
<style>
|
|
53
|
+
.menu-svg {
|
|
54
|
+
fill: #fff;
|
|
55
|
+
stroke: {{strokecolor}};
|
|
56
|
+
stroke-width: 0px;
|
|
57
|
+
}
|
|
58
|
+
</style>
|
|
59
|
+
</defs>
|
|
60
|
+
|
|
61
|
+
<path class="menu-svg" d="M9.1,35.5c-.8,0-1.5-.3-2.1-.8-.6-.6-.8-1.2-.8-2.1V10.9c0-.8.3-1.5.8-2.1.6-.6,1.2-.8,2.1-.8h2.3v-3.5h2.5v3.5h12.3v-3.5h2.4v3.5h2.3c.8,0,1.5.3,2.1.8.6.6.8,1.2.8,2.1v21.7c0,.8-.3,1.5-.8,2.1s-1.2.8-2.1.8c0,0-21.8,0-21.8,0ZM9.1,33.1h21.7c0,0,.3,0,.4-.2,0,0,.2-.2.2-.4v-15.2H8.5v15.2c0,0,0,.3.2.4,0,0,.2.2.4.2ZM8.5,14.9h22.7v-4c0,0,0-.3-.2-.4,0,0-.2-.2-.4-.2H9.1c0,0-.3,0-.4.2,0,0-.2.2-.2.4,0,0,0,4,0,4ZM8.5,14.9v-4.5,4.5ZM12.2,22.9v-2.4h15.4v2.4s-15.4,0-15.4,0ZM12.2,29.4v-2.4h10.5v2.4h-10.5Z"/>
|
|
62
|
+
</svg>
|
|
63
|
+
`
|
|
64
|
+
|
|
65
|
+
const ICON_SETTING = `
|
|
66
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 40 40">
|
|
67
|
+
<defs>
|
|
68
|
+
<style>
|
|
69
|
+
.menu-svg {
|
|
70
|
+
fill: #fff;
|
|
71
|
+
stroke: {{strokecolor}};
|
|
72
|
+
stroke-width: 0px;
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
75
|
+
</defs>
|
|
76
|
+
|
|
77
|
+
<path class="menu-svg" d="M13.1,24.2h2v-5.7h-2v1.9h-2.4v2h2.4v1.9h0ZM16.7,22.3h12.8v-2h-12.8v2ZM25,18.1h2v-1.9h2.4v-2h-2.4v-1.9h-2v5.7h0ZM10.6,16.2h12.8v-2h-12.8v2ZM14.3,34v-3.3h-6.9c-.8,0-1.5-.3-2.1-.8s-.8-1.3-.8-2.1V8.9c0-.8.3-1.6.8-2.1.6-.5,1.3-.8,2.1-.8h25.2c.8,0,1.5.3,2.1.8s.8,1.3.8,2.1v18.8c0,.8-.3,1.6-.8,2.1-.6.5-1.3.8-2.1.8h-6.9v3.3h-11.5,0ZM7.5,28.2h25.2c0,0,.3,0,.4-.2,0,0,.2-.2.2-.4V8.9c0,0,0-.3-.2-.4,0,0-.2-.2-.4-.2H7.5c0,0-.3,0-.4.2,0,0-.2.2-.2.4v18.8c0,0,0,.3.2.4,0,0,.2.2.4.2h0ZM6.9,28.2V8.4v19.8Z"/>
|
|
78
|
+
</svg>
|
|
79
|
+
`
|
|
80
|
+
|
|
81
|
+
function icons(template) {
|
|
82
|
+
return ['#ffffff', '#64A3D9'].map(
|
|
83
|
+
color => 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(template.replace(/{{strokecolor}}/g, color))
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export const ICONS_PROGRESS = icons(ICON_PROGRESS)
|
|
88
|
+
export const ICONS_COMPLETED = icons(ICON_COMPLETED)
|
|
89
|
+
export const ICONS_STATUS = icons(ICON_STATUS)
|
|
90
|
+
export const ICONS_OPERATING = icons(ICON_OPERATING)
|
|
91
|
+
export const ICONS_SETTING = icons(ICON_SETTING)
|
package/client/index.ts
ADDED
|
File without changes
|