asma-helpers 0.8.5 → 0.8.7
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.
|
@@ -14,7 +14,7 @@ export declare function initASMAAppVitals({ authenticated, is_child_app, subdoma
|
|
|
14
14
|
* add qiankunWindow.__POWERED_BY_QIANKUN__ there where qiankunWindow is awailable
|
|
15
15
|
*/
|
|
16
16
|
authenticated: () => boolean;
|
|
17
|
-
subdomain_check
|
|
17
|
+
subdomain_check?: {
|
|
18
18
|
/**
|
|
19
19
|
* redirects to domain if subdomain is not registered
|
|
20
20
|
* ex: https://non-existent.adopus.no -> https://www.adopus.no
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initASMAAppVitals.d.ts","sourceRoot":"","sources":["../../src/helpers/initASMAAppVitals.ts"],"names":[],"mappings":"AAKA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"initASMAAppVitals.d.ts","sourceRoot":"","sources":["../../src/helpers/initASMAAppVitals.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAGH,wBAAsB,iBAAiB,CAAC,EACpC,aAAa,EACb,YAAoB,EACpB,eAAe,EACf,eAAe,GAClB,EAAE;IACC;;;OAGG;IACH,eAAe,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACjD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,aAAa,EAAE,MAAM,OAAO,CAAA;IAC5B,eAAe,CAAC,EAAE;QACd;;;WAGG;QACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;QAChC,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;QACnD;;WAEG;QACH,KAAK,EAAE;YAAE,UAAU,EAAE,MAAM,CAAC;YAAC,YAAY,EAAE,MAAM,CAAA;SAAE,CAAA;QACnD;;WAEG;QACH,OAAO,EAAE,WAAW,GAAG,YAAY,GAAG,eAAe,CAAA;KACxD,CAAA;CACJ,2CAgCA"}
|
|
@@ -9,7 +9,7 @@ import { getCachedJwtInternal } from './generateSrvAuthBindings';
|
|
|
9
9
|
/* @__PURE__ */
|
|
10
10
|
export async function initASMAAppVitals({ authenticated, is_child_app = false, subdomain_check, setLoadMicroApp, }) {
|
|
11
11
|
/**
|
|
12
|
-
* !!!ORDER
|
|
12
|
+
* !!!ORDER IMPORTANT!!!
|
|
13
13
|
* EnvConfigsFn from EnvCongigs.ts
|
|
14
14
|
* setLoadMicroApp from asma-qiankun-react-loader
|
|
15
15
|
* mst_stores_toPersisit - array of mst stores that should be persisted in indexedDB
|
|
@@ -23,8 +23,11 @@ export async function initASMAAppVitals({ authenticated, is_child_app = false, s
|
|
|
23
23
|
!is_child_app && (await clearCacheData(EnvConfigsFnInternal().CACHE_VERSION));
|
|
24
24
|
await setLoadMicroApp(EnvConfigsFnInternal().DEVELOPMENT);
|
|
25
25
|
let registeredSubdomain = true;
|
|
26
|
-
if (!is_child_app) {
|
|
27
|
-
const [registeredSubdomain1] = await checkForRegisteredSubdomain({
|
|
26
|
+
if (!is_child_app && subdomain_check) {
|
|
27
|
+
const [registeredSubdomain1] = await checkForRegisteredSubdomain({
|
|
28
|
+
...subdomain_check,
|
|
29
|
+
authenticated,
|
|
30
|
+
});
|
|
28
31
|
registeredSubdomain = registeredSubdomain1;
|
|
29
32
|
authenticated() && (await getCachedJwtInternal());
|
|
30
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initASMAAppVitals.js","sourceRoot":"","sources":["../../src/helpers/initASMAAppVitals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAEhE;;;GAGG;AACH,eAAe;
|
|
1
|
+
{"version":3,"file":"initASMAAppVitals.js","sourceRoot":"","sources":["../../src/helpers/initASMAAppVitals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAEhE;;;GAGG;AACH,eAAe;AAEf,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EACpC,aAAa,EACb,YAAY,GAAG,KAAK,EACpB,eAAe,EACf,eAAe,GA6BlB;IACG;;;;;;OAMG;IACH,MAAM,oBAAoB,EAAE,CAAA;IAE5B;;;OAGG;IACH,CAAC,YAAY,IAAI,CAAC,MAAM,cAAc,CAAC,oBAAoB,EAAE,CAAC,aAAa,CAAC,CAAC,CAAA;IAE7E,MAAM,eAAe,CAAC,oBAAoB,EAAE,CAAC,WAAW,CAAC,CAAA;IAEzD,IAAI,mBAAmB,GAAG,IAAI,CAAA;IAE9B,IAAI,CAAC,YAAY,IAAI,eAAe,EAAE;QAClC,MAAM,CAAC,oBAAoB,CAAC,GAAG,MAAM,2BAA2B,CAAC;YAC7D,GAAG,eAAe;YAClB,aAAa;SAChB,CAAC,CAAA;QAEF,mBAAmB,GAAG,oBAAoB,CAAA;QAE1C,aAAa,EAAE,IAAI,CAAC,MAAM,oBAAoB,EAAE,CAAC,CAAA;KACpD;IAED,OAAO,CAAC,mBAAmB,CAAmC,CAAA;AAClE,CAAC"}
|
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@ import { getCachedJwtInternal } from './generateSrvAuthBindings'
|
|
|
8
8
|
* @imporant make sure this method allways is called first when startsFe() on both on child and shell apps
|
|
9
9
|
*/
|
|
10
10
|
/* @__PURE__ */
|
|
11
|
+
|
|
11
12
|
export async function initASMAAppVitals({
|
|
12
13
|
authenticated,
|
|
13
14
|
is_child_app = false,
|
|
@@ -25,7 +26,7 @@ export async function initASMAAppVitals({
|
|
|
25
26
|
* add qiankunWindow.__POWERED_BY_QIANKUN__ there where qiankunWindow is awailable
|
|
26
27
|
*/
|
|
27
28
|
authenticated: () => boolean
|
|
28
|
-
subdomain_check
|
|
29
|
+
subdomain_check?: {
|
|
29
30
|
/**
|
|
30
31
|
* redirects to domain if subdomain is not registered
|
|
31
32
|
* ex: https://non-existent.adopus.no -> https://www.adopus.no
|
|
@@ -43,7 +44,7 @@ export async function initASMAAppVitals({
|
|
|
43
44
|
}
|
|
44
45
|
}) {
|
|
45
46
|
/**
|
|
46
|
-
* !!!ORDER
|
|
47
|
+
* !!!ORDER IMPORTANT!!!
|
|
47
48
|
* EnvConfigsFn from EnvCongigs.ts
|
|
48
49
|
* setLoadMicroApp from asma-qiankun-react-loader
|
|
49
50
|
* mst_stores_toPersisit - array of mst stores that should be persisted in indexedDB
|
|
@@ -61,8 +62,11 @@ export async function initASMAAppVitals({
|
|
|
61
62
|
|
|
62
63
|
let registeredSubdomain = true
|
|
63
64
|
|
|
64
|
-
if (!is_child_app) {
|
|
65
|
-
const [registeredSubdomain1] = await checkForRegisteredSubdomain({
|
|
65
|
+
if (!is_child_app && subdomain_check) {
|
|
66
|
+
const [registeredSubdomain1] = await checkForRegisteredSubdomain({
|
|
67
|
+
...subdomain_check,
|
|
68
|
+
authenticated,
|
|
69
|
+
})
|
|
66
70
|
|
|
67
71
|
registeredSubdomain = registeredSubdomain1
|
|
68
72
|
|