@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.
- package/.cursor/rules/docs-rules.mdc +30 -0
- package/README.md +1 -1
- package/integration/hubspot/README.md +8 -4
- package/integration/hubspot/application.json +54 -0
- package/integration/hubspot/create-hubspot.js +9 -136
- package/integration/hubspot/env.template +3 -4
- package/integration/hubspot/hubspot-datasource-company.json +343 -5
- package/integration/hubspot/hubspot-datasource-contact.json +413 -5
- package/integration/hubspot/hubspot-datasource-deal.json +341 -4
- package/integration/hubspot/hubspot-datasource-users.json +116 -0
- package/integration/hubspot/hubspot-deploy.json +1250 -108
- package/integration/hubspot/hubspot-system.json +15 -32
- package/integration/hubspot/test-dataplane-down-tests.js +17 -16
- package/integration/hubspot/test-dataplane-down.js +2 -2
- package/jest.config.manual.js +2 -1
- package/lib/api/external-test.api.js +111 -0
- package/lib/api/index.js +42 -19
- package/lib/api/pipeline.api.js +66 -120
- package/lib/api/types/pipeline.types.js +37 -0
- package/lib/api/wizard-platform.api.js +61 -0
- package/lib/api/wizard.api.js +34 -1
- package/lib/app/config.js +23 -11
- package/lib/app/index.js +3 -1
- package/lib/app/prompts.js +44 -29
- package/lib/app/readme.js +8 -3
- package/lib/app/run-env-compose.js +64 -1
- package/lib/app/run-helpers.js +1 -1
- package/lib/app/show-display.js +1 -1
- package/lib/cli/setup-app.js +42 -11
- package/lib/cli/setup-credential-deployment.js +31 -6
- package/lib/cli/setup-dev.js +27 -0
- package/lib/cli/setup-environment.js +12 -4
- package/lib/cli/setup-external-system.js +19 -4
- package/lib/cli/setup-infra.js +54 -14
- package/lib/cli/setup-utility.js +117 -21
- package/lib/commands/credential-env.js +162 -0
- package/lib/commands/credential-list.js +17 -22
- package/lib/commands/credential-push.js +96 -0
- package/lib/commands/datasource.js +77 -6
- package/lib/commands/dev-init.js +39 -1
- package/lib/commands/repair-auth-config.js +99 -0
- package/lib/commands/repair-datasource-keys.js +208 -0
- package/lib/commands/repair-datasource.js +235 -0
- package/lib/commands/repair-env-template.js +348 -0
- package/lib/commands/repair-internal.js +85 -0
- package/lib/commands/repair-rbac.js +158 -0
- package/lib/commands/repair.js +507 -0
- package/lib/commands/test-e2e-external.js +165 -0
- package/lib/commands/upload.js +71 -40
- package/lib/commands/wizard-core-helpers.js +226 -4
- package/lib/commands/wizard-core.js +67 -29
- package/lib/commands/wizard-dataplane.js +1 -1
- package/lib/commands/wizard-entity-selection.js +43 -0
- package/lib/commands/wizard-headless.js +44 -5
- package/lib/commands/wizard-helpers.js +7 -3
- package/lib/commands/wizard.js +86 -64
- package/lib/core/config.js +7 -1
- package/lib/core/secrets.js +33 -12
- package/lib/datasource/deploy.js +12 -3
- package/lib/datasource/test-e2e.js +219 -0
- package/lib/datasource/test-integration.js +154 -0
- package/lib/deployment/deployer.js +7 -5
- package/lib/external-system/download.js +182 -204
- package/lib/external-system/generator.js +204 -56
- package/lib/external-system/test-execution.js +2 -1
- package/lib/external-system/test-system-level.js +73 -0
- package/lib/external-system/test.js +51 -18
- package/lib/generator/external-controller-manifest.js +29 -2
- package/lib/generator/external-schema-utils.js +1 -1
- package/lib/generator/external.js +10 -3
- package/lib/generator/index.js +4 -1
- package/lib/generator/split-readme.js +1 -0
- package/lib/generator/split-variables.js +7 -1
- package/lib/generator/split.js +194 -54
- package/lib/generator/wizard-prompts-secondary.js +294 -0
- package/lib/generator/wizard-prompts.js +105 -106
- package/lib/generator/wizard-readme.js +88 -0
- package/lib/generator/wizard.js +147 -158
- package/lib/infrastructure/compose.js +11 -1
- package/lib/infrastructure/index.js +11 -3
- package/lib/infrastructure/services.js +22 -11
- package/lib/schema/application-schema.json +8 -5
- package/lib/schema/external-datasource.schema.json +49 -26
- package/lib/schema/external-system.schema.json +82 -6
- package/lib/schema/wizard-config.schema.json +16 -0
- package/lib/utils/api.js +38 -10
- package/lib/utils/auth-headers.js +8 -7
- package/lib/utils/compose-generator.js +1 -1
- package/lib/utils/compose-handlebars-helpers.js +11 -0
- package/lib/utils/config-format-preference.js +51 -0
- package/lib/utils/config-format.js +36 -0
- package/lib/utils/configuration-env-resolver.js +179 -0
- package/lib/utils/credential-display.js +83 -0
- package/lib/utils/credential-secrets-env.js +115 -25
- package/lib/utils/dataplane-pipeline-warning.js +28 -0
- package/lib/utils/deployment-validation-helpers.js +4 -4
- package/lib/utils/dev-ca-install.js +139 -0
- package/lib/utils/env-copy.js +23 -3
- package/lib/utils/error-formatters/http-status-errors.js +0 -1
- package/lib/utils/error-formatters/permission-errors.js +0 -1
- package/lib/utils/error-formatters/validation-errors.js +0 -1
- package/lib/utils/external-readme.js +56 -29
- package/lib/utils/external-system-display.js +59 -1
- package/lib/utils/external-system-test-helpers.js +21 -8
- package/lib/utils/external-system-validators.js +3 -0
- package/lib/utils/file-upload.js +20 -50
- package/lib/utils/help-builder.js +1 -0
- package/lib/utils/infra-status.js +50 -44
- package/lib/utils/local-secrets.js +5 -5
- package/lib/utils/paths.js +85 -4
- package/lib/utils/secrets-canonical.js +93 -0
- package/lib/utils/secrets-generator.js +20 -0
- package/lib/utils/secrets-helpers.js +75 -89
- package/lib/utils/test-log-writer.js +56 -0
- package/lib/utils/token-manager.js +24 -32
- package/lib/validation/env-template-auth.js +157 -0
- package/lib/validation/env-template-kv.js +41 -0
- package/lib/validation/external-manifest-validator.js +25 -0
- package/lib/validation/external-system-auth-rules.js +86 -0
- package/lib/validation/validate-batch.js +149 -0
- package/lib/validation/validate-datasource-keys-api.js +33 -0
- package/lib/validation/validate-display.js +94 -16
- package/lib/validation/validate.js +25 -12
- package/lib/validation/validator.js +7 -9
- package/lib/validation/wizard-datasource-validation.js +50 -0
- package/package.json +7 -2
- package/templates/applications/dataplane/application.yaml +1 -1
- package/templates/applications/dataplane/env.template +5 -5
- package/templates/applications/dataplane/rbac.yaml +2 -2
- package/templates/applications/miso-controller/env.template +1 -1
- package/templates/external-system/README.md.hbs +65 -25
- package/templates/external-system/deploy.js.hbs +4 -2
- package/templates/external-system/external-datasource.yaml.hbs +217 -0
- package/templates/external-system/external-system.json.hbs +1 -18
- package/templates/infra/compose.yaml.hbs +6 -0
- package/templates/python/docker-compose.hbs +4 -4
- package/templates/typescript/docker-compose.hbs +4 -4
- 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
|
-
{{#
|
|
140
|
-
psql -d {{name}} -c
|
|
141
|
-
echo '
|
|
142
|
-
{{/
|
|
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
|
-
{{#
|
|
140
|
-
psql -d {{name}} -c
|
|
141
|
-
echo '
|
|
142
|
-
{{/
|
|
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
|