@starci/hfs 4.5.0 → 4.6.0

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 (39) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/ci/cli.mjs +6 -4
  3. package/ci/vars.mjs +22 -5
  4. package/ci/verify.mjs +16 -2
  5. package/lint/run.mjs +3 -4
  6. package/package.json +1 -1
  7. package/release/ci-red.mjs +44 -12
  8. package/release/gate.mjs +50 -19
  9. package/release/push.mjs +1 -1
  10. package/runtime/knowledge/hfs/canon-pins.yaml +5 -5
  11. package/runtime/knowledge/sonar-gate.yaml +2 -2
  12. package/runtime/modules/schemas/application-stacks.schema.yaml +35 -0
  13. package/runtime/packages/cli/src/catalog.generated.mjs +9 -7
  14. package/runtime/scripts/hfs/ci-declaration.mjs +12 -3
  15. package/runtime/scripts/hfs/rules/secrets.mjs +8 -10
  16. package/runtime/scripts/lib/secret-patterns.mjs +77 -0
  17. package/scaffold/app.mjs +2 -2
  18. package/sync/ci-commands.mjs +154 -14
  19. package/sync/hygiene.mjs +4 -1
  20. package/sync/index.mjs +16 -12
  21. package/sync/quality-services.mjs +7 -5
  22. package/sync/readme-badges.mjs +18 -2
  23. package/sync/stack-images.mjs +5 -0
  24. package/templates/app/ci-workflows/github/workflows/ci.yml +9 -3
  25. package/templates/app/ci-workflows/github/workflows/e2e.yml +1 -0
  26. package/templates/app/ci-workflows/github/workflows/images.yml +1 -0
  27. package/templates/app/ci-workflows/install-steps.yml +2 -0
  28. package/templates/app/ci-workflows/jest-cache.yml +8 -0
  29. package/templates/app/ci-workflows/lint-base.yml +16 -0
  30. package/templates/app/ci-workflows-lite/github/workflows/ci.yml +10 -4
  31. package/templates/app/ci-workflows-lite/github/workflows/db-deploy.yml +1 -0
  32. package/templates/app/ci-workflows-lite/github/workflows/images.yml +1 -0
  33. package/templates/app/gitignore +2 -0
  34. package/templates/app/gitignore-lite +2 -0
  35. package/templates/app/skeleton/.github/dependabot.yml +1 -2
  36. package/templates/app/skeleton/.starcistacks/application-stacks.yaml +1 -0
  37. package/templates/app/skeleton-lite/.github/dependabot.yml +1 -2
  38. package/templates/app/skeleton-lite/.starcistacks/application-stacks.yaml +1 -0
  39. package/templates/app/upgrade-full/.starcistacks/application-stacks.yaml +1 -0
@@ -10,6 +10,7 @@ permissions:
10
10
 
11
11
  jobs:
12
12
  e2e:
13
+ timeout-minutes: 45
13
14
  runs-on: ubuntu-latest
14
15
  steps:
15
16
  - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
@@ -17,6 +17,7 @@ concurrency:
17
17
 
18
18
  jobs:
19
19
  image:
20
+ timeout-minutes: 30
20
21
  runs-on: ubuntu-latest{{imageJobEnvironment}}
21
22
  env:
22
23
  STACK_ENVIRONMENT: {{imageEnvironment}}
@@ -1,4 +1,6 @@
1
1
  - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
2
+ with:
3
+ fetch-depth: 0
2
4
  - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3
5
  with:
4
6
  node-version: {{nodeMajor}}
@@ -0,0 +1,8 @@
1
+ - name: Jest cache
2
+ uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
3
+ with:
4
+ path: .jest-cache
5
+ key: ${{ runner.os }}-node{{nodeMajor}}-jest-${{ hashFiles('package-lock.json') }}-${{ github.sha }}
6
+ restore-keys: |
7
+ ${{ runner.os }}-node{{nodeMajor}}-jest-${{ hashFiles('package-lock.json') }}-
8
+ ${{ runner.os }}-node{{nodeMajor}}-jest-
@@ -0,0 +1,16 @@
1
+ - name: lint baseline
2
+ shell: bash
3
+ env:
4
+ BASE_BRANCH: ${{ github.base_ref }}
5
+ DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
6
+ BEFORE: ${{ github.event.before }}
7
+ run: |
8
+ base="origin/$DEFAULT_BRANCH"
9
+ if [[ "$GITHUB_EVENT_NAME" == pull_request ]]; then
10
+ base="origin/$BASE_BRANCH"
11
+ elif [[ "$GITHUB_REF" == refs/tags/* ]]; then
12
+ base=$(git describe --tags --abbrev=0 "$GITHUB_REF^" 2>/dev/null) || base="origin/$DEFAULT_BRANCH"
13
+ elif [[ "$GITHUB_EVENT_NAME" == push && -n "$BEFORE" && ! "$BEFORE" =~ ^0+$ ]]; then
14
+ base="$BEFORE"
15
+ fi
16
+ echo "STARCI_BASE_REF=$base" >> "$GITHUB_ENV"
@@ -16,10 +16,12 @@ concurrency:
16
16
 
17
17
  jobs:
18
18
  fast:
19
+ timeout-minutes: 20
19
20
  runs-on: ubuntu-latest
20
21
  {{sonarEnv}}
21
22
  steps:
22
23
  {{> app/ci-workflows/install-steps.yml}}
24
+ {{> app/ci-workflows/lint-base.yml}}
23
25
  - name: production dependency audit
24
26
  run: {{auditCommand}}
25
27
  {{ciLintSteps}}
@@ -29,6 +31,7 @@ jobs:
29
31
  run: npm run typecheck
30
32
 
31
33
  test:
34
+ timeout-minutes: 45
32
35
  runs-on: ubuntu-latest
33
36
  # Codecov OIDC authentication requires a job-scoped identity token.
34
37
  permissions:
@@ -36,10 +39,13 @@ jobs:
36
39
  id-token: write
37
40
  steps:
38
41
  {{> app/ci-workflows/install-steps.yml}}
42
+ {{> app/ci-workflows/jest-cache.yml}}
39
43
  - name: unit
40
- run: npm test -- --ci
44
+ run: npm test -- --ci --forceExit --cacheDirectory .jest-cache
41
45
  - name: coverage proof
42
46
  run: {{ciCoverageProof}}
47
+ env:
48
+ NODE_OPTIONS: --max-old-space-size=6144
43
49
  - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
44
50
  if: always() && hashFiles('{{lcovReport}}') != ''
45
51
  with:
@@ -48,19 +54,19 @@ jobs:
48
54
  {{codecovSteps}}
49
55
 
50
56
  build:
57
+ timeout-minutes: 30
51
58
  runs-on: ubuntu-latest
52
59
  steps:
53
60
  {{> app/ci-workflows/install-steps.yml}}
54
61
  - name: build be
55
62
  run: npm run build:be
56
- - name: build fe
57
- run: npm run build:fe
63
+ {{ciBuildSteps}}
58
64
  - name: database migration checks
59
65
  run: {{ciDatabaseLint}}
60
66
 
61
67
  {{sonarJob}}
62
-
63
68
  db-types:
69
+ timeout-minutes: 30
64
70
  runs-on: ubuntu-latest
65
71
  steps:
66
72
  {{> app/ci-workflows/install-steps.yml}}
@@ -22,6 +22,7 @@ concurrency:
22
22
 
23
23
  jobs:
24
24
  deploy:
25
+ timeout-minutes: 30
25
26
  runs-on: ubuntu-latest
26
27
  environment: ${{ inputs.environment }}
27
28
  env:
@@ -17,6 +17,7 @@ concurrency:
17
17
 
18
18
  jobs:
19
19
  image:
20
+ timeout-minutes: 30
20
21
  runs-on: ubuntu-latest{{imageJobEnvironment}}
21
22
  env:
22
23
  STACK_ENVIRONMENT: {{imageEnvironment}}
@@ -1,4 +1,6 @@
1
1
  {{> common/gitignore.base}}
2
+ # Jest transforms reused by the CI test job
3
+ .jest-cache/
2
4
  # be: the schema Nest writes when it boots GraphQL
3
5
  schema.gql
4
6
  # fe: Next build output and its generated type file
@@ -1,4 +1,6 @@
1
1
  {{> common/gitignore.base}}
2
+ # Jest transforms reused by the CI test job
3
+ .jest-cache/
2
4
  # Supabase CLI state is local Docker metadata, never application source.
3
5
  supabase/.temp/
4
6
  supabase/.branches/
@@ -1,4 +1,3 @@
1
1
  {{header}}
2
2
  version: 2
3
- updates:
4
- {{dependabotUpdates}}
3
+ updates:{{dependabotUpdates}}
@@ -148,6 +148,7 @@ ci:
148
148
  services:
149
149
  sonar:
150
150
  provider: sonarqube
151
+ optional: true
151
152
  mode: local
152
153
  qualityGate: {{sonarGate}}
153
154
  host: {local: http://127.0.0.1:9000, public: "https://sonar.{{project}}.example.invalid"}
@@ -1,4 +1,3 @@
1
1
  {{header}}
2
2
  version: 2
3
- updates:
4
- {{dependabotUpdates}}
3
+ updates:{{dependabotUpdates}}
@@ -193,6 +193,7 @@ ci:
193
193
  services:
194
194
  sonar:
195
195
  provider: sonarqube
196
+ optional: true
196
197
  mode: local
197
198
  qualityGate: {{sonarGate}}
198
199
  host: {local: http://127.0.0.1:9000, public: "https://sonar.{{project}}.example.invalid"}
@@ -43,6 +43,7 @@ ci:
43
43
  services:
44
44
  sonar:
45
45
  provider: sonarqube
46
+ optional: true
46
47
  mode: disabled
47
48
  reason: Enable the repository's Sonar service when a host and project token are provisioned.
48
49
  qualityGate: starci-quality