@creopse/bridge 0.1.17 → 0.1.19

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.
@@ -1,5 +1,5 @@
1
1
  import { D, S as L, s as M } from "../index-C8b1StIO.js";
2
- import x 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";
2
+ import x from "@originjs/vite-plugin-federation";
3
3
  import O 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 R, stringify as j } 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
5
  import v from "fs";
package/dist/vite/vue.js CHANGED
@@ -1,56 +1,66 @@
1
- import { D as C, S as I, s as b } from "../index-C8b1StIO.js";
2
- import L 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";
1
+ import { D, S as C, s as L } from "../index-C8b1StIO.js";
2
+ import b from "@originjs/vite-plugin-federation";
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 P from "fs";
5
+ import y from "fs";
6
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 K(h = {}) {
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: A = "./manifest.jsonc",
15
- srcDir: g = "./src",
16
- outDir: w = "frontend",
17
- i18nLocalesPath: v,
18
- composablesDirs: _ = ["src/composables"],
19
- shared: y = []
20
- } = h, a = process.cwd(), t = i.resolve(a, A), E = process.env.APP_IS_PREVIEW === "true";
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 s = {};
23
- let c = "creopse-plugin", m = "remoteEntry.js", u = 2160, f = 2161, d = !1;
32
+ const d = {};
33
+ let h = "creopse-plugin", P = "remoteEntry.js", I = 2160, A = 2161, w = !1;
24
34
  try {
25
- if (P.existsSync(t)) {
26
- const r = P.readFileSync(t, "utf-8");
27
- if (e = M(r || "{}"), e.pages && Array.isArray(e.pages))
28
- for (const p of e.pages)
29
- s[`./${p.name}`] = p.module;
30
- const o = e.dashboard;
31
- o?.module && (s[`./${C}`] = o.module);
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);
32
42
  const n = e.settings;
33
- n?.module && (s[`./${I}`] = n.module), console.debug(s);
34
- const l = e.development;
35
- c = b(String(e.id)) || c, m = e.entry || m, u = l?.previewPort || u, f = l?.serverPort || f, d = l?.ssl || d;
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 ${t}`
48
+ `[CreopseVuePlugin] Warning: Manifest not found at ${s}`
39
49
  );
40
- } catch (r) {
50
+ } catch (o) {
41
51
  console.error(
42
52
  "[CreopseVuePlugin] Fatal error while parsing manifest:",
43
- r
53
+ o
44
54
  );
45
55
  }
46
- const S = v ? i.resolve(a, v) : i.resolve(a, g, "i18n/locales"), D = {
56
+ const E = c ? i.resolve(u, c) : i.resolve(u, l, "i18n/locales"), S = {
47
57
  name: "creopse-vue-plugin",
48
- config(r) {
49
- const o = r.root || a, n = i.resolve(o, w);
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: i.resolve(o, g) }],
63
+ alias: [{ find: "@", replacement: i.resolve(t, l) }],
54
64
  dedupe: ["vue"]
55
65
  },
56
66
  build: {
@@ -63,10 +73,10 @@ function K(h = {}) {
63
73
  V({
64
74
  targets: [
65
75
  {
66
- src: t,
76
+ src: s,
67
77
  dest: n,
68
78
  transform() {
69
- return e?.mode && (e.mode = E ? "development" : "production"), ((p) => p.replace(/(,)\s*\n/g, `,
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: u,
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: f,
100
+ port: A,
91
101
  cors: !0,
92
102
  headers: { "Access-Control-Allow-Origin": "*" }
93
103
  }
94
104
  };
95
105
  },
96
- configureServer(r) {
97
- r.watcher.add(t), r.watcher.on("change", (o) => {
98
- o === t && (console.info(
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
- ), r.restart());
111
+ ), o.restart());
102
112
  });
103
113
  }
104
114
  };
105
115
  return [
106
116
  j(),
107
- L({
108
- name: c,
109
- filename: m,
110
- exposes: s,
111
- shared: ["vue", "pinia", ...y]
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: (r) => `__tla_${r}`
125
+ promiseImportName: (o) => `__tla_${o}`
116
126
  }),
117
127
  $({
118
- paths: [S],
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
- ...d ? [x()] : [],
127
- D
136
+ ...w ? [x()] : [],
137
+ S
128
138
  ];
129
139
  }
130
140
  export {
131
- K as CreopseVuePlugin
141
+ Q as CreopseVuePlugin
132
142
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@creopse/bridge",
3
3
  "description": "Creopse Bridge Toolkit",
4
- "version": "0.1.17",
4
+ "version": "0.1.19",
5
5
  "private": false,
6
6
  "author": "Noé Gnanih <noegnanih@gmail.com>",
7
7
  "license": "MIT",