@aifabrix/builder 2.42.1 → 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.
- package/README.md +1 -1
- package/bin/aifabrix.js +1 -1
- package/integration/hubspot-test/README.md +126 -0
- package/integration/{hubspot → hubspot-test}/application.json +6 -6
- package/integration/{hubspot → hubspot-test}/create-hubspot.js +5 -5
- package/integration/hubspot-test/env.template +4 -0
- package/integration/{hubspot/hubspot-datasource-company.json → hubspot-test/hubspot-test-datasource-company.json} +3 -2
- package/integration/{hubspot/hubspot-datasource-contact.json → hubspot-test/hubspot-test-datasource-contact.json} +3 -2
- package/integration/{hubspot/hubspot-datasource-deal.json → hubspot-test/hubspot-test-datasource-deal.json} +3 -2
- package/integration/{hubspot/hubspot-datasource-users.json → hubspot-test/hubspot-test-datasource-users.json} +3 -2
- package/integration/{hubspot/hubspot-deploy.json → hubspot-test/hubspot-test-deploy.json} +198 -21
- package/integration/{hubspot/hubspot-system.json → hubspot-test/hubspot-test-system.json} +8 -7
- package/integration/hubspot-test/rbac.json +166 -0
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-hubspot-credential-real.yaml +3 -3
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-hubspot-env-vars.yaml +2 -2
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-add-datasource.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-credential-create.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-credential-select.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-known-platform.yaml +1 -1
- package/integration/hubspot-test/test-artifacts/wizard-invalid-missing-source.yaml +2 -0
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-mode.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-openapi-file.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-openapi-url.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-source.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-valid-for-dimension-array-test.yaml +1 -1
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-key-test.yaml +5 -0
- package/integration/hubspot-test/test-artifacts/wizard-valid-for-dimension-path-test.yaml +5 -0
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-valid-for-dimension-test.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-valid-for-rbac-test.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-valid-for-rbac-yaml-test.yaml +1 -1
- package/integration/{hubspot → hubspot-test}/test.js +102 -59
- package/integration/{hubspot → hubspot-test}/wizard-hubspot-e2e.yaml +2 -2
- package/integration/{hubspot → hubspot-test}/wizard-hubspot-platform.yaml +1 -1
- package/lib/api/external-test.api.js +1 -1
- package/lib/api/service-users.api.js +111 -2
- package/lib/api/types/service-users.types.js +41 -0
- package/lib/app/register.js +3 -1
- package/lib/app/rotate-secret.js +3 -0
- package/lib/cli/setup-app.js +2 -2
- package/lib/cli/setup-auth.js +19 -11
- package/lib/cli/setup-dev.js +62 -32
- package/lib/cli/setup-environment.js +6 -21
- package/lib/cli/setup-infra.js +13 -0
- package/lib/cli/setup-secrets.js +45 -6
- package/lib/cli/setup-service-user.js +146 -20
- package/lib/cli/setup-utility.js +12 -0
- package/lib/commands/auth-config.js +4 -8
- package/lib/commands/datasource.js +46 -1
- package/lib/commands/dev-init.js +1 -1
- package/lib/commands/repair-env-template.js +14 -8
- package/lib/commands/repair-rbac.js +25 -19
- package/lib/commands/repair.js +96 -30
- package/lib/commands/secrets-remove.js +1 -1
- package/lib/commands/secrets-validate.js +17 -4
- package/lib/commands/service-user.js +231 -2
- package/lib/commands/up-common.js +25 -0
- package/lib/commands/up-dataplane.js +2 -2
- package/lib/core/admin-secrets.js +2 -0
- package/lib/core/config.js +7 -5
- package/lib/core/ensure-encryption-key.js +1 -3
- package/lib/core/secrets.js +32 -9
- package/lib/core/templates.js +1 -1
- package/lib/datasource/abac-validator.js +157 -0
- package/lib/datasource/field-reference-validator.js +74 -36
- package/lib/datasource/log-viewer.js +221 -0
- package/lib/datasource/resolve-app.js +109 -0
- package/lib/datasource/test-e2e.js +11 -20
- package/lib/datasource/test-integration.js +42 -22
- package/lib/datasource/validate.js +5 -2
- package/lib/external-system/generator.js +12 -8
- package/lib/external-system/test-system-level.js +1 -1
- package/lib/generator/external-controller-manifest.js +3 -3
- package/lib/generator/external.js +7 -7
- package/lib/generator/helpers.js +13 -9
- package/lib/generator/index.js +4 -4
- package/lib/generator/split.js +45 -10
- package/lib/generator/wizard.js +9 -6
- package/lib/infrastructure/helpers.js +50 -35
- package/lib/infrastructure/index.js +39 -23
- package/lib/schema/env-config.yaml +19 -2
- package/lib/schema/external-datasource.schema.json +11 -1
- package/lib/utils/app-config-resolver.js +23 -1
- package/lib/utils/config-paths.js +48 -4
- package/lib/utils/credential-secrets-env.js +16 -1
- package/lib/utils/env-map.js +7 -3
- package/lib/utils/error-formatter.js +37 -0
- package/lib/utils/external-env-template.js +180 -0
- package/lib/utils/external-system-display.js +43 -0
- package/lib/utils/external-system-validators.js +2 -2
- package/lib/utils/help-builder.js +3 -5
- package/lib/utils/local-secrets.js +26 -3
- package/lib/utils/paths.js +2 -1
- package/lib/utils/secrets-generator.js +2 -2
- package/lib/utils/secrets-utils.js +4 -0
- package/lib/utils/secure-file-permissions.js +91 -0
- package/lib/utils/token-manager.js +36 -3
- package/lib/utils/yaml-preserve.js +59 -1
- package/lib/validation/env-template-auth.js +50 -2
- package/lib/validation/external-manifest-validator.js +8 -0
- package/lib/validation/validate.js +8 -0
- package/lib/validation/validator.js +10 -13
- package/package.json +5 -1
- package/templates/applications/dataplane/env.template +5 -1
- package/templates/applications/miso-controller/application.yaml +1 -1
- package/templates/applications/miso-controller/env.template +13 -2
- package/templates/external-system/env.template.hbs +22 -0
- package/integration/hubspot/README.md +0 -102
- package/integration/hubspot/env.template +0 -4
- package/integration/hubspot/test-artifacts/wizard-invalid-missing-source.yaml +0 -2
- package/integration/hubspot/test-artifacts/wizard-valid-for-dimension-key-test.yaml +0 -5
- package/integration/hubspot/test-artifacts/wizard-valid-for-dimension-path-test.yaml +0 -5
- /package/integration/{hubspot → hubspot-test}/companies.json +0 -0
- /package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-app-name.yaml +0 -0
- /package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-missing-app.yaml +0 -0
- /package/integration/{hubspot → hubspot-test}/test-dataplane-down-helpers.js +0 -0
- /package/integration/{hubspot → hubspot-test}/test-dataplane-down-tests.js +0 -0
- /package/integration/{hubspot → hubspot-test}/test-dataplane-down.js +0 -0
|
@@ -1,102 +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
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
(External is the default type. Use `aifabrix create <name> --type webapp` for a builder app.)
|
|
33
|
-
|
|
34
|
-
Or use the interactive wizard:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
aifabrix wizard --app hubspot
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### 2. Configure Authentication and Datasources
|
|
41
|
-
|
|
42
|
-
Edit files in `integration/hubspot/`:
|
|
43
|
-
|
|
44
|
-
- **Authentication**: `hubspot-system.yaml` (auth type, credentials placeholders)
|
|
45
|
-
- **Field mappings**: `hubspot-datasource-*.yaml` (dimensions, attributes, operations)
|
|
46
|
-
|
|
47
|
-
### 3. Validate Configuration
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
aifabrix validate hubspot --type external
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### 4. Generate Deployment Manifest
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
aifabrix json hubspot --type external
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
This creates `hubspot-deploy.json` in `integration/hubspot/`.
|
|
60
|
-
|
|
61
|
-
### 5. Deploy
|
|
62
|
-
|
|
63
|
-
Controller URL and environment are read from config. Configure and log in first:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
aifabrix auth config --set-controller <url> --set-environment dev
|
|
67
|
-
aifabrix login
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Then deploy:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
aifabrix deploy hubspot
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Testing
|
|
77
|
-
|
|
78
|
-
### Unit Tests (Local Validation, No API)
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
aifabrix test hubspot
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### Integration Tests (Via Dataplane)
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
aifabrix test-integration hubspot
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## Deployment
|
|
91
|
-
|
|
92
|
-
Deploy via miso-controller pipeline (same as regular apps). Auth and controller come from `aifabrix login` and `aifabrix auth config`:
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
aifabrix deploy hubspot
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
## Troubleshooting
|
|
99
|
-
|
|
100
|
-
- **Validation errors**: Run `aifabrix validate hubspot --type external` to see schema and manifest errors.
|
|
101
|
-
- **Deployment / auth**: Run `aifabrix auth config --set-controller <url> --set-environment <env>` and `aifabrix login` before `aifabrix deploy`.
|
|
102
|
-
- **File not found**: Run commands from the project root (where `package.json` and `integration/` live).
|
|
File without changes
|
|
File without changes
|
/package/integration/{hubspot → hubspot-test}/test-artifacts/wizard-invalid-missing-app.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|