@trapi/metadata 0.3.0 → 0.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/utils/index.d.ts +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +7 -6
- package/dist/utils/validator.d.ts +0 -4
- package/dist/utils/validator.d.ts.map +0 -1
- package/dist/utils/validator.js +0 -39
- package/dist/utils/validator.js.map +0 -1
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAOA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAOA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -23,5 +23,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
23
|
__exportStar(require("./object"), exports);
|
|
24
24
|
__exportStar(require("./path"), exports);
|
|
25
25
|
__exportStar(require("./typescript"), exports);
|
|
26
|
-
__exportStar(require("./validator"), exports);
|
|
27
26
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,yCAAuB;AACvB,+CAA6B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,yCAAuB;AACvB,+CAA6B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trapi/metadata",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Generate REST-API metadata scheme from TypeScript Decorators.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"typings": "./dist/index.d.ts",
|
|
@@ -39,20 +39,21 @@
|
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://github.com/Tada5hi/trapi#readme",
|
|
41
41
|
"devDependencies": {
|
|
42
|
+
"@trapi/decorator": "^0.0.3",
|
|
42
43
|
"@types/glob": "^8.0.0",
|
|
43
44
|
"@types/minimatch": "^5.1.2",
|
|
44
|
-
"@types/yup": "^0.32.0",
|
|
45
45
|
"jsonata": "^1.8.6"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@trapi/decorator": "^0.0.2",
|
|
49
48
|
"glob": "^8.0.3",
|
|
50
49
|
"minimatch": "^5.1.0",
|
|
51
|
-
"typescript": "^4.8.4"
|
|
52
|
-
|
|
50
|
+
"typescript": "^4.8.4"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"@trapi/decorator": ">=0.0.2 <1.0.0"
|
|
53
54
|
},
|
|
54
55
|
"publishConfig": {
|
|
55
56
|
"access": "public"
|
|
56
57
|
},
|
|
57
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "3a79951e732e4b724e699f138a61b9374cb3e16f"
|
|
58
59
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/utils/validator.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,QAAQ,EACX,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAIjC,wBAAgB,kBAAkB,IAAK,QAAQ,CAAC,MAAM,CAAC,CA6BtD"}
|
package/dist/utils/validator.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021.
|
|
4
|
-
* Author Peter Placzek (tada5hi)
|
|
5
|
-
* For the full copyright and license information,
|
|
6
|
-
* view the LICENSE file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.useConfigValidator = void 0;
|
|
10
|
-
const yup_1 = require("yup");
|
|
11
|
-
const decorator_1 = require("@trapi/decorator");
|
|
12
|
-
let validatorInstance;
|
|
13
|
-
function useConfigValidator() {
|
|
14
|
-
if (typeof validatorInstance !== 'undefined') {
|
|
15
|
-
return validatorInstance;
|
|
16
|
-
}
|
|
17
|
-
validatorInstance = (0, yup_1.object)({
|
|
18
|
-
entryFile: (0, yup_1.lazy)((value) => {
|
|
19
|
-
if (typeof value === 'string') {
|
|
20
|
-
return (0, yup_1.string)().required();
|
|
21
|
-
}
|
|
22
|
-
return (0, yup_1.array)().of((0, yup_1.string)()).required().min(1);
|
|
23
|
-
}),
|
|
24
|
-
cache: (0, yup_1.lazy)((value) => {
|
|
25
|
-
if (typeof value === 'string') {
|
|
26
|
-
return (0, yup_1.string)();
|
|
27
|
-
}
|
|
28
|
-
if (typeof value === 'boolean') {
|
|
29
|
-
return (0, yup_1.boolean)();
|
|
30
|
-
}
|
|
31
|
-
return (0, yup_1.mixed)().optional().default(undefined);
|
|
32
|
-
}),
|
|
33
|
-
ignore: (0, yup_1.array)((0, yup_1.string)()).optional().default(undefined),
|
|
34
|
-
decorator: (0, decorator_1.useConfigValidator)(),
|
|
35
|
-
});
|
|
36
|
-
return validatorInstance;
|
|
37
|
-
}
|
|
38
|
-
exports.useConfigValidator = useConfigValidator;
|
|
39
|
-
//# sourceMappingURL=validator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../src/utils/validator.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAEa;AACb,gDAAqF;AAGrF,IAAI,iBAAgD,CAAC;AAErD,SAAgB,kBAAkB;IAC9B,IAAI,OAAO,iBAAiB,KAAK,WAAW,EAAE;QAC1C,OAAO,iBAAiB,CAAC;KAC5B;IAED,iBAAiB,GAAG,IAAA,YAAM,EAAC;QACvB,SAAS,EAAE,IAAA,UAAI,EAAC,CAAC,KAAK,EAAE,EAAE;YACtB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;gBAC3B,OAAO,IAAA,YAAM,GAAE,CAAC,QAAQ,EAAE,CAAC;aAC9B;YAED,OAAO,IAAA,WAAK,GAAE,CAAC,EAAE,CAAC,IAAA,YAAM,GAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAClD,CAAC,CAAC;QACF,KAAK,EAAE,IAAA,UAAI,EAAC,CAAC,KAAK,EAAE,EAAE;YAClB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;gBAC3B,OAAO,IAAA,YAAM,GAAE,CAAC;aACnB;YAED,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE;gBAC5B,OAAO,IAAA,aAAO,GAAE,CAAC;aACpB;YAED,OAAO,IAAA,WAAK,GAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACjD,CAAC,CAAC;QACF,MAAM,EAAE,IAAA,WAAK,EAAC,IAAA,YAAM,GAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;QACrD,SAAS,EAAE,IAAA,8BAA2B,GAAE;KAC3C,CAAgC,CAAC;IAElC,OAAO,iBAAiB,CAAC;AAC7B,CAAC;AA7BD,gDA6BC"}
|