@socketsecurity/lib 3.2.4 → 3.2.6
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 +21 -0
- package/README.md +31 -35
- package/dist/agent.js +10 -10
- package/dist/bin.js +4 -4
- package/dist/constants/node.js +1 -12
- package/dist/constants/packages.js +9 -24
- package/dist/constants/process.js +2 -6
- 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/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/fs.js +2 -2
- package/dist/git.js +1 -1
- package/dist/github.js +2 -2
- package/dist/globs.js +2 -2
- package/dist/lifecycle-script-names.d.ts +2 -0
- package/dist/lifecycle-script-names.js +40 -0
- package/dist/logger.js +2 -1
- package/dist/objects.js +1 -1
- package/dist/package-default-node-range.d.ts +2 -0
- package/dist/package-default-node-range.js +27 -0
- package/dist/package-default-socket-categories.d.ts +2 -0
- package/dist/package-default-socket-categories.js +25 -0
- package/dist/package-extensions.d.ts +2 -0
- package/dist/package-extensions.js +66 -0
- 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.js +1 -1
- package/dist/paths.js +14 -14
- package/dist/promises.js +2 -2
- package/dist/spawn.js +1 -1
- package/dist/spinner.js +2 -2
- package/dist/stdio/prompts.js +3 -2
- package/dist/temporary-executor.js +1 -1
- package/package.json +18 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.2.6](https://github.com/SocketDev/socket-lib/releases/tag/v3.2.6) - 2025-11-05
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **logger**: Replace yoctocolors-cjs rgb() with manual ANSI codes
|
|
15
|
+
- The yoctocolors-cjs package doesn't have an rgb() method
|
|
16
|
+
- Manually construct ANSI escape sequences for RGB colors (ESC[38;2;r;g;bm...ESC[39m)
|
|
17
|
+
- Affects `src/logger.ts` and `src/stdio/prompts.ts` applyColor() functions
|
|
18
|
+
|
|
19
|
+
## [3.2.5](https://github.com/SocketDev/socket-lib/releases/tag/v3.2.5) - 2025-11-05
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- **scripts**: Add path alias resolution script (`fix-path-aliases.mjs`)
|
|
24
|
+
- Resolves internal path aliases (`#lib/*`, `#constants/*`, etc.) to relative paths in built CommonJS files
|
|
25
|
+
|
|
26
|
+
- **build**: Integrate path alias resolution into build pipeline
|
|
27
|
+
- Add path alias plugin to esbuild config
|
|
28
|
+
- Integrate `fix-path-aliases.mjs` into build process
|
|
29
|
+
- Ensures path aliases work correctly in compiled CommonJS output
|
|
30
|
+
|
|
10
31
|
## [3.2.4](https://github.com/SocketDev/socket-lib/releases/tag/v3.2.4) - 2025-11-04
|
|
11
32
|
|
|
12
33
|
### Added
|
package/README.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://socket.dev/npm/package/@socketsecurity/lib)
|
|
4
4
|
[](https://github.com/SocketDev/socket-lib/actions/workflows/ci.yml)
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+
|
|
5
8
|
[](https://twitter.com/SocketSecurity)
|
|
6
9
|
|
|
7
10
|
**Core infrastructure library for Socket.dev security tools** — utilities, constants, and helpers with zero dependencies.
|
|
@@ -28,12 +31,12 @@ spinner.stop()
|
|
|
28
31
|
|
|
29
32
|
```
|
|
30
33
|
@socketsecurity/lib
|
|
31
|
-
├── Visual Effects →
|
|
34
|
+
├── Visual Effects → 5 themes, spinners, shimmer, logger
|
|
32
35
|
├── File System → fs, paths, globs, temp files
|
|
33
|
-
├── Package Management → npm, pnpm, yarn
|
|
36
|
+
├── Package Management → 11 utilities (npm, pnpm, yarn, dlx)
|
|
34
37
|
├── Process & Spawn → Safe process spawning, IPC
|
|
35
|
-
├── Environment → 68 typed env getters
|
|
36
|
-
├── Constants → Node.js, npm, platform
|
|
38
|
+
├── Environment → 22 modules with 68 typed env getters
|
|
39
|
+
├── Constants → 14 modules (Node.js, npm, platform)
|
|
37
40
|
├── Utilities → Arrays, objects, strings, promises
|
|
38
41
|
└── Types → Full TypeScript definitions
|
|
39
42
|
```
|
|
@@ -47,13 +50,12 @@ spinner.stop()
|
|
|
47
50
|
```typescript
|
|
48
51
|
import { Spinner, setTheme } from '@socketsecurity/lib'
|
|
49
52
|
|
|
50
|
-
setTheme('ultra') // 🌈 Rainbow
|
|
53
|
+
setTheme('ultra') // 🌈 Rainbow shimmer!
|
|
51
54
|
const spinner = Spinner({ text: 'Processing...' })
|
|
52
|
-
spinner.enableShimmer()
|
|
53
55
|
spinner.start()
|
|
54
56
|
```
|
|
55
57
|
|
|
56
|
-
**5 Built-in Themes:** `socket` (
|
|
58
|
+
**5 Built-in Themes:** `socket` (violet) · `sunset` (twilight) · `terracotta` (warm) · `lush` (steel blue) · `ultra` (rainbow)
|
|
57
59
|
|
|
58
60
|
👉 [**Theme System Docs**](./docs/themes.md)
|
|
59
61
|
|
|
@@ -168,15 +170,15 @@ const data = await retry(() => fetchData(), { maxAttempts: 3 })
|
|
|
168
170
|
├─ time → MILLISECONDS_PER_*, DLX_BINARY_CACHE_TTL
|
|
169
171
|
└─ encoding → UTF8, CHAR_* codes
|
|
170
172
|
|
|
171
|
-
/env/ → 68 typed
|
|
173
|
+
/env/ → 22 modules providing 68 typed getters
|
|
172
174
|
├─ ci → getCI() - Detect CI environment
|
|
173
175
|
├─ home → getHome() - User home directory
|
|
174
176
|
├─ node-env → getNodeEnv() - NODE_ENV value
|
|
175
|
-
└─ ... → And
|
|
177
|
+
└─ ... → And 19 more modules!
|
|
176
178
|
|
|
177
|
-
/packages/ → Package management utilities
|
|
179
|
+
/packages/ → Package management utilities (11 modules)
|
|
178
180
|
├─ validation → Package name/version validation
|
|
179
|
-
├─ operations → Install, extract, manifest
|
|
181
|
+
├─ operations → Install, extract, manifest, dlx
|
|
180
182
|
├─ registry → npm registry utilities
|
|
181
183
|
└─ editable → Editable installs detection
|
|
182
184
|
|
|
@@ -191,9 +193,9 @@ const data = await retry(() => fetchData(), { maxAttempts: 3 })
|
|
|
191
193
|
├─ clear → Clear terminal
|
|
192
194
|
└─ footer → Terminal footers
|
|
193
195
|
|
|
194
|
-
/themes/ → Theme system for consistent branding
|
|
196
|
+
/themes/ → Theme system for consistent branding (5 modules)
|
|
195
197
|
├─ types → Theme type definitions
|
|
196
|
-
├─ themes → 5
|
|
198
|
+
├─ themes → 5 themes (socket, sunset, terracotta, lush, ultra)
|
|
197
199
|
├─ context → Global theme management
|
|
198
200
|
└─ utils → Color resolution, theme creation
|
|
199
201
|
```
|
|
@@ -202,7 +204,7 @@ const data = await retry(() => fetchData(), { maxAttempts: 3 })
|
|
|
202
204
|
|
|
203
205
|
| Doc | Description |
|
|
204
206
|
|-----|-------------|
|
|
205
|
-
| [**Getting Started**](./docs/getting-started.md) |
|
|
207
|
+
| [**Getting Started**](./docs/getting-started.md) | Quick start for contributors (5 min setup) |
|
|
206
208
|
| [**Theme System**](./docs/themes.md) | Themed spinners, colors, and effects |
|
|
207
209
|
| [**Build Architecture**](./docs/build.md) | Vendored dependencies, build system |
|
|
208
210
|
| [**CLAUDE.md**](./CLAUDE.md) | Coding standards and patterns |
|
|
@@ -216,13 +218,13 @@ const data = await retry(() => fetchData(), { maxAttempts: 3 })
|
|
|
216
218
|
├─────────────────────────────────────────────────────┤
|
|
217
219
|
│ src/ │
|
|
218
220
|
│ ├── constants/ 14 modules │
|
|
219
|
-
│ ├── env/ 68 getters
|
|
220
|
-
│ ├── packages/
|
|
221
|
+
│ ├── env/ 22 modules (68 getters) │
|
|
222
|
+
│ ├── packages/ 11 utilities │
|
|
221
223
|
│ ├── effects/ 4 visual effects │
|
|
222
224
|
│ ├── stdio/ 9 I/O utilities │
|
|
223
|
-
│ ├── themes/
|
|
224
|
-
│ ├── external/
|
|
225
|
-
│ └── ...
|
|
225
|
+
│ ├── themes/ 5 theme definitions │
|
|
226
|
+
│ ├── external/ 16 vendored deps │
|
|
227
|
+
│ └── ... 62+ more modules │
|
|
226
228
|
├─────────────────────────────────────────────────────┤
|
|
227
229
|
│ Build: esbuild → CommonJS (ES2022) │
|
|
228
230
|
│ Types: tsgo (TypeScript Native Preview) │
|
|
@@ -232,37 +234,31 @@ const data = await retry(() => fetchData(), { maxAttempts: 3 })
|
|
|
232
234
|
|
|
233
235
|
## Development
|
|
234
236
|
|
|
235
|
-
|
|
236
|
-
# Setup
|
|
237
|
-
git clone https://github.com/SocketDev/socket-lib.git
|
|
238
|
-
cd socket-lib
|
|
239
|
-
pnpm install
|
|
237
|
+
**New to the project?** See the [**Getting Started Guide**](./docs/getting-started.md) for setup, workflow, and contribution guidelines.
|
|
240
238
|
|
|
241
|
-
|
|
242
|
-
|
|
239
|
+
**Quick commands:**
|
|
240
|
+
```bash
|
|
241
|
+
pnpm install # Install dependencies
|
|
243
242
|
pnpm run dev # Watch mode
|
|
244
|
-
|
|
245
|
-
# Test
|
|
246
|
-
pnpm test # Run all tests
|
|
247
|
-
pnpm run cover # With coverage
|
|
248
|
-
|
|
249
|
-
# Quality
|
|
250
|
-
pnpm run check # Type check
|
|
251
|
-
pnpm run lint # Lint code
|
|
243
|
+
pnpm test # Run tests
|
|
252
244
|
pnpm run fix # Auto-fix issues
|
|
253
245
|
```
|
|
254
246
|
|
|
255
247
|
## Stats
|
|
256
248
|
|
|
257
|
-
- **
|
|
249
|
+
- **143** TypeScript modules
|
|
258
250
|
- **120+** granular exports
|
|
259
251
|
- **68** typed environment getters
|
|
252
|
+
- **22** environment modules
|
|
260
253
|
- **14** constant modules
|
|
254
|
+
- **5** theme definitions
|
|
261
255
|
- **4600+** tests passing
|
|
262
256
|
- **Zero** runtime dependencies
|
|
263
257
|
|
|
264
258
|
## Contributing
|
|
265
259
|
|
|
260
|
+
**Ready to contribute?** Start with the [Getting Started Guide](./docs/getting-started.md) for a quick setup walkthrough.
|
|
261
|
+
|
|
266
262
|
See [CLAUDE.md](./CLAUDE.md) for:
|
|
267
263
|
- Code style and patterns
|
|
268
264
|
- Path alias usage
|
package/dist/agent.js
CHANGED
|
@@ -34,8 +34,8 @@ __export(agent_exports, {
|
|
|
34
34
|
isPnpmLoglevelFlag: () => isPnpmLoglevelFlag
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(agent_exports);
|
|
37
|
-
var import_ci = require("
|
|
38
|
-
var import_platform = require("
|
|
37
|
+
var import_ci = require("./env/ci");
|
|
38
|
+
var import_platform = require("./constants/platform");
|
|
39
39
|
var import_bin = require("./bin");
|
|
40
40
|
var import_debug = require("./debug");
|
|
41
41
|
var import_fs = require("./fs");
|
|
@@ -87,7 +87,7 @@ function execNpm(args, options) {
|
|
|
87
87
|
// one level quieter.
|
|
88
88
|
useDebug || npmArgs.some(isNpmLoglevelFlag) ? [] : ["--loglevel", "warn"]
|
|
89
89
|
);
|
|
90
|
-
const npmBin = require("
|
|
90
|
+
const npmBin = require("./constants/agents").NPM_BIN_PATH;
|
|
91
91
|
return (0, import_spawn.spawn)(
|
|
92
92
|
npmBin,
|
|
93
93
|
[
|
|
@@ -231,11 +231,11 @@ function execScript(scriptName, args, options) {
|
|
|
231
231
|
if (spawnOptions.shell === true) {
|
|
232
232
|
return (0, import_spawn.spawn)(scriptName, resolvedArgs, spawnOptions);
|
|
233
233
|
}
|
|
234
|
-
const useNodeRun = !prepost && /* @__PURE__ */ require("
|
|
234
|
+
const useNodeRun = !prepost && /* @__PURE__ */ require("./constants/node").supportsNodeRun();
|
|
235
235
|
const cwd = (0, import_objects.getOwn)(spawnOptions, "cwd") ?? process.cwd();
|
|
236
236
|
const pnpmLockPath = (0, import_fs.findUpSync)(
|
|
237
237
|
/*@__INLINE__*/
|
|
238
|
-
require("
|
|
238
|
+
require("./constants/agents").PNPM_LOCK_YAML,
|
|
239
239
|
{ cwd }
|
|
240
240
|
);
|
|
241
241
|
if (pnpmLockPath) {
|
|
@@ -243,7 +243,7 @@ function execScript(scriptName, args, options) {
|
|
|
243
243
|
}
|
|
244
244
|
const packageLockPath = (0, import_fs.findUpSync)(
|
|
245
245
|
/*@__INLINE__*/
|
|
246
|
-
require("
|
|
246
|
+
require("./constants/agents").PACKAGE_LOCK_JSON,
|
|
247
247
|
{ cwd }
|
|
248
248
|
);
|
|
249
249
|
if (packageLockPath) {
|
|
@@ -251,18 +251,18 @@ function execScript(scriptName, args, options) {
|
|
|
251
251
|
}
|
|
252
252
|
const yarnLockPath = (0, import_fs.findUpSync)(
|
|
253
253
|
/*@__INLINE__*/
|
|
254
|
-
require("
|
|
254
|
+
require("./constants/agents").YARN_LOCK,
|
|
255
255
|
{ cwd }
|
|
256
256
|
);
|
|
257
257
|
if (yarnLockPath) {
|
|
258
258
|
return /* @__PURE__ */ execYarn(["run", scriptName, ...resolvedArgs], spawnOptions);
|
|
259
259
|
}
|
|
260
260
|
return (0, import_spawn.spawn)(
|
|
261
|
-
/* @__PURE__ */ require("
|
|
261
|
+
/* @__PURE__ */ require("./constants/node").getExecPath(),
|
|
262
262
|
[
|
|
263
|
-
.../* @__PURE__ */ require("
|
|
263
|
+
.../* @__PURE__ */ require("./constants/node").getNodeNoWarningsFlags(),
|
|
264
264
|
...useNodeRun ? ["--run"] : [
|
|
265
|
-
require("
|
|
265
|
+
require("./constants/agents").NPM_REAL_EXEC_PATH,
|
|
266
266
|
"run"
|
|
267
267
|
],
|
|
268
268
|
scriptName,
|
package/dist/bin.js
CHANGED
|
@@ -32,10 +32,10 @@ __export(bin_exports, {
|
|
|
32
32
|
whichSync: () => whichSync
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(bin_exports);
|
|
35
|
-
var import_home = require("
|
|
36
|
-
var import_windows = require("
|
|
37
|
-
var import_xdg = require("
|
|
38
|
-
var import_platform = require("
|
|
35
|
+
var import_home = require("./env/home");
|
|
36
|
+
var import_windows = require("./env/windows");
|
|
37
|
+
var import_xdg = require("./env/xdg");
|
|
38
|
+
var import_platform = require("./constants/platform");
|
|
39
39
|
var import_fs = require("./fs");
|
|
40
40
|
var import_path = require("./path");
|
|
41
41
|
var import_spawn = require("./spawn");
|
package/dist/constants/node.js
CHANGED
|
@@ -49,18 +49,7 @@ function getNodeMajorVersion() {
|
|
|
49
49
|
let _maintainedNodeVersions;
|
|
50
50
|
function getMaintainedNodeVersions() {
|
|
51
51
|
if (_maintainedNodeVersions === void 0) {
|
|
52
|
-
|
|
53
|
-
_maintainedNodeVersions = require("../lib/maintained-node-versions");
|
|
54
|
-
} catch {
|
|
55
|
-
_maintainedNodeVersions = Object.freeze(
|
|
56
|
-
Object.assign([], {
|
|
57
|
-
current: "",
|
|
58
|
-
last: "",
|
|
59
|
-
next: "",
|
|
60
|
-
previous: ""
|
|
61
|
-
})
|
|
62
|
-
);
|
|
63
|
-
}
|
|
52
|
+
_maintainedNodeVersions = require("../maintained-node-versions").default;
|
|
64
53
|
}
|
|
65
54
|
return _maintainedNodeVersions;
|
|
66
55
|
}
|
|
@@ -32,7 +32,7 @@ __export(packages_exports, {
|
|
|
32
32
|
getPacoteCachePath: () => getPacoteCachePath
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(packages_exports);
|
|
35
|
-
var import_npm = require("
|
|
35
|
+
var import_npm = require("../env/npm");
|
|
36
36
|
let _lifecycleScriptNames;
|
|
37
37
|
let _packageDefaultNodeRange;
|
|
38
38
|
let _packageDefaultSocketCategories;
|
|
@@ -45,32 +45,20 @@ const LATEST = "latest";
|
|
|
45
45
|
const PACKAGE_DEFAULT_VERSION = "1.0.0";
|
|
46
46
|
function getPackageDefaultNodeRange() {
|
|
47
47
|
if (_packageDefaultNodeRange === void 0) {
|
|
48
|
-
|
|
49
|
-
_packageDefaultNodeRange = require("../lib/package-default-node-range");
|
|
50
|
-
} catch {
|
|
51
|
-
_packageDefaultNodeRange = ">=18";
|
|
52
|
-
}
|
|
48
|
+
_packageDefaultNodeRange = require("../package-default-node-range").default;
|
|
53
49
|
}
|
|
54
50
|
return _packageDefaultNodeRange;
|
|
55
51
|
}
|
|
56
52
|
function getPackageDefaultSocketCategories() {
|
|
57
53
|
if (_packageDefaultSocketCategories === void 0) {
|
|
58
|
-
|
|
59
|
-
_packageDefaultSocketCategories = require("../lib/package-default-socket-categories");
|
|
60
|
-
} catch {
|
|
61
|
-
_packageDefaultSocketCategories = [];
|
|
62
|
-
}
|
|
54
|
+
_packageDefaultSocketCategories = require("../package-default-socket-categories").default;
|
|
63
55
|
}
|
|
64
56
|
return _packageDefaultSocketCategories;
|
|
65
57
|
}
|
|
66
58
|
function getPackageExtensions() {
|
|
67
59
|
if (_packageExtensions === void 0) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
_packageExtensions = Object.entries(exts);
|
|
71
|
-
} catch {
|
|
72
|
-
_packageExtensions = [];
|
|
73
|
-
}
|
|
60
|
+
const exts = require("../package-extensions").default;
|
|
61
|
+
_packageExtensions = Object.entries(exts);
|
|
74
62
|
}
|
|
75
63
|
return _packageExtensions;
|
|
76
64
|
}
|
|
@@ -79,11 +67,8 @@ function getNpmLifecycleEvent() {
|
|
|
79
67
|
}
|
|
80
68
|
function getLifecycleScriptNames() {
|
|
81
69
|
if (_lifecycleScriptNames === void 0) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
} catch {
|
|
85
|
-
_lifecycleScriptNames = [];
|
|
86
|
-
}
|
|
70
|
+
const scriptNamesSet = require("../lifecycle-script-names").default;
|
|
71
|
+
_lifecycleScriptNames = Array.from(scriptNamesSet);
|
|
87
72
|
}
|
|
88
73
|
return _lifecycleScriptNames;
|
|
89
74
|
}
|
|
@@ -96,8 +81,8 @@ function getPackumentCache() {
|
|
|
96
81
|
function getPacoteCachePath() {
|
|
97
82
|
if (_pacoteCachePath === void 0) {
|
|
98
83
|
try {
|
|
99
|
-
const pacote = require(
|
|
100
|
-
const { normalizePath } = require("../
|
|
84
|
+
const pacote = require('../external/pacote');
|
|
85
|
+
const { normalizePath } = require("../path");
|
|
101
86
|
const proto = Reflect.getPrototypeOf(
|
|
102
87
|
pacote.RegistryFetcher.prototype
|
|
103
88
|
);
|
|
@@ -37,12 +37,8 @@ function getAbortSignal() {
|
|
|
37
37
|
let _spinner;
|
|
38
38
|
function getSpinner() {
|
|
39
39
|
if (_spinner === void 0) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
_spinner = SpinnerFn() ?? null;
|
|
43
|
-
} catch {
|
|
44
|
-
_spinner = null;
|
|
45
|
-
}
|
|
40
|
+
const { Spinner: SpinnerFn } = require("../spinner");
|
|
41
|
+
_spinner = SpinnerFn() ?? null;
|
|
46
42
|
}
|
|
47
43
|
return _spinner ?? null;
|
|
48
44
|
}
|
package/dist/debug.js
CHANGED
|
@@ -43,9 +43,9 @@ __export(debug_exports, {
|
|
|
43
43
|
isDebugNs: () => isDebugNs
|
|
44
44
|
});
|
|
45
45
|
module.exports = __toCommonJS(debug_exports);
|
|
46
|
-
var import_process = require("
|
|
47
|
-
var import_debug = require("
|
|
48
|
-
var import_socket = require("
|
|
46
|
+
var import_process = require("./constants/process");
|
|
47
|
+
var import_debug = require("./env/debug");
|
|
48
|
+
var import_socket = require("./env/socket");
|
|
49
49
|
var import_is_unicode_supported = __toESM(require("./external/@socketregistry/is-unicode-supported"));
|
|
50
50
|
var import_debug2 = __toESM(require("./external/debug"));
|
|
51
51
|
var import_logger = require("./logger");
|
package/dist/dlx-binary.js
CHANGED
|
@@ -40,7 +40,7 @@ module.exports = __toCommonJS(dlx_binary_exports);
|
|
|
40
40
|
var import_crypto = require("crypto");
|
|
41
41
|
var import_os = __toESM(require("os"));
|
|
42
42
|
var import_path = __toESM(require("path"));
|
|
43
|
-
var import_platform = require("
|
|
43
|
+
var import_platform = require("./constants/platform");
|
|
44
44
|
var import_dlx = require("./dlx");
|
|
45
45
|
var import_dlx_manifest = require("./dlx-manifest");
|
|
46
46
|
var import_http_request = require("./http-request");
|
|
@@ -167,7 +167,7 @@ async function writeMetadata(cacheEntryPath, cacheKey, url, binaryName, checksum
|
|
|
167
167
|
}
|
|
168
168
|
async function cleanDlxCache(maxAge = (
|
|
169
169
|
/*@__INLINE__*/
|
|
170
|
-
require("
|
|
170
|
+
require("./constants/time").DLX_BINARY_CACHE_TTL
|
|
171
171
|
)) {
|
|
172
172
|
const cacheDir = getDlxCachePath();
|
|
173
173
|
const fs = /* @__PURE__ */ getFs();
|
|
@@ -211,7 +211,7 @@ async function dlxBinary(args, options, spawnExtra) {
|
|
|
211
211
|
const {
|
|
212
212
|
cacheTtl = (
|
|
213
213
|
/*@__INLINE__*/
|
|
214
|
-
require("
|
|
214
|
+
require("./constants/time").DLX_BINARY_CACHE_TTL
|
|
215
215
|
),
|
|
216
216
|
checksum,
|
|
217
217
|
force: userForce = false,
|
|
@@ -300,7 +300,7 @@ async function downloadBinary(options) {
|
|
|
300
300
|
const {
|
|
301
301
|
cacheTtl = (
|
|
302
302
|
/*@__INLINE__*/
|
|
303
|
-
require("
|
|
303
|
+
require("./constants/time").DLX_BINARY_CACHE_TTL
|
|
304
304
|
),
|
|
305
305
|
checksum,
|
|
306
306
|
force = false,
|
|
@@ -30,7 +30,7 @@ __export(text_shimmer_exports, {
|
|
|
30
30
|
module.exports = __toCommonJS(text_shimmer_exports);
|
|
31
31
|
var import_ansi = require("../ansi");
|
|
32
32
|
var import_arrays = require("../arrays");
|
|
33
|
-
var import_ci = require("
|
|
33
|
+
var import_ci = require("../env/ci");
|
|
34
34
|
var import_utils = require("../themes/utils");
|
|
35
35
|
var import_themes = require("../themes/themes");
|
|
36
36
|
function detectStyles(text) {
|
package/dist/env/ci.js
CHANGED
|
@@ -22,8 +22,8 @@ __export(ci_exports, {
|
|
|
22
22
|
getCI: () => getCI
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(ci_exports);
|
|
25
|
-
var import_helpers = require("
|
|
26
|
-
var import_rewire = require("
|
|
25
|
+
var import_helpers = require("./helpers");
|
|
26
|
+
var import_rewire = require("./rewire");
|
|
27
27
|
function getCI() {
|
|
28
28
|
return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("CI"));
|
|
29
29
|
}
|
package/dist/env/debug.js
CHANGED
|
@@ -22,7 +22,7 @@ __export(debug_exports, {
|
|
|
22
22
|
getDebug: () => getDebug
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(debug_exports);
|
|
25
|
-
var import_rewire = require("
|
|
25
|
+
var import_rewire = require("./rewire");
|
|
26
26
|
function getDebug() {
|
|
27
27
|
return (0, import_rewire.getEnvValue)("DEBUG");
|
|
28
28
|
}
|
package/dist/env/github.js
CHANGED
|
@@ -29,7 +29,7 @@ __export(github_exports, {
|
|
|
29
29
|
getGithubToken: () => getGithubToken
|
|
30
30
|
});
|
|
31
31
|
module.exports = __toCommonJS(github_exports);
|
|
32
|
-
var import_rewire = require("
|
|
32
|
+
var import_rewire = require("./rewire");
|
|
33
33
|
function getGithubApiUrl() {
|
|
34
34
|
return (0, import_rewire.getEnvValue)("GITHUB_API_URL");
|
|
35
35
|
}
|
package/dist/env/home.js
CHANGED
|
@@ -22,7 +22,7 @@ __export(home_exports, {
|
|
|
22
22
|
getHome: () => getHome
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(home_exports);
|
|
25
|
-
var import_rewire = require("
|
|
25
|
+
var import_rewire = require("./rewire");
|
|
26
26
|
function getHome() {
|
|
27
27
|
return (0, import_rewire.getEnvValue)("HOME");
|
|
28
28
|
}
|
package/dist/env/locale.js
CHANGED
|
@@ -24,7 +24,7 @@ __export(locale_exports, {
|
|
|
24
24
|
getLcMessages: () => getLcMessages
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(locale_exports);
|
|
27
|
-
var import_rewire = require("
|
|
27
|
+
var import_rewire = require("./rewire");
|
|
28
28
|
function getLang() {
|
|
29
29
|
return (0, import_rewire.getEnvValue)("LANG");
|
|
30
30
|
}
|
|
@@ -22,7 +22,7 @@ __export(node_auth_token_exports, {
|
|
|
22
22
|
getNodeAuthToken: () => getNodeAuthToken
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(node_auth_token_exports);
|
|
25
|
-
var import_rewire = require("
|
|
25
|
+
var import_rewire = require("./rewire");
|
|
26
26
|
function getNodeAuthToken() {
|
|
27
27
|
return (0, import_rewire.getEnvValue)("NODE_AUTH_TOKEN");
|
|
28
28
|
}
|
package/dist/env/node-env.js
CHANGED
|
@@ -22,7 +22,7 @@ __export(node_env_exports, {
|
|
|
22
22
|
getNodeEnv: () => getNodeEnv
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(node_env_exports);
|
|
25
|
-
var import_rewire = require("
|
|
25
|
+
var import_rewire = require("./rewire");
|
|
26
26
|
function getNodeEnv() {
|
|
27
27
|
return (0, import_rewire.getEnvValue)("NODE_ENV");
|
|
28
28
|
}
|
package/dist/env/npm.js
CHANGED
|
@@ -26,7 +26,7 @@ __export(npm_exports, {
|
|
|
26
26
|
getNpmToken: () => getNpmToken
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(npm_exports);
|
|
29
|
-
var import_rewire = require("
|
|
29
|
+
var import_rewire = require("./rewire");
|
|
30
30
|
function getNpmConfigRegistry() {
|
|
31
31
|
return (0, import_rewire.getEnvValue)("npm_config_registry");
|
|
32
32
|
}
|
|
@@ -24,7 +24,7 @@ __export(package_manager_exports, {
|
|
|
24
24
|
getPackageManagerUserAgent: () => getPackageManagerUserAgent
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(package_manager_exports);
|
|
27
|
-
var import_rewire = require("
|
|
27
|
+
var import_rewire = require("./rewire");
|
|
28
28
|
function detectPackageManager() {
|
|
29
29
|
const userAgent = getPackageManagerUserAgent();
|
|
30
30
|
if (userAgent) {
|
package/dist/env/path.js
CHANGED
|
@@ -22,7 +22,7 @@ __export(path_exports, {
|
|
|
22
22
|
getPath: () => getPath
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(path_exports);
|
|
25
|
-
var import_rewire = require("
|
|
25
|
+
var import_rewire = require("./rewire");
|
|
26
26
|
function getPath() {
|
|
27
27
|
return (0, import_rewire.getEnvValue)("PATH");
|
|
28
28
|
}
|
package/dist/env/pre-commit.js
CHANGED
|
@@ -22,8 +22,8 @@ __export(pre_commit_exports, {
|
|
|
22
22
|
getPreCommit: () => getPreCommit
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(pre_commit_exports);
|
|
25
|
-
var import_helpers = require("
|
|
26
|
-
var import_rewire = require("
|
|
25
|
+
var import_helpers = require("./helpers");
|
|
26
|
+
var import_rewire = require("./rewire");
|
|
27
27
|
function getPreCommit() {
|
|
28
28
|
return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("PRE_COMMIT"));
|
|
29
29
|
}
|
package/dist/env/shell.js
CHANGED
|
@@ -22,7 +22,7 @@ __export(shell_exports, {
|
|
|
22
22
|
getShell: () => getShell
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(shell_exports);
|
|
25
|
-
var import_rewire = require("
|
|
25
|
+
var import_rewire = require("./rewire");
|
|
26
26
|
function getShell() {
|
|
27
27
|
return (0, import_rewire.getEnvValue)("SHELL");
|
|
28
28
|
}
|
|
@@ -26,8 +26,8 @@ __export(socket_cli_shadow_exports, {
|
|
|
26
26
|
getSocketCliShadowSilent: () => getSocketCliShadowSilent
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(socket_cli_shadow_exports);
|
|
29
|
-
var import_helpers = require("
|
|
30
|
-
var import_rewire = require("
|
|
29
|
+
var import_helpers = require("./helpers");
|
|
30
|
+
var import_rewire = require("./rewire");
|
|
31
31
|
function getSocketCliShadowAcceptRisks() {
|
|
32
32
|
return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_CLI_SHADOW_ACCEPT_RISKS"));
|
|
33
33
|
}
|
package/dist/env/socket-cli.js
CHANGED
|
@@ -35,8 +35,8 @@ __export(socket_cli_exports, {
|
|
|
35
35
|
getSocketCliViewAllRisks: () => getSocketCliViewAllRisks
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(socket_cli_exports);
|
|
38
|
-
var import_helpers = require("
|
|
39
|
-
var import_rewire = require("
|
|
38
|
+
var import_helpers = require("./helpers");
|
|
39
|
+
var import_rewire = require("./rewire");
|
|
40
40
|
function getSocketCliAcceptRisks() {
|
|
41
41
|
return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_CLI_ACCEPT_RISKS"));
|
|
42
42
|
}
|
package/dist/env/socket.js
CHANGED
|
@@ -36,8 +36,8 @@ __export(socket_exports, {
|
|
|
36
36
|
getSocketViewAllRisks: () => getSocketViewAllRisks
|
|
37
37
|
});
|
|
38
38
|
module.exports = __toCommonJS(socket_exports);
|
|
39
|
-
var import_helpers = require("
|
|
40
|
-
var import_rewire = require("
|
|
39
|
+
var import_helpers = require("./helpers");
|
|
40
|
+
var import_rewire = require("./rewire");
|
|
41
41
|
function getSocketAcceptRisks() {
|
|
42
42
|
return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_ACCEPT_RISKS"));
|
|
43
43
|
}
|
package/dist/env/temp-dir.js
CHANGED
|
@@ -24,7 +24,7 @@ __export(temp_dir_exports, {
|
|
|
24
24
|
getTmpdir: () => getTmpdir
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(temp_dir_exports);
|
|
27
|
-
var import_rewire = require("
|
|
27
|
+
var import_rewire = require("./rewire");
|
|
28
28
|
function getTmpdir() {
|
|
29
29
|
return (0, import_rewire.getEnvValue)("TMPDIR");
|
|
30
30
|
}
|
package/dist/env/term.js
CHANGED
|
@@ -22,7 +22,7 @@ __export(term_exports, {
|
|
|
22
22
|
getTerm: () => getTerm
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(term_exports);
|
|
25
|
-
var import_rewire = require("
|
|
25
|
+
var import_rewire = require("./rewire");
|
|
26
26
|
function getTerm() {
|
|
27
27
|
return (0, import_rewire.getEnvValue)("TERM");
|
|
28
28
|
}
|
package/dist/env/test.js
CHANGED
|
@@ -24,9 +24,9 @@ __export(test_exports, {
|
|
|
24
24
|
isTest: () => isTest
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(test_exports);
|
|
27
|
-
var import_helpers = require("
|
|
28
|
-
var import_node_env = require("
|
|
29
|
-
var import_rewire = require("
|
|
27
|
+
var import_helpers = require("./helpers");
|
|
28
|
+
var import_node_env = require("./node-env");
|
|
29
|
+
var import_rewire = require("./rewire");
|
|
30
30
|
function getJestWorkerId() {
|
|
31
31
|
return (0, import_helpers.envAsString)((0, import_rewire.getEnvValue)("JEST_WORKER_ID"));
|
|
32
32
|
}
|
package/dist/env/windows.js
CHANGED
|
@@ -25,7 +25,7 @@ __export(windows_exports, {
|
|
|
25
25
|
getUserprofile: () => getUserprofile
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(windows_exports);
|
|
28
|
-
var import_rewire = require("
|
|
28
|
+
var import_rewire = require("./rewire");
|
|
29
29
|
function getAppdata() {
|
|
30
30
|
return (0, import_rewire.getEnvValue)("APPDATA");
|
|
31
31
|
}
|
package/dist/env/xdg.js
CHANGED
|
@@ -24,7 +24,7 @@ __export(xdg_exports, {
|
|
|
24
24
|
getXdgDataHome: () => getXdgDataHome
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(xdg_exports);
|
|
27
|
-
var import_rewire = require("
|
|
27
|
+
var import_rewire = require("./rewire");
|
|
28
28
|
function getXdgCacheHome() {
|
|
29
29
|
return (0, import_rewire.getEnvValue)("XDG_CACHE_HOME");
|
|
30
30
|
}
|