typekro 0.13.0 → 0.14.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.
@@ -5,5 +5,5 @@
5
5
  * New code within `src/utils/` should import directly from `../../shared/brands.js`
6
6
  * to maintain the clean dependency direction: `shared/ <-- utils/ <-- core/`.
7
7
  */
8
- export { CALLABLE_COMPOSITION_BRAND, CEL_EXPRESSION_BRAND, CONTAINER_IMAGE_REF_BRAND, KUBERNETES_REF_BRAND, KUBERNETES_REF_MARKER_FIELD_PATH_SOURCE, KUBERNETES_REF_MARKER_PATTERN, KUBERNETES_REF_MARKER_RESOURCE_ID_SOURCE, KUBERNETES_REF_MARKER_SOURCE, KUBERNETES_REF_SCHEMA_MARKER_SOURCE, MIXED_TEMPLATE_BRAND, NESTED_COMPOSITION_BRAND, SINGLETON_HANDLE_BRAND, } from '../../shared/brands.js';
8
+ export { CALLABLE_COMPOSITION_BRAND, CEL_EXPRESSION_BRAND, KUBERNETES_REF_BRAND, KUBERNETES_REF_MARKER_FIELD_PATH_SOURCE, KUBERNETES_REF_MARKER_PATTERN, KUBERNETES_REF_MARKER_RESOURCE_ID_SOURCE, KUBERNETES_REF_MARKER_SOURCE, KUBERNETES_REF_SCHEMA_MARKER_SOURCE, MIXED_TEMPLATE_BRAND, NESTED_COMPOSITION_BRAND, SINGLETON_HANDLE_BRAND, } from '../../shared/brands.js';
9
9
  //# sourceMappingURL=brands.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"brands.d.ts","sourceRoot":"","sources":["../../../src/core/constants/brands.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,EACpB,uCAAuC,EACvC,6BAA6B,EAC7B,wCAAwC,EACxC,4BAA4B,EAC5B,mCAAmC,EACnC,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"brands.d.ts","sourceRoot":"","sources":["../../../src/core/constants/brands.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,oBAAoB,EACpB,uCAAuC,EACvC,6BAA6B,EAC7B,wCAAwC,EACxC,4BAA4B,EAC5B,mCAAmC,EACnC,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC"}
@@ -5,5 +5,5 @@
5
5
  * New code within `src/utils/` should import directly from `../../shared/brands.js`
6
6
  * to maintain the clean dependency direction: `shared/ <-- utils/ <-- core/`.
7
7
  */
8
- export { CALLABLE_COMPOSITION_BRAND, CEL_EXPRESSION_BRAND, CONTAINER_IMAGE_REF_BRAND, KUBERNETES_REF_BRAND, KUBERNETES_REF_MARKER_FIELD_PATH_SOURCE, KUBERNETES_REF_MARKER_PATTERN, KUBERNETES_REF_MARKER_RESOURCE_ID_SOURCE, KUBERNETES_REF_MARKER_SOURCE, KUBERNETES_REF_SCHEMA_MARKER_SOURCE, MIXED_TEMPLATE_BRAND, NESTED_COMPOSITION_BRAND, SINGLETON_HANDLE_BRAND, } from '../../shared/brands.js';
8
+ export { CALLABLE_COMPOSITION_BRAND, CEL_EXPRESSION_BRAND, KUBERNETES_REF_BRAND, KUBERNETES_REF_MARKER_FIELD_PATH_SOURCE, KUBERNETES_REF_MARKER_PATTERN, KUBERNETES_REF_MARKER_RESOURCE_ID_SOURCE, KUBERNETES_REF_MARKER_SOURCE, KUBERNETES_REF_SCHEMA_MARKER_SOURCE, MIXED_TEMPLATE_BRAND, NESTED_COMPOSITION_BRAND, SINGLETON_HANDLE_BRAND, } from '../../shared/brands.js';
9
9
  //# sourceMappingURL=brands.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"brands.js","sourceRoot":"","sources":["../../../src/core/constants/brands.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,EACpB,uCAAuC,EACvC,6BAA6B,EAC7B,wCAAwC,EACxC,4BAA4B,EAC5B,mCAAmC,EACnC,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"brands.js","sourceRoot":"","sources":["../../../src/core/constants/brands.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,oBAAoB,EACpB,uCAAuC,EACvC,6BAA6B,EAC7B,wCAAwC,EACxC,4BAA4B,EAC5B,mCAAmC,EACnC,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC"}
@@ -1,65 +1,62 @@
1
1
  /**
2
2
  * Container Image Utility
3
3
  *
4
- * `container()` declares a container image built from source and pushed to a registry, as a
5
- * FIRST-CLASS typekro utility. It is defined at program scope OUTSIDE a `kubernetesComposition`
6
- * because an image is a build-time artifact with no dependency on cluster state; it should never be a
7
- * node in the cluster resource graph. Resources WITHIN a composition reference its `.imageUri`.
4
+ * `container()` declares a container image built from source and pushed to a registry. It is the
5
+ * high-level front door over {@link buildContainer}: a memoized async builder that resolves to a
6
+ * SHAPED result (`{ imageUri, repository, tag }`) so callers can use the full URI for a resource's
7
+ * image field OR the split `repository`/`tag` for a Helm chart's image values without re-splitting.
8
8
  *
9
- * `.imageUri` is a `ContainerImageRef` (a distinct brand, NOT a `KubernetesRef`): typekro resolves it
10
- * CLIENT-SIDE to a literal image URI before apply (direct mode) / RGD serialization (kro mode), by
11
- * delegating to the existing {@link buildContainer} once per container identity. Kro never sees a
12
- * build, only a literal image string.
9
+ * An image build is an async, client-side, pre-deploy side effect, so `container()` is honest about
10
+ * that: you `await` it. It is NOT a deferred reference resolve images in (async) setup code before
11
+ * composing, then feed the resulting literals into resources or chart values.
12
+ *
13
+ * Memoization: the build is keyed by container identity (`id ?? imageName`) and cached, so awaiting
14
+ * the same container many times (e.g. several deployments sharing one image) builds it exactly ONCE.
13
15
  *
14
16
  * @example
15
17
  * ```typescript
16
18
  * import { container } from 'typekro/containers';
17
19
  *
18
- * // Defined OUTSIDE the composition:
19
- * const appImage = container({ context: './app', imageName: 'app', registry: { type: 'ecr' } });
20
+ * const img = await container({ context: './app', imageName: 'app', registry: { type: 'ecr' } });
21
+ * // img.imageUri → '123.dkr.ecr.us-east-1.amazonaws.com/app:sha-abc'
22
+ * // img.repository → '123.dkr.ecr.us-east-1.amazonaws.com/app' img.tag → 'sha-abc'
20
23
  *
21
- * // Referenced WITHIN one:
22
- * kubernetesComposition(def, () => {
23
- * Deployment({ name: 'app', image: appImage.imageUri, ports: [{ containerPort: 3000 }] });
24
- * });
24
+ * Deployment({ name: 'app', image: img.imageUri, ports: [{ containerPort: 3000 }] });
25
+ * // or for a Helm chart's split image values: { repository: img.repository, tag: img.tag }
25
26
  * ```
26
27
  */
27
- import { CONTAINER_IMAGE_REF_BRAND } from '../constants/brands.js';
28
- import type { ContainerBuildOptions } from './registries/types.js';
29
- /**
30
- * A reference to a container image's URI. Resolved client-side to a literal string (the built +
31
- * pushed image URI) before apply / RGD serialization — distinct from a `KubernetesRef`, which is a
32
- * cluster-state reference serialized to CEL.
33
- */
34
- export interface ContainerImageRef<T extends string = string> {
35
- readonly [CONTAINER_IMAGE_REF_BRAND]: true;
36
- /** Stable identity — multiple references to the same container build the image only ONCE. */
37
- readonly containerId: string;
38
- /** The build spec, carried inline so the resolver is self-contained (delegates to `buildContainer`). */
39
- readonly buildOptions: ContainerBuildOptions;
40
- readonly _type?: T;
41
- }
42
- /** A first-class container image: defined outside a composition, referenced within one. */
28
+ import type { ContainerBuildOptions, ContainerBuildResult } from './registries/types.js';
29
+ /** A built container image, resolved to a literal — both the full URI and its split parts. */
43
30
  export interface ContainerImage {
44
- /**
45
- * The image-URI reference — assign to any resource image field (e.g. a container's `image`). Typed
46
- * as `string` so it's assignable to plain string fields, exactly like typekro's schema/resource
47
- * refs; at RUNTIME it is a branded {@link ContainerImageRef} that the resolver substitutes with the
48
- * built image URI at deploy time. Use {@link isContainerImageRef} to detect it.
49
- */
31
+ /** Full image URI, e.g. `123.dkr.ecr.us-east-1.amazonaws.com/app:sha-abc`. */
50
32
  readonly imageUri: string;
33
+ /** The URI without the tag, e.g. `123.dkr.ecr.us-east-1.amazonaws.com/app`. */
34
+ readonly repository: string;
35
+ /** The tag, e.g. `sha-abc`. */
36
+ readonly tag: string;
51
37
  }
52
38
  /** Options for {@link container}: the {@link ContainerBuildOptions} plus an optional stable identity. */
53
39
  export interface ContainerOptions extends ContainerBuildOptions {
54
- /** Stable identity for dedup across references; defaults to `imageName`. Set when two containers share one. */
40
+ /** Stable identity for build memoization; defaults to `imageName`. Set when two containers share one. */
55
41
  id?: string;
56
42
  }
57
43
  /**
58
- * Declare a container image as a first-class typekro utility (see the module doc). Returns a handle
59
- * whose `.imageUri` is referenced from resources; the build (via {@link buildContainer}) happens once
60
- * at deploy time and the literal URI is substituted before apply / serialization.
44
+ * Split a full image URI into `{ repository, tag }`. Handles digest form (`repo@sha256:…`) and tag
45
+ * form (`repo:tag`), registry-port-colon aware (a colon in `host:port/...` is not the tag separator).
46
+ */
47
+ export declare function splitImageUri(uri: string): {
48
+ repository: string;
49
+ tag: string;
50
+ };
51
+ /** Test seam: the builder `container()` delegates to (defaults to the real {@link buildContainer}). */
52
+ type Builder = (options: ContainerBuildOptions) => Promise<ContainerBuildResult>;
53
+ /**
54
+ * Build a container image (delegating to {@link buildContainer}) and resolve to its shaped result.
55
+ * Memoized by identity — see the module doc. `build` is an injectable test seam; production callers
56
+ * pass only `options`.
61
57
  */
62
- export declare function container(options: ContainerOptions): ContainerImage;
63
- /** Type guard: is `value` a {@link ContainerImageRef} (the `.imageUri` of a `container()`)? */
64
- export declare function isContainerImageRef(value: unknown): value is ContainerImageRef;
58
+ export declare function container(options: ContainerOptions, build?: Builder): Promise<ContainerImage>;
59
+ /** Clear the build memoization cache. Intended for tests/long-lived processes that need a rebuild. */
60
+ export declare function clearContainerCache(): void;
61
+ export {};
65
62
  //# sourceMappingURL=image.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/core/containers/image.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;;;GAIG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC1D,QAAQ,CAAC,CAAC,yBAAyB,CAAC,EAAE,IAAI,CAAC;IAC3C,6FAA6F;IAC7F,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,wGAAwG;IACxG,QAAQ,CAAC,YAAY,EAAE,qBAAqB,CAAC;IAC7C,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;CACpB;AAED,2FAA2F;AAC3F,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,yGAAyG;AACzG,MAAM,WAAW,gBAAiB,SAAQ,qBAAqB;IAC7D,+GAA+G;IAC/G,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,cAAc,CAWnE;AAED,+FAA+F;AAC/F,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAM9E"}
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/core/containers/image.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAEzF,8FAA8F;AAC9F,MAAM,WAAW,cAAc;IAC7B,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,+EAA+E;IAC/E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,+BAA+B;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,yGAAyG;AACzG,MAAM,WAAW,gBAAiB,SAAQ,qBAAqB;IAC7D,yGAAyG;IACzG,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAQ9E;AAKD,uGAAuG;AACvG,KAAK,OAAO,GAAG,CAAC,OAAO,EAAE,qBAAqB,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;AASjF;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,gBAAgB,EACzB,KAAK,GAAE,OAAwB,GAC9B,OAAO,CAAC,cAAc,CAAC,CAQzB;AAED,sGAAsG;AACtG,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
@@ -1,51 +1,69 @@
1
1
  /**
2
2
  * Container Image Utility
3
3
  *
4
- * `container()` declares a container image built from source and pushed to a registry, as a
5
- * FIRST-CLASS typekro utility. It is defined at program scope OUTSIDE a `kubernetesComposition`
6
- * because an image is a build-time artifact with no dependency on cluster state; it should never be a
7
- * node in the cluster resource graph. Resources WITHIN a composition reference its `.imageUri`.
4
+ * `container()` declares a container image built from source and pushed to a registry. It is the
5
+ * high-level front door over {@link buildContainer}: a memoized async builder that resolves to a
6
+ * SHAPED result (`{ imageUri, repository, tag }`) so callers can use the full URI for a resource's
7
+ * image field OR the split `repository`/`tag` for a Helm chart's image values without re-splitting.
8
8
  *
9
- * `.imageUri` is a `ContainerImageRef` (a distinct brand, NOT a `KubernetesRef`): typekro resolves it
10
- * CLIENT-SIDE to a literal image URI before apply (direct mode) / RGD serialization (kro mode), by
11
- * delegating to the existing {@link buildContainer} once per container identity. Kro never sees a
12
- * build, only a literal image string.
9
+ * An image build is an async, client-side, pre-deploy side effect, so `container()` is honest about
10
+ * that: you `await` it. It is NOT a deferred reference resolve images in (async) setup code before
11
+ * composing, then feed the resulting literals into resources or chart values.
12
+ *
13
+ * Memoization: the build is keyed by container identity (`id ?? imageName`) and cached, so awaiting
14
+ * the same container many times (e.g. several deployments sharing one image) builds it exactly ONCE.
13
15
  *
14
16
  * @example
15
17
  * ```typescript
16
18
  * import { container } from 'typekro/containers';
17
19
  *
18
- * // Defined OUTSIDE the composition:
19
- * const appImage = container({ context: './app', imageName: 'app', registry: { type: 'ecr' } });
20
+ * const img = await container({ context: './app', imageName: 'app', registry: { type: 'ecr' } });
21
+ * // img.imageUri → '123.dkr.ecr.us-east-1.amazonaws.com/app:sha-abc'
22
+ * // img.repository → '123.dkr.ecr.us-east-1.amazonaws.com/app' img.tag → 'sha-abc'
20
23
  *
21
- * // Referenced WITHIN one:
22
- * kubernetesComposition(def, () => {
23
- * Deployment({ name: 'app', image: appImage.imageUri, ports: [{ containerPort: 3000 }] });
24
- * });
24
+ * Deployment({ name: 'app', image: img.imageUri, ports: [{ containerPort: 3000 }] });
25
+ * // or for a Helm chart's split image values: { repository: img.repository, tag: img.tag }
25
26
  * ```
26
27
  */
27
- import { CONTAINER_IMAGE_REF_BRAND } from '../constants/brands.js';
28
+ import { buildContainer } from './build.js';
29
+ /**
30
+ * Split a full image URI into `{ repository, tag }`. Handles digest form (`repo@sha256:…`) and tag
31
+ * form (`repo:tag`), registry-port-colon aware (a colon in `host:port/...` is not the tag separator).
32
+ */
33
+ export function splitImageUri(uri) {
34
+ const at = uri.lastIndexOf('@');
35
+ if (at !== -1)
36
+ return { repository: uri.slice(0, at), tag: uri.slice(at + 1) };
37
+ const colon = uri.lastIndexOf(':');
38
+ const slash = uri.lastIndexOf('/');
39
+ return colon > slash
40
+ ? { repository: uri.slice(0, colon), tag: uri.slice(colon + 1) }
41
+ : { repository: uri, tag: 'latest' };
42
+ }
43
+ /** Build memoization, keyed by container identity (`id ?? imageName`) — builds each image once. */
44
+ const buildCache = new Map();
45
+ async function buildAndShape(options, build) {
46
+ const { id: _id, ...buildOptions } = options;
47
+ const result = await build({ ...buildOptions, tag: buildOptions.tag ?? 'content-hash' });
48
+ const { repository, tag } = splitImageUri(result.imageUri);
49
+ return { imageUri: result.imageUri, repository, tag };
50
+ }
28
51
  /**
29
- * Declare a container image as a first-class typekro utility (see the module doc). Returns a handle
30
- * whose `.imageUri` is referenced from resources; the build (via {@link buildContainer}) happens once
31
- * at deploy time and the literal URI is substituted before apply / serialization.
52
+ * Build a container image (delegating to {@link buildContainer}) and resolve to its shaped result.
53
+ * Memoized by identity see the module doc. `build` is an injectable test seam; production callers
54
+ * pass only `options`.
32
55
  */
33
- export function container(options) {
34
- const { id, ...buildOptions } = options;
35
- const containerId = id ?? buildOptions.imageName;
36
- const ref = {
37
- [CONTAINER_IMAGE_REF_BRAND]: true,
38
- containerId,
39
- buildOptions,
40
- };
41
- // Typed as `string` (assignable to any image field) but a branded ref at runtime — mirrors how
42
- // typekro's schema/resource refs present as their underlying type while carrying runtime markers.
43
- return { imageUri: ref };
56
+ export function container(options, build = buildContainer) {
57
+ const key = options.id ?? options.imageName;
58
+ let pending = buildCache.get(key);
59
+ if (!pending) {
60
+ pending = buildAndShape(options, build);
61
+ buildCache.set(key, pending);
62
+ }
63
+ return pending;
44
64
  }
45
- /** Type guard: is `value` a {@link ContainerImageRef} (the `.imageUri` of a `container()`)? */
46
- export function isContainerImageRef(value) {
47
- return (typeof value === 'object' &&
48
- value !== null &&
49
- value[CONTAINER_IMAGE_REF_BRAND] === true);
65
+ /** Clear the build memoization cache. Intended for tests/long-lived processes that need a rebuild. */
66
+ export function clearContainerCache() {
67
+ buildCache.clear();
50
68
  }
51
69
  //# sourceMappingURL=image.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"image.js","sourceRoot":"","sources":["../../../src/core/containers/image.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAkCnE;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,OAAyB;IACjD,MAAM,EAAE,EAAE,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;IACxC,MAAM,WAAW,GAAG,EAAE,IAAI,YAAY,CAAC,SAAS,CAAC;IACjD,MAAM,GAAG,GAA8B;QACrC,CAAC,yBAAyB,CAAC,EAAE,IAAI;QACjC,WAAW;QACX,YAAY;KACb,CAAC;IACF,+FAA+F;IAC/F,kGAAkG;IAClG,OAAO,EAAE,QAAQ,EAAE,GAAwB,EAAE,CAAC;AAChD,CAAC;AAED,+FAA+F;AAC/F,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAChD,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACb,KAAiC,CAAC,yBAAyB,CAAC,KAAK,IAAI,CACvE,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"image.js","sourceRoot":"","sources":["../../../src/core/containers/image.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAmB5C;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,MAAM,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAChC,IAAI,EAAE,KAAK,CAAC,CAAC;QAAE,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;IAC/E,MAAM,KAAK,GAAG,GAAG,CAAC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,OAAO,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,sGAAsG;AACtG,MAAM,UAAU,mBAAmB;IACjC,UAAU,CAAC,KAAK,EAAE,CAAC;AACrB,CAAC"}
@@ -5,25 +5,21 @@
5
5
  * Returns image URIs for use in TypeKro compositions.
6
6
  *
7
7
  * The low-level `buildContainer` builds + pushes imperatively and returns a URI. The higher-level
8
- * `container()` utility wraps it declaratively: define an image once at program scope and reference
9
- * its `.imageUri` from resources inside a composition typekro builds it (via `buildContainer`) and
10
- * substitutes the literal URI at deploy time.
8
+ * `container()` is a memoized async builder that resolves to a SHAPED result (`{ imageUri,
9
+ * repository, tag }`) `await` it in setup code, then feed the full URI to a resource's image field
10
+ * or the split `repository`/`tag` to a Helm chart's image values.
11
11
  *
12
12
  * @example
13
13
  * ```typescript
14
- * import { buildContainer, container } from 'typekro/containers';
14
+ * import { container } from 'typekro/containers';
15
15
  *
16
- * // Imperative (build now, get a URI):
17
- * const { imageUri } = await buildContainer({ context: './app', imageName: 'app', registry: { type: 'orbstack' } });
18
- *
19
- * // Declarative (defined outside a composition, referenced within):
20
- * const appImage = container({ context: './app', imageName: 'app', registry: { type: 'ecr' } });
21
- * // … later, inside a composition: Deployment({ image: appImage.imageUri, … })
16
+ * const img = await container({ context: './app', imageName: 'app', registry: { type: 'ecr' } });
17
+ * Deployment({ image: img.imageUri, }); // full URI
18
+ * // or chart values: { repository: img.repository, tag: img.tag }
22
19
  * ```
23
20
  */
24
21
  export { buildContainer } from './build.js';
25
22
  export { ContainerBuildError } from './errors.js';
26
- export { container, type ContainerImage, type ContainerImageRef, type ContainerOptions, isContainerImageRef } from './image.js';
27
- export { hasContainerImageRefs, resolveContainerImages } from './resolve.js';
23
+ export { type ContainerImage, type ContainerOptions, clearContainerCache, container, splitImageUri, } from './image.js';
28
24
  export type { ContainerBuildOptions, ContainerBuildResult, EcrRegistryConfig, OrbstackRegistryConfig, RegistryConfig, } from './registries/types.js';
29
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/containers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAChI,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC7E,YAAY,EACV,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,GACf,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/containers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,mBAAmB,EACnB,SAAS,EACT,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,GACf,MAAM,uBAAuB,CAAC"}
@@ -5,24 +5,20 @@
5
5
  * Returns image URIs for use in TypeKro compositions.
6
6
  *
7
7
  * The low-level `buildContainer` builds + pushes imperatively and returns a URI. The higher-level
8
- * `container()` utility wraps it declaratively: define an image once at program scope and reference
9
- * its `.imageUri` from resources inside a composition typekro builds it (via `buildContainer`) and
10
- * substitutes the literal URI at deploy time.
8
+ * `container()` is a memoized async builder that resolves to a SHAPED result (`{ imageUri,
9
+ * repository, tag }`) `await` it in setup code, then feed the full URI to a resource's image field
10
+ * or the split `repository`/`tag` to a Helm chart's image values.
11
11
  *
12
12
  * @example
13
13
  * ```typescript
14
- * import { buildContainer, container } from 'typekro/containers';
14
+ * import { container } from 'typekro/containers';
15
15
  *
16
- * // Imperative (build now, get a URI):
17
- * const { imageUri } = await buildContainer({ context: './app', imageName: 'app', registry: { type: 'orbstack' } });
18
- *
19
- * // Declarative (defined outside a composition, referenced within):
20
- * const appImage = container({ context: './app', imageName: 'app', registry: { type: 'ecr' } });
21
- * // … later, inside a composition: Deployment({ image: appImage.imageUri, … })
16
+ * const img = await container({ context: './app', imageName: 'app', registry: { type: 'ecr' } });
17
+ * Deployment({ image: img.imageUri, }); // full URI
18
+ * // or chart values: { repository: img.repository, tag: img.tag }
22
19
  * ```
23
20
  */
24
21
  export { buildContainer } from './build.js';
25
22
  export { ContainerBuildError } from './errors.js';
26
- export { container, isContainerImageRef } from './image.js';
27
- export { hasContainerImageRefs, resolveContainerImages } from './resolve.js';
23
+ export { clearContainerCache, container, splitImageUri, } from './image.js';
28
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/containers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,SAAS,EAAsE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAChI,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/containers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE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B;IA8CjC,OAAO,CAAC,8BAA8B;IAsBtC,OAAO,CAAC,kBAAkB;CAI3B;AAwED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,SAAS,iBAAiB,EAC/B,OAAO,SAAS,iBAAiB,EAEjC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAC7C,gBAAgB,EAAE,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,EAElD,aAAa,CAAC,EAAE,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,EAClD,OAAO,GAAE,cAAmB,GAC3B,qBAAqB,CAAC,KAAK,EAAE,OAAO,CAAC,CAQvC"}
@@ -10,7 +10,6 @@ import { isCelExpression, isKubernetesRef } from '../../utils/type-guards.js';
10
10
  import { applyAspects } from '../aspects/apply.js';
11
11
  import { createCompositionContext, runWithCompositionContext } from '../composition/context.js';
12
12
  import { buildNestedCompositionAliasTargets } from '../composition/nested-status-cel.js';
13
- import { hasContainerImageRefs, resolveContainerImages } from '../containers/index.js';
14
13
  import { DEFAULT_DELETE_TIMEOUT, DEFAULT_FAST_POLL_INTERVAL, DEFAULT_MAX_RECURSION_DEPTH, } from '../config/defaults.js';
15
14
  import { KUBERNETES_REF_SCHEMA_MARKER_SOURCE } from '../constants/brands.js';
16
15
  import { DependencyResolver } from '../dependencies/index.js';
@@ -128,12 +127,6 @@ export class DirectResourceFactoryImpl {
128
127
  kind: this.schemaDefinition.kind,
129
128
  name: this.name,
130
129
  });
131
- // Build + substitute any container() image refs to literal URIs (via buildContainer) before any
132
- // resource is applied — images are client-side artifacts, never cluster references.
133
- const resourceList = Object.values(this.resources);
134
- if (hasContainerImageRefs(resourceList)) {
135
- await resolveContainerImages(resourceList);
136
- }
137
130
  // Use the consolidated deployment strategy
138
131
  const strategy = this.getDeploymentStrategy();
139
132
  this.logger.debug('Got deployment strategy', {