kj-micro-app 1.0.2 → 1.0.3

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.
package/lib/index.d.ts CHANGED
@@ -3,17 +3,17 @@
3
3
  // Dependencies for this module:
4
4
  // ../../@micro-app/types
5
5
 
6
- declare module 'bl-micro-app' {
7
- export { default, MicroApp, getActiveApps, getAllApps, unmountApp, unmountAllApps, reload, renderApp, } from 'bl-micro-app/micro_app';
8
- export { default as preFetch, } from 'bl-micro-app/prefetch';
9
- export { removeDomScope, pureCreateElement, version, } from 'bl-micro-app/libs/utils';
10
- export { EventCenterForMicroApp, } from 'bl-micro-app/interact';
6
+ declare module 'kj-micro-app' {
7
+ export { default, MicroApp, getActiveApps, getAllApps, unmountApp, unmountAllApps, reload, renderApp, } from 'kj-micro-app/micro_app';
8
+ export { default as preFetch, } from 'kj-micro-app/prefetch';
9
+ export { removeDomScope, pureCreateElement, version, } from 'kj-micro-app/libs/utils';
10
+ export { EventCenterForMicroApp, } from 'kj-micro-app/interact';
11
11
  }
12
12
 
13
- declare module 'bl-micro-app/micro_app' {
13
+ declare module 'kj-micro-app/micro_app' {
14
14
  import { OptionsType, MicroAppBaseType, Router, AppName, Func, lifeCyclesType, MicroAppConfig, GetActiveAppsParam } from '@micro-app/types';
15
- import preFetch from 'bl-micro-app/prefetch';
16
- import { EventCenterForBaseApp } from 'bl-micro-app/interact';
15
+ import preFetch from 'kj-micro-app/prefetch';
16
+ import { EventCenterForBaseApp } from 'kj-micro-app/interact';
17
17
  /**
18
18
  * if app not prefetch & not unmount, then app is active
19
19
  * @param excludeHiddenApp exclude hidden keep-alive app, default is false
@@ -78,7 +78,7 @@ declare module 'bl-micro-app/micro_app' {
78
78
  export default microApp;
79
79
  }
80
80
 
81
- declare module 'bl-micro-app/prefetch' {
81
+ declare module 'kj-micro-app/prefetch' {
82
82
  import { prefetchParamList, globalAssetsType } from '@micro-app/types';
83
83
  /**
84
84
  * preFetch([
@@ -109,7 +109,7 @@ declare module 'bl-micro-app/prefetch' {
109
109
  export function getGlobalAssets(assets: globalAssetsType): void;
110
110
  }
111
111
 
112
- declare module 'bl-micro-app/libs/utils' {
112
+ declare module 'kj-micro-app/libs/utils' {
113
113
  import { Func, LocationQueryObject, MicroLocation, AttrsType, fiberTasks, MicroAppElementTagNameMap, MicroAppElementInterface } from '@micro-app/types';
114
114
  export const version = "__MICRO_APP_VERSION__";
115
115
  export const isBrowser: boolean;
@@ -349,7 +349,7 @@ declare module 'bl-micro-app/libs/utils' {
349
349
  export function isEmptyObject(target: unknown): boolean;
350
350
  }
351
351
 
352
- declare module 'bl-micro-app/interact' {
352
+ declare module 'kj-micro-app/interact' {
353
353
  import { CallableFunctionForInteract } from '@micro-app/types';
354
354
  class EventCenterForGlobal {
355
355
  /**
package/lib/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- const version = '1.0.2';
1
+ const version = '1.0.3';
2
2
  // do not use isUndefined
3
3
  const isBrowser = typeof window !== 'undefined';
4
4
  // do not use isUndefined
@@ -256,11 +256,13 @@ function formatAppURL(url, appName = null) {
256
256
  newOrigin = protocol + '//' + host;
257
257
  }
258
258
  }
259
+ console.log('newOrigin', newOrigin, origin);
259
260
  /**
260
261
  * keep the original url unchanged, such as .html .node .php .net .etc, search, except hash
261
262
  * BUG FIX: Never using '/' to complete url, refer to https://github.com/jd-opensource/micro-app/issues/1147
262
263
  */
263
264
  const fullPath = `${newOrigin}${pathname}${search}`;
265
+ console.log('fullPath', fullPath);
264
266
  return /^\w+?:\/\//.test(fullPath) ? fullPath : '';
265
267
  }
266
268
  catch (e) {