@powerlines/deepkit 0.5.52 → 0.5.54

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.
@@ -1,6 +1,7 @@
1
1
  import { __name } from './chunk-SHUYVCID.js';
2
2
  import { ReflectionKind } from '@powerlines/deepkit/vendor/type';
3
3
  import { Buffer } from 'node:buffer';
4
+ import { isSetObject } from '@stryke/type-checks';
4
5
  import { isNull as isNull$1 } from '@stryke/type-checks/is-null';
5
6
  import { isString as isString$1 } from '@stryke/type-checks/is-string';
6
7
  import { isUndefined as isUndefined$1 } from '@stryke/type-checks/is-undefined';
@@ -2063,7 +2064,9 @@ var c = class o3 extends SuperJSON {
2063
2064
  };
2064
2065
  c.instance.registerCustom({ isApplicable: /* @__PURE__ */ __name((e7) => Buffer.isBuffer(e7), "isApplicable"), serialize: /* @__PURE__ */ __name((e7) => e7.toString(`base64`), "serialize"), deserialize: /* @__PURE__ */ __name((e7) => Buffer.from(e7, `base64`), "deserialize") }, `Bytes`);
2065
2066
  function stringifyDefaultValue(property, value) {
2066
- return stringifyValue(property.type, value ?? property.getDefaultValue());
2067
+ return isSetObject(property) ? stringifyValue(property.type, value ?? property.getDefaultValue()) : stringifyValue({
2068
+ kind: property
2069
+ }, value);
2067
2070
  }
2068
2071
  __name(stringifyDefaultValue, "stringifyDefaultValue");
2069
2072
  function stringifyStringValue(value) {
@@ -3,6 +3,7 @@
3
3
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
4
4
  var type = require('@powerlines/deepkit/vendor/type');
5
5
  var buffer = require('buffer');
6
+ var typeChecks = require('@stryke/type-checks');
6
7
  var isNull$1 = require('@stryke/type-checks/is-null');
7
8
  var isString$1 = require('@stryke/type-checks/is-string');
8
9
  var isUndefined$1 = require('@stryke/type-checks/is-undefined');
@@ -2065,7 +2066,9 @@ var c = class o3 extends SuperJSON {
2065
2066
  };
2066
2067
  c.instance.registerCustom({ isApplicable: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((e7) => buffer.Buffer.isBuffer(e7), "isApplicable"), serialize: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((e7) => e7.toString(`base64`), "serialize"), deserialize: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((e7) => buffer.Buffer.from(e7, `base64`), "deserialize") }, `Bytes`);
2067
2068
  function stringifyDefaultValue(property, value) {
2068
- return stringifyValue(property.type, value ?? property.getDefaultValue());
2069
+ return typeChecks.isSetObject(property) ? stringifyValue(property.type, value ?? property.getDefaultValue()) : stringifyValue({
2070
+ kind: property
2071
+ }, value);
2069
2072
  }
2070
2073
  chunkUSNT2KNT_cjs.__name(stringifyDefaultValue, "stringifyDefaultValue");
2071
2074
  function stringifyStringValue(value) {
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk25EAB3JC_cjs = require('./chunk-25EAB3JC.cjs');
3
+ var chunkN76GLP7K_cjs = require('./chunk-N76GLP7K.cjs');
4
4
  var chunk7FXYDYVQ_cjs = require('./chunk-7FXYDYVQ.cjs');
5
5
  var chunkKGCRCOJQ_cjs = require('./chunk-KGCRCOJQ.cjs');
6
6
  var chunkCJMS4ES3_cjs = require('./chunk-CJMS4ES3.cjs');
@@ -14,31 +14,31 @@ require('./chunk-ORA4UQMU.cjs');
14
14
 
15
15
  Object.defineProperty(exports, "getEnumReflectionType", {
16
16
  enumerable: true,
17
- get: function () { return chunk25EAB3JC_cjs.getEnumReflectionType; }
17
+ get: function () { return chunkN76GLP7K_cjs.getEnumReflectionType; }
18
18
  });
19
19
  Object.defineProperty(exports, "getUnionTypes", {
20
20
  enumerable: true,
21
- get: function () { return chunk25EAB3JC_cjs.getUnionTypes; }
21
+ get: function () { return chunkN76GLP7K_cjs.getUnionTypes; }
22
22
  });
23
23
  Object.defineProperty(exports, "isStringUnion", {
24
24
  enumerable: true,
25
- get: function () { return chunk25EAB3JC_cjs.isStringUnion; }
25
+ get: function () { return chunkN76GLP7K_cjs.isStringUnion; }
26
26
  });
27
27
  Object.defineProperty(exports, "kindToName", {
28
28
  enumerable: true,
29
- get: function () { return chunk25EAB3JC_cjs.kindToName; }
29
+ get: function () { return chunkN76GLP7K_cjs.kindToName; }
30
30
  });
31
31
  Object.defineProperty(exports, "stringifyDefaultValue", {
32
32
  enumerable: true,
33
- get: function () { return chunk25EAB3JC_cjs.stringifyDefaultValue; }
33
+ get: function () { return chunkN76GLP7K_cjs.stringifyDefaultValue; }
34
34
  });
35
35
  Object.defineProperty(exports, "stringifyStringValue", {
36
36
  enumerable: true,
37
- get: function () { return chunk25EAB3JC_cjs.stringifyStringValue; }
37
+ get: function () { return chunkN76GLP7K_cjs.stringifyStringValue; }
38
38
  });
39
39
  Object.defineProperty(exports, "stringifyValue", {
40
40
  enumerable: true,
41
- get: function () { return chunk25EAB3JC_cjs.stringifyValue; }
41
+ get: function () { return chunkN76GLP7K_cjs.stringifyValue; }
42
42
  });
43
43
  Object.defineProperty(exports, "convertFromCapnp", {
44
44
  enumerable: true,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { getEnumReflectionType, getUnionTypes, isStringUnion, kindToName, stringifyDefaultValue, stringifyStringValue, stringifyValue } from './chunk-CP62SE6X.js';
1
+ export { getEnumReflectionType, getUnionTypes, isStringUnion, kindToName, stringifyDefaultValue, stringifyStringValue, stringifyValue } from './chunk-6NY7OJ54.js';
2
2
  export { convertFromCapnp, convertFromCapnpArray, convertFromCapnpBase, convertFromCapnpClassType, convertFromCapnpDefault, convertFromCapnpEnum, convertFromCapnpFunction, convertFromCapnpIndexAccessOrigin, convertFromCapnpInfer, convertFromCapnpIntersection, convertFromCapnpLiteral, convertFromCapnpMethodSignature, convertFromCapnpObjectLiteral, convertFromCapnpOther, convertFromCapnpParameter, convertFromCapnpProperty, convertFromCapnpPropertySignature, convertFromCapnpSimple, convertFromCapnpTagsReflection, convertFromCapnpTuple, convertFromCapnpTupleMember, convertFromCapnpUnion, convertToCapnp, convertToCapnpArray, convertToCapnpBase, convertToCapnpClassType, convertToCapnpDefault, convertToCapnpEnum, convertToCapnpFunction, convertToCapnpIndexAccessOrigin, convertToCapnpInfer, convertToCapnpIntersection, convertToCapnpLiteral, convertToCapnpMethod, convertToCapnpMethodSignature, convertToCapnpObjectLiteral, convertToCapnpOther, convertToCapnpParameter, convertToCapnpProperty, convertToCapnpPropertySignature, convertToCapnpSimple, convertToCapnpTagsReflection, convertToCapnpTuple, convertToCapnpTupleMember, convertToCapnpUnion } from './chunk-TDYIUJGY.js';
3
3
  export { reflectType } from './chunk-XHSSGKUT.js';
4
4
  export { esbuildPlugin } from './chunk-JE36RI7U.js';
@@ -1,35 +1,35 @@
1
1
  'use strict';
2
2
 
3
- var chunk25EAB3JC_cjs = require('./chunk-25EAB3JC.cjs');
3
+ var chunkN76GLP7K_cjs = require('./chunk-N76GLP7K.cjs');
4
4
  require('./chunk-USNT2KNT.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "getEnumReflectionType", {
9
9
  enumerable: true,
10
- get: function () { return chunk25EAB3JC_cjs.getEnumReflectionType; }
10
+ get: function () { return chunkN76GLP7K_cjs.getEnumReflectionType; }
11
11
  });
12
12
  Object.defineProperty(exports, "getUnionTypes", {
13
13
  enumerable: true,
14
- get: function () { return chunk25EAB3JC_cjs.getUnionTypes; }
14
+ get: function () { return chunkN76GLP7K_cjs.getUnionTypes; }
15
15
  });
16
16
  Object.defineProperty(exports, "isStringUnion", {
17
17
  enumerable: true,
18
- get: function () { return chunk25EAB3JC_cjs.isStringUnion; }
18
+ get: function () { return chunkN76GLP7K_cjs.isStringUnion; }
19
19
  });
20
20
  Object.defineProperty(exports, "kindToName", {
21
21
  enumerable: true,
22
- get: function () { return chunk25EAB3JC_cjs.kindToName; }
22
+ get: function () { return chunkN76GLP7K_cjs.kindToName; }
23
23
  });
24
24
  Object.defineProperty(exports, "stringifyDefaultValue", {
25
25
  enumerable: true,
26
- get: function () { return chunk25EAB3JC_cjs.stringifyDefaultValue; }
26
+ get: function () { return chunkN76GLP7K_cjs.stringifyDefaultValue; }
27
27
  });
28
28
  Object.defineProperty(exports, "stringifyStringValue", {
29
29
  enumerable: true,
30
- get: function () { return chunk25EAB3JC_cjs.stringifyStringValue; }
30
+ get: function () { return chunkN76GLP7K_cjs.stringifyStringValue; }
31
31
  });
32
32
  Object.defineProperty(exports, "stringifyValue", {
33
33
  enumerable: true,
34
- get: function () { return chunk25EAB3JC_cjs.stringifyValue; }
34
+ get: function () { return chunkN76GLP7K_cjs.stringifyValue; }
35
35
  });
@@ -1,13 +1,13 @@
1
- import { ReflectionProperty, ReflectionParameter, Type, TypeString, TypeNumber, ReflectionKind } from '@powerlines/deepkit/vendor/type';
1
+ import { ReflectionProperty, ReflectionParameter, ReflectionKind, Type, TypeString, TypeNumber } from '@powerlines/deepkit/vendor/type';
2
2
 
3
3
  /**
4
- * Converts any {@link ReflectionProperty} or {@link ReflectionParameter}'s value to string representation.
4
+ * Converts any {@link ReflectionProperty}, {@link ReflectionParameter}, or {@link ReflectionKind}'s value to string representation.
5
5
  *
6
- * @param property - The {@link ReflectionProperty} or {@link ReflectionParameter} containing the value to stringify.
6
+ * @param property - The {@link ReflectionProperty}, {@link ReflectionParameter}, or {@link ReflectionKind} containing the value to stringify.
7
7
  * @param value - The value to stringify.
8
8
  * @returns A string representation of the value.
9
9
  */
10
- declare function stringifyDefaultValue(property: ReflectionProperty | ReflectionParameter, value?: any): string;
10
+ declare function stringifyDefaultValue(property: ReflectionProperty | ReflectionParameter | ReflectionKind, value?: any): string;
11
11
  /**
12
12
  * Stringifies a value as a string.
13
13
  *
@@ -1,13 +1,13 @@
1
- import { ReflectionProperty, ReflectionParameter, Type, TypeString, TypeNumber, ReflectionKind } from '@powerlines/deepkit/vendor/type';
1
+ import { ReflectionProperty, ReflectionParameter, ReflectionKind, Type, TypeString, TypeNumber } from '@powerlines/deepkit/vendor/type';
2
2
 
3
3
  /**
4
- * Converts any {@link ReflectionProperty} or {@link ReflectionParameter}'s value to string representation.
4
+ * Converts any {@link ReflectionProperty}, {@link ReflectionParameter}, or {@link ReflectionKind}'s value to string representation.
5
5
  *
6
- * @param property - The {@link ReflectionProperty} or {@link ReflectionParameter} containing the value to stringify.
6
+ * @param property - The {@link ReflectionProperty}, {@link ReflectionParameter}, or {@link ReflectionKind} containing the value to stringify.
7
7
  * @param value - The value to stringify.
8
8
  * @returns A string representation of the value.
9
9
  */
10
- declare function stringifyDefaultValue(property: ReflectionProperty | ReflectionParameter, value?: any): string;
10
+ declare function stringifyDefaultValue(property: ReflectionProperty | ReflectionParameter | ReflectionKind, value?: any): string;
11
11
  /**
12
12
  * Stringifies a value as a string.
13
13
  *
package/dist/utilities.js CHANGED
@@ -1,2 +1,2 @@
1
- export { getEnumReflectionType, getUnionTypes, isStringUnion, kindToName, stringifyDefaultValue, stringifyStringValue, stringifyValue } from './chunk-CP62SE6X.js';
1
+ export { getEnumReflectionType, getUnionTypes, isStringUnion, kindToName, stringifyDefaultValue, stringifyStringValue, stringifyValue } from './chunk-6NY7OJ54.js';
2
2
  import './chunk-SHUYVCID.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/deepkit",
3
- "version": "0.5.52",
3
+ "version": "0.5.54",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
6
6
  "repository": {
@@ -125,7 +125,7 @@
125
125
  "defu": "^6.1.4",
126
126
  "esbuild": "^0.25.12",
127
127
  "jiti": "^2.6.1",
128
- "powerlines": "^0.37.11",
128
+ "powerlines": "^0.37.12",
129
129
  "typescript": "^5.9.3"
130
130
  },
131
131
  "devDependencies": {
@@ -138,5 +138,5 @@
138
138
  "tsup": "8.4.0"
139
139
  },
140
140
  "publishConfig": { "access": "public" },
141
- "gitHead": "f3772c353f185b0d76e51bceea500ec8dcd9f041"
141
+ "gitHead": "818edcf68d107e24b0b00b8b1a549efa7b2ac7d7"
142
142
  }