@seayoo-web/scripts 1.2.3 → 1.2.4
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.
|
@@ -109,11 +109,18 @@ async function execCmd(cmd, ignoreWarning = false) {
|
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
async function getCommitInfo(command, mode, page, deployTo) {
|
|
112
|
-
if (command !== "build"
|
|
112
|
+
if (command !== "build") {
|
|
113
|
+
return { hash: await getCommitHash(), logs: [] };
|
|
114
|
+
}
|
|
115
|
+
if (mode === "preview" || mode === "prev") {
|
|
116
|
+
if (!deployTo.includes("preview")) {
|
|
117
|
+
console.error(`预览部署的目标路径必须包含 preview 字样!`.red);
|
|
118
|
+
process.exit(1);
|
|
119
|
+
}
|
|
113
120
|
return { hash: await getCommitHash(), logs: [] };
|
|
114
121
|
}
|
|
115
122
|
if (await hasUncommittedChanges()) {
|
|
116
|
-
console.error(
|
|
123
|
+
console.error(`正式部署前需要提交所有代码!`.red);
|
|
117
124
|
process.exit(1);
|
|
118
125
|
}
|
|
119
126
|
if (await getCurrentBranchName() !== MainBranchName) {
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import vue from "@vitejs/plugin-vue";
|
|
|
7
7
|
import vueDevTools from "vite-plugin-vue-devtools";
|
|
8
8
|
import { existsSync, readFileSync } from "fs";
|
|
9
9
|
import "colors";
|
|
10
|
-
import { g as getNowTime, a as getCommitInfo, c as createPageDeployTag } from "./git-
|
|
10
|
+
import { g as getNowTime, a as getCommitInfo, c as createPageDeployTag } from "./git-BVCtk4Tl.js";
|
|
11
11
|
import skipFormatting from "@vue/eslint-config-prettier/skip-formatting";
|
|
12
12
|
import { vueTsConfigs } from "@vue/eslint-config-typescript";
|
|
13
13
|
import { defineConfigWithVueTs } from "@vue/eslint-config-typescript";
|
package/dist/node.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Command } from "commander";
|
|
|
5
5
|
import fs from "fs-extra";
|
|
6
6
|
import inquirer from "inquirer";
|
|
7
7
|
import ora from "ora";
|
|
8
|
-
import { r as root, b as addProjectToWorkspace, d as copyTemplate, e as getProjects, f as getTemplates, h as checkGitStatusBeforeDestory, i as createBackupTag, j as removeProjectFromWorkspace, s as submitAllDeletionChanges, k as getRepos } from "./git-
|
|
8
|
+
import { r as root, b as addProjectToWorkspace, d as copyTemplate, e as getProjects, f as getTemplates, h as checkGitStatusBeforeDestory, i as createBackupTag, j as removeProjectFromWorkspace, s as submitAllDeletionChanges, k as getRepos } from "./git-BVCtk4Tl.js";
|
|
9
9
|
const commitRE = /^(?:revert: )?(?:feat|fix|docs|style|refactor|test|build|chore|debug|tweak|improve)(?:\(.+\))?: .{1,100}/;
|
|
10
10
|
function checkCommit() {
|
|
11
11
|
const msgPath = process.argv[2];
|
package/package.json
CHANGED
package/types/src/vite.lab.d.ts
CHANGED