@naturalcycles/nodejs-lib 13.42.0 → 13.43.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/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/yargs.util.d.ts +6 -0
- package/dist/yargs.util.js +14 -0
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/yargs.util.ts +11 -0
package/dist/index.d.ts
CHANGED
|
@@ -72,5 +72,6 @@ export * from './validation/joi/joi.shared.schemas';
|
|
|
72
72
|
export * from './validation/joi/joi.validation.error';
|
|
73
73
|
export * from './validation/joi/joi.validation.util';
|
|
74
74
|
export type { StringSchema } from './validation/joi/string.extensions';
|
|
75
|
+
export * from './yargs.util';
|
|
75
76
|
export type { AlternativesSchema, AnySchema, ArraySchema, BinarySchema, BooleanSchema, DateSchema, FastGlobOptions, FunctionSchema, ObjectSchema, ValidationErrorItem, };
|
|
76
77
|
export { Ajv, fastGlob };
|
package/dist/index.js
CHANGED
|
@@ -75,3 +75,4 @@ tslib_1.__exportStar(require("./validation/joi/joi.model"), exports);
|
|
|
75
75
|
tslib_1.__exportStar(require("./validation/joi/joi.shared.schemas"), exports);
|
|
76
76
|
tslib_1.__exportStar(require("./validation/joi/joi.validation.error"), exports);
|
|
77
77
|
tslib_1.__exportStar(require("./validation/joi/joi.validation.util"), exports);
|
|
78
|
+
tslib_1.__exportStar(require("./yargs.util"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._yargs = _yargs;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const yargs_1 = tslib_1.__importDefault(require("yargs"));
|
|
6
|
+
const helpers_1 = require("yargs/helpers");
|
|
7
|
+
/**
|
|
8
|
+
* Quick yargs helper to make it work in esm.
|
|
9
|
+
* It also allows to not have yargs and `@types/yargs` to be declared as dependencies.
|
|
10
|
+
*/
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/explicit-module-boundary-types
|
|
12
|
+
function _yargs() {
|
|
13
|
+
return (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv));
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/nodejs-lib",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.43.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"prepare": "husky",
|
|
6
6
|
"build": "dev-lib build",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"@naturalcycles/js-lib": "^14",
|
|
24
24
|
"@types/js-yaml": "^4",
|
|
25
25
|
"@types/jsonwebtoken": "^9",
|
|
26
|
+
"@types/yargs": "^16",
|
|
26
27
|
"ajv": "^8",
|
|
27
28
|
"ajv-formats": "^3",
|
|
28
29
|
"ajv-keywords": "^5",
|
|
@@ -41,7 +42,6 @@
|
|
|
41
42
|
"@naturalcycles/dev-lib": "^16",
|
|
42
43
|
"@types/node": "^22",
|
|
43
44
|
"@types/through2-concurrent": "^2",
|
|
44
|
-
"@types/yargs": "^16",
|
|
45
45
|
"@vitest/coverage-v8": "^3",
|
|
46
46
|
"tsx": "^4",
|
|
47
47
|
"vitest": "^3"
|
package/src/index.ts
CHANGED
|
@@ -82,6 +82,7 @@ export * from './validation/joi/joi.shared.schemas'
|
|
|
82
82
|
export * from './validation/joi/joi.validation.error'
|
|
83
83
|
export * from './validation/joi/joi.validation.util'
|
|
84
84
|
export type { StringSchema } from './validation/joi/string.extensions'
|
|
85
|
+
export * from './yargs.util'
|
|
85
86
|
|
|
86
87
|
export type {
|
|
87
88
|
AlternativesSchema,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import yargs from 'yargs'
|
|
2
|
+
import { hideBin } from 'yargs/helpers'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Quick yargs helper to make it work in esm.
|
|
6
|
+
* It also allows to not have yargs and `@types/yargs` to be declared as dependencies.
|
|
7
|
+
*/
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type, @typescript-eslint/explicit-module-boundary-types
|
|
9
|
+
export function _yargs() {
|
|
10
|
+
return yargs(hideBin(process.argv))
|
|
11
|
+
}
|