lucy-cli 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. package/.drone/.drone.yml +156 -0
  2. package/.drone/mail_prod_build.hbs +319 -0
  3. package/.drone/mail_prod_deploy.hbs +309 -0
  4. package/.drone/mail_satges.hbs +309 -0
  5. package/.drone/telegram_prod_build.tpl +23 -0
  6. package/.drone/telegram_prod_deploy.tpl +20 -0
  7. package/.drone/telegram_stages.tpl +20 -0
  8. package/.eslintrc.cjs +96 -0
  9. package/.eslintrc.json +3 -0
  10. package/.nvmrc +1 -0
  11. package/.yarnrc.yml +5 -0
  12. package/README.md +1 -0
  13. package/dist/Gulpfile.d.ts +28 -0
  14. package/dist/Gulpfile.js +179 -0
  15. package/dist/cli.d.ts +2 -0
  16. package/dist/cli.js +44 -0
  17. package/dist/dev.d.ts +1 -0
  18. package/dist/dev.js +14 -0
  19. package/dist/gulp/backend copy.d.ts +4 -0
  20. package/dist/gulp/backend copy.js +50 -0
  21. package/dist/gulp/backend.d.ts +4 -0
  22. package/dist/gulp/backend.js +49 -0
  23. package/dist/gulp/checks.d.ts +3 -0
  24. package/dist/gulp/checks.js +119 -0
  25. package/dist/gulp/clean copy.d.ts +2 -0
  26. package/dist/gulp/clean copy.js +19 -0
  27. package/dist/gulp/clean.d.ts +1 -0
  28. package/dist/gulp/clean.js +14 -0
  29. package/dist/gulp/copy.d.ts +3 -0
  30. package/dist/gulp/copy.js +22 -0
  31. package/dist/gulp/pages copy.d.ts +3 -0
  32. package/dist/gulp/pages copy.js +22 -0
  33. package/dist/gulp/pages.d.ts +3 -0
  34. package/dist/gulp/pages.js +22 -0
  35. package/dist/gulp/public.d.ts +4 -0
  36. package/dist/gulp/public.js +50 -0
  37. package/dist/gulp/styles.d.ts +3 -0
  38. package/dist/gulp/styles.js +17 -0
  39. package/dist/gulp/templates.d.ts +1 -0
  40. package/dist/gulp/templates.js +21 -0
  41. package/dist/gulp/types.d.ts +5 -0
  42. package/dist/gulp/types.js +73 -0
  43. package/dist/index.d.ts +2 -0
  44. package/dist/index.js +88 -0
  45. package/dist/init.d.ts +7 -0
  46. package/dist/init.js +176 -0
  47. package/dist/settings.json +91 -0
  48. package/files/.drone/.drone.yml +156 -0
  49. package/files/.drone/mail_prod_build.hbs +319 -0
  50. package/files/.drone/mail_prod_deploy.hbs +309 -0
  51. package/files/.drone/mail_satges.hbs +309 -0
  52. package/files/.drone/telegram_prod_build.tpl +23 -0
  53. package/files/.drone/telegram_prod_deploy.tpl +20 -0
  54. package/files/.drone/telegram_stages.tpl +20 -0
  55. package/files/.eslintrc.cjs +96 -0
  56. package/files/.eslintrc.json +3 -0
  57. package/files/.nvmrc +1 -0
  58. package/files/.yarnrc.yml +5 -0
  59. package/files/currents.config.js +5 -0
  60. package/files/cypress.config.ts +12 -0
  61. package/files/docs.tsconfig.json +37 -0
  62. package/files/jest.config.ts +28 -0
  63. package/files/lucy.json +5 -0
  64. package/files/tsconfig.json +51 -0
  65. package/files/typedoc.json +19 -0
  66. package/files/typescript/.eslintrc.json +35 -0
  67. package/files/typescript/__mocks__/.gitkeep +0 -0
  68. package/files/typescript/backend/index.ts +0 -0
  69. package/files/typescript/backend/permissions.json +0 -0
  70. package/files/typescript/pages/.gitkeep +0 -0
  71. package/files/typescript/public/index.ts +0 -0
  72. package/files/typescript/styles/.gitkeep +0 -0
  73. package/files/typescript/styles/global.scss +0 -0
  74. package/files/typescript/tsconfig.json +45 -0
  75. package/files/typescript/types/.gitkeep +0 -0
  76. package/package.json +83 -0
  77. package/settings/backend-settings.json +19 -0
  78. package/settings/master-settings.json +17 -0
  79. package/settings/page-settings.json +18 -0
  80. package/settings/public-settings.json +21 -0
  81. package/src/Gulpfile.ts +271 -0
  82. package/src/dev.ts +20 -0
  83. package/src/gulp/backend.ts +52 -0
  84. package/src/gulp/checks.ts +127 -0
  85. package/src/gulp/clean.ts +21 -0
  86. package/src/gulp/copy.ts +26 -0
  87. package/src/gulp/pages.ts +25 -0
  88. package/src/gulp/public.ts +56 -0
  89. package/src/gulp/styles.ts +20 -0
  90. package/src/gulp/templates.ts +25 -0
  91. package/src/gulp/types.ts +87 -0
  92. package/src/index.ts +132 -0
  93. package/src/init.ts +191 -0
  94. package/src/settings.json +91 -0
  95. package/src/types.d.ts +5 -0
  96. package/tsconfig.json +34 -0
@@ -0,0 +1,156 @@
1
+ kind: pipeline
2
+ type: docker
3
+ name: Build-Pipeline
4
+
5
+ steps:
6
+ - name: Test-${DRONE_TAG}
7
+ image: node:18
8
+ commands:
9
+ - yarn install --ignore-scripts
10
+ - npx gulp fix-masterpage
11
+ - npx gulp fix-types
12
+ - yarn tsc
13
+ - yarn test
14
+ - yarn build
15
+ settings:
16
+ mtu: 1450
17
+ when:
18
+ ref:
19
+ include:
20
+ - refs/tags/*
21
+ branch:
22
+ exclude:
23
+ - main
24
+ - name: push commit
25
+ image: appleboy/drone-git-push
26
+ settings:
27
+ remote_name: origin
28
+ commit: true
29
+ commit_message: Tests Passed - ${DRONE_COMMIT_MESSAGE}
30
+ branch: ${DRONE_BRANCH}
31
+ when:
32
+ status:
33
+ - success
34
+ ref:
35
+ include:
36
+ - refs/tags/*
37
+ branch:
38
+ exclude:
39
+ - main
40
+ - name: Notify-via-Telegram
41
+ image: appleboy/drone-telegram
42
+ settings:
43
+ mtu: 1450
44
+ token:
45
+ from_secret: telegram_token
46
+ to:
47
+ from_secret: telegram_default_groupe_id
48
+ message_file: .drone/telegram_prod_build.tpl
49
+ when:
50
+ status:
51
+ - failure
52
+ - success
53
+ ref:
54
+ include:
55
+ - refs/tags/*
56
+ branch:
57
+ exclude:
58
+ - main
59
+ - name: Notify-via-Mail
60
+ image: drillster/drone-email
61
+ settings:
62
+ mtu: 1450
63
+ host: smtp.gmail.com
64
+ username:
65
+ from_secret: gmail_user
66
+ password:
67
+ from_secret: gmail_pass
68
+ from: admin@integralschweiz.org
69
+ recipients: []
70
+ recipients_only: true
71
+ body: file:///drone/src/.drone/mail_prod_build.hbs
72
+ when:
73
+ status: [ changed, failure, success ]
74
+ when:
75
+ status:
76
+ - failure
77
+ - success
78
+ ref:
79
+ include:
80
+ - refs/tags/*
81
+ branch:
82
+ exclude:
83
+ - main
84
+ trigger:
85
+ event:
86
+ - tag
87
+ ############Production Deploy only##########
88
+ ---
89
+ kind: pipeline
90
+ type: docker
91
+ name: Deploy-Production
92
+
93
+ steps:
94
+ - name: Create-Pull-Request & Merge
95
+ image: registry.integral-systems.ch/integral-systems/alpine:github-client-alpine
96
+ environment:
97
+ GH_TOKEN:
98
+ from_secret: github_api_token
99
+ commands:
100
+ - gh pr create --base main --head dev --title "Automated Pull Request ${DRONE_TAG}" --body "This pull request is for version ${DRONE_TAG} with the commit message ${DRONE_COMMIT_MESSAGE}"
101
+ - PR_NUMBER=$(gh pr list --base main --head dev --json number --jq '.[0].number')
102
+ - gh pr merge "$PR_NUMBER" --auto --merge
103
+ #############Notification###################
104
+ - name: Notify-via-Telegram
105
+ image: appleboy/drone-telegram
106
+ settings:
107
+ mtu: 1450
108
+ token:
109
+ from_secret: telegram_token
110
+ to:
111
+ from_secret: telegram_default_groupe_id
112
+ message_file: .drone/telegram_prod_deploy.tpl
113
+ when:
114
+ status:
115
+ - failure
116
+ - success
117
+ - name: Notify-via-Mail
118
+ image: drillster/drone-email
119
+ settings:
120
+ mtu: 1450
121
+ host: smtp.gmail.com
122
+ username:
123
+ from_secret: gmail_user
124
+ password:
125
+ from_secret: gmail_pass
126
+ from: admin@integralschweiz.org
127
+ recipients: []
128
+ recipients_only: true
129
+ body: file:///drone/src/.drone/mail_prod_deploy.hbs
130
+ when:
131
+ status: [ changed, failure, success ]
132
+ when:
133
+ status:
134
+ - failure
135
+ - success
136
+ # - name: Update-Rollbar-Deploy
137
+ # image: plugins/webhook
138
+ # settings:
139
+ # mtu: 1450
140
+ # urls: https://api.rollbar.com/api/1/deploy
141
+ # headers:
142
+ # - "X-Rollbar-Access-Token=675b85f9093e4099b89376f4a973bca8"
143
+ # template: |
144
+ # {
145
+ # "environment": "production",
146
+ # "revision": "{{build.commit}}",
147
+ # "rollbar_username": "{{build.author}}",
148
+ # "local_username": "{{build.author}}",
149
+ # "comment": "{{build.message}}",
150
+ # "status": "succeeded"
151
+ # }
152
+ trigger:
153
+ event:
154
+ - promote
155
+ target:
156
+ - production
@@ -0,0 +1,319 @@
1
+ <!DOCTYPE html
2
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml">
4
+
5
+ <head>
6
+ <meta name="viewport"
7
+ content="width=device-width" />
8
+ <meta http-equiv="Content-Type"
9
+ content="text/html; charset=UTF-8" />
10
+ <style>
11
+ * {
12
+ margin: 0;
13
+ padding: 0;
14
+ font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
15
+ box-sizing: border-box;
16
+ font-size: 14px;
17
+ }
18
+
19
+ body {
20
+ -webkit-font-smoothing: antialiased;
21
+ -webkit-text-size-adjust: none;
22
+ width: 100% !important;
23
+ height: 100%;
24
+ line-height: 1.6;
25
+ background-color: #f6f6f6;
26
+ }
27
+
28
+ table td {
29
+ vertical-align: top;
30
+ }
31
+
32
+ .body-wrap {
33
+ background-color: #f6f6f6;
34
+ width: 100%;
35
+ }
36
+
37
+ .container {
38
+ display: block !important;
39
+ max-width: 600px !important;
40
+ margin: 0 auto !important;
41
+ /* makes it centered */
42
+ clear: both !important;
43
+ }
44
+
45
+ .content {
46
+ max-width: 600px;
47
+ margin: 0 auto;
48
+ display: block;
49
+ padding: 20px;
50
+ }
51
+
52
+ .main {
53
+ background: #fff;
54
+ border: 1px solid #e9e9e9;
55
+ border-radius: 3px;
56
+ }
57
+
58
+ .content-wrap {
59
+ padding: 20px;
60
+ }
61
+
62
+ .content-block {
63
+ padding: 0 0 20px;
64
+ }
65
+
66
+ .header {
67
+ width: 100%;
68
+ margin-bottom: 20px;
69
+ }
70
+
71
+ h1,
72
+ h2,
73
+ h3 {
74
+ font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
75
+ color: #000;
76
+ margin: 40px 0 0;
77
+ line-height: 1.2;
78
+ font-weight: 400;
79
+ }
80
+
81
+ h1 {
82
+ font-size: 32px;
83
+ font-weight: 500;
84
+ }
85
+
86
+ h2 {
87
+ font-size: 24px;
88
+ }
89
+
90
+ h3 {
91
+ font-size: 18px;
92
+ }
93
+
94
+ hr {
95
+ border: 1px solid #e9e9e9;
96
+ margin: 20px 0;
97
+ height: 1px;
98
+ padding: 0;
99
+ }
100
+
101
+ p,
102
+ ul,
103
+ ol {
104
+ margin-bottom: 10px;
105
+ font-weight: normal;
106
+ }
107
+
108
+ p li,
109
+ ul li,
110
+ ol li {
111
+ margin-left: 5px;
112
+ list-style-position: inside;
113
+ }
114
+
115
+ a {
116
+ color: #348eda;
117
+ text-decoration: underline;
118
+ }
119
+
120
+ .last {
121
+ margin-bottom: 0;
122
+ }
123
+
124
+ .first {
125
+ margin-top: 0;
126
+ }
127
+
128
+ .padding {
129
+ padding: 10px 0;
130
+ }
131
+
132
+ .aligncenter {
133
+ text-align: center;
134
+ }
135
+
136
+ .alignright {
137
+ text-align: right;
138
+ }
139
+
140
+ .alignleft {
141
+ text-align: left;
142
+ }
143
+
144
+ .clear {
145
+ clear: both;
146
+ }
147
+
148
+ .alert {
149
+ font-size: 16px;
150
+ color: #fff;
151
+ font-weight: 500;
152
+ padding: 20px;
153
+ text-align: center;
154
+ border-radius: 3px 3px 0 0;
155
+ }
156
+
157
+ .alert a {
158
+ color: #fff;
159
+ text-decoration: none;
160
+ font-weight: 500;
161
+ font-size: 16px;
162
+ }
163
+
164
+ .alert.alert-warning {
165
+ background: #ff9f00;
166
+ }
167
+
168
+ .alert.alert-bad {
169
+ background: #d0021b;
170
+ }
171
+
172
+ .alert.alert-good {
173
+ background: #68b90f;
174
+ }
175
+
176
+ @media only screen and (max-width: 640px) {
177
+
178
+ h1,
179
+ h2,
180
+ h3 {
181
+ font-weight: 600 !important;
182
+ margin: 20px 0 5px !important;
183
+ }
184
+
185
+ h1 {
186
+ font-size: 22px !important;
187
+ }
188
+
189
+ h2 {
190
+ font-size: 18px !important;
191
+ }
192
+
193
+ h3 {
194
+ font-size: 16px !important;
195
+ }
196
+
197
+ .container {
198
+ width: 100% !important;
199
+ }
200
+
201
+ .content,
202
+ .content-wrapper {
203
+ padding: 10px !important;
204
+ }
205
+ }
206
+ </style>
207
+ </head>
208
+
209
+ <body>
210
+ <table class="body-wrap">
211
+ <tr>
212
+ <td></td>
213
+ <td class="container"
214
+ width="600">
215
+ <div class="content">
216
+ <table class="main"
217
+ width="100%"
218
+ cellpadding="0"
219
+ cellspacing="0">
220
+ <tr>
221
+ {{#success build.status}}
222
+ <td class="alert alert-good">
223
+ <a href="{{ build.link }}">
224
+ Successful Production-Build #{{ build.number }}
225
+ </a>
226
+ </td>
227
+ {{else}}
228
+ <td class="alert alert-bad">
229
+ <a href="{{ build.link }}">
230
+ Failed Production-Build #{{ build.number }}
231
+ </a>
232
+ </td>
233
+ {{/success}}
234
+ </tr>
235
+ <tr>
236
+ <td class="content-wrap">
237
+ <table width="100%"
238
+ cellpadding="0"
239
+ cellspacing="0">
240
+ <tr>
241
+ <td>
242
+ Repo:
243
+ </td>
244
+ <td>
245
+ {{ repo.owner }}/{{ repo.name }}
246
+ </td>
247
+ </tr>
248
+ <tr>
249
+ <td>
250
+ Author:
251
+ </td>
252
+ <td>
253
+ {{ commit.author.name }} ({{ commit.author.email }})
254
+ </td>
255
+ </tr>
256
+ <tr>
257
+ <td>
258
+ Branch:
259
+ </td>
260
+ <td>
261
+ {{ commit.branch }}
262
+ </td>
263
+ </tr>
264
+ <tr>
265
+ <td>
266
+ Tag:
267
+ </td>
268
+ <td>
269
+ {{ tag }}
270
+ </td>
271
+ </tr>
272
+ <tr>
273
+ <td>
274
+ Commit:
275
+ </td>
276
+ <td>
277
+ {{ truncate commit.sha 8 }}
278
+ </td>
279
+ </tr>
280
+ <tr>
281
+ <td>
282
+ Started at:
283
+ </td>
284
+ <td>
285
+ {{ datetime build.created "Mon Jan 2 15:04:05 MST 2006" "Local" }}
286
+ </td>
287
+ </tr>
288
+ {{#success build.status}}
289
+ <tr>
290
+ <td>
291
+ Deploy Build:
292
+ </td>
293
+ <td>
294
+ drone build promote {{ repo.owner }}/{{ repo.name }} {{build.number}} production
295
+ </td>
296
+ </tr>
297
+ {{/success}}
298
+ </table>
299
+ <hr>
300
+ <table width="100%"
301
+ cellpadding="0"
302
+ cellspacing="0">
303
+ <tr>
304
+ <td>
305
+ {{ commit.message }}
306
+ </td>
307
+ </tr>
308
+ </table>
309
+ </td>
310
+ </tr>
311
+ </table>
312
+ </div>
313
+ </td>
314
+ <td></td>
315
+ </tr>
316
+ </table>
317
+ </body>
318
+
319
+ </html>