@vue.ts/complex-types 1.0.0-beta.10 → 1.0.0-beta.12
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/LICENSE +21 -21
- package/README.md +8 -1
- package/dist/astro.d.mts +7 -0
- package/dist/astro.mjs +13 -0
- package/dist/esbuild.d.mts +7 -0
- package/dist/esbuild.mjs +7 -0
- package/dist/farm.d.mts +7 -0
- package/dist/farm.mjs +7 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.mjs +3 -0
- package/dist/nuxt.d.mts +7 -0
- package/dist/{nuxt.js → nuxt.mjs} +2 -3
- package/dist/rolldown.d.mts +7 -0
- package/dist/rolldown.mjs +7 -0
- package/dist/rollup.d.mts +7 -0
- package/dist/rollup.mjs +7 -0
- package/dist/rspack.d.mts +7 -0
- package/dist/rspack.mjs +7 -0
- package/dist/{src-Ci8DJn1t.js → src-CceuDO-2.mjs} +24 -29
- package/dist/types-BgxPWhu1.d.mts +17 -0
- package/dist/vite.d.mts +7 -0
- package/dist/vite.mjs +7 -0
- package/dist/webpack.d.mts +7 -0
- package/dist/webpack.mjs +7 -0
- package/package.json +27 -56
- package/dist/astro.d.ts +0 -11
- package/dist/astro.js +0 -14
- package/dist/esbuild.d.ts +0 -8
- package/dist/esbuild.js +0 -8
- package/dist/farm.d.ts +0 -8
- package/dist/farm.js +0 -8
- package/dist/index.d.ts +0 -9
- package/dist/index.js +0 -3
- package/dist/nuxt.d.ts +0 -8
- package/dist/rolldown.d.ts +0 -8
- package/dist/rolldown.js +0 -8
- package/dist/rollup.d.ts +0 -8
- package/dist/rollup.js +0 -8
- package/dist/rspack.d.ts +0 -7
- package/dist/rspack.js +0 -8
- package/dist/types-B0cfnWIB.d.ts +0 -37
- package/dist/types-u_Hr5uXA.d.ts +0 -1
- package/dist/types.d.ts +0 -3
- package/dist/types.js +0 -1
- package/dist/vite-D-Xfh8NL.js +0 -8
- package/dist/vite.d.ts +0 -8
- package/dist/vite.js +0 -4
- package/dist/webpack-By_BEclB.js +0 -8
- package/dist/webpack.d.ts +0 -8
- package/dist/webpack.js +0 -4
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 Ray <https://github.com/so1ve>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Ray <https://github.com/so1ve>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -214,12 +214,19 @@ export default defineConfig({
|
|
|
214
214
|
|
|
215
215
|
## 📚 Options
|
|
216
216
|
|
|
217
|
+
### `root`
|
|
218
|
+
|
|
219
|
+
Path to your project root.
|
|
220
|
+
|
|
221
|
+
- Type: `string`
|
|
222
|
+
- Default: `process.cwd()`
|
|
223
|
+
|
|
217
224
|
### `tsconfigPath`
|
|
218
225
|
|
|
219
226
|
Path to your `tsconfig.json`.
|
|
220
227
|
|
|
221
228
|
- Type: `string`
|
|
222
|
-
- Default: `
|
|
229
|
+
- Default: `"tsconfig.json"`
|
|
223
230
|
|
|
224
231
|
### `defineEmits`
|
|
225
232
|
|
package/dist/astro.d.mts
ADDED
package/dist/astro.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import vite_default from "./vite.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/astro.ts
|
|
4
|
+
var astro_default = (options) => ({
|
|
5
|
+
name: "@vue.ts/complex-types",
|
|
6
|
+
hooks: { "astro:config:setup": async (astro) => {
|
|
7
|
+
astro.config.vite.plugins ??= [];
|
|
8
|
+
astro.config.vite.plugins.push(vite_default(options));
|
|
9
|
+
} }
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { astro_default as default };
|
package/dist/esbuild.mjs
ADDED
package/dist/farm.d.mts
ADDED
package/dist/farm.mjs
ADDED
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as Options } from "./types-BgxPWhu1.mjs";
|
|
2
|
+
import { UnpluginFactory, UnpluginInstance } from "unplugin";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
declare const unpluginFactory: UnpluginFactory<Options | undefined>;
|
|
6
|
+
declare const unplugin: UnpluginInstance<Options | undefined>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { unplugin as default, unplugin, unpluginFactory };
|
package/dist/index.mjs
ADDED
package/dist/nuxt.d.mts
ADDED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import { t as webpack_default } from "./webpack-By_BEclB.js";
|
|
1
|
+
import vite_default from "./vite.mjs";
|
|
2
|
+
import webpack_default from "./webpack.mjs";
|
|
4
3
|
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
|
5
4
|
|
|
6
5
|
//#region src/nuxt.ts
|
package/dist/rollup.mjs
ADDED
package/dist/rspack.mjs
ADDED
|
@@ -1,45 +1,42 @@
|
|
|
1
|
-
import { createUnplugin } from "unplugin";
|
|
2
1
|
import { ensureLanguage, getLanguage } from "@vue.ts/language";
|
|
2
|
+
import { createUnplugin } from "unplugin";
|
|
3
3
|
import { createFilter } from "unplugin-utils";
|
|
4
4
|
import MagicString from "magic-string";
|
|
5
5
|
import ts from "typescript";
|
|
6
|
-
import {
|
|
7
|
-
import { defu } from "defu";
|
|
8
|
-
import { normalizePath } from "@vue.ts/shared";
|
|
6
|
+
import { createOptionsResolver, normalizePath } from "@vue.ts/shared";
|
|
9
7
|
import { isReservedProp } from "@vue/shared";
|
|
10
8
|
|
|
11
9
|
//#region src/core/utils.ts
|
|
12
10
|
const defaultOptions = {
|
|
11
|
+
root: process.cwd(),
|
|
13
12
|
include: ["**/*.vue"],
|
|
14
13
|
exclude: ["node_modules/**"],
|
|
15
|
-
tsconfigPath:
|
|
14
|
+
tsconfigPath: "tsconfig.json",
|
|
16
15
|
defineEmits: true,
|
|
17
16
|
defineProps: true
|
|
18
17
|
};
|
|
19
|
-
const resolveOptions = (
|
|
18
|
+
const resolveOptions = createOptionsResolver(defaultOptions);
|
|
20
19
|
const quotesReg = /"/g;
|
|
21
20
|
const escapeQuotes = (s) => s.replace(quotesReg, "\\\"");
|
|
22
21
|
|
|
23
22
|
//#endregion
|
|
24
23
|
//#region src/core/printer.ts
|
|
25
24
|
var Printer = class {
|
|
25
|
+
isPropertyBlacklisted = () => false;
|
|
26
26
|
constructor(checker) {
|
|
27
27
|
this.checker = checker;
|
|
28
28
|
}
|
|
29
29
|
typeToString(type) {
|
|
30
30
|
return this.checker.typeToString(type, void 0, ts.TypeFormatFlags.NoTruncation);
|
|
31
31
|
}
|
|
32
|
-
printUnionOrIntersection(type, separator,
|
|
33
|
-
return [...new Set(type.types.map((t) => this.printType(t,
|
|
34
|
-
}
|
|
35
|
-
isSymbolOptional(symbol) {
|
|
36
|
-
return !!(symbol.flags & ts.SymbolFlags.Optional);
|
|
32
|
+
printUnionOrIntersection(type, separator, inner) {
|
|
33
|
+
return [...new Set(type.types.map((t) => this.printType(t, inner)).filter(Boolean))].join(separator);
|
|
37
34
|
}
|
|
38
|
-
printConditionType(type,
|
|
35
|
+
printConditionType(type, inner) {
|
|
39
36
|
const { trueType, falseType } = type.root.node;
|
|
40
37
|
const trueTypeNode = this.checker.getTypeAtLocation(trueType);
|
|
41
38
|
const falseTypeNode = this.checker.getTypeAtLocation(falseType);
|
|
42
|
-
return `${this.printType(trueTypeNode,
|
|
39
|
+
return `${this.printType(trueTypeNode, inner)} | ${this.printType(falseTypeNode, inner)}`;
|
|
43
40
|
}
|
|
44
41
|
printPrimitiveType(type) {
|
|
45
42
|
if (type.flags & ts.TypeFlags.BooleanLiteral) return "boolean";
|
|
@@ -51,9 +48,9 @@ var Printer = class {
|
|
|
51
48
|
else if (type.flags & ts.TypeFlags.Null) return "null";
|
|
52
49
|
return "";
|
|
53
50
|
}
|
|
54
|
-
printType(type,
|
|
55
|
-
if (type.isUnion()) return this.printUnionOrIntersection(type, " | ",
|
|
56
|
-
else if (type.isIntersection()) return this.printUnionOrIntersection(type, " & ",
|
|
51
|
+
printType(type, inner = false) {
|
|
52
|
+
if (type.isUnion()) return this.printUnionOrIntersection(type, " | ", inner);
|
|
53
|
+
else if (type.isIntersection()) return this.printUnionOrIntersection(type, " & ", inner);
|
|
57
54
|
if (this.checker.isArrayType(type)) return "Array";
|
|
58
55
|
else if (type.flags & ts.TypeFlags.Object) {
|
|
59
56
|
const decl = type.getSymbol()?.declarations?.[0];
|
|
@@ -64,10 +61,10 @@ var Printer = class {
|
|
|
64
61
|
for (const prop of properties) {
|
|
65
62
|
const propType = this.checker.getTypeOfSymbol(prop);
|
|
66
63
|
const name = prop.getName();
|
|
67
|
-
if (isPropertyBlacklisted(name)) continue;
|
|
64
|
+
if (this.isPropertyBlacklisted(name)) continue;
|
|
68
65
|
props[name] = {
|
|
69
|
-
value: this.printType(propType,
|
|
70
|
-
isOptional:
|
|
66
|
+
value: this.printType(propType, true),
|
|
67
|
+
isOptional: !!(prop.flags & ts.SymbolFlags.Optional)
|
|
71
68
|
};
|
|
72
69
|
}
|
|
73
70
|
const parts = [];
|
|
@@ -78,20 +75,21 @@ var Printer = class {
|
|
|
78
75
|
return Object.keys(props).length > 0 ? `{\n${parts.join("\n")}\n}` : "";
|
|
79
76
|
} else if (type.isLiteral() || type.flags & ts.TypeFlags.BooleanLiteral || type.flags & ts.TypeFlags.String || type.flags & ts.TypeFlags.Number || type.flags & ts.TypeFlags.BigInt || type.flags & ts.TypeFlags.Any || type.flags & ts.TypeFlags.Unknown || type.flags & ts.TypeFlags.Null) return this.printPrimitiveType(type);
|
|
80
77
|
else if (type.flags & ts.TypeFlags.Undefined) return "";
|
|
81
|
-
else if (type.flags & ts.TypeFlags.Conditional) return this.printConditionType(type,
|
|
78
|
+
else if (type.flags & ts.TypeFlags.Conditional) return this.printConditionType(type, inner);
|
|
82
79
|
else if (type.isTypeParameter()) {
|
|
83
80
|
const decl = type.getSymbol()?.declarations?.[0];
|
|
84
81
|
if (!decl || !ts.isTypeParameterDeclaration(decl)) return "";
|
|
85
82
|
const ref = ts.getEffectiveConstraintOfTypeParameter(decl);
|
|
86
83
|
if (!ref) return "";
|
|
87
84
|
const refType = this.checker.getTypeAtLocation(ref);
|
|
88
|
-
return this.printType(refType,
|
|
85
|
+
return this.printType(refType, inner);
|
|
89
86
|
}
|
|
90
87
|
return this.typeToString(type);
|
|
91
88
|
}
|
|
92
89
|
printPropsTypeArg(node, isPropertyBlacklisted) {
|
|
90
|
+
this.isPropertyBlacklisted = isPropertyBlacklisted;
|
|
93
91
|
const type = this.checker.getTypeAtLocation(node);
|
|
94
|
-
return this.printType(type
|
|
92
|
+
return this.printType(type);
|
|
95
93
|
}
|
|
96
94
|
printEventsByCallSignatures(callSignatures) {
|
|
97
95
|
return callSignatures.map((c) => {
|
|
@@ -198,15 +196,12 @@ const unpluginFactory = (options = {}) => {
|
|
|
198
196
|
await readAndUpdateLanguage();
|
|
199
197
|
return;
|
|
200
198
|
}
|
|
201
|
-
let cached;
|
|
202
199
|
ctx.read = async () => {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
return transform(code, file, resolvedOptions)?.code ?? code;
|
|
206
|
-
})();
|
|
207
|
-
return cached;
|
|
200
|
+
const code = await readAndUpdateLanguage();
|
|
201
|
+
return transform(code, file, resolvedOptions)?.code ?? code;
|
|
208
202
|
};
|
|
209
|
-
|
|
203
|
+
const sfcModule = ctx.modules.find((mod) => mod.file === file);
|
|
204
|
+
if (sfcModule) return [sfcModule];
|
|
210
205
|
return ctx.modules;
|
|
211
206
|
} },
|
|
212
207
|
buildStart() {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FilterPattern } from "unplugin";
|
|
2
|
+
import MagicString from "magic-string";
|
|
3
|
+
import ts from "typescript";
|
|
4
|
+
|
|
5
|
+
//#region ../shared/src/types.d.ts
|
|
6
|
+
interface BaseOptions {
|
|
7
|
+
root?: string;
|
|
8
|
+
tsconfigPath?: string;
|
|
9
|
+
include?: FilterPattern;
|
|
10
|
+
exclude?: FilterPattern;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/core/types.d.ts
|
|
14
|
+
type ValidTransforms = "defineEmits" | "defineProps";
|
|
15
|
+
type Options = Partial<Record<ValidTransforms, boolean>> & BaseOptions;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Options as t };
|
package/dist/vite.d.mts
ADDED
package/dist/vite.mjs
ADDED
package/dist/webpack.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue.ts/complex-types",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.12",
|
|
4
4
|
"author": "Ray <i@mk1.io> (@so1ve)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Resolve complex types in Vue SFCs.",
|
|
@@ -31,21 +31,20 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"sideEffects": false,
|
|
33
33
|
"exports": {
|
|
34
|
-
".": "./dist/index.
|
|
34
|
+
".": "./dist/index.mjs",
|
|
35
35
|
"./*": "./*",
|
|
36
|
-
"./astro": "./dist/astro.
|
|
37
|
-
"./esbuild": "./dist/esbuild.
|
|
38
|
-
"./farm": "./dist/farm.
|
|
39
|
-
"./nuxt": "./dist/nuxt.
|
|
40
|
-
"./rolldown": "./dist/rolldown.
|
|
41
|
-
"./rollup": "./dist/rollup.
|
|
42
|
-
"./rspack": "./dist/rspack.
|
|
43
|
-
"./
|
|
44
|
-
"./
|
|
45
|
-
"./webpack": "./dist/webpack.js"
|
|
36
|
+
"./astro": "./dist/astro.mjs",
|
|
37
|
+
"./esbuild": "./dist/esbuild.mjs",
|
|
38
|
+
"./farm": "./dist/farm.mjs",
|
|
39
|
+
"./nuxt": "./dist/nuxt.mjs",
|
|
40
|
+
"./rolldown": "./dist/rolldown.mjs",
|
|
41
|
+
"./rollup": "./dist/rollup.mjs",
|
|
42
|
+
"./rspack": "./dist/rspack.mjs",
|
|
43
|
+
"./vite": "./dist/vite.mjs",
|
|
44
|
+
"./webpack": "./dist/webpack.mjs"
|
|
46
45
|
},
|
|
47
|
-
"main": "./dist/index.
|
|
48
|
-
"module": "./dist/index.
|
|
46
|
+
"main": "./dist/index.mjs",
|
|
47
|
+
"module": "./dist/index.mjs",
|
|
49
48
|
"types": "dist/index.d.ts",
|
|
50
49
|
"typesVersions": {
|
|
51
50
|
"*": {
|
|
@@ -62,63 +61,35 @@
|
|
|
62
61
|
"access": "public"
|
|
63
62
|
},
|
|
64
63
|
"dependencies": {
|
|
65
|
-
"@nuxt/kit": "^4.2.
|
|
66
|
-
"@vue/
|
|
67
|
-
"
|
|
64
|
+
"@nuxt/kit": "^4.2.2",
|
|
65
|
+
"@vue.ts/language": "",
|
|
66
|
+
"@vue.ts/shared": "",
|
|
67
|
+
"@vue/shared": "^3.5.26",
|
|
68
68
|
"magic-string": "^0.30.21",
|
|
69
|
-
"unplugin": "2.3.
|
|
70
|
-
"unplugin-utils": "^0.3.1"
|
|
71
|
-
"@vue.ts/language": "1.0.0-beta.10",
|
|
72
|
-
"@vue.ts/shared": "1.0.0-beta.10"
|
|
69
|
+
"unplugin": "2.3.11",
|
|
70
|
+
"unplugin-utils": "^0.3.1"
|
|
73
71
|
},
|
|
74
72
|
"devDependencies": {
|
|
75
|
-
"@nuxt/schema": "^4.2.
|
|
73
|
+
"@nuxt/schema": "^4.2.2",
|
|
76
74
|
"@vue-macros/better-define": "^3.1.1",
|
|
77
|
-
"
|
|
78
|
-
"rollup": "^4.
|
|
79
|
-
"vite": "7.1.12",
|
|
80
|
-
"webpack": "^5.102.1"
|
|
75
|
+
"astro": "^5.16.6",
|
|
76
|
+
"rollup": "^4.54.0"
|
|
81
77
|
},
|
|
82
78
|
"peerDependencies": {
|
|
83
|
-
"@
|
|
84
|
-
"
|
|
85
|
-
"@nuxt/schema": "^4.2.0",
|
|
86
|
-
"esbuild": "*",
|
|
87
|
-
"rolldown": "*",
|
|
88
|
-
"rollup": "^4.52.5",
|
|
79
|
+
"@nuxt/kit": "^4.2.2",
|
|
80
|
+
"astro": "^5.16.6",
|
|
89
81
|
"typescript": ">=5.9.3",
|
|
90
|
-
"
|
|
91
|
-
"vue": ">=3.5.22",
|
|
92
|
-
"webpack": "^5.102.1"
|
|
82
|
+
"vue": ">=3.5.26"
|
|
93
83
|
},
|
|
94
84
|
"peerDependenciesMeta": {
|
|
95
|
-
"@farmfe/core": {
|
|
96
|
-
"optional": true
|
|
97
|
-
},
|
|
98
85
|
"@nuxt/kit": {
|
|
99
86
|
"optional": true
|
|
100
87
|
},
|
|
101
|
-
"
|
|
102
|
-
"optional": true
|
|
103
|
-
},
|
|
104
|
-
"esbuild": {
|
|
105
|
-
"optional": true
|
|
106
|
-
},
|
|
107
|
-
"rolldown": {
|
|
108
|
-
"optional": true
|
|
109
|
-
},
|
|
110
|
-
"rollup": {
|
|
111
|
-
"optional": true
|
|
112
|
-
},
|
|
113
|
-
"vite": {
|
|
114
|
-
"optional": true
|
|
115
|
-
},
|
|
116
|
-
"webpack": {
|
|
88
|
+
"astro": {
|
|
117
89
|
"optional": true
|
|
118
90
|
}
|
|
119
91
|
},
|
|
120
92
|
"scripts": {
|
|
121
|
-
"
|
|
122
|
-
"watch": "tsdown --watch"
|
|
93
|
+
"play": "npm -C playground run dev"
|
|
123
94
|
}
|
|
124
95
|
}
|
package/dist/astro.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { t as Options } from "./types-B0cfnWIB.js";
|
|
2
|
-
|
|
3
|
-
//#region src/astro.d.ts
|
|
4
|
-
declare const _default: (options: Options) => {
|
|
5
|
-
name: string;
|
|
6
|
-
hooks: {
|
|
7
|
-
"astro:config:setup": (astro: any) => Promise<void>;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { _default as default };
|
package/dist/astro.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { r as unpluginFactory } from "./src-Ci8DJn1t.js";
|
|
2
|
-
import { createVitePlugin } from "unplugin";
|
|
3
|
-
|
|
4
|
-
//#region src/astro.ts
|
|
5
|
-
var astro_default = (options) => ({
|
|
6
|
-
name: "@vue.ts/complex-types",
|
|
7
|
-
hooks: { "astro:config:setup": async (astro) => {
|
|
8
|
-
astro.config.vite.plugins ??= [];
|
|
9
|
-
astro.config.vite.plugins.push(createVitePlugin(unpluginFactory)(options));
|
|
10
|
-
} }
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
//#endregion
|
|
14
|
-
export { astro_default as default };
|
package/dist/esbuild.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as Options } from "./types-B0cfnWIB.js";
|
|
2
|
-
import "./types-u_Hr5uXA.js";
|
|
3
|
-
import * as esbuild0 from "esbuild";
|
|
4
|
-
|
|
5
|
-
//#region src/esbuild.d.ts
|
|
6
|
-
declare const _default: (options?: Options | undefined) => esbuild0.Plugin;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { _default as default };
|
package/dist/esbuild.js
DELETED
package/dist/farm.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as Options } from "./types-B0cfnWIB.js";
|
|
2
|
-
import "./types-u_Hr5uXA.js";
|
|
3
|
-
import * as _farmfe_core0 from "@farmfe/core";
|
|
4
|
-
|
|
5
|
-
//#region src/farm.d.ts
|
|
6
|
-
declare const _default: (options?: Options | undefined) => _farmfe_core0.JsPlugin;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { _default as default };
|
package/dist/farm.js
DELETED
package/dist/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { t as Options } from "./types-B0cfnWIB.js";
|
|
2
|
-
import * as unplugin0 from "unplugin";
|
|
3
|
-
import { UnpluginFactory } from "unplugin";
|
|
4
|
-
|
|
5
|
-
//#region src/index.d.ts
|
|
6
|
-
declare const unpluginFactory: UnpluginFactory<Options | undefined>;
|
|
7
|
-
declare const unplugin: unplugin0.UnpluginInstance<Options | undefined, boolean>;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { unplugin as default, unplugin, unpluginFactory };
|
package/dist/index.js
DELETED
package/dist/nuxt.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as Options } from "./types-B0cfnWIB.js";
|
|
2
|
-
import "./types-u_Hr5uXA.js";
|
|
3
|
-
import * as _nuxt_schema0 from "@nuxt/schema";
|
|
4
|
-
|
|
5
|
-
//#region src/nuxt.d.ts
|
|
6
|
-
declare const _default: _nuxt_schema0.NuxtModule<Options, Options, false>;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { _default as default };
|
package/dist/rolldown.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as Options } from "./types-B0cfnWIB.js";
|
|
2
|
-
import "./types-u_Hr5uXA.js";
|
|
3
|
-
import * as rolldown0 from "rolldown";
|
|
4
|
-
|
|
5
|
-
//#region src/rolldown.d.ts
|
|
6
|
-
declare const _default: (options?: Options | undefined) => rolldown0.Plugin<any> | rolldown0.Plugin<any>[];
|
|
7
|
-
//#endregion
|
|
8
|
-
export { _default as default };
|
package/dist/rolldown.js
DELETED
package/dist/rollup.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as Options } from "./types-B0cfnWIB.js";
|
|
2
|
-
import "./types-u_Hr5uXA.js";
|
|
3
|
-
import * as rollup0 from "rollup";
|
|
4
|
-
|
|
5
|
-
//#region src/rollup.d.ts
|
|
6
|
-
declare const _default: (options?: Options | undefined) => rollup0.Plugin<any> | rollup0.Plugin<any>[];
|
|
7
|
-
//#endregion
|
|
8
|
-
export { _default as default };
|
package/dist/rollup.js
DELETED
package/dist/rspack.d.ts
DELETED
package/dist/rspack.js
DELETED
package/dist/types-B0cfnWIB.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { FilterPattern } from "unplugin";
|
|
2
|
-
import MagicString from "magic-string";
|
|
3
|
-
import ts from "typescript";
|
|
4
|
-
|
|
5
|
-
//#region ../shared/src/types.d.ts
|
|
6
|
-
interface BaseOptions {
|
|
7
|
-
include?: FilterPattern;
|
|
8
|
-
exclude?: FilterPattern;
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region src/core/printer.d.ts
|
|
12
|
-
declare class Printer {
|
|
13
|
-
private checker;
|
|
14
|
-
constructor(checker: ts.TypeChecker);
|
|
15
|
-
private typeToString;
|
|
16
|
-
private printUnionOrIntersection;
|
|
17
|
-
private isSymbolOptional;
|
|
18
|
-
private printConditionType;
|
|
19
|
-
private printPrimitiveType;
|
|
20
|
-
private printType;
|
|
21
|
-
printPropsTypeArg(node: ts.Node, isPropertyBlacklisted: (prop: string) => boolean): string;
|
|
22
|
-
private printEventsByCallSignatures;
|
|
23
|
-
private printEventsByMembers;
|
|
24
|
-
printEventsRuntimeArg(node: ts.Node): string;
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region src/core/types.d.ts
|
|
28
|
-
type ValidTransforms = "defineEmits" | "defineProps";
|
|
29
|
-
type Options = {
|
|
30
|
-
tsconfigPath?: string;
|
|
31
|
-
} & Partial<Record<ValidTransforms, boolean>> & BaseOptions;
|
|
32
|
-
type ResolvedOptions = Required<Options>;
|
|
33
|
-
type TransformOptions = Pick<ResolvedOptions, ValidTransforms>;
|
|
34
|
-
type Transformer = (printer: Printer, s: MagicString, id: string) => void;
|
|
35
|
-
type Transformers = [ValidTransforms, Transformer][];
|
|
36
|
-
//#endregion
|
|
37
|
-
export { Transformers as a, Transformer as i, ResolvedOptions as n, ValidTransforms as o, TransformOptions as r, Options as t };
|
package/dist/types-u_Hr5uXA.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/types.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { a as Transformers, i as Transformer, n as ResolvedOptions, o as ValidTransforms, r as TransformOptions, t as Options } from "./types-B0cfnWIB.js";
|
|
2
|
-
import "./types-u_Hr5uXA.js";
|
|
3
|
-
export { Options, ResolvedOptions, TransformOptions, Transformer, Transformers, ValidTransforms };
|
package/dist/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/vite-D-Xfh8NL.js
DELETED
package/dist/vite.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as Options } from "./types-B0cfnWIB.js";
|
|
2
|
-
import "./types-u_Hr5uXA.js";
|
|
3
|
-
import * as vite0 from "vite";
|
|
4
|
-
|
|
5
|
-
//#region src/vite.d.ts
|
|
6
|
-
declare const _default: (options?: Options | undefined) => vite0.Plugin<any> | vite0.Plugin<any>[];
|
|
7
|
-
//#endregion
|
|
8
|
-
export { _default as default };
|
package/dist/vite.js
DELETED
package/dist/webpack-By_BEclB.js
DELETED
package/dist/webpack.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as Options } from "./types-B0cfnWIB.js";
|
|
2
|
-
import "./types-u_Hr5uXA.js";
|
|
3
|
-
import * as webpack0 from "webpack";
|
|
4
|
-
|
|
5
|
-
//#region src/webpack.d.ts
|
|
6
|
-
declare const _default: (options?: Options | undefined) => webpack0.WebpackPluginInstance;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { _default as default };
|
package/dist/webpack.js
DELETED