@feedmepos/mf-common 1.29.31 → 1.29.32

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 +1 @@
1
- {"version":3,"file":"vite-preset.d.ts","sourceRoot":"","sources":["../vite-preset.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAwB,UAAU,EAAE,MAAM,MAAM,CAAA;AAKvE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;OAQG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAE9B;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAE9B;;;;;;;;OAQG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAE5C;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAExC;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAA;IAEhC;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,WAClB,UAAU,qBACC,SAAS,YACnB,kBAAkB,KAC1B,QAAQ,UAAU,CAsMpB,CAAA"}
1
+ {"version":3,"file":"vite-preset.d.ts","sourceRoot":"","sources":["../vite-preset.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAwB,UAAU,EAAE,MAAM,MAAM,CAAA;AAKvE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;OAQG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAE9B;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAE9B;;;;;;;;OAQG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAE5C;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAExC;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAA;IAEhC;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,WAClB,UAAU,qBACC,SAAS,YACnB,kBAAkB,KAC1B,QAAQ,UAAU,CAiNpB,CAAA"}
@@ -1,78 +1,78 @@
1
- import { readFileSync as b } from "fs";
2
- import { resolve as h } from "path";
3
- const g = (l) => {
4
- const r = l.join("|");
5
- return new RegExp(`^(${r})(\\/.*)?$`);
6
- }, y = ({
1
+ import { readFileSync as y } from "fs";
2
+ import { resolve as v } from "path";
3
+ const z = (l) => {
4
+ const p = l.join("|");
5
+ return new RegExp(`^(${p})(\\/.*)?$`);
6
+ }, O = ({
7
7
  externals: l
8
8
  }) => {
9
- const r = g(l);
9
+ const p = z(l);
10
10
  return {
11
11
  name: "externalize",
12
12
  setup(e) {
13
- e.onResolve({ filter: r }, (t) => ({
13
+ e.onResolve({ filter: p }, (t) => ({
14
14
  path: t.path,
15
15
  namespace: "externalize"
16
- })), e.onLoad({ filter: r }, () => ({
16
+ })), e.onLoad({ filter: p }, () => ({
17
17
  contents: ""
18
18
  }));
19
19
  }
20
20
  };
21
- }, z = (l) => {
22
- const r = "/@id/", e = new RegExp(
23
- `${r}(${l.join("|")})`,
21
+ }, D = (l) => {
22
+ const p = "/@id/", e = new RegExp(
23
+ `${p}(${l.join("|")})`,
24
24
  "g"
25
25
  );
26
26
  return {
27
27
  name: "vite-plugin-remove-prefix",
28
28
  transform: (t) => e.test(t) ? t.replace(
29
29
  e,
30
- (p, c) => c
30
+ (n, c) => c
31
31
  ) : t
32
32
  };
33
- }, O = (l) => {
34
- const { externals: r } = l;
33
+ }, k = (l) => {
34
+ const { externals: p } = l;
35
35
  return {
36
36
  name: "vite-plugin-externalize",
37
37
  enforce: "pre",
38
38
  apply: "serve",
39
39
  config: (e) => {
40
40
  var t;
41
- const p = { ...e };
42
- return p.optimizeDeps && p.optimizeDeps.esbuildOptions && ((t = p.optimizeDeps.esbuildOptions).plugins ?? (t.plugins = []), p.optimizeDeps.esbuildOptions.plugins.push(
43
- y({ externals: r })
44
- )), p;
41
+ const n = { ...e };
42
+ return n.optimizeDeps && n.optimizeDeps.esbuildOptions && ((t = n.optimizeDeps.esbuildOptions).plugins ?? (t.plugins = []), n.optimizeDeps.esbuildOptions.plugins.push(
43
+ O({ externals: p })
44
+ )), n;
45
45
  },
46
46
  configResolved: (e) => {
47
47
  if (e.optimizeDeps && e.optimizeDeps.include) {
48
- const p = e.optimizeDeps.include.filter(
49
- (c) => !r.includes(c)
48
+ const n = e.optimizeDeps.include.filter(
49
+ (c) => !p.includes(c)
50
50
  );
51
- e.optimizeDeps.include = p;
51
+ e.optimizeDeps.include = n;
52
52
  }
53
- e.optimizeDeps && (e.optimizeDeps.exclude = e.optimizeDeps.exclude || [], e.optimizeDeps.exclude.push(...r));
54
- const t = z(r);
53
+ e.optimizeDeps && (e.optimizeDeps.exclude = e.optimizeDeps.exclude || [], e.optimizeDeps.exclude.push(...p));
54
+ const t = D(p);
55
55
  e.plugins.push(t);
56
56
  },
57
57
  // Supresses the following warning:
58
58
  // Failed to resolve import [dependency] from [sourceFile]. Does the file exist?
59
- resolveId: (e) => r.includes(e) ? { id: e, external: !0 } : null,
59
+ resolveId: (e) => p.includes(e) ? { id: e, external: !0 } : null,
60
60
  // Supresses the following warning:
61
61
  // The following dependencies are imported but could not be resolved:
62
62
  // [dependency] (imported by [sourceFile])
63
- load: (e) => r.includes(e) ? "export default {};" : null
63
+ load: (e) => p.includes(e) ? "export default {};" : null
64
64
  };
65
- }, k = "@feedmepos/mf-", P = async (l, { command: r, mode: e }, t = {}) => {
66
- var f, j, x;
67
- const p = JSON.parse(
68
- b(h(process.cwd(), "package.json"), "utf-8")
69
- ), c = Object.keys(p.dependencies).filter((s) => s.startsWith(k)).reduce((s, i) => (s[i] = p.dependencies[i], s), {});
65
+ }, E = "@feedmepos/mf-", F = async (l, { command: p, mode: e }, t = {}) => {
66
+ var f, j, x, h, b;
67
+ const n = JSON.parse(
68
+ y(v(process.cwd(), "package.json"), "utf-8")
69
+ ), c = Object.keys(n.dependencies).filter((s) => s.startsWith(E)).reduce((s, i) => (s[i] = n.dependencies[i], s), {});
70
70
  (f = t.includeFmmfPackages) == null || f.forEach((s) => {
71
- c[s] = p.dependencies[s] ?? "latest";
71
+ c[s] = n.dependencies[s] ?? "latest";
72
72
  }), (j = t.excludeFmmfPackages) == null || j.forEach((s) => {
73
73
  delete c[s];
74
74
  });
75
- const a = {
75
+ const m = {
76
76
  "@feedmepos/ui-library": "https://cdn.jsdelivr.net/npm/@feedmepos/ui-library@latest/dist/feedmepos-ui-library.js",
77
77
  // Conditionally externalize core packages to share business logic
78
78
  ...t.externalizeCore ? {
@@ -87,32 +87,32 @@ const g = (l) => {
87
87
  "vue-router": "4.2.5/dist/vue-router.esm-browser.min.js",
88
88
  pinia: "2.1.7/+esm"
89
89
  };
90
- let m = [
90
+ let a = [
91
91
  ...Object.keys(o),
92
92
  ...Object.keys(c),
93
- ...Object.keys(a)
93
+ ...Object.keys(m)
94
94
  ];
95
- const n = { ...l };
96
- if (r == "build" && e.startsWith("fmmf") && (m = [
95
+ const r = { ...l };
96
+ if (p == "build" && e.startsWith("fmmf") && (a = [
97
97
  ...Object.keys(c),
98
98
  ...Object.keys(o),
99
- ...Object.keys(a)
100
- ], n.build = {
99
+ ...Object.keys(m)
100
+ ], r.build = {
101
101
  emptyOutDir: !0,
102
102
  lib: {
103
103
  entry: {
104
- app: h(process.cwd(), "src/app.ts")
104
+ app: v(process.cwd(), "src/app.ts")
105
105
  // Entry must export routers, FmApp, etc.
106
106
  },
107
107
  formats: ["es"]
108
108
  // ES module format for native browser import
109
109
  }
110
- }), n.plugins ?? (n.plugins = []), t.externalize) {
111
- const s = t.externalize === !0 ? m : t.externalize;
112
- n.plugins.push(O({ externals: s }));
110
+ }), r.plugins ?? (r.plugins = []), t.externalize) {
111
+ const s = t.externalize === !0 ? a : t.externalize;
112
+ r.plugins.push(k({ externals: s }));
113
113
  }
114
- n.build ?? (n.build = {}), (x = n.build).rollupOptions ?? (x.rollupOptions = {}), n.build.rollupOptions.external = m.concat(
115
- ...n.build.rollupOptions.external ?? []
114
+ r.optimizeDeps ?? (r.optimizeDeps = {}), (x = r.optimizeDeps).esbuildOptions ?? (x.esbuildOptions = {}), (h = r.optimizeDeps.esbuildOptions).keepNames ?? (h.keepNames = !0), r.build ?? (r.build = {}), (b = r.build).rollupOptions ?? (b.rollupOptions = {}), r.build.rollupOptions.external = a.concat(
115
+ ...r.build.rollupOptions.external ?? []
116
116
  );
117
117
  const d = c;
118
118
  await Promise.all(
@@ -128,7 +128,7 @@ const g = (l) => {
128
128
  // Common dependencies (Vue ecosystem)
129
129
  ...Object.keys(o).reduce((s, i) => (s[i] = `https://cdn.jsdelivr.net/npm/${i}@${o[i]}`, s), {}),
130
130
  // Specific external packages (UI library, core packages)
131
- ...a
131
+ ...m
132
132
  },
133
133
  // Scopes allow different module resolution in specific contexts
134
134
  scopes: t.importMapScopes ?? {}
@@ -139,7 +139,7 @@ const g = (l) => {
139
139
  else
140
140
  throw new Error(`Invalid replaceFmmfPackages key: ${s}, must start with @feedmepos/mf-`);
141
141
  });
142
- const v = {
142
+ const g = {
143
143
  name: "vite-plugin-feedme-microfrontend",
144
144
  enforce: "pre",
145
145
  // Run before other plugins
@@ -177,8 +177,8 @@ const g = (l) => {
177
177
  }
178
178
  }
179
179
  };
180
- return n.plugins.push(v), n;
180
+ return r.plugins.push(g), r;
181
181
  };
182
182
  export {
183
- P as fmmfVitePresent
183
+ F as fmmfVitePresent
184
184
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-common",
3
- "version": "1.29.31",
3
+ "version": "1.29.32",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -22,7 +22,7 @@
22
22
  "@feedmepos/menu": "1.7.7",
23
23
  "@feedmepos/i18n": "0.3.1",
24
24
  "@feedmepos/custom-attributes": "0.0.1-rc.4",
25
- "@feedmepos/ui-library": "1.10.11",
25
+ "@feedmepos/ui-library": "1.10.17",
26
26
  "@feedmepos/vue-client-monitoring": "0.1.0-beta.6",
27
27
  "@vue/devtools-api": "^6.5.0",
28
28
  "@vueuse/core": "^10.11.0",