@jakubmazanec/cli 0.5.6-unstable.975f0f32 → 0.5.6-unstable.f507ff42
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 +1 -1
- package/build/ui/Failure.d.ts +2 -2
- package/build/ui/Failure.js.map +1 -1
- package/build/ui/Header.d.ts +1 -1
- package/build/ui/Help.d.ts +1 -1
- package/build/ui/Spinner.d.ts +1 -1
- package/build/ui/form/FormRow.d.ts +1 -1
- package/build/ui/form/TextInput.d.ts +1 -1
- package/package.json +21 -21
- package/source/ui/Failure.tsx +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
# @jakubmazanec/cli
|
|
5
5
|
|
|
6
6
|
TypeScript-first library for building CLIs.
|
|
7
|
-
|
|
8
7
|
</div>
|
|
9
8
|
<!-- header -->
|
|
10
9
|
|
|
@@ -23,6 +22,7 @@ It cannot be required from a CommonJS module.
|
|
|
23
22
|
|
|
24
23
|
- Node.js 24 or later
|
|
25
24
|
- TypeScript 5 or later
|
|
25
|
+
|
|
26
26
|
<!-- prerequisites -->
|
|
27
27
|
|
|
28
28
|
## Usage
|
package/build/ui/Failure.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ import { type ErrorDetail } from './ErrorDetail.js';
|
|
|
5
5
|
*/
|
|
6
6
|
export type FailureProps = BoxProps & {
|
|
7
7
|
/** Error that describes a failure state. Function {@link getErrorDetail} is used for getting all the information from the error; you can use it to implement own retrieval logic and pass the result as `errorDetail` prop. */
|
|
8
|
-
error:
|
|
8
|
+
error: unknown;
|
|
9
9
|
/** Information about the failure state. Overrides information retireved from `error` prop. */
|
|
10
10
|
errorDetail?: ErrorDetail;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* A component that renders a failure state.
|
|
14
14
|
*/
|
|
15
|
-
export declare function Failure({ error, errorDetail, ...boxProps }: FailureProps): import("react
|
|
15
|
+
export declare function Failure({ error, errorDetail, ...boxProps }: FailureProps): import("react").JSX.Element;
|
package/build/ui/Failure.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../source/ui/Failure.tsx"],
|
|
4
|
-
"sourcesContent": ["import {Box, type BoxProps, Text} from 'ink';\n\nimport * as colors from './colors.js';\nimport {type ErrorDetail} from './ErrorDetail.js';\nimport {getErrorDetail} from './getErrorDetail.js';\nimport {Header} from './Header.js';\nimport * as icons from './icons.js';\n\n/**\n * {@link Failure} component props.\n */\nexport type FailureProps = BoxProps & {\n /** Error that describes a failure state. Function {@link getErrorDetail} is used for getting all the information from the error; you can use it to implement own retrieval logic and pass the result as `errorDetail` prop. */\n error:
|
|
4
|
+
"sourcesContent": ["import {Box, type BoxProps, Text} from 'ink';\n\nimport * as colors from './colors.js';\nimport {type ErrorDetail} from './ErrorDetail.js';\nimport {getErrorDetail} from './getErrorDetail.js';\nimport {Header} from './Header.js';\nimport * as icons from './icons.js';\n\n/**\n * {@link Failure} component props.\n */\nexport type FailureProps = BoxProps & {\n /** Error that describes a failure state. Function {@link getErrorDetail} is used for getting all the information from the error; you can use it to implement own retrieval logic and pass the result as `errorDetail` prop. */\n error: unknown;\n\n /** Information about the failure state. Overrides information retireved from `error` prop. */\n errorDetail?: ErrorDetail;\n};\n\n/**\n * A component that renders a failure state.\n */\nexport function Failure({error, errorDetail, ...boxProps}: FailureProps) {\n let {label, description, stack, cause} = errorDetail ?? getErrorDetail(error);\n\n return (\n <Box {...boxProps} flexDirection=\"column\">\n <Header icon={icons.error}>\n <Text color={colors.highlighted}>{label}</Text>\n </Header>\n\n {description ?\n <Box flexDirection=\"column\" marginLeft={2}>\n <Text color={colors.failure}>{description}</Text>\n </Box>\n : null}\n\n {stack ?\n <Box flexDirection=\"column\" marginLeft={2} marginTop={1}>\n <Text color={colors.muted}>{stack}</Text>\n </Box>\n : null}\n\n {cause ?\n <>\n <Box flexDirection=\"column\" marginLeft={2} marginTop={1}>\n <Text color={colors.muted}>{cause.description}</Text>\n </Box>\n\n {cause.stack ?\n <Box flexDirection=\"column\" marginLeft={2} marginTop={1}>\n <Text color={colors.muted}>{cause.stack}</Text>\n </Box>\n : null}\n </>\n : null}\n </Box>\n );\n}\n"],
|
|
5
5
|
"mappings": ";AA4BQ,SAgBA,UAhBA,KAgBA,YAhBA;AA5BR,SAAQ,KAAoB,YAAW;AAEvC,YAAY,YAAY;AAExB,SAAQ,sBAAqB;AAC7B,SAAQ,cAAa;AACrB,YAAY,WAAW;AAgBhB,gBAAS,QAAQ,EAAC,OAAO,aAAa,GAAG,SAAQ,GAAiB;AACvE,MAAI,EAAC,OAAO,aAAa,OAAO,MAAK,IAAI,eAAe,eAAe,KAAK;AAE5E,SACE,qBAAC,OAAK,GAAG,UAAU,eAAc,UAC/B;AAAA,wBAAC,UAAO,MAAM,MAAM,OAClB,8BAAC,QAAK,OAAO,OAAO,aAAc,iBAAM,GAC1C;AAAA,IAEC,cACC,oBAAC,OAAI,eAAc,UAAS,YAAY,GACtC,8BAAC,QAAK,OAAO,OAAO,SAAU,uBAAY,GAC5C,IACA;AAAA,IAED,QACC,oBAAC,OAAI,eAAc,UAAS,YAAY,GAAG,WAAW,GACpD,8BAAC,QAAK,OAAO,OAAO,OAAQ,iBAAM,GACpC,IACA;AAAA,IAED,QACC,iCACE;AAAA,0BAAC,OAAI,eAAc,UAAS,YAAY,GAAG,WAAW,GACpD,8BAAC,QAAK,OAAO,OAAO,OAAQ,gBAAM,aAAY,GAChD;AAAA,MAEC,MAAM,QACL,oBAAC,OAAI,eAAc,UAAS,YAAY,GAAG,WAAW,GACpD,8BAAC,QAAK,OAAO,OAAO,OAAQ,gBAAM,OAAM,GAC1C,IACA;AAAA,OACJ,IACA;AAAA,KACJ;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/ui/Header.d.ts
CHANGED
|
@@ -12,4 +12,4 @@ export type HeaderProps = BoxProps & {
|
|
|
12
12
|
/**
|
|
13
13
|
* Header component.
|
|
14
14
|
*/
|
|
15
|
-
export declare function Header({ children, icon, showSpinner, ...boxProps }: PropsWithChildren<HeaderProps>): import("react
|
|
15
|
+
export declare function Header({ children, icon, showSpinner, ...boxProps }: PropsWithChildren<HeaderProps>): import("react").JSX.Element;
|
package/build/ui/Help.d.ts
CHANGED
|
@@ -10,4 +10,4 @@ export type HelpProps = BoxProps & {
|
|
|
10
10
|
/**
|
|
11
11
|
* A component that renders help information.
|
|
12
12
|
*/
|
|
13
|
-
export declare function Help({ program, ...boxProps }: HelpProps): import("react
|
|
13
|
+
export declare function Help({ program, ...boxProps }: HelpProps): import("react").JSX.Element;
|
package/build/ui/Spinner.d.ts
CHANGED
|
@@ -26,5 +26,5 @@ type FormRowProps<C extends FormConfig> = BoxProps & {
|
|
|
26
26
|
/**
|
|
27
27
|
* Form row component.
|
|
28
28
|
*/
|
|
29
|
-
export declare function FormRow<C extends FormConfig>({ rowName, config, rows, value, focus, isComplete, onChange, onComplete, ...boxProps }: FormRowProps<C>): import("react
|
|
29
|
+
export declare function FormRow<C extends FormConfig>({ rowName, config, rows, value, focus, isComplete, onChange, onComplete, ...boxProps }: FormRowProps<C>): import("react").JSX.Element | null;
|
|
30
30
|
export {};
|
|
@@ -27,4 +27,4 @@ export type TextInputProps = BoxProps & {
|
|
|
27
27
|
/**
|
|
28
28
|
* Text input component.
|
|
29
29
|
*/
|
|
30
|
-
export declare function TextInput({ label, validate, isComplete, value: originalValue, placeholder, focus, mask, showCursor, onChange, onSubmit, ...boxProps }: TextInputProps): import("react
|
|
30
|
+
export declare function TextInput({ label, validate, isComplete, value: originalValue, placeholder, focus, mask, showCursor, onChange, onSubmit, ...boxProps }: TextInputProps): import("react").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jakubmazanec/cli",
|
|
3
|
-
"version": "0.5.6-unstable.
|
|
3
|
+
"version": "0.5.6-unstable.f507ff42",
|
|
4
4
|
"description": "TypeScript-first library for building CLIs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,38 +27,38 @@
|
|
|
27
27
|
"typecheck": "tsc --project tsconfig.typecheck.json"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@jakubmazanec/args": "2.0.18-unstable.
|
|
31
|
-
"@jakubmazanec/error": "3.0.18-unstable.
|
|
32
|
-
"@jakubmazanec/ts-utils": "3.0.19-unstable.
|
|
33
|
-
"@jakubmazanec/zod-utils": "3.0.4-unstable.
|
|
30
|
+
"@jakubmazanec/args": "2.0.18-unstable.f507ff42",
|
|
31
|
+
"@jakubmazanec/error": "3.0.18-unstable.f507ff42",
|
|
32
|
+
"@jakubmazanec/ts-utils": "3.0.19-unstable.f507ff42",
|
|
33
|
+
"@jakubmazanec/zod-utils": "3.0.4-unstable.f507ff42",
|
|
34
34
|
"chalk": "^5.6.2",
|
|
35
|
-
"fs-extra": "^11.3.
|
|
35
|
+
"fs-extra": "^11.3.6",
|
|
36
36
|
"latest-version": "^9.0.0",
|
|
37
|
-
"lodash": "^4.
|
|
38
|
-
"react-error-boundary": "^6.
|
|
39
|
-
"zod": "^4.
|
|
37
|
+
"lodash": "^4.18.1",
|
|
38
|
+
"react-error-boundary": "^6.1.2",
|
|
39
|
+
"zod": "^4.4.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@jakubmazanec/eslint-config": "5.0.0-unstable.
|
|
42
|
+
"@jakubmazanec/eslint-config": "5.0.0-unstable.f507ff42",
|
|
43
43
|
"@types/fs-extra": "^11.0.4",
|
|
44
|
-
"@types/lodash": "^4.17.
|
|
44
|
+
"@types/lodash": "^4.17.24",
|
|
45
45
|
"@types/node": "^24.0.4",
|
|
46
|
-
"@types/react": "^19.2.
|
|
47
|
-
"@vitest/coverage-v8": "^4.
|
|
48
|
-
"concurrently": "^9.2.
|
|
46
|
+
"@types/react": "^19.2.17",
|
|
47
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
48
|
+
"concurrently": "^9.2.4",
|
|
49
49
|
"cross-env": "^10.1.0",
|
|
50
50
|
"del-cli": "^7.0.0",
|
|
51
|
-
"esbuild": "^0.
|
|
51
|
+
"esbuild": "^0.28.1",
|
|
52
52
|
"eslint": "^9.39.4",
|
|
53
53
|
"ink": "^6.5.1",
|
|
54
54
|
"ink-testing-library": "^4.0.0",
|
|
55
|
-
"prettier": "^3.
|
|
56
|
-
"prettier-plugin-packagejson": "^2.5.
|
|
57
|
-
"react": "^19.2.
|
|
58
|
-
"typedoc": "^0.28.
|
|
59
|
-
"typedoc-plugin-markdown": "^4.
|
|
55
|
+
"prettier": "^3.9.5",
|
|
56
|
+
"prettier-plugin-packagejson": "^2.5.22",
|
|
57
|
+
"react": "^19.2.7",
|
|
58
|
+
"typedoc": "^0.28.20",
|
|
59
|
+
"typedoc-plugin-markdown": "^4.12.0",
|
|
60
60
|
"typescript": "^5.9.3",
|
|
61
|
-
"vitest": "^4.
|
|
61
|
+
"vitest": "^4.1.10"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"ink": "6.x",
|
package/source/ui/Failure.tsx
CHANGED
|
@@ -11,7 +11,7 @@ import * as icons from './icons.js';
|
|
|
11
11
|
*/
|
|
12
12
|
export type FailureProps = BoxProps & {
|
|
13
13
|
/** Error that describes a failure state. Function {@link getErrorDetail} is used for getting all the information from the error; you can use it to implement own retrieval logic and pass the result as `errorDetail` prop. */
|
|
14
|
-
error:
|
|
14
|
+
error: unknown;
|
|
15
15
|
|
|
16
16
|
/** Information about the failure state. Overrides information retireved from `error` prop. */
|
|
17
17
|
errorDetail?: ErrorDetail;
|