@moluoxixi/create-app 2.0.413 → 2.0.415
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 +57 -1
- package/dist/commands/create.js +1 -1
- package/dist/core/feature.d.ts +80 -0
- package/dist/core/feature.js +252 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.js +6 -0
- package/dist/core/prompts.d.ts +17 -0
- package/dist/core/prompts.js +235 -0
- package/dist/core/template.d.ts +22 -0
- package/dist/core/template.js +177 -0
- package/dist/generators/index.d.ts +0 -2
- package/dist/generators/index.js +0 -2
- package/dist/generators/project.d.ts +1 -0
- package/dist/generators/project.js +66 -13
- package/dist/generators/react.d.ts +5 -5
- package/dist/generators/react.js +6 -9
- package/dist/generators/vue.d.ts +5 -5
- package/dist/generators/vue.js +6 -9
- package/dist/test.d.ts +0 -4
- package/dist/test.js +32 -17
- package/dist/types/index.d.ts +25 -26
- package/dist/types/index.js +2 -3
- package/dist/utils/featureMapping.js +6 -3
- package/dist/utils/generateFrameworkProject.d.ts +10 -20
- package/dist/utils/generateFrameworkProject.js +32 -127
- package/dist/utils/index.d.ts +1 -6
- package/dist/utils/index.js +1 -6
- package/dist/utils/prompts.js +7 -3
- package/package.json +3 -9
- package/templates/common/base/package.json +3 -1
- package/templates/common/base/vite/index.ts +53 -0
- package/templates/common/base/vite.config.ts +56 -0
- package/templates/common/features/husky/node_modules/.bin/tsc +17 -0
- package/templates/common/features/husky/node_modules/.bin/tsc.CMD +12 -0
- package/templates/common/features/husky/node_modules/.bin/tsc.ps1 +41 -0
- package/templates/common/features/husky/node_modules/.bin/tsserver +17 -0
- package/templates/common/features/husky/node_modules/.bin/tsserver.CMD +12 -0
- package/templates/common/features/husky/node_modules/.bin/tsserver.ps1 +41 -0
- package/templates/react/base/src/main/index.ts +34 -0
- package/templates/react/base/src/main.tsx +34 -0
- package/templates/react/base/tsconfig.app.json +1 -0
- package/templates/react/base/tsconfig.node.json +1 -0
- package/templates/react/features/ant-design/package.json +2 -1
- package/templates/react/features/ant-design/src/main/features/ant-design.ts +21 -0
- package/templates/react/features/i18n/package.json +2 -1
- package/templates/react/features/i18n/src/main/features/i18n.ts +19 -0
- package/templates/react/features/manualRoutes/package.json +1 -0
- package/templates/react/features/sentry/package.json +2 -1
- package/templates/react/features/sentry/src/main/features/sentry.ts +20 -0
- package/templates/react/features/sentry/vite/features/sentry.ts +39 -0
- package/templates/react/features/zustand/src/apis/types/user.ts +39 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/browserslist +17 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/browserslist.CMD +12 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/browserslist.ps1 +41 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/jiti +17 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/jiti.CMD +12 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/jiti.ps1 +41 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/parser +17 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/parser.CMD +12 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/parser.ps1 +41 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/rollup +17 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/rollup.CMD +12 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/rollup.ps1 +41 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/sass +17 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/sass.CMD +12 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/sass.ps1 +41 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/terser +17 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/terser.CMD +12 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/terser.ps1 +41 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsc +17 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsc.CMD +12 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsc.ps1 +41 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsserver +17 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsserver.CMD +12 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsserver.ps1 +41 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsx +17 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsx.CMD +12 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/tsx.ps1 +41 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/vite +17 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/vite.CMD +12 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/vite.ps1 +41 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/yaml +17 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/yaml.CMD +12 -0
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/yaml.ps1 +41 -0
- package/templates/react/micro-frontends/qiankun/base/package.json +7 -2
- package/templates/react/micro-frontends/qiankun/base/src/main/index.ts +34 -0
- package/templates/react/micro-frontends/qiankun/base/src/{main.tsx.ejs → main.tsx} +13 -27
- package/templates/react/micro-frontends/qiankun/base/vite/index.ts +53 -0
- package/templates/react/micro-frontends/qiankun/base/vite.config.ts +58 -0
- package/templates/vue/base/src/main/index.ts +36 -0
- package/templates/vue/base/src/main.ts +34 -0
- package/templates/vue/base/tsconfig.app.json +2 -1
- package/templates/vue/base/tsconfig.node.json +2 -1
- package/templates/vue/features/ant-design-vue/package.json +3 -1
- package/templates/vue/features/ant-design-vue/src/main/features/ant-design-vue.ts +18 -0
- package/templates/vue/features/element-plus/package.json +5 -1
- package/templates/vue/features/element-plus/src/main/features/element-plus.ts +23 -0
- package/templates/vue/features/element-plus/src/stores/index.ts +6 -0
- package/templates/vue/features/element-plus/src/stores/modules/system.ts +51 -0
- package/templates/vue/features/element-plus/vite/features/element-plus.ts +35 -0
- package/templates/vue/features/i18n/package.json +3 -1
- package/templates/vue/features/i18n/src/main/features/i18n.ts +19 -0
- package/templates/vue/features/manualRoutes/package.json +7 -1
- package/templates/vue/features/manualRoutes/src/layouts/index.ts +26 -0
- package/templates/vue/features/manualRoutes/src/stores/index.ts +6 -0
- package/templates/vue/features/manualRoutes/src/stores/modules/system.ts +51 -0
- package/templates/vue/features/pageRoutes/package.json +7 -1
- package/templates/vue/features/pageRoutes/src/layouts/index.ts +26 -0
- package/templates/vue/features/pageRoutes/src/stores/index.ts +6 -0
- package/templates/vue/features/pageRoutes/src/stores/modules/system.ts +51 -0
- package/templates/vue/features/pinia/package.json +3 -1
- package/templates/vue/features/pinia/src/main/features/pinia.ts +19 -0
- package/templates/vue/features/sentry/package.json +4 -2
- package/templates/vue/features/sentry/src/main/features/sentry.ts +22 -0
- package/templates/vue/features/sentry/vite/features/sentry.ts +39 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/browserslist +17 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/browserslist.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/browserslist.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/jiti +17 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/jiti.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/jiti.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/parser +17 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/parser.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/parser.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/rollup +17 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/rollup.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/rollup.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/sass +17 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/sass.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/sass.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/terser +17 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/terser.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/terser.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsc +17 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsc.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsc.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsserver +17 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsserver.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsserver.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsx +17 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsx.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/tsx.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/vite +17 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/vite.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/vite.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/yaml +17 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/yaml.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/yaml.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/base/package.json +7 -2
- package/templates/vue/micro-frontends/qiankun/base/src/main/index.ts +36 -0
- package/templates/vue/micro-frontends/qiankun/base/src/{main.ts.ejs → main.ts} +11 -28
- package/templates/vue/micro-frontends/qiankun/base/vite/index.ts +53 -0
- package/templates/vue/micro-frontends/qiankun/base/vite.config.ts +59 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/jiti +17 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/jiti.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/jiti.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/sass +17 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/sass.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/sass.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/terser +17 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/terser.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/terser.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsc +17 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsc.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsc.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsserver +17 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsserver.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsserver.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsx +17 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsx.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/tsx.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/vite +17 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/vite.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/vite.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/yaml +17 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/yaml.CMD +12 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/yaml.ps1 +41 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/package.json +10 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/components/SubMenu/index.ts +8 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/components/SubMenu/src/_types/index.ts +1 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/components/SubMenu/src/_types/props.ts +16 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/components/SubMenu/src/index.vue +60 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/main/features/element-plus.ts +24 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/stores/index.ts +6 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/stores/modules/system.ts +51 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/vite/features/element-plus.ts +35 -0
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/package.json +6 -1
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/package.json +6 -1
- package/templates/common/base/vite.config.ts.ejs +0 -85
- package/templates/react/base/src/main.tsx.ejs +0 -56
- package/templates/react/micro-frontends/qiankun/base/vite.config.ts.ejs +0 -89
- package/templates/vue/base/src/main.ts.ejs +0 -61
- package/templates/vue/micro-frontends/qiankun/base/vite.config.ts.ejs +0 -89
|
@@ -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="E:\project\template\vite-cli\node_modules\.pnpm\sass@1.97.1\node_modules\sass\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\sass@1.97.1\node_modules;E:\project\template\vite-cli\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="/mnt/e/project/template/vite-cli/node_modules/.pnpm/sass@1.97.1/node_modules/sass/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/sass@1.97.1/node_modules:/mnt/e/project/template/vite-cli/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/../../../../../../../node_modules/.pnpm/sass@1.97.1/node_modules/sass/sass.js" $args
|
|
27
|
+
} else {
|
|
28
|
+
& "$basedir/node$exe" "$basedir/../../../../../../../node_modules/.pnpm/sass@1.97.1/node_modules/sass/sass.js" $args
|
|
29
|
+
}
|
|
30
|
+
$ret=$LASTEXITCODE
|
|
31
|
+
} else {
|
|
32
|
+
# Support pipeline input
|
|
33
|
+
if ($MyInvocation.ExpectingInput) {
|
|
34
|
+
$input | & "node$exe" "$basedir/../../../../../../../node_modules/.pnpm/sass@1.97.1/node_modules/sass/sass.js" $args
|
|
35
|
+
} else {
|
|
36
|
+
& "node$exe" "$basedir/../../../../../../../node_modules/.pnpm/sass@1.97.1/node_modules/sass/sass.js" $args
|
|
37
|
+
}
|
|
38
|
+
$ret=$LASTEXITCODE
|
|
39
|
+
}
|
|
40
|
+
$env:NODE_PATH=$env_node_path
|
|
41
|
+
exit $ret
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
+
esac
|
|
7
|
+
|
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
|
9
|
+
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules/terser/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules/terser/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../../../node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/terser" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../../../node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/terser" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@SETLOCAL
|
|
2
|
+
@IF NOT DEFINED NODE_PATH (
|
|
3
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\node_modules\terser\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\node_modules\terser\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules"
|
|
4
|
+
) ELSE (
|
|
5
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\node_modules\terser\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\node_modules\terser\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
6
|
+
)
|
|
7
|
+
@IF EXIST "%~dp0\node.exe" (
|
|
8
|
+
"%~dp0\node.exe" "%~dp0\..\..\..\..\..\..\..\node_modules\.pnpm\terser@5.44.1\node_modules\terser\bin\terser" %*
|
|
9
|
+
) ELSE (
|
|
10
|
+
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
+
node "%~dp0\..\..\..\..\..\..\..\node_modules\.pnpm\terser@5.44.1\node_modules\terser\bin\terser" %*
|
|
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="E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\node_modules\terser\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\node_modules\terser\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\terser@5.44.1\node_modules;E:\project\template\vite-cli\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="/mnt/e/project/template/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules/terser/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules:/mnt/e/project/template/vite-cli/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/../../../../../../../node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/terser" $args
|
|
27
|
+
} else {
|
|
28
|
+
& "$basedir/node$exe" "$basedir/../../../../../../../node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/terser" $args
|
|
29
|
+
}
|
|
30
|
+
$ret=$LASTEXITCODE
|
|
31
|
+
} else {
|
|
32
|
+
# Support pipeline input
|
|
33
|
+
if ($MyInvocation.ExpectingInput) {
|
|
34
|
+
$input | & "node$exe" "$basedir/../../../../../../../node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/terser" $args
|
|
35
|
+
} else {
|
|
36
|
+
& "node$exe" "$basedir/../../../../../../../node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/terser" $args
|
|
37
|
+
}
|
|
38
|
+
$ret=$LASTEXITCODE
|
|
39
|
+
}
|
|
40
|
+
$env:NODE_PATH=$env_node_path
|
|
41
|
+
exit $ret
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
+
esac
|
|
7
|
+
|
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
|
9
|
+
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsc" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsc" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@SETLOCAL
|
|
2
|
+
@IF NOT DEFINED NODE_PATH (
|
|
3
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules"
|
|
4
|
+
) ELSE (
|
|
5
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
6
|
+
)
|
|
7
|
+
@IF EXIST "%~dp0\node.exe" (
|
|
8
|
+
"%~dp0\node.exe" "%~dp0\..\..\..\..\..\..\..\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\tsc" %*
|
|
9
|
+
) ELSE (
|
|
10
|
+
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
+
node "%~dp0\..\..\..\..\..\..\..\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\tsc" %*
|
|
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="E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules;E:\project\template\vite-cli\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="/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules:/mnt/e/project/template/vite-cli/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/../../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsc" $args
|
|
27
|
+
} else {
|
|
28
|
+
& "$basedir/node$exe" "$basedir/../../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsc" $args
|
|
29
|
+
}
|
|
30
|
+
$ret=$LASTEXITCODE
|
|
31
|
+
} else {
|
|
32
|
+
# Support pipeline input
|
|
33
|
+
if ($MyInvocation.ExpectingInput) {
|
|
34
|
+
$input | & "node$exe" "$basedir/../../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsc" $args
|
|
35
|
+
} else {
|
|
36
|
+
& "node$exe" "$basedir/../../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsc" $args
|
|
37
|
+
}
|
|
38
|
+
$ret=$LASTEXITCODE
|
|
39
|
+
}
|
|
40
|
+
$env:NODE_PATH=$env_node_path
|
|
41
|
+
exit $ret
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
+
esac
|
|
7
|
+
|
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
|
9
|
+
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsserver" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsserver" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@SETLOCAL
|
|
2
|
+
@IF NOT DEFINED NODE_PATH (
|
|
3
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules"
|
|
4
|
+
) ELSE (
|
|
5
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
6
|
+
)
|
|
7
|
+
@IF EXIST "%~dp0\node.exe" (
|
|
8
|
+
"%~dp0\node.exe" "%~dp0\..\..\..\..\..\..\..\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\tsserver" %*
|
|
9
|
+
) ELSE (
|
|
10
|
+
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
+
node "%~dp0\..\..\..\..\..\..\..\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\tsserver" %*
|
|
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="E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules\typescript\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\typescript@5.8.3\node_modules;E:\project\template\vite-cli\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="/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/typescript@5.8.3/node_modules:/mnt/e/project/template/vite-cli/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/../../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsserver" $args
|
|
27
|
+
} else {
|
|
28
|
+
& "$basedir/node$exe" "$basedir/../../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsserver" $args
|
|
29
|
+
}
|
|
30
|
+
$ret=$LASTEXITCODE
|
|
31
|
+
} else {
|
|
32
|
+
# Support pipeline input
|
|
33
|
+
if ($MyInvocation.ExpectingInput) {
|
|
34
|
+
$input | & "node$exe" "$basedir/../../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsserver" $args
|
|
35
|
+
} else {
|
|
36
|
+
& "node$exe" "$basedir/../../../../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsserver" $args
|
|
37
|
+
}
|
|
38
|
+
$ret=$LASTEXITCODE
|
|
39
|
+
}
|
|
40
|
+
$env:NODE_PATH=$env_node_path
|
|
41
|
+
exit $ret
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
+
esac
|
|
7
|
+
|
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
|
9
|
+
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../../../node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/cli.mjs" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../../../node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/cli.mjs" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@SETLOCAL
|
|
2
|
+
@IF NOT DEFINED NODE_PATH (
|
|
3
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\tsx@4.21.0\node_modules\tsx\dist\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\tsx@4.21.0\node_modules\tsx\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\tsx@4.21.0\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules"
|
|
4
|
+
) ELSE (
|
|
5
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\tsx@4.21.0\node_modules\tsx\dist\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\tsx@4.21.0\node_modules\tsx\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\tsx@4.21.0\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
6
|
+
)
|
|
7
|
+
@IF EXIST "%~dp0\node.exe" (
|
|
8
|
+
"%~dp0\node.exe" "%~dp0\..\..\..\..\..\..\..\node_modules\.pnpm\tsx@4.21.0\node_modules\tsx\dist\cli.mjs" %*
|
|
9
|
+
) ELSE (
|
|
10
|
+
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
+
node "%~dp0\..\..\..\..\..\..\..\node_modules\.pnpm\tsx@4.21.0\node_modules\tsx\dist\cli.mjs" %*
|
|
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="E:\project\template\vite-cli\node_modules\.pnpm\tsx@4.21.0\node_modules\tsx\dist\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\tsx@4.21.0\node_modules\tsx\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\tsx@4.21.0\node_modules;E:\project\template\vite-cli\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="/mnt/e/project/template/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules:/mnt/e/project/template/vite-cli/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/../../../../../../../node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/cli.mjs" $args
|
|
27
|
+
} else {
|
|
28
|
+
& "$basedir/node$exe" "$basedir/../../../../../../../node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/cli.mjs" $args
|
|
29
|
+
}
|
|
30
|
+
$ret=$LASTEXITCODE
|
|
31
|
+
} else {
|
|
32
|
+
# Support pipeline input
|
|
33
|
+
if ($MyInvocation.ExpectingInput) {
|
|
34
|
+
$input | & "node$exe" "$basedir/../../../../../../../node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/cli.mjs" $args
|
|
35
|
+
} else {
|
|
36
|
+
& "node$exe" "$basedir/../../../../../../../node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/cli.mjs" $args
|
|
37
|
+
}
|
|
38
|
+
$ret=$LASTEXITCODE
|
|
39
|
+
}
|
|
40
|
+
$env:NODE_PATH=$env_node_path
|
|
41
|
+
exit $ret
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
+
esac
|
|
7
|
+
|
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
|
9
|
+
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../../../node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/bin/vite.js" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../../../node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/bin/vite.js" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@SETLOCAL
|
|
2
|
+
@IF NOT DEFINED NODE_PATH (
|
|
3
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b\node_modules\vite\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b\node_modules\vite\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules"
|
|
4
|
+
) ELSE (
|
|
5
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b\node_modules\vite\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b\node_modules\vite\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
6
|
+
)
|
|
7
|
+
@IF EXIST "%~dp0\node.exe" (
|
|
8
|
+
"%~dp0\node.exe" "%~dp0\..\..\..\..\..\..\..\node_modules\.pnpm\vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b\node_modules\vite\bin\vite.js" %*
|
|
9
|
+
) ELSE (
|
|
10
|
+
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
+
node "%~dp0\..\..\..\..\..\..\..\node_modules\.pnpm\vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b\node_modules\vite\bin\vite.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="E:\project\template\vite-cli\node_modules\.pnpm\vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b\node_modules\vite\bin\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b\node_modules\vite\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b\node_modules;E:\project\template\vite-cli\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="/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/bin/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules:/mnt/e/project/template/vite-cli/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/../../../../../../../node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/bin/vite.js" $args
|
|
27
|
+
} else {
|
|
28
|
+
& "$basedir/node$exe" "$basedir/../../../../../../../node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/bin/vite.js" $args
|
|
29
|
+
}
|
|
30
|
+
$ret=$LASTEXITCODE
|
|
31
|
+
} else {
|
|
32
|
+
# Support pipeline input
|
|
33
|
+
if ($MyInvocation.ExpectingInput) {
|
|
34
|
+
$input | & "node$exe" "$basedir/../../../../../../../node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/bin/vite.js" $args
|
|
35
|
+
} else {
|
|
36
|
+
& "node$exe" "$basedir/../../../../../../../node_modules/.pnpm/vite@7.3.0_@types+node@22.1_7c06d9c6f7b7316383c1af6ed786169b/node_modules/vite/bin/vite.js" $args
|
|
37
|
+
}
|
|
38
|
+
$ret=$LASTEXITCODE
|
|
39
|
+
}
|
|
40
|
+
$env:NODE_PATH=$env_node_path
|
|
41
|
+
exit $ret
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
+
esac
|
|
7
|
+
|
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
|
9
|
+
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="/mnt/e/project/template/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@SETLOCAL
|
|
2
|
+
@IF NOT DEFINED NODE_PATH (
|
|
3
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\yaml@2.8.2\node_modules\yaml\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\yaml@2.8.2\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules"
|
|
4
|
+
) ELSE (
|
|
5
|
+
@SET "NODE_PATH=E:\project\template\vite-cli\node_modules\.pnpm\yaml@2.8.2\node_modules\yaml\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\yaml@2.8.2\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
6
|
+
)
|
|
7
|
+
@IF EXIST "%~dp0\node.exe" (
|
|
8
|
+
"%~dp0\node.exe" "%~dp0\..\..\..\..\..\..\..\node_modules\.pnpm\yaml@2.8.2\node_modules\yaml\bin.mjs" %*
|
|
9
|
+
) ELSE (
|
|
10
|
+
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
11
|
+
node "%~dp0\..\..\..\..\..\..\..\node_modules\.pnpm\yaml@2.8.2\node_modules\yaml\bin.mjs" %*
|
|
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="E:\project\template\vite-cli\node_modules\.pnpm\yaml@2.8.2\node_modules\yaml\node_modules;E:\project\template\vite-cli\node_modules\.pnpm\yaml@2.8.2\node_modules;E:\project\template\vite-cli\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="/mnt/e/project/template/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/node_modules:/mnt/e/project/template/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules:/mnt/e/project/template/vite-cli/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/../../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" $args
|
|
27
|
+
} else {
|
|
28
|
+
& "$basedir/node$exe" "$basedir/../../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" $args
|
|
29
|
+
}
|
|
30
|
+
$ret=$LASTEXITCODE
|
|
31
|
+
} else {
|
|
32
|
+
# Support pipeline input
|
|
33
|
+
if ($MyInvocation.ExpectingInput) {
|
|
34
|
+
$input | & "node$exe" "$basedir/../../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" $args
|
|
35
|
+
} else {
|
|
36
|
+
& "node$exe" "$basedir/../../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" $args
|
|
37
|
+
}
|
|
38
|
+
$ret=$LASTEXITCODE
|
|
39
|
+
}
|
|
40
|
+
$env:NODE_PATH=$env_node_path
|
|
41
|
+
exit $ret
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature 设置模块 - Qiankun 微前端模式
|
|
3
|
+
* 使用 Vite 的 glob 导入自动发现并加载所有 feature 模块
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Router } from 'react-router-dom'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Feature 模块接口
|
|
10
|
+
*/
|
|
11
|
+
interface FeatureModule {
|
|
12
|
+
/** 初始化 feature 的设置函数 */
|
|
13
|
+
setup?: (router?: Router) => void | Promise<void>
|
|
14
|
+
/** 执行顺序(数字越小越先执行) */
|
|
15
|
+
order?: number
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// 自动发现所有 feature 模块
|
|
19
|
+
const featureModules = import.meta.glob('./features/*.ts', { eager: true })
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 设置所有 features
|
|
23
|
+
* @param router - React Router 实例(可选)
|
|
24
|
+
*/
|
|
25
|
+
export async function setupFeatures(router?: Router): Promise<void> {
|
|
26
|
+
const modules = Object.values(featureModules) as FeatureModule[]
|
|
27
|
+
|
|
28
|
+
// 按顺序排序(默认 100)
|
|
29
|
+
modules.sort((a, b) => (a.order ?? 100) - (b.order ?? 100))
|
|
30
|
+
|
|
31
|
+
for (const mod of modules) {
|
|
32
|
+
await mod.setup?.(router)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,49 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Application entry file - Qiankun micro-frontend mode
|
|
3
|
+
* Initialize React application and mount to DOM (supports qiankun lifecycle)
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { qiankunWindow, renderWithQiankun } from 'vite-plugin-qiankun/dist/helper'
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import ReactDOM from 'react-dom/client'
|
|
9
9
|
import { RouterProvider } from 'react-router-dom'
|
|
10
|
-
<% if (i18n) { -%>
|
|
11
|
-
import '@/locales'
|
|
12
|
-
<% } -%>
|
|
13
|
-
<% if (sentry) { -%>
|
|
14
|
-
import { initSentry } from '@/utils/sentry'
|
|
15
|
-
<% } -%>
|
|
16
10
|
import { createRouter } from '@/router'
|
|
11
|
+
import { setupFeatures } from './main/index'
|
|
17
12
|
|
|
18
|
-
//
|
|
19
|
-
<% if (uiLibrary === 'ant-design') { -%>
|
|
20
|
-
import 'antd/dist/reset.css'
|
|
21
|
-
<% } -%>
|
|
13
|
+
// Import styles
|
|
22
14
|
import '@/assets/styles/main.scss'
|
|
23
15
|
import '@/assets/fonts/index.css'
|
|
24
16
|
|
|
25
|
-
<% if (sentry) { -%>
|
|
26
|
-
// 初始化 Sentry
|
|
27
|
-
initSentry({
|
|
28
|
-
dsn: import.meta.env.VITE_SENTRY_DSN,
|
|
29
|
-
environment: import.meta.env.MODE,
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
<% } -%>
|
|
33
17
|
let root: ReturnType<typeof ReactDOM.createRoot> | null = null
|
|
34
18
|
|
|
35
19
|
/**
|
|
36
|
-
*
|
|
37
|
-
* @param props
|
|
20
|
+
* Render application
|
|
21
|
+
* @param props - Render props from qiankun
|
|
38
22
|
*/
|
|
39
23
|
async function render(props: Record<string, unknown> = {}): Promise<void> {
|
|
40
24
|
const { container } = props as { container?: Element }
|
|
41
|
-
|
|
25
|
+
|
|
42
26
|
const basename = qiankunWindow.__POWERED_BY_QIANKUN__
|
|
43
27
|
? (qiankunWindow as { __INJECTED_PUBLIC_PATH_BY_QIANKUN__?: string }).__INJECTED_PUBLIC_PATH_BY_QIANKUN__?.split('/')[1]
|
|
44
28
|
: undefined
|
|
45
29
|
const router = createRouter({ basename })
|
|
46
30
|
|
|
31
|
+
// Setup all features (i18n, sentry, etc.)
|
|
32
|
+
await setupFeatures(router)
|
|
33
|
+
|
|
47
34
|
const containerElement = container
|
|
48
35
|
? container.querySelector('#root') || container
|
|
49
36
|
: document.getElementById('root')!
|
|
@@ -56,13 +43,13 @@ async function render(props: Record<string, unknown> = {}): Promise<void> {
|
|
|
56
43
|
)
|
|
57
44
|
}
|
|
58
45
|
|
|
59
|
-
// Qiankun
|
|
46
|
+
// Qiankun lifecycle
|
|
60
47
|
if (!qiankunWindow.__POWERED_BY_QIANKUN__) {
|
|
61
|
-
//
|
|
48
|
+
// Standalone mode
|
|
62
49
|
render({})
|
|
63
50
|
}
|
|
64
51
|
else {
|
|
65
|
-
//
|
|
52
|
+
// Micro-frontend mode
|
|
66
53
|
renderWithQiankun({
|
|
67
54
|
async mount(props: Record<string, unknown>) {
|
|
68
55
|
await render(props)
|
|
@@ -80,4 +67,3 @@ else {
|
|
|
80
67
|
},
|
|
81
68
|
})
|
|
82
69
|
}
|
|
83
|
-
|