@powerlines/deepkit 0.6.157 → 0.6.159
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.
- package/README.md +1 -1
- package/dist/{chunk-BINDICO3.js → chunk-2XDQUCXZ.js} +26 -71
- package/dist/{chunk-TOJABHP6.cjs → chunk-34OFD7LS.cjs} +1 -1
- package/dist/{chunk-7ZGMBW43.js → chunk-H3Q3XL3D.js} +1 -1
- package/dist/{chunk-4VOZQYQO.cjs → chunk-KK7TQA7L.cjs} +2 -2
- package/dist/{chunk-LYIREOBZ.cjs → chunk-OUGDFUKJ.cjs} +26 -71
- package/dist/{chunk-IBNTNPUU.js → chunk-WYEFKIRL.js} +1 -1
- package/dist/esbuild-plugin.cjs +2 -2
- package/dist/esbuild-plugin.js +1 -1
- package/dist/index.cjs +12 -12
- package/dist/index.js +3 -3
- package/dist/reflect-type.cjs +3 -3
- package/dist/reflect-type.js +2 -2
- package/dist/utilities.cjs +8 -8
- package/dist/utilities.js +1 -1
- package/dist/vendor/type-compiler/{chunk-BXVCQBYB.js → chunk-BZHCHSI3.js} +261 -12
- package/dist/vendor/type-compiler/{chunk-SSJEKM6O.js → chunk-O5BXUCY2.js} +1 -1
- package/dist/vendor/type-compiler/{chunk-4MUKNITV.cjs → chunk-PHRQP7RO.cjs} +505 -505
- package/dist/vendor/type-compiler/{chunk-ARGNEBTO.cjs → chunk-U5BTHCOZ.cjs} +261 -12
- package/dist/vendor/type-compiler/compiler.cjs +12 -12
- package/dist/vendor/type-compiler/compiler.js +2 -2
- package/dist/vendor/type-compiler/config.cjs +9 -9
- package/dist/vendor/type-compiler/config.js +2 -2
- package/dist/vendor/type-compiler/index.cjs +24 -24
- package/dist/vendor/type-compiler/index.js +4 -4
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the <b>🔌 Powerlines</b> monorepo. Powerlines is the "
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://stormsoftware.com/projects/powerlines) [](http://commitizen.github.io/cz-cli/)  
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
|
@@ -6,7 +6,7 @@ import { isNull as isNull$1 } from '@stryke/type-checks/is-null';
|
|
|
6
6
|
import { isString as isString$1 } from '@stryke/type-checks/is-string';
|
|
7
7
|
import { isUndefined as isUndefined$1 } from '@stryke/type-checks/is-undefined';
|
|
8
8
|
|
|
9
|
-
// ../../node_modules/.pnpm/@stryke+helpers@0.10.
|
|
9
|
+
// ../../node_modules/.pnpm/@stryke+helpers@0.10.7/node_modules/@stryke/helpers/dist/get-unique.mjs
|
|
10
10
|
function getUniqueBy(arr, mapper = (item) => item) {
|
|
11
11
|
const map = /* @__PURE__ */ new Map();
|
|
12
12
|
for (const item of arr) {
|
|
@@ -17,7 +17,7 @@ function getUniqueBy(arr, mapper = (item) => item) {
|
|
|
17
17
|
}
|
|
18
18
|
__name(getUniqueBy, "getUniqueBy");
|
|
19
19
|
|
|
20
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
20
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/code-frames-C8DEdLmV.mjs
|
|
21
21
|
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
22
22
|
function getMarkerLines(loc, source, opts = {}) {
|
|
23
23
|
const startLoc = {
|
|
@@ -1076,7 +1076,7 @@ var LinesAndColumns = (
|
|
|
1076
1076
|
})()
|
|
1077
1077
|
);
|
|
1078
1078
|
|
|
1079
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1079
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/parse-error-Cu6mjBS7.mjs
|
|
1080
1080
|
function formatParseError(input, parseError) {
|
|
1081
1081
|
const { error, offset, length } = parseError;
|
|
1082
1082
|
const result = new LinesAndColumns(input).locationForIndex(offset);
|
|
@@ -1099,7 +1099,7 @@ ${codeFrameColumns(input, {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
__name(formatParseError, "formatParseError");
|
|
1101
1101
|
|
|
1102
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1102
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/is-number-BMxmACAS.mjs
|
|
1103
1103
|
var getObjectTag = /* @__PURE__ */ __name((value) => {
|
|
1104
1104
|
if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
|
|
1105
1105
|
return Object.prototype.toString.call(value);
|
|
@@ -1112,9 +1112,9 @@ var isNumber = /* @__PURE__ */ __name((value) => {
|
|
|
1112
1112
|
}
|
|
1113
1113
|
}, "isNumber");
|
|
1114
1114
|
|
|
1115
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1116
|
-
var isObjectLike = /* @__PURE__ */ __name((
|
|
1117
|
-
return typeof
|
|
1115
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/is-object-B5abMUWX.mjs
|
|
1116
|
+
var isObjectLike = /* @__PURE__ */ __name((value) => {
|
|
1117
|
+
return typeof value === "object" && value !== null;
|
|
1118
1118
|
}, "isObjectLike");
|
|
1119
1119
|
var isPlainObject = /* @__PURE__ */ __name((obj) => {
|
|
1120
1120
|
if (!isObjectLike(obj) || getObjectTag(obj) !== "[object Object]") return false;
|
|
@@ -1131,7 +1131,7 @@ var isObject = /* @__PURE__ */ __name((value) => {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
}, "isObject");
|
|
1133
1133
|
|
|
1134
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1134
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/is-string--ny35huw.mjs
|
|
1135
1135
|
var isString = /* @__PURE__ */ __name((value) => {
|
|
1136
1136
|
try {
|
|
1137
1137
|
return typeof value === "string";
|
|
@@ -1140,7 +1140,7 @@ var isString = /* @__PURE__ */ __name((value) => {
|
|
|
1140
1140
|
}
|
|
1141
1141
|
}, "isString");
|
|
1142
1142
|
|
|
1143
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1143
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/strip-comments-DNTu6CWM.mjs
|
|
1144
1144
|
var EMPTY_STRING = "";
|
|
1145
1145
|
var singleComment = Symbol("singleComment");
|
|
1146
1146
|
var multiComment = Symbol("multiComment");
|
|
@@ -1227,7 +1227,7 @@ function stripComments2(value, { whitespace = true, trailingCommas = false } = {
|
|
|
1227
1227
|
}
|
|
1228
1228
|
__name(stripComments2, "stripComments");
|
|
1229
1229
|
|
|
1230
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1230
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/parse-BrChHTWb.mjs
|
|
1231
1231
|
var suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
|
|
1232
1232
|
var suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
|
1233
1233
|
var JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(?:\.\d{1,17})?(?:E[+-]?\d+)?\s*$/i;
|
|
@@ -1277,46 +1277,12 @@ function parse3(value, options = {}) {
|
|
|
1277
1277
|
}
|
|
1278
1278
|
__name(parse3, "parse");
|
|
1279
1279
|
|
|
1280
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1280
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/is-undefined-CqNzBssC.mjs
|
|
1281
1281
|
var isUndefined = /* @__PURE__ */ __name((value) => {
|
|
1282
1282
|
return value === void 0;
|
|
1283
1283
|
}, "isUndefined");
|
|
1284
1284
|
|
|
1285
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1286
|
-
var invalidKeyChars = [
|
|
1287
|
-
"@",
|
|
1288
|
-
"/",
|
|
1289
|
-
"#",
|
|
1290
|
-
"$",
|
|
1291
|
-
" ",
|
|
1292
|
-
":",
|
|
1293
|
-
";",
|
|
1294
|
-
",",
|
|
1295
|
-
".",
|
|
1296
|
-
"!",
|
|
1297
|
-
"?",
|
|
1298
|
-
"&",
|
|
1299
|
-
"=",
|
|
1300
|
-
"+",
|
|
1301
|
-
"-",
|
|
1302
|
-
"*",
|
|
1303
|
-
"%",
|
|
1304
|
-
"^",
|
|
1305
|
-
"~",
|
|
1306
|
-
"|",
|
|
1307
|
-
"\\",
|
|
1308
|
-
'"',
|
|
1309
|
-
"'",
|
|
1310
|
-
"`",
|
|
1311
|
-
"{",
|
|
1312
|
-
"}",
|
|
1313
|
-
"[",
|
|
1314
|
-
"]",
|
|
1315
|
-
"(",
|
|
1316
|
-
")",
|
|
1317
|
-
"<",
|
|
1318
|
-
">"
|
|
1319
|
-
];
|
|
1285
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/stringify-Ciz4xWm4.mjs
|
|
1320
1286
|
var stringify = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
1321
1287
|
const space = isNumber(spacing) ? " ".repeat(spacing) : spacing;
|
|
1322
1288
|
switch (value) {
|
|
@@ -1341,7 +1307,7 @@ var stringify = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
|
1341
1307
|
case "string":
|
|
1342
1308
|
return JSON.stringify(value);
|
|
1343
1309
|
case "object":
|
|
1344
|
-
return `{${space}${Object.keys(value).filter((key) => !isUndefined(value[key])).map((key) =>
|
|
1310
|
+
return `{${space}${Object.keys(value).filter((key) => !isUndefined(value[key])).map((key) => `"${key}": ${space}${stringify(value[key], space)}`).join(`,${space}`)}${space}}`;
|
|
1345
1311
|
default:
|
|
1346
1312
|
return "null";
|
|
1347
1313
|
}
|
|
@@ -2213,7 +2179,7 @@ SuperJSON.registerCustom;
|
|
|
2213
2179
|
SuperJSON.registerSymbol;
|
|
2214
2180
|
SuperJSON.allowErrorProps;
|
|
2215
2181
|
|
|
2216
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
2182
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/storm-json-MaHpNbZy.mjs
|
|
2217
2183
|
var StormJSON = class StormJSON2 extends SuperJSON {
|
|
2218
2184
|
static {
|
|
2219
2185
|
__name(this, "StormJSON");
|
|
@@ -2241,8 +2207,18 @@ var StormJSON = class StormJSON2 extends SuperJSON {
|
|
|
2241
2207
|
* @param value - The string value to parse
|
|
2242
2208
|
* @returns The parsed data
|
|
2243
2209
|
*/
|
|
2244
|
-
static parse(value) {
|
|
2245
|
-
|
|
2210
|
+
static parse(value, options = {}) {
|
|
2211
|
+
try {
|
|
2212
|
+
if (options.expectComments === false) return parse3(value);
|
|
2213
|
+
} catch {
|
|
2214
|
+
}
|
|
2215
|
+
const errors = [];
|
|
2216
|
+
const result = parse2(value, errors, {
|
|
2217
|
+
allowTrailingComma: true,
|
|
2218
|
+
...options
|
|
2219
|
+
});
|
|
2220
|
+
if (errors.length > 0 && errors[0]) throw new Error(formatParseError(value, errors[0]));
|
|
2221
|
+
return result;
|
|
2246
2222
|
}
|
|
2247
2223
|
/**
|
|
2248
2224
|
* Serializes the given data to a JSON string.
|
|
@@ -2259,27 +2235,6 @@ var StormJSON = class StormJSON2 extends SuperJSON {
|
|
|
2259
2235
|
return stringify(result, options?.spaces ?? 2);
|
|
2260
2236
|
}
|
|
2261
2237
|
/**
|
|
2262
|
-
* Parses the given JSON string and returns the object the JSON content represents.
|
|
2263
|
-
* By default javascript-style comments and trailing commas are allowed.
|
|
2264
|
-
*
|
|
2265
|
-
* @param strData - JSON content as string
|
|
2266
|
-
* @param options - JSON parse options
|
|
2267
|
-
* @returns Object the JSON content represents
|
|
2268
|
-
*/
|
|
2269
|
-
static parseJson(strData, options) {
|
|
2270
|
-
try {
|
|
2271
|
-
if (options?.expectComments === false) return StormJSON2.instance.parse(strData);
|
|
2272
|
-
} catch {
|
|
2273
|
-
}
|
|
2274
|
-
const errors = [];
|
|
2275
|
-
const result = parse2(strData, errors, {
|
|
2276
|
-
allowTrailingComma: true,
|
|
2277
|
-
...options
|
|
2278
|
-
});
|
|
2279
|
-
if (errors.length > 0 && errors[0]) throw new Error(formatParseError(strData, errors[0]));
|
|
2280
|
-
return result;
|
|
2281
|
-
}
|
|
2282
|
-
/**
|
|
2283
2238
|
* Register a custom schema with superjson
|
|
2284
2239
|
*
|
|
2285
2240
|
* @param name - The name of the schema
|
|
@@ -5,7 +5,7 @@ var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
|
5
5
|
var typeChecks = require('@stryke/type-checks');
|
|
6
6
|
var typescript = require('typescript');
|
|
7
7
|
|
|
8
|
-
// ../../node_modules/.pnpm/@stryke+helpers@0.10.
|
|
8
|
+
// ../../node_modules/.pnpm/@stryke+helpers@0.10.7/node_modules/@stryke/helpers/dist/omit.mjs
|
|
9
9
|
function omit(obj, keys) {
|
|
10
10
|
const result = { ...obj };
|
|
11
11
|
for (let i = 0; i < keys.length; i++) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { esbuildPlugin } from './chunk-
|
|
1
|
+
import { esbuildPlugin } from './chunk-WYEFKIRL.js';
|
|
2
2
|
import { __name } from './chunk-SHUYVCID.js';
|
|
3
3
|
import { reflect } from '@powerlines/deepkit/vendor/type';
|
|
4
4
|
import { resolve } from '@powerlines/plugin-esbuild/helpers/resolve';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk34OFD7LS_cjs = require('./chunk-34OFD7LS.cjs');
|
|
4
4
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
5
5
|
var type = require('@powerlines/deepkit/vendor/type');
|
|
6
6
|
var resolve = require('@powerlines/plugin-esbuild/helpers/resolve');
|
|
@@ -13,7 +13,7 @@ var defu__default = /*#__PURE__*/_interopDefault(defu);
|
|
|
13
13
|
async function reflectType(context, type$1, overrides = {}) {
|
|
14
14
|
return type.reflect(await resolve.resolve(context, type$1, defu__default.default(overrides, {
|
|
15
15
|
plugins: [
|
|
16
|
-
|
|
16
|
+
chunk34OFD7LS_cjs.esbuildPlugin(context, {
|
|
17
17
|
reflection: "default",
|
|
18
18
|
reflectionLevel: "verbose"
|
|
19
19
|
})
|
|
@@ -8,7 +8,7 @@ var isNull$1 = require('@stryke/type-checks/is-null');
|
|
|
8
8
|
var isString$1 = require('@stryke/type-checks/is-string');
|
|
9
9
|
var isUndefined$1 = require('@stryke/type-checks/is-undefined');
|
|
10
10
|
|
|
11
|
-
// ../../node_modules/.pnpm/@stryke+helpers@0.10.
|
|
11
|
+
// ../../node_modules/.pnpm/@stryke+helpers@0.10.7/node_modules/@stryke/helpers/dist/get-unique.mjs
|
|
12
12
|
function getUniqueBy(arr, mapper = (item) => item) {
|
|
13
13
|
const map = /* @__PURE__ */ new Map();
|
|
14
14
|
for (const item of arr) {
|
|
@@ -19,7 +19,7 @@ function getUniqueBy(arr, mapper = (item) => item) {
|
|
|
19
19
|
}
|
|
20
20
|
chunkUSNT2KNT_cjs.__name(getUniqueBy, "getUniqueBy");
|
|
21
21
|
|
|
22
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
22
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/code-frames-C8DEdLmV.mjs
|
|
23
23
|
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
24
24
|
function getMarkerLines(loc, source, opts = {}) {
|
|
25
25
|
const startLoc = {
|
|
@@ -1078,7 +1078,7 @@ var LinesAndColumns = (
|
|
|
1078
1078
|
})()
|
|
1079
1079
|
);
|
|
1080
1080
|
|
|
1081
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1081
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/parse-error-Cu6mjBS7.mjs
|
|
1082
1082
|
function formatParseError(input, parseError) {
|
|
1083
1083
|
const { error, offset, length } = parseError;
|
|
1084
1084
|
const result = new LinesAndColumns(input).locationForIndex(offset);
|
|
@@ -1101,7 +1101,7 @@ ${codeFrameColumns(input, {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
chunkUSNT2KNT_cjs.__name(formatParseError, "formatParseError");
|
|
1103
1103
|
|
|
1104
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1104
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/is-number-BMxmACAS.mjs
|
|
1105
1105
|
var getObjectTag = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((value) => {
|
|
1106
1106
|
if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
|
|
1107
1107
|
return Object.prototype.toString.call(value);
|
|
@@ -1114,9 +1114,9 @@ var isNumber = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((value) => {
|
|
|
1114
1114
|
}
|
|
1115
1115
|
}, "isNumber");
|
|
1116
1116
|
|
|
1117
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1118
|
-
var isObjectLike = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((
|
|
1119
|
-
return typeof
|
|
1117
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/is-object-B5abMUWX.mjs
|
|
1118
|
+
var isObjectLike = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((value) => {
|
|
1119
|
+
return typeof value === "object" && value !== null;
|
|
1120
1120
|
}, "isObjectLike");
|
|
1121
1121
|
var isPlainObject = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((obj) => {
|
|
1122
1122
|
if (!isObjectLike(obj) || getObjectTag(obj) !== "[object Object]") return false;
|
|
@@ -1133,7 +1133,7 @@ var isObject = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((value) => {
|
|
|
1133
1133
|
}
|
|
1134
1134
|
}, "isObject");
|
|
1135
1135
|
|
|
1136
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1136
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/is-string--ny35huw.mjs
|
|
1137
1137
|
var isString = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((value) => {
|
|
1138
1138
|
try {
|
|
1139
1139
|
return typeof value === "string";
|
|
@@ -1142,7 +1142,7 @@ var isString = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((value) => {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
}, "isString");
|
|
1144
1144
|
|
|
1145
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1145
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/strip-comments-DNTu6CWM.mjs
|
|
1146
1146
|
var EMPTY_STRING = "";
|
|
1147
1147
|
var singleComment = Symbol("singleComment");
|
|
1148
1148
|
var multiComment = Symbol("multiComment");
|
|
@@ -1229,7 +1229,7 @@ function stripComments2(value, { whitespace = true, trailingCommas = false } = {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
chunkUSNT2KNT_cjs.__name(stripComments2, "stripComments");
|
|
1231
1231
|
|
|
1232
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1232
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/parse-BrChHTWb.mjs
|
|
1233
1233
|
var suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
|
|
1234
1234
|
var suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
|
1235
1235
|
var JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(?:\.\d{1,17})?(?:E[+-]?\d+)?\s*$/i;
|
|
@@ -1279,46 +1279,12 @@ function parse3(value, options = {}) {
|
|
|
1279
1279
|
}
|
|
1280
1280
|
chunkUSNT2KNT_cjs.__name(parse3, "parse");
|
|
1281
1281
|
|
|
1282
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1282
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/is-undefined-CqNzBssC.mjs
|
|
1283
1283
|
var isUndefined = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((value) => {
|
|
1284
1284
|
return value === void 0;
|
|
1285
1285
|
}, "isUndefined");
|
|
1286
1286
|
|
|
1287
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
1288
|
-
var invalidKeyChars = [
|
|
1289
|
-
"@",
|
|
1290
|
-
"/",
|
|
1291
|
-
"#",
|
|
1292
|
-
"$",
|
|
1293
|
-
" ",
|
|
1294
|
-
":",
|
|
1295
|
-
";",
|
|
1296
|
-
",",
|
|
1297
|
-
".",
|
|
1298
|
-
"!",
|
|
1299
|
-
"?",
|
|
1300
|
-
"&",
|
|
1301
|
-
"=",
|
|
1302
|
-
"+",
|
|
1303
|
-
"-",
|
|
1304
|
-
"*",
|
|
1305
|
-
"%",
|
|
1306
|
-
"^",
|
|
1307
|
-
"~",
|
|
1308
|
-
"|",
|
|
1309
|
-
"\\",
|
|
1310
|
-
'"',
|
|
1311
|
-
"'",
|
|
1312
|
-
"`",
|
|
1313
|
-
"{",
|
|
1314
|
-
"}",
|
|
1315
|
-
"[",
|
|
1316
|
-
"]",
|
|
1317
|
-
"(",
|
|
1318
|
-
")",
|
|
1319
|
-
"<",
|
|
1320
|
-
">"
|
|
1321
|
-
];
|
|
1287
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/stringify-Ciz4xWm4.mjs
|
|
1322
1288
|
var stringify = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((value, spacing = 2) => {
|
|
1323
1289
|
const space = isNumber(spacing) ? " ".repeat(spacing) : spacing;
|
|
1324
1290
|
switch (value) {
|
|
@@ -1343,7 +1309,7 @@ var stringify = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((value, spacing = 2) =>
|
|
|
1343
1309
|
case "string":
|
|
1344
1310
|
return JSON.stringify(value);
|
|
1345
1311
|
case "object":
|
|
1346
|
-
return `{${space}${Object.keys(value).filter((key) => !isUndefined(value[key])).map((key) =>
|
|
1312
|
+
return `{${space}${Object.keys(value).filter((key) => !isUndefined(value[key])).map((key) => `"${key}": ${space}${stringify(value[key], space)}`).join(`,${space}`)}${space}}`;
|
|
1347
1313
|
default:
|
|
1348
1314
|
return "null";
|
|
1349
1315
|
}
|
|
@@ -2215,7 +2181,7 @@ SuperJSON.registerCustom;
|
|
|
2215
2181
|
SuperJSON.registerSymbol;
|
|
2216
2182
|
SuperJSON.allowErrorProps;
|
|
2217
2183
|
|
|
2218
|
-
// ../../node_modules/.pnpm/@stryke+json@0.14.
|
|
2184
|
+
// ../../node_modules/.pnpm/@stryke+json@0.14.11/node_modules/@stryke/json/dist/storm-json-MaHpNbZy.mjs
|
|
2219
2185
|
var StormJSON = class StormJSON2 extends SuperJSON {
|
|
2220
2186
|
static {
|
|
2221
2187
|
chunkUSNT2KNT_cjs.__name(this, "StormJSON");
|
|
@@ -2243,8 +2209,18 @@ var StormJSON = class StormJSON2 extends SuperJSON {
|
|
|
2243
2209
|
* @param value - The string value to parse
|
|
2244
2210
|
* @returns The parsed data
|
|
2245
2211
|
*/
|
|
2246
|
-
static parse(value) {
|
|
2247
|
-
|
|
2212
|
+
static parse(value, options = {}) {
|
|
2213
|
+
try {
|
|
2214
|
+
if (options.expectComments === false) return parse3(value);
|
|
2215
|
+
} catch {
|
|
2216
|
+
}
|
|
2217
|
+
const errors = [];
|
|
2218
|
+
const result = parse2(value, errors, {
|
|
2219
|
+
allowTrailingComma: true,
|
|
2220
|
+
...options
|
|
2221
|
+
});
|
|
2222
|
+
if (errors.length > 0 && errors[0]) throw new Error(formatParseError(value, errors[0]));
|
|
2223
|
+
return result;
|
|
2248
2224
|
}
|
|
2249
2225
|
/**
|
|
2250
2226
|
* Serializes the given data to a JSON string.
|
|
@@ -2261,27 +2237,6 @@ var StormJSON = class StormJSON2 extends SuperJSON {
|
|
|
2261
2237
|
return stringify(result, options?.spaces ?? 2);
|
|
2262
2238
|
}
|
|
2263
2239
|
/**
|
|
2264
|
-
* Parses the given JSON string and returns the object the JSON content represents.
|
|
2265
|
-
* By default javascript-style comments and trailing commas are allowed.
|
|
2266
|
-
*
|
|
2267
|
-
* @param strData - JSON content as string
|
|
2268
|
-
* @param options - JSON parse options
|
|
2269
|
-
* @returns Object the JSON content represents
|
|
2270
|
-
*/
|
|
2271
|
-
static parseJson(strData, options) {
|
|
2272
|
-
try {
|
|
2273
|
-
if (options?.expectComments === false) return StormJSON2.instance.parse(strData);
|
|
2274
|
-
} catch {
|
|
2275
|
-
}
|
|
2276
|
-
const errors = [];
|
|
2277
|
-
const result = parse2(strData, errors, {
|
|
2278
|
-
allowTrailingComma: true,
|
|
2279
|
-
...options
|
|
2280
|
-
});
|
|
2281
|
-
if (errors.length > 0 && errors[0]) throw new Error(formatParseError(strData, errors[0]));
|
|
2282
|
-
return result;
|
|
2283
|
-
}
|
|
2284
|
-
/**
|
|
2285
2240
|
* Register a custom schema with superjson
|
|
2286
2241
|
*
|
|
2287
2242
|
* @param name - The name of the schema
|
|
@@ -3,7 +3,7 @@ import { __name } from './chunk-SHUYVCID.js';
|
|
|
3
3
|
import { isString } from '@stryke/type-checks';
|
|
4
4
|
import { DiagnosticCategory } from 'typescript';
|
|
5
5
|
|
|
6
|
-
// ../../node_modules/.pnpm/@stryke+helpers@0.10.
|
|
6
|
+
// ../../node_modules/.pnpm/@stryke+helpers@0.10.7/node_modules/@stryke/helpers/dist/omit.mjs
|
|
7
7
|
function omit(obj, keys) {
|
|
8
8
|
const result = { ...obj };
|
|
9
9
|
for (let i = 0; i < keys.length; i++) {
|
package/dist/esbuild-plugin.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk34OFD7LS_cjs = require('./chunk-34OFD7LS.cjs');
|
|
4
4
|
require('./chunk-HPVJ6OV3.cjs');
|
|
5
5
|
require('./chunk-BLLXF42T.cjs');
|
|
6
6
|
require('./chunk-USNT2KNT.cjs');
|
|
@@ -9,5 +9,5 @@ require('./chunk-USNT2KNT.cjs');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "esbuildPlugin", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunk34OFD7LS_cjs.esbuildPlugin; }
|
|
13
13
|
});
|
package/dist/esbuild-plugin.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('./chunk-ORA4UQMU.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkOUGDFUKJ_cjs = require('./chunk-OUGDFUKJ.cjs');
|
|
5
5
|
var chunk7FXYDYVQ_cjs = require('./chunk-7FXYDYVQ.cjs');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var chunkKK7TQA7L_cjs = require('./chunk-KK7TQA7L.cjs');
|
|
7
|
+
var chunk34OFD7LS_cjs = require('./chunk-34OFD7LS.cjs');
|
|
8
8
|
var chunk7QZGCBH7_cjs = require('./chunk-7QZGCBH7.cjs');
|
|
9
9
|
var chunk27RKMKSF_cjs = require('./chunk-27RKMKSF.cjs');
|
|
10
10
|
var chunkHPVJ6OV3_cjs = require('./chunk-HPVJ6OV3.cjs');
|
|
@@ -15,31 +15,31 @@ require('./chunk-USNT2KNT.cjs');
|
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, "getEnumReflectionType", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkOUGDFUKJ_cjs.getEnumReflectionType; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "getUnionTypes", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkOUGDFUKJ_cjs.getUnionTypes; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "isStringUnion", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkOUGDFUKJ_cjs.isStringUnion; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "kindToName", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkOUGDFUKJ_cjs.kindToName; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "stringifyDefaultValue", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkOUGDFUKJ_cjs.stringifyDefaultValue; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "stringifyStringValue", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkOUGDFUKJ_cjs.stringifyStringValue; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "stringifyValue", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkOUGDFUKJ_cjs.stringifyValue; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "convertFromCapnp", {
|
|
45
45
|
enumerable: true,
|
|
@@ -223,11 +223,11 @@ Object.defineProperty(exports, "convertToCapnpUnion", {
|
|
|
223
223
|
});
|
|
224
224
|
Object.defineProperty(exports, "reflectType", {
|
|
225
225
|
enumerable: true,
|
|
226
|
-
get: function () { return
|
|
226
|
+
get: function () { return chunkKK7TQA7L_cjs.reflectType; }
|
|
227
227
|
});
|
|
228
228
|
Object.defineProperty(exports, "esbuildPlugin", {
|
|
229
229
|
enumerable: true,
|
|
230
|
-
get: function () { return
|
|
230
|
+
get: function () { return chunk34OFD7LS_cjs.esbuildPlugin; }
|
|
231
231
|
});
|
|
232
232
|
Object.defineProperty(exports, "getReflectionsPath", {
|
|
233
233
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './chunk-OULCUN6I.js';
|
|
2
|
-
export { getEnumReflectionType, getUnionTypes, isStringUnion, kindToName, stringifyDefaultValue, stringifyStringValue, stringifyValue } from './chunk-
|
|
2
|
+
export { getEnumReflectionType, getUnionTypes, isStringUnion, kindToName, stringifyDefaultValue, stringifyStringValue, stringifyValue } from './chunk-2XDQUCXZ.js';
|
|
3
3
|
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';
|
|
4
|
-
export { reflectType } from './chunk-
|
|
5
|
-
export { esbuildPlugin } from './chunk-
|
|
4
|
+
export { reflectType } from './chunk-H3Q3XL3D.js';
|
|
5
|
+
export { esbuildPlugin } from './chunk-WYEFKIRL.js';
|
|
6
6
|
export { getReflectionsPath } from './chunk-ALM6UMVU.js';
|
|
7
7
|
export { rolldownPlugin } from './chunk-JQUKKAFM.js';
|
|
8
8
|
export { transpile } from './chunk-NPV2346T.js';
|
package/dist/reflect-type.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkKK7TQA7L_cjs = require('./chunk-KK7TQA7L.cjs');
|
|
4
|
+
require('./chunk-34OFD7LS.cjs');
|
|
5
5
|
require('./chunk-HPVJ6OV3.cjs');
|
|
6
6
|
require('./chunk-BLLXF42T.cjs');
|
|
7
7
|
require('./chunk-USNT2KNT.cjs');
|
|
@@ -10,5 +10,5 @@ require('./chunk-USNT2KNT.cjs');
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "reflectType", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkKK7TQA7L_cjs.reflectType; }
|
|
14
14
|
});
|
package/dist/reflect-type.js
CHANGED
package/dist/utilities.cjs
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkOUGDFUKJ_cjs = require('./chunk-OUGDFUKJ.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
|
|
10
|
+
get: function () { return chunkOUGDFUKJ_cjs.getEnumReflectionType; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "getUnionTypes", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkOUGDFUKJ_cjs.getUnionTypes; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "isStringUnion", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkOUGDFUKJ_cjs.isStringUnion; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "kindToName", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkOUGDFUKJ_cjs.kindToName; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "stringifyDefaultValue", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkOUGDFUKJ_cjs.stringifyDefaultValue; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "stringifyStringValue", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkOUGDFUKJ_cjs.stringifyStringValue; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "stringifyValue", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkOUGDFUKJ_cjs.stringifyValue; }
|
|
35
35
|
});
|
package/dist/utilities.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { getEnumReflectionType, getUnionTypes, isStringUnion, kindToName, stringifyDefaultValue, stringifyStringValue, stringifyValue } from './chunk-
|
|
1
|
+
export { getEnumReflectionType, getUnionTypes, isStringUnion, kindToName, stringifyDefaultValue, stringifyStringValue, stringifyValue } from './chunk-2XDQUCXZ.js';
|
|
2
2
|
import './chunk-SHUYVCID.js';
|