@detergent-software/atk 9.6.1-dev.13 → 9.6.1-dev.14
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/CHANGELOG.md +10 -0
- package/build/commands/_app.d.ts +13 -0
- package/build/commands/_app.d.ts.map +1 -1
- package/build/commands/_app.js +14 -1
- package/build/commands/_app.js.map +1 -1
- package/build/hooks/useRenderOnResize.d.ts +11 -0
- package/build/hooks/useRenderOnResize.d.ts.map +1 -0
- package/build/hooks/useRenderOnResize.js +35 -0
- package/build/hooks/useRenderOnResize.js.map +1 -0
- package/build/lib/ink-stdout.d.ts +17 -0
- package/build/lib/ink-stdout.d.ts.map +1 -0
- package/build/lib/ink-stdout.js +34 -0
- package/build/lib/ink-stdout.js.map +1 -0
- package/build/lib/pastel/read-custom-app.d.ts +8 -1
- package/build/lib/pastel/read-custom-app.d.ts.map +1 -1
- package/build/lib/pastel/read-custom-app.js +2 -1
- package/build/lib/pastel/read-custom-app.js.map +1 -1
- package/build/lib/pastel/render-command.d.ts.map +1 -1
- package/build/lib/pastel/render-command.js +3 -3
- package/build/lib/pastel/render-command.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [9.6.1-dev.14](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTv9.6.1-dev.13&targetVersion=GTv9.6.1-dev.14) (2026-11-11)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **cli:** keep Ink's redraw while a prompt takes keys ([f71f470](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/f71f470125c1d4eb914b6ffcb30a765b706f86f6))
|
|
6
|
+
* **cli:** refit atk browse and atk list when the terminal is resized ([ce4a956](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/ce4a956d2f87515fd331612e297a24ec36e825b6))
|
|
7
|
+
* **cli:** refit before Ink's own resize redraw ([9781d16](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/9781d166f3398324acbc9ef47018a3f440f6c027))
|
|
8
|
+
* **cli:** return the stdout view from chained stream calls ([9169ca2](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/9169ca282e95bada9a0c29e181916bea4f4cfb40))
|
|
9
|
+
* **cli:** stop Ink clearing the terminal after a long output ([3d74f20](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/3d74f20298ddebcafe4a961d061ecf1fc2d564b7))
|
|
10
|
+
|
|
1
11
|
## [9.6.1-dev.13](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTv9.6.1-dev.12&targetVersion=GTv9.6.1-dev.13) (2026-11-11)
|
|
2
12
|
|
|
3
13
|
### Bug Fixes
|
package/build/commands/_app.d.ts
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
|
+
import { type RenderOptions } from 'ink';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import type { AppProps } from '../lib/pastel/index.js';
|
|
4
|
+
import { type RawModeState } from '../lib/ink-stdout.js';
|
|
3
5
|
export default function App({ commandProps, Component }: AppProps): React.JSX.Element;
|
|
6
|
+
/**
|
|
7
|
+
* Ink's render options for this run. A full-screen screen (`browse`, `list`), in a terminal and without `--json`, gives
|
|
8
|
+
* Ink the terminal's height: the screen sizes itself by it. Every other run gives it only while a prompt takes keys, so
|
|
9
|
+
* output nobody can type into never makes Ink clear the terminal, however long it is (ATK-965).
|
|
10
|
+
*/
|
|
11
|
+
export declare function renderOptions(Component: AppProps['Component'], options: Record<string, unknown>, streams?: {
|
|
12
|
+
stdin: RawModeState & {
|
|
13
|
+
isTTY?: boolean;
|
|
14
|
+
};
|
|
15
|
+
stdout: NodeJS.WriteStream;
|
|
16
|
+
}): RenderOptions;
|
|
4
17
|
//# sourceMappingURL=_app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_app.d.ts","sourceRoot":"","sources":["../../src/commands/_app.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_app.d.ts","sourceRoot":"","sources":["../../src/commands/_app.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,aAAa,EAAQ,MAAM,KAAK,CAAC;AAIrE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAWvD,OAAO,EAAE,KAAK,YAAY,EAAgB,MAAM,sBAAsB,CAAC;AAoEvE,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,QAAQ,qBAyEhE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,QAAQ,CAAC,WAAW,CAAC,EAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,OAAO,GAAE;IAAE,KAAK,EAAE,YAAY,GAAG;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAA;CAAY,GAC3F,aAAa,CAIf"}
|
package/build/commands/_app.js
CHANGED
|
@@ -10,10 +10,12 @@ import MeasuredBox from '../components/MeasuredBox.js';
|
|
|
10
10
|
import NoticeBanner from '../components/NoticeBanner.js';
|
|
11
11
|
import UpdateBanner from '../components/UpdateBanner.js';
|
|
12
12
|
import { useMeasuredRows } from '../hooks/useMeasuredRows.js';
|
|
13
|
+
import { useRenderOnResize } from '../hooks/useRenderOnResize.js';
|
|
13
14
|
import { declaresFullScreen, ShellContext } from '../hooks/useShell.js';
|
|
14
15
|
import { errorGuidance } from '../lib/errors.js';
|
|
16
|
+
import { rowsWhileRaw } from '../lib/ink-stdout.js';
|
|
15
17
|
import { getNotices, subscribeNotices } from '../lib/notices.js';
|
|
16
|
-
import { renderJson, useCanPrompt } from '../lib/output.js';
|
|
18
|
+
import { processCanPrompt, renderJson, useCanPrompt } from '../lib/output.js';
|
|
17
19
|
import { getUpdateInfo, isUpdateBannerHidden, subscribeUpdateBanner } from '../lib/update-check.js';
|
|
18
20
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
21
|
const pkg = JSON.parse(readFileSync(join(__dirname, '..', '..', 'package.json'), 'utf8'));
|
|
@@ -87,12 +89,23 @@ export default function App({ commandProps, Component }) {
|
|
|
87
89
|
const [fullScreen, setFullScreen] = React.useState(() => declaresFullScreen(Component, commandProps.options));
|
|
88
90
|
const aboveRef = React.useRef(null);
|
|
89
91
|
const aboveRows = useMeasuredRows(aboveRef, fullScreen);
|
|
92
|
+
// A resize renders the whole tree again: the shell measures its rewrapped rows and the screen refits (ATK-964)
|
|
93
|
+
useRenderOnResize(!effectiveJson);
|
|
90
94
|
const shell = React.useMemo(() => ({ rows: 2 * SHELL_MARGIN + aboveRows, setFullScreen }), [aboveRows]);
|
|
91
95
|
if (effectiveJson) {
|
|
92
96
|
return (_jsx(CommandErrorBoundary, { json: true, children: _jsx(Component, { ...commandProps }) }));
|
|
93
97
|
}
|
|
94
98
|
return (_jsx(ShellContext.Provider, { value: shell, children: _jsxs(Box, { flexDirection: 'column', marginBottom: SHELL_MARGIN, marginTop: SHELL_MARGIN, children: [_jsxs(MeasuredBox, { clip: fullScreen, measureRef: aboveRef, rows: aboveRows, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Header, { compact: fullScreen, version: pkg.version }) }), updateInfo && !bannerHidden && (_jsx(Box, { marginBottom: 1, children: _jsx(UpdateBanner, { info: updateInfo }) })), notices.length > 0 && (_jsx(Box, { marginBottom: 1, children: _jsx(NoticeBanner, { notices: notices }) }))] }), _jsx(CommandErrorBoundary, { json: false, children: _jsx(Component, { ...commandProps }) })] }) }));
|
|
95
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Ink's render options for this run. A full-screen screen (`browse`, `list`), in a terminal and without `--json`, gives
|
|
102
|
+
* Ink the terminal's height: the screen sizes itself by it. Every other run gives it only while a prompt takes keys, so
|
|
103
|
+
* output nobody can type into never makes Ink clear the terminal, however long it is (ATK-965).
|
|
104
|
+
*/
|
|
105
|
+
export function renderOptions(Component, options, streams = process) {
|
|
106
|
+
const fullScreenRun = declaresFullScreen(Component, options) && !options['json'] && processCanPrompt(streams.stdin, streams.stdout);
|
|
107
|
+
return { stdout: fullScreenRun ? streams.stdout : rowsWhileRaw(streams.stdout, streams.stdin) };
|
|
108
|
+
}
|
|
96
109
|
/** `ATK_DEBUG` (any value but empty or `0`) adds the stack trace to a crash's output. */
|
|
97
110
|
function isDebug() {
|
|
98
111
|
const value = process.env['ATK_DEBUG'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_app.js","sourceRoot":"","sources":["../../src/commands/_app.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"_app.js","sourceRoot":"","sources":["../../src/commands/_app.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuC,IAAI,EAAE,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,SAAS,MAAM,4BAA4B,CAAC;AACnD,OAAO,MAAM,MAAM,yBAAyB,CAAC;AAC7C,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,YAAY,MAAM,+BAA+B,CAAC;AACzD,OAAO,YAAY,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,iBAA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CAAC,YAClB,KAAC,YAAY,IAAC,OAAO,EAAE,OAAO,GAAI,GAC9B,CACP,IACW,EACd,KAAC,oBAAoB,IAAC,IAAI,EAAE,KAAK,YAC/B,KAAC,SAAS,OAAK,YAAY,GAAI,GACV,IACnB,GACgB,CACzB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,SAAgC,EAChC,OAAgC,EAChC,UAAqF,OAAO;IAE5F,MAAM,aAAa,GACjB,kBAAkB,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAChH,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;AAClG,CAAC;AAED,yFAAyF;AACzF,SAAS,OAAO;IACd,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACvC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,GAAG,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renders the component, and so the tree under it, again when the terminal is resized. Ink only lays its last tree
|
|
3
|
+
* out again and redraws it on a resize, so without a render, whatever sized itself from `stdout.columns` or
|
|
4
|
+
* `stdout.rows` (a full-screen list's viewport) or measured itself (the shell's banner) keeps the old size (ATK-964).
|
|
5
|
+
*
|
|
6
|
+
* The listener goes ahead of Ink's own: Ink's root is a legacy one, so the render happens at once, and Ink's redraw
|
|
7
|
+
* that follows draws the refitted tree rather than the old one at the new size. While `active` is false nothing is
|
|
8
|
+
* subscribed.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useRenderOnResize(active?: boolean): void;
|
|
11
|
+
//# sourceMappingURL=useRenderOnResize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRenderOnResize.d.ts","sourceRoot":"","sources":["../../src/hooks/useRenderOnResize.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,UAAO,GAAG,IAAI,CAkBrD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useStdout } from 'ink';
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Renders the component, and so the tree under it, again when the terminal is resized. Ink only lays its last tree
|
|
5
|
+
* out again and redraws it on a resize, so without a render, whatever sized itself from `stdout.columns` or
|
|
6
|
+
* `stdout.rows` (a full-screen list's viewport) or measured itself (the shell's banner) keeps the old size (ATK-964).
|
|
7
|
+
*
|
|
8
|
+
* The listener goes ahead of Ink's own: Ink's root is a legacy one, so the render happens at once, and Ink's redraw
|
|
9
|
+
* that follows draws the refitted tree rather than the old one at the new size. While `active` is false nothing is
|
|
10
|
+
* subscribed.
|
|
11
|
+
*/
|
|
12
|
+
export function useRenderOnResize(active = true) {
|
|
13
|
+
const { stdout } = useStdout();
|
|
14
|
+
const [, setSize] = useState(() => sizeOf(stdout));
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (!active)
|
|
17
|
+
return;
|
|
18
|
+
// Equal sizes keep the last state, so a resize back to the size of the last render doesn't render again
|
|
19
|
+
const onResize = () => setSize((last) => {
|
|
20
|
+
const next = sizeOf(stdout);
|
|
21
|
+
return next === last ? last : next;
|
|
22
|
+
});
|
|
23
|
+
stdout.prependListener('resize', onResize);
|
|
24
|
+
// A resize between the first render and this effect has no event left to catch
|
|
25
|
+
onResize();
|
|
26
|
+
return () => {
|
|
27
|
+
stdout.off('resize', onResize);
|
|
28
|
+
};
|
|
29
|
+
}, [active, stdout]);
|
|
30
|
+
}
|
|
31
|
+
/** The size as one comparable value */
|
|
32
|
+
function sizeOf(stdout) {
|
|
33
|
+
return `${String(stdout.columns)}x${String(stdout.rows)}`;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=useRenderOnResize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRenderOnResize.js","sourceRoot":"","sources":["../../src/hooks/useRenderOnResize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAM,GAAG,IAAI;IAC7C,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IACnD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,wGAAwG;QACxG,MAAM,QAAQ,GAAG,GAAG,EAAE,CACpB,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACf,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;YAC5B,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QACrC,CAAC,CAAC,CAAC;QACL,MAAM,CAAC,eAAe,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC3C,+EAA+E;QAC/E,QAAQ,EAAE,CAAC;QACX,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACjC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AACvB,CAAC;AAED,uCAAuC;AACvC,SAAS,MAAM,CAAC,MAA0B;IACxC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** The part of stdin that says whether a prompt is taking keys. */
|
|
2
|
+
export interface RawModeState {
|
|
3
|
+
readonly isRaw?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* `stdout` as Ink should see it outside a full-screen screen: the same stream, whose height (`rows`) shows only while
|
|
7
|
+
* stdin is in raw mode, that is, while a prompt or picker takes keys (Ink turns raw mode on for an active `useInput`
|
|
8
|
+
* and off again). Otherwise `rows` is `undefined`, as a pipe's is.
|
|
9
|
+
*
|
|
10
|
+
* Ink 6 writes `ESC[2J`, clearing the whole terminal, on any render after a frame at least `rows` tall. While a prompt
|
|
11
|
+
* is up that is its redraw of a frame taller than the window, and it stays. Once nothing takes keys the frame is output,
|
|
12
|
+
* and the next render (Ink's unmount always renders once more) would only wipe the terminal: a long `atk list --tree`
|
|
13
|
+
* or `atk info` cleared it on exit (ATK-965). Everything else (`write`, `columns`, `isTTY`, `resize` events, the
|
|
14
|
+
* writable state) is the real stream's, called on it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function rowsWhileRaw<S extends NodeJS.WriteStream>(stdout: S, stdin: RawModeState): S;
|
|
17
|
+
//# sourceMappingURL=ink-stdout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ink-stdout.d.ts","sourceRoot":"","sources":["../../src/lib/ink-stdout.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,GAAG,CAAC,CAmB5F"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `stdout` as Ink should see it outside a full-screen screen: the same stream, whose height (`rows`) shows only while
|
|
3
|
+
* stdin is in raw mode, that is, while a prompt or picker takes keys (Ink turns raw mode on for an active `useInput`
|
|
4
|
+
* and off again). Otherwise `rows` is `undefined`, as a pipe's is.
|
|
5
|
+
*
|
|
6
|
+
* Ink 6 writes `ESC[2J`, clearing the whole terminal, on any render after a frame at least `rows` tall. While a prompt
|
|
7
|
+
* is up that is its redraw of a frame taller than the window, and it stays. Once nothing takes keys the frame is output,
|
|
8
|
+
* and the next render (Ink's unmount always renders once more) would only wipe the terminal: a long `atk list --tree`
|
|
9
|
+
* or `atk info` cleared it on exit (ATK-965). Everything else (`write`, `columns`, `isTTY`, `resize` events, the
|
|
10
|
+
* writable state) is the real stream's, called on it.
|
|
11
|
+
*/
|
|
12
|
+
export function rowsWhileRaw(stdout, stdin) {
|
|
13
|
+
// Each method is wrapped once, so reading it twice gives the same function (`off` finds what `on` added). It runs on
|
|
14
|
+
// the real stream, and a call that returns the stream for chaining (`on`, `cork` …) gets the view back.
|
|
15
|
+
const wrapped = new WeakMap();
|
|
16
|
+
const view = new Proxy(stdout, {
|
|
17
|
+
get(target, property) {
|
|
18
|
+
if (property === 'rows')
|
|
19
|
+
return stdin.isRaw ? target.rows : undefined;
|
|
20
|
+
const value = Reflect.get(target, property, target);
|
|
21
|
+
if (typeof value !== 'function' || property === 'constructor')
|
|
22
|
+
return value;
|
|
23
|
+
if (!wrapped.has(value)) {
|
|
24
|
+
wrapped.set(value, (...args) => {
|
|
25
|
+
const result = Reflect.apply(value, target, args);
|
|
26
|
+
return result === target ? view : result;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return wrapped.get(value);
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
return view;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=ink-stdout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ink-stdout.js","sourceRoot":"","sources":["../../src/lib/ink-stdout.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAA+B,MAAS,EAAE,KAAmB;IACvF,qHAAqH;IACrH,wGAAwG;IACxG,MAAM,OAAO,GAAG,IAAI,OAAO,EAAmB,CAAC;IAC/C,MAAM,IAAI,GAAM,IAAI,KAAK,CAAC,MAAM,EAAE;QAChC,GAAG,CAAC,MAAM,EAAE,QAAQ;YAClB,IAAI,QAAQ,KAAK,MAAM;gBAAE,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACtE,MAAM,KAAK,GAAY,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC7D,IAAI,OAAO,KAAK,KAAK,UAAU,IAAI,QAAQ,KAAK,aAAa;gBAAE,OAAO,KAAK,CAAC;YAC5E,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;gBACxB,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAe,EAAW,EAAE;oBACjD,MAAM,MAAM,GAAY,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;oBAC3D,OAAO,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;gBAC3C,CAAC,CAAC,CAAC;YACL,CAAC;YACD,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;KACF,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
import { type RenderOptions } from 'ink';
|
|
1
2
|
import { type ComponentType } from 'react';
|
|
2
3
|
import { type AppProps } from './types.js';
|
|
3
|
-
|
|
4
|
+
/** Ink's render options for one run of `Component` with its parsed `options`. */
|
|
5
|
+
export type AppRenderOptions = (Component: AppProps['Component'], options: Record<string, unknown>) => RenderOptions;
|
|
6
|
+
export type CustomApp = {
|
|
7
|
+
App: ComponentType<AppProps>;
|
|
8
|
+
renderOptions: AppRenderOptions | undefined;
|
|
9
|
+
};
|
|
10
|
+
export default function readCustomApp(directory: string): Promise<CustomApp | undefined>;
|
|
4
11
|
//# sourceMappingURL=read-custom-app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-custom-app.d.ts","sourceRoot":"","sources":["../../../src/lib/pastel/read-custom-app.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-custom-app.d.ts","sourceRoot":"","sources":["../../../src/lib/pastel/read-custom-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,KAAK,CAAC;AAIzC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,iFAAiF;AACjF,MAAM,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,aAAa,CAAC;AAErH,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC7B,aAAa,EAAE,gBAAgB,GAAG,SAAS,CAAC;CAC7C,CAAC;AAOF,wBAA8B,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAkB7F"}
|
|
@@ -6,6 +6,7 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
|
|
|
6
6
|
}
|
|
7
7
|
return path;
|
|
8
8
|
};
|
|
9
|
+
import {} from 'ink';
|
|
9
10
|
import fs from 'node:fs/promises';
|
|
10
11
|
import path from 'node:path';
|
|
11
12
|
import { pathToFileURL } from 'node:url';
|
|
@@ -21,7 +22,7 @@ export default async function readCustomApp(directory) {
|
|
|
21
22
|
const filePath = path.join(directory, file);
|
|
22
23
|
const fileUrl = pathToFileURL(filePath);
|
|
23
24
|
const m = (await import(__rewriteRelativeImportExtension(fileUrl.href)));
|
|
24
|
-
customApp = m.default;
|
|
25
|
+
customApp = { App: m.default, renderOptions: m.renderOptions };
|
|
25
26
|
break;
|
|
26
27
|
}
|
|
27
28
|
return customApp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-custom-app.js","sourceRoot":"","sources":["../../../src/lib/pastel/read-custom-app.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAsB,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAiB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"read-custom-app.js","sourceRoot":"","sources":["../../../src/lib/pastel/read-custom-app.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAO,EAAsB,MAAM,KAAK,CAAC;AACzC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAsB,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAiB,MAAM,YAAY,CAAC;AAe3C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,aAAa,CAAC,SAAiB;IAC3D,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC1C,IAAI,SAAgC,CAAC;IAErC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACpC,SAAS;QACX,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC5C,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;QACxC,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,kCAAC,OAAO,CAAC,IAAI,EAAC,CAAe,CAAC;QAErD,SAAS,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC,aAAa,EAAE,CAAC;QAC/D,MAAM;IACR,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-command.d.ts","sourceRoot":"","sources":["../../../src/lib/pastel/render-command.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,IAAI,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAK7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAK1D;;;;GAIG;AACH,wBAA8B,aAAa,CACzC,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,cAAc,EACtB,EAAE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IAAE,iBAAiB,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,EAAE,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"render-command.d.ts","sourceRoot":"","sources":["../../../src/lib/pastel/render-command.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,IAAI,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAK7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAK1D;;;;GAIG;AACH,wBAA8B,aAAa,CACzC,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,cAAc,EACtB,EAAE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IAAE,iBAAiB,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,EAAE,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,iBA8C3G"}
|
|
@@ -36,14 +36,14 @@ export default async function renderCommand(commanderCommand, module, { commands
|
|
|
36
36
|
rejectInput(commanderCommand, result.error);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
const
|
|
40
|
-
render(React.createElement(
|
|
39
|
+
const customApp = await readCustomApp(commandsDirectory);
|
|
40
|
+
render(React.createElement(customApp?.App ?? App, {
|
|
41
41
|
commandProps: {
|
|
42
42
|
args: arguments_,
|
|
43
43
|
options: parsedOptions,
|
|
44
44
|
},
|
|
45
45
|
Component,
|
|
46
|
-
}));
|
|
46
|
+
}), customApp?.renderOptions?.(Component, parsedOptions));
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Options or arguments the command's schema rejects are a usage error, reported through commander like its own
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-command.js","sourceRoot":"","sources":["../../../src/lib/pastel/render-command.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIpD,OAAO,GAAG,MAAM,WAAW,CAAC;AAC5B,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,aAAa,CACzC,gBAAkC,EAClC,MAAsB,EACtB,EAAE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,EAAsE;IAE1G,MAAM,S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