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