@stryke/fs 0.33.43 → 0.33.45

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/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  # Changelog for Stryke - Fs
4
4
 
5
+ ## [0.33.44](https://github.com/storm-software/stryke/releases/tag/fs%400.33.44) (03/02/2026)
6
+
7
+ ### Updated Dependencies
8
+
9
+ - Updated **string-format** to **v0.14.3**
10
+ - Updated **type-checks** to **v0.5.26**
11
+ - Updated **convert** to **v0.6.41**
12
+ - Updated **helpers** to **v0.9.43**
13
+ - Updated **types** to **v0.10.40**
14
+ - Updated **json** to **v0.9.44**
15
+ - Updated **path** to **v0.26.7**
16
+
17
+ ## [0.33.43](https://github.com/storm-software/stryke/releases/tag/fs%400.33.43) (02/10/2026)
18
+
19
+ ### Updated Dependencies
20
+
21
+ - Updated **string-format** to **v0.14.2**
22
+
5
23
  ## [0.33.42](https://github.com/storm-software/stryke/releases/tag/fs%400.33.42) (02/09/2026)
6
24
 
7
25
  ### Updated Dependencies
@@ -48,14 +48,14 @@ var StormJSON = class StormJSON extends superjson.default {
48
48
  * By default the JSON string is formatted with a 2 space indentation to be easy readable.
49
49
  *
50
50
  * @param value - Object which should be serialized to JSON
51
- * @param _options - JSON serialize options
51
+ * @param options - JSON serialize options
52
52
  * @returns the formatted JSON representation of the object
53
53
  */
54
- static stringify(value, _options) {
54
+ static stringify(value, options) {
55
55
  const customTransformer = StormJSON.instance.customTransformerRegistry.findApplicable(value);
56
56
  let result = value;
57
57
  if (customTransformer && customTransformer.isApplicable(value)) result = customTransformer.serialize(result);
58
- return require_stringify.stringify(result);
58
+ return require_stringify.stringify(result, options?.spaces ?? 2);
59
59
  }
60
60
  /**
61
61
  * Parses the given JSON string and returns the object the JSON content represents.
@@ -108,7 +108,7 @@ var StormJSON = class StormJSON extends superjson.default {
108
108
  }
109
109
  };
110
110
  StormJSON.instance.registerCustom({
111
- isApplicable: (v) => node_buffer.Buffer.isBuffer(v),
111
+ isApplicable: (v) => typeof node_buffer.Buffer.isBuffer === "function" && node_buffer.Buffer.isBuffer(v),
112
112
  serialize: (v) => v.toString("base64"),
113
113
  deserialize: (v) => node_buffer.Buffer.from(v, "base64")
114
114
  }, "Bytes");
@@ -46,14 +46,14 @@ var StormJSON = class StormJSON extends SuperJSON {
46
46
  * By default the JSON string is formatted with a 2 space indentation to be easy readable.
47
47
  *
48
48
  * @param value - Object which should be serialized to JSON
49
- * @param _options - JSON serialize options
49
+ * @param options - JSON serialize options
50
50
  * @returns the formatted JSON representation of the object
51
51
  */
52
- static stringify(value, _options) {
52
+ static stringify(value, options) {
53
53
  const customTransformer = StormJSON.instance.customTransformerRegistry.findApplicable(value);
54
54
  let result = value;
55
55
  if (customTransformer && customTransformer.isApplicable(value)) result = customTransformer.serialize(result);
56
- return stringify(result);
56
+ return stringify(result, options?.spaces ?? 2);
57
57
  }
58
58
  /**
59
59
  * Parses the given JSON string and returns the object the JSON content represents.
@@ -106,7 +106,7 @@ var StormJSON = class StormJSON extends SuperJSON {
106
106
  }
107
107
  };
108
108
  StormJSON.instance.registerCustom({
109
- isApplicable: (v) => Buffer.isBuffer(v),
109
+ isApplicable: (v) => typeof Buffer.isBuffer === "function" && Buffer.isBuffer(v),
110
110
  serialize: (v) => v.toString("base64"),
111
111
  deserialize: (v) => Buffer.from(v, "base64")
112
112
  }, "Bytes");
@@ -1 +1 @@
1
- {"version":3,"file":"storm-json.mjs","names":["#instance","parseValue","stringifyValue","errors: ParseError[]"],"sources":["../../../../json/src/storm-json.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ParseError } from \"jsonc-parser\";\nimport type {\n Class,\n JsonParseOptions,\n JsonParserResult,\n JsonSerializeOptions,\n JsonValue\n} from \"./types\";\n// import { Decimal } from \"decimal.js\";\nimport { isObject } from \"@stryke/type-checks/is-object\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { parse } from \"jsonc-parser\";\nimport { Buffer } from \"node:buffer\";\nimport SuperJSON from \"superjson\";\nimport { parse as parseValue } from \"./utils/parse\";\nimport { formatParseError } from \"./utils/parse-error\";\nimport { stringify as stringifyValue } from \"./utils/stringify\";\n\n/**\n * A static JSON parser class used by Storm Software to serialize and deserialize JSON data\n *\n * @remarks\n * This class uses the [SuperJSON](https://github.com/blitz-js/superjson) library under the hood.\n */\nexport class StormJSON extends SuperJSON {\n static #instance: StormJSON;\n\n public static get instance(): StormJSON {\n if (!StormJSON.#instance) {\n StormJSON.#instance = new StormJSON();\n }\n\n return StormJSON.#instance;\n }\n\n /**\n * Deserialize the given value with superjson using the given metadata\n */\n public static override deserialize<TData = unknown>(\n payload: JsonParserResult\n ): TData {\n return StormJSON.instance.deserialize(payload);\n }\n\n /**\n * Serialize the given value with superjson\n */\n public static override serialize(object: JsonValue): JsonParserResult {\n return StormJSON.instance.serialize(object);\n }\n\n /**\n * Parse the given string value with superjson using the given metadata\n *\n * @param value - The string value to parse\n * @returns The parsed data\n */\n public static override parse<TData = unknown>(value: string): TData {\n return parseValue(value);\n }\n\n /**\n * Serializes the given data to a JSON string.\n * By default the JSON string is formatted with a 2 space indentation to be easy readable.\n *\n * @param value - Object which should be serialized to JSON\n * @param _options - JSON serialize options\n * @returns the formatted JSON representation of the object\n */\n public static override stringify<T>(\n value: T,\n _options?: JsonSerializeOptions\n ): string {\n const customTransformer =\n StormJSON.instance.customTransformerRegistry.findApplicable(value);\n\n let result = value;\n if (customTransformer && customTransformer.isApplicable(value)) {\n result = customTransformer.serialize(result) as T;\n }\n\n return stringifyValue(result);\n }\n\n /**\n * Parses the given JSON string and returns the object the JSON content represents.\n * By default javascript-style comments and trailing commas are allowed.\n *\n * @param strData - JSON content as string\n * @param options - JSON parse options\n * @returns Object the JSON content represents\n */\n public static parseJson<TData = unknown>(\n strData: string,\n options?: JsonParseOptions\n ): TData {\n try {\n if (options?.expectComments === false) {\n return StormJSON.instance.parse(strData);\n }\n } catch {\n // Do nothing\n }\n\n const errors: ParseError[] = [];\n const opts = {\n allowTrailingComma: true,\n ...options\n };\n const result = parse(strData, errors, opts) as TData;\n\n if (errors.length > 0 && errors[0]) {\n throw new Error(formatParseError(strData, errors[0]));\n }\n\n return result;\n }\n\n /**\n * Register a custom schema with superjson\n *\n * @param name - The name of the schema\n * @param serialize - The function to serialize the schema\n * @param deserialize - The function to deserialize the schema\n * @param isApplicable - The function to check if the schema is applicable\n */\n public static register<\n TData = any,\n TJsonObject extends JsonValue = JsonValue\n >(\n name: string,\n serialize: (data: TData) => TJsonObject,\n deserialize: (json: TJsonObject) => TData,\n isApplicable: (data: any) => data is TData\n ) {\n StormJSON.instance.registerCustom<TData, TJsonObject>(\n {\n isApplicable,\n serialize,\n deserialize\n },\n name\n );\n }\n\n /**\n * Register a class with superjson\n *\n * @param classConstructor - The class constructor to register\n */\n public static override registerClass(\n classConstructor: Class,\n options?: { identifier?: string; allowProps?: string[] } | string\n ) {\n StormJSON.instance.registerClass(classConstructor, {\n identifier: isString(options)\n ? options\n : options?.identifier || classConstructor.name,\n allowProps:\n options &&\n isObject(options) &&\n options?.allowProps &&\n Array.isArray(options.allowProps)\n ? options.allowProps\n : [\"__typename\"]\n });\n }\n\n private constructor() {\n super({ dedupe: true });\n }\n}\n\nStormJSON.instance.registerCustom<Buffer, string>(\n {\n isApplicable: (v): v is Buffer => Buffer.isBuffer(v),\n serialize: v => v.toString(\"base64\"),\n deserialize: v => Buffer.from(v, \"base64\")\n },\n \"Bytes\"\n);\n"],"mappings":";;;;;;;;;;;;;;;;AA0CA,IAAa,YAAb,MAAa,kBAAkB,UAAU;CACvC,QAAOA;CAEP,WAAkB,WAAsB;AACtC,MAAI,CAAC,WAAUA,SACb,YAAUA,WAAY,IAAI,WAAW;AAGvC,SAAO,WAAUA;;;;;CAMnB,OAAuB,YACrB,SACO;AACP,SAAO,UAAU,SAAS,YAAY,QAAQ;;;;;CAMhD,OAAuB,UAAU,QAAqC;AACpE,SAAO,UAAU,SAAS,UAAU,OAAO;;;;;;;;CAS7C,OAAuB,MAAuB,OAAsB;AAClE,SAAOC,QAAW,MAAM;;;;;;;;;;CAW1B,OAAuB,UACrB,OACA,UACQ;EACR,MAAM,oBACJ,UAAU,SAAS,0BAA0B,eAAe,MAAM;EAEpE,IAAI,SAAS;AACb,MAAI,qBAAqB,kBAAkB,aAAa,MAAM,CAC5D,UAAS,kBAAkB,UAAU,OAAO;AAG9C,SAAOC,UAAe,OAAO;;;;;;;;;;CAW/B,OAAc,UACZ,SACA,SACO;AACP,MAAI;AACF,OAAI,SAAS,mBAAmB,MAC9B,QAAO,UAAU,SAAS,MAAM,QAAQ;UAEpC;EAIR,MAAMC,SAAuB,EAAE;EAK/B,MAAM,SAAS,MAAM,SAAS,QAJjB;GACX,oBAAoB;GACpB,GAAG;GACJ,CAC0C;AAE3C,MAAI,OAAO,SAAS,KAAK,OAAO,GAC9B,OAAM,IAAI,MAAM,iBAAiB,SAAS,OAAO,GAAG,CAAC;AAGvD,SAAO;;;;;;;;;;CAWT,OAAc,SAIZ,MACA,WACA,aACA,cACA;AACA,YAAU,SAAS,eACjB;GACE;GACA;GACA;GACD,EACD,KACD;;;;;;;CAQH,OAAuB,cACrB,kBACA,SACA;AACA,YAAU,SAAS,cAAc,kBAAkB;GACjD,YAAY,SAAS,QAAQ,GACzB,UACA,SAAS,cAAc,iBAAiB;GAC5C,YACE,WACA,SAAS,QAAQ,IACjB,SAAS,cACT,MAAM,QAAQ,QAAQ,WAAW,GAC7B,QAAQ,aACR,CAAC,aAAa;GACrB,CAAC;;CAGJ,AAAQ,cAAc;AACpB,QAAM,EAAE,QAAQ,MAAM,CAAC;;;AAI3B,UAAU,SAAS,eACjB;CACE,eAAe,MAAmB,OAAO,SAAS,EAAE;CACpD,YAAW,MAAK,EAAE,SAAS,SAAS;CACpC,cAAa,MAAK,OAAO,KAAK,GAAG,SAAS;CAC3C,EACD,QACD"}
1
+ {"version":3,"file":"storm-json.mjs","names":["#instance","parseValue","stringifyValue","errors: ParseError[]"],"sources":["../../../../json/src/storm-json.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ParseError } from \"jsonc-parser\";\nimport type {\n Class,\n JsonParseOptions,\n JsonParserResult,\n JsonSerializeOptions,\n JsonValue\n} from \"./types\";\n// import { Decimal } from \"decimal.js\";\nimport { isObject } from \"@stryke/type-checks/is-object\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { parse } from \"jsonc-parser\";\nimport { Buffer } from \"node:buffer\";\nimport SuperJSON from \"superjson\";\nimport { parse as parseValue } from \"./utils/parse\";\nimport { formatParseError } from \"./utils/parse-error\";\nimport { stringify as stringifyValue } from \"./utils/stringify\";\n\n/**\n * A static JSON parser class used by Storm Software to serialize and deserialize JSON data\n *\n * @remarks\n * This class uses the [SuperJSON](https://github.com/blitz-js/superjson) library under the hood.\n */\nexport class StormJSON extends SuperJSON {\n static #instance: StormJSON;\n\n public static get instance(): StormJSON {\n if (!StormJSON.#instance) {\n StormJSON.#instance = new StormJSON();\n }\n\n return StormJSON.#instance;\n }\n\n /**\n * Deserialize the given value with superjson using the given metadata\n */\n public static override deserialize<TData = unknown>(\n payload: JsonParserResult\n ): TData {\n return StormJSON.instance.deserialize(payload);\n }\n\n /**\n * Serialize the given value with superjson\n */\n public static override serialize(object: JsonValue): JsonParserResult {\n return StormJSON.instance.serialize(object);\n }\n\n /**\n * Parse the given string value with superjson using the given metadata\n *\n * @param value - The string value to parse\n * @returns The parsed data\n */\n public static override parse<TData = unknown>(value: string): TData {\n return parseValue(value);\n }\n\n /**\n * Serializes the given data to a JSON string.\n * By default the JSON string is formatted with a 2 space indentation to be easy readable.\n *\n * @param value - Object which should be serialized to JSON\n * @param options - JSON serialize options\n * @returns the formatted JSON representation of the object\n */\n public static override stringify<T>(\n value: T,\n options?: JsonSerializeOptions\n ): string {\n const customTransformer =\n StormJSON.instance.customTransformerRegistry.findApplicable(value);\n\n let result = value;\n if (customTransformer && customTransformer.isApplicable(value)) {\n result = customTransformer.serialize(result) as T;\n }\n\n return stringifyValue(result, options?.spaces ?? 2);\n }\n\n /**\n * Parses the given JSON string and returns the object the JSON content represents.\n * By default javascript-style comments and trailing commas are allowed.\n *\n * @param strData - JSON content as string\n * @param options - JSON parse options\n * @returns Object the JSON content represents\n */\n public static parseJson<TData = unknown>(\n strData: string,\n options?: JsonParseOptions\n ): TData {\n try {\n if (options?.expectComments === false) {\n return StormJSON.instance.parse(strData);\n }\n } catch {\n // Do nothing\n }\n\n const errors: ParseError[] = [];\n const opts = {\n allowTrailingComma: true,\n ...options\n };\n const result = parse(strData, errors, opts) as TData;\n\n if (errors.length > 0 && errors[0]) {\n throw new Error(formatParseError(strData, errors[0]));\n }\n\n return result;\n }\n\n /**\n * Register a custom schema with superjson\n *\n * @param name - The name of the schema\n * @param serialize - The function to serialize the schema\n * @param deserialize - The function to deserialize the schema\n * @param isApplicable - The function to check if the schema is applicable\n */\n public static register<\n TData = any,\n TJsonObject extends JsonValue = JsonValue\n >(\n name: string,\n serialize: (data: TData) => TJsonObject,\n deserialize: (json: TJsonObject) => TData,\n isApplicable: (data: any) => data is TData\n ) {\n StormJSON.instance.registerCustom<TData, TJsonObject>(\n {\n isApplicable,\n serialize,\n deserialize\n },\n name\n );\n }\n\n /**\n * Register a class with superjson\n *\n * @param classConstructor - The class constructor to register\n */\n public static override registerClass(\n classConstructor: Class,\n options?: { identifier?: string; allowProps?: string[] } | string\n ) {\n StormJSON.instance.registerClass(classConstructor, {\n identifier: isString(options)\n ? options\n : options?.identifier || classConstructor.name,\n allowProps:\n options &&\n isObject(options) &&\n options?.allowProps &&\n Array.isArray(options.allowProps)\n ? options.allowProps\n : [\"__typename\"]\n });\n }\n\n private constructor() {\n super({ dedupe: true });\n }\n}\n\nStormJSON.instance.registerCustom<Buffer, string>(\n {\n isApplicable: (v): v is Buffer =>\n typeof Buffer.isBuffer === \"function\" && Buffer.isBuffer(v),\n serialize: v => v.toString(\"base64\"),\n deserialize: v => Buffer.from(v, \"base64\")\n },\n \"Bytes\"\n);\n"],"mappings":";;;;;;;;;;;;;;;;AA0CA,IAAa,YAAb,MAAa,kBAAkB,UAAU;CACvC,QAAOA;CAEP,WAAkB,WAAsB;AACtC,MAAI,CAAC,WAAUA,SACb,YAAUA,WAAY,IAAI,WAAW;AAGvC,SAAO,WAAUA;;;;;CAMnB,OAAuB,YACrB,SACO;AACP,SAAO,UAAU,SAAS,YAAY,QAAQ;;;;;CAMhD,OAAuB,UAAU,QAAqC;AACpE,SAAO,UAAU,SAAS,UAAU,OAAO;;;;;;;;CAS7C,OAAuB,MAAuB,OAAsB;AAClE,SAAOC,QAAW,MAAM;;;;;;;;;;CAW1B,OAAuB,UACrB,OACA,SACQ;EACR,MAAM,oBACJ,UAAU,SAAS,0BAA0B,eAAe,MAAM;EAEpE,IAAI,SAAS;AACb,MAAI,qBAAqB,kBAAkB,aAAa,MAAM,CAC5D,UAAS,kBAAkB,UAAU,OAAO;AAG9C,SAAOC,UAAe,QAAQ,SAAS,UAAU,EAAE;;;;;;;;;;CAWrD,OAAc,UACZ,SACA,SACO;AACP,MAAI;AACF,OAAI,SAAS,mBAAmB,MAC9B,QAAO,UAAU,SAAS,MAAM,QAAQ;UAEpC;EAIR,MAAMC,SAAuB,EAAE;EAK/B,MAAM,SAAS,MAAM,SAAS,QAJjB;GACX,oBAAoB;GACpB,GAAG;GACJ,CAC0C;AAE3C,MAAI,OAAO,SAAS,KAAK,OAAO,GAC9B,OAAM,IAAI,MAAM,iBAAiB,SAAS,OAAO,GAAG,CAAC;AAGvD,SAAO;;;;;;;;;;CAWT,OAAc,SAIZ,MACA,WACA,aACA,cACA;AACA,YAAU,SAAS,eACjB;GACE;GACA;GACA;GACD,EACD,KACD;;;;;;;CAQH,OAAuB,cACrB,kBACA,SACA;AACA,YAAU,SAAS,cAAc,kBAAkB;GACjD,YAAY,SAAS,QAAQ,GACzB,UACA,SAAS,cAAc,iBAAiB;GAC5C,YACE,WACA,SAAS,QAAQ,IACjB,SAAS,cACT,MAAM,QAAQ,QAAQ,WAAW,GAC7B,QAAQ,aACR,CAAC,aAAa;GACrB,CAAC;;CAGJ,AAAQ,cAAc;AACpB,QAAM,EAAE,QAAQ,MAAM,CAAC;;;AAI3B,UAAU,SAAS,eACjB;CACE,eAAe,MACb,OAAO,OAAO,aAAa,cAAc,OAAO,SAAS,EAAE;CAC7D,YAAW,MAAK,EAAE,SAAS,SAAS;CACpC,cAAa,MAAK,OAAO,KAAK,GAAG,SAAS;CAC3C,EACD,QACD"}
@@ -9,7 +9,7 @@ let lines_and_columns = require("lines-and-columns");
9
9
  *
10
10
  * @param input - JSON content as string
11
11
  * @param parseError - jsonc ParseError
12
- * @returns
12
+ * @returns Formatted error message with context
13
13
  */
14
14
  function formatParseError(input, parseError) {
15
15
  const { error, offset, length } = parseError;
@@ -8,7 +8,7 @@ import { LinesAndColumns } from "lines-and-columns";
8
8
  *
9
9
  * @param input - JSON content as string
10
10
  * @param parseError - jsonc ParseError
11
- * @returns
11
+ * @returns Formatted error message with context
12
12
  */
13
13
  function formatParseError(input, parseError) {
14
14
  const { error, offset, length } = parseError;
@@ -1 +1 @@
1
- {"version":3,"file":"parse-error.mjs","names":[],"sources":["../../../../../json/src/utils/parse-error.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ParseError } from \"jsonc-parser\";\nimport { printParseErrorCode } from \"jsonc-parser\";\nimport { LinesAndColumns } from \"lines-and-columns\";\nimport { codeFrameColumns } from \"./code-frames\";\n\n/**\n * Nicely formats a JSON error with context\n *\n * @param input - JSON content as string\n * @param parseError - jsonc ParseError\n * @returns\n */\nexport function formatParseError(input: string, parseError: ParseError) {\n const { error, offset, length } = parseError;\n const result = new LinesAndColumns(input).locationForIndex(offset);\n let line = result?.line ?? 0;\n let column = result?.column ?? 0;\n\n line++;\n column++;\n\n return `${printParseErrorCode(error)} in JSON at ${line}:${column}\\n${codeFrameColumns(\n input,\n {\n start: {\n line,\n column\n },\n end: {\n line,\n column: column + length\n }\n }\n )}\\n`;\n}\n"],"mappings":";;;;;;;;;;;;AA8BA,SAAgB,iBAAiB,OAAe,YAAwB;CACtE,MAAM,EAAE,OAAO,QAAQ,WAAW;CAClC,MAAM,SAAS,IAAI,gBAAgB,MAAM,CAAC,iBAAiB,OAAO;CAClE,IAAI,OAAO,QAAQ,QAAQ;CAC3B,IAAI,SAAS,QAAQ,UAAU;AAE/B;AACA;AAEA,QAAO,GAAG,oBAAoB,MAAM,CAAC,cAAc,KAAK,GAAG,OAAO,IAAI,iBACpE,OACA;EACE,OAAO;GACL;GACA;GACD;EACD,KAAK;GACH;GACA,QAAQ,SAAS;GAClB;EACF,CACF,CAAC"}
1
+ {"version":3,"file":"parse-error.mjs","names":[],"sources":["../../../../../json/src/utils/parse-error.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ParseError } from \"jsonc-parser\";\nimport { printParseErrorCode } from \"jsonc-parser\";\nimport { LinesAndColumns } from \"lines-and-columns\";\nimport { codeFrameColumns } from \"./code-frames\";\n\n/**\n * Nicely formats a JSON error with context\n *\n * @param input - JSON content as string\n * @param parseError - jsonc ParseError\n * @returns Formatted error message with context\n */\nexport function formatParseError(input: string, parseError: ParseError) {\n const { error, offset, length } = parseError;\n const result = new LinesAndColumns(input).locationForIndex(offset);\n let line = result?.line ?? 0;\n let column = result?.column ?? 0;\n\n line++;\n column++;\n\n return `${printParseErrorCode(error)} in JSON at ${line}:${column}\\n${codeFrameColumns(\n input,\n {\n start: {\n line,\n column\n },\n end: {\n line,\n column: column + length\n }\n }\n )}\\n`;\n}\n"],"mappings":";;;;;;;;;;;;AA8BA,SAAgB,iBAAiB,OAAe,YAAwB;CACtE,MAAM,EAAE,OAAO,QAAQ,WAAW;CAClC,MAAM,SAAS,IAAI,gBAAgB,MAAM,CAAC,iBAAiB,OAAO;CAClE,IAAI,OAAO,QAAQ,QAAQ;CAC3B,IAAI,SAAS,QAAQ,UAAU;AAE/B;AACA;AAEA,QAAO,GAAG,oBAAoB,MAAM,CAAC,cAAc,KAAK,GAAG,OAAO,IAAI,iBACpE,OACA;EACE,OAAO;GACL;GACA;GACD;EACD,KAAK;GACH;GACA,QAAQ,SAAS;GAClB;EACF,CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/fs",
3
- "version": "0.33.43",
3
+ "version": "0.33.45",
4
4
  "type": "module",
5
5
  "description": "A package containing various file system utilities that expand the functionality of NodeJs's built-in `fs` module.",
6
6
  "repository": {
@@ -103,31 +103,31 @@
103
103
  "./*": "./*"
104
104
  },
105
105
  "types": "./dist/index.d.cts",
106
- "peerDependencies": { "nx": "^22.5.0" },
106
+ "peerDependencies": { "nx": "^22.5.3" },
107
107
  "peerDependenciesMeta": { "nx": { "optional": true } },
108
108
  "dependencies": {
109
109
  "@antfu/install-pkg": "^1.1.0",
110
110
  "@ltd/j-toml": "^1.38.0",
111
- "@storm-software/config-tools": "^1.189.0",
112
- "@stryke/convert": "^0.6.40",
113
- "@stryke/helpers": "^0.9.42",
114
- "@stryke/path": "^0.26.6",
115
- "@stryke/string-format": "^0.14.2",
111
+ "@storm-software/config-tools": "^1.189.11",
112
+ "@stryke/convert": "^0.6.42",
113
+ "@stryke/helpers": "^0.9.44",
114
+ "@stryke/path": "^0.26.8",
115
+ "@stryke/string-format": "^0.14.4",
116
116
  "chalk": "^5.6.2",
117
117
  "defu": "^6.1.4",
118
118
  "glob": "^11.1.0",
119
119
  "mlly": "1.7.4",
120
- "nanotar": "^0.2.0",
120
+ "nanotar": "^0.2.1",
121
121
  "semver": "7.7.1",
122
122
  "yaml": "^2.8.2"
123
123
  },
124
124
  "devDependencies": {
125
- "@types/node": "^24.10.13",
125
+ "@types/node": "^24.11.0",
126
126
  "@types/semver": "^7.7.1",
127
- "nx": "^22.5.0",
127
+ "nx": "^22.5.3",
128
128
  "tinyexec": "^0.3.2",
129
129
  "tsdown": "^0.17.2"
130
130
  },
131
131
  "publishConfig": { "access": "public" },
132
- "gitHead": "7983f1c41784c67c589435b9fa601e1aed41d896"
132
+ "gitHead": "7755bd92180cadaa0ef8168e4e123deaacc4ccb8"
133
133
  }