@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
@@ -0,0 +1,166 @@
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,12 +1,12 @@
1
- appName: hubspot-test-credential-real
1
+ appName: wizard-e2e-credential-real
2
2
  mode: create-system
3
3
  source:
4
4
  type: openapi-file
5
- filePath: /workspace/aifabrix-builder/integration/hubspot/companies.json
5
+ filePath: /workspace/aifabrix-builder/integration/hubspot-test/companies.json
6
6
  credential:
7
7
  action: create
8
8
  config:
9
- key: hubspot-test-cred-real
9
+ key: wizard-e2e-cred-real
10
10
  displayName: HubSpot Test Credential (Real)
11
11
  type: OAUTH2
12
12
  config:
@@ -1,8 +1,8 @@
1
- appName: hubspot-test-env-vars
1
+ appName: wizard-e2e-env-vars
2
2
  mode: create-system
3
3
  source:
4
4
  type: openapi-file
5
- filePath: /workspace/aifabrix-builder/integration/hubspot/companies.json
5
+ filePath: /workspace/aifabrix-builder/integration/hubspot-test/companies.json
6
6
  deployment:
7
7
  controller: ${CONTROLLER_URL}
8
8
  dataplane: ${DATAPLANE_URL}
@@ -1,4 +1,4 @@
1
- appName: hubspot-test-negative-add-datasource
1
+ appName: wizard-e2e-negative-add-datasource
2
2
  mode: add-datasource
3
3
  source:
4
4
  type: known-platform
@@ -1,4 +1,4 @@
1
- appName: hubspot-test-negative-credential-create
1
+ appName: wizard-e2e-negative-credential-create
2
2
  mode: create-system
3
3
  source:
4
4
  type: known-platform
@@ -1,4 +1,4 @@
1
- appName: hubspot-test-negative-credential-select
1
+ appName: wizard-e2e-negative-credential-select
2
2
  mode: create-system
3
3
  source:
4
4
  type: known-platform
@@ -1,4 +1,4 @@
1
- appName: hubspot-test-negative-platform
1
+ appName: wizard-e2e-negative-platform
2
2
  mode: create-system
3
3
  source:
4
4
  type: known-platform
@@ -0,0 +1,2 @@
1
+ appName: wizard-e2e-negative-missing-source
2
+ mode: create-system
@@ -1,4 +1,4 @@
1
- appName: hubspot-test-negative-mode
1
+ appName: wizard-e2e-negative-mode
2
2
  mode: invalid-mode
3
3
  source:
4
4
  type: known-platform
@@ -1,4 +1,4 @@
1
- appName: hubspot-test-negative-openapi
1
+ appName: wizard-e2e-negative-openapi
2
2
  mode: create-system
3
3
  source:
4
4
  type: openapi-file
@@ -1,4 +1,4 @@
1
- appName: hubspot-test-negative-openapi-url
1
+ appName: wizard-e2e-negative-openapi-url
2
2
  mode: create-system
3
3
  source:
4
4
  type: openapi-url
@@ -1,4 +1,4 @@
1
- appName: hubspot-test-negative-source
1
+ appName: wizard-e2e-negative-source
2
2
  mode: create-system
3
3
  source:
4
4
  type: invalid-type
@@ -1,4 +1,4 @@
1
- appName: hubspot-test-negative-dimension-array
1
+ appName: wizard-e2e-negative-dimension-array
2
2
  mode: create-system
3
3
  source:
4
4
  type: known-platform
@@ -0,0 +1,5 @@
1
+ appName: wizard-e2e-negative-dimension-invalid-key
2
+ mode: create-system
3
+ source:
4
+ type: known-platform
5
+ platform: hubspot
@@ -0,0 +1,5 @@
1
+ appName: wizard-e2e-negative-dimension-invalid-path
2
+ mode: create-system
3
+ source:
4
+ type: known-platform
5
+ platform: hubspot
@@ -1,4 +1,4 @@
1
- appName: hubspot-test-negative-dimension-missing
1
+ appName: wizard-e2e-negative-dimension-missing
2
2
  mode: create-system
3
3
  source:
4
4
  type: known-platform
@@ -1,4 +1,4 @@
1
- appName: hubspot-test-negative-rbac-missing-role
1
+ appName: wizard-e2e-negative-rbac-missing-role
2
2
  mode: create-system
3
3
  source:
4
4
  type: known-platform
@@ -1,4 +1,4 @@
1
- appName: hubspot-test-negative-rbac-invalid-yaml
1
+ appName: wizard-e2e-negative-rbac-invalid-yaml
2
2
  mode: create-system
3
3
  source:
4
4
  type: known-platform