@vef-framework/shared 1.0.127 → 1.0.128

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/cjs/index.cjs CHANGED
@@ -13,6 +13,7 @@ var icons = require('./icons.cjs');
13
13
  var id = require('./id.cjs');
14
14
  var json = require('./json.cjs');
15
15
  var message = require('./message.cjs');
16
+ var module$1 = require('./module.cjs');
16
17
  var path = require('./path.cjs');
17
18
  var pinyin = require('./pinyin.cjs');
18
19
  var security = require('./security.cjs');
@@ -76,6 +77,7 @@ exports.showWarningMessage = message.showWarningMessage;
76
77
  exports.showWarningNotification = message.showWarningNotification;
77
78
  exports.successIcon = message.successIcon;
78
79
  exports.warningIcon = message.warningIcon;
80
+ exports.unwrapModule = module$1.unwrapModule;
79
81
  exports.extractBaseName = path.extractBaseName;
80
82
  exports.extractDirName = path.extractDirName;
81
83
  exports.extractExtName = path.extractExtName;
package/cjs/module.cjs ADDED
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ "use strict";
5
+ const MODULE_FLAG = "__esModule";
6
+ const DEFAULT_KEY = "default";
7
+ function unwrapModule(module) {
8
+ if (Reflect.has(module, MODULE_FLAG)) {
9
+ return unwrapModule(Reflect.get(module, DEFAULT_KEY));
10
+ }
11
+ return module;
12
+ }
13
+
14
+ exports.unwrapModule = unwrapModule;
package/esm/index.js CHANGED
@@ -11,6 +11,7 @@ export { IconAlertCircle, IconAlertTriangle, IconCheck, IconInfoCircle, IconTick
11
11
  export { generateId } from './id.js';
12
12
  export { isJsonSchemaValid } from './json.js';
13
13
  export { checkIcon, defaultMessageTitle, errorIcon, infoIcon, showConfirmation, showErrorAlert, showErrorMessage, showErrorNotification, showInfoAlert, showInfoMessage, showInfoNotification, showLoadingMessage, showSuccessAlert, showSuccessMessage, showSuccessNotification, showWarningAlert, showWarningMessage, showWarningNotification, successIcon, warningIcon } from './message.js';
14
+ export { unwrapModule } from './module.js';
14
15
  export { extractBaseName, extractDirName, extractExtName, isAbsolutePath, joinPaths, normalizePath } from './path.js';
15
16
  export { parsePinyin, parsePinyinFirstLetter } from './pinyin.js';
16
17
  export { decryptRsa, encryptRsa } from './security.js';
package/esm/module.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ "use strict";
3
+ const MODULE_FLAG = "__esModule";
4
+ const DEFAULT_KEY = "default";
5
+ function unwrapModule(module) {
6
+ if (Reflect.has(module, MODULE_FLAG)) {
7
+ return unwrapModule(Reflect.get(module, DEFAULT_KEY));
8
+ }
9
+ return module;
10
+ }
11
+
12
+ export { unwrapModule };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vef-framework/shared",
3
3
  "type": "module",
4
- "version": "1.0.127",
4
+ "version": "1.0.128",
5
5
  "private": false,
6
6
  "description": "Shared fundamental to the VEF framework",
7
7
  "author": "Venus",
package/types/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from "./icons";
10
10
  export * from "./id";
11
11
  export * from "./json";
12
12
  export * from "./message";
13
+ export * from "./module";
13
14
  export * from "./path";
14
15
  export * from "./pinyin";
15
16
  export * from "./security";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Unwrap the module.
3
+ *
4
+ * @param module - The module to unwrap.
5
+ * @returns The unwrapped module.
6
+ */
7
+ export declare function unwrapModule(module: object): object;