@cabloy/module-info 1.2.10 → 1.3.0

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/README.md CHANGED
File without changes
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- export * from './interface.js';
2
- export * from './onionScenesMeta.js';
3
- export * from './utils.js';
4
- export * from './vona.js';
5
- export * from './zova.js';
6
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './interface.ts';
2
+ export * from './onionScenesMeta.ts';
3
+ export * from './utils.ts';
4
+ export * from './vona.ts';
5
+ export * from './zova.ts';
package/dist/index.js CHANGED
@@ -1,22 +1,5 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./interface.js"), exports);
18
- __exportStar(require("./onionScenesMeta.js"), exports);
19
- __exportStar(require("./utils.js"), exports);
20
- __exportStar(require("./vona.js"), exports);
21
- __exportStar(require("./zova.js"), exports);
22
- //# sourceMappingURL=index.js.map
1
+ export * from "./interface.js";
2
+ export * from "./onionScenesMeta.js";
3
+ export * from "./utils.js";
4
+ export * from "./vona.js";
5
+ export * from "./zova.js";
@@ -1,5 +1,5 @@
1
- import { VonaOnionOptionsMeta } from './vona.js';
2
- import { ZovaOnionOptionsMeta } from './zova.js';
1
+ import type { VonaOnionOptionsMeta } from './vona.ts';
2
+ import type { ZovaOnionOptionsMeta } from './zova.ts';
3
3
  export type TypeProjectMode = 'front' | 'api' | 'zova' | 'vona';
4
4
  export type TypeProjectEntityType = 'module' | 'suite';
5
5
  export type TypeBrandName = 'zova' | 'vona';
@@ -129,4 +129,3 @@ export interface IGlobBeanFile {
129
129
  isIgnore: boolean;
130
130
  isVirtual: boolean;
131
131
  }
132
- //# sourceMappingURL=interface.d.ts.map
package/dist/interface.js CHANGED
@@ -1,3 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=interface.js.map
1
+ export {};
@@ -1,6 +1,5 @@
1
- import { IModule, OnionMetasMeta, OnionScenesMeta } from './interface.js';
1
+ import type { IModule, OnionMetasMeta, OnionScenesMeta } from './interface.ts';
2
2
  export declare function getOnionScenesMeta(modules: Record<string, IModule>): OnionScenesMeta;
3
3
  export declare function getOnionMetasMeta(modules: Record<string, IModule>): OnionMetasMeta;
4
4
  export declare function _getOnionScenesMeta(modules: Record<string, IModule>): {};
5
5
  export declare function _getOnionMetasMeta(modules: Record<string, IModule>): {};
6
- //# sourceMappingURL=onionScenesMeta.d.ts.map
@@ -1,24 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getOnionScenesMeta = getOnionScenesMeta;
4
- exports.getOnionMetasMeta = getOnionMetasMeta;
5
- exports._getOnionScenesMeta = _getOnionScenesMeta;
6
- exports._getOnionMetasMeta = _getOnionMetasMeta;
7
1
  let __onionScenesMeta;
8
- function getOnionScenesMeta(modules) {
2
+ export function getOnionScenesMeta(modules) {
9
3
  if (!__onionScenesMeta) {
10
4
  __onionScenesMeta = _getOnionScenesMeta(modules);
11
5
  }
12
6
  return __onionScenesMeta;
13
7
  }
14
8
  let __onionMetasMeta;
15
- function getOnionMetasMeta(modules) {
9
+ export function getOnionMetasMeta(modules) {
16
10
  if (!__onionMetasMeta) {
17
11
  __onionMetasMeta = _getOnionMetasMeta(modules);
18
12
  }
19
13
  return __onionMetasMeta;
20
14
  }
21
- function _getOnionScenesMeta(modules) {
15
+ export function _getOnionScenesMeta(modules) {
22
16
  const result = {};
23
17
  for (const moduleName in modules) {
24
18
  const module = modules[moduleName];
@@ -31,7 +25,7 @@ function _getOnionScenesMeta(modules) {
31
25
  }
32
26
  return result;
33
27
  }
34
- function _getOnionMetasMeta(modules) {
28
+ export function _getOnionMetasMeta(modules) {
35
29
  const result = {};
36
30
  for (const moduleName in modules) {
37
31
  const module = modules[moduleName];
@@ -44,4 +38,3 @@ function _getOnionMetasMeta(modules) {
44
38
  }
45
39
  return result;
46
40
  }
47
- //# sourceMappingURL=onionScenesMeta.js.map
package/dist/utils.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { IModuleInfo, TypeProjectEntityType, TypeProjectMode } from './interface.js';
1
+ import type { IModuleInfo, TypeProjectEntityType, TypeProjectMode } from './interface.ts';
2
2
  export declare function parseInfoFromPath(pathName?: string | null): IModuleInfo | undefined;
3
3
  export declare function parseInfo(moduleName: string | undefined): IModuleInfo | undefined;
4
4
  export declare function parseInfoPro(moduleName: string | undefined, projectMode: TypeProjectMode, projectEntityType: TypeProjectEntityType): IModuleInfo | undefined;
5
5
  export declare function parseName(moduleUrl: any): string | undefined;
6
6
  export declare function relativeNameToCapitalize(moduleName: string, firstCharToUpperCase: boolean): string;
7
- //# sourceMappingURL=utils.d.ts.map
package/dist/utils.js CHANGED
@@ -1,18 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseInfoFromPath = parseInfoFromPath;
4
- exports.parseInfo = parseInfo;
5
- exports.parseInfoPro = parseInfoPro;
6
- exports.parseName = parseName;
7
- exports.relativeNameToCapitalize = relativeNameToCapitalize;
8
- function parseInfoFromPath(pathName) {
1
+ export function parseInfoFromPath(pathName) {
9
2
  if (!pathName)
10
3
  return;
11
- pathName = pathName.replace(/\\/gi, '/');
4
+ pathName = pathName.replace(/\\/g, '/');
12
5
  const parts = pathName.split('/');
13
6
  for (let i = parts.length - 1; i >= 0; i--) {
14
7
  const part = parts[i];
15
- if (part.indexOf('-') === -1)
8
+ if (!part.includes('-'))
16
9
  continue;
17
10
  const info = parseInfo(part);
18
11
  if (!info)
@@ -27,10 +20,10 @@ const PREFIX_D = './';
27
20
  const PREFIX_E = '/';
28
21
  // aa-hello aa/hello
29
22
  // first check / then -
30
- function parseInfo(moduleName) {
23
+ export function parseInfo(moduleName) {
31
24
  if (!moduleName)
32
25
  return;
33
- if (moduleName.indexOf('://') > -1)
26
+ if (moduleName.includes('://'))
34
27
  return;
35
28
  if (moduleName.charAt(0) === '/')
36
29
  moduleName = moduleName.substring(1);
@@ -53,7 +46,7 @@ function parseInfo(moduleName) {
53
46
  };
54
47
  return info;
55
48
  }
56
- function parseInfoPro(moduleName, projectMode, projectEntityType) {
49
+ export function parseInfoPro(moduleName, projectMode, projectEntityType) {
57
50
  const info = parseInfo(moduleName);
58
51
  if (!info)
59
52
  return info;
@@ -69,11 +62,11 @@ function parseInfoPro(moduleName, projectMode, projectEntityType) {
69
62
  // vona-module-aa-hello
70
63
  // ./aa-hello/
71
64
  // ./vona-module-aa-hello/
72
- function parseName(moduleUrl) {
65
+ export function parseName(moduleUrl) {
73
66
  if (!moduleUrl)
74
67
  return;
75
68
  if (moduleUrl.indexOf('/api/static/') === 0) {
76
- moduleUrl = '/api/' + moduleUrl.substring('/api/static/'.length);
69
+ moduleUrl = `/api/${moduleUrl.substring('/api/static/'.length)}`;
77
70
  }
78
71
  if (moduleUrl.indexOf(PREFIX_A) === 0) {
79
72
  return _parseNameLikeUrl(moduleUrl, PREFIX_A);
@@ -116,7 +109,7 @@ function _parseName(moduleUrl, prefix) {
116
109
  posB = moduleUrl.length;
117
110
  return moduleUrl.substring(posA, posB);
118
111
  }
119
- function relativeNameToCapitalize(moduleName, firstCharToUpperCase) {
112
+ export function relativeNameToCapitalize(moduleName, firstCharToUpperCase) {
120
113
  return moduleName
121
114
  .split('-')
122
115
  .map((name, index) => {
@@ -126,4 +119,3 @@ function relativeNameToCapitalize(moduleName, firstCharToUpperCase) {
126
119
  })
127
120
  .join('');
128
121
  }
129
- //# sourceMappingURL=utils.js.map
package/dist/vona.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export type VonaMetaFlavor = 'normal' | keyof VonaMetaFlavorExtend;
2
- export type VonaMetaMode = 'local' | 'prod' | 'unittest';
2
+ export type VonaMetaMode = 'local' | 'prod' | 'test';
3
3
  export interface VonaConfigMeta {
4
4
  flavor: VonaMetaFlavor;
5
5
  mode: VonaMetaMode;
@@ -10,4 +10,3 @@ export interface VonaOnionOptionsMeta {
10
10
  }
11
11
  export interface VonaMetaFlavorExtend {
12
12
  }
13
- //# sourceMappingURL=vona.d.ts.map
package/dist/vona.js CHANGED
@@ -1,3 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=vona.js.map
1
+ export {};
package/dist/zova.d.ts CHANGED
@@ -15,4 +15,3 @@ export interface ZovaMetaFlavorExtend {
15
15
  }
16
16
  export interface ZovaMetaAppModeExtend {
17
17
  }
18
- //# sourceMappingURL=zova.d.ts.map
package/dist/zova.js CHANGED
@@ -1,3 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=zova.js.map
1
+ export {};
package/package.json CHANGED
@@ -1,40 +1,32 @@
1
1
  {
2
2
  "name": "@cabloy/module-info",
3
- "version": "1.2.10",
3
+ "type": "module",
4
+ "version": "1.3.0",
4
5
  "description": "cabloy module-info",
5
6
  "publishConfig": {
6
7
  "access": "public"
7
8
  },
9
+ "author": "zhennann",
10
+ "keywords": [
11
+ "egg",
12
+ "egg-born",
13
+ "framework",
14
+ "cabloy"
15
+ ],
8
16
  "exports": {
9
17
  ".": {
10
18
  "types": [
11
19
  "./src/index.ts",
12
20
  "./dist/index.d.ts"
13
21
  ],
14
- "import": "./dist/index.js",
15
- "require": "./dist/index.js",
16
- "default": "./src/index.ts"
22
+ "default": "./dist/index.js"
17
23
  },
18
24
  "./package.json": "./package.json"
19
25
  },
20
26
  "files": [
21
- "dist/**/*.js",
22
- "dist/**/*.d.ts"
27
+ "dist"
23
28
  ],
24
- "keywords": [
25
- "egg",
26
- "egg-born",
27
- "framework",
28
- "cabloy"
29
- ],
30
- "author": "zhennann",
31
29
  "dependencies": {
32
30
  "stack-utils": "^2.0.6"
33
- },
34
- "gitHead": "2d40c063c115b230fdbc89f5a78b4412ebd0dfc9",
35
- "scripts": {
36
- "lint": "eslint .",
37
- "clean": "tsc -b --clean",
38
- "tsc:publish": "npm run clean && tsc -b"
39
31
  }
40
- }
32
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2016-present Vona
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.