@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,74 +0,0 @@
1
- {
2
- "key": "hubspot-test",
3
- "displayName": "HubSpot CRM",
4
- "description": "HubSpot CRM integration with OpenAPI support for companies, contacts, and deals",
5
- "type": "openapi",
6
- "enabled": true,
7
- "authentication": {
8
- "method": "oauth2",
9
- "variables": {
10
- "baseUrl": "https://api.hubapi.com",
11
- "tokenUrl": "https://api.hubapi.com/oauth/v1/token",
12
- "authorizationUrl": "https://app.hubspot.com/oauth/authorize",
13
- "scope": "crm.objects.companies.read crm.objects.companies.write crm.objects.contacts.read crm.objects.contacts.write crm.objects.deals.read crm.objects.deals.write"
14
- },
15
- "security": {
16
- "clientId": "kv://hubspot-test/clientId",
17
- "clientSecret": "kv://hubspot-test/clientSecret"
18
- }
19
- },
20
- "configuration": [
21
- {
22
- "name": "HUBSPOT_API_VERSION",
23
- "value": "v3",
24
- "location": "variable",
25
- "required": false,
26
- "portalInput": {
27
- "field": "select",
28
- "label": "HubSpot API Version",
29
- "placeholder": "Select API version",
30
- "options": [
31
- "v1",
32
- "v2",
33
- "v3"
34
- ],
35
- "validation": {
36
- "required": false
37
- }
38
- }
39
- },
40
- {
41
- "name": "MAX_PAGE_SIZE",
42
- "value": "100",
43
- "location": "variable",
44
- "required": false,
45
- "portalInput": {
46
- "field": "text",
47
- "label": "Maximum Page Size",
48
- "placeholder": "100",
49
- "validation": {
50
- "required": false,
51
- "pattern": "^[0-9]+$",
52
- "minLength": 1,
53
- "maxLength": 1000
54
- }
55
- }
56
- }
57
- ],
58
- "openapi": {
59
- "documentKey": "hubspot-v3",
60
- "autoDiscoverEntities": false
61
- },
62
- "tags": [
63
- "crm",
64
- "sales",
65
- "marketing",
66
- "hubspot"
67
- ],
68
- "dataSources": [
69
- "hubspot-test-company",
70
- "hubspot-test-contact",
71
- "hubspot-test-deal",
72
- "hubspot-test-users"
73
- ]
74
- }
@@ -1,166 +0,0 @@
1
- {
2
- "roles": [
3
- {
4
- "name": "HubSpot CRM Admin",
5
- "value": "hubspot-test-admin",
6
- "description": "Full access to all HubSpot CRM operations",
7
- "groups": []
8
- },
9
- {
10
- "name": "HubSpot CRM Reader",
11
- "value": "hubspot-test-reader",
12
- "description": "Read-only access to all HubSpot CRM data",
13
- "groups": []
14
- }
15
- ],
16
- "permissions": [
17
- {
18
- "name": "customer:list",
19
- "roles": [
20
- "hubspot-test-reader",
21
- "hubspot-test-admin"
22
- ],
23
- "description": "Permission: customer:list"
24
- },
25
- {
26
- "name": "customer:get",
27
- "roles": [
28
- "hubspot-test-reader",
29
- "hubspot-test-admin"
30
- ],
31
- "description": "Permission: customer:get"
32
- },
33
- {
34
- "name": "customer:create",
35
- "roles": [
36
- "hubspot-test-admin"
37
- ],
38
- "description": "Permission: customer:create"
39
- },
40
- {
41
- "name": "customer:update",
42
- "roles": [
43
- "hubspot-test-admin"
44
- ],
45
- "description": "Permission: customer:update"
46
- },
47
- {
48
- "name": "customer:delete",
49
- "roles": [
50
- "hubspot-test-admin"
51
- ],
52
- "description": "Permission: customer:delete"
53
- },
54
- {
55
- "name": "contact:list",
56
- "roles": [
57
- "hubspot-test-reader",
58
- "hubspot-test-admin"
59
- ],
60
- "description": "Permission: contact:list"
61
- },
62
- {
63
- "name": "contact:get",
64
- "roles": [
65
- "hubspot-test-reader",
66
- "hubspot-test-admin"
67
- ],
68
- "description": "Permission: contact:get"
69
- },
70
- {
71
- "name": "contact:create",
72
- "roles": [
73
- "hubspot-test-admin"
74
- ],
75
- "description": "Permission: contact:create"
76
- },
77
- {
78
- "name": "contact:update",
79
- "roles": [
80
- "hubspot-test-admin"
81
- ],
82
- "description": "Permission: contact:update"
83
- },
84
- {
85
- "name": "contact:delete",
86
- "roles": [
87
- "hubspot-test-admin"
88
- ],
89
- "description": "Permission: contact:delete"
90
- },
91
- {
92
- "name": "deal:list",
93
- "roles": [
94
- "hubspot-test-reader",
95
- "hubspot-test-admin"
96
- ],
97
- "description": "Permission: deal:list"
98
- },
99
- {
100
- "name": "deal:get",
101
- "roles": [
102
- "hubspot-test-reader",
103
- "hubspot-test-admin"
104
- ],
105
- "description": "Permission: deal:get"
106
- },
107
- {
108
- "name": "deal:create",
109
- "roles": [
110
- "hubspot-test-admin"
111
- ],
112
- "description": "Permission: deal:create"
113
- },
114
- {
115
- "name": "deal:update",
116
- "roles": [
117
- "hubspot-test-admin"
118
- ],
119
- "description": "Permission: deal:update"
120
- },
121
- {
122
- "name": "deal:delete",
123
- "roles": [
124
- "hubspot-test-admin"
125
- ],
126
- "description": "Permission: deal:delete"
127
- },
128
- {
129
- "name": "person:list",
130
- "roles": [
131
- "hubspot-test-reader",
132
- "hubspot-test-admin"
133
- ],
134
- "description": "Permission: person:list"
135
- },
136
- {
137
- "name": "person:get",
138
- "roles": [
139
- "hubspot-test-reader",
140
- "hubspot-test-admin"
141
- ],
142
- "description": "Permission: person:get"
143
- },
144
- {
145
- "name": "person:create",
146
- "roles": [
147
- "hubspot-test-admin"
148
- ],
149
- "description": "Permission: person:create"
150
- },
151
- {
152
- "name": "person:update",
153
- "roles": [
154
- "hubspot-test-admin"
155
- ],
156
- "description": "Permission: person:update"
157
- },
158
- {
159
- "name": "person:delete",
160
- "roles": [
161
- "hubspot-test-admin"
162
- ],
163
- "description": "Permission: person:delete"
164
- }
165
- ]
166
- }
@@ -1,20 +0,0 @@
1
- appName: wizard-e2e-credential-real
2
- mode: create-system
3
- source:
4
- type: openapi-file
5
- filePath: /workspace/aifabrix-builder/integration/hubspot-test/companies.json
6
- credential:
7
- action: create
8
- config:
9
- key: wizard-e2e-cred-real
10
- displayName: HubSpot Test Credential (Real)
11
- type: OAUTH2
12
- config:
13
- tokenUrl: ${HUBSPOT_TOKEN_URL}
14
- clientId: ${HUBSPOT_CLIENT_ID}
15
- clientSecret: ${HUBSPOT_CLIENT_SECRET}
16
- scopes:
17
- - crm.objects.companies.read
18
- - crm.objects.companies.write
19
- - crm.objects.contacts.read
20
- - crm.objects.contacts.write
@@ -1,9 +0,0 @@
1
- appName: wizard-e2e-env-vars
2
- mode: create-system
3
- source:
4
- type: openapi-file
5
- filePath: /workspace/aifabrix-builder/integration/hubspot-test/companies.json
6
- deployment:
7
- controller: ${CONTROLLER_URL}
8
- dataplane: ${DATAPLANE_URL}
9
- environment: dev
@@ -1,5 +0,0 @@
1
- appName: wizard-e2e-negative-add-datasource
2
- mode: add-datasource
3
- source:
4
- type: known-platform
5
- platform: hubspot
@@ -1,5 +0,0 @@
1
- appName: HubSpot-Test
2
- mode: create-system
3
- source:
4
- type: known-platform
5
- platform: hubspot
@@ -1,7 +0,0 @@
1
- appName: wizard-e2e-negative-credential-create
2
- mode: create-system
3
- source:
4
- type: known-platform
5
- platform: hubspot
6
- credential:
7
- action: create
@@ -1,7 +0,0 @@
1
- appName: wizard-e2e-negative-credential-select
2
- mode: create-system
3
- source:
4
- type: known-platform
5
- platform: hubspot
6
- credential:
7
- action: select
@@ -1,4 +0,0 @@
1
- appName: wizard-e2e-negative-platform
2
- mode: create-system
3
- source:
4
- type: known-platform
@@ -1,4 +0,0 @@
1
- mode: create-system
2
- source:
3
- type: known-platform
4
- platform: hubspot
@@ -1,2 +0,0 @@
1
- appName: wizard-e2e-negative-missing-source
2
- mode: create-system
@@ -1,5 +0,0 @@
1
- appName: wizard-e2e-negative-mode
2
- mode: invalid-mode
3
- source:
4
- type: known-platform
5
- platform: hubspot
@@ -1,5 +0,0 @@
1
- appName: wizard-e2e-negative-openapi
2
- mode: create-system
3
- source:
4
- type: openapi-file
5
- filePath: /tmp/does-not-exist.json
@@ -1,4 +0,0 @@
1
- appName: wizard-e2e-negative-openapi-url
2
- mode: create-system
3
- source:
4
- type: openapi-url
@@ -1,4 +0,0 @@
1
- appName: wizard-e2e-negative-source
2
- mode: create-system
3
- source:
4
- type: invalid-type
@@ -1,5 +0,0 @@
1
- appName: wizard-e2e-negative-dimension-array
2
- mode: create-system
3
- source:
4
- type: known-platform
5
- platform: hubspot
@@ -1,5 +0,0 @@
1
- appName: wizard-e2e-negative-dimension-invalid-key
2
- mode: create-system
3
- source:
4
- type: known-platform
5
- platform: hubspot
@@ -1,5 +0,0 @@
1
- appName: wizard-e2e-negative-dimension-invalid-path
2
- mode: create-system
3
- source:
4
- type: known-platform
5
- platform: hubspot
@@ -1,5 +0,0 @@
1
- appName: wizard-e2e-negative-dimension-missing
2
- mode: create-system
3
- source:
4
- type: known-platform
5
- platform: hubspot
@@ -1,5 +0,0 @@
1
- appName: wizard-e2e-negative-rbac-missing-role
2
- mode: create-system
3
- source:
4
- type: known-platform
5
- platform: hubspot
@@ -1,5 +0,0 @@
1
- appName: wizard-e2e-negative-rbac-invalid-yaml
2
- mode: create-system
3
- source:
4
- type: known-platform
5
- platform: hubspot
@@ -1,249 +0,0 @@
1
- /**
2
- * Test Helper Utilities for Dataplane Down Tests
3
- *
4
- * Common utilities for dataplane down test suite.
5
- *
6
- * @fileoverview Helper utilities for dataplane down tests
7
- * @author AI Fabrix Team
8
- * @version 2.0.0
9
- */
10
- 'use strict';
11
-
12
- const { execFile } = require('child_process');
13
- const { promisify } = require('util');
14
- const chalk = require('chalk');
15
-
16
- const execFileAsync = promisify(execFile);
17
-
18
- const MAX_OUTPUT_BYTES = 10 * 1024 * 1024;
19
- const COMMAND_TIMEOUT_MS = 15 * 1000; // 15 seconds - shorter timeout to catch hanging commands
20
-
21
- /**
22
- * Logs info message
23
- * @function logInfo
24
- * @param {string} message - Message to log
25
- * @returns {void}
26
- */
27
- function logInfo(message) {
28
- // eslint-disable-next-line no-console
29
- console.log(chalk.cyan(message));
30
- }
31
-
32
- /**
33
- * Logs success message
34
- * @function logSuccess
35
- * @param {string} message - Message to log
36
- * @returns {void}
37
- */
38
- function logSuccess(message) {
39
- // eslint-disable-next-line no-console
40
- console.log(chalk.green(message));
41
- }
42
-
43
- /**
44
- * Logs error message
45
- * @function logError
46
- * @param {string} message - Message to log
47
- * @returns {void}
48
- */
49
- function logError(message) {
50
- // eslint-disable-next-line no-console
51
- console.error(chalk.red(message));
52
- }
53
-
54
- /**
55
- * Logs warning message
56
- * @function logWarn
57
- * @param {string} message - Message to log
58
- * @returns {void}
59
- */
60
- function logWarn(message) {
61
- // eslint-disable-next-line no-console
62
- console.warn(chalk.yellow(message));
63
- }
64
-
65
- /**
66
- * Runs a command
67
- * @async
68
- * @function runCommand
69
- * @param {string} command - Command to run
70
- * @param {string[]} args - Command arguments
71
- * @returns {Promise<Object>} Command result object with success, stdout, stderr
72
- */
73
- async function runCommand(command, args) {
74
- try {
75
- const result = await execFileAsync(command, args, {
76
- cwd: process.cwd(),
77
- env: { ...process.env },
78
- maxBuffer: MAX_OUTPUT_BYTES,
79
- timeout: COMMAND_TIMEOUT_MS
80
- });
81
- return { success: true, stdout: result.stdout || '', stderr: result.stderr || '', error: null };
82
- } catch (error) {
83
- const stdout = error.stdout || '';
84
- const stderr = error.stderr || '';
85
- // Check if it's a timeout error
86
- const isTimeout = error.code === 'ETIMEDOUT' ||
87
- (error.message && error.message.includes('timeout'));
88
- return { success: false, stdout, stderr, error, isTimeout };
89
- }
90
- }
91
-
92
- /**
93
- * Validates error message contains expected patterns
94
- * @function validateError
95
- * @param {string} output - Combined stdout and stderr
96
- * @param {string[]} expectedPatterns - Array of expected error patterns
97
- * @returns {boolean} True if error matches expected patterns
98
- */
99
- function validateError(output, expectedPatterns) {
100
- const lowerOutput = output.toLowerCase();
101
- return expectedPatterns.some(pattern => lowerOutput.includes(pattern.toLowerCase()));
102
- }
103
-
104
- /**
105
- * Checks if result indicates a timeout
106
- * @function isTimeoutResult
107
- * @param {Object} result - Command result
108
- * @returns {boolean} True if timeout detected
109
- */
110
- function isTimeoutResult(result) {
111
- return result.isTimeout || (result.error && (
112
- result.error.code === 'ETIMEDOUT' ||
113
- (result.error.message && result.error.message.includes('timeout'))
114
- ));
115
- }
116
-
117
- /**
118
- * Checks if output contains error indicators
119
- * @function hasErrorIndicators
120
- * @param {string} output - Combined output
121
- * @param {string[]} expectedPatterns - Expected error patterns
122
- * @param {Object} result - Command result
123
- * @returns {boolean} True if error indicators found
124
- */
125
- function hasErrorIndicators(output, expectedPatterns, result) {
126
- return validateError(output, expectedPatterns) ||
127
- output.includes('Failed') ||
128
- output.includes('Error') ||
129
- output.includes('not found') ||
130
- output.includes('External system') ||
131
- output.includes('external system') ||
132
- output.includes('timeout') ||
133
- output.includes('ECONNREFUSED') ||
134
- output.includes('ENOTFOUND') ||
135
- output.includes('Command failed') ||
136
- (result.error && result.error.message) ||
137
- result.stderr.length > 0;
138
- }
139
-
140
- /**
141
- * Validates download/delete command result
142
- * @function validateDownloadDeleteResult
143
- * @param {Object} result - Command result
144
- * @param {string} output - Combined output
145
- * @param {string[]} expectedPatterns - Expected error patterns
146
- * @returns {Object} Validation result
147
- */
148
- function validateDownloadDeleteResult(result, output, expectedPatterns) {
149
- const timeout = isTimeoutResult(result);
150
- const isValid = (!result.success || timeout) && (
151
- timeout ||
152
- validateError(output, expectedPatterns) ||
153
- output.includes('Failed') ||
154
- output.includes('Error')
155
- );
156
-
157
- return {
158
- isValid,
159
- timeout,
160
- output: timeout ? `${output}\n[Command timed out - this indicates the command may be hanging]` : output,
161
- expectedPatterns: timeout ? [...expectedPatterns, 'timeout'] : expectedPatterns
162
- };
163
- }
164
-
165
- /**
166
- * Validates delete command result
167
- * @function validateDeleteResult
168
- * @param {Object} result - Command result
169
- * @param {string} output - Combined output
170
- * @param {string[]} expectedPatterns - Expected error patterns
171
- * @returns {Object} Validation result
172
- */
173
- function validateDeleteResult(result, output, expectedPatterns) {
174
- const timeout = isTimeoutResult(result);
175
-
176
- if (result.success && !timeout) {
177
- return {
178
- isValid: false,
179
- output: `Command succeeded when it should have failed. Output: ${output.substring(0, 200)}`,
180
- expectedPatterns,
181
- error: 'Command should have failed but succeeded'
182
- };
183
- }
184
-
185
- const hasErrorIndicator = timeout || hasErrorIndicators(output, expectedPatterns, result);
186
- const isValid = (!result.success || timeout) && (
187
- timeout ||
188
- hasErrorIndicator ||
189
- result.error !== null
190
- );
191
-
192
- const fullOutput = timeout
193
- ? `${output}\n[Command timed out after ${COMMAND_TIMEOUT_MS}ms - this indicates the command may be hanging when dataplane is down]`
194
- : output;
195
-
196
- return {
197
- isValid,
198
- output: fullOutput,
199
- expectedPatterns: timeout ? [...expectedPatterns, 'timeout'] : expectedPatterns,
200
- error: result.error ? (result.error.message || String(result.error)) : undefined
201
- };
202
- }
203
-
204
- /**
205
- * Validates wizard command result
206
- * @function validateWizardResult
207
- * @param {Object} result - Command result
208
- * @param {string} output - Combined output
209
- * @returns {Object} Validation result
210
- */
211
- function validateWizardResult(result, output) {
212
- const expectedPatterns = [
213
- 'failed to connect',
214
- 'connection refused',
215
- 'network error',
216
- 'econnrefused',
217
- 'fetch failed',
218
- 'timeout',
219
- 'unreachable',
220
- 'failed to create wizard session',
221
- 'authentication failed',
222
- 'no authentication method',
223
- 'client token unavailable'
224
- ];
225
-
226
- const isValid = !result.success && validateError(output, expectedPatterns);
227
-
228
- return {
229
- name: 'wizard',
230
- success: isValid,
231
- output,
232
- expectedPatterns
233
- };
234
- }
235
-
236
- module.exports = {
237
- logInfo,
238
- logSuccess,
239
- logError,
240
- logWarn,
241
- runCommand,
242
- validateError,
243
- isTimeoutResult,
244
- hasErrorIndicators,
245
- validateDownloadDeleteResult,
246
- validateDeleteResult,
247
- validateWizardResult,
248
- COMMAND_TIMEOUT_MS
249
- };