-
#220
de414dd
Thanks @RealityAnomaly! - Set model-defined props outside constructor to ensureuseDefineForClassFields
compatibility. -
Updated dependencies [
de414dd
]:- @kubernetes-models/[email protected]
- @kubernetes-models/[email protected]
-
#216
db67b32
Thanks @RealityAnomaly! - Append/index
to generated paths to ensure correct import handling. -
Updated dependencies [
db67b32
]:- @kubernetes-models/[email protected]
- #199
dba981d
Thanks @tommy351! - Pre-compile OpenAPI schema into a validate function. This should improve the performance of first-time validation, but the package size will slightly increase.
- Updated dependencies [
d9aae82
,8440a52
,10ca286
,3a6a6c1
,dba981d
,d076453
,d076453
,d076453
,8440a52
,d076453
]:- @kubernetes-models/[email protected]
- @kubernetes-models/[email protected]
- @kubernetes-models/[email protected]
- Updated dependencies [
915b6dd
]:- @kubernetes-models/[email protected]
- @kubernetes-models/[email protected]
- @kubernetes-models/[email protected]
- Updated dependencies [
50d1914
]:- @kubernetes-models/[email protected]
- @kubernetes-models/[email protected]
- @kubernetes-models/[email protected]
- Updated dependencies [
73daa2b
,09051d0
]:- @kubernetes-models/[email protected]
- @kubernetes-models/[email protected]
- @kubernetes-models/[email protected]
-
767314d
Thanks @tommy351! - Simplify export map.// Before { "exports": { "import": { "types": "./dist/index.d.ts", "default": "./dist/index.mjs" }, "require": { "types": "./dist/index.d.ts", "default": "./dist/index.js" } } } // After { "exports": { "types": "./dist/index.d.ts", "import": "./dist/index.mjs", "require": "./dist/index.js" } }
-
Updated dependencies [
9816d36
,767314d
]:- @kubernetes-models/[email protected]
- @kubernetes-models/[email protected]
- @kubernetes-models/[email protected]
-
d46053b
Thanks @tommy351! - Decrease the size of export map inpackage.json
by using wildcard pattern (*
).// Before { "exports": { "./v1/Pod": { "import": "./v1/Pod.mjs", "require": "./v1/Pod.js" }, "./v1/Service": { "import": "./v1/Service.mjs", "require": "./v1/Service.js" } } } // After { "exports": { "./v1/*": { "import": "./v1/*.mjs", "require": "./v1/*.js" } } }
-
f82b1cc
Thanks @tommy351! - Support TypeScriptnodenext
module resolution by addingtypes
to export map.// Before { "exports": { "./v1/Pod": { "import": "./v1/Pod.mjs", "require": "./v1/Pod.js" } } } // After { "exports": { "./v1/Pod": { "import": { "types": "./v1/Pod.d.ts", "default": "./v1/Pod.mjs" } "require": { "types": "./v1/Pod.d.ts", "default": "./v1/Pod.js" } } } }
- Updated dependencies []:
- @kubernetes-models/[email protected]
- Updated dependencies []:
- @kubernetes-models/[email protected]
- Updated dependencies [
ef175ce
]:- @kubernetes-models/[email protected]
- Updated dependencies [
ac8d1c5
,d91ff07
,a0d4e70
,8a99963
]:- @kubernetes-models/[email protected]
- @kubernetes-models/[email protected]
- @kubernetes-models/[email protected]
- Updated dependencies [
6e51206
]:- @kubernetes-models/[email protected]
- Updated dependencies []:
- @kubernetes-models/[email protected]
-
#68
8b610d0
Thanks @tommy351! - All models withapiVersion
andkind
properties now come with a new static methodis
, which returnstrue
when the input value contains the sameapiVersion
andkind
with the model.This function implements TypeScript type guard, which is very useful for narrowing down types.
Please noted that this function only checks
apiVersion
andkind
, other properties may still be invalid.Below is an example of the type guard function.
import { Pod } from "kubernetes-models/v1/Pod"; if (Pod.is(value)) { // value is a Pod. }
- Updated dependencies [
2b18c6b
,04197d2
,8b610d0
,e904810
]:- @kubernetes-models/[email protected]
- @kubernetes-models/[email protected]
- #50 Thanks @mstergianis! - First release.