@rozenite/vite-plugin 1.6.0 → 1.7.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/dist/bundle-dts.d.ts +4 -0
- package/dist/bundle-dts.d.ts.map +1 -0
- package/dist/client-plugin.d.ts.map +1 -1
- package/dist/index.cjs +241 -90
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +242 -91
- package/dist/react-native-plugin.d.ts.map +1 -1
- package/dist/require-plugin.d.ts.map +1 -1
- package/dist/server-plugin.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/package.json +5 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-dts.d.ts","sourceRoot":"","sources":["../src/bundle-dts.ts"],"names":[],"mappings":"AAQA,KAAK,MAAM,GAAG,cAAc,GAAG,OAAO,CAAC;AAEvC,eAAO,MAAM,wBAAwB,GACnC,aAAa,MAAM,EACnB,QAAQ,MAAM,kBAkEf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-plugin.d.ts","sourceRoot":"","sources":["../src/client-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"client-plugin.d.ts","sourceRoot":"","sources":["../src/client-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;AA0BlD,eAAO,MAAM,oBAAoB,QAAO,MAuMvC,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const react = require("@vitejs/plugin-react");
|
|
4
4
|
const reactNativeWeb = require("vite-plugin-react-native-web");
|
|
5
|
-
const process$1 = require("node:process");
|
|
6
5
|
const path = require("node:path");
|
|
6
|
+
const process$1 = require("node:process");
|
|
7
7
|
const fs = require("node:fs");
|
|
8
8
|
const ejs = require("ejs");
|
|
9
9
|
const node_url = require("node:url");
|
|
@@ -11,6 +11,7 @@ const vite = require("vite");
|
|
|
11
11
|
const fs$1 = require("node:fs/promises");
|
|
12
12
|
const maybeDtsPlugin = require("vite-plugin-dts");
|
|
13
13
|
const assert = require("node:assert");
|
|
14
|
+
const apiExtractor = require("@microsoft/api-extractor");
|
|
14
15
|
var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
|
|
15
16
|
const rozeniteServerPlugin = () => {
|
|
16
17
|
return {
|
|
@@ -21,15 +22,24 @@ const rozeniteServerPlugin = () => {
|
|
|
21
22
|
config.build.lib = {
|
|
22
23
|
entry: path.resolve(projectRoot, "metro.ts"),
|
|
23
24
|
formats: ["es", "cjs"],
|
|
24
|
-
fileName: (format) => `metro.${format === "es" ? "js" : "cjs"}`
|
|
25
|
+
fileName: (format) => `metro/index.${format === "es" ? "js" : "cjs"}`
|
|
25
26
|
};
|
|
26
27
|
config.build.ssr = true;
|
|
27
|
-
config.build.rollupOptions
|
|
28
|
-
|
|
28
|
+
config.build.rollupOptions ??= {};
|
|
29
|
+
config.build.rollupOptions.output = [
|
|
30
|
+
{
|
|
31
|
+
format: "es",
|
|
32
|
+
entryFileNames: "metro/index.js",
|
|
33
|
+
exports: "named",
|
|
34
|
+
interop: "auto"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
format: "cjs",
|
|
38
|
+
entryFileNames: "metro/index.cjs",
|
|
29
39
|
exports: "named",
|
|
30
40
|
interop: "auto"
|
|
31
41
|
}
|
|
32
|
-
|
|
42
|
+
];
|
|
33
43
|
}
|
|
34
44
|
};
|
|
35
45
|
};
|
|
@@ -84,6 +94,7 @@ const TEMPLATES_DIR = path.resolve(
|
|
|
84
94
|
"templates"
|
|
85
95
|
);
|
|
86
96
|
const PANELS_DIR = "./panels";
|
|
97
|
+
const DEVTOOLS_DIR = "devtools";
|
|
87
98
|
const rozeniteClientPlugin = () => {
|
|
88
99
|
let projectRoot = process$1.cwd();
|
|
89
100
|
let viteServer = null;
|
|
@@ -101,7 +112,7 @@ const rozeniteClientPlugin = () => {
|
|
|
101
112
|
name,
|
|
102
113
|
label: entry.name,
|
|
103
114
|
sourceFile: path.resolve(projectRoot, entry.source),
|
|
104
|
-
htmlFile: name
|
|
115
|
+
htmlFile: `${name}.html`
|
|
105
116
|
};
|
|
106
117
|
});
|
|
107
118
|
};
|
|
@@ -132,19 +143,32 @@ const rozeniteClientPlugin = () => {
|
|
|
132
143
|
config.build.rollupOptions.input = {
|
|
133
144
|
...config.build.rollupOptions.input,
|
|
134
145
|
...Object.fromEntries(
|
|
135
|
-
panels.map((panel) => [
|
|
146
|
+
panels.map((panel) => [
|
|
147
|
+
panel.name,
|
|
148
|
+
`${DEVTOOLS_DIR}/${panel.htmlFile}`
|
|
149
|
+
])
|
|
136
150
|
)
|
|
137
151
|
};
|
|
152
|
+
config.build.rollupOptions.output = {
|
|
153
|
+
assetFileNames: `${DEVTOOLS_DIR}/assets/[name]-[hash][extname]`,
|
|
154
|
+
chunkFileNames: `${DEVTOOLS_DIR}/assets/[name]-[hash].js`,
|
|
155
|
+
entryFileNames: `${DEVTOOLS_DIR}/assets/[name]-[hash].js`,
|
|
156
|
+
...config.build.rollupOptions.output ?? {}
|
|
157
|
+
};
|
|
138
158
|
},
|
|
139
159
|
resolveId(id) {
|
|
140
|
-
const isPanel = getPanels().some(
|
|
160
|
+
const isPanel = getPanels().some(
|
|
161
|
+
(panel) => `${DEVTOOLS_DIR}/${panel.htmlFile}` === id
|
|
162
|
+
);
|
|
141
163
|
if (isPanel) {
|
|
142
164
|
return id;
|
|
143
165
|
}
|
|
144
166
|
return null;
|
|
145
167
|
},
|
|
146
168
|
load(id) {
|
|
147
|
-
const panel = getPanels().find(
|
|
169
|
+
const panel = getPanels().find(
|
|
170
|
+
(panel2) => `${DEVTOOLS_DIR}/${panel2.htmlFile}` === id
|
|
171
|
+
);
|
|
148
172
|
if (panel) {
|
|
149
173
|
return generatePanelHtmlContent(panel);
|
|
150
174
|
}
|
|
@@ -180,7 +204,7 @@ const rozeniteClientPlugin = () => {
|
|
|
180
204
|
description: packageJSON.description,
|
|
181
205
|
panels: panels.map((panel2) => ({
|
|
182
206
|
name: panel2.label,
|
|
183
|
-
source:
|
|
207
|
+
source: `/${DEVTOOLS_DIR}/` + panel2.htmlFile
|
|
184
208
|
}))
|
|
185
209
|
},
|
|
186
210
|
null,
|
|
@@ -189,7 +213,9 @@ const rozeniteClientPlugin = () => {
|
|
|
189
213
|
);
|
|
190
214
|
return;
|
|
191
215
|
}
|
|
192
|
-
const panel = panels.find(
|
|
216
|
+
const panel = panels.find(
|
|
217
|
+
(panel2) => `/${DEVTOOLS_DIR}/` + panel2.htmlFile === url
|
|
218
|
+
);
|
|
193
219
|
if (panel) {
|
|
194
220
|
const htmlContent = generatePanelHtmlContent(panel);
|
|
195
221
|
server.transformIndexHtml(req.url || "/", htmlContent).then((html) => {
|
|
@@ -228,7 +254,7 @@ const rozeniteClientPlugin = () => {
|
|
|
228
254
|
description: packageJSON.description,
|
|
229
255
|
panels: panels.map((panel) => ({
|
|
230
256
|
name: panel.label,
|
|
231
|
-
source:
|
|
257
|
+
source: `/${DEVTOOLS_DIR}/` + panel.htmlFile
|
|
232
258
|
}))
|
|
233
259
|
})
|
|
234
260
|
});
|
|
@@ -244,7 +270,7 @@ const rozeniteReactNativePlugin = () => {
|
|
|
244
270
|
config.build.rollupOptions ??= {};
|
|
245
271
|
config.build.lib = {
|
|
246
272
|
entry: path.resolve(projectRoot, "react-native.ts"),
|
|
247
|
-
fileName: (format) => `react-native.${format === "es" ? "js" : "cjs"}`
|
|
273
|
+
fileName: (format) => `react-native/index.${format === "es" ? "js" : "cjs"}`
|
|
248
274
|
};
|
|
249
275
|
config.build.rollupOptions.external = (id) => {
|
|
250
276
|
if (id.startsWith("node:")) {
|
|
@@ -257,14 +283,16 @@ const rozeniteReactNativePlugin = () => {
|
|
|
257
283
|
format: "es",
|
|
258
284
|
exports: "named",
|
|
259
285
|
interop: "auto",
|
|
260
|
-
|
|
286
|
+
entryFileNames: "react-native/index.js",
|
|
287
|
+
chunkFileNames: "react-native/chunks/[name].js",
|
|
261
288
|
...config.build.rollupOptions.output ?? {}
|
|
262
289
|
},
|
|
263
290
|
{
|
|
264
291
|
format: "cjs",
|
|
265
292
|
exports: "named",
|
|
266
293
|
interop: "auto",
|
|
267
|
-
|
|
294
|
+
entryFileNames: "react-native/index.cjs",
|
|
295
|
+
chunkFileNames: "react-native/chunks/[name].cjs",
|
|
268
296
|
...config.build.rollupOptions.output ?? {}
|
|
269
297
|
}
|
|
270
298
|
];
|
|
@@ -274,69 +302,88 @@ const rozeniteReactNativePlugin = () => {
|
|
|
274
302
|
};
|
|
275
303
|
const REQUIRE_REGEX = /require\s*\(\s*['"`]([^'"`]+)['"`]\s*\)/g;
|
|
276
304
|
const IMPORT_PREFIX = "__import_";
|
|
305
|
+
const VIRTUAL_REQUIRE_PREFIX = "\0virtual:rozenite-rn-require:";
|
|
306
|
+
const REQUIRE_WRAPPER_SUFFIX = ".require";
|
|
307
|
+
const extractModuleName = (filePath) => {
|
|
308
|
+
return path.basename(filePath).replace(/\.[^/.]+$/, "");
|
|
309
|
+
};
|
|
310
|
+
const sanitizeChunkName = (value) => {
|
|
311
|
+
return value.replace(/[^a-zA-Z0-9_-]/g, "-");
|
|
312
|
+
};
|
|
313
|
+
const findRequireStatements = (code) => {
|
|
314
|
+
const requires = /* @__PURE__ */ new Set();
|
|
315
|
+
let match;
|
|
316
|
+
REQUIRE_REGEX.lastIndex = 0;
|
|
317
|
+
while ((match = REQUIRE_REGEX.exec(code)) !== null) {
|
|
318
|
+
const moduleName = match[1];
|
|
319
|
+
if (moduleName && moduleName.trim()) {
|
|
320
|
+
requires.add(moduleName.trim());
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return requires;
|
|
324
|
+
};
|
|
325
|
+
const transformRequireToImports = (code, moduleInfoMap) => {
|
|
326
|
+
const imports = [];
|
|
327
|
+
const importMap = /* @__PURE__ */ new Map();
|
|
328
|
+
const requires = findRequireStatements(code);
|
|
329
|
+
requires.forEach((moduleName, index) => {
|
|
330
|
+
const moduleInfo = moduleInfoMap.get(moduleName);
|
|
331
|
+
if (!moduleInfo) {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
const importName = `${IMPORT_PREFIX}${index}`;
|
|
335
|
+
importMap.set(moduleName, importName);
|
|
336
|
+
imports.push(`import * as ${importName} from '${moduleInfo.virtualId}';`);
|
|
337
|
+
});
|
|
338
|
+
let transformedCode = code.replace(REQUIRE_REGEX, (match, moduleName) => {
|
|
339
|
+
const importName = importMap.get(moduleName.trim());
|
|
340
|
+
return importName || match;
|
|
341
|
+
});
|
|
342
|
+
if (imports.length > 0) {
|
|
343
|
+
transformedCode = imports.join("\n") + "\n" + transformedCode;
|
|
344
|
+
}
|
|
345
|
+
return { code: transformedCode };
|
|
346
|
+
};
|
|
347
|
+
const transformRequireToChunkReferences = (code, moduleInfoMap, getFileName) => {
|
|
348
|
+
return code.replace(REQUIRE_REGEX, (match, moduleName) => {
|
|
349
|
+
const moduleInfo = moduleInfoMap.get(moduleName.trim());
|
|
350
|
+
if (!moduleInfo) {
|
|
351
|
+
return match;
|
|
352
|
+
}
|
|
353
|
+
const outFileName = getFileName(moduleInfo.referenceId);
|
|
354
|
+
const relPath = vite.normalizePath(
|
|
355
|
+
path.posix.relative("react-native", outFileName)
|
|
356
|
+
);
|
|
357
|
+
const requirePath = relPath.startsWith(".") ? relPath : `./${relPath}`;
|
|
358
|
+
return `require('${requirePath}')`;
|
|
359
|
+
});
|
|
360
|
+
};
|
|
277
361
|
function requirePlugin() {
|
|
278
362
|
let input = "";
|
|
279
363
|
let inputName = "";
|
|
280
364
|
let isDevMode = false;
|
|
281
|
-
const moduleToChunkMap = /* @__PURE__ */ new Map();
|
|
282
365
|
const moduleInfoMap = /* @__PURE__ */ new Map();
|
|
283
|
-
const
|
|
284
|
-
return path.basename(filePath).replace(/\.[^/.]+$/, "");
|
|
285
|
-
};
|
|
286
|
-
const getFileExtension = (format) => {
|
|
287
|
-
return format === "es" ? ".js" : ".cjs";
|
|
288
|
-
};
|
|
289
|
-
const findRequireStatements = (code) => {
|
|
290
|
-
const requires = /* @__PURE__ */ new Set();
|
|
291
|
-
let match;
|
|
292
|
-
REQUIRE_REGEX.lastIndex = 0;
|
|
293
|
-
while ((match = REQUIRE_REGEX.exec(code)) !== null) {
|
|
294
|
-
const moduleName = match[1];
|
|
295
|
-
if (moduleName && moduleName.trim()) {
|
|
296
|
-
requires.add(moduleName.trim());
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
return requires;
|
|
300
|
-
};
|
|
301
|
-
const transformRequireToImports = (code) => {
|
|
302
|
-
const imports = [];
|
|
303
|
-
const importMap = /* @__PURE__ */ new Map();
|
|
304
|
-
const requires = findRequireStatements(code);
|
|
305
|
-
requires.forEach((moduleName, index) => {
|
|
306
|
-
const importName = `${IMPORT_PREFIX}${index}`;
|
|
307
|
-
importMap.set(moduleName, importName);
|
|
308
|
-
imports.push(`import * as ${importName} from '${moduleName}';`);
|
|
309
|
-
});
|
|
310
|
-
let transformedCode = code.replace(REQUIRE_REGEX, (match, moduleName) => {
|
|
311
|
-
const importName = importMap.get(moduleName.trim());
|
|
312
|
-
return importName || match;
|
|
313
|
-
});
|
|
314
|
-
if (imports.length > 0) {
|
|
315
|
-
transformedCode = imports.join("\n") + "\n" + transformedCode;
|
|
316
|
-
}
|
|
317
|
-
return { code: transformedCode, imports, importMap };
|
|
318
|
-
};
|
|
319
|
-
const transformRequireToChunkReferences = (code, format) => {
|
|
320
|
-
return code.replace(REQUIRE_REGEX, (match, moduleName) => {
|
|
321
|
-
const chunkName = moduleToChunkMap.get(moduleName.trim());
|
|
322
|
-
if (chunkName) {
|
|
323
|
-
const extension = getFileExtension(format);
|
|
324
|
-
return `require('./${chunkName}${extension}')`;
|
|
325
|
-
}
|
|
326
|
-
return match;
|
|
327
|
-
});
|
|
328
|
-
};
|
|
366
|
+
const virtualModuleSources = /* @__PURE__ */ new Map();
|
|
329
367
|
return {
|
|
330
368
|
name: "vite-require-plugin",
|
|
331
369
|
configResolved(config) {
|
|
332
370
|
isDevMode = config.command === "serve";
|
|
333
371
|
},
|
|
372
|
+
resolveId(id) {
|
|
373
|
+
if (virtualModuleSources.has(id)) {
|
|
374
|
+
return id;
|
|
375
|
+
}
|
|
376
|
+
return null;
|
|
377
|
+
},
|
|
378
|
+
load(id) {
|
|
379
|
+
return virtualModuleSources.get(id) ?? null;
|
|
380
|
+
},
|
|
334
381
|
transform(code, id) {
|
|
335
382
|
if (!isDevMode || id !== input) {
|
|
336
383
|
return null;
|
|
337
384
|
}
|
|
338
385
|
try {
|
|
339
|
-
const result = transformRequireToImports(code);
|
|
386
|
+
const result = transformRequireToImports(code, moduleInfoMap);
|
|
340
387
|
return {
|
|
341
388
|
code: result.code,
|
|
342
389
|
map: null
|
|
@@ -355,27 +402,36 @@ function requirePlugin() {
|
|
|
355
402
|
);
|
|
356
403
|
input = options.input[0];
|
|
357
404
|
inputName = extractModuleName(input);
|
|
405
|
+
moduleInfoMap.clear();
|
|
406
|
+
virtualModuleSources.clear();
|
|
358
407
|
const code = fs.readFileSync(input, "utf-8");
|
|
359
408
|
const requires = findRequireStatements(code);
|
|
360
409
|
for (const req of requires) {
|
|
361
410
|
try {
|
|
362
|
-
const resolved = await this.resolve(req, input);
|
|
363
|
-
if (resolved) {
|
|
364
|
-
const fileName = extractModuleName(resolved.id);
|
|
365
|
-
this.addWatchFile(resolved.id);
|
|
366
|
-
this.emitFile({
|
|
367
|
-
type: "chunk",
|
|
368
|
-
id: resolved.id,
|
|
369
|
-
fileName
|
|
370
|
-
});
|
|
371
|
-
moduleToChunkMap.set(req, fileName);
|
|
372
|
-
moduleInfoMap.set(req, {
|
|
373
|
-
fileName,
|
|
374
|
-
resolvedId: resolved.id
|
|
375
|
-
});
|
|
376
|
-
} else {
|
|
411
|
+
const resolved = await this.resolve(req, input, { skipSelf: true });
|
|
412
|
+
if (!resolved) {
|
|
377
413
|
console.warn(`Could not resolve module: ${req}`);
|
|
414
|
+
continue;
|
|
378
415
|
}
|
|
416
|
+
this.addWatchFile(resolved.id);
|
|
417
|
+
const exportName = sanitizeChunkName(
|
|
418
|
+
extractModuleName(resolved.id)
|
|
419
|
+
);
|
|
420
|
+
const wrapperName = `${exportName}${REQUIRE_WRAPPER_SUFFIX}`;
|
|
421
|
+
const virtualId = `${VIRTUAL_REQUIRE_PREFIX}${wrapperName}`;
|
|
422
|
+
virtualModuleSources.set(
|
|
423
|
+
virtualId,
|
|
424
|
+
`export * from ${JSON.stringify(req)};`
|
|
425
|
+
);
|
|
426
|
+
const referenceId = this.emitFile({
|
|
427
|
+
type: "chunk",
|
|
428
|
+
id: virtualId,
|
|
429
|
+
name: wrapperName
|
|
430
|
+
});
|
|
431
|
+
moduleInfoMap.set(req, {
|
|
432
|
+
referenceId,
|
|
433
|
+
virtualId
|
|
434
|
+
});
|
|
379
435
|
} catch (error) {
|
|
380
436
|
console.error(`Error resolving module ${req}:`, error);
|
|
381
437
|
}
|
|
@@ -385,21 +441,17 @@ function requirePlugin() {
|
|
|
385
441
|
throw error;
|
|
386
442
|
}
|
|
387
443
|
},
|
|
388
|
-
renderChunk(code, chunk
|
|
444
|
+
renderChunk(code, chunk) {
|
|
389
445
|
try {
|
|
390
|
-
const additionalChunkNames = Array.from(moduleToChunkMap.values());
|
|
391
|
-
if (additionalChunkNames.includes(chunk.fileName)) {
|
|
392
|
-
chunk.fileName = chunk.fileName + getFileExtension(options.format);
|
|
393
|
-
}
|
|
394
446
|
if (chunk.name !== inputName) {
|
|
395
447
|
return null;
|
|
396
448
|
}
|
|
397
|
-
const transformedCode = transformRequireToChunkReferences(
|
|
398
|
-
code,
|
|
399
|
-
options.format
|
|
400
|
-
);
|
|
401
449
|
return {
|
|
402
|
-
code:
|
|
450
|
+
code: transformRequireToChunkReferences(
|
|
451
|
+
code,
|
|
452
|
+
moduleInfoMap,
|
|
453
|
+
(referenceId) => vite.normalizePath(this.getFileName(referenceId))
|
|
454
|
+
),
|
|
403
455
|
map: null
|
|
404
456
|
};
|
|
405
457
|
} catch (error) {
|
|
@@ -409,18 +461,117 @@ function requirePlugin() {
|
|
|
409
461
|
}
|
|
410
462
|
};
|
|
411
463
|
}
|
|
464
|
+
const bundleTargetDeclarations = async (projectRoot, target) => {
|
|
465
|
+
const targetRoot = path.join(projectRoot, "dist", target);
|
|
466
|
+
const entryPath = path.join(targetRoot, "index.d.ts");
|
|
467
|
+
const tempOutputPath = path.join(targetRoot, "index.public.d.ts");
|
|
468
|
+
const srcDeclarationsPath = path.join(targetRoot, "src");
|
|
469
|
+
const configObjectFullPath = path.join(projectRoot, "api-extractor.json");
|
|
470
|
+
const packageJsonFullPath = path.join(projectRoot, "package.json");
|
|
471
|
+
const tsconfigFilePath = path.join(projectRoot, "tsconfig.json");
|
|
472
|
+
const extractorConfig = apiExtractor.ExtractorConfig.prepare({
|
|
473
|
+
configObject: {
|
|
474
|
+
projectFolder: projectRoot,
|
|
475
|
+
mainEntryPointFilePath: entryPath,
|
|
476
|
+
compiler: {
|
|
477
|
+
tsconfigFilePath,
|
|
478
|
+
overrideTsconfig: {
|
|
479
|
+
$schema: "http://json.schemastore.org/tsconfig",
|
|
480
|
+
compilerOptions: {
|
|
481
|
+
skipLibCheck: true
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
apiReport: {
|
|
486
|
+
enabled: false
|
|
487
|
+
},
|
|
488
|
+
docModel: {
|
|
489
|
+
enabled: false
|
|
490
|
+
},
|
|
491
|
+
dtsRollup: {
|
|
492
|
+
enabled: true,
|
|
493
|
+
publicTrimmedFilePath: tempOutputPath
|
|
494
|
+
},
|
|
495
|
+
tsdocMetadata: {
|
|
496
|
+
enabled: false
|
|
497
|
+
},
|
|
498
|
+
messages: {
|
|
499
|
+
compilerMessageReporting: {
|
|
500
|
+
default: {
|
|
501
|
+
logLevel: apiExtractor.ExtractorLogLevel.None
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
extractorMessageReporting: {
|
|
505
|
+
default: {
|
|
506
|
+
logLevel: apiExtractor.ExtractorLogLevel.None
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
configObjectFullPath,
|
|
512
|
+
packageJsonFullPath
|
|
513
|
+
});
|
|
514
|
+
const result = apiExtractor.Extractor.invoke(extractorConfig, {
|
|
515
|
+
localBuild: true,
|
|
516
|
+
showVerboseMessages: false,
|
|
517
|
+
showDiagnostics: false
|
|
518
|
+
});
|
|
519
|
+
if (!result.succeeded) {
|
|
520
|
+
throw new Error(`Failed to bundle ${target} declaration files.`);
|
|
521
|
+
}
|
|
522
|
+
await fs$1.rm(entryPath, { force: true });
|
|
523
|
+
await fs$1.rename(tempOutputPath, entryPath);
|
|
524
|
+
await fs$1.rm(srcDeclarationsPath, { recursive: true, force: true });
|
|
525
|
+
};
|
|
412
526
|
const dtsPlugin = "default" in maybeDtsPlugin ? maybeDtsPlugin.default : maybeDtsPlugin;
|
|
527
|
+
const getDtsPlugin = (target) => {
|
|
528
|
+
const projectRoot = process.cwd();
|
|
529
|
+
const entryRoot = target === "react-native" ? "react-native.ts" : "metro.ts";
|
|
530
|
+
const distRoot = path.join(projectRoot, "dist");
|
|
531
|
+
const targetRoot = path.join(distRoot, target);
|
|
532
|
+
const publicEntryPath = path.join(projectRoot, "dist", target, "index.d.ts");
|
|
533
|
+
return dtsPlugin({
|
|
534
|
+
entryRoot,
|
|
535
|
+
include: [entryRoot, "src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts"],
|
|
536
|
+
outDir: `dist/${target}`,
|
|
537
|
+
strictOutput: false,
|
|
538
|
+
insertTypesEntry: false,
|
|
539
|
+
tsconfigPath: path.join(projectRoot, "tsconfig.json"),
|
|
540
|
+
beforeWriteFile: (filePath, content) => {
|
|
541
|
+
if (!filePath.endsWith(".d.ts")) {
|
|
542
|
+
return false;
|
|
543
|
+
}
|
|
544
|
+
if (filePath === publicEntryPath || filePath.endsWith(`/${target}.d.ts`)) {
|
|
545
|
+
return {
|
|
546
|
+
filePath: publicEntryPath,
|
|
547
|
+
content
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
const relativeToDist = path.relative(distRoot, filePath);
|
|
551
|
+
if (!relativeToDist.startsWith("src/")) {
|
|
552
|
+
return false;
|
|
553
|
+
}
|
|
554
|
+
return {
|
|
555
|
+
filePath: path.join(targetRoot, relativeToDist),
|
|
556
|
+
content
|
|
557
|
+
};
|
|
558
|
+
},
|
|
559
|
+
afterBuild: async () => {
|
|
560
|
+
await bundleTargetDeclarations(projectRoot, target);
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
};
|
|
413
564
|
const rozenitePlugin = () => {
|
|
414
565
|
const isServer = process.env.VITE_ROZENITE_TARGET === "server";
|
|
415
566
|
const isReactNative = process.env.VITE_ROZENITE_TARGET === "react-native";
|
|
416
567
|
if (isServer) {
|
|
417
|
-
return [rozeniteServerPlugin(),
|
|
568
|
+
return [rozeniteServerPlugin(), getDtsPlugin("metro")];
|
|
418
569
|
} else if (isReactNative) {
|
|
419
570
|
return [
|
|
420
571
|
react(),
|
|
421
572
|
requirePlugin(),
|
|
422
573
|
rozeniteReactNativePlugin(),
|
|
423
|
-
|
|
574
|
+
getDtsPlugin("react-native")
|
|
424
575
|
];
|
|
425
576
|
}
|
|
426
577
|
return [
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AA+DzC,eAAO,MAAM,cAAc,QAAO,YAAY,EAqB7C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import react from "@vitejs/plugin-react";
|
|
2
2
|
import reactNativeWeb from "vite-plugin-react-native-web";
|
|
3
|
-
import process$1 from "node:process";
|
|
4
3
|
import path from "node:path";
|
|
4
|
+
import process$1 from "node:process";
|
|
5
5
|
import fs, { readFileSync } from "node:fs";
|
|
6
6
|
import ejs from "ejs";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
|
-
import { transformWithEsbuild } from "vite";
|
|
8
|
+
import { transformWithEsbuild, normalizePath } from "vite";
|
|
9
9
|
import fs$1 from "node:fs/promises";
|
|
10
10
|
import maybeDtsPlugin from "vite-plugin-dts";
|
|
11
11
|
import assert from "node:assert";
|
|
12
|
+
import { ExtractorConfig, ExtractorLogLevel, Extractor } from "@microsoft/api-extractor";
|
|
12
13
|
const rozeniteServerPlugin = () => {
|
|
13
14
|
return {
|
|
14
15
|
name: "rozenite-server-plugin",
|
|
@@ -18,15 +19,24 @@ const rozeniteServerPlugin = () => {
|
|
|
18
19
|
config.build.lib = {
|
|
19
20
|
entry: path.resolve(projectRoot, "metro.ts"),
|
|
20
21
|
formats: ["es", "cjs"],
|
|
21
|
-
fileName: (format) => `metro.${format === "es" ? "js" : "cjs"}`
|
|
22
|
+
fileName: (format) => `metro/index.${format === "es" ? "js" : "cjs"}`
|
|
22
23
|
};
|
|
23
24
|
config.build.ssr = true;
|
|
24
|
-
config.build.rollupOptions
|
|
25
|
-
|
|
25
|
+
config.build.rollupOptions ??= {};
|
|
26
|
+
config.build.rollupOptions.output = [
|
|
27
|
+
{
|
|
28
|
+
format: "es",
|
|
29
|
+
entryFileNames: "metro/index.js",
|
|
30
|
+
exports: "named",
|
|
31
|
+
interop: "auto"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
format: "cjs",
|
|
35
|
+
entryFileNames: "metro/index.cjs",
|
|
26
36
|
exports: "named",
|
|
27
37
|
interop: "auto"
|
|
28
38
|
}
|
|
29
|
-
|
|
39
|
+
];
|
|
30
40
|
}
|
|
31
41
|
};
|
|
32
42
|
};
|
|
@@ -81,6 +91,7 @@ const TEMPLATES_DIR = path.resolve(
|
|
|
81
91
|
"templates"
|
|
82
92
|
);
|
|
83
93
|
const PANELS_DIR = "./panels";
|
|
94
|
+
const DEVTOOLS_DIR = "devtools";
|
|
84
95
|
const rozeniteClientPlugin = () => {
|
|
85
96
|
let projectRoot = process$1.cwd();
|
|
86
97
|
let viteServer = null;
|
|
@@ -98,7 +109,7 @@ const rozeniteClientPlugin = () => {
|
|
|
98
109
|
name,
|
|
99
110
|
label: entry.name,
|
|
100
111
|
sourceFile: path.resolve(projectRoot, entry.source),
|
|
101
|
-
htmlFile: name
|
|
112
|
+
htmlFile: `${name}.html`
|
|
102
113
|
};
|
|
103
114
|
});
|
|
104
115
|
};
|
|
@@ -129,19 +140,32 @@ const rozeniteClientPlugin = () => {
|
|
|
129
140
|
config.build.rollupOptions.input = {
|
|
130
141
|
...config.build.rollupOptions.input,
|
|
131
142
|
...Object.fromEntries(
|
|
132
|
-
panels.map((panel) => [
|
|
143
|
+
panels.map((panel) => [
|
|
144
|
+
panel.name,
|
|
145
|
+
`${DEVTOOLS_DIR}/${panel.htmlFile}`
|
|
146
|
+
])
|
|
133
147
|
)
|
|
134
148
|
};
|
|
149
|
+
config.build.rollupOptions.output = {
|
|
150
|
+
assetFileNames: `${DEVTOOLS_DIR}/assets/[name]-[hash][extname]`,
|
|
151
|
+
chunkFileNames: `${DEVTOOLS_DIR}/assets/[name]-[hash].js`,
|
|
152
|
+
entryFileNames: `${DEVTOOLS_DIR}/assets/[name]-[hash].js`,
|
|
153
|
+
...config.build.rollupOptions.output ?? {}
|
|
154
|
+
};
|
|
135
155
|
},
|
|
136
156
|
resolveId(id) {
|
|
137
|
-
const isPanel = getPanels().some(
|
|
157
|
+
const isPanel = getPanels().some(
|
|
158
|
+
(panel) => `${DEVTOOLS_DIR}/${panel.htmlFile}` === id
|
|
159
|
+
);
|
|
138
160
|
if (isPanel) {
|
|
139
161
|
return id;
|
|
140
162
|
}
|
|
141
163
|
return null;
|
|
142
164
|
},
|
|
143
165
|
load(id) {
|
|
144
|
-
const panel = getPanels().find(
|
|
166
|
+
const panel = getPanels().find(
|
|
167
|
+
(panel2) => `${DEVTOOLS_DIR}/${panel2.htmlFile}` === id
|
|
168
|
+
);
|
|
145
169
|
if (panel) {
|
|
146
170
|
return generatePanelHtmlContent(panel);
|
|
147
171
|
}
|
|
@@ -177,7 +201,7 @@ const rozeniteClientPlugin = () => {
|
|
|
177
201
|
description: packageJSON.description,
|
|
178
202
|
panels: panels.map((panel2) => ({
|
|
179
203
|
name: panel2.label,
|
|
180
|
-
source:
|
|
204
|
+
source: `/${DEVTOOLS_DIR}/` + panel2.htmlFile
|
|
181
205
|
}))
|
|
182
206
|
},
|
|
183
207
|
null,
|
|
@@ -186,7 +210,9 @@ const rozeniteClientPlugin = () => {
|
|
|
186
210
|
);
|
|
187
211
|
return;
|
|
188
212
|
}
|
|
189
|
-
const panel = panels.find(
|
|
213
|
+
const panel = panels.find(
|
|
214
|
+
(panel2) => `/${DEVTOOLS_DIR}/` + panel2.htmlFile === url
|
|
215
|
+
);
|
|
190
216
|
if (panel) {
|
|
191
217
|
const htmlContent = generatePanelHtmlContent(panel);
|
|
192
218
|
server.transformIndexHtml(req.url || "/", htmlContent).then((html) => {
|
|
@@ -225,7 +251,7 @@ const rozeniteClientPlugin = () => {
|
|
|
225
251
|
description: packageJSON.description,
|
|
226
252
|
panels: panels.map((panel) => ({
|
|
227
253
|
name: panel.label,
|
|
228
|
-
source:
|
|
254
|
+
source: `/${DEVTOOLS_DIR}/` + panel.htmlFile
|
|
229
255
|
}))
|
|
230
256
|
})
|
|
231
257
|
});
|
|
@@ -241,7 +267,7 @@ const rozeniteReactNativePlugin = () => {
|
|
|
241
267
|
config.build.rollupOptions ??= {};
|
|
242
268
|
config.build.lib = {
|
|
243
269
|
entry: path.resolve(projectRoot, "react-native.ts"),
|
|
244
|
-
fileName: (format) => `react-native.${format === "es" ? "js" : "cjs"}`
|
|
270
|
+
fileName: (format) => `react-native/index.${format === "es" ? "js" : "cjs"}`
|
|
245
271
|
};
|
|
246
272
|
config.build.rollupOptions.external = (id) => {
|
|
247
273
|
if (id.startsWith("node:")) {
|
|
@@ -254,14 +280,16 @@ const rozeniteReactNativePlugin = () => {
|
|
|
254
280
|
format: "es",
|
|
255
281
|
exports: "named",
|
|
256
282
|
interop: "auto",
|
|
257
|
-
|
|
283
|
+
entryFileNames: "react-native/index.js",
|
|
284
|
+
chunkFileNames: "react-native/chunks/[name].js",
|
|
258
285
|
...config.build.rollupOptions.output ?? {}
|
|
259
286
|
},
|
|
260
287
|
{
|
|
261
288
|
format: "cjs",
|
|
262
289
|
exports: "named",
|
|
263
290
|
interop: "auto",
|
|
264
|
-
|
|
291
|
+
entryFileNames: "react-native/index.cjs",
|
|
292
|
+
chunkFileNames: "react-native/chunks/[name].cjs",
|
|
265
293
|
...config.build.rollupOptions.output ?? {}
|
|
266
294
|
}
|
|
267
295
|
];
|
|
@@ -271,69 +299,88 @@ const rozeniteReactNativePlugin = () => {
|
|
|
271
299
|
};
|
|
272
300
|
const REQUIRE_REGEX = /require\s*\(\s*['"`]([^'"`]+)['"`]\s*\)/g;
|
|
273
301
|
const IMPORT_PREFIX = "__import_";
|
|
302
|
+
const VIRTUAL_REQUIRE_PREFIX = "\0virtual:rozenite-rn-require:";
|
|
303
|
+
const REQUIRE_WRAPPER_SUFFIX = ".require";
|
|
304
|
+
const extractModuleName = (filePath) => {
|
|
305
|
+
return path.basename(filePath).replace(/\.[^/.]+$/, "");
|
|
306
|
+
};
|
|
307
|
+
const sanitizeChunkName = (value) => {
|
|
308
|
+
return value.replace(/[^a-zA-Z0-9_-]/g, "-");
|
|
309
|
+
};
|
|
310
|
+
const findRequireStatements = (code) => {
|
|
311
|
+
const requires = /* @__PURE__ */ new Set();
|
|
312
|
+
let match;
|
|
313
|
+
REQUIRE_REGEX.lastIndex = 0;
|
|
314
|
+
while ((match = REQUIRE_REGEX.exec(code)) !== null) {
|
|
315
|
+
const moduleName = match[1];
|
|
316
|
+
if (moduleName && moduleName.trim()) {
|
|
317
|
+
requires.add(moduleName.trim());
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
return requires;
|
|
321
|
+
};
|
|
322
|
+
const transformRequireToImports = (code, moduleInfoMap) => {
|
|
323
|
+
const imports = [];
|
|
324
|
+
const importMap = /* @__PURE__ */ new Map();
|
|
325
|
+
const requires = findRequireStatements(code);
|
|
326
|
+
requires.forEach((moduleName, index) => {
|
|
327
|
+
const moduleInfo = moduleInfoMap.get(moduleName);
|
|
328
|
+
if (!moduleInfo) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
const importName = `${IMPORT_PREFIX}${index}`;
|
|
332
|
+
importMap.set(moduleName, importName);
|
|
333
|
+
imports.push(`import * as ${importName} from '${moduleInfo.virtualId}';`);
|
|
334
|
+
});
|
|
335
|
+
let transformedCode = code.replace(REQUIRE_REGEX, (match, moduleName) => {
|
|
336
|
+
const importName = importMap.get(moduleName.trim());
|
|
337
|
+
return importName || match;
|
|
338
|
+
});
|
|
339
|
+
if (imports.length > 0) {
|
|
340
|
+
transformedCode = imports.join("\n") + "\n" + transformedCode;
|
|
341
|
+
}
|
|
342
|
+
return { code: transformedCode };
|
|
343
|
+
};
|
|
344
|
+
const transformRequireToChunkReferences = (code, moduleInfoMap, getFileName) => {
|
|
345
|
+
return code.replace(REQUIRE_REGEX, (match, moduleName) => {
|
|
346
|
+
const moduleInfo = moduleInfoMap.get(moduleName.trim());
|
|
347
|
+
if (!moduleInfo) {
|
|
348
|
+
return match;
|
|
349
|
+
}
|
|
350
|
+
const outFileName = getFileName(moduleInfo.referenceId);
|
|
351
|
+
const relPath = normalizePath(
|
|
352
|
+
path.posix.relative("react-native", outFileName)
|
|
353
|
+
);
|
|
354
|
+
const requirePath = relPath.startsWith(".") ? relPath : `./${relPath}`;
|
|
355
|
+
return `require('${requirePath}')`;
|
|
356
|
+
});
|
|
357
|
+
};
|
|
274
358
|
function requirePlugin() {
|
|
275
359
|
let input = "";
|
|
276
360
|
let inputName = "";
|
|
277
361
|
let isDevMode = false;
|
|
278
|
-
const moduleToChunkMap = /* @__PURE__ */ new Map();
|
|
279
362
|
const moduleInfoMap = /* @__PURE__ */ new Map();
|
|
280
|
-
const
|
|
281
|
-
return path.basename(filePath).replace(/\.[^/.]+$/, "");
|
|
282
|
-
};
|
|
283
|
-
const getFileExtension = (format) => {
|
|
284
|
-
return format === "es" ? ".js" : ".cjs";
|
|
285
|
-
};
|
|
286
|
-
const findRequireStatements = (code) => {
|
|
287
|
-
const requires = /* @__PURE__ */ new Set();
|
|
288
|
-
let match;
|
|
289
|
-
REQUIRE_REGEX.lastIndex = 0;
|
|
290
|
-
while ((match = REQUIRE_REGEX.exec(code)) !== null) {
|
|
291
|
-
const moduleName = match[1];
|
|
292
|
-
if (moduleName && moduleName.trim()) {
|
|
293
|
-
requires.add(moduleName.trim());
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
return requires;
|
|
297
|
-
};
|
|
298
|
-
const transformRequireToImports = (code) => {
|
|
299
|
-
const imports = [];
|
|
300
|
-
const importMap = /* @__PURE__ */ new Map();
|
|
301
|
-
const requires = findRequireStatements(code);
|
|
302
|
-
requires.forEach((moduleName, index) => {
|
|
303
|
-
const importName = `${IMPORT_PREFIX}${index}`;
|
|
304
|
-
importMap.set(moduleName, importName);
|
|
305
|
-
imports.push(`import * as ${importName} from '${moduleName}';`);
|
|
306
|
-
});
|
|
307
|
-
let transformedCode = code.replace(REQUIRE_REGEX, (match, moduleName) => {
|
|
308
|
-
const importName = importMap.get(moduleName.trim());
|
|
309
|
-
return importName || match;
|
|
310
|
-
});
|
|
311
|
-
if (imports.length > 0) {
|
|
312
|
-
transformedCode = imports.join("\n") + "\n" + transformedCode;
|
|
313
|
-
}
|
|
314
|
-
return { code: transformedCode, imports, importMap };
|
|
315
|
-
};
|
|
316
|
-
const transformRequireToChunkReferences = (code, format) => {
|
|
317
|
-
return code.replace(REQUIRE_REGEX, (match, moduleName) => {
|
|
318
|
-
const chunkName = moduleToChunkMap.get(moduleName.trim());
|
|
319
|
-
if (chunkName) {
|
|
320
|
-
const extension = getFileExtension(format);
|
|
321
|
-
return `require('./${chunkName}${extension}')`;
|
|
322
|
-
}
|
|
323
|
-
return match;
|
|
324
|
-
});
|
|
325
|
-
};
|
|
363
|
+
const virtualModuleSources = /* @__PURE__ */ new Map();
|
|
326
364
|
return {
|
|
327
365
|
name: "vite-require-plugin",
|
|
328
366
|
configResolved(config) {
|
|
329
367
|
isDevMode = config.command === "serve";
|
|
330
368
|
},
|
|
369
|
+
resolveId(id) {
|
|
370
|
+
if (virtualModuleSources.has(id)) {
|
|
371
|
+
return id;
|
|
372
|
+
}
|
|
373
|
+
return null;
|
|
374
|
+
},
|
|
375
|
+
load(id) {
|
|
376
|
+
return virtualModuleSources.get(id) ?? null;
|
|
377
|
+
},
|
|
331
378
|
transform(code, id) {
|
|
332
379
|
if (!isDevMode || id !== input) {
|
|
333
380
|
return null;
|
|
334
381
|
}
|
|
335
382
|
try {
|
|
336
|
-
const result = transformRequireToImports(code);
|
|
383
|
+
const result = transformRequireToImports(code, moduleInfoMap);
|
|
337
384
|
return {
|
|
338
385
|
code: result.code,
|
|
339
386
|
map: null
|
|
@@ -352,27 +399,36 @@ function requirePlugin() {
|
|
|
352
399
|
);
|
|
353
400
|
input = options.input[0];
|
|
354
401
|
inputName = extractModuleName(input);
|
|
402
|
+
moduleInfoMap.clear();
|
|
403
|
+
virtualModuleSources.clear();
|
|
355
404
|
const code = readFileSync(input, "utf-8");
|
|
356
405
|
const requires = findRequireStatements(code);
|
|
357
406
|
for (const req of requires) {
|
|
358
407
|
try {
|
|
359
|
-
const resolved = await this.resolve(req, input);
|
|
360
|
-
if (resolved) {
|
|
361
|
-
const fileName = extractModuleName(resolved.id);
|
|
362
|
-
this.addWatchFile(resolved.id);
|
|
363
|
-
this.emitFile({
|
|
364
|
-
type: "chunk",
|
|
365
|
-
id: resolved.id,
|
|
366
|
-
fileName
|
|
367
|
-
});
|
|
368
|
-
moduleToChunkMap.set(req, fileName);
|
|
369
|
-
moduleInfoMap.set(req, {
|
|
370
|
-
fileName,
|
|
371
|
-
resolvedId: resolved.id
|
|
372
|
-
});
|
|
373
|
-
} else {
|
|
408
|
+
const resolved = await this.resolve(req, input, { skipSelf: true });
|
|
409
|
+
if (!resolved) {
|
|
374
410
|
console.warn(`Could not resolve module: ${req}`);
|
|
411
|
+
continue;
|
|
375
412
|
}
|
|
413
|
+
this.addWatchFile(resolved.id);
|
|
414
|
+
const exportName = sanitizeChunkName(
|
|
415
|
+
extractModuleName(resolved.id)
|
|
416
|
+
);
|
|
417
|
+
const wrapperName = `${exportName}${REQUIRE_WRAPPER_SUFFIX}`;
|
|
418
|
+
const virtualId = `${VIRTUAL_REQUIRE_PREFIX}${wrapperName}`;
|
|
419
|
+
virtualModuleSources.set(
|
|
420
|
+
virtualId,
|
|
421
|
+
`export * from ${JSON.stringify(req)};`
|
|
422
|
+
);
|
|
423
|
+
const referenceId = this.emitFile({
|
|
424
|
+
type: "chunk",
|
|
425
|
+
id: virtualId,
|
|
426
|
+
name: wrapperName
|
|
427
|
+
});
|
|
428
|
+
moduleInfoMap.set(req, {
|
|
429
|
+
referenceId,
|
|
430
|
+
virtualId
|
|
431
|
+
});
|
|
376
432
|
} catch (error) {
|
|
377
433
|
console.error(`Error resolving module ${req}:`, error);
|
|
378
434
|
}
|
|
@@ -382,21 +438,17 @@ function requirePlugin() {
|
|
|
382
438
|
throw error;
|
|
383
439
|
}
|
|
384
440
|
},
|
|
385
|
-
renderChunk(code, chunk
|
|
441
|
+
renderChunk(code, chunk) {
|
|
386
442
|
try {
|
|
387
|
-
const additionalChunkNames = Array.from(moduleToChunkMap.values());
|
|
388
|
-
if (additionalChunkNames.includes(chunk.fileName)) {
|
|
389
|
-
chunk.fileName = chunk.fileName + getFileExtension(options.format);
|
|
390
|
-
}
|
|
391
443
|
if (chunk.name !== inputName) {
|
|
392
444
|
return null;
|
|
393
445
|
}
|
|
394
|
-
const transformedCode = transformRequireToChunkReferences(
|
|
395
|
-
code,
|
|
396
|
-
options.format
|
|
397
|
-
);
|
|
398
446
|
return {
|
|
399
|
-
code:
|
|
447
|
+
code: transformRequireToChunkReferences(
|
|
448
|
+
code,
|
|
449
|
+
moduleInfoMap,
|
|
450
|
+
(referenceId) => normalizePath(this.getFileName(referenceId))
|
|
451
|
+
),
|
|
400
452
|
map: null
|
|
401
453
|
};
|
|
402
454
|
} catch (error) {
|
|
@@ -406,18 +458,117 @@ function requirePlugin() {
|
|
|
406
458
|
}
|
|
407
459
|
};
|
|
408
460
|
}
|
|
461
|
+
const bundleTargetDeclarations = async (projectRoot, target) => {
|
|
462
|
+
const targetRoot = path.join(projectRoot, "dist", target);
|
|
463
|
+
const entryPath = path.join(targetRoot, "index.d.ts");
|
|
464
|
+
const tempOutputPath = path.join(targetRoot, "index.public.d.ts");
|
|
465
|
+
const srcDeclarationsPath = path.join(targetRoot, "src");
|
|
466
|
+
const configObjectFullPath = path.join(projectRoot, "api-extractor.json");
|
|
467
|
+
const packageJsonFullPath = path.join(projectRoot, "package.json");
|
|
468
|
+
const tsconfigFilePath = path.join(projectRoot, "tsconfig.json");
|
|
469
|
+
const extractorConfig = ExtractorConfig.prepare({
|
|
470
|
+
configObject: {
|
|
471
|
+
projectFolder: projectRoot,
|
|
472
|
+
mainEntryPointFilePath: entryPath,
|
|
473
|
+
compiler: {
|
|
474
|
+
tsconfigFilePath,
|
|
475
|
+
overrideTsconfig: {
|
|
476
|
+
$schema: "http://json.schemastore.org/tsconfig",
|
|
477
|
+
compilerOptions: {
|
|
478
|
+
skipLibCheck: true
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
apiReport: {
|
|
483
|
+
enabled: false
|
|
484
|
+
},
|
|
485
|
+
docModel: {
|
|
486
|
+
enabled: false
|
|
487
|
+
},
|
|
488
|
+
dtsRollup: {
|
|
489
|
+
enabled: true,
|
|
490
|
+
publicTrimmedFilePath: tempOutputPath
|
|
491
|
+
},
|
|
492
|
+
tsdocMetadata: {
|
|
493
|
+
enabled: false
|
|
494
|
+
},
|
|
495
|
+
messages: {
|
|
496
|
+
compilerMessageReporting: {
|
|
497
|
+
default: {
|
|
498
|
+
logLevel: ExtractorLogLevel.None
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
extractorMessageReporting: {
|
|
502
|
+
default: {
|
|
503
|
+
logLevel: ExtractorLogLevel.None
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
configObjectFullPath,
|
|
509
|
+
packageJsonFullPath
|
|
510
|
+
});
|
|
511
|
+
const result = Extractor.invoke(extractorConfig, {
|
|
512
|
+
localBuild: true,
|
|
513
|
+
showVerboseMessages: false,
|
|
514
|
+
showDiagnostics: false
|
|
515
|
+
});
|
|
516
|
+
if (!result.succeeded) {
|
|
517
|
+
throw new Error(`Failed to bundle ${target} declaration files.`);
|
|
518
|
+
}
|
|
519
|
+
await fs$1.rm(entryPath, { force: true });
|
|
520
|
+
await fs$1.rename(tempOutputPath, entryPath);
|
|
521
|
+
await fs$1.rm(srcDeclarationsPath, { recursive: true, force: true });
|
|
522
|
+
};
|
|
409
523
|
const dtsPlugin = "default" in maybeDtsPlugin ? maybeDtsPlugin.default : maybeDtsPlugin;
|
|
524
|
+
const getDtsPlugin = (target) => {
|
|
525
|
+
const projectRoot = process.cwd();
|
|
526
|
+
const entryRoot = target === "react-native" ? "react-native.ts" : "metro.ts";
|
|
527
|
+
const distRoot = path.join(projectRoot, "dist");
|
|
528
|
+
const targetRoot = path.join(distRoot, target);
|
|
529
|
+
const publicEntryPath = path.join(projectRoot, "dist", target, "index.d.ts");
|
|
530
|
+
return dtsPlugin({
|
|
531
|
+
entryRoot,
|
|
532
|
+
include: [entryRoot, "src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts"],
|
|
533
|
+
outDir: `dist/${target}`,
|
|
534
|
+
strictOutput: false,
|
|
535
|
+
insertTypesEntry: false,
|
|
536
|
+
tsconfigPath: path.join(projectRoot, "tsconfig.json"),
|
|
537
|
+
beforeWriteFile: (filePath, content) => {
|
|
538
|
+
if (!filePath.endsWith(".d.ts")) {
|
|
539
|
+
return false;
|
|
540
|
+
}
|
|
541
|
+
if (filePath === publicEntryPath || filePath.endsWith(`/${target}.d.ts`)) {
|
|
542
|
+
return {
|
|
543
|
+
filePath: publicEntryPath,
|
|
544
|
+
content
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
const relativeToDist = path.relative(distRoot, filePath);
|
|
548
|
+
if (!relativeToDist.startsWith("src/")) {
|
|
549
|
+
return false;
|
|
550
|
+
}
|
|
551
|
+
return {
|
|
552
|
+
filePath: path.join(targetRoot, relativeToDist),
|
|
553
|
+
content
|
|
554
|
+
};
|
|
555
|
+
},
|
|
556
|
+
afterBuild: async () => {
|
|
557
|
+
await bundleTargetDeclarations(projectRoot, target);
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
};
|
|
410
561
|
const rozenitePlugin = () => {
|
|
411
562
|
const isServer = process.env.VITE_ROZENITE_TARGET === "server";
|
|
412
563
|
const isReactNative = process.env.VITE_ROZENITE_TARGET === "react-native";
|
|
413
564
|
if (isServer) {
|
|
414
|
-
return [rozeniteServerPlugin(),
|
|
565
|
+
return [rozeniteServerPlugin(), getDtsPlugin("metro")];
|
|
415
566
|
} else if (isReactNative) {
|
|
416
567
|
return [
|
|
417
568
|
react(),
|
|
418
569
|
requirePlugin(),
|
|
419
570
|
rozeniteReactNativePlugin(),
|
|
420
|
-
|
|
571
|
+
getDtsPlugin("react-native")
|
|
421
572
|
];
|
|
422
573
|
}
|
|
423
574
|
return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-native-plugin.d.ts","sourceRoot":"","sources":["../src/react-native-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAG9B,eAAO,MAAM,yBAAyB,QAAO,
|
|
1
|
+
{"version":3,"file":"react-native-plugin.d.ts","sourceRoot":"","sources":["../src/react-native-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAG9B,eAAO,MAAM,yBAAyB,QAAO,MA6C5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-plugin.d.ts","sourceRoot":"","sources":["../src/require-plugin.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"require-plugin.d.ts","sourceRoot":"","sources":["../src/require-plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,MAAM,EAAE,MAAM,MAAM,CAAC;AA8F7C,MAAM,CAAC,OAAO,UAAU,aAAa,IAAI,MAAM,CA2H9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-plugin.d.ts","sourceRoot":"","sources":["../src/server-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAInC,eAAO,MAAM,oBAAoB,QAAO,
|
|
1
|
+
{"version":3,"file":"server-plugin.d.ts","sourceRoot":"","sources":["../src/server-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAInC,eAAO,MAAM,oBAAoB,QAAO,MA+BvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/tslib/modules/index.d.ts","../../../node_modules/@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference.d.ts","../../../node_modules/@microsoft/tsdoc/lib/details/Standardization.d.ts","../../../node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.d.ts","../../../node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.d.ts","../../../node_modules/@microsoft/tsdoc/lib/parser/TSDocMessageId.d.ts","../../../node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocNode.d.ts","../../../node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.d.ts","../../../node_modules/@microsoft/tsdoc/lib/details/StandardTags.d.ts","../../../node_modules/@microsoft/tsdoc/lib/parser/TextRange.d.ts","../../../node_modules/@microsoft/tsdoc/lib/parser/Token.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocNodeContainer.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocSection.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocBlock.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocCodeSpan.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocMemberIdentifier.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocMemberSymbol.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocMemberSelector.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocMemberReference.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocDeclarationReference.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocInlineTagBase.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocInheritDocTag.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocParamBlock.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocParamCollection.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocComment.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocErrorText.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocEscapedText.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocExcerpt.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocFencedCode.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocHtmlAttribute.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocHtmlEndTag.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocHtmlStartTag.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocInlineTag.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocLinkTag.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocParagraph.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocPlainText.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocSoftBreak.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/index.d.ts","../../../node_modules/@microsoft/tsdoc/lib/parser/ParserMessage.d.ts","../../../node_modules/@microsoft/tsdoc/lib/parser/ParserMessageLog.d.ts","../../../node_modules/@microsoft/tsdoc/lib/parser/ParserContext.d.ts","../../../node_modules/@microsoft/tsdoc/lib/parser/TokenSequence.d.ts","../../../node_modules/@microsoft/tsdoc/lib/nodes/DocBlockTag.d.ts","../../../node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.d.ts","../../../node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.d.ts","../../../node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.d.ts","../../../node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.d.ts","../../../node_modules/@microsoft/tsdoc/lib/emitters/TSDocEmitter.d.ts","../../../node_modules/@microsoft/tsdoc/lib/parser/TSDocParser.d.ts","../../../node_modules/@microsoft/tsdoc/lib/transforms/DocNodeTransforms.d.ts","../../../node_modules/@microsoft/tsdoc/lib/index.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@rushstack/node-core-library/dist/node-core-library.d.ts","../../../node_modules/@microsoft/api-extractor-model/dist/rollup.d.ts","../../../node_modules/@rushstack/rig-package/dist/rig-package.d.ts","../../../node_modules/@microsoft/tsdoc-config/lib/TSDocConfigFile.d.ts","../../../node_modules/@microsoft/tsdoc-config/lib/index.d.ts","../../../node_modules/@microsoft/api-extractor/dist/rollup.d.ts","../src/bundle-dts.ts","../../../node_modules/vite/types/hmrPayload.d.ts","../../../node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts","../../../node_modules/vite/types/customEvent.d.ts","../../../node_modules/@types/estree/index.d.ts","../../../node_modules/rollup/dist/rollup.d.ts","../../../node_modules/rollup/dist/parseAst.d.ts","../../../node_modules/vite/types/hot.d.ts","../../../node_modules/vite/dist/node/module-runner.d.ts","../../../node_modules/esbuild/lib/main.d.ts","../../../node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts","../../../node_modules/@jridgewell/trace-mapping/types/types.d.mts","../../../node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts","../../../node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts","../../../node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts","../../../node_modules/@jridgewell/gen-mapping/types/types.d.mts","../../../node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts","../../../node_modules/@jridgewell/source-map/types/source-map.d.mts","../../../node_modules/terser/tools/terser.d.ts","../../../node_modules/vite/types/internal/terserOptions.d.ts","../../../node_modules/source-map-js/source-map.d.ts","../../../node_modules/postcss/lib/previous-map.d.ts","../../../node_modules/postcss/lib/input.d.ts","../../../node_modules/postcss/lib/css-syntax-error.d.ts","../../../node_modules/postcss/lib/declaration.d.ts","../../../node_modules/postcss/lib/root.d.ts","../../../node_modules/postcss/lib/warning.d.ts","../../../node_modules/postcss/lib/lazy-result.d.ts","../../../node_modules/postcss/lib/no-work-result.d.ts","../../../node_modules/postcss/lib/processor.d.ts","../../../node_modules/postcss/lib/result.d.ts","../../../node_modules/postcss/lib/document.d.ts","../../../node_modules/postcss/lib/rule.d.ts","../../../node_modules/postcss/lib/node.d.ts","../../../node_modules/postcss/lib/comment.d.ts","../../../node_modules/postcss/lib/container.d.ts","../../../node_modules/postcss/lib/at-rule.d.ts","../../../node_modules/postcss/lib/list.d.ts","../../../node_modules/postcss/lib/postcss.d.ts","../../../node_modules/postcss/lib/postcss.d.mts","../../../node_modules/vite/types/internal/cssPreprocessorOptions.d.ts","../../../node_modules/lightningcss/node/ast.d.ts","../../../node_modules/lightningcss/node/targets.d.ts","../../../node_modules/lightningcss/node/index.d.ts","../../../node_modules/vite/types/internal/lightningcssOptions.d.ts","../../../node_modules/vite/types/importGlob.d.ts","../../../node_modules/vite/types/metadata.d.ts","../../../node_modules/vite/dist/node/index.d.ts","../../../node_modules/@types/ejs/index.d.ts","../src/load-config.ts","../src/package-json.ts","../src/client-plugin.ts","../../../node_modules/@babel/types/lib/index.d.ts","../../../node_modules/@types/babel__generator/index.d.ts","../../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../../node_modules/@types/babel__template/index.d.ts","../../../node_modules/@types/babel__traverse/index.d.ts","../../../node_modules/@types/babel__core/index.d.ts","../../../node_modules/@vitejs/plugin-react/dist/index.d.mts","../../../node_modules/vite-plugin-react-native-web/types/index.d.ts","../src/server-plugin.ts","../src/react-native-plugin.ts","../../../node_modules/typescript/lib/typescript.d.ts","../../../node_modules/vite-plugin-dts/dist/index.d.ts","../src/require-plugin.ts","../src/index.ts","../src/utils.ts","../../../node_modules/vite/types/importMeta.d.ts","../../../node_modules/vite/client.d.ts"],"fileIdsList":[[158,224],[158],[158,185,187],[158,186],[158,185,188],[158,183,185],[158,182,183,184],[158,182,185],[61,111,158,166],[111,158,166,167,168,170],[111,158],[158,169],[67,158],[63,64,65,68,158],[62,158],[63,103,158],[104,158],[63,158],[98,158],[98,107,158],[62,63,64,65,66,68,69,70,71,98,99,100,101,102,104,105,106,107,108,109,110,158],[67,73,103,158],[67,102,158],[67,73,74,82,84,105,158],[67,79,102,158],[65,67,102,158],[67,90,102,158],[67,80,81,158],[67,81,102,158],[67,80,81,102,158],[67,76,77,78,102,158],[67,80,102,158],[66,158],[67,72,158],[67,74,102,158],[67,83,158],[67,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,103,158],[66,70,71,98,100,158],[65,67,70,102,158],[65,67,70,86,99,102,158],[66,70,101,158],[70,158],[70,71,101,158],[117,129,138,158,165],[158,224,225,226,227,228],[158,224,226],[112,158],[115,158],[116,121,149,158],[117,128,129,136,146,157,158],[117,118,128,136,158],[119,158],[120,121,129,137,158],[121,146,154,158],[122,124,128,136,158],[123,158],[124,125,158],[128,158],[126,128,158],[128,129,130,146,157,158],[128,129,130,143,146,149,158],[158,162],[124,128,131,136,146,157,158],[128,129,131,132,136,146,154,157,158],[131,133,146,154,157,158],[112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164],[128,134,158],[135,157,158],[124,128,136,146,158],[137,158],[138,158],[115,139,158],[140,156,158,162],[141,158],[142,158],[128,143,144,158],[143,145,158,160],[116,128,146,147,148,149,158],[116,146,148,158],[146,147,158],[149,158],[150,158],[128,152,153,158],[152,153,158],[121,136,146,154,158],[155,158],[136,156,158],[116,131,142,157,158],[121,158],[146,158,159],[158,160],[158,161],[116,121,128,130,139,146,157,158,160,162],[146,158,163],[158,219,229],[158,213,214],[158,207],[158,205,207],[158,196,204,205,206,208,210],[158,194],[158,197,202,207,210],[158,193,210],[158,197,198,201,202,203,210],[158,197,198,199,201,202,210],[158,194,195,196,197,198,202,203,204,206,207,208,210],[158,210],[158,192,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209],[158,192,210],[158,197,199,200,202,203,210],[158,201,210],[158,202,203,207,210],[158,195,205],[158,177,218,219],[158,176,177],[158,189],[59,158],[158,171,219,234],[158,219],[158,239],[158,173],[128,129,131,132,133,136,146,154,157,158,163,165,173,174,175,177,178,180,181,191,211,212,216,217,218,219],[158,173,174,175,179],[158,175],[158,179,217],[158,215],[158,190],[158,177,219],[60,130,138,158,171],[60,129,138,140,157,158,219,220,221,222],[60,138,158,172,219,223,230,231,232,233,235,236],[60,129,138,158,219],[60,130,138,158],[60,138,158,219],[60,112,129,138,158,219],[60,138,140,158,219],[60,129,138,158]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"b8f34dd1757f68e03262b1ca3ddfa668a855b872f8bdd5224d6f993a7b37dc2c","impliedFormat":99},{"version":"c76ef0e395f9a0f897b8911be953ca3099c59a1e7fd4cdd727389c83de55a99b","impliedFormat":1},{"version":"9f706fec5e44b5498bd6498c920137abacf6bb59442510e2f36135194adbda50","impliedFormat":1},{"version":"fc953ba36f518eb973156ae6b6ccc0f9172e6f69c2e24299b2cf4ba184b2f3cd","impliedFormat":1},{"version":"5bb43fb4160f799f08d8a169a6b74ba04cbdab6dbc9d5889b11df0fd0a1cc37d","impliedFormat":1},{"version":"0a9b34d41f06ca0707200e74ab563190a0f3bcf57e250b63fd0bd12b035bc68e","impliedFormat":1},{"version":"5dd4f3e00d2a857f622c4dcbbc2f34e8059db05b58e06e330ff8e4849248d588","impliedFormat":1},{"version":"842c861cf4ac6c43ad74fb0af9838c14f43f7689cecda454e0a549177e5e6591","impliedFormat":1},{"version":"110829306422e9ca3c6c28f4778004578afa43f2ec48fd477f4937f77d00ed89","impliedFormat":1},{"version":"06401c590494ee3b3a52ee3a31d8f63a997a1df9eeb70ac9cdce58b0a166959b","impliedFormat":1},{"version":"f409abec25c2a03294cf9cd419e73ff67ce0d6706a77a55cf31d0c6aef4b7814","impliedFormat":1},{"version":"9a2e43326d127b17b8482d7d1aa59500b3121fc063be8c7cceea3d38f7f95494","impliedFormat":1},{"version":"dcd8f22e8a7c886cc9a0575f70ac9547c9237bb0bb02597b133d5f1342cbdbfd","impliedFormat":1},{"version":"580697182dd67fd7256586b0cf778d0fdc06bb1868205c4abb04f41f8c2ba826","impliedFormat":1},{"version":"a54e53e093b66edbfbe7c18d8bab0ae803c7132fe7e5281ea53ef82d84fa7cb5","impliedFormat":1},{"version":"e1226f2768e23f7b4b004a9a570fac69645176ef958e70f6c7ca912ea5388ce4","impliedFormat":1},{"version":"18fa43fd42a49f6264f0c2fe2d8dfd067189278b75ae50bf46835fb302b5421d","impliedFormat":1},{"version":"318513fa5fe8fa2ce59649b71a6755e4fad8e7c9dd0c151677104889c11caeb0","impliedFormat":1},{"version":"9887acedcc0fe1b908e350d12a9f1248cfb681d00600e0973fbe86590f43adc3","impliedFormat":1},{"version":"222b2aafb53cff2b60ace67699a9b7925e8af39c9206754ad321fbb640f84dcd","impliedFormat":1},{"version":"7ade76fbfa63bdcba743911105675db6496a683da0392319881090218ba9c66c","impliedFormat":1},{"version":"ad34467a3394ad11e126bd6508e6aea62fd7d43162a15fb88c903354b2793814","impliedFormat":1},{"version":"90fcb227d9a563e31c4b51a2146e127d84142ba62ec211c2fe03c2edfdae23ca","impliedFormat":1},{"version":"323b8d37f8b0b95685d9147886b2b67e2cbfd792eee0e1ec3ef763050e83f94d","impliedFormat":1},{"version":"3e196dd2f6b6d6de5a09f1217d036aacbd542962931d8b63fa2251f2f57e07da","impliedFormat":1},{"version":"04947f9532e77b7feb4280a5668d8c6a0a6b39fb1306f6dd2d9d0ec711788ad8","impliedFormat":1},{"version":"9288bdd8a4857f2213c0340151fa494ce1cccfa3fcd2ee15c9ba1b2d8ba94c41","impliedFormat":1},{"version":"117e439217f2fe545e1d5e45e50d3dd8e3bc8d0c22b66b954367200116810a38","impliedFormat":1},{"version":"7eae7082d7f9b1babe914581101cf827e29449eca5efe7bb2dc5c1e65a49e888","impliedFormat":1},{"version":"28ea8cb7086d9f8d611610ce8739a00ed0c71842f9df07fd2a3543609cc096a2","impliedFormat":1},{"version":"ed877333f021c55e04506a25b634dfaf776910553093cb78da757646a0232e60","impliedFormat":1},{"version":"b4839d071e6f375483aaf83c7885c9981d56c63e755c64444b5bd57837175f3d","impliedFormat":1},{"version":"8a86d5146216012d0f4f4d670735ecb91c75df7355eb2abf3ed23a95fe167ab0","impliedFormat":1},{"version":"3fc4d13e9aee784d19ec1a33e45a715b9ac9e83ce84f2cc99f20e2d0f2e88e3d","impliedFormat":1},{"version":"75b1ae7914a222cea5718541e1b52c6ec711a001e65c37b3299bb8780d9db90e","impliedFormat":1},{"version":"b537413f0e0d27177b048715ab4b61cd94c693e6a42d50c3bbf27204eb584f0e","impliedFormat":1},{"version":"8c58ec367a2e04bb34556f2f9bb1578a61123cb9c56c0974a621838eba18d016","impliedFormat":1},{"version":"0e2bc4a7a02e4cab625e1d091730af1bca8b45049694c73216a53151567f48d6","impliedFormat":1},{"version":"291cc4d81c80a5800fced2528f2354eb5e2d1696a55f4dbf753b82a816460ce5","impliedFormat":1},{"version":"fc7b920a12e6b73aab195e9330326c36ba899c526a255288a01da7407f894b83","impliedFormat":1},{"version":"4cce4fb5a0277cbe619ad168d0d0b21f127cb651cc3b739963944b6df826e115","impliedFormat":1},{"version":"8773bd46b5246a299d8818f9f2fee7bc5e2146c4042641dba58068f892ce718b","impliedFormat":1},{"version":"fdd88878ba4444464d262c37e76b3f5d9944fa8ea85614e735400638d90c89b7","impliedFormat":1},{"version":"7670ad9df2f210379c9949ec17a4320ddc6916e7ade85c5d01d27ad5c2b9ace6","impliedFormat":1},{"version":"8798d848d9133799f986d8774b69eb8ea95a92f1182fea95adb5b940f355a3a8","impliedFormat":1},{"version":"0875eaa2a1908045c6d6f44b5d77a4ba9ac7b4a0edf49b8f7dea65149c89e0ce","impliedFormat":1},{"version":"7fa2766758660a92585c52d84bbe62ecebb8ac431abfbcf4e928634e74bd30be","impliedFormat":1},{"version":"87ee8911c717a13a0a72d6ff64f100c7b7f11625be74f61ee6b0bf3b52a7d7f2","impliedFormat":1},{"version":"502cf312135b5cd7b2fa68b024824f2ffd73874f007561d691d5e2f506f5d0a6","impliedFormat":1},{"version":"eac40c9899be21194a9aa098ccddaa38ae017dd16f5fa0d4e7bb44a5ac66a485","impliedFormat":1},{"version":"61dc9ce1bfa63d427998bf13d3021e37134d6c4223225ea374e24a756f78cea5","impliedFormat":1},{"version":"bfc87d0941960e11096998ce31922b3e176b21d2d8466a3118ef85225fc7f847","impliedFormat":1},{"version":"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","impliedFormat":1},{"version":"a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a","impliedFormat":1},{"version":"f749812878fecfa53cfc13b36e5d35086fb6377983a9df44175da83ccc23af1f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7d2e3fea24c712c99c03ad8f556abedbfe105f87f1be10b95dbd409d24bc05a3","impliedFormat":1},{"version":"211e3f15fbced4ab4be19f49ffa990b9ff20d749d33b65ff753be691e7616239","affectsGlobalScope":true,"impliedFormat":1},{"version":"3719525a8f6ab731e3dfd585d9f87df55ec7d50d461df84f74eb4d68bb165244","impliedFormat":1},{"version":"5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713","impliedFormat":1},{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true,"impliedFormat":1},{"version":"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","impliedFormat":1},{"version":"e596c9bb2f29a2699fdd4ae89139612652245192f67f45617c5a4b20832aaae9","impliedFormat":1},{"version":"bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","impliedFormat":1},{"version":"1cdcfc1f624d6c08aa12c73935f6e13f095919cd99edf95752951796eb225729","impliedFormat":1},{"version":"4eaff3d8e10676fd7913d8c108890e71c688e1e7d52f6d1d55c39514f493dc47","impliedFormat":1},{"version":"14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","impliedFormat":1},{"version":"5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea","impliedFormat":1},{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true,"impliedFormat":1},{"version":"00dee7cdca8b8420c47ea4a31a34b8e8294013ebc4f463fd941e867e7bf05029","affectsGlobalScope":true,"impliedFormat":1},{"version":"3256f3cccd578f9e7fe3a28096c505634bebcee8afb738ffa99368e536ca3a0b","impliedFormat":1},{"version":"1c84b46267610a34028edfd0d035509341751262bac1062857f3c8df7aff7153","impliedFormat":1},{"version":"7f138842074d0a40681775af008c8452093b68c383c94de31759e853c6d06b5c","impliedFormat":1},{"version":"a3d541d303ee505053f5dcbf9fafb65cac3d5631037501cd616195863a6c5740","impliedFormat":1},{"version":"8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","impliedFormat":1},{"version":"2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58","impliedFormat":1},{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true,"impliedFormat":1},{"version":"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","impliedFormat":1},{"version":"7ee6ed878c4528215c82b664fe0cfe80e8b4da6c0d4cc80869367868774db8b1","impliedFormat":1},{"version":"b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30","impliedFormat":1},{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true,"impliedFormat":1},{"version":"0715e4cd28ad471b2a93f3e552ff51a3ae423417a01a10aa1d3bc7c6b95059d6","affectsGlobalScope":true,"impliedFormat":1},{"version":"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","impliedFormat":1},{"version":"210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","impliedFormat":1},{"version":"36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","impliedFormat":1},{"version":"0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","impliedFormat":1},{"version":"25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","impliedFormat":1},{"version":"4f3fdeba4e28e21aa719c081b8dc8f91d47e12e773389b9d35679c08151c9d37","impliedFormat":1},{"version":"1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","impliedFormat":1},{"version":"69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","impliedFormat":1},{"version":"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","impliedFormat":1},{"version":"23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","impliedFormat":1},{"version":"f69ff39996a61a0dd10f4bce73272b52e8024a4d58b13ab32bf4712909d0a2b7","impliedFormat":1},{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","impliedFormat":1},{"version":"1422cd9e705adcc09088fda85a900c2b70e3ad36ea85846f68bd1a884cdf4e2b","impliedFormat":1},{"version":"3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","impliedFormat":1},{"version":"5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2","impliedFormat":1},{"version":"a73ae8c0e62103bb9e21bb6538700881bf135b9a8b125b857ec68edfa0da4ed3","affectsGlobalScope":true,"impliedFormat":1},{"version":"e1c1b2fbe236bf7ee3e342eeae7e20efb8988a0ac7da1cbbfa2c1f66b76c3423","affectsGlobalScope":true,"impliedFormat":1},{"version":"868831cab82b65dfe1d68180e898af1f2101e89ba9b754d1db6fb8cc2fac1921","impliedFormat":1},{"version":"0fe8985a28f82c450a04a6edf1279d7181c0893f37da7d2a27f8efd4fd5edb03","impliedFormat":1},{"version":"e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","impliedFormat":1},{"version":"52120bb7e4583612225bdf08e7c12559548170f11e660d33a33623bae9bbdbba","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6dd3dba8e665ac43d279e0fdf5219edda0eed69b5e9a5061f46cd6a65c4f7a1","impliedFormat":1},{"version":"06f1428fa901d2f677e9ae13ee69af62c239f6c118fa4525c45926a52e9170a0","impliedFormat":1},{"version":"a1935ab9d13167b4707c1250cefcfc6f23a40790312b13fb15bd0af3635119fa","impliedFormat":1},{"version":"56da97aa09737418e2bf14e49b94b54f1f8853fe6edb7a287fcd5830ac99959d","impliedFormat":1},{"version":"7399fe5c359c5ea0d444c81fa50e7d5f81e223e0502d15a080987fbfdd4b6031","impliedFormat":1},{"version":"7d8b1339d4b274024d7f77bc7ca26a713726849565d9fc9a52dab7c45f64a5f8","impliedFormat":1},{"version":"8266d477f33cad7b40868e7025aa79cac270bb043f14522bea3dcf122989fb4a","impliedFormat":1},{"version":"1bb0eeb98000be67a5176d68b5203fea2c772c399cf879342cc63e64458bd0d5","impliedFormat":99},{"version":"a7ca8df4f2931bef2aa4118078584d84a0b16539598eaadf7dce9104dfaa381c","impliedFormat":1},{"version":"10073cdcf56982064c5337787cc59b79586131e1b28c106ede5bff362f912b70","impliedFormat":99},{"version":"72950913f4900b680f44d8cab6dd1ea0311698fc1eefb014eb9cdfc37ac4a734","impliedFormat":1},{"version":"151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","impliedFormat":1},{"version":"ffb518fc55181aefd066c690dbc0f8fa6a1533c8ddac595469c8c5f7fda2d756","affectsGlobalScope":true,"impliedFormat":1},{"version":"a660aa95476042d3fdcc1343cf6bb8fdf24772d31712b1db321c5a4dcc325434","impliedFormat":1},{"version":"36977c14a7f7bfc8c0426ae4343875689949fb699f3f84ecbe5b300ebf9a2c55","impliedFormat":1},{"version":"ff0a83c9a0489a627e264ffcb63f2264b935b20a502afa3a018848139e3d8575","impliedFormat":99},{"version":"161c8e0690c46021506e32fda85956d785b70f309ae97011fd27374c065cac9b","affectsGlobalScope":true,"impliedFormat":1},{"version":"971f12a5fc236419ced0b7b9f23a53c1758233713f565635bbf4b85e2b23f55a","impliedFormat":99},{"version":"76de3321ce519928f1ff7d7a30391c0dc7374af20f81d9167919f038895b5cb0","impliedFormat":99},{"version":"094b9210da23b8711709b0535c59841186267bf6b83c1609aa9b515f830ab274","impliedFormat":99},{"version":"fbfbb4e99c6259ff5ccc4a5a62b3b63c0c8cae6e84737786c4a4c761c9a9de91","impliedFormat":99},{"version":"604887bbd5b0a93234ce882543a465f008636185c52e0f0353330e2bc38b03b6","impliedFormat":99},{"version":"32bf912173e8a9533631f9e9d8dc90a2ac7b52c2355611ddd886beab24dfd182","impliedFormat":99},{"version":"82695324abf7f3278b6d9f0582f4a544e8f7055c8cbe1065ab5cbacde1719c4c","impliedFormat":99},{"version":"43bba542e50e19241ec64bc13cfc0d9273e6198f36563cecad1f4e4b78ad47f3","impliedFormat":99},{"version":"b8cb3b69c0e8114f758bb8ef8efeef1cc80f8911bfd21126def73d2174ce479e","impliedFormat":99},{"version":"f582b0fcbf1eea9b318ab92fb89ea9ab2ebb84f9b60af89328a91155e1afce72","impliedFormat":1},{"version":"402e5c534fb2b85fa771170595db3ac0dd532112c8fa44fc23f233bc6967488b","impliedFormat":1},{"version":"8885cf05f3e2abf117590bbb951dcf6359e3e5ac462af1c901cfd24c6a6472e2","impliedFormat":1},{"version":"333caa2bfff7f06017f114de738050dd99a765c7eb16571c6d25a38c0d5365dc","impliedFormat":1},{"version":"e61df3640a38d535fd4bc9f4a53aef17c296b58dc4b6394fd576b808dd2fe5e6","impliedFormat":1},{"version":"459920181700cec8cbdf2a5faca127f3f17fd8dd9d9e577ed3f5f3af5d12a2e4","impliedFormat":1},{"version":"4719c209b9c00b579553859407a7e5dcfaa1c472994bd62aa5dd3cc0757eb077","impliedFormat":1},{"version":"7ec359bbc29b69d4063fe7dad0baaf35f1856f914db16b3f4f6e3e1bca4099fa","impliedFormat":1},{"version":"70790a7f0040993ca66ab8a07a059a0f8256e7bb57d968ae945f696cbff4ac7a","impliedFormat":1},{"version":"d1b9a81e99a0050ca7f2d98d7eedc6cda768f0eb9fa90b602e7107433e64c04c","impliedFormat":1},{"version":"a022503e75d6953d0e82c2c564508a5c7f8556fad5d7f971372d2d40479e4034","impliedFormat":1},{"version":"b215c4f0096f108020f666ffcc1f072c81e9f2f95464e894a5d5f34c5ea2a8b1","impliedFormat":1},{"version":"644491cde678bd462bb922c1d0cfab8f17d626b195ccb7f008612dc31f445d2d","impliedFormat":1},{"version":"dfe54dab1fa4961a6bcfba68c4ca955f8b5bbeb5f2ab3c915aa7adaa2eabc03a","impliedFormat":1},{"version":"1251d53755b03cde02466064260bb88fd83c30006a46395b7d9167340bc59b73","impliedFormat":1},{"version":"47865c5e695a382a916b1eedda1b6523145426e48a2eae4647e96b3b5e52024f","impliedFormat":1},{"version":"4cdf27e29feae6c7826cdd5c91751cc35559125e8304f9e7aed8faef97dcf572","impliedFormat":1},{"version":"331b8f71bfae1df25d564f5ea9ee65a0d847c4a94baa45925b6f38c55c7039bf","impliedFormat":1},{"version":"2a771d907aebf9391ac1f50e4ad37952943515eeea0dcc7e78aa08f508294668","impliedFormat":1},{"version":"0146fd6262c3fd3da51cb0254bb6b9a4e42931eb2f56329edd4c199cb9aaf804","impliedFormat":1},{"version":"183f480885db5caa5a8acb833c2be04f98056bdcc5fb29e969ff86e07efe57ab","impliedFormat":99},{"version":"960bd764c62ac43edc24eaa2af958a4b4f1fa5d27df5237e176d0143b36a39c6","affectsGlobalScope":true,"impliedFormat":1},{"version":"3fd8a5aefd8c3feb3936ca66f5aa89dff7bf6e6537b4158dbd0f6e0d65ed3b9e","impliedFormat":1},{"version":"a18642ddf216f162052a16cba0944892c4c4c977d3306a87cb673d46abbb0cbf","impliedFormat":1},{"version":"41c41c6e90133bb2a14f7561f29944771886e5535945b2b372e2f6ed6987746e","impliedFormat":1},{"version":"4ec16d7a4e366c06a4573d299e15fe6207fc080f41beac5da06f4af33ea9761e","impliedFormat":1},{"version":"59f8dc89b9e724a6a667f52cdf4b90b6816ae6c9842ce176d38fcc973669009e","affectsGlobalScope":true,"impliedFormat":1},{"version":"e4af494f7a14b226bbe732e9c130d8811f8c7025911d7c58dd97121a85519715","impliedFormat":1},{"version":"47416e41b1af81e53e8c3cc5bf909d47ff632a7b6eddfe7ff43d187b4dcca047","impliedFormat":99},{"version":"f2a60d253f7206372203b736144906bf135762100a2b3d1b415776ebf6575d07","impliedFormat":1},{"version":"cca15cbbb8eed0e6ba786f9d9223183936c4dd2a97af20e5c56d2fe2bbc4f655","impliedFormat":99},{"version":"0f2de976baebaa431d0f4537131ccc773c28b3592c8dfe261e22c73baf7ab001","impliedFormat":99},{"version":"cebd148c9d312f1b8f9276aeac2c8628517aaaeaa9b9a4bead66ae9459632ecb","impliedFormat":99},{"version":"a28ac3e717907284b3910b8e9b3f9844a4e0b0a861bea7b923e5adf90f620330","impliedFormat":1},{"version":"b6d03c9cfe2cf0ba4c673c209fcd7c46c815b2619fd2aad59fc4229aaef2ed43","impliedFormat":1},{"version":"82e5a50e17833a10eb091923b7e429dc846d42f1c6161eb6beeb964288d98a15","impliedFormat":1},{"version":"670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","impliedFormat":1},{"version":"81df92841a7a12d551fcbc7e4e83dbb7d54e0c73f33a82162d13e9ae89700079","impliedFormat":1},{"version":"069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","impliedFormat":1},{"version":"80823da0710fe17a8661d7f77123e8edcee5d92d331927880af77315d1abc56a","impliedFormat":99},{"version":"505f3b1d9f1d149e1baecdbdd73f6efb54f776b64c45763c8aaa7e23a37bcbd8","impliedFormat":1},{"version":"4c77ae51284816f23150f409620df5f93f4e3ebbd7e7d2c3b4834b71f7e1384f","impliedFormat":99},{"version":"8770f14fea8fc10f4afa66c6a9477ae022484e1caebf456c905cfb65ffbcc517","impliedFormat":99},{"version":"c302df1d6f371c6064cb5f4d0b41165425b682b287a3b8625527b2752eb433ee","impliedFormat":1},{"version":"ce1b679efa5008211a3a02e37b8e822523f1eed063aec7a69c300eb391a33583","impliedFormat":99},{"version":"d0a3cc28fd28d6c6d1de54555cc6641dd9d09214a3f6abf1f4f0d1decb78a967","impliedFormat":99},{"version":"5cf6c963910ab3e503ee324871022ee5fca07f9d9cbf5bce11c04d0ebae96e35","impliedFormat":99},{"version":"a4806040c4f678b6b4610a5dc8623c502567c3fbaa7c175b46eddd704e93cd5f","impliedFormat":99},{"version":"474eba6689e97bf58edd28c90524e70f4fb11820df66752182a1ad1ff9970bb2","affectsGlobalScope":true,"impliedFormat":1},{"version":"1eef826bc4a19de22155487984e345a34c9cd511dd1170edc7a447cb8231dd4a","affectsGlobalScope":true,"impliedFormat":99}],"root":[172,[221,223],232,233,[236,238]],"options":{"composite":true,"declarationMap":true,"emitDeclarationOnly":true,"importHelpers":true,"module":199,"noEmitOnError":true,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noImplicitReturns":true,"noUnusedLocals":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":true,"target":9,"tsBuildInfoFile":"./tsconfig.lib.tsbuildinfo"},"referencedMap":[[226,1],[224,2],[188,3],[186,2],[187,4],[189,5],[184,6],[182,2],[185,7],[183,8],[167,9],[171,10],[169,11],[170,12],[61,2],[68,13],[66,14],[63,15],[64,2],[104,16],[105,17],[69,18],[62,2],[106,19],[107,2],[108,20],[111,21],[74,22],[103,23],[75,23],[85,24],[80,25],[86,26],[87,23],[88,23],[89,23],[90,23],[91,23],[92,27],[82,28],[93,29],[81,23],[94,30],[76,23],[79,31],[78,23],[77,32],[67,33],[72,13],[95,34],[83,35],[84,36],[96,23],[73,34],[97,23],[98,37],[101,38],[99,39],[100,40],[65,2],[109,41],[70,2],[71,42],[102,43],[110,19],[166,44],[168,2],[229,45],[225,1],[227,46],[228,1],[220,2],[176,2],[112,47],[113,47],[115,48],[116,49],[117,50],[118,51],[119,52],[120,53],[121,54],[122,55],[123,56],[124,57],[125,57],[127,58],[126,59],[128,58],[129,60],[130,61],[114,62],[164,2],[131,63],[132,64],[133,65],[165,66],[134,67],[135,68],[136,69],[137,70],[138,71],[139,72],[140,73],[141,74],[142,75],[143,76],[144,76],[145,77],[146,78],[148,79],[147,80],[149,81],[150,82],[151,2],[152,83],[153,84],[154,85],[155,86],[156,87],[157,88],[158,89],[159,90],[160,91],[161,92],[162,93],[163,94],[230,95],[181,2],[213,2],[215,96],[214,2],[208,97],[206,98],[207,99],[195,100],[196,98],[203,101],[194,102],[199,103],[209,2],[200,104],[205,105],[211,106],[210,107],[193,108],[201,109],[202,110],[197,111],[204,97],[198,112],[178,113],[177,114],[192,2],[190,115],[60,116],[59,2],[57,2],[58,2],[11,2],[10,2],[2,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[3,2],[20,2],[21,2],[4,2],[22,2],[26,2],[23,2],[24,2],[25,2],[27,2],[28,2],[29,2],[5,2],[30,2],[31,2],[32,2],[33,2],[6,2],[37,2],[34,2],[35,2],[36,2],[38,2],[7,2],[39,2],[44,2],[45,2],[40,2],[41,2],[42,2],[43,2],[8,2],[49,2],[46,2],[47,2],[48,2],[50,2],[9,2],[51,2],[52,2],[53,2],[55,2],[54,2],[1,2],[56,2],[234,2],[235,117],[231,118],[240,119],[174,120],[219,121],[180,122],[175,120],[173,2],[179,123],[217,2],[239,124],[212,2],[216,125],[191,126],[218,127],[172,128],[223,129],[237,130],[221,131],[222,132],[233,133],[236,134],[232,135],[238,136]],"affectedFilesPendingEmit":[[172,48],[223,48],[237,48],[221,48],[222,48],[233,48],[236,48],[232,48],[238,48]],"emitSignatures":[172,221,222,223,232,233,236,237,238],"version":"5.8.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rozenite/vite-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-rc.0",
|
|
4
4
|
"description": "Vite plugin for developing React Native DevTools plugins with hot reload and development tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -26,6 +26,9 @@
|
|
|
26
26
|
},
|
|
27
27
|
"author": "Szymon Chmal <szymon.chmal@callstack.com>",
|
|
28
28
|
"license": "MIT",
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
29
32
|
"exports": {
|
|
30
33
|
"./package.json": "./package.json",
|
|
31
34
|
".": {
|
|
@@ -36,6 +39,7 @@
|
|
|
36
39
|
}
|
|
37
40
|
},
|
|
38
41
|
"dependencies": {
|
|
42
|
+
"@microsoft/api-extractor": "^7.50.1",
|
|
39
43
|
"@vitejs/plugin-react": "^4.3.4",
|
|
40
44
|
"ejs": "^3.1.9",
|
|
41
45
|
"vite-plugin-dts": "~4.5.0",
|