@danielx/civet 0.6.78 → 0.6.79
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/esbuild.js +10 -12
- package/dist/rollup.js +10 -12
- package/dist/unplugin-shared.mjs +10 -12
- package/dist/unplugin.js +10 -12
- package/dist/vite.js +10 -12
- package/dist/webpack.js +10 -12
- package/package.json +1 -1
package/dist/esbuild.js
CHANGED
|
@@ -239,20 +239,18 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
239
239
|
if (/\0/.test(id))
|
|
240
240
|
return null;
|
|
241
241
|
id = cleanCivetId(id);
|
|
242
|
-
|
|
243
|
-
if (!
|
|
242
|
+
let resolvedId = import_path.default.isAbsolute(id) ? resolveAbsolutePath(rootDir, id, implicitExtension) : import_path.default.resolve(import_path.default.dirname(importer ?? ""), id);
|
|
243
|
+
if (!resolvedId)
|
|
244
244
|
return null;
|
|
245
|
-
|
|
246
|
-
if (!relativeId.endsWith(".civet")) {
|
|
245
|
+
if (!resolvedId.endsWith(".civet")) {
|
|
247
246
|
if (!implicitExtension)
|
|
248
247
|
return null;
|
|
249
|
-
const implicitId = implicitCivet(
|
|
248
|
+
const implicitId = implicitCivet(resolvedId);
|
|
250
249
|
if (!implicitId)
|
|
251
250
|
return null;
|
|
252
|
-
|
|
251
|
+
resolvedId = implicitId;
|
|
253
252
|
}
|
|
254
|
-
|
|
255
|
-
return relativePath;
|
|
253
|
+
return resolvedId + outExt;
|
|
256
254
|
},
|
|
257
255
|
loadInclude(id) {
|
|
258
256
|
return isCivetTranspiled(id);
|
|
@@ -260,7 +258,7 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
260
258
|
async load(id) {
|
|
261
259
|
if (!isCivetTranspiled(id))
|
|
262
260
|
return null;
|
|
263
|
-
const filename = import_path.default.resolve(
|
|
261
|
+
const filename = import_path.default.resolve(rootDir, id.slice(0, -outExt.length));
|
|
264
262
|
const rawCivetSource = await fs.promises.readFile(filename, "utf-8");
|
|
265
263
|
this.addWatchFile(filename);
|
|
266
264
|
let compiled;
|
|
@@ -380,10 +378,10 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
380
378
|
handleHotUpdate({ file, server, modules }) {
|
|
381
379
|
if (!file.endsWith(".civet"))
|
|
382
380
|
return;
|
|
383
|
-
const
|
|
384
|
-
const module2 = server.moduleGraph.getModuleById(
|
|
381
|
+
const resolvedId = slash(import_path.default.resolve(file) + outExt);
|
|
382
|
+
const module2 = server.moduleGraph.getModuleById(resolvedId);
|
|
385
383
|
if (module2) {
|
|
386
|
-
server.moduleGraph.onFileChange(
|
|
384
|
+
server.moduleGraph.onFileChange(resolvedId);
|
|
387
385
|
return [...modules, module2];
|
|
388
386
|
}
|
|
389
387
|
return modules;
|
package/dist/rollup.js
CHANGED
|
@@ -239,20 +239,18 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
239
239
|
if (/\0/.test(id))
|
|
240
240
|
return null;
|
|
241
241
|
id = cleanCivetId(id);
|
|
242
|
-
|
|
243
|
-
if (!
|
|
242
|
+
let resolvedId = import_path.default.isAbsolute(id) ? resolveAbsolutePath(rootDir, id, implicitExtension) : import_path.default.resolve(import_path.default.dirname(importer ?? ""), id);
|
|
243
|
+
if (!resolvedId)
|
|
244
244
|
return null;
|
|
245
|
-
|
|
246
|
-
if (!relativeId.endsWith(".civet")) {
|
|
245
|
+
if (!resolvedId.endsWith(".civet")) {
|
|
247
246
|
if (!implicitExtension)
|
|
248
247
|
return null;
|
|
249
|
-
const implicitId = implicitCivet(
|
|
248
|
+
const implicitId = implicitCivet(resolvedId);
|
|
250
249
|
if (!implicitId)
|
|
251
250
|
return null;
|
|
252
|
-
|
|
251
|
+
resolvedId = implicitId;
|
|
253
252
|
}
|
|
254
|
-
|
|
255
|
-
return relativePath;
|
|
253
|
+
return resolvedId + outExt;
|
|
256
254
|
},
|
|
257
255
|
loadInclude(id) {
|
|
258
256
|
return isCivetTranspiled(id);
|
|
@@ -260,7 +258,7 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
260
258
|
async load(id) {
|
|
261
259
|
if (!isCivetTranspiled(id))
|
|
262
260
|
return null;
|
|
263
|
-
const filename = import_path.default.resolve(
|
|
261
|
+
const filename = import_path.default.resolve(rootDir, id.slice(0, -outExt.length));
|
|
264
262
|
const rawCivetSource = await fs.promises.readFile(filename, "utf-8");
|
|
265
263
|
this.addWatchFile(filename);
|
|
266
264
|
let compiled;
|
|
@@ -380,10 +378,10 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
380
378
|
handleHotUpdate({ file, server, modules }) {
|
|
381
379
|
if (!file.endsWith(".civet"))
|
|
382
380
|
return;
|
|
383
|
-
const
|
|
384
|
-
const module2 = server.moduleGraph.getModuleById(
|
|
381
|
+
const resolvedId = slash(import_path.default.resolve(file) + outExt);
|
|
382
|
+
const module2 = server.moduleGraph.getModuleById(resolvedId);
|
|
385
383
|
if (module2) {
|
|
386
|
-
server.moduleGraph.onFileChange(
|
|
384
|
+
server.moduleGraph.onFileChange(resolvedId);
|
|
387
385
|
return [...modules, module2];
|
|
388
386
|
}
|
|
389
387
|
return modules;
|
package/dist/unplugin-shared.mjs
CHANGED
|
@@ -206,20 +206,18 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
206
206
|
if (/\0/.test(id))
|
|
207
207
|
return null;
|
|
208
208
|
id = cleanCivetId(id);
|
|
209
|
-
|
|
210
|
-
if (!
|
|
209
|
+
let resolvedId = path.isAbsolute(id) ? resolveAbsolutePath(rootDir, id, implicitExtension) : path.resolve(path.dirname(importer ?? ""), id);
|
|
210
|
+
if (!resolvedId)
|
|
211
211
|
return null;
|
|
212
|
-
|
|
213
|
-
if (!relativeId.endsWith(".civet")) {
|
|
212
|
+
if (!resolvedId.endsWith(".civet")) {
|
|
214
213
|
if (!implicitExtension)
|
|
215
214
|
return null;
|
|
216
|
-
const implicitId = implicitCivet(
|
|
215
|
+
const implicitId = implicitCivet(resolvedId);
|
|
217
216
|
if (!implicitId)
|
|
218
217
|
return null;
|
|
219
|
-
|
|
218
|
+
resolvedId = implicitId;
|
|
220
219
|
}
|
|
221
|
-
|
|
222
|
-
return relativePath;
|
|
220
|
+
return resolvedId + outExt;
|
|
223
221
|
},
|
|
224
222
|
loadInclude(id) {
|
|
225
223
|
return isCivetTranspiled(id);
|
|
@@ -227,7 +225,7 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
227
225
|
async load(id) {
|
|
228
226
|
if (!isCivetTranspiled(id))
|
|
229
227
|
return null;
|
|
230
|
-
const filename = path.resolve(
|
|
228
|
+
const filename = path.resolve(rootDir, id.slice(0, -outExt.length));
|
|
231
229
|
const rawCivetSource = await fs.promises.readFile(filename, "utf-8");
|
|
232
230
|
this.addWatchFile(filename);
|
|
233
231
|
let compiled;
|
|
@@ -347,10 +345,10 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
347
345
|
handleHotUpdate({ file, server, modules }) {
|
|
348
346
|
if (!file.endsWith(".civet"))
|
|
349
347
|
return;
|
|
350
|
-
const
|
|
351
|
-
const module = server.moduleGraph.getModuleById(
|
|
348
|
+
const resolvedId = slash(path.resolve(file) + outExt);
|
|
349
|
+
const module = server.moduleGraph.getModuleById(resolvedId);
|
|
352
350
|
if (module) {
|
|
353
|
-
server.moduleGraph.onFileChange(
|
|
351
|
+
server.moduleGraph.onFileChange(resolvedId);
|
|
354
352
|
return [...modules, module];
|
|
355
353
|
}
|
|
356
354
|
return modules;
|
package/dist/unplugin.js
CHANGED
|
@@ -239,20 +239,18 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
239
239
|
if (/\0/.test(id))
|
|
240
240
|
return null;
|
|
241
241
|
id = cleanCivetId(id);
|
|
242
|
-
|
|
243
|
-
if (!
|
|
242
|
+
let resolvedId = import_path.default.isAbsolute(id) ? resolveAbsolutePath(rootDir, id, implicitExtension) : import_path.default.resolve(import_path.default.dirname(importer ?? ""), id);
|
|
243
|
+
if (!resolvedId)
|
|
244
244
|
return null;
|
|
245
|
-
|
|
246
|
-
if (!relativeId.endsWith(".civet")) {
|
|
245
|
+
if (!resolvedId.endsWith(".civet")) {
|
|
247
246
|
if (!implicitExtension)
|
|
248
247
|
return null;
|
|
249
|
-
const implicitId = implicitCivet(
|
|
248
|
+
const implicitId = implicitCivet(resolvedId);
|
|
250
249
|
if (!implicitId)
|
|
251
250
|
return null;
|
|
252
|
-
|
|
251
|
+
resolvedId = implicitId;
|
|
253
252
|
}
|
|
254
|
-
|
|
255
|
-
return relativePath;
|
|
253
|
+
return resolvedId + outExt;
|
|
256
254
|
},
|
|
257
255
|
loadInclude(id) {
|
|
258
256
|
return isCivetTranspiled(id);
|
|
@@ -260,7 +258,7 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
260
258
|
async load(id) {
|
|
261
259
|
if (!isCivetTranspiled(id))
|
|
262
260
|
return null;
|
|
263
|
-
const filename = import_path.default.resolve(
|
|
261
|
+
const filename = import_path.default.resolve(rootDir, id.slice(0, -outExt.length));
|
|
264
262
|
const rawCivetSource = await fs.promises.readFile(filename, "utf-8");
|
|
265
263
|
this.addWatchFile(filename);
|
|
266
264
|
let compiled;
|
|
@@ -380,10 +378,10 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
380
378
|
handleHotUpdate({ file, server, modules }) {
|
|
381
379
|
if (!file.endsWith(".civet"))
|
|
382
380
|
return;
|
|
383
|
-
const
|
|
384
|
-
const module2 = server.moduleGraph.getModuleById(
|
|
381
|
+
const resolvedId = slash(import_path.default.resolve(file) + outExt);
|
|
382
|
+
const module2 = server.moduleGraph.getModuleById(resolvedId);
|
|
385
383
|
if (module2) {
|
|
386
|
-
server.moduleGraph.onFileChange(
|
|
384
|
+
server.moduleGraph.onFileChange(resolvedId);
|
|
387
385
|
return [...modules, module2];
|
|
388
386
|
}
|
|
389
387
|
return modules;
|
package/dist/vite.js
CHANGED
|
@@ -239,20 +239,18 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
239
239
|
if (/\0/.test(id))
|
|
240
240
|
return null;
|
|
241
241
|
id = cleanCivetId(id);
|
|
242
|
-
|
|
243
|
-
if (!
|
|
242
|
+
let resolvedId = import_path.default.isAbsolute(id) ? resolveAbsolutePath(rootDir, id, implicitExtension) : import_path.default.resolve(import_path.default.dirname(importer ?? ""), id);
|
|
243
|
+
if (!resolvedId)
|
|
244
244
|
return null;
|
|
245
|
-
|
|
246
|
-
if (!relativeId.endsWith(".civet")) {
|
|
245
|
+
if (!resolvedId.endsWith(".civet")) {
|
|
247
246
|
if (!implicitExtension)
|
|
248
247
|
return null;
|
|
249
|
-
const implicitId = implicitCivet(
|
|
248
|
+
const implicitId = implicitCivet(resolvedId);
|
|
250
249
|
if (!implicitId)
|
|
251
250
|
return null;
|
|
252
|
-
|
|
251
|
+
resolvedId = implicitId;
|
|
253
252
|
}
|
|
254
|
-
|
|
255
|
-
return relativePath;
|
|
253
|
+
return resolvedId + outExt;
|
|
256
254
|
},
|
|
257
255
|
loadInclude(id) {
|
|
258
256
|
return isCivetTranspiled(id);
|
|
@@ -260,7 +258,7 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
260
258
|
async load(id) {
|
|
261
259
|
if (!isCivetTranspiled(id))
|
|
262
260
|
return null;
|
|
263
|
-
const filename = import_path.default.resolve(
|
|
261
|
+
const filename = import_path.default.resolve(rootDir, id.slice(0, -outExt.length));
|
|
264
262
|
const rawCivetSource = await fs.promises.readFile(filename, "utf-8");
|
|
265
263
|
this.addWatchFile(filename);
|
|
266
264
|
let compiled;
|
|
@@ -380,10 +378,10 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
380
378
|
handleHotUpdate({ file, server, modules }) {
|
|
381
379
|
if (!file.endsWith(".civet"))
|
|
382
380
|
return;
|
|
383
|
-
const
|
|
384
|
-
const module2 = server.moduleGraph.getModuleById(
|
|
381
|
+
const resolvedId = slash(import_path.default.resolve(file) + outExt);
|
|
382
|
+
const module2 = server.moduleGraph.getModuleById(resolvedId);
|
|
385
383
|
if (module2) {
|
|
386
|
-
server.moduleGraph.onFileChange(
|
|
384
|
+
server.moduleGraph.onFileChange(resolvedId);
|
|
387
385
|
return [...modules, module2];
|
|
388
386
|
}
|
|
389
387
|
return modules;
|
package/dist/webpack.js
CHANGED
|
@@ -239,20 +239,18 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
239
239
|
if (/\0/.test(id))
|
|
240
240
|
return null;
|
|
241
241
|
id = cleanCivetId(id);
|
|
242
|
-
|
|
243
|
-
if (!
|
|
242
|
+
let resolvedId = import_path.default.isAbsolute(id) ? resolveAbsolutePath(rootDir, id, implicitExtension) : import_path.default.resolve(import_path.default.dirname(importer ?? ""), id);
|
|
243
|
+
if (!resolvedId)
|
|
244
244
|
return null;
|
|
245
|
-
|
|
246
|
-
if (!relativeId.endsWith(".civet")) {
|
|
245
|
+
if (!resolvedId.endsWith(".civet")) {
|
|
247
246
|
if (!implicitExtension)
|
|
248
247
|
return null;
|
|
249
|
-
const implicitId = implicitCivet(
|
|
248
|
+
const implicitId = implicitCivet(resolvedId);
|
|
250
249
|
if (!implicitId)
|
|
251
250
|
return null;
|
|
252
|
-
|
|
251
|
+
resolvedId = implicitId;
|
|
253
252
|
}
|
|
254
|
-
|
|
255
|
-
return relativePath;
|
|
253
|
+
return resolvedId + outExt;
|
|
256
254
|
},
|
|
257
255
|
loadInclude(id) {
|
|
258
256
|
return isCivetTranspiled(id);
|
|
@@ -260,7 +258,7 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
260
258
|
async load(id) {
|
|
261
259
|
if (!isCivetTranspiled(id))
|
|
262
260
|
return null;
|
|
263
|
-
const filename = import_path.default.resolve(
|
|
261
|
+
const filename = import_path.default.resolve(rootDir, id.slice(0, -outExt.length));
|
|
264
262
|
const rawCivetSource = await fs.promises.readFile(filename, "utf-8");
|
|
265
263
|
this.addWatchFile(filename);
|
|
266
264
|
let compiled;
|
|
@@ -380,10 +378,10 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
380
378
|
handleHotUpdate({ file, server, modules }) {
|
|
381
379
|
if (!file.endsWith(".civet"))
|
|
382
380
|
return;
|
|
383
|
-
const
|
|
384
|
-
const module2 = server.moduleGraph.getModuleById(
|
|
381
|
+
const resolvedId = slash(import_path.default.resolve(file) + outExt);
|
|
382
|
+
const module2 = server.moduleGraph.getModuleById(resolvedId);
|
|
385
383
|
if (module2) {
|
|
386
|
-
server.moduleGraph.onFileChange(
|
|
384
|
+
server.moduleGraph.onFileChange(resolvedId);
|
|
387
385
|
return [...modules, module2];
|
|
388
386
|
}
|
|
389
387
|
return modules;
|