mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
chore: bump sdk to beta.53, wrap z.deepPartial with passthrough
This commit is contained in:
2
container-runtime/package-lock.json
generated
2
container-runtime/package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = <T>(a: _z.ZodType<T>) => _z.ZodType<DeepPartial<T>>
|
||||
|
||||
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 extends { _zod: { output: any } }> = T['_zod']['output']
|
||||
export type input<T extends { _zod: { input: any } }> = T['_zod']['input']
|
||||
export type output<T extends { _zod: { output: any } }> = T['_zod']['output']
|
||||
// Add deepPartial to z at runtime, wrapping with .passthrough() to allow extra keys
|
||||
;(_z as any).deepPartial = <T>(a: _z.ZodType<T>) =>
|
||||
(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'
|
||||
|
||||
4
sdk/package/package-lock.json
generated
4
sdk/package/package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user