@danielx/civet 0.6.80 → 0.6.82
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/browser.js +550 -480
- package/dist/esbuild.js +19 -17
- package/dist/main.js +550 -480
- package/dist/main.mjs +550 -480
- package/dist/rollup.js +19 -17
- package/dist/unplugin-shared.mjs +19 -17
- package/dist/unplugin.js +19 -17
- package/dist/vite.js +19 -17
- package/dist/webpack.js +19 -17
- package/package.json +1 -1
package/dist/rollup.js
CHANGED
|
@@ -247,6 +247,14 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
247
247
|
compilerOptions.outDir ?? process.cwd(),
|
|
248
248
|
filePath
|
|
249
249
|
);
|
|
250
|
+
if (meta.framework === "esbuild") {
|
|
251
|
+
fs.mkdirSync(
|
|
252
|
+
import_path.default.dirname(
|
|
253
|
+
import_path.default.resolve(esbuildOptions.outdir, pathFromDistDir)
|
|
254
|
+
),
|
|
255
|
+
{ recursive: true }
|
|
256
|
+
);
|
|
257
|
+
}
|
|
250
258
|
this.emitFile({
|
|
251
259
|
source: content,
|
|
252
260
|
fileName: pathFromDistDir,
|
|
@@ -254,13 +262,18 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
254
262
|
});
|
|
255
263
|
},
|
|
256
264
|
void 0,
|
|
265
|
+
true,
|
|
266
|
+
// emitDtsOnly
|
|
267
|
+
void 0,
|
|
268
|
+
// @ts-ignore @internal interface
|
|
257
269
|
true
|
|
270
|
+
// forceDtsEmit
|
|
258
271
|
);
|
|
259
272
|
}
|
|
260
273
|
}
|
|
261
274
|
}
|
|
262
275
|
},
|
|
263
|
-
resolveId(id, importer) {
|
|
276
|
+
resolveId(id, importer, options2) {
|
|
264
277
|
if (/\0/.test(id))
|
|
265
278
|
return null;
|
|
266
279
|
id = cleanCivetId(id);
|
|
@@ -275,6 +288,9 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
275
288
|
return null;
|
|
276
289
|
resolvedId = implicitId;
|
|
277
290
|
}
|
|
291
|
+
if (options2.scan && meta.framework === "vite") {
|
|
292
|
+
resolvedId = `\0${resolvedId}`;
|
|
293
|
+
}
|
|
278
294
|
return resolvedId + outExt;
|
|
279
295
|
},
|
|
280
296
|
loadInclude(id) {
|
|
@@ -376,25 +392,11 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
376
392
|
},
|
|
377
393
|
vite: {
|
|
378
394
|
config(config) {
|
|
379
|
-
var _a
|
|
395
|
+
var _a;
|
|
380
396
|
rootDir = import_path.default.resolve(process.cwd(), config.root ?? "");
|
|
381
|
-
config.optimizeDeps ?? (config.optimizeDeps = {});
|
|
382
|
-
(_a = config.optimizeDeps).esbuildOptions ?? (_a.esbuildOptions = {});
|
|
383
|
-
(_b = config.optimizeDeps.esbuildOptions).plugins ?? (_b.plugins = []);
|
|
384
|
-
config.optimizeDeps.esbuildOptions.plugins.push(
|
|
385
|
-
// @ts-ignore esbuild types from Vite might not match our esbuild
|
|
386
|
-
unplugin.esbuild({
|
|
387
|
-
...options,
|
|
388
|
-
js: void 0,
|
|
389
|
-
ts: "preserve",
|
|
390
|
-
dts: void 0,
|
|
391
|
-
emitDeclaration: false,
|
|
392
|
-
typecheck: false
|
|
393
|
-
})
|
|
394
|
-
);
|
|
395
397
|
if (implicitExtension) {
|
|
396
398
|
config.resolve ?? (config.resolve = {});
|
|
397
|
-
(
|
|
399
|
+
(_a = config.resolve).extensions ?? (_a.extensions = []);
|
|
398
400
|
config.resolve.extensions.push(".civet");
|
|
399
401
|
}
|
|
400
402
|
},
|
package/dist/unplugin-shared.mjs
CHANGED
|
@@ -214,6 +214,14 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
214
214
|
compilerOptions.outDir ?? process.cwd(),
|
|
215
215
|
filePath
|
|
216
216
|
);
|
|
217
|
+
if (meta.framework === "esbuild") {
|
|
218
|
+
fs.mkdirSync(
|
|
219
|
+
path.dirname(
|
|
220
|
+
path.resolve(esbuildOptions.outdir, pathFromDistDir)
|
|
221
|
+
),
|
|
222
|
+
{ recursive: true }
|
|
223
|
+
);
|
|
224
|
+
}
|
|
217
225
|
this.emitFile({
|
|
218
226
|
source: content,
|
|
219
227
|
fileName: pathFromDistDir,
|
|
@@ -221,13 +229,18 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
221
229
|
});
|
|
222
230
|
},
|
|
223
231
|
void 0,
|
|
232
|
+
true,
|
|
233
|
+
// emitDtsOnly
|
|
234
|
+
void 0,
|
|
235
|
+
// @ts-ignore @internal interface
|
|
224
236
|
true
|
|
237
|
+
// forceDtsEmit
|
|
225
238
|
);
|
|
226
239
|
}
|
|
227
240
|
}
|
|
228
241
|
}
|
|
229
242
|
},
|
|
230
|
-
resolveId(id, importer) {
|
|
243
|
+
resolveId(id, importer, options2) {
|
|
231
244
|
if (/\0/.test(id))
|
|
232
245
|
return null;
|
|
233
246
|
id = cleanCivetId(id);
|
|
@@ -242,6 +255,9 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
242
255
|
return null;
|
|
243
256
|
resolvedId = implicitId;
|
|
244
257
|
}
|
|
258
|
+
if (options2.scan && meta.framework === "vite") {
|
|
259
|
+
resolvedId = `\0${resolvedId}`;
|
|
260
|
+
}
|
|
245
261
|
return resolvedId + outExt;
|
|
246
262
|
},
|
|
247
263
|
loadInclude(id) {
|
|
@@ -343,25 +359,11 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
343
359
|
},
|
|
344
360
|
vite: {
|
|
345
361
|
config(config) {
|
|
346
|
-
var _a
|
|
362
|
+
var _a;
|
|
347
363
|
rootDir = path.resolve(process.cwd(), config.root ?? "");
|
|
348
|
-
config.optimizeDeps ?? (config.optimizeDeps = {});
|
|
349
|
-
(_a = config.optimizeDeps).esbuildOptions ?? (_a.esbuildOptions = {});
|
|
350
|
-
(_b = config.optimizeDeps.esbuildOptions).plugins ?? (_b.plugins = []);
|
|
351
|
-
config.optimizeDeps.esbuildOptions.plugins.push(
|
|
352
|
-
// @ts-ignore esbuild types from Vite might not match our esbuild
|
|
353
|
-
unplugin.esbuild({
|
|
354
|
-
...options,
|
|
355
|
-
js: void 0,
|
|
356
|
-
ts: "preserve",
|
|
357
|
-
dts: void 0,
|
|
358
|
-
emitDeclaration: false,
|
|
359
|
-
typecheck: false
|
|
360
|
-
})
|
|
361
|
-
);
|
|
362
364
|
if (implicitExtension) {
|
|
363
365
|
config.resolve ?? (config.resolve = {});
|
|
364
|
-
(
|
|
366
|
+
(_a = config.resolve).extensions ?? (_a.extensions = []);
|
|
365
367
|
config.resolve.extensions.push(".civet");
|
|
366
368
|
}
|
|
367
369
|
},
|
package/dist/unplugin.js
CHANGED
|
@@ -247,6 +247,14 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
247
247
|
compilerOptions.outDir ?? process.cwd(),
|
|
248
248
|
filePath
|
|
249
249
|
);
|
|
250
|
+
if (meta.framework === "esbuild") {
|
|
251
|
+
fs.mkdirSync(
|
|
252
|
+
import_path.default.dirname(
|
|
253
|
+
import_path.default.resolve(esbuildOptions.outdir, pathFromDistDir)
|
|
254
|
+
),
|
|
255
|
+
{ recursive: true }
|
|
256
|
+
);
|
|
257
|
+
}
|
|
250
258
|
this.emitFile({
|
|
251
259
|
source: content,
|
|
252
260
|
fileName: pathFromDistDir,
|
|
@@ -254,13 +262,18 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
254
262
|
});
|
|
255
263
|
},
|
|
256
264
|
void 0,
|
|
265
|
+
true,
|
|
266
|
+
// emitDtsOnly
|
|
267
|
+
void 0,
|
|
268
|
+
// @ts-ignore @internal interface
|
|
257
269
|
true
|
|
270
|
+
// forceDtsEmit
|
|
258
271
|
);
|
|
259
272
|
}
|
|
260
273
|
}
|
|
261
274
|
}
|
|
262
275
|
},
|
|
263
|
-
resolveId(id, importer) {
|
|
276
|
+
resolveId(id, importer, options2) {
|
|
264
277
|
if (/\0/.test(id))
|
|
265
278
|
return null;
|
|
266
279
|
id = cleanCivetId(id);
|
|
@@ -275,6 +288,9 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
275
288
|
return null;
|
|
276
289
|
resolvedId = implicitId;
|
|
277
290
|
}
|
|
291
|
+
if (options2.scan && meta.framework === "vite") {
|
|
292
|
+
resolvedId = `\0${resolvedId}`;
|
|
293
|
+
}
|
|
278
294
|
return resolvedId + outExt;
|
|
279
295
|
},
|
|
280
296
|
loadInclude(id) {
|
|
@@ -376,25 +392,11 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
376
392
|
},
|
|
377
393
|
vite: {
|
|
378
394
|
config(config) {
|
|
379
|
-
var _a
|
|
395
|
+
var _a;
|
|
380
396
|
rootDir = import_path.default.resolve(process.cwd(), config.root ?? "");
|
|
381
|
-
config.optimizeDeps ?? (config.optimizeDeps = {});
|
|
382
|
-
(_a = config.optimizeDeps).esbuildOptions ?? (_a.esbuildOptions = {});
|
|
383
|
-
(_b = config.optimizeDeps.esbuildOptions).plugins ?? (_b.plugins = []);
|
|
384
|
-
config.optimizeDeps.esbuildOptions.plugins.push(
|
|
385
|
-
// @ts-ignore esbuild types from Vite might not match our esbuild
|
|
386
|
-
unplugin.esbuild({
|
|
387
|
-
...options,
|
|
388
|
-
js: void 0,
|
|
389
|
-
ts: "preserve",
|
|
390
|
-
dts: void 0,
|
|
391
|
-
emitDeclaration: false,
|
|
392
|
-
typecheck: false
|
|
393
|
-
})
|
|
394
|
-
);
|
|
395
397
|
if (implicitExtension) {
|
|
396
398
|
config.resolve ?? (config.resolve = {});
|
|
397
|
-
(
|
|
399
|
+
(_a = config.resolve).extensions ?? (_a.extensions = []);
|
|
398
400
|
config.resolve.extensions.push(".civet");
|
|
399
401
|
}
|
|
400
402
|
},
|
package/dist/vite.js
CHANGED
|
@@ -247,6 +247,14 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
247
247
|
compilerOptions.outDir ?? process.cwd(),
|
|
248
248
|
filePath
|
|
249
249
|
);
|
|
250
|
+
if (meta.framework === "esbuild") {
|
|
251
|
+
fs.mkdirSync(
|
|
252
|
+
import_path.default.dirname(
|
|
253
|
+
import_path.default.resolve(esbuildOptions.outdir, pathFromDistDir)
|
|
254
|
+
),
|
|
255
|
+
{ recursive: true }
|
|
256
|
+
);
|
|
257
|
+
}
|
|
250
258
|
this.emitFile({
|
|
251
259
|
source: content,
|
|
252
260
|
fileName: pathFromDistDir,
|
|
@@ -254,13 +262,18 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
254
262
|
});
|
|
255
263
|
},
|
|
256
264
|
void 0,
|
|
265
|
+
true,
|
|
266
|
+
// emitDtsOnly
|
|
267
|
+
void 0,
|
|
268
|
+
// @ts-ignore @internal interface
|
|
257
269
|
true
|
|
270
|
+
// forceDtsEmit
|
|
258
271
|
);
|
|
259
272
|
}
|
|
260
273
|
}
|
|
261
274
|
}
|
|
262
275
|
},
|
|
263
|
-
resolveId(id, importer) {
|
|
276
|
+
resolveId(id, importer, options2) {
|
|
264
277
|
if (/\0/.test(id))
|
|
265
278
|
return null;
|
|
266
279
|
id = cleanCivetId(id);
|
|
@@ -275,6 +288,9 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
275
288
|
return null;
|
|
276
289
|
resolvedId = implicitId;
|
|
277
290
|
}
|
|
291
|
+
if (options2.scan && meta.framework === "vite") {
|
|
292
|
+
resolvedId = `\0${resolvedId}`;
|
|
293
|
+
}
|
|
278
294
|
return resolvedId + outExt;
|
|
279
295
|
},
|
|
280
296
|
loadInclude(id) {
|
|
@@ -376,25 +392,11 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
376
392
|
},
|
|
377
393
|
vite: {
|
|
378
394
|
config(config) {
|
|
379
|
-
var _a
|
|
395
|
+
var _a;
|
|
380
396
|
rootDir = import_path.default.resolve(process.cwd(), config.root ?? "");
|
|
381
|
-
config.optimizeDeps ?? (config.optimizeDeps = {});
|
|
382
|
-
(_a = config.optimizeDeps).esbuildOptions ?? (_a.esbuildOptions = {});
|
|
383
|
-
(_b = config.optimizeDeps.esbuildOptions).plugins ?? (_b.plugins = []);
|
|
384
|
-
config.optimizeDeps.esbuildOptions.plugins.push(
|
|
385
|
-
// @ts-ignore esbuild types from Vite might not match our esbuild
|
|
386
|
-
unplugin.esbuild({
|
|
387
|
-
...options,
|
|
388
|
-
js: void 0,
|
|
389
|
-
ts: "preserve",
|
|
390
|
-
dts: void 0,
|
|
391
|
-
emitDeclaration: false,
|
|
392
|
-
typecheck: false
|
|
393
|
-
})
|
|
394
|
-
);
|
|
395
397
|
if (implicitExtension) {
|
|
396
398
|
config.resolve ?? (config.resolve = {});
|
|
397
|
-
(
|
|
399
|
+
(_a = config.resolve).extensions ?? (_a.extensions = []);
|
|
398
400
|
config.resolve.extensions.push(".civet");
|
|
399
401
|
}
|
|
400
402
|
},
|
package/dist/webpack.js
CHANGED
|
@@ -247,6 +247,14 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
247
247
|
compilerOptions.outDir ?? process.cwd(),
|
|
248
248
|
filePath
|
|
249
249
|
);
|
|
250
|
+
if (meta.framework === "esbuild") {
|
|
251
|
+
fs.mkdirSync(
|
|
252
|
+
import_path.default.dirname(
|
|
253
|
+
import_path.default.resolve(esbuildOptions.outdir, pathFromDistDir)
|
|
254
|
+
),
|
|
255
|
+
{ recursive: true }
|
|
256
|
+
);
|
|
257
|
+
}
|
|
250
258
|
this.emitFile({
|
|
251
259
|
source: content,
|
|
252
260
|
fileName: pathFromDistDir,
|
|
@@ -254,13 +262,18 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
254
262
|
});
|
|
255
263
|
},
|
|
256
264
|
void 0,
|
|
265
|
+
true,
|
|
266
|
+
// emitDtsOnly
|
|
267
|
+
void 0,
|
|
268
|
+
// @ts-ignore @internal interface
|
|
257
269
|
true
|
|
270
|
+
// forceDtsEmit
|
|
258
271
|
);
|
|
259
272
|
}
|
|
260
273
|
}
|
|
261
274
|
}
|
|
262
275
|
},
|
|
263
|
-
resolveId(id, importer) {
|
|
276
|
+
resolveId(id, importer, options2) {
|
|
264
277
|
if (/\0/.test(id))
|
|
265
278
|
return null;
|
|
266
279
|
id = cleanCivetId(id);
|
|
@@ -275,6 +288,9 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
275
288
|
return null;
|
|
276
289
|
resolvedId = implicitId;
|
|
277
290
|
}
|
|
291
|
+
if (options2.scan && meta.framework === "vite") {
|
|
292
|
+
resolvedId = `\0${resolvedId}`;
|
|
293
|
+
}
|
|
278
294
|
return resolvedId + outExt;
|
|
279
295
|
},
|
|
280
296
|
loadInclude(id) {
|
|
@@ -376,25 +392,11 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
376
392
|
},
|
|
377
393
|
vite: {
|
|
378
394
|
config(config) {
|
|
379
|
-
var _a
|
|
395
|
+
var _a;
|
|
380
396
|
rootDir = import_path.default.resolve(process.cwd(), config.root ?? "");
|
|
381
|
-
config.optimizeDeps ?? (config.optimizeDeps = {});
|
|
382
|
-
(_a = config.optimizeDeps).esbuildOptions ?? (_a.esbuildOptions = {});
|
|
383
|
-
(_b = config.optimizeDeps.esbuildOptions).plugins ?? (_b.plugins = []);
|
|
384
|
-
config.optimizeDeps.esbuildOptions.plugins.push(
|
|
385
|
-
// @ts-ignore esbuild types from Vite might not match our esbuild
|
|
386
|
-
unplugin.esbuild({
|
|
387
|
-
...options,
|
|
388
|
-
js: void 0,
|
|
389
|
-
ts: "preserve",
|
|
390
|
-
dts: void 0,
|
|
391
|
-
emitDeclaration: false,
|
|
392
|
-
typecheck: false
|
|
393
|
-
})
|
|
394
|
-
);
|
|
395
397
|
if (implicitExtension) {
|
|
396
398
|
config.resolve ?? (config.resolve = {});
|
|
397
|
-
(
|
|
399
|
+
(_a = config.resolve).extensions ?? (_a.extensions = []);
|
|
398
400
|
config.resolve.extensions.push(".civet");
|
|
399
401
|
}
|
|
400
402
|
},
|