From 72d573dbd1e16fe1975676bd283bc805b1a1c8b5 Mon Sep 17 00:00:00 2001 From: Aiden McClelland Date: Wed, 25 Feb 2026 17:31:22 -0700 Subject: [PATCH] chore: bump sdk to beta.53, wrap z.deepPartial with passthrough --- container-runtime/package-lock.json | 2 +- sdk/Makefile | 2 +- sdk/base/lib/index.ts | 21 ++++++++++++--------- sdk/package/package-lock.json | 4 ++-- sdk/package/package.json | 2 +- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/container-runtime/package-lock.json b/container-runtime/package-lock.json index 6462a9575..6696ff616 100644 --- a/container-runtime/package-lock.json +++ b/container-runtime/package-lock.json @@ -37,7 +37,7 @@ }, "../sdk/dist": { "name": "@start9labs/start-sdk", - "version": "0.4.0-beta.52", + "version": "0.4.0-beta.53", "license": "MIT", "dependencies": { "@iarna/toml": "^3.0.0", diff --git a/sdk/Makefile b/sdk/Makefile index c8442063e..198510d54 100644 --- a/sdk/Makefile +++ b/sdk/Makefile @@ -70,7 +70,7 @@ base/node_modules: base/package-lock.json node_modules: package/node_modules base/node_modules publish: bundle package/package.json package/README.md package/LICENSE - cd dist && npm publish --access=public + cd dist && npm publish --access=public --tag=latest link: bundle cd dist && npm link diff --git a/sdk/base/lib/index.ts b/sdk/base/lib/index.ts index 5909ad7d1..3ec7b0dae 100644 --- a/sdk/base/lib/index.ts +++ b/sdk/base/lib/index.ts @@ -10,18 +10,21 @@ export * as yaml from 'yaml' export * as inits from './inits' import { z as _z } from 'zod' import { zodDeepPartial } from 'zod-deep-partial' -import { DeepPartial } from './types' +import type { DeepPartial } from './types' type ZodDeepPartial = (a: _z.ZodType) => _z.ZodType> -export const z: typeof _z & { - deepPartial: ZodDeepPartial -} = Object.assign(_z, { deepPartial: zodDeepPartial as ZodDeepPartial }) -// eslint-disable-next-line @typescript-eslint/no-namespace -export namespace z { - export type infer = T['_zod']['output'] - export type input = T['_zod']['input'] - export type output = T['_zod']['output'] +// Add deepPartial to z at runtime, wrapping with .passthrough() to allow extra keys +;(_z as any).deepPartial = (a: _z.ZodType) => + (zodDeepPartial(a) as any).passthrough() + +// Augment zod's z namespace so z.deepPartial is typed +declare module 'zod' { + namespace z { + const deepPartial: ZodDeepPartial + } } +export { _z as z } + export * as utils from './util' diff --git a/sdk/package/package-lock.json b/sdk/package/package-lock.json index 357403d6b..0b8e98d54 100644 --- a/sdk/package/package-lock.json +++ b/sdk/package/package-lock.json @@ -1,12 +1,12 @@ { "name": "@start9labs/start-sdk", - "version": "0.4.0-beta.52", + "version": "0.4.0-beta.53", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@start9labs/start-sdk", - "version": "0.4.0-beta.52", + "version": "0.4.0-beta.53", "license": "MIT", "dependencies": { "@iarna/toml": "^3.0.0", diff --git a/sdk/package/package.json b/sdk/package/package.json index 17e33f606..c7ad06381 100644 --- a/sdk/package/package.json +++ b/sdk/package/package.json @@ -1,6 +1,6 @@ { "name": "@start9labs/start-sdk", - "version": "0.4.0-beta.52", + "version": "0.4.0-beta.53", "description": "Software development kit to facilitate packaging services for StartOS", "main": "./package/lib/index.js", "types": "./package/lib/index.d.ts",