@aippy/vite-plugins 0.2.9-dev.0 โ 0.4.0-dev.1
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 +34 -27
- package/dist/aippy-preload/index.js +1 -1
- package/dist/{aippy-preload-8BoWu90-.js โ aippy-preload-QZY6fyKx.js} +73 -56
- package/dist/asset-constants/generator-utils.d.ts +2 -1
- package/dist/asset-constants/index.js +1 -1
- package/dist/asset-constants/manifest.d.ts +51 -0
- package/dist/asset-constants/wrapper-keys.d.ts +5 -0
- package/dist/asset-constants-C59CLHCE.js +359 -0
- package/dist/index/index.js +2 -2
- package/dist/manifest-CI1ALLzl.js +365 -0
- package/package.json +5 -3
- package/src/asset-constants/assets.schema.json +232 -0
- package/dist/asset-constants-BvKclVVI.js +0 -252
- package/dist/file-scanner-DT-LbrCa.js +0 -85
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import { extractAssetsFromContent as e, generateConstantName as t, processAssetURL as n } from "./utils/index.js";
|
|
2
|
+
import { a as r, c as i, d as a, f as o, i as s, l as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "./manifest-CI1ALLzl.js";
|
|
3
|
+
import { promises as g } from "fs";
|
|
4
|
+
import _ from "path";
|
|
5
|
+
import { parse as v } from "@babel/parser";
|
|
6
|
+
import y from "@babel/traverse";
|
|
7
|
+
import * as b from "@babel/types";
|
|
8
|
+
import x from "@babel/generator";
|
|
9
|
+
//#region src/asset-constants/generator-utils.ts
|
|
10
|
+
function S(e, t, n) {
|
|
11
|
+
if (n && f(n)) {
|
|
12
|
+
let t = structuredClone(n), r = new Set(Object.keys(t.assets));
|
|
13
|
+
for (let n of e.values()) {
|
|
14
|
+
let e = Object.keys(t.assets).filter((e) => t.assets[e].url === n.originalUri);
|
|
15
|
+
if (e.length) {
|
|
16
|
+
n.constantName = e[0];
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
let i = n.constantName, a = i, o = 2;
|
|
20
|
+
for (; r.has(a);) a = `${i}_${o++}`;
|
|
21
|
+
r.add(a), n.constantName = a, t.assets[a] = {
|
|
22
|
+
type: l(n.originalUri),
|
|
23
|
+
source: "existing",
|
|
24
|
+
replaceable: !0,
|
|
25
|
+
description: `Existing asset ${a}`,
|
|
26
|
+
status: "ready",
|
|
27
|
+
url: n.originalUri
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return JSON.stringify(t, null, 2) + "\n";
|
|
31
|
+
}
|
|
32
|
+
let r = {};
|
|
33
|
+
for (let [e, n] of t.entries()) r[n] = e;
|
|
34
|
+
return Array.from(e.values()).forEach((e) => {
|
|
35
|
+
r[e.constantName] = e.originalUri;
|
|
36
|
+
}), JSON.stringify(r, null, 2) + "\n";
|
|
37
|
+
}
|
|
38
|
+
function C(e) {
|
|
39
|
+
let t = /* @__PURE__ */ new Map();
|
|
40
|
+
try {
|
|
41
|
+
if (!e.trim()) return t;
|
|
42
|
+
let n = JSON.parse(e);
|
|
43
|
+
for (let [e, r] of Object.entries(n)) typeof r == "string" && t.set(r, e);
|
|
44
|
+
t.size > 0 && console.log(`๐ Found ${t.size} existing constants in assets.json`);
|
|
45
|
+
} catch (e) {
|
|
46
|
+
console.warn("Warning: Failed to parse existing assets.json:", e);
|
|
47
|
+
}
|
|
48
|
+
return t;
|
|
49
|
+
}
|
|
50
|
+
function w(e, t, n, r) {
|
|
51
|
+
let i = Array.from(n.values()).filter((e) => t.has(e.originalUri)).length, a = e - i;
|
|
52
|
+
console.log(a > 0 ? `โ
Generated ${e} asset constants (${a} new, ${i} reused) in ${r}` : e > 0 ? `โ
Generated ${e} asset constants (all reused from existing) in ${r}` : "โ
No asset constants found");
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/asset-constants/index.ts
|
|
56
|
+
var T = typeof y == "function" ? y : y.default, E = typeof x == "function" ? x : x.default, D = class extends Error {}, O = class {
|
|
57
|
+
isStructuredInventory() {
|
|
58
|
+
return this.document !== void 0 && f(this.document);
|
|
59
|
+
}
|
|
60
|
+
constructor(e = {}) {
|
|
61
|
+
d(this, "options", void 0), d(this, "assets", /* @__PURE__ */ new Map()), d(this, "existingAssets", /* @__PURE__ */ new Map()), d(this, "fileCache", new c()), d(this, "document", void 0), d(this, "implementationPaths", /* @__PURE__ */ new Set()), this.options = {
|
|
62
|
+
extensions: [
|
|
63
|
+
".png",
|
|
64
|
+
".jpg",
|
|
65
|
+
".jpeg",
|
|
66
|
+
".gif",
|
|
67
|
+
".svg",
|
|
68
|
+
".mp4",
|
|
69
|
+
".mp3",
|
|
70
|
+
".wav",
|
|
71
|
+
".ogg",
|
|
72
|
+
".webm"
|
|
73
|
+
],
|
|
74
|
+
srcDir: "src",
|
|
75
|
+
outputFile: "src/config/assets.json",
|
|
76
|
+
devMode: !1,
|
|
77
|
+
...e
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
clearCache() {
|
|
81
|
+
this.fileCache.clear();
|
|
82
|
+
}
|
|
83
|
+
generateConstantName(e) {
|
|
84
|
+
let n = /* @__PURE__ */ new Set([
|
|
85
|
+
...Array.from(this.assets.values()).map((e) => e.constantName),
|
|
86
|
+
...Array.from(this.existingAssets.values()),
|
|
87
|
+
...this.document && f(this.document) ? Object.keys(this.document.assets) : []
|
|
88
|
+
]);
|
|
89
|
+
return t(e, n);
|
|
90
|
+
}
|
|
91
|
+
async scanTsFile(t) {
|
|
92
|
+
try {
|
|
93
|
+
let n = await this.fileCache.read(t), r = [], i = e(n, "js", this.options.extensions), a = this.document;
|
|
94
|
+
if (a && f(a) && i.some((e) => Object.hasOwn(a.assets, e))) {
|
|
95
|
+
let r = u(n, t, this.options.srcDir, this.options.outputFile);
|
|
96
|
+
i = e(r, "js", this.options.extensions);
|
|
97
|
+
}
|
|
98
|
+
let o = n.split("\n");
|
|
99
|
+
return i.forEach((e) => {
|
|
100
|
+
if (this.isImplementationReference(t, e)) return;
|
|
101
|
+
let n = this.generateConstantName(e), i = o.findIndex((t) => t.includes(e)) + 1;
|
|
102
|
+
r.push({
|
|
103
|
+
originalUri: e,
|
|
104
|
+
constantName: n,
|
|
105
|
+
filePath: t,
|
|
106
|
+
line: i,
|
|
107
|
+
column: 1
|
|
108
|
+
});
|
|
109
|
+
}), r;
|
|
110
|
+
} catch (e) {
|
|
111
|
+
return console.warn(`Warning: Failed to scan ${t}:`, e), [];
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
async scanAllTsFiles() {
|
|
115
|
+
let e = this.options.srcDir;
|
|
116
|
+
try {
|
|
117
|
+
let t = await a(e, [".ts", ".tsx"]);
|
|
118
|
+
for (let e of t) e.endsWith("assets.json") || e.endsWith("assets.ts") || (await this.scanTsFile(e)).forEach((e) => {
|
|
119
|
+
this.existingAssets.has(e.originalUri) && (e.constantName = this.existingAssets.get(e.originalUri));
|
|
120
|
+
let t = e.originalUri;
|
|
121
|
+
this.assets.has(t) || this.assets.set(t, e);
|
|
122
|
+
});
|
|
123
|
+
} catch (e) {
|
|
124
|
+
console.error("Error scanning TypeScript files:", e);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
async readExistingAssetsFile() {
|
|
128
|
+
try {
|
|
129
|
+
return await g.readFile(this.options.outputFile, "utf-8");
|
|
130
|
+
} catch (e) {
|
|
131
|
+
if (e.code === "ENOENT") return "";
|
|
132
|
+
throw new D("Unable to read assets.json: " + String(e));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
async parseExistingAssets() {
|
|
136
|
+
let e = await this.readExistingAssetsFile();
|
|
137
|
+
if (e.trim()) {
|
|
138
|
+
let t;
|
|
139
|
+
try {
|
|
140
|
+
t = JSON.parse(e);
|
|
141
|
+
} catch {
|
|
142
|
+
if (/"schemaVersion(?:["\s:]|$)/i.test(e.replace(/\\u([0-9a-f]{4})/gi, (e, t) => String.fromCharCode(parseInt(t, 16))))) throw new D("assets: invalid JSON syntax");
|
|
143
|
+
}
|
|
144
|
+
if (t && Object.prototype.hasOwnProperty.call(t, "schemaVersion")) {
|
|
145
|
+
try {
|
|
146
|
+
this.document = s(e);
|
|
147
|
+
} catch (e) {
|
|
148
|
+
throw new D(e instanceof Error ? e.message : "Invalid asset manifest");
|
|
149
|
+
}
|
|
150
|
+
this.existingAssets = /* @__PURE__ */ new Map();
|
|
151
|
+
for (let [e, t] of Object.entries(m(this.document))) this.existingAssets.has(t) || this.existingAssets.set(t, e);
|
|
152
|
+
if (f(this.document)) {
|
|
153
|
+
let e = _.dirname(_.resolve(this.options.srcDir));
|
|
154
|
+
this.implementationPaths = new Set(Object.values(this.document.assets).filter((e) => (e.source === "code" || e.source === "generated") && e.implementation?.path).map((t) => _.resolve(e, t.implementation.path)));
|
|
155
|
+
}
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
this.existingAssets = C(e);
|
|
160
|
+
}
|
|
161
|
+
isImplementationReference(e, t) {
|
|
162
|
+
if (!this.implementationPaths.size || /^[a-z][a-z0-9+.-]*:/i.test(t) || t.startsWith("//")) return !1;
|
|
163
|
+
let n = t.split(/[?#]/)[0], r = n.startsWith("@/") ? _.resolve(this.options.srcDir, n.slice(2)) : _.resolve(_.dirname(e), n);
|
|
164
|
+
return this.implementationPaths.has(r);
|
|
165
|
+
}
|
|
166
|
+
async generateAssetsFile() {
|
|
167
|
+
await this.parseExistingAssets(), await this.scanAllTsFiles();
|
|
168
|
+
let e = S(this.assets, this.existingAssets, this.document), t = _.dirname(this.options.outputFile);
|
|
169
|
+
if (await g.mkdir(t, { recursive: !0 }), this.document && f(this.document)) try {
|
|
170
|
+
this.document = s(e);
|
|
171
|
+
} catch (e) {
|
|
172
|
+
throw new D(e instanceof Error ? e.message : "Invalid supplementary asset");
|
|
173
|
+
}
|
|
174
|
+
await g.writeFile(this.options.outputFile, e, "utf-8"), await this.generateAssetsWrapper(), w(this.assets.size, this.existingAssets, this.assets, this.options.outputFile);
|
|
175
|
+
}
|
|
176
|
+
async generateAssetsWrapper() {
|
|
177
|
+
let e = this.options.outputFile.replace(/\.json$/, ".ts"), t = _.basename(this.options.outputFile), n = `// ๐ Auto-generated wrapper for assets.json
|
|
178
|
+
// This file handles iOS image replacement via asset-interceptor.js
|
|
179
|
+
import assetsData from "./${t}";
|
|
180
|
+
|
|
181
|
+
// Batch process all asset URLs for potential replacements
|
|
182
|
+
// sessionStorage may contain __aippy_asset_overrides__ with multiple image mappings
|
|
183
|
+
(window as any).getReplacedAssets?.(assetsData);
|
|
184
|
+
|
|
185
|
+
export default assetsData;
|
|
186
|
+
`;
|
|
187
|
+
if (this.document && f(this.document)) {
|
|
188
|
+
let e = Object.keys(m(this.document));
|
|
189
|
+
n = `// Auto-generated asset URL map. Planning metadata stays in assets.json.
|
|
190
|
+
import manifest from "./${t}";
|
|
191
|
+
const keys = ${JSON.stringify(e)} as const;
|
|
192
|
+
const assetsData = ${e.length ? "Object.fromEntries(keys.map(name => [name, manifest.assets[name].url]))" : "{}"} as { [K in typeof keys[number]]: string };
|
|
193
|
+
(window as any).getReplacedAssets?.(assetsData);
|
|
194
|
+
export default assetsData;
|
|
195
|
+
`;
|
|
196
|
+
}
|
|
197
|
+
await g.writeFile(e, n, "utf-8"), console.log(` โ Generated assets wrapper: ${_.relative(process.cwd(), e)}`);
|
|
198
|
+
}
|
|
199
|
+
getAssets() {
|
|
200
|
+
return Array.from(this.assets.values());
|
|
201
|
+
}
|
|
202
|
+
async replaceUrisInFile(e, t) {
|
|
203
|
+
try {
|
|
204
|
+
let a = await this.fileCache.read(e), o = v(a, {
|
|
205
|
+
sourceType: "module",
|
|
206
|
+
plugins: [
|
|
207
|
+
"typescript",
|
|
208
|
+
"jsx",
|
|
209
|
+
"decorators-legacy"
|
|
210
|
+
]
|
|
211
|
+
}), s = !1, c = this.options.outputFile.replace(/\.json$/, ".ts"), l = h(c, this.options.srcDir), u = p(e, this.options.srcDir, this.options.outputFile), d = i(o, u), f = "assetsData", m = !1, y, x = /* @__PURE__ */ new Set();
|
|
212
|
+
T(o, {
|
|
213
|
+
Identifier: (e) => {
|
|
214
|
+
x.add(e.node.name);
|
|
215
|
+
},
|
|
216
|
+
ImportDeclaration: (e) => {
|
|
217
|
+
if (!(!u.has(e.node.source.value) || e.node.importKind === "type")) for (let t of e.node.specifiers) {
|
|
218
|
+
if (t.importKind === "type") continue;
|
|
219
|
+
let n = e.scope.getBinding(t.local.name);
|
|
220
|
+
r(t) && (f = t.local.name, m = !0, y = n);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
let S = !1;
|
|
225
|
+
if (m && T(o, { StringLiteral: (r) => {
|
|
226
|
+
!b.isImportDeclaration(r.parent) && !d(r) && !this.isImplementationReference(e, r.node.value) && t.has(n(r.node.value)) && r.scope.getBinding(f) !== y && (S = !0);
|
|
227
|
+
} }), !m && x.has(f) || S) {
|
|
228
|
+
let e = "aippyAssetsData";
|
|
229
|
+
for (let t = 2; x.has(e); t++) e = `aippyAssetsData${t}`;
|
|
230
|
+
S && y.scope.rename(f, e), f = e;
|
|
231
|
+
}
|
|
232
|
+
if (T(o, { StringLiteral: (r) => {
|
|
233
|
+
let i = r.node.value;
|
|
234
|
+
if (this.isImplementationReference(e, i) || d(r) || b.isImportDeclaration(r.parent) || b.isExportNamedDeclaration(r.parent) || b.isExportAllDeclaration(r.parent) || r.findParent((e) => b.isTSType(e.node) || b.isTSInterfaceBody(e.node))) return;
|
|
235
|
+
let a = n(i);
|
|
236
|
+
if (t.has(a)) {
|
|
237
|
+
let e = t.get(a), n = b.memberExpression(b.identifier(f), /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(e) ? b.identifier(e) : b.stringLiteral(e), !/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(e));
|
|
238
|
+
if ((b.isObjectProperty(r.parent) || b.isObjectMethod(r.parent) || b.isClassProperty(r.parent) || b.isClassMethod(r.parent)) && r.key === "key" && (r.parent.computed = !0), r.parent && b.isJSXAttribute(r.parent)) r.replaceWith(b.jsxExpressionContainer(n));
|
|
239
|
+
else {
|
|
240
|
+
try {
|
|
241
|
+
b.validate(r.parent, r.key, n);
|
|
242
|
+
} catch {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
r.replaceWith(n);
|
|
246
|
+
}
|
|
247
|
+
r.skip(), s = !0;
|
|
248
|
+
}
|
|
249
|
+
} }), !s) return;
|
|
250
|
+
if (!m) {
|
|
251
|
+
let e = b.importDeclaration([b.importDefaultSpecifier(b.identifier(f))], b.stringLiteral(l));
|
|
252
|
+
o.program.body.unshift(e);
|
|
253
|
+
}
|
|
254
|
+
let C = E(o, {
|
|
255
|
+
retainLines: !1,
|
|
256
|
+
comments: !0,
|
|
257
|
+
compact: !1
|
|
258
|
+
}, a);
|
|
259
|
+
await g.writeFile(e, C.code, "utf-8"), this.fileCache.invalidate(e), console.log(` โ Replaced URIs in ${_.relative(process.cwd(), e)}`);
|
|
260
|
+
} catch (t) {
|
|
261
|
+
if (this.isStructuredInventory()) throw t;
|
|
262
|
+
console.warn(`Warning: Failed to replace URIs in ${e}:`, t);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
async replaceAllUris() {
|
|
266
|
+
let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set();
|
|
267
|
+
for (let n of this.assets.values()) e.set(n.originalUri, n.constantName), t.add(n.filePath);
|
|
268
|
+
for (let n of t) await this.replaceUrisInFile(n, e);
|
|
269
|
+
}
|
|
270
|
+
async cleanupUnusedConstants() {
|
|
271
|
+
if (!(this.document && f(this.document))) try {
|
|
272
|
+
let e = await this.readExistingAssetsFile();
|
|
273
|
+
if (!e.trim()) return;
|
|
274
|
+
let t = /* @__PURE__ */ new Map();
|
|
275
|
+
try {
|
|
276
|
+
let n = JSON.parse(e);
|
|
277
|
+
for (let [e, r] of Object.entries(n)) typeof r == "string" && t.set(e, r);
|
|
278
|
+
} catch (e) {
|
|
279
|
+
console.warn("Warning: Failed to parse assets.json:", e);
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
if (t.size === 0) return;
|
|
283
|
+
let n = /* @__PURE__ */ new Set(), r = await a(this.options.srcDir, [".ts", ".tsx"]);
|
|
284
|
+
for (let e of r) if (!(e.endsWith("assets.json") || e.endsWith("assets.ts"))) try {
|
|
285
|
+
let r = await this.fileCache.read(e);
|
|
286
|
+
for (let e of t.keys()) r.includes(e) && n.add(e);
|
|
287
|
+
} catch (t) {
|
|
288
|
+
console.warn(`Warning: Failed to read ${e}:`, t);
|
|
289
|
+
}
|
|
290
|
+
let i = [];
|
|
291
|
+
for (let e of t.keys()) n.has(e) || i.push(e);
|
|
292
|
+
if (i.length > 0) {
|
|
293
|
+
console.log(`๐งน Removing ${i.length} unused constant(s):`), i.forEach((e) => {
|
|
294
|
+
console.log(` - ${e}`);
|
|
295
|
+
});
|
|
296
|
+
let e = [];
|
|
297
|
+
for (let n of i) {
|
|
298
|
+
let r = t.get(n);
|
|
299
|
+
r && e.push(r);
|
|
300
|
+
}
|
|
301
|
+
for (let t of e) this.assets.delete(t);
|
|
302
|
+
} else console.log("โ
All constants are in use");
|
|
303
|
+
} catch (e) {
|
|
304
|
+
console.warn("Warning: Failed to cleanup unused constants:", e);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
async upgradeJsonImportsToTs() {
|
|
308
|
+
let e = this.options.outputFile.replace(/\.json$/, ".ts"), t = h(e, this.options.srcDir), n = await a(this.options.srcDir, [".ts", ".tsx"]), r = 0;
|
|
309
|
+
for (let i of n) if (!(i.endsWith("assets.ts") || i.endsWith("assets.json"))) try {
|
|
310
|
+
let n = await this.fileCache.read(i), a = o(i, this.options.outputFile) + ".json", s = o(i, e), c = h(this.options.outputFile, this.options.srcDir) + ".json";
|
|
311
|
+
if (!n.includes(a) && !n.includes(s) && !n.includes(c)) continue;
|
|
312
|
+
let l = v(n, {
|
|
313
|
+
sourceType: "module",
|
|
314
|
+
plugins: [
|
|
315
|
+
"typescript",
|
|
316
|
+
"jsx",
|
|
317
|
+
"decorators-legacy"
|
|
318
|
+
]
|
|
319
|
+
}), u = !1;
|
|
320
|
+
if (T(l, { ImportDeclaration: (e) => {
|
|
321
|
+
let n = e.node.source.value;
|
|
322
|
+
(n === a || n === s || n === c) && (e.node.source.value = t, u = !0);
|
|
323
|
+
} }), u) {
|
|
324
|
+
let e = E(l, {
|
|
325
|
+
retainLines: !1,
|
|
326
|
+
comments: !0,
|
|
327
|
+
compact: !1
|
|
328
|
+
}, n);
|
|
329
|
+
await g.writeFile(i, e.code, "utf-8"), this.fileCache.invalidate(i), console.log(` โ Upgraded import in ${_.relative(process.cwd(), i)} โ ${t}`), r++;
|
|
330
|
+
}
|
|
331
|
+
} catch (e) {
|
|
332
|
+
if (this.isStructuredInventory()) throw e;
|
|
333
|
+
console.warn(`Warning: Failed to upgrade imports in ${i}:`, e);
|
|
334
|
+
}
|
|
335
|
+
r > 0 && console.log(`โ
Upgraded ${r} file(s) to use ${t}`);
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
function k(e = {}) {
|
|
339
|
+
return {
|
|
340
|
+
name: "vite-plugin-asset-constants",
|
|
341
|
+
apply: "build",
|
|
342
|
+
enforce: "pre",
|
|
343
|
+
async buildStart() {
|
|
344
|
+
if (!e.devMode) return;
|
|
345
|
+
let t = new O(e);
|
|
346
|
+
try {
|
|
347
|
+
await t.generateAssetsFile();
|
|
348
|
+
let e = t.getAssets();
|
|
349
|
+
e.length > 0 && (console.log(`๐ฆ Found ${e.length} asset references:`), e.forEach((e) => {
|
|
350
|
+
console.log(` ${e.constantName} = '${e.originalUri}' (${_.relative(process.cwd(), e.filePath)}:${e.line})`);
|
|
351
|
+
}), console.log("\n๐ Replacing URIs with constants..."), await t.replaceAllUris(), console.log("โ
URI replacement completed!")), console.log("\n๐งน Checking for unused constants..."), await t.cleanupUnusedConstants(), await t.generateAssetsFile(), console.log("\n๐ Upgrading assets.json imports to assets.ts..."), await t.upgradeJsonImportsToTs(), console.log("โ
Asset constants finalized!\n"), t.clearCache();
|
|
352
|
+
} catch (e) {
|
|
353
|
+
console.error("โ Error in asset constants plugin:", e), (e instanceof D || t.isStructuredInventory()) && this.error(e instanceof Error ? e.message : String(e));
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
//#endregion
|
|
359
|
+
export { k as t };
|
package/dist/index/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extractAssetsFromContent as e, findProjectRoot as t, generateConstantName as n, isValidAsset as r, processAssetURL as i } from "../utils/index.js";
|
|
2
|
-
import { t as a } from "../asset-constants-
|
|
3
|
-
import { t as o } from "../aippy-preload-
|
|
2
|
+
import { t as a } from "../asset-constants-C59CLHCE.js";
|
|
3
|
+
import { t as o } from "../aippy-preload-QZY6fyKx.js";
|
|
4
4
|
import { t as s } from "../aippy-tagger-By5socAS.js";
|
|
5
5
|
export { o as aippyPreloadPlugin, s as aippyTaggerPlugin, a as assetConstantsPlugin, a as default, e as extractAssetsFromContent, t as findProjectRoot, n as generateConstantName, r as isValidAsset, i as processAssetURL };
|