@vef-framework/dev 2.0.10 → 2.1.0
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/cjs/_internal/_rolldown/runtime.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/lint/commitlint.cjs +1 -1
- package/dist/cjs/lint/eslint.cjs +1 -1
- package/dist/cjs/lint/index.cjs +1 -1
- package/dist/cjs/lint/local-react-plugin.cjs +1 -0
- package/dist/cjs/lint/stylelint.cjs +1 -1
- package/dist/cjs/vite/chunks.cjs +1 -1
- package/dist/cjs/vite/config.cjs +1 -1
- package/dist/cjs/vite/constants.cjs +1 -1
- package/dist/cjs/vite/define.cjs +10 -11
- package/dist/cjs/vite/index.cjs +1 -1
- package/dist/cjs/vite/plugin-app-config.cjs +1 -1
- package/dist/cjs/vite/plugin-auto-enhance/core.cjs +1 -1
- package/dist/cjs/vite/plugin-auto-enhance/index.cjs +1 -1
- package/dist/cjs/vite/plugin-auto-enhance/plugins/index.cjs +1 -1
- package/dist/cjs/vite/plugin-auto-enhance/plugins/operation-column-width.cjs +1 -1
- package/dist/cjs/vite/plugin-conventional-config.cjs +1 -1
- package/dist/cjs/vite/plugin-eslint.cjs +1 -1
- package/dist/cjs/vite/plugin-html.cjs +2 -2
- package/dist/cjs/vite/plugin-icons.cjs +1 -1
- package/dist/cjs/vite/plugin-injection.cjs +1 -1
- package/dist/cjs/vite/plugin-inspect.cjs +1 -1
- package/dist/cjs/vite/plugin-react.cjs +1 -1
- package/dist/cjs/vite/plugin-router.cjs +3 -3
- package/dist/cjs/vite/plugin-stylelint.cjs +1 -1
- package/dist/cjs/vite/plugin-svgr.cjs +1 -1
- package/dist/cjs/vite/plugin-tsconfig-paths.cjs +1 -1
- package/dist/cjs/vite/postcss.cjs +1 -1
- package/dist/cli/index.js +5 -5
- package/dist/es/index.js +8 -10
- package/dist/es/lint/commitlint.js +5 -4
- package/dist/es/lint/eslint.js +650 -931
- package/dist/es/lint/index.js +3 -8
- package/dist/es/lint/local-react-plugin.js +42 -0
- package/dist/es/lint/stylelint.js +55 -74
- package/dist/es/vite/chunks.js +19 -16
- package/dist/es/vite/config.js +59 -66
- package/dist/es/vite/constants.js +9 -9
- package/dist/es/vite/define.js +16 -16
- package/dist/es/vite/index.js +1 -4
- package/dist/es/vite/plugin-app-config.js +10 -14
- package/dist/es/vite/plugin-auto-enhance/core.js +85 -85
- package/dist/es/vite/plugin-auto-enhance/index.js +13 -14
- package/dist/es/vite/plugin-auto-enhance/plugins/index.js +1 -4
- package/dist/es/vite/plugin-auto-enhance/plugins/operation-column-width.js +174 -108
- package/dist/es/vite/plugin-conventional-config.js +28 -42
- package/dist/es/vite/plugin-eslint.js +9 -4
- package/dist/es/vite/plugin-html.js +50 -53
- package/dist/es/vite/plugin-icons.js +6 -5
- package/dist/es/vite/plugin-injection.js +1 -11
- package/dist/es/vite/plugin-react.js +21 -63
- package/dist/es/vite/plugin-router.js +38 -31
- package/dist/es/vite/plugin-stylelint.js +9 -4
- package/dist/es/vite/plugin-svgr.js +2 -7
- package/dist/es/vite/plugin-tsconfig-paths.js +3 -6
- package/dist/types/src/lint/commitlint.d.ts +2 -0
- package/dist/types/src/lint/local-react-plugin.d.ts +29 -0
- package/dist/types/src/lint/stylelint.d.ts +2 -0
- package/dist/types/{vite → src/vite}/chunks.d.ts +0 -5
- package/dist/types/src/vite/config.d.ts +12 -0
- package/dist/types/src/vite/constants.d.ts +12 -0
- package/dist/types/src/vite/define.d.ts +4 -0
- package/dist/types/src/vite/plugin-app-config.d.ts +19 -0
- package/dist/types/{vite → src/vite}/plugin-auto-enhance/core.d.ts +6 -21
- package/dist/types/src/vite/plugin-auto-enhance/index.d.ts +10 -0
- package/dist/types/src/vite/plugin-auto-enhance/plugins/operation-column-width.d.ts +5 -0
- package/dist/types/{vite → src/vite}/plugin-auto-enhance/types.d.ts +7 -9
- package/dist/types/{vite → src/vite}/plugin-conventional-config.d.ts +1 -14
- package/dist/types/src/vite/plugin-eslint.d.ts +7 -0
- package/dist/types/src/vite/plugin-html.d.ts +7 -0
- package/dist/types/{vite → src/vite}/plugin-icons.d.ts +3 -3
- package/dist/types/src/vite/plugin-injection.d.ts +5 -0
- package/dist/types/src/vite/plugin-inspect.d.ts +5 -0
- package/dist/types/{vite → src/vite}/plugin-react.d.ts +10 -5
- package/dist/types/src/vite/plugin-router.d.ts +14 -0
- package/dist/types/src/vite/plugin-stylelint.d.ts +7 -0
- package/dist/types/src/vite/plugin-svgr.d.ts +7 -0
- package/dist/types/src/vite/plugin-tsconfig-paths.d.ts +8 -0
- package/dist/types/{vite → src/vite}/postcss.d.ts +0 -5
- package/package.json +66 -66
- package/tsconfig.base.json +0 -1
- package/dist/types/lint/commitlint.d.ts +0 -8
- package/dist/types/lint/stylelint.d.ts +0 -7
- package/dist/types/vite/config.d.ts +0 -39
- package/dist/types/vite/constants.d.ts +0 -48
- package/dist/types/vite/define.d.ts +0 -12
- package/dist/types/vite/plugin-app-config.d.ts +0 -28
- package/dist/types/vite/plugin-auto-enhance/index.d.ts +0 -30
- package/dist/types/vite/plugin-auto-enhance/plugins/operation-column-width.d.ts +0 -14
- package/dist/types/vite/plugin-eslint.d.ts +0 -7
- package/dist/types/vite/plugin-html.d.ts +0 -7
- package/dist/types/vite/plugin-injection.d.ts +0 -7
- package/dist/types/vite/plugin-inspect.d.ts +0 -7
- package/dist/types/vite/plugin-router.d.ts +0 -9
- package/dist/types/vite/plugin-stylelint.d.ts +0 -7
- package/dist/types/vite/plugin-svgr.d.ts +0 -7
- package/dist/types/vite/plugin-tsconfig-paths.d.ts +0 -8
- package/dist/types/{cli → src/cli}/index.d.ts +0 -0
- package/dist/types/{index.d.ts → src/index.d.ts} +0 -0
- package/dist/types/{lint → src/lint}/eslint.d.ts +0 -0
- package/dist/types/{lint → src/lint}/index.d.ts +0 -0
- package/dist/types/{vite → src/vite}/index.d.ts +1 -1
- /package/dist/types/{vite → src/vite}/plugin-auto-enhance/plugins/index.d.ts +0 -0
package/dist/es/lint/index.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
export {
|
|
5
|
-
o as defineCommitlintConfig,
|
|
6
|
-
n as defineEslintConfig,
|
|
7
|
-
r as defineStylelintConfig
|
|
8
|
-
};
|
|
1
|
+
import "./commitlint.js";
|
|
2
|
+
import "./eslint.js";
|
|
3
|
+
import "./stylelint.js";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
function a(e) {
|
|
2
|
+
return e !== null && typeof e == "object" && "type" in e && e.type === "JSXOpeningElement";
|
|
3
|
+
}
|
|
4
|
+
var p = {
|
|
5
|
+
create(e) {
|
|
6
|
+
const i = (e.options[0] ?? {}).ignoreCase ?? !1;
|
|
7
|
+
return { JSXOpeningElement(r) {
|
|
8
|
+
if (!a(r))
|
|
9
|
+
return;
|
|
10
|
+
const n = {};
|
|
11
|
+
for (const o of r.attributes) {
|
|
12
|
+
if (o.type === "JSXSpreadAttribute")
|
|
13
|
+
continue;
|
|
14
|
+
let { name: t } = o.name;
|
|
15
|
+
if (typeof t == "string") {
|
|
16
|
+
if (i && (t = t.toLowerCase()), Object.hasOwn(n, t)) {
|
|
17
|
+
e.report({
|
|
18
|
+
messageId: "noDuplicateProps",
|
|
19
|
+
node: o
|
|
20
|
+
});
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
n[t] = !0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
} };
|
|
27
|
+
},
|
|
28
|
+
meta: {
|
|
29
|
+
docs: { description: "Disallow duplicate properties in JSX." },
|
|
30
|
+
messages: { noDuplicateProps: "No duplicate props allowed." },
|
|
31
|
+
schema: [{
|
|
32
|
+
additionalProperties: !1,
|
|
33
|
+
properties: { ignoreCase: { type: "boolean" } },
|
|
34
|
+
type: "object"
|
|
35
|
+
}],
|
|
36
|
+
type: "problem"
|
|
37
|
+
}
|
|
38
|
+
}, l = { rules: { "jsx-no-duplicate-props": p } }, c = { "local-react/jsx-no-duplicate-props": "error" };
|
|
39
|
+
export {
|
|
40
|
+
l as localReactPlugin,
|
|
41
|
+
c as localReactRules
|
|
42
|
+
};
|
|
@@ -1,86 +1,67 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import r from "stylelint-config-recess-order/groups";
|
|
2
|
+
var n = [
|
|
3
|
+
"px",
|
|
4
|
+
"em",
|
|
5
|
+
"rem",
|
|
6
|
+
"%",
|
|
7
|
+
"vw",
|
|
8
|
+
"vh",
|
|
9
|
+
"fr",
|
|
10
|
+
"deg",
|
|
11
|
+
"rad",
|
|
12
|
+
"grad",
|
|
13
|
+
"turn",
|
|
14
|
+
"ms",
|
|
15
|
+
"s"
|
|
16
|
+
], o = {
|
|
17
|
+
"order/order": [
|
|
18
|
+
"dollar-variables",
|
|
19
|
+
"at-variables",
|
|
20
|
+
"custom-properties",
|
|
21
|
+
"less-mixins",
|
|
22
|
+
"declarations",
|
|
23
|
+
"at-rules",
|
|
24
|
+
"rules"
|
|
25
|
+
],
|
|
26
|
+
"order/properties-order": r.map((e) => ({
|
|
27
|
+
...e,
|
|
28
|
+
emptyLineBefore: "never",
|
|
29
|
+
noEmptyLineBetween: !0
|
|
30
|
+
}))
|
|
31
|
+
}, l = {
|
|
32
|
+
"declaration-empty-line-before": "never",
|
|
33
|
+
"declaration-property-value-no-unknown": [!0, { ignoreProperties: {} }]
|
|
34
|
+
}, s = {
|
|
35
|
+
"at-rule-no-unknown": null,
|
|
36
|
+
"function-no-unknown": null,
|
|
37
|
+
"scss/at-rule-no-unknown": [!0, { ignoreAtRules: ["extend", "include"] }],
|
|
38
|
+
"scss/function-no-unknown": [!0, { ignoreFunctions: [] }]
|
|
39
|
+
}, t = {
|
|
40
|
+
"color-hex-alpha": "never",
|
|
41
|
+
"color-hex-length": "long",
|
|
42
|
+
"color-named": "never"
|
|
43
|
+
}, u = { "selector-pseudo-class-no-unknown": [!0, { ignorePseudoClasses: ["global"] }] }, i = {
|
|
44
|
+
"number-max-precision": null,
|
|
45
|
+
"unit-allowed-list": n
|
|
46
|
+
};
|
|
47
|
+
function c() {
|
|
3
48
|
return {
|
|
4
49
|
extends: [
|
|
5
|
-
"stylelint-config-standard-scss",
|
|
6
50
|
"stylelint-config-recommended",
|
|
51
|
+
"stylelint-config-standard-scss",
|
|
7
52
|
"@stylistic/stylelint-config"
|
|
8
53
|
],
|
|
9
54
|
plugins: ["stylelint-order"],
|
|
10
55
|
rules: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"at-rules",
|
|
18
|
-
"rules"
|
|
19
|
-
],
|
|
20
|
-
"order/properties-order": n.map((e) => ({
|
|
21
|
-
...e,
|
|
22
|
-
emptyLineBefore: "never",
|
|
23
|
-
noEmptyLineBetween: !0
|
|
24
|
-
})),
|
|
25
|
-
"declaration-empty-line-before": "never",
|
|
26
|
-
"declaration-property-value-no-unknown": [
|
|
27
|
-
!0,
|
|
28
|
-
{
|
|
29
|
-
ignoreProperties: {}
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
"at-rule-no-unknown": [
|
|
33
|
-
!0,
|
|
34
|
-
{
|
|
35
|
-
ignoreAtRules: ["extend", "include"]
|
|
36
|
-
}
|
|
37
|
-
],
|
|
38
|
-
"function-no-unknown": [
|
|
39
|
-
!0,
|
|
40
|
-
{
|
|
41
|
-
ignoreFunctions: []
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
"number-max-precision": null,
|
|
45
|
-
"color-hex-length": "long",
|
|
46
|
-
"color-hex-alpha": "never",
|
|
47
|
-
"color-named": "never",
|
|
48
|
-
"unit-allowed-list": [
|
|
49
|
-
"px",
|
|
50
|
-
"em",
|
|
51
|
-
"rem",
|
|
52
|
-
"%",
|
|
53
|
-
"vw",
|
|
54
|
-
"vh",
|
|
55
|
-
"fr",
|
|
56
|
-
"deg",
|
|
57
|
-
"rad",
|
|
58
|
-
"grad",
|
|
59
|
-
"turn",
|
|
60
|
-
"ms",
|
|
61
|
-
"s"
|
|
62
|
-
],
|
|
63
|
-
"selector-pseudo-class-no-unknown": [
|
|
64
|
-
!0,
|
|
65
|
-
{
|
|
66
|
-
ignorePseudoClasses: ["global"]
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
"scss/function-no-unknown": [
|
|
70
|
-
!0,
|
|
71
|
-
{
|
|
72
|
-
ignoreFunctions: []
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
"scss/at-rule-no-unknown": [
|
|
76
|
-
!0,
|
|
77
|
-
{
|
|
78
|
-
ignoreAtRules: []
|
|
79
|
-
}
|
|
80
|
-
]
|
|
56
|
+
...o,
|
|
57
|
+
...l,
|
|
58
|
+
...s,
|
|
59
|
+
...t,
|
|
60
|
+
...u,
|
|
61
|
+
...i
|
|
81
62
|
}
|
|
82
63
|
};
|
|
83
64
|
}
|
|
84
65
|
export {
|
|
85
|
-
|
|
66
|
+
c as defineStylelintConfig
|
|
86
67
|
};
|
package/dist/es/vite/chunks.js
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
var r = [
|
|
2
|
+
["node_modules/@vef-framework/", "vef-framework"],
|
|
3
|
+
["/packages/", "vef-framework"],
|
|
4
|
+
["node_modules/lucide-react/", "lucide-icons"],
|
|
5
|
+
["node_modules/react/", "react"],
|
|
6
|
+
["node_modules/react-dom/", "react"],
|
|
7
|
+
["node_modules/scheduler/", "react"],
|
|
8
|
+
["node_modules/@tanstack/", "tanstack"],
|
|
9
|
+
["node_modules/pinyin-pro/", "pinyin-vendor"],
|
|
10
|
+
["node_modules/@pinyin-pro/", "pinyin-vendor"],
|
|
11
|
+
["node_modules/echarts/", "echarts"]
|
|
12
|
+
];
|
|
13
|
+
function d(e) {
|
|
14
|
+
for (const [n, o] of r)
|
|
15
|
+
if (e.includes(n))
|
|
16
|
+
return o;
|
|
14
17
|
}
|
|
15
|
-
function
|
|
16
|
-
return
|
|
18
|
+
function t() {
|
|
19
|
+
return d;
|
|
17
20
|
}
|
|
18
21
|
export {
|
|
19
|
-
|
|
22
|
+
t as createChunksConfig
|
|
20
23
|
};
|
package/dist/es/vite/config.js
CHANGED
|
@@ -1,74 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import f from "
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { createAppConfigPlugin as I } from "./plugin-app-config.js";
|
|
8
|
-
import { createAutoEnhancePlugin as V } from "./plugin-auto-enhance/index.js";
|
|
9
|
-
import { createConventionalConfigPlugin as D } from "./plugin-conventional-config.js";
|
|
10
|
-
import { createEslintPlugin as U } from "./plugin-eslint.js";
|
|
1
|
+
import { ENV_BUILD_PREFIX as u } from "./constants.js";
|
|
2
|
+
import { createAppConfigPlugin as f } from "./plugin-app-config.js";
|
|
3
|
+
import { operationColumnWidthPlugin as P } from "./plugin-auto-enhance/plugins/operation-column-width.js";
|
|
4
|
+
import { createAutoEnhancePlugin as g } from "./plugin-auto-enhance/index.js";
|
|
5
|
+
import { createConventionalConfigPlugin as _ } from "./plugin-conventional-config.js";
|
|
6
|
+
import { createEslintPlugin as E } from "./plugin-eslint.js";
|
|
11
7
|
import { createHtmlPlugin as v } from "./plugin-html.js";
|
|
12
|
-
import { createIconsPlugin as
|
|
13
|
-
import { createInjectionPlugin as
|
|
14
|
-
import { createInspectPlugin as
|
|
15
|
-
import { createReactPlugin as
|
|
16
|
-
import { createRouterPlugin as
|
|
17
|
-
import { createStylelintPlugin as
|
|
18
|
-
import { createSvgrPlugin as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const r =
|
|
30
|
-
return
|
|
31
|
-
const o =
|
|
32
|
-
Object.keys(o).length > 0 && (
|
|
33
|
-
const
|
|
8
|
+
import { createIconsPlugin as I } from "./plugin-icons.js";
|
|
9
|
+
import { createInjectionPlugin as U } from "./plugin-injection.js";
|
|
10
|
+
import { createInspectPlugin as V } from "./plugin-inspect.js";
|
|
11
|
+
import { createReactPlugin as A } from "./plugin-react.js";
|
|
12
|
+
import { createRouterPlugin as B } from "./plugin-router.js";
|
|
13
|
+
import { createStylelintPlugin as D } from "./plugin-stylelint.js";
|
|
14
|
+
import { createSvgrPlugin as b } from "./plugin-svgr.js";
|
|
15
|
+
import { createTsconfigPathsResolveConfig as d } from "./plugin-tsconfig-paths.js";
|
|
16
|
+
import { resolve as C } from "node:path";
|
|
17
|
+
import L from "node:process";
|
|
18
|
+
import R from "consola";
|
|
19
|
+
import F from "fs-extra";
|
|
20
|
+
import { defineConfig as T, loadEnv as h } from "vite";
|
|
21
|
+
async function N(e) {
|
|
22
|
+
return (await F.readJson(C(e, "package.json"), { encoding: "utf-8" })).version;
|
|
23
|
+
}
|
|
24
|
+
function oo(e = {}) {
|
|
25
|
+
const { resolve: t, plugins: n = [], autoEnhancePlugins: i = [], routerHistory: a = "browser", react: m, proxies: p } = e, r = L.cwd();
|
|
26
|
+
return T(async ({ mode: c }) => {
|
|
27
|
+
const o = h(c, "env", u);
|
|
28
|
+
Object.keys(o).length > 0 && (R.info("Loaded environment variables:"), console.table(o));
|
|
29
|
+
const s = await N(r), l = [
|
|
30
|
+
...n,
|
|
31
|
+
V(),
|
|
32
|
+
_({
|
|
33
|
+
appName: o.VEF_APP_NAME,
|
|
34
|
+
appVersion: s,
|
|
35
|
+
projectDir: r,
|
|
36
|
+
basePublicPath: o.VEF_BUILD_BASE_PUBLIC_PATH,
|
|
37
|
+
outputDir: o.VEF_BUILD_OUTPUT_DIR,
|
|
38
|
+
serverPort: Number(o.VEF_BUILD_SERVER_PORT),
|
|
39
|
+
proxies: p
|
|
40
|
+
}),
|
|
41
|
+
g({ plugins: [P, ...i] }),
|
|
42
|
+
B(r, a),
|
|
43
|
+
A(m),
|
|
44
|
+
v(),
|
|
45
|
+
U(),
|
|
46
|
+
f({
|
|
47
|
+
basePublicPath: o.VEF_BUILD_BASE_PUBLIC_PATH,
|
|
48
|
+
outputDir: o.VEF_BUILD_OUTPUT_DIR,
|
|
49
|
+
appName: o.VEF_APP_NAME
|
|
50
|
+
}),
|
|
51
|
+
I(r),
|
|
52
|
+
b(),
|
|
53
|
+
E(),
|
|
54
|
+
D()
|
|
55
|
+
];
|
|
34
56
|
return {
|
|
35
|
-
resolve:
|
|
36
|
-
plugins: [
|
|
57
|
+
resolve: {
|
|
37
58
|
...t,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
appVersion: c,
|
|
42
|
-
projectDir: r,
|
|
43
|
-
basePublicPath: o.VEF_BUILD_BASE_PUBLIC_PATH,
|
|
44
|
-
outputDir: o.VEF_BUILD_OUTPUT_DIR,
|
|
45
|
-
serverPort: Number(o.VEF_BUILD_SERVER_PORT),
|
|
46
|
-
proxies: m
|
|
47
|
-
}),
|
|
48
|
-
V({
|
|
49
|
-
plugins: [T, ...i]
|
|
50
|
-
}),
|
|
51
|
-
L(r, n),
|
|
52
|
-
d(a),
|
|
53
|
-
F(r),
|
|
54
|
-
v(),
|
|
55
|
-
B(),
|
|
56
|
-
I({
|
|
57
|
-
basePublicPath: o.VEF_BUILD_BASE_PUBLIC_PATH,
|
|
58
|
-
outputDir: o.VEF_BUILD_OUTPUT_DIR,
|
|
59
|
-
appName: o.VEF_APP_NAME
|
|
60
|
-
}),
|
|
61
|
-
A(r),
|
|
62
|
-
C(),
|
|
63
|
-
U(),
|
|
64
|
-
R()
|
|
65
|
-
].filter(Boolean)
|
|
59
|
+
...d()
|
|
60
|
+
},
|
|
61
|
+
plugins: l.filter(Boolean)
|
|
66
62
|
};
|
|
67
63
|
});
|
|
68
64
|
}
|
|
69
|
-
async function N(e) {
|
|
70
|
-
return (await u.readJson(l(e, "package.json"), { encoding: "utf-8" })).version;
|
|
71
|
-
}
|
|
72
65
|
export {
|
|
73
|
-
|
|
66
|
+
oo as defineViteConfig
|
|
74
67
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var _ = "1.0.0", E = "public";
|
|
2
|
+
var R = "assets", r = "VEF_APP_", a = "VEF_BUILD_";
|
|
3
|
+
var P = "dist", v = 3833;
|
|
4
|
+
var I = "pages", D = "router";
|
|
2
5
|
export {
|
|
3
6
|
R as ASSETS_DIR,
|
|
4
|
-
I as DEFAULT_APP_NAME,
|
|
5
7
|
P as DEFAULT_OUTPUT_DIR,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
D as PAGES_DIR,
|
|
8
|
+
v as DEFAULT_SERVER_PORT,
|
|
9
|
+
r as ENV_APP_PREFIX,
|
|
10
|
+
a as ENV_BUILD_PREFIX,
|
|
11
|
+
I as PAGES_DIR,
|
|
11
12
|
E as PUBLIC_DIR,
|
|
12
|
-
|
|
13
|
-
o as SRC_DIR,
|
|
13
|
+
D as ROUTER_DIR,
|
|
14
14
|
_ as VEF_FRAMEWORK_VERSION
|
|
15
15
|
};
|
package/dist/es/vite/define.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
1
|
+
import { ENV_APP_PREFIX as i, VEF_FRAMEWORK_VERSION as r } from "./constants.js";
|
|
2
|
+
function o(_, e, n) {
|
|
3
|
+
const t = n ? `(function () {
|
|
4
|
+
const env = import.meta.env;
|
|
5
|
+
const config = Object.keys(env)
|
|
6
|
+
.filter(key => key.startsWith(${JSON.stringify(i)}))
|
|
7
|
+
.reduce((acc, key) => {
|
|
8
|
+
acc[key] = env[key];
|
|
9
|
+
return acc;
|
|
10
|
+
}, {});
|
|
11
|
+
return Object.freeze(config);
|
|
12
|
+
})()` : `window.__PRODUCTION__VEF_${_ ?? "APP"}__CONF__`;
|
|
3
13
|
return {
|
|
4
|
-
__VEF_FRAMEWORK_VERSION__:
|
|
5
|
-
__VEF_APP_VERSION__:
|
|
6
|
-
__VEF_APP_CONFIG__:
|
|
7
|
-
(function () {
|
|
8
|
-
const env = import.meta.env;
|
|
9
|
-
const config = Object.keys(env).filter(key => key.startsWith(${JSON.stringify(r)}))
|
|
10
|
-
.reduce((acc, key) => {
|
|
11
|
-
acc[key] = env[key];
|
|
12
|
-
return acc;
|
|
13
|
-
}, {});
|
|
14
|
-
return Object.freeze(config);
|
|
15
|
-
})()
|
|
16
|
-
` : `window.__PRODUCTION__VEF_${_ ?? t}__CONF__`
|
|
14
|
+
__VEF_FRAMEWORK_VERSION__: JSON.stringify(r),
|
|
15
|
+
__VEF_APP_VERSION__: JSON.stringify(e),
|
|
16
|
+
__VEF_APP_CONFIG__: t
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
o as defineConstants
|
|
21
21
|
};
|
package/dist/es/vite/index.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ENV_APP_PREFIX as i } from "./constants.js";
|
|
2
|
+
import { snake as o } from "radashi";
|
|
2
3
|
import r from "unplugin-config/vite";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
appName: t = a
|
|
8
|
-
}) {
|
|
4
|
+
function p(e) {
|
|
5
|
+
return o(e).toUpperCase();
|
|
6
|
+
}
|
|
7
|
+
function u({ basePublicPath: e, outputDir: n, appName: t = "APP" }) {
|
|
9
8
|
return r({
|
|
10
|
-
appName: `VEF_${
|
|
9
|
+
appName: `VEF_${p(t)}`,
|
|
11
10
|
baseDir: e,
|
|
12
11
|
configFile: {
|
|
13
12
|
generate: !0,
|
|
14
13
|
fileName: "app.config.js",
|
|
15
|
-
outputDir: n ??
|
|
14
|
+
outputDir: n ?? "dist"
|
|
16
15
|
},
|
|
17
16
|
htmlInjection: {
|
|
18
17
|
enable: !0,
|
|
@@ -20,14 +19,11 @@ function c({
|
|
|
20
19
|
templates: ["index.html"]
|
|
21
20
|
},
|
|
22
21
|
envVariables: {
|
|
23
|
-
prefix:
|
|
22
|
+
prefix: i,
|
|
24
23
|
files: ["env/.env", "env/.env.production"]
|
|
25
24
|
}
|
|
26
25
|
});
|
|
27
26
|
}
|
|
28
|
-
function f(e) {
|
|
29
|
-
return i(e).toUpperCase();
|
|
30
|
-
}
|
|
31
27
|
export {
|
|
32
|
-
|
|
28
|
+
u as createAppConfigPlugin
|
|
33
29
|
};
|