@danielx/civet 0.7.32 → 0.7.34
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/CHANGELOG.md +17 -0
- package/dist/browser.js +436 -352
- package/dist/civet +0 -0
- package/dist/config.js +7182 -1
- package/dist/config.mjs +7205 -1
- package/dist/main.js +436 -352
- package/dist/main.mjs +436 -352
- package/dist/types.d.ts +1 -0
- package/dist/unplugin/astro.js +1 -1
- package/dist/unplugin/astro.mjs +1 -1
- package/dist/unplugin/esbuild.js +1 -1
- package/dist/unplugin/esbuild.mjs +1 -1
- package/dist/unplugin/rollup.d.ts +1 -1
- package/dist/unplugin/rollup.js +1 -1
- package/dist/unplugin/rollup.mjs +1 -1
- package/dist/unplugin/unplugin.js +19 -6
- package/dist/unplugin/unplugin.mjs +19 -6
- package/dist/unplugin/vite.js +1 -1
- package/dist/unplugin/vite.mjs +1 -1
- package/dist/unplugin/webpack.js +1 -1
- package/dist/unplugin/webpack.mjs +1 -1
- package/package.json +3 -3
package/dist/types.d.ts
CHANGED
package/dist/unplugin/astro.js
CHANGED
|
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
|
-
// unplugin-civet
|
|
29
|
+
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\astro.civet.jsx
|
|
30
30
|
var astro_civet_exports = {};
|
|
31
31
|
__export(astro_civet_exports, {
|
|
32
32
|
default: () => astro_civet_default
|
package/dist/unplugin/astro.mjs
CHANGED
package/dist/unplugin/esbuild.js
CHANGED
|
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
|
-
// unplugin-civet
|
|
29
|
+
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\esbuild.civet.jsx
|
|
30
30
|
var esbuild_civet_exports = {};
|
|
31
31
|
__export(esbuild_civet_exports, {
|
|
32
32
|
default: () => esbuild_civet_default
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// unplugin-civet
|
|
1
|
+
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\esbuild.civet.jsx
|
|
2
2
|
import civetUnplugin from "./unplugin.mjs";
|
|
3
3
|
var esbuild_civet_default = civetUnplugin.esbuild;
|
|
4
4
|
export {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (options: import("./unplugin.js").PluginOptions) => import("rollup").Plugin | import("rollup").Plugin[];
|
|
1
|
+
declare const _default: (options: import("./unplugin.js").PluginOptions) => import("rollup").Plugin<any> | import("rollup").Plugin<any>[];
|
|
2
2
|
export default _default;
|
package/dist/unplugin/rollup.js
CHANGED
|
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
|
-
// unplugin-civet
|
|
29
|
+
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\rollup.civet.jsx
|
|
30
30
|
var rollup_civet_exports = {};
|
|
31
31
|
__export(rollup_civet_exports, {
|
|
32
32
|
default: () => rollup_civet_default
|
package/dist/unplugin/rollup.mjs
CHANGED
|
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
|
-
// unplugin-civet
|
|
29
|
+
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\unplugin.civet.jsx
|
|
30
30
|
var unplugin_civet_exports = {};
|
|
31
31
|
__export(unplugin_civet_exports, {
|
|
32
32
|
default: () => unplugin_civet_default,
|
|
@@ -46,7 +46,7 @@ var import_os = __toESM(require("os"));
|
|
|
46
46
|
// source/unplugin/constants.mjs
|
|
47
47
|
var DEFAULT_EXTENSIONS = [".mjs", ".js", ".mts", ".ts", ".jsx", ".tsx", ".json"];
|
|
48
48
|
|
|
49
|
-
// unplugin-civet
|
|
49
|
+
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\unplugin.civet.jsx
|
|
50
50
|
var DiagnosticCategory = {};
|
|
51
51
|
DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning";
|
|
52
52
|
DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error";
|
|
@@ -57,7 +57,12 @@ var postfixRE = /[?#].*$/s;
|
|
|
57
57
|
var isWindows = import_os.default.platform() === "win32";
|
|
58
58
|
var windowsSlashRE = /\\/g;
|
|
59
59
|
function cleanCivetId(id) {
|
|
60
|
-
|
|
60
|
+
let postfix = "";
|
|
61
|
+
id = id.replace(postfixRE, (match) => {
|
|
62
|
+
postfix = match;
|
|
63
|
+
return "";
|
|
64
|
+
}).replace(/\.[jt]sx$/, "");
|
|
65
|
+
return { id, postfix };
|
|
61
66
|
}
|
|
62
67
|
function tryStatSync(file) {
|
|
63
68
|
try {
|
|
@@ -357,8 +362,16 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
357
362
|
resolveId(id, importer, options2) {
|
|
358
363
|
if (/\0/.test(id))
|
|
359
364
|
return null;
|
|
360
|
-
|
|
361
|
-
|
|
365
|
+
let postfix;
|
|
366
|
+
({ id, postfix } = cleanCivetId(id));
|
|
367
|
+
let ref;
|
|
368
|
+
if (import_path.default.isAbsolute(id)) {
|
|
369
|
+
ref = resolveAbsolutePath(rootDir, id, implicitExtension);
|
|
370
|
+
} else {
|
|
371
|
+
ref = import_path.default.resolve(import_path.default.dirname(importer ?? ""), id);
|
|
372
|
+
}
|
|
373
|
+
;
|
|
374
|
+
let resolvedId = ref;
|
|
362
375
|
if (!resolvedId)
|
|
363
376
|
return null;
|
|
364
377
|
if (!resolvedId.endsWith(".civet")) {
|
|
@@ -372,7 +385,7 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
372
385
|
if (options2.scan && meta.framework === "vite") {
|
|
373
386
|
resolvedId = `\0${resolvedId}`;
|
|
374
387
|
}
|
|
375
|
-
return resolvedId + outExt;
|
|
388
|
+
return resolvedId + outExt + postfix;
|
|
376
389
|
},
|
|
377
390
|
loadInclude(id) {
|
|
378
391
|
return isCivetTranspiled.test(id);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// unplugin-civet
|
|
1
|
+
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\unplugin.civet.jsx
|
|
2
2
|
import { createUnplugin } from "unplugin";
|
|
3
3
|
import civet, { SourceMap } from "@danielx/civet";
|
|
4
4
|
import { findInDir, loadConfig } from "@danielx/civet/config";
|
|
@@ -14,7 +14,7 @@ import os from "os";
|
|
|
14
14
|
// source/unplugin/constants.mjs
|
|
15
15
|
var DEFAULT_EXTENSIONS = [".mjs", ".js", ".mts", ".ts", ".jsx", ".tsx", ".json"];
|
|
16
16
|
|
|
17
|
-
// unplugin-civet
|
|
17
|
+
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\unplugin.civet.jsx
|
|
18
18
|
var DiagnosticCategory = {};
|
|
19
19
|
DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning";
|
|
20
20
|
DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error";
|
|
@@ -25,7 +25,12 @@ var postfixRE = /[?#].*$/s;
|
|
|
25
25
|
var isWindows = os.platform() === "win32";
|
|
26
26
|
var windowsSlashRE = /\\/g;
|
|
27
27
|
function cleanCivetId(id) {
|
|
28
|
-
|
|
28
|
+
let postfix = "";
|
|
29
|
+
id = id.replace(postfixRE, (match) => {
|
|
30
|
+
postfix = match;
|
|
31
|
+
return "";
|
|
32
|
+
}).replace(/\.[jt]sx$/, "");
|
|
33
|
+
return { id, postfix };
|
|
29
34
|
}
|
|
30
35
|
function tryStatSync(file) {
|
|
31
36
|
try {
|
|
@@ -325,8 +330,16 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
325
330
|
resolveId(id, importer, options2) {
|
|
326
331
|
if (/\0/.test(id))
|
|
327
332
|
return null;
|
|
328
|
-
|
|
329
|
-
|
|
333
|
+
let postfix;
|
|
334
|
+
({ id, postfix } = cleanCivetId(id));
|
|
335
|
+
let ref;
|
|
336
|
+
if (path.isAbsolute(id)) {
|
|
337
|
+
ref = resolveAbsolutePath(rootDir, id, implicitExtension);
|
|
338
|
+
} else {
|
|
339
|
+
ref = path.resolve(path.dirname(importer ?? ""), id);
|
|
340
|
+
}
|
|
341
|
+
;
|
|
342
|
+
let resolvedId = ref;
|
|
330
343
|
if (!resolvedId)
|
|
331
344
|
return null;
|
|
332
345
|
if (!resolvedId.endsWith(".civet")) {
|
|
@@ -340,7 +353,7 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
340
353
|
if (options2.scan && meta.framework === "vite") {
|
|
341
354
|
resolvedId = `\0${resolvedId}`;
|
|
342
355
|
}
|
|
343
|
-
return resolvedId + outExt;
|
|
356
|
+
return resolvedId + outExt + postfix;
|
|
344
357
|
},
|
|
345
358
|
loadInclude(id) {
|
|
346
359
|
return isCivetTranspiled.test(id);
|
package/dist/unplugin/vite.js
CHANGED
|
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
|
-
// unplugin-civet
|
|
29
|
+
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\vite.civet.jsx
|
|
30
30
|
var vite_civet_exports = {};
|
|
31
31
|
__export(vite_civet_exports, {
|
|
32
32
|
default: () => vite_civet_default
|
package/dist/unplugin/vite.mjs
CHANGED
package/dist/unplugin/webpack.js
CHANGED
|
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
|
-
// unplugin-civet
|
|
29
|
+
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\webpack.civet.jsx
|
|
30
30
|
var webpack_civet_exports = {};
|
|
31
31
|
__export(webpack_civet_exports, {
|
|
32
32
|
default: () => webpack_civet_default
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// unplugin-civet
|
|
1
|
+
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\webpack.civet.jsx
|
|
2
2
|
import civetUnplugin from "./unplugin.mjs";
|
|
3
3
|
var webpack_civet_default = civetUnplugin.webpack;
|
|
4
4
|
export {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielx/civet",
|
|
3
3
|
"type": "commonjs",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.34",
|
|
5
5
|
"description": "CoffeeScript style syntax for TypeScript",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"module": "dist/main.mjs",
|
|
@@ -99,12 +99,12 @@
|
|
|
99
99
|
"@danielx/hera": "^0.8.16",
|
|
100
100
|
"@prettier/sync": "^0.5.2",
|
|
101
101
|
"@types/assert": "^1.5.6",
|
|
102
|
-
"@types/mocha": "^
|
|
102
|
+
"@types/mocha": "^10.0.8",
|
|
103
103
|
"@types/node": "^20.12.2",
|
|
104
104
|
"c8": "^7.12.0",
|
|
105
105
|
"esbuild": "0.20.0",
|
|
106
106
|
"marked": "^4.2.4",
|
|
107
|
-
"mocha": "^10.
|
|
107
|
+
"mocha": "^10.7.3",
|
|
108
108
|
"prettier": "^3.2.5",
|
|
109
109
|
"terser": "^5.16.1",
|
|
110
110
|
"ts-node": "^10.9.1",
|