@jakubmazanec/cli 0.5.6-next.9db8be45 → 0.5.6-next.fa06a28e
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/build/constants.js +1 -2
- package/build/constants.js.map +2 -2
- package/build/ui/Failure.d.ts +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/build/ui/useProgram.js.map +2 -2
- package/package.json +8 -8
- package/source/constants.ts +1 -2
- package/source/ui/useProgram.ts +0 -2
package/build/constants.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
|
|
4
|
-
let directory = path.dirname(url.fileURLToPath(import.meta.url));
|
|
3
|
+
let directory = import.meta.dirname;
|
|
5
4
|
export const PACKAGE_PATH = path.resolve(directory, "..");
|
|
6
5
|
export const CACHE_PATH = path.resolve(PACKAGE_PATH, "node_modules/.cache");
|
|
7
6
|
export const DELIMITER = "$ ";
|
package/build/constants.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../source/constants.ts"],
|
|
4
|
-
"sourcesContent": ["import path from 'node:path';\
|
|
5
|
-
"mappings": ";AAAA,OAAO,UAAU;
|
|
4
|
+
"sourcesContent": ["import path from 'node:path';\n\nlet directory = import.meta.dirname;\n\nexport const PACKAGE_PATH = path.resolve(directory, '..');\nexport const CACHE_PATH = path.resolve(PACKAGE_PATH, 'node_modules/.cache');\n\nexport const DELIMITER = '$ ';\n"],
|
|
5
|
+
"mappings": ";AAAA,OAAO,UAAU;AAEjB,IAAI,YAAY,YAAY;AAErB,aAAM,eAAe,KAAK,QAAQ,WAAW,IAAI;AACjD,aAAM,aAAa,KAAK,QAAQ,cAAc,qBAAqB;AAEnE,aAAM,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/ui/Failure.d.ts
CHANGED
|
@@ -12,4 +12,4 @@ export type FailureProps = BoxProps & {
|
|
|
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/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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../source/ui/useProgram.ts"],
|
|
4
|
-
"sourcesContent": ["import {useApp} from 'ink';\nimport {useCallback, useContext} from 'react';\nimport {useErrorBoundary} from 'react-error-boundary';\n\nimport {programContext} from './internals.js';\n\n/**\n * A React hook for accessing {@link Program} instance and `exit` function that is used for showing an error (via an error boundary) and exiting.\n */\nexport function useProgram() {\n let {showBoundary} = useErrorBoundary();\n let {exit: appExit} = useApp();\n let {program} = useContext(programContext);\n\n let exit = useCallback(\n (error: unknown) => {\n
|
|
5
|
-
"mappings": ";AAAA,SAAQ,cAAa;AACrB,SAAQ,aAAa,kBAAiB;AACtC,SAAQ,wBAAuB;AAE/B,SAAQ,sBAAqB;AAKtB,gBAAS,aAAa;AAC3B,MAAI,EAAC,aAAY,IAAI,iBAAiB;AACtC,MAAI,EAAC,MAAM,QAAO,IAAI,OAAO;AAC7B,MAAI,EAAC,QAAO,IAAI,WAAW,cAAc;AAEzC,MAAI,OAAO;AAAA,IACT,CAAC,UAAmB;
|
|
4
|
+
"sourcesContent": ["import {useApp} from 'ink';\nimport {useCallback, useContext} from 'react';\nimport {useErrorBoundary} from 'react-error-boundary';\n\nimport {programContext} from './internals.js';\n\n/**\n * A React hook for accessing {@link Program} instance and `exit` function that is used for showing an error (via an error boundary) and exiting.\n */\nexport function useProgram() {\n let {showBoundary} = useErrorBoundary();\n let {exit: appExit} = useApp();\n let {program} = useContext(programContext);\n\n let exit = useCallback(\n (error: unknown) => {\n process.exitCode = 1;\n\n showBoundary(error);\n appExit(error as Error);\n },\n [appExit, showBoundary],\n );\n\n return {program, exit};\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAQ,cAAa;AACrB,SAAQ,aAAa,kBAAiB;AACtC,SAAQ,wBAAuB;AAE/B,SAAQ,sBAAqB;AAKtB,gBAAS,aAAa;AAC3B,MAAI,EAAC,aAAY,IAAI,iBAAiB;AACtC,MAAI,EAAC,MAAM,QAAO,IAAI,OAAO;AAC7B,MAAI,EAAC,QAAO,IAAI,WAAW,cAAc;AAEzC,MAAI,OAAO;AAAA,IACT,CAAC,UAAmB;AAClB,cAAQ,WAAW;AAEnB,mBAAa,KAAK;AAClB,cAAQ,KAAc;AAAA,IACxB;AAAA,IACA,CAAC,SAAS,YAAY;AAAA,EACxB;AAEA,SAAO,EAAC,SAAS,KAAI;AACvB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jakubmazanec/cli",
|
|
3
|
-
"version": "0.5.6-next.
|
|
3
|
+
"version": "0.5.6-next.fa06a28e",
|
|
4
4
|
"description": "TypeScript-first library for building CLIs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"typecheck": "tsc --project tsconfig.typecheck.json"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@jakubmazanec/args": "2.0.18-next.
|
|
31
|
-
"@jakubmazanec/error": "3.0.18-next.
|
|
32
|
-
"@jakubmazanec/ts-utils": "3.0.19-next.
|
|
33
|
-
"@jakubmazanec/zod-utils": "3.0.4-next.
|
|
30
|
+
"@jakubmazanec/args": "2.0.18-next.fa06a28e",
|
|
31
|
+
"@jakubmazanec/error": "3.0.18-next.fa06a28e",
|
|
32
|
+
"@jakubmazanec/ts-utils": "3.0.19-next.fa06a28e",
|
|
33
|
+
"@jakubmazanec/zod-utils": "3.0.4-next.fa06a28e",
|
|
34
34
|
"chalk": "^5.6.2",
|
|
35
35
|
"fs-extra": "^11.3.2",
|
|
36
36
|
"latest-version": "^9.0.0",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"zod": "^4.1.13"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@jakubmazanec/eslint-config": "
|
|
42
|
+
"@jakubmazanec/eslint-config": "5.0.0-next.fa06a28e",
|
|
43
43
|
"@types/fs-extra": "^11.0.4",
|
|
44
44
|
"@types/lodash": "^4.17.21",
|
|
45
45
|
"@types/node": "^24.0.4",
|
|
46
|
-
"@types/react": "^19.2.
|
|
46
|
+
"@types/react": "^19.2.17",
|
|
47
47
|
"@vitest/coverage-v8": "^4.0.14",
|
|
48
48
|
"concurrently": "^9.2.1",
|
|
49
49
|
"cross-env": "^10.1.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"ink-testing-library": "^4.0.0",
|
|
55
55
|
"prettier": "^3.7.3",
|
|
56
56
|
"prettier-plugin-packagejson": "^2.5.20",
|
|
57
|
-
"react": "^19.2.
|
|
57
|
+
"react": "^19.2.7",
|
|
58
58
|
"typedoc": "^0.28.15",
|
|
59
59
|
"typedoc-plugin-markdown": "^4.9.0",
|
|
60
60
|
"typescript": "^5.9.3",
|
package/source/constants.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import url from 'node:url';
|
|
3
2
|
|
|
4
|
-
let directory =
|
|
3
|
+
let directory = import.meta.dirname;
|
|
5
4
|
|
|
6
5
|
export const PACKAGE_PATH = path.resolve(directory, '..');
|
|
7
6
|
export const CACHE_PATH = path.resolve(PACKAGE_PATH, 'node_modules/.cache');
|
package/source/ui/useProgram.ts
CHANGED
|
@@ -14,8 +14,6 @@ export function useProgram() {
|
|
|
14
14
|
|
|
15
15
|
let exit = useCallback(
|
|
16
16
|
(error: unknown) => {
|
|
17
|
-
// TODO: remove when this is fixed: https://github.com/facebook/react/issues/31544
|
|
18
|
-
// eslint-disable-next-line react-compiler/react-compiler -- false positive
|
|
19
17
|
process.exitCode = 1;
|
|
20
18
|
|
|
21
19
|
showBoundary(error);
|