@elench/testkit 0.1.114 → 0.1.116
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 +33 -8
- package/lib/cli/args.mjs +3 -3
- package/lib/cli/assistant/app.mjs +4 -2
- package/lib/cli/assistant/session.mjs +5 -1
- package/lib/cli/assistant/state.mjs +1 -2
- package/lib/cli/command-flags.mjs +4 -0
- package/lib/cli/commands/db/schema/refresh.mjs +21 -0
- package/lib/cli/commands/db/schema/verify.mjs +27 -0
- package/lib/cli/components/blocks/run-tree.mjs +7 -2
- package/lib/cli/components/hooks/use-element-layout.mjs +63 -0
- package/lib/cli/components/hooks/use-spinner-frame.mjs +26 -0
- package/lib/cli/entrypoint.mjs +1 -0
- package/lib/cli/operations/db/schema/refresh/operation.mjs +56 -0
- package/lib/cli/operations/db/{snapshot/capture → schema/verify}/operation.mjs +6 -27
- package/lib/cli/operations/run/operation.mjs +1 -0
- package/lib/cli/renderers/db-schema/text.mjs +7 -0
- package/lib/config/database.mjs +64 -0
- package/lib/config-api/index.d.ts +16 -1
- package/lib/config-api/index.mjs +31 -16
- package/lib/database/fingerprint.mjs +2 -0
- package/lib/database/index.mjs +142 -104
- package/lib/database/schema-source.mjs +295 -0
- package/lib/database/template-steps.mjs +158 -38
- package/lib/runner/orchestrator.mjs +4 -3
- package/lib/runner/template-steps.mjs +12 -1
- package/lib/runner/template.mjs +16 -1
- package/node_modules/@alcalzone/ansi-tokenize/README.md +0 -5
- package/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.d.ts +8 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js +10 -8
- package/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js.map +1 -1
- package/node_modules/@alcalzone/ansi-tokenize/build/tokenize.d.ts +1 -5
- package/node_modules/@alcalzone/ansi-tokenize/build/tokenize.js +9 -45
- package/node_modules/@alcalzone/ansi-tokenize/build/tokenize.js.map +1 -1
- package/node_modules/@alcalzone/ansi-tokenize/package.json +1 -1
- package/node_modules/@elench/next-analysis/package.json +1 -1
- package/node_modules/@elench/testkit-bridge/package.json +2 -2
- package/node_modules/@elench/testkit-protocol/package.json +1 -1
- package/node_modules/@elench/ts-analysis/package.json +1 -1
- package/node_modules/cli-boxes/index.d.ts +95 -90
- package/node_modules/cli-boxes/index.js +5 -2
- package/node_modules/cli-boxes/package.json +6 -13
- package/node_modules/cli-boxes/readme.md +15 -3
- package/node_modules/cli-truncate/index.d.ts +1 -1
- package/node_modules/cli-truncate/package.json +4 -4
- package/node_modules/cli-truncate/readme.md +1 -0
- package/node_modules/es-toolkit/CHANGELOG.md +801 -0
- package/node_modules/es-toolkit/src/compat/_internal/Equals.d.ts +1 -0
- package/node_modules/es-toolkit/src/compat/_internal/IsWritable.d.ts +3 -0
- package/node_modules/es-toolkit/src/compat/_internal/MutableList.d.ts +4 -0
- package/node_modules/es-toolkit/src/compat/_internal/RejectReadonly.d.ts +4 -0
- package/node_modules/esprima/ChangeLog +235 -0
- package/node_modules/ink/build/apply-styles.js +175 -0
- package/node_modules/ink/build/build-layout.js +77 -0
- package/node_modules/ink/build/calculate-wrapped-text.js +53 -0
- package/node_modules/ink/build/components/App.d.ts +1 -4
- package/node_modules/ink/build/components/App.js +22 -142
- package/node_modules/ink/build/components/App.js.map +1 -1
- package/node_modules/ink/build/components/AppContext.d.ts +3 -23
- package/node_modules/ink/build/components/AppContext.js +4 -7
- package/node_modules/ink/build/components/AppContext.js.map +1 -1
- package/node_modules/ink/build/components/Box.d.ts +3 -16
- package/node_modules/ink/build/components/Color.js +62 -0
- package/node_modules/ink/build/components/Cursor.d.ts +83 -0
- package/node_modules/ink/build/components/Cursor.js +53 -0
- package/node_modules/ink/build/components/Cursor.js.map +1 -0
- package/node_modules/ink/build/components/ErrorBoundary.d.ts +2 -2
- package/node_modules/ink/build/components/ErrorOverview.js +6 -6
- package/node_modules/ink/build/components/ErrorOverview.js.map +1 -1
- package/node_modules/ink/build/components/Static.js.map +1 -1
- package/node_modules/ink/build/components/StdinContext.d.ts +1 -7
- package/node_modules/ink/build/components/StdinContext.js +0 -1
- package/node_modules/ink/build/components/StdinContext.js.map +1 -1
- package/node_modules/ink/build/components/Text.d.ts +1 -1
- package/node_modules/ink/build/components/Text.js +1 -1
- package/node_modules/ink/build/components/Text.js.map +1 -1
- package/node_modules/ink/build/components/Transform.d.ts +1 -1
- package/node_modules/ink/build/devtools-window-polyfill.js +4 -7
- package/node_modules/ink/build/devtools-window-polyfill.js.map +1 -1
- package/node_modules/ink/build/devtools.js +6 -31
- package/node_modules/ink/build/devtools.js.map +1 -1
- package/node_modules/ink/build/dom.d.ts +1 -5
- package/node_modules/ink/build/dom.js +1 -20
- package/node_modules/ink/build/dom.js.map +1 -1
- package/node_modules/ink/build/experimental/apply-style.js +140 -0
- package/node_modules/ink/build/experimental/dom.js +123 -0
- package/node_modules/ink/build/experimental/output.js +91 -0
- package/node_modules/ink/build/experimental/reconciler.js +141 -0
- package/node_modules/ink/build/experimental/renderer.js +81 -0
- package/node_modules/ink/build/hooks/use-app.d.ts +1 -1
- package/node_modules/ink/build/hooks/use-app.js +1 -1
- package/node_modules/ink/build/hooks/use-cursor.d.ts +1 -1
- package/node_modules/ink/build/hooks/use-cursor.js +1 -1
- package/node_modules/ink/build/hooks/use-focus-manager.d.ts +2 -17
- package/node_modules/ink/build/hooks/use-focus-manager.js +1 -2
- package/node_modules/ink/build/hooks/use-focus-manager.js.map +1 -1
- package/node_modules/ink/build/hooks/use-focus.d.ts +1 -2
- package/node_modules/ink/build/hooks/use-focus.js +4 -5
- package/node_modules/ink/build/hooks/use-focus.js.map +1 -1
- package/node_modules/ink/build/hooks/use-input.d.ts +1 -2
- package/node_modules/ink/build/hooks/use-input.js +80 -82
- package/node_modules/ink/build/hooks/use-input.js.map +1 -1
- package/node_modules/ink/build/hooks/use-is-screen-reader-enabled.d.ts +1 -2
- package/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js +1 -2
- package/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js.map +1 -1
- package/node_modules/ink/build/hooks/use-stderr.d.ts +1 -1
- package/node_modules/ink/build/hooks/use-stderr.js +1 -1
- package/node_modules/ink/build/hooks/use-stdin.d.ts +2 -4
- package/node_modules/ink/build/hooks/use-stdin.js +1 -2
- package/node_modules/ink/build/hooks/use-stdin.js.map +1 -1
- package/node_modules/ink/build/hooks/use-stdout.d.ts +1 -1
- package/node_modules/ink/build/hooks/use-stdout.js +1 -1
- package/node_modules/ink/build/hooks/useInput.js +38 -0
- package/node_modules/ink/build/index.d.ts +1 -8
- package/node_modules/ink/build/index.js +0 -4
- package/node_modules/ink/build/index.js.map +1 -1
- package/node_modules/ink/build/ink.d.ts +3 -48
- package/node_modules/ink/build/ink.js +155 -325
- package/node_modules/ink/build/ink.js.map +1 -1
- package/node_modules/ink/build/input-parser.d.ts +1 -4
- package/node_modules/ink/build/input-parser.js +30 -70
- package/node_modules/ink/build/input-parser.js.map +1 -1
- package/node_modules/ink/build/instance.js +205 -0
- package/node_modules/ink/build/layout.d.ts +7 -0
- package/node_modules/ink/build/layout.js +33 -0
- package/node_modules/ink/build/layout.js.map +1 -0
- package/node_modules/ink/build/log-update.d.ts +0 -1
- package/node_modules/ink/build/log-update.js +1 -13
- package/node_modules/ink/build/log-update.js.map +1 -1
- package/node_modules/ink/build/measure-element.d.ts +0 -4
- package/node_modules/ink/build/measure-element.js +0 -4
- package/node_modules/ink/build/measure-element.js.map +1 -1
- package/node_modules/ink/build/options.d.ts +52 -0
- package/node_modules/ink/build/options.js +2 -0
- package/node_modules/ink/build/options.js.map +1 -0
- package/node_modules/ink/build/output.js +0 -25
- package/node_modules/ink/build/output.js.map +1 -1
- package/node_modules/ink/build/parse-keypress.d.ts +3 -1
- package/node_modules/ink/build/parse-keypress.js +17 -19
- package/node_modules/ink/build/parse-keypress.js.map +1 -1
- package/node_modules/ink/build/reconciler.js +27 -46
- package/node_modules/ink/build/reconciler.js.map +1 -1
- package/node_modules/ink/build/render-border.js +18 -29
- package/node_modules/ink/build/render-border.js.map +1 -1
- package/node_modules/ink/build/render-to-string.js +1 -2
- package/node_modules/ink/build/render-to-string.js.map +1 -1
- package/node_modules/ink/build/render.d.ts +2 -57
- package/node_modules/ink/build/render.js +11 -18
- package/node_modules/ink/build/render.js.map +1 -1
- package/node_modules/ink/build/screen-reader-update.d.ts +13 -0
- package/node_modules/ink/build/screen-reader-update.js +38 -0
- package/node_modules/ink/build/screen-reader-update.js.map +1 -0
- package/node_modules/ink/build/styles.d.ts +16 -78
- package/node_modules/ink/build/styles.js +31 -102
- package/node_modules/ink/build/styles.js.map +1 -1
- package/node_modules/ink/build/utils.d.ts +2 -9
- package/node_modules/ink/build/utils.js +3 -18
- package/node_modules/ink/build/utils.js.map +1 -1
- package/node_modules/ink/build/wrap-text.js +0 -7
- package/node_modules/ink/build/wrap-text.js.map +1 -1
- package/node_modules/ink/build/write-synchronized.d.ts +1 -1
- package/node_modules/ink/build/write-synchronized.js +2 -4
- package/node_modules/ink/build/write-synchronized.js.map +1 -1
- package/node_modules/ink/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
- package/node_modules/ink/node_modules/emoji-regex/README.md +107 -0
- package/node_modules/ink/node_modules/emoji-regex/index.d.ts +3 -0
- package/node_modules/ink/node_modules/emoji-regex/index.js +4 -0
- package/node_modules/ink/node_modules/emoji-regex/index.mjs +4 -0
- package/node_modules/ink/node_modules/emoji-regex/package.json +45 -0
- package/node_modules/{wrap-ansi → ink/node_modules/wrap-ansi}/index.d.ts +1 -1
- package/node_modules/ink/node_modules/wrap-ansi/index.js +222 -0
- package/node_modules/ink/node_modules/wrap-ansi/node_modules/string-width/index.d.ts +39 -0
- package/node_modules/ink/node_modules/wrap-ansi/node_modules/string-width/index.js +82 -0
- package/node_modules/ink/node_modules/wrap-ansi/node_modules/string-width/license +9 -0
- package/node_modules/ink/node_modules/wrap-ansi/node_modules/string-width/package.json +64 -0
- package/node_modules/ink/node_modules/wrap-ansi/node_modules/string-width/readme.md +66 -0
- package/node_modules/{wrap-ansi → ink/node_modules/wrap-ansi}/package.json +11 -11
- package/node_modules/{wrap-ansi → ink/node_modules/wrap-ansi}/readme.md +0 -2
- package/node_modules/ink/package.json +98 -34
- package/node_modules/ink/readme.md +48 -554
- package/node_modules/slice-ansi/index.d.ts +1 -1
- package/node_modules/slice-ansi/index.js +89 -146
- package/node_modules/slice-ansi/package.json +5 -5
- package/node_modules/slice-ansi/readme.md +0 -1
- package/node_modules/slice-ansi/tokenize-ansi.js +1 -1
- package/package.json +14 -10
- package/packages/testkit-bridge/node_modules/@elench/testkit-protocol/dist/index.d.ts +188 -0
- package/packages/testkit-bridge/node_modules/@elench/testkit-protocol/dist/index.d.ts.map +1 -0
- package/packages/testkit-bridge/node_modules/@elench/testkit-protocol/dist/index.js +293 -0
- package/packages/testkit-bridge/node_modules/@elench/testkit-protocol/dist/index.js.map +1 -0
- package/packages/testkit-bridge/node_modules/@elench/testkit-protocol/package.json +25 -0
- package/lib/cli/commands/db/snapshot/capture.mjs +0 -26
- package/lib/cli/renderers/db-snapshot-capture/text.mjs +0 -3
- package/node_modules/@alcalzone/ansi-tokenize/build/consts.d.ts +0 -17
- package/node_modules/@alcalzone/ansi-tokenize/build/consts.js +0 -28
- package/node_modules/@alcalzone/ansi-tokenize/build/consts.js.map +0 -1
- package/node_modules/ink/build/components/AnimationContext.d.ts +0 -9
- package/node_modules/ink/build/components/AnimationContext.js +0 -13
- package/node_modules/ink/build/components/AnimationContext.js.map +0 -1
- package/node_modules/ink/build/hooks/use-animation.d.ts +0 -49
- package/node_modules/ink/build/hooks/use-animation.js +0 -87
- package/node_modules/ink/build/hooks/use-animation.js.map +0 -1
- package/node_modules/ink/build/hooks/use-box-metrics.d.ts +0 -59
- package/node_modules/ink/build/hooks/use-box-metrics.js +0 -88
- package/node_modules/ink/build/hooks/use-box-metrics.js.map +0 -1
- package/node_modules/ink/build/hooks/use-paste.d.ts +0 -35
- package/node_modules/ink/build/hooks/use-paste.js +0 -62
- package/node_modules/ink/build/hooks/use-paste.js.map +0 -1
- package/node_modules/ink/build/hooks/use-window-size.d.ts +0 -18
- package/node_modules/ink/build/hooks/use-window-size.js +0 -22
- package/node_modules/ink/build/hooks/use-window-size.js.map +0 -1
- package/node_modules/wrap-ansi/index.js +0 -468
- /package/node_modules/{wrap-ansi → ink/node_modules/wrap-ansi}/license +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ansiCodes.js","sourceRoot":"","sources":["../src/ansiCodes.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ansiCodes.js","sourceRoot":"","sources":["../src/ansiCodes.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,aAAa,CAAC;AAGrC,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB;AAC3D,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,CAAE,CAAC;AACvC,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,CAAE,CAAC;AAEvC,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,GAAG,EAAU,CAAC;AAC7C,MAAM,WAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;AAC9C,KAAK,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,UAAU,CAAC,KAAK,EAAE;IAC5C,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5C,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;CAC1E;AAED,MAAM,CAAC,MAAM,cAAc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AO,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC;KAC9B;SAAM,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;QACjC,OAAO,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC;KAChC;IAED,uDAAuD;IACvD,MAAM,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IACrD,IAAI,GAAG,EAAE;QACR,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAClC;SAAM;QACN,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC;KAC7B;AACF,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAiB;IAClD,+CAA+C;IAC/C,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7D,OAAO,CAAC,GAAG,YAAY,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACnC,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,eAAe,CAAC,IAAc;IAC7C,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC;AAChF,CAAC"}
|
|
@@ -3,14 +3,10 @@ export interface AnsiCode {
|
|
|
3
3
|
code: string;
|
|
4
4
|
endCode: string;
|
|
5
5
|
}
|
|
6
|
-
export interface ControlCode {
|
|
7
|
-
type: "control";
|
|
8
|
-
code: string;
|
|
9
|
-
}
|
|
10
6
|
export interface Char {
|
|
11
7
|
type: "char";
|
|
12
8
|
value: string;
|
|
13
9
|
fullWidth: boolean;
|
|
14
10
|
}
|
|
15
|
-
export type Token = AnsiCode |
|
|
11
|
+
export type Token = AnsiCode | Char;
|
|
16
12
|
export declare function tokenize(str: string, endChar?: number): Token[];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import isFullwidthCodePoint from "is-fullwidth-code-point";
|
|
2
|
-
import { getEndCode } from "./ansiCodes.js";
|
|
3
|
-
import { CC_0, CC_9, CC_BEL, CC_BACKSLASH, CC_C1_ST, CC_ESC, CC_M, CC_CSI, CC_OSC, CC_SEMI, ESCAPES, linkCodePrefix, linkCodePrefixCharCodes, } from "./consts.js";
|
|
2
|
+
import { CSI, ESCAPES, getEndCode, linkCodePrefix, linkCodePrefixCharCodes, OSC, } from "./ansiCodes.js";
|
|
4
3
|
const segmenter = new Intl.Segmenter(undefined, { granularity: "grapheme" });
|
|
5
4
|
function isFullwidthGrapheme(grapheme, baseCodePoint) {
|
|
6
5
|
if (isFullwidthCodePoint(baseCodePoint))
|
|
@@ -26,38 +25,15 @@ function parseLinkCode(string, offset) {
|
|
|
26
25
|
if (paramsEndIndex === -1)
|
|
27
26
|
return undefined;
|
|
28
27
|
// This is a link code (with or without the URL part). Find the end of it.
|
|
29
|
-
const endIndex =
|
|
30
|
-
if (endIndex === -1)
|
|
31
|
-
return undefined;
|
|
32
|
-
return string.slice(0, endIndex + 1);
|
|
33
|
-
}
|
|
34
|
-
// HOT PATH: Generic fallback for non-link OSC sequences (window title, notifications, etc.)
|
|
35
|
-
function parseOSCSequence(string, offset) {
|
|
36
|
-
string = string.slice(offset);
|
|
37
|
-
// Find the OSC terminator (starting after "ESC ]")
|
|
38
|
-
const endIndex = findOSCTerminatorIndex(string, 2);
|
|
28
|
+
const endIndex = string.indexOf("\x07", paramsEndIndex + 1);
|
|
39
29
|
if (endIndex === -1)
|
|
40
30
|
return undefined;
|
|
41
31
|
return string.slice(0, endIndex + 1);
|
|
42
32
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
*/
|
|
48
|
-
function findOSCTerminatorIndex(string, startIndex) {
|
|
49
|
-
for (let i = startIndex; i < string.length; i++) {
|
|
50
|
-
const ch = string.charCodeAt(i);
|
|
51
|
-
if (ch === CC_BEL)
|
|
52
|
-
return i;
|
|
53
|
-
if (ch === CC_C1_ST)
|
|
54
|
-
return i;
|
|
55
|
-
if (ch === CC_ESC && i + 1 < string.length && string.charCodeAt(i + 1) === CC_BACKSLASH) {
|
|
56
|
-
return i + 1;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return -1;
|
|
60
|
-
}
|
|
33
|
+
const CC_0 = "0".charCodeAt(0);
|
|
34
|
+
const CC_9 = "9".charCodeAt(0);
|
|
35
|
+
const CC_SEMI = ";".charCodeAt(0);
|
|
36
|
+
const CC_M = "m".charCodeAt(0);
|
|
61
37
|
/**
|
|
62
38
|
* Scans through the given string and finds the index of the last character of an SGR sequence
|
|
63
39
|
* like `\x1B[38;2;123;123;123m`. This assumes that the string has been checked to start with `\x1B[`.
|
|
@@ -135,30 +111,18 @@ export function tokenize(str, endChar = Number.POSITIVE_INFINITY) {
|
|
|
135
111
|
let code;
|
|
136
112
|
// Peek the next code point to determine the type of ANSI sequence
|
|
137
113
|
const nextCodePoint = str.codePointAt(index + 1);
|
|
138
|
-
if (nextCodePoint ===
|
|
139
|
-
// ] = operating system commands
|
|
114
|
+
if (nextCodePoint === OSC) {
|
|
115
|
+
// ] = operating system commands, like links
|
|
140
116
|
code = parseLinkCode(str, index);
|
|
141
117
|
if (code) {
|
|
142
|
-
// OSC 8 hyperlinks are paired codes with an endCode
|
|
143
118
|
ret.push({
|
|
144
119
|
type: "ansi",
|
|
145
120
|
code: code,
|
|
146
121
|
endCode: getEndCode(code),
|
|
147
122
|
});
|
|
148
123
|
}
|
|
149
|
-
else {
|
|
150
|
-
// Other OSC sequences (window title, etc.) are self-contained
|
|
151
|
-
// control codes with no endCode.
|
|
152
|
-
code = parseOSCSequence(str, index);
|
|
153
|
-
if (code) {
|
|
154
|
-
ret.push({
|
|
155
|
-
type: "control",
|
|
156
|
-
code: code,
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
124
|
}
|
|
161
|
-
else if (nextCodePoint ===
|
|
125
|
+
else if (nextCodePoint === CSI) {
|
|
162
126
|
// [ = control sequence introducer, like SGR sequences [...m
|
|
163
127
|
code = parseSGRSequence(str, index);
|
|
164
128
|
if (code) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenize.js","sourceRoot":"","sources":["../src/tokenize.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"tokenize.js","sourceRoot":"","sources":["../src/tokenize.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACN,GAAG,EACH,OAAO,EACP,UAAU,EACV,cAAc,EACd,uBAAuB,EACvB,GAAG,GACH,MAAM,gBAAgB,CAAC;AAExB,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,CAAC;AAE7E,SAAS,mBAAmB,CAAC,QAAgB,EAAE,aAAqB;IACnE,IAAI,oBAAoB,CAAC,aAAa,CAAC;QAAE,OAAO,IAAI,CAAC;IACrD,mEAAmE;IACnE,IAAI,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7C,4DAA4D;IAC5D,IAAI,aAAa,IAAI,OAAO,IAAI,aAAa,IAAI,OAAO;QAAE,OAAO,IAAI,CAAC;IACtE,OAAO,KAAK,CAAC;AACd,CAAC;AAgBD,+EAA+E;AAC/E,SAAS,aAAa,CAAC,MAAc,EAAE,MAAc;IACpD,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,uBAAuB,CAAC,MAAM,EAAE,KAAK,EAAE,EAA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E;oBACT,GAAG,CAAC,IAAI,CAAC;wBACR,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI;wBACV,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC;qBACzB,CAAC,CAAC;iBACH;aACD;iBAAM,IAAI,aAAa,KAAK,GAAG,EAAE;gBACjC,4DAA4D;gBAC5D,IAAI,GAAG,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;gBACpC,IAAI,IAAI,EAAE;oBACT,8CAA8C;oBAC9C,MAAM,KAAK,GAAG,yBAAyB,CAAC,IAAI,CAAC,CAAC;oBAC9C,KAAK,MAAM,cAAc,IAAI,KAAK,EAAE;wBACnC,GAAG,CAAC,IAAI,CAAC;4BACR,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,cAAc;4BACpB,OAAO,EAAE,UAAU,CAAC,cAAc,CAAC;yBACnC,CAAC,CAAC;qBACH;iBACD;aACD;YAED,IAAI,IAAI,EAAE;gBACT,YAAY,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;gBACnC,SAAS;aACT;SACD;QAED,MAAM,SAAS,GAAG,mBAAmB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAE1D,GAAG,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,OAAO;YACd,SAAS;SACT,CAAC,CAAC;QAEH,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAE7B,IAAI,OAAO,IAAI,OAAO,EAAE;YACvB,MAAM;SACN;KACD;IAED,OAAO,GAAG,CAAC;AACZ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elench/testkit-bridge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.116",
|
|
4
4
|
"description": "Browser bridge helpers for testkit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@elench/testkit-protocol": "0.1.
|
|
25
|
+
"@elench/testkit-protocol": "0.1.116"
|
|
26
26
|
},
|
|
27
27
|
"private": false
|
|
28
28
|
}
|
|
@@ -1,108 +1,110 @@
|
|
|
1
|
-
|
|
2
|
-
Style of the box border.
|
|
3
|
-
*/
|
|
4
|
-
export type BoxStyle = {
|
|
5
|
-
readonly topLeft: string;
|
|
6
|
-
readonly top: string;
|
|
7
|
-
readonly topRight: string;
|
|
8
|
-
readonly right: string;
|
|
9
|
-
readonly bottomRight: string;
|
|
10
|
-
readonly bottom: string;
|
|
11
|
-
readonly bottomLeft: string;
|
|
12
|
-
readonly left: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
All box styles.
|
|
17
|
-
*/
|
|
18
|
-
export type Boxes = {
|
|
1
|
+
declare namespace cliBoxes {
|
|
19
2
|
/**
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
┌────┐
|
|
23
|
-
│ │
|
|
24
|
-
└────┘
|
|
25
|
-
```
|
|
3
|
+
Style of the box border.
|
|
26
4
|
*/
|
|
27
|
-
|
|
5
|
+
interface BoxStyle {
|
|
6
|
+
readonly topLeft: string;
|
|
7
|
+
readonly top: string;
|
|
8
|
+
readonly topRight: string;
|
|
9
|
+
readonly right: string;
|
|
10
|
+
readonly bottomRight: string;
|
|
11
|
+
readonly bottom: string;
|
|
12
|
+
readonly bottomLeft: string;
|
|
13
|
+
readonly left: string;
|
|
14
|
+
}
|
|
28
15
|
|
|
29
16
|
/**
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
╔════╗
|
|
33
|
-
║ ║
|
|
34
|
-
╚════╝
|
|
35
|
-
```
|
|
17
|
+
All box styles.
|
|
36
18
|
*/
|
|
37
|
-
|
|
19
|
+
interface Boxes {
|
|
20
|
+
/**
|
|
21
|
+
@example
|
|
22
|
+
```
|
|
23
|
+
┌────┐
|
|
24
|
+
│ │
|
|
25
|
+
└────┘
|
|
26
|
+
```
|
|
27
|
+
*/
|
|
28
|
+
readonly single: BoxStyle;
|
|
38
29
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
30
|
+
/**
|
|
31
|
+
@example
|
|
32
|
+
```
|
|
33
|
+
╔════╗
|
|
34
|
+
║ ║
|
|
35
|
+
╚════╝
|
|
36
|
+
```
|
|
37
|
+
*/
|
|
38
|
+
readonly double: BoxStyle;
|
|
48
39
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
40
|
+
/**
|
|
41
|
+
@example
|
|
42
|
+
```
|
|
43
|
+
╭────╮
|
|
44
|
+
│ │
|
|
45
|
+
╰────╯
|
|
46
|
+
```
|
|
47
|
+
*/
|
|
48
|
+
readonly round: BoxStyle;
|
|
58
49
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
50
|
+
/**
|
|
51
|
+
@example
|
|
52
|
+
```
|
|
53
|
+
┏━━━━┓
|
|
54
|
+
┃ ┃
|
|
55
|
+
┗━━━━┛
|
|
56
|
+
```
|
|
57
|
+
*/
|
|
58
|
+
readonly bold: BoxStyle;
|
|
68
59
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
60
|
+
/**
|
|
61
|
+
@example
|
|
62
|
+
```
|
|
63
|
+
╓────╖
|
|
64
|
+
║ ║
|
|
65
|
+
╙────╜
|
|
66
|
+
```
|
|
67
|
+
*/
|
|
68
|
+
readonly singleDouble: BoxStyle;
|
|
78
69
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
70
|
+
/**
|
|
71
|
+
@example
|
|
72
|
+
```
|
|
73
|
+
╒════╕
|
|
74
|
+
│ │
|
|
75
|
+
╘════╛
|
|
76
|
+
```
|
|
77
|
+
*/
|
|
78
|
+
readonly doubleSingle: BoxStyle;
|
|
88
79
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
80
|
+
/**
|
|
81
|
+
@example
|
|
82
|
+
```
|
|
83
|
+
+----+
|
|
84
|
+
| |
|
|
85
|
+
+----+
|
|
86
|
+
```
|
|
87
|
+
*/
|
|
88
|
+
readonly classic: BoxStyle;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
@example
|
|
92
|
+
```
|
|
93
|
+
↘↓↓↓↓↙
|
|
94
|
+
→ ←
|
|
95
|
+
↗↑↑↑↑↖
|
|
96
|
+
```
|
|
97
|
+
*/
|
|
98
|
+
readonly arrow: BoxStyle;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
99
101
|
|
|
100
102
|
/**
|
|
101
103
|
Boxes for use in the terminal.
|
|
102
104
|
|
|
103
105
|
@example
|
|
104
106
|
```
|
|
105
|
-
import cliBoxes
|
|
107
|
+
import cliBoxes = require('cli-boxes');
|
|
106
108
|
|
|
107
109
|
console.log(cliBoxes.single);
|
|
108
110
|
// {
|
|
@@ -117,6 +119,9 @@ console.log(cliBoxes.single);
|
|
|
117
119
|
// }
|
|
118
120
|
```
|
|
119
121
|
*/
|
|
120
|
-
declare const cliBoxes: Boxes
|
|
122
|
+
declare const cliBoxes: cliBoxes.Boxes & {
|
|
123
|
+
// TODO: Remove this for the next major release
|
|
124
|
+
default: typeof cliBoxes;
|
|
125
|
+
};
|
|
121
126
|
|
|
122
|
-
export
|
|
127
|
+
export = cliBoxes;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cli-boxes",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Boxes for use in the terminal",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "sindresorhus/cli-boxes",
|
|
@@ -10,18 +10,11 @@
|
|
|
10
10
|
"email": "sindresorhus@gmail.com",
|
|
11
11
|
"url": "https://sindresorhus.com"
|
|
12
12
|
},
|
|
13
|
-
"type": "module",
|
|
14
|
-
"exports": {
|
|
15
|
-
"types": "./index.d.ts",
|
|
16
|
-
"default": "./index.js"
|
|
17
|
-
},
|
|
18
|
-
"sideEffects": false,
|
|
19
13
|
"engines": {
|
|
20
|
-
"node": ">=
|
|
14
|
+
"node": ">=10"
|
|
21
15
|
},
|
|
22
16
|
"scripts": {
|
|
23
|
-
"
|
|
24
|
-
"test": "ava && tsc --noEmit index.d.ts"
|
|
17
|
+
"test": "xo && ava && tsd"
|
|
25
18
|
},
|
|
26
19
|
"files": [
|
|
27
20
|
"index.js",
|
|
@@ -42,8 +35,8 @@
|
|
|
42
35
|
"json"
|
|
43
36
|
],
|
|
44
37
|
"devDependencies": {
|
|
45
|
-
"ava": "^
|
|
46
|
-
"
|
|
47
|
-
"xo": "^0.
|
|
38
|
+
"ava": "^2.4.0",
|
|
39
|
+
"tsd": "^0.14.0",
|
|
40
|
+
"xo": "^0.37.1"
|
|
48
41
|
}
|
|
49
42
|
}
|
|
@@ -6,14 +6,14 @@ The list of boxes is just a [JSON file](boxes.json) and can be used anywhere.
|
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
|
-
```
|
|
10
|
-
npm install cli-boxes
|
|
9
|
+
```
|
|
10
|
+
$ npm install cli-boxes
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
15
|
```js
|
|
16
|
-
|
|
16
|
+
const cliBoxes = require('cli-boxes');
|
|
17
17
|
|
|
18
18
|
console.log(cliBoxes.single);
|
|
19
19
|
/*
|
|
@@ -101,3 +101,15 @@ console.log(cliBoxes.single);
|
|
|
101
101
|
## Related
|
|
102
102
|
|
|
103
103
|
- [boxen](https://github.com/sindresorhus/boxen) - Create boxes in the terminal
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
<div align="center">
|
|
108
|
+
<b>
|
|
109
|
+
<a href="https://tidelift.com/subscription/pkg/npm-cli-boxes?utm_source=npm-cli-boxes&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
|
110
|
+
</b>
|
|
111
|
+
<br>
|
|
112
|
+
<sub>
|
|
113
|
+
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
|
114
|
+
</sub>
|
|
115
|
+
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cli-truncate",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Truncate a string to a specific width in the terminal",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "sindresorhus/cli-truncate",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"sideEffects": false,
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": ">=
|
|
20
|
+
"node": ">=20"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"test": "xo && ava && tsd"
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"string"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"slice-ansi": "^
|
|
44
|
+
"slice-ansi": "^8.0.0",
|
|
45
45
|
"string-width": "^8.2.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"ava": "^7.0.0",
|
|
49
49
|
"tsd": "^0.33.0",
|
|
50
|
-
"xo": "^2.
|
|
50
|
+
"xo": "^1.2.2"
|
|
51
51
|
}
|
|
52
52
|
}
|