@danielx/civet 0.7.16 → 0.7.17
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 +12 -9
- package/dist/civet +131 -99
- package/dist/config.d.mts +1 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.mjs +122 -0
- package/dist/esm.mjs +1 -1
- package/dist/main.js +12 -9
- package/dist/main.mjs +12 -9
- package/dist/unplugin/astro.d.ts +11 -0
- package/dist/unplugin/astro.js +49 -0
- package/dist/unplugin/astro.mjs +19 -0
- package/dist/unplugin/esbuild.d.ts +2 -0
- package/dist/unplugin/esbuild.js +36 -0
- package/dist/unplugin/esbuild.mjs +6 -0
- package/dist/unplugin/rollup.d.ts +2 -0
- package/dist/unplugin/rollup.js +36 -0
- package/dist/unplugin/rollup.mjs +6 -0
- package/dist/{unplugin.d.ts → unplugin/unplugin.d.ts} +7 -10
- package/dist/{unplugin.js → unplugin/unplugin.js} +81 -66
- package/dist/{unplugin-shared.mjs → unplugin/unplugin.mjs} +80 -65
- package/dist/unplugin/vite.d.ts +2 -0
- package/dist/unplugin/vite.js +36 -0
- package/dist/unplugin/vite.mjs +6 -0
- package/dist/unplugin/webpack.d.ts +2 -0
- package/dist/unplugin/webpack.js +36 -0
- package/dist/unplugin/webpack.mjs +6 -0
- package/package.json +27 -17
- package/dist/astro.d.mts +0 -16
- package/dist/astro.d.ts +0 -16
- package/dist/astro.js +0 -537
- package/dist/astro.mjs +0 -22
- package/dist/esbuild.d.mts +0 -8
- package/dist/esbuild.d.ts +0 -8
- package/dist/esbuild.js +0 -524
- package/dist/esbuild.mjs +0 -9
- package/dist/rollup.d.mts +0 -8
- package/dist/rollup.d.ts +0 -8
- package/dist/rollup.js +0 -524
- package/dist/rollup.mjs +0 -9
- package/dist/unplugin.d.mts +0 -26
- package/dist/unplugin.mjs +0 -10
- package/dist/vite.d.mts +0 -8
- package/dist/vite.d.ts +0 -8
- package/dist/vite.js +0 -524
- package/dist/vite.mjs +0 -9
- package/dist/webpack.d.mts +0 -7
- package/dist/webpack.d.ts +0 -7
- package/dist/webpack.js +0 -524
- package/dist/webpack.mjs +0 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//
|
|
1
|
+
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\unplugin.civet.jsx
|
|
2
2
|
import { createUnplugin } from "unplugin";
|
|
3
|
-
import civet from "@danielx/civet";
|
|
3
|
+
import civet, { SourceMap } from "@danielx/civet";
|
|
4
4
|
import { findInDir, loadConfig } from "@danielx/civet/config";
|
|
5
5
|
import {
|
|
6
6
|
remapRange,
|
|
@@ -11,10 +11,15 @@ import path from "path";
|
|
|
11
11
|
import * as tsvfs from "@typescript/vfs";
|
|
12
12
|
import os from "os";
|
|
13
13
|
|
|
14
|
-
//
|
|
14
|
+
// source/unplugin/constants.mjs
|
|
15
15
|
var DEFAULT_EXTENSIONS = [".mjs", ".js", ".mts", ".ts", ".jsx", ".tsx", ".json"];
|
|
16
16
|
|
|
17
|
-
//
|
|
17
|
+
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\unplugin.civet.jsx
|
|
18
|
+
var DiagnosticCategory = {};
|
|
19
|
+
DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning";
|
|
20
|
+
DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error";
|
|
21
|
+
DiagnosticCategory[DiagnosticCategory["Suggestion"] = 2] = "Suggestion";
|
|
22
|
+
DiagnosticCategory[DiagnosticCategory["Message"] = 3] = "Message";
|
|
18
23
|
var isCivetTranspiled = /(\.civet)(\.[jt]sx)([?#].*)?$/;
|
|
19
24
|
var postfixRE = /[?#].*$/s;
|
|
20
25
|
var isWindows = os.platform() === "win32";
|
|
@@ -69,7 +74,7 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
69
74
|
let esbuildOptions;
|
|
70
75
|
let configErrors;
|
|
71
76
|
let configFileNames;
|
|
72
|
-
const tsPromise = transformTS || options.ts === "tsc" ? import("typescript").then((
|
|
77
|
+
const tsPromise = transformTS || options.ts === "tsc" ? import("typescript").then(($) => $.default) : null;
|
|
73
78
|
const getFormatHost = (sys) => {
|
|
74
79
|
return {
|
|
75
80
|
getCurrentDirectory: () => sys.getCurrentDirectory(),
|
|
@@ -83,16 +88,17 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
83
88
|
enforce: "pre",
|
|
84
89
|
async buildStart() {
|
|
85
90
|
if (transformTS || options.ts === "tsc") {
|
|
86
|
-
let
|
|
91
|
+
let mogrify = function(key) {
|
|
87
92
|
if (key in config && Array.isArray(config[key])) {
|
|
88
|
-
config[key] = config[key].map((item) => {
|
|
93
|
+
return config[key] = config[key].map((item) => {
|
|
89
94
|
if (typeof item !== "string")
|
|
90
95
|
return item;
|
|
91
96
|
return item.replace(/\.civet\b(?!\.)/g, ".civet.tsx");
|
|
92
97
|
});
|
|
93
98
|
}
|
|
99
|
+
;
|
|
100
|
+
return;
|
|
94
101
|
};
|
|
95
|
-
var mogrify = mogrify2;
|
|
96
102
|
const ts = await tsPromise;
|
|
97
103
|
const civetConfigPath = "config" in options ? options.config : await findInDir(process.cwd());
|
|
98
104
|
if (civetConfigPath) {
|
|
@@ -114,12 +120,12 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
114
120
|
console.error(ts.formatDiagnostic(error, getFormatHost(ts.sys)));
|
|
115
121
|
throw error;
|
|
116
122
|
}
|
|
117
|
-
|
|
123
|
+
mogrify("files");
|
|
118
124
|
const system = { ...ts.sys };
|
|
119
125
|
const { readDirectory: systemReadDirectory } = system;
|
|
120
126
|
system.readDirectory = (path2, extensions, excludes, includes, depth) => {
|
|
121
127
|
extensions = [...extensions ?? [], ".civet"];
|
|
122
|
-
return systemReadDirectory(path2, extensions, excludes, includes, depth).map((
|
|
128
|
+
return systemReadDirectory(path2, extensions, excludes, includes, depth).map(($1) => $1.endsWith(".civet") ? $1 + ".tsx" : $1);
|
|
123
129
|
};
|
|
124
130
|
const configContents = ts.parseJsonConfigFileContent(
|
|
125
131
|
config,
|
|
@@ -133,7 +139,7 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
133
139
|
target: ts.ScriptTarget.ESNext,
|
|
134
140
|
composite: false
|
|
135
141
|
};
|
|
136
|
-
compilerOptions.jsx
|
|
142
|
+
compilerOptions.jsx ??= ts.JsxEmit.Preserve;
|
|
137
143
|
compilerOptionsWithSourceMap = {
|
|
138
144
|
...compilerOptions,
|
|
139
145
|
sourceMap: true
|
|
@@ -157,10 +163,12 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
157
163
|
return true;
|
|
158
164
|
return systemFileExists(filename.slice(0, -4));
|
|
159
165
|
};
|
|
160
|
-
system.readDirectory = (path2) =>
|
|
166
|
+
system.readDirectory = (path2) => {
|
|
167
|
+
return systemReadDirectory(path2).map(($2) => $2.endsWith(".civet") ? $2 + ".tsx" : $2);
|
|
168
|
+
};
|
|
161
169
|
system.readFile = (filename, encoding = "utf-8") => {
|
|
162
170
|
if (path.basename(filename) === "package.json") {
|
|
163
|
-
let
|
|
171
|
+
let recurse = function(node) {
|
|
164
172
|
if (node && typeof node === "object") {
|
|
165
173
|
for (const key in node) {
|
|
166
174
|
const value = node[key];
|
|
@@ -170,18 +178,17 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
170
178
|
modified = true;
|
|
171
179
|
}
|
|
172
180
|
} else if (value) {
|
|
173
|
-
|
|
181
|
+
recurse(value);
|
|
174
182
|
}
|
|
175
183
|
}
|
|
176
184
|
}
|
|
177
185
|
};
|
|
178
|
-
var recurse = recurse2;
|
|
179
186
|
const json = systemReadFile(filename, encoding);
|
|
180
187
|
if (!json)
|
|
181
188
|
return json;
|
|
182
189
|
const parsed = JSON.parse(json);
|
|
183
190
|
let modified = false;
|
|
184
|
-
|
|
191
|
+
recurse(parsed.imports);
|
|
185
192
|
return modified ? JSON.stringify(parsed) : json;
|
|
186
193
|
}
|
|
187
194
|
if (!filename.endsWith(".civet.tsx"))
|
|
@@ -213,28 +220,30 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
213
220
|
options: compilerOptions,
|
|
214
221
|
host: host.compilerHost
|
|
215
222
|
});
|
|
216
|
-
const diagnostics = ts.getPreEmitDiagnostics(program).map(
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
223
|
+
const diagnostics = ts.getPreEmitDiagnostics(program).map(
|
|
224
|
+
(diagnostic) => {
|
|
225
|
+
const file = diagnostic.file;
|
|
226
|
+
if (!file)
|
|
227
|
+
return diagnostic;
|
|
228
|
+
const sourceMap = sourceMaps.get(file.fileName);
|
|
229
|
+
if (!sourceMap)
|
|
230
|
+
return diagnostic;
|
|
231
|
+
const sourcemapLines = sourceMap.data.lines;
|
|
232
|
+
const range = remapRange(
|
|
233
|
+
{
|
|
234
|
+
start: diagnostic.start || 0,
|
|
235
|
+
end: (diagnostic.start || 0) + (diagnostic.length || 1)
|
|
236
|
+
},
|
|
237
|
+
sourcemapLines
|
|
238
|
+
);
|
|
239
|
+
return {
|
|
240
|
+
...diagnostic,
|
|
241
|
+
messageText: flattenDiagnosticMessageText(diagnostic.messageText),
|
|
242
|
+
length: diagnostic.length,
|
|
243
|
+
start: range.start
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
);
|
|
238
247
|
if (configErrors?.length) {
|
|
239
248
|
diagnostics.unshift(...configErrors);
|
|
240
249
|
}
|
|
@@ -249,18 +258,18 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
249
258
|
let failures = [];
|
|
250
259
|
if (typeof options.typecheck === "string") {
|
|
251
260
|
if (options.typecheck.includes("error"))
|
|
252
|
-
failures.push(
|
|
261
|
+
failures.push(DiagnosticCategory.Error);
|
|
253
262
|
if (options.typecheck.includes("warning"))
|
|
254
|
-
failures.push(
|
|
263
|
+
failures.push(DiagnosticCategory.Warning);
|
|
255
264
|
if (options.typecheck.includes("suggestion"))
|
|
256
|
-
failures.push(
|
|
265
|
+
failures.push(DiagnosticCategory.Suggestion);
|
|
257
266
|
if (options.typecheck.includes("message"))
|
|
258
|
-
failures.push(
|
|
267
|
+
failures.push(DiagnosticCategory.Message);
|
|
259
268
|
if (options.typecheck.includes("all")) {
|
|
260
269
|
failures = { includes: () => true };
|
|
261
270
|
}
|
|
262
271
|
} else {
|
|
263
|
-
failures.push(
|
|
272
|
+
failures.push(DiagnosticCategory.Error);
|
|
264
273
|
}
|
|
265
274
|
const count = diagnostics.filter((d) => failures.includes(d.category)).length;
|
|
266
275
|
if (count) {
|
|
@@ -432,42 +441,49 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
432
441
|
code: compiled.code,
|
|
433
442
|
map: jsonSourceMap
|
|
434
443
|
};
|
|
435
|
-
if (options.transformOutput)
|
|
444
|
+
if (options.transformOutput) {
|
|
436
445
|
transformed = await options.transformOutput(transformed.code, id);
|
|
446
|
+
}
|
|
437
447
|
cache?.set(filename, { mtime, result: transformed });
|
|
438
448
|
return transformed;
|
|
439
449
|
},
|
|
440
450
|
esbuild: {
|
|
441
451
|
config(options2) {
|
|
442
|
-
esbuildOptions = options2;
|
|
452
|
+
return esbuildOptions = options2;
|
|
443
453
|
}
|
|
444
454
|
},
|
|
445
455
|
vite: {
|
|
446
456
|
config(config) {
|
|
447
|
-
var _a;
|
|
448
457
|
rootDir = path.resolve(process.cwd(), config.root ?? "");
|
|
449
458
|
if (implicitExtension) {
|
|
450
|
-
config.resolve
|
|
451
|
-
|
|
459
|
+
config.resolve ??= {};
|
|
460
|
+
config.resolve.extensions ??= DEFAULT_EXTENSIONS;
|
|
452
461
|
config.resolve.extensions.push(".civet");
|
|
453
462
|
}
|
|
463
|
+
;
|
|
464
|
+
return;
|
|
454
465
|
},
|
|
455
466
|
async transformIndexHtml(html) {
|
|
456
467
|
return html.replace(
|
|
457
468
|
/<!--[^]*?-->|<[^<>]*>/g,
|
|
458
|
-
(tag) =>
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
469
|
+
(tag) => {
|
|
470
|
+
return tag.replace(
|
|
471
|
+
/<\s*script\b[^<>]*>/gi,
|
|
472
|
+
(script) => {
|
|
473
|
+
return script.replace(
|
|
474
|
+
/([:_\p{ID_Start}][:\p{ID_Continue}]*)(\s*=\s*("[^"]*"|'[^']*'|[^\s"'=<>`]*))?/gu,
|
|
475
|
+
(attr, name, value) => {
|
|
476
|
+
return name.toLowerCase() === "src" && value ? attr.replace(
|
|
477
|
+
/(\.civet)(['"]?)$/,
|
|
478
|
+
(_, extension, endQuote) => {
|
|
479
|
+
return `${extension}${outExt}?transform${endQuote}`;
|
|
480
|
+
}
|
|
481
|
+
) : attr;
|
|
482
|
+
}
|
|
483
|
+
);
|
|
484
|
+
}
|
|
485
|
+
);
|
|
486
|
+
}
|
|
471
487
|
);
|
|
472
488
|
},
|
|
473
489
|
handleHotUpdate({ file, server, modules }) {
|
|
@@ -485,10 +501,9 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
485
501
|
};
|
|
486
502
|
};
|
|
487
503
|
var unplugin = createUnplugin(rawPlugin);
|
|
488
|
-
var
|
|
489
|
-
|
|
504
|
+
var unplugin_civet_default = unplugin;
|
|
490
505
|
export {
|
|
491
|
-
|
|
506
|
+
unplugin_civet_default as default,
|
|
492
507
|
rawPlugin,
|
|
493
|
-
|
|
508
|
+
slash
|
|
494
509
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\vite.civet.jsx
|
|
30
|
+
var vite_civet_exports = {};
|
|
31
|
+
__export(vite_civet_exports, {
|
|
32
|
+
default: () => vite_civet_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(vite_civet_exports);
|
|
35
|
+
var import_unplugin = __toESM(require("./unplugin.js"));
|
|
36
|
+
var vite_civet_default = import_unplugin.default.vite;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\webpack.civet.jsx
|
|
30
|
+
var webpack_civet_exports = {};
|
|
31
|
+
__export(webpack_civet_exports, {
|
|
32
|
+
default: () => webpack_civet_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(webpack_civet_exports);
|
|
35
|
+
var import_unplugin = __toESM(require("./unplugin.js"));
|
|
36
|
+
var webpack_civet_default = import_unplugin.default.webpack;
|
package/package.json
CHANGED
|
@@ -1,44 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielx/civet",
|
|
3
3
|
"type": "commonjs",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.17",
|
|
5
5
|
"description": "CoffeeScript style syntax for TypeScript",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"module": "dist/main.mjs",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"import": "./dist/main.mjs",
|
|
11
|
-
"require": "./dist/main.js"
|
|
11
|
+
"require": "./dist/main.js",
|
|
12
|
+
"types": "./dist/types.d.ts"
|
|
12
13
|
},
|
|
13
14
|
"./babel-plugin": "./dist/babel-plugin.mjs",
|
|
14
15
|
"./bun-civet": "./dist/bun-civet.mjs",
|
|
15
16
|
"./esm": "./dist/esm.mjs",
|
|
16
17
|
"./esbuild-plugin": "./dist/esbuild-plugin.js",
|
|
17
18
|
"./register": "./register.js",
|
|
18
|
-
"./config":
|
|
19
|
+
"./config": {
|
|
20
|
+
"require": "./dist/config.js",
|
|
21
|
+
"import": "./dist/config.mjs",
|
|
22
|
+
"types": "./dist/config.d.ts"
|
|
23
|
+
},
|
|
19
24
|
"./unplugin": {
|
|
20
|
-
"require": "./dist/unplugin.js",
|
|
21
|
-
"import": "./dist/unplugin.mjs"
|
|
25
|
+
"require": "./dist/unplugin/unplugin.js",
|
|
26
|
+
"import": "./dist/unplugin/unplugin.mjs",
|
|
27
|
+
"types": "./dist/unplugin/unplugin.d.ts"
|
|
22
28
|
},
|
|
23
29
|
"./vite": {
|
|
24
|
-
"require": "./dist/vite.js",
|
|
25
|
-
"import": "./dist/vite.mjs"
|
|
30
|
+
"require": "./dist/unplugin/vite.js",
|
|
31
|
+
"import": "./dist/unplugin/vite.mjs",
|
|
32
|
+
"types": "./dist/unplugin/vite.d.ts"
|
|
26
33
|
},
|
|
27
34
|
"./webpack": {
|
|
28
|
-
"require": "./dist/webpack.js",
|
|
29
|
-
"import": "./dist/webpack.mjs"
|
|
35
|
+
"require": "./dist/unplugin/webpack.js",
|
|
36
|
+
"import": "./dist/unplugin/webpack.mjs",
|
|
37
|
+
"types": "./dist/unplugin/webpack.d.ts"
|
|
30
38
|
},
|
|
31
39
|
"./rollup": {
|
|
32
|
-
"require": "./dist/rollup.js",
|
|
33
|
-
"import": "./dist/rollup.mjs"
|
|
40
|
+
"require": "./dist/unplugin/rollup.js",
|
|
41
|
+
"import": "./dist/unplugin/rollup.mjs",
|
|
42
|
+
"types": "./dist/unplugin/rollup.d.ts"
|
|
34
43
|
},
|
|
35
44
|
"./esbuild": {
|
|
36
|
-
"require": "./dist/esbuild.js",
|
|
37
|
-
"import": "./dist/esbuild.mjs"
|
|
45
|
+
"require": "./dist/unplugin/esbuild.js",
|
|
46
|
+
"import": "./dist/unplugin/esbuild.mjs",
|
|
47
|
+
"types": "./dist/unplugin/esbuild.d.ts"
|
|
38
48
|
},
|
|
39
49
|
"./astro": {
|
|
40
|
-
"require": "./dist/astro.js",
|
|
41
|
-
"import": "./dist/astro.mjs"
|
|
50
|
+
"require": "./dist/unplugin/astro.js",
|
|
51
|
+
"import": "./dist/unplugin/astro.mjs",
|
|
52
|
+
"types": "./dist/unplugin/astro.d.ts"
|
|
42
53
|
},
|
|
43
54
|
"./ts-diagnostic": {
|
|
44
55
|
"require": "./dist/ts-diagnostic.js",
|
|
@@ -75,7 +86,7 @@
|
|
|
75
86
|
"unplugin": "^1.6.0"
|
|
76
87
|
},
|
|
77
88
|
"devDependencies": {
|
|
78
|
-
"@danielx/civet": "0.7.
|
|
89
|
+
"@danielx/civet": "0.7.16",
|
|
79
90
|
"@danielx/hera": "^0.8.14",
|
|
80
91
|
"@prettier/sync": "^0.5.2",
|
|
81
92
|
"@types/assert": "^1.5.6",
|
|
@@ -89,7 +100,6 @@
|
|
|
89
100
|
"terser": "^5.16.1",
|
|
90
101
|
"ts-node": "^10.9.1",
|
|
91
102
|
"tslib": "^2.4.0",
|
|
92
|
-
"tsup": "^7.2.0",
|
|
93
103
|
"typescript": "^5.5.2",
|
|
94
104
|
"vite": "^4.4.12",
|
|
95
105
|
"vitepress": "^1.0.0-alpha.35",
|
package/dist/astro.d.mts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PluginOptions } from './unplugin.mjs';
|
|
2
|
-
import 'unplugin';
|
|
3
|
-
import '@danielx/civet';
|
|
4
|
-
|
|
5
|
-
interface AstroIntegration {
|
|
6
|
-
name: string;
|
|
7
|
-
hooks: {
|
|
8
|
-
"astro:config:setup": (data: {
|
|
9
|
-
updateConfig: (config: unknown) => void;
|
|
10
|
-
}) => void;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
declare function export_default(opts?: PluginOptions): AstroIntegration;
|
|
15
|
-
|
|
16
|
-
export { export_default as default };
|
package/dist/astro.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PluginOptions } from './unplugin.js';
|
|
2
|
-
import 'unplugin';
|
|
3
|
-
import '@danielx/civet';
|
|
4
|
-
|
|
5
|
-
interface AstroIntegration {
|
|
6
|
-
name: string;
|
|
7
|
-
hooks: {
|
|
8
|
-
"astro:config:setup": (data: {
|
|
9
|
-
updateConfig: (config: unknown) => void;
|
|
10
|
-
}) => void;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
declare function export_default(opts?: PluginOptions): AstroIntegration;
|
|
15
|
-
|
|
16
|
-
export { export_default as default };
|