@seayoo-web/scripts 1.3.1 → 1.3.3
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.
|
@@ -132,6 +132,7 @@ async function getCommitInfo(command, mode, page, deployTo) {
|
|
|
132
132
|
console.error("正式环境部署需要先将代码同步到服务器!".red, `发现 ${unCommitChanges} 个 commit 差异`.red);
|
|
133
133
|
process.exit(1);
|
|
134
134
|
}
|
|
135
|
+
await execCmd("git pull", true);
|
|
135
136
|
const [currentCommit, lastDeployTag] = await Promise.all([getCommitHash(), getLastDeployTag(deployTo)]);
|
|
136
137
|
const commitLogs = await getCommitLogs(currentCommit, lastDeployTag, page || "./");
|
|
137
138
|
return { hash: currentCommit, logs: commitLogs };
|
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-DCdWCW6L.js";
|
|
11
11
|
import skipFormatting from "@vue/eslint-config-prettier/skip-formatting";
|
|
12
12
|
import { vueTsConfigs, defineConfigWithVueTs } from "@vue/eslint-config-typescript";
|
|
13
13
|
import { flatConfigs } from "eslint-plugin-import";
|
|
@@ -143,8 +143,8 @@ function definePageBuildConfig(option) {
|
|
|
143
143
|
"safari>=8",
|
|
144
144
|
"iOS>=8"
|
|
145
145
|
],
|
|
146
|
-
//
|
|
147
|
-
modernTargets: "edge>=131, firefox>=67, chrome>=
|
|
146
|
+
// 提高现代版本的要求以满足一些特性使用,比如 [Promise.allSettled](https://caniuse.com/?search=allSettled)
|
|
147
|
+
modernTargets: "edge>=131, firefox>=67, chrome>=76, chromeAndroid>=76, safari>=13, iOS>=13",
|
|
148
148
|
// https://github.com/vitejs/vite/blob/main/packages/plugin-legacy/src/index.ts#L170
|
|
149
149
|
// https://unpkg.com/browse/core-js@3.41.0/
|
|
150
150
|
additionalLegacyPolyfills: [
|
|
@@ -153,7 +153,8 @@ function definePageBuildConfig(option) {
|
|
|
153
153
|
"core-js/es/global-this",
|
|
154
154
|
"core-js/es/promise",
|
|
155
155
|
"core-js/es/symbol"
|
|
156
|
-
]
|
|
156
|
+
],
|
|
157
|
+
additionalModernPolyfills: ["core-js/es/symbol"]
|
|
157
158
|
}),
|
|
158
159
|
htmlInjectPlugin({
|
|
159
160
|
BUILD_TIME: envs.stamp,
|
|
@@ -207,7 +208,7 @@ function definePageBuildConfig(option) {
|
|
|
207
208
|
});
|
|
208
209
|
}
|
|
209
210
|
function defineAppBuildConfig(option) {
|
|
210
|
-
return defineConfig(
|
|
211
|
+
return defineConfig(function() {
|
|
211
212
|
const { plugins = [], build = {}, resolve = {}, ...optionReset } = option || {};
|
|
212
213
|
const { alias, ...resolveReset } = resolve || {};
|
|
213
214
|
return {
|
|
@@ -260,6 +261,7 @@ const importOrderRuleConfig = {
|
|
|
260
261
|
group: "internal"
|
|
261
262
|
}
|
|
262
263
|
],
|
|
264
|
+
distinctGroup: true,
|
|
263
265
|
"newlines-between": "always",
|
|
264
266
|
alphabetize: {
|
|
265
267
|
order: "asc",
|
|
@@ -270,6 +272,7 @@ const importEslintConfig = [
|
|
|
270
272
|
flatConfigs.recommended,
|
|
271
273
|
{
|
|
272
274
|
rules: {
|
|
275
|
+
"import/no-deprecated": "error",
|
|
273
276
|
"import/no-unresolved": "off",
|
|
274
277
|
"import/named": "off",
|
|
275
278
|
"import/namespace": "off",
|
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-DCdWCW6L.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/eslint.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { type TSESLint } from "@typescript-eslint/utils";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* 默认的 import order 检查配置
|
|
4
|
+
*
|
|
5
|
+
* https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/order.md
|
|
6
|
+
*/
|
|
3
7
|
export declare const importOrderRuleConfig: {
|
|
4
8
|
groups: string[];
|
|
5
9
|
pathGroups: {
|
|
6
10
|
pattern: string;
|
|
7
11
|
group: string;
|
|
8
12
|
}[];
|
|
13
|
+
distinctGroup: boolean;
|
|
9
14
|
"newlines-between": string;
|
|
10
15
|
alphabetize: {
|
|
11
16
|
order: string;
|
package/types/src/vite.app.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import { type UserConfig } from "vite";
|
|
|
2
2
|
/**
|
|
3
3
|
* 导出一个动态的配置工厂函数
|
|
4
4
|
*/
|
|
5
|
-
export declare function defineAppBuildConfig(option?: UserConfig): import("vite").
|
|
5
|
+
export declare function defineAppBuildConfig(option?: UserConfig): import("vite").UserConfigFnObject;
|