@aifabrix/builder 2.52.1 → 2.53.1

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 (225) hide show
  1. package/lib/app/deploy-config.js +3 -2
  2. package/lib/channels/add-channel.js +11 -41
  3. package/lib/channels/approval-guides/index.js +3 -0
  4. package/lib/channels/approval-guides/microsoft-copilot.js +26 -17
  5. package/lib/channels/channel-add-existing.js +72 -0
  6. package/lib/channels/channel-runtime-resolver.js +5 -1
  7. package/lib/channels/channel-status-display.js +30 -3
  8. package/lib/channels/microsoft-copilot-entra-sso-form.js +73 -2
  9. package/lib/channels/microsoft-copilot-entra-sso.js +26 -5
  10. package/lib/channels/microsoft-copilot-limits.js +22 -3
  11. package/lib/channels/microsoft-copilot-package.js +59 -14
  12. package/lib/channels/microsoft-copilot-validate.js +40 -10
  13. package/lib/cli/attach-default-help-examples.js +102 -0
  14. package/lib/cli/index.js +2 -0
  15. package/lib/cli/setup-credential-deployment.js +7 -5
  16. package/lib/cli/setup-utility-validate.js +1 -0
  17. package/lib/commands/credential-push.js +37 -5
  18. package/lib/commands/package-score.js +72 -0
  19. package/lib/commands/role-assistant.js +46 -8
  20. package/lib/deployment/deployer-poll-run.js +2 -2
  21. package/lib/deployment/deployer.js +1 -1
  22. package/lib/deployment/environment.js +2 -2
  23. package/lib/external-system/deploy.js +11 -21
  24. package/lib/integration-definition/apply.js +12 -14
  25. package/lib/integration-definition/enrich-openapi-operations.js +9 -10
  26. package/lib/lab/package-parity-score.js +417 -0
  27. package/lib/programmatic/capability-registry.js +1 -0
  28. package/lib/programmatic/help-content/channel-onboarding.md +35 -0
  29. package/lib/programmatic/help-content/cip-overview.md +27 -0
  30. package/lib/programmatic/help-content/connected-system-ui.md +70 -0
  31. package/lib/programmatic/help-content/dimensions-guide.md +23 -0
  32. package/lib/programmatic/help-content/enterprise-sync-fabrix.md +123 -0
  33. package/lib/programmatic/help-content/overview.md +25 -0
  34. package/lib/programmatic/help-content/subscription-guide.md +27 -0
  35. package/lib/programmatic/help-content/workflow.md +50 -0
  36. package/lib/programmatic/openapi-component-schemas.js +1 -0
  37. package/lib/programmatic/openapi-descriptions.js +6 -0
  38. package/lib/programmatic/openapi-envelope-examples.js +11 -0
  39. package/lib/programmatic/openapi-operation-bindings.js +5 -0
  40. package/lib/programmatic/openapi-request-schemas.js +39 -13
  41. package/lib/programmatic/openapi-result-schemas.js +30 -0
  42. package/lib/programmatic/openapi-schema-descriptions-core.js +18 -0
  43. package/lib/programmatic/openapi-schema-descriptions-operations.js +19 -0
  44. package/lib/programmatic/persist-supplied-openapi.js +180 -0
  45. package/lib/programmatic/route-handler-map.js +6 -0
  46. package/lib/programmatic/run-integration-definition.js +13 -5
  47. package/lib/role-assistant/evidence-sync.js +55 -7
  48. package/lib/role-assistant/test-runner-attachments.js +118 -0
  49. package/lib/role-assistant/test-runner-bid-apply.js +100 -21
  50. package/lib/role-assistant/test-runner-bid-document.js +1 -1
  51. package/lib/role-assistant/test-runner-start-payload.js +96 -0
  52. package/lib/role-assistant/test-runner-workhub-answers.js +11 -7
  53. package/lib/role-assistant/test-runner-workhub-helpers.js +100 -0
  54. package/lib/role-assistant/test-runner-workhub-soft.js +86 -0
  55. package/lib/role-assistant/test-runner-workhub.js +68 -105
  56. package/lib/role-assistant/test-runner.js +5 -63
  57. package/lib/role-assistant/test-suite.js +33 -40
  58. package/lib/schema/external-datasource.schema.json +13 -4
  59. package/lib/utils/compose-generator.js +10 -1
  60. package/lib/utils/compose-traefik-extra-routes.js +107 -0
  61. package/lib/utils/docker-build.js +2 -2
  62. package/lib/utils/help-builder.js +2 -1
  63. package/lib/utils/promote-dev-docker-image.js +15 -10
  64. package/package.json +14 -16
  65. package/templates/README.md +12 -1
  66. package/templates/applications/dataplane/application.yaml +8 -1
  67. package/templates/applications/dataplane/env.template +1 -1
  68. package/templates/applications/miso-controller/application.yaml +2 -1
  69. package/templates/applications/miso-controller/rbac.yaml +1 -0
  70. package/templates/channels/microsoft-copilot/ai-plugin.template.json.hbs +6 -2
  71. package/templates/channels/microsoft-copilot/entra-sso-registration.template.md.hbs +8 -5
  72. package/templates/channels/microsoft-copilot/fi-fi.template.json.hbs +7 -0
  73. package/templates/channels/microsoft-copilot/install.template.md.hbs +74 -22
  74. package/templates/channels/microsoft-copilot/manifest.template.json.hbs +29 -14
  75. package/templates/channels/microsoft-copilot/oauth-plugin-vault-required.template.md.hbs +6 -2
  76. package/templates/python/docker-compose.hbs +36 -0
  77. package/templates/typescript/docker-compose.hbs +36 -0
  78. package/.cursor/plans/Archive/157.1-security-quality-violations-by-type.csv +0 -374
  79. package/.cursor/process/README.md +0 -9
  80. package/.cursor/rules/anchor-docs.mdc +0 -15
  81. package/.cursor/rules/assistant-driven-integration-build.mdc +0 -40
  82. package/.cursor/rules/cli-layout.mdc +0 -81
  83. package/.cursor/rules/cli-product-neutral.mdc +0 -43
  84. package/.cursor/rules/deploy-rules/docker-image-ip-policy.mdc +0 -49
  85. package/.cursor/rules/docs-rules.mdc +0 -32
  86. package/.cursor/rules/plan-rules/application-lifecycle.mdc +0 -30
  87. package/.cursor/rules/plan-rules/plan-frontmatter.mdc +0 -35
  88. package/.cursor/rules/plan-rules/plan-lifecycle.mdc +0 -31
  89. package/.cursor/rules/plan-rules/plan-validation-gate.mdc +0 -34
  90. package/.cursor/rules/project-rules.mdc +0 -913
  91. package/.cursor/skills/README.md +0 -15
  92. package/.dockerignore +0 -52
  93. package/.eslintignore +0 -22
  94. package/.markdownlint.json +0 -14
  95. package/anchor-docs/README.md +0 -10
  96. package/anchor-docs/_TEMPLATE +0 -24
  97. package/babel.config.js +0 -6
  98. package/bin/builder-api-cleanup.js +0 -26
  99. package/bin/builder-api-nest.js +0 -10
  100. package/bin/builder-api-spike.js +0 -19
  101. package/enterprise-knowledge/README.md +0 -50
  102. package/enterprise-knowledge/enterprise-integration-lifecycle/README.md +0 -22
  103. package/enterprise-knowledge/enterprise-integration-lifecycle/application.json +0 -15
  104. package/enterprise-knowledge/enterprise-integration-lifecycle/deploy.js +0 -69
  105. package/enterprise-knowledge/enterprise-integration-lifecycle/enterprise-integration-lifecycle-deploy.json +0 -52
  106. package/enterprise-knowledge/enterprise-integration-lifecycle/enterprise-integration-lifecycle-system.json +0 -29
  107. package/enterprise-knowledge/enterprise-integration-lifecycle/env.template +0 -2
  108. package/integration/README.md +0 -81
  109. package/integration/github/README.md +0 -53
  110. package/integration/github/application.json +0 -21
  111. package/integration/github/deploy.js +0 -72
  112. package/integration/github/env.template +0 -11
  113. package/integration/github/github-datasource-issue-comments.json +0 -239
  114. package/integration/github/github-datasource-issues.json +0 -399
  115. package/integration/github/github-datasource-repository.json +0 -354
  116. package/integration/github/github-deploy.json +0 -1202
  117. package/integration/github/github-system.json +0 -82
  118. package/integration/hubspot-test/README.md +0 -159
  119. package/integration/hubspot-test/application.json +0 -54
  120. package/integration/hubspot-test/companies.json +0 -2048
  121. package/integration/hubspot-test/create-hubspot.js +0 -523
  122. package/integration/hubspot-test/env.template +0 -4
  123. package/integration/hubspot-test/hubspot-test-datasource-company.json +0 -138
  124. package/integration/hubspot-test/hubspot-test-datasource-contact.json +0 -146
  125. package/integration/hubspot-test/hubspot-test-datasource-deal.json +0 -146
  126. package/integration/hubspot-test/hubspot-test-datasource-users.json +0 -76
  127. package/integration/hubspot-test/hubspot-test-deploy.json +0 -2160
  128. package/integration/hubspot-test/hubspot-test-system.json +0 -74
  129. package/integration/hubspot-test/rbac.json +0 -166
  130. package/integration/hubspot-test/test-artifacts/wizard-hubspot-credential-real.yaml +0 -20
  131. package/integration/hubspot-test/test-artifacts/wizard-hubspot-env-vars.yaml +0 -9
  132. package/integration/hubspot-test/test-artifacts/wizard-invalid-add-datasource.yaml +0 -5
  133. package/integration/hubspot-test/test-artifacts/wizard-invalid-app-name.yaml +0 -5
  134. package/integration/hubspot-test/test-artifacts/wizard-invalid-credential-create.yaml +0 -7
  135. package/integration/hubspot-test/test-artifacts/wizard-invalid-credential-select.yaml +0 -7
  136. package/integration/hubspot-test/test-artifacts/wizard-invalid-known-platform.yaml +0 -4
  137. package/integration/hubspot-test/test-artifacts/wizard-invalid-missing-app.yaml +0 -4
  138. package/integration/hubspot-test/test-artifacts/wizard-invalid-missing-source.yaml +0 -2
  139. package/integration/hubspot-test/test-artifacts/wizard-invalid-mode.yaml +0 -5
  140. package/integration/hubspot-test/test-artifacts/wizard-invalid-openapi-file.yaml +0 -5
  141. package/integration/hubspot-test/test-artifacts/wizard-invalid-openapi-url.yaml +0 -4
  142. package/integration/hubspot-test/test-artifacts/wizard-invalid-source.yaml +0 -4
  143. package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-array-test.yaml +0 -5
  144. package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-key-test.yaml +0 -5
  145. package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-path-test.yaml +0 -5
  146. package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-test.yaml +0 -5
  147. package/integration/hubspot-test/test-artifacts/wizard-valid-for-rbac-test.yaml +0 -5
  148. package/integration/hubspot-test/test-artifacts/wizard-valid-for-rbac-yaml-test.yaml +0 -5
  149. package/integration/hubspot-test/test-dataplane-down-helpers.js +0 -249
  150. package/integration/hubspot-test/test-dataplane-down-tests.js +0 -386
  151. package/integration/hubspot-test/test-dataplane-down.js +0 -209
  152. package/integration/hubspot-test/test.js +0 -1588
  153. package/integration/hubspot-test/wizard-hubspot-e2e.yaml +0 -16
  154. package/integration/hubspot-test/wizard-hubspot-platform.yaml +0 -8
  155. package/integration/hubspot-test/wizard-hubspot-test-headless.yaml +0 -23
  156. package/integration/roundtrip-test-local/README.md +0 -143
  157. package/integration/roundtrip-test-local/application.yaml +0 -13
  158. package/integration/roundtrip-test-local/env.template +0 -15
  159. package/integration/roundtrip-test-local/roundtrip-test-local-datasource-roundtrip-test-company.yaml +0 -14
  160. package/integration/roundtrip-test-local/roundtrip-test-local-deploy.json +0 -61
  161. package/integration/roundtrip-test-local/roundtrip-test-local-system.yaml +0 -25
  162. package/integration/roundtrip-test-local2/README.md +0 -143
  163. package/integration/roundtrip-test-local2/application.yaml +0 -13
  164. package/integration/roundtrip-test-local2/env.template +0 -15
  165. package/integration/roundtrip-test-local2/roundtrip-test-local2-datasource-company.yaml +0 -31
  166. package/integration/roundtrip-test-local2/roundtrip-test-local2-deploy.json +0 -86
  167. package/integration/roundtrip-test-local2/roundtrip-test-local2-system.yaml +0 -25
  168. package/integration/test/wizard.yaml +0 -8
  169. package/jest.config.coverage.js +0 -37
  170. package/jest.config.default.js +0 -11
  171. package/jest.config.integration.fixtures.js +0 -22
  172. package/jest.config.integration.js +0 -33
  173. package/jest.config.isolated.js +0 -11
  174. package/jest.config.manual.js +0 -30
  175. package/jest.global-live-fabrix-hooks.js +0 -36
  176. package/jest.isolated-projects.js +0 -283
  177. package/jest.projects.js +0 -79
  178. package/lib/integration-definition/openapi-enrichment/hubspot-crm-companies.json +0 -205
  179. package/packages/builder-api/README.md +0 -120
  180. package/packages/builder-api/package.json +0 -30
  181. package/packages/builder-api/src/app.module.ts +0 -7
  182. package/packages/builder-api/src/auth/auth.module.ts +0 -5
  183. package/packages/builder-api/src/external-system/external-system.module.ts +0 -5
  184. package/packages/builder-api/src/main.ts +0 -16
  185. package/packages/builder-api/tsconfig.json +0 -15
  186. package/scripts/check-builder-api-architecture-grep.js +0 -79
  187. package/scripts/check-datasource-test-run-schema-sync.js +0 -34
  188. package/scripts/ci-fix.sh +0 -19
  189. package/scripts/ci-simulate.sh +0 -19
  190. package/scripts/diagnose-cli.js +0 -150
  191. package/scripts/docker_image_content_gate.js +0 -47
  192. package/scripts/docker_image_content_gate.sh +0 -5
  193. package/scripts/export-builder-api-evidence.js +0 -262
  194. package/scripts/install-local.js +0 -490
  195. package/scripts/lib/builder-api-docker-staging-copy.js +0 -60
  196. package/scripts/lib/builder-api-docker-staging-core.js +0 -183
  197. package/scripts/lib/docker-image-content-gate-core.js +0 -166
  198. package/scripts/lib/plan-actor.js +0 -109
  199. package/scripts/lib/plan-config.js +0 -20
  200. package/scripts/lib/plan-gates.js +0 -154
  201. package/scripts/lib/plan-meta.js +0 -104
  202. package/scripts/lib/plan-parse.js +0 -162
  203. package/scripts/lib/plan-prevalidate-gates.js +0 -337
  204. package/scripts/lib/plan-run-core.js +0 -125
  205. package/scripts/lib/plan-run-report.js +0 -119
  206. package/scripts/plan-approve.js +0 -24
  207. package/scripts/plan-archive.js +0 -49
  208. package/scripts/plan-run.js +0 -13
  209. package/scripts/plan-set-actor.js +0 -21
  210. package/scripts/plan-validate.js +0 -80
  211. package/scripts/pnpm/af.mjs +0 -125
  212. package/scripts/pnpm/check-quiet.mjs +0 -32
  213. package/scripts/pnpm/dev-install.mjs +0 -29
  214. package/scripts/pnpm/dev-reload.mjs +0 -18
  215. package/scripts/pnpm/help.mjs +0 -55
  216. package/scripts/pnpm/lib/dev-reload-core.mjs +0 -189
  217. package/scripts/pnpm/lib/dev-reload-log-capture.mjs +0 -67
  218. package/scripts/pnpm/lib/dev-reload-log-utils.mjs +0 -32
  219. package/scripts/pnpm/lib/resolve-aifabrix-bin.mjs +0 -124
  220. package/scripts/pnpm/lib/resolve-app-url.mjs +0 -183
  221. package/scripts/pnpm/lib/spinner.mjs +0 -42
  222. package/scripts/pnpm-global-remove.js +0 -48
  223. package/scripts/stage_builder_api_for_docker.js +0 -65
  224. package/scripts/sync-builder-api-template.js +0 -44
  225. package/scripts/test-dataplane-bootstrap.js +0 -331
@@ -1,37 +0,0 @@
1
- /**
2
- * Jest Configuration for Coverage Reports
3
- * Extends base config with coverage settings
4
- */
5
-
6
- const baseConfig = require('./jest.config');
7
-
8
- module.exports = {
9
- ...baseConfig,
10
- collectCoverageFrom: [
11
- 'lib/**/*.js',
12
- 'bin/**/*.js',
13
- '!**/node_modules/**',
14
- '!**/tests/**',
15
- '!lib/infra.js',
16
- '!bin/aifabrix.js'
17
- ],
18
- coverageDirectory: 'coverage',
19
- coverageReporters: [
20
- 'text',
21
- 'lcov',
22
- 'html'
23
- ],
24
- coverageProvider: 'v8',
25
- coverageThreshold: {
26
- global: {
27
- branches: 80,
28
- functions: 80,
29
- lines: 80,
30
- statements: 80
31
- }
32
- },
33
- // Memory management for coverage runs
34
- maxWorkers: 2,
35
- workerIdleMemoryLimit: '500MB'
36
- };
37
-
@@ -1,11 +0,0 @@
1
- /**
2
- * Default test project only (no isolated suites). Used by test-wrapper pass 1.
3
- * @fileoverview
4
- */
5
-
6
- const { defaultProject, globalLiveFabrixHooks } = require('./jest.projects');
7
-
8
- module.exports = {
9
- ...globalLiveFabrixHooks,
10
- projects: [defaultProject]
11
- };
@@ -1,22 +0,0 @@
1
- /**
2
- * Integration tests that do not build images or talk to Docker.
3
- * Use: npm run test:integration:fixtures
4
- *
5
- * Full Docker lifecycle tests: npm run test:integration (includes steps/ + workflow).
6
- *
7
- * @fileoverview Fixture-only integration Jest config
8
- */
9
-
10
- const { sharedTransform } = require('./jest.projects');
11
-
12
- module.exports = {
13
- displayName: 'integration-fixtures',
14
- testEnvironment: 'node',
15
- transform: sharedTransform,
16
- testMatch: ['**/tests/integration/hubspot/**/*.test.js'],
17
- testPathIgnorePatterns: ['/node_modules/', '\\\\node_modules\\\\'],
18
- maxWorkers: 1,
19
- setupFiles: ['<rootDir>/tests/capture-real-fs.js'],
20
- setupFilesAfterEnv: ['<rootDir>/tests/setup.js'],
21
- testTimeout: 60000
22
- };
@@ -1,33 +0,0 @@
1
- /**
2
- * Jest configuration for integration tests under tests/integration/ only.
3
- *
4
- * IMPORTANT: Do not spread ./jest.config.js here — that config sets `projects` (default +
5
- * isolated suites). Spreading it caused `test:integration` to run the entire multi-project
6
- * suite in one process, leaking mocks/module state between projects and producing flaky
7
- * failures. This file defines a single project matching docs/plans for npm run test:integration.
8
- *
9
- * @fileoverview Full integration Jest config: HubSpot fixtures, workflow shim, and
10
- * tests/integration/steps/* (real Docker: create, build, run, health).
11
- * For fixture-only tests without Docker, use jest.config.integration.fixtures.js
12
- * (npm run test:integration:fixtures).
13
- * @author AI Fabrix Team
14
- * @version 2.0.0
15
- */
16
-
17
- const { sharedTransform } = require('./jest.projects');
18
-
19
- module.exports = {
20
- displayName: 'integration',
21
- testEnvironment: 'node',
22
- transform: sharedTransform,
23
- testMatch: ['**/tests/integration/**/*.test.js'],
24
- testPathIgnorePatterns: ['/node_modules/', '\\\\node_modules\\\\'],
25
- testSequencer: '<rootDir>/tests/integration/test-sequencer.js',
26
- testTimeout: 300000,
27
- maxWorkers: 1,
28
- setupFiles: ['<rootDir>/tests/capture-real-fs.js'],
29
- setupFilesAfterEnv: [
30
- '<rootDir>/tests/setup.js',
31
- '<rootDir>/tests/integration/jest-restore-integration-timeout.js'
32
- ]
33
- };
@@ -1,11 +0,0 @@
1
- /**
2
- * Isolated test projects only. Used by test-wrapper pass 2 (fresh Node process).
3
- * @fileoverview
4
- */
5
-
6
- const { isolatedProjects, globalLiveFabrixHooks } = require('./jest.projects');
7
-
8
- module.exports = {
9
- ...globalLiveFabrixHooks,
10
- projects: isolatedProjects
11
- };
@@ -1,30 +0,0 @@
1
- /**
2
- * Jest Configuration for Manual Tests (real API calls)
3
- * Runs only tests/manual; requires user to be logged in (validated before run).
4
- *
5
- * @fileoverview Jest config for manual tests that call real Controller/Dataplane APIs
6
- * @author AI Fabrix Team
7
- * @version 2.0.0
8
- */
9
-
10
- const baseProject = require('./jest.config').projects[0];
11
-
12
- module.exports = {
13
- // Top-level so Jest actually applies it (project-level testTimeout is ignored in some Jest versions)
14
- testTimeout: 60000,
15
- projects: [
16
- {
17
- ...baseProject,
18
- displayName: 'manual',
19
- testMatch: [
20
- '**/tests/manual/**/*.test.js'
21
- ],
22
- testPathIgnorePatterns: [
23
- '/node_modules/',
24
- '\\\\node_modules\\\\'
25
- ],
26
- setupFilesAfterEnv: ['<rootDir>/tests/manual/setup.js'],
27
- maxWorkers: 1
28
- }
29
- ]
30
- };
@@ -1,36 +0,0 @@
1
- /**
2
- * Global Jest hooks and CI guard project for live ~/.aifabrix protection.
3
- * @fileoverview
4
- */
5
-
6
- /** Once per Jest process — protects live ~/.aifabrix (incl. /workspace/.aifabrix). */
7
- const globalLiveFabrixHooks = {
8
- globalSetup: '<rootDir>/tests/global-live-fabrix-backup.js',
9
- globalTeardown: '<rootDir>/tests/global-live-fabrix-backup.js'
10
- };
11
-
12
- /**
13
- * @param {object} opts - CI flag and Babel transform config from jest.projects.js
14
- * @param {boolean} opts.isCI - Whether CI or CI simulation is active
15
- * @param {object} opts.sharedTransform - Shared babel-jest transform map
16
- * @returns {object} Jest project configuration
17
- */
18
- function createSetupCiLiveFabrixGuardProject({ isCI, sharedTransform }) {
19
- return {
20
- displayName: 'setup-ci-live-fabrix-guard',
21
- testEnvironment: 'node',
22
- transform: sharedTransform,
23
- testMatch: ['**/tests/setup-ci-live-fabrix-guard.test.js'],
24
- testPathIgnorePatterns: ['/node_modules/', '\\\\node_modules\\\\'],
25
- setupFiles: ['<rootDir>/tests/capture-real-fs.js', '<rootDir>/tests/setup-ci-env.js'],
26
- setupFilesAfterEnv: ['<rootDir>/tests/setup.js'],
27
- testTimeout: isCI ? 15000 : 8000,
28
- maxWorkers: 1,
29
- ...globalLiveFabrixHooks
30
- };
31
- }
32
-
33
- module.exports = {
34
- globalLiveFabrixHooks,
35
- createSetupCiLiveFabrixGuardProject
36
- };
@@ -1,283 +0,0 @@
1
- /**
2
- * Jest isolated project list (separate process per suite when run via jest.config.isolated.js).
3
- * @fileoverview
4
- */
5
-
6
- 'use strict';
7
-
8
- const { createSetupCiLiveFabrixGuardProject } = require('./jest.global-live-fabrix-hooks');
9
-
10
- /** @type {[string, string[]][]} displayName and testMatch globs */
11
- const ISOLATED_SUITE_ENTRIES = [
12
- ['cli-utils', ['**/tests/lib/utils/cli-utils.test.js']],
13
- ['external-system-display', ['**/tests/lib/utils/external-system-display.test.js']],
14
- ['dev-hosts-helper', ['**/tests/lib/utils/dev-hosts-helper.test.js']],
15
- ['parameters-validate', ['**/tests/lib/commands/parameters-validate.test.js']],
16
- ['test-e2e-external', ['**/tests/lib/commands/test-e2e-external.test.js']],
17
- ['repair-openapi-sync', ['**/tests/lib/commands/repair-openapi-sync.test.js']],
18
- ['paths-app-listing', ['**/tests/lib/utils/paths-app-listing.test.js']],
19
- ['app-path-resolve', ['**/tests/lib/app-path-resolve.test.js']],
20
- ['paths-system-builder-resolution', ['**/tests/lib/utils/paths-system-builder-resolution.test.js']],
21
- ['manifest-location', ['**/tests/lib/utils/manifest-location.test.js']],
22
- ['installation-log', ['**/tests/lib/utils/installation-log.test.js']],
23
- ['secrets-ancestor-paths', ['**/tests/lib/utils/secrets-ancestor-paths.test.js']],
24
- ['datasource-validation-watch', ['**/tests/lib/utils/datasource-validation-watch.test.js']],
25
- [
26
- 'log-viewer',
27
- [
28
- '**/tests/lib/datasource/log-viewer.test.js',
29
- '**/tests/lib/datasource/log-viewer-structural.test.js',
30
- '**/tests/lib/datasource/log-viewer-run.test.js'
31
- ]
32
- ],
33
- ['audit-evidence-extract', ['**/tests/lib/datasource/audit-evidence-extract.test.js']],
34
- ['manifest-source-emit', ['**/tests/lib/utils/manifest-source-emit.test.js']],
35
- ['register-aifabrix-shell-env', ['**/tests/lib/utils/register-aifabrix-shell-env.test.js']],
36
- ['datasource-test-run-schema-sync', ['**/tests/lib/utils/datasource-test-run-schema-sync.test.js']],
37
- ['infra-platform-contract', ['**/tests/lib/parameters/infra-platform-contract.test.js']],
38
- [
39
- 'application-frontdoor-paths-contract',
40
- ['**/tests/lib/templates/application-frontdoor-paths.contract.test.js']
41
- ],
42
- [
43
- 'dataplane-env-template-contract',
44
- ['**/tests/lib/templates/dataplane-env-template.contract.test.js']
45
- ],
46
- ['database-secret-values', ['**/tests/lib/parameters/database-secret-values.test.js']],
47
- ['infra-parameter-validate', ['**/tests/lib/parameters/infra-parameter-validate.test.js']],
48
- [
49
- 'infra-parameter-catalog',
50
- [
51
- '**/tests/lib/parameters/infra-parameter-catalog.test.js',
52
- '**/tests/lib/utils/platform-kv-ref.test.js'
53
- ]
54
- ],
55
- ['urls-local-registry', ['**/tests/lib/utils/urls-local-registry.test.js']],
56
- ['compose-local-data-mount', ['**/tests/lib/utils/compose-local-data-mount.test.js']],
57
- ['repair-capability-openapi-warnings', ['**/tests/lib/commands/repair-capability-openapi-warnings.test.js']],
58
- ['enterprise-knowledge-paths', ['**/tests/lib/enterprise-knowledge-paths.test.js']],
59
- [
60
- 'download-helpers-destination',
61
- ['**/tests/lib/external-system/download-helpers-destination.test.js']
62
- ],
63
- [
64
- 'external-manifest-digital-worker-openapi',
65
- ['**/tests/lib/validation/external-manifest-digital-worker-openapi.test.js']
66
- ],
67
- ['role-assistant-knowledge-sync', ['**/tests/lib/role-assistant/knowledge-sync.test.js']],
68
- ['role-assistant-evidence-sync', ['**/tests/lib/role-assistant/evidence-sync.test.js']],
69
- ['role-assistant-test-cases', ['**/tests/lib/role-assistant/test-cases.test.js']],
70
- ['role-assistant-test-suite', ['**/tests/lib/role-assistant/test-suite.test.js']],
71
- [
72
- 'role-assistant-workhub-answers',
73
- ['**/tests/lib/role-assistant/test-runner-workhub-answers.test.js']
74
- ],
75
- ['governance-fixture-subjects', ['**/tests/lib/commands/governance-fixture-subjects.test.js']],
76
- ['enterprise-knowledge-generate-manifest', ['**/tests/lib/commands/enterprise-knowledge-generate-manifest.test.js']],
77
- ['plan-prevalidate-gates', ['**/tests/lib/plan-prevalidate-gates.test.js']],
78
- ['aifabrix-runtime-config-dir', ['**/tests/lib/utils/aifabrix-runtime-config-dir.test.js']],
79
- ['platform-env-template-kv-catalog', ['**/tests/lib/parameters/platform-env-template-kv-catalog.test.js']],
80
- ['resolve-infra-state-paths', ['**/tests/lib/infrastructure/resolve-infra-state-paths.test.js']],
81
- ['dev-ssh-config-helper', ['**/tests/lib/utils/dev-ssh-config-helper.test.js']],
82
- ['ssh-key-helper', ['**/tests/lib/utils/ssh-key-helper.test.js']],
83
- ['secrets-ensure-catalog-fallback', ['**/tests/lib/core/secrets-ensure-catalog-fallback.test.js']],
84
- ['secrets-ensure', ['**/tests/lib/core/secrets-ensure.test.js']],
85
- ['url-declarative-vdir-inactive-env', ['**/tests/lib/utils/url-declarative-vdir-inactive-env.test.js']],
86
- ['url-declarative-resolve-load-doc', ['**/tests/lib/utils/url-declarative-resolve-load-doc.test.js']],
87
- ['compose-celery-worker', ['**/tests/lib/utils/compose-celery-worker.test.js']],
88
- [
89
- 'url-declarative-user-cfg-per-app-proxy',
90
- ['**/tests/lib/utils/url-declarative-user-cfg-per-app-proxy.test.js']
91
- ],
92
- [
93
- 'declarative-url-paths-spy-suites',
94
- [
95
- '**/tests/lib/utils/url-declarative-expand-traefik-off-no-usercfg.test.js',
96
- '**/tests/lib/core/secrets-env-declarative-show-urls.test.js',
97
- '**/tests/lib/utils/url-declarative-registry-internal-docker-origin.test.js'
98
- ]
99
- ],
100
- ['platform-urls-registry-validation', ['**/tests/lib/commands/platform-urls-registry.validation.test.js']],
101
- ['env-copy-resolve-output', ['**/tests/lib/utils/env-copy-resolve-output.test.js']],
102
- ['write-env-output-reload', ['**/tests/lib/utils/write-env-output-reload.test.js']],
103
- ['app-service-env-from-builder', ['**/tests/lib/utils/app-service-env-from-builder.test.js']],
104
- ['infra-kv-discovery', ['**/tests/lib/parameters/infra-kv-discovery.test.js']],
105
- ['infra-env-defaults', ['**/tests/lib/utils/infra-env-defaults.test.js']],
106
- ['compose-traefik-template', ['**/tests/lib/infrastructure/compose-traefik-template.test.js']],
107
- ['traefik-tls-dynamic', ['**/tests/lib/infrastructure/traefik-tls-dynamic.test.js']],
108
- ['generator-external-rbac', ['**/tests/lib/generator/generator-external-rbac.test.js']],
109
- ['helpers-ensure-admin-secrets', ['**/tests/lib/infrastructure/helpers-ensure-admin-secrets.test.js']],
110
- ['secrets-generator', ['**/tests/lib/utils/secrets-generator.test.js']],
111
- ['ensure-dev-certs-for-remote-docker', ['**/tests/lib/utils/ensure-dev-certs-for-remote-docker.test.js']],
112
- ['generator-error-paths', ['**/tests/lib/generator/generator-error-paths.test.js']],
113
- ['generator-validation', ['**/tests/lib/generator/generator-validation.test.js']],
114
- ['secrets-databaselog', ['**/tests/lib/core/secrets-databaselog.test.js']],
115
- ['schema-241-alignment', ['**/tests/lib/validation/schema-241-alignment.test.js']],
116
- ['miso-controller-npm-sdk-guard', ['**/tests/lib/build/miso-controller-npm-sdk-guard.test.js']],
117
- ['hubspot-e2e-com-v2', ['**/tests/lib/validation/hubspot-e2e-com-v2.test.js']],
118
- ['runtime-configuration-download', ['**/tests/lib/utils/runtime-configuration-download.test.js']],
119
- ['schema-resolver-order', ['**/tests/lib/utils/schema-resolver-order.test.js']],
120
- ['app-module', ['**/tests/lib/app/app.test.js']],
121
- ['admin-secrets', ['**/tests/lib/core/admin-secrets.test.js']],
122
- ['validate-datasource-parsed', ['**/tests/lib/datasource/validate-datasource-parsed.test.js']],
123
- [
124
- 'capability-run-real-fs',
125
- [
126
- '**/tests/lib/datasource/run-capability-copy.test.js',
127
- '**/tests/lib/datasource/run-capability-diff.test.js',
128
- '**/tests/lib/datasource/run-capability-edit.test.js',
129
- '**/tests/lib/datasource/run-capability-remove.test.js'
130
- ]
131
- ],
132
- ['log-cleaner', ['**/tests/lib/datasource/log-cleaner.test.js']],
133
- ['datasource-exporter-service', ['**/tests/lib/datasource/datasource-exporter-service.test.js']],
134
- ['protection-paths', ['**/tests/lib/protection/paths.test.js']],
135
- ['protection-resolve', ['**/tests/lib/protection/protection-resolve.test.js']],
136
- ['protection-create-helpers', ['**/tests/lib/protection/run-protection-create-helpers.test.js']],
137
- [
138
- 'governance-pack-loader',
139
- [
140
- '**/tests/lib/governance/governance-pack-loader.test.js',
141
- '**/tests/lib/lifecycle/scenario-upload.test.js'
142
- ]
143
- ],
144
- [
145
- 'governance-generate-external',
146
- ['**/tests/lib/commands/governance-generate-external.test.js']
147
- ],
148
- ['protection-validate-batch', ['**/tests/lib/protection/validate-batch.test.js']],
149
- ['aifabrix-runtime-sandbox', ['**/tests/helpers/aifabrix-runtime-sandbox.test.js']],
150
- ['aifabrix-runtime-backup', ['**/tests/helpers/aifabrix-runtime-backup.test.js']],
151
- ['paths-jest-sandbox-integration', ['**/tests/lib/utils/paths-jest-sandbox-integration.test.js']],
152
- ['secrets-remove-all-guard', ['**/tests/lib/commands/secrets-remove-all-guard.test.js']],
153
- ['app-logs', ['**/tests/lib/commands/app-logs.test.js']],
154
- ['app-down', ['**/tests/lib/app/app-down.test.js']],
155
- [
156
- 'channel-real-fs',
157
- [
158
- '**/tests/lib/channels/channel-integration-generator.test.js',
159
- '**/tests/lib/channels/channel-artifact-generator.test.js',
160
- '**/tests/lib/channels/channel-integration-template.test.js',
161
- '**/tests/lib/channels/add-channel.test.js',
162
- '**/tests/lib/channels/microsoft-copilot-package-quality.test.js',
163
- '**/tests/lib/channels/channel-branding.test.js'
164
- ]
165
- ],
166
- [
167
- 'integration-definition-real-fs',
168
- [
169
- '**/tests/lib/validation/integration-definition-schema.test.js',
170
- '**/tests/lib/integration-definition/apply.test.js',
171
- '**/tests/lib/integration-definition/from-discovery.test.js',
172
- '**/tests/lib/integration-definition/emit-suite-bid.test.js'
173
- ]
174
- ],
175
- [
176
- 'builder-api-real-fs',
177
- [
178
- '**/tests/lib/programmatic/**/*.test.js',
179
- '**/tests/packages/builder-api/e2e.test.js',
180
- '**/tests/lib/commands/manifest-cli-integration-path.test.js',
181
- '**/tests/lib/commands/manifest-cli-commands.test.js',
182
- '**/tests/lib/commands/repair-datasource-operation-security.test.js',
183
- '**/tests/lib/commands/repair-orchestration-datasource-split.test.js',
184
- '**/tests/lib/commands/repair-openapi-export.test.js',
185
- '**/tests/lib/commands/repair-rbac-platform-preset.test.js',
186
- '**/tests/packages/builder-api/e2e-workspace-lock.test.js',
187
- '**/tests/lib/utils/paths-reload-source.test.js',
188
- '**/tests/lib/platform-integrations-manifest.test.js',
189
- '**/tests/lib/generator/deploy-script.test.js',
190
- '**/tests/lib/commands/repair-deploy-script.test.js',
191
- '**/tests/scripts/stage_builder_api_for_docker.test.js',
192
- '**/tests/lib/scripts/sync-builder-api-template.test.js',
193
- '**/tests/lib/evidence/evidence-service.test.js'
194
- ]
195
- ],
196
- [
197
- 'enrich-openapi-operations',
198
- ['**/tests/lib/integration-definition/enrich-openapi-operations.test.js']
199
- ]
200
- ];
201
-
202
- /** Extra globs excluded from the default project (isolated outside ISOLATED_SUITE_ENTRIES). */
203
- const EXTRA_DEFAULT_IGNORE_GLOBS = ['**/tests/setup-ci-live-fabrix-guard.test.js'];
204
-
205
- /**
206
- * Build Jest `testPathIgnorePatterns` for one isolated testMatch glob.
207
- * @param {string} glob - Glob such as star-star/tests/.../file.test.js
208
- * @returns {string[]} Ignore pattern variants for default project
209
- */
210
- function ignorePatternsForTestGlob(glob) {
211
- const posix = String(glob || '').replace(/^\*\*\//, '');
212
- if (!posix) {
213
- return [];
214
- }
215
- // Multi-file / directory globs: ignore the directory prefix only (Jest regex-safe).
216
- if (posix.includes('*')) {
217
- const dirPath = posix.split('/**')[0].split('*')[0].replace(/\/$/, '');
218
- if (!dirPath) {
219
- return [];
220
- }
221
- const winDir = dirPath.replace(/\//g, '\\\\');
222
- return ['/' + dirPath + '/', '\\\\' + winDir + '\\\\'];
223
- }
224
- const win = posix.replace(/\//g, '\\\\');
225
- const withoutTestsPrefix = posix.replace(/^tests\//, '');
226
- const baseName = posix.split('/').pop().replace(/\./g, '\\.');
227
- const patterns = ['/' + posix, '\\\\' + win, baseName];
228
- if (withoutTestsPrefix !== posix) {
229
- patterns.push(withoutTestsPrefix);
230
- }
231
- return patterns;
232
- }
233
-
234
- /**
235
- * Default-project ignore list derived from isolated suite globs (SSOT).
236
- * @param {boolean} [includeLocalTests] - When true, keep tests/local in default project
237
- * @returns {string[]} Jest testPathIgnorePatterns for the default project
238
- */
239
- function buildDefaultTestPathIgnorePatterns(includeLocalTests) {
240
- const includeLocal = includeLocalTests === true
241
- || (includeLocalTests === undefined && process.env.INCLUDE_LOCAL_TESTS === 'true');
242
- const patterns = [
243
- '/node_modules/',
244
- '\\\\node_modules\\\\',
245
- '/tests/integration/',
246
- '\\\\tests\\\\integration\\\\',
247
- '/tests/manual/',
248
- '\\\\tests\\\\manual\\\\',
249
- '/builder/',
250
- '\\\\builder\\\\'
251
- ];
252
- const globs = [
253
- ...ISOLATED_SUITE_ENTRIES.flatMap((entry) => entry[1]),
254
- ...EXTRA_DEFAULT_IGNORE_GLOBS
255
- ];
256
- for (const glob of globs) {
257
- patterns.push(...ignorePatternsForTestGlob(glob));
258
- }
259
- if (!includeLocal) {
260
- patterns.push('/tests/local/', '\\\\tests\\\\local\\\\');
261
- }
262
- return patterns;
263
- }
264
-
265
- /**
266
- * @param {Function} makeIsolatedProject - Factory from jest.projects.js
267
- * @param {boolean} isCI - True when CI or CI_SIMULATION is set
268
- * @param {object} sharedTransform - Babel-jest transform shared with default project
269
- * @returns {object[]} Jest multi-project entries
270
- */
271
- function buildIsolatedProjects(makeIsolatedProject, isCI, sharedTransform) {
272
- const projects = ISOLATED_SUITE_ENTRIES.map(([name, testMatch]) =>
273
- makeIsolatedProject(name, testMatch)
274
- );
275
- projects.push(createSetupCiLiveFabrixGuardProject({ isCI, sharedTransform }));
276
- return projects;
277
- }
278
-
279
- module.exports = {
280
- buildIsolatedProjects,
281
- buildDefaultTestPathIgnorePatterns,
282
- ISOLATED_SUITE_ENTRIES
283
- };
package/jest.projects.js DELETED
@@ -1,79 +0,0 @@
1
- /**
2
- * Shared Jest project definitions (default + isolated). Split configs run in separate processes
3
- * so `jest.mock('fs')` in the default suite cannot leak into isolated workers.
4
- * @fileoverview
5
- */
6
-
7
- const { globalLiveFabrixHooks } = require('./jest.global-live-fabrix-hooks');
8
- const {
9
- buildIsolatedProjects,
10
- buildDefaultTestPathIgnorePatterns
11
- } = require('./jest.isolated-projects');
12
-
13
- // Detect CI environment (GitHub Actions, CI simulation, etc.)
14
- const isCI = process.env.CI === 'true' || process.env.CI_SIMULATION === 'true';
15
-
16
- const sharedTransform = {
17
- '^.+\\.js$': ['babel-jest', {
18
- configFile: false,
19
- babelrc: false,
20
- presets: [['@babel/preset-env', { targets: { node: 'current' } }]],
21
- plugins: ['@babel/plugin-syntax-optional-chaining']
22
- }]
23
- };
24
-
25
- /**
26
- * Single-file Jest project (fresh module graph when run in a separate process).
27
- * @param {string} displayName - Jest project display name
28
- * @param {string[]} testMatch - Glob patterns for test files
29
- * @returns {object} Jest project configuration object
30
- */
31
- function makeIsolatedProject(displayName, testMatch) {
32
- return {
33
- displayName,
34
- testEnvironment: 'node',
35
- transform: sharedTransform,
36
- testMatch,
37
- testPathIgnorePatterns: ['/node_modules/', '\\\\node_modules\\\\'],
38
- setupFiles: ['<rootDir>/tests/capture-real-fs.js'],
39
- setupFilesAfterEnv: ['<rootDir>/tests/setup.js'],
40
- testTimeout: isCI ? 15000 : 8000,
41
- maxWorkers: 1
42
- };
43
- }
44
-
45
- const defaultProject = {
46
- displayName: 'default',
47
- testEnvironment: 'node',
48
- transform: sharedTransform,
49
- testMatch: [
50
- '**/tests/**/*.test.js',
51
- '**/tests/**/*.spec.js'
52
- ],
53
- testPathIgnorePatterns: buildDefaultTestPathIgnorePatterns(),
54
- modulePathIgnorePatterns: [
55
- '<rootDir>/docker-builder-api-staging/',
56
- // Generated app dirs under builder/ (except builder-api) — avoid haste/transform
57
- // picking up junk written by generator/cli suites (e.g. builder/testapp).
58
- '<rootDir>/builder/(?!builder-api(?:/|$))'
59
- ],
60
- setupFiles: ['<rootDir>/tests/capture-real-fs.js'],
61
- setupFilesAfterEnv: ['<rootDir>/tests/setup.js'],
62
- testTimeout: isCI ? 15000 : 8000,
63
- detectOpenHandles: true,
64
- maxWorkers: 1
65
- };
66
-
67
- const isolatedProjects = buildIsolatedProjects(makeIsolatedProject, isCI, sharedTransform);
68
-
69
- const allProjects = [defaultProject, ...isolatedProjects];
70
-
71
- module.exports = {
72
- isCI,
73
- sharedTransform,
74
- makeIsolatedProject,
75
- defaultProject,
76
- isolatedProjects,
77
- allProjects,
78
- globalLiveFabrixHooks
79
- };