@empire-builder-kit/nx 1.0.0-beta.5 → 1.0.0-beta.7

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 (74) hide show
  1. package/README.md +13 -4
  2. package/executors.json +20 -0
  3. package/generators.json +5 -0
  4. package/package.json +15 -1
  5. package/src/executors/deployment-plan/deployment-plan.d.ts +9 -0
  6. package/src/executors/deployment-plan/deployment-plan.js +50 -0
  7. package/src/executors/deployment-plan/deployment-plan.js.map +1 -0
  8. package/src/executors/deployment-plan/schema.json +24 -0
  9. package/src/executors/foundation-preflight/foundation-preflight.js +22 -0
  10. package/src/executors/foundation-preflight/foundation-preflight.js.map +1 -1
  11. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.d.ts +8 -0
  12. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js +41 -0
  13. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js.map +1 -0
  14. package/src/executors/foundation-profile-preflight/schema.json +21 -0
  15. package/src/executors/github-bootstrap/github-bootstrap.d.ts +8 -0
  16. package/src/executors/github-bootstrap/github-bootstrap.js +30 -0
  17. package/src/executors/github-bootstrap/github-bootstrap.js.map +1 -0
  18. package/src/executors/github-bootstrap/schema.json +25 -0
  19. package/src/executors/sst-lifecycle/run-sst-command.d.ts +2 -0
  20. package/src/executors/sst-lifecycle/run-sst-command.js +58 -5
  21. package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -1
  22. package/src/executors/work-markers/schema.json +14 -0
  23. package/src/executors/work-markers/work-markers.d.ts +6 -0
  24. package/src/executors/work-markers/work-markers.js +20 -0
  25. package/src/executors/work-markers/work-markers.js.map +1 -0
  26. package/src/generators/preset/workspace-files.d.ts +1 -1
  27. package/src/generators/preset/workspace-files.js +739 -38
  28. package/src/generators/preset/workspace-files.js.map +1 -1
  29. package/src/generators/repository-policy/repository-policy.d.ts +4 -0
  30. package/src/generators/repository-policy/repository-policy.js +107 -0
  31. package/src/generators/repository-policy/repository-policy.js.map +1 -0
  32. package/src/generators/repository-policy/schema.d.ts +18 -0
  33. package/src/generators/repository-policy/schema.json +46 -0
  34. package/src/generators/slice/slice.js +22 -0
  35. package/src/generators/slice/slice.js.map +1 -1
  36. package/src/generators/upgrade/upgrade.js +16 -0
  37. package/src/generators/upgrade/upgrade.js.map +1 -1
  38. package/src/git-policy/action-pins.d.ts +28 -0
  39. package/src/git-policy/action-pins.js +35 -0
  40. package/src/git-policy/action-pins.js.map +1 -0
  41. package/src/git-policy/github-bootstrap.d.ts +23 -0
  42. package/src/git-policy/github-bootstrap.js +759 -0
  43. package/src/git-policy/github-bootstrap.js.map +1 -0
  44. package/src/git-policy/index.d.ts +3 -0
  45. package/src/git-policy/index.js +7 -0
  46. package/src/git-policy/index.js.map +1 -0
  47. package/src/git-policy/routing.d.ts +15 -0
  48. package/src/git-policy/routing.js +77 -0
  49. package/src/git-policy/routing.js.map +1 -0
  50. package/src/index.d.ts +3 -0
  51. package/src/index.js +3 -0
  52. package/src/index.js.map +1 -1
  53. package/src/repository-policy/aurora-preflight.d.ts +15 -0
  54. package/src/repository-policy/aurora-preflight.js +45 -0
  55. package/src/repository-policy/aurora-preflight.js.map +1 -0
  56. package/src/repository-policy/deployment-plan.d.ts +24 -0
  57. package/src/repository-policy/deployment-plan.js +124 -0
  58. package/src/repository-policy/deployment-plan.js.map +1 -0
  59. package/src/repository-policy/foundation-profile.d.ts +20 -0
  60. package/src/repository-policy/foundation-profile.js +45 -0
  61. package/src/repository-policy/foundation-profile.js.map +1 -0
  62. package/src/repository-policy/index.d.ts +4 -0
  63. package/src/repository-policy/index.js +8 -0
  64. package/src/repository-policy/index.js.map +1 -0
  65. package/src/repository-policy/policy.d.ts +59 -0
  66. package/src/repository-policy/policy.js +274 -0
  67. package/src/repository-policy/policy.js.map +1 -0
  68. package/src/schemas/repository-policy-v1.json +58 -0
  69. package/src/work-markers/index.d.ts +1 -0
  70. package/src/work-markers/index.js +5 -0
  71. package/src/work-markers/index.js.map +1 -0
  72. package/src/work-markers/work-markers.d.ts +39 -0
  73. package/src/work-markers/work-markers.js +359 -0
  74. package/src/work-markers/work-markers.js.map +1 -0
package/README.md CHANGED
@@ -9,12 +9,21 @@ Generators:
9
9
  - `function`
10
10
  - `service`
11
11
  - `job`
12
+ - `repository-policy`
12
13
  - `upgrade`
13
14
 
14
- The package also owns Foundation discovery and preflight, trusted external
15
- Blueprint execution, Standard Foundation and Product Slice generated-file
16
- ownership, and Nx-wrapped SST lifecycle executors. Consumers should never
17
- invoke SST lifecycle commands directly.
15
+ The package also owns Repository Operating Policy validation and protected
16
+ deployment planning, generated Git routing and report-first GitHub bootstrap,
17
+ Foundation discovery/profile preflight, trusted external Blueprint execution,
18
+ generated-file ownership, ownership-aware agent work-marker reporting and
19
+ protected-promotion enforcement, and Nx-wrapped SST lifecycle executors.
20
+ Consumers should never invoke SST lifecycle commands directly.
21
+
22
+ Generated workspaces expose `work-markers` as both a direct target and part of
23
+ workspace health. The generated `AGENTS.md`, `CLAUDE.md`, and runbook define how
24
+ deterministic generators and updates can hand contextual work to agents without
25
+ placing markers in managed output. The public `formatWorkMarkerComment` helper
26
+ keeps Blueprint and repository-update handoffs on the same canonical syntax.
18
27
 
19
28
  External Blueprints must be exact-version packages allowed by the workspace
20
29
  trust policy. Their generator runs in a bounded child process, which is a
package/executors.json CHANGED
@@ -15,11 +15,31 @@
15
15
  "schema": "./src/executors/dev-setup/schema.json",
16
16
  "description": "Explicitly create, trust, upgrade, or remove the per-user local HTTPS gateway."
17
17
  },
18
+ "deployment-plan": {
19
+ "implementation": "./src/executors/deployment-plan/deployment-plan",
20
+ "schema": "./src/executors/deployment-plan/schema.json",
21
+ "description": "Atomically validate and select the complete protected deployment set before AWS access."
22
+ },
23
+ "work-markers": {
24
+ "implementation": "./src/executors/work-markers/work-markers",
25
+ "schema": "./src/executors/work-markers/schema.json",
26
+ "description": "Report ownership-aware source work markers and enforce protected-promotion blockers."
27
+ },
28
+ "github-bootstrap": {
29
+ "implementation": "./src/executors/github-bootstrap/github-bootstrap",
30
+ "schema": "./src/executors/github-bootstrap/schema.json",
31
+ "description": "Report or explicitly apply protected GitHub rulesets and environments without creating secrets."
32
+ },
18
33
  "foundation-preflight": {
19
34
  "implementation": "./src/executors/foundation-preflight/foundation-preflight",
20
35
  "schema": "./src/executors/foundation-preflight/schema.json",
21
36
  "description": "Validate the deployed Standard Foundation contract before operating a Product Slice."
22
37
  },
38
+ "foundation-profile-preflight": {
39
+ "implementation": "./src/executors/foundation-profile-preflight/foundation-profile-preflight",
40
+ "schema": "./src/executors/foundation-profile-preflight/schema.json",
41
+ "description": "Verify the pinned Aurora profile capability before a protected Foundation mutation."
42
+ },
23
43
  "foundation-remove-preflight": {
24
44
  "implementation": "./src/executors/foundation-remove-preflight/foundation-remove-preflight",
25
45
  "schema": "./src/executors/foundation-remove-preflight/schema.json",
package/generators.json CHANGED
@@ -20,6 +20,11 @@
20
20
  "schema": "./src/generators/slice/schema.json",
21
21
  "description": "Generate an EBK v1 product slice from the built-in or a trusted external Blueprint."
22
22
  },
23
+ "repository-policy": {
24
+ "factory": "./src/generators/repository-policy/repository-policy",
25
+ "schema": "./src/generators/repository-policy/schema.json",
26
+ "description": "Report or apply an explicit source-controlled Repository Operating Policy change without touching AWS or GitHub."
27
+ },
23
28
  "upgrade": {
24
29
  "factory": "./src/generators/upgrade/upgrade",
25
30
  "schema": "./src/generators/upgrade/schema.json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empire-builder-kit/nx",
3
- "version": "1.0.0-beta.5",
3
+ "version": "1.0.0-beta.7",
4
4
  "description": "Nx generators, executors, and Blueprint contracts for Empire Builder Kit",
5
5
  "license": "Apache-2.0",
6
6
  "type": "commonjs",
@@ -20,6 +20,10 @@
20
20
  "types": "./src/foundation/index.d.ts",
21
21
  "default": "./src/foundation/index.js"
22
22
  },
23
+ "./git-policy": {
24
+ "types": "./src/git-policy/index.d.ts",
25
+ "default": "./src/git-policy/index.js"
26
+ },
23
27
  "./local-dev": {
24
28
  "types": "./src/local-dev/index.d.ts",
25
29
  "default": "./src/local-dev/index.js"
@@ -28,11 +32,20 @@
28
32
  "types": "./src/ownership/index.d.ts",
29
33
  "default": "./src/ownership/index.js"
30
34
  },
35
+ "./repository-policy": {
36
+ "types": "./src/repository-policy/index.d.ts",
37
+ "default": "./src/repository-policy/index.js"
38
+ },
39
+ "./work-markers": {
40
+ "types": "./src/work-markers/index.d.ts",
41
+ "default": "./src/work-markers/index.js"
42
+ },
31
43
  "./schemas/blueprint-v1.json": "./src/schemas/blueprint-v1.json",
32
44
  "./schemas/blueprint-input-schema-v1.json": "./src/schemas/blueprint-input-schema-v1.json",
33
45
  "./schemas/foundation-requirement-v1.json": "./src/schemas/foundation-requirement-v1.json",
34
46
  "./schemas/foundation-ownership-v2.json": "./src/schemas/foundation-ownership-v2.json",
35
47
  "./schemas/generated-ownership-v2.json": "./src/schemas/generated-ownership-v2.json",
48
+ "./schemas/repository-policy-v1.json": "./src/schemas/repository-policy-v1.json",
36
49
  "./schemas/workspace-ownership-v2.json": "./src/schemas/workspace-ownership-v2.json"
37
50
  },
38
51
  "generators": "./generators.json",
@@ -43,6 +56,7 @@
43
56
  },
44
57
  "dependencies": {
45
58
  "@nx/devkit": "23.1.0",
59
+ "@aws-sdk/client-rds": "^3.700.0",
46
60
  "@aws-sdk/client-rds-data": "^3.700.0",
47
61
  "@aws-sdk/client-ssm": "^3.700.0",
48
62
  "@aws-sdk/credential-providers": "^3.700.0",
@@ -0,0 +1,9 @@
1
+ import { type PromiseExecutor } from '@nx/devkit';
2
+ import { type ProtectedDeploymentAction, type ProtectedDeploymentStage } from '../../repository-policy/index.js';
3
+ interface DeploymentPlanOptions {
4
+ action: ProtectedDeploymentAction;
5
+ project?: string;
6
+ stage: ProtectedDeploymentStage;
7
+ }
8
+ declare const executor: PromiseExecutor<DeploymentPlanOptions>;
9
+ export default executor;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const node_fs_1 = require("node:fs");
4
+ const devkit_1 = require("@nx/devkit");
5
+ const index_js_1 = require("../../repository-policy/index.js");
6
+ const index_js_2 = require("../../work-markers/index.js");
7
+ function writeGithubOutputs(plan) {
8
+ const output = process.env.GITHUB_OUTPUT?.trim();
9
+ if (!output)
10
+ return;
11
+ (0, node_fs_1.appendFileSync)(output, [
12
+ `foundation_project=${plan.foundationProject ?? ''}`,
13
+ `foundation_profile=${plan.effectiveProductionProfile ?? ''}`,
14
+ `has_slices=${plan.sliceProjects.length > 0 ? 'true' : 'false'}`,
15
+ `ordered_projects=${plan.orderedProjects.join(',')}`,
16
+ `slice_projects=${plan.sliceProjects.join(',')}`,
17
+ '',
18
+ ].join('\n'), 'utf8');
19
+ }
20
+ const executor = async (options, context) => {
21
+ try {
22
+ if (options.action === 'deploy' || options.action === 'refresh') {
23
+ const markerReport = (0, index_js_2.scanWorkMarkers)(context.root);
24
+ devkit_1.logger.info((0, index_js_2.formatWorkMarkerReport)(markerReport));
25
+ (0, index_js_2.assertWorkMarkerReport)(markerReport, { protectedPromotion: true });
26
+ }
27
+ const policy = (0, index_js_1.readRepositoryOperatingPolicy)(context.root);
28
+ const plan = (0, index_js_1.createProtectedDeploymentPlan)(policy, {
29
+ action: options.action,
30
+ projects: Object.entries(context.projectsConfigurations?.projects ?? {}).map(([name, project]) => ({
31
+ name,
32
+ tags: project.tags,
33
+ targets: project.targets,
34
+ })),
35
+ ...(options.project?.trim()
36
+ ? { requestedProject: options.project.trim() }
37
+ : {}),
38
+ stage: options.stage,
39
+ });
40
+ devkit_1.logger.info(`[ebk-deployment-plan] validated before AWS access\n${JSON.stringify(plan, null, 2)}`);
41
+ writeGithubOutputs(plan);
42
+ return { success: true };
43
+ }
44
+ catch (error) {
45
+ devkit_1.logger.error(error instanceof Error ? error.message : String(error));
46
+ return { success: false };
47
+ }
48
+ };
49
+ exports.default = executor;
50
+ //# sourceMappingURL=deployment-plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployment-plan.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/deployment-plan/deployment-plan.ts"],"names":[],"mappings":";;AAAA,qCAAyC;AACzC,uCAA0D;AAC1D,+DAK0C;AAC1C,0DAIqC;AAQrC,SAAS,kBAAkB,CAAC,IAK3B;IACC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC;IACjD,IAAI,CAAC,MAAM;QAAE,OAAO;IACpB,IAAA,wBAAc,EACZ,MAAM,EACN;QACE,sBAAsB,IAAI,CAAC,iBAAiB,IAAI,EAAE,EAAE;QACpD,sBAAsB,IAAI,CAAC,0BAA0B,IAAI,EAAE,EAAE;QAC7D,cAAc,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE;QAChE,oBAAoB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QACpD,kBAAkB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAChD,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ,MAAM,CACP,CAAC;AACJ,CAAC;AAED,MAAM,QAAQ,GAA2C,KAAK,EAC5D,OAAO,EACP,OAAO,EACP,EAAE;IACF,IAAI,CAAC;QACH,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAChE,MAAM,YAAY,GAAG,IAAA,0BAAe,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACnD,eAAM,CAAC,IAAI,CAAC,IAAA,iCAAsB,EAAC,YAAY,CAAC,CAAC,CAAC;YAClD,IAAA,iCAAsB,EAAC,YAAY,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC,CAAC;QACrE,CAAC;QACD,MAAM,MAAM,GA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an",
5
+ "description": "Validate the complete protected project set before any AWS credentials or mutation are available.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "action": {
10
+ "type": "string",
11
+ "enum": ["deploy", "refresh", "remove", "unlock"]
12
+ },
13
+ "stage": {
14
+ "type": "string",
15
+ "enum": ["staging", "production"]
16
+ },
17
+ "project": {
18
+ "type": "string",
19
+ "pattern": "^[a-z0-9][a-z0-9-]*$",
20
+ "description": "Required only for explicit remove or unlock recovery. Deploy and refresh derive their complete set from policy."
21
+ }
22
+ },
23
+ "required": ["action", "stage"]
24
+ }
@@ -4,6 +4,7 @@ const devkit_1 = require("@nx/devkit");
4
4
  const preflight_js_1 = require("../../foundation/preflight.js");
5
5
  const discovery_js_1 = require("../../foundation/discovery.js");
6
6
  const stages_js_1 = require("../../foundation/stages.js");
7
+ const index_js_1 = require("../../repository-policy/index.js");
7
8
  const run_sst_command_js_1 = require("../sst-lifecycle/run-sst-command.js");
8
9
  async function deployFoundation(options, context, foundationStage) {
9
10
  const project = options.foundationProject?.trim() || 'foundation';
@@ -33,6 +34,22 @@ const executor = async (options, context) => {
33
34
  devkit_1.logger.error(error instanceof Error ? error.message : String(error));
34
35
  return { success: false };
35
36
  }
37
+ if (stages.consumerStage === 'production') {
38
+ try {
39
+ if (!context.projectName) {
40
+ throw new Error('Production Foundation preflight requires an Nx Product Slice project name.');
41
+ }
42
+ (0, index_js_1.assertRepositoryPolicyRequest)(context.root, {
43
+ action: 'deploy',
44
+ projects: [{ kind: 'slice', name: context.projectName }],
45
+ stage: stages.consumerStage,
46
+ });
47
+ }
48
+ catch (error) {
49
+ devkit_1.logger.error(error instanceof Error ? error.message : String(error));
50
+ return { success: false };
51
+ }
52
+ }
36
53
  const requestedRegion = options.region?.trim() ||
37
54
  process.env.AWS_REGION?.trim() ||
38
55
  process.env.AWS_DEFAULT_REGION?.trim();
@@ -56,6 +73,11 @@ const executor = async (options, context) => {
56
73
  if (report.state === 'absent' &&
57
74
  options.deployIfMissing === true &&
58
75
  !stages.mapped) {
76
+ if (stages.foundationStage === 'staging' ||
77
+ stages.foundationStage === 'production') {
78
+ devkit_1.logger.error(`[foundation-preflight] ${stages.foundationStage} Foundation is absent. Protected workflows must run the Foundation target and its profile capability preflight before Product Slices; Foundation auto-deploy is disabled for protected stages.`);
79
+ return { success: false };
80
+ }
59
81
  const deployed = await deployFoundation(options, context, stages.foundationStage);
60
82
  if (!deployed)
61
83
  return { success: false };
@@ -1 +1 @@
1
- {"version":3,"file":"foundation-preflight.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/foundation-preflight/foundation-preflight.ts"],"names":[],"mappings":";;AAAA,uCAAgF;AAChF,gEAIuC;AACvC,gEAAgF;AAEhF,0DAAqE;AACrE,4EAAoE;AAcpE,KAAK,UAAU,gBAAgB,CAC7B,OAAmC,EACnC,OAAwB,EACxB,eAAuB;IAEvB,MAAM,OAAO,GAAG,OAAO,CAAC,iBAAiB,EAAE,IAAI,EAAE,IAAI,YAAY,CAAC;IAClE,MAAM,IAAI,GAAG,OAAO,CAAC,sBAAsB,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC;IACrE,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,eAAM,CAAC,KAAK,CACV,6CAA6C,OAAO,yCAAyC,CAC9F,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;IAED,eAAM,CAAC,IAAI,CACT,oCAAoC,OAAO,uBAAuB,eAAe,GAAG,CACrF,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,IAAA,kCAAa,EAChC,QAAQ,EACR;QACE,GAAG,EAAE,IAAI;QACT,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvE,KAAK,EAAE,eAAe;QACtB,SAAS,EAAE,YAAY;KACxB,EACD,EAA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OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,IAAI,OAAO,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;YAC9B,eAAM,CAAC,IAAI,CACT,wCAAwC,MAAM,CAAC,aAAa,oBAAoB,MAAM,CAAC,eAAe,WAAW,MAAM,oDAAoD,OAAO,EAAE,CACrL,CAAC;YACF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QACD,eAAM,CAAC,KAAK,CACV,wCAAwC,MAAM,CAAC,aAAa,oBAAoB,MAAM,CAAC,eAAe,WAAW,MAAM,4BAA4B,OAAO,EAAE,CAC7J,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"foundation-preflight.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/foundation-preflight/foundation-preflight.ts"],"names":[],"mappings":";;AAAA,uCAAgF;AAChF,gEAIuC;AACvC,gEAAgF;AAEhF,0DAAqE;AACrE,+DAAiF;AACjF,4EAAoE;AAcpE,KAAK,UAAU,gBAAgB,CAC7B,OAAmC,EACnC,OAAwB,EACxB,eAAuB;IAEvB,MAAM,OAAO,GAAG,OAAO,CAAC,iBAAiB,EAAE,IAAI,EAAE,IAAI,YAAY,CAAC;IAClE,MAAM,IAAI,GAAG,OAAO,CAAC,sBAAsB,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC;IACrE,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,eAAM,CAAC,KAAK,CACV,6CAA6C,OAAO,yCAAyC,CAC9F,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;IAED,eAAM,CAAC,IAAI,CACT,oCAAoC,OAAO,uBAAuB,eAAe,GAAG,CACrF,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,IAAA,kCAAa,EAChC,QAAQ,EACR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AAI,EAAE,CAAC;YAC9B,eAAM,CAAC,IAAI,CACT,wCAAwC,MAAM,CAAC,aAAa,oBAAoB,MAAM,CAAC,eAAe,WAAW,MAAM,oDAAoD,OAAO,EAAE,CACrL,CAAC;YACF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QACD,eAAM,CAAC,KAAK,CACV,wCAAwC,MAAM,CAAC,aAAa,oBAAoB,MAAM,CAAC,eAAe,WAAW,MAAM,4BAA4B,OAAO,EAAE,CAC7J,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type PromiseExecutor } from '@nx/devkit';
2
+ interface FoundationProfilePreflightOptions {
3
+ profile?: string;
4
+ region?: string;
5
+ stage: string;
6
+ }
7
+ declare const executor: PromiseExecutor<FoundationProfilePreflightOptions>;
8
+ export default executor;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const index_js_1 = require("../../repository-policy/index.js");
5
+ const stages_js_1 = require("../../foundation/stages.js");
6
+ const run_sst_command_js_1 = require("../sst-lifecycle/run-sst-command.js");
7
+ const executor = async (options, context) => {
8
+ try {
9
+ const stage = (0, stages_js_1.requireFoundationStage)(options.stage);
10
+ if (stage === 'development') {
11
+ devkit_1.logger.info('[foundation-profile-preflight] development uses the generated non-production profile; no protected profile check is required.');
12
+ return { success: true };
13
+ }
14
+ (0, run_sst_command_js_1.assertSstLifecyclePolicy)('deploy', stage);
15
+ (0, index_js_1.assertRepositoryPolicyRequest)(context.root, {
16
+ action: 'deploy',
17
+ projects: [{ kind: 'foundation', name: 'foundation' }],
18
+ stage,
19
+ });
20
+ const requestedRegion = options.region?.trim() ||
21
+ process.env.AWS_REGION?.trim() ||
22
+ process.env.AWS_DEFAULT_REGION?.trim();
23
+ const reader = (0, index_js_1.createAuroraProfileCapabilityReader)({
24
+ ...(options.profile?.trim() ? { profile: options.profile.trim() } : {}),
25
+ ...(requestedRegion ? { region: requestedRegion } : {}),
26
+ });
27
+ const region = requestedRegion ?? (await reader.resolveRegion());
28
+ const report = (0, index_js_1.evaluateAuroraProfileCapability)(await reader.read(), region);
29
+ if (!report.ok) {
30
+ throw new Error(`Aurora ${report.engine} ${report.engineVersion} is not orderable as db.serverless in ${report.region}; protected Foundation deployment is blocked before mutation.`);
31
+ }
32
+ devkit_1.logger.info(`[foundation-profile-preflight] Aurora ${report.engine} ${report.engineVersion} is orderable as db.serverless in ${report.region}.`);
33
+ return { success: true };
34
+ }
35
+ catch (error) {
36
+ devkit_1.logger.error(error instanceof Error ? error.message : String(error));
37
+ return { success: false };
38
+ }
39
+ };
40
+ exports.default = executor;
41
+ //# sourceMappingURL=foundation-profile-preflight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"foundation-profile-preflight.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/foundation-profile-preflight/foundation-profile-preflight.ts"],"names":[],"mappings":";;AAAA,uCAA0D;AAC1D,+DAI0C;AAC1C,0DAAoE;AACpE,4EAA+E;AAQ/E,MAAM,QAAQ,GAAuD,KAAK,EACxE,OAAO,EACP,OAAO,EACP,EAAE;IACF,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAA,kCAAsB,EAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACpD,IAAI,KAAK,KAAK,aAAa,EAAE,CAAC;YAC5B,eAAM,CAAC,IAAI,CACT,+HAA+H,CAChI,CAAC;YACF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAED,IAAA,6CAAwB,EAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QAC1C,IAAA,wCAA6B,EAAC,OAAO,CAAC,IAAI,EAAE;YAC1C,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,CAAC,EA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AC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACrE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://json-schema.org/schema",
3
+ "version": 2,
4
+ "title": "Empire Builder Kit production Foundation profile preflight",
5
+ "description": "Verify the pinned Aurora Serverless engine is orderable in the selected Region before Foundation mutation.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "stage": {
10
+ "type": "string",
11
+ "pattern": "^[a-z0-9][a-z0-9-]*$",
12
+ "default": "development"
13
+ },
14
+ "profile": {
15
+ "type": "string",
16
+ "description": "Optional local AWS profile. Protected stages are still restricted to the generated GitHub workflow."
17
+ },
18
+ "region": { "type": "string" }
19
+ },
20
+ "required": ["stage"]
21
+ }
@@ -0,0 +1,8 @@
1
+ import { type PromiseExecutor } from '@nx/devkit';
2
+ interface GitHubBootstrapExecutorOptions {
3
+ apply?: boolean;
4
+ productionReviewerIds?: string;
5
+ repository?: string;
6
+ }
7
+ declare const executor: PromiseExecutor<GitHubBootstrapExecutorOptions>;
8
+ export default executor;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const index_js_1 = require("../../git-policy/index.js");
5
+ const index_js_2 = require("../../repository-policy/index.js");
6
+ function parseReviewerIds(value) {
7
+ if (!value?.trim())
8
+ return [];
9
+ return value.split(',').map((item) => Number(item.trim()));
10
+ }
11
+ const executor = async (options, context) => {
12
+ try {
13
+ const policy = (0, index_js_2.readRepositoryOperatingPolicy)(context.root);
14
+ const report = await (0, index_js_1.runGitHubBootstrap)({
15
+ apply: options.apply === true,
16
+ productionApprovalMode: policy.productionApproval.mode,
17
+ productionReviewerIds: parseReviewerIds(options.productionReviewerIds),
18
+ repository: options.repository?.trim() || process.env.GH_REPO?.trim() || '',
19
+ token: process.env.GH_TOKEN?.trim() || process.env.GITHUB_TOKEN?.trim() || '',
20
+ });
21
+ devkit_1.logger.info(JSON.stringify(report, null, 2));
22
+ return { success: options.apply ? report.ready : true };
23
+ }
24
+ catch (error) {
25
+ devkit_1.logger.error(error instanceof Error ? error.message : String(error));
26
+ return { success: false };
27
+ }
28
+ };
29
+ exports.default = executor;
30
+ //# sourceMappingURL=github-bootstrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-bootstrap.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/github-bootstrap/github-bootstrap.ts"],"names":[],"mappings":";;AAAA,uCAA0D;AAC1D,wDAA+D;AAC/D,+DAAiF;AAQjF,SAAS,gBAAgB,CAAC,KAAyB;IACjD,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE;QAAE,OAAO,EAAE,CAAC;IAC9B,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,QAAQ,GAAoD,KAAK,EACrE,OAAO,EACP,OAAO,EACP,EAAE;IACF,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,wCAA6B,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3D,MAAM,MAAM,GAAG,MAAM,IAAA,6BAAkB,EAAC;YACtC,KAAK,EAAE,OAAO,CAAC,KAAK,KAAK,IAAI;YAC7B,sBAAsB,EAAE,MAAM,CAAC,kBAAkB,CAAC,IAAI;YACtD,qBAAqB,EAAE,gBAAgB,CAAC,OAAO,CAAC,qBAAqB,CAAC;YACtE,UAAU,EACR,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE;YACjE,KAAK,EACH,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE;SACzE,CAAC,CAAC;QACH,eAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC7C,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC1D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAM,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACrE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/schema",
3
+ "version": 2,
4
+ "title": "Empire Builder Kit GitHub bootstrap",
5
+ "description": "Report or explicitly apply protected repository rules and environments without creating secrets, branches, or credentials.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "repository": {
10
+ "type": "string",
11
+ "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$",
12
+ "description": "Explicit GitHub owner/repository target."
13
+ },
14
+ "apply": {
15
+ "type": "boolean",
16
+ "default": false,
17
+ "description": "Apply the reported GitHub settings. Omit for the default read-only report."
18
+ },
19
+ "productionReviewerIds": {
20
+ "type": "string",
21
+ "pattern": "^[1-9][0-9]*(,[1-9][0-9]*)*$",
22
+ "description": "Optional comma-separated GitHub user IDs when committed Repository Operating Policy selects environment-reviewer mode. Existing reviewers are preserved when omitted."
23
+ }
24
+ }
25
+ }
@@ -16,9 +16,11 @@ export interface SstCommandInvocation {
16
16
  environment: {
17
17
  EBK_CONSUMER_STAGE: string;
18
18
  EBK_FOUNDATION_STAGE: string;
19
+ EBK_PRODUCTION_FOUNDATION_PROFILE?: string;
19
20
  };
20
21
  executable: string;
21
22
  }
23
+ export declare function createSstChildEnvironment(ambient: NodeJS.ProcessEnv, invocation: SstCommandInvocation['environment']): NodeJS.ProcessEnv;
22
24
  export declare function assertSafeSstForwardedArguments(args: readonly string[]): void;
23
25
  export declare function assertSstLifecyclePolicy(command: SstLifecycleCommand, stage: string, environment?: NodeJS.ProcessEnv): void;
24
26
  export declare function resolveSstLifecycleStages(options: SstLifecycleOptions, environment?: NodeJS.ProcessEnv): FoundationStageResolution;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createSstChildEnvironment = createSstChildEnvironment;
3
4
  exports.assertSafeSstForwardedArguments = assertSafeSstForwardedArguments;
4
5
  exports.assertSstLifecyclePolicy = assertSstLifecyclePolicy;
5
6
  exports.resolveSstLifecycleStages = resolveSstLifecycleStages;
@@ -9,6 +10,8 @@ const devkit_1 = require("@nx/devkit");
9
10
  const node_child_process_1 = require("node:child_process");
10
11
  const node_path_1 = require("node:path");
11
12
  const stages_js_1 = require("../../foundation/stages.js");
13
+ const index_js_1 = require("../../repository-policy/index.js");
14
+ const index_js_2 = require("../../work-markers/index.js");
12
15
  const PROTECTED_STAGES = new Set(['staging', 'production']);
13
16
  const RESERVED_FORWARDED_OPTIONS = new Set([
14
17
  '--config',
@@ -16,6 +19,23 @@ const RESERVED_FORWARDED_OPTIONS = new Set([
16
19
  '--stage',
17
20
  '--target',
18
21
  ]);
22
+ function projectKind(context) {
23
+ if (!context.projectName) {
24
+ throw new Error('SST lifecycle requires an Nx project name for tag-derived Repository Operating Policy evaluation.');
25
+ }
26
+ const tags = context.projectsConfigurations?.projects[context.projectName]?.tags ?? [];
27
+ const foundation = tags.includes('scope:foundation');
28
+ const slice = tags.includes('type:slice');
29
+ if (foundation === slice) {
30
+ throw new Error(`Nx project ${context.projectName} must declare exactly one lifecycle kind tag: scope:foundation or type:slice.`);
31
+ }
32
+ return foundation ? 'foundation' : 'slice';
33
+ }
34
+ function createSstChildEnvironment(ambient, invocation) {
35
+ const sanitized = { ...ambient };
36
+ delete sanitized.EBK_PRODUCTION_FOUNDATION_PROFILE;
37
+ return { ...sanitized, ...invocation };
38
+ }
19
39
  function assertSafeSstForwardedArguments(args) {
20
40
  const reserved = args.find((argument) => {
21
41
  const option = argument.split('=', 1)[0].toLowerCase();
@@ -33,16 +53,21 @@ function assertSstLifecyclePolicy(command, stage, environment = process.env) {
33
53
  throw new Error(`SST dev is not permitted for protected stage ${stage}.`);
34
54
  }
35
55
  const repository = environment.GITHUB_REPOSITORY;
56
+ const expectedBranch = stage === 'staging' ? 'develop' : 'main';
57
+ const expectedRef = `refs/heads/${expectedBranch}`;
36
58
  const expectedWorkflowRef = repository
37
- ? `${repository}/.github/workflows/deploy.yml@refs/heads/main`
59
+ ? `${repository}/.github/workflows/deploy.yml@${expectedRef}`
38
60
  : undefined;
61
+ const eventName = environment.GITHUB_EVENT_NAME;
62
+ const allowedEvent = eventName === 'workflow_dispatch' ||
63
+ (eventName === 'push' && command === 'deploy');
39
64
  const trustedWorkflow = Boolean(repository) &&
40
65
  environment.GITHUB_ACTIONS === 'true' &&
41
- environment.GITHUB_EVENT_NAME === 'workflow_dispatch' &&
42
- environment.GITHUB_REF === 'refs/heads/main' &&
66
+ allowedEvent &&
67
+ environment.GITHUB_REF === expectedRef &&
43
68
  environment.GITHUB_WORKFLOW_REF === expectedWorkflowRef;
44
69
  if (!trustedWorkflow) {
45
- throw new Error(`SST ${command} for protected stage ${stage} must run from the main-branch deploy workflow.`);
70
+ throw new Error(`SST ${command} for protected stage ${stage} must run from the ${expectedBranch}-branch deploy workflow; pushes may run only deploy and other lifecycle actions require workflow_dispatch.`);
46
71
  }
47
72
  if (command === 'remove' &&
48
73
  stage === 'production' &&
@@ -72,6 +97,11 @@ function resolveSstLifecycleStages(options, environment = process.env) {
72
97
  });
73
98
  }
74
99
  function buildSstCommandInvocation(command, options, context, environment = process.env) {
100
+ const kind = projectKind(context);
101
+ const expectedStageMode = kind === 'foundation' ? 'foundation' : 'consumer';
102
+ if (options.stageMode !== expectedStageMode) {
103
+ throw new Error(`Nx project ${context.projectName} is tagged as ${kind} and requires stageMode ${expectedStageMode}; executor options cannot change project kind.`);
104
+ }
75
105
  const configuredRoot = context.projectName
76
106
  ? context.projectsConfigurations?.projects[context.projectName]?.root
77
107
  : undefined;
@@ -86,6 +116,24 @@ function buildSstCommandInvocation(command, options, context, environment = proc
86
116
  throw new Error(`Full deploy is not permitted for mapped consumer stage ${stages.consumerStage}. Use dev against the ${stages.foundationStage} Foundation until preview routing is supported.`);
87
117
  }
88
118
  assertSstLifecyclePolicy(command, stages.consumerStage, environment);
119
+ if (PROTECTED_STAGES.has(stages.consumerStage) &&
120
+ (command === 'deploy' || command === 'refresh')) {
121
+ (0, index_js_2.assertWorkMarkerReport)((0, index_js_2.scanWorkMarkers)(context.root), {
122
+ protectedPromotion: true,
123
+ });
124
+ }
125
+ const policyDecision = stages.consumerStage === 'production'
126
+ ? (0, index_js_1.assertRepositoryPolicyRequest)(context.root, {
127
+ action: command,
128
+ projects: [
129
+ {
130
+ kind,
131
+ name: context.projectName ?? '',
132
+ },
133
+ ],
134
+ stage: stages.consumerStage,
135
+ })
136
+ : undefined;
89
137
  const args = [command, '--stage', stages.consumerStage];
90
138
  if (options.profile) {
91
139
  args.push('--profile', options.profile);
@@ -106,6 +154,11 @@ function buildSstCommandInvocation(command, options, context, environment = proc
106
154
  environment: {
107
155
  EBK_CONSUMER_STAGE: stages.consumerStage,
108
156
  EBK_FOUNDATION_STAGE: stages.foundationStage,
157
+ ...(policyDecision?.effectiveProductionProfile
158
+ ? {
159
+ EBK_PRODUCTION_FOUNDATION_PROFILE: policyDecision.effectiveProductionProfile,
160
+ }
161
+ : {}),
109
162
  },
110
163
  executable: process.execPath,
111
164
  };
@@ -123,7 +176,7 @@ async function runSstCommand(command, options, context) {
123
176
  return new Promise((resolve) => {
124
177
  const child = (0, node_child_process_1.spawn)(invocation.executable, invocation.args, {
125
178
  cwd: invocation.cwd,
126
- env: { ...process.env, ...invocation.environment },
179
+ env: createSstChildEnvironment(process.env, invocation.environment),
127
180
  shell: false,
128
181
  stdio: 'inherit',
129
182
  });
@@ -1 +1 @@
1
- {"version":3,"file":"run-sst-command.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/sst-lifecycle/run-sst-command.ts"],"names":[],"mappings":";;AAwCA,0EAWC;AAED,4DAiCC;AAED,8DA4BC;AAED,8DAiDC;AAED,sCAoDC;AA7ND,uCAA0D;AAC1D,2DAA2C;AAC3C,yCAA6C;AAC7C,0DAIoC;AAyBpC,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;AAC5D,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;IACzC,UAAU;IACV,WAAW;IACX,SAAS;IACT,UAAU;CACX,CAAC,CAAC;AAEH,SAAgB,+BAA+B,CAAC,IAAuB;IACrE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;QACtC,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;QACvD,OAAO,0BAA0B,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;IACH,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;QACvD,MAAM,IAAI,KAAK,CACb,4DAA4D,MAAM,qDAAqD,C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ACf,eAAM,CAAC,KAAK,CACV,MAAM;oBACJ,CAAC,CAAC,OAAO,OAAO,2BAA2B,MAAM,GAAG;oBACpD,CAAC,CAAC,OAAO,OAAO,uBAAuB,IAAI,IAAI,SAAS,GAAG,CAC9D,CAAC;gBACF,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;oBACjD,eAAM,CAAC,KAAK,CACV,2CAA2C,OAAO,CAAC,WAAW,IAAI,WAAW,mBAAmB,OAAO,CAAC,KAAK,GAAG,CACjH,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"run-sst-command.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/sst-lifecycle/run-sst-command.ts"],"names":[],"mappings":";;AAgEA,8DAOC;AAED,0EAWC;AAED,4DAuCC;AAED,8DA4BC;AAED,8DAmFC;AAED,sCAoDC;AAtSD,uCAA0D;AAC1D,2DAA2C;AAC3C,yCAA6C;AAC7C,0DAIoC;AACpC,+DAAiF;AACjF,0DAGqC;AA0BrC,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;AAC5D,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;IACzC,UAAU;IACV,WAAW;IACX,SAAS;IACT,UAAU;CACX,CAAC,CAAC;AAEH,SAAS,WAAW,CAAC,OAAwB;IAC3C,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,mGAAmG,CACpG,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,GACR,OAAO,CAAC,sBAAsB,EAAE,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC;IAC5E,MAAM,UAAU,GAAG,IAAI,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AG;oBACpD,CAAC,CAAC,OAAO,OAAO,uBAAuB,IAAI,IAAI,SAAS,GAAG,CAC9D,CAAC;gBACF,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;oBACjD,eAAM,CAAC,KAAK,CACV,2CAA2C,OAAO,CAAC,WAAW,IAAI,WAAW,mBAAmB,OAAO,CAAC,KAAK,GAAG,CACjH,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/schema",
3
+ "version": 2,
4
+ "title": "Empire Builder Kit work markers",
5
+ "description": "Report source work markers and enforce syntax, generated-file ownership, and optional protected-promotion blockers.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "protected": {
10
+ "type": "boolean",
11
+ "description": "Fail when unresolved EBK-SECURITY or EBK-BLOCKER markers are present. Protected deploy and refresh set this automatically."
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,6 @@
1
+ import { type PromiseExecutor } from '@nx/devkit';
2
+ interface WorkMarkersOptions {
3
+ protected?: boolean;
4
+ }
5
+ declare const executor: PromiseExecutor<WorkMarkersOptions>;
6
+ export default executor;