@ankhorage/contracts 19.2.1 → 19.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.
- package/CHANGELOG.md +12 -0
- package/dist/appManifest/deploy.d.ts +1 -1
- package/dist/appManifest/deploy.d.ts.map +1 -1
- package/dist/appManifest/deploy.js.map +1 -1
- package/dist/deploy.d.ts +1 -1
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +1 -1
- package/dist/deploy.js.map +1 -1
- package/dist/deployProvider.d.ts +4 -4
- package/dist/deployProvider.d.ts.map +1 -1
- package/dist/deployProvider.js +4 -4
- package/dist/deployProvider.js.map +1 -1
- package/dist/infra/isInfraEnvironmentSpec.d.ts.map +1 -1
- package/dist/infra/isInfraEnvironmentSpec.js +19 -1
- package/dist/infra/isInfraEnvironmentSpec.js.map +1 -1
- package/dist/types/deployMonetization.d.ts +1 -1
- package/dist/types/deployMonetization.d.ts.map +1 -1
- package/dist/types/deployMonetization.js.map +1 -1
- package/dist/types/deployProvider.d.ts +4 -4
- package/dist/types/deployProvider.d.ts.map +1 -1
- package/dist/types/deployProvider.js.map +1 -1
- package/dist/types/deployRelease.d.ts +1 -1
- package/dist/types/deployRelease.d.ts.map +1 -1
- package/dist/types/deployRelease.js.map +1 -1
- package/dist/types/deployStoreListing.d.ts +1 -1
- package/dist/types/deployStoreListing.d.ts.map +1 -1
- package/dist/types/deployStoreListing.js.map +1 -1
- package/dist/types/infraManifest.d.ts +8 -0
- package/dist/types/infraManifest.d.ts.map +1 -1
- package/dist/types/infraManifest.js.map +1 -1
- package/package.json +2 -2
- package/src/appManifest/deploy.ts +1 -1
- package/src/deploy.ts +1 -1
- package/src/deployProvider.ts +4 -4
- package/src/infra/isInfraEnvironmentSpec.ts +19 -1
- package/src/infraNetworking.test.ts +52 -0
- package/src/types/deployMonetization.ts +1 -1
- package/src/types/deployProvider.ts +4 -4
- package/src/types/deployRelease.ts +1 -1
- package/src/types/deployStoreListing.ts +1 -1
- package/src/types/infraManifest.ts +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ankhorage/contracts
|
|
2
2
|
|
|
3
|
+
## 19.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 03da0f5: Add runtime-neutral ACME HTTP-01 TLS intent to Infra networking, including validation that automatic TLS uses a matching HTTPS public origin and domain.
|
|
8
|
+
|
|
9
|
+
## 19.2.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- cd59eb6: Make deploy-provider declarations resolvable by NodeNext consumers and validate the built package self-export.
|
|
14
|
+
|
|
3
15
|
## 19.2.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppDeployManifest } from '../deploy';
|
|
1
|
+
import type { AppDeployManifest } from '../deploy.js';
|
|
2
2
|
/*** Validate authored application deployment configuration. */
|
|
3
3
|
export declare function isAppDeployManifest(value: unknown): value is AppDeployManifest;
|
|
4
4
|
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/appManifest/deploy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,iBAAiB,EAIlB,MAAM,
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/appManifest/deploy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,iBAAiB,EAIlB,MAAM,cAAc,CAAC;AAUtB,+DAA+D;AAC/D,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAE9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/appManifest/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAA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C,KAAK,CAAC;QACf,WAAW,CAAC,KAAK,EAAE,aAAa,CAAC;QACjC,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC5D,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CACjE,CAAC;AACJ,CAAC","sourcesContent":["import { hasOnlyKeys, isRecord } from '@ankhorage/utility/object';\nimport { isNonEmptyString } from '@ankhorage/utility/string';\n\nimport type {\n AppDeployAndroidTargetConfig,\n AppDeployIosTargetConfig,\n AppDeployManifest,\n AppDeployProviderSelection,\n AppDeployTargets,\n AppDeployWebTargetConfig,\n} from '../deploy';\n\nconst DEPLOY_KEYS = ['targets'] as const;\nconst TARGET_KEYS = ['web', 'android', 'ios'] as const;\nconst PROVIDER_KEYS = ['build', 'publish'] as const;\nconst WEB_KEYS = ['enabled', 'providers'] as const;\nconst ANDROID_KEYS = ['enabled', 'package', 'scheme', 'providers'] as const;\nconst IOS_KEYS = ['enabled', 'bundleIdentifier', 'scheme', 'providers'] as const;\nconst URI_SCHEME_PATTERN = /^[A-Za-z][A-Za-z0-9+.-]*$/u;\n\n/*** Validate authored application deployment configuration. */\nexport function isAppDeployManifest(value: unknown): value is AppDeployManifest {\n return isRecord(value) && hasOnlyKeys(value, DEPLOY_KEYS) && isAppDeployTargets(value.targets);\n}\n\n/*** Validate the optional web, Android and iOS deployment targets. */\nfunction isAppDeployTargets(value: unknown): value is AppDeployTargets {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, TARGET_KEYS) &&\n (value.web === undefined || isWebTarget(value.web)) &&\n (value.android === undefined || isAndroidTarget(value.android)) &&\n (value.ios === undefined || isIosTarget(value.ios))\n );\n}\n\n/*** Validate web deployment identity and provider selection. */\nfunction isWebTarget(value: unknown): value is AppDeployWebTargetConfig {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, WEB_KEYS) &&\n typeof value.enabled === 'boolean' &&\n isOptionalProviders(value.providers)\n );\n}\n\n/*** Validate Android deployment identity, scheme and provider selection. */\nfunction isAndroidTarget(value: unknown): value is AppDeployAndroidTargetConfig {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, ANDROID_KEYS) &&\n typeof value.enabled === 'boolean' &&\n isNonEmptyString(value.package) &&\n isOptionalScheme(value.scheme) &&\n isOptionalProviders(value.providers)\n );\n}\n\n/*** Validate iOS deployment identity, scheme and provider selection. */\nfunction isIosTarget(value: unknown): value is AppDeployIosTargetConfig {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, IOS_KEYS) &&\n typeof value.enabled === 'boolean' &&\n isNonEmptyString(value.bundleIdentifier) &&\n isOptionalScheme(value.scheme) &&\n isOptionalProviders(value.providers)\n );\n}\n\n/*** Accept an omitted scheme or a non-empty authored scheme. */\nfunction isOptionalScheme(value: unknown): value is string | undefined {\n return value === undefined || (typeof value === 'string' && URI_SCHEME_PATTERN.test(value));\n}\n\n/*** Accept omitted deployment providers or a valid provider selection. */\nfunction isOptionalProviders(value: unknown): value is AppDeployProviderSelection | undefined {\n return value === undefined || isProviderSelection(value);\n}\n\n/*** Validate deployment provider identities and supported selection keys. */\nfunction isProviderSelection(value: unknown): value is AppDeployProviderSelection {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, PROVIDER_KEYS) &&\n (value.build === undefined || isNonEmptyString(value.build)) &&\n (value.publish === undefined || isNonEmptyString(value.publish))\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/appManifest/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAW7D,MAAM,WAAW,GAAG,CAAC,SAAS,CAAU,CAAC;AACzC,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK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B,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CACjE,CAAC;AACJ,CAAC","sourcesContent":["import { hasOnlyKeys, isRecord } from '@ankhorage/utility/object';\nimport { isNonEmptyString } from '@ankhorage/utility/string';\n\nimport type {\n AppDeployAndroidTargetConfig,\n AppDeployIosTargetConfig,\n AppDeployManifest,\n AppDeployProviderSelection,\n AppDeployTargets,\n AppDeployWebTargetConfig,\n} from '../deploy.js';\n\nconst DEPLOY_KEYS = ['targets'] as const;\nconst TARGET_KEYS = ['web', 'android', 'ios'] as const;\nconst PROVIDER_KEYS = ['build', 'publish'] as const;\nconst WEB_KEYS = ['enabled', 'providers'] as const;\nconst ANDROID_KEYS = ['enabled', 'package', 'scheme', 'providers'] as const;\nconst IOS_KEYS = ['enabled', 'bundleIdentifier', 'scheme', 'providers'] as const;\nconst URI_SCHEME_PATTERN = /^[A-Za-z][A-Za-z0-9+.-]*$/u;\n\n/*** Validate authored application deployment configuration. */\nexport function isAppDeployManifest(value: unknown): value is AppDeployManifest {\n return isRecord(value) && hasOnlyKeys(value, DEPLOY_KEYS) && isAppDeployTargets(value.targets);\n}\n\n/*** Validate the optional web, Android and iOS deployment targets. */\nfunction isAppDeployTargets(value: unknown): value is AppDeployTargets {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, TARGET_KEYS) &&\n (value.web === undefined || isWebTarget(value.web)) &&\n (value.android === undefined || isAndroidTarget(value.android)) &&\n (value.ios === undefined || isIosTarget(value.ios))\n );\n}\n\n/*** Validate web deployment identity and provider selection. */\nfunction isWebTarget(value: unknown): value is AppDeployWebTargetConfig {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, WEB_KEYS) &&\n typeof value.enabled === 'boolean' &&\n isOptionalProviders(value.providers)\n );\n}\n\n/*** Validate Android deployment identity, scheme and provider selection. */\nfunction isAndroidTarget(value: unknown): value is AppDeployAndroidTargetConfig {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, ANDROID_KEYS) &&\n typeof value.enabled === 'boolean' &&\n isNonEmptyString(value.package) &&\n isOptionalScheme(value.scheme) &&\n isOptionalProviders(value.providers)\n );\n}\n\n/*** Validate iOS deployment identity, scheme and provider selection. */\nfunction isIosTarget(value: unknown): value is AppDeployIosTargetConfig {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, IOS_KEYS) &&\n typeof value.enabled === 'boolean' &&\n isNonEmptyString(value.bundleIdentifier) &&\n isOptionalScheme(value.scheme) &&\n isOptionalProviders(value.providers)\n );\n}\n\n/*** Accept an omitted scheme or a non-empty authored scheme. */\nfunction isOptionalScheme(value: unknown): value is string | undefined {\n return value === undefined || (typeof value === 'string' && URI_SCHEME_PATTERN.test(value));\n}\n\n/*** Accept omitted deployment providers or a valid provider selection. */\nfunction isOptionalProviders(value: unknown): value is AppDeployProviderSelection | undefined {\n return value === undefined || isProviderSelection(value);\n}\n\n/*** Validate deployment provider identities and supported selection keys. */\nfunction isProviderSelection(value: unknown): value is AppDeployProviderSelection {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, PROVIDER_KEYS) &&\n (value.build === undefined || isNonEmptyString(value.build)) &&\n (value.publish === undefined || isNonEmptyString(value.publish))\n );\n}\n"]}
|
package/dist/deploy.d.ts
CHANGED
|
@@ -30,5 +30,5 @@ export interface AppDeployTargets {
|
|
|
30
30
|
export interface AppDeployManifest {
|
|
31
31
|
readonly targets: AppDeployTargets;
|
|
32
32
|
}
|
|
33
|
-
export { isAppDeployManifest } from './appManifest/deploy';
|
|
33
|
+
export { isAppDeployManifest } from './appManifest/deploy.js';
|
|
34
34
|
//# sourceMappingURL=deploy.d.ts.map
|
package/dist/deploy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,oCAAqC,CAAC;AAExE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,C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BAAqB,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAU,CAAC;AAwCxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAU,CAAC;AAwCxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["export const APP_DEPLOY_TARGET_IDS = ['web', 'android', 'ios'] as const;\n\nexport type AppDeployTargetId = (typeof APP_DEPLOY_TARGET_IDS)[number];\n\nexport interface AppDeployProviderSelection {\n readonly build?: string;\n readonly publish?: string;\n}\n\nexport interface AppDeployWebTargetConfig {\n readonly enabled: boolean;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface AppDeployAndroidTargetConfig {\n readonly enabled: boolean;\n readonly package: string;\n /** Stable application URI scheme used for target-aware deep links such as OAuth callbacks. */\n readonly scheme?: string;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface AppDeployIosTargetConfig {\n readonly enabled: boolean;\n readonly bundleIdentifier: string;\n /** Stable application URI scheme used for target-aware deep links such as OAuth callbacks. */\n readonly scheme?: string;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface AppDeployTargets {\n readonly web?: AppDeployWebTargetConfig;\n readonly android?: AppDeployAndroidTargetConfig;\n readonly ios?: AppDeployIosTargetConfig;\n}\n\nexport interface AppDeployManifest {\n readonly targets: AppDeployTargets;\n}\n\nexport { isAppDeployManifest } from './appManifest/deploy.js';\n"]}
|
package/dist/deployProvider.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './types/deployMonetization';
|
|
2
|
-
export * from './types/deployProvider';
|
|
3
|
-
export * from './types/deployRelease';
|
|
4
|
-
export * from './types/deployStoreListing';
|
|
1
|
+
export * from './types/deployMonetization.js';
|
|
2
|
+
export * from './types/deployProvider.js';
|
|
3
|
+
export * from './types/deployRelease.js';
|
|
4
|
+
export * from './types/deployStoreListing.js';
|
|
5
5
|
//# sourceMappingURL=deployProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployProvider.d.ts","sourceRoot":"","sources":["../src/deployProvider.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"deployProvider.d.ts","sourceRoot":"","sources":["../src/deployProvider.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC"}
|
package/dist/deployProvider.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './types/deployMonetization';
|
|
2
|
-
export * from './types/deployProvider';
|
|
3
|
-
export * from './types/deployRelease';
|
|
4
|
-
export * from './types/deployStoreListing';
|
|
1
|
+
export * from './types/deployMonetization.js';
|
|
2
|
+
export * from './types/deployProvider.js';
|
|
3
|
+
export * from './types/deployRelease.js';
|
|
4
|
+
export * from './types/deployStoreListing.js';
|
|
5
5
|
//# sourceMappingURL=deployProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployProvider.js","sourceRoot":"","sources":["../src/deployProvider.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"deployProvider.js","sourceRoot":"","sources":["../src/deployProvider.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './types/deployMonetization.js';\nexport * from './types/deployProvider.js';\nexport * from './types/deployRelease.js';\nexport * from './types/deployStoreListing.js';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isInfraEnvironmentSpec.d.ts","sourceRoot":"","sources":["../../src/infra/isInfraEnvironmentSpec.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAA0B,MAAM,wBAAwB,CAAC;AAU3F,8FAA8F;AAC9F,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,oBAAoB,
|
|
1
|
+
{"version":3,"file":"isInfraEnvironmentSpec.d.ts","sourceRoot":"","sources":["../../src/infra/isInfraEnvironmentSpec.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAA0B,MAAM,wBAAwB,CAAC;AAU3F,8FAA8F;AAC9F,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,oBAAoB,CAOpF"}
|
|
@@ -9,7 +9,10 @@ import { isInfraShape } from './isInfraShape';
|
|
|
9
9
|
import { isInfraWorkloadSpec } from './isInfraWorkloadSpec';
|
|
10
10
|
/*** Validate sibling capabilities and their required relationships within one environment. */
|
|
11
11
|
export function isInfraEnvironmentSpec(value) {
|
|
12
|
-
return (isEnvironmentShape(value) &&
|
|
12
|
+
return (isEnvironmentShape(value) &&
|
|
13
|
+
hasServiceDependencies(value) &&
|
|
14
|
+
hasNetworkingRelationships(value) &&
|
|
15
|
+
hasUniquePublishedPorts(value));
|
|
13
16
|
}
|
|
14
17
|
/*** Check all environment field shapes before inspecting canonical dependency metadata. */
|
|
15
18
|
function isEnvironmentShape(value) {
|
|
@@ -37,6 +40,11 @@ function isEnvironmentShape(value) {
|
|
|
37
40
|
isInfraShape(networking, {
|
|
38
41
|
domain: infraFields.optionalText,
|
|
39
42
|
publicBaseUrl: (publicBaseUrl) => publicBaseUrl === undefined || isPublicHttpOrigin(publicBaseUrl),
|
|
43
|
+
tls: (tls) => tls === undefined ||
|
|
44
|
+
isInfraShape(tls, {
|
|
45
|
+
mode: (mode) => mode === 'acme-http-01',
|
|
46
|
+
contactEmail: isNonEmptyString,
|
|
47
|
+
}),
|
|
40
48
|
}),
|
|
41
49
|
workloads: (workloads) => workloads === undefined || isWorkloads(workloads),
|
|
42
50
|
});
|
|
@@ -53,6 +61,16 @@ function isPublicHttpOrigin(value) {
|
|
|
53
61
|
return false;
|
|
54
62
|
}
|
|
55
63
|
}
|
|
64
|
+
/*** Automatic TLS requires one matching HTTPS origin and public DNS hostname. */
|
|
65
|
+
function hasNetworkingRelationships(value) {
|
|
66
|
+
const { networking } = value;
|
|
67
|
+
if (networking?.tls === undefined)
|
|
68
|
+
return true;
|
|
69
|
+
if (networking.domain === undefined || networking.publicBaseUrl === undefined)
|
|
70
|
+
return false;
|
|
71
|
+
const url = new URL(networking.publicBaseUrl);
|
|
72
|
+
return url.protocol === 'https:' && url.hostname === networking.domain;
|
|
73
|
+
}
|
|
56
74
|
/*** Validate portable, unique Cerbos policy files without host paths or traversal. */
|
|
57
75
|
function isPolicyFiles(value) {
|
|
58
76
|
return (Array.isArray(value) &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isInfraEnvironmentSpec.js","sourceRoot":"","sources":["../../src/infra/isInfraEnvironmentSpec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAI7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,8FAA8F;AAC9F,MAAM,UAAU,sBAAsB,CAAC,KAAc;IACnD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,OAAO,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC;SACxC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,QAAQ,KAAK,KAAK,CAAC,EAAE,CAAC,CAAC;SACnF,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC9F,CAAC","sourcesContent":["import { isRecord } from '@ankhorage/utility/object';\nimport { isNonEmptyString } from '@ankhorage/utility/string';\n\nimport type { InfraEnvironmentSpec, InfraObjectStorageSpec } from '../types/infraManifest';\nimport type { InfraShape } from '../types/infraValidation';\nimport { INFRA_ADAPTER_CATALOG } from './constants';\nimport { infraFields } from './infraFields';\nimport { isInfraAuthSpec } from './isInfraAuthSpec';\nimport { isInfraCredentialRef } from './isInfraCredentialRef';\nimport { isInfraDeploymentSpec } from './isInfraDeploymentSpec';\nimport { isInfraShape } from './isInfraShape';\nimport { isInfraWorkloadSpec } from './isInfraWorkloadSpec';\n\n/*** Validate sibling capabilities and their required relationships within one environment. */\nexport function isInfraEnvironmentSpec(value: unknown): value is InfraEnvironmentSpec {\n return (\n isEnvironmentShape(value) && hasServiceDependencies(value) && hasUniquePublishedPorts(value)\n );\n}\n\n/*** Check all environment field shapes before inspecting canonical dependency metadata. */\nfunction isEnvironmentShape(value: unknown): value is InfraEnvironmentSpec {\n return isInfraShape(value, {\n deployment: isInfraDeploymentSpec,\n database: (database) =>\n database === undefined ||\n isInfraShape(database, {\n provider: (provider) => provider === 'supabase',\n tier: (tier) => tier === undefined || tier === 'dev' || tier === 'prod',\n }),\n objectStorage: (storage) => storage === undefined || isObjectStorage(storage),\n auth: (auth) => auth === undefined || isInfraAuthSpec(auth),\n authz: (authz) =>\n authz === undefined ||\n isInfraShape(authz, {\n provider: (provider) => provider === 'cerbos',\n kind: (kind) => kind === 'ABAC' || kind === 'RBAC',\n policies: (policies) => policies === undefined || isPolicyFiles(policies),\n }),\n secretStore: (store) =>\n store === undefined ||\n isInfraShape(store, {\n provider: (provider) => provider === 'supabase-vault',\n schema: infraFields.optionalText,\n }),\n networking: (networking) =>\n networking === undefined ||\n isInfraShape(networking, {\n domain: infraFields.optionalText,\n publicBaseUrl: (publicBaseUrl) =>\n publicBaseUrl === undefined || isPublicHttpOrigin(publicBaseUrl),\n }),\n workloads: (workloads) => workloads === undefined || isWorkloads(workloads),\n } satisfies InfraShape<InfraEnvironmentSpec>);\n}\n\n/*** Public workload configuration uses one canonical absolute HTTP(S) origin without path state. */\nfunction isPublicHttpOrigin(value: unknown): boolean {\n if (!isNonEmptyString(value)) return false;\n try {\n const url = new URL(value);\n return (url.protocol === 'http:' || url.protocol === 'https:') && url.origin === value;\n } catch {\n return false;\n }\n}\n\n/*** Validate portable, unique Cerbos policy files without host paths or traversal. */\nfunction isPolicyFiles(value: unknown): boolean {\n return (\n Array.isArray(value) &&\n value.every((policy) =>\n isInfraShape(policy, {\n path: (path) =>\n isNonEmptyString(path) && !path.startsWith('/') && !path.split('/').includes('..'),\n content: isNonEmptyString,\n }),\n ) &&\n new Set(value.map((policy) => (isRecord(policy) ? policy.path : undefined))).size ===\n value.length\n );\n}\n\n/*** Object storage can vary independently from database/auth; there is no implicit auto provider. */\nfunction isObjectStorage(value: unknown): boolean {\n if (!isRecord(value)) return false;\n const common = {\n provider: (provider: unknown) => provider === value.provider,\n buckets: infraFields.optionalStrings,\n };\n if (value.provider === 'supabase') return isInfraShape(value, common);\n return isInfraShape(value, {\n ...common,\n provider: (provider) => provider === 'r2',\n accountId: infraFields.optionalText,\n credentials: (credentials) => credentials === undefined || isInfraCredentialRef(credentials),\n } satisfies InfraShape<Extract<InfraObjectStorageSpec, { readonly provider: 'r2' }>>);\n}\n\n/*** Duplicate desired workload identities cannot be reconciled safely. */\nfunction isWorkloads(value: unknown): boolean {\n return (\n Array.isArray(value) &&\n value.every(isInfraWorkloadSpec) &&\n new Set(value.map((workload) => workload.id)).size === value.length\n );\n}\n\n/*** Prevent two workloads in one environment from claiming the same external listener. */\nfunction hasUniquePublishedPorts(value: InfraEnvironmentSpec): boolean {\n const ports = (value.workloads ?? []).flatMap((workload) =>\n (workload.ports ?? []).flatMap(({ publishedPort }) =>\n publishedPort === undefined ? [] : [publishedPort],\n ),\n );\n return new Set(ports).size === ports.length;\n}\n\n/*** Check catalog dependencies against selected sibling capabilities and runtime capabilities. */\nfunction hasServiceDependencies(value: InfraEnvironmentSpec): boolean {\n const selections = [\n value.database,\n value.auth,\n value.authz,\n value.objectStorage,\n value.secretStore,\n ];\n const runtime = Object.values(INFRA_ADAPTER_CATALOG).find(\n (entry) => entry.id === value.deployment.runtime.provider,\n );\n const capabilities = new Set<string>([\n 'compute',\n ...(runtime?.capabilities ?? []),\n ...Object.entries(value)\n .filter(([, selection]) => selection !== undefined)\n .map(([capability]) => capability),\n ]);\n return Object.values(INFRA_ADAPTER_CATALOG)\n .filter((entry) => selections.some((selection) => selection?.provider === entry.id))\n .every((entry) => entry.dependencies.every((dependency) => capabilities.has(dependency)));\n}\n"]}
|
|
1
|
+
{"version":3,"file":"isInfraEnvironmentSpec.js","sourceRoot":"","sources":["../../src/infra/isInfraEnvironmentSpec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAI7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBA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C,CAAC;AAC9F,CAAC","sourcesContent":["import { isRecord } from '@ankhorage/utility/object';\nimport { isNonEmptyString } from '@ankhorage/utility/string';\n\nimport type { InfraEnvironmentSpec, InfraObjectStorageSpec } from '../types/infraManifest';\nimport type { InfraShape } from '../types/infraValidation';\nimport { INFRA_ADAPTER_CATALOG } from './constants';\nimport { infraFields } from './infraFields';\nimport { isInfraAuthSpec } from './isInfraAuthSpec';\nimport { isInfraCredentialRef } from './isInfraCredentialRef';\nimport { isInfraDeploymentSpec } from './isInfraDeploymentSpec';\nimport { isInfraShape } from './isInfraShape';\nimport { isInfraWorkloadSpec } from './isInfraWorkloadSpec';\n\n/*** Validate sibling capabilities and their required relationships within one environment. */\nexport function isInfraEnvironmentSpec(value: unknown): value is InfraEnvironmentSpec {\n return (\n isEnvironmentShape(value) &&\n hasServiceDependencies(value) &&\n hasNetworkingRelationships(value) &&\n hasUniquePublishedPorts(value)\n );\n}\n\n/*** Check all environment field shapes before inspecting canonical dependency metadata. */\nfunction isEnvironmentShape(value: unknown): value is InfraEnvironmentSpec {\n return isInfraShape(value, {\n deployment: isInfraDeploymentSpec,\n database: (database) =>\n database === undefined ||\n isInfraShape(database, {\n provider: (provider) => provider === 'supabase',\n tier: (tier) => tier === undefined || tier === 'dev' || tier === 'prod',\n }),\n objectStorage: (storage) => storage === undefined || isObjectStorage(storage),\n auth: (auth) => auth === undefined || isInfraAuthSpec(auth),\n authz: (authz) =>\n authz === undefined ||\n isInfraShape(authz, {\n provider: (provider) => provider === 'cerbos',\n kind: (kind) => kind === 'ABAC' || kind === 'RBAC',\n policies: (policies) => policies === undefined || isPolicyFiles(policies),\n }),\n secretStore: (store) =>\n store === undefined ||\n isInfraShape(store, {\n provider: (provider) => provider === 'supabase-vault',\n schema: infraFields.optionalText,\n }),\n networking: (networking) =>\n networking === undefined ||\n isInfraShape(networking, {\n domain: infraFields.optionalText,\n publicBaseUrl: (publicBaseUrl) =>\n publicBaseUrl === undefined || isPublicHttpOrigin(publicBaseUrl),\n tls: (tls) =>\n tls === undefined ||\n isInfraShape(tls, {\n mode: (mode) => mode === 'acme-http-01',\n contactEmail: isNonEmptyString,\n }),\n }),\n workloads: (workloads) => workloads === undefined || isWorkloads(workloads),\n } satisfies InfraShape<InfraEnvironmentSpec>);\n}\n\n/*** Public workload configuration uses one canonical absolute HTTP(S) origin without path state. */\nfunction isPublicHttpOrigin(value: unknown): boolean {\n if (!isNonEmptyString(value)) return false;\n try {\n const url = new URL(value);\n return (url.protocol === 'http:' || url.protocol === 'https:') && url.origin === value;\n } catch {\n return false;\n }\n}\n\n/*** Automatic TLS requires one matching HTTPS origin and public DNS hostname. */\nfunction hasNetworkingRelationships(value: InfraEnvironmentSpec): boolean {\n const { networking } = value;\n if (networking?.tls === undefined) return true;\n if (networking.domain === undefined || networking.publicBaseUrl === undefined) return false;\n const url = new URL(networking.publicBaseUrl);\n return url.protocol === 'https:' && url.hostname === networking.domain;\n}\n\n/*** Validate portable, unique Cerbos policy files without host paths or traversal. */\nfunction isPolicyFiles(value: unknown): boolean {\n return (\n Array.isArray(value) &&\n value.every((policy) =>\n isInfraShape(policy, {\n path: (path) =>\n isNonEmptyString(path) && !path.startsWith('/') && !path.split('/').includes('..'),\n content: isNonEmptyString,\n }),\n ) &&\n new Set(value.map((policy) => (isRecord(policy) ? policy.path : undefined))).size ===\n value.length\n );\n}\n\n/*** Object storage can vary independently from database/auth; there is no implicit auto provider. */\nfunction isObjectStorage(value: unknown): boolean {\n if (!isRecord(value)) return false;\n const common = {\n provider: (provider: unknown) => provider === value.provider,\n buckets: infraFields.optionalStrings,\n };\n if (value.provider === 'supabase') return isInfraShape(value, common);\n return isInfraShape(value, {\n ...common,\n provider: (provider) => provider === 'r2',\n accountId: infraFields.optionalText,\n credentials: (credentials) => credentials === undefined || isInfraCredentialRef(credentials),\n } satisfies InfraShape<Extract<InfraObjectStorageSpec, { readonly provider: 'r2' }>>);\n}\n\n/*** Duplicate desired workload identities cannot be reconciled safely. */\nfunction isWorkloads(value: unknown): boolean {\n return (\n Array.isArray(value) &&\n value.every(isInfraWorkloadSpec) &&\n new Set(value.map((workload) => workload.id)).size === value.length\n );\n}\n\n/*** Prevent two workloads in one environment from claiming the same external listener. */\nfunction hasUniquePublishedPorts(value: InfraEnvironmentSpec): boolean {\n const ports = (value.workloads ?? []).flatMap((workload) =>\n (workload.ports ?? []).flatMap(({ publishedPort }) =>\n publishedPort === undefined ? [] : [publishedPort],\n ),\n );\n return new Set(ports).size === ports.length;\n}\n\n/*** Check catalog dependencies against selected sibling capabilities and runtime capabilities. */\nfunction hasServiceDependencies(value: InfraEnvironmentSpec): boolean {\n const selections = [\n value.database,\n value.auth,\n value.authz,\n value.objectStorage,\n value.secretStore,\n ];\n const runtime = Object.values(INFRA_ADAPTER_CATALOG).find(\n (entry) => entry.id === value.deployment.runtime.provider,\n );\n const capabilities = new Set<string>([\n 'compute',\n ...(runtime?.capabilities ?? []),\n ...Object.entries(value)\n .filter(([, selection]) => selection !== undefined)\n .map(([capability]) => capability),\n ]);\n return Object.values(INFRA_ADAPTER_CATALOG)\n .filter((entry) => selections.some((selection) => selection?.provider === entry.id))\n .every((entry) => entry.dependencies.every((dependency) => capabilities.has(dependency)));\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DeploymentCredentialReference, DeploymentProviderResult, DeploymentSecretResolver, DeploymentStoreIdentity } from './deployProvider';
|
|
1
|
+
import type { DeploymentCredentialReference, DeploymentProviderResult, DeploymentSecretResolver, DeploymentStoreIdentity } from './deployProvider.js';
|
|
2
2
|
export type MonetizationProductKind = 'consumable' | 'non-consumable' | 'subscription';
|
|
3
3
|
export interface MonetizationLocalization {
|
|
4
4
|
readonly locale: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployMonetization.d.ts","sourceRoot":"","sources":["../../src/types/deployMonetization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,wBAAwB,EACxB,wBAAwB,E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,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;IACrD,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAChD,QAAQ,CAAC,WAAW,EAAE,SAAS,sBAAsB,EAAE,CAAC;CACzD;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAC;IAC3C,QAAQ,CAAC,WAAW,EAAE,SAAS,6BAA6B,EAAE,CAAC;IAC/D,QAAQ,CAAC,aAAa,EAAE,wBAAwB,CAAC;CAClD;AAED,MAAM,WAAW,uBAAwB,SAAQ,0BAA0B;IACzE,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAC;IAC3C,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;CACjC;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,KAAK,CAAC;IACnC,YAAY,CACV,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,wBAAwB,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAC9D,SAAS,CACP,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,wBAAwB,CAAC,uBAAuB,CAAC,CAAC,CAAC;CAC/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployMonetization.js","sourceRoot":"","sources":["../../src/types/deployMonetization.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n DeploymentCredentialReference,\n DeploymentProviderResult,\n DeploymentSecretResolver,\n DeploymentStoreIdentity,\n} from './deployProvider';\n\nexport type MonetizationProductKind = 'consumable' | 'non-consumable' | 'subscription';\n\nexport interface MonetizationLocalization {\n readonly locale: string;\n readonly name: string;\n readonly description: string;\n}\n\nexport interface MonetizationBasePrice {\n readonly country: string;\n readonly currency: string;\n readonly amount: string;\n}\n\nexport type MonetizationSubscriptionPeriod = 'P1W' | 'P1M' | 'P2M' | 'P3M' | 'P6M' | 'P1Y';\n\nexport interface MonetizationSubscription {\n readonly family: string;\n readonly period: MonetizationSubscriptionPeriod;\n readonly level?: number;\n}\n\nexport interface MonetizationProduct {\n readonly id: string;\n readonly kind: MonetizationProductKind;\n readonly localizations: readonly MonetizationLocalization[];\n readonly basePrice: MonetizationBasePrice;\n readonly subscription?: MonetizationSubscription;\n}\n\nexport interface MonetizationObservedProduct {\n readonly id: string;\n readonly kind: MonetizationProductKind | 'one-time';\n readonly localizations: readonly MonetizationLocalization[];\n readonly basePrice?: MonetizationBasePrice;\n readonly subscription?: MonetizationSubscription;\n}\n\nexport interface MonetizationDesiredState {\n readonly revision: string;\n readonly products: readonly MonetizationProduct[];\n}\n\nexport interface MonetizationDiagnostic {\n readonly severity: 'warning' | 'error';\n readonly code: string;\n readonly message: string;\n readonly target?: 'android' | 'ios';\n readonly productId?: string;\n readonly locale?: string;\n}\n\nexport interface MonetizationTargetState {\n readonly target: 'android' | 'ios';\n readonly products: readonly MonetizationObservedProduct[];\n readonly subscriptionFamilies: readonly string[];\n readonly diagnostics: readonly MonetizationDiagnostic[];\n}\n\nexport interface MonetizationPlanStep {\n readonly id: string;\n readonly target: 'android' | 'ios';\n readonly productId: string;\n readonly operation:\n | 'ensure-subscription-family'\n | 'create-product'\n | 'update-metadata'\n | 'update-price'\n | 'update-subscription';\n}\n\nexport interface MonetizationPlan {\n readonly status: 'no-change' | 'changes' | 'blocked';\n readonly desiredRevision: string;\n readonly currentRevision: string;\n readonly steps: readonly MonetizationPlanStep[];\n readonly diagnostics: readonly MonetizationDiagnostic[];\n}\n\nexport interface MonetizationAdapterContext {\n readonly identity: DeploymentStoreIdentity;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface MonetizationSyncRequest extends MonetizationAdapterContext {\n readonly desired: MonetizationDesiredState;\n readonly plan: MonetizationPlan;\n}\n\nexport interface DeploymentMonetizationAdapter {\n readonly target: 'android' | 'ios';\n inspectAsync(\n context: MonetizationAdapterContext,\n ): Promise<DeploymentProviderResult<MonetizationTargetState>>;\n syncAsync(\n request: MonetizationSyncRequest,\n ): Promise<DeploymentProviderResult<MonetizationTargetState>>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"deployMonetization.js","sourceRoot":"","sources":["../../src/types/deployMonetization.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n DeploymentCredentialReference,\n DeploymentProviderResult,\n DeploymentSecretResolver,\n DeploymentStoreIdentity,\n} from './deployProvider.js';\n\nexport type MonetizationProductKind = 'consumable' | 'non-consumable' | 'subscription';\n\nexport interface MonetizationLocalization {\n readonly locale: string;\n readonly name: string;\n readonly description: string;\n}\n\nexport interface MonetizationBasePrice {\n readonly country: string;\n readonly currency: string;\n readonly amount: string;\n}\n\nexport type MonetizationSubscriptionPeriod = 'P1W' | 'P1M' | 'P2M' | 'P3M' | 'P6M' | 'P1Y';\n\nexport interface MonetizationSubscription {\n readonly family: string;\n readonly period: MonetizationSubscriptionPeriod;\n readonly level?: number;\n}\n\nexport interface MonetizationProduct {\n readonly id: string;\n readonly kind: MonetizationProductKind;\n readonly localizations: readonly MonetizationLocalization[];\n readonly basePrice: MonetizationBasePrice;\n readonly subscription?: MonetizationSubscription;\n}\n\nexport interface MonetizationObservedProduct {\n readonly id: string;\n readonly kind: MonetizationProductKind | 'one-time';\n readonly localizations: readonly MonetizationLocalization[];\n readonly basePrice?: MonetizationBasePrice;\n readonly subscription?: MonetizationSubscription;\n}\n\nexport interface MonetizationDesiredState {\n readonly revision: string;\n readonly products: readonly MonetizationProduct[];\n}\n\nexport interface MonetizationDiagnostic {\n readonly severity: 'warning' | 'error';\n readonly code: string;\n readonly message: string;\n readonly target?: 'android' | 'ios';\n readonly productId?: string;\n readonly locale?: string;\n}\n\nexport interface MonetizationTargetState {\n readonly target: 'android' | 'ios';\n readonly products: readonly MonetizationObservedProduct[];\n readonly subscriptionFamilies: readonly string[];\n readonly diagnostics: readonly MonetizationDiagnostic[];\n}\n\nexport interface MonetizationPlanStep {\n readonly id: string;\n readonly target: 'android' | 'ios';\n readonly productId: string;\n readonly operation:\n | 'ensure-subscription-family'\n | 'create-product'\n | 'update-metadata'\n | 'update-price'\n | 'update-subscription';\n}\n\nexport interface MonetizationPlan {\n readonly status: 'no-change' | 'changes' | 'blocked';\n readonly desiredRevision: string;\n readonly currentRevision: string;\n readonly steps: readonly MonetizationPlanStep[];\n readonly diagnostics: readonly MonetizationDiagnostic[];\n}\n\nexport interface MonetizationAdapterContext {\n readonly identity: DeploymentStoreIdentity;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface MonetizationSyncRequest extends MonetizationAdapterContext {\n readonly desired: MonetizationDesiredState;\n readonly plan: MonetizationPlan;\n}\n\nexport interface DeploymentMonetizationAdapter {\n readonly target: 'android' | 'ios';\n inspectAsync(\n context: MonetizationAdapterContext,\n ): Promise<DeploymentProviderResult<MonetizationTargetState>>;\n syncAsync(\n request: MonetizationSyncRequest,\n ): Promise<DeploymentProviderResult<MonetizationTargetState>>;\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { AppDeployTargetId } from '../deploy';
|
|
2
|
-
import type { DeploymentMonetizationAdapter } from './deployMonetization';
|
|
3
|
-
import type { DeploymentReleaseAdapter } from './deployRelease';
|
|
4
|
-
import type { DeploymentStoreListingAdapter } from './deployStoreListing';
|
|
1
|
+
import type { AppDeployTargetId } from '../deploy.js';
|
|
2
|
+
import type { DeploymentMonetizationAdapter } from './deployMonetization.js';
|
|
3
|
+
import type { DeploymentReleaseAdapter } from './deployRelease.js';
|
|
4
|
+
import type { DeploymentStoreListingAdapter } from './deployStoreListing.js';
|
|
5
5
|
export declare const DEPLOYMENT_CAPABILITIES: readonly ["provision", "prepare", "build", "publish", "verify"];
|
|
6
6
|
export type DeploymentCapability = (typeof DEPLOYMENT_CAPABILITIES)[number];
|
|
7
7
|
export declare const DEPLOYMENT_PROVIDER_CAPABILITY_IDS: readonly ["setup", "web-publish", "android-build", "android-publish", "ios-build", "ios-publish", "store-listing", "monetization", "release"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployProvider.d.ts","sourceRoot":"","sources":["../../src/types/deployProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deployProvider.d.ts","sourceRoot":"","sources":["../../src/types/deployProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAE7E,eAAO,MAAM,uBAAuB,iEAM1B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,eAAO,MAAM,kCAAkC,+IAUrC,CAAC;AAEX,MAAM,MAAM,8BAA8B,GAAG,CAAC,OAAO,kCAAkC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjG,MAAM,WAAW,sCAAsC;IACrD,QAAQ,CAAC,EAAE,EAAE,8BAA8B,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAChD;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,Q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AO,CAAC,EAAE,wBAAwB,CAAC;CAC7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployProvider.js","sourceRoot":"","sources":["../../src/types/deployProvider.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,WAAW;IACX,SAAS;IACT,OAAO;IACP,SAAS;IACT,QAAQ;CACA,CAAC;AAIX,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,OAAO;IACP,aAAa;IACb,eAAe;IACf,iBAAiB;IACjB,WAAW;IACX,aAAa;IACb,eAAe;IACf,cAAc;IACd,SAAS;CACD,CAAC;AA4IX,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,CAAU,CAAC;AAG9F,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,OAAO,EAAE,WAAW,CAAU,CAAC","sourcesContent":["import type { AppDeployTargetId } from '../deploy';\nimport type { DeploymentMonetizationAdapter } from './deployMonetization';\nimport type { DeploymentReleaseAdapter } from './deployRelease';\nimport type { DeploymentStoreListingAdapter } from './deployStoreListing';\n\nexport 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\nexport const DEPLOYMENT_PROVIDER_CAPABILITY_IDS = [\n 'setup',\n 'web-publish',\n 'android-build',\n 'android-publish',\n 'ios-build',\n 'ios-publish',\n 'store-listing',\n 'monetization',\n 'release',\n] as const;\n\nexport type DeploymentProviderCapabilityId = (typeof DEPLOYMENT_PROVIDER_CAPABILITY_IDS)[number];\n\nexport interface DeploymentProviderCapabilityDescriptor {\n readonly id: DeploymentProviderCapabilityId;\n readonly targets: readonly AppDeployTargetId[];\n}\n\nexport interface DeploymentProviderDescriptor {\n readonly id: string;\n readonly packageName: string;\n readonly displayName: string;\n readonly capabilities: readonly DeploymentProviderCapabilityDescriptor[];\n}\n\nexport interface DeploymentCredentialReference {\n readonly provider: string;\n readonly id: string;\n readonly kind: string;\n}\n\nexport type DeploymentSecretMaterial = string;\n\nexport type DeploymentSecretResolver = (\n reference: DeploymentCredentialReference,\n) => Promise<DeploymentSecretMaterial | null>;\n\nexport interface DeploymentFailure {\n readonly code: string;\n readonly message: string;\n readonly target?: AppDeployTargetId;\n readonly provider?: string;\n}\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\nexport type DeploymentProviderResult<T> =\n | { readonly status: 'completed'; readonly value: T }\n | { readonly status: 'action-required'; readonly action: DeploymentRequiredAction }\n | { readonly status: 'failed'; readonly failure: DeploymentFailure };\n\nexport type DeploymentAuthenticationState =\n | { readonly status: 'authenticated' }\n | {\n readonly status: 'required';\n readonly action: DeploymentAuthenticationRequiredAction;\n };\n\nexport interface DeploymentProviderCapabilityState {\n readonly capability: DeploymentCapability;\n readonly status: 'available' | 'unavailable';\n readonly reason?: string;\n}\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\nexport interface DeploymentProviderSetupContext {\n readonly projectRoot: string;\n readonly target?: AppDeployTargetId;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface DeploymentProviderSetupInspection {\n readonly provider: string;\n readonly authentication: DeploymentAuthenticationState;\n readonly capabilities: readonly DeploymentProviderCapabilityState[];\n readonly provisioning: readonly DeploymentProvisioningRequirement[];\n}\n\nexport interface DeploymentProviderSetupAdapter {\n readonly provider: string;\n inspectSetup(context: DeploymentProviderSetupContext): Promise<DeploymentProviderSetupInspection>;\n}\n\nexport type DeploymentStoreIdentity =\n | { readonly target: 'android'; readonly packageName: string }\n | { readonly target: 'ios'; readonly bundleIdentifier: string };\n\nexport interface WebDeploymentPublishIntent {\n readonly mode: 'preview' | 'production';\n readonly alias?: string;\n readonly environment?: string;\n}\n\nexport interface WebDeploymentPublication {\n readonly target: 'web';\n readonly revision: string;\n readonly provider: string;\n readonly deploymentId: string;\n readonly url: string;\n readonly production: boolean;\n}\n\nexport interface WebDeploymentPublishRequest {\n readonly projectRoot: string;\n readonly exportDirectory: string;\n readonly revision: string;\n readonly intent: WebDeploymentPublishIntent;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface WebDeploymentPublisher {\n publishAsync(\n request: WebDeploymentPublishRequest,\n ): Promise<DeploymentProviderResult<WebDeploymentPublication>>;\n}\n\nexport const ANDROID_DEPLOYMENT_TRACKS = ['internal', 'alpha', 'beta', 'production'] as const;\nexport type AndroidDeploymentTrack = (typeof ANDROID_DEPLOYMENT_TRACKS)[number];\n\nexport const ANDROID_RELEASE_STATUSES = ['draft', 'completed'] as const;\nexport type AndroidReleaseStatus = (typeof ANDROID_RELEASE_STATUSES)[number];\n\nexport interface AndroidDeploymentIntent {\n readonly buildProfile: string;\n readonly track: AndroidDeploymentTrack;\n readonly releaseStatus: AndroidReleaseStatus;\n}\n\nexport interface AndroidBuildInspectionRequest {\n readonly projectRoot: string;\n readonly packageName: string;\n readonly buildProfile: string;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface AndroidBuildInspection {\n readonly fingerprint: string;\n}\n\nexport interface AndroidBuildRequest extends AndroidBuildInspectionRequest {\n readonly expectedFingerprint: string;\n}\n\nexport interface AndroidBuildArtifact {\n readonly provider: string;\n readonly buildId: string;\n readonly buildProfile: string;\n readonly fingerprint: string;\n readonly versionCode: number;\n readonly archiveUrl: string;\n}\n\nexport interface AndroidDeploymentBuilder {\n inspectAsync(\n request: AndroidBuildInspectionRequest,\n ): Promise<DeploymentProviderResult<AndroidBuildInspection>>;\n buildAsync(request: AndroidBuildRequest): Promise<DeploymentProviderResult<AndroidBuildArtifact>>;\n}\n\nexport interface AndroidPublishInspectionRequest {\n readonly packageName: string;\n readonly track: AndroidDeploymentTrack;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface AndroidPublishInspection {\n readonly track: AndroidDeploymentTrack;\n readonly activeVersionCodes: readonly number[];\n}\n\nexport interface AndroidPublishRequest extends AndroidPublishInspectionRequest {\n readonly revision: string;\n readonly releaseStatus: AndroidReleaseStatus;\n readonly artifact: AndroidBuildArtifact;\n}\n\nexport interface AndroidDeploymentPublication {\n readonly target: 'android';\n readonly revision: string;\n readonly buildProvider: string;\n readonly publishProvider: string;\n readonly buildId: string;\n readonly versionCode: number;\n readonly track: AndroidDeploymentTrack;\n readonly releaseStatus: AndroidReleaseStatus;\n}\n\nexport interface AndroidDeploymentPublisher {\n inspectAsync(\n request: AndroidPublishInspectionRequest,\n ): Promise<DeploymentProviderResult<AndroidPublishInspection>>;\n publishAsync(\n request: AndroidPublishRequest,\n ): Promise<DeploymentProviderResult<AndroidDeploymentPublication>>;\n verifyAsync(\n request: AndroidPublishRequest,\n ): Promise<DeploymentProviderResult<AndroidPublishInspection>>;\n}\n\nexport interface IosDeploymentIntent {\n readonly buildProfile: string;\n readonly version: string;\n}\n\nexport interface IosBuildInspectionRequest {\n readonly projectRoot: string;\n readonly bundleIdentifier: string;\n readonly buildProfile: string;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface IosBuildInspection {\n readonly fingerprint: string;\n}\n\nexport interface IosBuildRequest extends IosBuildInspectionRequest {\n readonly expectedFingerprint: string;\n readonly version: string;\n}\n\nexport interface IosBuildArtifact {\n readonly provider: string;\n readonly buildId: string;\n readonly buildProfile: string;\n readonly fingerprint: string;\n readonly version: string;\n readonly buildNumber: string;\n readonly archiveUrl: string;\n}\n\nexport interface IosDeploymentBuilder {\n inspectAsync(\n request: IosBuildInspectionRequest,\n ): Promise<DeploymentProviderResult<IosBuildInspection>>;\n buildAsync(request: IosBuildRequest): Promise<DeploymentProviderResult<IosBuildArtifact>>;\n}\n\nexport interface IosPublishInspectionRequest {\n readonly bundleIdentifier: string;\n readonly version: string;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface IosPublishInspection {\n readonly bundleIdentifier: string;\n readonly version: string | null;\n readonly buildNumber: string | null;\n}\n\nexport interface IosPublishRequest extends IosPublishInspectionRequest {\n readonly revision: string;\n readonly artifact: IosBuildArtifact;\n}\n\nexport interface IosDeploymentPublication {\n readonly target: 'ios';\n readonly revision: string;\n readonly buildProvider: string;\n readonly publishProvider: string;\n readonly buildId: string;\n readonly version: string;\n readonly buildNumber: string;\n}\n\nexport interface IosDeploymentPublisher {\n inspectAsync(\n request: IosPublishInspectionRequest,\n ): Promise<DeploymentProviderResult<IosPublishInspection>>;\n publishAsync(\n request: IosPublishRequest,\n ): Promise<DeploymentProviderResult<IosDeploymentPublication>>;\n verifyAsync(request: IosPublishRequest): Promise<DeploymentProviderResult<IosPublishInspection>>;\n}\n\nexport interface DeploymentProviderRegistration {\n readonly descriptor: DeploymentProviderDescriptor;\n readonly setup?: DeploymentProviderSetupAdapter;\n readonly webPublisher?: WebDeploymentPublisher;\n readonly androidBuilder?: AndroidDeploymentBuilder;\n readonly androidPublisher?: AndroidDeploymentPublisher;\n readonly iosBuilder?: IosDeploymentBuilder;\n readonly iosPublisher?: IosDeploymentPublisher;\n readonly storeListing?: DeploymentStoreListingAdapter;\n readonly monetization?: DeploymentMonetizationAdapter;\n readonly release?: DeploymentReleaseAdapter;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"deployProvider.js","sourceRoot":"","sources":["../../src/types/deployProvider.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,WAAW;IACX,SAAS;IACT,OAAO;IACP,SAAS;IACT,QAAQ;CACA,CAAC;AAIX,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,OAAO;IACP,aAAa;IACb,eAAe;IACf,iBAAiB;IACjB,WAAW;IACX,aAAa;IACb,eAAe;IACf,cAAc;IACd,SAAS;CACD,CAAC;AA4IX,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,CAAU,CAAC;AAG9F,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,OAAO,EAAE,WAAW,CAAU,CAAC","sourcesContent":["import type { AppDeployTargetId } from '../deploy.js';\nimport type { DeploymentMonetizationAdapter } from './deployMonetization.js';\nimport type { DeploymentReleaseAdapter } from './deployRelease.js';\nimport type { DeploymentStoreListingAdapter } from './deployStoreListing.js';\n\nexport 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\nexport const DEPLOYMENT_PROVIDER_CAPABILITY_IDS = [\n 'setup',\n 'web-publish',\n 'android-build',\n 'android-publish',\n 'ios-build',\n 'ios-publish',\n 'store-listing',\n 'monetization',\n 'release',\n] as const;\n\nexport type DeploymentProviderCapabilityId = (typeof DEPLOYMENT_PROVIDER_CAPABILITY_IDS)[number];\n\nexport interface DeploymentProviderCapabilityDescriptor {\n readonly id: DeploymentProviderCapabilityId;\n readonly targets: readonly AppDeployTargetId[];\n}\n\nexport interface DeploymentProviderDescriptor {\n readonly id: string;\n readonly packageName: string;\n readonly displayName: string;\n readonly capabilities: readonly DeploymentProviderCapabilityDescriptor[];\n}\n\nexport interface DeploymentCredentialReference {\n readonly provider: string;\n readonly id: string;\n readonly kind: string;\n}\n\nexport type DeploymentSecretMaterial = string;\n\nexport type DeploymentSecretResolver = (\n reference: DeploymentCredentialReference,\n) => Promise<DeploymentSecretMaterial | null>;\n\nexport interface DeploymentFailure {\n readonly code: string;\n readonly message: string;\n readonly target?: AppDeployTargetId;\n readonly provider?: string;\n}\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\nexport type DeploymentProviderResult<T> =\n | { readonly status: 'completed'; readonly value: T }\n | { readonly status: 'action-required'; readonly action: DeploymentRequiredAction }\n | { readonly status: 'failed'; readonly failure: DeploymentFailure };\n\nexport type DeploymentAuthenticationState =\n | { readonly status: 'authenticated' }\n | {\n readonly status: 'required';\n readonly action: DeploymentAuthenticationRequiredAction;\n };\n\nexport interface DeploymentProviderCapabilityState {\n readonly capability: DeploymentCapability;\n readonly status: 'available' | 'unavailable';\n readonly reason?: string;\n}\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\nexport interface DeploymentProviderSetupContext {\n readonly projectRoot: string;\n readonly target?: AppDeployTargetId;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface DeploymentProviderSetupInspection {\n readonly provider: string;\n readonly authentication: DeploymentAuthenticationState;\n readonly capabilities: readonly DeploymentProviderCapabilityState[];\n readonly provisioning: readonly DeploymentProvisioningRequirement[];\n}\n\nexport interface DeploymentProviderSetupAdapter {\n readonly provider: string;\n inspectSetup(context: DeploymentProviderSetupContext): Promise<DeploymentProviderSetupInspection>;\n}\n\nexport type DeploymentStoreIdentity =\n | { readonly target: 'android'; readonly packageName: string }\n | { readonly target: 'ios'; readonly bundleIdentifier: string };\n\nexport interface WebDeploymentPublishIntent {\n readonly mode: 'preview' | 'production';\n readonly alias?: string;\n readonly environment?: string;\n}\n\nexport interface WebDeploymentPublication {\n readonly target: 'web';\n readonly revision: string;\n readonly provider: string;\n readonly deploymentId: string;\n readonly url: string;\n readonly production: boolean;\n}\n\nexport interface WebDeploymentPublishRequest {\n readonly projectRoot: string;\n readonly exportDirectory: string;\n readonly revision: string;\n readonly intent: WebDeploymentPublishIntent;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface WebDeploymentPublisher {\n publishAsync(\n request: WebDeploymentPublishRequest,\n ): Promise<DeploymentProviderResult<WebDeploymentPublication>>;\n}\n\nexport const ANDROID_DEPLOYMENT_TRACKS = ['internal', 'alpha', 'beta', 'production'] as const;\nexport type AndroidDeploymentTrack = (typeof ANDROID_DEPLOYMENT_TRACKS)[number];\n\nexport const ANDROID_RELEASE_STATUSES = ['draft', 'completed'] as const;\nexport type AndroidReleaseStatus = (typeof ANDROID_RELEASE_STATUSES)[number];\n\nexport interface AndroidDeploymentIntent {\n readonly buildProfile: string;\n readonly track: AndroidDeploymentTrack;\n readonly releaseStatus: AndroidReleaseStatus;\n}\n\nexport interface AndroidBuildInspectionRequest {\n readonly projectRoot: string;\n readonly packageName: string;\n readonly buildProfile: string;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface AndroidBuildInspection {\n readonly fingerprint: string;\n}\n\nexport interface AndroidBuildRequest extends AndroidBuildInspectionRequest {\n readonly expectedFingerprint: string;\n}\n\nexport interface AndroidBuildArtifact {\n readonly provider: string;\n readonly buildId: string;\n readonly buildProfile: string;\n readonly fingerprint: string;\n readonly versionCode: number;\n readonly archiveUrl: string;\n}\n\nexport interface AndroidDeploymentBuilder {\n inspectAsync(\n request: AndroidBuildInspectionRequest,\n ): Promise<DeploymentProviderResult<AndroidBuildInspection>>;\n buildAsync(request: AndroidBuildRequest): Promise<DeploymentProviderResult<AndroidBuildArtifact>>;\n}\n\nexport interface AndroidPublishInspectionRequest {\n readonly packageName: string;\n readonly track: AndroidDeploymentTrack;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface AndroidPublishInspection {\n readonly track: AndroidDeploymentTrack;\n readonly activeVersionCodes: readonly number[];\n}\n\nexport interface AndroidPublishRequest extends AndroidPublishInspectionRequest {\n readonly revision: string;\n readonly releaseStatus: AndroidReleaseStatus;\n readonly artifact: AndroidBuildArtifact;\n}\n\nexport interface AndroidDeploymentPublication {\n readonly target: 'android';\n readonly revision: string;\n readonly buildProvider: string;\n readonly publishProvider: string;\n readonly buildId: string;\n readonly versionCode: number;\n readonly track: AndroidDeploymentTrack;\n readonly releaseStatus: AndroidReleaseStatus;\n}\n\nexport interface AndroidDeploymentPublisher {\n inspectAsync(\n request: AndroidPublishInspectionRequest,\n ): Promise<DeploymentProviderResult<AndroidPublishInspection>>;\n publishAsync(\n request: AndroidPublishRequest,\n ): Promise<DeploymentProviderResult<AndroidDeploymentPublication>>;\n verifyAsync(\n request: AndroidPublishRequest,\n ): Promise<DeploymentProviderResult<AndroidPublishInspection>>;\n}\n\nexport interface IosDeploymentIntent {\n readonly buildProfile: string;\n readonly version: string;\n}\n\nexport interface IosBuildInspectionRequest {\n readonly projectRoot: string;\n readonly bundleIdentifier: string;\n readonly buildProfile: string;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface IosBuildInspection {\n readonly fingerprint: string;\n}\n\nexport interface IosBuildRequest extends IosBuildInspectionRequest {\n readonly expectedFingerprint: string;\n readonly version: string;\n}\n\nexport interface IosBuildArtifact {\n readonly provider: string;\n readonly buildId: string;\n readonly buildProfile: string;\n readonly fingerprint: string;\n readonly version: string;\n readonly buildNumber: string;\n readonly archiveUrl: string;\n}\n\nexport interface IosDeploymentBuilder {\n inspectAsync(\n request: IosBuildInspectionRequest,\n ): Promise<DeploymentProviderResult<IosBuildInspection>>;\n buildAsync(request: IosBuildRequest): Promise<DeploymentProviderResult<IosBuildArtifact>>;\n}\n\nexport interface IosPublishInspectionRequest {\n readonly bundleIdentifier: string;\n readonly version: string;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface IosPublishInspection {\n readonly bundleIdentifier: string;\n readonly version: string | null;\n readonly buildNumber: string | null;\n}\n\nexport interface IosPublishRequest extends IosPublishInspectionRequest {\n readonly revision: string;\n readonly artifact: IosBuildArtifact;\n}\n\nexport interface IosDeploymentPublication {\n readonly target: 'ios';\n readonly revision: string;\n readonly buildProvider: string;\n readonly publishProvider: string;\n readonly buildId: string;\n readonly version: string;\n readonly buildNumber: string;\n}\n\nexport interface IosDeploymentPublisher {\n inspectAsync(\n request: IosPublishInspectionRequest,\n ): Promise<DeploymentProviderResult<IosPublishInspection>>;\n publishAsync(\n request: IosPublishRequest,\n ): Promise<DeploymentProviderResult<IosDeploymentPublication>>;\n verifyAsync(request: IosPublishRequest): Promise<DeploymentProviderResult<IosPublishInspection>>;\n}\n\nexport interface DeploymentProviderRegistration {\n readonly descriptor: DeploymentProviderDescriptor;\n readonly setup?: DeploymentProviderSetupAdapter;\n readonly webPublisher?: WebDeploymentPublisher;\n readonly androidBuilder?: AndroidDeploymentBuilder;\n readonly androidPublisher?: AndroidDeploymentPublisher;\n readonly iosBuilder?: IosDeploymentBuilder;\n readonly iosPublisher?: IosDeploymentPublisher;\n readonly storeListing?: DeploymentStoreListingAdapter;\n readonly monetization?: DeploymentMonetizationAdapter;\n readonly release?: DeploymentReleaseAdapter;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DeploymentCredentialReference, DeploymentProviderResult, DeploymentSecretResolver, DeploymentStoreIdentity } from './deployProvider';
|
|
1
|
+
import type { DeploymentCredentialReference, DeploymentProviderResult, DeploymentSecretResolver, DeploymentStoreIdentity } from './deployProvider.js';
|
|
2
2
|
export type ReleaseTarget = 'web' | 'android' | 'ios';
|
|
3
3
|
export type ReleaseRolloutMode = 'immediate' | 'staged';
|
|
4
4
|
export interface ReleaseNote {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployRelease.d.ts","sourceRoot":"","sources":["../../src/types/deployRelease.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,
|
|
1
|
+
{"version":3,"file":"deployRelease.d.ts","sourceRoot":"","sources":["../../src/types/deployRelease.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,SAAS,GAAG,KAAK,CAAC;AACtD,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,QAAQ,CAAC;AAExD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,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CAAC,CAAC;CACtF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployRelease.js","sourceRoot":"","sources":["../../src/types/deployRelease.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n DeploymentCredentialReference,\n DeploymentProviderResult,\n DeploymentSecretResolver,\n DeploymentStoreIdentity,\n} from './deployProvider';\n\nexport type ReleaseTarget = 'web' | 'android' | 'ios';\nexport type ReleaseRolloutMode = 'immediate' | 'staged';\n\nexport interface ReleaseNote {\n readonly locale: string;\n readonly text: string;\n}\n\nexport interface ReleaseTargetRollout {\n readonly mode: ReleaseRolloutMode;\n readonly initialFraction?: string;\n}\n\nexport interface ReleaseRollout {\n readonly web?: ReleaseTargetRollout;\n readonly android?: ReleaseTargetRollout;\n readonly ios?: ReleaseTargetRollout;\n}\n\nexport interface ReleaseDesiredState {\n readonly version: string;\n readonly targets: readonly ReleaseTarget[];\n readonly notes: readonly ReleaseNote[];\n readonly rollout: ReleaseRollout;\n readonly revision: string;\n}\n\nexport interface ReleaseObservedWebState {\n readonly target: 'web';\n readonly version: string | null;\n readonly artifactRevision: string | null;\n}\n\nexport interface ReleaseObservedAndroidState {\n readonly target: 'android';\n readonly version: string | null;\n readonly artifactRevision: string | null;\n readonly versionCodes: readonly string[];\n readonly releaseNotes: readonly ReleaseNote[];\n readonly rolloutStatus: 'missing' | 'draft' | 'inProgress' | 'halted' | 'completed';\n readonly userFraction?: string;\n}\n\nexport interface ReleaseObservedIosState {\n readonly target: 'ios';\n readonly version: string | null;\n readonly artifactRevision: string | null;\n readonly buildNumber: string | null;\n readonly releaseNotes: readonly ReleaseNote[];\n readonly appVersionState?: string;\n readonly releaseType?: string;\n readonly reviewState?: string;\n readonly phasedReleaseState: 'INACTIVE' | 'ACTIVE' | 'PAUSED' | 'COMPLETE' | null;\n}\n\nexport type ReleaseObservedTargetState =\n ReleaseObservedWebState | ReleaseObservedAndroidState | ReleaseObservedIosState;\n\nexport interface ReleaseObservedState {\n readonly targets: readonly ReleaseObservedTargetState[];\n}\n\nexport type ReleasePlanStatus = 'no-change' | 'changes' | 'waiting' | 'blocked';\nexport type ReleaseStepRetry = 'safe' | 'reinspect' | 'never';\nexport type ReleaseStepOperation =\n | 'prepare'\n | 'build'\n | 'publish'\n | 'sync-notes'\n | 'submit-review'\n | 'release'\n | 'rollout'\n | 'verify'\n | 'record';\n\nexport interface ReleaseDiagnostic {\n readonly severity: 'warning' | 'error';\n readonly code: string;\n readonly message: string;\n readonly target?: ReleaseTarget | 'release';\n}\n\nexport interface ReleasePlanStep {\n readonly id: string;\n readonly target: ReleaseTarget | 'release';\n readonly operation: ReleaseStepOperation;\n readonly dependsOn: readonly string[];\n readonly retry: ReleaseStepRetry;\n readonly irreversible: boolean;\n}\n\nexport interface ReleasePlan {\n readonly status: ReleasePlanStatus;\n readonly desiredRevision: string;\n readonly currentRevision: string;\n readonly steps: readonly ReleasePlanStep[];\n readonly diagnostics: readonly ReleaseDiagnostic[];\n}\n\nexport type ReleaseLifecycleControl =\n | { readonly target: 'android'; readonly action: 'halt' | 'resume' }\n | {\n readonly target: 'ios';\n readonly action: 'pause-phased' | 'resume-phased' | 'cancel-phased' | 'cancel-review';\n };\n\nexport type ReleaseMutationResult =\n | { readonly status: 'completed' }\n | { readonly status: 'blocked'; readonly code: string }\n | { readonly status: 'failed'; readonly code: string };\n\nexport type ReleaseControlExecutionResult =\n | { readonly status: 'completed'; readonly mutationAttempted: boolean }\n | { readonly status: 'blocked'; readonly mutationAttempted: false; readonly code: string }\n | { readonly status: 'failed'; readonly mutationAttempted: boolean; readonly code: string };\n\nexport interface ReleaseAdapterContext {\n readonly identity: DeploymentStoreIdentity;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface ReleaseInspectionRequest extends ReleaseAdapterContext {\n readonly version: string;\n}\n\nexport interface ReleaseStepExecutionRequest extends ReleaseAdapterContext {\n readonly desired: ReleaseDesiredState;\n readonly step: ReleasePlanStep;\n}\n\nexport interface ReleaseControlRequest extends ReleaseAdapterContext {\n readonly desired: ReleaseDesiredState;\n readonly control: ReleaseLifecycleControl;\n}\n\nexport type ReleaseObservedNativeState = ReleaseObservedAndroidState | ReleaseObservedIosState;\n\nexport interface DeploymentReleaseAdapter {\n readonly target: 'android' | 'ios';\n inspectAsync(\n request: ReleaseInspectionRequest,\n ): Promise<DeploymentProviderResult<ReleaseObservedNativeState>>;\n executeStepAsync(request: ReleaseStepExecutionRequest): Promise<ReleaseMutationResult>;\n controlAsync(request: ReleaseControlRequest): Promise<ReleaseControlExecutionResult>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"deployRelease.js","sourceRoot":"","sources":["../../src/types/deployRelease.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n DeploymentCredentialReference,\n DeploymentProviderResult,\n DeploymentSecretResolver,\n DeploymentStoreIdentity,\n} from './deployProvider.js';\n\nexport type ReleaseTarget = 'web' | 'android' | 'ios';\nexport type ReleaseRolloutMode = 'immediate' | 'staged';\n\nexport interface ReleaseNote {\n readonly locale: string;\n readonly text: string;\n}\n\nexport interface ReleaseTargetRollout {\n readonly mode: ReleaseRolloutMode;\n readonly initialFraction?: string;\n}\n\nexport interface ReleaseRollout {\n readonly web?: ReleaseTargetRollout;\n readonly android?: ReleaseTargetRollout;\n readonly ios?: ReleaseTargetRollout;\n}\n\nexport interface ReleaseDesiredState {\n readonly version: string;\n readonly targets: readonly ReleaseTarget[];\n readonly notes: readonly ReleaseNote[];\n readonly rollout: ReleaseRollout;\n readonly revision: string;\n}\n\nexport interface ReleaseObservedWebState {\n readonly target: 'web';\n readonly version: string | null;\n readonly artifactRevision: string | null;\n}\n\nexport interface ReleaseObservedAndroidState {\n readonly target: 'android';\n readonly version: string | null;\n readonly artifactRevision: string | null;\n readonly versionCodes: readonly string[];\n readonly releaseNotes: readonly ReleaseNote[];\n readonly rolloutStatus: 'missing' | 'draft' | 'inProgress' | 'halted' | 'completed';\n readonly userFraction?: string;\n}\n\nexport interface ReleaseObservedIosState {\n readonly target: 'ios';\n readonly version: string | null;\n readonly artifactRevision: string | null;\n readonly buildNumber: string | null;\n readonly releaseNotes: readonly ReleaseNote[];\n readonly appVersionState?: string;\n readonly releaseType?: string;\n readonly reviewState?: string;\n readonly phasedReleaseState: 'INACTIVE' | 'ACTIVE' | 'PAUSED' | 'COMPLETE' | null;\n}\n\nexport type ReleaseObservedTargetState =\n ReleaseObservedWebState | ReleaseObservedAndroidState | ReleaseObservedIosState;\n\nexport interface ReleaseObservedState {\n readonly targets: readonly ReleaseObservedTargetState[];\n}\n\nexport type ReleasePlanStatus = 'no-change' | 'changes' | 'waiting' | 'blocked';\nexport type ReleaseStepRetry = 'safe' | 'reinspect' | 'never';\nexport type ReleaseStepOperation =\n | 'prepare'\n | 'build'\n | 'publish'\n | 'sync-notes'\n | 'submit-review'\n | 'release'\n | 'rollout'\n | 'verify'\n | 'record';\n\nexport interface ReleaseDiagnostic {\n readonly severity: 'warning' | 'error';\n readonly code: string;\n readonly message: string;\n readonly target?: ReleaseTarget | 'release';\n}\n\nexport interface ReleasePlanStep {\n readonly id: string;\n readonly target: ReleaseTarget | 'release';\n readonly operation: ReleaseStepOperation;\n readonly dependsOn: readonly string[];\n readonly retry: ReleaseStepRetry;\n readonly irreversible: boolean;\n}\n\nexport interface ReleasePlan {\n readonly status: ReleasePlanStatus;\n readonly desiredRevision: string;\n readonly currentRevision: string;\n readonly steps: readonly ReleasePlanStep[];\n readonly diagnostics: readonly ReleaseDiagnostic[];\n}\n\nexport type ReleaseLifecycleControl =\n | { readonly target: 'android'; readonly action: 'halt' | 'resume' }\n | {\n readonly target: 'ios';\n readonly action: 'pause-phased' | 'resume-phased' | 'cancel-phased' | 'cancel-review';\n };\n\nexport type ReleaseMutationResult =\n | { readonly status: 'completed' }\n | { readonly status: 'blocked'; readonly code: string }\n | { readonly status: 'failed'; readonly code: string };\n\nexport type ReleaseControlExecutionResult =\n | { readonly status: 'completed'; readonly mutationAttempted: boolean }\n | { readonly status: 'blocked'; readonly mutationAttempted: false; readonly code: string }\n | { readonly status: 'failed'; readonly mutationAttempted: boolean; readonly code: string };\n\nexport interface ReleaseAdapterContext {\n readonly identity: DeploymentStoreIdentity;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface ReleaseInspectionRequest extends ReleaseAdapterContext {\n readonly version: string;\n}\n\nexport interface ReleaseStepExecutionRequest extends ReleaseAdapterContext {\n readonly desired: ReleaseDesiredState;\n readonly step: ReleasePlanStep;\n}\n\nexport interface ReleaseControlRequest extends ReleaseAdapterContext {\n readonly desired: ReleaseDesiredState;\n readonly control: ReleaseLifecycleControl;\n}\n\nexport type ReleaseObservedNativeState = ReleaseObservedAndroidState | ReleaseObservedIosState;\n\nexport interface DeploymentReleaseAdapter {\n readonly target: 'android' | 'ios';\n inspectAsync(\n request: ReleaseInspectionRequest,\n ): Promise<DeploymentProviderResult<ReleaseObservedNativeState>>;\n executeStepAsync(request: ReleaseStepExecutionRequest): Promise<ReleaseMutationResult>;\n controlAsync(request: ReleaseControlRequest): Promise<ReleaseControlExecutionResult>;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DeploymentCredentialReference, DeploymentProviderResult, DeploymentSecretResolver, DeploymentStoreIdentity } from './deployProvider';
|
|
1
|
+
import type { DeploymentCredentialReference, DeploymentProviderResult, DeploymentSecretResolver, DeploymentStoreIdentity } from './deployProvider.js';
|
|
2
2
|
export type StoreListingTarget = 'android' | 'ios';
|
|
3
3
|
export type StoreListingField = 'name' | 'summary' | 'description' | 'keywords' | 'promotionalText' | 'supportUrl' | 'marketingUrl' | 'privacyPolicyUrl' | 'promoVideoUrl';
|
|
4
4
|
export interface StoreListingLocale {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployStoreListing.d.ts","sourceRoot":"","sources":["../../src/types/deployStoreListing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAC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3C,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC;CAC1C;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,YAAY,CACV,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,wBAAwB,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAC9D,SAAS,CACP,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,wBAAwB,CAAC,uBAAuB,CAAC,CAAC,CAAC;CAC/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployStoreListing.js","sourceRoot":"","sources":["../../src/types/deployStoreListing.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n DeploymentCredentialReference,\n DeploymentProviderResult,\n DeploymentSecretResolver,\n DeploymentStoreIdentity,\n} from './deployProvider';\n\nexport type StoreListingTarget = 'android' | 'ios';\n\nexport type StoreListingField =\n | 'name'\n | 'summary'\n | 'description'\n | 'keywords'\n | 'promotionalText'\n | 'supportUrl'\n | 'marketingUrl'\n | 'privacyPolicyUrl'\n | 'promoVideoUrl';\n\nexport interface StoreListingLocale {\n readonly locale: string;\n readonly name: string;\n readonly summary?: string;\n readonly description?: string;\n readonly keywords?: readonly string[];\n readonly promotionalText?: string;\n readonly supportUrl?: string;\n readonly marketingUrl?: string;\n readonly privacyPolicyUrl?: string;\n readonly promoVideoUrl?: string;\n}\n\nexport type StoreListingAssetMediaType = 'image/jpeg' | 'image/png';\n\nexport interface StoreListingAsset {\n readonly relativePath: string;\n readonly sha256: string;\n readonly md5: string;\n readonly size: number;\n readonly mediaType: StoreListingAssetMediaType;\n}\n\nexport interface StoreListingAssetSet {\n readonly target: StoreListingTarget;\n readonly locale: string;\n readonly variant: string;\n readonly assets: readonly StoreListingAsset[];\n}\n\nexport interface StoreListingRemoteAssetSet {\n readonly target: StoreListingTarget;\n readonly locale: string;\n readonly variant: string;\n readonly checksum: 'md5' | 'sha256';\n readonly hashes: readonly string[];\n}\n\nexport interface StoreListingDesiredState {\n readonly revision: string;\n readonly locales: readonly StoreListingLocale[];\n readonly assetSets: readonly StoreListingAssetSet[];\n}\n\nexport interface StoreListingDiagnostic {\n readonly severity: 'warning' | 'error';\n readonly code: string;\n readonly message: string;\n readonly target?: StoreListingTarget;\n readonly locale?: string;\n readonly field?: StoreListingField;\n readonly variant?: string;\n}\n\nexport interface StoreListingTargetState {\n readonly target: StoreListingTarget;\n readonly locales: readonly StoreListingLocale[];\n readonly assetSets: readonly StoreListingRemoteAssetSet[];\n readonly supportedFields: readonly StoreListingField[];\n readonly diagnostics: readonly StoreListingDiagnostic[];\n}\n\nexport type StoreListingPlanOperation = 'create-locale' | 'update-locale' | 'replace-assets';\n\nexport interface StoreListingPlanStep {\n readonly id: string;\n readonly target: StoreListingTarget;\n readonly operation: StoreListingPlanOperation;\n readonly locale: string;\n readonly variant?: string;\n}\n\nexport interface StoreListingPlan {\n readonly status: 'no-change' | 'changes' | 'blocked';\n readonly desiredRevision: string;\n readonly currentRevision: string;\n readonly steps: readonly StoreListingPlanStep[];\n readonly diagnostics: readonly StoreListingDiagnostic[];\n}\n\nexport interface StoreListingAssetReader {\n readAsync(relativePath: string): Promise<Uint8Array>;\n}\n\nexport interface StoreListingAdapterContext {\n readonly identity: DeploymentStoreIdentity;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface StoreListingSyncRequest extends StoreListingAdapterContext {\n readonly desired: StoreListingDesiredState;\n readonly plan: StoreListingPlan;\n readonly assets: StoreListingAssetReader;\n}\n\nexport interface DeploymentStoreListingAdapter {\n readonly target: StoreListingTarget;\n inspectAsync(\n context: StoreListingAdapterContext,\n ): Promise<DeploymentProviderResult<StoreListingTargetState>>;\n syncAsync(\n request: StoreListingSyncRequest,\n ): Promise<DeploymentProviderResult<StoreListingTargetState>>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"deployStoreListing.js","sourceRoot":"","sources":["../../src/types/deployStoreListing.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n DeploymentCredentialReference,\n DeploymentProviderResult,\n DeploymentSecretResolver,\n DeploymentStoreIdentity,\n} from './deployProvider.js';\n\nexport type StoreListingTarget = 'android' | 'ios';\n\nexport type StoreListingField =\n | 'name'\n | 'summary'\n | 'description'\n | 'keywords'\n | 'promotionalText'\n | 'supportUrl'\n | 'marketingUrl'\n | 'privacyPolicyUrl'\n | 'promoVideoUrl';\n\nexport interface StoreListingLocale {\n readonly locale: string;\n readonly name: string;\n readonly summary?: string;\n readonly description?: string;\n readonly keywords?: readonly string[];\n readonly promotionalText?: string;\n readonly supportUrl?: string;\n readonly marketingUrl?: string;\n readonly privacyPolicyUrl?: string;\n readonly promoVideoUrl?: string;\n}\n\nexport type StoreListingAssetMediaType = 'image/jpeg' | 'image/png';\n\nexport interface StoreListingAsset {\n readonly relativePath: string;\n readonly sha256: string;\n readonly md5: string;\n readonly size: number;\n readonly mediaType: StoreListingAssetMediaType;\n}\n\nexport interface StoreListingAssetSet {\n readonly target: StoreListingTarget;\n readonly locale: string;\n readonly variant: string;\n readonly assets: readonly StoreListingAsset[];\n}\n\nexport interface StoreListingRemoteAssetSet {\n readonly target: StoreListingTarget;\n readonly locale: string;\n readonly variant: string;\n readonly checksum: 'md5' | 'sha256';\n readonly hashes: readonly string[];\n}\n\nexport interface StoreListingDesiredState {\n readonly revision: string;\n readonly locales: readonly StoreListingLocale[];\n readonly assetSets: readonly StoreListingAssetSet[];\n}\n\nexport interface StoreListingDiagnostic {\n readonly severity: 'warning' | 'error';\n readonly code: string;\n readonly message: string;\n readonly target?: StoreListingTarget;\n readonly locale?: string;\n readonly field?: StoreListingField;\n readonly variant?: string;\n}\n\nexport interface StoreListingTargetState {\n readonly target: StoreListingTarget;\n readonly locales: readonly StoreListingLocale[];\n readonly assetSets: readonly StoreListingRemoteAssetSet[];\n readonly supportedFields: readonly StoreListingField[];\n readonly diagnostics: readonly StoreListingDiagnostic[];\n}\n\nexport type StoreListingPlanOperation = 'create-locale' | 'update-locale' | 'replace-assets';\n\nexport interface StoreListingPlanStep {\n readonly id: string;\n readonly target: StoreListingTarget;\n readonly operation: StoreListingPlanOperation;\n readonly locale: string;\n readonly variant?: string;\n}\n\nexport interface StoreListingPlan {\n readonly status: 'no-change' | 'changes' | 'blocked';\n readonly desiredRevision: string;\n readonly currentRevision: string;\n readonly steps: readonly StoreListingPlanStep[];\n readonly diagnostics: readonly StoreListingDiagnostic[];\n}\n\nexport interface StoreListingAssetReader {\n readAsync(relativePath: string): Promise<Uint8Array>;\n}\n\nexport interface StoreListingAdapterContext {\n readonly identity: DeploymentStoreIdentity;\n readonly credentials: readonly DeploymentCredentialReference[];\n readonly resolveSecret: DeploymentSecretResolver;\n}\n\nexport interface StoreListingSyncRequest extends StoreListingAdapterContext {\n readonly desired: StoreListingDesiredState;\n readonly plan: StoreListingPlan;\n readonly assets: StoreListingAssetReader;\n}\n\nexport interface DeploymentStoreListingAdapter {\n readonly target: StoreListingTarget;\n inspectAsync(\n context: StoreListingAdapterContext,\n ): Promise<DeploymentProviderResult<StoreListingTargetState>>;\n syncAsync(\n request: StoreListingSyncRequest,\n ): Promise<DeploymentProviderResult<StoreListingTargetState>>;\n}\n"]}
|
|
@@ -129,11 +129,19 @@ export type InfraSecretStoreSpec = {
|
|
|
129
129
|
readonly provider: P;
|
|
130
130
|
} & InfraSecretStoreConfigMap[P];
|
|
131
131
|
}[InfraProviderFor<'secretStore'>];
|
|
132
|
+
export interface InfraNetworkingTlsSpec {
|
|
133
|
+
/** First production slice: runtime-managed ACME using the HTTP-01 challenge. */
|
|
134
|
+
readonly mode: 'acme-http-01';
|
|
135
|
+
/** ACME registration and expiry-notification contact. */
|
|
136
|
+
readonly contactEmail: string;
|
|
137
|
+
}
|
|
132
138
|
export interface InfraNetworkingSpec {
|
|
133
139
|
/** Public DNS name intent, not automatic DNS/CDN vendor provisioning. */
|
|
134
140
|
readonly domain?: string;
|
|
135
141
|
/** Absolute HTTP(S) origin used by workloads that must know their external URL at startup. */
|
|
136
142
|
readonly publicBaseUrl?: string;
|
|
143
|
+
/** Runtime-neutral automatic TLS intent; the selected runtime owns concrete ingress configuration. */
|
|
144
|
+
readonly tls?: InfraNetworkingTlsSpec;
|
|
137
145
|
}
|
|
138
146
|
export interface InfraEnvironmentSpec {
|
|
139
147
|
readonly deployment: InfraDeploymentSpec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infraManifest.d.ts","sourceRoot":"","sources":["../../src/types/infraManifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC3F,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,qBAAqB,CAAC;AAChE,MAAM,MAAM,eAAe,GACzB,CAAC,OAAO,qBAAqB,CAAC,CAAC,cAAc,CAAC,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AACzE,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,eAAe,IAAI;KACvD,CAAC,IAAI,cAAc,GAAG,CAAC,SAAS,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,GACtF,CAAC,GAC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AAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,aAAa,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infraManifest.js","sourceRoot":"","sources":["../../src/types/infraManifest.ts"],"names":[],"mappings":"","sourcesContent":["import type { AuthFlowConfig, AuthOAuthConfig } from '../auth';\nimport type { ApiDefinitionList } from '../data';\nimport type { AppEnvironmentId } from '../environments';\nimport type { INFRA_ADAPTER_CATALOG, INFRA_RUNTIME_COMPATIBILITY } from '../infra/constants';\nimport type { AuthProfileSpec, AuthScope, AuthSignInSpec, AuthSignUpSpec } from '../types';\nimport type { InfraControlPlaneCredentialRef } from './infraSecrets';\nimport type { InfraWorkloadSpec } from './infraWorkload';\n\nexport type InfraAdapterId = keyof typeof INFRA_ADAPTER_CATALOG;\nexport type InfraCapability =\n (typeof INFRA_ADAPTER_CATALOG)[InfraAdapterId]['capabilities'][number];\nexport type InfraProviderFor<C extends InfraCapability> = {\n [P in InfraAdapterId]: C extends (typeof INFRA_ADAPTER_CATALOG)[P]['capabilities'][number]\n ? P\n : never;\n}[InfraAdapterId];\nexport type InfraComputeProviderId = InfraProviderFor<'compute'>;\nexport type InfraRuntimeProviderId = keyof typeof INFRA_RUNTIME_COMPATIBILITY;\n\n/** Non-secret provider configuration; credentials are resolved only at the execution boundary. */\nexport interface InfraComputeConfigMap {\n readonly local: { readonly workingDirectory?: string };\n readonly hetzner: {\n readonly location: string;\n readonly serverType?: string;\n readonly image?: string;\n readonly credentials?: InfraControlPlaneCredentialRef;\n readonly ssh?: {\n readonly user?: string;\n readonly port?: number;\n readonly credentials?: InfraControlPlaneCredentialRef;\n };\n };\n}\n\nexport interface InfraRuntimeConfigMap {\n readonly minikube: {\n readonly profile?: string;\n readonly driver?: 'docker' | 'podman';\n readonly cpus?: number;\n readonly memoryMiB?: number;\n };\n readonly k3s: {\n readonly version?: string;\n readonly topology?: { readonly servers: number; readonly agents: number };\n };\n readonly 'docker-compose': { readonly projectName?: string };\n}\n\nexport type InfraComputeSelection<P extends InfraComputeProviderId = InfraComputeProviderId> = {\n [K in P]: { readonly provider: K } & InfraComputeConfigMap[K];\n}[P];\nexport type InfraRuntimeSelection<P extends InfraRuntimeProviderId = InfraRuntimeProviderId> = {\n [K in P]: { readonly provider: K } & InfraRuntimeConfigMap[K];\n}[P];\n\n/** A discriminated union derived from the runtime catalog, never a Cartesian product. */\nexport type InfraDeploymentSpec = {\n [R in InfraRuntimeProviderId]: {\n readonly compute: InfraComputeSelection<(typeof INFRA_RUNTIME_COMPATIBILITY)[R][number]>;\n readonly runtime: InfraRuntimeSelection<R>;\n };\n}[InfraRuntimeProviderId];\n\nexport interface InfraDatabaseConfigMap {\n readonly supabase: { readonly tier?: 'dev' | 'prod' };\n}\nexport interface InfraObjectStorageConfigMap {\n readonly supabase: { readonly buckets?: readonly string[] };\n readonly r2: {\n readonly buckets?: readonly string[];\n readonly accountId?: string;\n readonly credentials?: InfraControlPlaneCredentialRef;\n };\n}\nexport interface InfraAuthConfigMap {\n readonly supabase: {\n readonly scope?: AuthScope;\n readonly flow?: AuthFlowConfig;\n readonly signIn?: AuthSignInSpec;\n readonly signUp?: AuthSignUpSpec;\n readonly oauth?: AuthOAuthConfig;\n readonly profile?: AuthProfileSpec;\n };\n}\nexport interface InfraAuthzConfigMap {\n readonly cerbos: {\n readonly kind: 'RBAC' | 'ABAC';\n readonly policies?: readonly InfraAuthzPolicyFile[];\n };\n}\nexport interface InfraAuthzPolicyFile {\n readonly path: string;\n readonly content: string;\n}\nexport interface InfraSecretStoreConfigMap {\n readonly 'supabase-vault': { readonly schema?: string };\n}\n\nexport type InfraDatabaseSpec = {\n [P in InfraProviderFor<'database'>]: { readonly provider: P } & InfraDatabaseConfigMap[P];\n}[InfraProviderFor<'database'>];\nexport type InfraObjectStorageSpec = {\n [P in InfraProviderFor<'objectStorage'>]: {\n readonly provider: P;\n } & InfraObjectStorageConfigMap[P];\n}[InfraProviderFor<'objectStorage'>];\nexport type InfraAuthSpec = {\n [P in InfraProviderFor<'auth'>]: { readonly provider: P } & InfraAuthConfigMap[P];\n}[InfraProviderFor<'auth'>];\nexport type InfraAuthzSpec = {\n [P in InfraProviderFor<'authz'>]: { readonly provider: P } & InfraAuthzConfigMap[P];\n}[InfraProviderFor<'authz'>];\nexport type InfraSecretStoreSpec = {\n [P in InfraProviderFor<'secretStore'>]: { readonly provider: P } & InfraSecretStoreConfigMap[P];\n}[InfraProviderFor<'secretStore'>];\n\nexport interface InfraNetworkingSpec {\n /** Public DNS name intent, not automatic DNS/CDN vendor provisioning. */\n readonly domain?: string;\n /** Absolute HTTP(S) origin used by workloads that must know their external URL at startup. */\n readonly publicBaseUrl?: string;\n}\n\nexport interface InfraEnvironmentSpec {\n readonly deployment: InfraDeploymentSpec;\n readonly database?: InfraDatabaseSpec;\n readonly objectStorage?: InfraObjectStorageSpec;\n readonly auth?: InfraAuthSpec;\n readonly authz?: InfraAuthzSpec;\n readonly secretStore?: InfraSecretStoreSpec;\n readonly networking?: InfraNetworkingSpec;\n readonly workloads?: readonly InfraWorkloadSpec[];\n}\n\nexport interface InfraManifest {\n readonly environments: Readonly<\n Record<'local', InfraEnvironmentSpec> &\n Partial<Record<Exclude<AppEnvironmentId, 'local'>, InfraEnvironmentSpec>>\n >;\n readonly apis?: ApiDefinitionList;\n readonly modules: readonly string[];\n readonly modulesConfig?: Readonly<Record<string, unknown>>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"infraManifest.js","sourceRoot":"","sources":["../../src/types/infraManifest.ts"],"names":[],"mappings":"","sourcesContent":["import type { AuthFlowConfig, AuthOAuthConfig } from '../auth';\nimport type { ApiDefinitionList } from '../data';\nimport type { AppEnvironmentId } from '../environments';\nimport type { INFRA_ADAPTER_CATALOG, INFRA_RUNTIME_COMPATIBILITY } from '../infra/constants';\nimport type { AuthProfileSpec, AuthScope, AuthSignInSpec, AuthSignUpSpec } from '../types';\nimport type { InfraControlPlaneCredentialRef } from './infraSecrets';\nimport type { InfraWorkloadSpec } from './infraWorkload';\n\nexport type InfraAdapterId = keyof typeof INFRA_ADAPTER_CATALOG;\nexport type InfraCapability =\n (typeof INFRA_ADAPTER_CATALOG)[InfraAdapterId]['capabilities'][number];\nexport type InfraProviderFor<C extends InfraCapability> = {\n [P in InfraAdapterId]: C extends (typeof INFRA_ADAPTER_CATALOG)[P]['capabilities'][number]\n ? P\n : never;\n}[InfraAdapterId];\nexport type InfraComputeProviderId = InfraProviderFor<'compute'>;\nexport type InfraRuntimeProviderId = keyof typeof INFRA_RUNTIME_COMPATIBILITY;\n\n/** Non-secret provider configuration; credentials are resolved only at the execution boundary. */\nexport interface InfraComputeConfigMap {\n readonly local: { readonly workingDirectory?: string };\n readonly hetzner: {\n readonly location: string;\n readonly serverType?: string;\n readonly image?: string;\n readonly credentials?: InfraControlPlaneCredentialRef;\n readonly ssh?: {\n readonly user?: string;\n readonly port?: number;\n readonly credentials?: InfraControlPlaneCredentialRef;\n };\n };\n}\n\nexport interface InfraRuntimeConfigMap {\n readonly minikube: {\n readonly profile?: string;\n readonly driver?: 'docker' | 'podman';\n readonly cpus?: number;\n readonly memoryMiB?: number;\n };\n readonly k3s: {\n readonly version?: string;\n readonly topology?: { readonly servers: number; readonly agents: number };\n };\n readonly 'docker-compose': { readonly projectName?: string };\n}\n\nexport type InfraComputeSelection<P extends InfraComputeProviderId = InfraComputeProviderId> = {\n [K in P]: { readonly provider: K } & InfraComputeConfigMap[K];\n}[P];\nexport type InfraRuntimeSelection<P extends InfraRuntimeProviderId = InfraRuntimeProviderId> = {\n [K in P]: { readonly provider: K } & InfraRuntimeConfigMap[K];\n}[P];\n\n/** A discriminated union derived from the runtime catalog, never a Cartesian product. */\nexport type InfraDeploymentSpec = {\n [R in InfraRuntimeProviderId]: {\n readonly compute: InfraComputeSelection<(typeof INFRA_RUNTIME_COMPATIBILITY)[R][number]>;\n readonly runtime: InfraRuntimeSelection<R>;\n };\n}[InfraRuntimeProviderId];\n\nexport interface InfraDatabaseConfigMap {\n readonly supabase: { readonly tier?: 'dev' | 'prod' };\n}\nexport interface InfraObjectStorageConfigMap {\n readonly supabase: { readonly buckets?: readonly string[] };\n readonly r2: {\n readonly buckets?: readonly string[];\n readonly accountId?: string;\n readonly credentials?: InfraControlPlaneCredentialRef;\n };\n}\nexport interface InfraAuthConfigMap {\n readonly supabase: {\n readonly scope?: AuthScope;\n readonly flow?: AuthFlowConfig;\n readonly signIn?: AuthSignInSpec;\n readonly signUp?: AuthSignUpSpec;\n readonly oauth?: AuthOAuthConfig;\n readonly profile?: AuthProfileSpec;\n };\n}\nexport interface InfraAuthzConfigMap {\n readonly cerbos: {\n readonly kind: 'RBAC' | 'ABAC';\n readonly policies?: readonly InfraAuthzPolicyFile[];\n };\n}\nexport interface InfraAuthzPolicyFile {\n readonly path: string;\n readonly content: string;\n}\nexport interface InfraSecretStoreConfigMap {\n readonly 'supabase-vault': { readonly schema?: string };\n}\n\nexport type InfraDatabaseSpec = {\n [P in InfraProviderFor<'database'>]: { readonly provider: P } & InfraDatabaseConfigMap[P];\n}[InfraProviderFor<'database'>];\nexport type InfraObjectStorageSpec = {\n [P in InfraProviderFor<'objectStorage'>]: {\n readonly provider: P;\n } & InfraObjectStorageConfigMap[P];\n}[InfraProviderFor<'objectStorage'>];\nexport type InfraAuthSpec = {\n [P in InfraProviderFor<'auth'>]: { readonly provider: P } & InfraAuthConfigMap[P];\n}[InfraProviderFor<'auth'>];\nexport type InfraAuthzSpec = {\n [P in InfraProviderFor<'authz'>]: { readonly provider: P } & InfraAuthzConfigMap[P];\n}[InfraProviderFor<'authz'>];\nexport type InfraSecretStoreSpec = {\n [P in InfraProviderFor<'secretStore'>]: { readonly provider: P } & InfraSecretStoreConfigMap[P];\n}[InfraProviderFor<'secretStore'>];\n\nexport interface InfraNetworkingTlsSpec {\n /** First production slice: runtime-managed ACME using the HTTP-01 challenge. */\n readonly mode: 'acme-http-01';\n /** ACME registration and expiry-notification contact. */\n readonly contactEmail: string;\n}\n\nexport interface InfraNetworkingSpec {\n /** Public DNS name intent, not automatic DNS/CDN vendor provisioning. */\n readonly domain?: string;\n /** Absolute HTTP(S) origin used by workloads that must know their external URL at startup. */\n readonly publicBaseUrl?: string;\n /** Runtime-neutral automatic TLS intent; the selected runtime owns concrete ingress configuration. */\n readonly tls?: InfraNetworkingTlsSpec;\n}\n\nexport interface InfraEnvironmentSpec {\n readonly deployment: InfraDeploymentSpec;\n readonly database?: InfraDatabaseSpec;\n readonly objectStorage?: InfraObjectStorageSpec;\n readonly auth?: InfraAuthSpec;\n readonly authz?: InfraAuthzSpec;\n readonly secretStore?: InfraSecretStoreSpec;\n readonly networking?: InfraNetworkingSpec;\n readonly workloads?: readonly InfraWorkloadSpec[];\n}\n\nexport interface InfraManifest {\n readonly environments: Readonly<\n Record<'local', InfraEnvironmentSpec> &\n Partial<Record<Exclude<AppEnvironmentId, 'local'>, InfraEnvironmentSpec>>\n >;\n readonly apis?: ApiDefinitionList;\n readonly modules: readonly string[];\n readonly modulesConfig?: Readonly<Record<string, unknown>>;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/contracts",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.3.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"ankh": {
|
|
6
6
|
"category": "contracts",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"format": "ankhorage-prettier --write .",
|
|
138
138
|
"format:check": "ankhorage-prettier --check .",
|
|
139
139
|
"test": "bun test src",
|
|
140
|
-
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.infra-tests.json",
|
|
140
|
+
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.infra-tests.json && bun run build && tsc --noEmit -p tsconfig.deploy-provider-consumer.json",
|
|
141
141
|
"version-packages": "ankhorage-changeset version",
|
|
142
142
|
"knip:check": "ankhorage-knip"
|
|
143
143
|
},
|
package/src/deploy.ts
CHANGED
package/src/deployProvider.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './types/deployMonetization';
|
|
2
|
-
export * from './types/deployProvider';
|
|
3
|
-
export * from './types/deployRelease';
|
|
4
|
-
export * from './types/deployStoreListing';
|
|
1
|
+
export * from './types/deployMonetization.js';
|
|
2
|
+
export * from './types/deployProvider.js';
|
|
3
|
+
export * from './types/deployRelease.js';
|
|
4
|
+
export * from './types/deployStoreListing.js';
|
|
@@ -14,7 +14,10 @@ import { isInfraWorkloadSpec } from './isInfraWorkloadSpec';
|
|
|
14
14
|
/*** Validate sibling capabilities and their required relationships within one environment. */
|
|
15
15
|
export function isInfraEnvironmentSpec(value: unknown): value is InfraEnvironmentSpec {
|
|
16
16
|
return (
|
|
17
|
-
isEnvironmentShape(value) &&
|
|
17
|
+
isEnvironmentShape(value) &&
|
|
18
|
+
hasServiceDependencies(value) &&
|
|
19
|
+
hasNetworkingRelationships(value) &&
|
|
20
|
+
hasUniquePublishedPorts(value)
|
|
18
21
|
);
|
|
19
22
|
}
|
|
20
23
|
|
|
@@ -49,6 +52,12 @@ function isEnvironmentShape(value: unknown): value is InfraEnvironmentSpec {
|
|
|
49
52
|
domain: infraFields.optionalText,
|
|
50
53
|
publicBaseUrl: (publicBaseUrl) =>
|
|
51
54
|
publicBaseUrl === undefined || isPublicHttpOrigin(publicBaseUrl),
|
|
55
|
+
tls: (tls) =>
|
|
56
|
+
tls === undefined ||
|
|
57
|
+
isInfraShape(tls, {
|
|
58
|
+
mode: (mode) => mode === 'acme-http-01',
|
|
59
|
+
contactEmail: isNonEmptyString,
|
|
60
|
+
}),
|
|
52
61
|
}),
|
|
53
62
|
workloads: (workloads) => workloads === undefined || isWorkloads(workloads),
|
|
54
63
|
} satisfies InfraShape<InfraEnvironmentSpec>);
|
|
@@ -65,6 +74,15 @@ function isPublicHttpOrigin(value: unknown): boolean {
|
|
|
65
74
|
}
|
|
66
75
|
}
|
|
67
76
|
|
|
77
|
+
/*** Automatic TLS requires one matching HTTPS origin and public DNS hostname. */
|
|
78
|
+
function hasNetworkingRelationships(value: InfraEnvironmentSpec): boolean {
|
|
79
|
+
const { networking } = value;
|
|
80
|
+
if (networking?.tls === undefined) return true;
|
|
81
|
+
if (networking.domain === undefined || networking.publicBaseUrl === undefined) return false;
|
|
82
|
+
const url = new URL(networking.publicBaseUrl);
|
|
83
|
+
return url.protocol === 'https:' && url.hostname === networking.domain;
|
|
84
|
+
}
|
|
85
|
+
|
|
68
86
|
/*** Validate portable, unique Cerbos policy files without host paths or traversal. */
|
|
69
87
|
function isPolicyFiles(value: unknown): boolean {
|
|
70
88
|
return (
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import { type InfraEnvironmentSpec, isInfraEnvironmentSpec } from './infra';
|
|
4
|
+
|
|
5
|
+
const local = {
|
|
6
|
+
deployment: { compute: { provider: 'local' }, runtime: { provider: 'minikube' } },
|
|
7
|
+
} as const satisfies InfraEnvironmentSpec;
|
|
8
|
+
|
|
9
|
+
describe('Infra networking configuration', () => {
|
|
10
|
+
it('accepts matching HTTPS ACME intent', () => {
|
|
11
|
+
expect(
|
|
12
|
+
isInfraEnvironmentSpec({
|
|
13
|
+
...local,
|
|
14
|
+
networking: {
|
|
15
|
+
domain: 'api.example.ch',
|
|
16
|
+
publicBaseUrl: 'https://api.example.ch',
|
|
17
|
+
tls: { mode: 'acme-http-01', contactEmail: 'infra@example.ch' },
|
|
18
|
+
},
|
|
19
|
+
}),
|
|
20
|
+
).toBe(true);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it.each([
|
|
24
|
+
{ domain: 'example.ch', cdn: true },
|
|
25
|
+
{ publicBaseUrl: 'ftp://api.example.ch' },
|
|
26
|
+
{ publicBaseUrl: 'https://api.example.ch/auth/v1' },
|
|
27
|
+
{ publicBaseUrl: 'https://api.example.ch/' },
|
|
28
|
+
{ tls: { mode: 'acme-http-01', contactEmail: 'infra@example.ch' } },
|
|
29
|
+
{
|
|
30
|
+
domain: 'api.example.ch',
|
|
31
|
+
publicBaseUrl: 'http://api.example.ch',
|
|
32
|
+
tls: { mode: 'acme-http-01', contactEmail: 'infra@example.ch' },
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
domain: 'api.example.ch',
|
|
36
|
+
publicBaseUrl: 'https://other.example.ch',
|
|
37
|
+
tls: { mode: 'acme-http-01', contactEmail: 'infra@example.ch' },
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
domain: 'api.example.ch',
|
|
41
|
+
publicBaseUrl: 'https://api.example.ch',
|
|
42
|
+
tls: { mode: 'manual', contactEmail: 'infra@example.ch' },
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
domain: 'api.example.ch',
|
|
46
|
+
publicBaseUrl: 'https://api.example.ch',
|
|
47
|
+
tls: { mode: 'acme-http-01', contactEmail: '' },
|
|
48
|
+
},
|
|
49
|
+
])('rejects malformed networking intent: %j', (networking) => {
|
|
50
|
+
expect(isInfraEnvironmentSpec({ ...local, networking })).toBe(false);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { AppDeployTargetId } from '../deploy';
|
|
2
|
-
import type { DeploymentMonetizationAdapter } from './deployMonetization';
|
|
3
|
-
import type { DeploymentReleaseAdapter } from './deployRelease';
|
|
4
|
-
import type { DeploymentStoreListingAdapter } from './deployStoreListing';
|
|
1
|
+
import type { AppDeployTargetId } from '../deploy.js';
|
|
2
|
+
import type { DeploymentMonetizationAdapter } from './deployMonetization.js';
|
|
3
|
+
import type { DeploymentReleaseAdapter } from './deployRelease.js';
|
|
4
|
+
import type { DeploymentStoreListingAdapter } from './deployStoreListing.js';
|
|
5
5
|
|
|
6
6
|
export const DEPLOYMENT_CAPABILITIES = [
|
|
7
7
|
'provision',
|
|
@@ -3,7 +3,7 @@ import type {
|
|
|
3
3
|
DeploymentProviderResult,
|
|
4
4
|
DeploymentSecretResolver,
|
|
5
5
|
DeploymentStoreIdentity,
|
|
6
|
-
} from './deployProvider';
|
|
6
|
+
} from './deployProvider.js';
|
|
7
7
|
|
|
8
8
|
export type ReleaseTarget = 'web' | 'android' | 'ios';
|
|
9
9
|
export type ReleaseRolloutMode = 'immediate' | 'staged';
|
|
@@ -115,11 +115,20 @@ export type InfraSecretStoreSpec = {
|
|
|
115
115
|
[P in InfraProviderFor<'secretStore'>]: { readonly provider: P } & InfraSecretStoreConfigMap[P];
|
|
116
116
|
}[InfraProviderFor<'secretStore'>];
|
|
117
117
|
|
|
118
|
+
export interface InfraNetworkingTlsSpec {
|
|
119
|
+
/** First production slice: runtime-managed ACME using the HTTP-01 challenge. */
|
|
120
|
+
readonly mode: 'acme-http-01';
|
|
121
|
+
/** ACME registration and expiry-notification contact. */
|
|
122
|
+
readonly contactEmail: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
118
125
|
export interface InfraNetworkingSpec {
|
|
119
126
|
/** Public DNS name intent, not automatic DNS/CDN vendor provisioning. */
|
|
120
127
|
readonly domain?: string;
|
|
121
128
|
/** Absolute HTTP(S) origin used by workloads that must know their external URL at startup. */
|
|
122
129
|
readonly publicBaseUrl?: string;
|
|
130
|
+
/** Runtime-neutral automatic TLS intent; the selected runtime owns concrete ingress configuration. */
|
|
131
|
+
readonly tls?: InfraNetworkingTlsSpec;
|
|
123
132
|
}
|
|
124
133
|
|
|
125
134
|
export interface InfraEnvironmentSpec {
|