@empire-builder-kit/nx 1.0.0-rc.30 → 1.0.0-rc.31

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 (261) hide show
  1. package/executors.json +8 -3
  2. package/package.json +10 -7
  3. package/src/aws/child-environment.d.ts +10 -0
  4. package/src/aws/child-environment.js +77 -0
  5. package/src/aws/child-environment.js.map +1 -0
  6. package/src/aws/identity.d.ts +13 -0
  7. package/src/aws/identity.js +41 -0
  8. package/src/aws/identity.js.map +1 -0
  9. package/src/aws-authority/index.d.ts +1 -0
  10. package/src/aws-authority/index.js +5 -0
  11. package/src/aws-authority/index.js.map +1 -0
  12. package/src/aws-authority/stage-authority.d.ts +238 -0
  13. package/src/aws-authority/stage-authority.js +2836 -0
  14. package/src/aws-authority/stage-authority.js.map +1 -0
  15. package/src/developer-agent/generator-planning.js +4 -4
  16. package/src/developer-agent/generator-planning.js.map +1 -1
  17. package/src/developer-agent/operation-registry.js +14 -6
  18. package/src/developer-agent/operation-registry.js.map +1 -1
  19. package/src/executors/deployment-plan/deployment-plan.js +1 -1
  20. package/src/executors/deployment-plan/deployment-plan.js.map +1 -1
  21. package/src/executors/foundation-preflight/foundation-preflight.d.ts +0 -1
  22. package/src/executors/foundation-preflight/foundation-preflight.js.map +1 -1
  23. package/src/executors/foundation-preflight/schema.json +0 -5
  24. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.d.ts +12 -3
  25. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js +95 -32
  26. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js.map +1 -1
  27. package/src/executors/foundation-profile-preflight/production-database-safeguard.d.ts +64 -0
  28. package/src/executors/foundation-profile-preflight/production-database-safeguard.js +221 -0
  29. package/src/executors/foundation-profile-preflight/production-database-safeguard.js.map +1 -0
  30. package/src/executors/foundation-profile-preflight/schema.json +1 -6
  31. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.d.ts +11 -1
  32. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js +44 -21
  33. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js.map +1 -1
  34. package/src/executors/foundation-remove-preflight/schema.json +6 -1
  35. package/src/executors/infrastructure-plan/infrastructure-plan.d.ts +25 -369
  36. package/src/executors/infrastructure-plan/infrastructure-plan.js +222 -5472
  37. package/src/executors/infrastructure-plan/infrastructure-plan.js.map +1 -1
  38. package/src/executors/infrastructure-plan/schema.json +8 -64
  39. package/src/executors/local-deploy/federated-credential-transport.d.ts +48 -0
  40. package/src/executors/local-deploy/federated-credential-transport.js +252 -0
  41. package/src/executors/local-deploy/federated-credential-transport.js.map +1 -0
  42. package/src/executors/local-deploy/local-approval.d.ts +4 -9
  43. package/src/executors/local-deploy/local-approval.js +3 -7
  44. package/src/executors/local-deploy/local-approval.js.map +1 -1
  45. package/src/executors/local-deploy/local-deploy.d.ts +58 -43
  46. package/src/executors/local-deploy/local-deploy.js +938 -804
  47. package/src/executors/local-deploy/local-deploy.js.map +1 -1
  48. package/src/executors/local-deploy/schema.json +3 -20
  49. package/src/executors/refresh/refresh.js +2 -2
  50. package/src/executors/refresh/refresh.js.map +1 -1
  51. package/src/executors/remove/remove.js +2 -2
  52. package/src/executors/remove/remove.js.map +1 -1
  53. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.d.ts +25 -1
  54. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js +905 -22
  55. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js.map +1 -1
  56. package/src/executors/router-waf-rehearsal/schema.json +17 -2
  57. package/src/executors/secret-initialize/schema.json +42 -0
  58. package/src/executors/secret-initialize/secret-initialize.d.ts +30 -0
  59. package/src/executors/secret-initialize/secret-initialize.js +229 -0
  60. package/src/executors/secret-initialize/secret-initialize.js.map +1 -0
  61. package/src/executors/secret-metadata/secret-metadata.d.ts +2 -1
  62. package/src/executors/secret-metadata/secret-metadata.js +62 -29
  63. package/src/executors/secret-metadata/secret-metadata.js.map +1 -1
  64. package/src/executors/sst-lifecycle/generated-secret-retirement.d.ts +53 -0
  65. package/src/executors/sst-lifecycle/generated-secret-retirement.js +192 -0
  66. package/src/executors/sst-lifecycle/generated-secret-retirement.js.map +1 -0
  67. package/src/executors/sst-lifecycle/governed-native-operation.d.ts +46 -0
  68. package/src/executors/sst-lifecycle/governed-native-operation.js +153 -0
  69. package/src/executors/sst-lifecycle/governed-native-operation.js.map +1 -0
  70. package/src/executors/sst-lifecycle/run-sst-command.d.ts +25 -7
  71. package/src/executors/sst-lifecycle/run-sst-command.js +459 -89
  72. package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -1
  73. package/src/executors/sst-lifecycle/schema.json +0 -5
  74. package/src/executors/sst-lifecycle/secret-preflight.d.ts +2 -0
  75. package/src/executors/sst-lifecycle/secret-preflight.js +13 -7
  76. package/src/executors/sst-lifecycle/secret-preflight.js.map +1 -1
  77. package/src/executors/unlock/unlock.js +2 -2
  78. package/src/executors/unlock/unlock.js.map +1 -1
  79. package/src/foundation/router-waf-rate-rehearsal.d.ts +97 -0
  80. package/src/foundation/router-waf-rate-rehearsal.js +210 -0
  81. package/src/foundation/router-waf-rate-rehearsal.js.map +1 -0
  82. package/src/foundation/router-waf.d.ts +59 -9
  83. package/src/foundation/router-waf.js +427 -32
  84. package/src/foundation/router-waf.js.map +1 -1
  85. package/src/foundation/stages.d.ts +1 -0
  86. package/src/foundation/stages.js +11 -0
  87. package/src/foundation/stages.js.map +1 -1
  88. package/src/generators/formatting.d.ts +8 -0
  89. package/src/generators/formatting.js +118 -0
  90. package/src/generators/formatting.js.map +1 -0
  91. package/src/generators/function/function.js +37 -17
  92. package/src/generators/function/function.js.map +1 -1
  93. package/src/generators/post-generation-install.js +2 -2
  94. package/src/generators/post-generation-install.js.map +1 -1
  95. package/src/generators/preset/generator.js +22 -7
  96. package/src/generators/preset/generator.js.map +1 -1
  97. package/src/generators/preset/workspace-files-developer-agent.js +15 -7
  98. package/src/generators/preset/workspace-files-developer-agent.js.map +1 -1
  99. package/src/generators/preset/workspace-files-ecr-inspector.d.ts +18 -0
  100. package/src/generators/preset/workspace-files-ecr-inspector.js +298 -0
  101. package/src/generators/preset/workspace-files-ecr-inspector.js.map +1 -0
  102. package/src/generators/preset/workspace-files-performance-cost.d.ts +2 -2
  103. package/src/generators/preset/workspace-files-performance-cost.js +8 -8
  104. package/src/generators/preset/workspace-files-performance-cost.js.map +1 -1
  105. package/src/generators/preset/workspace-files-performance-load.d.ts +1 -1
  106. package/src/generators/preset/workspace-files-performance-load.js +8 -12
  107. package/src/generators/preset/workspace-files-performance-load.js.map +1 -1
  108. package/src/generators/preset/workspace-files-stage-authority.d.ts +4 -0
  109. package/src/generators/preset/workspace-files-stage-authority.js +275 -0
  110. package/src/generators/preset/workspace-files-stage-authority.js.map +1 -0
  111. package/src/generators/preset/workspace-files-thin-deploy.d.ts +35 -0
  112. package/src/generators/preset/workspace-files-thin-deploy.js +1434 -0
  113. package/src/generators/preset/workspace-files-thin-deploy.js.map +1 -0
  114. package/src/generators/preset/workspace-files-thin-docs.d.ts +5 -0
  115. package/src/generators/preset/workspace-files-thin-docs.js +224 -0
  116. package/src/generators/preset/workspace-files-thin-docs.js.map +1 -0
  117. package/src/generators/preset/workspace-files-thin-release.d.ts +14 -0
  118. package/src/generators/preset/workspace-files-thin-release.js +26 -0
  119. package/src/generators/preset/workspace-files-thin-release.js.map +1 -0
  120. package/src/generators/preset/workspace-files.d.ts +1 -1
  121. package/src/generators/preset/workspace-files.js +373 -223
  122. package/src/generators/preset/workspace-files.js.map +1 -1
  123. package/src/generators/slice/built-in-plan-api-files.js +1 -0
  124. package/src/generators/slice/built-in-plan-api-files.js.map +1 -1
  125. package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +4 -0
  126. package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js.map +1 -1
  127. package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js +5 -31
  128. package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js.map +1 -1
  129. package/src/generators/slice/built-in-plan-data-files.d.ts +1 -1
  130. package/src/generators/slice/built-in-plan-data-files.js +89 -30
  131. package/src/generators/slice/built-in-plan-data-files.js.map +1 -1
  132. package/src/generators/slice/built-in-plan-foundation-files.js +3 -5
  133. package/src/generators/slice/built-in-plan-foundation-files.js.map +1 -1
  134. package/src/generators/slice/built-in-plan-frontend-files.js +5 -1
  135. package/src/generators/slice/built-in-plan-frontend-files.js.map +1 -1
  136. package/src/generators/slice/built-in-plan-infrastructure-files.d.ts +1 -1
  137. package/src/generators/slice/built-in-plan-infrastructure-files.js +199 -188
  138. package/src/generators/slice/built-in-plan-infrastructure-files.js.map +1 -1
  139. package/src/generators/slice/built-in-plan-metadata-files.js +13 -0
  140. package/src/generators/slice/built-in-plan-metadata-files.js.map +1 -1
  141. package/src/generators/slice/built-in-plan-native-runtime-authority-files.d.ts +2 -0
  142. package/src/generators/slice/built-in-plan-native-runtime-authority-files.js +307 -0
  143. package/src/generators/slice/built-in-plan-native-runtime-authority-files.js.map +1 -0
  144. package/src/generators/slice/built-in-plan-operations-files.js +43 -49
  145. package/src/generators/slice/built-in-plan-operations-files.js.map +1 -1
  146. package/src/generators/slice/built-in-plan-performance-files.js +37 -19
  147. package/src/generators/slice/built-in-plan-performance-files.js.map +1 -1
  148. package/src/generators/slice/built-in-plan-project-files.js +9 -68
  149. package/src/generators/slice/built-in-plan-project-files.js.map +1 -1
  150. package/src/generators/slice/built-in-plan-secret-runtime-files.d.ts +1 -1
  151. package/src/generators/slice/built-in-plan-secret-runtime-files.js +74 -76
  152. package/src/generators/slice/built-in-plan-secret-runtime-files.js.map +1 -1
  153. package/src/generators/slice/built-in-plan-testing-files.js +74 -47
  154. package/src/generators/slice/built-in-plan-testing-files.js.map +1 -1
  155. package/src/generators/slice/built-in-plan-thin-release-files.d.ts +11 -0
  156. package/src/generators/slice/built-in-plan-thin-release-files.js +129 -0
  157. package/src/generators/slice/built-in-plan-thin-release-files.js.map +1 -0
  158. package/src/generators/slice/built-in-plan-verification-files.js +6 -2
  159. package/src/generators/slice/built-in-plan-verification-files.js.map +1 -1
  160. package/src/generators/slice/built-in-plan-web-files.js +4 -2
  161. package/src/generators/slice/built-in-plan-web-files.js.map +1 -1
  162. package/src/generators/slice/built-in-plan-workload-role-files.js +26 -4
  163. package/src/generators/slice/built-in-plan-workload-role-files.js.map +1 -1
  164. package/src/generators/slice/built-in-plan.d.ts +1 -0
  165. package/src/generators/slice/built-in-plan.js +28 -11
  166. package/src/generators/slice/built-in-plan.js.map +1 -1
  167. package/src/generators/slice/slice.js +27 -29
  168. package/src/generators/slice/slice.js.map +1 -1
  169. package/src/generators/upgrade/upgrade.d.ts +1 -1
  170. package/src/generators/upgrade/upgrade.js +224 -69
  171. package/src/generators/upgrade/upgrade.js.map +1 -1
  172. package/src/generators/workload/performance-registration.d.ts +1 -0
  173. package/src/generators/workload/performance-registration.js +6 -4
  174. package/src/generators/workload/performance-registration.js.map +1 -1
  175. package/src/generators/workload/service-performance-files.d.ts +1 -0
  176. package/src/generators/workload/service-performance-files.js +27 -7
  177. package/src/generators/workload/service-performance-files.js.map +1 -1
  178. package/src/generators/workload/workload.d.ts +1 -1
  179. package/src/generators/workload/workload.js +55 -28
  180. package/src/generators/workload/workload.js.map +1 -1
  181. package/src/git-policy/github-bootstrap.d.ts +19 -6
  182. package/src/git-policy/github-bootstrap.js +103 -157
  183. package/src/git-policy/github-bootstrap.js.map +1 -1
  184. package/src/local-dev/private-state.d.ts +3 -0
  185. package/src/local-dev/private-state.js +17 -5
  186. package/src/local-dev/private-state.js.map +1 -1
  187. package/src/performance/cost-collection.d.ts +1 -1
  188. package/src/performance/cost-collection.js +4 -2
  189. package/src/performance/cost-collection.js.map +1 -1
  190. package/src/performance/cost-controls.d.ts +3 -1
  191. package/src/performance/cost-controls.js +9 -4
  192. package/src/performance/cost-controls.js.map +1 -1
  193. package/src/performance/evidence.d.ts +1 -1
  194. package/src/performance/evidence.js +5 -3
  195. package/src/performance/evidence.js.map +1 -1
  196. package/src/performance/load-safety.js +5 -3
  197. package/src/performance/load-safety.js.map +1 -1
  198. package/src/performance/model.d.ts +2 -2
  199. package/src/performance/model.js +4 -3
  200. package/src/performance/model.js.map +1 -1
  201. package/src/release/index.d.ts +0 -2
  202. package/src/release/index.js +0 -2
  203. package/src/release/index.js.map +1 -1
  204. package/src/release/source-authority.d.ts +4 -5
  205. package/src/release/source-authority.js +13 -123
  206. package/src/release/source-authority.js.map +1 -1
  207. package/src/repository-policy/aurora-preflight.d.ts +1 -1
  208. package/src/repository-policy/aurora-preflight.js +4 -1
  209. package/src/repository-policy/aurora-preflight.js.map +1 -1
  210. package/src/repository-policy/policy.d.ts +5 -1
  211. package/src/repository-policy/policy.js +64 -13
  212. package/src/repository-policy/policy.js.map +1 -1
  213. package/src/schemas/performance-policy-v1.json +3 -1
  214. package/src/secrets/adapters.d.ts +5 -1
  215. package/src/secrets/adapters.js +22 -1
  216. package/src/secrets/adapters.js.map +1 -1
  217. package/src/secrets/aws-control-plane.d.ts +10 -1
  218. package/src/secrets/aws-control-plane.js +67 -0
  219. package/src/secrets/aws-control-plane.js.map +1 -1
  220. package/src/secrets/generated-aws-control-plane.d.ts +23 -0
  221. package/src/secrets/generated-aws-control-plane.js +259 -0
  222. package/src/secrets/generated-aws-control-plane.js.map +1 -0
  223. package/src/secrets/metadata.js +38 -10
  224. package/src/secrets/metadata.js.map +1 -1
  225. package/src/secrets/model.d.ts +8 -1
  226. package/src/secrets/model.js +24 -3
  227. package/src/secrets/model.js.map +1 -1
  228. package/src/secrets/operator.d.ts +89 -3
  229. package/src/secrets/operator.js +422 -9
  230. package/src/secrets/operator.js.map +1 -1
  231. package/src/secrets/registry.d.ts +2 -1
  232. package/src/secrets/registry.js +18 -1
  233. package/src/secrets/registry.js.map +1 -1
  234. package/src/secrets/workload-access.js +10 -2
  235. package/src/secrets/workload-access.js.map +1 -1
  236. package/src/supply-chain/action-pins.js +61 -7
  237. package/src/supply-chain/action-pins.js.map +1 -1
  238. package/src/supply-chain/build-output-bounds.d.ts +2 -0
  239. package/src/supply-chain/build-output-bounds.js +12 -0
  240. package/src/supply-chain/build-output-bounds.js.map +1 -0
  241. package/src/supply-chain/build-output.js +2 -4
  242. package/src/supply-chain/build-output.js.map +1 -1
  243. package/src/supply-chain/ecr-scanning.d.ts +5 -3
  244. package/src/supply-chain/ecr-scanning.js +11 -7
  245. package/src/supply-chain/ecr-scanning.js.map +1 -1
  246. package/src/supply-chain/ecs-deployed-image.d.ts +5 -3
  247. package/src/supply-chain/ecs-deployed-image.js +6 -4
  248. package/src/supply-chain/ecs-deployed-image.js.map +1 -1
  249. package/src/supply-chain/generated-container-release-command.js +816 -34
  250. package/src/supply-chain/generated-container-release-command.js.map +1 -1
  251. package/src/supply-chain/generated-ecr-collector-command.d.ts +0 -1
  252. package/src/supply-chain/generated-ecr-collector-command.js +188 -91
  253. package/src/supply-chain/generated-ecr-collector-command.js.map +1 -1
  254. package/src/supply-chain/generated-files.js +4 -3
  255. package/src/supply-chain/generated-files.js.map +1 -1
  256. package/src/supply-chain/index.d.ts +1 -1
  257. package/src/supply-chain/index.js +2 -1
  258. package/src/supply-chain/index.js.map +1 -1
  259. package/src/workload-roles/index.d.ts +10 -17
  260. package/src/workload-roles/index.js +5 -18
  261. package/src/workload-roles/index.js.map +1 -1
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.evaluateFoundationRemoval = evaluateFoundationRemoval;
4
4
  exports.productSliceRegistrationName = productSliceRegistrationName;
5
+ exports.inspectProductSliceRegistrations = inspectProductSliceRegistrations;
6
+ exports.runFoundationRemovePreflight = runFoundationRemovePreflight;
5
7
  const client_ssm_1 = require("@aws-sdk/client-ssm");
6
8
  const credential_providers_1 = require("@aws-sdk/credential-providers");
7
9
  const devkit_1 = require("@nx/devkit");
@@ -28,42 +30,63 @@ function productSliceRegistrationName(foundationStage, parameterName) {
28
30
  ? relativeName
29
31
  : `[unrecognized registration] ${parameterName}`;
30
32
  }
31
- const executor = async (options) => {
33
+ async function inspectProductSliceRegistrations(foundationStage, fetchPage) {
34
+ const registrations = [];
35
+ const prefix = `${(0, discovery_js_1.productSliceRegistrationRoot)(foundationStage)}/`;
36
+ let nextToken;
37
+ do {
38
+ const response = await fetchPage({
39
+ ...(nextToken ? { NextToken: nextToken } : {}),
40
+ ParameterFilters: [
41
+ {
42
+ Key: 'Name',
43
+ Option: 'BeginsWith',
44
+ Values: [prefix],
45
+ },
46
+ ],
47
+ });
48
+ registrations.push(...(response.Parameters ?? []).map(({ Name }) => productSliceRegistrationName(foundationStage, Name)));
49
+ nextToken = response.NextToken;
50
+ } while (nextToken);
51
+ return registrations.sort();
52
+ }
53
+ async function runFoundationRemovePreflight(options, dependencies = {}) {
32
54
  const region = options.region?.trim() ||
33
55
  process.env.AWS_REGION?.trim() ||
34
56
  process.env.AWS_DEFAULT_REGION?.trim();
35
- const client = new client_ssm_1.SSMClient({
36
- ...(options.profile
37
- ? { credentials: (0, credential_providers_1.fromIni)({ profile: options.profile }) }
38
- : {}),
39
- ...(region ? { region } : {}),
40
- });
41
- const registrations = [];
42
- let nextToken;
57
+ const client = dependencies.sendCommand
58
+ ? undefined
59
+ : new client_ssm_1.SSMClient({
60
+ ...(options.profile
61
+ ? { credentials: (0, credential_providers_1.fromIni)({ profile: options.profile }) }
62
+ : {}),
63
+ ...(region ? { region } : {}),
64
+ });
65
+ const sendCommand = dependencies.sendCommand ??
66
+ (async (command) => {
67
+ if (!client) {
68
+ throw new Error('SSM client is unavailable.');
69
+ }
70
+ return client.send(command);
71
+ });
72
+ let registrations;
43
73
  try {
44
- do {
45
- const response = await client.send(new client_ssm_1.GetParametersByPathCommand({
46
- NextToken: nextToken,
47
- Path: (0, discovery_js_1.productSliceRegistrationRoot)(options.stage),
48
- Recursive: true,
49
- }));
50
- registrations.push(...(response.Parameters ?? []).map(({ Name }) => productSliceRegistrationName(options.stage, Name)));
51
- nextToken = response.NextToken;
52
- } while (nextToken);
74
+ registrations = await inspectProductSliceRegistrations(options.stage, (input) => sendCommand(new client_ssm_1.DescribeParametersCommand(input)));
53
75
  }
54
76
  catch (error) {
55
77
  devkit_1.logger.error(`[foundation-remove-preflight] foundationStage=${options.stage}: unable to inspect Product Slice registrations. ${error instanceof Error ? error.message : String(error)}`);
56
78
  return { success: false };
57
79
  }
58
80
  finally {
59
- client.destroy();
81
+ client?.destroy();
60
82
  }
61
- const result = evaluateFoundationRemoval(options.stage, registrations.sort());
83
+ const result = evaluateFoundationRemoval(options.stage, registrations);
62
84
  if (result.success)
63
85
  devkit_1.logger.info(result.message);
64
86
  else
65
87
  devkit_1.logger.error(result.message);
66
88
  return { success: result.success };
67
- };
89
+ }
90
+ const executor = (options) => runFoundationRemovePreflight(options);
68
91
  exports.default = executor;
69
92
  //# sourceMappingURL=foundation-remove-preflight.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"foundation-remove-preflight.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/foundation-remove-preflight/foundation-remove-preflight.ts"],"names":[],"mappings":";;AAWA,8DAcC;AAED,oEAYC;AAvCD,oDAA4E;AAC5E,wEAAwD;AACxD,uCAA0D;AAC1D,gEAA6E;AAQ7E,SAAgB,yBAAyB,CACvC,eAAuB,EACvB,iBAAoC;IAEpC,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnC,OAAO;YACL,OAAO,EAAE,iDAAiD,eAAe,0CAA0C;YACnH,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IACD,OAAO;QACL,OAAO,EAAE,iDAAiD,eAAe,0EAA0E,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,0GAA0G;QACzR,OAAO,EAAE,KAAK;KACf,CAAC;AACJ,CAAC;AAED,SAAgB,4BAA4B,CAC1C,eAAuB,EACvB,aAAiC;IAEjC,MAAM,MAAM,GAAG,GAAG,IAAA,2CAA4B,EAAC,eAAe,CAAC,GAAG,CAAC;IACnE,IAAI,CA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AAQ,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAC9C,4BAA4B,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAClD,CACF,CAAC;YACF,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;QACjC,CAAC,QAAQ,SAAS,EAAE;IACtB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAM,CAAC,KAAK,CACV,iDAAiD,OAAO,CAAC,KAAK,oDAAoD,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC3K,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,MAAM,MAAM,GAAG,yBAAyB,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9E,IAAI,MAAM,CAAC,OAAO;QAAE,eAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;;QAC3C,eAAM,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAClC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;AACrC,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"foundation-remove-preflight.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/foundation-remove-preflight/foundation-remove-preflight.ts"],"names":[],"mappings":";;AAiBA,8DAcC;AAED,oEAYC;AAaD,4EA4BC;AAED,oEA2CC;AAnID,oDAK6B;AAC7B,wEAAwD;AACxD,uCAA0D;AAC1D,gEAA6E;AAS7E,SAAgB,yBAAyB,CACvC,eAAuB,EACvB,iBAAoC;IAEpC,IAAI,iBA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aAAuB,CAAC;IAC5B,IAAI,CAAC;QACH,aAAa,GAAG,MAAM,gCAAgC,CACpD,OAAO,CAAC,KAAK,EACb,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,sCAAyB,CAAC,KAAK,CAAC,CAAC,CAC7D,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAM,CAAC,KAAK,CACV,iDAAiD,OAAO,CAAC,KAAK,oDAAoD,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC3K,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;YAAS,CAAC;QACT,MAAM,EAAE,OAAO,EAAE,CAAC;IACpB,CAAC;IAED,MAAM,MAAM,GAAG,yBAAyB,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACvE,IAAI,MAAM,CAAC,OAAO;QAAE,eAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;;QAC3C,eAAM,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAClC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;AACrC,CAAC;AAED,MAAM,QAAQ,GAAsD,CAAC,OAAO,EAAE,EAAE,CAC9E,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAExC,kBAAe,QAAQ,CAAC"}
@@ -11,7 +11,12 @@
11
11
  "default": "development"
12
12
  },
13
13
  "region": { "type": "string" },
14
- "profile": { "type": "string" }
14
+ "profile": { "type": "string" },
15
+ "expectedRoleArn": {
16
+ "type": "string",
17
+ "pattern": "^arn:(aws|aws-us-gov|aws-cn):iam::[0-9]{12}:role/[A-Za-z0-9+=,.@_/-]{1,512}$",
18
+ "description": "Exact stage deployment role forwarded to the governed remove executor. The preflight accepts but does not consume this authority input."
19
+ }
15
20
  },
16
21
  "required": ["stage"]
17
22
  }
@@ -1,378 +1,34 @@
1
1
  import { type ExecutorContext, type PromiseExecutor } from '@nx/devkit';
2
- import { type InfrastructureApprovalRecordV1, type InfrastructureAuthorizationEvidenceV1, type InfrastructureDriftStatus, type InfrastructureMutationAction, type InfrastructurePlanV1, type InfrastructureRiskAssessmentV1, type InfrastructureRiskPolicyV1, type InfrastructureStateIdentityV1, type NormalizedSstDiffV1 } from '../../infrastructure-change/index.js';
3
- import { type SstCommandInvocation, type SstLifecycleOptions } from '../sst-lifecycle/run-sst-command.js';
4
- export interface InfrastructurePlanExecutorOptions extends Pick<SstLifecycleOptions, 'cwd' | 'expectedRoleArn' | 'profile' | 'region' | 'stage' | 'stageMode'> {
5
- action?: InfrastructureMutationAction;
6
- approvalPath?: string;
7
- configurationPath?: string;
8
- configurationPaths?: string[];
9
- descriptorPath?: string;
10
- mutationBindingPath?: string;
11
- operation?: 'finalize-convergence' | 'plan';
12
- operationalEvidencePath?: string;
13
- pendingConvergencePath?: string;
14
- smokeBindingPath?: string;
15
- smokeEvidencePath?: string;
16
- }
17
- export interface InfrastructureResourceObservationCoverage {
18
- adapter: 'aws-resource-groups-tagging-api' | 'none' | 'sst-pulumi-refresh-preview' | 'sst-pulumi-refresh-preview+aws-secrets-manager-version-stages';
19
- arnDigest: string | null;
20
- coveredProperties: readonly string[];
21
- type: string;
22
- unobservedMaterialProperties: readonly string[];
23
- urn: string;
24
- }
25
- interface DriftEvidence {
26
- coverage: readonly InfrastructureResourceObservationCoverage[];
27
- digest: string;
28
- expiresAt: string;
29
- generatedAt: string;
30
- status: InfrastructureDriftStatus;
31
- }
32
- interface RefreshPreviewDiagnosticResource {
33
- changeBasis: readonly ('detailedDiff' | 'diffs' | 'old-new')[];
34
- changedPropertyPaths: readonly string[];
35
- logicalId: string;
36
- resourceType: string;
37
- }
38
- interface RefreshPreviewExternalLookupNormalization {
39
- changedPropertyPath: '/inputs/name' | '/inputs/tags/Name';
40
- logicalId: string;
41
- resourceType: string;
42
- }
43
- interface RefreshPreviewExternalFrameworkTagObservation {
44
- changedPropertyPaths: readonly string[];
45
- logicalId: string;
46
- providerReadLogicalId: string;
47
- resourceType: string;
48
- }
49
- interface RefreshPreviewDiagnostics {
50
- authorityMode: 'ordinary-and-refresh-separated' | 'refresh-reconciliation';
51
- command: {
52
- errorCode: string | null;
53
- signal: string | null;
54
- status: number | null;
55
- stderrBytes: number;
56
- stdoutBytes: number;
57
- };
58
- commandSucceeded: boolean;
59
- complete: boolean;
60
- entryCounts: {
61
- desired: number;
62
- externalFrameworkTagObserved: number;
63
- externalLookupNormalized: number;
64
- inertSame: number;
65
- refresh: number;
66
- rejectedSame: number;
67
- };
68
- providerRefreshSeparated: boolean;
69
- ordinaryDesired: {
70
- complete: boolean;
71
- failureCounts: Readonly<Record<string, number>>;
72
- resourceCount: number;
73
- };
74
- postRefreshDesired: {
75
- complete: boolean;
76
- failureCounts: Readonly<Record<string, number>>;
77
- operationCounts: Readonly<Record<string, number>>;
78
- resourceCount: number;
79
- };
80
- digest: string;
81
- kind: 'ebk-infrastructure-refresh-preview-diagnostics';
82
- externalFrameworkTagObservations: readonly RefreshPreviewExternalFrameworkTagObservation[];
83
- externalLookupNormalizations: readonly RefreshPreviewExternalLookupNormalization[];
84
- resources: readonly RefreshPreviewDiagnosticResource[];
85
- schemaVersion: 7;
86
- }
87
- export interface InfrastructureObservation {
88
- callInventory: readonly string[];
89
- drift: DriftEvidence;
90
- observerArnDigest: string;
91
- resources?: readonly InfrastructureObservedResource[];
92
- state: InfrastructureStateIdentityV1;
93
- }
94
- export interface InfrastructureObservedResource {
95
- dependencyDigests: readonly string[];
96
- logicalId: string;
97
- physicalArn?: string;
98
- physicalId?: string;
99
- physicalSelector?: Readonly<Record<string, string>>;
100
- physicalIdentityDigest: string | null;
101
- protected: boolean | null;
102
- resourceType: string;
103
- retainedOnDelete: boolean | null;
104
- urnDigest: string;
105
- }
106
- interface ReviewedApprovalFile {
107
- approval: InfrastructureApprovalRecordV1;
108
- governance?: unknown;
109
- planned: InfrastructurePlanV1;
110
- }
111
- interface CommandResult {
112
- error?: NodeJS.ErrnoException;
113
- signal?: NodeJS.Signals | null;
114
- status: number | null;
115
- stderr: string;
116
- stdout: string;
117
- }
118
- export interface InfrastructurePlanExecutorDependencies {
119
- localCapability?: (input: Parameters<typeof consumeLocalMutationCapability>[0]) => void;
120
- now?: () => Date;
121
- observe?: (input: {
122
- action: InfrastructureMutationAction;
123
- backendBootstrapDigest: string;
124
- childEnvironment: NodeJS.ProcessEnv;
125
- environment: NodeJS.ProcessEnv;
126
- invocation: SstCommandInvocation;
127
- now: Date;
128
- ordinaryDiff: NormalizedSstDiffV1;
129
- project: string;
130
- sourceCommit: string;
131
- spawn: NonNullable<InfrastructurePlanExecutorDependencies['spawn']>;
132
- toolVersion: string;
133
- }) => InfrastructureObservation;
134
- spawn?: (executable: string, args: readonly string[], options: {
135
- cwd: string;
136
- encoding: 'utf8';
137
- env: NodeJS.ProcessEnv;
138
- maxBuffer: number;
139
- shell: false;
140
- }) => CommandResult;
141
- }
142
- export declare const MAX_SST_DIFF_JSON_BYTES: number;
143
- interface InfrastructureBuildArtifactEntry {
144
- digest: string;
145
- path: string;
146
- size: number;
147
- }
148
- interface InfrastructureBuildArtifactMaterial {
149
- digest: string;
150
- entries: readonly InfrastructureBuildArtifactEntry[];
151
- kind: 'ebk-infrastructure-build-artifacts';
152
- schemaVersion: 1;
153
- }
154
- /** @internal */
155
- export declare function collectInfrastructureBuildArtifacts(projectRoot: string): InfrastructureBuildArtifactMaterial;
156
- /** @internal */
157
- export declare function infrastructureConfigurationMetadataDigest(input: {
158
- buildArtifactDigest: string;
159
- configurationInputs: readonly {
160
- contents: string;
161
- path: string;
162
- }[];
163
- releaseCandidateDigest: string;
164
- }): string;
165
- type StandardRemoveProbeKind = 'aws-cloud-control' | 'aws-events-target' | 'aws-iam-role-policy' | 'aws-kms-retained' | 'aws-lambda-event-invoke-config' | 'aws-lambda-permission' | 'aws-logs-data-protection-policy' | 'aws-s3-retained' | 'aws-s3-object' | 'aws-secrets-manager-secret' | 'aws-sqs-queue-policy' | 'aws-ssm-parameter';
166
- interface StandardRemoveProbe {
167
- identifier: string;
168
- kind: StandardRemoveProbeKind;
169
- protectionProfile?: string;
170
- selector?: Readonly<Record<string, string>>;
171
- typeName?: string;
172
- }
173
- export declare function matchesExpectedAssumedRoleArn(account: string, callerArn: string, expectedRoleArn: string): boolean;
174
- export declare function localProductionConfirmation(input: {
175
- action: InfrastructureMutationAction;
176
- accountId: string;
177
- region: string;
178
- sourceCommit: string;
179
- }): string;
180
- export declare function revalidateLocalUnlockCallerAuthority(input: {
181
- environment?: NodeJS.ProcessEnv;
182
- invocation: SstCommandInvocation;
2
+ import { spawn, spawnSync } from 'node:child_process';
3
+ import { type CanonicalDeploymentStage } from '../../repository-policy/index.js';
4
+ import { createLocalFederatedCredentialTransport } from '../local-deploy/federated-credential-transport.js';
5
+ import { localWorkingTreeDigest } from '../local-deploy/local-deploy.js';
6
+ export { matchesExpectedAssumedRoleArn } from '../../aws/identity.js';
7
+ export interface InfrastructurePlanExecutorOptions {
8
+ cwd?: string;
9
+ expectedRoleArn?: string;
183
10
  profile?: string;
184
- spawn?: NonNullable<InfrastructurePlanExecutorDependencies['spawn']>;
185
- }): void;
186
- export declare function parseRefreshPreviewJson(value: string): unknown;
187
- /**
188
- * Reads the Pulumi StepEventStateMetadata `new.id` emitted by SST's pinned
189
- * JSON diff for imports. Only its digest leaves this private boundary.
190
- */
191
- export declare function extractPrivateImportIdentifierDigests(diffStdout: string, diff: NormalizedSstDiffV1): Readonly<Record<string, string>>;
192
- /** @internal */
193
- export declare function releaseCandidateBinding(input: {
194
- project: string;
195
- projectRoot: string;
196
- repository: string;
197
- sourceCommit: string;
198
- workspaceRoot: string;
199
- }): {
200
- digest: string;
201
- path: string;
202
- };
203
- /** @internal */
204
- export declare function approvalCandidateSourceCommit(context: ExecutorContext, options: InfrastructurePlanExecutorOptions, environment: NodeJS.ProcessEnv): string | undefined;
205
- /** @internal */
206
- export declare function createCandidateBoundSstChildEnvironment(environment: NodeJS.ProcessEnv, invocationEnvironment: SstCommandInvocation['environment'], candidateSourceCommit: string): NodeJS.ProcessEnv;
207
- interface PulumiStateResource {
208
- custom?: unknown;
209
- dependencies?: unknown;
210
- external?: unknown;
211
- id?: unknown;
212
- inputs?: unknown;
213
- outputs?: unknown;
214
- parent?: unknown;
215
- provider?: unknown;
216
- protect?: unknown;
217
- retainOnDelete?: unknown;
218
- type?: unknown;
219
- urn?: unknown;
11
+ region?: string;
12
+ stage: CanonicalDeploymentStage;
13
+ stageMode: 'consumer' | 'foundation';
220
14
  }
221
- /** @internal */
222
- export declare function normalizeDesiredSstDiffV4_17_1(input: {
223
- errorCode?: string | null;
224
- exitCode: number;
225
- signal?: string | null;
226
- spawnError?: boolean;
227
- stderr?: string;
228
- stdout: string | unknown;
229
- toolVersion: string;
230
- }): NormalizedSstDiffV1;
231
- export declare function assessPulumiRefreshPreview(input: {
232
- action: InfrastructureMutationAction;
233
- invocation: SstCommandInvocation;
234
- ordinaryDiff: NormalizedSstDiffV1;
235
- spawn: NonNullable<InfrastructurePlanExecutorDependencies['spawn']>;
236
- stateResources?: readonly PulumiStateResource[];
237
- toolVersion: string;
238
- childEnvironment: NodeJS.ProcessEnv;
239
- }): {
240
- commandSucceeded: boolean;
241
- complete: boolean;
242
- diagnostics: RefreshPreviewDiagnostics;
243
- providerRefreshSeparated: boolean;
244
- digest: string;
245
- drift: NormalizedSstDiffV1;
246
- observedRefreshUrns: readonly string[];
247
- rawDrift: string;
248
- stderr: string;
249
- };
250
- /** @internal */
251
- export declare function requiresIamMutationAnalysis(_action: InfrastructureMutationAction, resource: NormalizedSstDiffV1['resources'][number]): boolean;
252
- export declare function standardRemoveProbeForResource(resource: InfrastructureObservedResource): StandardRemoveProbe;
253
- interface StandardRemoveProbeResult {
254
- present: boolean;
255
- protectionDigest: string | null;
15
+ interface InfrastructurePlanDependencies {
16
+ createTransport?: typeof createLocalFederatedCredentialTransport;
17
+ environment?: NodeJS.ProcessEnv;
18
+ identifyGithubCaller?: (region: string) => Promise<{
19
+ Account?: string;
20
+ Arn?: string;
21
+ }>;
22
+ readSource?: typeof localWorkingTreeDigest;
23
+ platform?: NodeJS.Platform;
24
+ run?: typeof spawnSync;
25
+ spawnChild?: typeof spawn;
256
26
  }
257
- export declare function probeStandardRemoveResource(input: {
258
- childEnvironment: NodeJS.ProcessEnv;
259
- invocation: SstCommandInvocation;
260
- probe: StandardRemoveProbe;
261
- spawn: NonNullable<InfrastructurePlanExecutorDependencies['spawn']>;
262
- }): StandardRemoveProbeResult;
263
- export declare function observeInfrastructureState(input: {
264
- action: InfrastructureMutationAction;
265
- backendBootstrapDigest: string;
266
- childEnvironment: NodeJS.ProcessEnv;
267
- environment: NodeJS.ProcessEnv;
268
- invocation: SstCommandInvocation;
269
- now: Date;
270
- ordinaryDiff: NormalizedSstDiffV1;
271
- project: string;
272
- sourceCommit: string;
273
- spawn: NonNullable<InfrastructurePlanExecutorDependencies['spawn']>;
274
- toolVersion: string;
275
- }): InfrastructureObservation;
276
- /** @internal */
277
- export declare function actionRisk(risk: InfrastructureRiskAssessmentV1, action: InfrastructureMutationAction, options?: Readonly<{
278
- diffComplete?: boolean;
279
- }>): InfrastructureRiskAssessmentV1;
280
- export declare function validateGovernanceEvidence(reviewed: {
281
- approval?: InfrastructureApprovalRecordV1;
282
- governance?: unknown;
283
- } | undefined, plan: InfrastructurePlanV1, observedResources?: readonly InfrastructureObservedResource[], importIdentifierDigests?: Readonly<Record<string, string>>, adoptedImportPolicy?: InfrastructureRiskPolicyV1['adoptedImports']): Readonly<Record<string, string>>;
284
- /** @internal */
285
- export declare function createLocalPlanApprovalRecord(input: {
286
- context: ExecutorContext;
287
- environment: NodeJS.ProcessEnv;
288
- now: Date;
289
- plan: InfrastructurePlanV1;
290
- }): InfrastructureApprovalRecordV1 | undefined;
291
- /** @internal */
292
- export declare function hasUnreviewableLocalPlanBlock(plan: InfrastructurePlanV1): boolean;
293
- /** @internal */
294
- export declare function createLocalRefreshGovernanceReview(input: {
295
- approval: InfrastructureApprovalRecordV1;
296
- environment: NodeJS.ProcessEnv;
297
- plan: InfrastructurePlanV1;
298
- }): ReviewedApprovalFile | undefined;
299
- /** @internal */
300
- export declare function createLocalDeployGovernanceReview(input: {
301
- approval: InfrastructureApprovalRecordV1;
302
- environment: NodeJS.ProcessEnv;
303
- plan: InfrastructurePlanV1;
304
- }): ReviewedApprovalFile | undefined;
305
27
  /**
306
- * Retains exact local approval for a plan that the stage-wide local executor
307
- * has just recomputed and reviewed. This deliberately does not run SST again:
308
- * the project mutation executor consumes one invocation-scoped capability and
309
- * rechecks source, artifacts, credentials, policy, state identity, and lock
310
- * immediately before spawn without claiming provider-preview replay.
311
- *
312
- * @internal
28
+ * Run SST's native diff as advisory output. The result is intentionally not
29
+ * normalized, retained, or used as later mutation authority.
313
30
  */
314
- export declare function authorizeRetainedLocalInfrastructurePlan(input: {
315
- context: ExecutorContext;
316
- environment: NodeJS.ProcessEnv;
317
- now: Date;
318
- plan: InfrastructurePlanV1;
319
- }): InfrastructureAuthorizationEvidenceV1;
320
- /** @internal */
321
- export declare function requiresGovernanceValidation(input: {
322
- action: InfrastructureMutationAction;
323
- adoptedImportCount: number;
324
- hasApproval: boolean;
325
- }): boolean;
326
- /** @internal */
327
- export declare function isLocalPlanReviewPending(input: {
328
- context: ExecutorContext;
329
- environment: NodeJS.ProcessEnv;
330
- plan: InfrastructurePlanV1;
331
- validation: InfrastructureAuthorizationEvidenceV1['validation'];
332
- }): boolean;
333
- interface LocalMutationStateObservation {
334
- actorArn: string;
335
- exportedState: unknown;
336
- identity: InfrastructureStateIdentityV1;
337
- resourceCount: number;
338
- }
339
- /** @internal */
340
- export declare function observeLocalMutationStateIdentity(input: {
341
- backendBootstrapDigest: string;
342
- childEnvironment: NodeJS.ProcessEnv;
343
- environment: NodeJS.ProcessEnv;
344
- invocation: SstCommandInvocation;
345
- now: Date;
346
- project: string;
347
- sourceCommit: string;
348
- spawn: NonNullable<InfrastructurePlanExecutorDependencies['spawn']>;
349
- }): LocalMutationStateObservation;
350
- /** @internal */
351
- export declare function retainLocalRefreshStateBackup(input: {
352
- context: ExecutorContext;
353
- now: Date;
354
- observation: LocalMutationStateObservation;
355
- plan: InfrastructurePlanV1;
356
- project: string;
357
- }): void;
358
- declare function consumeLocalMutationCapability(input: {
359
- action: Extract<InfrastructureMutationAction, 'deploy' | 'refresh'>;
360
- authorizationContents: string;
361
- context: ExecutorContext;
362
- dependencies: InfrastructurePlanExecutorDependencies;
363
- environment: NodeJS.ProcessEnv;
364
- invocation: SstCommandInvocation;
365
- now: Date;
366
- options: InfrastructurePlanExecutorOptions;
367
- plan: InfrastructurePlanV1;
368
- planContents: string;
369
- }): void;
370
- export declare function runInfrastructurePlanExecutor(options: InfrastructurePlanExecutorOptions, context: ExecutorContext, environment?: NodeJS.ProcessEnv, dependencies?: InfrastructurePlanExecutorDependencies): Promise<{
371
- success: boolean;
372
- }>;
373
- export declare function revalidateInfrastructureMutationAuthorization(action: InfrastructureMutationAction, options: SstLifecycleOptions, context: ExecutorContext, invocation: SstCommandInvocation, environment?: NodeJS.ProcessEnv, dependencies?: InfrastructurePlanExecutorDependencies): Promise<void>;
374
- export declare function recordInfrastructureMutationConvergence(action: InfrastructureMutationAction, options: SstLifecycleOptions, context: ExecutorContext, invocation: SstCommandInvocation, applySucceeded: boolean, environment?: NodeJS.ProcessEnv, dependencies?: InfrastructurePlanExecutorDependencies): Promise<boolean>;
375
- export declare function finalizeInfrastructureMutationConvergence(options: InfrastructurePlanExecutorOptions, context: ExecutorContext, environment?: NodeJS.ProcessEnv, dependencies?: Pick<InfrastructurePlanExecutorDependencies, 'now'>): Promise<{
31
+ export declare function runInfrastructurePlanExecutor(options: InfrastructurePlanExecutorOptions, context: ExecutorContext, dependencies?: InfrastructurePlanDependencies): Promise<{
376
32
  success: boolean;
377
33
  }>;
378
34
  declare const executor: PromiseExecutor<InfrastructurePlanExecutorOptions>;