@aifabrix/builder 2.41.0 → 2.42.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 (138) hide show
  1. package/.cursor/rules/docs-rules.mdc +30 -0
  2. package/README.md +1 -1
  3. package/integration/hubspot/README.md +8 -4
  4. package/integration/hubspot/application.json +54 -0
  5. package/integration/hubspot/create-hubspot.js +9 -136
  6. package/integration/hubspot/env.template +3 -4
  7. package/integration/hubspot/hubspot-datasource-company.json +343 -5
  8. package/integration/hubspot/hubspot-datasource-contact.json +413 -5
  9. package/integration/hubspot/hubspot-datasource-deal.json +341 -4
  10. package/integration/hubspot/hubspot-datasource-users.json +116 -0
  11. package/integration/hubspot/hubspot-deploy.json +1250 -108
  12. package/integration/hubspot/hubspot-system.json +15 -32
  13. package/integration/hubspot/test-dataplane-down-tests.js +17 -16
  14. package/integration/hubspot/test-dataplane-down.js +2 -2
  15. package/jest.config.manual.js +2 -1
  16. package/lib/api/external-test.api.js +111 -0
  17. package/lib/api/index.js +42 -19
  18. package/lib/api/pipeline.api.js +66 -120
  19. package/lib/api/types/pipeline.types.js +37 -0
  20. package/lib/api/wizard-platform.api.js +61 -0
  21. package/lib/api/wizard.api.js +34 -1
  22. package/lib/app/config.js +23 -11
  23. package/lib/app/index.js +3 -1
  24. package/lib/app/prompts.js +44 -29
  25. package/lib/app/readme.js +8 -3
  26. package/lib/app/run-env-compose.js +64 -1
  27. package/lib/app/run-helpers.js +1 -1
  28. package/lib/app/show-display.js +1 -1
  29. package/lib/cli/setup-app.js +42 -11
  30. package/lib/cli/setup-credential-deployment.js +31 -6
  31. package/lib/cli/setup-dev.js +27 -0
  32. package/lib/cli/setup-environment.js +12 -4
  33. package/lib/cli/setup-external-system.js +19 -4
  34. package/lib/cli/setup-infra.js +54 -14
  35. package/lib/cli/setup-utility.js +117 -21
  36. package/lib/commands/credential-env.js +162 -0
  37. package/lib/commands/credential-list.js +17 -22
  38. package/lib/commands/credential-push.js +96 -0
  39. package/lib/commands/datasource.js +77 -6
  40. package/lib/commands/dev-init.js +39 -1
  41. package/lib/commands/repair-auth-config.js +99 -0
  42. package/lib/commands/repair-datasource-keys.js +208 -0
  43. package/lib/commands/repair-datasource.js +235 -0
  44. package/lib/commands/repair-env-template.js +348 -0
  45. package/lib/commands/repair-internal.js +85 -0
  46. package/lib/commands/repair-rbac.js +158 -0
  47. package/lib/commands/repair.js +507 -0
  48. package/lib/commands/test-e2e-external.js +165 -0
  49. package/lib/commands/upload.js +71 -40
  50. package/lib/commands/wizard-core-helpers.js +226 -4
  51. package/lib/commands/wizard-core.js +67 -29
  52. package/lib/commands/wizard-dataplane.js +1 -1
  53. package/lib/commands/wizard-entity-selection.js +43 -0
  54. package/lib/commands/wizard-headless.js +44 -5
  55. package/lib/commands/wizard-helpers.js +7 -3
  56. package/lib/commands/wizard.js +86 -64
  57. package/lib/core/config.js +7 -1
  58. package/lib/core/secrets.js +33 -12
  59. package/lib/datasource/deploy.js +12 -3
  60. package/lib/datasource/test-e2e.js +219 -0
  61. package/lib/datasource/test-integration.js +154 -0
  62. package/lib/deployment/deployer.js +7 -5
  63. package/lib/external-system/download.js +182 -204
  64. package/lib/external-system/generator.js +204 -56
  65. package/lib/external-system/test-execution.js +2 -1
  66. package/lib/external-system/test-system-level.js +73 -0
  67. package/lib/external-system/test.js +51 -18
  68. package/lib/generator/external-controller-manifest.js +29 -2
  69. package/lib/generator/external-schema-utils.js +1 -1
  70. package/lib/generator/external.js +10 -3
  71. package/lib/generator/index.js +4 -1
  72. package/lib/generator/split-readme.js +1 -0
  73. package/lib/generator/split-variables.js +7 -1
  74. package/lib/generator/split.js +194 -54
  75. package/lib/generator/wizard-prompts-secondary.js +294 -0
  76. package/lib/generator/wizard-prompts.js +105 -106
  77. package/lib/generator/wizard-readme.js +88 -0
  78. package/lib/generator/wizard.js +147 -158
  79. package/lib/infrastructure/compose.js +11 -1
  80. package/lib/infrastructure/index.js +11 -3
  81. package/lib/infrastructure/services.js +22 -11
  82. package/lib/schema/application-schema.json +8 -5
  83. package/lib/schema/external-datasource.schema.json +49 -26
  84. package/lib/schema/external-system.schema.json +82 -6
  85. package/lib/schema/wizard-config.schema.json +16 -0
  86. package/lib/utils/api.js +38 -10
  87. package/lib/utils/auth-headers.js +8 -7
  88. package/lib/utils/compose-generator.js +1 -1
  89. package/lib/utils/compose-handlebars-helpers.js +11 -0
  90. package/lib/utils/config-format-preference.js +51 -0
  91. package/lib/utils/config-format.js +36 -0
  92. package/lib/utils/configuration-env-resolver.js +179 -0
  93. package/lib/utils/credential-display.js +83 -0
  94. package/lib/utils/credential-secrets-env.js +115 -25
  95. package/lib/utils/dataplane-pipeline-warning.js +28 -0
  96. package/lib/utils/deployment-validation-helpers.js +4 -4
  97. package/lib/utils/dev-ca-install.js +139 -0
  98. package/lib/utils/env-copy.js +23 -3
  99. package/lib/utils/error-formatters/http-status-errors.js +0 -1
  100. package/lib/utils/error-formatters/permission-errors.js +0 -1
  101. package/lib/utils/error-formatters/validation-errors.js +0 -1
  102. package/lib/utils/external-readme.js +56 -29
  103. package/lib/utils/external-system-display.js +59 -1
  104. package/lib/utils/external-system-test-helpers.js +21 -8
  105. package/lib/utils/external-system-validators.js +3 -0
  106. package/lib/utils/file-upload.js +20 -50
  107. package/lib/utils/help-builder.js +1 -0
  108. package/lib/utils/infra-status.js +50 -44
  109. package/lib/utils/local-secrets.js +5 -5
  110. package/lib/utils/paths.js +85 -4
  111. package/lib/utils/secrets-canonical.js +93 -0
  112. package/lib/utils/secrets-generator.js +20 -0
  113. package/lib/utils/secrets-helpers.js +75 -89
  114. package/lib/utils/test-log-writer.js +56 -0
  115. package/lib/utils/token-manager.js +24 -32
  116. package/lib/validation/env-template-auth.js +157 -0
  117. package/lib/validation/env-template-kv.js +41 -0
  118. package/lib/validation/external-manifest-validator.js +25 -0
  119. package/lib/validation/external-system-auth-rules.js +86 -0
  120. package/lib/validation/validate-batch.js +149 -0
  121. package/lib/validation/validate-datasource-keys-api.js +33 -0
  122. package/lib/validation/validate-display.js +94 -16
  123. package/lib/validation/validate.js +25 -12
  124. package/lib/validation/validator.js +7 -9
  125. package/lib/validation/wizard-datasource-validation.js +50 -0
  126. package/package.json +7 -2
  127. package/templates/applications/dataplane/application.yaml +1 -1
  128. package/templates/applications/dataplane/env.template +5 -5
  129. package/templates/applications/dataplane/rbac.yaml +2 -2
  130. package/templates/applications/miso-controller/env.template +1 -1
  131. package/templates/external-system/README.md.hbs +65 -25
  132. package/templates/external-system/deploy.js.hbs +4 -2
  133. package/templates/external-system/external-datasource.yaml.hbs +217 -0
  134. package/templates/external-system/external-system.json.hbs +1 -18
  135. package/templates/infra/compose.yaml.hbs +6 -0
  136. package/templates/python/docker-compose.hbs +4 -4
  137. package/templates/typescript/docker-compose.hbs +4 -4
  138. package/integration/hubspot/application.yaml +0 -37
@@ -4,23 +4,7 @@
4
4
  "description": "{{systemDescription}}",
5
5
  "type": "{{systemType}}",
6
6
  "enabled": true,
7
- "authentication": {
8
- "type": "{{authType}}"{{#if (eq authType "oauth2")}},
9
- "oauth2": {
10
- "tokenUrl": "https://api.example.com/oauth/token",
11
- "clientId": "kv://{{systemKey}}-oauth2-client-id",
12
- "clientSecret": "kv://{{systemKey}}-oauth2-client-secret",
13
- "scopes": []
14
- }{{/if}}{{#if (eq authType "apikey")}},
15
- "apikey": {
16
- "headerName": "X-API-Key",
17
- "key": "kv://{{systemKey}}-api-key"
18
- }{{/if}}{{#if (eq authType "basic")}},
19
- "basic": {
20
- "username": "kv://{{systemKey}}-username",
21
- "password": "kv://{{systemKey}}-password"
22
- }{{/if}}
23
- }{{#if (eq systemType "openapi")}},
7
+ "authentication": {{{json authentication}}}{{#if (eq systemType "openapi")}},
24
8
  "openapi": {
25
9
  "documentKey": "{{systemKey}}-api",
26
10
  "autoDiscoverEntities": false
@@ -51,4 +35,3 @@
51
35
  {{/each}}
52
36
  ]{{/if}}
53
37
  }
54
-
@@ -45,6 +45,7 @@ services:
45
45
  retries: 5
46
46
  restart: unless-stopped
47
47
 
48
+ {{#if pgadmin.enabled}}
48
49
  # Optional: pgAdmin for database management
49
50
  pgadmin:
50
51
  image: dpage/pgadmin4:latest
@@ -78,7 +79,9 @@ services:
78
79
  condition: service_healthy
79
80
  networks:
80
81
  - {{networkName}}
82
+ {{/if}}
81
83
 
84
+ {{#if redisCommander.enabled}}
82
85
  # Optional: Redis Commander for Redis management
83
86
  redis-commander:
84
87
  image: rediscommander/redis-commander:latest
@@ -96,6 +99,7 @@ services:
96
99
  condition: service_healthy
97
100
  networks:
98
101
  - {{networkName}}
102
+ {{/if}}
99
103
 
100
104
  {{#if traefik.enabled}}
101
105
  # Traefik Reverse Proxy
@@ -139,9 +143,11 @@ volumes:
139
143
  {{#if (eq devId 0)}}redis_data{{else}}dev{{devId}}_redis_data{{/if}}:
140
144
  name: {{#if (eq devId 0)}}infra_redis_data{{else}}infra_dev{{devId}}_redis_data{{/if}}
141
145
  driver: local
146
+ {{#if pgadmin.enabled}}
142
147
  {{#if (eq devId 0)}}pgadmin_data{{else}}dev{{devId}}_pgadmin_data{{/if}}:
143
148
  name: {{#if (eq devId 0)}}infra_pgadmin_data{{else}}infra_dev{{devId}}_pgadmin_data{{/if}}
144
149
  driver: local
150
+ {{/if}}
145
151
 
146
152
  networks:
147
153
  {{networkName}}:
@@ -136,10 +136,10 @@ services:
136
136
  psql -d {{name}} -c "GRANT ALL ON SCHEMA public TO \"{{pgUserName name}}\";" &&
137
137
  echo 'Database "{{name}}" created successfully!'
138
138
  fi &&
139
- {{#if (isVectorDatabase name)}}
140
- psql -d {{name}} -c "CREATE EXTENSION IF NOT EXISTS vector;" &&
141
- echo 'pgvector extension enabled on "{{name}}".' &&
142
- {{/if}}
139
+ {{#each (extensionsForDb this)}}
140
+ (psql -d {{../name}} -c 'CREATE EXTENSION IF NOT EXISTS {{pgQuote this}};' || echo 'Warning: could not create extension {{this}}') &&
141
+ echo 'Extension "{{this}}" enabled on "{{../name}}".' &&
142
+ {{/each}}
143
143
  {{/each}}
144
144
  {{else}}
145
145
  echo 'Creating {{app.key}} database and user...' &&
@@ -136,10 +136,10 @@ services:
136
136
  psql -d {{name}} -c "GRANT ALL ON SCHEMA public TO \"{{pgUserName name}}\";" &&
137
137
  echo 'Database "{{name}}" created successfully!'
138
138
  fi &&
139
- {{#if (isVectorDatabase name)}}
140
- psql -d {{name}} -c "CREATE EXTENSION IF NOT EXISTS vector;" &&
141
- echo 'pgvector extension enabled on "{{name}}".' &&
142
- {{/if}}
139
+ {{#each (extensionsForDb this)}}
140
+ (psql -d {{../name}} -c 'CREATE EXTENSION IF NOT EXISTS {{pgQuote this}};' || echo 'Warning: could not create extension {{this}}') &&
141
+ echo 'Extension "{{this}}" enabled on "{{../name}}".' &&
142
+ {{/each}}
143
143
  {{/each}}
144
144
  {{else}}
145
145
  echo 'Creating {{app.key}} database and user...' &&
@@ -1,37 +0,0 @@
1
- app:
2
- key: hubspot
3
- displayName: HubSpot CRM Integration
4
- description: HubSpot CRM external system integration with companies, contacts, and deals
5
- type: external
6
- configuration:
7
- - name: HUBSPOT_API_VERSION
8
- portalInput:
9
- field: select
10
- label: HubSpot API Version
11
- placeholder: Select API version
12
- options:
13
- - v1
14
- - v2
15
- - v3
16
- validation:
17
- required: false
18
- - name: MAX_PAGE_SIZE
19
- portalInput:
20
- field: text
21
- label: Maximum Page Size
22
- placeholder: '100'
23
- validation:
24
- required: false
25
- pattern: ^[0-9]+$
26
- minLength: 1
27
- maxLength: 1000
28
- externalIntegration:
29
- schemaBasePath: ./
30
- systems:
31
- - hubspot-system.json
32
- dataSources:
33
- - hubspot-datasource-company.json
34
- - hubspot-datasource-contact.json
35
- - hubspot-datasource-deal.json
36
- autopublish: true
37
- version: 1.0.0