@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.
- package/LICENSE +201 -0
- package/NOTICE +5 -0
- package/README.md +25 -0
- package/executors.json +54 -0
- package/generators.json +35 -0
- package/migrations/standard-pre-v1-to-v1.md +11 -0
- package/package.json +66 -0
- package/src/blueprints/execution.d.ts +31 -0
- package/src/blueprints/execution.js +166 -0
- package/src/blueprints/execution.js.map +1 -0
- package/src/blueprints/index.d.ts +5 -0
- package/src/blueprints/index.js +9 -0
- package/src/blueprints/index.js.map +1 -0
- package/src/blueprints/inputs.d.ts +43 -0
- package/src/blueprints/inputs.js +103 -0
- package/src/blueprints/inputs.js.map +1 -0
- package/src/blueprints/manifest.d.ts +241 -0
- package/src/blueprints/manifest.js +369 -0
- package/src/blueprints/manifest.js.map +1 -0
- package/src/blueprints/resolver.d.ts +28 -0
- package/src/blueprints/resolver.js +214 -0
- package/src/blueprints/resolver.js.map +1 -0
- package/src/blueprints/transitions.d.ts +20 -0
- package/src/blueprints/transitions.js +61 -0
- package/src/blueprints/transitions.js.map +1 -0
- package/src/executors/deploy/deploy.d.ts +4 -0
- package/src/executors/deploy/deploy.js +6 -0
- package/src/executors/deploy/deploy.js.map +1 -0
- package/src/executors/dev/dev.d.ts +4 -0
- package/src/executors/dev/dev.js +6 -0
- package/src/executors/dev/dev.js.map +1 -0
- package/src/executors/dev-doctor/dev-doctor.d.ts +18 -0
- package/src/executors/dev-doctor/dev-doctor.js +145 -0
- package/src/executors/dev-doctor/dev-doctor.js.map +1 -0
- package/src/executors/dev-doctor/schema.json +17 -0
- package/src/executors/dev-setup/dev-setup.d.ts +11 -0
- package/src/executors/dev-setup/dev-setup.js +454 -0
- package/src/executors/dev-setup/dev-setup.js.map +1 -0
- package/src/executors/dev-setup/schema.json +16 -0
- package/src/executors/fleet/fleet.d.ts +51 -0
- package/src/executors/fleet/fleet.js +529 -0
- package/src/executors/fleet/fleet.js.map +1 -0
- package/src/executors/fleet/schema.json +25 -0
- package/src/executors/foundation-preflight/foundation-preflight.d.ts +15 -0
- package/src/executors/foundation-preflight/foundation-preflight.js +94 -0
- package/src/executors/foundation-preflight/foundation-preflight.js.map +1 -0
- package/src/executors/foundation-preflight/schema.json +31 -0
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.d.ts +13 -0
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js +69 -0
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js.map +1 -0
- package/src/executors/foundation-remove-preflight/schema.json +17 -0
- package/src/executors/refresh/refresh.d.ts +4 -0
- package/src/executors/refresh/refresh.js +6 -0
- package/src/executors/refresh/refresh.js.map +1 -0
- package/src/executors/remove/remove.d.ts +4 -0
- package/src/executors/remove/remove.js +6 -0
- package/src/executors/remove/remove.js.map +1 -0
- package/src/executors/sst-lifecycle/run-sst-command.d.ts +28 -0
- package/src/executors/sst-lifecycle/run-sst-command.js +154 -0
- package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -0
- package/src/executors/sst-lifecycle/schema.json +45 -0
- package/src/executors/unlock/unlock.d.ts +4 -0
- package/src/executors/unlock/unlock.js +6 -0
- package/src/executors/unlock/unlock.js.map +1 -0
- package/src/foundation/aurora-logical-database.d.ts +76 -0
- package/src/foundation/aurora-logical-database.js +419 -0
- package/src/foundation/aurora-logical-database.js.map +1 -0
- package/src/foundation/discovery.d.ts +55 -0
- package/src/foundation/discovery.js +55 -0
- package/src/foundation/discovery.js.map +1 -0
- package/src/foundation/index.d.ts +6 -0
- package/src/foundation/index.js +10 -0
- package/src/foundation/index.js.map +1 -0
- package/src/foundation/local-database-contract.d.ts +30 -0
- package/src/foundation/local-database-contract.js +75 -0
- package/src/foundation/local-database-contract.js.map +1 -0
- package/src/foundation/preflight.d.ts +31 -0
- package/src/foundation/preflight.js +114 -0
- package/src/foundation/preflight.js.map +1 -0
- package/src/foundation/provision-database-bindings.d.ts +30 -0
- package/src/foundation/provision-database-bindings.js +113 -0
- package/src/foundation/provision-database-bindings.js.map +1 -0
- package/src/foundation/provision-logical-database.d.ts +26 -0
- package/src/foundation/provision-logical-database.js +162 -0
- package/src/foundation/provision-logical-database.js.map +1 -0
- package/src/foundation/requirements.d.ts +37 -0
- package/src/foundation/requirements.js +141 -0
- package/src/foundation/requirements.js.map +1 -0
- package/src/foundation/stages.d.ts +14 -0
- package/src/foundation/stages.js +51 -0
- package/src/foundation/stages.js.map +1 -0
- package/src/generators/function/function.d.ts +13 -0
- package/src/generators/function/function.js +71 -0
- package/src/generators/function/function.js.map +1 -0
- package/src/generators/function/schema.d.ts +5 -0
- package/src/generators/function/schema.json +20 -0
- package/src/generators/job/job.d.ts +4 -0
- package/src/generators/job/job.js +5 -0
- package/src/generators/job/job.js.map +1 -0
- package/src/generators/preset/generator.d.ts +5 -0
- package/src/generators/preset/generator.js +41 -0
- package/src/generators/preset/generator.js.map +1 -0
- package/src/generators/preset/schema.d.ts +4 -0
- package/src/generators/preset/schema.json +22 -0
- package/src/generators/preset/workspace-files.d.ts +18 -0
- package/src/generators/preset/workspace-files.js +895 -0
- package/src/generators/preset/workspace-files.js.map +1 -0
- package/src/generators/service/service.d.ts +4 -0
- package/src/generators/service/service.js +5 -0
- package/src/generators/service/service.js.map +1 -0
- package/src/generators/slice/schema.d.ts +7 -0
- package/src/generators/slice/schema.json +38 -0
- package/src/generators/slice/slice.d.ts +26 -0
- package/src/generators/slice/slice.js +1676 -0
- package/src/generators/slice/slice.js.map +1 -0
- package/src/generators/upgrade/schema.d.ts +8 -0
- package/src/generators/upgrade/schema.json +31 -0
- package/src/generators/upgrade/upgrade.d.ts +27 -0
- package/src/generators/upgrade/upgrade.js +666 -0
- package/src/generators/upgrade/upgrade.js.map +1 -0
- package/src/generators/workload/schema.d.ts +6 -0
- package/src/generators/workload/schema.json +21 -0
- package/src/generators/workload/workload.d.ts +16 -0
- package/src/generators/workload/workload.js +157 -0
- package/src/generators/workload/workload.js.map +1 -0
- package/src/index.d.ts +5 -0
- package/src/index.js +9 -0
- package/src/index.js.map +1 -0
- package/src/local-dev/contracts.d.ts +31 -0
- package/src/local-dev/contracts.js +126 -0
- package/src/local-dev/contracts.js.map +1 -0
- package/src/local-dev/gateway-daemon.d.ts +4 -0
- package/src/local-dev/gateway-daemon.js +39 -0
- package/src/local-dev/gateway-daemon.js.map +1 -0
- package/src/local-dev/gateway.d.ts +60 -0
- package/src/local-dev/gateway.js +368 -0
- package/src/local-dev/gateway.js.map +1 -0
- package/src/local-dev/identity.d.ts +16 -0
- package/src/local-dev/identity.js +101 -0
- package/src/local-dev/identity.js.map +1 -0
- package/src/local-dev/index.d.ts +7 -0
- package/src/local-dev/index.js +11 -0
- package/src/local-dev/index.js.map +1 -0
- package/src/local-dev/portless.d.ts +15 -0
- package/src/local-dev/portless.js +115 -0
- package/src/local-dev/portless.js.map +1 -0
- package/src/local-dev/ports.d.ts +10 -0
- package/src/local-dev/ports.js +39 -0
- package/src/local-dev/ports.js.map +1 -0
- package/src/local-dev/proxy.d.ts +37 -0
- package/src/local-dev/proxy.js +271 -0
- package/src/local-dev/proxy.js.map +1 -0
- package/src/local-dev/tls.d.ts +24 -0
- package/src/local-dev/tls.js +294 -0
- package/src/local-dev/tls.js.map +1 -0
- package/src/ownership/composition.d.ts +16 -0
- package/src/ownership/composition.js +125 -0
- package/src/ownership/composition.js.map +1 -0
- package/src/ownership/foundation-record.d.ts +66 -0
- package/src/ownership/foundation-record.js +108 -0
- package/src/ownership/foundation-record.js.map +1 -0
- package/src/ownership/hash.d.ts +2 -0
- package/src/ownership/hash.js +10 -0
- package/src/ownership/hash.js.map +1 -0
- package/src/ownership/index.d.ts +6 -0
- package/src/ownership/index.js +10 -0
- package/src/ownership/index.js.map +1 -0
- package/src/ownership/json-ownership.d.ts +13 -0
- package/src/ownership/json-ownership.js +147 -0
- package/src/ownership/json-ownership.js.map +1 -0
- package/src/ownership/record.d.ts +186 -0
- package/src/ownership/record.js +336 -0
- package/src/ownership/record.js.map +1 -0
- package/src/ownership/workspace-record.d.ts +66 -0
- package/src/ownership/workspace-record.js +108 -0
- package/src/ownership/workspace-record.js.map +1 -0
- package/src/schemas/blueprint-input-schema-v1.json +23 -0
- package/src/schemas/blueprint-v1.json +170 -0
- package/src/schemas/foundation-ownership-v2.json +42 -0
- package/src/schemas/foundation-requirement-v1.json +32 -0
- package/src/schemas/generated-ownership-v2.json +117 -0
- package/src/schemas/workspace-ownership-v2.json +42 -0
- package/src/validation.d.ts +14 -0
- package/src/validation.js +14 -0
- 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"}
|