@hardlydifficult/text 1.0.3 → 1.0.5

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 CHANGED
@@ -99,3 +99,25 @@ formatDuration(3_600_000); // "1h"
99
99
  formatDuration(500); // "<1s"
100
100
  formatDuration(90_000_000); // "1d 1h"
101
101
  ```
102
+
103
+ ### `convertFormat(content: string, to: TextFormat): string`
104
+
105
+ Convert between JSON and YAML string formats. Auto-detects the input format and serializes to the requested output format.
106
+
107
+ ```typescript
108
+ import { convertFormat } from "@hardlydifficult/text";
109
+
110
+ // JSON to YAML
111
+ convertFormat('{"name": "Alice", "age": 30}', "yaml");
112
+ // name: Alice
113
+ // age: 30
114
+
115
+ // YAML to JSON
116
+ convertFormat("name: Alice\nage: 30", "json");
117
+ // {
118
+ // "name": "Alice",
119
+ // "age": 30
120
+ // }
121
+ ```
122
+
123
+ The function tries to parse as JSON first, then falls back to YAML. Returns pretty-printed JSON with 2-space indent or clean YAML. Throws a descriptive error if the input is neither valid JSON nor YAML.
@@ -0,0 +1,13 @@
1
+ export interface BuildTreeOptions {
2
+ maxLevel2?: number;
3
+ maxLevel3?: number;
4
+ annotations?: ReadonlyMap<string, string>;
5
+ }
6
+ /** Default truncation limits for file tree rendering. */
7
+ export declare const FILE_TREE_DEFAULTS: Required<Pick<BuildTreeOptions, "maxLevel2" | "maxLevel3">>;
8
+ /**
9
+ * Builds a hierarchical file tree from flat paths with depth-based truncation.
10
+ * Optionally annotates entries with short descriptions from the annotations map.
11
+ */
12
+ export declare function buildFileTree(filePaths: readonly string[], options?: BuildTreeOptions): string;
13
+ //# sourceMappingURL=buildFileTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildFileTree.d.ts","sourceRoot":"","sources":["../src/buildFileTree.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3C;AAED,yDAAyD;AACzD,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CACvC,IAAI,CAAC,gBAAgB,EAAE,WAAW,GAAG,WAAW,CAAC,CAIlD,CAAC;AAEF;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,OAAO,GAAE,gBAAqB,GAC7B,MAAM,CAkFR"}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FILE_TREE_DEFAULTS = void 0;
4
+ exports.buildFileTree = buildFileTree;
5
+ /** Default truncation limits for file tree rendering. */
6
+ exports.FILE_TREE_DEFAULTS = {
7
+ maxLevel2: 10,
8
+ maxLevel3: 3,
9
+ };
10
+ /**
11
+ * Builds a hierarchical file tree from flat paths with depth-based truncation.
12
+ * Optionally annotates entries with short descriptions from the annotations map.
13
+ */
14
+ function buildFileTree(filePaths, options = {}) {
15
+ const { maxLevel2 = exports.FILE_TREE_DEFAULTS.maxLevel2, maxLevel3 = exports.FILE_TREE_DEFAULTS.maxLevel3, annotations, } = options;
16
+ // Build tree structure
17
+ const root = { name: "", isDir: true, children: [], fullPath: "" };
18
+ for (const filePath of filePaths) {
19
+ const parts = filePath.split("/");
20
+ let current = root;
21
+ for (let i = 0; i < parts.length; i++) {
22
+ const part = parts[i];
23
+ const isLastPart = i === parts.length - 1;
24
+ const currentFullPath = parts.slice(0, i + 1).join("/");
25
+ current.children ??= [];
26
+ let child = current.children.find((c) => c.name === part);
27
+ if (!child) {
28
+ child = {
29
+ name: part,
30
+ isDir: !isLastPart,
31
+ children: isLastPart ? undefined : [],
32
+ fullPath: currentFullPath,
33
+ };
34
+ current.children.push(child);
35
+ }
36
+ current = child;
37
+ }
38
+ }
39
+ // Render tree with truncation
40
+ const lines = [];
41
+ function renderNode(node, depth, prefix) {
42
+ if (!node.children || node.children.length === 0) {
43
+ return;
44
+ }
45
+ // Sort: directories first, then alphabetically
46
+ const sorted = [...node.children].sort((a, b) => {
47
+ if (a.isDir !== b.isDir) {
48
+ return a.isDir ? -1 : 1;
49
+ }
50
+ return a.name.localeCompare(b.name);
51
+ });
52
+ // Determine limit based on depth
53
+ let limit;
54
+ if (depth === 1) {
55
+ limit = Infinity;
56
+ }
57
+ else if (depth === 2) {
58
+ limit = maxLevel2;
59
+ }
60
+ else {
61
+ limit = maxLevel3;
62
+ }
63
+ const truncated = sorted.length > limit;
64
+ const toShow = truncated ? sorted.slice(0, limit) : sorted;
65
+ for (const child of toShow) {
66
+ const marker = child.isDir ? "/" : "";
67
+ const annotation = annotations?.get(child.fullPath) ?? "";
68
+ const suffix = annotation !== "" ? ` — ${annotation}` : "";
69
+ lines.push(`${prefix}${child.name}${marker}${suffix}`);
70
+ if (child.children && child.children.length > 0) {
71
+ renderNode(child, depth + 1, `${prefix} `);
72
+ }
73
+ }
74
+ if (truncated) {
75
+ const hiddenCount = sorted.length - limit;
76
+ lines.push(`${prefix}.. (${String(hiddenCount)} more)`);
77
+ }
78
+ }
79
+ renderNode(root, 1, "");
80
+ return lines.join("\n");
81
+ }
82
+ //# sourceMappingURL=buildFileTree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildFileTree.js","sourceRoot":"","sources":["../src/buildFileTree.ts"],"names":[],"mappings":";;;AAyBA,sCAqFC;AAjGD,yDAAyD;AAC5C,QAAA,kBAAkB,GAE3B;IACF,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,CAAC;CACb,CAAC;AAEF;;;GAGG;AACH,SAAgB,aAAa,CAC3B,SAA4B,EAC5B,UAA4B,EAAE;IAE9B,MAAM,EACJ,SAAS,GAAG,0BAAkB,CAAC,SAAS,EACxC,SAAS,GAAG,0BAAkB,CAAC,SAAS,EACxC,WAAW,GACZ,GAAG,OAAO,CAAC;IAEZ,uBAAuB;IACvB,MAAM,IAAI,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C;YAC1D,MAAM,MAAM,GAAG,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC3D,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,KAAK,CAAC,IAAI,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;YAEvD,IAAI,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAChD,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,MAAM,IAAI,CAAC,CAAC;YAC9C,CAAC;QACH,CAAC;QAED,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC;YAC1C,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,OAAO,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC;IAED,UAAU,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACxB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,25 @@
1
+ export type TextFormat = "json" | "yaml";
2
+ /**
3
+ * Convert between JSON and YAML string formats.
4
+ *
5
+ * Auto-detects the input format by trying JSON.parse first, then
6
+ * falling back to YAML parsing. Returns pretty-printed JSON (2-space indent)
7
+ * or clean YAML based on the `to` parameter.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * // JSON to YAML
12
+ * convertFormat('{"name": "Alice", "age": 30}', "yaml")
13
+ * // name: Alice
14
+ * // age: 30
15
+ *
16
+ * // YAML to JSON
17
+ * convertFormat("name: Alice\nage: 30", "json")
18
+ * // {
19
+ * // "name": "Alice",
20
+ * // "age": 30
21
+ * // }
22
+ * ```
23
+ */
24
+ export declare function convertFormat(content: string, to: TextFormat): string;
25
+ //# sourceMappingURL=convertFormat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertFormat.d.ts","sourceRoot":"","sources":["../src/convertFormat.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAsBzC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,GAAG,MAAM,CAOrE"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.convertFormat = convertFormat;
4
+ const yaml_1 = require("yaml");
5
+ /**
6
+ * Parse content as JSON or YAML, throwing a descriptive error if both fail.
7
+ */
8
+ function parseContent(content) {
9
+ // Try JSON first
10
+ try {
11
+ return JSON.parse(content);
12
+ }
13
+ catch (jsonError) {
14
+ // Fall back to YAML
15
+ try {
16
+ return (0, yaml_1.parse)(content);
17
+ }
18
+ catch (yamlError) {
19
+ throw new Error(`Input is neither valid JSON nor YAML.\nJSON error: ${jsonError instanceof Error ? jsonError.message : String(jsonError)}\nYAML error: ${yamlError instanceof Error ? yamlError.message : String(yamlError)}`, { cause: yamlError });
20
+ }
21
+ }
22
+ }
23
+ /**
24
+ * Convert between JSON and YAML string formats.
25
+ *
26
+ * Auto-detects the input format by trying JSON.parse first, then
27
+ * falling back to YAML parsing. Returns pretty-printed JSON (2-space indent)
28
+ * or clean YAML based on the `to` parameter.
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * // JSON to YAML
33
+ * convertFormat('{"name": "Alice", "age": 30}', "yaml")
34
+ * // name: Alice
35
+ * // age: 30
36
+ *
37
+ * // YAML to JSON
38
+ * convertFormat("name: Alice\nage: 30", "json")
39
+ * // {
40
+ * // "name": "Alice",
41
+ * // "age": 30
42
+ * // }
43
+ * ```
44
+ */
45
+ function convertFormat(content, to) {
46
+ const data = parseContent(content);
47
+ if (to === "json") {
48
+ return JSON.stringify(data, null, 2);
49
+ }
50
+ return (0, yaml_1.stringify)(data);
51
+ }
52
+ //# sourceMappingURL=convertFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertFormat.js","sourceRoot":"","sources":["../src/convertFormat.ts"],"names":[],"mappings":";;AA8CA,sCAOC;AArDD,+BAAsE;AAItE;;GAEG;AACH,SAAS,YAAY,CAAC,OAAe;IACnC,iBAAiB;IACjB,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,SAAS,EAAE,CAAC;QACnB,oBAAoB;QACpB,IAAI,CAAC;YACH,OAAO,IAAA,YAAS,EAAC,OAAO,CAAC,CAAC;QAC5B,CAAC;QAAC,OAAO,SAAS,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CACb,sDAAsD,SAAS,YAAY,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,iBAAiB,SAAS,YAAY,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,EAC7M,EAAE,KAAK,EAAE,SAAS,EAAE,CACrB,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAgB,aAAa,CAAC,OAAe,EAAE,EAAc;IAC3D,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IAEnC,IAAI,EAAE,KAAK,MAAM,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,IAAA,gBAAa,EAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
package/dist/index.d.ts CHANGED
@@ -3,4 +3,8 @@ export { replaceTemplate, extractPlaceholders } from "./template.js";
3
3
  export { chunkText } from "./chunkText.js";
4
4
  export { slugify } from "./slugify.js";
5
5
  export { formatDuration } from "./formatDuration.js";
6
+ export { buildFileTree, FILE_TREE_DEFAULTS } from "./buildFileTree.js";
7
+ export type { BuildTreeOptions } from "./buildFileTree.js";
8
+ export { convertFormat } from "./convertFormat.js";
9
+ export type { TextFormat } from "./convertFormat.js";
6
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatDuration = exports.slugify = exports.chunkText = exports.extractPlaceholders = exports.replaceTemplate = exports.formatErrorForLog = exports.formatError = exports.getErrorMessage = void 0;
3
+ exports.convertFormat = exports.FILE_TREE_DEFAULTS = exports.buildFileTree = exports.formatDuration = exports.slugify = exports.chunkText = exports.extractPlaceholders = exports.replaceTemplate = exports.formatErrorForLog = exports.formatError = exports.getErrorMessage = void 0;
4
4
  var errors_js_1 = require("./errors.js");
5
5
  Object.defineProperty(exports, "getErrorMessage", { enumerable: true, get: function () { return errors_js_1.getErrorMessage; } });
6
6
  Object.defineProperty(exports, "formatError", { enumerable: true, get: function () { return errors_js_1.formatError; } });
@@ -14,4 +14,9 @@ var slugify_js_1 = require("./slugify.js");
14
14
  Object.defineProperty(exports, "slugify", { enumerable: true, get: function () { return slugify_js_1.slugify; } });
15
15
  var formatDuration_js_1 = require("./formatDuration.js");
16
16
  Object.defineProperty(exports, "formatDuration", { enumerable: true, get: function () { return formatDuration_js_1.formatDuration; } });
17
+ var buildFileTree_js_1 = require("./buildFileTree.js");
18
+ Object.defineProperty(exports, "buildFileTree", { enumerable: true, get: function () { return buildFileTree_js_1.buildFileTree; } });
19
+ Object.defineProperty(exports, "FILE_TREE_DEFAULTS", { enumerable: true, get: function () { return buildFileTree_js_1.FILE_TREE_DEFAULTS; } });
20
+ var convertFormat_js_1 = require("./convertFormat.js");
21
+ Object.defineProperty(exports, "convertFormat", { enumerable: true, get: function () { return convertFormat_js_1.convertFormat; } });
17
22
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAA8E;AAArE,4GAAA,eAAe,OAAA;AAAE,wGAAA,WAAW,OAAA;AAAE,8GAAA,iBAAiB,OAAA;AACxD,6CAAqE;AAA5D,8GAAA,eAAe,OAAA;AAAE,kHAAA,mBAAmB,OAAA;AAC7C,+CAA2C;AAAlC,yGAAA,SAAS,OAAA;AAClB,2CAAuC;AAA9B,qGAAA,OAAO,OAAA;AAChB,yDAAqD;AAA5C,mHAAA,cAAc,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAA8E;AAArE,4GAAA,eAAe,OAAA;AAAE,wGAAA,WAAW,OAAA;AAAE,8GAAA,iBAAiB,OAAA;AACxD,6CAAqE;AAA5D,8GAAA,eAAe,OAAA;AAAE,kHAAA,mBAAmB,OAAA;AAC7C,+CAA2C;AAAlC,yGAAA,SAAS,OAAA;AAClB,2CAAuC;AAA9B,qGAAA,OAAO,OAAA;AAChB,yDAAqD;AAA5C,mHAAA,cAAc,OAAA;AACvB,uDAAuE;AAA9D,iHAAA,aAAa,OAAA;AAAE,sHAAA,kBAAkB,OAAA;AAE1C,uDAAmD;AAA1C,iHAAA,aAAa,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hardlydifficult/text",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -14,6 +14,9 @@
14
14
  "lint": "tsc --noEmit",
15
15
  "clean": "rm -rf dist"
16
16
  },
17
+ "dependencies": {
18
+ "yaml": "2.8.2"
19
+ },
17
20
  "devDependencies": {
18
21
  "@types/node": "25.2.3",
19
22
  "typescript": "5.9.3",