@socketsecurity/lib 3.2.8 → 3.3.1
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 +22 -0
- package/README.md +19 -240
- package/dist/agent.js +10 -10
- package/dist/bin.js +4 -4
- package/dist/colors.d.ts +37 -0
- package/dist/colors.js +58 -0
- package/dist/constants/node.js +1 -1
- package/dist/constants/packages.js +9 -9
- package/dist/constants/process.js +1 -1
- package/dist/constants/socket.d.ts +1 -0
- package/dist/constants/socket.js +3 -0
- package/dist/debug.js +3 -3
- package/dist/dlx-binary.js +4 -4
- package/dist/effects/text-shimmer.js +1 -1
- package/dist/env/ci.js +2 -2
- package/dist/env/debug.js +1 -1
- package/dist/env/github.js +1 -1
- package/dist/env/home.js +1 -1
- package/dist/env/locale.js +1 -1
- package/dist/env/node-auth-token.js +1 -1
- package/dist/env/node-env.js +1 -1
- package/dist/env/npm.js +1 -1
- package/dist/env/package-manager.js +1 -1
- package/dist/env/path.js +1 -1
- package/dist/env/pre-commit.js +2 -2
- package/dist/env/rewire.d.ts +5 -5
- package/dist/env/rewire.js +22 -14
- package/dist/env/shell.js +1 -1
- package/dist/env/socket-cli-shadow.js +2 -2
- package/dist/env/socket-cli.js +2 -2
- package/dist/env/socket.js +2 -2
- package/dist/env/temp-dir.js +1 -1
- package/dist/env/term.js +1 -1
- package/dist/env/test.js +3 -3
- package/dist/env/windows.js +1 -1
- package/dist/env/xdg.js +1 -1
- package/dist/external/@inquirer/checkbox.js +3361 -3
- package/dist/external/@inquirer/confirm.js +1 -0
- package/dist/external/@inquirer/input.js +1 -0
- package/dist/external/@inquirer/password.js +1 -0
- package/dist/external/@inquirer/search.js +1 -0
- package/dist/external/@inquirer/select.js +1 -0
- package/dist/fs.js +4 -6
- package/dist/git.js +1 -1
- package/dist/github.js +2 -2
- package/dist/globs.js +3 -4
- package/dist/lifecycle-script-names.d.ts +8 -2
- package/dist/lifecycle-script-names.js +9 -4
- package/dist/logger.d.ts +106 -81
- package/dist/logger.js +234 -205
- package/dist/maintained-node-versions.d.ts +2 -2
- package/dist/maintained-node-versions.js +9 -4
- package/dist/objects.js +1 -1
- package/dist/package-default-node-range.d.ts +2 -2
- package/dist/package-default-node-range.js +10 -5
- package/dist/package-default-socket-categories.d.ts +6 -2
- package/dist/package-default-socket-categories.js +9 -4
- package/dist/package-extensions.d.ts +2 -2
- package/dist/package-extensions.js +9 -4
- package/dist/packages/exports.js +1 -1
- package/dist/packages/isolation.js +2 -2
- package/dist/packages/licenses.js +2 -2
- package/dist/packages/manifest.js +3 -3
- package/dist/packages/normalize.js +1 -1
- package/dist/packages/operations.js +5 -5
- package/dist/packages/provenance.js +1 -1
- package/dist/path.d.ts +11 -0
- package/dist/path.js +1 -1
- package/dist/paths.js +14 -14
- package/dist/promises.js +2 -2
- package/dist/spawn.js +1 -1
- package/dist/spinner.d.ts +29 -51
- package/dist/spinner.js +155 -149
- package/dist/stdio/prompts.d.ts +17 -0
- package/dist/stdio/prompts.js +11 -12
- package/dist/temporary-executor.js +1 -1
- package/dist/themes/types.d.ts +2 -1
- package/dist/themes/utils.d.ts +1 -1
- package/dist/utils/get-ipc.d.ts +0 -1
- package/dist/utils/get-ipc.js +4 -4
- package/dist/versions.d.ts +1 -1
- package/package.json +15 -11
- package/dist/external/@inquirer/core.js +0 -4
- package/dist/external/@inquirer/prompts.js +0 -4
|
@@ -23,10 +23,10 @@ __export(isolation_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(isolation_exports);
|
|
25
25
|
var import_fs = require("fs");
|
|
26
|
-
var import_platform = require("
|
|
26
|
+
var import_platform = require("#constants/platform");
|
|
27
27
|
var import_path = require("../path");
|
|
28
28
|
var import_operations = require("./operations");
|
|
29
|
-
var import_paths = require("
|
|
29
|
+
var import_paths = require("#lib/paths");
|
|
30
30
|
let _path;
|
|
31
31
|
// @__NO_SIDE_EFFECTS__
|
|
32
32
|
function getPath() {
|
|
@@ -29,8 +29,8 @@ __export(licenses_exports, {
|
|
|
29
29
|
visitLicenses: () => visitLicenses
|
|
30
30
|
});
|
|
31
31
|
module.exports = __toCommonJS(licenses_exports);
|
|
32
|
-
var import_core = require("
|
|
33
|
-
var import_licenses = require("
|
|
32
|
+
var import_core = require("#constants/core");
|
|
33
|
+
var import_licenses = require("#constants/licenses");
|
|
34
34
|
var import_objects = require("../objects");
|
|
35
35
|
var import_path = require("../path");
|
|
36
36
|
const copyLeftLicenses = (0, import_licenses.getCopyLeftLicenses)();
|
|
@@ -24,9 +24,9 @@ __export(manifest_exports, {
|
|
|
24
24
|
fetchPackagePackument: () => fetchPackagePackument
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(manifest_exports);
|
|
27
|
-
var import_packages = require("
|
|
28
|
-
var import_process = require("
|
|
29
|
-
var import_socket = require("
|
|
27
|
+
var import_packages = require("#constants/packages");
|
|
28
|
+
var import_process = require("#constants/process");
|
|
29
|
+
var import_socket = require("#constants/socket");
|
|
30
30
|
var import_arrays = require("../arrays");
|
|
31
31
|
var import_objects = require("../objects");
|
|
32
32
|
var import_exports = require("./exports");
|
|
@@ -71,7 +71,7 @@ let _findPackageExtensions;
|
|
|
71
71
|
// @__NO_SIDE_EFFECTS__
|
|
72
72
|
function _getFindPackageExtensions() {
|
|
73
73
|
if (_findPackageExtensions === void 0) {
|
|
74
|
-
const operations = require("
|
|
74
|
+
const operations = require("#packages/operations");
|
|
75
75
|
_findPackageExtensions = operations.findPackageExtensions;
|
|
76
76
|
}
|
|
77
77
|
return _findPackageExtensions;
|
|
@@ -30,9 +30,9 @@ __export(operations_exports, {
|
|
|
30
30
|
resolveRegistryPackageName: () => resolveRegistryPackageName
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(operations_exports);
|
|
33
|
-
var import_packages = require("
|
|
34
|
-
var import_process = require("
|
|
35
|
-
var import_socket = require("
|
|
33
|
+
var import_packages = require("#constants/packages");
|
|
34
|
+
var import_process = require("#constants/process");
|
|
35
|
+
var import_socket = require("#constants/socket");
|
|
36
36
|
var import_fs = require("../fs");
|
|
37
37
|
var import_objects = require("../objects");
|
|
38
38
|
var import_normalize = require("./normalize");
|
|
@@ -110,7 +110,7 @@ let _toEditablePackageJson;
|
|
|
110
110
|
// @__NO_SIDE_EFFECTS__
|
|
111
111
|
function _getToEditablePackageJson() {
|
|
112
112
|
if (_toEditablePackageJson === void 0) {
|
|
113
|
-
_toEditablePackageJson = require("
|
|
113
|
+
_toEditablePackageJson = require("#packages/editable").toEditablePackageJson;
|
|
114
114
|
}
|
|
115
115
|
return _toEditablePackageJson;
|
|
116
116
|
}
|
|
@@ -118,7 +118,7 @@ let _toEditablePackageJsonSync;
|
|
|
118
118
|
// @__NO_SIDE_EFFECTS__
|
|
119
119
|
function _getToEditablePackageJsonSync() {
|
|
120
120
|
if (_toEditablePackageJsonSync === void 0) {
|
|
121
|
-
_toEditablePackageJsonSync = require("
|
|
121
|
+
_toEditablePackageJsonSync = require("#packages/editable").toEditablePackageJsonSync;
|
|
122
122
|
}
|
|
123
123
|
return _toEditablePackageJsonSync;
|
|
124
124
|
}
|
|
@@ -23,7 +23,7 @@ __export(provenance_exports, {
|
|
|
23
23
|
getProvenanceDetails: () => getProvenanceDetails
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(provenance_exports);
|
|
26
|
-
var import_agents = require("
|
|
26
|
+
var import_agents = require("#constants/agents");
|
|
27
27
|
var import_abort = require("../abort");
|
|
28
28
|
var import_url = require("../url");
|
|
29
29
|
const ArrayIsArray = Array.isArray;
|
package/dist/path.d.ts
CHANGED
|
@@ -162,6 +162,13 @@ export declare function isRelative(pathLike: string | Buffer | URL): boolean;
|
|
|
162
162
|
* @param {string | Buffer | URL} pathLike - The path to normalize
|
|
163
163
|
* @returns {string} The normalized path with forward slashes and collapsed segments
|
|
164
164
|
*
|
|
165
|
+
* @security
|
|
166
|
+
* **WARNING**: This function resolves `..` patterns as part of normalization, which means
|
|
167
|
+
* paths like `/../etc/passwd` become `/etc/passwd`. When processing untrusted user input
|
|
168
|
+
* (HTTP requests, file uploads, URL parameters), you MUST validate for path traversal
|
|
169
|
+
* attacks BEFORE calling this function. Check for patterns like `..`, `%2e%2e`, `\..`,
|
|
170
|
+
* and other traversal encodings first.
|
|
171
|
+
*
|
|
165
172
|
* @example
|
|
166
173
|
* ```typescript
|
|
167
174
|
* // Basic normalization
|
|
@@ -182,6 +189,10 @@ export declare function isRelative(pathLike: string | Buffer | URL): boolean;
|
|
|
182
189
|
* normalizePath('..') // '..'
|
|
183
190
|
* normalizePath('///foo///bar///') // '/foo/bar'
|
|
184
191
|
* normalizePath('foo/../..') // '..'
|
|
192
|
+
*
|
|
193
|
+
* // Security: Path traversal is resolved (intended behavior for trusted paths)
|
|
194
|
+
* normalizePath('/../etc/passwd') // '/etc/passwd' ⚠️
|
|
195
|
+
* normalizePath('/safe/../../unsafe') // '/unsafe' ⚠️
|
|
185
196
|
* ```
|
|
186
197
|
*/
|
|
187
198
|
/*@__NO_SIDE_EFFECTS__*/
|
package/dist/path.js
CHANGED
|
@@ -30,7 +30,7 @@ __export(path_exports, {
|
|
|
30
30
|
trimLeadingDotSlash: () => trimLeadingDotSlash
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(path_exports);
|
|
33
|
-
var import_platform = require("
|
|
33
|
+
var import_platform = require("#constants/platform");
|
|
34
34
|
var import_strings = require("./strings");
|
|
35
35
|
const CHAR_BACKWARD_SLASH = 92;
|
|
36
36
|
const CHAR_COLON = 58;
|
package/dist/paths.js
CHANGED
|
@@ -47,9 +47,9 @@ __export(paths_exports, {
|
|
|
47
47
|
module.exports = __toCommonJS(paths_exports);
|
|
48
48
|
var os = __toESM(require("os"));
|
|
49
49
|
var path = __toESM(require("path"));
|
|
50
|
-
var import_home = require("
|
|
51
|
-
var import_socket = require("
|
|
52
|
-
var import_windows = require("
|
|
50
|
+
var import_home = require("#env/home");
|
|
51
|
+
var import_socket = require("#env/socket");
|
|
52
|
+
var import_windows = require("#env/windows");
|
|
53
53
|
var import_path = require("./path");
|
|
54
54
|
var import_rewire = require("./paths/rewire");
|
|
55
55
|
function getOsHomeDir() {
|
|
@@ -68,7 +68,7 @@ function getSocketUserDir() {
|
|
|
68
68
|
path.join(
|
|
69
69
|
getUserHomeDir(),
|
|
70
70
|
/*@__INLINE__*/
|
|
71
|
-
require("
|
|
71
|
+
require("#constants/paths").DOT_SOCKET_DIR
|
|
72
72
|
)
|
|
73
73
|
);
|
|
74
74
|
}
|
|
@@ -79,7 +79,7 @@ function getSocketAppDir(appName) {
|
|
|
79
79
|
path.join(
|
|
80
80
|
getSocketUserDir(),
|
|
81
81
|
`${/*@__INLINE__*/
|
|
82
|
-
require("
|
|
82
|
+
require("#constants/socket").SOCKET_APP_PREFIX}${appName}`
|
|
83
83
|
)
|
|
84
84
|
);
|
|
85
85
|
}
|
|
@@ -95,7 +95,7 @@ function getSocketCacacheDir() {
|
|
|
95
95
|
path.join(
|
|
96
96
|
getSocketUserDir(),
|
|
97
97
|
`${/*@__INLINE__*/
|
|
98
|
-
require("
|
|
98
|
+
require("#constants/socket").SOCKET_APP_PREFIX}cacache`
|
|
99
99
|
)
|
|
100
100
|
);
|
|
101
101
|
}
|
|
@@ -110,8 +110,8 @@ function getSocketDlxDir() {
|
|
|
110
110
|
path.join(
|
|
111
111
|
getSocketUserDir(),
|
|
112
112
|
`${/*@__INLINE__*/
|
|
113
|
-
require("
|
|
114
|
-
require("
|
|
113
|
+
require("#constants/socket").SOCKET_APP_PREFIX}${/*@__INLINE__*/
|
|
114
|
+
require("#constants/socket").SOCKET_DLX_APP_NAME}`
|
|
115
115
|
)
|
|
116
116
|
);
|
|
117
117
|
}
|
|
@@ -120,7 +120,7 @@ function getSocketAppCacheDir(appName) {
|
|
|
120
120
|
path.join(
|
|
121
121
|
getSocketAppDir(appName),
|
|
122
122
|
/*@__INLINE__*/
|
|
123
|
-
require("
|
|
123
|
+
require("#constants/paths").CACHE_DIR
|
|
124
124
|
)
|
|
125
125
|
);
|
|
126
126
|
}
|
|
@@ -129,20 +129,20 @@ function getSocketAppCacheTtlDir(appName) {
|
|
|
129
129
|
path.join(
|
|
130
130
|
getSocketAppCacheDir(appName),
|
|
131
131
|
/*@__INLINE__*/
|
|
132
|
-
require("
|
|
132
|
+
require("#constants/paths").CACHE_TTL_DIR
|
|
133
133
|
)
|
|
134
134
|
);
|
|
135
135
|
}
|
|
136
136
|
function getSocketCliDir() {
|
|
137
137
|
return getSocketAppDir(
|
|
138
138
|
/*@__INLINE__*/
|
|
139
|
-
require("
|
|
139
|
+
require("#constants/socket").SOCKET_CLI_APP_NAME
|
|
140
140
|
);
|
|
141
141
|
}
|
|
142
142
|
function getSocketRegistryDir() {
|
|
143
143
|
return getSocketAppDir(
|
|
144
144
|
/*@__INLINE__*/
|
|
145
|
-
require("
|
|
145
|
+
require("#constants/socket").SOCKET_REGISTRY_APP_NAME
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
148
|
function getSocketRegistryGithubCacheDir() {
|
|
@@ -150,10 +150,10 @@ function getSocketRegistryGithubCacheDir() {
|
|
|
150
150
|
path.join(
|
|
151
151
|
getSocketAppCacheTtlDir(
|
|
152
152
|
/*@__INLINE__*/
|
|
153
|
-
require("
|
|
153
|
+
require("#constants/socket").SOCKET_REGISTRY_APP_NAME
|
|
154
154
|
),
|
|
155
155
|
/*@__INLINE__*/
|
|
156
|
-
require("
|
|
156
|
+
require("#constants/github").CACHE_GITHUB_DIR
|
|
157
157
|
)
|
|
158
158
|
);
|
|
159
159
|
}
|
package/dist/promises.js
CHANGED
|
@@ -29,8 +29,8 @@ __export(promises_exports, {
|
|
|
29
29
|
resolveRetryOptions: () => resolveRetryOptions
|
|
30
30
|
});
|
|
31
31
|
module.exports = __toCommonJS(promises_exports);
|
|
32
|
-
var import_core = require("
|
|
33
|
-
var import_process = require("
|
|
32
|
+
var import_core = require("#constants/core");
|
|
33
|
+
var import_process = require("#constants/process");
|
|
34
34
|
var import_arrays = require("./arrays");
|
|
35
35
|
const abortSignal = (0, import_process.getAbortSignal)();
|
|
36
36
|
let _timers;
|
package/dist/spawn.js
CHANGED
|
@@ -25,7 +25,7 @@ __export(spawn_exports, {
|
|
|
25
25
|
spawnSync: () => spawnSync
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(spawn_exports);
|
|
28
|
-
var import_process = require("
|
|
28
|
+
var import_process = require("#constants/process");
|
|
29
29
|
var import_arrays = require("./arrays");
|
|
30
30
|
var import_objects = require("./objects");
|
|
31
31
|
var import_strings = require("./strings");
|
package/dist/spinner.d.ts
CHANGED
|
@@ -3,39 +3,13 @@
|
|
|
3
3
|
* Provides animated progress indicators with CI environment detection.
|
|
4
4
|
*/
|
|
5
5
|
import type { Writable } from 'stream';
|
|
6
|
+
import type { ColorInherit, ColorRgb, ColorValue } from './colors';
|
|
6
7
|
import type { ShimmerColorGradient, ShimmerConfig, ShimmerDirection, ShimmerState } from './effects/text-shimmer';
|
|
7
|
-
/**
|
|
8
|
-
* Named color values supported by the spinner.
|
|
9
|
-
* Maps to standard terminal colors with bright variants.
|
|
10
|
-
*/
|
|
11
|
-
export type ColorName = 'black' | 'blue' | 'blueBright' | 'cyan' | 'cyanBright' | 'gray' | 'green' | 'greenBright' | 'magenta' | 'magentaBright' | 'red' | 'redBright' | 'white' | 'whiteBright' | 'yellow' | 'yellowBright';
|
|
12
|
-
/**
|
|
13
|
-
* Special 'inherit' color value that uses the spinner's current color.
|
|
14
|
-
* Used with shimmer effects to dynamically inherit the spinner color.
|
|
15
|
-
*/
|
|
16
|
-
export type ColorInherit = 'inherit';
|
|
17
|
-
/**
|
|
18
|
-
* RGB color tuple with values 0-255 for red, green, and blue channels.
|
|
19
|
-
* @example [140, 82, 255] // Socket purple
|
|
20
|
-
* @example [255, 0, 0] // Red
|
|
21
|
-
*/
|
|
22
|
-
export type ColorRgb = readonly [number, number, number];
|
|
23
|
-
/**
|
|
24
|
-
* Union of all supported color types: named colors or RGB tuples.
|
|
25
|
-
*/
|
|
26
|
-
export type ColorValue = ColorName | ColorRgb;
|
|
27
8
|
/**
|
|
28
9
|
* Symbol types for status messages.
|
|
29
|
-
* Maps to log symbols:
|
|
30
|
-
*/
|
|
31
|
-
export type SymbolType = 'fail' | 'info' | 'success' | 'warn';
|
|
32
|
-
/**
|
|
33
|
-
* Convert a color value to RGB tuple format.
|
|
34
|
-
* Named colors are looked up in the `colorToRgb` map, RGB tuples are returned as-is.
|
|
35
|
-
* @param color - Color name or RGB tuple
|
|
36
|
-
* @returns RGB tuple with values 0-255
|
|
10
|
+
* Maps to log symbols: fail (✗), info (ℹ), reason (∴), success (✓), warn (⚠).
|
|
37
11
|
*/
|
|
38
|
-
export
|
|
12
|
+
export type SymbolType = 'fail' | 'info' | 'reason' | 'success' | 'warn';
|
|
39
13
|
/**
|
|
40
14
|
* Progress tracking information for display in spinner.
|
|
41
15
|
* Used by `progress()` and `progressStep()` methods to show animated progress bars.
|
|
@@ -63,7 +37,7 @@ export type ShimmerInfo = ShimmerState & {
|
|
|
63
37
|
* KEY BEHAVIORS:
|
|
64
38
|
* - Methods WITHOUT "AndStop" keep the spinner running (e.g., `success()`, `fail()`)
|
|
65
39
|
* - Methods WITH "AndStop" auto-clear the spinner line (e.g., `successAndStop()`, `failAndStop()`)
|
|
66
|
-
* - Status messages (done, success, fail, info, warn, step, substep) go to stderr
|
|
40
|
+
* - Status messages (done, success, fail, info, warn, reason, step, substep) go to stderr
|
|
67
41
|
* - Data messages (`log()`) go to stdout
|
|
68
42
|
*
|
|
69
43
|
* @example
|
|
@@ -95,6 +69,16 @@ export type Spinner = {
|
|
|
95
69
|
debug(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
96
70
|
/** Show debug message and stop the spinner (only if debug mode enabled) */
|
|
97
71
|
debugAndStop(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
72
|
+
/** Decrease indentation by specified spaces (default: 2) */
|
|
73
|
+
dedent(spaces?: number | undefined): Spinner;
|
|
74
|
+
/** Disable shimmer effect (preserves config for later re-enable) */
|
|
75
|
+
disableShimmer(): Spinner;
|
|
76
|
+
/** Alias for `success()` - show success without stopping */
|
|
77
|
+
done(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
78
|
+
/** Alias for `successAndStop()` - show success and stop */
|
|
79
|
+
doneAndStop(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
80
|
+
/** Enable shimmer effect (restores saved config or uses defaults) */
|
|
81
|
+
enableShimmer(): Spinner;
|
|
98
82
|
/** Alias for `fail()` - show error without stopping */
|
|
99
83
|
error(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
100
84
|
/** Alias for `failAndStop()` - show error and stop */
|
|
@@ -103,13 +87,8 @@ export type Spinner = {
|
|
|
103
87
|
fail(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
104
88
|
/** Show failure (✗) and stop the spinner, auto-clearing the line */
|
|
105
89
|
failAndStop(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
106
|
-
/** Get current spinner text (getter) or set new text (setter) */
|
|
107
|
-
text(value: string): Spinner;
|
|
108
|
-
text(): string;
|
|
109
90
|
/** Increase indentation by specified spaces (default: 2) */
|
|
110
91
|
indent(spaces?: number | undefined): Spinner;
|
|
111
|
-
/** Decrease indentation by specified spaces (default: 2) */
|
|
112
|
-
dedent(spaces?: number | undefined): Spinner;
|
|
113
92
|
/** Show info (ℹ) message without stopping the spinner */
|
|
114
93
|
info(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
115
94
|
/** Show info (ℹ) message and stop the spinner, auto-clearing the line */
|
|
@@ -118,34 +97,33 @@ export type Spinner = {
|
|
|
118
97
|
log(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
119
98
|
/** Log and stop the spinner, auto-clearing the line */
|
|
120
99
|
logAndStop(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
100
|
+
/** Update progress bar with current/total values and optional unit */
|
|
101
|
+
progress(current: number, total: number, unit?: string | undefined): Spinner;
|
|
102
|
+
/** Increment progress by specified amount (default: 1) */
|
|
103
|
+
progressStep(amount?: number): Spinner;
|
|
104
|
+
/** Show reasoning (∴) message without stopping the spinner */
|
|
105
|
+
reason(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
106
|
+
/** Show reasoning (∴) message and stop the spinner, auto-clearing the line */
|
|
107
|
+
reasonAndStop(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
108
|
+
/** Set complete shimmer configuration */
|
|
109
|
+
setShimmer(config: ShimmerConfig): Spinner;
|
|
121
110
|
/** Start spinning with optional text */
|
|
122
111
|
start(text?: string | undefined): Spinner;
|
|
112
|
+
/** Show main step message to stderr without stopping */
|
|
113
|
+
step(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
123
114
|
/** Stop spinning and clear internal state, auto-clearing the line */
|
|
124
115
|
stop(text?: string | undefined): Spinner;
|
|
125
116
|
/** Stop and show final text without clearing the line */
|
|
126
117
|
stopAndPersist(text?: string | undefined): Spinner;
|
|
127
|
-
/** Show main step message to stderr without stopping */
|
|
128
|
-
step(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
129
118
|
/** Show indented substep message to stderr without stopping */
|
|
130
119
|
substep(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
131
120
|
/** Show success (✓) without stopping the spinner */
|
|
132
121
|
success(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
133
122
|
/** Show success (✓) and stop the spinner, auto-clearing the line */
|
|
134
123
|
successAndStop(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
135
|
-
/**
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
doneAndStop(text?: string | undefined, ...extras: unknown[]): Spinner;
|
|
139
|
-
/** Update progress bar with current/total values and optional unit */
|
|
140
|
-
progress(current: number, total: number, unit?: string | undefined): Spinner;
|
|
141
|
-
/** Increment progress by specified amount (default: 1) */
|
|
142
|
-
progressStep(amount?: number): Spinner;
|
|
143
|
-
/** Enable shimmer effect (restores saved config or uses defaults) */
|
|
144
|
-
enableShimmer(): Spinner;
|
|
145
|
-
/** Disable shimmer effect (preserves config for later re-enable) */
|
|
146
|
-
disableShimmer(): Spinner;
|
|
147
|
-
/** Set complete shimmer configuration */
|
|
148
|
-
setShimmer(config: ShimmerConfig): Spinner;
|
|
124
|
+
/** Get current spinner text (getter) or set new text (setter) */
|
|
125
|
+
text(value: string): Spinner;
|
|
126
|
+
text(): string;
|
|
149
127
|
/** Update partial shimmer configuration */
|
|
150
128
|
updateShimmer(config: Partial<ShimmerConfig>): Spinner;
|
|
151
129
|
/** Show warning (⚠) without stopping the spinner */
|