@moluoxixi/create-app 2.0.443 → 2.0.444
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 +0 -2
- package/dist/commands/create.js +0 -1
- package/dist/core/projectAtom.d.ts +43 -0
- package/dist/core/projectAtom.js +146 -0
- package/dist/core/projectOutput.d.ts +11 -0
- package/dist/core/projectOutput.js +402 -0
- package/dist/core/template.js +5 -0
- package/dist/generators/project.js +4 -1
- package/dist/types/features.d.ts +0 -2
- package/dist/types/features.js +0 -2
- package/package.json +2 -1
- package/templates/common/base/node_modules/.bin/autoprefixer +2 -2
- package/templates/common/base/node_modules/.bin/browserslist +4 -4
- package/templates/common/base/node_modules/.bin/jiti +4 -4
- package/templates/common/base/node_modules/.bin/sass +2 -2
- package/templates/common/base/node_modules/.bin/uuid +2 -2
- package/templates/common/base/node_modules/.bin/vite +2 -2
- package/templates/common/base/node_modules/.bin/yaml +4 -4
- package/templates/common/base/package.json +2 -4
- package/templates/common/features/eslint/node_modules/.bin/browserslist +4 -4
- package/templates/common/features/eslint/node_modules/.bin/eslint +2 -2
- package/templates/common/features/eslint/node_modules/.bin/jiti +4 -4
- package/templates/common/features/eslint/node_modules/.bin/sass +4 -4
- package/templates/common/features/eslint/node_modules/.bin/vite +17 -0
- package/templates/common/features/eslint/node_modules/.bin/vitest +4 -4
- package/templates/common/features/eslint/node_modules/.bin/yaml +4 -4
- package/templates/common/features/husky/node_modules/.bin/commitizen +2 -2
- package/templates/common/features/husky/node_modules/.bin/commitlint +2 -2
- package/templates/common/features/husky/node_modules/.bin/cz +2 -2
- package/templates/common/features/husky/node_modules/.bin/cz-cust +2 -2
- package/templates/common/features/husky/node_modules/.bin/cz-customizable +2 -2
- package/templates/common/features/husky/node_modules/.bin/git-cz +2 -2
- package/templates/react/base/env.d.ts +1 -0
- package/templates/react/base/node_modules/.bin/jiti +4 -4
- package/templates/react/base/node_modules/.bin/sass +4 -4
- package/templates/react/base/node_modules/.bin/vite +4 -4
- package/templates/react/base/node_modules/.bin/yaml +4 -4
- package/templates/react/features/manualRoutes/tsconfig.base.json +0 -1
- package/templates/react/features/pageRoutes/node_modules/.bin/jiti +4 -4
- package/templates/react/features/pageRoutes/node_modules/.bin/sass +4 -4
- package/templates/react/features/pageRoutes/node_modules/.bin/vite +4 -4
- package/templates/react/features/pageRoutes/node_modules/.bin/yaml +4 -4
- package/templates/react/features/pageRoutes/package.json +0 -1
- package/templates/react/features/pageRoutes/tsconfig.base.json +0 -1
- package/templates/react/features/sentry/package.json +1 -3
- package/templates/react/features/zustand/tsconfig.base.json +0 -1
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/jiti +4 -4
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/sass +4 -4
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/vite +2 -2
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/yaml +4 -4
- package/templates/react/micro-frontends/qiankun/base/package.json +1 -2
- package/templates/react/micro-frontends/qiankun/base/tsconfig.base.json +0 -1
- package/templates/vue/base/atom.mjs +26 -0
- package/templates/vue/base/env.d.ts +1 -0
- package/templates/vue/base/node_modules/.bin/jiti +17 -0
- package/templates/{react/features/sentry → vue/base}/node_modules/.bin/sass +4 -4
- package/templates/vue/{features/sentry → base}/node_modules/.bin/tsx +2 -2
- package/templates/vue/base/node_modules/.bin/vite +17 -0
- package/templates/vue/base/node_modules/.bin/vue-tsc +2 -2
- package/templates/vue/{features/sentry → base}/node_modules/.bin/yaml +4 -4
- package/templates/vue/base/package.json +1 -0
- package/templates/vue/base/src/types/index.ts +16 -0
- package/templates/vue/features/element-plus/atom.mjs +35 -0
- package/templates/vue/features/element-plus/node_modules/.bin/parser +4 -4
- package/templates/vue/features/element-plus/package.json +3 -2
- package/templates/vue/features/element-plus/src/components/SubMenu/src/index.vue +1 -1
- package/templates/vue/features/i18n/atom.mjs +11 -0
- package/templates/vue/features/pageRoutes/atom.mjs +15 -0
- package/templates/vue/features/pageRoutes/node_modules/.bin/jiti +4 -4
- package/templates/vue/features/pageRoutes/node_modules/.bin/sass +4 -4
- package/templates/vue/features/pageRoutes/node_modules/.bin/vite +4 -4
- package/templates/vue/features/pageRoutes/node_modules/.bin/yaml +4 -4
- package/templates/vue/features/pageRoutes/package.json +0 -1
- package/templates/vue/features/pinia/atom.mjs +11 -0
- package/templates/vue/features/sentry/atom.mjs +35 -0
- package/templates/vue/features/sentry/package.json +1 -3
- package/templates/vue/micro-frontends/qiankun/base/atom.mjs +19 -0
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/jiti +4 -4
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/sass +4 -4
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/vite +2 -2
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/yaml +4 -4
- package/templates/vue/micro-frontends/qiankun/base/package.json +0 -2
- package/templates/vue/micro-frontends/qiankun/base/src/types/index.ts +16 -0
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/jiti +4 -4
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/parser +4 -4
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/sass +4 -4
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/vite +4 -4
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/yaml +4 -4
- package/templates/vue/micro-frontends/qiankun/features/element-plus/package.json +3 -2
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/components/SubMenu/src/index.vue +1 -1
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/jiti +4 -4
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/sass +4 -4
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/vite +4 -4
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/yaml +4 -4
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/jiti +4 -4
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/sass +4 -4
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/vite +4 -4
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/yaml +4 -4
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/package.json +0 -1
- package/templates/common/base/node_modules/.bin/parser +0 -17
- package/templates/common/base/node_modules/.bin/rollup +0 -17
- package/templates/common/base/node_modules/.bin/terser +0 -17
- package/templates/common/base/vite/index.ts +0 -54
- package/templates/common/base/vite.config.ts +0 -58
- package/templates/common/features/eslint/node_modules/.bin/terser +0 -17
- package/templates/react/base/node_modules/.bin/terser +0 -17
- package/templates/react/base/src/main/index.ts +0 -34
- package/templates/react/base/src/main.tsx +0 -34
- package/templates/react/features/ant-design/src/main/features/ant-design.ts +0 -21
- package/templates/react/features/i18n/src/main/features/i18n.ts +0 -19
- package/templates/react/features/pageRoutes/node_modules/.bin/browserslist +0 -17
- package/templates/react/features/pageRoutes/node_modules/.bin/parser +0 -17
- package/templates/react/features/pageRoutes/node_modules/.bin/rollup +0 -17
- package/templates/react/features/pageRoutes/node_modules/.bin/terser +0 -17
- package/templates/react/features/pageRoutes/node_modules/.bin/tsc +0 -17
- package/templates/react/features/pageRoutes/node_modules/.bin/tsserver +0 -17
- package/templates/react/features/pageRoutes/vite/features/pageRoutes.ts +0 -15
- package/templates/react/features/sentry/node_modules/.bin/browserslist +0 -17
- package/templates/react/features/sentry/node_modules/.bin/jiti +0 -17
- package/templates/react/features/sentry/node_modules/.bin/parser +0 -17
- package/templates/react/features/sentry/node_modules/.bin/rollup +0 -17
- package/templates/react/features/sentry/node_modules/.bin/terser +0 -17
- package/templates/react/features/sentry/node_modules/.bin/tsc +0 -17
- package/templates/react/features/sentry/node_modules/.bin/tsserver +0 -17
- package/templates/react/features/sentry/node_modules/.bin/tsx +0 -17
- package/templates/react/features/sentry/node_modules/.bin/vite +0 -17
- package/templates/react/features/sentry/node_modules/.bin/yaml +0 -17
- package/templates/react/features/sentry/src/main/features/sentry.ts +0 -20
- package/templates/react/features/sentry/vite/features/sentry.ts +0 -33
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/browserslist +0 -17
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/parser +0 -17
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/rollup +0 -17
- package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/terser +0 -17
- package/templates/react/micro-frontends/qiankun/base/src/main/index.ts +0 -34
- package/templates/react/micro-frontends/qiankun/base/src/main.tsx +0 -69
- package/templates/react/micro-frontends/qiankun/base/vite/index.ts +0 -54
- package/templates/vue/base/src/main/index.ts +0 -36
- package/templates/vue/base/src/main.ts +0 -34
- package/templates/vue/features/ant-design-vue/src/main/features/ant-design-vue.ts +0 -18
- package/templates/vue/features/element-plus/node_modules/.bin/browserslist +0 -17
- package/templates/vue/features/element-plus/node_modules/.bin/jiti +0 -17
- package/templates/vue/features/element-plus/node_modules/.bin/rollup +0 -17
- package/templates/vue/features/element-plus/node_modules/.bin/sass +0 -17
- package/templates/vue/features/element-plus/node_modules/.bin/terser +0 -17
- package/templates/vue/features/element-plus/node_modules/.bin/tsx +0 -17
- package/templates/vue/features/element-plus/node_modules/.bin/vite +0 -17
- package/templates/vue/features/element-plus/node_modules/.bin/yaml +0 -17
- package/templates/vue/features/element-plus/src/main/features/element-plus.ts +0 -23
- package/templates/vue/features/element-plus/vite/features/element-plus.ts +0 -30
- package/templates/vue/features/i18n/src/main/features/i18n.ts +0 -19
- package/templates/vue/features/pageRoutes/node_modules/.bin/browserslist +0 -17
- package/templates/vue/features/pageRoutes/node_modules/.bin/parser +0 -17
- package/templates/vue/features/pageRoutes/node_modules/.bin/rollup +0 -17
- package/templates/vue/features/pageRoutes/node_modules/.bin/terser +0 -17
- package/templates/vue/features/pageRoutes/vite/features/pageRoutes.ts +0 -15
- package/templates/vue/features/pinia/src/main/features/pinia.ts +0 -19
- package/templates/vue/features/sentry/node_modules/.bin/browserslist +0 -17
- package/templates/vue/features/sentry/node_modules/.bin/jiti +0 -17
- package/templates/vue/features/sentry/node_modules/.bin/parser +0 -17
- package/templates/vue/features/sentry/node_modules/.bin/rollup +0 -17
- package/templates/vue/features/sentry/node_modules/.bin/sass +0 -17
- package/templates/vue/features/sentry/node_modules/.bin/terser +0 -17
- package/templates/vue/features/sentry/node_modules/.bin/vite +0 -17
- package/templates/vue/features/sentry/src/main/features/sentry.ts +0 -22
- package/templates/vue/features/sentry/vite/features/sentry.ts +0 -33
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/browserslist +0 -17
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/parser +0 -17
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/rollup +0 -17
- package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/terser +0 -17
- package/templates/vue/micro-frontends/qiankun/base/src/main/index.ts +0 -36
- package/templates/vue/micro-frontends/qiankun/base/src/main.ts +0 -70
- package/templates/vue/micro-frontends/qiankun/base/vite/index.ts +0 -54
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/browserslist +0 -17
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/rollup +0 -17
- package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/terser +0 -17
- package/templates/vue/micro-frontends/qiankun/features/element-plus/src/main/features/element-plus.ts +0 -24
- package/templates/vue/micro-frontends/qiankun/features/element-plus/vite/features/element-plus.ts +0 -30
- package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/terser +0 -17
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/browserslist +0 -17
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/parser +0 -17
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/rollup +0 -17
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/terser +0 -17
- package/templates/vue/micro-frontends/qiankun/features/pageRoutes/vite/features/pageRoutes.ts +0 -15
- /package/templates/vue/features/element-plus/src/components/SubMenu/src/{_types → types}/index.ts +0 -0
- /package/templates/vue/features/element-plus/src/components/SubMenu/src/{_types → types}/props.ts +0 -0
- /package/templates/vue/micro-frontends/qiankun/features/element-plus/src/components/SubMenu/src/{_types → types}/index.ts +0 -0
- /package/templates/vue/micro-frontends/qiankun/features/element-plus/src/components/SubMenu/src/{_types → types}/props.ts +0 -0
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules:/home/runner/work/vite-cli/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/rollup@4.59.0/node_modules/rollup/dist/bin/rollup" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/rollup" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/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.46.0/node_modules/terser/bin/terser" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/terser" "$@"
|
|
17
|
-
fi
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PageRoutes Vite 配置
|
|
3
|
-
* 启用文件系统路由 (vite-plugin-pages)
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { ViteConfigType, ViteFeatureContext } from '@moluoxixi/vite-config'
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* 获取 PageRoutes 配置
|
|
10
|
-
* @param _ctx - feature 配置上下文(未使用)
|
|
11
|
-
* @returns Config 配置(与 ViteConfigType 结构一致)
|
|
12
|
-
*/
|
|
13
|
-
export default (_ctx: ViteFeatureContext): Partial<ViteConfigType> => ({
|
|
14
|
-
pageRoutes: true,
|
|
15
|
-
})
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pinia 状态管理 feature 设置
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import type { App } from 'vue'
|
|
6
|
-
import type { Router } from 'vue-router'
|
|
7
|
-
import { store } from '@/stores'
|
|
8
|
-
|
|
9
|
-
/** 执行顺序 - pinia 应该尽早加载 */
|
|
10
|
-
export const order = 10
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 设置 Pinia store
|
|
14
|
-
* @param app - Vue 应用实例
|
|
15
|
-
* @param _router - Vue Router 实例(未使用)
|
|
16
|
-
*/
|
|
17
|
-
export function setup(app: App, _router: Router): void {
|
|
18
|
-
app.use(store)
|
|
19
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules:/home/runner/work/vite-cli/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/browserslist@4.28.1/node_modules/browserslist/cli.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/cli.js" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/jiti@2.6.1/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/jiti@2.6.1/node_modules:/home/runner/work/vite-cli/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/jiti@2.6.1/node_modules/jiti/lib/jiti-cli.mjs" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti-cli.mjs" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules:/home/runner/work/vite-cli/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/@babel+parser@7.29.0/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules:/home/runner/work/vite-cli/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/rollup@4.59.0/node_modules/rollup/dist/bin/rollup" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/rollup" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules/sass/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules/sass/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules:/home/runner/work/vite-cli/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/sass@1.97.3/node_modules/sass/sass.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../node_modules/.pnpm/sass@1.97.3/node_modules/sass/sass.js" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/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.46.0/node_modules/terser/bin/terser" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/terser" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules/vite/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules/vite/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules/vite/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules/vite/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules:/home/runner/work/vite-cli/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@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules/vite/bin/vite.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../node_modules/.pnpm/vite@6.2.4_@types+node@22.19.13_jiti@2.6.1_lightningcss@1.31.1_sass-embedded@1.97.3_sas_08f388d2f9500190751853ac93a1a9a2/node_modules/vite/bin/vite.js" "$@"
|
|
17
|
-
fi
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sentry 错误监控 feature 设置
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import type { App } from 'vue'
|
|
6
|
-
import type { Router } from 'vue-router'
|
|
7
|
-
import { initSentry } from '@/utils/sentry'
|
|
8
|
-
|
|
9
|
-
/** 执行顺序 - sentry 应该在 router 之后初始化 */
|
|
10
|
-
export const order = 30
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 设置 Sentry
|
|
14
|
-
* @param app - Vue 应用实例
|
|
15
|
-
* @param router - Vue Router 实例
|
|
16
|
-
*/
|
|
17
|
-
export function setup(app: App, router: Router): void {
|
|
18
|
-
initSentry(app, router, {
|
|
19
|
-
dsn: import.meta.env.VITE_SENTRY_DSN,
|
|
20
|
-
environment: import.meta.env.MODE,
|
|
21
|
-
})
|
|
22
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sentry Vite 插件配置
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import process from 'node:process'
|
|
6
|
-
import { sentryVitePlugin } from '@sentry/vite-plugin'
|
|
7
|
-
import type { ViteConfigType, ViteFeatureContext } from '@moluoxixi/vite-config'
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* 获取 Sentry Vite 配置
|
|
11
|
-
* @param ctx - feature 配置上下文
|
|
12
|
-
* @param ctx.viteEnv - Vite 环境变量
|
|
13
|
-
* @param ctx.mode - 构建模式
|
|
14
|
-
* @returns Config 配置(与 ViteConfigType 结构一致)
|
|
15
|
-
*/
|
|
16
|
-
export default ({ viteEnv, mode }: ViteFeatureContext): Partial<ViteConfigType> => ({
|
|
17
|
-
viteConfig: {
|
|
18
|
-
plugins: [
|
|
19
|
-
viteEnv.VITE_SENTRY && mode === 'production' && sentryVitePlugin({
|
|
20
|
-
authToken: process.env.SENTRY_AUTH_TOKEN,
|
|
21
|
-
org: 'f1f562b9b82f',
|
|
22
|
-
project: 'javascript-vue',
|
|
23
|
-
sourcemaps: {
|
|
24
|
-
assets: './dist/**',
|
|
25
|
-
ignore: ['node_modules'],
|
|
26
|
-
},
|
|
27
|
-
release: {
|
|
28
|
-
name: viteEnv.VITE_APP_VERSION || 'unknown',
|
|
29
|
-
},
|
|
30
|
-
}),
|
|
31
|
-
].filter(Boolean),
|
|
32
|
-
},
|
|
33
|
-
})
|
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules:/home/runner/work/vite-cli/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/browserslist@4.28.1/node_modules/browserslist/cli.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/cli.js" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@babel+parser@7.29.0/node_modules:/home/runner/work/vite-cli/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/@babel+parser@7.29.0/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../../node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/bin/babel-parser.js" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules:/home/runner/work/vite-cli/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/rollup@4.59.0/node_modules/rollup/dist/bin/rollup" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../../node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/rollup" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/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.46.0/node_modules/terser/bin/terser" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../../node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/terser" "$@"
|
|
17
|
-
fi
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Feature 设置模块 - Qiankun 微前端模式
|
|
3
|
-
* 使用 Vite 的 glob 导入自动发现并加载所有 feature 模块
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { App } from 'vue'
|
|
7
|
-
import type { Router } from 'vue-router'
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Feature 模块接口
|
|
11
|
-
*/
|
|
12
|
-
interface FeatureModule {
|
|
13
|
-
/** 初始化 feature 的设置函数 */
|
|
14
|
-
setup?: (app: App, router: Router) => void | Promise<void>
|
|
15
|
-
/** 执行顺序(数字越小越先执行) */
|
|
16
|
-
order?: number
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// 自动发现所有 feature 模块
|
|
20
|
-
const featureModules = import.meta.glob('./features/*.ts', { eager: true })
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* 设置所有 features
|
|
24
|
-
* @param app - Vue 应用实例
|
|
25
|
-
* @param router - Vue Router 实例
|
|
26
|
-
*/
|
|
27
|
-
export async function setupFeatures(app: App, router: Router): Promise<void> {
|
|
28
|
-
const modules = Object.values(featureModules) as FeatureModule[]
|
|
29
|
-
|
|
30
|
-
// 按顺序排序(默认 100)
|
|
31
|
-
modules.sort((a, b) => (a.order ?? 100) - (b.order ?? 100))
|
|
32
|
-
|
|
33
|
-
for (const mod of modules) {
|
|
34
|
-
await mod.setup?.(app, router)
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Application entry file - Qiankun micro-frontend mode
|
|
3
|
-
* Initialize Vue application and mount to DOM (supports qiankun lifecycle)
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { qiankunWindow, renderWithQiankun } from 'vite-plugin-qiankun/dist/helper'
|
|
7
|
-
import { createApp } from 'vue'
|
|
8
|
-
import directives from '@/directives'
|
|
9
|
-
import { store } from '@/stores'
|
|
10
|
-
import App from '@/App.vue'
|
|
11
|
-
import getRouter from '@/router'
|
|
12
|
-
import { setupFeatures } from './main/index'
|
|
13
|
-
|
|
14
|
-
// Import styles
|
|
15
|
-
import './assets/styles/main.scss'
|
|
16
|
-
import './assets/fonts/index.css'
|
|
17
|
-
|
|
18
|
-
let app: ReturnType<typeof createApp> | null = null
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Render application
|
|
22
|
-
* @param props - Render props from qiankun
|
|
23
|
-
*/
|
|
24
|
-
async function render(props: Record<string, unknown> = {}): Promise<void> {
|
|
25
|
-
const { container } = props as { container?: Element }
|
|
26
|
-
app = createApp(App)
|
|
27
|
-
|
|
28
|
-
directives(app)
|
|
29
|
-
const router = getRouter(props)
|
|
30
|
-
|
|
31
|
-
// Setup all features (i18n, sentry, etc.)
|
|
32
|
-
await setupFeatures(app, router)
|
|
33
|
-
|
|
34
|
-
app.use(store)
|
|
35
|
-
app.use(router)
|
|
36
|
-
app.config.warnHandler = () => null
|
|
37
|
-
|
|
38
|
-
if (container) {
|
|
39
|
-
const root = container.querySelector('#app')
|
|
40
|
-
app.mount(root!)
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
app.mount('#app')
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Qiankun lifecycle
|
|
48
|
-
if (!qiankunWindow.__POWERED_BY_QIANKUN__) {
|
|
49
|
-
// Standalone mode
|
|
50
|
-
render({})
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
// Micro-frontend mode
|
|
54
|
-
renderWithQiankun({
|
|
55
|
-
async mount(props: Record<string, unknown>) {
|
|
56
|
-
await render(props)
|
|
57
|
-
},
|
|
58
|
-
bootstrap() {
|
|
59
|
-
console.log('[Qiankun] Vue app bootstrapped')
|
|
60
|
-
},
|
|
61
|
-
unmount() {
|
|
62
|
-
app?.unmount()
|
|
63
|
-
app = null
|
|
64
|
-
console.log('[Qiankun] Vue app unmounted')
|
|
65
|
-
},
|
|
66
|
-
update() {
|
|
67
|
-
console.log('[Qiankun] Vue app updated')
|
|
68
|
-
},
|
|
69
|
-
})
|
|
70
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs'
|
|
2
|
-
import path from 'node:path'
|
|
3
|
-
import { fileURLToPath } from 'node:url'
|
|
4
|
-
import { mergeConfig } from 'vite'
|
|
5
|
-
import type { UserConfig } from 'vite'
|
|
6
|
-
import type { ViteConfigType, ViteFeatureContext } from '@moluoxixi/vite-config'
|
|
7
|
-
import { createJiti } from 'jiti'
|
|
8
|
-
|
|
9
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
10
|
-
const _require = createJiti(import.meta.url, { interopDefault: true })
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 加载所有 feature 的 Vite 配置
|
|
14
|
-
* @param ctx - feature 配置上下文
|
|
15
|
-
* @returns 合并后的 Config 配置(与 ViteConfigType 结构一致)
|
|
16
|
-
*/
|
|
17
|
-
export function loadFeatureConfigs(ctx: ViteFeatureContext): Partial<ViteConfigType> {
|
|
18
|
-
const featuresDir = path.resolve(__dirname, 'features')
|
|
19
|
-
|
|
20
|
-
if (!fs.existsSync(featuresDir)) {
|
|
21
|
-
return {}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const featureFiles = fs.readdirSync(featuresDir).filter(f => f.endsWith('.ts'))
|
|
25
|
-
const viteConfigs: UserConfig[] = []
|
|
26
|
-
let mergedConfig: Partial<ViteConfigType> = {}
|
|
27
|
-
|
|
28
|
-
for (const file of featureFiles) {
|
|
29
|
-
try {
|
|
30
|
-
const filePath = path.resolve(featuresDir, file)
|
|
31
|
-
const mod = _require(filePath)
|
|
32
|
-
const config = mod.default(ctx) as Partial<ViteConfigType> | undefined
|
|
33
|
-
if (config) {
|
|
34
|
-
// 提取 viteConfig 单独合并
|
|
35
|
-
const { viteConfig, ...restConfig } = config
|
|
36
|
-
if (viteConfig && typeof viteConfig !== 'function') {
|
|
37
|
-
viteConfigs.push(viteConfig)
|
|
38
|
-
}
|
|
39
|
-
// 合并其他配置(pageRoutes, autoComponent 等)
|
|
40
|
-
mergedConfig = { ...mergedConfig, ...restConfig }
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
catch (e) {
|
|
44
|
-
console.warn(`[Vite] Failed to load feature config: ${file}`, e)
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// 合并所有 viteConfig
|
|
49
|
-
if (viteConfigs.length > 0) {
|
|
50
|
-
mergedConfig.viteConfig = viteConfigs.reduce((acc, cfg) => mergeConfig(acc, cfg), {} as UserConfig)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return mergedConfig
|
|
54
|
-
}
|
package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/browserslist
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/browserslist@4.28.1/node_modules:/home/runner/work/vite-cli/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/browserslist@4.28.1/node_modules/browserslist/cli.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/cli.js" "$@"
|
|
17
|
-
fi
|
package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/rollup
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/rollup@4.59.0/node_modules:/home/runner/work/vite-cli/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/rollup@4.59.0/node_modules/rollup/dist/bin/rollup" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../../../node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/rollup" "$@"
|
|
17
|
-
fi
|
package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/terser
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/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.46.0/node_modules/terser/bin/terser" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../../../../node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/terser" "$@"
|
|
17
|
-
fi
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Element Plus UI 组件库 feature 设置 - Qiankun 模式
|
|
3
|
-
* 导入 Element Plus 样式,包括 qiankun 修复
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { App } from 'vue'
|
|
7
|
-
import type { Router } from 'vue-router'
|
|
8
|
-
|
|
9
|
-
// 导入 Element Plus 样式,包括 qiankun 修复
|
|
10
|
-
import '@/assets/styles/element/index.scss'
|
|
11
|
-
import '@/assets/styles/element/fixQiankun.scss'
|
|
12
|
-
|
|
13
|
-
/** 执行顺序 - 样式应该尽早加载 */
|
|
14
|
-
export const order = 5
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* 设置 Element Plus
|
|
18
|
-
* @param _app - Vue 应用实例(未使用,样式已导入)
|
|
19
|
-
* @param _router - Vue Router 实例(未使用)
|
|
20
|
-
*/
|
|
21
|
-
export function setup(_app: App, _router: Router): void {
|
|
22
|
-
// Element Plus 通过 unplugin-vue-components 自动导入
|
|
23
|
-
// 只需要导入样式
|
|
24
|
-
}
|
package/templates/vue/micro-frontends/qiankun/features/element-plus/vite/features/element-plus.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Element Plus Vite 配置 - Qiankun 模式
|
|
3
|
-
* 为 Element Plus 添加 SCSS 命名空间配置
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { ViteConfigType, ViteFeatureContext } from '@moluoxixi/vite-config'
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* 获取 Element Plus Vite 配置
|
|
10
|
-
* @param ctx - feature 配置上下文
|
|
11
|
-
* @param ctx.appCode - 应用代码,用于 SCSS 命名空间
|
|
12
|
-
* @returns Config 配置(与 ViteConfigType 结构一致)
|
|
13
|
-
*/
|
|
14
|
-
export default ({ appCode }: ViteFeatureContext): Partial<ViteConfigType> => ({
|
|
15
|
-
viteConfig: {
|
|
16
|
-
css: {
|
|
17
|
-
preprocessorOptions: {
|
|
18
|
-
scss: {
|
|
19
|
-
additionalData: (source: string, filename: string) => {
|
|
20
|
-
if (filename.includes('assets/styles/element/index.scss')) {
|
|
21
|
-
return `$namespace: ${appCode || 'el'};
|
|
22
|
-
${source}`
|
|
23
|
-
}
|
|
24
|
-
return source
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
})
|