@aifabrix/builder 2.41.0 → 2.42.1

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 (142) hide show
  1. package/.cursor/rules/docs-rules.mdc +30 -0
  2. package/README.md +2 -2
  3. package/integration/hubspot/README.md +11 -5
  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 +36 -2
  22. package/lib/app/config.js +23 -11
  23. package/lib/app/index.js +5 -3
  24. package/lib/app/prompts.js +46 -31
  25. package/lib/app/readme.js +11 -4
  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 +45 -14
  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/auth-config.js +22 -12
  37. package/lib/commands/credential-env.js +162 -0
  38. package/lib/commands/credential-list.js +17 -22
  39. package/lib/commands/credential-push.js +96 -0
  40. package/lib/commands/datasource.js +77 -6
  41. package/lib/commands/dev-init.js +39 -1
  42. package/lib/commands/repair-auth-config.js +99 -0
  43. package/lib/commands/repair-datasource-keys.js +208 -0
  44. package/lib/commands/repair-datasource.js +235 -0
  45. package/lib/commands/repair-env-template.js +348 -0
  46. package/lib/commands/repair-internal.js +85 -0
  47. package/lib/commands/repair-rbac.js +158 -0
  48. package/lib/commands/repair.js +518 -0
  49. package/lib/commands/secrets-set.js +6 -0
  50. package/lib/commands/test-e2e-external.js +165 -0
  51. package/lib/commands/up-dataplane.js +90 -6
  52. package/lib/commands/upload.js +71 -40
  53. package/lib/commands/wizard-core-helpers.js +230 -5
  54. package/lib/commands/wizard-core.js +68 -29
  55. package/lib/commands/wizard-dataplane.js +1 -1
  56. package/lib/commands/wizard-entity-selection.js +43 -0
  57. package/lib/commands/wizard-headless.js +49 -5
  58. package/lib/commands/wizard-helpers.js +7 -3
  59. package/lib/commands/wizard.js +93 -64
  60. package/lib/core/config.js +7 -1
  61. package/lib/core/secrets.js +33 -12
  62. package/lib/datasource/deploy.js +12 -3
  63. package/lib/datasource/test-e2e.js +219 -0
  64. package/lib/datasource/test-integration.js +154 -0
  65. package/lib/deployment/deployer.js +7 -5
  66. package/lib/external-system/download-helpers.js +3 -1
  67. package/lib/external-system/download.js +182 -204
  68. package/lib/external-system/generator.js +204 -56
  69. package/lib/external-system/test-execution.js +2 -1
  70. package/lib/external-system/test-system-level.js +73 -0
  71. package/lib/external-system/test.js +51 -18
  72. package/lib/generator/external-controller-manifest.js +29 -2
  73. package/lib/generator/external-schema-utils.js +4 -2
  74. package/lib/generator/external.js +10 -3
  75. package/lib/generator/index.js +4 -1
  76. package/lib/generator/split-readme.js +1 -0
  77. package/lib/generator/split-variables.js +7 -1
  78. package/lib/generator/split.js +194 -54
  79. package/lib/generator/wizard-prompts-secondary.js +326 -0
  80. package/lib/generator/wizard-prompts.js +105 -106
  81. package/lib/generator/wizard-readme.js +91 -0
  82. package/lib/generator/wizard.js +180 -179
  83. package/lib/infrastructure/compose.js +11 -1
  84. package/lib/infrastructure/index.js +11 -3
  85. package/lib/infrastructure/services.js +22 -11
  86. package/lib/schema/application-schema.json +8 -5
  87. package/lib/schema/external-datasource.schema.json +49 -26
  88. package/lib/schema/external-system.schema.json +82 -6
  89. package/lib/schema/wizard-config.schema.json +23 -1
  90. package/lib/utils/api.js +38 -10
  91. package/lib/utils/auth-headers.js +8 -7
  92. package/lib/utils/compose-generator.js +1 -1
  93. package/lib/utils/compose-handlebars-helpers.js +11 -0
  94. package/lib/utils/config-format-preference.js +51 -0
  95. package/lib/utils/config-format.js +36 -0
  96. package/lib/utils/configuration-env-resolver.js +179 -0
  97. package/lib/utils/credential-display.js +83 -0
  98. package/lib/utils/credential-secrets-env.js +115 -25
  99. package/lib/utils/dataplane-pipeline-warning.js +28 -0
  100. package/lib/utils/deployment-validation-helpers.js +4 -4
  101. package/lib/utils/dev-ca-install.js +139 -0
  102. package/lib/utils/env-copy.js +23 -3
  103. package/lib/utils/error-formatters/http-status-errors.js +0 -1
  104. package/lib/utils/error-formatters/permission-errors.js +0 -1
  105. package/lib/utils/error-formatters/validation-errors.js +0 -1
  106. package/lib/utils/external-readme.js +89 -30
  107. package/lib/utils/external-system-display.js +59 -1
  108. package/lib/utils/external-system-test-helpers.js +21 -8
  109. package/lib/utils/external-system-validators.js +3 -0
  110. package/lib/utils/file-upload.js +20 -50
  111. package/lib/utils/help-builder.js +1 -0
  112. package/lib/utils/infra-status.js +50 -44
  113. package/lib/utils/local-secrets.js +5 -5
  114. package/lib/utils/paths.js +85 -4
  115. package/lib/utils/secrets-canonical.js +93 -0
  116. package/lib/utils/secrets-generator.js +20 -0
  117. package/lib/utils/secrets-helpers.js +75 -89
  118. package/lib/utils/test-log-writer.js +56 -0
  119. package/lib/utils/token-manager.js +24 -32
  120. package/lib/validation/env-template-auth.js +157 -0
  121. package/lib/validation/env-template-kv.js +41 -0
  122. package/lib/validation/external-manifest-validator.js +25 -0
  123. package/lib/validation/external-system-auth-rules.js +86 -0
  124. package/lib/validation/validate-batch.js +149 -0
  125. package/lib/validation/validate-datasource-keys-api.js +33 -0
  126. package/lib/validation/validate-display.js +94 -16
  127. package/lib/validation/validate.js +25 -12
  128. package/lib/validation/validator.js +7 -9
  129. package/lib/validation/wizard-datasource-validation.js +50 -0
  130. package/package.json +7 -2
  131. package/templates/applications/dataplane/application.yaml +1 -1
  132. package/templates/applications/dataplane/env.template +5 -5
  133. package/templates/applications/dataplane/rbac.yaml +2 -2
  134. package/templates/applications/miso-controller/env.template +1 -1
  135. package/templates/external-system/README.md.hbs +75 -22
  136. package/templates/external-system/deploy.js.hbs +4 -2
  137. package/templates/external-system/external-datasource.yaml.hbs +217 -0
  138. package/templates/external-system/external-system.json.hbs +1 -18
  139. package/templates/infra/compose.yaml.hbs +6 -0
  140. package/templates/python/docker-compose.hbs +4 -4
  141. package/templates/typescript/docker-compose.hbs +4 -4
  142. package/integration/hubspot/application.yaml +0 -37
@@ -107,7 +107,10 @@
107
107
  }
108
108
  }
109
109
  },
110
- "required": ["id", "properties"]
110
+ "required": [
111
+ "id",
112
+ "properties"
113
+ ]
111
114
  },
112
115
  "fieldMappings": {
113
116
  "dimensions": {
@@ -187,10 +190,417 @@
187
190
  "description": "Last modification timestamp",
188
191
  "indexed": false
189
192
  }
193
+ },
194
+ "compiledAttributes": {
195
+ "id": {
196
+ "raw_path": [
197
+ "id"
198
+ ],
199
+ "functions": [],
200
+ "type": "string",
201
+ "required": false,
202
+ "description": "Unique contact identifier",
203
+ "indexed": true
204
+ },
205
+ "firstName": {
206
+ "raw_path": [
207
+ "properties",
208
+ "firstname",
209
+ "value"
210
+ ],
211
+ "functions": [
212
+ {
213
+ "name": "trim",
214
+ "args": []
215
+ }
216
+ ],
217
+ "type": "string",
218
+ "required": false,
219
+ "description": "First name",
220
+ "indexed": false
221
+ },
222
+ "lastName": {
223
+ "raw_path": [
224
+ "properties",
225
+ "lastname",
226
+ "value"
227
+ ],
228
+ "functions": [
229
+ {
230
+ "name": "trim",
231
+ "args": []
232
+ }
233
+ ],
234
+ "type": "string",
235
+ "required": false,
236
+ "description": "Last name",
237
+ "indexed": false
238
+ },
239
+ "email": {
240
+ "raw_path": [
241
+ "properties",
242
+ "email",
243
+ "value"
244
+ ],
245
+ "functions": [
246
+ {
247
+ "name": "toLower",
248
+ "args": []
249
+ },
250
+ {
251
+ "name": "trim",
252
+ "args": []
253
+ }
254
+ ],
255
+ "type": "string",
256
+ "required": false,
257
+ "description": "Email address for ABAC filtering",
258
+ "indexed": false
259
+ },
260
+ "phone": {
261
+ "raw_path": [
262
+ "properties",
263
+ "phone",
264
+ "value"
265
+ ],
266
+ "functions": [
267
+ {
268
+ "name": "trim",
269
+ "args": []
270
+ }
271
+ ],
272
+ "type": "string",
273
+ "required": false,
274
+ "description": "Phone number",
275
+ "indexed": false
276
+ },
277
+ "company": {
278
+ "raw_path": [
279
+ "properties",
280
+ "company",
281
+ "value"
282
+ ],
283
+ "functions": [
284
+ {
285
+ "name": "trim",
286
+ "args": []
287
+ }
288
+ ],
289
+ "type": "string",
290
+ "required": false,
291
+ "description": "Associated company name",
292
+ "indexed": false
293
+ },
294
+ "jobTitle": {
295
+ "raw_path": [
296
+ "properties",
297
+ "jobtitle",
298
+ "value"
299
+ ],
300
+ "functions": [
301
+ {
302
+ "name": "trim",
303
+ "args": []
304
+ }
305
+ ],
306
+ "type": "string",
307
+ "required": false,
308
+ "description": "Job title",
309
+ "indexed": false
310
+ },
311
+ "address": {
312
+ "raw_path": [
313
+ "properties",
314
+ "address",
315
+ "value"
316
+ ],
317
+ "functions": [
318
+ {
319
+ "name": "trim",
320
+ "args": []
321
+ }
322
+ ],
323
+ "type": "string",
324
+ "required": false,
325
+ "description": "Street address",
326
+ "indexed": false
327
+ },
328
+ "city": {
329
+ "raw_path": [
330
+ "properties",
331
+ "city",
332
+ "value"
333
+ ],
334
+ "functions": [
335
+ {
336
+ "name": "trim",
337
+ "args": []
338
+ }
339
+ ],
340
+ "type": "string",
341
+ "required": false,
342
+ "description": "City name",
343
+ "indexed": false
344
+ },
345
+ "country": {
346
+ "raw_path": [
347
+ "properties",
348
+ "country",
349
+ "value"
350
+ ],
351
+ "functions": [
352
+ {
353
+ "name": "toUpper",
354
+ "args": []
355
+ },
356
+ {
357
+ "name": "trim",
358
+ "args": []
359
+ }
360
+ ],
361
+ "type": "string",
362
+ "required": false,
363
+ "description": "Country code for ABAC filtering",
364
+ "indexed": false
365
+ },
366
+ "createdAt": {
367
+ "raw_path": [
368
+ "properties",
369
+ "createdate",
370
+ "value"
371
+ ],
372
+ "functions": [],
373
+ "type": "string",
374
+ "required": false,
375
+ "description": "Creation timestamp",
376
+ "indexed": false
377
+ },
378
+ "updatedAt": {
379
+ "raw_path": [
380
+ "properties",
381
+ "hs_lastmodifieddate",
382
+ "value"
383
+ ],
384
+ "functions": [],
385
+ "type": "string",
386
+ "required": false,
387
+ "description": "Last modification timestamp",
388
+ "indexed": false
389
+ }
390
+ },
391
+ "compiledFields": {
392
+ "id": {
393
+ "raw_path": [
394
+ "id"
395
+ ],
396
+ "functions": [],
397
+ "type": "string",
398
+ "required": false,
399
+ "description": "Unique contact identifier",
400
+ "indexed": true
401
+ },
402
+ "firstName": {
403
+ "raw_path": [
404
+ "properties",
405
+ "firstname",
406
+ "value"
407
+ ],
408
+ "functions": [
409
+ {
410
+ "name": "trim",
411
+ "args": []
412
+ }
413
+ ],
414
+ "type": "string",
415
+ "required": false,
416
+ "description": "First name",
417
+ "indexed": false
418
+ },
419
+ "lastName": {
420
+ "raw_path": [
421
+ "properties",
422
+ "lastname",
423
+ "value"
424
+ ],
425
+ "functions": [
426
+ {
427
+ "name": "trim",
428
+ "args": []
429
+ }
430
+ ],
431
+ "type": "string",
432
+ "required": false,
433
+ "description": "Last name",
434
+ "indexed": false
435
+ },
436
+ "email": {
437
+ "raw_path": [
438
+ "properties",
439
+ "email",
440
+ "value"
441
+ ],
442
+ "functions": [
443
+ {
444
+ "name": "toLower",
445
+ "args": []
446
+ },
447
+ {
448
+ "name": "trim",
449
+ "args": []
450
+ }
451
+ ],
452
+ "type": "string",
453
+ "required": false,
454
+ "description": "Email address for ABAC filtering",
455
+ "indexed": false
456
+ },
457
+ "phone": {
458
+ "raw_path": [
459
+ "properties",
460
+ "phone",
461
+ "value"
462
+ ],
463
+ "functions": [
464
+ {
465
+ "name": "trim",
466
+ "args": []
467
+ }
468
+ ],
469
+ "type": "string",
470
+ "required": false,
471
+ "description": "Phone number",
472
+ "indexed": false
473
+ },
474
+ "company": {
475
+ "raw_path": [
476
+ "properties",
477
+ "company",
478
+ "value"
479
+ ],
480
+ "functions": [
481
+ {
482
+ "name": "trim",
483
+ "args": []
484
+ }
485
+ ],
486
+ "type": "string",
487
+ "required": false,
488
+ "description": "Associated company name",
489
+ "indexed": false
490
+ },
491
+ "jobTitle": {
492
+ "raw_path": [
493
+ "properties",
494
+ "jobtitle",
495
+ "value"
496
+ ],
497
+ "functions": [
498
+ {
499
+ "name": "trim",
500
+ "args": []
501
+ }
502
+ ],
503
+ "type": "string",
504
+ "required": false,
505
+ "description": "Job title",
506
+ "indexed": false
507
+ },
508
+ "address": {
509
+ "raw_path": [
510
+ "properties",
511
+ "address",
512
+ "value"
513
+ ],
514
+ "functions": [
515
+ {
516
+ "name": "trim",
517
+ "args": []
518
+ }
519
+ ],
520
+ "type": "string",
521
+ "required": false,
522
+ "description": "Street address",
523
+ "indexed": false
524
+ },
525
+ "city": {
526
+ "raw_path": [
527
+ "properties",
528
+ "city",
529
+ "value"
530
+ ],
531
+ "functions": [
532
+ {
533
+ "name": "trim",
534
+ "args": []
535
+ }
536
+ ],
537
+ "type": "string",
538
+ "required": false,
539
+ "description": "City name",
540
+ "indexed": false
541
+ },
542
+ "country": {
543
+ "raw_path": [
544
+ "properties",
545
+ "country",
546
+ "value"
547
+ ],
548
+ "functions": [
549
+ {
550
+ "name": "toUpper",
551
+ "args": []
552
+ },
553
+ {
554
+ "name": "trim",
555
+ "args": []
556
+ }
557
+ ],
558
+ "type": "string",
559
+ "required": false,
560
+ "description": "Country code for ABAC filtering",
561
+ "indexed": false
562
+ },
563
+ "createdAt": {
564
+ "raw_path": [
565
+ "properties",
566
+ "createdate",
567
+ "value"
568
+ ],
569
+ "functions": [],
570
+ "type": "string",
571
+ "required": false,
572
+ "description": "Creation timestamp",
573
+ "indexed": false
574
+ },
575
+ "updatedAt": {
576
+ "raw_path": [
577
+ "properties",
578
+ "hs_lastmodifieddate",
579
+ "value"
580
+ ],
581
+ "functions": [],
582
+ "type": "string",
583
+ "required": false,
584
+ "description": "Last modification timestamp",
585
+ "indexed": false
586
+ }
190
587
  }
191
588
  },
192
589
  "exposed": {
193
- "attributes": ["id", "firstName", "lastName", "email", "phone", "company", "jobTitle", "address", "city", "country", "createdAt", "updatedAt"],
590
+ "attributes": [
591
+ "id",
592
+ "firstName",
593
+ "lastName",
594
+ "email",
595
+ "phone",
596
+ "company",
597
+ "jobTitle",
598
+ "address",
599
+ "city",
600
+ "country",
601
+ "createdAt",
602
+ "updatedAt"
603
+ ],
194
604
  "description": "Exposed fields for HubSpot contacts"
195
605
  },
196
606
  "openapi": {
@@ -226,6 +636,4 @@
226
636
  },
227
637
  "autoRbac": true
228
638
  }
229
- }
230
-
231
-
639
+ }