@vue.ts/tsx-auto-props 0.6.0 → 1.0.0-beta.2
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 +19 -0
- package/dist/astro.d.ts +8 -8
- package/dist/astro.js +14 -0
- package/dist/esbuild.d.ts +6 -6
- package/dist/esbuild.js +8 -0
- package/dist/farm.d.ts +7 -0
- package/dist/farm.js +8 -0
- package/dist/index.d.ts +8 -6
- package/dist/index.js +3 -0
- package/dist/nuxt.d.ts +6 -6
- package/dist/nuxt.js +20 -0
- package/dist/rolldown.d.ts +7 -0
- package/dist/rolldown.js +8 -0
- package/dist/rollup.d.ts +6 -6
- package/dist/rollup.js +8 -0
- package/dist/rspack.d.ts +4 -4
- package/dist/rspack.js +8 -0
- package/dist/src-CWmlC_RH.js +96 -0
- package/dist/types-BsMRL-YJ.d.ts +15 -0
- package/dist/types.d.ts +2 -8
- package/dist/types.js +0 -0
- package/dist/vite-CO8uPslf.js +8 -0
- package/dist/vite.d.ts +6 -6
- package/dist/vite.js +4 -0
- package/dist/webpack-Bs4ZyN2r.js +8 -0
- package/dist/webpack.d.ts +6 -6
- package/dist/webpack.js +4 -0
- package/package.json +65 -54
- package/dist/astro.cjs +0 -22
- package/dist/astro.d.cts +0 -11
- package/dist/astro.d.mts +0 -11
- package/dist/astro.mjs +0 -20
- package/dist/esbuild.cjs +0 -13
- package/dist/esbuild.d.cts +0 -7
- package/dist/esbuild.d.mts +0 -7
- package/dist/esbuild.mjs +0 -11
- package/dist/index.cjs +0 -119
- package/dist/index.d.cts +0 -7
- package/dist/index.d.mts +0 -7
- package/dist/index.mjs +0 -112
- package/dist/nuxt.cjs +0 -35
- package/dist/nuxt.d.cts +0 -7
- package/dist/nuxt.d.mts +0 -7
- package/dist/nuxt.mjs +0 -33
- package/dist/rollup.cjs +0 -13
- package/dist/rollup.d.cts +0 -7
- package/dist/rollup.d.mts +0 -7
- package/dist/rollup.mjs +0 -11
- package/dist/rspack.cjs +0 -13
- package/dist/rspack.d.cts +0 -6
- package/dist/rspack.d.mts +0 -6
- package/dist/rspack.mjs +0 -11
- package/dist/types.cjs +0 -2
- package/dist/types.d.cts +0 -8
- package/dist/types.d.mts +0 -8
- package/dist/types.mjs +0 -1
- package/dist/vite.cjs +0 -13
- package/dist/vite.d.cts +0 -7
- package/dist/vite.d.mts +0 -7
- package/dist/vite.mjs +0 -11
- package/dist/webpack.cjs +0 -13
- package/dist/webpack.d.cts +0 -7
- package/dist/webpack.d.mts +0 -7
- package/dist/webpack.mjs +0 -11
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
|
@@ -62,6 +62,25 @@ export default defineConfig({
|
|
|
62
62
|
|
|
63
63
|
<br></details>
|
|
64
64
|
|
|
65
|
+
<details>
|
|
66
|
+
<summary>Rolldown</summary><br>
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
// rolldown.config.js
|
|
70
|
+
import VueTsxAutoProps from "@vue.ts/tsx-auto-props/rolldown";
|
|
71
|
+
|
|
72
|
+
export default {
|
|
73
|
+
plugins: [
|
|
74
|
+
VueTsxAutoProps({
|
|
75
|
+
/* options */
|
|
76
|
+
}),
|
|
77
|
+
// other plugins
|
|
78
|
+
],
|
|
79
|
+
};
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
<br></details>
|
|
83
|
+
|
|
65
84
|
<details>
|
|
66
85
|
<summary>Rollup</summary><br>
|
|
67
86
|
|
package/dist/astro.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Options } from
|
|
2
|
-
import '@vue.ts/common';
|
|
1
|
+
import { Options } from "./types-BsMRL-YJ.js";
|
|
3
2
|
|
|
3
|
+
//#region src/astro.d.ts
|
|
4
4
|
declare const _default: (options: Options) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
name: string;
|
|
6
|
+
hooks: {
|
|
7
|
+
"astro:config:setup": (astro: any) => Promise<void>;
|
|
8
|
+
};
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
export { _default as default };
|
|
10
|
+
//#endregion
|
|
11
|
+
export { _default as default };
|
package/dist/astro.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./src-CWmlC_RH.js";
|
|
2
|
+
import { vite_default } from "./vite-CO8uPslf.js";
|
|
3
|
+
|
|
4
|
+
//#region src/astro.ts
|
|
5
|
+
var astro_default = (options) => ({
|
|
6
|
+
name: "@vue.ts/tsx-auto-props",
|
|
7
|
+
hooks: { "astro:config:setup": async (astro) => {
|
|
8
|
+
astro.config.vite.plugins ??= [];
|
|
9
|
+
astro.config.vite.plugins.push(vite_default(options));
|
|
10
|
+
} }
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { astro_default as default };
|
package/dist/esbuild.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import '@vue.ts/common';
|
|
1
|
+
import { Options } from "./types-BsMRL-YJ.js";
|
|
2
|
+
import * as esbuild0 from "esbuild";
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
//#region src/esbuild.d.ts
|
|
5
|
+
declare const _default: (options?: Options | undefined) => esbuild0.Plugin;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { _default as default };
|
package/dist/esbuild.js
ADDED
package/dist/farm.d.ts
ADDED
package/dist/farm.js
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Options } from "./types-BsMRL-YJ.js";
|
|
2
|
+
import * as unplugin0 from "unplugin";
|
|
3
|
+
import { UnpluginFactory } from "unplugin";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
ADDED
package/dist/nuxt.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import '@vue.ts/common';
|
|
1
|
+
import { Options } from "./types-BsMRL-YJ.js";
|
|
2
|
+
import * as _nuxt_schema0 from "@nuxt/schema";
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
//#region src/nuxt.d.ts
|
|
5
|
+
declare const _default: _nuxt_schema0.NuxtModule<Options, Options, false>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { _default as default };
|
package/dist/nuxt.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "./src-CWmlC_RH.js";
|
|
2
|
+
import { vite_default } from "./vite-CO8uPslf.js";
|
|
3
|
+
import { webpack_default } from "./webpack-Bs4ZyN2r.js";
|
|
4
|
+
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
|
5
|
+
|
|
6
|
+
//#region src/nuxt.ts
|
|
7
|
+
var nuxt_default = defineNuxtModule({
|
|
8
|
+
meta: {
|
|
9
|
+
name: "@vue.ts/tsx-auto-props",
|
|
10
|
+
configKey: "tsxAutoProps"
|
|
11
|
+
},
|
|
12
|
+
defaults: {},
|
|
13
|
+
setup(options, _nuxt) {
|
|
14
|
+
addVitePlugin(() => vite_default(options));
|
|
15
|
+
addWebpackPlugin(() => webpack_default(options));
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { nuxt_default as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Options } from "./types-BsMRL-YJ.js";
|
|
2
|
+
import * as rolldown0 from "rolldown";
|
|
3
|
+
|
|
4
|
+
//#region src/rolldown.d.ts
|
|
5
|
+
declare const _default: (options?: Options | undefined) => rolldown0.Plugin<any> | rolldown0.Plugin<any>[];
|
|
6
|
+
//#endregion
|
|
7
|
+
export { _default as default };
|
package/dist/rolldown.js
ADDED
package/dist/rollup.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import '@vue.ts/common';
|
|
1
|
+
import { Options } from "./types-BsMRL-YJ.js";
|
|
2
|
+
import * as rollup0 from "rollup";
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
//#region src/rollup.d.ts
|
|
5
|
+
declare const _default: (options?: Options | undefined) => rollup0.Plugin<any> | rollup0.Plugin<any>[];
|
|
6
|
+
//#endregion
|
|
7
|
+
export { _default as default };
|
package/dist/rollup.js
ADDED
package/dist/rspack.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Options } from
|
|
2
|
-
import '@vue.ts/common';
|
|
1
|
+
import { Options } from "./types-BsMRL-YJ.js";
|
|
3
2
|
|
|
3
|
+
//#region src/rspack.d.ts
|
|
4
4
|
declare const _default: (options?: Options | undefined) => RspackPluginInstance;
|
|
5
|
-
|
|
6
|
-
export { _default as default };
|
|
5
|
+
//#endregion
|
|
6
|
+
export { _default as default };
|
package/dist/rspack.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { createUnplugin } from "unplugin";
|
|
2
|
+
import { createFilter, normalizePath } from "@vue.ts/common";
|
|
3
|
+
import { ensureLanguage, getLanguage } from "@vue.ts/language";
|
|
4
|
+
import MagicString from "magic-string";
|
|
5
|
+
import ts from "typescript";
|
|
6
|
+
import { join } from "node:path";
|
|
7
|
+
|
|
8
|
+
//#region src/core/utils.ts
|
|
9
|
+
const resolveOptions = (rawOptions) => ({
|
|
10
|
+
include: rawOptions.include ?? ["**/*.vue", "**/*.tsx"],
|
|
11
|
+
exclude: rawOptions.exclude ?? ["node_modules/**"],
|
|
12
|
+
tsconfigPath: rawOptions.tsconfigPath ?? join(process.cwd(), "tsconfig.json")
|
|
13
|
+
});
|
|
14
|
+
function getNodeAssignNode(node) {
|
|
15
|
+
let parent = null;
|
|
16
|
+
let variableList = null;
|
|
17
|
+
let variable = null;
|
|
18
|
+
while (node) {
|
|
19
|
+
if (parent) {
|
|
20
|
+
if (ts.isVariableDeclarationList(parent)) variableList = parent;
|
|
21
|
+
if (ts.isVariableDeclaration(parent)) variable = parent;
|
|
22
|
+
}
|
|
23
|
+
parent = node;
|
|
24
|
+
node = node.parent;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
variableList,
|
|
28
|
+
variable
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/core/transform.ts
|
|
34
|
+
const generateDefineProps = (name, props) => `\n;Object.defineProperty(${name}, "props", {
|
|
35
|
+
value: ${JSON.stringify(props)},
|
|
36
|
+
});`;
|
|
37
|
+
const DEFINE_COMPONENT = "defineComponent";
|
|
38
|
+
function transform(code, id) {
|
|
39
|
+
const s = new MagicString(code);
|
|
40
|
+
const normalizedFilepath = normalizePath(id);
|
|
41
|
+
const language = getLanguage();
|
|
42
|
+
const typeChecker = language.__internal__.typeChecker;
|
|
43
|
+
const ast = language.getVirtualFileOrTsAst(normalizedFilepath);
|
|
44
|
+
if (!ast) return;
|
|
45
|
+
language.traverseAst(ast, (node) => {
|
|
46
|
+
if (!ts.isCallExpression(node)) return;
|
|
47
|
+
const identifier = node.expression;
|
|
48
|
+
const symbol = typeChecker.getSymbolAtLocation(identifier);
|
|
49
|
+
if (symbol?.declarations?.some((d) => ts.isImportSpecifier(d) && (d.propertyName ?? d.name)?.text === DEFINE_COMPONENT)) {
|
|
50
|
+
const arg = node.arguments[0];
|
|
51
|
+
let setupFn;
|
|
52
|
+
if (ts.isObjectLiteralExpression(arg)) {
|
|
53
|
+
const props$1 = arg.properties.find((p) => ts.isPropertyAssignment(p) && ts.isIdentifier(p.name) && p.name.escapedText === "props");
|
|
54
|
+
const setup = arg.properties.find((p) => ts.isPropertyAssignment(p) && ts.isIdentifier(p.name) && p.name.escapedText === "setup");
|
|
55
|
+
if (!props$1 && setup && ts.isPropertyAssignment(setup)) {
|
|
56
|
+
const value = setup.initializer;
|
|
57
|
+
if (ts.isFunctionLike(value)) setupFn = value;
|
|
58
|
+
}
|
|
59
|
+
} else if (ts.isFunctionLike(arg)) setupFn = arg;
|
|
60
|
+
else throw new Error("[@vue.ts/tsx-auto-props] Invalid defineComponent argument");
|
|
61
|
+
const props = setupFn?.parameters[0];
|
|
62
|
+
if (props) {
|
|
63
|
+
const propsList = typeChecker.getTypeAtLocation(props).getProperties().map((p) => p.name);
|
|
64
|
+
const { variableList, variable } = getNodeAssignNode(node);
|
|
65
|
+
if (propsList.length > 0 && variableList && variable) s.appendRight(variableList.getEnd() + 1, generateDefineProps(variable.name.getText(ast), propsList));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
return {
|
|
70
|
+
code: s.toString(),
|
|
71
|
+
map: s.generateMap({ hires: true })
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/index.ts
|
|
77
|
+
const unpluginFactory = (options = {}) => {
|
|
78
|
+
const resolvedOptions = resolveOptions(options);
|
|
79
|
+
const filter = createFilter(resolvedOptions.include, resolvedOptions.exclude);
|
|
80
|
+
return {
|
|
81
|
+
name: "@vue.ts/tsx-auto-props",
|
|
82
|
+
buildStart() {
|
|
83
|
+
const resolvedOptions$1 = resolveOptions(options);
|
|
84
|
+
ensureLanguage(resolvedOptions$1.tsconfigPath);
|
|
85
|
+
},
|
|
86
|
+
transform(code, id) {
|
|
87
|
+
if (!filter(id)) return;
|
|
88
|
+
return transform(code, id);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
const unplugin = /* @__PURE__ */ createUnplugin(unpluginFactory);
|
|
93
|
+
var src_default = unplugin;
|
|
94
|
+
|
|
95
|
+
//#endregion
|
|
96
|
+
export { src_default, unplugin, unpluginFactory };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FilterPattern } from "@rollup/pluginutils";
|
|
2
|
+
|
|
3
|
+
//#region ../common/src/types.d.ts
|
|
4
|
+
interface BaseOptions {
|
|
5
|
+
include?: FilterPattern;
|
|
6
|
+
exclude?: FilterPattern;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/types.d.ts
|
|
10
|
+
interface Options extends BaseOptions {
|
|
11
|
+
tsconfigPath?: string;
|
|
12
|
+
}
|
|
13
|
+
type ResolvedOptions = Required<Options>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Options, ResolvedOptions };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
interface Options extends BaseOptions {
|
|
4
|
-
tsconfigPath?: string;
|
|
5
|
-
}
|
|
6
|
-
type ResolvedOptions = Required<Options>;
|
|
7
|
-
|
|
8
|
-
export type { Options, ResolvedOptions };
|
|
1
|
+
import { Options, ResolvedOptions } from "./types-BsMRL-YJ.js";
|
|
2
|
+
export { Options, ResolvedOptions };
|
package/dist/types.js
ADDED
|
File without changes
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import '@vue.ts/common';
|
|
1
|
+
import { Options } from "./types-BsMRL-YJ.js";
|
|
2
|
+
import * as vite0 from "vite";
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
//#region src/vite.d.ts
|
|
5
|
+
declare const _default: (options?: Options | undefined) => vite0.Plugin<any> | vite0.Plugin<any>[];
|
|
6
|
+
//#endregion
|
|
7
|
+
export { _default as default };
|
package/dist/vite.js
ADDED
package/dist/webpack.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import '@vue.ts/common';
|
|
1
|
+
import { Options } from "./types-BsMRL-YJ.js";
|
|
2
|
+
import * as webpack0 from "webpack";
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
//#region src/webpack.d.ts
|
|
5
|
+
declare const _default: (options?: Options | undefined) => webpack0.WebpackPluginInstance;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { _default as default };
|
package/dist/webpack.js
ADDED
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue.ts/tsx-auto-props",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"author": "Ray <i@mk1.io> (@so1ve)",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"description": "Automatically add props definition for Vue 3 TSX.",
|
|
6
7
|
"keywords": [
|
|
7
8
|
"astro",
|
|
9
|
+
"farm",
|
|
8
10
|
"nuxt",
|
|
11
|
+
"rolldown",
|
|
9
12
|
"rollup",
|
|
10
13
|
"rspack",
|
|
11
14
|
"transform",
|
|
@@ -14,6 +17,7 @@
|
|
|
14
17
|
"unplugin",
|
|
15
18
|
"vite",
|
|
16
19
|
"vue",
|
|
20
|
+
"vue.ts",
|
|
17
21
|
"webpack"
|
|
18
22
|
],
|
|
19
23
|
"homepage": "https://github.com/so1ve/vue.ts/tree/main/packages/tsx-auto-props#readme",
|
|
@@ -28,46 +32,21 @@
|
|
|
28
32
|
"license": "MIT",
|
|
29
33
|
"sideEffects": false,
|
|
30
34
|
"exports": {
|
|
31
|
-
".":
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"./
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"./
|
|
41
|
-
|
|
42
|
-
"import": "./dist/esbuild.mjs"
|
|
43
|
-
},
|
|
44
|
-
"./nuxt": {
|
|
45
|
-
"require": "./dist/nuxt.cjs",
|
|
46
|
-
"import": "./dist/nuxt.mjs"
|
|
47
|
-
},
|
|
48
|
-
"./rollup": {
|
|
49
|
-
"require": "./dist/rollup.cjs",
|
|
50
|
-
"import": "./dist/rollup.mjs"
|
|
51
|
-
},
|
|
52
|
-
"./rspack": {
|
|
53
|
-
"require": "./dist/rspack.cjs",
|
|
54
|
-
"import": "./dist/rspack.mjs"
|
|
55
|
-
},
|
|
56
|
-
"./types": {
|
|
57
|
-
"require": "./dist/types.cjs",
|
|
58
|
-
"import": "./dist/types.mjs"
|
|
59
|
-
},
|
|
60
|
-
"./vite": {
|
|
61
|
-
"require": "./dist/vite.cjs",
|
|
62
|
-
"import": "./dist/vite.mjs"
|
|
63
|
-
},
|
|
64
|
-
"./webpack": {
|
|
65
|
-
"require": "./dist/webpack.cjs",
|
|
66
|
-
"import": "./dist/webpack.mjs"
|
|
67
|
-
}
|
|
35
|
+
".": "./dist/index.js",
|
|
36
|
+
"./astro": "./dist/astro.js",
|
|
37
|
+
"./esbuild": "./dist/esbuild.js",
|
|
38
|
+
"./farm": "./dist/farm.js",
|
|
39
|
+
"./nuxt": "./dist/nuxt.js",
|
|
40
|
+
"./rolldown": "./dist/rolldown.js",
|
|
41
|
+
"./rollup": "./dist/rollup.js",
|
|
42
|
+
"./rspack": "./dist/rspack.js",
|
|
43
|
+
"./types": "./dist/types.js",
|
|
44
|
+
"./vite": "./dist/vite.js",
|
|
45
|
+
"./webpack": "./dist/webpack.js"
|
|
68
46
|
},
|
|
69
|
-
"main": "./dist/index.
|
|
70
|
-
"module": "./dist/index.
|
|
47
|
+
"main": "./dist/index.js",
|
|
48
|
+
"module": "./dist/index.js",
|
|
49
|
+
"types": "dist/index.d.ts",
|
|
71
50
|
"typesVersions": {
|
|
72
51
|
"*": {
|
|
73
52
|
"*": [
|
|
@@ -83,25 +62,57 @@
|
|
|
83
62
|
"access": "public"
|
|
84
63
|
},
|
|
85
64
|
"dependencies": {
|
|
86
|
-
"@nuxt/kit": "^3.
|
|
87
|
-
"magic-string": "^0.30.
|
|
88
|
-
"unplugin": "^
|
|
89
|
-
"@vue.ts/common": "0.
|
|
90
|
-
"@vue.ts/language": "0.
|
|
65
|
+
"@nuxt/kit": "^3.17.6",
|
|
66
|
+
"magic-string": "^0.30.17",
|
|
67
|
+
"unplugin": "^2.3.5",
|
|
68
|
+
"@vue.ts/common": "1.0.0-beta.2",
|
|
69
|
+
"@vue.ts/language": "1.0.0-beta.2"
|
|
91
70
|
},
|
|
92
71
|
"devDependencies": {
|
|
93
|
-
"@nuxt/schema": "^3.
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"vite": "^
|
|
97
|
-
"webpack": "^5.
|
|
72
|
+
"@nuxt/schema": "^3.17.6",
|
|
73
|
+
"rolldown": "1.0.0-beta.27",
|
|
74
|
+
"rollup": "^4.44.2",
|
|
75
|
+
"vite": "^7.0.4",
|
|
76
|
+
"webpack": "^5.100.1"
|
|
98
77
|
},
|
|
99
78
|
"peerDependencies": {
|
|
100
|
-
"
|
|
101
|
-
"
|
|
79
|
+
"@farmfe/core": ">=1",
|
|
80
|
+
"@nuxt/kit": "^3 || ^4",
|
|
81
|
+
"@nuxt/schema": "^3 || ^4",
|
|
82
|
+
"esbuild": "*",
|
|
83
|
+
"rolldown": "*",
|
|
84
|
+
"rollup": "^3",
|
|
85
|
+
"vite": ">=3",
|
|
86
|
+
"webpack": "^4 || ^5"
|
|
87
|
+
},
|
|
88
|
+
"peerDependenciesMeta": {
|
|
89
|
+
"@farmfe/core": {
|
|
90
|
+
"optional": true
|
|
91
|
+
},
|
|
92
|
+
"@nuxt/kit": {
|
|
93
|
+
"optional": true
|
|
94
|
+
},
|
|
95
|
+
"@nuxt/schema": {
|
|
96
|
+
"optional": true
|
|
97
|
+
},
|
|
98
|
+
"esbuild": {
|
|
99
|
+
"optional": true
|
|
100
|
+
},
|
|
101
|
+
"rolldown": {
|
|
102
|
+
"optional": true
|
|
103
|
+
},
|
|
104
|
+
"rollup": {
|
|
105
|
+
"optional": true
|
|
106
|
+
},
|
|
107
|
+
"vite": {
|
|
108
|
+
"optional": true
|
|
109
|
+
},
|
|
110
|
+
"webpack": {
|
|
111
|
+
"optional": true
|
|
112
|
+
}
|
|
102
113
|
},
|
|
103
114
|
"scripts": {
|
|
104
|
-
"build": "
|
|
105
|
-
"
|
|
115
|
+
"build": "tsdown",
|
|
116
|
+
"watch": "tsdown --watch"
|
|
106
117
|
}
|
|
107
118
|
}
|
package/dist/astro.cjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index = require('./index.cjs');
|
|
4
|
-
require('@vue.ts/common');
|
|
5
|
-
require('@vue.ts/language');
|
|
6
|
-
require('unplugin');
|
|
7
|
-
require('magic-string');
|
|
8
|
-
require('typescript');
|
|
9
|
-
require('node:path');
|
|
10
|
-
|
|
11
|
-
const astro = (options) => ({
|
|
12
|
-
name: "@vue.ts/complex-types",
|
|
13
|
-
hooks: {
|
|
14
|
-
"astro:config:setup": async (astro) => {
|
|
15
|
-
var _a;
|
|
16
|
-
(_a = astro.config.vite).plugins || (_a.plugins = []);
|
|
17
|
-
astro.config.vite.plugins.push(index.vite(options));
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
module.exports = astro;
|
package/dist/astro.d.cts
DELETED