@aifabrix/builder 2.42.0 → 2.43.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 (133) hide show
  1. package/README.md +1 -1
  2. package/bin/aifabrix.js +1 -1
  3. package/integration/hubspot-test/README.md +126 -0
  4. package/integration/{hubspot → hubspot-test}/application.json +6 -6
  5. package/integration/{hubspot → hubspot-test}/create-hubspot.js +5 -5
  6. package/integration/hubspot-test/env.template +4 -0
  7. package/integration/{hubspot/hubspot-datasource-company.json → hubspot-test/hubspot-test-datasource-company.json} +3 -2
  8. package/integration/{hubspot/hubspot-datasource-contact.json → hubspot-test/hubspot-test-datasource-contact.json} +3 -2
  9. package/integration/{hubspot/hubspot-datasource-deal.json → hubspot-test/hubspot-test-datasource-deal.json} +3 -2
  10. package/integration/{hubspot/hubspot-datasource-users.json → hubspot-test/hubspot-test-datasource-users.json} +3 -2
  11. package/integration/{hubspot/hubspot-deploy.json → hubspot-test/hubspot-test-deploy.json} +198 -21
  12. package/integration/{hubspot/hubspot-system.json → hubspot-test/hubspot-test-system.json} +8 -7
  13. package/integration/hubspot-test/rbac.json +166 -0
  14. package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-hubspot-credential-real.yaml +3 -3
  15. package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-hubspot-env-vars.yaml +2 -2
  16. package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-add-datasource.yaml +1 -1
  17. package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-credential-create.yaml +1 -1
  18. package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-credential-select.yaml +1 -1
  19. package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-known-platform.yaml +1 -1
  20. package/integration/hubspot-test/test-artifacts/wizard-invalid-missing-source.yaml +2 -0
  21. package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-mode.yaml +1 -1
  22. package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-openapi-file.yaml +1 -1
  23. package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-openapi-url.yaml +1 -1
  24. package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-source.yaml +1 -1
  25. package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-valid-for-dimension-array-test.yaml +1 -1
  26. package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-key-test.yaml +5 -0
  27. package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-path-test.yaml +5 -0
  28. package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-valid-for-dimension-test.yaml +1 -1
  29. package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-valid-for-rbac-test.yaml +1 -1
  30. package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-valid-for-rbac-yaml-test.yaml +1 -1
  31. package/integration/{hubspot → hubspot-test}/test.js +102 -59
  32. package/integration/{hubspot → hubspot-test}/wizard-hubspot-e2e.yaml +2 -2
  33. package/integration/{hubspot → hubspot-test}/wizard-hubspot-platform.yaml +1 -1
  34. package/lib/api/external-test.api.js +1 -1
  35. package/lib/api/service-users.api.js +111 -2
  36. package/lib/api/types/service-users.types.js +41 -0
  37. package/lib/api/wizard.api.js +2 -1
  38. package/lib/app/index.js +2 -2
  39. package/lib/app/prompts.js +2 -2
  40. package/lib/app/readme.js +3 -1
  41. package/lib/app/register.js +3 -1
  42. package/lib/app/rotate-secret.js +3 -0
  43. package/lib/cli/setup-app.js +5 -5
  44. package/lib/cli/setup-auth.js +19 -11
  45. package/lib/cli/setup-dev.js +62 -32
  46. package/lib/cli/setup-environment.js +6 -21
  47. package/lib/cli/setup-infra.js +13 -0
  48. package/lib/cli/setup-secrets.js +45 -6
  49. package/lib/cli/setup-service-user.js +146 -20
  50. package/lib/cli/setup-utility.js +12 -0
  51. package/lib/commands/auth-config.js +25 -19
  52. package/lib/commands/datasource.js +46 -1
  53. package/lib/commands/dev-init.js +1 -1
  54. package/lib/commands/repair-env-template.js +14 -8
  55. package/lib/commands/repair-rbac.js +25 -19
  56. package/lib/commands/repair.js +108 -31
  57. package/lib/commands/secrets-remove.js +1 -1
  58. package/lib/commands/secrets-set.js +6 -0
  59. package/lib/commands/secrets-validate.js +17 -4
  60. package/lib/commands/service-user.js +231 -2
  61. package/lib/commands/up-common.js +25 -0
  62. package/lib/commands/up-dataplane.js +91 -7
  63. package/lib/commands/wizard-core-helpers.js +5 -2
  64. package/lib/commands/wizard-core.js +2 -1
  65. package/lib/commands/wizard-headless.js +6 -1
  66. package/lib/commands/wizard.js +13 -6
  67. package/lib/core/admin-secrets.js +2 -0
  68. package/lib/core/config.js +7 -5
  69. package/lib/core/ensure-encryption-key.js +1 -3
  70. package/lib/core/secrets.js +32 -9
  71. package/lib/core/templates.js +1 -1
  72. package/lib/datasource/abac-validator.js +157 -0
  73. package/lib/datasource/field-reference-validator.js +74 -36
  74. package/lib/datasource/log-viewer.js +221 -0
  75. package/lib/datasource/resolve-app.js +109 -0
  76. package/lib/datasource/test-e2e.js +11 -20
  77. package/lib/datasource/test-integration.js +42 -22
  78. package/lib/datasource/validate.js +5 -2
  79. package/lib/external-system/download-helpers.js +3 -1
  80. package/lib/external-system/generator.js +12 -8
  81. package/lib/external-system/test-system-level.js +1 -1
  82. package/lib/generator/external-controller-manifest.js +3 -3
  83. package/lib/generator/external-schema-utils.js +3 -1
  84. package/lib/generator/external.js +7 -7
  85. package/lib/generator/helpers.js +13 -9
  86. package/lib/generator/index.js +4 -4
  87. package/lib/generator/split.js +45 -10
  88. package/lib/generator/wizard-prompts-secondary.js +39 -7
  89. package/lib/generator/wizard-readme.js +4 -1
  90. package/lib/generator/wizard.js +68 -53
  91. package/lib/infrastructure/helpers.js +50 -35
  92. package/lib/infrastructure/index.js +39 -23
  93. package/lib/schema/env-config.yaml +19 -2
  94. package/lib/schema/external-datasource.schema.json +11 -1
  95. package/lib/schema/wizard-config.schema.json +7 -1
  96. package/lib/utils/app-config-resolver.js +23 -1
  97. package/lib/utils/config-paths.js +48 -4
  98. package/lib/utils/credential-secrets-env.js +16 -1
  99. package/lib/utils/env-map.js +7 -3
  100. package/lib/utils/error-formatter.js +37 -0
  101. package/lib/utils/external-env-template.js +180 -0
  102. package/lib/utils/external-readme.js +33 -1
  103. package/lib/utils/external-system-display.js +43 -0
  104. package/lib/utils/external-system-validators.js +2 -2
  105. package/lib/utils/help-builder.js +3 -5
  106. package/lib/utils/local-secrets.js +26 -3
  107. package/lib/utils/paths.js +2 -1
  108. package/lib/utils/secrets-generator.js +2 -2
  109. package/lib/utils/secrets-utils.js +4 -0
  110. package/lib/utils/secure-file-permissions.js +91 -0
  111. package/lib/utils/token-manager.js +36 -3
  112. package/lib/utils/yaml-preserve.js +59 -1
  113. package/lib/validation/env-template-auth.js +50 -2
  114. package/lib/validation/external-manifest-validator.js +8 -0
  115. package/lib/validation/validate.js +8 -0
  116. package/lib/validation/validator.js +10 -13
  117. package/package.json +6 -2
  118. package/templates/applications/dataplane/env.template +5 -1
  119. package/templates/applications/miso-controller/application.yaml +1 -1
  120. package/templates/applications/miso-controller/env.template +13 -2
  121. package/templates/external-system/README.md.hbs +18 -5
  122. package/templates/external-system/env.template.hbs +22 -0
  123. package/integration/hubspot/README.md +0 -100
  124. package/integration/hubspot/env.template +0 -4
  125. package/integration/hubspot/test-artifacts/wizard-invalid-missing-source.yaml +0 -2
  126. package/integration/hubspot/test-artifacts/wizard-valid-for-dimension-key-test.yaml +0 -5
  127. package/integration/hubspot/test-artifacts/wizard-valid-for-dimension-path-test.yaml +0 -5
  128. /package/integration/{hubspot → hubspot-test}/companies.json +0 -0
  129. /package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-app-name.yaml +0 -0
  130. /package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-missing-app.yaml +0 -0
  131. /package/integration/{hubspot → hubspot-test}/test-dataplane-down-helpers.js +0 -0
  132. /package/integration/{hubspot → hubspot-test}/test-dataplane-down-tests.js +0 -0
  133. /package/integration/{hubspot → hubspot-test}/test-dataplane-down.js +0 -0
@@ -11,7 +11,6 @@
11
11
 
12
12
  const fs = require('fs');
13
13
  const path = require('path');
14
- const yaml = require('js-yaml');
15
14
  const Ajv = require('ajv');
16
15
  const applicationSchema = require('../schema/application-schema.json');
17
16
  const externalSystemSchema = require('../schema/external-system.schema.json');
@@ -19,9 +18,9 @@ const externalDataSourceSchema = require('../schema/external-datasource.schema.j
19
18
  const { transformVariablesForValidation } = require('../utils/variable-transformer');
20
19
  const { checkEnvironment } = require('../utils/environment-checker');
21
20
  const { formatValidationErrors } = require('../utils/error-formatter');
22
- const { detectAppType, resolveApplicationConfigPath } = require('../utils/paths');
21
+ const { detectAppType, resolveApplicationConfigPath, resolveRbacPath } = require('../utils/paths');
23
22
  const { loadConfigFile } = require('../utils/config-format');
24
- const { validateAuthKvCoverage } = require('./env-template-auth');
23
+ const { validateAuthKvCoverage, validateAuthSecurityPathConsistency } = require('./env-template-auth');
25
24
  const { validateKvReferencesInLines } = require('./env-template-kv');
26
25
 
27
26
  /**
@@ -155,7 +154,7 @@ async function validateVariables(appName, options = {}) {
155
154
  function validateRoles(roles) {
156
155
  const errors = [];
157
156
  if (!roles || !Array.isArray(roles)) {
158
- errors.push('rbac.yaml must contain a "roles" array');
157
+ errors.push('rbac file must contain a "roles" array');
159
158
  return errors;
160
159
  }
161
160
 
@@ -179,7 +178,7 @@ function validateRoles(roles) {
179
178
  function validatePermissions(permissions) {
180
179
  const errors = [];
181
180
  if (!permissions || !Array.isArray(permissions)) {
182
- errors.push('rbac.yaml must contain a "permissions" array');
181
+ errors.push('rbac file must contain a "permissions" array');
183
182
  return errors;
184
183
  }
185
184
 
@@ -203,21 +202,18 @@ async function validateRbac(appName, options = {}) {
203
202
 
204
203
  // Support both builder/ and integration/ directories using detectAppType
205
204
  const { appPath } = await detectAppType(appName, options);
206
- const rbacYaml = path.join(appPath, 'rbac.yaml');
207
- const rbacYml = path.join(appPath, 'rbac.yml');
208
- const rbacPath = fs.existsSync(rbacYaml) ? rbacYaml : (fs.existsSync(rbacYml) ? rbacYml : null);
205
+ const rbacPath = resolveRbacPath(appPath);
209
206
 
210
207
  if (!rbacPath) {
211
- return { valid: true, errors: [], warnings: ['rbac.yaml not found - authentication disabled'] };
208
+ return { valid: true, errors: [], warnings: ['rbac file not found - authentication disabled'] };
212
209
  }
213
210
 
214
- const content = fs.readFileSync(rbacPath, 'utf8');
215
211
  let rbac;
216
-
217
212
  try {
218
- rbac = yaml.load(content);
213
+ rbac = loadConfigFile(rbacPath);
219
214
  } catch (error) {
220
- throw new Error(`Invalid YAML syntax in rbac.yaml: ${error.message}`);
215
+ const basename = path.basename(rbacPath);
216
+ throw new Error(`Invalid syntax in ${basename}: ${error.message}`);
221
217
  }
222
218
 
223
219
  const errors = [
@@ -287,6 +283,7 @@ async function validateEnvTemplate(appName, options = {}) {
287
283
 
288
284
  if (isExternal) {
289
285
  await validateAuthKvCoverage(appPath, content, errors, warnings, options);
286
+ await validateAuthSecurityPathConsistency(appPath, errors, warnings);
290
287
  }
291
288
 
292
289
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aifabrix/builder",
3
- "version": "2.42.0",
3
+ "version": "2.43.0",
4
4
  "description": "AI Fabrix Local Fabric & Deployment SDK",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
@@ -10,13 +10,17 @@
10
10
  "scripts": {
11
11
  "test": "node tests/scripts/test-wrapper.js",
12
12
  "test:ci": "bash tests/scripts/ci-simulate.sh",
13
- "test:same-as-github": "cross-env CI=true npm run lint && cross-env CI=true node tests/scripts/test-wrapper.js",
13
+ "test:same-as-github": "npm run build:ci",
14
14
  "test:coverage": "cross-env RUN_COVERAGE=1 node tests/scripts/test-wrapper.js",
15
15
  "test:coverage:nyc": "nyc --reporter=text --reporter=lcov --reporter=html jest --config jest.config.coverage.js --runInBand",
16
16
  "test:watch": "jest --watch",
17
17
  "test:integration": "jest --config jest.config.integration.js --runInBand",
18
18
  "test:integration:python": "cross-env TEST_LANGUAGE=python jest --config jest.config.integration.js --runInBand",
19
19
  "test:integration:typescript": "cross-env TEST_LANGUAGE=typescript jest --config jest.config.integration.js --runInBand",
20
+ "test:hubspot-wizard": "node integration/hubspot-test/test.js",
21
+ "test:hubspot-wizard:negative": "node integration/hubspot-test/test.js --type negative",
22
+ "test:hubspot-wizard:positive": "node integration/hubspot-test/test.js --type positive",
23
+ "test:hubspot-dataplane-down": "node integration/hubspot-test/test-dataplane-down.js",
20
24
  "test:manual": "jest --config jest.config.manual.js --runInBand",
21
25
  "lint": "eslint . --ext .js",
22
26
  "lint:fix": "eslint . --ext .js --fix",
@@ -54,10 +54,14 @@ DATABASE_URL=kv://databases-dataplane-0-urlKeyVault
54
54
  DB_0_PASSWORD=kv://databases-dataplane-0-passwordKeyVault
55
55
 
56
56
  # Vector and document store DB: chunks, embeddings, vector indexes (pgvector).
57
- # Binaries path: config.processing.fileStoragePath or /data/documents.
58
57
  VECTOR_DATABASE_URL=kv://databases-dataplane-1-urlKeyVault
59
58
  DB_1_PASSWORD=kv://databases-dataplane-1-passwordKeyVault
60
59
 
60
+ # Base path for document binary storage (used when datasource config has no processing.fileStoragePath).
61
+ # Dataplane creates subdirs per datasource key (e.g. DOCUMENT_STORAGE_BASE_PATH/test-e2e-sharepoint-documents).
62
+ # Production: use a writable path (e.g. /data/documents) and mount a volume. Local/Docker: use /tmp/documents or /app/data/documents.
63
+ DOCUMENT_STORAGE_BASE_PATH=/mnt/data/documents
64
+
61
65
  # Logs Database Configuration (for execution, audit, ABAC traces)
62
66
  LOGS_DATABASE_URL=kv://databases-dataplane-2-urlKeyVault
63
67
  DB_2_PASSWORD=kv://databases-dataplane-2-passwordKeyVault
@@ -4,7 +4,7 @@ app:
4
4
  displayName: 'Miso Controller'
5
5
  description: 'Miso is the AI Fabrix in-tenant controller and portal layer for securely operating enterprise AI apps inside a customer’s Azure tenant. It provides Entra ID SSO, RBAC, audit logs, environment/app configuration via schemas, and safe secret handling via Key Vault references—ensuring governance, traceability, and predictable UX across portal, SDK, and CLI.'
6
6
  type: webapp
7
- version: '1.8.0'
7
+ version: '1.9.0'
8
8
 
9
9
  # Image Configuration
10
10
  image:
@@ -111,6 +111,10 @@ REDIS_PERMISSIONS_TTL=900
111
111
  KEYCLOAK_REALM=aifabrix
112
112
  KEYCLOAK_SERVER_URL=kv://keycloak-server-url
113
113
  KEYCLOAK_INTERNAL_SERVER_URL=kv://keycloak-internal-server-url
114
+ # Docker/internal host and port: used when config from DB has localhost (getDockerKeycloakInternalUrl).
115
+ # Resolved from env-config (e.g. KEYCLOAK_HOST=keycloak, KEYCLOAK_PORT=8080 for docker).
116
+ KEYCLOAK_HOST=${KEYCLOAK_HOST}
117
+ KEYCLOAK_PORT=${KEYCLOAK_PORT}
114
118
  KEYCLOAK_CLIENT_ID=miso-controller
115
119
  KEYCLOAK_CLIENT_SECRET=kv://keycloak-client-secretKeyVault
116
120
  KEYCLOAK_ADMIN_USERNAME=admin
@@ -306,8 +310,14 @@ MISO_ALLOWED_ORIGINS=http://localhost:*
306
310
  # =============================================================================
307
311
  # LICENSE CONFIGURATION
308
312
  # =============================================================================
309
- # Temporary development bypass: set LICENSE_JWT=DEVELOPMENT to skip Mori validation.
310
- # Will be replaced by JWT license validation (see plan 131-jwt_license_offline_validation).
313
+ # Offline JWT license (optional):
314
+ # - If set, controller validates license offline (RS256) without Mori subscription status call.
315
+ # - Value can be literal JWT or kv:// reference.
316
+ # - If not set, controller falls back to existing Mori subscription validation flow.
317
+ #
318
+ # Development: set to DEVELOPMENT to disable license validation (no Mori/JWT required):
319
+ # LICENSE_JWT=DEVELOPMENT
320
+ # - Use only for local development; do not use in production.
311
321
  LICENSE_JWT=DEVELOPMENT
312
322
 
313
323
  # =============================================================================
@@ -315,6 +325,7 @@ LICENSE_JWT=DEVELOPMENT
315
325
  # =============================================================================
316
326
 
317
327
  MORI_BASE_URL=kv://mori-controller-url
328
+ MORI_AUTH_METHOD=apiKey
318
329
  MORI_API_KEY=kv://mori-controller-api-keyKeyVault
319
330
  MORI_USERNAME=kv://mori-controller-basic-usernameKeyVault
320
331
  MORI_PASSWORD=kv://mori-controller-basic-passwordKeyVault
@@ -46,6 +46,18 @@ Edit files in `integration/{{appName}}/`:
46
46
  - **Field mappings**: `{{systemKey}}-datasource-*-datasource{{fileExt}}` (dimensions, attributes, operations)
47
47
  - **Credential and configuration**: `env.template` (security settings and configuration variables)
48
48
 
49
+ {{#if secretPaths}}{{#if secretPaths.length}}
50
+ ### Secrets
51
+
52
+ Secrets are resolved from `.aifabrix` or key vault. Set them with:
53
+
54
+ ```bash
55
+ {{#each secretPaths}}
56
+ aifabrix secret set {{path}} <your value> # {{description}}
57
+ {{/each}}
58
+ ```
59
+ {{/if}}{{/if}}
60
+
49
61
  ### 3. Validate Configuration
50
62
 
51
63
  ```bash
@@ -61,11 +73,12 @@ aifabrix repair {{appName}}
61
73
  ```
62
74
 
63
75
  Options:
64
- --dry-run Report changes only; do not write
65
- --rbac Ensure RBAC permissions per datasource and add default Admin/Reader roles if none exist
66
- --expose Set exposed.attributes on each datasource to all fieldMappings.attributes keys
67
- --sync Add default sync section to datasources that lack it
68
- --test Generate testPayload.payloadTemplate and testPayload.expectedResult from attributes
76
+ --auth <method> Set authentication method (oauth2, aad, apikey, basic, queryParam, oidc, hmac, none); updates system file and env.template
77
+ --dry-run Report changes only; do not write
78
+ --rbac Ensure RBAC permissions per datasource and add default Admin/Reader roles if none exist
79
+ --expose Set exposed.attributes on each datasource to all fieldMappings.attributes keys
80
+ --sync Add default sync section to datasources that lack it
81
+ --test Generate testPayload.payloadTemplate and testPayload.expectedResult from attributes
69
82
 
70
83
  ### 5. Upload to dataplane
71
84
 
@@ -0,0 +1,22 @@
1
+ # Environment variables for external system integration
2
+ # Use kv:// (or aifabrix secret set) for sensitive values; plain values for non-sensitive configuration.
3
+ #
4
+
5
+ {{#if authMethod}}
6
+ # Authentication
7
+ # Type: {{authMethod}}
8
+ {{#each authSecureVars}}
9
+ {{name}}={{value}}
10
+ {{/each}}
11
+ {{#if authNonSecureVarNames}}
12
+ # Non-secure (e.g. URLs): {{#each authNonSecureVarNames}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}
13
+ {{/if}}
14
+
15
+ {{/if}}
16
+ {{#if configuration.length}}
17
+ # Configuration
18
+ {{#each configuration}}
19
+ # {{comment}}
20
+ {{name}}={{value}}
21
+ {{/each}}
22
+ {{/if}}
@@ -1,100 +0,0 @@
1
- # HubSpot CRM
2
-
3
- HubSpot CRM integration with OpenAPI support for companies, contacts, and deals
4
-
5
- ## System Information
6
-
7
- - **System Key**: `hubspot`
8
- - **System Type**: `openapi`
9
- - **Datasources**: 4
10
-
11
- ## Files
12
-
13
- - `application.yaml` – Application configuration with `app` and `externalIntegration` blocks
14
- - `hubspot-system.yaml` – External system definition (authentication, OpenAPI/MCP, RBAC)
15
- - `hubspot-datasource-deal.yaml` – Datasource: HubSpot Deal
16
- - `hubspot-datasource-contact.yaml` – Datasource: HubSpot Contact
17
- - `hubspot-datasource-users-datasource.yaml` – Datasource: HubSpot Users
18
- - `hubspot-datasource-company.yaml` – Datasource: HubSpot Company
19
- - `env.template` – Environment variables template (secrets, API keys)
20
- - `hubspot-deploy.json` – Deployment manifest (generated by `aifabrix json`)
21
-
22
- Optional: `rbac.yaml` – Roles and permissions merged into the system when present.
23
-
24
- ## Quick Start
25
-
26
- ### 1. Create External System
27
-
28
- ```bash
29
- aifabrix create hubspot --type external
30
- ```
31
-
32
- Or use the interactive wizard:
33
-
34
- ```bash
35
- aifabrix wizard --app hubspot
36
- ```
37
-
38
- ### 2. Configure Authentication and Datasources
39
-
40
- Edit files in `integration/hubspot/`:
41
-
42
- - **Authentication**: `hubspot-system.yaml` (auth type, credentials placeholders)
43
- - **Field mappings**: `hubspot-datasource-*.yaml` (dimensions, attributes, operations)
44
-
45
- ### 3. Validate Configuration
46
-
47
- ```bash
48
- aifabrix validate hubspot --type external
49
- ```
50
-
51
- ### 4. Generate Deployment Manifest
52
-
53
- ```bash
54
- aifabrix json hubspot --type external
55
- ```
56
-
57
- This creates `hubspot-deploy.json` in `integration/hubspot/`.
58
-
59
- ### 5. Deploy
60
-
61
- Controller URL and environment are read from config. Configure and log in first:
62
-
63
- ```bash
64
- aifabrix auth config --set-controller <url> --set-environment dev
65
- aifabrix login
66
- ```
67
-
68
- Then deploy:
69
-
70
- ```bash
71
- aifabrix deploy hubspot
72
- ```
73
-
74
- ## Testing
75
-
76
- ### Unit Tests (Local Validation, No API)
77
-
78
- ```bash
79
- aifabrix test hubspot
80
- ```
81
-
82
- ### Integration Tests (Via Dataplane)
83
-
84
- ```bash
85
- aifabrix test-integration hubspot
86
- ```
87
-
88
- ## Deployment
89
-
90
- Deploy via miso-controller pipeline (same as regular apps). Auth and controller come from `aifabrix login` and `aifabrix auth config`:
91
-
92
- ```bash
93
- aifabrix deploy hubspot
94
- ```
95
-
96
- ## Troubleshooting
97
-
98
- - **Validation errors**: Run `aifabrix validate hubspot --type external` to see schema and manifest errors.
99
- - **Deployment / auth**: Run `aifabrix auth config --set-controller <url> --set-environment <env>` and `aifabrix login` before `aifabrix deploy`.
100
- - **File not found**: Run commands from the project root (where `package.json` and `integration/` live).
@@ -1,4 +0,0 @@
1
- HUBSPOT_API_VERSION=v3
2
- MAX_PAGE_SIZE=100
3
- KV_HUBSPOT_CLIENTID=kv://hubspot/clientid
4
- KV_HUBSPOT_CLIENTSECRET=kv://hubspot/clientsecret
@@ -1,2 +0,0 @@
1
- appName: hubspot-test-negative-missing-source
2
- mode: create-system
@@ -1,5 +0,0 @@
1
- appName: hubspot-test-negative-dimension-invalid-key
2
- mode: create-system
3
- source:
4
- type: known-platform
5
- platform: hubspot
@@ -1,5 +0,0 @@
1
- appName: hubspot-test-negative-dimension-invalid-path
2
- mode: create-system
3
- source:
4
- type: known-platform
5
- platform: hubspot