@ankhorage/kubernetes 0.8.1 → 0.9.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/README.md +1 -1
- package/dist/features/workload-reconciliation/adapters/createKubectlKubernetesApi.d.ts +2 -2
- package/dist/features/workload-reconciliation/adapters/createKubectlKubernetesApi.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/adapters/createKubectlKubernetesApi.js +3 -3
- package/dist/features/workload-reconciliation/adapters/createKubectlKubernetesApi.js.map +1 -1
- package/dist/features/workload-reconciliation/adapters/createSubprocessKubernetesCommandRunner.d.ts +1 -1
- package/dist/features/workload-reconciliation/adapters/createSubprocessKubernetesCommandRunner.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/adapters/createSubprocessKubernetesCommandRunner.js.map +1 -1
- package/dist/features/workload-reconciliation/adapters/kubectlResource.d.ts +1 -1
- package/dist/features/workload-reconciliation/adapters/kubectlResource.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/adapters/kubectlResource.js.map +1 -1
- package/dist/features/workload-reconciliation/adapters/observeKubectlDeploymentPodFailureAsync.d.ts +2 -2
- package/dist/features/workload-reconciliation/adapters/observeKubectlDeploymentPodFailureAsync.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/adapters/observeKubectlDeploymentPodFailureAsync.js.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/createKubernetesController.d.ts +2 -2
- package/dist/features/workload-reconciliation/application/use-cases/createKubernetesController.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/createKubernetesController.js +15 -7
- package/dist/features/workload-reconciliation/application/use-cases/createKubernetesController.js.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/createKubernetesExposure.d.ts +2 -2
- package/dist/features/workload-reconciliation/application/use-cases/createKubernetesExposure.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/createKubernetesExposure.js +11 -9
- package/dist/features/workload-reconciliation/application/use-cases/createKubernetesExposure.js.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/createKubernetesPrerequisites.d.ts +2 -2
- package/dist/features/workload-reconciliation/application/use-cases/createKubernetesPrerequisites.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/createKubernetesPrerequisites.js +4 -4
- package/dist/features/workload-reconciliation/application/use-cases/createKubernetesPrerequisites.js.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/getKubernetesOutputsAsync.d.ts +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/getKubernetesOutputsAsync.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/getKubernetesOutputsAsync.js +3 -3
- package/dist/features/workload-reconciliation/application/use-cases/getKubernetesOutputsAsync.js.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/getKubernetesStatusAsync.d.ts +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/getKubernetesStatusAsync.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/getKubernetesStatusAsync.js +3 -3
- package/dist/features/workload-reconciliation/application/use-cases/getKubernetesStatusAsync.js.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/materializeKubernetesSecretsAsync.d.ts +2 -2
- package/dist/features/workload-reconciliation/application/use-cases/materializeKubernetesSecretsAsync.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/materializeKubernetesSecretsAsync.js +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/materializeKubernetesSecretsAsync.js.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/planKubernetesResourcesAsync.d.ts +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/planKubernetesResourcesAsync.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/planKubernetesResourcesAsync.js +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/planKubernetesResourcesAsync.js.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/prepareKubernetesChangesAsync.d.ts +2 -2
- package/dist/features/workload-reconciliation/application/use-cases/prepareKubernetesChangesAsync.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/prepareKubernetesChangesAsync.js +8 -8
- package/dist/features/workload-reconciliation/application/use-cases/prepareKubernetesChangesAsync.js.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/projectKubernetesResourcesAsync.d.ts +2 -2
- package/dist/features/workload-reconciliation/application/use-cases/projectKubernetesResourcesAsync.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/projectKubernetesResourcesAsync.js +5 -5
- package/dist/features/workload-reconciliation/application/use-cases/projectKubernetesResourcesAsync.js.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/projectKubernetesWorkload.d.ts +2 -2
- package/dist/features/workload-reconciliation/application/use-cases/projectKubernetesWorkload.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/projectKubernetesWorkload.js +8 -6
- package/dist/features/workload-reconciliation/application/use-cases/projectKubernetesWorkload.js.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/reconcileKubernetesResourcesAsync.d.ts +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/reconcileKubernetesResourcesAsync.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/reconcileKubernetesResourcesAsync.js +5 -5
- package/dist/features/workload-reconciliation/application/use-cases/reconcileKubernetesResourcesAsync.js.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/removeKubernetesResourcesAsync.d.ts +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/removeKubernetesResourcesAsync.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/removeKubernetesResourcesAsync.js +4 -4
- package/dist/features/workload-reconciliation/application/use-cases/removeKubernetesResourcesAsync.js.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/resolveKubernetesWorkloadValues.d.ts +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/resolveKubernetesWorkloadValues.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/resolveKubernetesWorkloadValues.js +5 -3
- package/dist/features/workload-reconciliation/application/use-cases/resolveKubernetesWorkloadValues.js.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/validateKubernetesWorkloads.js +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/validateKubernetesWorkloads.js.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/waitForKubernetesReadinessAsync.d.ts +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/waitForKubernetesReadinessAsync.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/application/use-cases/waitForKubernetesReadinessAsync.js +3 -3
- package/dist/features/workload-reconciliation/application/use-cases/waitForKubernetesReadinessAsync.js.map +1 -1
- package/dist/features/workload-reconciliation/composition/createKubernetesDriver.d.ts +1 -1
- package/dist/features/workload-reconciliation/composition/createKubernetesDriver.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/composition/createKubernetesDriver.js +7 -7
- package/dist/features/workload-reconciliation/composition/createKubernetesDriver.js.map +1 -1
- package/dist/features/workload-reconciliation/utils/areKubernetesResourcesEquivalent.d.ts +1 -1
- package/dist/features/workload-reconciliation/utils/areKubernetesResourcesEquivalent.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/utils/areKubernetesResourcesEquivalent.js.map +1 -1
- package/dist/features/workload-reconciliation/utils/createKubernetesDesiredResource.d.ts +2 -2
- package/dist/features/workload-reconciliation/utils/createKubernetesDesiredResource.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/utils/createKubernetesDesiredResource.js +4 -4
- package/dist/features/workload-reconciliation/utils/createKubernetesDesiredResource.js.map +1 -1
- package/dist/features/workload-reconciliation/utils/createKubernetesIdentity.d.ts +1 -1
- package/dist/features/workload-reconciliation/utils/createKubernetesIdentity.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/utils/createKubernetesIdentity.js.map +1 -1
- package/dist/features/workload-reconciliation/utils/getKubernetesOwnershipQuery.d.ts +2 -2
- package/dist/features/workload-reconciliation/utils/getKubernetesOwnershipQuery.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/utils/getKubernetesOwnershipQuery.js +2 -2
- package/dist/features/workload-reconciliation/utils/getKubernetesOwnershipQuery.js.map +1 -1
- package/dist/features/workload-reconciliation/utils/getKubernetesResourceKey.d.ts +1 -1
- package/dist/features/workload-reconciliation/utils/getKubernetesResourceKey.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/utils/getKubernetesResourceKey.js.map +1 -1
- package/dist/features/workload-reconciliation/utils/getKubernetesResourceReference.d.ts +1 -1
- package/dist/features/workload-reconciliation/utils/getKubernetesResourceReference.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/utils/getKubernetesResourceReference.js.map +1 -1
- package/dist/features/workload-reconciliation/utils/readKubernetesOwnedResource.d.ts +2 -2
- package/dist/features/workload-reconciliation/utils/readKubernetesOwnedResource.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/utils/readKubernetesOwnedResource.js +3 -3
- package/dist/features/workload-reconciliation/utils/readKubernetesOwnedResource.js.map +1 -1
- package/dist/features/workload-reconciliation/utils/sortKubernetesResourcesForRemoval.d.ts +1 -1
- package/dist/features/workload-reconciliation/utils/sortKubernetesResourcesForRemoval.d.ts.map +1 -1
- package/dist/features/workload-reconciliation/utils/sortKubernetesResourcesForRemoval.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/types/kubectl.d.ts +1 -1
- package/dist/types/kubectl.d.ts.map +1 -1
- package/dist/types/kubectl.js.map +1 -1
- package/dist/types/kubernetesDriver.d.ts +1 -1
- package/dist/types/kubernetesDriver.d.ts.map +1 -1
- package/dist/types/kubernetesDriver.js.map +1 -1
- package/package.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readKubernetesOwnedResource.js","sourceRoot":"","sources":["../../../../src/features/workload-reconciliation/utils/readKubernetesOwnedResource.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"readKubernetesOwnedResource.js","sourceRoot":"","sources":["../../../../src/features/workload-reconciliation/utils/readKubernetesOwnedResource.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAErF,+FAA+F;AAC/F,MAAM,UAAU,2BAA2B,CACzC,QAA4B,EAC5B,OAAgC;IAEhC,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAC,QAAQ,CAAC;IAC1C,IACE,WAAW,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,SAAS;QACjF,WAAW,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,WAAW;QACvF,WAAW,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,KAAK,OAAO,CAAC,YAAY,EAC5E,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,UAAU,GAAG,WAAW,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;IACxE,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAE1E,MAAM,QAAQ,GAA0B;QACtC,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS;QACpC,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,WAAW;QACxC,OAAO,EAAE,OAAO,CAAC,YAAY;QAC7B,UAAU;KACX,CAAC;IACF,MAAM,YAAY,GAAG,gBAAgB,CACnC,WAAW,CAAC,oBAAoB,CAAC,sBAAsB,CAAC,EACxD,QAAQ,CACT,CAAC;IACF,IAAI,YAAY,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAEjD,OAAO;QACL,QAAQ;QACR,UAAU,EAAE,wBAAwB,CAAC,8BAA8B,CAAC,QAAQ,CAAC,CAAC;QAC9E,UAAU,EAAE,WAAW,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,KAAK,MAAM;QAC7E,SAAS,EACP,WAAW,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,KAAK,mBAAmB;YAC3E,CAAC,CAAC,mBAAmB;YACrB,CAAC,CAAC,QAAQ;QACd,SAAS,EAAE,YAAY;KACxB,CAAC;AACJ,CAAC;AAED,qFAAqF;AACrF,SAAS,gBAAgB,CACvB,KAAyB,EACzB,QAA+B;IAE/B,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACnC,IAAI,CAAC;QACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,EAAE,CAAC;YAChF,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;IACnE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC","sourcesContent":["import type { InfraOwnedResource, InfraResourceIdentity } from '@ankhorage/contracts/infra';\n\nimport type { KubernetesDriverRequest } from '../../../types/kubernetesDriver.js';\nimport type { KubernetesResource } from '../../../types/kubernetesResources.js';\nimport { KUBERNETES_OWNERSHIP } from '../constants.js';\nimport { getKubernetesResourceKey } from './getKubernetesResourceKey.js';\nimport { getKubernetesResourceReference } from './getKubernetesResourceReference.js';\n\n/*** Read trusted ownership metadata, rejecting resources outside the active Infra identity. */\nexport function readKubernetesOwnedResource(\n resource: KubernetesResource,\n request: KubernetesDriverRequest,\n): InfraOwnedResource | undefined {\n const { annotations } = resource.metadata;\n if (\n annotations[KUBERNETES_OWNERSHIP.projectAnnotation] !== request.context.projectId ||\n annotations[KUBERNETES_OWNERSHIP.environmentAnnotation] !== request.context.environment ||\n annotations[KUBERNETES_OWNERSHIP.adapterAnnotation] !== request.ownerAdapter\n ) {\n return undefined;\n }\n\n const resourceId = annotations[KUBERNETES_OWNERSHIP.resourceAnnotation];\n if (resourceId === undefined || resourceId.length === 0) return undefined;\n\n const identity: InfraResourceIdentity = {\n projectId: request.context.projectId,\n environment: request.context.environment,\n adapter: request.ownerAdapter,\n resourceId,\n };\n const dependencies = readDependencies(\n annotations[KUBERNETES_OWNERSHIP.dependenciesAnnotation],\n identity,\n );\n if (dependencies === undefined) return undefined;\n\n return {\n identity,\n externalId: getKubernetesResourceKey(getKubernetesResourceReference(resource)),\n persistent: annotations[KUBERNETES_OWNERSHIP.persistentAnnotation] === 'true',\n retention:\n annotations[KUBERNETES_OWNERSHIP.retentionAnnotation] === 'delete-on-destroy'\n ? 'delete-on-destroy'\n : 'retain',\n dependsOn: dependencies,\n };\n}\n\n/*** Decode dependency IDs without trusting arbitrary serialized identity objects. */\nfunction readDependencies(\n value: string | undefined,\n identity: InfraResourceIdentity,\n): readonly InfraResourceIdentity[] | undefined {\n if (value === undefined) return [];\n try {\n const parsed: unknown = JSON.parse(value);\n if (!Array.isArray(parsed) || !parsed.every((item) => typeof item === 'string')) {\n return undefined;\n }\n return parsed.map((resourceId) => ({ ...identity, resourceId }));\n } catch {\n return undefined;\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InfraOwnedResource } from '@ankhorage/contracts/infra';
|
|
2
|
-
import type { KubernetesResource } from '../../../types/kubernetesResources';
|
|
2
|
+
import type { KubernetesResource } from '../../../types/kubernetesResources.js';
|
|
3
3
|
export interface OwnedKubernetesResource {
|
|
4
4
|
readonly resource: KubernetesResource;
|
|
5
5
|
readonly owner: InfraOwnedResource;
|
package/dist/features/workload-reconciliation/utils/sortKubernetesResourcesForRemoval.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortKubernetesResourcesForRemoval.d.ts","sourceRoot":"","sources":["../../../../src/features/workload-reconciliation/utils/sortKubernetesResourcesForRemoval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"sortKubernetesResourcesForRemoval.d.ts","sourceRoot":"","sources":["../../../../src/features/workload-reconciliation/utils/sortKubernetesResourcesForRemoval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAEhF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;CACpC;AAED,yFAAyF;AACzF,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,SAAS,uBAAuB,EAAE,GAC5C,SAAS,uBAAuB,EAAE,CAkBpC"}
|
package/dist/features/workload-reconciliation/utils/sortKubernetesResourcesForRemoval.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortKubernetesResourcesForRemoval.js","sourceRoot":"","sources":["../../../../src/features/workload-reconciliation/utils/sortKubernetesResourcesForRemoval.ts"],"names":[],"mappings":"AASA,yFAAyF;AACzF,MAAM,UAAU,iCAAiC,CAC/C,SAA6C;IAE7C,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAC3F,MAAM,OAAO,GAA8B,EAAE,CAAC;IAC9C,OAAO,SAAS,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;aACnC,MAAM,CACL,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CACZ,CAAC,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,CACrD,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,UAAU,KAAK,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CACvF,CACJ;aACA,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAC7B,MAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACzF,IAAI,QAAQ,KAAK,SAAS;YAAE,MAAM;QAClC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvB,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,qEAAqE;AACrE,SAAS,mBAAmB,CAC1B,IAA6B,EAC7B,KAA8B;IAE9B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;AACnF,CAAC","sourcesContent":["import type { InfraOwnedResource } from '@ankhorage/contracts/infra';\n\nimport type { KubernetesResource } from '../../../types/kubernetesResources';\n\nexport interface OwnedKubernetesResource {\n readonly resource: KubernetesResource;\n readonly owner: InfraOwnedResource;\n}\n\n/*** Sort owned resources deterministically with dependents before their dependencies. */\nexport function sortKubernetesResourcesForRemoval(\n resources: readonly OwnedKubernetesResource[],\n): readonly OwnedKubernetesResource[] {\n const remaining = new Map(resources.map((item) => [item.owner.identity.resourceId, item]));\n const ordered: OwnedKubernetesResource[] = [];\n while (remaining.size > 0) {\n const leaves = [...remaining.values()]\n .filter(\n ({ owner }) =>\n ![...remaining.values()].some(({ owner: candidate }) =>\n candidate.dependsOn.some(({ resourceId }) => resourceId === owner.identity.resourceId),\n ),\n )\n .sort(compareResourceKeys);\n const selected = leaves.at(0) ?? [...remaining.values()].sort(compareResourceKeys).at(0);\n if (selected === undefined) break;\n ordered.push(selected);\n remaining.delete(selected.owner.identity.resourceId);\n }\n return ordered;\n}\n\n/*** Compare owned resources by stable external resource identity. */\nfunction compareResourceKeys(\n left: OwnedKubernetesResource,\n right: OwnedKubernetesResource,\n): number {\n return (left.owner.externalId ?? '').localeCompare(right.owner.externalId ?? '');\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sortKubernetesResourcesForRemoval.js","sourceRoot":"","sources":["../../../../src/features/workload-reconciliation/utils/sortKubernetesResourcesForRemoval.ts"],"names":[],"mappings":"AASA,yFAAyF;AACzF,MAAM,UAAU,iCAAiC,CAC/C,SAA6C;IAE7C,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAC3F,MAAM,OAAO,GAA8B,EAAE,CAAC;IAC9C,OAAO,SAAS,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;aACnC,MAAM,CACL,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CACZ,CAAC,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,CACrD,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,UAAU,KAAK,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CACvF,CACJ;aACA,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAC7B,MAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACzF,IAAI,QAAQ,KAAK,SAAS;YAAE,MAAM;QAClC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvB,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,qEAAqE;AACrE,SAAS,mBAAmB,CAC1B,IAA6B,EAC7B,KAA8B;IAE9B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;AACnF,CAAC","sourcesContent":["import type { InfraOwnedResource } from '@ankhorage/contracts/infra';\n\nimport type { KubernetesResource } from '../../../types/kubernetesResources.js';\n\nexport interface OwnedKubernetesResource {\n readonly resource: KubernetesResource;\n readonly owner: InfraOwnedResource;\n}\n\n/*** Sort owned resources deterministically with dependents before their dependencies. */\nexport function sortKubernetesResourcesForRemoval(\n resources: readonly OwnedKubernetesResource[],\n): readonly OwnedKubernetesResource[] {\n const remaining = new Map(resources.map((item) => [item.owner.identity.resourceId, item]));\n const ordered: OwnedKubernetesResource[] = [];\n while (remaining.size > 0) {\n const leaves = [...remaining.values()]\n .filter(\n ({ owner }) =>\n ![...remaining.values()].some(({ owner: candidate }) =>\n candidate.dependsOn.some(({ resourceId }) => resourceId === owner.identity.resourceId),\n ),\n )\n .sort(compareResourceKeys);\n const selected = leaves.at(0) ?? [...remaining.values()].sort(compareResourceKeys).at(0);\n if (selected === undefined) break;\n ordered.push(selected);\n remaining.delete(selected.owner.identity.resourceId);\n }\n return ordered;\n}\n\n/*** Compare owned resources by stable external resource identity. */\nfunction compareResourceKeys(\n left: OwnedKubernetesResource,\n right: OwnedKubernetesResource,\n): number {\n return (left.owner.externalId ?? '').localeCompare(right.owner.externalId ?? '');\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** Public shared Kubernetes workload-driver boundary. */
|
|
2
|
-
export { createKubectlKubernetesApi } from './features/workload-reconciliation/adapters/createKubectlKubernetesApi';
|
|
3
|
-
export { projectKubernetesResourcesAsync } from './features/workload-reconciliation/application/use-cases/projectKubernetesResourcesAsync';
|
|
4
|
-
export { createKubernetesDriver } from './features/workload-reconciliation/composition/createKubernetesDriver';
|
|
5
|
-
export type { KubectlKubernetesApi, KubectlKubernetesApiOptions, KubernetesCommandRequest, KubernetesCommandResult, KubernetesCommandRunner, } from './types/kubectl';
|
|
6
|
-
export type { KubernetesDriver, KubernetesDriverOptions, KubernetesDriverRequest, } from './types/kubernetesDriver';
|
|
7
|
-
export type { KubernetesApi, KubernetesDesiredResource, KubernetesOwnershipQuery, KubernetesPrivilegedReference, KubernetesProjection, KubernetesResource, KubernetesResourceMetadata, KubernetesResourceObservation, KubernetesResourceReference, KubernetesSecretBinding, KubernetesSecretValueSegment, } from './types/kubernetesResources';
|
|
2
|
+
export { createKubectlKubernetesApi } from './features/workload-reconciliation/adapters/createKubectlKubernetesApi.js';
|
|
3
|
+
export { projectKubernetesResourcesAsync } from './features/workload-reconciliation/application/use-cases/projectKubernetesResourcesAsync.js';
|
|
4
|
+
export { createKubernetesDriver } from './features/workload-reconciliation/composition/createKubernetesDriver.js';
|
|
5
|
+
export type { KubectlKubernetesApi, KubectlKubernetesApiOptions, KubernetesCommandRequest, KubernetesCommandResult, KubernetesCommandRunner, } from './types/kubectl.js';
|
|
6
|
+
export type { KubernetesDriver, KubernetesDriverOptions, KubernetesDriverRequest, } from './types/kubernetesDriver.js';
|
|
7
|
+
export type { KubernetesApi, KubernetesDesiredResource, KubernetesOwnershipQuery, KubernetesPrivilegedReference, KubernetesProjection, KubernetesResource, KubernetesResourceMetadata, KubernetesResourceObservation, KubernetesResourceReference, KubernetesSecretBinding, KubernetesSecretValueSegment, } from './types/kubernetesResources.js';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2EAA2E,CAAC;AACvH,OAAO,EAAE,+BAA+B,EAAE,MAAM,6FAA6F,CAAC;AAC9I,OAAO,EAAE,sBAAsB,EAAE,MAAM,0EAA0E,CAAC;AAClH,YAAY,EACV,oBAAoB,EACpB,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,aAAa,EACb,yBAAyB,EACzB,wBAAwB,EACxB,6BAA6B,EAC7B,oBAAoB,EACpB,kBAAkB,EAClB,0BAA0B,EAC1B,6BAA6B,EAC7B,2BAA2B,EAC3B,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,gCAAgC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Public shared Kubernetes workload-driver boundary. */
|
|
2
|
-
export { createKubectlKubernetesApi } from './features/workload-reconciliation/adapters/createKubectlKubernetesApi';
|
|
3
|
-
export { projectKubernetesResourcesAsync } from './features/workload-reconciliation/application/use-cases/projectKubernetesResourcesAsync';
|
|
4
|
-
export { createKubernetesDriver } from './features/workload-reconciliation/composition/createKubernetesDriver';
|
|
2
|
+
export { createKubectlKubernetesApi } from './features/workload-reconciliation/adapters/createKubectlKubernetesApi.js';
|
|
3
|
+
export { projectKubernetesResourcesAsync } from './features/workload-reconciliation/application/use-cases/projectKubernetesResourcesAsync.js';
|
|
4
|
+
export { createKubernetesDriver } from './features/workload-reconciliation/composition/createKubernetesDriver.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2EAA2E,CAAC;AACvH,OAAO,EAAE,+BAA+B,EAAE,MAAM,6FAA6F,CAAC;AAC9I,OAAO,EAAE,sBAAsB,EAAE,MAAM,0EAA0E,CAAC","sourcesContent":["/** Public shared Kubernetes workload-driver boundary. */\nexport { createKubectlKubernetesApi } from './features/workload-reconciliation/adapters/createKubectlKubernetesApi.js';\nexport { projectKubernetesResourcesAsync } from './features/workload-reconciliation/application/use-cases/projectKubernetesResourcesAsync.js';\nexport { createKubernetesDriver } from './features/workload-reconciliation/composition/createKubernetesDriver.js';\nexport type {\n KubectlKubernetesApi,\n KubectlKubernetesApiOptions,\n KubernetesCommandRequest,\n KubernetesCommandResult,\n KubernetesCommandRunner,\n} from './types/kubectl.js';\nexport type {\n KubernetesDriver,\n KubernetesDriverOptions,\n KubernetesDriverRequest,\n} from './types/kubernetesDriver.js';\nexport type {\n KubernetesApi,\n KubernetesDesiredResource,\n KubernetesOwnershipQuery,\n KubernetesPrivilegedReference,\n KubernetesProjection,\n KubernetesResource,\n KubernetesResourceMetadata,\n KubernetesResourceObservation,\n KubernetesResourceReference,\n KubernetesSecretBinding,\n KubernetesSecretValueSegment,\n} from './types/kubernetesResources.js';\n"]}
|
package/dist/types/kubectl.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kubectl.d.ts","sourceRoot":"","sources":["../../src/types/kubectl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"kubectl.d.ts","sourceRoot":"","sources":["../../src/types/kubectl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,qEAAqE;AACrE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;CAC/E;AAED,MAAM,WAAW,2BAA2B;IAC1C,qFAAqF;IACrF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,uBAAuB,CAAC;IAC1C,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,8FAA8F;IAC9F,QAAQ,CAAC,6BAA6B,CAAC,EAAE,MAAM,CAAC;CACjD;AAED,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kubectl.js","sourceRoot":"","sources":["../../src/types/kubectl.ts"],"names":[],"mappings":"","sourcesContent":["import type { KubernetesApi } from './kubernetesResources';\n\nexport interface KubernetesCommandRequest {\n readonly executable: string;\n readonly arguments: readonly string[];\n readonly stdin?: string;\n readonly signal?: AbortSignal;\n}\n\nexport interface KubernetesCommandResult {\n readonly exitCode: number;\n readonly stdout: string;\n readonly stderr: string;\n}\n\n/** Shell-free process boundary for kubectl-specific CLI commands. */\nexport interface KubernetesCommandRunner {\n runAsync(request: KubernetesCommandRequest): Promise<KubernetesCommandResult>;\n}\n\nexport interface KubectlKubernetesApiOptions {\n /** Exact authenticated kubeconfig context selected by the owning runtime adapter. */\n readonly context: string;\n readonly executable?: string;\n readonly runner?: KubernetesCommandRunner;\n readonly pollIntervalMs?: number;\n /** Grace period for transient Deployment CrashLoopBackOff recovery before readiness fails. */\n readonly crashLoopRecoveryGraceSeconds?: number;\n}\n\nexport type KubectlKubernetesApi = KubernetesApi;\n"]}
|
|
1
|
+
{"version":3,"file":"kubectl.js","sourceRoot":"","sources":["../../src/types/kubectl.ts"],"names":[],"mappings":"","sourcesContent":["import type { KubernetesApi } from './kubernetesResources.js';\n\nexport interface KubernetesCommandRequest {\n readonly executable: string;\n readonly arguments: readonly string[];\n readonly stdin?: string;\n readonly signal?: AbortSignal;\n}\n\nexport interface KubernetesCommandResult {\n readonly exitCode: number;\n readonly stdout: string;\n readonly stderr: string;\n}\n\n/** Shell-free process boundary for kubectl-specific CLI commands. */\nexport interface KubernetesCommandRunner {\n runAsync(request: KubernetesCommandRequest): Promise<KubernetesCommandResult>;\n}\n\nexport interface KubectlKubernetesApiOptions {\n /** Exact authenticated kubeconfig context selected by the owning runtime adapter. */\n readonly context: string;\n readonly executable?: string;\n readonly runner?: KubernetesCommandRunner;\n readonly pollIntervalMs?: number;\n /** Grace period for transient Deployment CrashLoopBackOff recovery before readiness fails. */\n readonly crashLoopRecoveryGraceSeconds?: number;\n}\n\nexport type KubectlKubernetesApi = KubernetesApi;\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InfraAdapterId, InfraDestroyRequest, InfraExecutionContext, InfraOutput, InfraPlanAction, InfraReconcileResult, InfraResourceStatus, InfraResult, InfraWorkloadSpec } from '@ankhorage/contracts/infra';
|
|
2
|
-
import type { KubernetesApi, KubernetesProjection } from './kubernetesResources';
|
|
2
|
+
import type { KubernetesApi, KubernetesProjection } from './kubernetesResources.js';
|
|
3
3
|
export interface KubernetesDriverOptions {
|
|
4
4
|
readonly api: KubernetesApi;
|
|
5
5
|
readonly defaultReadinessTimeoutSeconds?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kubernetesDriver.d.ts","sourceRoot":"","sources":["../../src/types/kubernetesDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"kubernetesDriver.d.ts","sourceRoot":"","sources":["../../src/types/kubernetesDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEpF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC;IAC5B,QAAQ,CAAC,8BAA8B,CAAC,EAAE,MAAM,CAAC;CAClD;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC;IACxC,gFAAgF;IAChF,QAAQ,CAAC,YAAY,EAAE,cAAc,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACjD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;IACnD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,YAAY,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC3F,SAAS,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,eAAe,EAAE,CAAC,CAAC,CAAC;IAC9F,cAAc,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC7F,WAAW,CACT,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC9C,WAAW,CACT,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,WAAW,CAAC,SAAS,mBAAmB,EAAE,CAAC,CAAC,CAAC;IACxD,mBAAmB,CACjB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,WAAW,CAAC,SAAS,mBAAmB,EAAE,CAAC,CAAC,CAAC;IACxD,YAAY,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,WAAW,EAAE,CAAC,CAAC,CAAC;CAC9F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kubernetesDriver.js","sourceRoot":"","sources":["../../src/types/kubernetesDriver.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n InfraAdapterId,\n InfraDestroyRequest,\n InfraExecutionContext,\n InfraOutput,\n InfraPlanAction,\n InfraReconcileResult,\n InfraResourceStatus,\n InfraResult,\n InfraWorkloadSpec,\n} from '@ankhorage/contracts/infra';\n\nimport type { KubernetesApi, KubernetesProjection } from './kubernetesResources';\n\nexport interface KubernetesDriverOptions {\n readonly api: KubernetesApi;\n readonly defaultReadinessTimeoutSeconds?: number;\n}\n\nexport interface KubernetesDriverRequest {\n readonly context: InfraExecutionContext;\n /** The composing runtime adapter remains the canonical Infra resource owner. */\n readonly ownerAdapter: InfraAdapterId;\n readonly workloads: readonly InfraWorkloadSpec[];\n readonly availableOutputs?: readonly InfraOutput[];\n readonly namespace?: string;\n}\n\nexport interface KubernetesDriver {\n readonly kind: 'kubernetes';\n projectAsync(request: KubernetesDriverRequest): Promise<InfraResult<KubernetesProjection>>;\n planAsync(request: KubernetesDriverRequest): Promise<InfraResult<readonly InfraPlanAction[]>>;\n reconcileAsync(request: KubernetesDriverRequest): Promise<InfraResult<InfraReconcileResult>>;\n removeAsync(\n request: KubernetesDriverRequest,\n destroy: InfraDestroyRequest,\n ): Promise<InfraResult<InfraReconcileResult>>;\n statusAsync(\n request: KubernetesDriverRequest,\n ): Promise<InfraResult<readonly InfraResourceStatus[]>>;\n waitUntilReadyAsync(\n request: KubernetesDriverRequest,\n ): Promise<InfraResult<readonly InfraResourceStatus[]>>;\n outputsAsync(request: KubernetesDriverRequest): Promise<InfraResult<readonly InfraOutput[]>>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"kubernetesDriver.js","sourceRoot":"","sources":["../../src/types/kubernetesDriver.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n InfraAdapterId,\n InfraDestroyRequest,\n InfraExecutionContext,\n InfraOutput,\n InfraPlanAction,\n InfraReconcileResult,\n InfraResourceStatus,\n InfraResult,\n InfraWorkloadSpec,\n} from '@ankhorage/contracts/infra';\n\nimport type { KubernetesApi, KubernetesProjection } from './kubernetesResources.js';\n\nexport interface KubernetesDriverOptions {\n readonly api: KubernetesApi;\n readonly defaultReadinessTimeoutSeconds?: number;\n}\n\nexport interface KubernetesDriverRequest {\n readonly context: InfraExecutionContext;\n /** The composing runtime adapter remains the canonical Infra resource owner. */\n readonly ownerAdapter: InfraAdapterId;\n readonly workloads: readonly InfraWorkloadSpec[];\n readonly availableOutputs?: readonly InfraOutput[];\n readonly namespace?: string;\n}\n\nexport interface KubernetesDriver {\n readonly kind: 'kubernetes';\n projectAsync(request: KubernetesDriverRequest): Promise<InfraResult<KubernetesProjection>>;\n planAsync(request: KubernetesDriverRequest): Promise<InfraResult<readonly InfraPlanAction[]>>;\n reconcileAsync(request: KubernetesDriverRequest): Promise<InfraResult<InfraReconcileResult>>;\n removeAsync(\n request: KubernetesDriverRequest,\n destroy: InfraDestroyRequest,\n ): Promise<InfraResult<InfraReconcileResult>>;\n statusAsync(\n request: KubernetesDriverRequest,\n ): Promise<InfraResult<readonly InfraResourceStatus[]>>;\n waitUntilReadyAsync(\n request: KubernetesDriverRequest,\n ): Promise<InfraResult<readonly InfraResourceStatus[]>>;\n outputsAsync(request: KubernetesDriverRequest): Promise<InfraResult<readonly InfraOutput[]>>;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/kubernetes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Shared Kubernetes workload driver for provider-neutral Ankhorage infrastructure.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"typecheck": "bun x tsc --noEmit -p tsconfig.json",
|
|
44
44
|
"check-types": "bun run typecheck",
|
|
45
45
|
"test": "bun test src",
|
|
46
|
+
"test:packed-consumer": "bun run build && bun consumer-tests/packedConsumer.ts",
|
|
46
47
|
"docs": "paradox && ankhorage-prettier --write README.md paradox",
|
|
47
48
|
"prepack": "bun run build",
|
|
48
49
|
"lint": "ankhorage-eslint . --max-warnings=0",
|
|
@@ -55,12 +56,12 @@
|
|
|
55
56
|
"version-packages": "ankhorage-changeset version"
|
|
56
57
|
},
|
|
57
58
|
"dependencies": {
|
|
58
|
-
"@ankhorage/contracts": "^
|
|
59
|
+
"@ankhorage/contracts": "^26.2.1"
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
61
62
|
"@ankhorage/devtools": "^1.14.6",
|
|
62
63
|
"@ankhorage/paradox": "^0.1.24",
|
|
63
|
-
"@types/bun": "^1.4.
|
|
64
|
+
"@types/bun": "^1.4.2",
|
|
64
65
|
"@types/node": "^26.4.1",
|
|
65
66
|
"typescript": "~6.0.3"
|
|
66
67
|
},
|