@feedmepos/mf-common 1.6.3-rc.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/app.d.ts +1 -1
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +75553 -75520
- package/dist/components/Portal/BusinessDialogMobile.vue.d.ts.map +1 -1
- package/dist/components/Portal/PortalDesktop.vue.d.ts.map +1 -1
- package/dist/components/Portal/PortalMobile.vue.d.ts.map +1 -1
- package/dist/components/Portal/PortalTablet.vue.d.ts.map +1 -1
- package/dist/components/Portal/index.d.ts +1 -1
- package/dist/components/Portal/index.d.ts.map +1 -1
- package/dist/components/UserInfo/index.vue.d.ts +1 -1
- package/dist/components/UserInfo/index.vue.d.ts.map +1 -1
- package/dist/store.d.ts +39 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/vite-preset.d.ts +1 -0
- package/dist/vite-preset.d.ts.map +1 -1
- package/dist/vite-preset.js +54 -53
- package/package.json +2 -1
- package/dist/auth.d.ts +0 -34
- package/dist/auth.d.ts.map +0 -1
package/dist/vite-preset.js
CHANGED
@@ -1,86 +1,86 @@
|
|
1
1
|
import { resolve as h } from "path";
|
2
2
|
import { readFileSync as v } from "fs";
|
3
3
|
const b = (l) => {
|
4
|
-
const
|
5
|
-
return new RegExp(`^(${
|
4
|
+
const r = l.join("|");
|
5
|
+
return new RegExp(`^(${r})(\\/.*)?$`);
|
6
6
|
}, j = ({
|
7
7
|
externals: l
|
8
8
|
}) => {
|
9
|
-
const
|
9
|
+
const r = b(l);
|
10
10
|
return {
|
11
11
|
name: "externalize",
|
12
12
|
setup(e) {
|
13
|
-
e.onResolve({ filter:
|
14
|
-
path:
|
13
|
+
e.onResolve({ filter: r }, (t) => ({
|
14
|
+
path: t.path,
|
15
15
|
namespace: "externalize"
|
16
|
-
})), e.onLoad({ filter:
|
16
|
+
})), e.onLoad({ filter: r }, () => ({
|
17
17
|
contents: ""
|
18
18
|
}));
|
19
19
|
}
|
20
20
|
};
|
21
21
|
}, O = (l) => {
|
22
|
-
const
|
23
|
-
`${
|
22
|
+
const r = "/@id/", e = new RegExp(
|
23
|
+
`${r}(${l.join("|")})`,
|
24
24
|
"g"
|
25
25
|
);
|
26
26
|
return {
|
27
27
|
name: "vite-plugin-remove-prefix",
|
28
|
-
transform: (
|
28
|
+
transform: (t) => e.test(t) ? t.replace(
|
29
29
|
e,
|
30
|
-
(
|
31
|
-
) :
|
30
|
+
(p, c) => c
|
31
|
+
) : t
|
32
32
|
};
|
33
33
|
}, z = (l) => {
|
34
|
-
const { externals:
|
34
|
+
const { externals: r } = l;
|
35
35
|
return {
|
36
36
|
name: "vite-plugin-externalize",
|
37
37
|
enforce: "pre",
|
38
38
|
apply: "serve",
|
39
39
|
config: (e) => {
|
40
|
-
var
|
41
|
-
const
|
42
|
-
return
|
43
|
-
j({ externals:
|
44
|
-
)),
|
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
|
+
j({ externals: r })
|
44
|
+
)), p;
|
45
45
|
},
|
46
46
|
configResolved: (e) => {
|
47
47
|
if (e.optimizeDeps && e.optimizeDeps.include) {
|
48
|
-
const
|
49
|
-
(c) => !
|
48
|
+
const p = e.optimizeDeps.include.filter(
|
49
|
+
(c) => !r.includes(c)
|
50
50
|
);
|
51
|
-
e.optimizeDeps.include =
|
51
|
+
e.optimizeDeps.include = p;
|
52
52
|
}
|
53
|
-
e.optimizeDeps && (e.optimizeDeps.exclude = e.optimizeDeps.exclude || [], e.optimizeDeps.exclude.push(...
|
54
|
-
const
|
55
|
-
e.plugins.push(
|
53
|
+
e.optimizeDeps && (e.optimizeDeps.exclude = e.optimizeDeps.exclude || [], e.optimizeDeps.exclude.push(...r));
|
54
|
+
const t = O(r);
|
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) =>
|
59
|
+
resolveId: (e) => r.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) =>
|
63
|
+
load: (e) => r.includes(e) ? "export default {};" : null
|
64
64
|
};
|
65
|
-
}, y = "@feedmepos/mf-", P = (l, { command:
|
65
|
+
}, y = "@feedmepos/mf-", P = (l, { command: r, mode: e }, t = {}) => {
|
66
66
|
var m, d, f, g;
|
67
|
-
const
|
67
|
+
const p = JSON.parse(
|
68
68
|
v(h(process.cwd(), "package.json"), "utf-8")
|
69
|
-
), c = Object.keys(
|
70
|
-
(m =
|
71
|
-
c[
|
72
|
-
}), (d =
|
73
|
-
delete c[
|
69
|
+
), c = Object.keys(p.dependencies).filter((s) => s.startsWith(y)).reduce((s, i) => (s[i] = p.dependencies[i], s), {});
|
70
|
+
(m = t.includeFmmfPackages) == null || m.forEach((s) => {
|
71
|
+
c[s] = p.dependencies[s] ?? "latest";
|
72
|
+
}), (d = t.excludeFmmfPackages) == null || d.forEach((s) => {
|
73
|
+
delete c[s];
|
74
74
|
});
|
75
75
|
const o = {
|
76
|
-
"@vue/devtools-api": "
|
77
|
-
vue: "
|
78
|
-
"vue-router": "
|
79
|
-
pinia: "
|
76
|
+
"@vue/devtools-api": "6.5.0/lib/esm/index.js",
|
77
|
+
vue: "3.4.27/dist/vue.esm-browser.prod.min.js",
|
78
|
+
"vue-router": "4.2.5/dist/vue-router.esm-browser.min.js",
|
79
|
+
pinia: "2.1.7/+esm"
|
80
80
|
};
|
81
|
-
let
|
82
|
-
const
|
83
|
-
|
81
|
+
let a = [...Object.keys(o), ...Object.keys(c)];
|
82
|
+
const n = { ...l };
|
83
|
+
r == "build" && e.startsWith("fmmf") && (a = [...Object.keys(c), ...Object.keys(o)], n.build = {
|
84
84
|
emptyOutDir: !0,
|
85
85
|
lib: {
|
86
86
|
entry: {
|
@@ -89,20 +89,21 @@ const b = (l) => {
|
|
89
89
|
formats: ["es"]
|
90
90
|
},
|
91
91
|
rollupOptions: {
|
92
|
-
external:
|
92
|
+
external: a
|
93
93
|
}
|
94
|
-
}),
|
95
|
-
const
|
94
|
+
}), n.plugins ?? (n.plugins = []), n.plugins.push(z({ externals: a })), n.build ?? (n.build = {}), (f = n.build).rollupOptions ?? (f.rollupOptions = {}), (g = n.build.rollupOptions).external ?? (g.external = a);
|
95
|
+
const u = {
|
96
96
|
imports: {
|
97
|
-
...Object.keys(c).reduce((
|
98
|
-
...Object.keys(o).reduce((
|
99
|
-
}
|
97
|
+
...Object.keys(c).reduce((s, i) => (s[i] = `https://cdn.jsdelivr.net/npm/${i}@latest/dist/app.js`, s), {}),
|
98
|
+
...Object.keys(o).reduce((s, i) => (s[i] = `https://cdn.jsdelivr.net/npm/${i}@${o[i]}`, s), {})
|
99
|
+
},
|
100
|
+
scopes: t.importMapScopes ?? {}
|
100
101
|
};
|
101
|
-
|
102
|
-
if (
|
103
|
-
|
102
|
+
t.replaceFmmfPackages && Object.entries(t.replaceFmmfPackages).forEach(([s, i]) => {
|
103
|
+
if (s.startsWith("@feedmepos/mf-") || s === "@feedmepos/ui-library")
|
104
|
+
u.imports[s] = i;
|
104
105
|
else
|
105
|
-
throw new Error(`Invalid replaceFmmfPackages key: ${
|
106
|
+
throw new Error(`Invalid replaceFmmfPackages key: ${s}, must start with @feedmepos/mf-`);
|
106
107
|
});
|
107
108
|
const x = {
|
108
109
|
name: "vite-plugin-feedme-microfrontend",
|
@@ -111,16 +112,16 @@ const b = (l) => {
|
|
111
112
|
},
|
112
113
|
transformIndexHtml: {
|
113
114
|
enforce: "pre",
|
114
|
-
transform(
|
115
|
+
transform(s) {
|
115
116
|
return {
|
116
|
-
html:
|
117
|
+
html: s,
|
117
118
|
tags: [
|
118
119
|
{
|
119
120
|
tag: "script",
|
120
121
|
attrs: {
|
121
122
|
type: "importmap"
|
122
123
|
},
|
123
|
-
children: JSON.stringify(
|
124
|
+
children: JSON.stringify(u, null, 2),
|
124
125
|
injectTo: "head-prepend"
|
125
126
|
},
|
126
127
|
{
|
@@ -135,7 +136,7 @@ const b = (l) => {
|
|
135
136
|
}
|
136
137
|
}
|
137
138
|
};
|
138
|
-
return
|
139
|
+
return n.plugins.push(x), n;
|
139
140
|
};
|
140
141
|
export {
|
141
142
|
P as fmmfVitePresent
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@feedmepos/mf-common",
|
3
|
-
"version": "1.6.3
|
3
|
+
"version": "1.6.3",
|
4
4
|
"type": "module",
|
5
5
|
"files": [
|
6
6
|
"dist"
|
@@ -16,6 +16,7 @@
|
|
16
16
|
"./style.css": "./dist/style.css"
|
17
17
|
},
|
18
18
|
"dependencies": {
|
19
|
+
"@feedmepos/auth": "^1.1.2",
|
19
20
|
"@feedmepos/core": "^2.0.0",
|
20
21
|
"@vue/devtools-api": "^6.5.0",
|
21
22
|
"axios": "^1.6.0",
|
package/dist/auth.d.ts
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
export interface FeedMeAuthOptions {
|
2
|
-
clientId: string;
|
3
|
-
}
|
4
|
-
export interface FeedMeUser {
|
5
|
-
id: string;
|
6
|
-
email?: string | null;
|
7
|
-
photoURL?: string | null;
|
8
|
-
displayName?: string | null;
|
9
|
-
phoneNumber?: string | null;
|
10
|
-
}
|
11
|
-
export declare class FeedMeAuth {
|
12
|
-
static clientId: string;
|
13
|
-
static baseUrl: string;
|
14
|
-
private static authStateChangeCallbacks;
|
15
|
-
private static bgIframe;
|
16
|
-
private static _token;
|
17
|
-
static get token(): string | null;
|
18
|
-
static setBaseUrl(isDev: boolean): void;
|
19
|
-
static initialize(clientId: string): void;
|
20
|
-
static signIn(root?: HTMLElement): void;
|
21
|
-
static setToken(token: string): void;
|
22
|
-
static onAuthStateChanged(callback: (user: FeedMeUser | null, token: string | null) => void): () => void;
|
23
|
-
static signOut(): void;
|
24
|
-
static unmountPrompt(): void;
|
25
|
-
static getCustomToken(): Promise<string>;
|
26
|
-
static refreshToken(): Promise<string>;
|
27
|
-
static getUserClaims(): Promise<{
|
28
|
-
/** in seconds since the Unix epoch. */
|
29
|
-
exp: number;
|
30
|
-
customClaims: Record<string, unknown> | undefined;
|
31
|
-
}>;
|
32
|
-
private static startBackground;
|
33
|
-
}
|
34
|
-
//# sourceMappingURL=auth.d.ts.map
|
package/dist/auth.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B;AAED,qBAAa,UAAU;IACrB,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,OAAO,SAAiC;IAC/C,OAAO,CAAC,MAAM,CAAC,wBAAwB,CAEjC;IACN,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAiC;IAExD,OAAO,CAAC,MAAM,CAAC,MAAM,CAAsB;IAE3C,MAAM,KAAK,KAAK,kBAMf;IAED,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO;IAIhC,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM;IA0ClC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,WAAW;IA4ChC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM;IAI7B,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI;IAQ3F,MAAM,CAAC,OAAO;IASd,MAAM,CAAC,aAAa;WASP,cAAc;WAgBd,YAAY;WA4BZ,aAAa,IAAI,OAAO,CAAC;QACpC,uCAAuC;QACvC,GAAG,EAAE,MAAM,CAAA;QACX,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;KAClD,CAAC;IAaF,OAAO,CAAC,MAAM,CAAC,eAAe;CA4B/B"}
|