@teambit/cli 0.0.1371 → 0.0.1376
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 +14 -0
- package/dist/index.js.map +1 -1
- package/dist/pager.d.ts +6 -0
- package/dist/pager.js +10 -0
- package/dist/pager.js.map +1 -1
- package/dist/{preview-1787160027560.js → preview-1787325829408.js} +2 -2
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { globalFlags };
|
|
|
8
8
|
export { defaultErrorHandler };
|
|
9
9
|
export type { Command, CLIArgs, Flags, GenericObject, CommandOptions, Report } from './command';
|
|
10
10
|
export { getArgsData, getCommandName, getFlagsData } from './command-helper';
|
|
11
|
+
export { canPromptUser } from './pager';
|
|
11
12
|
export * from './exceptions';
|
|
12
13
|
export { successSymbol, warnSymbol, errorSymbol, bulletSymbol, formatItem, formatSection, formatTitle, formatHint, formatDetailsHint, formatSuccessSummary, formatWarningSummary, joinSections, renderSections, } from './output-formatter';
|
|
13
14
|
export type { OutputSection } from './output-formatter';
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var _exportNames = {
|
|
|
15
15
|
getArgsData: true,
|
|
16
16
|
getCommandName: true,
|
|
17
17
|
getFlagsData: true,
|
|
18
|
+
canPromptUser: true,
|
|
18
19
|
successSymbol: true,
|
|
19
20
|
warnSymbol: true,
|
|
20
21
|
errorSymbol: true,
|
|
@@ -53,6 +54,12 @@ Object.defineProperty(exports, "bulletSymbol", {
|
|
|
53
54
|
return _outputFormatter().bulletSymbol;
|
|
54
55
|
}
|
|
55
56
|
});
|
|
57
|
+
Object.defineProperty(exports, "canPromptUser", {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function () {
|
|
60
|
+
return _pager().canPromptUser;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
56
63
|
Object.defineProperty(exports, "default", {
|
|
57
64
|
enumerable: true,
|
|
58
65
|
get: function () {
|
|
@@ -221,6 +228,13 @@ function _commandHelper() {
|
|
|
221
228
|
};
|
|
222
229
|
return data;
|
|
223
230
|
}
|
|
231
|
+
function _pager() {
|
|
232
|
+
const data = require("./pager");
|
|
233
|
+
_pager = function () {
|
|
234
|
+
return data;
|
|
235
|
+
};
|
|
236
|
+
return data;
|
|
237
|
+
}
|
|
224
238
|
var _exceptions = require("./exceptions");
|
|
225
239
|
Object.keys(_exceptions).forEach(function (key) {
|
|
226
240
|
if (key === "default" || key === "__esModule") return;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_globalFlags","_interopRequireDefault","_defaultErrorHandler","_cliParser","_handleErrors","_commandHelper","_exceptions","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_outputFormatter","e","__esModule","default"],"sources":["index.ts"],"sourcesContent":["import { CLIAspect, MainRuntime } from './cli.aspect';\nimport globalFlags from './global-flags';\nimport defaultErrorHandler from './default-error-handler';\nexport { CLIParser } from './cli-parser';\nexport type { CLIMain, CommandList, CommandsSlot } from './cli.main.runtime';\nexport { handleUnhandledRejection, handleErrorAndExit, setExitOnUnhandledRejection } from './handle-errors';\nexport { globalFlags };\nexport { defaultErrorHandler };\nexport type { Command, CLIArgs, Flags, GenericObject, CommandOptions, Report } from './command';\nexport { getArgsData, getCommandName, getFlagsData } from './command-helper';\nexport * from './exceptions';\n\nexport {\n successSymbol,\n warnSymbol,\n errorSymbol,\n bulletSymbol,\n formatItem,\n formatSection,\n formatTitle,\n formatHint,\n formatDetailsHint,\n formatSuccessSummary,\n formatWarningSummary,\n joinSections,\n renderSections,\n} from './output-formatter';\nexport type { OutputSection } from './output-formatter';\n\nexport { CLIAspect as default, MainRuntime, CLIAspect };\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_globalFlags","_interopRequireDefault","_defaultErrorHandler","_cliParser","_handleErrors","_commandHelper","_pager","_exceptions","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_outputFormatter","e","__esModule","default"],"sources":["index.ts"],"sourcesContent":["import { CLIAspect, MainRuntime } from './cli.aspect';\nimport globalFlags from './global-flags';\nimport defaultErrorHandler from './default-error-handler';\nexport { CLIParser } from './cli-parser';\nexport type { CLIMain, CommandList, CommandsSlot } from './cli.main.runtime';\nexport { handleUnhandledRejection, handleErrorAndExit, setExitOnUnhandledRejection } from './handle-errors';\nexport { globalFlags };\nexport { defaultErrorHandler };\nexport type { Command, CLIArgs, Flags, GenericObject, CommandOptions, Report } from './command';\nexport { getArgsData, getCommandName, getFlagsData } from './command-helper';\nexport { canPromptUser } from './pager';\nexport * from './exceptions';\n\nexport {\n successSymbol,\n warnSymbol,\n errorSymbol,\n bulletSymbol,\n formatItem,\n formatSection,\n formatTitle,\n formatHint,\n formatDetailsHint,\n formatSuccessSummary,\n formatWarningSummary,\n joinSections,\n renderSections,\n} from './output-formatter';\nexport type { OutputSection } from './output-formatter';\n\nexport { CLIAspect as default, MainRuntime, CLIAspect };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,aAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,YAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,qBAAA;EAAA,MAAAJ,IAAA,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A,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
|
package/dist/pager.d.ts
CHANGED
|
@@ -5,6 +5,12 @@ import type { Command, Flags } from './command';
|
|
|
5
5
|
* with no pager.
|
|
6
6
|
*/
|
|
7
7
|
export declare function isInteractiveTerminal(): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* whether it's possible to prompt the user and get an answer: the session must be an interactive
|
|
10
|
+
* human terminal (see isInteractiveTerminal) and stdin must also be a TTY, otherwise a prompt
|
|
11
|
+
* would hang forever waiting for input that can never arrive.
|
|
12
|
+
*/
|
|
13
|
+
export declare function canPromptUser(): boolean;
|
|
8
14
|
/**
|
|
9
15
|
* whether the output already fits within the current terminal, in which case there's no reason
|
|
10
16
|
* to page it (avoids the "press q to exit" annoyance for short output, without relying on the
|
package/dist/pager.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.canPromptUser = canPromptUser;
|
|
6
7
|
exports.fitsOnScreen = fitsOnScreen;
|
|
7
8
|
exports.isInteractiveTerminal = isInteractiveTerminal;
|
|
8
9
|
exports.shouldUsePager = shouldUsePager;
|
|
@@ -69,6 +70,15 @@ function isInteractiveTerminal() {
|
|
|
69
70
|
return true;
|
|
70
71
|
}
|
|
71
72
|
|
|
73
|
+
/**
|
|
74
|
+
* whether it's possible to prompt the user and get an answer: the session must be an interactive
|
|
75
|
+
* human terminal (see isInteractiveTerminal) and stdin must also be a TTY, otherwise a prompt
|
|
76
|
+
* would hang forever waiting for input that can never arrive.
|
|
77
|
+
*/
|
|
78
|
+
function canPromptUser() {
|
|
79
|
+
return isInteractiveTerminal() && Boolean(process.stdin.isTTY);
|
|
80
|
+
}
|
|
81
|
+
|
|
72
82
|
/**
|
|
73
83
|
* whether the output already fits within the current terminal, in which case there's no reason
|
|
74
84
|
* to page it (avoids the "press q to exit" annoyance for short output, without relying on the
|
package/dist/pager.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_child_process","data","require","_path","_legacy","_legacy2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","AI_AGENT_ENV_VARS","isEnvSet","name","process","env","undefined","isInteractiveTerminal","stdout","isTTY","logger","isDaemon","some","fitsOnScreen","output","rows","columns","lines","replace","split","usedRows","line","width","removeChalkCharacters","Math","ceil","shouldUsePager","command","flags","pager","json","parsePagerCommand","tokens","match","map","token","writeToPager","force","Promise","resolve","configuredPager","BIT_PAGER","PAGER","disabled","cmd","args","test","basename","LESS","child","spawn","stdio","on","code","stdin","write","end"],"sources":["pager.ts"],"sourcesContent":["import { spawn } from 'child_process';\nimport { basename } from 'path';\nimport { logger } from '@teambit/legacy.logger';\nimport { removeChalkCharacters } from '@teambit/legacy.utils';\nimport type { Command, Flags } from './command';\n\n/**\n * best-effort list of env vars set by ai-agent / automation runners. when any is present we\n * never page, so agents always receive the full command output at once (never partial/paged\n * data), even in the rare case they allocate a pseudo-tty.\n */\nconst AI_AGENT_ENV_VARS = ['CLAUDECODE', 'CLAUDE_CODE', 'CURSOR_AGENT'];\n\n/**\n * an env var counts as \"set\" when it's present at all, even if its value is an empty string. the\n * vars we gate on (CI, ai-agent markers, BIT_NO_PAGER) are opt-outs, so presence — not truthiness —\n * is what disables paging; this also matches automation runners that inject empty-string values.\n */\nconst isEnvSet = (name: string): boolean => process.env[name] !== undefined;\n\n/**\n * detect whether the output is going to an interactive human terminal.\n * anything non-interactive (piped output, CI, ai-agents, bit-cli-server) gets the full output\n * with no pager.\n */\nexport function isInteractiveTerminal(): boolean {\n if (!process.stdout.isTTY) return false;\n // daemon contexts don't page: the bit-cli-server (output travels over IPC, no terminal) and the\n // experimental `bit cli` REPL (a pager would fight its readline interface over the TTY).\n if (logger.isDaemon) return false;\n if (isEnvSet('CI')) return false;\n if (AI_AGENT_ENV_VARS.some(isEnvSet)) return false;\n return true;\n}\n\n/**\n * whether the output already fits within the current terminal, in which case there's no reason\n * to page it (avoids the \"press q to exit\" annoyance for short output, without relying on the\n * version-dependent `less -F` behavior which is broken by `-X` in modern less). accounts for line\n * wrapping and ignores ansi color codes when measuring width. returns false when the terminal size\n * is unknown.\n */\nexport function fitsOnScreen(output: string): boolean {\n const { rows, columns } = process.stdout;\n if (!rows || !columns) return false;\n // split at most rows+1 lines — enough to prove overflow — so the array never scales with the\n // full (potentially huge) output; the loop below also early-exits once one screen is exceeded.\n const lines = output.replace(/\\n$/, '').split('\\n', rows + 1);\n let usedRows = 0;\n for (const line of lines) {\n const width = (removeChalkCharacters(line) || '').length;\n usedRows += width === 0 ? 1 : Math.ceil(width / columns);\n if (usedRows > rows) return false; // stop early once we know it overflows one screen\n }\n return true;\n}\n\n/**\n * decide whether a command's report output should be piped through a pager.\n * mirrors git: on by default for interactive terminals, off for anything else. explicit flags\n * (--pager / --no-pager) and the BIT_NO_PAGER env var override the automatic behavior. in the\n * automatic case, output that already fits on the screen is printed directly (no pager).\n */\nexport function shouldUsePager(command: Command, flags: Flags, output: string): boolean {\n if (!command.pager) return false; // command didn't opt-in to paging\n if (flags.json) return false; // json is for machine consumption, never page it\n // explicit CLI flags win over the BIT_NO_PAGER env var, so `--pager` can force paging for a\n // single invocation even when the user exports BIT_NO_PAGER globally.\n if (flags['no-pager']) return false;\n if (flags.pager) return true; // explicit force-on, even when non-interactive / fits on screen\n if (isEnvSet('BIT_NO_PAGER')) return false; // env opt-out (overridable by --pager above)\n if (!isInteractiveTerminal()) return false;\n return !fitsOnScreen(output); // only page when the output is longer than one screen\n}\n\n/**\n * split a configured pager string (BIT_PAGER / PAGER) into [command, ...args], honoring single and\n * double quotes so an executable path that contains spaces can be configured, e.g.\n * `\"/Applications/My Pager/less\" -R`. we deliberately don't run the pager through a shell (avoids\n * shell-injection and the ENOENT-swallows-output problem), so quoting is how a spaced path is\n * expressed.\n */\nfunction parsePagerCommand(pager: string): string[] {\n const tokens = pager.match(/\"[^\"]*\"|'[^']*'|\\S+/g) || [];\n return tokens.map((token) => token.replace(/^[\"']|[\"']$/g, ''));\n}\n\n/**\n * pipe the given output through a pager (`less` by default). resolves to `true` only after the\n * pager process has exited cleanly — the caller must await this before exiting the process so the\n * pager isn't cut off. resolves to `false` when paging is disabled, the pager couldn't launch, or\n * it exited with an error, in which case the caller must write the data directly so nothing is lost.\n *\n * the pager binary is taken from BIT_PAGER, then PAGER, defaulting to `less`. an empty or `cat`\n * pager means the user disabled paging via the env — honored unless `force` is set (the `--pager`\n * flag), which falls back to a real pager so the flag is a true override. for `less` we set\n * `LESS=FRX` (unless already set, matching git's default): keep ansi colors (-R), don't clear the\n * screen on exit (-X), and quit if the output fits one screen (-F).\n */\nexport function writeToPager(data: string, force = false): Promise<boolean> {\n return new Promise<boolean>((resolve) => {\n // BIT_PAGER wins over PAGER; default to `less` only when neither is set. use `??` (not `||`)\n // so an explicit empty string is preserved rather than treated as unset — that lets\n // BIT_PAGER=\"\" disable paging.\n const configuredPager = process.env.BIT_PAGER ?? process.env.PAGER ?? 'less';\n const tokens = parsePagerCommand(configuredPager);\n // an empty / \"cat\" pager means the user disabled paging. honor that, unless `--pager` forces\n // paging on, in which case fall back to a real pager so the flag is a true override.\n const disabled = !tokens[0] || tokens[0] === 'cat';\n if (disabled && !force) {\n resolve(false);\n return;\n }\n const [cmd, ...args] = disabled ? ['less'] : tokens;\n const env = { ...process.env };\n // LESS=FRX only makes sense for `less` itself; don't leak it into other pagers or wrapper scripts.\n if (/^less(\\.exe)?$/i.test(basename(cmd)) && !env.LESS) env.LESS = 'FRX';\n\n try {\n const child = spawn(cmd, args, { stdio: ['pipe', 'inherit', 'inherit'], env });\n // pager missing (ENOENT) or otherwise failed to launch => fall back to a direct write.\n child.on('error', () => resolve(false));\n // resolve success only on a clean exit (code 0) or a signal (code null, e.g. the user killed\n // it). a non-zero exit means the pager failed (bad args, couldn't render) without showing the\n // output, so fall back to a direct write and never lose it.\n child.on('close', (code) => resolve(code === 0 || code === null));\n // ignore EPIPE that happens when the user quits the pager (e.g. \"q\") before all data is read.\n child.stdin?.on('error', () => {});\n child.stdin?.write(data);\n child.stdin?.end();\n } catch {\n resolve(false);\n }\n });\n}\n"],"mappings":";;;;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8D,SAAAK,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ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AK,CAAC;IAChB;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_child_process","data","require","_path","_legacy","_legacy2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","AI_AGENT_ENV_VARS","isEnvSet","name","process","env","undefined","isInteractiveTerminal","stdout","isTTY","logger","isDaemon","some","canPromptUser","Boolean","stdin","fitsOnScreen","output","rows","columns","lines","replace","split","usedRows","line","width","removeChalkCharacters","Math","ceil","shouldUsePager","command","flags","pager","json","parsePagerCommand","tokens","match","map","token","writeToPager","force","Promise","resolve","configuredPager","BIT_PAGER","PAGER","disabled","cmd","args","test","basename","LESS","child","spawn","stdio","on","code","write","end"],"sources":["pager.ts"],"sourcesContent":["import { spawn } from 'child_process';\nimport { basename } from 'path';\nimport { logger } from '@teambit/legacy.logger';\nimport { removeChalkCharacters } from '@teambit/legacy.utils';\nimport type { Command, Flags } from './command';\n\n/**\n * best-effort list of env vars set by ai-agent / automation runners. when any is present we\n * never page, so agents always receive the full command output at once (never partial/paged\n * data), even in the rare case they allocate a pseudo-tty.\n */\nconst AI_AGENT_ENV_VARS = ['CLAUDECODE', 'CLAUDE_CODE', 'CURSOR_AGENT'];\n\n/**\n * an env var counts as \"set\" when it's present at all, even if its value is an empty string. the\n * vars we gate on (CI, ai-agent markers, BIT_NO_PAGER) are opt-outs, so presence — not truthiness —\n * is what disables paging; this also matches automation runners that inject empty-string values.\n */\nconst isEnvSet = (name: string): boolean => process.env[name] !== undefined;\n\n/**\n * detect whether the output is going to an interactive human terminal.\n * anything non-interactive (piped output, CI, ai-agents, bit-cli-server) gets the full output\n * with no pager.\n */\nexport function isInteractiveTerminal(): boolean {\n if (!process.stdout.isTTY) return false;\n // daemon contexts don't page: the bit-cli-server (output travels over IPC, no terminal) and the\n // experimental `bit cli` REPL (a pager would fight its readline interface over the TTY).\n if (logger.isDaemon) return false;\n if (isEnvSet('CI')) return false;\n if (AI_AGENT_ENV_VARS.some(isEnvSet)) return false;\n return true;\n}\n\n/**\n * whether it's possible to prompt the user and get an answer: the session must be an interactive\n * human terminal (see isInteractiveTerminal) and stdin must also be a TTY, otherwise a prompt\n * would hang forever waiting for input that can never arrive.\n */\nexport function canPromptUser(): boolean {\n return isInteractiveTerminal() && Boolean(process.stdin.isTTY);\n}\n\n/**\n * whether the output already fits within the current terminal, in which case there's no reason\n * to page it (avoids the \"press q to exit\" annoyance for short output, without relying on the\n * version-dependent `less -F` behavior which is broken by `-X` in modern less). accounts for line\n * wrapping and ignores ansi color codes when measuring width. returns false when the terminal size\n * is unknown.\n */\nexport function fitsOnScreen(output: string): boolean {\n const { rows, columns } = process.stdout;\n if (!rows || !columns) return false;\n // split at most rows+1 lines — enough to prove overflow — so the array never scales with the\n // full (potentially huge) output; the loop below also early-exits once one screen is exceeded.\n const lines = output.replace(/\\n$/, '').split('\\n', rows + 1);\n let usedRows = 0;\n for (const line of lines) {\n const width = (removeChalkCharacters(line) || '').length;\n usedRows += width === 0 ? 1 : Math.ceil(width / columns);\n if (usedRows > rows) return false; // stop early once we know it overflows one screen\n }\n return true;\n}\n\n/**\n * decide whether a command's report output should be piped through a pager.\n * mirrors git: on by default for interactive terminals, off for anything else. explicit flags\n * (--pager / --no-pager) and the BIT_NO_PAGER env var override the automatic behavior. in the\n * automatic case, output that already fits on the screen is printed directly (no pager).\n */\nexport function shouldUsePager(command: Command, flags: Flags, output: string): boolean {\n if (!command.pager) return false; // command didn't opt-in to paging\n if (flags.json) return false; // json is for machine consumption, never page it\n // explicit CLI flags win over the BIT_NO_PAGER env var, so `--pager` can force paging for a\n // single invocation even when the user exports BIT_NO_PAGER globally.\n if (flags['no-pager']) return false;\n if (flags.pager) return true; // explicit force-on, even when non-interactive / fits on screen\n if (isEnvSet('BIT_NO_PAGER')) return false; // env opt-out (overridable by --pager above)\n if (!isInteractiveTerminal()) return false;\n return !fitsOnScreen(output); // only page when the output is longer than one screen\n}\n\n/**\n * split a configured pager string (BIT_PAGER / PAGER) into [command, ...args], honoring single and\n * double quotes so an executable path that contains spaces can be configured, e.g.\n * `\"/Applications/My Pager/less\" -R`. we deliberately don't run the pager through a shell (avoids\n * shell-injection and the ENOENT-swallows-output problem), so quoting is how a spaced path is\n * expressed.\n */\nfunction parsePagerCommand(pager: string): string[] {\n const tokens = pager.match(/\"[^\"]*\"|'[^']*'|\\S+/g) || [];\n return tokens.map((token) => token.replace(/^[\"']|[\"']$/g, ''));\n}\n\n/**\n * pipe the given output through a pager (`less` by default). resolves to `true` only after the\n * pager process has exited cleanly — the caller must await this before exiting the process so the\n * pager isn't cut off. resolves to `false` when paging is disabled, the pager couldn't launch, or\n * it exited with an error, in which case the caller must write the data directly so nothing is lost.\n *\n * the pager binary is taken from BIT_PAGER, then PAGER, defaulting to `less`. an empty or `cat`\n * pager means the user disabled paging via the env — honored unless `force` is set (the `--pager`\n * flag), which falls back to a real pager so the flag is a true override. for `less` we set\n * `LESS=FRX` (unless already set, matching git's default): keep ansi colors (-R), don't clear the\n * screen on exit (-X), and quit if the output fits one screen (-F).\n */\nexport function writeToPager(data: string, force = false): Promise<boolean> {\n return new Promise<boolean>((resolve) => {\n // BIT_PAGER wins over PAGER; default to `less` only when neither is set. use `??` (not `||`)\n // so an explicit empty string is preserved rather than treated as unset — that lets\n // BIT_PAGER=\"\" disable paging.\n const configuredPager = process.env.BIT_PAGER ?? process.env.PAGER ?? 'less';\n const tokens = parsePagerCommand(configuredPager);\n // an empty / \"cat\" pager means the user disabled paging. honor that, unless `--pager` forces\n // paging on, in which case fall back to a real pager so the flag is a true override.\n const disabled = !tokens[0] || tokens[0] === 'cat';\n if (disabled && !force) {\n resolve(false);\n return;\n }\n const [cmd, ...args] = disabled ? ['less'] : tokens;\n const env = { ...process.env };\n // LESS=FRX only makes sense for `less` itself; don't leak it into other pagers or wrapper scripts.\n if (/^less(\\.exe)?$/i.test(basename(cmd)) && !env.LESS) env.LESS = 'FRX';\n\n try {\n const child = spawn(cmd, args, { stdio: ['pipe', 'inherit', 'inherit'], env });\n // pager missing (ENOENT) or otherwise failed to launch => fall back to a direct write.\n child.on('error', () => resolve(false));\n // resolve success only on a clean exit (code 0) or a signal (code null, e.g. the user killed\n // it). a non-zero exit means the pager failed (bad args, couldn't render) without showing the\n // output, so fall back to a direct write and never lose it.\n child.on('close', (code) => resolve(code === 0 || code === null));\n // ignore EPIPE that happens when the user quits the pager (e.g. \"q\") before all data is read.\n child.stdin?.on('error', () => {});\n child.stdin?.write(data);\n child.stdin?.end();\n } catch {\n resolve(false);\n }\n });\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8D,SAAAK,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAA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,IAAKd,OAAO,CAACc,IAAI,KAAK,CAAC,IAAIA,IAAI,KAAK,IAAI,CAAC,CAAC;MACjE;MACAJ,KAAK,CAACrC,KAAK,EAAEwC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;MAClCH,KAAK,CAACrC,KAAK,EAAE0C,KAAK,CAAC9F,IAAI,CAAC;MACxByF,KAAK,CAACrC,KAAK,EAAE2C,GAAG,CAAC,CAAC;IACpB,CAAC,CAAC,MAAM;MACNhB,OAAO,CAAC,KAAK,CAAC;IAChB;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cli@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cli@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cli@0.0.1376/dist/cli.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cli@0.0.1376/dist/cli.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1376",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/harmony/cli",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "cli",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.1376"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "4.1.2",
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
"p-map-series": "2.1.0",
|
|
17
17
|
"fs-extra": "10.0.0",
|
|
18
18
|
"pad-right": "0.2.2",
|
|
19
|
-
"@teambit/legacy.consumer": "0.0.148",
|
|
20
19
|
"@teambit/legacy.loader": "0.0.29",
|
|
21
20
|
"@teambit/legacy.logger": "0.0.56",
|
|
22
21
|
"@teambit/harmony": "0.4.12",
|
|
@@ -26,7 +25,8 @@
|
|
|
26
25
|
"@teambit/bit-error": "0.0.404",
|
|
27
26
|
"@teambit/legacy.cli.error": "0.0.56",
|
|
28
27
|
"@teambit/legacy.utils": "0.0.48",
|
|
29
|
-
"@teambit/
|
|
28
|
+
"@teambit/legacy.consumer": "0.0.149",
|
|
29
|
+
"@teambit/logger": "0.0.1469"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/didyoumean": "1.2.0",
|