@treeseed/sdk 0.13.0-rc.48 → 0.13.0-rc.49

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.
@@ -3,6 +3,10 @@ const identifier = z.string().regex(/^[a-z][a-z0-9.-]{1,63}$/u);
3
3
  const digest = z.string().regex(/^sha256:[a-f0-9]{64}$/u);
4
4
  const gitCommit = z.string().regex(/^[a-f0-9]{40}$/u);
5
5
  const packageVersion = z.string().min(1).regex(/^[0-9][0-9A-Za-z.+:~-]*$/u);
6
+ const ociRepository = z.string().min(1).max(255).regex(
7
+ /^(?:(?:localhost|[a-z0-9]+(?:[.-][a-z0-9]+)+)(?::[1-9][0-9]{0,4})?\/)?[a-z0-9]+(?:[._-][a-z0-9]+)*(?:\/[a-z0-9]+(?:[._-][a-z0-9]+)*)*$/u,
8
+ "OCI repositories must be normalized lowercase names without a scheme, tag, digest, credentials, or traversal."
9
+ );
6
10
  const localAlias = z.string().regex(
7
11
  /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)*\.localhost$/u,
8
12
  "Host aliases must use the .localhost namespace."
@@ -146,7 +150,7 @@ const packageRuntimeSchema = z.object({
146
150
  if (new Set(endpointIds).size !== endpointIds.length) context.addIssue({ code: z.ZodIssueCode.custom, path: ["services"], message: "Endpoint identities must be unique within a component." });
147
151
  });
148
152
  const catalogPackageSchema = z.object({ name: z.string().regex(/^treeseed(?:-[a-z0-9-]+)?$/u), version: packageVersion, architecture: z.enum(["amd64", "all"]), origin: z.literal("TreeSeed Deployment"), order: z.number().int().nonnegative() }).strict();
149
- const catalogImageSchema = z.object({ role: identifier, repository: z.string().regex(/^treeseed\/[a-z0-9-]+$/u), digest, platforms: z.array(z.enum(["linux/amd64", "linux/arm64"])).min(1), consumers: z.array(identifier).min(1) }).strict();
153
+ const catalogImageSchema = z.object({ role: identifier, repository: ociRepository, digest, platforms: z.array(z.enum(["linux/amd64", "linux/arm64"])).min(1), consumers: z.array(identifier).min(1) }).strict();
150
154
  const componentReleaseSchema = z.object({
151
155
  schemaVersion: z.literal("treeseed.component-release/v1"),
152
156
  componentId: identifier,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/sdk",
3
- "version": "0.13.0-rc.48",
3
+ "version": "0.13.0-rc.49",
4
4
  "description": "Portable TreeSeed contracts, standards, and typed remote control-plane clients.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {