@ankhorage/deploy 0.2.0 → 0.3.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 (111) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/domain/DeploymentAuthenticationState.d.ts +8 -0
  4. package/dist/domain/DeploymentAuthenticationState.d.ts.map +1 -0
  5. package/dist/domain/DeploymentAuthenticationState.js +2 -0
  6. package/dist/domain/DeploymentAuthenticationState.js.map +1 -0
  7. package/dist/domain/DeploymentCredentialReference.d.ts +6 -0
  8. package/dist/domain/DeploymentCredentialReference.d.ts.map +1 -0
  9. package/dist/domain/DeploymentCredentialReference.js +2 -0
  10. package/dist/domain/DeploymentCredentialReference.js.map +1 -0
  11. package/dist/domain/DeploymentProviderCapabilityState.d.ts +7 -0
  12. package/dist/domain/DeploymentProviderCapabilityState.d.ts.map +1 -0
  13. package/dist/domain/DeploymentProviderCapabilityState.js +2 -0
  14. package/dist/domain/DeploymentProviderCapabilityState.js.map +1 -0
  15. package/dist/domain/DeploymentProviderSetupAdapter.d.ts +7 -0
  16. package/dist/domain/DeploymentProviderSetupAdapter.d.ts.map +1 -0
  17. package/dist/domain/DeploymentProviderSetupAdapter.js +2 -0
  18. package/dist/domain/DeploymentProviderSetupAdapter.js.map +1 -0
  19. package/dist/domain/DeploymentProviderSetupContext.d.ts +9 -0
  20. package/dist/domain/DeploymentProviderSetupContext.d.ts.map +1 -0
  21. package/dist/domain/DeploymentProviderSetupContext.js +2 -0
  22. package/dist/domain/DeploymentProviderSetupContext.js.map +1 -0
  23. package/dist/domain/DeploymentProviderSetupInspection.d.ts +10 -0
  24. package/dist/domain/DeploymentProviderSetupInspection.d.ts.map +1 -0
  25. package/dist/domain/DeploymentProviderSetupInspection.js +2 -0
  26. package/dist/domain/DeploymentProviderSetupInspection.js.map +1 -0
  27. package/dist/domain/DeploymentProviderSetupInspectionResult.d.ts +10 -0
  28. package/dist/domain/DeploymentProviderSetupInspectionResult.d.ts.map +1 -0
  29. package/dist/domain/DeploymentProviderSetupInspectionResult.js +2 -0
  30. package/dist/domain/DeploymentProviderSetupInspectionResult.js.map +1 -0
  31. package/dist/domain/DeploymentProvisioningRequirement.d.ts +18 -0
  32. package/dist/domain/DeploymentProvisioningRequirement.d.ts.map +1 -0
  33. package/dist/domain/DeploymentProvisioningRequirement.js +2 -0
  34. package/dist/domain/DeploymentProvisioningRequirement.js.map +1 -0
  35. package/dist/domain/DeploymentSecretResolver.d.ts +4 -0
  36. package/dist/domain/DeploymentSecretResolver.d.ts.map +1 -0
  37. package/dist/domain/DeploymentSecretResolver.js +2 -0
  38. package/dist/domain/DeploymentSecretResolver.js.map +1 -0
  39. package/dist/engine/inspectDeploymentProviderSetup.d.ts +8 -0
  40. package/dist/engine/inspectDeploymentProviderSetup.d.ts.map +1 -0
  41. package/dist/engine/inspectDeploymentProviderSetup.js +21 -0
  42. package/dist/engine/inspectDeploymentProviderSetup.js.map +1 -0
  43. package/dist/engine/providerSetup/containsTrackedSecret.d.ts +2 -0
  44. package/dist/engine/providerSetup/containsTrackedSecret.d.ts.map +1 -0
  45. package/dist/engine/providerSetup/containsTrackedSecret.js +12 -0
  46. package/dist/engine/providerSetup/containsTrackedSecret.js.map +1 -0
  47. package/dist/engine/providerSetup/createProviderSetupContext.d.ts +4 -0
  48. package/dist/engine/providerSetup/createProviderSetupContext.d.ts.map +1 -0
  49. package/dist/engine/providerSetup/createProviderSetupContext.js +4 -0
  50. package/dist/engine/providerSetup/createProviderSetupContext.js.map +1 -0
  51. package/dist/engine/providerSetup/createProviderSetupFailure.d.ts +4 -0
  52. package/dist/engine/providerSetup/createProviderSetupFailure.d.ts.map +1 -0
  53. package/dist/engine/providerSetup/createProviderSetupFailure.js +10 -0
  54. package/dist/engine/providerSetup/createProviderSetupFailure.js.map +1 -0
  55. package/dist/engine/providerSetup/createTrackedSecretResolver.d.ts +7 -0
  56. package/dist/engine/providerSetup/createTrackedSecretResolver.d.ts.map +1 -0
  57. package/dist/engine/providerSetup/createTrackedSecretResolver.js +13 -0
  58. package/dist/engine/providerSetup/createTrackedSecretResolver.js.map +1 -0
  59. package/dist/engine/providerSetup/isAppDeployTargetId.d.ts +3 -0
  60. package/dist/engine/providerSetup/isAppDeployTargetId.d.ts.map +1 -0
  61. package/dist/engine/providerSetup/isAppDeployTargetId.js +5 -0
  62. package/dist/engine/providerSetup/isAppDeployTargetId.js.map +1 -0
  63. package/dist/engine/providerSetup/isNonEmptyString.d.ts +2 -0
  64. package/dist/engine/providerSetup/isNonEmptyString.d.ts.map +1 -0
  65. package/dist/engine/providerSetup/isNonEmptyString.js +4 -0
  66. package/dist/engine/providerSetup/isNonEmptyString.js.map +1 -0
  67. package/dist/engine/providerSetup/isRecord.d.ts +2 -0
  68. package/dist/engine/providerSetup/isRecord.d.ts.map +1 -0
  69. package/dist/engine/providerSetup/isRecord.js +4 -0
  70. package/dist/engine/providerSetup/isRecord.js.map +1 -0
  71. package/dist/engine/providerSetup/normalizeAuthenticationAction.d.ts +3 -0
  72. package/dist/engine/providerSetup/normalizeAuthenticationAction.d.ts.map +1 -0
  73. package/dist/engine/providerSetup/normalizeAuthenticationAction.js +21 -0
  74. package/dist/engine/providerSetup/normalizeAuthenticationAction.js.map +1 -0
  75. package/dist/engine/providerSetup/normalizeAuthenticationState.d.ts +3 -0
  76. package/dist/engine/providerSetup/normalizeAuthenticationState.d.ts.map +1 -0
  77. package/dist/engine/providerSetup/normalizeAuthenticationState.js +13 -0
  78. package/dist/engine/providerSetup/normalizeAuthenticationState.js.map +1 -0
  79. package/dist/engine/providerSetup/normalizeAutomatedProvisioningRequirement.d.ts +3 -0
  80. package/dist/engine/providerSetup/normalizeAutomatedProvisioningRequirement.d.ts.map +1 -0
  81. package/dist/engine/providerSetup/normalizeAutomatedProvisioningRequirement.js +23 -0
  82. package/dist/engine/providerSetup/normalizeAutomatedProvisioningRequirement.js.map +1 -0
  83. package/dist/engine/providerSetup/normalizeCredentialReferences.d.ts +3 -0
  84. package/dist/engine/providerSetup/normalizeCredentialReferences.d.ts.map +1 -0
  85. package/dist/engine/providerSetup/normalizeCredentialReferences.js +18 -0
  86. package/dist/engine/providerSetup/normalizeCredentialReferences.js.map +1 -0
  87. package/dist/engine/providerSetup/normalizeManualAction.d.ts +3 -0
  88. package/dist/engine/providerSetup/normalizeManualAction.d.ts.map +1 -0
  89. package/dist/engine/providerSetup/normalizeManualAction.js +23 -0
  90. package/dist/engine/providerSetup/normalizeManualAction.js.map +1 -0
  91. package/dist/engine/providerSetup/normalizeProviderCapabilityStates.d.ts +3 -0
  92. package/dist/engine/providerSetup/normalizeProviderCapabilityStates.d.ts.map +1 -0
  93. package/dist/engine/providerSetup/normalizeProviderCapabilityStates.js +31 -0
  94. package/dist/engine/providerSetup/normalizeProviderCapabilityStates.js.map +1 -0
  95. package/dist/engine/providerSetup/normalizeProviderSetupInspection.d.ts +10 -0
  96. package/dist/engine/providerSetup/normalizeProviderSetupInspection.d.ts.map +1 -0
  97. package/dist/engine/providerSetup/normalizeProviderSetupInspection.js +25 -0
  98. package/dist/engine/providerSetup/normalizeProviderSetupInspection.js.map +1 -0
  99. package/dist/engine/providerSetup/normalizeProvisioningRequirements.d.ts +3 -0
  100. package/dist/engine/providerSetup/normalizeProvisioningRequirements.d.ts.map +1 -0
  101. package/dist/engine/providerSetup/normalizeProvisioningRequirements.js +31 -0
  102. package/dist/engine/providerSetup/normalizeProvisioningRequirements.js.map +1 -0
  103. package/dist/engine/providerSetup/prepareProviderSetupInspection.d.ts +16 -0
  104. package/dist/engine/providerSetup/prepareProviderSetupInspection.d.ts.map +1 -0
  105. package/dist/engine/providerSetup/prepareProviderSetupInspection.js +32 -0
  106. package/dist/engine/providerSetup/prepareProviderSetupInspection.js.map +1 -0
  107. package/dist/index.d.ts +10 -0
  108. package/dist/index.d.ts.map +1 -1
  109. package/dist/index.js +10 -0
  110. package/dist/index.js.map +1 -1
  111. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ankhorage/deploy
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ced9190: Add provider-neutral provisioning, authentication, credential-reference, injected secret-resolution, capability inspection, and safe provider setup orchestration foundations.
8
+
3
9
  ## 0.2.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # @ankhorage/deploy
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v0.1.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)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v0.2.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
7
 
8
8
  Declarative deployment engine for Expo apps across web, iOS, and Android.
9
9
 
@@ -0,0 +1,8 @@
1
+ import type { DeploymentAuthenticationRequiredAction } from './DeploymentRequiredAction';
2
+ export type DeploymentAuthenticationState = {
3
+ readonly status: 'authenticated';
4
+ } | {
5
+ readonly status: 'required';
6
+ readonly action: DeploymentAuthenticationRequiredAction;
7
+ };
8
+ //# sourceMappingURL=DeploymentAuthenticationState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentAuthenticationState.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentAuthenticationState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,4BAA4B,CAAC;AAEzF,MAAM,MAAM,6BAA6B,GACrC;IAAE,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;CAAE,GACpC;IACE,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,sCAAsC,CAAC;CACzD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentAuthenticationState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentAuthenticationState.js","sourceRoot":"","sources":["../../src/domain/DeploymentAuthenticationState.ts"],"names":[],"mappings":"","sourcesContent":["import type { DeploymentAuthenticationRequiredAction } from './DeploymentRequiredAction';\n\nexport type DeploymentAuthenticationState =\n | { readonly status: 'authenticated' }\n | {\n readonly status: 'required';\n readonly action: DeploymentAuthenticationRequiredAction;\n };\n"]}
@@ -0,0 +1,6 @@
1
+ export interface DeploymentCredentialReference {
2
+ readonly provider: string;
3
+ readonly id: string;
4
+ readonly kind: string;
5
+ }
6
+ //# sourceMappingURL=DeploymentCredentialReference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentCredentialReference.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentCredentialReference.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentCredentialReference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentCredentialReference.js","sourceRoot":"","sources":["../../src/domain/DeploymentCredentialReference.ts"],"names":[],"mappings":"","sourcesContent":["export interface DeploymentCredentialReference {\n readonly provider: string;\n readonly id: string;\n readonly kind: string;\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import type { DeploymentCapability } from './DeploymentCapability';
2
+ export interface DeploymentProviderCapabilityState {
3
+ readonly capability: DeploymentCapability;
4
+ readonly status: 'available' | 'unavailable';
5
+ readonly reason?: string;
6
+ }
7
+ //# sourceMappingURL=DeploymentProviderCapabilityState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentProviderCapabilityState.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentProviderCapabilityState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,aAAa,CAAC;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentProviderCapabilityState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentProviderCapabilityState.js","sourceRoot":"","sources":["../../src/domain/DeploymentProviderCapabilityState.ts"],"names":[],"mappings":"","sourcesContent":["import type { DeploymentCapability } from './DeploymentCapability';\n\nexport interface DeploymentProviderCapabilityState {\n readonly capability: DeploymentCapability;\n readonly status: 'available' | 'unavailable';\n readonly reason?: string;\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import type { DeploymentProviderSetupContext } from './DeploymentProviderSetupContext';
2
+ import type { DeploymentProviderSetupInspection } from './DeploymentProviderSetupInspection';
3
+ export interface DeploymentProviderSetupAdapter {
4
+ readonly provider: string;
5
+ inspectSetup(context: DeploymentProviderSetupContext): Promise<DeploymentProviderSetupInspection>;
6
+ }
7
+ //# sourceMappingURL=DeploymentProviderSetupAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentProviderSetupAdapter.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentProviderSetupAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAE7F,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,OAAO,EAAE,8BAA8B,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAAC;CACnG"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentProviderSetupAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentProviderSetupAdapter.js","sourceRoot":"","sources":["../../src/domain/DeploymentProviderSetupAdapter.ts"],"names":[],"mappings":"","sourcesContent":["import type { DeploymentProviderSetupContext } from './DeploymentProviderSetupContext';\nimport type { DeploymentProviderSetupInspection } from './DeploymentProviderSetupInspection';\n\nexport interface DeploymentProviderSetupAdapter {\n readonly provider: string;\n inspectSetup(context: DeploymentProviderSetupContext): Promise<DeploymentProviderSetupInspection>;\n}\n"]}
@@ -0,0 +1,9 @@
1
+ import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';
2
+ import type { DeploymentCredentialReference } from './DeploymentCredentialReference';
3
+ import type { DeploymentSecretResolver } from './DeploymentSecretResolver';
4
+ export interface DeploymentProviderSetupContext {
5
+ readonly target?: AppDeployTargetId;
6
+ readonly credentials: readonly DeploymentCredentialReference[];
7
+ readonly resolveSecret: DeploymentSecretResolver;
8
+ }
9
+ //# sourceMappingURL=DeploymentProviderSetupContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentProviderSetupContext.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentProviderSetupContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACrF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAE3E,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,SAAS,6BAA6B,EAAE,CAAC;IAC/D,QAAQ,CAAC,aAAa,EAAE,wBAAwB,CAAC;CAClD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentProviderSetupContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentProviderSetupContext.js","sourceRoot":"","sources":["../../src/domain/DeploymentProviderSetupContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';\n\nimport type { DeploymentCredentialReference } from './DeploymentCredentialReference';\nimport type { DeploymentSecretResolver } from './DeploymentSecretResolver';\n\nexport interface DeploymentProviderSetupContext {\n readonly target?: AppDeployTargetId;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import type { DeploymentAuthenticationState } from './DeploymentAuthenticationState';
2
+ import type { DeploymentProviderCapabilityState } from './DeploymentProviderCapabilityState';
3
+ import type { DeploymentProvisioningRequirement } from './DeploymentProvisioningRequirement';
4
+ export interface DeploymentProviderSetupInspection {
5
+ readonly provider: string;
6
+ readonly authentication: DeploymentAuthenticationState;
7
+ readonly capabilities: readonly DeploymentProviderCapabilityState[];
8
+ readonly provisioning: readonly DeploymentProvisioningRequirement[];
9
+ }
10
+ //# sourceMappingURL=DeploymentProviderSetupInspection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentProviderSetupInspection.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentProviderSetupInspection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACrF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAC7F,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAE7F,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,cAAc,EAAE,6BAA6B,CAAC;IACvD,QAAQ,CAAC,YAAY,EAAE,SAAS,iCAAiC,EAAE,CAAC;IACpE,QAAQ,CAAC,YAAY,EAAE,SAAS,iCAAiC,EAAE,CAAC;CACrE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentProviderSetupInspection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentProviderSetupInspection.js","sourceRoot":"","sources":["../../src/domain/DeploymentProviderSetupInspection.ts"],"names":[],"mappings":"","sourcesContent":["import type { DeploymentAuthenticationState } from './DeploymentAuthenticationState';\nimport type { DeploymentProviderCapabilityState } from './DeploymentProviderCapabilityState';\nimport type { DeploymentProvisioningRequirement } from './DeploymentProvisioningRequirement';\n\nexport interface DeploymentProviderSetupInspection {\n readonly provider: string;\n readonly authentication: DeploymentAuthenticationState;\n readonly capabilities: readonly DeploymentProviderCapabilityState[];\n readonly provisioning: readonly DeploymentProvisioningRequirement[];\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import type { DeploymentFailure } from './DeploymentFailure';
2
+ import type { DeploymentProviderSetupInspection } from './DeploymentProviderSetupInspection';
3
+ export type DeploymentProviderSetupInspectionResult = {
4
+ readonly ok: true;
5
+ readonly inspection: DeploymentProviderSetupInspection;
6
+ } | {
7
+ readonly ok: false;
8
+ readonly failure: DeploymentFailure;
9
+ };
10
+ //# sourceMappingURL=DeploymentProviderSetupInspectionResult.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentProviderSetupInspectionResult.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentProviderSetupInspectionResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAE7F,MAAM,MAAM,uCAAuC,GAC/C;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,iCAAiC,CAAA;CAAE,GAC7E;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentProviderSetupInspectionResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentProviderSetupInspectionResult.js","sourceRoot":"","sources":["../../src/domain/DeploymentProviderSetupInspectionResult.ts"],"names":[],"mappings":"","sourcesContent":["import type { DeploymentFailure } from './DeploymentFailure';\nimport type { DeploymentProviderSetupInspection } from './DeploymentProviderSetupInspection';\n\nexport type DeploymentProviderSetupInspectionResult =\n | { readonly ok: true; readonly inspection: DeploymentProviderSetupInspection }\n | { readonly ok: false; readonly failure: DeploymentFailure };\n"]}
@@ -0,0 +1,18 @@
1
+ import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';
2
+ import type { DeploymentAuthenticationRequiredAction, DeploymentManualAction } from './DeploymentRequiredAction';
3
+ export interface DeploymentAutomatedProvisioningRequirement {
4
+ readonly type: 'automated';
5
+ readonly id: string;
6
+ readonly provider: string;
7
+ readonly target?: AppDeployTargetId;
8
+ readonly code: string;
9
+ readonly message: string;
10
+ }
11
+ export type DeploymentProvisioningRequirement = DeploymentAutomatedProvisioningRequirement | {
12
+ readonly type: 'authentication';
13
+ readonly action: DeploymentAuthenticationRequiredAction;
14
+ } | {
15
+ readonly type: 'manual-action';
16
+ readonly action: DeploymentManualAction;
17
+ };
18
+ //# sourceMappingURL=DeploymentProvisioningRequirement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentProvisioningRequirement.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentProvisioningRequirement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,KAAK,EACV,sCAAsC,EACtC,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,WAAW,0CAA0C;IACzD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,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,MAAM,iCAAiC,GACzC,0CAA0C,GAC1C;IAAE,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,sCAAsC,CAAA;CAAE,GAC5F;IAAE,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentProvisioningRequirement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentProvisioningRequirement.js","sourceRoot":"","sources":["../../src/domain/DeploymentProvisioningRequirement.ts"],"names":[],"mappings":"","sourcesContent":["import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';\n\nimport type {\n DeploymentAuthenticationRequiredAction,\n DeploymentManualAction,\n} from './DeploymentRequiredAction';\n\nexport interface DeploymentAutomatedProvisioningRequirement {\n readonly type: 'automated';\n readonly id: string;\n readonly provider: string;\n readonly target?: AppDeployTargetId;\n readonly code: string;\n readonly message: string;\n}\n\nexport type DeploymentProvisioningRequirement =\n | DeploymentAutomatedProvisioningRequirement\n | { readonly type: 'authentication'; readonly action: DeploymentAuthenticationRequiredAction }\n | { readonly type: 'manual-action'; readonly action: DeploymentManualAction };\n"]}
@@ -0,0 +1,4 @@
1
+ import type { DeploymentCredentialReference } from './DeploymentCredentialReference';
2
+ export type DeploymentSecretMaterial = string;
3
+ export type DeploymentSecretResolver = (reference: DeploymentCredentialReference) => Promise<DeploymentSecretMaterial | null>;
4
+ //# sourceMappingURL=DeploymentSecretResolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentSecretResolver.d.ts","sourceRoot":"","sources":["../../src/domain/DeploymentSecretResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAErF,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAE9C,MAAM,MAAM,wBAAwB,GAAG,CACrC,SAAS,EAAE,6BAA6B,KACrC,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DeploymentSecretResolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentSecretResolver.js","sourceRoot":"","sources":["../../src/domain/DeploymentSecretResolver.ts"],"names":[],"mappings":"","sourcesContent":["import type { DeploymentCredentialReference } from './DeploymentCredentialReference';\n\nexport type DeploymentSecretMaterial = string;\n\nexport type DeploymentSecretResolver = (\n reference: DeploymentCredentialReference,\n) => Promise<DeploymentSecretMaterial | null>;\n"]}
@@ -0,0 +1,8 @@
1
+ import type { DeploymentProviderSetupAdapter } from '../domain/DeploymentProviderSetupAdapter';
2
+ import type { DeploymentProviderSetupContext } from '../domain/DeploymentProviderSetupContext';
3
+ import type { DeploymentProviderSetupInspectionResult } from '../domain/DeploymentProviderSetupInspectionResult';
4
+ export declare function inspectDeploymentProviderSetup(options: {
5
+ readonly adapter: DeploymentProviderSetupAdapter;
6
+ readonly context: DeploymentProviderSetupContext;
7
+ }): Promise<DeploymentProviderSetupInspectionResult>;
8
+ //# sourceMappingURL=inspectDeploymentProviderSetup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspectDeploymentProviderSetup.d.ts","sourceRoot":"","sources":["../../src/engine/inspectDeploymentProviderSetup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC/F,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC/F,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,mDAAmD,CAAC;AAKjH,wBAAsB,8BAA8B,CAAC,OAAO,EAAE;IAC5D,QAAQ,CAAC,OAAO,EAAE,8BAA8B,CAAC;IACjD,QAAQ,CAAC,OAAO,EAAE,8BAA8B,CAAC;CAClD,GAAG,OAAO,CAAC,uCAAuC,CAAC,CA8BnD"}
@@ -0,0 +1,21 @@
1
+ import { createProviderSetupFailure } from './providerSetup/createProviderSetupFailure';
2
+ import { normalizeProviderSetupInspection } from './providerSetup/normalizeProviderSetupInspection';
3
+ import { prepareProviderSetupInspection } from './providerSetup/prepareProviderSetupInspection';
4
+ export async function inspectDeploymentProviderSetup(options) {
5
+ const prepared = prepareProviderSetupInspection(options.adapter, options.context);
6
+ if (!prepared.ok)
7
+ return prepared.result;
8
+ let rawInspection;
9
+ try {
10
+ rawInspection = await options.adapter.inspectSetup(prepared.context);
11
+ }
12
+ catch {
13
+ return createProviderSetupFailure('PROVIDER_SETUP_INSPECTION_FAILED', 'Provider setup inspection failed.', prepared.provider, prepared.target);
14
+ }
15
+ const normalized = normalizeProviderSetupInspection(rawInspection, prepared.provider, prepared.secrets);
16
+ if (normalized.ok)
17
+ return { ok: true, inspection: normalized.inspection };
18
+ const code = normalized.unsafe ? 'PROVIDER_SETUP_UNSAFE_RESULT' : 'PROVIDER_SETUP_INVALID_RESULT';
19
+ return createProviderSetupFailure(code, 'Provider setup inspection returned an invalid safe result.', prepared.provider, prepared.target);
20
+ }
21
+ //# sourceMappingURL=inspectDeploymentProviderSetup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspectDeploymentProviderSetup.js","sourceRoot":"","sources":["../../src/engine/inspectDeploymentProviderSetup.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,8BAA8B,EAAE,MAAM,gDAAgD,CAAC;AAEhG,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAAC,OAGpD;IACC,MAAM,QAAQ,GAAG,8BAA8B,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAClF,IAAI,CAAC,QAAQ,CAAC,EAAE;QAAE,OAAO,QAAQ,CAAC,MAAM,CAAC;IAEzC,IAAI,aAAsB,CAAC;IAC3B,IAAI,CAAC;QACH,aAAa,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACvE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,0BAA0B,CAC/B,kCAAkC,EAClC,mCAAmC,EACnC,QAAQ,CAAC,QAAQ,EACjB,QAAQ,CAAC,MAAM,CAChB,CAAC;IACJ,CAAC;IAED,MAAM,UAAU,GAAG,gCAAgC,CACjD,aAAa,EACb,QAAQ,CAAC,QAAQ,EACjB,QAAQ,CAAC,OAAO,CACjB,CAAC;IACF,IAAI,UAAU,CAAC,EAAE;QAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,UAAU,EAAE,CAAC;IAE1E,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,+BAA+B,CAAC;IAClG,OAAO,0BAA0B,CAC/B,IAAI,EACJ,4DAA4D,EAC5D,QAAQ,CAAC,QAAQ,EACjB,QAAQ,CAAC,MAAM,CAChB,CAAC;AACJ,CAAC","sourcesContent":["import type { DeploymentProviderSetupAdapter } from '../domain/DeploymentProviderSetupAdapter';\nimport type { DeploymentProviderSetupContext } from '../domain/DeploymentProviderSetupContext';\nimport type { DeploymentProviderSetupInspectionResult } from '../domain/DeploymentProviderSetupInspectionResult';\nimport { createProviderSetupFailure } from './providerSetup/createProviderSetupFailure';\nimport { normalizeProviderSetupInspection } from './providerSetup/normalizeProviderSetupInspection';\nimport { prepareProviderSetupInspection } from './providerSetup/prepareProviderSetupInspection';\n\nexport async function inspectDeploymentProviderSetup(options: {\n readonly adapter: DeploymentProviderSetupAdapter;\n readonly context: DeploymentProviderSetupContext;\n}): Promise<DeploymentProviderSetupInspectionResult> {\n const prepared = prepareProviderSetupInspection(options.adapter, options.context);\n if (!prepared.ok) return prepared.result;\n\n let rawInspection: unknown;\n try {\n rawInspection = await options.adapter.inspectSetup(prepared.context);\n } catch {\n return createProviderSetupFailure(\n 'PROVIDER_SETUP_INSPECTION_FAILED',\n 'Provider setup inspection failed.',\n prepared.provider,\n prepared.target,\n );\n }\n\n const normalized = normalizeProviderSetupInspection(\n rawInspection,\n prepared.provider,\n prepared.secrets,\n );\n if (normalized.ok) return { ok: true, inspection: normalized.inspection };\n\n const code = normalized.unsafe ? 'PROVIDER_SETUP_UNSAFE_RESULT' : 'PROVIDER_SETUP_INVALID_RESULT';\n return createProviderSetupFailure(\n code,\n 'Provider setup inspection returned an invalid safe result.',\n prepared.provider,\n prepared.target,\n );\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare function containsTrackedSecret(value: unknown, secrets: ReadonlySet<string>): boolean;
2
+ //# sourceMappingURL=containsTrackedSecret.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"containsTrackedSecret.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/containsTrackedSecret.ts"],"names":[],"mappings":"AAEA,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,OAAO,CAO3F"}
@@ -0,0 +1,12 @@
1
+ import { isRecord } from './isRecord';
2
+ export function containsTrackedSecret(value, secrets) {
3
+ if (typeof value === 'string') {
4
+ return [...secrets].some((secret) => secret.length > 0 && value.includes(secret));
5
+ }
6
+ if (Array.isArray(value))
7
+ return value.some((item) => containsTrackedSecret(item, secrets));
8
+ if (!isRecord(value))
9
+ return false;
10
+ return Object.values(value).some((item) => containsTrackedSecret(item, secrets));
11
+ }
12
+ //# sourceMappingURL=containsTrackedSecret.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"containsTrackedSecret.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/containsTrackedSecret.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,UAAU,qBAAqB,CAAC,KAAc,EAAE,OAA4B;IAChF,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IACpF,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAC5F,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACnC,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AACnF,CAAC","sourcesContent":["import { isRecord } from './isRecord';\n\nexport function containsTrackedSecret(value: unknown, secrets: ReadonlySet<string>): boolean {\n if (typeof value === 'string') {\n return [...secrets].some((secret) => secret.length > 0 && value.includes(secret));\n }\n if (Array.isArray(value)) return value.some((item) => containsTrackedSecret(item, secrets));\n if (!isRecord(value)) return false;\n return Object.values(value).some((item) => containsTrackedSecret(item, secrets));\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';
2
+ import type { DeploymentProviderSetupContext } from '../../domain/DeploymentProviderSetupContext';
3
+ export declare function createProviderSetupContext(credentials: DeploymentProviderSetupContext['credentials'], resolveSecret: DeploymentProviderSetupContext['resolveSecret'], target: AppDeployTargetId | undefined): DeploymentProviderSetupContext;
4
+ //# sourceMappingURL=createProviderSetupContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createProviderSetupContext.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/createProviderSetupContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAElG,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,8BAA8B,CAAC,aAAa,CAAC,EAC1D,aAAa,EAAE,8BAA8B,CAAC,eAAe,CAAC,EAC9D,MAAM,EAAE,iBAAiB,GAAG,SAAS,GACpC,8BAA8B,CAEhC"}
@@ -0,0 +1,4 @@
1
+ export function createProviderSetupContext(credentials, resolveSecret, target) {
2
+ return { credentials, resolveSecret, ...(target === undefined ? {} : { target }) };
3
+ }
4
+ //# sourceMappingURL=createProviderSetupContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createProviderSetupContext.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/createProviderSetupContext.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,0BAA0B,CACxC,WAA0D,EAC1D,aAA8D,EAC9D,MAAqC;IAErC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AACrF,CAAC","sourcesContent":["import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';\n\nimport type { DeploymentProviderSetupContext } from '../../domain/DeploymentProviderSetupContext';\n\nexport function createProviderSetupContext(\n credentials: DeploymentProviderSetupContext['credentials'],\n resolveSecret: DeploymentProviderSetupContext['resolveSecret'],\n target: AppDeployTargetId | undefined,\n): DeploymentProviderSetupContext {\n return { credentials, resolveSecret, ...(target === undefined ? {} : { target }) };\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';
2
+ import type { DeploymentProviderSetupInspectionResult } from '../../domain/DeploymentProviderSetupInspectionResult';
3
+ export declare function createProviderSetupFailure(code: string, message: string, provider?: string, target?: AppDeployTargetId): DeploymentProviderSetupInspectionResult;
4
+ //# sourceMappingURL=createProviderSetupFailure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createProviderSetupFailure.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/createProviderSetupFailure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAGrE,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,sDAAsD,CAAC;AAEpH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,iBAAiB,GACzB,uCAAuC,CAQzC"}
@@ -0,0 +1,10 @@
1
+ export function createProviderSetupFailure(code, message, provider, target) {
2
+ const failure = {
3
+ code,
4
+ message,
5
+ ...(provider === undefined ? {} : { provider }),
6
+ ...(target === undefined ? {} : { target }),
7
+ };
8
+ return { ok: false, failure };
9
+ }
10
+ //# sourceMappingURL=createProviderSetupFailure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createProviderSetupFailure.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/createProviderSetupFailure.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,0BAA0B,CACxC,IAAY,EACZ,OAAe,EACf,QAAiB,EACjB,MAA0B;IAE1B,MAAM,OAAO,GAAsB;QACjC,IAAI;QACJ,OAAO;QACP,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC;QAC/C,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;KAC5C,CAAC;IACF,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAChC,CAAC","sourcesContent":["import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';\n\nimport type { DeploymentFailure } from '../../domain/DeploymentFailure';\nimport type { DeploymentProviderSetupInspectionResult } from '../../domain/DeploymentProviderSetupInspectionResult';\n\nexport function createProviderSetupFailure(\n code: string,\n message: string,\n provider?: string,\n target?: AppDeployTargetId,\n): DeploymentProviderSetupInspectionResult {\n const failure: DeploymentFailure = {\n code,\n message,\n ...(provider === undefined ? {} : { provider }),\n ...(target === undefined ? {} : { target }),\n };\n return { ok: false, failure };\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import type { DeploymentSecretResolver } from '../../domain/DeploymentSecretResolver';
2
+ export interface TrackedSecretResolver {
3
+ readonly resolve: DeploymentSecretResolver;
4
+ readonly secrets: ReadonlySet<string>;
5
+ }
6
+ export declare function createTrackedSecretResolver(resolveSecret: DeploymentSecretResolver): TrackedSecretResolver;
7
+ //# sourceMappingURL=createTrackedSecretResolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createTrackedSecretResolver.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/createTrackedSecretResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAEtF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACvC;AAED,wBAAgB,2BAA2B,CACzC,aAAa,EAAE,wBAAwB,GACtC,qBAAqB,CAUvB"}
@@ -0,0 +1,13 @@
1
+ export function createTrackedSecretResolver(resolveSecret) {
2
+ const secrets = new Set();
3
+ return {
4
+ secrets,
5
+ resolve: async (reference) => {
6
+ const secret = await resolveSecret(reference);
7
+ if (secret !== null && secret.length > 0)
8
+ secrets.add(secret);
9
+ return secret;
10
+ },
11
+ };
12
+ }
13
+ //# sourceMappingURL=createTrackedSecretResolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createTrackedSecretResolver.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/createTrackedSecretResolver.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,2BAA2B,CACzC,aAAuC;IAEvC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,OAAO;QACL,OAAO;QACP,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE;YAC3B,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,SAAS,CAAC,CAAC;YAC9C,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;gBAAE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAC9D,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { DeploymentSecretResolver } from '../../domain/DeploymentSecretResolver';\n\nexport interface TrackedSecretResolver {\n readonly resolve: DeploymentSecretResolver;\n readonly secrets: ReadonlySet<string>;\n}\n\nexport function createTrackedSecretResolver(\n resolveSecret: DeploymentSecretResolver,\n): TrackedSecretResolver {\n const secrets = new Set<string>();\n return {\n secrets,\n resolve: async (reference) => {\n const secret = await resolveSecret(reference);\n if (secret !== null && secret.length > 0) secrets.add(secret);\n return secret;\n },\n };\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import { type AppDeployTargetId } from '@ankhorage/contracts/deploy';
2
+ export declare function isAppDeployTargetId(value: unknown): value is AppDeployTargetId;
3
+ //# sourceMappingURL=isAppDeployTargetId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isAppDeployTargetId.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/isAppDeployTargetId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAE5F,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAE9E"}
@@ -0,0 +1,5 @@
1
+ import { APP_DEPLOY_TARGET_IDS } from '@ankhorage/contracts/deploy';
2
+ export function isAppDeployTargetId(value) {
3
+ return APP_DEPLOY_TARGET_IDS.some((target) => target === value);
4
+ }
5
+ //# sourceMappingURL=isAppDeployTargetId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isAppDeployTargetId.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/isAppDeployTargetId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAA0B,MAAM,6BAA6B,CAAC;AAE5F,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAChD,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC;AAClE,CAAC","sourcesContent":["import { APP_DEPLOY_TARGET_IDS, type AppDeployTargetId } from '@ankhorage/contracts/deploy';\n\nexport function isAppDeployTargetId(value: unknown): value is AppDeployTargetId {\n return APP_DEPLOY_TARGET_IDS.some((target) => target === value);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare function isNonEmptyString(value: unknown): value is string;
2
+ //# sourceMappingURL=isNonEmptyString.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNonEmptyString.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/isNonEmptyString.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEhE"}
@@ -0,0 +1,4 @@
1
+ export function isNonEmptyString(value) {
2
+ return typeof value === 'string' && value.trim().length > 0;
3
+ }
4
+ //# sourceMappingURL=isNonEmptyString.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNonEmptyString.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/isNonEmptyString.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9D,CAAC","sourcesContent":["export function isNonEmptyString(value: unknown): value is string {\n return typeof value === 'string' && value.trim().length > 0;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
2
+ //# sourceMappingURL=isRecord.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isRecord.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/isRecord.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE"}
@@ -0,0 +1,4 @@
1
+ export function isRecord(value) {
2
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
3
+ }
4
+ //# sourceMappingURL=isRecord.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isRecord.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/isRecord.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["export function isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import type { DeploymentAuthenticationRequiredAction } from '../../domain/DeploymentRequiredAction';
2
+ export declare function normalizeAuthenticationAction(value: unknown, provider: string): DeploymentAuthenticationRequiredAction | null;
3
+ //# sourceMappingURL=normalizeAuthenticationAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeAuthenticationAction.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeAuthenticationAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,uCAAuC,CAAC;AAKpG,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,GACf,sCAAsC,GAAG,IAAI,CAmB/C"}
@@ -0,0 +1,21 @@
1
+ import { isAppDeployTargetId } from './isAppDeployTargetId';
2
+ import { isNonEmptyString } from './isNonEmptyString';
3
+ import { isRecord } from './isRecord';
4
+ export function normalizeAuthenticationAction(value, provider) {
5
+ if (!isRecord(value) ||
6
+ value.type !== 'authentication' ||
7
+ value.provider !== provider ||
8
+ !isNonEmptyString(value.code) ||
9
+ !isNonEmptyString(value.message) ||
10
+ (value.target !== undefined && !isAppDeployTargetId(value.target))) {
11
+ return null;
12
+ }
13
+ return {
14
+ type: 'authentication',
15
+ provider,
16
+ code: value.code,
17
+ message: value.message,
18
+ ...(value.target === undefined ? {} : { target: value.target }),
19
+ };
20
+ }
21
+ //# sourceMappingURL=normalizeAuthenticationAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeAuthenticationAction.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeAuthenticationAction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,UAAU,6BAA6B,CAC3C,KAAc,EACd,QAAgB;IAEhB,IACE,CAAC,QAAQ,CAAC,KAAK,CAAC;QAChB,KAAK,CAAC,IAAI,KAAK,gBAAgB;QAC/B,KAAK,CAAC,QAAQ,KAAK,QAAQ;QAC3B,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC;QAC7B,CAAC,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC;QAChC,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAClE,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,QAAQ;QACR,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;KAChE,CAAC;AACJ,CAAC","sourcesContent":["import type { DeploymentAuthenticationRequiredAction } from '../../domain/DeploymentRequiredAction';\nimport { isAppDeployTargetId } from './isAppDeployTargetId';\nimport { isNonEmptyString } from './isNonEmptyString';\nimport { isRecord } from './isRecord';\n\nexport function normalizeAuthenticationAction(\n value: unknown,\n provider: string,\n): DeploymentAuthenticationRequiredAction | null {\n if (\n !isRecord(value) ||\n value.type !== 'authentication' ||\n value.provider !== provider ||\n !isNonEmptyString(value.code) ||\n !isNonEmptyString(value.message) ||\n (value.target !== undefined && !isAppDeployTargetId(value.target))\n ) {\n return null;\n }\n\n return {\n type: 'authentication',\n provider,\n code: value.code,\n message: value.message,\n ...(value.target === undefined ? {} : { target: value.target }),\n };\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import type { DeploymentAuthenticationState } from '../../domain/DeploymentAuthenticationState';
2
+ export declare function normalizeAuthenticationState(value: unknown, provider: string): DeploymentAuthenticationState | null;
3
+ //# sourceMappingURL=normalizeAuthenticationState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeAuthenticationState.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeAuthenticationState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAIhG,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,GACf,6BAA6B,GAAG,IAAI,CAOtC"}
@@ -0,0 +1,13 @@
1
+ import { isRecord } from './isRecord';
2
+ import { normalizeAuthenticationAction } from './normalizeAuthenticationAction';
3
+ export function normalizeAuthenticationState(value, provider) {
4
+ if (!isRecord(value))
5
+ return null;
6
+ if (value.status === 'authenticated')
7
+ return { status: 'authenticated' };
8
+ if (value.status !== 'required')
9
+ return null;
10
+ const action = normalizeAuthenticationAction(value.action, provider);
11
+ return action === null ? null : { status: 'required', action };
12
+ }
13
+ //# sourceMappingURL=normalizeAuthenticationState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeAuthenticationState.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeAuthenticationState.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF,MAAM,UAAU,4BAA4B,CAC1C,KAAc,EACd,QAAgB;IAEhB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAClC,IAAI,KAAK,CAAC,MAAM,KAAK,eAAe;QAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;IACzE,IAAI,KAAK,CAAC,MAAM,KAAK,UAAU;QAAE,OAAO,IAAI,CAAC;IAE7C,MAAM,MAAM,GAAG,6BAA6B,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACrE,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;AACjE,CAAC","sourcesContent":["import type { DeploymentAuthenticationState } from '../../domain/DeploymentAuthenticationState';\nimport { isRecord } from './isRecord';\nimport { normalizeAuthenticationAction } from './normalizeAuthenticationAction';\n\nexport function normalizeAuthenticationState(\n value: unknown,\n provider: string,\n): DeploymentAuthenticationState | null {\n if (!isRecord(value)) return null;\n if (value.status === 'authenticated') return { status: 'authenticated' };\n if (value.status !== 'required') return null;\n\n const action = normalizeAuthenticationAction(value.action, provider);\n return action === null ? null : { status: 'required', action };\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import type { DeploymentProvisioningRequirement } from '../../domain/DeploymentProvisioningRequirement';
2
+ export declare function normalizeAutomatedProvisioningRequirement(value: Record<string, unknown>, provider: string, seen: Set<string>): DeploymentProvisioningRequirement | null;
3
+ //# sourceMappingURL=normalizeAutomatedProvisioningRequirement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeAutomatedProvisioningRequirement.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeAutomatedProvisioningRequirement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gDAAgD,CAAC;AAIxG,wBAAgB,yCAAyC,CACvD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,GAChB,iCAAiC,GAAG,IAAI,CAqB1C"}
@@ -0,0 +1,23 @@
1
+ import { isAppDeployTargetId } from './isAppDeployTargetId';
2
+ import { isNonEmptyString } from './isNonEmptyString';
3
+ export function normalizeAutomatedProvisioningRequirement(value, provider, seen) {
4
+ if (value.type !== 'automated' ||
5
+ value.provider !== provider ||
6
+ !isNonEmptyString(value.id) ||
7
+ seen.has(value.id) ||
8
+ !isNonEmptyString(value.code) ||
9
+ !isNonEmptyString(value.message) ||
10
+ (value.target !== undefined && !isAppDeployTargetId(value.target))) {
11
+ return null;
12
+ }
13
+ seen.add(value.id);
14
+ return {
15
+ type: 'automated',
16
+ id: value.id,
17
+ provider,
18
+ code: value.code,
19
+ message: value.message,
20
+ ...(value.target === undefined ? {} : { target: value.target }),
21
+ };
22
+ }
23
+ //# sourceMappingURL=normalizeAutomatedProvisioningRequirement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeAutomatedProvisioningRequirement.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeAutomatedProvisioningRequirement.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,UAAU,yCAAyC,CACvD,KAA8B,EAC9B,QAAgB,EAChB,IAAiB;IAEjB,IACE,KAAK,CAAC,IAAI,KAAK,WAAW;QAC1B,KAAK,CAAC,QAAQ,KAAK,QAAQ;QAC3B,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QAClB,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC;QAC7B,CAAC,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC;QAChC,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAClE,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACnB,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,QAAQ;QACR,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;KAChE,CAAC;AACJ,CAAC","sourcesContent":["import type { DeploymentProvisioningRequirement } from '../../domain/DeploymentProvisioningRequirement';\nimport { isAppDeployTargetId } from './isAppDeployTargetId';\nimport { isNonEmptyString } from './isNonEmptyString';\n\nexport function normalizeAutomatedProvisioningRequirement(\n value: Record<string, unknown>,\n provider: string,\n seen: Set<string>,\n): DeploymentProvisioningRequirement | null {\n if (\n value.type !== 'automated' ||\n value.provider !== provider ||\n !isNonEmptyString(value.id) ||\n seen.has(value.id) ||\n !isNonEmptyString(value.code) ||\n !isNonEmptyString(value.message) ||\n (value.target !== undefined && !isAppDeployTargetId(value.target))\n ) {\n return null;\n }\n seen.add(value.id);\n return {\n type: 'automated',\n id: value.id,\n provider,\n code: value.code,\n message: value.message,\n ...(value.target === undefined ? {} : { target: value.target }),\n };\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import type { DeploymentCredentialReference } from '../../domain/DeploymentCredentialReference';
2
+ export declare function normalizeCredentialReferences(value: unknown, provider: string): readonly DeploymentCredentialReference[] | null;
3
+ //# sourceMappingURL=normalizeCredentialReferences.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeCredentialReferences.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeCredentialReferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAIhG,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,GACf,SAAS,6BAA6B,EAAE,GAAG,IAAI,CAgBjD"}
@@ -0,0 +1,18 @@
1
+ import { isNonEmptyString } from './isNonEmptyString';
2
+ import { isRecord } from './isRecord';
3
+ export function normalizeCredentialReferences(value, provider) {
4
+ if (!Array.isArray(value))
5
+ return null;
6
+ const references = [];
7
+ for (const reference of value) {
8
+ if (!isRecord(reference) ||
9
+ reference.provider !== provider ||
10
+ !isNonEmptyString(reference.id) ||
11
+ !isNonEmptyString(reference.kind)) {
12
+ return null;
13
+ }
14
+ references.push({ provider, id: reference.id, kind: reference.kind });
15
+ }
16
+ return references;
17
+ }
18
+ //# sourceMappingURL=normalizeCredentialReferences.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeCredentialReferences.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeCredentialReferences.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,UAAU,6BAA6B,CAC3C,KAAc,EACd,QAAgB;IAEhB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEvC,MAAM,UAAU,GAAoC,EAAE,CAAC;IACvD,KAAK,MAAM,SAAS,IAAI,KAAK,EAAE,CAAC;QAC9B,IACE,CAAC,QAAQ,CAAC,SAAS,CAAC;YACpB,SAAS,CAAC,QAAQ,KAAK,QAAQ;YAC/B,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,CAAC;YAC/B,CAAC,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,EACjC,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,UAAU,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import type { DeploymentCredentialReference } from '../../domain/DeploymentCredentialReference';\nimport { isNonEmptyString } from './isNonEmptyString';\nimport { isRecord } from './isRecord';\n\nexport function normalizeCredentialReferences(\n value: unknown,\n provider: string,\n): readonly DeploymentCredentialReference[] | null {\n if (!Array.isArray(value)) return null;\n\n const references: DeploymentCredentialReference[] = [];\n for (const reference of value) {\n if (\n !isRecord(reference) ||\n reference.provider !== provider ||\n !isNonEmptyString(reference.id) ||\n !isNonEmptyString(reference.kind)\n ) {\n return null;\n }\n references.push({ provider, id: reference.id, kind: reference.kind });\n }\n return references;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import type { DeploymentManualAction } from '../../domain/DeploymentRequiredAction';
2
+ export declare function normalizeManualAction(value: unknown, provider: string): DeploymentManualAction | null;
3
+ //# sourceMappingURL=normalizeManualAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeManualAction.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeManualAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAKpF,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,GACf,sBAAsB,GAAG,IAAI,CAqB/B"}
@@ -0,0 +1,23 @@
1
+ import { isAppDeployTargetId } from './isAppDeployTargetId';
2
+ import { isNonEmptyString } from './isNonEmptyString';
3
+ import { isRecord } from './isRecord';
4
+ export function normalizeManualAction(value, provider) {
5
+ if (!isRecord(value) ||
6
+ value.type !== 'manual-action' ||
7
+ !isAppDeployTargetId(value.target) ||
8
+ !isNonEmptyString(value.code) ||
9
+ !isNonEmptyString(value.message) ||
10
+ (value.provider !== undefined && value.provider !== provider) ||
11
+ (value.url !== undefined && !isNonEmptyString(value.url))) {
12
+ return null;
13
+ }
14
+ return {
15
+ type: 'manual-action',
16
+ target: value.target,
17
+ code: value.code,
18
+ message: value.message,
19
+ ...(value.provider === undefined ? {} : { provider }),
20
+ ...(value.url === undefined ? {} : { url: value.url }),
21
+ };
22
+ }
23
+ //# sourceMappingURL=normalizeManualAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeManualAction.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeManualAction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,UAAU,qBAAqB,CACnC,KAAc,EACd,QAAgB;IAEhB,IACE,CAAC,QAAQ,CAAC,KAAK,CAAC;QAChB,KAAK,CAAC,IAAI,KAAK,eAAe;QAC9B,CAAC,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC;QAClC,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC;QAC7B,CAAC,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC;QAChC,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,IAAI,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC;QAC7D,CAAC,KAAK,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EACzD,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,GAAG,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC;QACrD,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC;KACvD,CAAC;AACJ,CAAC","sourcesContent":["import type { DeploymentManualAction } from '../../domain/DeploymentRequiredAction';\nimport { isAppDeployTargetId } from './isAppDeployTargetId';\nimport { isNonEmptyString } from './isNonEmptyString';\nimport { isRecord } from './isRecord';\n\nexport function normalizeManualAction(\n value: unknown,\n provider: string,\n): DeploymentManualAction | null {\n if (\n !isRecord(value) ||\n value.type !== 'manual-action' ||\n !isAppDeployTargetId(value.target) ||\n !isNonEmptyString(value.code) ||\n !isNonEmptyString(value.message) ||\n (value.provider !== undefined && value.provider !== provider) ||\n (value.url !== undefined && !isNonEmptyString(value.url))\n ) {\n return null;\n }\n\n return {\n type: 'manual-action',\n target: value.target,\n code: value.code,\n message: value.message,\n ...(value.provider === undefined ? {} : { provider }),\n ...(value.url === undefined ? {} : { url: value.url }),\n };\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import type { DeploymentProviderCapabilityState } from '../../domain/DeploymentProviderCapabilityState';
2
+ export declare function normalizeProviderCapabilityStates(value: unknown): readonly DeploymentProviderCapabilityState[] | null;
3
+ //# sourceMappingURL=normalizeProviderCapabilityStates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeProviderCapabilityStates.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeProviderCapabilityStates.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gDAAgD,CAAC;AAIxG,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,OAAO,GACb,SAAS,iCAAiC,EAAE,GAAG,IAAI,CAmBrD"}
@@ -0,0 +1,31 @@
1
+ import { DEPLOYMENT_CAPABILITIES, } from '../../domain/DeploymentCapability';
2
+ import { isNonEmptyString } from './isNonEmptyString';
3
+ import { isRecord } from './isRecord';
4
+ export function normalizeProviderCapabilityStates(value) {
5
+ if (!Array.isArray(value))
6
+ return null;
7
+ const seen = new Set();
8
+ const states = [];
9
+ for (const raw of value) {
10
+ if (!isRecord(raw) || !isCapability(raw.capability) || seen.has(raw.capability))
11
+ return null;
12
+ if (raw.status !== 'available' && raw.status !== 'unavailable')
13
+ return null;
14
+ if (raw.reason !== undefined && !isNonEmptyString(raw.reason))
15
+ return null;
16
+ seen.add(raw.capability);
17
+ states.push({
18
+ capability: raw.capability,
19
+ status: raw.status,
20
+ ...(raw.reason === undefined ? {} : { reason: raw.reason }),
21
+ });
22
+ }
23
+ return states.sort((left, right) => capabilityIndex(left.capability) - capabilityIndex(right.capability));
24
+ }
25
+ function isCapability(value) {
26
+ return DEPLOYMENT_CAPABILITIES.some((capability) => capability === value);
27
+ }
28
+ function capabilityIndex(capability) {
29
+ return DEPLOYMENT_CAPABILITIES.indexOf(capability);
30
+ }
31
+ //# sourceMappingURL=normalizeProviderCapabilityStates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeProviderCapabilityStates.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeProviderCapabilityStates.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,GAExB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,UAAU,iCAAiC,CAC/C,KAAc;IAEd,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEvC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAwB,CAAC;IAC7C,MAAM,MAAM,GAAwC,EAAE,CAAC;IACvD,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;QACxB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC;YAAE,OAAO,IAAI,CAAC;QAC7F,IAAI,GAAG,CAAC,MAAM,KAAK,WAAW,IAAI,GAAG,CAAC,MAAM,KAAK,aAAa;YAAE,OAAO,IAAI,CAAC;QAC5E,IAAI,GAAG,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC;YAAE,OAAO,IAAI,CAAC;QAC3E,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACzB,MAAM,CAAC,IAAI,CAAC;YACV,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,GAAG,CAAC,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC;SAC5D,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAChB,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,UAAU,CAAC,CACtF,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,uBAAuB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,KAAK,KAAK,CAAC,CAAC;AAC5E,CAAC;AAED,SAAS,eAAe,CAAC,UAAgC;IACvD,OAAO,uBAAuB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AACrD,CAAC","sourcesContent":["import {\n DEPLOYMENT_CAPABILITIES,\n type DeploymentCapability,\n} from '../../domain/DeploymentCapability';\nimport type { DeploymentProviderCapabilityState } from '../../domain/DeploymentProviderCapabilityState';\nimport { isNonEmptyString } from './isNonEmptyString';\nimport { isRecord } from './isRecord';\n\nexport function normalizeProviderCapabilityStates(\n value: unknown,\n): readonly DeploymentProviderCapabilityState[] | null {\n if (!Array.isArray(value)) return null;\n\n const seen = new Set<DeploymentCapability>();\n const states: DeploymentProviderCapabilityState[] = [];\n for (const raw of value) {\n if (!isRecord(raw) || !isCapability(raw.capability) || seen.has(raw.capability)) return null;\n if (raw.status !== 'available' && raw.status !== 'unavailable') return null;\n if (raw.reason !== undefined && !isNonEmptyString(raw.reason)) return null;\n seen.add(raw.capability);\n states.push({\n capability: raw.capability,\n status: raw.status,\n ...(raw.reason === undefined ? {} : { reason: raw.reason }),\n });\n }\n return states.sort(\n (left, right) => capabilityIndex(left.capability) - capabilityIndex(right.capability),\n );\n}\n\nfunction isCapability(value: unknown): value is DeploymentCapability {\n return DEPLOYMENT_CAPABILITIES.some((capability) => capability === value);\n}\n\nfunction capabilityIndex(capability: DeploymentCapability): number {\n return DEPLOYMENT_CAPABILITIES.indexOf(capability);\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import type { DeploymentProviderSetupInspection } from '../../domain/DeploymentProviderSetupInspection';
2
+ export type ProviderSetupNormalizationResult = {
3
+ readonly ok: true;
4
+ readonly inspection: DeploymentProviderSetupInspection;
5
+ } | {
6
+ readonly ok: false;
7
+ readonly unsafe: boolean;
8
+ };
9
+ export declare function normalizeProviderSetupInspection(value: unknown, provider: string, secrets: ReadonlySet<string>): ProviderSetupNormalizationResult;
10
+ //# sourceMappingURL=normalizeProviderSetupInspection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeProviderSetupInspection.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeProviderSetupInspection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gDAAgD,CAAC;AAOxG,MAAM,MAAM,gCAAgC,GACxC;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,iCAAiC,CAAA;CAAE,GAC7E;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAErD,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,GAC3B,gCAAgC,CAmBlC"}
@@ -0,0 +1,25 @@
1
+ import { containsTrackedSecret } from './containsTrackedSecret';
2
+ import { isRecord } from './isRecord';
3
+ import { normalizeAuthenticationState } from './normalizeAuthenticationState';
4
+ import { normalizeProviderCapabilityStates } from './normalizeProviderCapabilityStates';
5
+ import { normalizeProvisioningRequirements } from './normalizeProvisioningRequirements';
6
+ export function normalizeProviderSetupInspection(value, provider, secrets) {
7
+ if (!isRecord(value) || value.provider !== provider)
8
+ return { ok: false, unsafe: false };
9
+ const authentication = normalizeAuthenticationState(value.authentication, provider);
10
+ const capabilities = normalizeProviderCapabilityStates(value.capabilities);
11
+ const provisioning = normalizeProvisioningRequirements(value.provisioning, provider);
12
+ if (authentication === null || capabilities === null || provisioning === null) {
13
+ return { ok: false, unsafe: false };
14
+ }
15
+ const inspection = {
16
+ provider,
17
+ authentication,
18
+ capabilities,
19
+ provisioning,
20
+ };
21
+ return containsTrackedSecret(inspection, secrets)
22
+ ? { ok: false, unsafe: true }
23
+ : { ok: true, inspection };
24
+ }
25
+ //# sourceMappingURL=normalizeProviderSetupInspection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeProviderSetupInspection.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeProviderSetupInspection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAMxF,MAAM,UAAU,gCAAgC,CAC9C,KAAc,EACd,QAAgB,EAChB,OAA4B;IAE5B,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,QAAQ;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAEzF,MAAM,cAAc,GAAG,4BAA4B,CAAC,KAAK,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACpF,MAAM,YAAY,GAAG,iCAAiC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAC3E,MAAM,YAAY,GAAG,iCAAiC,CAAC,KAAK,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACrF,IAAI,cAAc,KAAK,IAAI,IAAI,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QAC9E,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IACtC,CAAC;IAED,MAAM,UAAU,GAAsC;QACpD,QAAQ;QACR,cAAc;QACd,YAAY;QACZ,YAAY;KACb,CAAC;IACF,OAAO,qBAAqB,CAAC,UAAU,EAAE,OAAO,CAAC;QAC/C,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;QAC7B,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AAC/B,CAAC","sourcesContent":["import type { DeploymentProviderSetupInspection } from '../../domain/DeploymentProviderSetupInspection';\nimport { containsTrackedSecret } from './containsTrackedSecret';\nimport { isRecord } from './isRecord';\nimport { normalizeAuthenticationState } from './normalizeAuthenticationState';\nimport { normalizeProviderCapabilityStates } from './normalizeProviderCapabilityStates';\nimport { normalizeProvisioningRequirements } from './normalizeProvisioningRequirements';\n\nexport type ProviderSetupNormalizationResult =\n | { readonly ok: true; readonly inspection: DeploymentProviderSetupInspection }\n | { readonly ok: false; readonly unsafe: boolean };\n\nexport function normalizeProviderSetupInspection(\n value: unknown,\n provider: string,\n secrets: ReadonlySet<string>,\n): ProviderSetupNormalizationResult {\n if (!isRecord(value) || value.provider !== provider) return { ok: false, unsafe: false };\n\n const authentication = normalizeAuthenticationState(value.authentication, provider);\n const capabilities = normalizeProviderCapabilityStates(value.capabilities);\n const provisioning = normalizeProvisioningRequirements(value.provisioning, provider);\n if (authentication === null || capabilities === null || provisioning === null) {\n return { ok: false, unsafe: false };\n }\n\n const inspection: DeploymentProviderSetupInspection = {\n provider,\n authentication,\n capabilities,\n provisioning,\n };\n return containsTrackedSecret(inspection, secrets)\n ? { ok: false, unsafe: true }\n : { ok: true, inspection };\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import type { DeploymentProvisioningRequirement } from '../../domain/DeploymentProvisioningRequirement';
2
+ export declare function normalizeProvisioningRequirements(value: unknown, provider: string): readonly DeploymentProvisioningRequirement[] | null;
3
+ //# sourceMappingURL=normalizeProvisioningRequirements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeProvisioningRequirements.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeProvisioningRequirements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gDAAgD,CAAC;AAMxG,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,GACf,SAAS,iCAAiC,EAAE,GAAG,IAAI,CAWrD"}
@@ -0,0 +1,31 @@
1
+ import { isRecord } from './isRecord';
2
+ import { normalizeAuthenticationAction } from './normalizeAuthenticationAction';
3
+ import { normalizeAutomatedProvisioningRequirement } from './normalizeAutomatedProvisioningRequirement';
4
+ import { normalizeManualAction } from './normalizeManualAction';
5
+ export function normalizeProvisioningRequirements(value, provider) {
6
+ if (!Array.isArray(value))
7
+ return null;
8
+ const seenAutomatedIds = new Set();
9
+ const requirements = [];
10
+ for (const raw of value) {
11
+ const requirement = normalizeRequirement(raw, provider, seenAutomatedIds);
12
+ if (requirement === null)
13
+ return null;
14
+ requirements.push(requirement);
15
+ }
16
+ return requirements;
17
+ }
18
+ function normalizeRequirement(value, provider, seen) {
19
+ if (!isRecord(value))
20
+ return null;
21
+ if (value.type === 'authentication') {
22
+ const action = normalizeAuthenticationAction(value.action, provider);
23
+ return action === null ? null : { type: 'authentication', action };
24
+ }
25
+ if (value.type === 'manual-action') {
26
+ const action = normalizeManualAction(value.action, provider);
27
+ return action === null ? null : { type: 'manual-action', action };
28
+ }
29
+ return normalizeAutomatedProvisioningRequirement(value, provider, seen);
30
+ }
31
+ //# sourceMappingURL=normalizeProvisioningRequirements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeProvisioningRequirements.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/normalizeProvisioningRequirements.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,yCAAyC,EAAE,MAAM,6CAA6C,CAAC;AACxG,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,UAAU,iCAAiC,CAC/C,KAAc,EACd,QAAgB;IAEhB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACvC,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAU,CAAC;IAC3C,MAAM,YAAY,GAAwC,EAAE,CAAC;IAE7D,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;QACxB,MAAM,WAAW,GAAG,oBAAoB,CAAC,GAAG,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC;QAC1E,IAAI,WAAW,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QACtC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,oBAAoB,CAC3B,KAAc,EACd,QAAgB,EAChB,IAAiB;IAEjB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAClC,IAAI,KAAK,CAAC,IAAI,KAAK,gBAAgB,EAAE,CAAC;QACpC,MAAM,MAAM,GAAG,6BAA6B,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACrE,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC;IACrE,CAAC;IACD,IAAI,KAAK,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;QACnC,MAAM,MAAM,GAAG,qBAAqB,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC7D,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,CAAC;IACpE,CAAC;IACD,OAAO,yCAAyC,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC1E,CAAC","sourcesContent":["import type { DeploymentProvisioningRequirement } from '../../domain/DeploymentProvisioningRequirement';\nimport { isRecord } from './isRecord';\nimport { normalizeAuthenticationAction } from './normalizeAuthenticationAction';\nimport { normalizeAutomatedProvisioningRequirement } from './normalizeAutomatedProvisioningRequirement';\nimport { normalizeManualAction } from './normalizeManualAction';\n\nexport function normalizeProvisioningRequirements(\n value: unknown,\n provider: string,\n): readonly DeploymentProvisioningRequirement[] | null {\n if (!Array.isArray(value)) return null;\n const seenAutomatedIds = new Set<string>();\n const requirements: DeploymentProvisioningRequirement[] = [];\n\n for (const raw of value) {\n const requirement = normalizeRequirement(raw, provider, seenAutomatedIds);\n if (requirement === null) return null;\n requirements.push(requirement);\n }\n return requirements;\n}\n\nfunction normalizeRequirement(\n value: unknown,\n provider: string,\n seen: Set<string>,\n): DeploymentProvisioningRequirement | null {\n if (!isRecord(value)) return null;\n if (value.type === 'authentication') {\n const action = normalizeAuthenticationAction(value.action, provider);\n return action === null ? null : { type: 'authentication', action };\n }\n if (value.type === 'manual-action') {\n const action = normalizeManualAction(value.action, provider);\n return action === null ? null : { type: 'manual-action', action };\n }\n return normalizeAutomatedProvisioningRequirement(value, provider, seen);\n}\n"]}
@@ -0,0 +1,16 @@
1
+ import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';
2
+ import type { DeploymentProviderSetupAdapter } from '../../domain/DeploymentProviderSetupAdapter';
3
+ import type { DeploymentProviderSetupContext } from '../../domain/DeploymentProviderSetupContext';
4
+ import type { DeploymentProviderSetupInspectionResult } from '../../domain/DeploymentProviderSetupInspectionResult';
5
+ export type PreparedProviderSetupInspection = {
6
+ readonly ok: true;
7
+ readonly provider: string;
8
+ readonly target: AppDeployTargetId | undefined;
9
+ readonly context: DeploymentProviderSetupContext;
10
+ readonly secrets: ReadonlySet<string>;
11
+ } | {
12
+ readonly ok: false;
13
+ readonly result: DeploymentProviderSetupInspectionResult;
14
+ };
15
+ export declare function prepareProviderSetupInspection(adapter: DeploymentProviderSetupAdapter, context: DeploymentProviderSetupContext): PreparedProviderSetupInspection;
16
+ //# sourceMappingURL=prepareProviderSetupInspection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepareProviderSetupInspection.d.ts","sourceRoot":"","sources":["../../../src/engine/providerSetup/prepareProviderSetupInspection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAClG,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAClG,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,sDAAsD,CAAC;AAQpH,MAAM,MAAM,+BAA+B,GACvC;IACE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,OAAO,EAAE,8BAA8B,CAAC;IACjD,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACvC,GACD;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,uCAAuC,CAAA;CAAE,CAAC;AAErF,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,8BAA8B,EACvC,OAAO,EAAE,8BAA8B,GACtC,+BAA+B,CAkBjC"}
@@ -0,0 +1,32 @@
1
+ import { createProviderSetupContext } from './createProviderSetupContext';
2
+ import { createProviderSetupFailure } from './createProviderSetupFailure';
3
+ import { createTrackedSecretResolver } from './createTrackedSecretResolver';
4
+ import { isAppDeployTargetId } from './isAppDeployTargetId';
5
+ import { isNonEmptyString } from './isNonEmptyString';
6
+ import { normalizeCredentialReferences } from './normalizeCredentialReferences';
7
+ export function prepareProviderSetupInspection(adapter, context) {
8
+ const { provider } = adapter;
9
+ const { target } = context;
10
+ if (!isNonEmptyString(provider) || (target !== undefined && !isAppDeployTargetId(target))) {
11
+ return invalidInput();
12
+ }
13
+ const credentials = normalizeCredentialReferences(context.credentials, provider);
14
+ if (credentials === null || typeof context.resolveSecret !== 'function') {
15
+ return invalidInput(provider, target);
16
+ }
17
+ const tracked = createTrackedSecretResolver(context.resolveSecret);
18
+ return {
19
+ ok: true,
20
+ provider,
21
+ target,
22
+ context: createProviderSetupContext(credentials, tracked.resolve, target),
23
+ secrets: tracked.secrets,
24
+ };
25
+ }
26
+ function invalidInput(provider, target) {
27
+ return {
28
+ ok: false,
29
+ result: createProviderSetupFailure('INVALID_PROVIDER_SETUP_INPUT', 'Provider setup input is invalid.', provider, target),
30
+ };
31
+ }
32
+ //# sourceMappingURL=prepareProviderSetupInspection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepareProviderSetupInspection.js","sourceRoot":"","sources":["../../../src/engine/providerSetup/prepareProviderSetupInspection.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAYhF,MAAM,UAAU,8BAA8B,CAC5C,OAAuC,EACvC,OAAuC;IAEvC,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAC7B,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAC3B,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QAC1F,OAAO,YAAY,EAAE,CAAC;IACxB,CAAC;IACD,MAAM,WAAW,GAAG,6BAA6B,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IACjF,IAAI,WAAW,KAAK,IAAI,IAAI,OAAO,OAAO,CAAC,aAAa,KAAK,UAAU,EAAE,CAAC;QACxE,OAAO,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;IACD,MAAM,OAAO,GAAG,2BAA2B,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACnE,OAAO;QACL,EAAE,EAAE,IAAI;QACR,QAAQ;QACR,MAAM;QACN,OAAO,EAAE,0BAA0B,CAAC,WAAW,EAAE,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC;QACzE,OAAO,EAAE,OAAO,CAAC,OAAO;KACzB,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CACnB,QAAiB,EACjB,MAA0B;IAE1B,OAAO;QACL,EAAE,EAAE,KAAK;QACT,MAAM,EAAE,0BAA0B,CAChC,8BAA8B,EAC9B,kCAAkC,EAClC,QAAQ,EACR,MAAM,CACP;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { AppDeployTargetId } from '@ankhorage/contracts/deploy';\n\nimport type { DeploymentProviderSetupAdapter } from '../../domain/DeploymentProviderSetupAdapter';\nimport type { DeploymentProviderSetupContext } from '../../domain/DeploymentProviderSetupContext';\nimport type { DeploymentProviderSetupInspectionResult } from '../../domain/DeploymentProviderSetupInspectionResult';\nimport { createProviderSetupContext } from './createProviderSetupContext';\nimport { createProviderSetupFailure } from './createProviderSetupFailure';\nimport { createTrackedSecretResolver } from './createTrackedSecretResolver';\nimport { isAppDeployTargetId } from './isAppDeployTargetId';\nimport { isNonEmptyString } from './isNonEmptyString';\nimport { normalizeCredentialReferences } from './normalizeCredentialReferences';\n\nexport type PreparedProviderSetupInspection =\n | {\n readonly ok: true;\n readonly provider: string;\n readonly target: AppDeployTargetId | undefined;\n readonly context: DeploymentProviderSetupContext;\n readonly secrets: ReadonlySet<string>;\n }\n | { readonly ok: false; readonly result: DeploymentProviderSetupInspectionResult };\n\nexport function prepareProviderSetupInspection(\n adapter: DeploymentProviderSetupAdapter,\n context: DeploymentProviderSetupContext,\n): PreparedProviderSetupInspection {\n const { provider } = adapter;\n const { target } = context;\n if (!isNonEmptyString(provider) || (target !== undefined && !isAppDeployTargetId(target))) {\n return invalidInput();\n }\n const credentials = normalizeCredentialReferences(context.credentials, provider);\n if (credentials === null || typeof context.resolveSecret !== 'function') {\n return invalidInput(provider, target);\n }\n const tracked = createTrackedSecretResolver(context.resolveSecret);\n return {\n ok: true,\n provider,\n target,\n context: createProviderSetupContext(credentials, tracked.resolve, target),\n secrets: tracked.secrets,\n };\n}\n\nfunction invalidInput(\n provider?: string,\n target?: AppDeployTargetId,\n): PreparedProviderSetupInspection {\n return {\n ok: false,\n result: createProviderSetupFailure(\n 'INVALID_PROVIDER_SETUP_INPUT',\n 'Provider setup input is invalid.',\n provider,\n target,\n ),\n };\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -1,11 +1,20 @@
1
+ export * from './domain/DeploymentAuthenticationState';
1
2
  export * from './domain/DeploymentCapability';
3
+ export * from './domain/DeploymentCredentialReference';
2
4
  export * from './domain/DeploymentCurrentState';
3
5
  export * from './domain/DeploymentExecutionResult';
4
6
  export * from './domain/DeploymentFailure';
5
7
  export * from './domain/DeploymentPlan';
6
8
  export * from './domain/DeploymentPlanDiagnostic';
7
9
  export * from './domain/DeploymentPlanStep';
10
+ export * from './domain/DeploymentProviderCapabilityState';
11
+ export * from './domain/DeploymentProviderSetupAdapter';
12
+ export * from './domain/DeploymentProviderSetupContext';
13
+ export * from './domain/DeploymentProviderSetupInspection';
14
+ export * from './domain/DeploymentProviderSetupInspectionResult';
15
+ export * from './domain/DeploymentProvisioningRequirement';
8
16
  export * from './domain/DeploymentRequiredAction';
17
+ export * from './domain/DeploymentSecretResolver';
9
18
  export * from './domain/DeploymentStepOutcome';
10
19
  export * from './domain/DeploymentTargetChange';
11
20
  export * from './domain/DeploymentTargetPlanContributor';
@@ -13,4 +22,5 @@ export * from './domain/DeploymentVerificationResult';
13
22
  export * from './engine/createDeploymentChanges';
14
23
  export * from './engine/createDeploymentPlan';
15
24
  export * from './engine/executeDeploymentPlan';
25
+ export * from './engine/inspectDeploymentProviderSetup';
16
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,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,4CAA4C,CAAC;AAC3D,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,kDAAkD,CAAC;AACjE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,mCAAmC,CAAC;AAClD,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;AAC/C,cAAc,yCAAyC,CAAC"}
package/dist/index.js CHANGED
@@ -1,11 +1,20 @@
1
+ export * from './domain/DeploymentAuthenticationState';
1
2
  export * from './domain/DeploymentCapability';
3
+ export * from './domain/DeploymentCredentialReference';
2
4
  export * from './domain/DeploymentCurrentState';
3
5
  export * from './domain/DeploymentExecutionResult';
4
6
  export * from './domain/DeploymentFailure';
5
7
  export * from './domain/DeploymentPlan';
6
8
  export * from './domain/DeploymentPlanDiagnostic';
7
9
  export * from './domain/DeploymentPlanStep';
10
+ export * from './domain/DeploymentProviderCapabilityState';
11
+ export * from './domain/DeploymentProviderSetupAdapter';
12
+ export * from './domain/DeploymentProviderSetupContext';
13
+ export * from './domain/DeploymentProviderSetupInspection';
14
+ export * from './domain/DeploymentProviderSetupInspectionResult';
15
+ export * from './domain/DeploymentProvisioningRequirement';
8
16
  export * from './domain/DeploymentRequiredAction';
17
+ export * from './domain/DeploymentSecretResolver';
9
18
  export * from './domain/DeploymentStepOutcome';
10
19
  export * from './domain/DeploymentTargetChange';
11
20
  export * from './domain/DeploymentTargetPlanContributor';
@@ -13,4 +22,5 @@ export * from './domain/DeploymentVerificationResult';
13
22
  export * from './engine/createDeploymentChanges';
14
23
  export * from './engine/createDeploymentPlan';
15
24
  export * from './engine/executeDeploymentPlan';
25
+ export * from './engine/inspectDeploymentProviderSetup';
16
26
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,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,4CAA4C,CAAC;AAC3D,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,kDAAkD,CAAC;AACjE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,mCAAmC,CAAC;AAClD,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;AAC/C,cAAc,yCAAyC,CAAC","sourcesContent":["export * from './domain/DeploymentAuthenticationState';\nexport * from './domain/DeploymentCapability';\nexport * from './domain/DeploymentCredentialReference';\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/DeploymentProviderCapabilityState';\nexport * from './domain/DeploymentProviderSetupAdapter';\nexport * from './domain/DeploymentProviderSetupContext';\nexport * from './domain/DeploymentProviderSetupInspection';\nexport * from './domain/DeploymentProviderSetupInspectionResult';\nexport * from './domain/DeploymentProvisioningRequirement';\nexport * from './domain/DeploymentRequiredAction';\nexport * from './domain/DeploymentSecretResolver';\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';\nexport * from './engine/inspectDeploymentProviderSetup';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ankhorage/deploy",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Declarative deployment engine for Expo apps across web, iOS, and Android — build, provision, publish, and manage releases from one configuration.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {