@cabloy/module-info 1.2.10 → 1.3.1
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/dist/index.d.ts +5 -6
- package/dist/index.js +5 -22
- package/dist/interface.d.ts +3 -3
- package/dist/interface.js +1 -3
- package/dist/onionScenesMeta.d.ts +1 -2
- package/dist/onionScenesMeta.js +4 -11
- package/dist/utils.d.ts +1 -2
- package/dist/utils.js +9 -17
- package/dist/vona.d.ts +1 -2
- package/dist/vona.js +1 -3
- package/dist/zova.d.ts +0 -1
- package/dist/zova.js +1 -3
- package/package.json +10 -22
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export * from './interface.
|
|
2
|
-
export * from './onionScenesMeta.
|
|
3
|
-
export * from './utils.
|
|
4
|
-
export * from './vona.
|
|
5
|
-
export * from './zova.
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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";
|
package/dist/interface.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VonaOnionOptionsMeta } from './vona.
|
|
2
|
-
import { ZovaOnionOptionsMeta } from './zova.
|
|
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';
|
|
@@ -113,6 +113,7 @@ export interface IModulePackage {
|
|
|
113
113
|
title: string;
|
|
114
114
|
description: string;
|
|
115
115
|
author: string;
|
|
116
|
+
files: string[];
|
|
116
117
|
dependencies: Record<string, string>;
|
|
117
118
|
}
|
|
118
119
|
export interface IGlobBeanFile {
|
|
@@ -129,4 +130,3 @@ export interface IGlobBeanFile {
|
|
|
129
130
|
isIgnore: boolean;
|
|
130
131
|
isVirtual: boolean;
|
|
131
132
|
}
|
|
132
|
-
//# sourceMappingURL=interface.d.ts.map
|
package/dist/interface.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IModule, OnionMetasMeta, OnionScenesMeta } from './interface.
|
|
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
|
package/dist/onionScenesMeta.js
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
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(/\\/
|
|
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.
|
|
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.
|
|
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 =
|
|
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' | '
|
|
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
package/dist/zova.d.ts
CHANGED
package/dist/zova.js
CHANGED
package/package.json
CHANGED
|
@@ -1,40 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cabloy/module-info",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.3.1",
|
|
4
5
|
"description": "cabloy module-info",
|
|
5
6
|
"publishConfig": {
|
|
6
7
|
"access": "public"
|
|
7
8
|
},
|
|
9
|
+
"author": "zhennann",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"framework",
|
|
12
|
+
"cabloy"
|
|
13
|
+
],
|
|
8
14
|
"exports": {
|
|
9
15
|
".": {
|
|
10
16
|
"types": [
|
|
11
17
|
"./src/index.ts",
|
|
12
18
|
"./dist/index.d.ts"
|
|
13
19
|
],
|
|
14
|
-
"
|
|
15
|
-
"require": "./dist/index.js",
|
|
16
|
-
"default": "./src/index.ts"
|
|
20
|
+
"default": "./dist/index.js"
|
|
17
21
|
},
|
|
18
22
|
"./package.json": "./package.json"
|
|
19
23
|
},
|
|
20
24
|
"files": [
|
|
21
|
-
"dist
|
|
22
|
-
"dist/**/*.d.ts"
|
|
25
|
+
"dist"
|
|
23
26
|
],
|
|
24
|
-
"
|
|
25
|
-
"egg",
|
|
26
|
-
"egg-born",
|
|
27
|
-
"framework",
|
|
28
|
-
"cabloy"
|
|
29
|
-
],
|
|
30
|
-
"author": "zhennann",
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"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
|
-
}
|
|
27
|
+
"dependencies": {}
|
|
40
28
|
}
|