@futdevpro/fsm-dynamo 1.15.7 โ†’ 1.15.9

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.
Files changed (52) hide show
  1. package/.cursor/rules/_ag_frontend-structure.mdc +5 -5
  2. package/.dynamo/version-bump.config.json +5 -0
  3. package/.github/workflows/main.yml +427 -394
  4. package/.husky/pre-commit +1 -0
  5. package/build/_models/control-models/error.control-model.d.ts +5 -0
  6. package/build/_models/control-models/error.control-model.d.ts.map +1 -1
  7. package/build/_models/control-models/error.control-model.js +16 -0
  8. package/build/_models/control-models/error.control-model.js.map +1 -1
  9. package/build/_models/data-models/errors.data-model.d.ts +2 -1
  10. package/build/_models/data-models/errors.data-model.d.ts.map +1 -1
  11. package/build/_models/data-models/errors.data-model.js +4 -3
  12. package/build/_models/data-models/errors.data-model.js.map +1 -1
  13. package/build/_models/types/db-filter.type.d.ts +1 -1
  14. package/build/_models/types/db-filter.type.d.ts.map +1 -1
  15. package/nodemon.json +2 -1
  16. package/package.json +64 -34
  17. package/pipeline.cicd.config.json +128 -0
  18. package/src/_collections/utils/async.util.spec.ts +354 -0
  19. package/src/_collections/utils/data.util.spec.ts +345 -0
  20. package/src/_collections/utils/json-error-helper.util.spec.ts +521 -0
  21. package/src/_collections/utils/math/box-bounds.spec.ts +74 -0
  22. package/src/_collections/utils/utilities.util.spec.ts +201 -0
  23. package/src/_models/control-models/error.control-model.spec.ts +37 -0
  24. package/src/_models/control-models/error.control-model.ts +18 -0
  25. package/src/_models/control-models/http/http-error-response.control-model.spec.ts +116 -0
  26. package/src/_models/control-models/http/http-headers.control-model.spec.ts +25 -0
  27. package/src/_models/control-models/http/http-response.model-base.spec.ts +46 -0
  28. package/src/_models/control-models/server-status.control-model.spec.ts +66 -0
  29. package/src/_models/control-models/service-endpoint-settings-base.control-model.spec.ts +145 -0
  30. package/src/_models/data-models/errors.data-model.spec.ts +71 -0
  31. package/src/_models/data-models/errors.data-model.ts +4 -4
  32. package/src/_models/data-models/metadata.data-model.spec.ts +184 -0
  33. package/src/_models/types/db-filter.type.ts +1 -2
  34. package/src/_modules/ai/_modules/anthropic/_models/aai-call-settings.control-model.spec.ts +28 -0
  35. package/src/_modules/ai/_modules/anthropic/_models/aai-settings.control-model.spec.ts +22 -0
  36. package/src/_modules/ai/_modules/google-ai/_models/gai-call-settings.control-model.spec.ts +28 -0
  37. package/src/_modules/ai/_modules/google-ai/_models/gai-settings.control-model.spec.ts +22 -0
  38. package/src/_modules/ai/_modules/local-ai/_models/lai-call-settings.control-model.spec.ts +28 -0
  39. package/src/_modules/ai/_modules/local-ai/_models/lai-settings.control-model.spec.ts +22 -0
  40. package/src/_modules/ai/_modules/open-ai/_models/oai-call-settings.control-model.spec.ts +28 -0
  41. package/src/_modules/ai/_modules/open-ai/_models/oai-settings.control-model.spec.ts +22 -0
  42. package/src/_modules/ci-tools/_models/cit-ci-result-info.data-models.spec.ts +58 -0
  43. package/src/_modules/data-handler/_models/data-handler-settings.control-model.spec.ts +110 -0
  44. package/src/_modules/data-handler/_models/data-handler.control-model.spec.ts +445 -0
  45. package/src/_modules/data-handler/_models/data-list-handler.control-model.spec.ts +263 -0
  46. package/src/_modules/data-handler/_models/data-search-handler.control-model.spec.ts +417 -0
  47. package/src/_modules/data-handler/_models/list-collector-data-handler.control-model.spec.ts +374 -0
  48. package/src/_modules/messaging/_models/msg-conversation.data-model.spec.ts +69 -0
  49. package/src/_modules/messaging/_models/msg-message.data-model.spec.ts +79 -0
  50. package/src/_modules/pipe/_collections/utils/pip-json-pipe.util.spec.ts +62 -0
  51. package/src/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.ts +10 -3
  52. package/futdevpro-fsm-dynamo-01.15.7.tgz +0 -0
@@ -1,400 +1,433 @@
1
- name: Test and Deploy
2
- on:
3
- push:
4
- branches:
5
- - '**'
6
- permissions:
7
- actions: read
8
- id-token: write
9
- contents: read
10
- checks: write
11
- issues: read
12
- pull-requests: write
13
- env:
14
- PACKAGE_NAME: ''
15
- THIS_VERSION: 0.0.0
16
- LATEST_VERSION: 0.0.0
17
- VERSION_PUBLISHED: true
18
-
19
-
1
+ # =============================================================================
2
+ # Dynamo-FSM CI/CD โ€” Overseer Pipeline Trigger
3
+ # =============================================================================
4
+ # Ez a workflow CSAK egy webhook-ot kuld az Overseer-nek es AZONNAL kilep.
5
+ # A pipeline-t az Overseer FDP Runner-ek futtatjak (nem a GitHub Actions).
6
+ #
7
+ # A regi workflow a fajl vegen kommentben megtalalhato (fallback).
8
+ # =============================================================================
9
+
10
+ name: Trigger Pipeline
11
+ on:
12
+ workflow_dispatch:
13
+ # Az org-szintu GitHub webhook kozvetlenul triggereli az Overseer-t.
14
+ # Ez a workflow csak manualis fallback (workflow_dispatch).
15
+
20
16
  jobs:
21
- notification0:
22
- name: ๐Ÿน Discord start Notification
17
+ trigger:
18
+ name: Overseer Trigger
23
19
  runs-on: ubuntu-latest
24
- #runs-on: plo-koon
25
- timeout-minutes: 20
26
- outputs:
27
- start: ${{ steps.mark_start.outputs.started }}
20
+ timeout-minutes: 1
28
21
  steps:
29
22
  - uses: actions/checkout@v4
30
- - id: mark_start
31
- run: echo "started=$(date +%s)" >> "$GITHUB_OUTPUT"
32
- - name: Send Discord start notification
33
- uses: futdevpro/fdp-github-actions/discord-start-notification@latest
34
- with:
35
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
36
- APPLICATION_NAME: "Dynamo-FSM"
37
- APPLICATION_EMOJI: "๐Ÿงฑ"
38
- COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
39
- EVENT_DATETIME: ${{ github.event.head_commit.timestamp }}
40
- DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }}
41
- DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
42
-
43
- notification0_fail_report:
44
- name: ๐Ÿ’ฃ Discord Start Notification Fail Report
45
- runs-on: ubuntu-latest
46
- #runs-on: plo-koon
47
- timeout-minutes: 20
48
- if: always() && needs.notification0.result == 'failure'
49
- needs: [notification0]
50
- steps:
51
- - name: send custom message with args
52
- uses: appleboy/discord-action@master
53
- with:
54
- webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
55
- webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
56
- message: |
57
- โŒโŒโŒ๐Ÿงฑ Failed to send Discord start notification for ${{ github.repository }}! [๐Ÿ”—](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
58
-
59
- check_secrets:
60
- name: ๐Ÿ” Check Required Secrets and Variables
61
- #runs-on: ubuntu-latest
62
- runs-on: plo-koon
63
- timeout-minutes: 20
64
- steps:
65
- - name: Check Required Secrets and Variables
66
- uses: futdevpro/fdp-github-actions/check-secrets-and-variables@latest
67
- with:
68
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
69
- ITEMS_TO_CHECK: |
70
- [
71
- {
72
- "valueName": "NPM_TOKEN",
73
- "value": "${{ secrets.NPM_TOKEN }}",
74
- "type": "SECRET"
75
- },
76
- {
77
- "valueName": "DISCORD_WEBHOOK_ID",
78
- "value": "${{ secrets.DISCORD_WEBHOOK_ID }}",
79
- "type": "SECRET"
80
- },
81
- {
82
- "valueName": "DISCORD_WEBHOOK_TOKEN",
83
- "value": "${{ secrets.DISCORD_WEBHOOK_TOKEN }}",
84
- "type": "SECRET"
85
- },
86
- {
87
- "valueName": "OVERSEER_SECRET_KEY",
88
- "value": "${{ secrets.OVERSEER_SECRET_KEY }}",
89
- "type": "SECRET"
90
- },
91
-
92
- {
93
- "valueName": "OVERSEER_URL",
94
- "value": "${{ vars.OVERSEER_URL }}",
95
- "type": "VARIABLE"
96
- }
97
- ]
98
-
99
- check_dev_leftovers:
100
- name: ๐Ÿ” Check Dev leftovers
101
- #runs-on: ubuntu-latest
102
- runs-on: plo-koon
103
- timeout-minutes: 20
104
- steps:
105
- - name: Checkout code
106
- uses: actions/checkout@v4
107
23
 
108
- - name: Install Node.js
109
- uses: actions/setup-node@v2
24
+ - name: Trigger Overseer Pipeline
25
+ uses: futdevpro/fdp-github-actions/overseer-trigger@master
110
26
  with:
111
- node-version: '16'
112
-
113
- # TODO: Check build version (to ALL packages)
114
- - name: Check build folder
115
- run: |
116
- node -e "
117
- const buildFolder = './build/';
118
- const fs = require('fs');
119
-
120
- fs.readdir(buildFolder, (err, files) => {
121
- if (!files?.length) {
122
- console.error(
123
- 'FDPError: ./build folder is MISSING!' +
124
- '\nbuild the project locally before push!'
125
- );
126
- process.exit(1);
127
- }
128
-
129
- if (files.includes('dynamo-fsm')) {
130
- console.error(
131
- 'FDPError: ./build copntains dynamo-fsm folder which means this is a local dev build!' +
132
- '\nrebuild the project locally before push!'
133
- );
134
- process.exit(1);
135
- }
136
- });
137
- "
138
-
139
- test:
140
- name: ๐Ÿงช Test Build
141
- runs-on: ubuntu-latest
142
- needs: [ check_dev_leftovers ]
143
- timeout-minutes: 20
144
- steps:
145
- - name: Checkout code
146
- uses: actions/checkout@v4
147
-
148
- - name: Set NPM RC
149
- run: |
150
- echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
151
-
152
- - name: Get safe-chain version
153
- run: |
154
- VERSION=$(curl -s https://api.github.com/repos/AikidoSec/safe-chain/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's/^v//')
155
- echo "SAFE_CHAIN_VERSION=$VERSION" >> $GITHUB_ENV
156
-
157
- - name: Install safe-chain
158
- run: |
159
- curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --ci
160
-
161
- - name: Install pnpm
162
- run: |
163
- npm i -g pnpm
164
-
165
- - name: Install Packages
166
- run: |
167
- pnpm i --safe-chain-skip-minimum-package-age
168
-
169
- - name: Build
170
- run: |
171
- npx tsc
172
-
173
- - name: Install Jasmine
174
- run: |
175
- npm i -g jasmine
176
-
177
- - name: Test
178
- run: |
179
- jasmine
180
-
181
- - name: Test Pack
182
- run: |
183
- pnpm pack
184
-
185
-
186
- check_version:
187
- name: ๐Ÿ” Check Version
188
- needs: [ test ]
189
- #runs-on: ubuntu-latest
190
- runs-on: plo-koon
191
- timeout-minutes: 20
192
- outputs:
193
- version_published: ${{ steps.version_check_results.outputs.version_published }}
194
- steps:
195
- - name: Checkout code
196
- uses: actions/checkout@v4
197
-
198
- - name: Set Package Name
199
- run: |
200
- echo "PACKAGE_NAME=$(node -p -e "require('./package.json').name")" >> $GITHUB_ENV
201
-
202
- - name: Set RC
203
- run: |
204
- echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
205
-
206
- - name: Get This Version
207
- run: |
208
- RAW_THIS_VERSION=$(node -p -e "require('./package.json').version")
209
- # replace ALL: 'v0' with '', '01' with '1', '.0' with '.'
210
- RAW_THIS_VERSION=$(echo $RAW_THIS_VERSION | sed 's:v0::g' | sed 's:01:1:g' | sed -e 's:\.0:\.:g')
211
- echo "THIS_VERSION=$RAW_THIS_VERSION" >> $GITHUB_ENV
212
-
213
- - name: Get Latest Version
214
- run: |
215
- echo "LATEST_VERSION=$(npm view ${{ env.PACKAGE_NAME }} version)" >> $GITHUB_ENV
216
-
217
- - name: Check All Versions
218
- run: |
219
- ALL_VERSIONS=$(npm view ${{ env.PACKAGE_NAME }} versions)
220
- if echo "$ALL_VERSIONS" | grep -q "${{ env.THIS_VERSION }}"; then
221
- echo "VERSION_PUBLISHED=true" >> $GITHUB_ENV
222
- else
223
- echo "VERSION_PUBLISHED=false" >> $GITHUB_ENV
224
- fi
225
-
226
- - name: Version Check Results
227
- id: version_check_results
228
- run: |
229
- echo package name: "${{ env.PACKAGE_NAME }}"
230
- echo this: "${{ env.THIS_VERSION }}"
231
- echo latest: "${{ env.LATEST_VERSION }}"
232
- echo this is the latest: "${{ env.LATEST_VERSION == env.THIS_VERSION }}"
233
- echo this version is published: "${{ env.VERSION_PUBLISHED }}"
234
- echo all published versions: $(npm view ${{ env.PACKAGE_NAME }} versions)
235
- echo "::set-output name=version_published::${{ env.VERSION_PUBLISHED }}"
236
-
237
- deploy:
238
- needs: [ check_version ]
239
- name: ๐Ÿš€ Deploy to NPM
240
- runs-on: ubuntu-latest
241
- timeout-minutes: 20
242
- if: ${{ needs.check_version.outputs.version_published != 'true' }}
243
- steps:
244
- - name: Checkout code
245
- uses: actions/checkout@v4
246
-
247
- - name: Set RC
248
- run: |
249
- echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
250
-
251
- - name: Install pnpm
252
- run: |
253
- npm i -g pnpm
254
-
255
- - name: Install Packages
256
- run: |
257
- pnpm i
258
-
259
- - name: Build
260
- run: |
261
- npx tsc
262
-
263
- - name: Pack
264
- run: |
265
- pnpm pack
266
-
267
- - name: Publish
268
- run: |
269
- npm publish
270
-
271
- build_report:
272
- name: ๐Ÿ“Š Build Report
273
- needs: [
274
- notification0,
275
- check_dev_leftovers,
276
- test,
277
- check_version,
278
- deploy
279
- ]
280
- #runs-on: ubuntu-latest
281
- runs-on: plo-koon
282
- timeout-minutes: 20
283
- if: always()
284
- steps:
285
-
286
- # NEW IMPLEMENTATION using futdevpro/fdp-github-actions/send-build-report@master:
287
- - name: Checkout code
288
- uses: actions/checkout@v4
289
-
290
- - name: Send Build Report
291
- uses: futdevpro/fdp-github-actions/send-build-report@master
292
- with:
293
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
294
- SETTINGS: |
295
- {
296
- "overseerUrl": "${{ vars.OVERSEER_URL }}",
297
- "overseerSecret": "${{ secrets.OVERSEER_SECRET_KEY }}",
298
- "branchName": "${{ github.ref_name }}",
299
- "repository": "${{ github.repository }}",
300
- "runId": "${{ github.run_id }}",
301
- "linkToAction": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
302
- "eventDateTime": "${{ needs.notification0.outputs.start }}",
303
- "projects": [
304
- {
305
- "environment": "prod",
306
- "stepResults": [
307
- {
308
- "stepName": "checkDevLeftovers",
309
- "resultCode": "${{ needs.check_dev_leftovers.result }}",
310
- "requirement": "optional"
311
- },
312
- {
313
- "stepName": "tests",
314
- "resultCode": "${{ needs.test.result }}",
315
- "requirement": "required"
316
- },
317
- {
318
- "stepName": "checkVersion",
319
- "resultCode": "${{ needs.check_version.result }}",
320
- "requirement": "required"
321
- },
322
- {
323
- "stepName": "deploy",
324
- "resultCode": "${{ needs.deploy.result }}",
325
- "requirement": "optional"
326
- }
327
- ]
328
- }
329
- ]
330
- }
331
-
332
-
333
- end:
334
- name: ๐ŸŽฏ Discord Results
335
- needs: [
336
- notification0,
337
- check_secrets,
338
- check_dev_leftovers,
339
- test,
340
- check_version,
341
- deploy,
342
- build_report
343
- ]
344
- #runs-on: ubuntu-latest
345
- runs-on: plo-koon
346
- timeout-minutes: 20
347
- if: always()
348
- steps:
349
- - name: Checkout code
350
- uses: actions/checkout@v4
351
-
352
- - name: Send Discord result notification
353
- uses: futdevpro/fdp-github-actions/discord-result-notification@latest
354
- with:
355
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
356
- APPLICATION_NAME: "Dynamo-FSM"
357
- APPLICATION_EMOJI: "๐Ÿงฑ"
358
- BRANCH: ${{ github.ref_name }}
359
- RUN_NUMBER: ${{ github.run_number }}
360
- RUN_ID: ${{ github.run_id }}
361
- REPOSITORY: ${{ github.repository }}
362
- START_TIME: ${{ needs.notification0.outputs.start }}
363
- DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }}
364
- DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
365
- STEPS_CONFIG: |
366
- [
367
- {
368
- "stepName": "Secrets Check",
369
- "stepEmoji": "๐Ÿ”‘",
370
- "resultCode": "${{ needs.check_secrets.result }}"
371
- },
372
- {
373
- "stepName": "Dev Leftovers Check",
374
- "stepEmoji": "๐Ÿ”",
375
- "resultCode": "${{ needs.check_dev_leftovers.result }}"
376
- },
377
- {
378
- "stepName": "Test Build",
379
- "stepEmoji": "๐Ÿงช",
380
- "resultCode": "${{ needs.test.result }}"
381
- },
382
- {
383
- "stepName": "Check Version",
384
- "stepEmoji": "๐Ÿ”",
385
- "resultCode": "${{ needs.check_version.result }}"
386
- },
387
- {
388
- "stepName": "Deploy",
389
- "stepEmoji": "๐Ÿ“ฆ",
390
- "resultCode": "${{ needs.deploy.result }}",
391
- "specialSuccessEmoji": "๐Ÿš€๐Ÿš€๐Ÿš€"
392
- },
393
- {
394
- "stepName": "Build Report",
395
- "stepEmoji": "๐Ÿ“Š",
396
- "resultCode": "${{ needs.build_report.result }}"
397
- }
398
- ]
399
-
400
-
27
+ OVERSEER_WEBHOOK_URL: ${{ vars.OVERSEER_URL }}/pipeline-runner/webhook/github
28
+ OVERSEER_WEBHOOK_SECRET: ${{ secrets.OVERSEER_SECRET_KEY }}
29
+
30
+
31
+ # =============================================================================
32
+ # PREVIOUS: Full GitHub Actions Pipeline (preserved for reference/fallback)
33
+ # =============================================================================
34
+ # name: Test and Deploy
35
+ # on:
36
+ # push:
37
+ # branches:
38
+ # - '**'
39
+ # permissions:
40
+ # actions: read
41
+ # id-token: write
42
+ # contents: read
43
+ # checks: write
44
+ # issues: read
45
+ # pull-requests: write
46
+ # env:
47
+ # PACKAGE_NAME: ''
48
+ # THIS_VERSION: 0.0.0
49
+ # LATEST_VERSION: 0.0.0
50
+ # VERSION_PUBLISHED: true
51
+ #
52
+ #
53
+ # jobs:
54
+ # notification0:
55
+ # name: ๐Ÿน Discord start Notification
56
+ # runs-on: ubuntu-latest
57
+ # #runs-on: plo-koon
58
+ # timeout-minutes: 20
59
+ # outputs:
60
+ # start: ${{ steps.mark_start.outputs.started }}
61
+ # steps:
62
+ # - uses: actions/checkout@v4
63
+ # - id: mark_start
64
+ # run: echo "started=$(date +%s)" >> "$GITHUB_OUTPUT"
65
+ # - name: Send Discord start notification
66
+ # uses: futdevpro/fdp-github-actions/discord-start-notification@latest
67
+ # with:
68
+ # NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
69
+ # APPLICATION_NAME: "Dynamo-FSM"
70
+ # APPLICATION_EMOJI: "๐Ÿงฑ"
71
+ # COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
72
+ # EVENT_DATETIME: ${{ github.event.head_commit.timestamp }}
73
+ # DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }}
74
+ # DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
75
+ #
76
+ # notification0_fail_report:
77
+ # name: ๐Ÿ’ฃ Discord Start Notification Fail Report
78
+ # runs-on: ubuntu-latest
79
+ # #runs-on: plo-koon
80
+ # timeout-minutes: 20
81
+ # if: always() && needs.notification0.result == 'failure'
82
+ # needs: [notification0]
83
+ # steps:
84
+ # - name: send custom message with args
85
+ # uses: appleboy/discord-action@master
86
+ # with:
87
+ # webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
88
+ # webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
89
+ # message: |
90
+ # โŒโŒโŒ๐Ÿงฑ Failed to send Discord start notification for ${{ github.repository }}! [๐Ÿ”—](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
91
+ #
92
+ # check_secrets:
93
+ # name: ๐Ÿ” Check Required Secrets and Variables
94
+ # #runs-on: ubuntu-latest
95
+ # runs-on: plo-koon
96
+ # timeout-minutes: 20
97
+ # steps:
98
+ # - name: Check Required Secrets and Variables
99
+ # uses: futdevpro/fdp-github-actions/check-secrets-and-variables@latest
100
+ # with:
101
+ # NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
102
+ # ITEMS_TO_CHECK: |
103
+ # [
104
+ # {
105
+ # "valueName": "NPM_TOKEN",
106
+ # "value": "${{ secrets.NPM_TOKEN }}",
107
+ # "type": "SECRET"
108
+ # },
109
+ # {
110
+ # "valueName": "DISCORD_WEBHOOK_ID",
111
+ # "value": "${{ secrets.DISCORD_WEBHOOK_ID }}",
112
+ # "type": "SECRET"
113
+ # },
114
+ # {
115
+ # "valueName": "DISCORD_WEBHOOK_TOKEN",
116
+ # "value": "${{ secrets.DISCORD_WEBHOOK_TOKEN }}",
117
+ # "type": "SECRET"
118
+ # },
119
+ # {
120
+ # "valueName": "OVERSEER_SECRET_KEY",
121
+ # "value": "${{ secrets.OVERSEER_SECRET_KEY }}",
122
+ # "type": "SECRET"
123
+ # },
124
+ #
125
+ # {
126
+ # "valueName": "OVERSEER_URL",
127
+ # "value": "${{ vars.OVERSEER_URL }}",
128
+ # "type": "VARIABLE"
129
+ # }
130
+ # ]
131
+ #
132
+ # check_dev_leftovers:
133
+ # name: ๐Ÿ” Check Dev leftovers
134
+ # #runs-on: ubuntu-latest
135
+ # runs-on: plo-koon
136
+ # timeout-minutes: 20
137
+ # steps:
138
+ # - name: Checkout code
139
+ # uses: actions/checkout@v4
140
+ #
141
+ # - name: Install Node.js
142
+ # uses: actions/setup-node@v2
143
+ # with:
144
+ # node-version: '16'
145
+ #
146
+ # # TODO: Check build version (to ALL packages)
147
+ # - name: Check build folder
148
+ # run: |
149
+ # node -e "
150
+ # const buildFolder = './build/';
151
+ # const fs = require('fs');
152
+ #
153
+ # fs.readdir(buildFolder, (err, files) => {
154
+ # if (!files?.length) {
155
+ # console.error(
156
+ # 'FDPError: ./build folder is MISSING!' +
157
+ # '\nbuild the project locally before push!'
158
+ # );
159
+ # process.exit(1);
160
+ # }
161
+ #
162
+ # if (files.includes('dynamo-fsm')) {
163
+ # console.error(
164
+ # 'FDPError: ./build copntains dynamo-fsm folder which means this is a local dev build!' +
165
+ # '\nrebuild the project locally before push!'
166
+ # );
167
+ # process.exit(1);
168
+ # }
169
+ # });
170
+ # "
171
+ #
172
+ # test:
173
+ # name: ๐Ÿงช Test Build
174
+ # runs-on: ubuntu-latest
175
+ # needs: [ check_dev_leftovers ]
176
+ # timeout-minutes: 20
177
+ # steps:
178
+ # - name: Checkout code
179
+ # uses: actions/checkout@v4
180
+ #
181
+ # - name: Set NPM RC
182
+ # run: |
183
+ # echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
184
+ #
185
+ # - name: Get safe-chain version
186
+ # run: |
187
+ # VERSION=$(curl -s https://api.github.com/repos/AikidoSec/safe-chain/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's/^v//')
188
+ # echo "SAFE_CHAIN_VERSION=$VERSION" >> $GITHUB_ENV
189
+ #
190
+ # - name: Install safe-chain
191
+ # run: |
192
+ # curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --ci
193
+ #
194
+ # - name: Install pnpm
195
+ # run: |
196
+ # npm i -g pnpm
197
+ #
198
+ # - name: Install Packages
199
+ # run: |
200
+ # pnpm i --safe-chain-skip-minimum-package-age
201
+ #
202
+ # - name: Build
203
+ # run: |
204
+ # npx tsc
205
+ #
206
+ # - name: Install Jasmine
207
+ # run: |
208
+ # npm i -g jasmine
209
+ #
210
+ # - name: Test
211
+ # run: |
212
+ # jasmine
213
+ #
214
+ # - name: Test Pack
215
+ # run: |
216
+ # pnpm pack
217
+ #
218
+ #
219
+ # check_version:
220
+ # name: ๐Ÿ” Check Version
221
+ # needs: [ test ]
222
+ # #runs-on: ubuntu-latest
223
+ # runs-on: plo-koon
224
+ # timeout-minutes: 20
225
+ # outputs:
226
+ # version_published: ${{ steps.version_check_results.outputs.version_published }}
227
+ # steps:
228
+ # - name: Checkout code
229
+ # uses: actions/checkout@v4
230
+ #
231
+ # - name: Set Package Name
232
+ # run: |
233
+ # echo "PACKAGE_NAME=$(node -p -e "require('./package.json').name")" >> $GITHUB_ENV
234
+ #
235
+ # - name: Set RC
236
+ # run: |
237
+ # echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
238
+ #
239
+ # - name: Get This Version
240
+ # run: |
241
+ # RAW_THIS_VERSION=$(node -p -e "require('./package.json').version")
242
+ # # replace ALL: 'v0' with '', '01' with '1', '.0' with '.'
243
+ # RAW_THIS_VERSION=$(echo $RAW_THIS_VERSION | sed 's:v0::g' | sed 's:01:1:g' | sed -e 's:\.0:\.:g')
244
+ # echo "THIS_VERSION=$RAW_THIS_VERSION" >> $GITHUB_ENV
245
+ #
246
+ # - name: Get Latest Version
247
+ # run: |
248
+ # echo "LATEST_VERSION=$(npm view ${{ env.PACKAGE_NAME }} version)" >> $GITHUB_ENV
249
+ #
250
+ # - name: Check All Versions
251
+ # run: |
252
+ # ALL_VERSIONS=$(npm view ${{ env.PACKAGE_NAME }} versions)
253
+ # if echo "$ALL_VERSIONS" | grep -q "${{ env.THIS_VERSION }}"; then
254
+ # echo "VERSION_PUBLISHED=true" >> $GITHUB_ENV
255
+ # else
256
+ # echo "VERSION_PUBLISHED=false" >> $GITHUB_ENV
257
+ # fi
258
+ #
259
+ # - name: Version Check Results
260
+ # id: version_check_results
261
+ # run: |
262
+ # echo package name: "${{ env.PACKAGE_NAME }}"
263
+ # echo this: "${{ env.THIS_VERSION }}"
264
+ # echo latest: "${{ env.LATEST_VERSION }}"
265
+ # echo this is the latest: "${{ env.LATEST_VERSION == env.THIS_VERSION }}"
266
+ # echo this version is published: "${{ env.VERSION_PUBLISHED }}"
267
+ # echo all published versions: $(npm view ${{ env.PACKAGE_NAME }} versions)
268
+ # echo "::set-output name=version_published::${{ env.VERSION_PUBLISHED }}"
269
+ #
270
+ # deploy:
271
+ # needs: [ check_version ]
272
+ # name: ๐Ÿš€ Deploy to NPM
273
+ # runs-on: ubuntu-latest
274
+ # timeout-minutes: 20
275
+ # if: ${{ needs.check_version.outputs.version_published != 'true' }}
276
+ # steps:
277
+ # - name: Checkout code
278
+ # uses: actions/checkout@v4
279
+ #
280
+ # - name: Set RC
281
+ # run: |
282
+ # echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
283
+ #
284
+ # - name: Install pnpm
285
+ # run: |
286
+ # npm i -g pnpm
287
+ #
288
+ # - name: Install Packages
289
+ # run: |
290
+ # pnpm i
291
+ #
292
+ # - name: Build
293
+ # run: |
294
+ # npx tsc
295
+ #
296
+ # - name: Pack
297
+ # run: |
298
+ # pnpm pack
299
+ #
300
+ # - name: Publish
301
+ # run: |
302
+ # npm publish
303
+ #
304
+ # build_report:
305
+ # name: ๐Ÿ“Š Build Report
306
+ # needs: [
307
+ # notification0,
308
+ # check_dev_leftovers,
309
+ # test,
310
+ # check_version,
311
+ # deploy
312
+ # ]
313
+ # #runs-on: ubuntu-latest
314
+ # runs-on: plo-koon
315
+ # timeout-minutes: 20
316
+ # if: always()
317
+ # steps:
318
+ #
319
+ # # NEW IMPLEMENTATION using futdevpro/fdp-github-actions/send-build-report@master:
320
+ # - name: Checkout code
321
+ # uses: actions/checkout@v4
322
+ #
323
+ # - name: Send Build Report
324
+ # uses: futdevpro/fdp-github-actions/send-build-report@master
325
+ # with:
326
+ # NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
327
+ # SETTINGS: |
328
+ # {
329
+ # "overseerUrl": "${{ vars.OVERSEER_URL }}",
330
+ # "overseerSecret": "${{ secrets.OVERSEER_SECRET_KEY }}",
331
+ # "branchName": "${{ github.ref_name }}",
332
+ # "repository": "${{ github.repository }}",
333
+ # "runId": "${{ github.run_id }}",
334
+ # "linkToAction": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
335
+ # "eventDateTime": "${{ needs.notification0.outputs.start }}",
336
+ # "projects": [
337
+ # {
338
+ # "environment": "prod",
339
+ # "stepResults": [
340
+ # {
341
+ # "stepName": "checkDevLeftovers",
342
+ # "resultCode": "${{ needs.check_dev_leftovers.result }}",
343
+ # "requirement": "optional"
344
+ # },
345
+ # {
346
+ # "stepName": "tests",
347
+ # "resultCode": "${{ needs.test.result }}",
348
+ # "requirement": "required"
349
+ # },
350
+ # {
351
+ # "stepName": "checkVersion",
352
+ # "resultCode": "${{ needs.check_version.result }}",
353
+ # "requirement": "required"
354
+ # },
355
+ # {
356
+ # "stepName": "deploy",
357
+ # "resultCode": "${{ needs.deploy.result }}",
358
+ # "requirement": "optional"
359
+ # }
360
+ # ]
361
+ # }
362
+ # ]
363
+ # }
364
+ #
365
+ #
366
+ # end:
367
+ # name: ๐ŸŽฏ Discord Results
368
+ # needs: [
369
+ # notification0,
370
+ # check_secrets,
371
+ # check_dev_leftovers,
372
+ # test,
373
+ # check_version,
374
+ # deploy,
375
+ # build_report
376
+ # ]
377
+ # #runs-on: ubuntu-latest
378
+ # runs-on: plo-koon
379
+ # timeout-minutes: 20
380
+ # if: always()
381
+ # steps:
382
+ # - name: Checkout code
383
+ # uses: actions/checkout@v4
384
+ #
385
+ # - name: Send Discord result notification
386
+ # uses: futdevpro/fdp-github-actions/discord-result-notification@latest
387
+ # with:
388
+ # NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
389
+ # APPLICATION_NAME: "Dynamo-FSM"
390
+ # APPLICATION_EMOJI: "๐Ÿงฑ"
391
+ # BRANCH: ${{ github.ref_name }}
392
+ # RUN_NUMBER: ${{ github.run_number }}
393
+ # RUN_ID: ${{ github.run_id }}
394
+ # REPOSITORY: ${{ github.repository }}
395
+ # START_TIME: ${{ needs.notification0.outputs.start }}
396
+ # DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }}
397
+ # DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
398
+ # STEPS_CONFIG: |
399
+ # [
400
+ # {
401
+ # "stepName": "Secrets Check",
402
+ # "stepEmoji": "๐Ÿ”‘",
403
+ # "resultCode": "${{ needs.check_secrets.result }}"
404
+ # },
405
+ # {
406
+ # "stepName": "Dev Leftovers Check",
407
+ # "stepEmoji": "๐Ÿ”",
408
+ # "resultCode": "${{ needs.check_dev_leftovers.result }}"
409
+ # },
410
+ # {
411
+ # "stepName": "Test Build",
412
+ # "stepEmoji": "๐Ÿงช",
413
+ # "resultCode": "${{ needs.test.result }}"
414
+ # },
415
+ # {
416
+ # "stepName": "Check Version",
417
+ # "stepEmoji": "๐Ÿ”",
418
+ # "resultCode": "${{ needs.check_version.result }}"
419
+ # },
420
+ # {
421
+ # "stepName": "Deploy",
422
+ # "stepEmoji": "๐Ÿ“ฆ",
423
+ # "resultCode": "${{ needs.deploy.result }}",
424
+ # "specialSuccessEmoji": "๐Ÿš€๐Ÿš€๐Ÿš€"
425
+ # },
426
+ # {
427
+ # "stepName": "Build Report",
428
+ # "stepEmoji": "๐Ÿ“Š",
429
+ # "resultCode": "${{ needs.build_report.result }}"
430
+ # }
431
+ # ]
432
+ #
433
+ #