@creopse/bridge 0.1.16 → 0.1.18
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/vite/vue.js +62 -52
- package/package.json +1 -1
package/dist/vite/vue.js
CHANGED
|
@@ -1,61 +1,71 @@
|
|
|
1
|
-
import { D
|
|
1
|
+
import { D, S as C, s as L } from "../index-C8b1StIO.js";
|
|
2
2
|
import b from "/Users/arkane/Dev/Projects/Web/creopse.proj/creopse.toolkit/node_modules/.pnpm/@originjs+vite-plugin-federation@1.4.1/node_modules/@originjs/vite-plugin-federation/dist/index.mjs";
|
|
3
3
|
import x from "/Users/arkane/Dev/Projects/Web/creopse.proj/creopse.toolkit/node_modules/.pnpm/@vitejs+plugin-basic-ssl@2.3.0_vite@7.0.5_@types+node@24.0.15_jiti@2.6.1_tsx@4.21.0_/node_modules/@vitejs/plugin-basic-ssl/dist/index.mjs";
|
|
4
4
|
import { parse as M, stringify as O } from "/Users/arkane/Dev/Projects/Web/creopse.proj/creopse.toolkit/node_modules/.pnpm/comment-json@4.6.2/node_modules/comment-json/src/index.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import y from "fs";
|
|
6
|
+
import i from "path";
|
|
7
7
|
import V from "/Users/arkane/Dev/Projects/Web/creopse.proj/creopse.toolkit/node_modules/.pnpm/rollup-plugin-copy@3.5.0/node_modules/rollup-plugin-copy/dist/index.module.js";
|
|
8
8
|
import N from "vite-plugin-auto-import-lite";
|
|
9
9
|
import $ from "vite-plugin-i18next-loader";
|
|
10
10
|
import j from "vite-plugin-json5";
|
|
11
11
|
import B from "vite-plugin-top-level-await";
|
|
12
|
-
function
|
|
12
|
+
function k(g) {
|
|
13
|
+
const r = b(g);
|
|
14
|
+
if (r?.resolveId) {
|
|
15
|
+
const l = typeof r.resolveId == "function" ? r.resolveId : r.resolveId.handler, a = function(c, p, v) {
|
|
16
|
+
return p ? l.call(this, c, p, v) : null;
|
|
17
|
+
};
|
|
18
|
+
typeof r.resolveId == "function" ? r.resolveId = a : r.resolveId = { ...r.resolveId, handler: a };
|
|
19
|
+
}
|
|
20
|
+
return r;
|
|
21
|
+
}
|
|
22
|
+
function Q(g = {}) {
|
|
13
23
|
const {
|
|
14
|
-
manifestPath:
|
|
15
|
-
srcDir:
|
|
16
|
-
outDir:
|
|
17
|
-
i18nLocalesPath:
|
|
18
|
-
composablesDirs:
|
|
19
|
-
shared:
|
|
20
|
-
} =
|
|
24
|
+
manifestPath: r = "./manifest.jsonc",
|
|
25
|
+
srcDir: l = "./src",
|
|
26
|
+
outDir: a = "frontend",
|
|
27
|
+
i18nLocalesPath: c,
|
|
28
|
+
composablesDirs: p = ["src/composables"],
|
|
29
|
+
shared: v = []
|
|
30
|
+
} = g, u = process.cwd(), s = i.resolve(u, r), _ = process.env.APP_IS_PREVIEW === "true";
|
|
21
31
|
let e;
|
|
22
|
-
const
|
|
23
|
-
let
|
|
32
|
+
const d = {};
|
|
33
|
+
let h = "creopse-plugin", P = "remoteEntry.js", I = 2160, A = 2161, w = !1;
|
|
24
34
|
try {
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
if (e = M(
|
|
28
|
-
for (const
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
35
|
+
if (y.existsSync(s)) {
|
|
36
|
+
const o = y.readFileSync(s, "utf-8");
|
|
37
|
+
if (e = M(o || "{}"), e.pages && Array.isArray(e.pages))
|
|
38
|
+
for (const m of e.pages)
|
|
39
|
+
d[`./${m.name}`] = m.module;
|
|
40
|
+
const t = e.dashboard;
|
|
41
|
+
t?.module && (d[`./${D}`] = t.module);
|
|
42
|
+
const n = e.settings;
|
|
43
|
+
n?.module && (d[`./${C}`] = n.module);
|
|
44
|
+
const f = e.development;
|
|
45
|
+
h = L(String(e.id)) || h, P = e.entry || P, I = f?.previewPort || I, A = f?.serverPort || A, w = f?.ssl || w;
|
|
36
46
|
} else
|
|
37
47
|
console.warn(
|
|
38
|
-
`[CreopseVuePlugin] Warning: Manifest not found at ${
|
|
48
|
+
`[CreopseVuePlugin] Warning: Manifest not found at ${s}`
|
|
39
49
|
);
|
|
40
|
-
} catch (
|
|
50
|
+
} catch (o) {
|
|
41
51
|
console.error(
|
|
42
52
|
"[CreopseVuePlugin] Fatal error while parsing manifest:",
|
|
43
|
-
|
|
53
|
+
o
|
|
44
54
|
);
|
|
45
55
|
}
|
|
46
|
-
const
|
|
56
|
+
const E = c ? i.resolve(u, c) : i.resolve(u, l, "i18n/locales"), S = {
|
|
47
57
|
name: "creopse-vue-plugin",
|
|
48
|
-
config(
|
|
49
|
-
const
|
|
58
|
+
config(o) {
|
|
59
|
+
const t = o.root || u, n = i.resolve(t, a);
|
|
50
60
|
return {
|
|
51
61
|
envPrefix: "APP_",
|
|
52
62
|
resolve: {
|
|
53
|
-
alias: [{ find: "@", replacement:
|
|
63
|
+
alias: [{ find: "@", replacement: i.resolve(t, l) }],
|
|
54
64
|
dedupe: ["vue"]
|
|
55
65
|
},
|
|
56
66
|
build: {
|
|
57
67
|
target: "esnext",
|
|
58
|
-
outDir:
|
|
68
|
+
outDir: n,
|
|
59
69
|
assetsInlineLimit: 1 / 0,
|
|
60
70
|
cssCodeSplit: !1,
|
|
61
71
|
rollupOptions: {
|
|
@@ -63,10 +73,10 @@ function K(h = {}) {
|
|
|
63
73
|
V({
|
|
64
74
|
targets: [
|
|
65
75
|
{
|
|
66
|
-
src:
|
|
67
|
-
dest:
|
|
76
|
+
src: s,
|
|
77
|
+
dest: n,
|
|
68
78
|
transform() {
|
|
69
|
-
return e?.mode && (e.mode =
|
|
79
|
+
return e?.mode && (e.mode = _ ? "development" : "production"), ((m) => m.replace(/(,)\s*\n/g, `,
|
|
70
80
|
|
|
71
81
|
`))(
|
|
72
82
|
O(e, null, 2)
|
|
@@ -81,52 +91,52 @@ function K(h = {}) {
|
|
|
81
91
|
}
|
|
82
92
|
},
|
|
83
93
|
preview: {
|
|
84
|
-
port:
|
|
94
|
+
port: I,
|
|
85
95
|
strictPort: !0,
|
|
86
96
|
cors: !0,
|
|
87
97
|
headers: { "Access-Control-Allow-Origin": "*" }
|
|
88
98
|
},
|
|
89
99
|
server: {
|
|
90
|
-
port:
|
|
100
|
+
port: A,
|
|
91
101
|
cors: !0,
|
|
92
102
|
headers: { "Access-Control-Allow-Origin": "*" }
|
|
93
103
|
}
|
|
94
104
|
};
|
|
95
105
|
},
|
|
96
|
-
configureServer(
|
|
97
|
-
|
|
98
|
-
|
|
106
|
+
configureServer(o) {
|
|
107
|
+
o.watcher.add(s), o.watcher.on("change", (t) => {
|
|
108
|
+
t === s && (console.info(
|
|
99
109
|
`
|
|
100
110
|
[CreopseVuePlugin] Manifest changed, restarting Vite...`
|
|
101
|
-
),
|
|
111
|
+
), o.restart());
|
|
102
112
|
});
|
|
103
113
|
}
|
|
104
114
|
};
|
|
105
115
|
return [
|
|
106
116
|
j(),
|
|
107
|
-
|
|
108
|
-
name:
|
|
109
|
-
filename:
|
|
110
|
-
exposes:
|
|
111
|
-
shared: ["vue", "pinia", ...
|
|
117
|
+
k({
|
|
118
|
+
name: h,
|
|
119
|
+
filename: P,
|
|
120
|
+
exposes: d,
|
|
121
|
+
shared: ["vue", "pinia", ...v]
|
|
112
122
|
}),
|
|
113
123
|
B({
|
|
114
124
|
promiseExportName: "__tla",
|
|
115
|
-
promiseImportName: (
|
|
125
|
+
promiseImportName: (o) => `__tla_${o}`
|
|
116
126
|
}),
|
|
117
127
|
$({
|
|
118
|
-
paths: [
|
|
128
|
+
paths: [E],
|
|
119
129
|
include: ["**/*.json"]
|
|
120
130
|
}),
|
|
121
131
|
N({
|
|
122
|
-
dirs:
|
|
132
|
+
dirs: p,
|
|
123
133
|
imports: ["vue", "pinia"],
|
|
124
134
|
vueTemplate: !0
|
|
125
135
|
}),
|
|
126
|
-
...
|
|
127
|
-
|
|
136
|
+
...w ? [x()] : [],
|
|
137
|
+
S
|
|
128
138
|
];
|
|
129
139
|
}
|
|
130
140
|
export {
|
|
131
|
-
|
|
141
|
+
Q as CreopseVuePlugin
|
|
132
142
|
};
|