@creopse/bridge 0.1.18 → 0.1.20

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