@gct-paas/build 0.1.6 → 0.1.7
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/CHANGELOG.md +10 -0
- package/dist/constants/index.cjs +1 -1
- package/dist/vite/vite-config/vite-plugin-config.cjs +9 -15
- package/dist/vite/vite-plugins/inject-importmap-plugin.cjs +1 -1
- package/es/constants/index.mjs +1 -0
- package/es/vite/vite-config/vite-plugin-config.mjs +8 -13
- package/es/vite/vite-plugins/inject-importmap-plugin.mjs +1 -1
- package/package.json +14 -18
package/CHANGELOG.md
CHANGED
package/dist/constants/index.cjs
CHANGED
|
@@ -16,6 +16,6 @@ const DEFAULT_EXTERNAL = exports.DEFAULT_EXTERNAL = ["@babel/standalone", "espri
|
|
|
16
16
|
// 图标库相关依赖
|
|
17
17
|
"@ant-design/icons-vue", "@icon-park/vue-next/es/all", "@icon-park/vue-next/icons.json",
|
|
18
18
|
// @gct-paas 底包相关依赖
|
|
19
|
-
"@gct-paas/api", "@gct-paas/core", "@gct-paas/core-mobile", "@gct-paas/core-web", "@gct-paas/core-pad", "@gct-paas/design", "@gct-paas/design-mobile", "@gct-paas/design-web", "@gct-paas/design-pad", "@gct-paas/render", "@gct-paas/render-mobile", "@gct-paas/render-pad", "@gct-paas/render-web", "@gct-paas/schema", "@gct-paas/scss",
|
|
19
|
+
"@gct-paas/api", "@gct-paas/core", "@gct-paas/core-components", "@gct-paas/core-mobile", "@gct-paas/core-web", "@gct-paas/core-pad", "@gct-paas/design", "@gct-paas/design-mobile", "@gct-paas/design-web", "@gct-paas/design-pad", "@gct-paas/render", "@gct-paas/render-mobile", "@gct-paas/render-pad", "@gct-paas/render-web", "@gct-paas/schema", "@gct-paas/scss",
|
|
20
20
|
// @gct-paas 独立组件库
|
|
21
21
|
"@gct-paas/platform-icons", "@gct-paas/vue-pdf", "@gct-paas/vue-video-player", "@gct-paas/flow", "@gct-paas/monaco-vue-editor"];
|
|
@@ -47,17 +47,7 @@ function definePluginViteConfig(opts = {}) {
|
|
|
47
47
|
fileName: "[name].[format].min"
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
plugins: [...(0, _imnportExternalPlugin.importMapExternalPlugin)(_constants.DEFAULT_EXTERNAL)
|
|
51
|
-
// federation({
|
|
52
|
-
// name: 'gct-paas-plugin',
|
|
53
|
-
// filename: 'remoteEntry.js',
|
|
54
|
-
// dts: false,
|
|
55
|
-
// manifest: true,
|
|
56
|
-
// exposes: {
|
|
57
|
-
// '.': './src/index.ts',
|
|
58
|
-
// },
|
|
59
|
-
// }),
|
|
60
|
-
]
|
|
50
|
+
plugins: [...(0, _imnportExternalPlugin.importMapExternalPlugin)(_constants.DEFAULT_EXTERNAL)]
|
|
61
51
|
}), opts);
|
|
62
52
|
}
|
|
63
53
|
function defineDesignPluginViteConfig(opts = {}) {
|
|
@@ -65,7 +55,8 @@ function defineDesignPluginViteConfig(opts = {}) {
|
|
|
65
55
|
server: {
|
|
66
56
|
port: 7001,
|
|
67
57
|
host: "0.0.0.0",
|
|
68
|
-
allowedHosts: true
|
|
58
|
+
allowedHosts: true,
|
|
59
|
+
cors: true
|
|
69
60
|
}
|
|
70
61
|
}), opts);
|
|
71
62
|
}
|
|
@@ -74,7 +65,8 @@ function defineMobilePluginViteConfig(opts = {}) {
|
|
|
74
65
|
server: {
|
|
75
66
|
port: 7002,
|
|
76
67
|
host: "0.0.0.0",
|
|
77
|
-
allowedHosts: true
|
|
68
|
+
allowedHosts: true,
|
|
69
|
+
cors: true
|
|
78
70
|
}
|
|
79
71
|
}), opts);
|
|
80
72
|
}
|
|
@@ -83,7 +75,8 @@ function definePadPluginViteConfig(opts = {}) {
|
|
|
83
75
|
server: {
|
|
84
76
|
port: 7003,
|
|
85
77
|
host: "0.0.0.0",
|
|
86
|
-
allowedHosts: true
|
|
78
|
+
allowedHosts: true,
|
|
79
|
+
cors: true
|
|
87
80
|
}
|
|
88
81
|
}), opts);
|
|
89
82
|
}
|
|
@@ -92,7 +85,8 @@ function defineWebPluginViteConfig(opts = {}) {
|
|
|
92
85
|
server: {
|
|
93
86
|
port: 7004,
|
|
94
87
|
host: "0.0.0.0",
|
|
95
|
-
allowedHosts: true
|
|
88
|
+
allowedHosts: true,
|
|
89
|
+
cors: true
|
|
96
90
|
}
|
|
97
91
|
}), opts);
|
|
98
92
|
}
|
|
@@ -9,7 +9,7 @@ var _nodePath = _interopRequireDefault(require("node:path"));
|
|
|
9
9
|
var _simpleGit = require("simple-git");
|
|
10
10
|
var _util = require("../../util/index.cjs");
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
const DEV_IMPORT_MAP_PREFIX = ["/plugin-
|
|
12
|
+
const DEV_IMPORT_MAP_PREFIX = ["/plugin-design/@id/", "/plugin-render-mobile/@id/", "/plugin-render-pad/@id/", "/plugin-render-web/@id/"];
|
|
13
13
|
function injectImportMapPlugin(options = {}) {
|
|
14
14
|
const {
|
|
15
15
|
repoUrl = "https://git.gct-china.com/paas/frontend/gct-paas-cdn.git",
|
package/es/constants/index.mjs
CHANGED
|
@@ -39,15 +39,6 @@ export function definePluginViteConfig(opts = {}) {
|
|
|
39
39
|
},
|
|
40
40
|
plugins: [
|
|
41
41
|
...importMapExternalPlugin(DEFAULT_EXTERNAL)
|
|
42
|
-
// federation({
|
|
43
|
-
// name: 'gct-paas-plugin',
|
|
44
|
-
// filename: 'remoteEntry.js',
|
|
45
|
-
// dts: false,
|
|
46
|
-
// manifest: true,
|
|
47
|
-
// exposes: {
|
|
48
|
-
// '.': './src/index.ts',
|
|
49
|
-
// },
|
|
50
|
-
// }),
|
|
51
42
|
]
|
|
52
43
|
}),
|
|
53
44
|
opts
|
|
@@ -59,7 +50,8 @@ export function defineDesignPluginViteConfig(opts = {}) {
|
|
|
59
50
|
server: {
|
|
60
51
|
port: 7001,
|
|
61
52
|
host: "0.0.0.0",
|
|
62
|
-
allowedHosts: true
|
|
53
|
+
allowedHosts: true,
|
|
54
|
+
cors: true
|
|
63
55
|
}
|
|
64
56
|
}),
|
|
65
57
|
opts
|
|
@@ -71,7 +63,8 @@ export function defineMobilePluginViteConfig(opts = {}) {
|
|
|
71
63
|
server: {
|
|
72
64
|
port: 7002,
|
|
73
65
|
host: "0.0.0.0",
|
|
74
|
-
allowedHosts: true
|
|
66
|
+
allowedHosts: true,
|
|
67
|
+
cors: true
|
|
75
68
|
}
|
|
76
69
|
}),
|
|
77
70
|
opts
|
|
@@ -83,7 +76,8 @@ export function definePadPluginViteConfig(opts = {}) {
|
|
|
83
76
|
server: {
|
|
84
77
|
port: 7003,
|
|
85
78
|
host: "0.0.0.0",
|
|
86
|
-
allowedHosts: true
|
|
79
|
+
allowedHosts: true,
|
|
80
|
+
cors: true
|
|
87
81
|
}
|
|
88
82
|
}),
|
|
89
83
|
opts
|
|
@@ -95,7 +89,8 @@ export function defineWebPluginViteConfig(opts = {}) {
|
|
|
95
89
|
server: {
|
|
96
90
|
port: 7004,
|
|
97
91
|
host: "0.0.0.0",
|
|
98
|
-
allowedHosts: true
|
|
92
|
+
allowedHosts: true,
|
|
93
|
+
cors: true
|
|
99
94
|
}
|
|
100
95
|
}),
|
|
101
96
|
opts
|
|
@@ -2,7 +2,7 @@ import fs from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { simpleGit } from "simple-git";
|
|
4
4
|
import { isBuildPluginEnv } from "../../util/index.mjs";
|
|
5
|
-
const DEV_IMPORT_MAP_PREFIX = ["/plugin-
|
|
5
|
+
const DEV_IMPORT_MAP_PREFIX = ["/plugin-design/@id/", "/plugin-render-mobile/@id/", "/plugin-render-pad/@id/", "/plugin-render-web/@id/"];
|
|
6
6
|
export function injectImportMapPlugin(options = {}) {
|
|
7
7
|
const {
|
|
8
8
|
repoUrl = "https://git.gct-china.com/paas/frontend/gct-paas-cdn.git",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/build",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台核心包",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -29,14 +29,21 @@
|
|
|
29
29
|
},
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"author": "gct",
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "unbuild",
|
|
34
|
+
"lint": "eslint src/",
|
|
35
|
+
"publish:next": "npm run build && npm publish --access public --tag=next --registry=https://registry.npmjs.org/",
|
|
36
|
+
"publish:dev": "npm run build && npm publish --access public --tag=dev --registry=https://registry.npmjs.org/",
|
|
37
|
+
"publish:alpha": "npm run build && npm publish --access public --tag=alpha --registry=https://registry.npmjs.org/",
|
|
38
|
+
"publish:beta": "npm run build && npm publish --access public --tag=beta --registry=https://registry.npmjs.org/",
|
|
39
|
+
"publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
|
|
40
|
+
},
|
|
32
41
|
"dependencies": {
|
|
33
42
|
"@commitlint/cli": "^20.4.4",
|
|
34
43
|
"@commitlint/config-conventional": "^20.4.4",
|
|
35
44
|
"@eslint/config-helpers": "^0.5.3",
|
|
36
45
|
"@eslint/js": "^9.39.4",
|
|
37
|
-
"@gct-paas/scss": "latest",
|
|
38
46
|
"@inquirer/prompts": "^8.3.0",
|
|
39
|
-
"@module-federation/vite": "^1.13.0",
|
|
40
47
|
"@vitejs/plugin-vue": "^6.0.5",
|
|
41
48
|
"@vitejs/plugin-vue-jsx": "^5.1.5",
|
|
42
49
|
"@vue/compiler-sfc": "^3.5.30",
|
|
@@ -67,9 +74,10 @@
|
|
|
67
74
|
"stylelint-config-recess-order": "~7.4.0",
|
|
68
75
|
"stylelint-config-standard-scss": "~16.0.0",
|
|
69
76
|
"stylelint-scss": "~6.14.0",
|
|
77
|
+
"terser": "^5.46.1",
|
|
70
78
|
"typescript-eslint": "^8.57.0",
|
|
71
79
|
"unocss": "66.6.6",
|
|
72
|
-
"vite": "^8.0.
|
|
80
|
+
"vite": "^8.0.3",
|
|
73
81
|
"vite-plugin-dts": "^4.5.4",
|
|
74
82
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
75
83
|
"vite-plugin-static-copy": "^3.3.0",
|
|
@@ -85,19 +93,7 @@
|
|
|
85
93
|
"@types/node": "^25.5.0",
|
|
86
94
|
"postcss": "^8.5.8",
|
|
87
95
|
"tsx": "^4.21.0",
|
|
88
|
-
"typescript": "^
|
|
96
|
+
"typescript": "^6.0.2",
|
|
89
97
|
"unbuild": "^3.6.1"
|
|
90
|
-
},
|
|
91
|
-
"peerDependencies": {
|
|
92
|
-
"@gct-paas/scss": "*"
|
|
93
|
-
},
|
|
94
|
-
"scripts": {
|
|
95
|
-
"build": "unbuild",
|
|
96
|
-
"lint": "eslint src/",
|
|
97
|
-
"publish:next": "npm run build && npm publish --access public --tag=next --registry=https://registry.npmjs.org/",
|
|
98
|
-
"publish:dev": "npm run build && npm publish --access public --tag=dev --registry=https://registry.npmjs.org/",
|
|
99
|
-
"publish:alpha": "npm run build && npm publish --access public --tag=alpha --registry=https://registry.npmjs.org/",
|
|
100
|
-
"publish:beta": "npm run build && npm publish --access public --tag=beta --registry=https://registry.npmjs.org/",
|
|
101
|
-
"publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
|
|
102
98
|
}
|
|
103
|
-
}
|
|
99
|
+
}
|