@ankhorage/deploy 0.1.0

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 (80) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +19 -0
  4. package/dist/domain/DeploymentCapability.d.ts +3 -0
  5. package/dist/domain/DeploymentCapability.d.ts.map +1 -0
  6. package/dist/domain/DeploymentCapability.js +8 -0
  7. package/dist/domain/DeploymentCapability.js.map +1 -0
  8. package/dist/domain/DeploymentCurrentState.d.ts +27 -0
  9. package/dist/domain/DeploymentCurrentState.d.ts.map +1 -0
  10. package/dist/domain/DeploymentCurrentState.js +2 -0
  11. package/dist/domain/DeploymentCurrentState.js.map +1 -0
  12. package/dist/domain/DeploymentExecutionResult.d.ts +26 -0
  13. package/dist/domain/DeploymentExecutionResult.d.ts.map +1 -0
  14. package/dist/domain/DeploymentExecutionResult.js +2 -0
  15. package/dist/domain/DeploymentExecutionResult.js.map +1 -0
  16. package/dist/domain/DeploymentFailure.d.ts +8 -0
  17. package/dist/domain/DeploymentFailure.d.ts.map +1 -0
  18. package/dist/domain/DeploymentFailure.js +2 -0
  19. package/dist/domain/DeploymentFailure.js.map +1 -0
  20. package/dist/domain/DeploymentPlan.d.ts +10 -0
  21. package/dist/domain/DeploymentPlan.d.ts.map +1 -0
  22. package/dist/domain/DeploymentPlan.js +2 -0
  23. package/dist/domain/DeploymentPlan.js.map +1 -0
  24. package/dist/domain/DeploymentPlanDiagnostic.d.ts +10 -0
  25. package/dist/domain/DeploymentPlanDiagnostic.d.ts.map +1 -0
  26. package/dist/domain/DeploymentPlanDiagnostic.js +10 -0
  27. package/dist/domain/DeploymentPlanDiagnostic.js.map +1 -0
  28. package/dist/domain/DeploymentPlanStep.d.ts +14 -0
  29. package/dist/domain/DeploymentPlanStep.d.ts.map +1 -0
  30. package/dist/domain/DeploymentPlanStep.js +2 -0
  31. package/dist/domain/DeploymentPlanStep.js.map +1 -0
  32. package/dist/domain/DeploymentRequiredAction.d.ts +18 -0
  33. package/dist/domain/DeploymentRequiredAction.d.ts.map +1 -0
  34. package/dist/domain/DeploymentRequiredAction.js +2 -0
  35. package/dist/domain/DeploymentRequiredAction.js.map +1 -0
  36. package/dist/domain/DeploymentStepOutcome.d.ts +15 -0
  37. package/dist/domain/DeploymentStepOutcome.d.ts.map +1 -0
  38. package/dist/domain/DeploymentStepOutcome.js +2 -0
  39. package/dist/domain/DeploymentStepOutcome.js.map +1 -0
  40. package/dist/domain/DeploymentTargetChange.d.ts +14 -0
  41. package/dist/domain/DeploymentTargetChange.d.ts.map +1 -0
  42. package/dist/domain/DeploymentTargetChange.js +9 -0
  43. package/dist/domain/DeploymentTargetChange.js.map +1 -0
  44. package/dist/domain/DeploymentTargetPlanContributor.d.ts +11 -0
  45. package/dist/domain/DeploymentTargetPlanContributor.d.ts.map +1 -0
  46. package/dist/domain/DeploymentTargetPlanContributor.js +2 -0
  47. package/dist/domain/DeploymentTargetPlanContributor.js.map +1 -0
  48. package/dist/domain/DeploymentVerificationResult.d.ts +14 -0
  49. package/dist/domain/DeploymentVerificationResult.d.ts.map +1 -0
  50. package/dist/domain/DeploymentVerificationResult.js +2 -0
  51. package/dist/domain/DeploymentVerificationResult.js.map +1 -0
  52. package/dist/engine/createDeploymentChanges.d.ts +9 -0
  53. package/dist/engine/createDeploymentChanges.d.ts.map +1 -0
  54. package/dist/engine/createDeploymentChanges.js +25 -0
  55. package/dist/engine/createDeploymentChanges.js.map +1 -0
  56. package/dist/engine/createDeploymentPlan.d.ts +11 -0
  57. package/dist/engine/createDeploymentPlan.d.ts.map +1 -0
  58. package/dist/engine/createDeploymentPlan.js +31 -0
  59. package/dist/engine/createDeploymentPlan.js.map +1 -0
  60. package/dist/engine/executeDeploymentPlan.d.ts +11 -0
  61. package/dist/engine/executeDeploymentPlan.d.ts.map +1 -0
  62. package/dist/engine/executeDeploymentPlan.js +34 -0
  63. package/dist/engine/executeDeploymentPlan.js.map +1 -0
  64. package/dist/engine/planContribution.d.ts +11 -0
  65. package/dist/engine/planContribution.d.ts.map +1 -0
  66. package/dist/engine/planContribution.js +37 -0
  67. package/dist/engine/planContribution.js.map +1 -0
  68. package/dist/engine/targetSnapshot.d.ts +6 -0
  69. package/dist/engine/targetSnapshot.d.ts.map +1 -0
  70. package/dist/engine/targetSnapshot.js +61 -0
  71. package/dist/engine/targetSnapshot.js.map +1 -0
  72. package/dist/engine/validatePlanStep.d.ts +6 -0
  73. package/dist/engine/validatePlanStep.d.ts.map +1 -0
  74. package/dist/engine/validatePlanStep.js +19 -0
  75. package/dist/engine/validatePlanStep.js.map +1 -0
  76. package/dist/index.d.ts +16 -0
  77. package/dist/index.d.ts.map +1 -0
  78. package/dist/index.js +16 -0
  79. package/dist/index.js.map +1 -0
  80. package/package.json +81 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # @ankhorage/deploy
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 7589ba2: Introduce the first public deployment domain API with deterministic target diffing, inspectable plan composition, structured required actions, sequential injected execution, and provider-neutral verification results backed by `@ankhorage/contracts` 7.5.0.
8
+
9
+ ## 0.0.0
10
+
11
+ - Bootstrap the standalone Ankhorage deployment package repository.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ankhorage
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,19 @@
1
+ <!-- markdownlint-disable MD013 MD033 -->
2
+ <!-- This file is generated by Paradox. Do not edit manually. -->
3
+
4
+ # @ankhorage/deploy
5
+
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v0.0.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
7
+
8
+ Declarative deployment engine for Expo apps across web, iOS, and Android.
9
+
10
+ ## Generated documentation
11
+
12
+ - [Interactive documentation app](././paradox/index.html)
13
+ - [Public API reference](././paradox/exports.md)
14
+ - [Component registry](././paradox/components.md)
15
+ - [Architecture overview](././paradox/diagrams/architecture-overview.mmd)
16
+ - [Module relationships](././paradox/diagrams/module-relationships.mmd)
17
+ - [Export graph](././paradox/diagrams/export-graph.mmd)
18
+ - [createDeploymentPlan sequence](././paradox/diagrams/sequences/create-deployment-plan.mmd)
19
+ - [executeDeploymentPlan sequence](././paradox/diagrams/sequences/execute-deployment-plan.mmd)
@@ -0,0 +1,3 @@
1
+ export declare const DEPLOYMENT_CAPABILITIES: readonly ["provision", "prepare", "build", "publish", "verify"];
2
+ export type DeploymentCapability = (typeof DEPLOYMENT_CAPABILITIES)[number];
3
+ //# sourceMappingURL=DeploymentCapability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentCapability.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentCapability.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,iEAM1B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export const DEPLOYMENT_CAPABILITIES = [
2
+ 'provision',
3
+ 'prepare',
4
+ 'build',
5
+ 'publish',
6
+ 'verify',
7
+ ];
8
+ //# sourceMappingURL=DeploymentCapability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentCapability.js","sourceRoot":"","sources":["../../src/domain/DeploymentCapability.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,WAAW;IACX,SAAS;IACT,OAAO;IACP,SAAS;IACT,QAAQ;CACA,CAAC","sourcesContent":["export const DEPLOYMENT_CAPABILITIES = [\n 'provision',\n 'prepare',\n 'build',\n 'publish',\n 'verify',\n] as const;\n\nexport type DeploymentCapability = (typeof DEPLOYMENT_CAPABILITIES)[number];\n"]}
@@ -0,0 +1,27 @@
1
+ import type { AppDeployProviderSelection } from '@ankhorage/contracts/deploy';
2
+ export interface DeploymentObservedWebTarget {
3
+ readonly providers?: AppDeployProviderSelection;
4
+ }
5
+ export interface DeploymentObservedAndroidTarget {
6
+ readonly package: string;
7
+ readonly providers?: AppDeployProviderSelection;
8
+ }
9
+ export interface DeploymentObservedIosTarget {
10
+ readonly bundleIdentifier: string;
11
+ readonly providers?: AppDeployProviderSelection;
12
+ }
13
+ export type DeploymentObservedTarget = ({
14
+ readonly target: 'web';
15
+ } & DeploymentObservedWebTarget) | ({
16
+ readonly target: 'android';
17
+ } & DeploymentObservedAndroidTarget) | ({
18
+ readonly target: 'ios';
19
+ } & DeploymentObservedIosTarget);
20
+ export interface DeploymentCurrentState {
21
+ readonly targets: {
22
+ readonly web?: DeploymentObservedWebTarget;
23
+ readonly android?: DeploymentObservedAndroidTarget;
24
+ readonly ios?: DeploymentObservedIosTarget;
25
+ };
26
+ }
27
+ //# sourceMappingURL=DeploymentCurrentState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentCurrentState.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentCurrentState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAE9E,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACjD;AAED,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACjD;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACjD;AAED,MAAM,MAAM,wBAAwB,GAChC,CAAC;IAAE,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAA;CAAE,GAAG,2BAA2B,CAAC,GAC1D,CAAC;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;CAAE,GAAG,+BAA+B,CAAC,GAClE,CAAC;IAAE,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAA;CAAE,GAAG,2BAA2B,CAAC,CAAC;AAE/D,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,GAAG,CAAC,EAAE,2BAA2B,CAAC;QAC3C,QAAQ,CAAC,OAAO,CAAC,EAAE,+BAA+B,CAAC;QACnD,QAAQ,CAAC,GAAG,CAAC,EAAE,2BAA2B,CAAC;KAC5C,CAAC;CACH"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentCurrentState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentCurrentState.js","sourceRoot":"","sources":["../../src/domain/DeploymentCurrentState.ts"],"names":[],"mappings":"","sourcesContent":["import type { AppDeployProviderSelection } from '@ankhorage/contracts/deploy';\n\nexport interface DeploymentObservedWebTarget {\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface DeploymentObservedAndroidTarget {\n readonly package: string;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface DeploymentObservedIosTarget {\n readonly bundleIdentifier: string;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport type DeploymentObservedTarget =\n | ({ readonly target: 'web' } & DeploymentObservedWebTarget)\n | ({ readonly target: 'android' } & DeploymentObservedAndroidTarget)\n | ({ readonly target: 'ios' } & DeploymentObservedIosTarget);\n\nexport interface DeploymentCurrentState {\n readonly targets: {\n readonly web?: DeploymentObservedWebTarget;\n readonly android?: DeploymentObservedAndroidTarget;\n readonly ios?: DeploymentObservedIosTarget;\n };\n}\n"]}
@@ -0,0 +1,26 @@
1
+ import type { DeploymentFailure } from './DeploymentFailure';
2
+ import type { DeploymentPlanDiagnostic } from './DeploymentPlanDiagnostic';
3
+ import type { DeploymentPlanStep } from './DeploymentPlanStep';
4
+ import type { DeploymentRequiredAction } from './DeploymentRequiredAction';
5
+ import type { DeploymentStepOutcome } from './DeploymentStepOutcome';
6
+ export interface DeploymentStepExecutionRecord {
7
+ readonly step: DeploymentPlanStep;
8
+ readonly outcome: DeploymentStepOutcome;
9
+ }
10
+ export type DeploymentExecutionResult = {
11
+ readonly status: 'blocked';
12
+ readonly diagnostics: readonly DeploymentPlanDiagnostic[];
13
+ readonly records: readonly DeploymentStepExecutionRecord[];
14
+ } | {
15
+ readonly status: 'completed';
16
+ readonly records: readonly DeploymentStepExecutionRecord[];
17
+ } | {
18
+ readonly status: 'action-required';
19
+ readonly action: DeploymentRequiredAction;
20
+ readonly records: readonly DeploymentStepExecutionRecord[];
21
+ } | {
22
+ readonly status: 'failed';
23
+ readonly failure: DeploymentFailure;
24
+ readonly records: readonly DeploymentStepExecutionRecord[];
25
+ };
26
+ //# sourceMappingURL=DeploymentExecutionResult.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentExecutionResult.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentExecutionResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC;CACzC;AAED,MAAM,MAAM,yBAAyB,GACjC;IACE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,SAAS,wBAAwB,EAAE,CAAC;IAC1D,QAAQ,CAAC,OAAO,EAAE,SAAS,6BAA6B,EAAE,CAAC;CAC5D,GACD;IACE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,SAAS,6BAA6B,EAAE,CAAC;CAC5D,GACD;IACE,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,SAAS,6BAA6B,EAAE,CAAC;CAC5D,GACD;IACE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,SAAS,6BAA6B,EAAE,CAAC;CAC5D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentExecutionResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentExecutionResult.js","sourceRoot":"","sources":["../../src/domain/DeploymentExecutionResult.ts"],"names":[],"mappings":"","sourcesContent":["import type { DeploymentFailure } from './DeploymentFailure';\nimport type { DeploymentPlanDiagnostic } from './DeploymentPlanDiagnostic';\nimport type { DeploymentPlanStep } from './DeploymentPlanStep';\nimport type { DeploymentRequiredAction } from './DeploymentRequiredAction';\nimport type { DeploymentStepOutcome } from './DeploymentStepOutcome';\n\nexport interface DeploymentStepExecutionRecord {\n readonly step: DeploymentPlanStep;\n readonly outcome: DeploymentStepOutcome;\n}\n\nexport type DeploymentExecutionResult =\n | {\n readonly status: 'blocked';\n readonly diagnostics: readonly DeploymentPlanDiagnostic[];\n readonly records: readonly DeploymentStepExecutionRecord[];\n }\n | {\n readonly status: 'completed';\n readonly records: readonly DeploymentStepExecutionRecord[];\n }\n | {\n readonly status: 'action-required';\n readonly action: DeploymentRequiredAction;\n readonly records: readonly DeploymentStepExecutionRecord[];\n }\n | {\n readonly status: 'failed';\n readonly failure: DeploymentFailure;\n readonly records: readonly DeploymentStepExecutionRecord[];\n };\n"]}
@@ -0,0 +1,8 @@
1
+ import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';
2
+ export interface DeploymentFailure {
3
+ readonly code: string;
4
+ readonly message: string;
5
+ readonly target?: AppDeployTargetId;
6
+ readonly provider?: string;
7
+ }
8
+ //# sourceMappingURL=DeploymentFailure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentFailure.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentFailure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentFailure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentFailure.js","sourceRoot":"","sources":["../../src/domain/DeploymentFailure.ts"],"names":[],"mappings":"","sourcesContent":["import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';\n\nexport interface DeploymentFailure {\n readonly code: string;\n readonly message: string;\n readonly target?: AppDeployTargetId;\n readonly provider?: string;\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import type { DeploymentPlanDiagnostic } from './DeploymentPlanDiagnostic';
2
+ import type { DeploymentPlanStep } from './DeploymentPlanStep';
3
+ import type { DeploymentTargetChange } from './DeploymentTargetChange';
4
+ export interface DeploymentPlan {
5
+ readonly changes: readonly DeploymentTargetChange[];
6
+ readonly steps: readonly DeploymentPlanStep[];
7
+ readonly diagnostics: readonly DeploymentPlanDiagnostic[];
8
+ readonly executable: boolean;
9
+ }
10
+ //# sourceMappingURL=DeploymentPlan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentPlan.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentPlan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACpD,QAAQ,CAAC,KAAK,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC9C,QAAQ,CAAC,WAAW,EAAE,SAAS,wBAAwB,EAAE,CAAC;IAC1D,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentPlan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentPlan.js","sourceRoot":"","sources":["../../src/domain/DeploymentPlan.ts"],"names":[],"mappings":"","sourcesContent":["import type { DeploymentPlanDiagnostic } from './DeploymentPlanDiagnostic';\nimport type { DeploymentPlanStep } from './DeploymentPlanStep';\nimport type { DeploymentTargetChange } from './DeploymentTargetChange';\n\nexport interface DeploymentPlan {\n readonly changes: readonly DeploymentTargetChange[];\n readonly steps: readonly DeploymentPlanStep[];\n readonly diagnostics: readonly DeploymentPlanDiagnostic[];\n readonly executable: boolean;\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';
2
+ export declare const DEPLOYMENT_PLAN_DIAGNOSTIC_CODES: readonly ["TARGET_PLANNER_UNAVAILABLE", "CONTRIBUTOR_TARGET_MISMATCH", "TARGET_PLANNER_FAILED", "STEP_TARGET_MISMATCH", "DUPLICATE_STEP_ID", "UNDECLARED_CAPABILITY", "INVALID_STEP_ID"];
3
+ export type DeploymentPlanDiagnosticCode = (typeof DEPLOYMENT_PLAN_DIAGNOSTIC_CODES)[number];
4
+ export interface DeploymentPlanDiagnostic {
5
+ readonly code: DeploymentPlanDiagnosticCode;
6
+ readonly target: AppDeployTargetId;
7
+ readonly message: string;
8
+ readonly stepId?: string;
9
+ }
10
+ //# sourceMappingURL=DeploymentPlanDiagnostic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentPlanDiagnostic.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentPlanDiagnostic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,eAAO,MAAM,gCAAgC,0LAQnC,CAAC;AAEX,MAAM,MAAM,4BAA4B,GAAG,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7F,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,4BAA4B,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -0,0 +1,10 @@
1
+ export const DEPLOYMENT_PLAN_DIAGNOSTIC_CODES = [
2
+ 'TARGET_PLANNER_UNAVAILABLE',
3
+ 'CONTRIBUTOR_TARGET_MISMATCH',
4
+ 'TARGET_PLANNER_FAILED',
5
+ 'STEP_TARGET_MISMATCH',
6
+ 'DUPLICATE_STEP_ID',
7
+ 'UNDECLARED_CAPABILITY',
8
+ 'INVALID_STEP_ID',
9
+ ];
10
+ //# sourceMappingURL=DeploymentPlanDiagnostic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentPlanDiagnostic.js","sourceRoot":"","sources":["../../src/domain/DeploymentPlanDiagnostic.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,4BAA4B;IAC5B,6BAA6B;IAC7B,uBAAuB;IACvB,sBAAsB;IACtB,mBAAmB;IACnB,uBAAuB;IACvB,iBAAiB;CACT,CAAC","sourcesContent":["import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';\n\nexport const DEPLOYMENT_PLAN_DIAGNOSTIC_CODES = [\n 'TARGET_PLANNER_UNAVAILABLE',\n 'CONTRIBUTOR_TARGET_MISMATCH',\n 'TARGET_PLANNER_FAILED',\n 'STEP_TARGET_MISMATCH',\n 'DUPLICATE_STEP_ID',\n 'UNDECLARED_CAPABILITY',\n 'INVALID_STEP_ID',\n] as const;\n\nexport type DeploymentPlanDiagnosticCode = (typeof DEPLOYMENT_PLAN_DIAGNOSTIC_CODES)[number];\n\nexport interface DeploymentPlanDiagnostic {\n readonly code: DeploymentPlanDiagnosticCode;\n readonly target: AppDeployTargetId;\n readonly message: string;\n readonly stepId?: string;\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';
2
+ import type { DeploymentCapability } from './DeploymentCapability';
3
+ export declare const DEPLOYMENT_STEP_OPERATIONS: readonly ["create", "update", "remove", "run"];
4
+ export type DeploymentStepOperation = (typeof DEPLOYMENT_STEP_OPERATIONS)[number];
5
+ export type DeploymentPhase = DeploymentCapability;
6
+ export interface DeploymentPlanStep {
7
+ readonly id: string;
8
+ readonly target: AppDeployTargetId;
9
+ readonly phase: DeploymentPhase;
10
+ readonly operation: DeploymentStepOperation;
11
+ readonly provider?: string;
12
+ readonly reason: string;
13
+ }
14
+ //# sourceMappingURL=DeploymentPlanStep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentPlanStep.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentPlanStep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,eAAO,MAAM,0BAA0B,gDAAiD,CAAC;AACzF,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAElF,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC;AAEnD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAC5C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,2 @@
1
+ export const DEPLOYMENT_STEP_OPERATIONS = ['create', 'update', 'remove', 'run'];
2
+ //# sourceMappingURL=DeploymentPlanStep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentPlanStep.js","sourceRoot":"","sources":["../../src/domain/DeploymentPlanStep.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAU,CAAC","sourcesContent":["import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';\n\nimport type { DeploymentCapability } from './DeploymentCapability';\n\nexport const DEPLOYMENT_STEP_OPERATIONS = ['create', 'update', 'remove', 'run'] as const;\nexport type DeploymentStepOperation = (typeof DEPLOYMENT_STEP_OPERATIONS)[number];\n\nexport type DeploymentPhase = DeploymentCapability;\n\nexport interface DeploymentPlanStep {\n readonly id: string;\n readonly target: AppDeployTargetId;\n readonly phase: DeploymentPhase;\n readonly operation: DeploymentStepOperation;\n readonly provider?: string;\n readonly reason: string;\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';
2
+ export interface DeploymentAuthenticationRequiredAction {
3
+ readonly type: 'authentication';
4
+ readonly provider: string;
5
+ readonly target?: AppDeployTargetId;
6
+ readonly code: string;
7
+ readonly message: string;
8
+ }
9
+ export interface DeploymentManualAction {
10
+ readonly type: 'manual-action';
11
+ readonly target: AppDeployTargetId;
12
+ readonly provider?: string;
13
+ readonly code: string;
14
+ readonly message: string;
15
+ readonly url?: string;
16
+ }
17
+ export type DeploymentRequiredAction = DeploymentAuthenticationRequiredAction | DeploymentManualAction;
18
+ //# sourceMappingURL=DeploymentRequiredAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentRequiredAction.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentRequiredAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,MAAM,WAAW,sCAAsC;IACrD,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,wBAAwB,GAClC,sCAAsC,GAAG,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentRequiredAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentRequiredAction.js","sourceRoot":"","sources":["../../src/domain/DeploymentRequiredAction.ts"],"names":[],"mappings":"","sourcesContent":["import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';\n\nexport interface DeploymentAuthenticationRequiredAction {\n readonly type: 'authentication';\n readonly provider: string;\n readonly target?: AppDeployTargetId;\n readonly code: string;\n readonly message: string;\n}\n\nexport interface DeploymentManualAction {\n readonly type: 'manual-action';\n readonly target: AppDeployTargetId;\n readonly provider?: string;\n readonly code: string;\n readonly message: string;\n readonly url?: string;\n}\n\nexport type DeploymentRequiredAction =\n DeploymentAuthenticationRequiredAction | DeploymentManualAction;\n"]}
@@ -0,0 +1,15 @@
1
+ import type { DeploymentFailure } from './DeploymentFailure';
2
+ import type { DeploymentRequiredAction } from './DeploymentRequiredAction';
3
+ export type DeploymentStepOutcome = {
4
+ readonly status: 'completed';
5
+ } | {
6
+ readonly status: 'skipped';
7
+ readonly reason: string;
8
+ } | {
9
+ readonly status: 'action-required';
10
+ readonly action: DeploymentRequiredAction;
11
+ } | {
12
+ readonly status: 'failed';
13
+ readonly error: DeploymentFailure;
14
+ };
15
+ //# sourceMappingURL=DeploymentStepOutcome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentStepOutcome.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentStepOutcome.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAE3E,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;CAAE,GAChC;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACvD;IAAE,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAA;CAAE,GACjF;IAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentStepOutcome.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentStepOutcome.js","sourceRoot":"","sources":["../../src/domain/DeploymentStepOutcome.ts"],"names":[],"mappings":"","sourcesContent":["import type { DeploymentFailure } from './DeploymentFailure';\nimport type { DeploymentRequiredAction } from './DeploymentRequiredAction';\n\nexport type DeploymentStepOutcome =\n | { readonly status: 'completed' }\n | { readonly status: 'skipped'; readonly reason: string }\n | { readonly status: 'action-required'; readonly action: DeploymentRequiredAction }\n | { readonly status: 'failed'; readonly error: DeploymentFailure };\n"]}
@@ -0,0 +1,14 @@
1
+ import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';
2
+ import type { DeploymentObservedTarget } from './DeploymentCurrentState';
3
+ export declare const DEPLOYMENT_CHANGE_KINDS: readonly ["create", "update", "remove", "none"];
4
+ export type DeploymentChangeKind = (typeof DEPLOYMENT_CHANGE_KINDS)[number];
5
+ export declare const DEPLOYMENT_CHANGE_REASONS: readonly ["already-absent", "target-missing", "target-not-desired", "configuration-changed", "already-current"];
6
+ export type DeploymentChangeReason = (typeof DEPLOYMENT_CHANGE_REASONS)[number];
7
+ export interface DeploymentTargetChange {
8
+ readonly target: AppDeployTargetId;
9
+ readonly kind: DeploymentChangeKind;
10
+ readonly desired: DeploymentObservedTarget | null;
11
+ readonly current: DeploymentObservedTarget | null;
12
+ readonly reason: DeploymentChangeReason;
13
+ }
14
+ //# sourceMappingURL=DeploymentTargetChange.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentTargetChange.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentTargetChange.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEzE,eAAO,MAAM,uBAAuB,iDAAkD,CAAC;AACvF,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,eAAO,MAAM,yBAAyB,iHAM5B,CAAC;AACX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;CACzC"}
@@ -0,0 +1,9 @@
1
+ export const DEPLOYMENT_CHANGE_KINDS = ['create', 'update', 'remove', 'none'];
2
+ export const DEPLOYMENT_CHANGE_REASONS = [
3
+ 'already-absent',
4
+ 'target-missing',
5
+ 'target-not-desired',
6
+ 'configuration-changed',
7
+ 'already-current',
8
+ ];
9
+ //# sourceMappingURL=DeploymentTargetChange.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentTargetChange.js","sourceRoot":"","sources":["../../src/domain/DeploymentTargetChange.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC;AAGvF,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,gBAAgB;IAChB,gBAAgB;IAChB,oBAAoB;IACpB,uBAAuB;IACvB,iBAAiB;CACT,CAAC","sourcesContent":["import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';\n\nimport type { DeploymentObservedTarget } from './DeploymentCurrentState';\n\nexport const DEPLOYMENT_CHANGE_KINDS = ['create', 'update', 'remove', 'none'] as const;\nexport type DeploymentChangeKind = (typeof DEPLOYMENT_CHANGE_KINDS)[number];\n\nexport const DEPLOYMENT_CHANGE_REASONS = [\n 'already-absent',\n 'target-missing',\n 'target-not-desired',\n 'configuration-changed',\n 'already-current',\n] as const;\nexport type DeploymentChangeReason = (typeof DEPLOYMENT_CHANGE_REASONS)[number];\n\nexport interface DeploymentTargetChange {\n readonly target: AppDeployTargetId;\n readonly kind: DeploymentChangeKind;\n readonly desired: DeploymentObservedTarget | null;\n readonly current: DeploymentObservedTarget | null;\n readonly reason: DeploymentChangeReason;\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';
2
+ import type { DeploymentCapability } from './DeploymentCapability';
3
+ import type { DeploymentPlanStep } from './DeploymentPlanStep';
4
+ import type { DeploymentTargetChange } from './DeploymentTargetChange';
5
+ export interface DeploymentTargetPlanContributor {
6
+ readonly target: AppDeployTargetId;
7
+ readonly capabilities: readonly DeploymentCapability[];
8
+ createSteps(change: DeploymentTargetChange): readonly DeploymentPlanStep[];
9
+ }
10
+ export type DeploymentTargetPlanContributors = Partial<Record<AppDeployTargetId, DeploymentTargetPlanContributor>>;
11
+ //# sourceMappingURL=DeploymentTargetPlanContributor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentTargetPlanContributor.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentTargetPlanContributor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,YAAY,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACvD,WAAW,CAAC,MAAM,EAAE,sBAAsB,GAAG,SAAS,kBAAkB,EAAE,CAAC;CAC5E;AAED,MAAM,MAAM,gCAAgC,GAAG,OAAO,CACpD,MAAM,CAAC,iBAAiB,EAAE,+BAA+B,CAAC,CAC3D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentTargetPlanContributor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentTargetPlanContributor.js","sourceRoot":"","sources":["../../src/domain/DeploymentTargetPlanContributor.ts"],"names":[],"mappings":"","sourcesContent":["import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';\n\nimport type { DeploymentCapability } from './DeploymentCapability';\nimport type { DeploymentPlanStep } from './DeploymentPlanStep';\nimport type { DeploymentTargetChange } from './DeploymentTargetChange';\n\nexport interface DeploymentTargetPlanContributor {\n readonly target: AppDeployTargetId;\n readonly capabilities: readonly DeploymentCapability[];\n createSteps(change: DeploymentTargetChange): readonly DeploymentPlanStep[];\n}\n\nexport type DeploymentTargetPlanContributors = Partial<\n Record<AppDeployTargetId, DeploymentTargetPlanContributor>\n>;\n"]}
@@ -0,0 +1,14 @@
1
+ import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';
2
+ export interface DeploymentVerificationIssue {
3
+ readonly code: string;
4
+ readonly message: string;
5
+ readonly target?: AppDeployTargetId;
6
+ readonly provider?: string;
7
+ }
8
+ export type DeploymentVerificationResult = {
9
+ readonly ok: true;
10
+ } | {
11
+ readonly ok: false;
12
+ readonly issues: readonly DeploymentVerificationIssue[];
13
+ };
14
+ //# sourceMappingURL=DeploymentVerificationResult.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentVerificationResult.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentVerificationResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,MAAM,4BAA4B,GACpC;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAA;CAAE,GACrB;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,2BAA2B,EAAE,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentVerificationResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentVerificationResult.js","sourceRoot":"","sources":["../../src/domain/DeploymentVerificationResult.ts"],"names":[],"mappings":"","sourcesContent":["import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';\n\nexport interface DeploymentVerificationIssue {\n readonly code: string;\n readonly message: string;\n readonly target?: AppDeployTargetId;\n readonly provider?: string;\n}\n\nexport type DeploymentVerificationResult =\n | { readonly ok: true }\n | { readonly ok: false; readonly issues: readonly DeploymentVerificationIssue[] };\n"]}
@@ -0,0 +1,9 @@
1
+ import { type AppDeployManifest } from '@ankhorage/contracts/deploy';
2
+ import type { DeploymentCurrentState } from '../domain/DeploymentCurrentState';
3
+ import type { DeploymentTargetChange } from '../domain/DeploymentTargetChange';
4
+ export interface CreateDeploymentChangesInput {
5
+ readonly desired: AppDeployManifest;
6
+ readonly current: DeploymentCurrentState;
7
+ }
8
+ export declare function createDeploymentChanges(input: CreateDeploymentChangesInput): readonly DeploymentTargetChange[];
9
+ //# sourceMappingURL=createDeploymentChanges.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDeploymentChanges.d.ts","sourceRoot":"","sources":["../../src/engine/createDeploymentChanges.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAE5F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAG/E,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC;CAC1C;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,4BAA4B,GAClC,SAAS,sBAAsB,EAAE,CAMnC"}
@@ -0,0 +1,25 @@
1
+ import { APP_DEPLOY_TARGET_IDS } from '@ankhorage/contracts/deploy';
2
+ import { areTargetSnapshotsEqual, getCurrentTarget, getDesiredTarget } from './targetSnapshot';
3
+ export function createDeploymentChanges(input) {
4
+ return APP_DEPLOY_TARGET_IDS.map((target) => {
5
+ const desired = getDesiredTarget(input.desired, target);
6
+ const current = getCurrentTarget(input.current, target);
7
+ return createTargetChange(target, desired, current);
8
+ });
9
+ }
10
+ function createTargetChange(target, desired, current) {
11
+ if (desired === null && current === null) {
12
+ return { target, kind: 'none', desired, current, reason: 'already-absent' };
13
+ }
14
+ if (desired !== null && current === null) {
15
+ return { target, kind: 'create', desired, current, reason: 'target-missing' };
16
+ }
17
+ if (desired === null && current !== null) {
18
+ return { target, kind: 'remove', desired, current, reason: 'target-not-desired' };
19
+ }
20
+ const equal = desired !== null && current !== null && areTargetSnapshotsEqual(desired, current);
21
+ return equal
22
+ ? { target, kind: 'none', desired, current, reason: 'already-current' }
23
+ : { target, kind: 'update', desired, current, reason: 'configuration-changed' };
24
+ }
25
+ //# sourceMappingURL=createDeploymentChanges.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDeploymentChanges.js","sourceRoot":"","sources":["../../src/engine/createDeploymentChanges.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAA0B,MAAM,6BAA6B,CAAC;AAI5F,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAO/F,MAAM,UAAU,uBAAuB,CACrC,KAAmC;IAEnC,OAAO,qBAAqB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC1C,MAAM,OAAO,GAAG,gBAAgB,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACxD,MAAM,OAAO,GAAG,gBAAgB,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACxD,OAAO,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,kBAAkB,CACzB,MAAwC,EACxC,OAA0C,EAC1C,OAA0C;IAE1C,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACzC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC9E,CAAC;IACD,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACzC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAChF,CAAC;IACD,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACzC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,CAAC;IACpF,CAAC;IACD,MAAM,KAAK,GAAG,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,IAAI,IAAI,uBAAuB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAChG,OAAO,KAAK;QACV,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE;QACvE,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,CAAC;AACpF,CAAC","sourcesContent":["import { APP_DEPLOY_TARGET_IDS, type AppDeployManifest } from '@ankhorage/contracts/deploy';\n\nimport type { DeploymentCurrentState } from '../domain/DeploymentCurrentState';\nimport type { DeploymentTargetChange } from '../domain/DeploymentTargetChange';\nimport { areTargetSnapshotsEqual, getCurrentTarget, getDesiredTarget } from './targetSnapshot';\n\nexport interface CreateDeploymentChangesInput {\n readonly desired: AppDeployManifest;\n readonly current: DeploymentCurrentState;\n}\n\nexport function createDeploymentChanges(\n input: CreateDeploymentChangesInput,\n): readonly DeploymentTargetChange[] {\n return APP_DEPLOY_TARGET_IDS.map((target) => {\n const desired = getDesiredTarget(input.desired, target);\n const current = getCurrentTarget(input.current, target);\n return createTargetChange(target, desired, current);\n });\n}\n\nfunction createTargetChange(\n target: DeploymentTargetChange['target'],\n desired: DeploymentTargetChange['desired'],\n current: DeploymentTargetChange['current'],\n): DeploymentTargetChange {\n if (desired === null && current === null) {\n return { target, kind: 'none', desired, current, reason: 'already-absent' };\n }\n if (desired !== null && current === null) {\n return { target, kind: 'create', desired, current, reason: 'target-missing' };\n }\n if (desired === null && current !== null) {\n return { target, kind: 'remove', desired, current, reason: 'target-not-desired' };\n }\n const equal = desired !== null && current !== null && areTargetSnapshotsEqual(desired, current);\n return equal\n ? { target, kind: 'none', desired, current, reason: 'already-current' }\n : { target, kind: 'update', desired, current, reason: 'configuration-changed' };\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type { AppDeployManifest } from '@ankhorage/contracts/deploy';
2
+ import type { DeploymentCurrentState } from '../domain/DeploymentCurrentState';
3
+ import type { DeploymentPlan } from '../domain/DeploymentPlan';
4
+ import type { DeploymentTargetPlanContributors } from '../domain/DeploymentTargetPlanContributor';
5
+ export interface CreateDeploymentPlanInput {
6
+ readonly desired: AppDeployManifest;
7
+ readonly current: DeploymentCurrentState;
8
+ readonly contributors: DeploymentTargetPlanContributors;
9
+ }
10
+ export declare function createDeploymentPlan(input: CreateDeploymentPlanInput): DeploymentPlan;
11
+ //# sourceMappingURL=createDeploymentPlan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDeploymentPlan.d.ts","sourceRoot":"","sources":["../../src/engine/createDeploymentPlan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAIlG,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC;IACzC,QAAQ,CAAC,YAAY,EAAE,gCAAgC,CAAC;CACzD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,cAAc,CA4BrF"}
@@ -0,0 +1,31 @@
1
+ import { createDeploymentChanges } from './createDeploymentChanges';
2
+ import { appendTargetContribution } from './planContribution';
3
+ export function createDeploymentPlan(input) {
4
+ const changes = createDeploymentChanges(input);
5
+ const mutable = {
6
+ diagnostics: [],
7
+ stepIds: new Set(),
8
+ steps: [],
9
+ };
10
+ for (const change of changes) {
11
+ if (change.kind === 'none')
12
+ continue;
13
+ const contributor = input.contributors[change.target];
14
+ if (contributor === undefined) {
15
+ mutable.diagnostics.push({
16
+ code: 'TARGET_PLANNER_UNAVAILABLE',
17
+ target: change.target,
18
+ message: 'No target planner is registered for an actionable deployment change.',
19
+ });
20
+ continue;
21
+ }
22
+ appendTargetContribution(change, contributor, mutable);
23
+ }
24
+ return {
25
+ changes,
26
+ steps: mutable.steps,
27
+ diagnostics: mutable.diagnostics,
28
+ executable: mutable.diagnostics.length === 0,
29
+ };
30
+ }
31
+ //# sourceMappingURL=createDeploymentPlan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDeploymentPlan.js","sourceRoot":"","sources":["../../src/engine/createDeploymentPlan.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAA8B,MAAM,oBAAoB,CAAC;AAQ1F,MAAM,UAAU,oBAAoB,CAAC,KAAgC;IACnE,MAAM,OAAO,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;IAC/C,MAAM,OAAO,GAA0B;QACrC,WAAW,EAAE,EAAE;QACf,OAAO,EAAE,IAAI,GAAG,EAAU;QAC1B,KAAK,EAAE,EAAE;KACV,CAAC;IAEF,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM;YAAE,SAAS;QACrC,MAAM,WAAW,GAAG,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;gBACvB,IAAI,EAAE,4BAA4B;gBAClC,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,OAAO,EAAE,sEAAsE;aAChF,CAAC,CAAC;YACH,SAAS;QACX,CAAC;QACD,wBAAwB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED,OAAO;QACL,OAAO;QACP,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC;KAC7C,CAAC;AACJ,CAAC","sourcesContent":["import type { AppDeployManifest } from '@ankhorage/contracts/deploy';\n\nimport type { DeploymentCurrentState } from '../domain/DeploymentCurrentState';\nimport type { DeploymentPlan } from '../domain/DeploymentPlan';\nimport type { DeploymentTargetPlanContributors } from '../domain/DeploymentTargetPlanContributor';\nimport { createDeploymentChanges } from './createDeploymentChanges';\nimport { appendTargetContribution, type MutableDeploymentPlan } from './planContribution';\n\nexport interface CreateDeploymentPlanInput {\n readonly desired: AppDeployManifest;\n readonly current: DeploymentCurrentState;\n readonly contributors: DeploymentTargetPlanContributors;\n}\n\nexport function createDeploymentPlan(input: CreateDeploymentPlanInput): DeploymentPlan {\n const changes = createDeploymentChanges(input);\n const mutable: MutableDeploymentPlan = {\n diagnostics: [],\n stepIds: new Set<string>(),\n steps: [],\n };\n\n for (const change of changes) {\n if (change.kind === 'none') continue;\n const contributor = input.contributors[change.target];\n if (contributor === undefined) {\n mutable.diagnostics.push({\n code: 'TARGET_PLANNER_UNAVAILABLE',\n target: change.target,\n message: 'No target planner is registered for an actionable deployment change.',\n });\n continue;\n }\n appendTargetContribution(change, contributor, mutable);\n }\n\n return {\n changes,\n steps: mutable.steps,\n diagnostics: mutable.diagnostics,\n executable: mutable.diagnostics.length === 0,\n };\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type { DeploymentExecutionResult } from '../domain/DeploymentExecutionResult';
2
+ import type { DeploymentPlan } from '../domain/DeploymentPlan';
3
+ import type { DeploymentPlanStep } from '../domain/DeploymentPlanStep';
4
+ import type { DeploymentStepOutcome } from '../domain/DeploymentStepOutcome';
5
+ export type DeploymentStepExecutor = (step: DeploymentPlanStep) => Promise<DeploymentStepOutcome>;
6
+ export interface ExecuteDeploymentPlanInput {
7
+ readonly plan: DeploymentPlan;
8
+ readonly executeStep: DeploymentStepExecutor;
9
+ }
10
+ export declare function executeDeploymentPlan(input: ExecuteDeploymentPlanInput): Promise<DeploymentExecutionResult>;
11
+ //# sourceMappingURL=executeDeploymentPlan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executeDeploymentPlan.d.ts","sourceRoot":"","sources":["../../src/engine/executeDeploymentPlan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EAE1B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE7E,MAAM,MAAM,sBAAsB,GAAG,CAAC,IAAI,EAAE,kBAAkB,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAElG,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,sBAAsB,CAAC;CAC9C;AAED,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,0BAA0B,GAChC,OAAO,CAAC,yBAAyB,CAAC,CAiBpC"}
@@ -0,0 +1,34 @@
1
+ export async function executeDeploymentPlan(input) {
2
+ if (!input.plan.executable) {
3
+ return { status: 'blocked', diagnostics: input.plan.diagnostics, records: [] };
4
+ }
5
+ const records = [];
6
+ for (const step of input.plan.steps) {
7
+ const outcome = await safelyExecuteStep(step, input.executeStep);
8
+ records.push({ step, outcome });
9
+ if (outcome.status === 'action-required') {
10
+ return { status: 'action-required', action: outcome.action, records };
11
+ }
12
+ if (outcome.status === 'failed') {
13
+ return { status: 'failed', failure: outcome.error, records };
14
+ }
15
+ }
16
+ return { status: 'completed', records };
17
+ }
18
+ async function safelyExecuteStep(step, executeStep) {
19
+ try {
20
+ return await executeStep(step);
21
+ }
22
+ catch {
23
+ return {
24
+ status: 'failed',
25
+ error: {
26
+ code: 'STEP_EXECUTOR_THROWN',
27
+ message: 'Deployment step executor threw an exception.',
28
+ target: step.target,
29
+ ...(step.provider === undefined ? {} : { provider: step.provider }),
30
+ },
31
+ };
32
+ }
33
+ }
34
+ //# sourceMappingURL=executeDeploymentPlan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executeDeploymentPlan.js","sourceRoot":"","sources":["../../src/engine/executeDeploymentPlan.ts"],"names":[],"mappings":"AAeA,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,KAAiC;IAEjC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;QAC3B,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACjF,CAAC;IAED,MAAM,OAAO,GAAoC,EAAE,CAAC;IACpD,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QACpC,MAAM,OAAO,GAAG,MAAM,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;QACjE,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QAChC,IAAI,OAAO,CAAC,MAAM,KAAK,iBAAiB,EAAE,CAAC;YACzC,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;QACxE,CAAC;QACD,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YAChC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC;QAC/D,CAAC;IACH,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;AAC1C,CAAC;AAED,KAAK,UAAU,iBAAiB,CAC9B,IAAwB,EACxB,WAAmC;IAEnC,IAAI,CAAC;QACH,OAAO,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;YACL,MAAM,EAAE,QAAQ;YAChB,KAAK,EAAE;gBACL,IAAI,EAAE,sBAAsB;gBAC5B,OAAO,EAAE,8CAA8C;gBACvD,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,GAAG,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;aACpE;SACF,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import type {\n DeploymentExecutionResult,\n DeploymentStepExecutionRecord,\n} from '../domain/DeploymentExecutionResult';\nimport type { DeploymentPlan } from '../domain/DeploymentPlan';\nimport type { DeploymentPlanStep } from '../domain/DeploymentPlanStep';\nimport type { DeploymentStepOutcome } from '../domain/DeploymentStepOutcome';\n\nexport type DeploymentStepExecutor = (step: DeploymentPlanStep) => Promise<DeploymentStepOutcome>;\n\nexport interface ExecuteDeploymentPlanInput {\n readonly plan: DeploymentPlan;\n readonly executeStep: DeploymentStepExecutor;\n}\n\nexport async function executeDeploymentPlan(\n input: ExecuteDeploymentPlanInput,\n): Promise<DeploymentExecutionResult> {\n if (!input.plan.executable) {\n return { status: 'blocked', diagnostics: input.plan.diagnostics, records: [] };\n }\n\n const records: DeploymentStepExecutionRecord[] = [];\n for (const step of input.plan.steps) {\n const outcome = await safelyExecuteStep(step, input.executeStep);\n records.push({ step, outcome });\n if (outcome.status === 'action-required') {\n return { status: 'action-required', action: outcome.action, records };\n }\n if (outcome.status === 'failed') {\n return { status: 'failed', failure: outcome.error, records };\n }\n }\n return { status: 'completed', records };\n}\n\nasync function safelyExecuteStep(\n step: DeploymentPlanStep,\n executeStep: DeploymentStepExecutor,\n): Promise<DeploymentStepOutcome> {\n try {\n return await executeStep(step);\n } catch {\n return {\n status: 'failed',\n error: {\n code: 'STEP_EXECUTOR_THROWN',\n message: 'Deployment step executor threw an exception.',\n target: step.target,\n ...(step.provider === undefined ? {} : { provider: step.provider }),\n },\n };\n }\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type { DeploymentPlanDiagnostic } from '../domain/DeploymentPlanDiagnostic';
2
+ import type { DeploymentPlanStep } from '../domain/DeploymentPlanStep';
3
+ import type { DeploymentTargetChange } from '../domain/DeploymentTargetChange';
4
+ import type { DeploymentTargetPlanContributor } from '../domain/DeploymentTargetPlanContributor';
5
+ export interface MutableDeploymentPlan {
6
+ readonly diagnostics: DeploymentPlanDiagnostic[];
7
+ readonly stepIds: Set<string>;
8
+ readonly steps: DeploymentPlanStep[];
9
+ }
10
+ export declare function appendTargetContribution(change: DeploymentTargetChange, contributor: DeploymentTargetPlanContributor, plan: MutableDeploymentPlan): void;
11
+ //# sourceMappingURL=planContribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planContribution.d.ts","sourceRoot":"","sources":["../../src/engine/planContribution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAGjG,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACjD,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,kBAAkB,EAAE,CAAC;CACtC;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,sBAAsB,EAC9B,WAAW,EAAE,+BAA+B,EAC5C,IAAI,EAAE,qBAAqB,GAC1B,IAAI,CAYN"}
@@ -0,0 +1,37 @@
1
+ import { validatePlanStep } from './validatePlanStep';
2
+ export function appendTargetContribution(change, contributor, plan) {
3
+ if (contributor.target !== change.target) {
4
+ plan.diagnostics.push({
5
+ code: 'CONTRIBUTOR_TARGET_MISMATCH',
6
+ target: change.target,
7
+ message: 'The registered target planner declares a different target.',
8
+ });
9
+ return;
10
+ }
11
+ const steps = safelyCreateSteps(change, contributor, plan.diagnostics);
12
+ for (const step of steps)
13
+ appendValidStep(step, change, contributor, plan);
14
+ }
15
+ function safelyCreateSteps(change, contributor, diagnostics) {
16
+ try {
17
+ return contributor.createSteps(change);
18
+ }
19
+ catch {
20
+ diagnostics.push({
21
+ code: 'TARGET_PLANNER_FAILED',
22
+ target: change.target,
23
+ message: 'The target planner failed while creating deployment steps.',
24
+ });
25
+ return [];
26
+ }
27
+ }
28
+ function appendValidStep(step, change, contributor, plan) {
29
+ const diagnostic = validatePlanStep(step, change, contributor, plan.stepIds);
30
+ if (diagnostic !== null) {
31
+ plan.diagnostics.push(diagnostic);
32
+ return;
33
+ }
34
+ plan.stepIds.add(step.id);
35
+ plan.steps.push(step);
36
+ }
37
+ //# sourceMappingURL=planContribution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planContribution.js","sourceRoot":"","sources":["../../src/engine/planContribution.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAQtD,MAAM,UAAU,wBAAwB,CACtC,MAA8B,EAC9B,WAA4C,EAC5C,IAA2B;IAE3B,IAAI,WAAW,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC;QACzC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;YACpB,IAAI,EAAE,6BAA6B;YACnC,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,OAAO,EAAE,4DAA4D;SACtE,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IAED,MAAM,KAAK,GAAG,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACvE,KAAK,MAAM,IAAI,IAAI,KAAK;QAAE,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;AAC7E,CAAC;AAED,SAAS,iBAAiB,CACxB,MAA8B,EAC9B,WAA4C,EAC5C,WAAuC;IAEvC,IAAI,CAAC;QACH,OAAO,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,WAAW,CAAC,IAAI,CAAC;YACf,IAAI,EAAE,uBAAuB;YAC7B,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,OAAO,EAAE,4DAA4D;SACtE,CAAC,CAAC;QACH,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CACtB,IAAwB,EACxB,MAA8B,EAC9B,WAA4C,EAC5C,IAA2B;IAE3B,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7E,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACxB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAClC,OAAO;IACT,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC","sourcesContent":["import type { DeploymentPlanDiagnostic } from '../domain/DeploymentPlanDiagnostic';\nimport type { DeploymentPlanStep } from '../domain/DeploymentPlanStep';\nimport type { DeploymentTargetChange } from '../domain/DeploymentTargetChange';\nimport type { DeploymentTargetPlanContributor } from '../domain/DeploymentTargetPlanContributor';\nimport { validatePlanStep } from './validatePlanStep';\n\nexport interface MutableDeploymentPlan {\n readonly diagnostics: DeploymentPlanDiagnostic[];\n readonly stepIds: Set<string>;\n readonly steps: DeploymentPlanStep[];\n}\n\nexport function appendTargetContribution(\n change: DeploymentTargetChange,\n contributor: DeploymentTargetPlanContributor,\n plan: MutableDeploymentPlan,\n): void {\n if (contributor.target !== change.target) {\n plan.diagnostics.push({\n code: 'CONTRIBUTOR_TARGET_MISMATCH',\n target: change.target,\n message: 'The registered target planner declares a different target.',\n });\n return;\n }\n\n const steps = safelyCreateSteps(change, contributor, plan.diagnostics);\n for (const step of steps) appendValidStep(step, change, contributor, plan);\n}\n\nfunction safelyCreateSteps(\n change: DeploymentTargetChange,\n contributor: DeploymentTargetPlanContributor,\n diagnostics: DeploymentPlanDiagnostic[],\n): readonly DeploymentPlanStep[] {\n try {\n return contributor.createSteps(change);\n } catch {\n diagnostics.push({\n code: 'TARGET_PLANNER_FAILED',\n target: change.target,\n message: 'The target planner failed while creating deployment steps.',\n });\n return [];\n }\n}\n\nfunction appendValidStep(\n step: DeploymentPlanStep,\n change: DeploymentTargetChange,\n contributor: DeploymentTargetPlanContributor,\n plan: MutableDeploymentPlan,\n): void {\n const diagnostic = validatePlanStep(step, change, contributor, plan.stepIds);\n if (diagnostic !== null) {\n plan.diagnostics.push(diagnostic);\n return;\n }\n plan.stepIds.add(step.id);\n plan.steps.push(step);\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import type { AppDeployManifest, AppDeployTargetId } from '@ankhorage/contracts/deploy';
2
+ import type { DeploymentCurrentState, DeploymentObservedTarget } from '../domain/DeploymentCurrentState';
3
+ export declare function getDesiredTarget(desired: AppDeployManifest, target: AppDeployTargetId): DeploymentObservedTarget | null;
4
+ export declare function getCurrentTarget(current: DeploymentCurrentState, target: AppDeployTargetId): DeploymentObservedTarget | null;
5
+ export declare function areTargetSnapshotsEqual(left: DeploymentObservedTarget, right: DeploymentObservedTarget): boolean;
6
+ //# sourceMappingURL=targetSnapshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"targetSnapshot.d.ts","sourceRoot":"","sources":["../../src/engine/targetSnapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,iBAAiB,EAEjB,iBAAiB,EAElB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EACV,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,kCAAkC,CAAC;AAE1C,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,iBAAiB,GACxB,wBAAwB,GAAG,IAAI,CASjC;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,sBAAsB,EAC/B,MAAM,EAAE,iBAAiB,GACxB,wBAAwB,GAAG,IAAI,CASjC;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,wBAAwB,EAC9B,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAOT"}
@@ -0,0 +1,61 @@
1
+ export function getDesiredTarget(desired, target) {
2
+ switch (target) {
3
+ case 'web':
4
+ return desiredWebTarget(desired.targets.web);
5
+ case 'android':
6
+ return desiredAndroidTarget(desired.targets.android);
7
+ case 'ios':
8
+ return desiredIosTarget(desired.targets.ios);
9
+ }
10
+ }
11
+ export function getCurrentTarget(current, target) {
12
+ switch (target) {
13
+ case 'web':
14
+ return current.targets.web === undefined ? null : { target, ...current.targets.web };
15
+ case 'android':
16
+ return current.targets.android === undefined ? null : { target, ...current.targets.android };
17
+ case 'ios':
18
+ return current.targets.ios === undefined ? null : { target, ...current.targets.ios };
19
+ }
20
+ }
21
+ export function areTargetSnapshotsEqual(left, right) {
22
+ if (left.target !== right.target || !haveSameProviders(left, right))
23
+ return false;
24
+ if (left.target === 'web')
25
+ return right.target === 'web';
26
+ if (left.target === 'android') {
27
+ return right.target === 'android' && left.package === right.package;
28
+ }
29
+ return right.target === 'ios' && left.bundleIdentifier === right.bundleIdentifier;
30
+ }
31
+ function desiredWebTarget(config) {
32
+ if (config?.enabled !== true)
33
+ return null;
34
+ return { target: 'web', ...optionalProviders(config.providers) };
35
+ }
36
+ function desiredAndroidTarget(config) {
37
+ if (config?.enabled !== true)
38
+ return null;
39
+ return {
40
+ target: 'android',
41
+ package: config.package,
42
+ ...optionalProviders(config.providers),
43
+ };
44
+ }
45
+ function desiredIosTarget(config) {
46
+ if (config?.enabled !== true)
47
+ return null;
48
+ return {
49
+ target: 'ios',
50
+ bundleIdentifier: config.bundleIdentifier,
51
+ ...optionalProviders(config.providers),
52
+ };
53
+ }
54
+ function optionalProviders(providers) {
55
+ return providers === undefined ? {} : { providers };
56
+ }
57
+ function haveSameProviders(left, right) {
58
+ return (left.providers?.build === right.providers?.build &&
59
+ left.providers?.publish === right.providers?.publish);
60
+ }
61
+ //# sourceMappingURL=targetSnapshot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"targetSnapshot.js","sourceRoot":"","sources":["../../src/engine/targetSnapshot.ts"],"names":[],"mappings":"AAcA,MAAM,UAAU,gBAAgB,CAC9B,OAA0B,EAC1B,MAAyB;IAEzB,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,KAAK;YACR,OAAO,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC/C,KAAK,SAAS;YACZ,OAAO,oBAAoB,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvD,KAAK,KAAK;YACR,OAAO,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC;AACH,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,OAA+B,EAC/B,MAAyB;IAEzB,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,KAAK;YACR,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QACvF,KAAK,SAAS;YACZ,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAC/F,KAAK,KAAK;YACR,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;IACzF,CAAC;AACH,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,IAA8B,EAC9B,KAA+B;IAE/B,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAClF,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC;IACzD,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,CAAC;IACtE,CAAC;IACD,OAAO,KAAK,CAAC,MAAM,KAAK,KAAK,IAAI,IAAI,CAAC,gBAAgB,KAAK,KAAK,CAAC,gBAAgB,CAAC;AACpF,CAAC;AAED,SAAS,gBAAgB,CACvB,MAA4C;IAE5C,IAAI,MAAM,EAAE,OAAO,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,iBAAiB,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;AACnE,CAAC;AAED,SAAS,oBAAoB,CAC3B,MAAgD;IAEhD,IAAI,MAAM,EAAE,OAAO,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC1C,OAAO;QACL,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,GAAG,iBAAiB,CAAC,MAAM,CAAC,SAAS,CAAC;KACvC,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CACvB,MAA4C;IAE5C,IAAI,MAAM,EAAE,OAAO,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC1C,OAAO;QACL,MAAM,EAAE,KAAK;QACb,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;QACzC,GAAG,iBAAiB,CAAC,MAAM,CAAC,SAAS,CAAC;KACvC,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,SAAiD;IAG1E,OAAO,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC;AACtD,CAAC;AAED,SAAS,iBAAiB,CACxB,IAA8B,EAC9B,KAA+B;IAE/B,OAAO,CACL,IAAI,CAAC,SAAS,EAAE,KAAK,KAAK,KAAK,CAAC,SAAS,EAAE,KAAK;QAChD,IAAI,CAAC,SAAS,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,EAAE,OAAO,CACrD,CAAC;AACJ,CAAC","sourcesContent":["import type {\n AppDeployAndroidTargetConfig,\n AppDeployIosTargetConfig,\n AppDeployManifest,\n AppDeployProviderSelection,\n AppDeployTargetId,\n AppDeployWebTargetConfig,\n} from '@ankhorage/contracts/deploy';\n\nimport type {\n DeploymentCurrentState,\n DeploymentObservedTarget,\n} from '../domain/DeploymentCurrentState';\n\nexport function getDesiredTarget(\n desired: AppDeployManifest,\n target: AppDeployTargetId,\n): DeploymentObservedTarget | null {\n switch (target) {\n case 'web':\n return desiredWebTarget(desired.targets.web);\n case 'android':\n return desiredAndroidTarget(desired.targets.android);\n case 'ios':\n return desiredIosTarget(desired.targets.ios);\n }\n}\n\nexport function getCurrentTarget(\n current: DeploymentCurrentState,\n target: AppDeployTargetId,\n): DeploymentObservedTarget | null {\n switch (target) {\n case 'web':\n return current.targets.web === undefined ? null : { target, ...current.targets.web };\n case 'android':\n return current.targets.android === undefined ? null : { target, ...current.targets.android };\n case 'ios':\n return current.targets.ios === undefined ? null : { target, ...current.targets.ios };\n }\n}\n\nexport function areTargetSnapshotsEqual(\n left: DeploymentObservedTarget,\n right: DeploymentObservedTarget,\n): boolean {\n if (left.target !== right.target || !haveSameProviders(left, right)) return false;\n if (left.target === 'web') return right.target === 'web';\n if (left.target === 'android') {\n return right.target === 'android' && left.package === right.package;\n }\n return right.target === 'ios' && left.bundleIdentifier === right.bundleIdentifier;\n}\n\nfunction desiredWebTarget(\n config: AppDeployWebTargetConfig | undefined,\n): DeploymentObservedTarget | null {\n if (config?.enabled !== true) return null;\n return { target: 'web', ...optionalProviders(config.providers) };\n}\n\nfunction desiredAndroidTarget(\n config: AppDeployAndroidTargetConfig | undefined,\n): DeploymentObservedTarget | null {\n if (config?.enabled !== true) return null;\n return {\n target: 'android',\n package: config.package,\n ...optionalProviders(config.providers),\n };\n}\n\nfunction desiredIosTarget(\n config: AppDeployIosTargetConfig | undefined,\n): DeploymentObservedTarget | null {\n if (config?.enabled !== true) return null;\n return {\n target: 'ios',\n bundleIdentifier: config.bundleIdentifier,\n ...optionalProviders(config.providers),\n };\n}\n\nfunction optionalProviders(providers: AppDeployProviderSelection | undefined): {\n readonly providers?: AppDeployProviderSelection;\n} {\n return providers === undefined ? {} : { providers };\n}\n\nfunction haveSameProviders(\n left: DeploymentObservedTarget,\n right: DeploymentObservedTarget,\n): boolean {\n return (\n left.providers?.build === right.providers?.build &&\n left.providers?.publish === right.providers?.publish\n );\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import type { DeploymentPlanDiagnostic } from '../domain/DeploymentPlanDiagnostic';
2
+ import type { DeploymentPlanStep } from '../domain/DeploymentPlanStep';
3
+ import type { DeploymentTargetChange } from '../domain/DeploymentTargetChange';
4
+ import type { DeploymentTargetPlanContributor } from '../domain/DeploymentTargetPlanContributor';
5
+ export declare function validatePlanStep(step: DeploymentPlanStep, change: DeploymentTargetChange, contributor: DeploymentTargetPlanContributor, stepIds: ReadonlySet<string>): DeploymentPlanDiagnostic | null;
6
+ //# sourceMappingURL=validatePlanStep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validatePlanStep.d.ts","sourceRoot":"","sources":["../../src/engine/validatePlanStep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAEjG,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,kBAAkB,EACxB,MAAM,EAAE,sBAAsB,EAC9B,WAAW,EAAE,+BAA+B,EAC5C,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,GAC3B,wBAAwB,GAAG,IAAI,CA6BjC"}
@@ -0,0 +1,19 @@
1
+ export function validatePlanStep(step, change, contributor, stepIds) {
2
+ if (step.id.trim().length === 0) {
3
+ return diagnostic('INVALID_STEP_ID', change, 'Deployment plan step IDs must be non-empty.');
4
+ }
5
+ if (step.target !== change.target) {
6
+ return diagnostic('STEP_TARGET_MISMATCH', change, 'A target planner emitted a step for another target.', step.id);
7
+ }
8
+ if (!contributor.capabilities.includes(step.phase)) {
9
+ return diagnostic('UNDECLARED_CAPABILITY', change, 'A plan step uses a capability not declared by its contributor.', step.id);
10
+ }
11
+ if (stepIds.has(step.id)) {
12
+ return diagnostic('DUPLICATE_STEP_ID', change, 'Deployment plan step IDs must be globally unique.', step.id);
13
+ }
14
+ return null;
15
+ }
16
+ function diagnostic(code, change, message, stepId) {
17
+ return { code, target: change.target, message, ...(stepId === undefined ? {} : { stepId }) };
18
+ }
19
+ //# sourceMappingURL=validatePlanStep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validatePlanStep.js","sourceRoot":"","sources":["../../src/engine/validatePlanStep.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,gBAAgB,CAC9B,IAAwB,EACxB,MAA8B,EAC9B,WAA4C,EAC5C,OAA4B;IAE5B,IAAI,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChC,OAAO,UAAU,CAAC,iBAAiB,EAAE,MAAM,EAAE,6CAA6C,CAAC,CAAC;IAC9F,CAAC;IACD,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC;QAClC,OAAO,UAAU,CACf,sBAAsB,EACtB,MAAM,EACN,qDAAqD,EACrD,IAAI,CAAC,EAAE,CACR,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACnD,OAAO,UAAU,CACf,uBAAuB,EACvB,MAAM,EACN,gEAAgE,EAChE,IAAI,CAAC,EAAE,CACR,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;QACzB,OAAO,UAAU,CACf,mBAAmB,EACnB,MAAM,EACN,mDAAmD,EACnD,IAAI,CAAC,EAAE,CACR,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,UAAU,CACjB,IAAsC,EACtC,MAA8B,EAC9B,OAAe,EACf,MAAe;IAEf,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AAC/F,CAAC","sourcesContent":["import type { DeploymentPlanDiagnostic } from '../domain/DeploymentPlanDiagnostic';\nimport type { DeploymentPlanStep } from '../domain/DeploymentPlanStep';\nimport type { DeploymentTargetChange } from '../domain/DeploymentTargetChange';\nimport type { DeploymentTargetPlanContributor } from '../domain/DeploymentTargetPlanContributor';\n\nexport function validatePlanStep(\n step: DeploymentPlanStep,\n change: DeploymentTargetChange,\n contributor: DeploymentTargetPlanContributor,\n stepIds: ReadonlySet<string>,\n): DeploymentPlanDiagnostic | null {\n if (step.id.trim().length === 0) {\n return diagnostic('INVALID_STEP_ID', change, 'Deployment plan step IDs must be non-empty.');\n }\n if (step.target !== change.target) {\n return diagnostic(\n 'STEP_TARGET_MISMATCH',\n change,\n 'A target planner emitted a step for another target.',\n step.id,\n );\n }\n if (!contributor.capabilities.includes(step.phase)) {\n return diagnostic(\n 'UNDECLARED_CAPABILITY',\n change,\n 'A plan step uses a capability not declared by its contributor.',\n step.id,\n );\n }\n if (stepIds.has(step.id)) {\n return diagnostic(\n 'DUPLICATE_STEP_ID',\n change,\n 'Deployment plan step IDs must be globally unique.',\n step.id,\n );\n }\n return null;\n}\n\nfunction diagnostic(\n code: DeploymentPlanDiagnostic['code'],\n change: DeploymentTargetChange,\n message: string,\n stepId?: string,\n): DeploymentPlanDiagnostic {\n return { code, target: change.target, message, ...(stepId === undefined ? {} : { stepId }) };\n}\n"]}
@@ -0,0 +1,16 @@
1
+ export * from './domain/DeploymentCapability';
2
+ export * from './domain/DeploymentCurrentState';
3
+ export * from './domain/DeploymentExecutionResult';
4
+ export * from './domain/DeploymentFailure';
5
+ export * from './domain/DeploymentPlan';
6
+ export * from './domain/DeploymentPlanDiagnostic';
7
+ export * from './domain/DeploymentPlanStep';
8
+ export * from './domain/DeploymentRequiredAction';
9
+ export * from './domain/DeploymentStepOutcome';
10
+ export * from './domain/DeploymentTargetChange';
11
+ export * from './domain/DeploymentTargetPlanContributor';
12
+ export * from './domain/DeploymentVerificationResult';
13
+ export * from './engine/createDeploymentChanges';
14
+ export * from './engine/createDeploymentPlan';
15
+ export * from './engine/executeDeploymentPlan';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,16 @@
1
+ export * from './domain/DeploymentCapability';
2
+ export * from './domain/DeploymentCurrentState';
3
+ export * from './domain/DeploymentExecutionResult';
4
+ export * from './domain/DeploymentFailure';
5
+ export * from './domain/DeploymentPlan';
6
+ export * from './domain/DeploymentPlanDiagnostic';
7
+ export * from './domain/DeploymentPlanStep';
8
+ export * from './domain/DeploymentRequiredAction';
9
+ export * from './domain/DeploymentStepOutcome';
10
+ export * from './domain/DeploymentTargetChange';
11
+ export * from './domain/DeploymentTargetPlanContributor';
12
+ export * from './domain/DeploymentVerificationResult';
13
+ export * from './engine/createDeploymentChanges';
14
+ export * from './engine/createDeploymentPlan';
15
+ export * from './engine/executeDeploymentPlan';
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './domain/DeploymentCapability';\nexport * from './domain/DeploymentCurrentState';\nexport * from './domain/DeploymentExecutionResult';\nexport * from './domain/DeploymentFailure';\nexport * from './domain/DeploymentPlan';\nexport * from './domain/DeploymentPlanDiagnostic';\nexport * from './domain/DeploymentPlanStep';\nexport * from './domain/DeploymentRequiredAction';\nexport * from './domain/DeploymentStepOutcome';\nexport * from './domain/DeploymentTargetChange';\nexport * from './domain/DeploymentTargetPlanContributor';\nexport * from './domain/DeploymentVerificationResult';\nexport * from './engine/createDeploymentChanges';\nexport * from './engine/createDeploymentPlan';\nexport * from './engine/executeDeploymentPlan';\n"]}
package/package.json ADDED
@@ -0,0 +1,81 @@
1
+ {
2
+ "name": "@ankhorage/deploy",
3
+ "version": "0.1.0",
4
+ "description": "Declarative deployment engine for Expo apps across web, iOS, and Android — build, provision, publish, and manage releases from one configuration.",
5
+ "license": "MIT",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "homepage": "https://github.com/ankhorage/deploy#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/ankhorage/deploy/issues"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/ankhorage/deploy.git"
16
+ },
17
+ "keywords": [
18
+ "ankhorage",
19
+ "deployment",
20
+ "expo",
21
+ "react-native",
22
+ "eas",
23
+ "app-store",
24
+ "google-play",
25
+ "ios",
26
+ "android",
27
+ "web",
28
+ "typescript",
29
+ "release-management"
30
+ ],
31
+ "type": "module",
32
+ "main": "./dist/index.js",
33
+ "types": "./dist/index.d.ts",
34
+ "exports": {
35
+ ".": {
36
+ "types": "./dist/index.d.ts",
37
+ "import": "./dist/index.js",
38
+ "default": "./dist/index.js"
39
+ },
40
+ "./package.json": "./package.json"
41
+ },
42
+ "files": [
43
+ "dist",
44
+ "README.md",
45
+ "CHANGELOG.md",
46
+ "LICENSE"
47
+ ],
48
+ "ankh": {
49
+ "category": "deploy",
50
+ "provider": null,
51
+ "capabilities": []
52
+ },
53
+ "scripts": {
54
+ "build": "rm -rf dist tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo && bun x tsc -p tsconfig.build.json",
55
+ "typecheck": "bun x tsc --noEmit -p tsconfig.json",
56
+ "lint": "ankhorage-eslint . --max-warnings=0",
57
+ "lint:fix": "ankhorage-eslint . --fix --max-warnings=0",
58
+ "format": "ankhorage-prettier --write .",
59
+ "format:check": "ankhorage-prettier --check .",
60
+ "test": "bun test src",
61
+ "knip": "ankhorage-knip",
62
+ "docs": "paradox",
63
+ "changeset": "changeset",
64
+ "changeset:status": "changeset status --since=origin/main",
65
+ "version-packages": "changeset version",
66
+ "prepack": "bun run build"
67
+ },
68
+ "dependencies": {
69
+ "@ankhorage/contracts": "^7.5.0"
70
+ },
71
+ "devDependencies": {
72
+ "@ankhorage/devtools": "^1.4.1",
73
+ "@ankhorage/paradox": "^0.1.21",
74
+ "@changesets/cli": "^2.31.0",
75
+ "@types/bun": "^1.3.14",
76
+ "@types/node": "^25.6.0",
77
+ "typescript": "^5.9.3"
78
+ },
79
+ "sideEffects": false,
80
+ "packageManager": "bun@1.3.14"
81
+ }