@maltty/cli 1.0.0-rc.0
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/LICENSE +21 -0
- package/README.md +88 -0
- package/bin/maltty.js +3 -0
- package/dist/_format-CeQhQTl5.js +23 -0
- package/dist/_format-CeQhQTl5.js.map +1 -0
- package/dist/attemptAsync-BdXzRSIT.js +42 -0
- package/dist/attemptAsync-BdXzRSIT.js.map +1 -0
- package/dist/chunk-DsIazq42.js +26 -0
- package/dist/commands/add/command.d.ts +7 -0
- package/dist/commands/add/command.d.ts.map +1 -0
- package/dist/commands/add/command.js +123 -0
- package/dist/commands/add/command.js.map +1 -0
- package/dist/commands/add/config.d.ts +7 -0
- package/dist/commands/add/config.d.ts.map +1 -0
- package/dist/commands/add/config.js +57 -0
- package/dist/commands/add/config.js.map +1 -0
- package/dist/commands/add/index.d.ts +7 -0
- package/dist/commands/add/index.d.ts.map +1 -0
- package/dist/commands/add/index.js +7 -0
- package/dist/commands/add/index.js.map +1 -0
- package/dist/commands/add/middleware.d.ts +7 -0
- package/dist/commands/add/middleware.d.ts.map +1 -0
- package/dist/commands/add/middleware.js +88 -0
- package/dist/commands/add/middleware.js.map +1 -0
- package/dist/commands/build.d.ts +15 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +246 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/commands.d.ts +14 -0
- package/dist/commands/commands.d.ts.map +1 -0
- package/dist/commands/commands.js +189 -0
- package/dist/commands/commands.js.map +1 -0
- package/dist/commands/dev.d.ts +13 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +58 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/doctor.d.ts +13 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +658 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +305 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/run.d.ts +19 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/commands/run.js +478 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/commands/stories.d.ts +11 -0
- package/dist/commands/stories.d.ts.map +1 -0
- package/dist/commands/stories.js +22 -0
- package/dist/commands/stories.js.map +1 -0
- package/dist/config-helpers-pv_2Spux.js +15 -0
- package/dist/config-helpers-pv_2Spux.js.map +1 -0
- package/dist/defu-BBwssjW3.js +192 -0
- package/dist/defu-BBwssjW3.js.map +1 -0
- package/dist/detect-AOq1ehTE.js +61 -0
- package/dist/detect-AOq1ehTE.js.map +1 -0
- package/dist/dist-DW_gRP7_.js +1119 -0
- package/dist/dist-DW_gRP7_.js.map +1 -0
- package/dist/dist-Xa07jNxS.js +15617 -0
- package/dist/dist-Xa07jNxS.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +46 -0
- package/dist/index.js.map +1 -0
- package/dist/jiti-CxWlVmZ_.js +5458 -0
- package/dist/jiti-CxWlVmZ_.js.map +1 -0
- package/dist/json-D7WbuVK1.js +43 -0
- package/dist/json-D7WbuVK1.js.map +1 -0
- package/dist/json5-z-PGDMyy.js +777 -0
- package/dist/json5-z-PGDMyy.js.map +1 -0
- package/dist/jsonc-DqZkfC3S.js +401 -0
- package/dist/jsonc-DqZkfC3S.js.map +1 -0
- package/dist/jsonc-KADMdSjU.js +2 -0
- package/dist/lib/templates/command/command.ts.liquid +12 -0
- package/dist/lib/templates/config/config.ts.liquid +16 -0
- package/dist/lib/templates/middleware/middleware.ts.liquid +9 -0
- package/dist/lib/templates/project/gitignore.liquid +3 -0
- package/dist/lib/templates/project/maltty.config.ts.liquid +6 -0
- package/dist/lib/templates/project/package.json.liquid +30 -0
- package/dist/lib/templates/project/src/commands/hello.ts.liquid +12 -0
- package/dist/lib/templates/project/src/config.ts.liquid +16 -0
- package/dist/lib/templates/project/src/index.ts.liquid +13 -0
- package/dist/lib/templates/project/tsconfig.json.liquid +19 -0
- package/dist/lib/templates/project/vitest.config.ts.liquid +8 -0
- package/dist/main-C_8x2aB3.js +274 -0
- package/dist/main-C_8x2aB3.js.map +1 -0
- package/dist/manifest-BIKVDJML.js +112 -0
- package/dist/manifest-BIKVDJML.js.map +1 -0
- package/dist/multipart-parser-MNkxNO83.js +174 -0
- package/dist/multipart-parser-MNkxNO83.js.map +1 -0
- package/dist/node-C91xGGqn.js +644 -0
- package/dist/node-C91xGGqn.js.map +1 -0
- package/dist/node-Drmc03fL.js +3973 -0
- package/dist/node-Drmc03fL.js.map +1 -0
- package/dist/ohash-BPoV4zBH.js +185 -0
- package/dist/ohash-BPoV4zBH.js.map +1 -0
- package/dist/pnpm-workspace.yaml +26 -0
- package/dist/toml-LuHsHQtV.js +646 -0
- package/dist/toml-LuHsHQtV.js.map +1 -0
- package/dist/utils-DlIJNGLQ.js +1905 -0
- package/dist/utils-DlIJNGLQ.js.map +1 -0
- package/dist/validate-C_SXBoLq.js +18 -0
- package/dist/validate-C_SXBoLq.js.map +1 -0
- package/dist/write-CSwG4Stj.js +152 -0
- package/dist/write-CSwG4Stj.js.map +1 -0
- package/dist/yaml-BS9RDuUr.js +1067 -0
- package/dist/yaml-BS9RDuUr.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
//#region ../../node_modules/.pnpm/c12@4.0.0-beta.4_chokidar@5.0.0_dotenv@17.4.2_giget@1.2.5_jiti@2.7.0_magicast@0.5.2/node_modules/c12/dist/_chunks/libs/ohash.mjs
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __exportAll = (all, no_symbols) => {
|
|
5
|
+
let target = {};
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
11
|
+
return target;
|
|
12
|
+
};
|
|
13
|
+
function serialize(o) {
|
|
14
|
+
return typeof o == "string" ? `'${o}'` : new c().serialize(o);
|
|
15
|
+
}
|
|
16
|
+
const c = /* @__PURE__ */ function() {
|
|
17
|
+
class o {
|
|
18
|
+
#t = /* @__PURE__ */ new Map();
|
|
19
|
+
compare(t, r) {
|
|
20
|
+
const e = typeof t, n = typeof r;
|
|
21
|
+
return e === "string" && n === "string" ? t.localeCompare(r) : e === "number" && n === "number" ? t - r : String.prototype.localeCompare.call(this.serialize(t, true), this.serialize(r, true));
|
|
22
|
+
}
|
|
23
|
+
serialize(t, r) {
|
|
24
|
+
if (t === null) return "null";
|
|
25
|
+
switch (typeof t) {
|
|
26
|
+
case "string": return r ? t : `'${t}'`;
|
|
27
|
+
case "bigint": return `${t}n`;
|
|
28
|
+
case "object": return this.$object(t);
|
|
29
|
+
case "function": return this.$function(t);
|
|
30
|
+
}
|
|
31
|
+
return String(t);
|
|
32
|
+
}
|
|
33
|
+
serializeObject(t) {
|
|
34
|
+
const r = Object.prototype.toString.call(t);
|
|
35
|
+
if (r !== "[object Object]") return this.serializeBuiltInType(r.length < 10 ? `unknown:${r}` : r.slice(8, -1), t);
|
|
36
|
+
const e = t.constructor, n = e === Object || e === void 0 ? "" : e.name;
|
|
37
|
+
if (n !== "" && globalThis[n] === e) return this.serializeBuiltInType(n, t);
|
|
38
|
+
if (typeof t.toJSON == "function") {
|
|
39
|
+
const i = t.toJSON();
|
|
40
|
+
return n + (i !== null && typeof i == "object" ? this.$object(i) : `(${this.serialize(i)})`);
|
|
41
|
+
}
|
|
42
|
+
return this.serializeObjectEntries(n, Object.entries(t));
|
|
43
|
+
}
|
|
44
|
+
serializeBuiltInType(t, r) {
|
|
45
|
+
const e = this["$" + t];
|
|
46
|
+
if (e) return e.call(this, r);
|
|
47
|
+
if (typeof r?.entries == "function") return this.serializeObjectEntries(t, r.entries());
|
|
48
|
+
throw new Error(`Cannot serialize ${t}`);
|
|
49
|
+
}
|
|
50
|
+
serializeObjectEntries(t, r) {
|
|
51
|
+
const e = Array.from(r).sort((i, a) => this.compare(i[0], a[0]));
|
|
52
|
+
let n = `${t}{`;
|
|
53
|
+
for (let i = 0; i < e.length; i++) {
|
|
54
|
+
const [a, l] = e[i];
|
|
55
|
+
n += `${this.serialize(a, true)}:${this.serialize(l)}`, i < e.length - 1 && (n += ",");
|
|
56
|
+
}
|
|
57
|
+
return n + "}";
|
|
58
|
+
}
|
|
59
|
+
$object(t) {
|
|
60
|
+
let r = this.#t.get(t);
|
|
61
|
+
return r === void 0 && (this.#t.set(t, `#${this.#t.size}`), r = this.serializeObject(t), this.#t.set(t, r)), r;
|
|
62
|
+
}
|
|
63
|
+
$function(t) {
|
|
64
|
+
const r = Function.prototype.toString.call(t);
|
|
65
|
+
return r.slice(-15) === "[native code] }" ? `${t.name || ""}()[native]` : `${t.name}(${t.length})${r.replace(/\s*\n\s*/g, "")}`;
|
|
66
|
+
}
|
|
67
|
+
$Array(t) {
|
|
68
|
+
let r = "[";
|
|
69
|
+
for (let e = 0; e < t.length; e++) r += this.serialize(t[e]), e < t.length - 1 && (r += ",");
|
|
70
|
+
return r + "]";
|
|
71
|
+
}
|
|
72
|
+
$Date(t) {
|
|
73
|
+
try {
|
|
74
|
+
return `Date(${t.toISOString()})`;
|
|
75
|
+
} catch {
|
|
76
|
+
return "Date(null)";
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
$ArrayBuffer(t) {
|
|
80
|
+
return `ArrayBuffer[${new Uint8Array(t).join(",")}]`;
|
|
81
|
+
}
|
|
82
|
+
$Set(t) {
|
|
83
|
+
return `Set${this.$Array(Array.from(t).sort((r, e) => this.compare(r, e)))}`;
|
|
84
|
+
}
|
|
85
|
+
$Map(t) {
|
|
86
|
+
return this.serializeObjectEntries("Map", t.entries());
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
for (const s of [
|
|
90
|
+
"Error",
|
|
91
|
+
"RegExp",
|
|
92
|
+
"URL"
|
|
93
|
+
]) o.prototype["$" + s] = function(t) {
|
|
94
|
+
return `${s}(${t})`;
|
|
95
|
+
};
|
|
96
|
+
for (const s of [
|
|
97
|
+
"Int8Array",
|
|
98
|
+
"Uint8Array",
|
|
99
|
+
"Uint8ClampedArray",
|
|
100
|
+
"Int16Array",
|
|
101
|
+
"Uint16Array",
|
|
102
|
+
"Int32Array",
|
|
103
|
+
"Uint32Array",
|
|
104
|
+
"Float32Array",
|
|
105
|
+
"Float64Array"
|
|
106
|
+
]) o.prototype["$" + s] = function(t) {
|
|
107
|
+
return `${s}[${t.join(",")}]`;
|
|
108
|
+
};
|
|
109
|
+
for (const s of ["BigInt64Array", "BigUint64Array"]) o.prototype["$" + s] = function(t) {
|
|
110
|
+
return `${s}[${t.join("n,")}${t.length > 0 ? "n" : ""}]`;
|
|
111
|
+
};
|
|
112
|
+
return o;
|
|
113
|
+
}();
|
|
114
|
+
const e = globalThis.process?.getBuiltinModule?.("crypto")?.hash, r = "sha256", s = "base64url";
|
|
115
|
+
function digest(t) {
|
|
116
|
+
if (e) return e(r, t, s);
|
|
117
|
+
const o = createHash(r).update(t);
|
|
118
|
+
return globalThis.process?.versions?.webcontainer ? o.digest().toString(s) : o.digest(s);
|
|
119
|
+
}
|
|
120
|
+
var dist_exports = /* @__PURE__ */ __exportAll({ digest: () => digest });
|
|
121
|
+
var utils_exports = /* @__PURE__ */ __exportAll({ diff: () => diff });
|
|
122
|
+
function diff(obj1, obj2) {
|
|
123
|
+
return _diff(_toHashedObject(obj1), _toHashedObject(obj2));
|
|
124
|
+
}
|
|
125
|
+
function _diff(h1, h2) {
|
|
126
|
+
const diffs = [];
|
|
127
|
+
const allProps = /* @__PURE__ */ new Set([...Object.keys(h1.props || {}), ...Object.keys(h2.props || {})]);
|
|
128
|
+
if (h1.props && h2.props) for (const prop of allProps) {
|
|
129
|
+
const p1 = h1.props[prop];
|
|
130
|
+
const p2 = h2.props[prop];
|
|
131
|
+
if (p1 && p2) diffs.push(..._diff(h1.props?.[prop], h2.props?.[prop]));
|
|
132
|
+
else if (p1 || p2) diffs.push(new DiffEntry((p2 || p1).key, p1 ? "removed" : "added", p2, p1));
|
|
133
|
+
}
|
|
134
|
+
if (allProps.size === 0 && h1.hash !== h2.hash) diffs.push(new DiffEntry((h2 || h1).key, "changed", h2, h1));
|
|
135
|
+
return diffs;
|
|
136
|
+
}
|
|
137
|
+
function _toHashedObject(obj, key = "") {
|
|
138
|
+
if (obj && typeof obj !== "object") return new DiffHashedObject(key, obj, serialize(obj));
|
|
139
|
+
const props = {};
|
|
140
|
+
const hashes = [];
|
|
141
|
+
for (const _key in obj) {
|
|
142
|
+
props[_key] = _toHashedObject(obj[_key], key ? `${key}.${_key}` : _key);
|
|
143
|
+
hashes.push(props[_key].hash);
|
|
144
|
+
}
|
|
145
|
+
return new DiffHashedObject(key, obj, `{${hashes.join(":")}}`, props);
|
|
146
|
+
}
|
|
147
|
+
var DiffEntry = class {
|
|
148
|
+
constructor(key, type, newValue, oldValue) {
|
|
149
|
+
this.key = key;
|
|
150
|
+
this.type = type;
|
|
151
|
+
this.newValue = newValue;
|
|
152
|
+
this.oldValue = oldValue;
|
|
153
|
+
}
|
|
154
|
+
toString() {
|
|
155
|
+
return this.toJSON();
|
|
156
|
+
}
|
|
157
|
+
toJSON() {
|
|
158
|
+
switch (this.type) {
|
|
159
|
+
case "added": return `Added \`${this.key}\``;
|
|
160
|
+
case "removed": return `Removed \`${this.key}\``;
|
|
161
|
+
case "changed": return `Changed \`${this.key}\` from \`${this.oldValue?.toString() || "-"}\` to \`${this.newValue.toString()}\``;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
var DiffHashedObject = class {
|
|
166
|
+
constructor(key, value, hash, props) {
|
|
167
|
+
this.key = key;
|
|
168
|
+
this.value = value;
|
|
169
|
+
this.hash = hash;
|
|
170
|
+
this.props = props;
|
|
171
|
+
}
|
|
172
|
+
toString() {
|
|
173
|
+
if (this.props) return `{${Object.keys(this.props).join(",")}}`;
|
|
174
|
+
else return JSON.stringify(this.value);
|
|
175
|
+
}
|
|
176
|
+
toJSON() {
|
|
177
|
+
const k = this.key || ".";
|
|
178
|
+
if (this.props) return `${k}({${Object.keys(this.props).join(",")}})`;
|
|
179
|
+
return `${k}(${this.value})`;
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
//#endregion
|
|
183
|
+
export { dist_exports as n, utils_exports as t };
|
|
184
|
+
|
|
185
|
+
//# sourceMappingURL=ohash-BPoV4zBH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ohash-BPoV4zBH.js","names":["#t"],"sources":["../../../node_modules/.pnpm/c12@4.0.0-beta.4_chokidar@5.0.0_dotenv@17.4.2_giget@1.2.5_jiti@2.7.0_magicast@0.5.2/node_modules/c12/dist/_chunks/libs/ohash.mjs"],"sourcesContent":["import { createHash } from \"node:crypto\";\n//#region \\0rolldown/runtime.js\nvar __defProp = Object.defineProperty;\nvar __exportAll = (all, no_symbols) => {\n\tlet target = {};\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n\tif (!no_symbols) __defProp(target, Symbol.toStringTag, { value: \"Module\" });\n\treturn target;\n};\n//#endregion\n//#region node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/shared/ohash.D__AXeF1.mjs\nfunction serialize(o) {\n\treturn typeof o == \"string\" ? `'${o}'` : new c().serialize(o);\n}\nconst c = /* @__PURE__ */ function() {\n\tclass o {\n\t\t#t = /* @__PURE__ */ new Map();\n\t\tcompare(t, r) {\n\t\t\tconst e = typeof t, n = typeof r;\n\t\t\treturn e === \"string\" && n === \"string\" ? t.localeCompare(r) : e === \"number\" && n === \"number\" ? t - r : String.prototype.localeCompare.call(this.serialize(t, true), this.serialize(r, true));\n\t\t}\n\t\tserialize(t, r) {\n\t\t\tif (t === null) return \"null\";\n\t\t\tswitch (typeof t) {\n\t\t\t\tcase \"string\": return r ? t : `'${t}'`;\n\t\t\t\tcase \"bigint\": return `${t}n`;\n\t\t\t\tcase \"object\": return this.$object(t);\n\t\t\t\tcase \"function\": return this.$function(t);\n\t\t\t}\n\t\t\treturn String(t);\n\t\t}\n\t\tserializeObject(t) {\n\t\t\tconst r = Object.prototype.toString.call(t);\n\t\t\tif (r !== \"[object Object]\") return this.serializeBuiltInType(r.length < 10 ? `unknown:${r}` : r.slice(8, -1), t);\n\t\t\tconst e = t.constructor, n = e === Object || e === void 0 ? \"\" : e.name;\n\t\t\tif (n !== \"\" && globalThis[n] === e) return this.serializeBuiltInType(n, t);\n\t\t\tif (typeof t.toJSON == \"function\") {\n\t\t\t\tconst i = t.toJSON();\n\t\t\t\treturn n + (i !== null && typeof i == \"object\" ? this.$object(i) : `(${this.serialize(i)})`);\n\t\t\t}\n\t\t\treturn this.serializeObjectEntries(n, Object.entries(t));\n\t\t}\n\t\tserializeBuiltInType(t, r) {\n\t\t\tconst e = this[\"$\" + t];\n\t\t\tif (e) return e.call(this, r);\n\t\t\tif (typeof r?.entries == \"function\") return this.serializeObjectEntries(t, r.entries());\n\t\t\tthrow new Error(`Cannot serialize ${t}`);\n\t\t}\n\t\tserializeObjectEntries(t, r) {\n\t\t\tconst e = Array.from(r).sort((i, a) => this.compare(i[0], a[0]));\n\t\t\tlet n = `${t}{`;\n\t\t\tfor (let i = 0; i < e.length; i++) {\n\t\t\t\tconst [a, l] = e[i];\n\t\t\t\tn += `${this.serialize(a, true)}:${this.serialize(l)}`, i < e.length - 1 && (n += \",\");\n\t\t\t}\n\t\t\treturn n + \"}\";\n\t\t}\n\t\t$object(t) {\n\t\t\tlet r = this.#t.get(t);\n\t\t\treturn r === void 0 && (this.#t.set(t, `#${this.#t.size}`), r = this.serializeObject(t), this.#t.set(t, r)), r;\n\t\t}\n\t\t$function(t) {\n\t\t\tconst r = Function.prototype.toString.call(t);\n\t\t\treturn r.slice(-15) === \"[native code] }\" ? `${t.name || \"\"}()[native]` : `${t.name}(${t.length})${r.replace(/\\s*\\n\\s*/g, \"\")}`;\n\t\t}\n\t\t$Array(t) {\n\t\t\tlet r = \"[\";\n\t\t\tfor (let e = 0; e < t.length; e++) r += this.serialize(t[e]), e < t.length - 1 && (r += \",\");\n\t\t\treturn r + \"]\";\n\t\t}\n\t\t$Date(t) {\n\t\t\ttry {\n\t\t\t\treturn `Date(${t.toISOString()})`;\n\t\t\t} catch {\n\t\t\t\treturn \"Date(null)\";\n\t\t\t}\n\t\t}\n\t\t$ArrayBuffer(t) {\n\t\t\treturn `ArrayBuffer[${new Uint8Array(t).join(\",\")}]`;\n\t\t}\n\t\t$Set(t) {\n\t\t\treturn `Set${this.$Array(Array.from(t).sort((r, e) => this.compare(r, e)))}`;\n\t\t}\n\t\t$Map(t) {\n\t\t\treturn this.serializeObjectEntries(\"Map\", t.entries());\n\t\t}\n\t}\n\tfor (const s of [\n\t\t\"Error\",\n\t\t\"RegExp\",\n\t\t\"URL\"\n\t]) o.prototype[\"$\" + s] = function(t) {\n\t\treturn `${s}(${t})`;\n\t};\n\tfor (const s of [\n\t\t\"Int8Array\",\n\t\t\"Uint8Array\",\n\t\t\"Uint8ClampedArray\",\n\t\t\"Int16Array\",\n\t\t\"Uint16Array\",\n\t\t\"Int32Array\",\n\t\t\"Uint32Array\",\n\t\t\"Float32Array\",\n\t\t\"Float64Array\"\n\t]) o.prototype[\"$\" + s] = function(t) {\n\t\treturn `${s}[${t.join(\",\")}]`;\n\t};\n\tfor (const s of [\"BigInt64Array\", \"BigUint64Array\"]) o.prototype[\"$\" + s] = function(t) {\n\t\treturn `${s}[${t.join(\"n,\")}${t.length > 0 ? \"n\" : \"\"}]`;\n\t};\n\treturn o;\n}();\n//#endregion\n//#region node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs\nconst e = globalThis.process?.getBuiltinModule?.(\"crypto\")?.hash, r = \"sha256\", s = \"base64url\";\nfunction digest(t) {\n\tif (e) return e(r, t, s);\n\tconst o = createHash(r).update(t);\n\treturn globalThis.process?.versions?.webcontainer ? o.digest().toString(s) : o.digest(s);\n}\n//#endregion\n//#region node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs\nvar dist_exports = /* @__PURE__ */ __exportAll({ digest: () => digest });\n//#endregion\n//#region node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/utils/index.mjs\nvar utils_exports = /* @__PURE__ */ __exportAll({ diff: () => diff });\nfunction diff(obj1, obj2) {\n\treturn _diff(_toHashedObject(obj1), _toHashedObject(obj2));\n}\nfunction _diff(h1, h2) {\n\tconst diffs = [];\n\tconst allProps = /* @__PURE__ */ new Set([...Object.keys(h1.props || {}), ...Object.keys(h2.props || {})]);\n\tif (h1.props && h2.props) for (const prop of allProps) {\n\t\tconst p1 = h1.props[prop];\n\t\tconst p2 = h2.props[prop];\n\t\tif (p1 && p2) diffs.push(..._diff(h1.props?.[prop], h2.props?.[prop]));\n\t\telse if (p1 || p2) diffs.push(new DiffEntry((p2 || p1).key, p1 ? \"removed\" : \"added\", p2, p1));\n\t}\n\tif (allProps.size === 0 && h1.hash !== h2.hash) diffs.push(new DiffEntry((h2 || h1).key, \"changed\", h2, h1));\n\treturn diffs;\n}\nfunction _toHashedObject(obj, key = \"\") {\n\tif (obj && typeof obj !== \"object\") return new DiffHashedObject(key, obj, serialize(obj));\n\tconst props = {};\n\tconst hashes = [];\n\tfor (const _key in obj) {\n\t\tprops[_key] = _toHashedObject(obj[_key], key ? `${key}.${_key}` : _key);\n\t\thashes.push(props[_key].hash);\n\t}\n\treturn new DiffHashedObject(key, obj, `{${hashes.join(\":\")}}`, props);\n}\nvar DiffEntry = class {\n\tconstructor(key, type, newValue, oldValue) {\n\t\tthis.key = key;\n\t\tthis.type = type;\n\t\tthis.newValue = newValue;\n\t\tthis.oldValue = oldValue;\n\t}\n\ttoString() {\n\t\treturn this.toJSON();\n\t}\n\ttoJSON() {\n\t\tswitch (this.type) {\n\t\t\tcase \"added\": return `Added \\`${this.key}\\``;\n\t\t\tcase \"removed\": return `Removed \\`${this.key}\\``;\n\t\t\tcase \"changed\": return `Changed \\`${this.key}\\` from \\`${this.oldValue?.toString() || \"-\"}\\` to \\`${this.newValue.toString()}\\``;\n\t\t}\n\t}\n};\nvar DiffHashedObject = class {\n\tconstructor(key, value, hash, props) {\n\t\tthis.key = key;\n\t\tthis.value = value;\n\t\tthis.hash = hash;\n\t\tthis.props = props;\n\t}\n\ttoString() {\n\t\tif (this.props) return `{${Object.keys(this.props).join(\",\")}}`;\n\t\telse return JSON.stringify(this.value);\n\t}\n\ttoJSON() {\n\t\tconst k = this.key || \".\";\n\t\tif (this.props) return `${k}({${Object.keys(this.props).join(\",\")}})`;\n\t\treturn `${k}(${this.value})`;\n\t}\n};\n//#endregion\nexport { dist_exports as n, utils_exports as t };\n"],"x_google_ignoreList":[0],"mappings":";;AAEA,IAAI,YAAY,OAAO;AACvB,IAAI,eAAe,KAAK,eAAe;CACtC,IAAI,SAAS,EAAE;AACf,MAAK,IAAI,QAAQ,IAAK,WAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;EACZ,CAAC;AACF,KAAI,CAAC,WAAY,WAAU,QAAQ,OAAO,aAAa,EAAE,OAAO,UAAU,CAAC;AAC3E,QAAO;;AAIR,SAAS,UAAU,GAAG;AACrB,QAAO,OAAO,KAAK,WAAW,IAAI,EAAE,KAAK,IAAI,GAAG,CAAC,UAAU,EAAE;;AAE9D,MAAM,IAAoB,2BAAW;CACpC,MAAM,EAAE;EACP,qBAAqB,IAAI,KAAK;EAC9B,QAAQ,GAAG,GAAG;GACb,MAAM,IAAI,OAAO,GAAG,IAAI,OAAO;AAC/B,UAAO,MAAM,YAAY,MAAM,WAAW,EAAE,cAAc,EAAE,GAAG,MAAM,YAAY,MAAM,WAAW,IAAI,IAAI,OAAO,UAAU,cAAc,KAAK,KAAK,UAAU,GAAG,KAAK,EAAE,KAAK,UAAU,GAAG,KAAK,CAAC;;EAEhM,UAA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M;AACX,OAAK,QAAQ;AACb,OAAK,OAAO;AACZ,OAAK,QAAQ;;CAEd,WAAW;AACV,MAAI,KAAK,MAAO,QAAO,IAAI,OAAO,KAAK,KAAK,MAAM,CAAC,KAAK,IAAI,CAAC;MACxD,QAAO,KAAK,UAAU,KAAK,MAAM;;CAEvC,SAAS;EACR,MAAM,IAAI,KAAK,OAAO;AACtB,MAAI,KAAK,MAAO,QAAO,GAAG,EAAE,IAAI,OAAO,KAAK,KAAK,MAAM,CAAC,KAAK,IAAI,CAAC;AAClE,SAAO,GAAG,EAAE,GAAG,KAAK,MAAM"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
packages:
|
|
2
|
+
- packages/*
|
|
3
|
+
- examples/*
|
|
4
|
+
|
|
5
|
+
catalog:
|
|
6
|
+
'@types/bun': ^1.3.11
|
|
7
|
+
'@types/node': ^25.6.0
|
|
8
|
+
'@vitest/coverage-v8': ^4.1.5
|
|
9
|
+
es-toolkit: ^1.45.1
|
|
10
|
+
liquidjs: ^10.25.7
|
|
11
|
+
ts-pattern: ^5.9.0
|
|
12
|
+
tsdown: 0.21.8
|
|
13
|
+
tsx: ^4.21.0
|
|
14
|
+
typescript: ^6.0.2
|
|
15
|
+
vitest: ^4.1.5
|
|
16
|
+
yaml: ^2.8.3
|
|
17
|
+
zod: ^4.4.3
|
|
18
|
+
|
|
19
|
+
overrides:
|
|
20
|
+
fast-xml-parser: ^5.7.1
|
|
21
|
+
liquidjs: ^10.25.7
|
|
22
|
+
postcss: ^8.5.10
|
|
23
|
+
tar: ^7.5.13
|
|
24
|
+
uuid: ^14.0.0
|
|
25
|
+
vite: ^8.0.10
|
|
26
|
+
zod: ^4.4.3
|