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

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 (243) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +5 -0
  3. package/README.md +34 -0
  4. package/executors.json +74 -0
  5. package/generators.json +40 -0
  6. package/migrations/standard-pre-v1-to-v1.md +11 -0
  7. package/package.json +80 -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 +281 -0
  18. package/src/blueprints/manifest.js +441 -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 +218 -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/deployment-plan/deployment-plan.d.ts +9 -0
  30. package/src/executors/deployment-plan/deployment-plan.js +50 -0
  31. package/src/executors/deployment-plan/deployment-plan.js.map +1 -0
  32. package/src/executors/deployment-plan/schema.json +24 -0
  33. package/src/executors/dev/dev.d.ts +4 -0
  34. package/src/executors/dev/dev.js +6 -0
  35. package/src/executors/dev/dev.js.map +1 -0
  36. package/src/executors/dev-doctor/dev-doctor.d.ts +31 -0
  37. package/src/executors/dev-doctor/dev-doctor.js +260 -0
  38. package/src/executors/dev-doctor/dev-doctor.js.map +1 -0
  39. package/src/executors/dev-doctor/schema.json +17 -0
  40. package/src/executors/dev-setup/dev-setup.d.ts +11 -0
  41. package/src/executors/dev-setup/dev-setup.js +454 -0
  42. package/src/executors/dev-setup/dev-setup.js.map +1 -0
  43. package/src/executors/dev-setup/schema.json +16 -0
  44. package/src/executors/fleet/fleet.d.ts +62 -0
  45. package/src/executors/fleet/fleet.js +613 -0
  46. package/src/executors/fleet/fleet.js.map +1 -0
  47. package/src/executors/fleet/schema.json +37 -0
  48. package/src/executors/foundation-preflight/foundation-preflight.d.ts +15 -0
  49. package/src/executors/foundation-preflight/foundation-preflight.js +116 -0
  50. package/src/executors/foundation-preflight/foundation-preflight.js.map +1 -0
  51. package/src/executors/foundation-preflight/schema.json +31 -0
  52. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.d.ts +8 -0
  53. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js +41 -0
  54. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js.map +1 -0
  55. package/src/executors/foundation-profile-preflight/schema.json +21 -0
  56. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.d.ts +13 -0
  57. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js +69 -0
  58. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js.map +1 -0
  59. package/src/executors/foundation-remove-preflight/schema.json +17 -0
  60. package/src/executors/github-bootstrap/github-bootstrap.d.ts +8 -0
  61. package/src/executors/github-bootstrap/github-bootstrap.js +30 -0
  62. package/src/executors/github-bootstrap/github-bootstrap.js.map +1 -0
  63. package/src/executors/github-bootstrap/schema.json +25 -0
  64. package/src/executors/refresh/refresh.d.ts +4 -0
  65. package/src/executors/refresh/refresh.js +6 -0
  66. package/src/executors/refresh/refresh.js.map +1 -0
  67. package/src/executors/remove/remove.d.ts +4 -0
  68. package/src/executors/remove/remove.js +6 -0
  69. package/src/executors/remove/remove.js.map +1 -0
  70. package/src/executors/sst-lifecycle/run-sst-command.d.ts +31 -0
  71. package/src/executors/sst-lifecycle/run-sst-command.js +226 -0
  72. package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -0
  73. package/src/executors/sst-lifecycle/schema.json +45 -0
  74. package/src/executors/unlock/unlock.d.ts +4 -0
  75. package/src/executors/unlock/unlock.js +6 -0
  76. package/src/executors/unlock/unlock.js.map +1 -0
  77. package/src/executors/work-markers/schema.json +14 -0
  78. package/src/executors/work-markers/work-markers.d.ts +6 -0
  79. package/src/executors/work-markers/work-markers.js +20 -0
  80. package/src/executors/work-markers/work-markers.js.map +1 -0
  81. package/src/foundation/aurora-logical-database.d.ts +76 -0
  82. package/src/foundation/aurora-logical-database.js +419 -0
  83. package/src/foundation/aurora-logical-database.js.map +1 -0
  84. package/src/foundation/discovery.d.ts +55 -0
  85. package/src/foundation/discovery.js +55 -0
  86. package/src/foundation/discovery.js.map +1 -0
  87. package/src/foundation/index.d.ts +6 -0
  88. package/src/foundation/index.js +10 -0
  89. package/src/foundation/index.js.map +1 -0
  90. package/src/foundation/local-database-contract.d.ts +30 -0
  91. package/src/foundation/local-database-contract.js +75 -0
  92. package/src/foundation/local-database-contract.js.map +1 -0
  93. package/src/foundation/preflight.d.ts +31 -0
  94. package/src/foundation/preflight.js +114 -0
  95. package/src/foundation/preflight.js.map +1 -0
  96. package/src/foundation/provision-database-bindings.d.ts +30 -0
  97. package/src/foundation/provision-database-bindings.js +113 -0
  98. package/src/foundation/provision-database-bindings.js.map +1 -0
  99. package/src/foundation/provision-logical-database.d.ts +26 -0
  100. package/src/foundation/provision-logical-database.js +163 -0
  101. package/src/foundation/provision-logical-database.js.map +1 -0
  102. package/src/foundation/requirements.d.ts +37 -0
  103. package/src/foundation/requirements.js +141 -0
  104. package/src/foundation/requirements.js.map +1 -0
  105. package/src/foundation/stages.d.ts +14 -0
  106. package/src/foundation/stages.js +51 -0
  107. package/src/foundation/stages.js.map +1 -0
  108. package/src/generators/function/function.d.ts +13 -0
  109. package/src/generators/function/function.js +71 -0
  110. package/src/generators/function/function.js.map +1 -0
  111. package/src/generators/function/schema.d.ts +5 -0
  112. package/src/generators/function/schema.json +20 -0
  113. package/src/generators/job/job.d.ts +4 -0
  114. package/src/generators/job/job.js +5 -0
  115. package/src/generators/job/job.js.map +1 -0
  116. package/src/generators/preset/generator.d.ts +5 -0
  117. package/src/generators/preset/generator.js +41 -0
  118. package/src/generators/preset/generator.js.map +1 -0
  119. package/src/generators/preset/schema.d.ts +4 -0
  120. package/src/generators/preset/schema.json +22 -0
  121. package/src/generators/preset/workspace-files.d.ts +18 -0
  122. package/src/generators/preset/workspace-files.js +1605 -0
  123. package/src/generators/preset/workspace-files.js.map +1 -0
  124. package/src/generators/repository-policy/repository-policy.d.ts +4 -0
  125. package/src/generators/repository-policy/repository-policy.js +107 -0
  126. package/src/generators/repository-policy/repository-policy.js.map +1 -0
  127. package/src/generators/repository-policy/schema.d.ts +18 -0
  128. package/src/generators/repository-policy/schema.json +46 -0
  129. package/src/generators/service/service.d.ts +4 -0
  130. package/src/generators/service/service.js +5 -0
  131. package/src/generators/service/service.js.map +1 -0
  132. package/src/generators/slice/schema.d.ts +7 -0
  133. package/src/generators/slice/schema.json +38 -0
  134. package/src/generators/slice/slice.d.ts +26 -0
  135. package/src/generators/slice/slice.js +1698 -0
  136. package/src/generators/slice/slice.js.map +1 -0
  137. package/src/generators/upgrade/schema.d.ts +8 -0
  138. package/src/generators/upgrade/schema.json +31 -0
  139. package/src/generators/upgrade/upgrade.d.ts +27 -0
  140. package/src/generators/upgrade/upgrade.js +682 -0
  141. package/src/generators/upgrade/upgrade.js.map +1 -0
  142. package/src/generators/workload/schema.d.ts +6 -0
  143. package/src/generators/workload/schema.json +21 -0
  144. package/src/generators/workload/workload.d.ts +16 -0
  145. package/src/generators/workload/workload.js +157 -0
  146. package/src/generators/workload/workload.js.map +1 -0
  147. package/src/git-policy/action-pins.d.ts +28 -0
  148. package/src/git-policy/action-pins.js +35 -0
  149. package/src/git-policy/action-pins.js.map +1 -0
  150. package/src/git-policy/github-bootstrap.d.ts +23 -0
  151. package/src/git-policy/github-bootstrap.js +759 -0
  152. package/src/git-policy/github-bootstrap.js.map +1 -0
  153. package/src/git-policy/index.d.ts +3 -0
  154. package/src/git-policy/index.js +7 -0
  155. package/src/git-policy/index.js.map +1 -0
  156. package/src/git-policy/routing.d.ts +15 -0
  157. package/src/git-policy/routing.js +77 -0
  158. package/src/git-policy/routing.js.map +1 -0
  159. package/src/index.d.ts +8 -0
  160. package/src/index.js +12 -0
  161. package/src/index.js.map +1 -0
  162. package/src/local-dev/contracts.d.ts +31 -0
  163. package/src/local-dev/contracts.js +126 -0
  164. package/src/local-dev/contracts.js.map +1 -0
  165. package/src/local-dev/effects.d.ts +16 -0
  166. package/src/local-dev/effects.js +63 -0
  167. package/src/local-dev/effects.js.map +1 -0
  168. package/src/local-dev/gateway-daemon.d.ts +4 -0
  169. package/src/local-dev/gateway-daemon.js +39 -0
  170. package/src/local-dev/gateway-daemon.js.map +1 -0
  171. package/src/local-dev/gateway.d.ts +60 -0
  172. package/src/local-dev/gateway.js +368 -0
  173. package/src/local-dev/gateway.js.map +1 -0
  174. package/src/local-dev/identity.d.ts +16 -0
  175. package/src/local-dev/identity.js +101 -0
  176. package/src/local-dev/identity.js.map +1 -0
  177. package/src/local-dev/index.d.ts +7 -0
  178. package/src/local-dev/index.js +11 -0
  179. package/src/local-dev/index.js.map +1 -0
  180. package/src/local-dev/portless.d.ts +15 -0
  181. package/src/local-dev/portless.js +115 -0
  182. package/src/local-dev/portless.js.map +1 -0
  183. package/src/local-dev/ports.d.ts +10 -0
  184. package/src/local-dev/ports.js +39 -0
  185. package/src/local-dev/ports.js.map +1 -0
  186. package/src/local-dev/proxy.d.ts +37 -0
  187. package/src/local-dev/proxy.js +271 -0
  188. package/src/local-dev/proxy.js.map +1 -0
  189. package/src/local-dev/tls.d.ts +24 -0
  190. package/src/local-dev/tls.js +294 -0
  191. package/src/local-dev/tls.js.map +1 -0
  192. package/src/ownership/composition.d.ts +16 -0
  193. package/src/ownership/composition.js +125 -0
  194. package/src/ownership/composition.js.map +1 -0
  195. package/src/ownership/foundation-record.d.ts +66 -0
  196. package/src/ownership/foundation-record.js +108 -0
  197. package/src/ownership/foundation-record.js.map +1 -0
  198. package/src/ownership/hash.d.ts +2 -0
  199. package/src/ownership/hash.js +10 -0
  200. package/src/ownership/hash.js.map +1 -0
  201. package/src/ownership/index.d.ts +6 -0
  202. package/src/ownership/index.js +10 -0
  203. package/src/ownership/index.js.map +1 -0
  204. package/src/ownership/json-ownership.d.ts +13 -0
  205. package/src/ownership/json-ownership.js +147 -0
  206. package/src/ownership/json-ownership.js.map +1 -0
  207. package/src/ownership/record.d.ts +186 -0
  208. package/src/ownership/record.js +336 -0
  209. package/src/ownership/record.js.map +1 -0
  210. package/src/ownership/workspace-record.d.ts +66 -0
  211. package/src/ownership/workspace-record.js +108 -0
  212. package/src/ownership/workspace-record.js.map +1 -0
  213. package/src/repository-policy/aurora-preflight.d.ts +15 -0
  214. package/src/repository-policy/aurora-preflight.js +45 -0
  215. package/src/repository-policy/aurora-preflight.js.map +1 -0
  216. package/src/repository-policy/deployment-plan.d.ts +24 -0
  217. package/src/repository-policy/deployment-plan.js +124 -0
  218. package/src/repository-policy/deployment-plan.js.map +1 -0
  219. package/src/repository-policy/foundation-profile.d.ts +20 -0
  220. package/src/repository-policy/foundation-profile.js +45 -0
  221. package/src/repository-policy/foundation-profile.js.map +1 -0
  222. package/src/repository-policy/index.d.ts +4 -0
  223. package/src/repository-policy/index.js +8 -0
  224. package/src/repository-policy/index.js.map +1 -0
  225. package/src/repository-policy/policy.d.ts +59 -0
  226. package/src/repository-policy/policy.js +274 -0
  227. package/src/repository-policy/policy.js.map +1 -0
  228. package/src/schemas/blueprint-input-schema-v1.json +23 -0
  229. package/src/schemas/blueprint-v1.json +186 -0
  230. package/src/schemas/foundation-ownership-v2.json +42 -0
  231. package/src/schemas/foundation-requirement-v1.json +32 -0
  232. package/src/schemas/generated-ownership-v2.json +117 -0
  233. package/src/schemas/repository-policy-v1.json +58 -0
  234. package/src/schemas/workspace-ownership-v2.json +42 -0
  235. package/src/validation.d.ts +14 -0
  236. package/src/validation.js +14 -0
  237. package/src/validation.js.map +1 -0
  238. package/src/work-markers/index.d.ts +1 -0
  239. package/src/work-markers/index.js +5 -0
  240. package/src/work-markers/index.js.map +1 -0
  241. package/src/work-markers/work-markers.d.ts +39 -0
  242. package/src/work-markers/work-markers.js +359 -0
  243. package/src/work-markers/work-markers.js.map +1 -0
@@ -0,0 +1,186 @@
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
+ "secrets": {
146
+ "items": {
147
+ "additionalProperties": false,
148
+ "properties": {
149
+ "description": { "minLength": 1, "type": "string" },
150
+ "documentation": { "pattern": "^\\./", "type": "string" },
151
+ "name": { "pattern": "^[A-Z][A-Za-z0-9]*$", "type": "string" },
152
+ "schema": { "pattern": "^\\./", "type": "string" },
153
+ "valueType": { "enum": ["string", "json", "binary"] }
154
+ },
155
+ "required": ["name", "description", "valueType", "documentation"],
156
+ "type": "object"
157
+ },
158
+ "minItems": 1,
159
+ "type": "array"
160
+ },
161
+ "type": { "const": "empire-builder-kit-blueprint" },
162
+ "verification": {
163
+ "items": { "minLength": 1, "type": "string" },
164
+ "minItems": 1,
165
+ "type": "array",
166
+ "uniqueItems": true
167
+ },
168
+ "version": {
169
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$",
170
+ "type": "string"
171
+ }
172
+ },
173
+ "required": [
174
+ "type",
175
+ "name",
176
+ "version",
177
+ "engine",
178
+ "kind",
179
+ "generator",
180
+ "inputs",
181
+ "foundation",
182
+ "verification"
183
+ ],
184
+ "title": "Empire Builder Kit Blueprint Manifest v1",
185
+ "type": "object"
186
+ }
@@ -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,58 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://empirebuilderkit.dev/schemas/repository-policy-v1.json",
4
+ "title": "Empire Builder Kit repository operating policy v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "productionAccess",
10
+ "productionApproval",
11
+ "slices"
12
+ ],
13
+ "properties": {
14
+ "$schema": { "type": "string", "minLength": 1 },
15
+ "schemaVersion": { "const": 1 },
16
+ "productionAccess": {
17
+ "type": "string",
18
+ "enum": ["disabled", "controlled"]
19
+ },
20
+ "productionApproval": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["mode"],
24
+ "properties": {
25
+ "mode": {
26
+ "type": "string",
27
+ "enum": ["promotion-pr", "environment-reviewer"]
28
+ }
29
+ }
30
+ },
31
+ "productionFoundation": {
32
+ "type": "object",
33
+ "additionalProperties": false,
34
+ "required": ["profile"],
35
+ "properties": {
36
+ "profile": {
37
+ "type": "string",
38
+ "enum": ["cost-optimized", "standard"]
39
+ }
40
+ }
41
+ },
42
+ "slices": {
43
+ "type": "object",
44
+ "propertyNames": { "pattern": "^[a-z0-9][a-z0-9-]*$" },
45
+ "additionalProperties": {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "required": ["productionStatus"],
49
+ "properties": {
50
+ "productionStatus": {
51
+ "type": "string",
52
+ "enum": ["blocked", "pilot", "ready"]
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
@@ -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"}
@@ -0,0 +1 @@
1
+ export * from './work-markers.js';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./work-markers.js"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/nx/src/work-markers/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC"}
@@ -0,0 +1,39 @@
1
+ import { type GeneratedPathMode } from '../ownership/index.js';
2
+ export declare const WORK_MARKER_KINDS: readonly ["TODO", "ASSUMPTION", "QUESTION", "SECURITY", "BLOCKER"];
3
+ export type WorkMarkerKind = (typeof WORK_MARKER_KINDS)[number];
4
+ export type WorkMarkerOwnership = GeneratedPathMode | 'user-owned';
5
+ export type WorkMarkerCommentPrefix = '//' | '#' | '--' | '/*' | '<!--';
6
+ export interface WorkMarkerCommentInput {
7
+ commentPrefix?: WorkMarkerCommentPrefix;
8
+ description: string;
9
+ kind: WorkMarkerKind;
10
+ reference: string;
11
+ }
12
+ export interface WorkMarker {
13
+ description: string;
14
+ kind: WorkMarkerKind;
15
+ line: number;
16
+ ownership: WorkMarkerOwnership;
17
+ path: string;
18
+ reference: string;
19
+ }
20
+ export type WorkMarkerIssueCode = 'invalid-marker-syntax' | 'invalid-ownership-record' | 'managed-file-marker' | 'ownership-conflict' | 'unreadable-path' | 'unknown-marker-kind';
21
+ export interface WorkMarkerIssue {
22
+ code: WorkMarkerIssueCode;
23
+ line: number;
24
+ message: string;
25
+ path: string;
26
+ }
27
+ export interface WorkMarkerReport {
28
+ blockingMarkers: WorkMarker[];
29
+ issues: WorkMarkerIssue[];
30
+ markers: WorkMarker[];
31
+ root: string;
32
+ }
33
+ export interface WorkMarkerAssertionOptions {
34
+ protectedPromotion?: boolean;
35
+ }
36
+ export declare function scanWorkMarkers(root: string): WorkMarkerReport;
37
+ export declare function formatWorkMarkerComment(input: WorkMarkerCommentInput): string;
38
+ export declare function formatWorkMarkerReport(report: WorkMarkerReport): string;
39
+ export declare function assertWorkMarkerReport(report: WorkMarkerReport, options?: WorkMarkerAssertionOptions): void;