@creopse/bridge 0.1.11 → 0.1.12

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.
@@ -31,11 +31,6 @@ export interface CreopseReactPluginOptions {
31
31
  * @default []
32
32
  */
33
33
  shared?: string[];
34
- /**
35
- * Whether to enable UnoCSS.
36
- * @default false
37
- */
38
- unocss?: boolean;
39
34
  /**
40
35
  * Whether to generate an eslint auto-import config file.
41
36
  * @default false
@@ -1,17 +1,16 @@
1
1
  import { DASHBOARD_MODULE_NAME as y, SETTINGS_MODULE_NAME as b, sanitizeId as L } from "@creopse/utils/helpers";
2
- import C 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 S 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 D 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 x from "/Users/arkane/Dev/Projects/Web/creopse.proj/creopse.toolkit/node_modules/.pnpm/@vitejs+plugin-react@4.6.0_vite@7.0.5_@types+node@24.0.15_jiti@2.6.1_tsx@4.21.0_/node_modules/@vitejs/plugin-react/dist/index.mjs";
5
- import { stringify as M, parse 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";
6
- import j from "fs";
5
+ import { stringify as C, parse 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";
6
+ import O from "fs";
7
7
  import s from "path";
8
- import k 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";
9
- import N from "/Users/arkane/Dev/Projects/Web/creopse.proj/creopse.toolkit/node_modules/.pnpm/unocss@66.6.7_@emnapi+core@1.9.2_@emnapi+runtime@1.9.2_vite@7.0.5_@types+node@24.0.15_jiti@2.6.1_tsx@4.21.0_/node_modules/unocss/dist/vite.mjs";
10
- import B from "vite-plugin-auto-import-lite";
11
- import $ from "vite-plugin-i18next-loader";
12
- import z from "vite-plugin-json5";
13
- import R from "vite-plugin-top-level-await";
14
- function Z(A = {}) {
8
+ 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";
9
+ import k from "vite-plugin-auto-import-lite";
10
+ import N from "vite-plugin-i18next-loader";
11
+ import B from "vite-plugin-json5";
12
+ import $ from "vite-plugin-top-level-await";
13
+ function Q(A = {}) {
15
14
  const {
16
15
  manifestPath: p = "./manifest.jsonc",
17
16
  srcDir: c = "./src",
@@ -19,51 +18,50 @@ function Z(A = {}) {
19
18
  i18nLocalesPath: f,
20
19
  hooksDirs: _ = ["src/hooks"],
21
20
  shared: E = [],
22
- unocss: w = !1,
23
- eslintAutoImport: I = !1
21
+ eslintAutoImport: w = !1
24
22
  } = A;
25
- let r, e, u, g, t, v, P, h;
26
- function S() {
27
- const a = s.resolve(r, p), m = j.readFileSync(a, "utf-8");
28
- if (e = O(m || "{}"), t = {}, e.pages && Array.isArray(e.pages))
23
+ let r, e, u, g, o, v, P, h;
24
+ function I() {
25
+ const a = s.resolve(r, p), m = O.readFileSync(a, "utf-8");
26
+ if (e = M(m || "{}"), o = {}, e.pages && Array.isArray(e.pages))
29
27
  for (const l of e.pages)
30
- t[`./${l.name}`] = l.module;
28
+ o[`./${l.name}`] = l.module;
31
29
  const n = e.dashboard;
32
- n?.module && (t[`./${y}`] = n.module);
30
+ n?.module && (o[`./${y}`] = n.module);
33
31
  const i = e.settings;
34
- i?.module && (t[`./${b}`] = i.module);
35
- const o = e.development;
36
- u = L(String(e.id)) || "creopse-plugin", g = e.entry || "remoteEntry.js", v = o?.previewPort || 2160, P = o?.serverPort || 2161, h = o?.ssl || !1;
32
+ i?.module && (o[`./${b}`] = i.module);
33
+ const t = e.development;
34
+ u = L(String(e.id)) || "creopse-plugin", g = e.entry || "remoteEntry.js", v = t?.previewPort || 2160, P = t?.serverPort || 2161, h = t?.ssl || !1;
37
35
  }
38
36
  return {
39
37
  name: "creopse-react-plugin",
40
38
  config(a) {
41
- r = a.root || process.cwd(), S();
39
+ r = a.root || process.cwd(), I();
42
40
  const m = process.env.APP_IS_PREVIEW === "true", n = f ? s.resolve(r, f) : s.resolve(r, c, "i18n/locales"), i = ["react", "react-dom", "zustand", ...E];
43
41
  return {
44
42
  envPrefix: "APP_",
45
43
  plugins: [
46
44
  x(),
47
- C({
45
+ S({
48
46
  name: u,
49
47
  filename: g,
50
- exposes: t,
48
+ exposes: o,
51
49
  shared: i
52
50
  }),
53
- R({
51
+ $({
54
52
  promiseExportName: "__tla",
55
- promiseImportName: (o) => `__tla_${o}`
53
+ promiseImportName: (t) => `__tla_${t}`
56
54
  }),
57
- z(),
58
- $({
55
+ B(),
56
+ N({
59
57
  paths: [n],
60
58
  include: ["**/*.json"]
61
59
  }),
62
- B({
60
+ k({
63
61
  dirs: _,
64
62
  imports: ["react"],
65
63
  vueTemplate: !1,
66
- ...I ? {
64
+ ...w ? {
67
65
  eslintrc: {
68
66
  enabled: !0,
69
67
  filepath: "./.eslintrc-auto-import.json",
@@ -71,7 +69,6 @@ function Z(A = {}) {
71
69
  }
72
70
  } : {}
73
71
  }),
74
- ...w ? [N()] : [],
75
72
  ...h ? [D()] : []
76
73
  ],
77
74
  resolve: {
@@ -88,7 +85,7 @@ function Z(A = {}) {
88
85
  outDir: d,
89
86
  rollupOptions: {
90
87
  plugins: [
91
- k({
88
+ j({
92
89
  targets: [
93
90
  {
94
91
  src: s.resolve(r, p),
@@ -97,7 +94,7 @@ function Z(A = {}) {
97
94
  return e?.mode && (e.mode = m ? "development" : "production"), ((l) => l.replace(/(,)\s*\n/g, `,
98
95
 
99
96
  `))(
100
- M(e, null, 2)
97
+ C(e, null, 2)
101
98
  );
102
99
  }
103
100
  }
@@ -131,5 +128,5 @@ function Z(A = {}) {
131
128
  };
132
129
  }
133
130
  export {
134
- Z as CreopseReactPlugin
131
+ Q as CreopseReactPlugin
135
132
  };
@@ -31,10 +31,5 @@ export interface CreopseVuePluginOptions {
31
31
  * @default []
32
32
  */
33
33
  shared?: string[];
34
- /**
35
- * Whether to enable UnoCSS.
36
- * @default false
37
- */
38
- unocss?: boolean;
39
34
  }
40
35
  export declare function CreopseVuePlugin(options?: CreopseVuePluginOptions): Plugin;
package/dist/vite/vue.js CHANGED
@@ -1,44 +1,42 @@
1
1
  import { DASHBOARD_MODULE_NAME as y, SETTINGS_MODULE_NAME as I, sanitizeId as b } from "@creopse/utils/helpers";
2
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";
3
- import C 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";
3
+ import S 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 D from "/Users/arkane/Dev/Projects/Web/creopse.proj/creopse.toolkit/node_modules/.pnpm/@vitejs+plugin-vue@6.0.5_vite@7.0.5_@types+node@24.0.15_jiti@2.6.1_tsx@4.21.0__vue@3.5.32_typescript@5.8.3_/node_modules/@vitejs/plugin-vue/dist/index.mjs";
5
- import { stringify as x, parse 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";
6
- import O from "fs";
5
+ import { stringify as x, parse as C } 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";
6
+ import M from "fs";
7
7
  import s from "path";
8
- import N 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";
9
- import j from "/Users/arkane/Dev/Projects/Web/creopse.proj/creopse.toolkit/node_modules/.pnpm/unocss@66.6.7_@emnapi+core@1.9.2_@emnapi+runtime@1.9.2_vite@7.0.5_@types+node@24.0.15_jiti@2.6.1_tsx@4.21.0_/node_modules/unocss/dist/vite.mjs";
10
- import B from "vite-plugin-auto-import-lite";
11
- import $ from "vite-plugin-i18next-loader";
12
- import k from "vite-plugin-json5";
13
- import T from "vite-plugin-top-level-await";
14
- function Y(h = {}) {
8
+ import O 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";
9
+ import N from "vite-plugin-auto-import-lite";
10
+ import j from "vite-plugin-i18next-loader";
11
+ import B from "vite-plugin-json5";
12
+ import $ from "vite-plugin-top-level-await";
13
+ function K(h = {}) {
15
14
  const {
16
- manifestPath: p = "./manifest.jsonc",
15
+ manifestPath: m = "./manifest.jsonc",
17
16
  srcDir: c = "./src",
18
- outDir: u = "frontend",
19
- i18nLocalesPath: d,
17
+ outDir: d = "frontend",
18
+ i18nLocalesPath: u,
20
19
  composablesDirs: _ = ["src/composables"],
21
- shared: E = [],
22
- unocss: w = !1
20
+ shared: E = []
23
21
  } = h;
24
22
  let r, e, f, v, t, g, P, A;
25
- function S() {
26
- const a = s.resolve(r, p), m = O.readFileSync(a, "utf-8");
27
- if (e = M(m || "{}"), t = {}, e.pages && Array.isArray(e.pages))
23
+ function w() {
24
+ const a = s.resolve(r, m), p = M.readFileSync(a, "utf-8");
25
+ if (e = C(p || "{}"), t = {}, e.pages && Array.isArray(e.pages))
28
26
  for (const l of e.pages)
29
27
  t[`./${l.name}`] = l.module;
30
- const n = e.dashboard;
31
- n?.module && (t[`./${y}`] = n.module);
32
- const i = e.settings;
33
- i?.module && (t[`./${I}`] = i.module);
28
+ const i = e.dashboard;
29
+ i?.module && (t[`./${y}`] = i.module);
30
+ const n = e.settings;
31
+ n?.module && (t[`./${I}`] = n.module);
34
32
  const o = e.development;
35
33
  f = b(String(e.id)) || "creopse-plugin", v = e.entry || "remoteEntry.js", g = o?.previewPort || 2160, P = o?.serverPort || 2161, A = o?.ssl || !1;
36
34
  }
37
35
  return {
38
36
  name: "creopse-vue-plugin",
39
37
  config(a) {
40
- r = a.root || process.cwd(), S();
41
- const m = process.env.APP_IS_PREVIEW === "true", n = d ? s.resolve(r, d) : s.resolve(r, c, "i18n/locales"), i = ["vue", "pinia", ...E];
38
+ r = a.root || process.cwd(), w();
39
+ const p = process.env.APP_IS_PREVIEW === "true", i = u ? s.resolve(r, u) : s.resolve(r, c, "i18n/locales"), n = ["vue", "pinia", ...E];
42
40
  return {
43
41
  envPrefix: "APP_",
44
42
  plugins: [
@@ -47,24 +45,23 @@ function Y(h = {}) {
47
45
  name: f,
48
46
  filename: v,
49
47
  exposes: t,
50
- shared: i
48
+ shared: n
51
49
  }),
52
- T({
50
+ $({
53
51
  promiseExportName: "__tla",
54
52
  promiseImportName: (o) => `__tla_${o}`
55
53
  }),
56
- k(),
57
- $({
58
- paths: [n],
54
+ B(),
55
+ j({
56
+ paths: [i],
59
57
  include: ["**/*.json"]
60
58
  }),
61
- B({
59
+ N({
62
60
  dirs: _,
63
61
  imports: ["vue", "pinia"],
64
62
  vueTemplate: !0
65
63
  }),
66
- ...w ? [j()] : [],
67
- ...A ? [C()] : []
64
+ ...A ? [S()] : []
68
65
  ],
69
66
  resolve: {
70
67
  alias: [
@@ -77,16 +74,16 @@ function Y(h = {}) {
77
74
  },
78
75
  build: {
79
76
  target: "esnext",
80
- outDir: u,
77
+ outDir: d,
81
78
  rollupOptions: {
82
79
  plugins: [
83
- N({
80
+ O({
84
81
  targets: [
85
82
  {
86
- src: s.resolve(r, p),
87
- dest: u,
83
+ src: s.resolve(r, m),
84
+ dest: d,
88
85
  transform() {
89
- return e?.mode && (e.mode = m ? "development" : "production"), ((l) => l.replace(/(,)\s*\n/g, `,
86
+ return e?.mode && (e.mode = p ? "development" : "production"), ((l) => l.replace(/(,)\s*\n/g, `,
90
87
 
91
88
  `))(
92
89
  x(e, null, 2)
@@ -123,5 +120,5 @@ function Y(h = {}) {
123
120
  };
124
121
  }
125
122
  export {
126
- Y as CreopseVuePlugin
123
+ K as CreopseVuePlugin
127
124
  };
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.11",
4
+ "version": "0.1.12",
5
5
  "private": false,
6
6
  "author": "Noé Gnanih <noegnanih@gmail.com>",
7
7
  "license": "MIT",
@@ -91,7 +91,6 @@
91
91
  "rollup-plugin-copy": "^3.5.0",
92
92
  "tsx": "^4.21.0",
93
93
  "typescript": "~5.8.3",
94
- "unocss": "^66.6.7",
95
94
  "vite": "^7.0.5",
96
95
  "vite-plugin-auto-import-lite": "^0.0.2",
97
96
  "vite-plugin-dts": "^4.5.4",