@seayoo-web/scripts 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -72,18 +72,20 @@ function getBuildEnv(command, mode) {
72
72
  const s = `${EnvPrefix}SENTRY_AUTH_TOKEN`;
73
73
  const u = `${EnvPrefix}DEPLOY_USER`;
74
74
  const k = `${EnvPrefix}DEPLOY_KEY`;
75
- const execDir = process.cwd().replace(/\\/g, "/").split("/").slice(-2).join("/");
75
+ const paths = process.cwd().replace(/\\/g, "/").split("/");
76
+ const execDirWithPackage = paths.slice(-2).join("/");
77
+ const execDir = paths.slice(-1)[0];
76
78
  const packageFile = join(process.cwd(), "./package.json");
77
79
  if (!existsSync(packageFile)) {
78
80
  console.error("执行代码有误,没有找到 package.json".red);
79
81
  process.exit(1);
80
82
  }
81
83
  const packageJson = JSON.parse(readFileSync(packageFile, { encoding: "utf-8" }).toString());
82
- if (!packageJson || !packageJson.name || packageJson.name !== `@${execDir}`) {
83
- console.error(`工程 package.json/name 属性设置错误,应该跟目录保持一致(@${execDir}),请先调整`.red);
84
+ if (!packageJson || !packageJson.name || !(packageJson.name + "").endsWith(`/${execDir}`)) {
85
+ console.error(`工程 package.json/name 属性设置错误,应该跟目录名保持一致,请先调整`.red);
84
86
  process.exit(1);
85
87
  }
86
- envConfig.page = execDir;
88
+ envConfig.page = execDirWithPackage;
87
89
  if (envConfig.command === "build") {
88
90
  if (process.env.NODE_ENV !== "production") {
89
91
  console.error("部署时需要设置 NODE_ENV 为 production,请检查环境变量设置".red);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seayoo-web/scripts",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "scripts for seayoo web repos",
5
5
  "type": "module",
6
6
  "source": "index.ts",
@@ -33,9 +33,9 @@
33
33
  "access": "public"
34
34
  },
35
35
  "dependencies": {
36
- "@sentry/vite-plugin": "^3.2.2",
37
- "@vitejs/plugin-legacy": "^6.0.2",
38
- "@vitejs/plugin-vue": "^5.2.2",
36
+ "@sentry/vite-plugin": "^3.3.1",
37
+ "@vitejs/plugin-legacy": "^6.1.0",
38
+ "@vitejs/plugin-vue": "^5.2.3",
39
39
  "@vue/eslint-config-prettier": "^10.2.0",
40
40
  "@vue/eslint-config-typescript": "^14.5.0",
41
41
  "colors": "^1.4.0",
@@ -43,21 +43,21 @@
43
43
  "eslint-plugin-import": "^2.31.0",
44
44
  "eslint-plugin-vue": "^9.33.0",
45
45
  "fs-extra": "^11.3.0",
46
- "inquirer": "^12.5.0",
46
+ "inquirer": "^12.5.2",
47
47
  "jiti": "^2.4.2",
48
48
  "ora": "^8.2.0",
49
49
  "postcss-html": "^1.8.0",
50
50
  "terser": "^5.39.0",
51
51
  "vite-plugin-stylelint": "^6.0.0",
52
- "vite-plugin-vue-devtools": "^7.7.2",
52
+ "vite-plugin-vue-devtools": "^7.7.5",
53
53
  "@seayoo-web/finder": "^2.0.13"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/fs-extra": "^11.0.4",
57
- "@types/node": "^22.13.10",
58
- "@typescript-eslint/utils": "^8.26.1",
59
- "eslint": "^9.22.0",
60
- "stylelint": "^16.16.0",
57
+ "@types/node": "^22.14.1",
58
+ "@typescript-eslint/utils": "^8.30.1",
59
+ "eslint": "^9.25.0",
60
+ "stylelint": "^16.18.0",
61
61
  "stylelint-config-recess-order": "^6.0.0",
62
62
  "stylelint-config-standard": "^37.0.0",
63
63
  "@seayoo-web/tsconfig": "^1.0.3"
@@ -0,0 +1,7 @@
1
+ import type { AcceptedPlugin } from "postcss";
2
+ /**
3
+ * postcss 配置,增加 nesting 插件支持
4
+ */
5
+ export declare const postcssConfig: {
6
+ plugins: AcceptedPlugin[];
7
+ };
@@ -1,4 +1,4 @@
1
- import { type UserConfig } from "vite";
1
+ import type { UserConfig } from "vite";
2
2
  /**
3
3
  * 导出一个动态的配置工厂函数
4
4
  */