@powerlines/deepkit 0.7.5 → 0.7.7

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.
Files changed (88) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +31 -0
  2. package/dist/_virtual/_rolldown/runtime.mjs +8 -0
  3. package/dist/capnp.cjs +955 -46
  4. package/dist/capnp.d.cts +41 -41
  5. package/dist/capnp.d.mts +41 -41
  6. package/dist/capnp.mjs +911 -2
  7. package/dist/esbuild-plugin.cjs +47 -2
  8. package/dist/esbuild-plugin.d.cts +1 -1
  9. package/dist/esbuild-plugin.d.mts +1 -1
  10. package/dist/esbuild-plugin.mjs +47 -2
  11. package/dist/index.cjs +3 -4
  12. package/dist/index.mjs +3 -4
  13. package/dist/{capnp-BLCHrDSY.cjs → packages/deepkit/schemas/reflection.cjs} +3 -1180
  14. package/dist/{reflection-Bhe75GyI.d.mts → packages/deepkit/schemas/reflection.d.cts} +2 -2
  15. package/dist/{reflection-DGOuMF8F.d.cts → packages/deepkit/schemas/reflection.d.mts} +2 -2
  16. package/dist/{capnp-BqAglxrS.mjs → packages/deepkit/schemas/reflection.mjs} +2 -910
  17. package/dist/reflect-type.cjs +5 -5
  18. package/dist/reflect-type.d.cts +1 -1
  19. package/dist/reflect-type.d.mts +1 -1
  20. package/dist/reflect-type.mjs +2 -2
  21. package/dist/resolve-reflections.cjs +1 -1
  22. package/dist/rolldown-plugin.cjs +1 -1
  23. package/dist/transformer.cjs +6 -5
  24. package/dist/transformer.d.cts +1 -1
  25. package/dist/transformer.d.mts +1 -1
  26. package/dist/transformer.mjs +2 -1
  27. package/dist/transpile.cjs +2 -2
  28. package/dist/transpile.d.cts +1 -1
  29. package/dist/transpile.d.mts +1 -1
  30. package/dist/types.d.cts +3 -3
  31. package/dist/types.d.mts +3 -3
  32. package/dist/utilities.cjs +116 -8
  33. package/dist/utilities.d.cts +1 -1
  34. package/dist/utilities.d.mts +1 -1
  35. package/dist/utilities.mjs +110 -2
  36. package/dist/{compiler-B-zwyGQf.d.cts → vendor/compiler-BYhFaVxE.d.mts} +3 -3
  37. package/dist/{compiler-DTp8Jvav.cjs → vendor/compiler-Ci5aO9pY.cjs} +2 -2
  38. package/dist/{compiler-BUUdv7wG.mjs → vendor/compiler-CqkzeoNX.mjs} +3 -3
  39. package/dist/{compiler-BzOZmhWO.d.mts → vendor/compiler-Dz2b4nOM.d.cts} +3 -3
  40. package/dist/{config-B2hS4_tR.d.mts → vendor/config-BTErH18l.d.mts} +1 -1
  41. package/dist/{config-DCmu3CV2.d.cts → vendor/config-Cc2qE8fH.d.cts} +1 -1
  42. package/dist/{config-CuXC21KA.mjs → vendor/config-eSNKiBGB.mjs} +1 -1
  43. package/dist/vendor/core.cjs +1 -1
  44. package/dist/vendor/core.d.cts +1 -1
  45. package/dist/vendor/core.d.mts +1 -1
  46. package/dist/vendor/core.mjs +1 -1
  47. package/dist/{string-CjkshhTG.mjs → vendor/string-DoT35ViA.mjs} +1 -1
  48. package/dist/{type-DfwJ6GTs.d.mts → vendor/type-2yMJb9Mw.d.cts} +1 -1
  49. package/dist/{type-DR66Hepn.d.cts → vendor/type-BoBEcrg7.d.mts} +1 -1
  50. package/dist/vendor/type-compiler/compiler.cjs +1 -1
  51. package/dist/vendor/type-compiler/compiler.d.cts +1 -1
  52. package/dist/vendor/type-compiler/compiler.d.mts +1 -1
  53. package/dist/vendor/type-compiler/compiler.mjs +1 -1
  54. package/dist/vendor/type-compiler/config.cjs +1 -1
  55. package/dist/vendor/type-compiler/config.d.cts +1 -1
  56. package/dist/vendor/type-compiler/config.d.mts +1 -1
  57. package/dist/vendor/type-compiler/config.mjs +1 -1
  58. package/dist/vendor/type-compiler/index.cjs +3 -3
  59. package/dist/vendor/type-compiler/index.d.cts +2 -2
  60. package/dist/vendor/type-compiler/index.d.mts +2 -2
  61. package/dist/vendor/type-compiler/index.mjs +2 -2
  62. package/dist/vendor/type-spec.cjs +1 -1
  63. package/dist/vendor/type-spec.d.cts +1 -1
  64. package/dist/vendor/type-spec.d.mts +1 -1
  65. package/dist/vendor/type-spec.mjs +1 -1
  66. package/dist/{type-BWm74eaQ.mjs → vendor/type-wscUl8NW.mjs} +1 -1
  67. package/dist/vendor/type.cjs +9375 -268
  68. package/dist/vendor/type.d.cts +2969 -3
  69. package/dist/vendor/type.d.mts +2969 -3
  70. package/dist/vendor/type.mjs +9109 -3
  71. package/dist/{types-BO3PJV5p.d.mts → vendor/types-BwPWMe3m.d.mts} +1 -1
  72. package/dist/{types-Bb6lL3KL.d.cts → vendor/types-exLGvFgG.d.cts} +1 -1
  73. package/package.json +13 -21
  74. package/dist/config-C0OHvihx.d.mts +0 -1
  75. package/dist/config-GPeRZeGl.d.cts +0 -1
  76. package/dist/esbuild-plugin-BUYqx8_5.cjs +0 -80
  77. package/dist/esbuild-plugin-CRQUmm86.mjs +0 -75
  78. package/dist/type-8AL5U7vn.d.cts +0 -2969
  79. package/dist/type-BDuj5wg2.d.mts +0 -2969
  80. package/dist/type-C7UXbXfx.cjs +0 -10688
  81. package/dist/type-ma8o4dJG.mjs +0 -9110
  82. package/dist/utilities-CT_jcB5h.mjs +0 -1483
  83. package/dist/utilities-Dr3TzxMb.cjs +0 -1523
  84. /package/dist/{chunk-BmvPcxpV.cjs → vendor/chunk-BmvPcxpV.cjs} +0 -0
  85. /package/dist/{chunk-CgI6uo-e.mjs → vendor/chunk-CgI6uo-e.mjs} +0 -0
  86. /package/dist/{config-GVyELKY1.cjs → vendor/config-BbFVGRVh.cjs} +0 -0
  87. /package/dist/{string-CpVz34Gv.cjs → vendor/string-LTCnMzW_.cjs} +0 -0
  88. /package/dist/{type-DhqntM0q.cjs → vendor/type-fEQrgtBF.cjs} +0 -0
@@ -508,4 +508,4 @@ declare type __ΩInjectMeta = any[];
508
508
  declare type __ΩInject = any[];
509
509
  //#endregion
510
510
  export { isClassInstance as $, ensureError as A, zip as At, getCurrentFileName as B, changeClass as C, range as Ct, createStack as D, sleep as Dt, createDynamicClass as E, size as Et, formatError as F, hasProperty as G, getObjectKeysSize as H, forwardTypeArguments as I, inDebugMode as J, humanBytes as K, getClassName as L, first as M, firstKey as N, deletePathValue as O, stringifyValueWithType as Ot, fixAsyncOperation as P, isClass as Q, getClassPropertyName as R, average as S, prettyPrintObject as St, copy as T, setPathValue as Tt, getParentClass as U, getInheritanceChain as V, getPathValue as W, isArray as X, indexOf as Y, isAsyncFunction as Z, appendObject as _, last as _t, __ΩInjectMeta as a, isNull as at, assertInstanceOf as b, mergeStack as bt, AbstractClassType as c, isObject as ct, CustomError as d, isPromise as dt, isConstructable as et, ExtractClassType as f, isPrototypeOfBase as ft, __ΩExtractClassType as g, iterableSize as gt, __ΩCustomError as h, isUndefined as ht, __ΩInject as i, isIterable as it, escapeRegExp as j, empty as k, time as kt, AsyncFunction as l, isObjectLiteral as lt, __ΩClassType as m, isString as mt, InjectMeta as n, isGlobalClass as nt, __ΩTypeAnnotation as o, isNumber as ot, __ΩAbstractClassType as p, isSet as pt, identifyType as q, TypeAnnotation as r, isInteger as rt, CompilerContext as s, isNumeric as st, Inject as t, isFunction as tt, ClassType as u, isPlainObject as ut, applyDefaults as v, lastKey as vt, collectForMicrotask as w, rangeArray as wt, asyncOperation as x, prependObjectKeys as xt, assertDefined as y, mergePromiseStack as yt, getClassTypeFromInstance as z };
511
- //# sourceMappingURL=types-BO3PJV5p.d.mts.map
511
+ //# sourceMappingURL=types-BwPWMe3m.d.mts.map
@@ -508,4 +508,4 @@ declare type __ΩInjectMeta = any[];
508
508
  declare type __ΩInject = any[];
509
509
  //#endregion
510
510
  export { isClassInstance as $, ensureError as A, zip as At, getCurrentFileName as B, changeClass as C, range as Ct, createStack as D, sleep as Dt, createDynamicClass as E, size as Et, formatError as F, hasProperty as G, getObjectKeysSize as H, forwardTypeArguments as I, inDebugMode as J, humanBytes as K, getClassName as L, first as M, firstKey as N, deletePathValue as O, stringifyValueWithType as Ot, fixAsyncOperation as P, isClass as Q, getClassPropertyName as R, average as S, prettyPrintObject as St, copy as T, setPathValue as Tt, getParentClass as U, getInheritanceChain as V, getPathValue as W, isArray as X, indexOf as Y, isAsyncFunction as Z, appendObject as _, last as _t, __ΩInjectMeta as a, isNull as at, assertInstanceOf as b, mergeStack as bt, AbstractClassType as c, isObject as ct, CustomError as d, isPromise as dt, isConstructable as et, ExtractClassType as f, isPrototypeOfBase as ft, __ΩExtractClassType as g, iterableSize as gt, __ΩCustomError as h, isUndefined as ht, __ΩInject as i, isIterable as it, escapeRegExp as j, empty as k, time as kt, AsyncFunction as l, isObjectLiteral as lt, __ΩClassType as m, isString as mt, InjectMeta as n, isGlobalClass as nt, __ΩTypeAnnotation as o, isNumber as ot, __ΩAbstractClassType as p, isSet as pt, identifyType as q, TypeAnnotation as r, isInteger as rt, CompilerContext as s, isNumeric as st, Inject as t, isFunction as tt, ClassType as u, isPlainObject as ut, applyDefaults as v, lastKey as vt, collectForMicrotask as w, rangeArray as wt, asyncOperation as x, prependObjectKeys as xt, assertDefined as y, mergePromiseStack as yt, getClassTypeFromInstance as z };
511
- //# sourceMappingURL=types-Bb6lL3KL.d.cts.map
511
+ //# sourceMappingURL=types-exLGvFgG.d.cts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/deepkit",
3
- "version": "0.7.5",
3
+ "version": "0.7.7",
4
4
  "private": false,
5
5
  "description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
6
6
  "keywords": ["deepkit", "powerlines", "storm-software"],
@@ -54,20 +54,6 @@
54
54
  "default": "./dist/index.mjs"
55
55
  }
56
56
  },
57
- "./index": {
58
- "import": {
59
- "types": "./dist/index.d.mts",
60
- "default": "./dist/index.mjs"
61
- },
62
- "require": {
63
- "types": "./dist/index.d.cts",
64
- "default": "./dist/index.cjs"
65
- },
66
- "default": {
67
- "types": "./dist/index.d.mts",
68
- "default": "./dist/index.mjs"
69
- }
70
- },
71
57
  "./*": {
72
58
  "import": { "types": "./dist/*.d.mts", "default": "./dist/*.mjs" },
73
59
  "require": { "types": "./dist/*.d.cts", "default": "./dist/*.cjs" },
@@ -114,6 +100,11 @@
114
100
  "types": "./dist/vendor/type-compiler/*.d.mts",
115
101
  "default": "./dist/vendor/type-compiler/*.mjs"
116
102
  }
103
+ },
104
+ "./schemas/*": {
105
+ "import": { "types": "./schemas/*.d.mts", "default": "./schemas/*.mjs" },
106
+ "require": { "types": "./schemas/*.d.cts", "default": "./schemas/*.cjs" },
107
+ "default": { "types": "./schemas/*.d.mts", "default": "./schemas/*.mjs" }
117
108
  }
118
109
  },
119
110
  "main": "./dist/index.cjs",
@@ -123,12 +114,14 @@
123
114
  "bin": { "deepkit-install": "bin/deepkit-install.cjs" },
124
115
  "files": ["bin/*", "dist/**/*", "schemas/*"],
125
116
  "dependencies": {
126
- "@powerlines/core": "^0.13.7",
127
- "@powerlines/plugin-esbuild": "^0.13.394",
117
+ "@powerlines/core": "^0.13.8",
118
+ "@powerlines/plugin-esbuild": "^0.13.395",
128
119
  "@storm-software/config-tools": "^1.189.75",
129
120
  "@stryke/capnp": "^0.12.92",
130
121
  "@stryke/fs": "^0.33.66",
131
122
  "@stryke/path": "^0.27.4",
123
+ "@stryke/json": "^0.14.12",
124
+ "@stryke/helpers": "^0.10.8",
132
125
  "@stryke/type-checks": "^0.6.1",
133
126
  "@stryke/types": "^0.11.3",
134
127
  "defu": "^6.1.7",
@@ -142,10 +135,9 @@
142
135
  "@deepkit/type-compiler": "1.0.5",
143
136
  "@deepkit/type-spec": "1.0.1",
144
137
  "@types/node": "^25.6.0",
145
- "dts-bundle-generator": "^9.5.1",
146
- "esbuild": "^0.27.7",
147
138
  "rolldown": "1.0.0-rc.9",
148
- "tsup": "8.4.0"
139
+ "tsdown": "^0.21.7",
140
+ "esbuild": "^0.27.7"
149
141
  },
150
142
  "peerDependencies": { "esbuild": "*", "rolldown": "*" },
151
143
  "peerDependenciesMeta": {
@@ -153,5 +145,5 @@
153
145
  "rolldown": { "optional": true }
154
146
  },
155
147
  "publishConfig": { "access": "public" },
156
- "gitHead": "0930e21b75080a208112efde05ca6a1ff2595b15"
148
+ "gitHead": "43c2bbc1b61adc566664222372ab8b26544b542e"
157
149
  }
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1,80 +0,0 @@
1
- const require_chunk = require('./chunk-BmvPcxpV.cjs');
2
- const require_transpile = require('./transpile.cjs');
3
- let _stryke_type_checks = require("@stryke/type-checks");
4
- let typescript = require("typescript");
5
-
6
- //#region ../../node_modules/.pnpm/@stryke+helpers@0.10.8/node_modules/@stryke/helpers/dist/omit.mjs
7
- /**
8
- * Creates a new object with specified keys omitted.
9
- *
10
- * This function takes an object and an array of keys, and returns a new object that
11
- * excludes the properties corresponding to the specified keys.
12
- *
13
- * @param obj - The object to omit keys from.
14
- * @param keys - An array of keys to be omitted from the object.
15
- * @returns A new object with the specified keys omitted.
16
- *
17
- * @example
18
- * ```typescript
19
- * const obj = { a: 1, b: 2, c: 3 };
20
- * const result = omit(obj, ['b', 'c']);
21
- * // result will be { a: 1 }
22
- * ```
23
- */
24
- function omit(obj, keys) {
25
- const result = { ...obj };
26
- for (let i = 0; i < keys.length; i++) {
27
- const key = keys[i];
28
- if (key) delete result[key];
29
- }
30
- return result;
31
- }
32
-
33
- //#endregion
34
- //#region src/esbuild-plugin.ts
35
- /**
36
- * Esbuild plugin for Deepkit Type reflections.
37
- *
38
- * @param context - The Powerlines context.
39
- * @param options - Optional esbuild onLoad options and reflection configuration.
40
- * @returns An esbuild plugin instance.
41
- */
42
- const esbuildPlugin = (context, options = {}) => {
43
- return {
44
- name: "powerlines:deepkit",
45
- setup(build) {
46
- build.onLoad({
47
- filter: /\.(m|c)?tsx?$/,
48
- ...options.onLoad ?? {}
49
- }, async (args) => {
50
- const contents = await context.fs.read(args.path);
51
- if (!contents) return null;
52
- if (args.pluginData?.isReflected) return {
53
- contents,
54
- loader: "ts",
55
- pluginData: { isReflected: true }
56
- };
57
- const result = require_transpile.transpile(context, contents, args.path, omit(options, ["onLoad"]));
58
- if (result.diagnostics && result.diagnostics.length > 0) if (result.diagnostics.some((d) => d.category === typescript.DiagnosticCategory.Error)) {
59
- const errorMessage = `Deepkit Type reflection transpilation errors: ${args.path} \n ${result.diagnostics.filter((d) => d.category === typescript.DiagnosticCategory.Error).map((d) => `-${d.file ? `${d.file.fileName}:` : ""} ${(0, _stryke_type_checks.isString)(d.messageText) ? d.messageText : d.messageText.messageText} (at ${d.start}:${d.length})`).join("\n")}`;
60
- context.error(errorMessage);
61
- throw new Error(errorMessage);
62
- } else if (result.diagnostics.some((d) => d.category === typescript.DiagnosticCategory.Warning)) context.warn(`Deepkit Type reflection transpilation warnings: ${args.path} \n ${result.diagnostics.filter((d) => d.category === typescript.DiagnosticCategory.Warning).map((d) => `-${d.file ? `${d.file.fileName}:` : ""} ${(0, _stryke_type_checks.isString)(d.messageText) ? d.messageText : d.messageText.messageText} (at ${d.start}:${d.length})`).join("\n")}`);
63
- else context.debug(`Deepkit Type reflection transpilation diagnostics: ${args.path} \n ${result.diagnostics.map((d) => `-${d.file ? `${d.file.fileName}:` : ""} ${(0, _stryke_type_checks.isString)(d.messageText) ? d.messageText : d.messageText.messageText} (at ${d.start}:${d.length})`).join("\n")}`);
64
- return {
65
- contents: result.outputText,
66
- loader: "ts",
67
- pluginData: { isReflected: true }
68
- };
69
- });
70
- }
71
- };
72
- };
73
-
74
- //#endregion
75
- Object.defineProperty(exports, 'esbuildPlugin', {
76
- enumerable: true,
77
- get: function () {
78
- return esbuildPlugin;
79
- }
80
- });
@@ -1,75 +0,0 @@
1
- import { transpile } from "./transpile.mjs";
2
- import { isString } from "@stryke/type-checks";
3
- import { DiagnosticCategory } from "typescript";
4
-
5
- //#region ../../node_modules/.pnpm/@stryke+helpers@0.10.8/node_modules/@stryke/helpers/dist/omit.mjs
6
- /**
7
- * Creates a new object with specified keys omitted.
8
- *
9
- * This function takes an object and an array of keys, and returns a new object that
10
- * excludes the properties corresponding to the specified keys.
11
- *
12
- * @param obj - The object to omit keys from.
13
- * @param keys - An array of keys to be omitted from the object.
14
- * @returns A new object with the specified keys omitted.
15
- *
16
- * @example
17
- * ```typescript
18
- * const obj = { a: 1, b: 2, c: 3 };
19
- * const result = omit(obj, ['b', 'c']);
20
- * // result will be { a: 1 }
21
- * ```
22
- */
23
- function omit(obj, keys) {
24
- const result = { ...obj };
25
- for (let i = 0; i < keys.length; i++) {
26
- const key = keys[i];
27
- if (key) delete result[key];
28
- }
29
- return result;
30
- }
31
-
32
- //#endregion
33
- //#region src/esbuild-plugin.ts
34
- /**
35
- * Esbuild plugin for Deepkit Type reflections.
36
- *
37
- * @param context - The Powerlines context.
38
- * @param options - Optional esbuild onLoad options and reflection configuration.
39
- * @returns An esbuild plugin instance.
40
- */
41
- const esbuildPlugin = (context, options = {}) => {
42
- return {
43
- name: "powerlines:deepkit",
44
- setup(build) {
45
- build.onLoad({
46
- filter: /\.(m|c)?tsx?$/,
47
- ...options.onLoad ?? {}
48
- }, async (args) => {
49
- const contents = await context.fs.read(args.path);
50
- if (!contents) return null;
51
- if (args.pluginData?.isReflected) return {
52
- contents,
53
- loader: "ts",
54
- pluginData: { isReflected: true }
55
- };
56
- const result = transpile(context, contents, args.path, omit(options, ["onLoad"]));
57
- if (result.diagnostics && result.diagnostics.length > 0) if (result.diagnostics.some((d) => d.category === DiagnosticCategory.Error)) {
58
- const errorMessage = `Deepkit Type reflection transpilation errors: ${args.path} \n ${result.diagnostics.filter((d) => d.category === DiagnosticCategory.Error).map((d) => `-${d.file ? `${d.file.fileName}:` : ""} ${isString(d.messageText) ? d.messageText : d.messageText.messageText} (at ${d.start}:${d.length})`).join("\n")}`;
59
- context.error(errorMessage);
60
- throw new Error(errorMessage);
61
- } else if (result.diagnostics.some((d) => d.category === DiagnosticCategory.Warning)) context.warn(`Deepkit Type reflection transpilation warnings: ${args.path} \n ${result.diagnostics.filter((d) => d.category === DiagnosticCategory.Warning).map((d) => `-${d.file ? `${d.file.fileName}:` : ""} ${isString(d.messageText) ? d.messageText : d.messageText.messageText} (at ${d.start}:${d.length})`).join("\n")}`);
62
- else context.debug(`Deepkit Type reflection transpilation diagnostics: ${args.path} \n ${result.diagnostics.map((d) => `-${d.file ? `${d.file.fileName}:` : ""} ${isString(d.messageText) ? d.messageText : d.messageText.messageText} (at ${d.start}:${d.length})`).join("\n")}`);
63
- return {
64
- contents: result.outputText,
65
- loader: "ts",
66
- pluginData: { isReflected: true }
67
- };
68
- });
69
- }
70
- };
71
- };
72
-
73
- //#endregion
74
- export { esbuildPlugin as t };
75
- //# sourceMappingURL=esbuild-plugin-CRQUmm86.mjs.map