@empire-builder-kit/nx 1.0.0-beta.4

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 (185) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +5 -0
  3. package/README.md +25 -0
  4. package/executors.json +54 -0
  5. package/generators.json +35 -0
  6. package/migrations/standard-pre-v1-to-v1.md +11 -0
  7. package/package.json +66 -0
  8. package/src/blueprints/execution.d.ts +31 -0
  9. package/src/blueprints/execution.js +166 -0
  10. package/src/blueprints/execution.js.map +1 -0
  11. package/src/blueprints/index.d.ts +5 -0
  12. package/src/blueprints/index.js +9 -0
  13. package/src/blueprints/index.js.map +1 -0
  14. package/src/blueprints/inputs.d.ts +43 -0
  15. package/src/blueprints/inputs.js +103 -0
  16. package/src/blueprints/inputs.js.map +1 -0
  17. package/src/blueprints/manifest.d.ts +241 -0
  18. package/src/blueprints/manifest.js +369 -0
  19. package/src/blueprints/manifest.js.map +1 -0
  20. package/src/blueprints/resolver.d.ts +28 -0
  21. package/src/blueprints/resolver.js +214 -0
  22. package/src/blueprints/resolver.js.map +1 -0
  23. package/src/blueprints/transitions.d.ts +20 -0
  24. package/src/blueprints/transitions.js +61 -0
  25. package/src/blueprints/transitions.js.map +1 -0
  26. package/src/executors/deploy/deploy.d.ts +4 -0
  27. package/src/executors/deploy/deploy.js +6 -0
  28. package/src/executors/deploy/deploy.js.map +1 -0
  29. package/src/executors/dev/dev.d.ts +4 -0
  30. package/src/executors/dev/dev.js +6 -0
  31. package/src/executors/dev/dev.js.map +1 -0
  32. package/src/executors/dev-doctor/dev-doctor.d.ts +18 -0
  33. package/src/executors/dev-doctor/dev-doctor.js +145 -0
  34. package/src/executors/dev-doctor/dev-doctor.js.map +1 -0
  35. package/src/executors/dev-doctor/schema.json +17 -0
  36. package/src/executors/dev-setup/dev-setup.d.ts +11 -0
  37. package/src/executors/dev-setup/dev-setup.js +454 -0
  38. package/src/executors/dev-setup/dev-setup.js.map +1 -0
  39. package/src/executors/dev-setup/schema.json +16 -0
  40. package/src/executors/fleet/fleet.d.ts +51 -0
  41. package/src/executors/fleet/fleet.js +529 -0
  42. package/src/executors/fleet/fleet.js.map +1 -0
  43. package/src/executors/fleet/schema.json +25 -0
  44. package/src/executors/foundation-preflight/foundation-preflight.d.ts +15 -0
  45. package/src/executors/foundation-preflight/foundation-preflight.js +94 -0
  46. package/src/executors/foundation-preflight/foundation-preflight.js.map +1 -0
  47. package/src/executors/foundation-preflight/schema.json +31 -0
  48. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.d.ts +13 -0
  49. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js +69 -0
  50. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js.map +1 -0
  51. package/src/executors/foundation-remove-preflight/schema.json +17 -0
  52. package/src/executors/refresh/refresh.d.ts +4 -0
  53. package/src/executors/refresh/refresh.js +6 -0
  54. package/src/executors/refresh/refresh.js.map +1 -0
  55. package/src/executors/remove/remove.d.ts +4 -0
  56. package/src/executors/remove/remove.js +6 -0
  57. package/src/executors/remove/remove.js.map +1 -0
  58. package/src/executors/sst-lifecycle/run-sst-command.d.ts +28 -0
  59. package/src/executors/sst-lifecycle/run-sst-command.js +154 -0
  60. package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -0
  61. package/src/executors/sst-lifecycle/schema.json +45 -0
  62. package/src/executors/unlock/unlock.d.ts +4 -0
  63. package/src/executors/unlock/unlock.js +6 -0
  64. package/src/executors/unlock/unlock.js.map +1 -0
  65. package/src/foundation/aurora-logical-database.d.ts +76 -0
  66. package/src/foundation/aurora-logical-database.js +419 -0
  67. package/src/foundation/aurora-logical-database.js.map +1 -0
  68. package/src/foundation/discovery.d.ts +55 -0
  69. package/src/foundation/discovery.js +55 -0
  70. package/src/foundation/discovery.js.map +1 -0
  71. package/src/foundation/index.d.ts +6 -0
  72. package/src/foundation/index.js +10 -0
  73. package/src/foundation/index.js.map +1 -0
  74. package/src/foundation/local-database-contract.d.ts +30 -0
  75. package/src/foundation/local-database-contract.js +75 -0
  76. package/src/foundation/local-database-contract.js.map +1 -0
  77. package/src/foundation/preflight.d.ts +31 -0
  78. package/src/foundation/preflight.js +114 -0
  79. package/src/foundation/preflight.js.map +1 -0
  80. package/src/foundation/provision-database-bindings.d.ts +30 -0
  81. package/src/foundation/provision-database-bindings.js +113 -0
  82. package/src/foundation/provision-database-bindings.js.map +1 -0
  83. package/src/foundation/provision-logical-database.d.ts +26 -0
  84. package/src/foundation/provision-logical-database.js +162 -0
  85. package/src/foundation/provision-logical-database.js.map +1 -0
  86. package/src/foundation/requirements.d.ts +37 -0
  87. package/src/foundation/requirements.js +141 -0
  88. package/src/foundation/requirements.js.map +1 -0
  89. package/src/foundation/stages.d.ts +14 -0
  90. package/src/foundation/stages.js +51 -0
  91. package/src/foundation/stages.js.map +1 -0
  92. package/src/generators/function/function.d.ts +13 -0
  93. package/src/generators/function/function.js +71 -0
  94. package/src/generators/function/function.js.map +1 -0
  95. package/src/generators/function/schema.d.ts +5 -0
  96. package/src/generators/function/schema.json +20 -0
  97. package/src/generators/job/job.d.ts +4 -0
  98. package/src/generators/job/job.js +5 -0
  99. package/src/generators/job/job.js.map +1 -0
  100. package/src/generators/preset/generator.d.ts +5 -0
  101. package/src/generators/preset/generator.js +41 -0
  102. package/src/generators/preset/generator.js.map +1 -0
  103. package/src/generators/preset/schema.d.ts +4 -0
  104. package/src/generators/preset/schema.json +22 -0
  105. package/src/generators/preset/workspace-files.d.ts +18 -0
  106. package/src/generators/preset/workspace-files.js +895 -0
  107. package/src/generators/preset/workspace-files.js.map +1 -0
  108. package/src/generators/service/service.d.ts +4 -0
  109. package/src/generators/service/service.js +5 -0
  110. package/src/generators/service/service.js.map +1 -0
  111. package/src/generators/slice/schema.d.ts +7 -0
  112. package/src/generators/slice/schema.json +38 -0
  113. package/src/generators/slice/slice.d.ts +26 -0
  114. package/src/generators/slice/slice.js +1676 -0
  115. package/src/generators/slice/slice.js.map +1 -0
  116. package/src/generators/upgrade/schema.d.ts +8 -0
  117. package/src/generators/upgrade/schema.json +31 -0
  118. package/src/generators/upgrade/upgrade.d.ts +27 -0
  119. package/src/generators/upgrade/upgrade.js +666 -0
  120. package/src/generators/upgrade/upgrade.js.map +1 -0
  121. package/src/generators/workload/schema.d.ts +6 -0
  122. package/src/generators/workload/schema.json +21 -0
  123. package/src/generators/workload/workload.d.ts +16 -0
  124. package/src/generators/workload/workload.js +157 -0
  125. package/src/generators/workload/workload.js.map +1 -0
  126. package/src/index.d.ts +5 -0
  127. package/src/index.js +9 -0
  128. package/src/index.js.map +1 -0
  129. package/src/local-dev/contracts.d.ts +31 -0
  130. package/src/local-dev/contracts.js +126 -0
  131. package/src/local-dev/contracts.js.map +1 -0
  132. package/src/local-dev/gateway-daemon.d.ts +4 -0
  133. package/src/local-dev/gateway-daemon.js +39 -0
  134. package/src/local-dev/gateway-daemon.js.map +1 -0
  135. package/src/local-dev/gateway.d.ts +60 -0
  136. package/src/local-dev/gateway.js +368 -0
  137. package/src/local-dev/gateway.js.map +1 -0
  138. package/src/local-dev/identity.d.ts +16 -0
  139. package/src/local-dev/identity.js +101 -0
  140. package/src/local-dev/identity.js.map +1 -0
  141. package/src/local-dev/index.d.ts +7 -0
  142. package/src/local-dev/index.js +11 -0
  143. package/src/local-dev/index.js.map +1 -0
  144. package/src/local-dev/portless.d.ts +15 -0
  145. package/src/local-dev/portless.js +115 -0
  146. package/src/local-dev/portless.js.map +1 -0
  147. package/src/local-dev/ports.d.ts +10 -0
  148. package/src/local-dev/ports.js +39 -0
  149. package/src/local-dev/ports.js.map +1 -0
  150. package/src/local-dev/proxy.d.ts +37 -0
  151. package/src/local-dev/proxy.js +271 -0
  152. package/src/local-dev/proxy.js.map +1 -0
  153. package/src/local-dev/tls.d.ts +24 -0
  154. package/src/local-dev/tls.js +294 -0
  155. package/src/local-dev/tls.js.map +1 -0
  156. package/src/ownership/composition.d.ts +16 -0
  157. package/src/ownership/composition.js +125 -0
  158. package/src/ownership/composition.js.map +1 -0
  159. package/src/ownership/foundation-record.d.ts +66 -0
  160. package/src/ownership/foundation-record.js +108 -0
  161. package/src/ownership/foundation-record.js.map +1 -0
  162. package/src/ownership/hash.d.ts +2 -0
  163. package/src/ownership/hash.js +10 -0
  164. package/src/ownership/hash.js.map +1 -0
  165. package/src/ownership/index.d.ts +6 -0
  166. package/src/ownership/index.js +10 -0
  167. package/src/ownership/index.js.map +1 -0
  168. package/src/ownership/json-ownership.d.ts +13 -0
  169. package/src/ownership/json-ownership.js +147 -0
  170. package/src/ownership/json-ownership.js.map +1 -0
  171. package/src/ownership/record.d.ts +186 -0
  172. package/src/ownership/record.js +336 -0
  173. package/src/ownership/record.js.map +1 -0
  174. package/src/ownership/workspace-record.d.ts +66 -0
  175. package/src/ownership/workspace-record.js +108 -0
  176. package/src/ownership/workspace-record.js.map +1 -0
  177. package/src/schemas/blueprint-input-schema-v1.json +23 -0
  178. package/src/schemas/blueprint-v1.json +170 -0
  179. package/src/schemas/foundation-ownership-v2.json +42 -0
  180. package/src/schemas/foundation-requirement-v1.json +32 -0
  181. package/src/schemas/generated-ownership-v2.json +117 -0
  182. package/src/schemas/workspace-ownership-v2.json +42 -0
  183. package/src/validation.d.ts +14 -0
  184. package/src/validation.js +14 -0
  185. package/src/validation.js.map +1 -0
@@ -0,0 +1,170 @@
1
+ {
2
+ "$id": "https://empirebuilderkit.dev/schemas/blueprint-v1.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "$schema": { "type": "string" },
7
+ "engine": { "minLength": 1, "type": "string" },
8
+ "foundation": {
9
+ "$id": "https://empirebuilderkit.dev/schemas/foundation-requirement-v1.json",
10
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
11
+ "additionalProperties": false,
12
+ "properties": {
13
+ "capabilities": {
14
+ "items": {
15
+ "enum": [
16
+ "network",
17
+ "routing",
18
+ "container-compute",
19
+ "postgres",
20
+ "identity",
21
+ "events",
22
+ "observability",
23
+ "configuration",
24
+ "deployment"
25
+ ],
26
+ "type": "string"
27
+ },
28
+ "type": "array",
29
+ "uniqueItems": true
30
+ },
31
+ "contract": { "minLength": 1, "type": "string" }
32
+ },
33
+ "required": ["contract", "capabilities"],
34
+ "title": "Empire Builder Kit Standard Foundation Requirement v1",
35
+ "type": "object"
36
+ },
37
+ "generator": { "pattern": "^\\./", "type": "string" },
38
+ "inputs": { "pattern": "^\\./", "type": "string" },
39
+ "kind": { "const": "slice" },
40
+ "migrations": {
41
+ "items": {
42
+ "additionalProperties": false,
43
+ "properties": {
44
+ "affectedManagedSurfaces": {
45
+ "items": { "minLength": 1, "type": "string" },
46
+ "minItems": 1,
47
+ "type": "array",
48
+ "uniqueItems": true
49
+ },
50
+ "contracts": {
51
+ "additionalProperties": false,
52
+ "properties": {
53
+ "consumes": {
54
+ "items": { "minLength": 1, "type": "string" },
55
+ "type": "array",
56
+ "uniqueItems": true
57
+ },
58
+ "publishes": {
59
+ "items": { "minLength": 1, "type": "string" },
60
+ "type": "array",
61
+ "uniqueItems": true
62
+ }
63
+ },
64
+ "required": ["consumes", "publishes"],
65
+ "type": "object"
66
+ },
67
+ "databaseChange": {
68
+ "enum": ["none", "ordered", "replacement", "manual"]
69
+ },
70
+ "dependencyChanges": {
71
+ "items": { "minLength": 1, "type": "string" },
72
+ "type": "array",
73
+ "uniqueItems": true
74
+ },
75
+ "executor": { "pattern": "^\\./", "type": "string" },
76
+ "from": { "minLength": 1, "type": "string" },
77
+ "id": { "minLength": 1, "type": "string" },
78
+ "infrastructureChanges": {
79
+ "items": { "minLength": 1, "type": "string" },
80
+ "type": "array",
81
+ "uniqueItems": true
82
+ },
83
+ "maintenanceWindowRequired": { "type": "boolean" },
84
+ "manualSuccession": { "pattern": "^\\./", "type": "string" },
85
+ "planSchemaVersion": { "const": 1 },
86
+ "preflight": {
87
+ "items": { "minLength": 1, "type": "string" },
88
+ "minItems": 1,
89
+ "type": "array",
90
+ "uniqueItems": true
91
+ },
92
+ "rollback": {
93
+ "additionalProperties": false,
94
+ "properties": {
95
+ "afterPointOfNoReturn": { "minLength": 1, "type": "string" },
96
+ "beforePointOfNoReturn": {
97
+ "minLength": 1,
98
+ "type": "string"
99
+ },
100
+ "pointOfNoReturn": { "minLength": 1, "type": "string" }
101
+ },
102
+ "required": [
103
+ "beforePointOfNoReturn",
104
+ "pointOfNoReturn",
105
+ "afterPointOfNoReturn"
106
+ ],
107
+ "type": "object"
108
+ },
109
+ "to": {
110
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$",
111
+ "type": "string"
112
+ },
113
+ "verification": {
114
+ "items": { "minLength": 1, "type": "string" },
115
+ "minItems": 1,
116
+ "type": "array",
117
+ "uniqueItems": true
118
+ }
119
+ },
120
+ "required": [
121
+ "id",
122
+ "from",
123
+ "to",
124
+ "planSchemaVersion",
125
+ "affectedManagedSurfaces",
126
+ "contracts",
127
+ "dependencyChanges",
128
+ "infrastructureChanges",
129
+ "maintenanceWindowRequired",
130
+ "databaseChange",
131
+ "preflight",
132
+ "verification",
133
+ "rollback",
134
+ "manualSuccession"
135
+ ],
136
+ "type": "object"
137
+ },
138
+ "minItems": 1,
139
+ "type": "array"
140
+ },
141
+ "name": {
142
+ "pattern": "^(?:@[a-z0-9][a-z0-9._-]*\\/)?[a-z0-9][a-z0-9._-]*$",
143
+ "type": "string"
144
+ },
145
+ "type": { "const": "empire-builder-kit-blueprint" },
146
+ "verification": {
147
+ "items": { "minLength": 1, "type": "string" },
148
+ "minItems": 1,
149
+ "type": "array",
150
+ "uniqueItems": true
151
+ },
152
+ "version": {
153
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$",
154
+ "type": "string"
155
+ }
156
+ },
157
+ "required": [
158
+ "type",
159
+ "name",
160
+ "version",
161
+ "engine",
162
+ "kind",
163
+ "generator",
164
+ "inputs",
165
+ "foundation",
166
+ "verification"
167
+ ],
168
+ "title": "Empire Builder Kit Blueprint Manifest v1",
169
+ "type": "object"
170
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$id": "https://empirebuilderkit.dev/schemas/foundation-ownership-v2.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "frameworkVersion": { "minLength": 1, "type": "string" },
7
+ "kind": { "const": "foundation" },
8
+ "paths": {
9
+ "items": {
10
+ "additionalProperties": false,
11
+ "properties": {
12
+ "managedJsonPointers": {
13
+ "items": {
14
+ "pattern": "^(?:/(?:[^~/]|~[01])*)+$",
15
+ "type": "string"
16
+ },
17
+ "minItems": 1,
18
+ "type": "array",
19
+ "uniqueItems": true
20
+ },
21
+ "mode": { "enum": ["managed", "seeded"] },
22
+ "origin": { "const": "framework" },
23
+ "path": {
24
+ "minLength": 1,
25
+ "not": {
26
+ "pattern": "(^[\\\\/])|(^|[\\\\/])\\.\\.([\\\\/]|$)"
27
+ },
28
+ "type": "string"
29
+ },
30
+ "sha256": { "pattern": "^[a-f0-9]{64}$", "type": "string" }
31
+ },
32
+ "required": ["path", "mode", "origin", "sha256"],
33
+ "type": "object"
34
+ },
35
+ "type": "array"
36
+ },
37
+ "schemaVersion": { "const": 2 }
38
+ },
39
+ "required": ["schemaVersion", "kind", "frameworkVersion", "paths"],
40
+ "title": "Empire Builder Kit Standard Foundation Ownership Record v2",
41
+ "type": "object"
42
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$id": "https://empirebuilderkit.dev/schemas/foundation-requirement-v1.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "capabilities": {
7
+ "items": {
8
+ "enum": [
9
+ "network",
10
+ "routing",
11
+ "container-compute",
12
+ "postgres",
13
+ "identity",
14
+ "events",
15
+ "observability",
16
+ "configuration",
17
+ "deployment"
18
+ ],
19
+ "type": "string"
20
+ },
21
+ "type": "array",
22
+ "uniqueItems": true
23
+ },
24
+ "contract": {
25
+ "minLength": 1,
26
+ "type": "string"
27
+ }
28
+ },
29
+ "required": ["contract", "capabilities"],
30
+ "title": "Empire Builder Kit Standard Foundation Requirement v1",
31
+ "type": "object"
32
+ }
@@ -0,0 +1,117 @@
1
+ {
2
+ "$id": "https://empirebuilderkit.dev/schemas/generated-ownership-v2.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "blueprint": {
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "name": { "minLength": 1, "type": "string" },
10
+ "version": { "minLength": 1, "type": "string" }
11
+ },
12
+ "required": ["name", "version"],
13
+ "type": "object"
14
+ },
15
+ "contracts": {
16
+ "additionalProperties": false,
17
+ "properties": {
18
+ "consumes": {
19
+ "items": { "minLength": 1, "type": "string" },
20
+ "type": "array"
21
+ },
22
+ "publishes": {
23
+ "items": { "minLength": 1, "type": "string" },
24
+ "type": "array"
25
+ }
26
+ },
27
+ "required": ["publishes", "consumes"],
28
+ "type": "object"
29
+ },
30
+ "foundation": {
31
+ "$ref": "https://empirebuilderkit.dev/schemas/foundation-requirement-v1.json"
32
+ },
33
+ "inputs": { "type": "object" },
34
+ "migrationHistory": {
35
+ "items": {
36
+ "additionalProperties": false,
37
+ "properties": {
38
+ "managedPlanDigest": {
39
+ "pattern": "^[a-f0-9]{64}$",
40
+ "type": "string"
41
+ },
42
+ "migrationId": { "minLength": 1, "type": "string" },
43
+ "sourceVersion": {
44
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$",
45
+ "type": "string"
46
+ },
47
+ "targetVersion": {
48
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$",
49
+ "type": "string"
50
+ }
51
+ },
52
+ "required": [
53
+ "sourceVersion",
54
+ "targetVersion",
55
+ "migrationId",
56
+ "managedPlanDigest"
57
+ ],
58
+ "type": "object"
59
+ },
60
+ "minItems": 1,
61
+ "type": "array",
62
+ "uniqueItems": true
63
+ },
64
+ "paths": {
65
+ "items": {
66
+ "additionalProperties": false,
67
+ "properties": {
68
+ "managedJsonPointers": {
69
+ "items": {
70
+ "pattern": "^(?:/(?:[^~/]|~[01])*)+$",
71
+ "type": "string"
72
+ },
73
+ "minItems": 1,
74
+ "type": "array",
75
+ "uniqueItems": true
76
+ },
77
+ "mode": { "enum": ["managed", "seeded"] },
78
+ "origin": { "enum": ["blueprint", "composition", "framework"] },
79
+ "path": {
80
+ "minLength": 1,
81
+ "not": {
82
+ "pattern": "(^[\\\\/])|(^|[\\\\/])\\.\\.([\\\\/]|$)"
83
+ },
84
+ "type": "string"
85
+ },
86
+ "sha256": { "pattern": "^[a-f0-9]{64}$", "type": "string" }
87
+ },
88
+ "required": ["path", "mode", "origin", "sha256"],
89
+ "type": "object"
90
+ },
91
+ "type": "array"
92
+ },
93
+ "projects": {
94
+ "items": { "minLength": 1, "type": "string" },
95
+ "type": "array"
96
+ },
97
+ "schemaVersion": { "const": 2 },
98
+ "slice": { "minLength": 1, "type": "string" },
99
+ "verification": {
100
+ "items": { "minLength": 1, "type": "string" },
101
+ "type": "array"
102
+ }
103
+ },
104
+ "required": [
105
+ "schemaVersion",
106
+ "slice",
107
+ "blueprint",
108
+ "foundation",
109
+ "inputs",
110
+ "paths",
111
+ "projects",
112
+ "verification",
113
+ "contracts"
114
+ ],
115
+ "title": "Empire Builder Kit Generated Ownership Record v2",
116
+ "type": "object"
117
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$id": "https://empirebuilderkit.dev/schemas/workspace-ownership-v2.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "frameworkVersion": { "minLength": 1, "type": "string" },
7
+ "kind": { "const": "workspace" },
8
+ "paths": {
9
+ "items": {
10
+ "additionalProperties": false,
11
+ "properties": {
12
+ "managedJsonPointers": {
13
+ "items": {
14
+ "pattern": "^(?:/(?:[^~/]|~[01])*)+$",
15
+ "type": "string"
16
+ },
17
+ "minItems": 1,
18
+ "type": "array",
19
+ "uniqueItems": true
20
+ },
21
+ "mode": { "enum": ["managed", "seeded"] },
22
+ "origin": { "const": "framework" },
23
+ "path": {
24
+ "minLength": 1,
25
+ "not": {
26
+ "pattern": "(^[\\\\/])|(^|[\\\\/])\\.\\.([\\\\/]|$)"
27
+ },
28
+ "type": "string"
29
+ },
30
+ "sha256": { "pattern": "^[a-f0-9]{64}$", "type": "string" }
31
+ },
32
+ "required": ["path", "mode", "origin", "sha256"],
33
+ "type": "object"
34
+ },
35
+ "type": "array"
36
+ },
37
+ "schemaVersion": { "const": 2 }
38
+ },
39
+ "required": ["schemaVersion", "kind", "frameworkVersion", "paths"],
40
+ "title": "Empire Builder Kit Workspace Ownership Record v2",
41
+ "type": "object"
42
+ }
@@ -0,0 +1,14 @@
1
+ export interface ValidationIssue {
2
+ message: string;
3
+ path: string;
4
+ }
5
+ export type ValidationResult<T> = {
6
+ issues: [];
7
+ valid: true;
8
+ value: T;
9
+ } | {
10
+ issues: ValidationIssue[];
11
+ valid: false;
12
+ };
13
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
14
+ export declare function validationResult<T>(value: unknown, issues: ValidationIssue[]): ValidationResult<T>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isRecord = isRecord;
4
+ exports.validationResult = validationResult;
5
+ function isRecord(value) {
6
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
7
+ }
8
+ function validationResult(value, issues) {
9
+ if (issues.length > 0) {
10
+ return { issues, valid: false };
11
+ }
12
+ return { issues: [], valid: true, value: value };
13
+ }
14
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../packages/nx/src/validation.ts"],"names":[],"mappings":";;AASA,4BAEC;AAED,4CASC;AAbD,SAAgB,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAgB,gBAAgB,CAC9B,KAAc,EACd,MAAyB;IAEzB,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAClC,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAU,EAAE,CAAC;AACxD,CAAC"}