@cfp-studio/plugin-vue3 16.0.1 → 16.1.1
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/README.md +49 -0
- package/dist/index.d.mts +5797 -3
- package/dist/index.mjs +5 -635
- package/package.json +33 -28
- package/preview/index.ts +117 -128
- package/preview/modules/@vue/compiler-core/node_modules/.bin/parser +33 -7
- package/preview/modules/@vue/compiler-core/node_modules/.bin/parser.CMD +12 -0
- package/preview/modules/@vue/compiler-core/node_modules/.bin/parser.ps1 +41 -0
- package/preview/modules/@vue/compiler-sfc/node_modules/.bin/parser +33 -7
- package/preview/modules/@vue/compiler-sfc/node_modules/.bin/parser.CMD +12 -0
- package/preview/modules/@vue/compiler-sfc/node_modules/.bin/parser.ps1 +41 -0
- package/preview/modules/vue/node_modules/.bin/tsc +31 -5
- package/preview/modules/vue/node_modules/.bin/tsc.CMD +12 -0
- package/preview/modules/vue/node_modules/.bin/tsc.ps1 +41 -0
- package/preview/modules/vue/node_modules/.bin/tsserver +31 -5
- package/preview/modules/vue/node_modules/.bin/tsserver.CMD +12 -0
- package/preview/modules/vue/node_modules/.bin/tsserver.ps1 +41 -0
- package/preview/tsconfig.json +8 -8
- package/dist/index.d.ts +0 -5
- package/preview/modules/@vue/reactivity/LICENSE +0 -21
- package/preview/modules/@vue/reactivity/README.md +0 -19
- package/preview/modules/@vue/reactivity/dist/reactivity.cjs.js +0 -1939
- package/preview/modules/@vue/reactivity/dist/reactivity.cjs.prod.js +0 -1789
- package/preview/modules/@vue/reactivity/dist/reactivity.d.ts +0 -754
- package/preview/modules/@vue/reactivity/dist/reactivity.esm-browser.js +0 -1938
- package/preview/modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js +0 -5
- package/preview/modules/@vue/reactivity/dist/reactivity.esm-bundler.js +0 -1896
- package/preview/modules/@vue/reactivity/dist/reactivity.global.js +0 -1994
- package/preview/modules/@vue/reactivity/dist/reactivity.global.prod.js +0 -5
- package/preview/modules/@vue/reactivity/index.js +0 -7
- package/preview/modules/@vue/reactivity/package.json +0 -55
- package/preview/modules/@vue/runtime-dom/LICENSE +0 -21
- package/preview/modules/@vue/runtime-dom/README.md +0 -13
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.cjs.js +0 -1820
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +0 -1669
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.d.ts +0 -1395
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js +0 -12332
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js +0 -5
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +0 -1860
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.global.js +0 -12383
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js +0 -5
- package/preview/modules/@vue/runtime-dom/index.js +0 -7
- package/preview/modules/@vue/runtime-dom/package.json +0 -60
- package/preview/modules/@vue/shared/LICENSE +0 -21
- package/preview/modules/@vue/shared/README.md +0 -3
- package/preview/modules/@vue/shared/dist/shared.cjs.js +0 -594
- package/preview/modules/@vue/shared/dist/shared.cjs.prod.js +0 -594
- package/preview/modules/@vue/shared/dist/shared.d.ts +0 -328
- package/preview/modules/@vue/shared/dist/shared.esm-bundler.js +0 -519
- package/preview/modules/@vue/shared/index.js +0 -7
- package/preview/modules/@vue/shared/package.json +0 -47
package/package.json
CHANGED
|
@@ -1,51 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cfp-studio/plugin-vue3",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"sideEffects": false,
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "./dist/index.mjs",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
5
|
"files": [
|
|
10
6
|
"dist",
|
|
11
7
|
"preview"
|
|
12
8
|
],
|
|
9
|
+
"type": "module",
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"main": "./dist/index.mjs",
|
|
12
|
+
"types": "./dist/index.d.mts",
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@vitejs/plugin-vue": "5.2.1",
|
|
15
15
|
"@vitejs/plugin-vue-jsx": "4.1.1",
|
|
16
16
|
"@vue/compiler-sfc": "3.5.13",
|
|
17
|
-
"
|
|
18
|
-
"typescript": "5.
|
|
17
|
+
"@vue/runtime-core": "3.5.13",
|
|
18
|
+
"typescript": "5.9.3",
|
|
19
19
|
"vue": "3.5.13",
|
|
20
|
-
"@cfp-studio/
|
|
21
|
-
"@cfp-studio/
|
|
22
|
-
"@cfp-studio/type-analyzer": "10.1.
|
|
23
|
-
"@cfp-studio/
|
|
24
|
-
"@cfp-studio/
|
|
25
|
-
"@cfp-studio/analyzer-api": "0.1.9"
|
|
20
|
+
"@cfp-studio/analyzer-api": "0.1.14",
|
|
21
|
+
"@cfp-studio/storybook-helpers": "6.0.2",
|
|
22
|
+
"@cfp-studio/type-analyzer": "10.1.8",
|
|
23
|
+
"@cfp-studio/vfs": "2.1.8",
|
|
24
|
+
"@cfp-studio/serializable-values": "9.0.8"
|
|
26
25
|
},
|
|
27
26
|
"devDependencies": {
|
|
28
|
-
"@playwright/test": "1.
|
|
29
|
-
"@types/fs-extra": "11.0.4",
|
|
27
|
+
"@playwright/test": "1.64.1",
|
|
30
28
|
"@vue/compiler-core": "3.5.13",
|
|
31
|
-
"
|
|
32
|
-
"@vue/runtime-core": "3.5.13",
|
|
33
|
-
"@vue/runtime-dom": "3.5.13",
|
|
34
|
-
"@vue/shared": "3.5.13",
|
|
35
|
-
"pino": "9.6.0",
|
|
29
|
+
"pino": "9.11.0",
|
|
36
30
|
"pino-pretty": "11.3.0",
|
|
37
31
|
"rimraf": "6.0.1",
|
|
38
32
|
"shx": "0.3.4",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"@cfp-studio/core": "1.0.1",
|
|
33
|
+
"vite": "6.4.5",
|
|
34
|
+
"vitest": "5.0.5",
|
|
35
|
+
"@cfp-studio/core": "1.0.9",
|
|
43
36
|
"@cfp-studio/testing": "14.0.1",
|
|
44
|
-
"@cfp-studio/iframe": "18.
|
|
37
|
+
"@cfp-studio/iframe": "18.4.4"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=20"
|
|
41
|
+
},
|
|
42
|
+
"cfp": {
|
|
43
|
+
"domain": "web-preview",
|
|
44
|
+
"layer": "analysis"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
|
-
"build": "
|
|
48
|
-
"
|
|
49
|
-
"
|
|
47
|
+
"build": "tsdown",
|
|
48
|
+
"typecheck": "tsc --noEmit && tsc -p preview/tsconfig.json",
|
|
49
|
+
"release": "tsdown --minify",
|
|
50
|
+
"test": "vitest run",
|
|
51
|
+
"test:watch": "vitest watch",
|
|
52
|
+
"e2e-test": "pnpm --dir tests/apps/vue3 install --ignore-workspace --ignore-scripts && playwright test",
|
|
53
|
+
"lint": "oxlint",
|
|
54
|
+
"format": "oxfmt --write ."
|
|
50
55
|
}
|
|
51
56
|
}
|
package/preview/index.ts
CHANGED
|
@@ -1,141 +1,130 @@
|
|
|
1
|
+
import { renderErrorPanel } from "@cfp-studio/analyzer-api";
|
|
1
2
|
import type { GetPropsFn, RendererLoader } from "@cfp-studio/iframe";
|
|
2
3
|
import type { App } from "vue";
|
|
3
4
|
import { createApp } from "vue";
|
|
4
5
|
|
|
5
|
-
// biome-ignore lint/style/noNonNullAssertion: <explanation>
|
|
6
6
|
const root = document.getElementById("root")!;
|
|
7
7
|
let app: App | null = null;
|
|
8
8
|
|
|
9
9
|
export const loadRenderer: RendererLoader = async ({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
wrapperModule,
|
|
11
|
+
wrapperName,
|
|
12
|
+
previewableModule,
|
|
13
|
+
previewableName,
|
|
14
|
+
shouldAbortRender,
|
|
15
15
|
}) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
// @ts-ignore
|
|
115
|
-
jsxFactory: slotTransformingH,
|
|
116
|
-
};
|
|
16
|
+
const isStoryModule = !!previewableModule.default?.component;
|
|
17
|
+
const Wrapper = wrapperModule?.[wrapperName || "default"] || null;
|
|
18
|
+
let Previewable: any;
|
|
19
|
+
if ((previewableModule.default?.__file || previewableModule.default?.options?.__file)?.endsWith(".vue")) {
|
|
20
|
+
Previewable = previewableModule.default;
|
|
21
|
+
if (!Previewable) {
|
|
22
|
+
throw new Error("No default component could be found");
|
|
23
|
+
}
|
|
24
|
+
} else {
|
|
25
|
+
Previewable =
|
|
26
|
+
previewableModule[previewableName] ||
|
|
27
|
+
previewableModule.PreviewJsEval(`try { return ${previewableName}; } catch { return null; }`);
|
|
28
|
+
if (!Previewable) {
|
|
29
|
+
throw new Error(`No component or story named '${previewableName}'`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const storyDecorators = Previewable.decorators || [];
|
|
33
|
+
let RenderComponent = Previewable;
|
|
34
|
+
if (Previewable.render && !isStoryModule) {
|
|
35
|
+
// Vue component. Nothing to do.
|
|
36
|
+
} else {
|
|
37
|
+
// JSX or Storybook story, either CSF2 or CSF3.
|
|
38
|
+
if (typeof Previewable === "function") {
|
|
39
|
+
RenderComponent = (props: any) => {
|
|
40
|
+
const storyReturnValue = Previewable(props);
|
|
41
|
+
if (storyReturnValue.template) {
|
|
42
|
+
// CSF2 story.
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
return h(storyReturnValue, props);
|
|
45
|
+
}
|
|
46
|
+
// JSX
|
|
47
|
+
return storyReturnValue;
|
|
48
|
+
};
|
|
49
|
+
} else {
|
|
50
|
+
// CSF3 story.
|
|
51
|
+
const csf3Story = Previewable;
|
|
52
|
+
RenderComponent = csf3Story.component || previewableModule.default?.component;
|
|
53
|
+
if (!RenderComponent) {
|
|
54
|
+
throw new Error("Encountered a story with no component");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const decorators = [...storyDecorators, ...(previewableModule.default?.decorators || [])];
|
|
59
|
+
const Decorated = decorators.reduce((component, decorator) => {
|
|
60
|
+
const decorated = decorator();
|
|
61
|
+
return {
|
|
62
|
+
...decorated,
|
|
63
|
+
components: { ...decorated.components, story: component },
|
|
64
|
+
};
|
|
65
|
+
}, RenderComponent);
|
|
66
|
+
return {
|
|
67
|
+
render: async (getProps: GetPropsFn) => {
|
|
68
|
+
if (shouldAbortRender()) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (app) {
|
|
72
|
+
app.unmount();
|
|
73
|
+
app = null;
|
|
74
|
+
}
|
|
75
|
+
const props = getProps({
|
|
76
|
+
presetGlobalProps: previewableModule.default?.args || {},
|
|
77
|
+
presetProps: Previewable.args || {},
|
|
78
|
+
});
|
|
79
|
+
app = createApp(() => {
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
const decoratedNode = slotTransformingH(Decorated, props);
|
|
82
|
+
return Wrapper
|
|
83
|
+
? // @ts-ignore
|
|
84
|
+
h(Wrapper, null, () => decoratedNode)
|
|
85
|
+
: decoratedNode;
|
|
86
|
+
}, {});
|
|
87
|
+
// 渲染错误面板(`docs/todo/39`):旧实现出错时整片白屏,且错误信息丢失。
|
|
88
|
+
// Vue 的 `errorHandler` 覆盖**渲染期**抛错(相当于 React 的 ErrorBoundary)。
|
|
89
|
+
// 与其它插件一致:面板画进 `#root`,外层 UI 不受影响。
|
|
90
|
+
app.config.errorHandler = (error, _instance, info) => {
|
|
91
|
+
renderErrorPanel(root, {
|
|
92
|
+
error,
|
|
93
|
+
previewableName,
|
|
94
|
+
// Vue 没有 React 那种 componentStack;`info` 是 Vue 给的出错阶段
|
|
95
|
+
// (`render function` / `setup function` 等),放这里当线索。
|
|
96
|
+
componentStack: info ? `Vue error info: ${info}` : null,
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
app.mount(root);
|
|
100
|
+
if (Previewable.play) {
|
|
101
|
+
try {
|
|
102
|
+
await Previewable.play({ canvasElement: root });
|
|
103
|
+
} catch (e: any) {
|
|
104
|
+
// For some reason, Storybook expects to throw exceptions that should be ignored.
|
|
105
|
+
if (!e.message?.startsWith("ignoredException")) {
|
|
106
|
+
throw e;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
// @ts-ignore
|
|
112
|
+
jsxFactory: slotTransformingH,
|
|
113
|
+
};
|
|
117
114
|
};
|
|
118
115
|
|
|
119
|
-
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
120
116
|
function slotTransformingH(component: any, props: any, children: any) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
.filter(([propName]) => propName.startsWith("slot:"))
|
|
135
|
-
.map(([propName, propValue]) => [
|
|
136
|
-
propName.substring(5),
|
|
137
|
-
() => propValue,
|
|
138
|
-
])
|
|
139
|
-
)
|
|
140
|
-
);
|
|
117
|
+
const localProps = props || {};
|
|
118
|
+
// @ts-ignore
|
|
119
|
+
return h(
|
|
120
|
+
component,
|
|
121
|
+
Object.fromEntries(Object.entries(localProps).filter(([propName]) => !propName.startsWith("slot:"))),
|
|
122
|
+
children !== undefined
|
|
123
|
+
? children
|
|
124
|
+
: Object.fromEntries(
|
|
125
|
+
Object.entries(localProps)
|
|
126
|
+
.filter(([propName]) => propName.startsWith("slot:"))
|
|
127
|
+
.map(([propName, propValue]) => [propName.substring(5), () => propValue]),
|
|
128
|
+
),
|
|
129
|
+
);
|
|
141
130
|
}
|
|
@@ -1,17 +1,43 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
basedir_win="$basedir"
|
|
4
|
+
exe=""
|
|
5
|
+
msys=""
|
|
3
6
|
|
|
4
|
-
case `uname` in
|
|
5
|
-
|
|
7
|
+
case `uname -a` in
|
|
8
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
9
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
10
|
+
basedir_win=`cygpath -w "$basedir"`
|
|
11
|
+
fi
|
|
12
|
+
exe=".exe"
|
|
13
|
+
msys="true"
|
|
14
|
+
;;
|
|
15
|
+
*WSL2*)
|
|
16
|
+
if command -v wslpath > /dev/null 2>&1; then
|
|
17
|
+
basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
|
|
18
|
+
if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
|
|
19
|
+
basedir_win="$basedir"
|
|
20
|
+
else
|
|
21
|
+
exe=".exe"
|
|
22
|
+
fi
|
|
23
|
+
fi
|
|
24
|
+
;;
|
|
6
25
|
esac
|
|
7
26
|
|
|
8
27
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/
|
|
28
|
+
export NODE_PATH="/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/@babel+parser@7.29.11/node_modules/@babel/parser/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/@babel+parser@7.29.11/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/node_modules"
|
|
10
29
|
else
|
|
11
|
-
export NODE_PATH="/
|
|
30
|
+
export NODE_PATH="/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/@babel+parser@7.29.11/node_modules/@babel/parser/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/@babel+parser@7.29.11/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
31
|
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$
|
|
32
|
+
if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
|
|
33
|
+
exec "$basedir/node.exe" "$basedir_win/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
34
|
+
elif [ -x "$basedir/node" ]; then
|
|
35
|
+
exec "$basedir/node" "$basedir/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
36
|
+
elif command -v node >/dev/null 2>&1; then
|
|
37
|
+
exec node "$basedir/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
38
|
+
elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
|
|
39
|
+
exec node.exe "$basedir_win/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
15
40
|
else
|
|
16
|
-
exec node "$basedir/../../../../../../@babel+parser@7.
|
|
41
|
+
exec node "$basedir/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
17
42
|
fi
|
|
43
|
+
# cmd-shim-target=D:/work_repo/cfp-studio/node_modules/.pnpm/@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@SETLOCAL
|
|
2
|
+
@IF NOT DEFINED NODE_PATH (
|
|
3
|
+
@SET "NODE_PATH=D:\work_repo\cfp-studio\node_modules\.pnpm\@babel+parser@7.29.11\node_modules\@babel\parser\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\@babel+parser@7.29.11\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\node_modules"
|
|
4
|
+
) ELSE (
|
|
5
|
+
@SET "NODE_PATH=D:\work_repo\cfp-studio\node_modules\.pnpm\@babel+parser@7.29.11\node_modules\@babel\parser\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\@babel+parser@7.29.11\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
6
|
+
)
|
|
7
|
+
@IF EXIST "%~dp0\node.exe" (
|
|
8
|
+
"%~dp0\node.exe" "%~dp0\..\..\..\..\..\..\@babel+parser@7.29.11\node_modules\@babel\parser\bin\babel-parser.js" %*
|
|
9
|
+
) ELSE (
|
|
10
|
+
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
+
node "%~dp0\..\..\..\..\..\..\@babel+parser@7.29.11\node_modules\@babel\parser\bin\babel-parser.js" %*
|
|
12
|
+
)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env pwsh
|
|
2
|
+
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
3
|
+
|
|
4
|
+
$exe=""
|
|
5
|
+
$pathsep=":"
|
|
6
|
+
$env_node_path=$env:NODE_PATH
|
|
7
|
+
$new_node_path="D:\work_repo\cfp-studio\node_modules\.pnpm\@babel+parser@7.29.11\node_modules\@babel\parser\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\@babel+parser@7.29.11\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\node_modules"
|
|
8
|
+
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
9
|
+
# Fix case when both the Windows and Linux builds of Node
|
|
10
|
+
# are installed in the same directory
|
|
11
|
+
$exe=".exe"
|
|
12
|
+
$pathsep=";"
|
|
13
|
+
} else {
|
|
14
|
+
$new_node_path="/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/@babel+parser@7.29.11/node_modules/@babel/parser/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/@babel+parser@7.29.11/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/node_modules"
|
|
15
|
+
}
|
|
16
|
+
if ([string]::IsNullOrEmpty($env_node_path)) {
|
|
17
|
+
$env:NODE_PATH=$new_node_path
|
|
18
|
+
} else {
|
|
19
|
+
$env:NODE_PATH="$new_node_path$pathsep$env_node_path"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
$ret=0
|
|
23
|
+
if (Test-Path "$basedir/node$exe") {
|
|
24
|
+
# Support pipeline input
|
|
25
|
+
if ($MyInvocation.ExpectingInput) {
|
|
26
|
+
$input | & "$basedir/node$exe" "$basedir/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" $args
|
|
27
|
+
} else {
|
|
28
|
+
& "$basedir/node$exe" "$basedir/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" $args
|
|
29
|
+
}
|
|
30
|
+
$ret=$LASTEXITCODE
|
|
31
|
+
} else {
|
|
32
|
+
# Support pipeline input
|
|
33
|
+
if ($MyInvocation.ExpectingInput) {
|
|
34
|
+
$input | & "node$exe" "$basedir/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" $args
|
|
35
|
+
} else {
|
|
36
|
+
& "node$exe" "$basedir/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" $args
|
|
37
|
+
}
|
|
38
|
+
$ret=$LASTEXITCODE
|
|
39
|
+
}
|
|
40
|
+
$env:NODE_PATH=$env_node_path
|
|
41
|
+
exit $ret
|
|
@@ -1,17 +1,43 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
basedir_win="$basedir"
|
|
4
|
+
exe=""
|
|
5
|
+
msys=""
|
|
3
6
|
|
|
4
|
-
case `uname` in
|
|
5
|
-
|
|
7
|
+
case `uname -a` in
|
|
8
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
9
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
10
|
+
basedir_win=`cygpath -w "$basedir"`
|
|
11
|
+
fi
|
|
12
|
+
exe=".exe"
|
|
13
|
+
msys="true"
|
|
14
|
+
;;
|
|
15
|
+
*WSL2*)
|
|
16
|
+
if command -v wslpath > /dev/null 2>&1; then
|
|
17
|
+
basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
|
|
18
|
+
if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
|
|
19
|
+
basedir_win="$basedir"
|
|
20
|
+
else
|
|
21
|
+
exe=".exe"
|
|
22
|
+
fi
|
|
23
|
+
fi
|
|
24
|
+
;;
|
|
6
25
|
esac
|
|
7
26
|
|
|
8
27
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/
|
|
28
|
+
export NODE_PATH="/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/@babel+parser@7.29.11/node_modules/@babel/parser/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/@babel+parser@7.29.11/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/node_modules"
|
|
10
29
|
else
|
|
11
|
-
export NODE_PATH="/
|
|
30
|
+
export NODE_PATH="/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/@babel+parser@7.29.11/node_modules/@babel/parser/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/@babel+parser@7.29.11/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
31
|
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$
|
|
32
|
+
if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
|
|
33
|
+
exec "$basedir/node.exe" "$basedir_win/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
34
|
+
elif [ -x "$basedir/node" ]; then
|
|
35
|
+
exec "$basedir/node" "$basedir/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
36
|
+
elif command -v node >/dev/null 2>&1; then
|
|
37
|
+
exec node "$basedir/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
38
|
+
elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
|
|
39
|
+
exec node.exe "$basedir_win/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
15
40
|
else
|
|
16
|
-
exec node "$basedir/../../../../../../@babel+parser@7.
|
|
41
|
+
exec node "$basedir/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
17
42
|
fi
|
|
43
|
+
# cmd-shim-target=D:/work_repo/cfp-studio/node_modules/.pnpm/@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@SETLOCAL
|
|
2
|
+
@IF NOT DEFINED NODE_PATH (
|
|
3
|
+
@SET "NODE_PATH=D:\work_repo\cfp-studio\node_modules\.pnpm\@babel+parser@7.29.11\node_modules\@babel\parser\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\@babel+parser@7.29.11\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\node_modules"
|
|
4
|
+
) ELSE (
|
|
5
|
+
@SET "NODE_PATH=D:\work_repo\cfp-studio\node_modules\.pnpm\@babel+parser@7.29.11\node_modules\@babel\parser\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\@babel+parser@7.29.11\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
6
|
+
)
|
|
7
|
+
@IF EXIST "%~dp0\node.exe" (
|
|
8
|
+
"%~dp0\node.exe" "%~dp0\..\..\..\..\..\..\@babel+parser@7.29.11\node_modules\@babel\parser\bin\babel-parser.js" %*
|
|
9
|
+
) ELSE (
|
|
10
|
+
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
+
node "%~dp0\..\..\..\..\..\..\@babel+parser@7.29.11\node_modules\@babel\parser\bin\babel-parser.js" %*
|
|
12
|
+
)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env pwsh
|
|
2
|
+
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
3
|
+
|
|
4
|
+
$exe=""
|
|
5
|
+
$pathsep=":"
|
|
6
|
+
$env_node_path=$env:NODE_PATH
|
|
7
|
+
$new_node_path="D:\work_repo\cfp-studio\node_modules\.pnpm\@babel+parser@7.29.11\node_modules\@babel\parser\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\@babel+parser@7.29.11\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\node_modules"
|
|
8
|
+
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
9
|
+
# Fix case when both the Windows and Linux builds of Node
|
|
10
|
+
# are installed in the same directory
|
|
11
|
+
$exe=".exe"
|
|
12
|
+
$pathsep=";"
|
|
13
|
+
} else {
|
|
14
|
+
$new_node_path="/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/@babel+parser@7.29.11/node_modules/@babel/parser/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/@babel+parser@7.29.11/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/node_modules"
|
|
15
|
+
}
|
|
16
|
+
if ([string]::IsNullOrEmpty($env_node_path)) {
|
|
17
|
+
$env:NODE_PATH=$new_node_path
|
|
18
|
+
} else {
|
|
19
|
+
$env:NODE_PATH="$new_node_path$pathsep$env_node_path"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
$ret=0
|
|
23
|
+
if (Test-Path "$basedir/node$exe") {
|
|
24
|
+
# Support pipeline input
|
|
25
|
+
if ($MyInvocation.ExpectingInput) {
|
|
26
|
+
$input | & "$basedir/node$exe" "$basedir/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" $args
|
|
27
|
+
} else {
|
|
28
|
+
& "$basedir/node$exe" "$basedir/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" $args
|
|
29
|
+
}
|
|
30
|
+
$ret=$LASTEXITCODE
|
|
31
|
+
} else {
|
|
32
|
+
# Support pipeline input
|
|
33
|
+
if ($MyInvocation.ExpectingInput) {
|
|
34
|
+
$input | & "node$exe" "$basedir/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" $args
|
|
35
|
+
} else {
|
|
36
|
+
& "node$exe" "$basedir/../../../../../../@babel+parser@7.29.11/node_modules/@babel/parser/bin/babel-parser.js" $args
|
|
37
|
+
}
|
|
38
|
+
$ret=$LASTEXITCODE
|
|
39
|
+
}
|
|
40
|
+
$env:NODE_PATH=$env_node_path
|
|
41
|
+
exit $ret
|
|
@@ -1,17 +1,43 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
basedir_win="$basedir"
|
|
4
|
+
exe=""
|
|
5
|
+
msys=""
|
|
3
6
|
|
|
4
|
-
case `uname` in
|
|
5
|
-
|
|
7
|
+
case `uname -a` in
|
|
8
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
9
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
10
|
+
basedir_win=`cygpath -w "$basedir"`
|
|
11
|
+
fi
|
|
12
|
+
exe=".exe"
|
|
13
|
+
msys="true"
|
|
14
|
+
;;
|
|
15
|
+
*WSL2*)
|
|
16
|
+
if command -v wslpath > /dev/null 2>&1; then
|
|
17
|
+
basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
|
|
18
|
+
if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
|
|
19
|
+
basedir_win="$basedir"
|
|
20
|
+
else
|
|
21
|
+
exe=".exe"
|
|
22
|
+
fi
|
|
23
|
+
fi
|
|
24
|
+
;;
|
|
6
25
|
esac
|
|
7
26
|
|
|
8
27
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/
|
|
28
|
+
export NODE_PATH="/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/typescript@5.9.3/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/node_modules"
|
|
10
29
|
else
|
|
11
|
-
export NODE_PATH="/
|
|
30
|
+
export NODE_PATH="/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/typescript@5.9.3/node_modules:/proc/cygdrive/d/work_repo/cfp-studio/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
31
|
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
32
|
+
if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
|
|
33
|
+
exec "$basedir/node.exe" "$basedir_win/../../../typescript/bin/tsc" "$@"
|
|
34
|
+
elif [ -x "$basedir/node" ]; then
|
|
14
35
|
exec "$basedir/node" "$basedir/../../../typescript/bin/tsc" "$@"
|
|
36
|
+
elif command -v node >/dev/null 2>&1; then
|
|
37
|
+
exec node "$basedir/../../../typescript/bin/tsc" "$@"
|
|
38
|
+
elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
|
|
39
|
+
exec node.exe "$basedir_win/../../../typescript/bin/tsc" "$@"
|
|
15
40
|
else
|
|
16
41
|
exec node "$basedir/../../../typescript/bin/tsc" "$@"
|
|
17
42
|
fi
|
|
43
|
+
# cmd-shim-target=D:/work_repo/cfp-studio/node_modules/.pnpm/vue@3.5.13_typescript@5.9.3/node_modules/typescript/bin/tsc
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@SETLOCAL
|
|
2
|
+
@IF NOT DEFINED NODE_PATH (
|
|
3
|
+
@SET "NODE_PATH=D:\work_repo\cfp-studio\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\typescript@5.9.3\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\node_modules"
|
|
4
|
+
) ELSE (
|
|
5
|
+
@SET "NODE_PATH=D:\work_repo\cfp-studio\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\typescript@5.9.3\node_modules;D:\work_repo\cfp-studio\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
6
|
+
)
|
|
7
|
+
@IF EXIST "%~dp0\node.exe" (
|
|
8
|
+
"%~dp0\node.exe" "%~dp0\..\..\..\typescript\bin\tsc" %*
|
|
9
|
+
) ELSE (
|
|
10
|
+
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
+
node "%~dp0\..\..\..\typescript\bin\tsc" %*
|
|
12
|
+
)
|