@socketsecurity/lib 1.0.0 → 1.0.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 CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.1] - 2025-10-21
9
+
10
+ ### Fixed
11
+
12
+ - Fixed relative import paths in compiled CommonJS output (changed `require("../external/...")` to `require("./external/...")` for root-level dist files)
13
+
8
14
  ## [1.0.0] - 2025-10-20
9
15
 
10
16
  ### Changed
package/dist/agent.js CHANGED
@@ -85,7 +85,7 @@ function execNpm(args, options) {
85
85
  // one level quieter.
86
86
  useDebug || npmArgs.some(isNpmLoglevelFlag) ? [] : ["--loglevel", "warn"]
87
87
  );
88
- const npmBin = require("../constants/agents").NPM_BIN_PATH;
88
+ const npmBin = require("./constants/agents").NPM_BIN_PATH;
89
89
  return (0, import_spawn.spawn)(
90
90
  npmBin,
91
91
  [
@@ -227,11 +227,11 @@ function execScript(scriptName, args, options) {
227
227
  if (spawnOptions.shell === true) {
228
228
  return (0, import_spawn.spawn)(scriptName, resolvedArgs, spawnOptions);
229
229
  }
230
- const useNodeRun = !prepost && require("../constants/node").SUPPORTS_NODE_RUN;
230
+ const useNodeRun = !prepost && require("./constants/node").SUPPORTS_NODE_RUN;
231
231
  const cwd = (0, import_objects.getOwn)(spawnOptions, "cwd") ?? process.cwd();
232
232
  const pnpmLockPath = (0, import_fs.findUpSync)(
233
233
  /*@__INLINE__*/
234
- require("../constants/agents").PNPM_LOCK_YAML,
234
+ require("./constants/agents").PNPM_LOCK_YAML,
235
235
  { cwd }
236
236
  );
237
237
  if (pnpmLockPath) {
@@ -239,7 +239,7 @@ function execScript(scriptName, args, options) {
239
239
  }
240
240
  const packageLockPath = (0, import_fs.findUpSync)(
241
241
  /*@__INLINE__*/
242
- require("../constants/agents").PACKAGE_LOCK_JSON,
242
+ require("./constants/agents").PACKAGE_LOCK_JSON,
243
243
  { cwd }
244
244
  );
245
245
  if (packageLockPath) {
@@ -247,18 +247,18 @@ function execScript(scriptName, args, options) {
247
247
  }
248
248
  const yarnLockPath = (0, import_fs.findUpSync)(
249
249
  /*@__INLINE__*/
250
- require("../constants/agents").YARN_LOCK,
250
+ require("./constants/agents").YARN_LOCK,
251
251
  { cwd }
252
252
  );
253
253
  if (yarnLockPath) {
254
254
  return /* @__PURE__ */ execYarn(["run", scriptName, ...resolvedArgs], spawnOptions);
255
255
  }
256
256
  return (0, import_spawn.spawn)(
257
- /* @__PURE__ */ require("../constants/node").getExecPath(),
257
+ /* @__PURE__ */ require("./constants/node").getExecPath(),
258
258
  [
259
- .../* @__PURE__ */ require("../constants/node").getNodeNoWarningsFlags(),
259
+ .../* @__PURE__ */ require("./constants/node").getNodeNoWarningsFlags(),
260
260
  ...useNodeRun ? ["--run"] : [
261
- require("../constants/agents").NPM_REAL_EXEC_PATH,
261
+ require("./constants/agents").NPM_REAL_EXEC_PATH,
262
262
  "run"
263
263
  ],
264
264
  scriptName,
package/dist/bin.js CHANGED
@@ -57,7 +57,7 @@ let _which;
57
57
  // @__NO_SIDE_EFFECTS__
58
58
  function getWhich() {
59
59
  if (_which === void 0) {
60
- _which = require("../external/which");
60
+ _which = require("./external/which");
61
61
  }
62
62
  return _which;
63
63
  }
@@ -153,7 +153,7 @@ function findRealNpm() {
153
153
  return "npm";
154
154
  }
155
155
  function findRealPnpm() {
156
- const WIN32 = require("../constants/platform").WIN32;
156
+ const WIN32 = require("./constants/platform").WIN32;
157
157
  const path = /* @__PURE__ */ getPath();
158
158
  const commonPaths = WIN32 ? [
159
159
  // Windows common paths.
@@ -263,7 +263,7 @@ function resolveBinPathSync(binPath) {
263
263
  return voltaBinPath;
264
264
  }
265
265
  }
266
- const WIN32 = require("../constants/platform").WIN32;
266
+ const WIN32 = require("./constants/platform").WIN32;
267
267
  if (WIN32) {
268
268
  const hasKnownExt = extLowered === "" || extLowered === ".cmd" || extLowered === ".exe" || extLowered === ".ps1";
269
269
  const isNpmOrNpx = basename === "npm" || basename === "npx";
package/dist/cacache.js CHANGED
@@ -28,7 +28,7 @@ __export(cacache_exports, {
28
28
  module.exports = __toCommonJS(cacache_exports);
29
29
  var import_paths = require("./paths");
30
30
  function getCacache() {
31
- return require("../external/cacache");
31
+ return require("./external/cacache");
32
32
  }
33
33
  function patternToRegex(pattern) {
34
34
  const escaped = pattern.replaceAll(/[.+?^${}()|[\]\\]/g, "\\$&");
@@ -115,7 +115,7 @@ async function writeMetadata(cacheEntryPath, url, checksum) {
115
115
  }
116
116
  async function cleanDlxCache(maxAge = (
117
117
  /*@__INLINE__*/
118
- require("../constants/time").DLX_BINARY_CACHE_TTL
118
+ require("./constants/time").DLX_BINARY_CACHE_TTL
119
119
  )) {
120
120
  const cacheDir = getDlxCachePath();
121
121
  if (!(0, import_node_fs.existsSync)(cacheDir)) {
@@ -157,7 +157,7 @@ async function dlxBinary(args, options, spawnExtra) {
157
157
  const {
158
158
  cacheTtl = (
159
159
  /*@__INLINE__*/
160
- require("../constants/time").DLX_BINARY_CACHE_TTL
160
+ require("./constants/time").DLX_BINARY_CACHE_TTL
161
161
  ),
162
162
  checksum,
163
163
  force = false,
package/dist/fs.js CHANGED
@@ -379,7 +379,7 @@ function readJsonSync(filepath, options) {
379
379
  }
380
380
  // @__NO_SIDE_EFFECTS__
381
381
  async function safeDelete(filepath, options) {
382
- const del = require("../external/del");
382
+ const del = require("./external/del");
383
383
  const { deleteAsync } = del;
384
384
  const opts = { __proto__: null, ...options };
385
385
  const patterns = (0, import_arrays.isArray)(filepath) ? filepath.map(import_path.pathLikeToString) : [(0, import_path.pathLikeToString)(filepath)];
@@ -426,7 +426,7 @@ async function safeDelete(filepath, options) {
426
426
  }
427
427
  // @__NO_SIDE_EFFECTS__
428
428
  function safeDeleteSync(filepath, options) {
429
- const del = require("../external/del");
429
+ const del = require("./external/del");
430
430
  const { deleteSync } = del;
431
431
  const opts = { __proto__: null, ...options };
432
432
  const patterns = (0, import_arrays.isArray)(filepath) ? filepath.map(import_path.pathLikeToString) : [(0, import_path.pathLikeToString)(filepath)];
package/dist/globs.js CHANGED
@@ -68,7 +68,7 @@ let _picomatch;
68
68
  // @__NO_SIDE_EFFECTS__
69
69
  function getPicomatch() {
70
70
  if (_picomatch === void 0) {
71
- _picomatch = require("../external/picomatch");
71
+ _picomatch = require("./external/picomatch");
72
72
  }
73
73
  return _picomatch;
74
74
  }
@@ -76,7 +76,7 @@ let _fastGlob;
76
76
  // @__NO_SIDE_EFFECTS__
77
77
  function getFastGlob() {
78
78
  if (_fastGlob === void 0) {
79
- const globExport = require("../external/fast-glob");
79
+ const globExport = require("./external/fast-glob");
80
80
  _fastGlob = globExport.default || globExport;
81
81
  }
82
82
  return _fastGlob;
@@ -96,7 +96,7 @@ function globStreamLicenses(dirname, options) {
96
96
  if (ignoreOriginals) {
97
97
  ignore.push(
98
98
  /*@__INLINE__*/
99
- require("../constants/paths").LICENSE_ORIGINAL_GLOB_RECURSIVE
99
+ require("./constants/paths").LICENSE_ORIGINAL_GLOB_RECURSIVE
100
100
  );
101
101
  }
102
102
  const fastGlob = /* @__PURE__ */ getFastGlob();
@@ -104,10 +104,10 @@ function globStreamLicenses(dirname, options) {
104
104
  [
105
105
  recursive ? (
106
106
  /*@__INLINE__*/
107
- require("../constants/paths").LICENSE_GLOB_RECURSIVE
107
+ require("./constants/paths").LICENSE_GLOB_RECURSIVE
108
108
  ) : (
109
109
  /*@__INLINE__*/
110
- require("../constants/paths").LICENSE_GLOB
110
+ require("./constants/paths").LICENSE_GLOB
111
111
  )
112
112
  ],
113
113
  {
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ var import_registry = require("./packages/registry");
29
29
  __reExport(index_exports, require("./types"), module.exports);
30
30
  function getManifestData(ecosystem, packageName) {
31
31
  try {
32
- const manifestData = require("../manifest.json");
32
+ const manifestData = require("./manifest.json");
33
33
  if (!ecosystem) {
34
34
  return manifestData;
35
35
  }
package/dist/logger.js CHANGED
@@ -258,7 +258,7 @@ class Logger {
258
258
  * @private
259
259
  */
260
260
  #stripSymbols(text) {
261
- return text.replace(/^[✖×⚠‼✔√ℹ]\uFE0F?\s*/u, "");
261
+ return text.replace(/^[✖✗×⚠‼✔✓√ℹ]\uFE0F?\s*/u, "");
262
262
  }
263
263
  /**
264
264
  * Apply a method with a symbol prefix.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/logger.ts"],
4
- "sourcesContent": ["/**\n * @fileoverview Console logging utilities with line prefix support.\n * Provides enhanced console methods with formatted output capabilities.\n */\n\nimport isUnicodeSupported from './external/@socketregistry/is-unicode-supported'\nimport yoctocolorsCjs from './external/yoctocolors-cjs'\nimport { objectAssign, objectFreeze } from './objects'\nimport { applyLinePrefix, isBlankString } from './strings'\n\n// Type definitions\ntype LogSymbols = {\n fail: string\n info: string\n success: string\n warn: string\n}\n\ntype LoggerMethods = {\n [K in keyof typeof console]: (typeof console)[K] extends (\n ...args: infer A\n // biome-ignore lint/suspicious/noExplicitAny: Console method return types are dynamic.\n ) => any\n ? (...args: A) => Logger\n : (typeof console)[K]\n}\n\ninterface Task {\n run<T>(f: () => T): T\n}\n\nexport type { LogSymbols, LoggerMethods, Task }\n\nconst globalConsole = console\n// IMPORTANT: Do not use destructuring here - use direct assignment instead.\n// tsgo has a bug that incorrectly transpiles destructured exports, resulting in\n// `exports.SomeName = void 0;` which causes runtime errors.\n// See: https://github.com/SocketDev/socket-packageurl-js/issues/3\nconst ReflectApply = Reflect.apply\nconst ReflectConstruct = Reflect.construct\n\nlet _Console: typeof import('console').Console | undefined\n/**\n * Construct a new Console instance.\n * @private\n */\n/*@__NO_SIDE_EFFECTS__*/\nfunction constructConsole(...args: unknown[]) {\n if (_Console === undefined) {\n // Use non-'node:' prefixed require to avoid Webpack errors.\n\n const nodeConsole = /*@__PURE__*/ require('node:console')\n _Console = nodeConsole.Console\n }\n return ReflectConstruct(\n // biome-ignore lint/style/noNonNullAssertion: Initialized above.\n _Console! as new (\n ...args: unknown[]\n ) => Console, // eslint-disable-line no-undef\n args,\n )\n}\n\n/**\n * Get the yoctocolors module for terminal colors.\n * @private\n */\n/*@__NO_SIDE_EFFECTS__*/\nfunction getYoctocolors() {\n return yoctocolorsCjs\n}\n\nexport const LOG_SYMBOLS = /*@__PURE__*/ (() => {\n const target: Record<string, string> = {\n __proto__: null,\n } as unknown as Record<string, string>\n // Mutable handler to simulate a frozen target.\n const handler: ProxyHandler<Record<string, string>> = {\n __proto__: null,\n } as unknown as ProxyHandler<Record<string, string>>\n const init = () => {\n const supported = isUnicodeSupported()\n const colors = getYoctocolors()\n objectAssign(target, {\n fail: colors.red(supported ? '\u2716' : '\u00D7'),\n info: colors.blue(supported ? '\u2139' : 'i'),\n success: colors.green(supported ? '\u2714' : '\u221A'),\n warn: colors.yellow(supported ? '\u26A0' : '\u203C'),\n })\n objectFreeze(target)\n // The handler of a Proxy is mutable after proxy instantiation.\n // We delete the traps to defer to native behavior.\n for (const trapName in handler) {\n delete handler[trapName as keyof ProxyHandler<Record<string, string>>]\n }\n }\n for (const trapName of Reflect.ownKeys(Reflect)) {\n const fn = (Reflect as Record<PropertyKey, unknown>)[trapName]\n if (typeof fn === 'function') {\n ;(handler as Record<string, (...args: unknown[]) => unknown>)[\n trapName as string\n ] = (...args: unknown[]) => {\n init()\n return fn(...args)\n }\n }\n }\n return new Proxy(target, handler)\n})()\n\nconst boundConsoleEntries = [\n // Add bound properties from console[kBindProperties](ignoreErrors, colorMode, groupIndentation).\n // https://github.com/nodejs/node/blob/v24.0.1/lib/internal/console/constructor.js#L230-L265\n '_stderrErrorHandler',\n '_stdoutErrorHandler',\n // Add methods that need to be bound to function properly.\n 'assert',\n 'clear',\n 'count',\n 'countReset',\n 'createTask',\n 'debug',\n 'dir',\n 'dirxml',\n 'error',\n // Skip group methods because in at least Node 20 with the Node --frozen-intrinsics\n // flag it triggers a readonly property for Symbol(kGroupIndent). Instead, we\n // implement these methods ourselves.\n //'group',\n //'groupCollapsed',\n //'groupEnd',\n 'info',\n 'log',\n 'table',\n 'time',\n 'timeEnd',\n 'timeLog',\n 'trace',\n 'warn',\n]\n // biome-ignore lint/suspicious/noExplicitAny: Dynamic console method access.\n .filter(n => typeof (globalConsole as any)[n] === 'function')\n // biome-ignore lint/suspicious/noExplicitAny: Dynamic console method access.\n .map(n => [n, (globalConsole as any)[n].bind(globalConsole)])\n\nconst consolePropAttributes = {\n __proto__: null,\n writable: true,\n enumerable: false,\n configurable: true,\n}\nconst maxIndentation = 1000\nconst privateConsole = new WeakMap()\n\nconst consoleSymbols = Object.getOwnPropertySymbols(globalConsole)\nexport const incLogCallCountSymbol = Symbol.for('logger.logCallCount++')\nconst kGroupIndentationWidthSymbol =\n // biome-ignore lint/suspicious/noExplicitAny: Symbol property access.\n consoleSymbols.find(s => (s as any).label === 'kGroupIndentWidth') ??\n Symbol('kGroupIndentWidth')\nexport const lastWasBlankSymbol = Symbol.for('logger.lastWasBlank')\n\n/**\n * Custom Logger class that wraps console with additional features.\n * Supports indentation, symbols, and blank line tracking.\n */\n/*@__PURE__*/\nexport class Logger {\n static LOG_SYMBOLS = LOG_SYMBOLS\n\n #parent?: Logger\n #boundStream?: 'stderr' | 'stdout'\n #stderrLogger?: Logger\n #stdoutLogger?: Logger\n #stderrIndention = ''\n #stdoutIndention = ''\n #lastWasBlank = false\n #logCallCount = 0\n #constructorArgs: unknown[]\n #options: Record<string, unknown>\n\n constructor(...args: unknown[]) {\n // Store constructor args for child loggers\n this.#constructorArgs = args\n\n // Store options if provided (for future extensibility)\n const options = args['0']\n if (typeof options === 'object' && options !== null) {\n this.#options = { __proto__: null, ...options }\n } else {\n this.#options = { __proto__: null }\n }\n\n if (args.length) {\n privateConsole.set(this, constructConsole(...args))\n } else {\n // Create a new console that acts like the builtin one so that it will\n // work with Node's --frozen-intrinsics flag.\n const con = constructConsole({\n stdout: process.stdout,\n stderr: process.stderr,\n }) as typeof console & Record<string, unknown>\n for (const { 0: key, 1: method } of boundConsoleEntries) {\n con[key] = method\n }\n privateConsole.set(this, con)\n }\n }\n\n /**\n * Get a logger instance bound to stderr.\n * All operations on this instance will use stderr.\n */\n get stderr(): Logger {\n if (!this.#stderrLogger) {\n // Pass parent's constructor args to maintain config\n const instance = new Logger(...this.#constructorArgs)\n instance.#parent = this\n instance.#boundStream = 'stderr'\n instance.#options = { __proto__: null, ...this.#options }\n this.#stderrLogger = instance\n }\n return this.#stderrLogger\n }\n\n /**\n * Get a logger instance bound to stdout.\n * All operations on this instance will use stdout.\n */\n get stdout(): Logger {\n if (!this.#stdoutLogger) {\n // Pass parent's constructor args to maintain config\n const instance = new Logger(...this.#constructorArgs)\n instance.#parent = this\n instance.#boundStream = 'stdout'\n instance.#options = { __proto__: null, ...this.#options }\n this.#stdoutLogger = instance\n }\n return this.#stdoutLogger\n }\n\n /**\n * Get the root logger (for accessing shared indentation state).\n * @private\n */\n #getRoot(): Logger {\n return this.#parent || this\n }\n\n /**\n * Get indentation for a specific stream.\n * @private\n */\n #getIndent(stream: 'stderr' | 'stdout'): string {\n const root = this.#getRoot()\n return stream === 'stderr' ? root.#stderrIndention : root.#stdoutIndention\n }\n\n /**\n * Set indentation for a specific stream.\n * @private\n */\n #setIndent(stream: 'stderr' | 'stdout', value: string): void {\n const root = this.#getRoot()\n if (stream === 'stderr') {\n root.#stderrIndention = value\n } else {\n root.#stdoutIndention = value\n }\n }\n\n /**\n * Get the target stream for this logger instance.\n * @private\n */\n #getTargetStream(): 'stderr' | 'stdout' {\n return this.#boundStream || 'stderr'\n }\n\n /**\n * Apply a console method with indentation.\n * @private\n */\n #apply(\n methodName: string,\n args: unknown[],\n stream?: 'stderr' | 'stdout',\n ): this {\n const con = privateConsole.get(this) as typeof console &\n Record<string, unknown>\n const text = args.at(0)\n const hasText = typeof text === 'string'\n // Determine which stream this method writes to\n const targetStream = stream || (methodName === 'log' ? 'stdout' : 'stderr')\n const indent = this.#getIndent(targetStream)\n const logArgs = hasText\n ? [applyLinePrefix(text, { prefix: indent }), ...args.slice(1)]\n : args\n ReflectApply(\n con[methodName] as (...args: unknown[]) => unknown,\n con,\n logArgs,\n )\n this[lastWasBlankSymbol](hasText && isBlankString(logArgs[0]))\n // biome-ignore lint/suspicious/noExplicitAny: Symbol method access.\n ;(this as any)[incLogCallCountSymbol]()\n return this\n }\n\n /**\n * Strip log symbols from the start of text.\n * @private\n */\n #stripSymbols(text: string): string {\n // Strip both unicode and emoji forms of log symbols from the start.\n // Matches: \u2716, \u00D7, \u2716\uFE0F, \u26A0, \u203C, \u26A0\uFE0F, \u2714, \u221A, \u2714\uFE0F, \u2139, \u2139\uFE0F\n // Also handles variation selectors (U+FE0F) and whitespace after symbol.\n // Note: We don't strip standalone 'i' to avoid breaking words like 'info'.\n return text.replace(/^[\u2716\u00D7\u26A0\u203C\u2714\u221A\u2139]\\uFE0F?\\s*/u, '')\n }\n\n /**\n * Apply a method with a symbol prefix.\n * @private\n */\n #symbolApply(symbolType: string, args: unknown[]): this {\n const con = privateConsole.get(this)\n let text = args.at(0)\n // biome-ignore lint/suspicious/noImplicitAnyLet: Flexible argument handling.\n let extras\n if (typeof text === 'string') {\n text = this.#stripSymbols(text)\n extras = args.slice(1)\n } else {\n extras = args\n text = ''\n }\n // Note: Meta status messages (info/fail/etc) always go to stderr.\n const indent = this.#getIndent('stderr')\n con.error(\n applyLinePrefix(`${LOG_SYMBOLS[symbolType]} ${text}`, {\n prefix: indent,\n }),\n ...extras,\n )\n this.#lastWasBlank = false\n // biome-ignore lint/suspicious/noExplicitAny: Symbol method access.\n ;(this as any)[incLogCallCountSymbol]()\n return this\n }\n\n /**\n * Get the current log call count.\n */\n get logCallCount() {\n return this.#logCallCount\n }\n\n /**\n * Increment the log call count.\n */\n [incLogCallCountSymbol]() {\n this.#logCallCount += 1\n return this\n }\n\n /**\n * Set whether the last logged line was blank.\n */\n [lastWasBlankSymbol](value: unknown): this {\n this.#lastWasBlank = !!value\n return this\n }\n\n /**\n * Log an assertion.\n */\n assert(value: unknown, ...message: unknown[]): this {\n const con = privateConsole.get(this)\n con.assert(value, ...message)\n this[lastWasBlankSymbol](false)\n return value ? this : this[incLogCallCountSymbol]()\n }\n\n /**\n * Clear the visible terminal screen.\n * Only available on the main logger instance.\n */\n clearVisible() {\n if (this.#boundStream) {\n throw new Error(\n 'clearVisible() is only available on the main logger instance, not on stream-bound instances',\n )\n }\n const con = privateConsole.get(this)\n con.clear()\n // biome-ignore lint/suspicious/noExplicitAny: Internal console property access.\n if ((con as any)._stdout.isTTY) {\n // biome-ignore lint/suspicious/noExplicitAny: Symbol method access.\n ;(this as any)[lastWasBlankSymbol](true)\n this.#logCallCount = 0\n }\n return this\n }\n\n /**\n * Log a count for the given label.\n */\n count(label?: string): this {\n const con = privateConsole.get(this)\n con.count(label)\n this[lastWasBlankSymbol](false)\n return this[incLogCallCountSymbol]()\n }\n\n /**\n * Create a task with a given name.\n */\n createTask(name: string): Task {\n return {\n run: <T>(f: () => T): T => {\n this.log(`Starting task: ${name}`)\n const result = f()\n this.log(`Completed task: ${name}`)\n return result\n },\n }\n }\n\n /**\n * Decrease indentation level.\n * If called on main logger, affects both streams.\n * If called on stream-bound logger, affects only that stream.\n */\n dedent(spaces = 2) {\n if (this.#boundStream) {\n // Only affect bound stream\n const current = this.#getIndent(this.#boundStream)\n this.#setIndent(this.#boundStream, current.slice(0, -spaces))\n } else {\n // Affect both streams\n const stderrCurrent = this.#getIndent('stderr')\n const stdoutCurrent = this.#getIndent('stdout')\n this.#setIndent('stderr', stderrCurrent.slice(0, -spaces))\n this.#setIndent('stdout', stdoutCurrent.slice(0, -spaces))\n }\n return this\n }\n\n /**\n * Display an object's properties.\n */\n dir(obj: unknown, options?: unknown): this {\n const con = privateConsole.get(this)\n con.dir(obj, options)\n this[lastWasBlankSymbol](false)\n return this[incLogCallCountSymbol]()\n }\n\n /**\n * Display data as XML.\n */\n dirxml(...data: unknown[]): this {\n const con = privateConsole.get(this)\n con.dirxml(data)\n this[lastWasBlankSymbol](false)\n return this[incLogCallCountSymbol]()\n }\n\n /**\n * Log an error message.\n */\n error(...args: unknown[]): this {\n return this.#apply('error', args)\n }\n\n /**\n * Log a newline to stderr if last line wasn't blank.\n */\n errorNewline() {\n return this.#lastWasBlank ? this : this.error('')\n }\n\n /**\n * Log a failure message with symbol.\n */\n fail(...args: unknown[]): this {\n return this.#symbolApply('fail', args)\n }\n\n /**\n * Start a new log group.\n */\n group(...label: unknown[]): this {\n const { length } = label\n if (length) {\n ReflectApply(this.log, this, label)\n }\n // biome-ignore lint/suspicious/noExplicitAny: Symbol property access.\n this.indent((this as any)[kGroupIndentationWidthSymbol])\n if (length) {\n // biome-ignore lint/suspicious/noExplicitAny: Symbol method access.\n ;(this as any)[lastWasBlankSymbol](false)\n // biome-ignore lint/suspicious/noExplicitAny: Symbol method access.\n ;(this as any)[incLogCallCountSymbol]()\n }\n return this\n }\n\n /**\n * Start a new collapsed log group (alias for group).\n */\n // groupCollapsed is an alias of group.\n // https://nodejs.org/api/console.html#consolegroupcollapsed\n groupCollapsed(...label: unknown[]): this {\n return ReflectApply(this.group, this, label)\n }\n\n /**\n * End the current log group.\n */\n groupEnd() {\n // biome-ignore lint/suspicious/noExplicitAny: Symbol property access.\n this.dedent((this as any)[kGroupIndentationWidthSymbol])\n return this\n }\n\n /**\n * Increase indentation level.\n * If called on main logger, affects both streams.\n * If called on stream-bound logger, affects only that stream.\n */\n indent(spaces = 2) {\n const spacesToAdd = ' '.repeat(Math.min(spaces, maxIndentation))\n if (this.#boundStream) {\n // Only affect bound stream\n const current = this.#getIndent(this.#boundStream)\n this.#setIndent(this.#boundStream, current + spacesToAdd)\n } else {\n // Affect both streams\n const stderrCurrent = this.#getIndent('stderr')\n const stdoutCurrent = this.#getIndent('stdout')\n this.#setIndent('stderr', stderrCurrent + spacesToAdd)\n this.#setIndent('stdout', stdoutCurrent + spacesToAdd)\n }\n return this\n }\n\n /**\n * Log an info message with symbol.\n */\n info(...args: unknown[]): this {\n return this.#symbolApply('info', args)\n }\n\n /**\n * Log a message.\n */\n log(...args: unknown[]): this {\n return this.#apply('log', args)\n }\n\n /**\n * Log a newline to stdout if last line wasn't blank.\n */\n logNewline() {\n return this.#lastWasBlank ? this : this.log('')\n }\n\n /**\n * Reset indentation to zero.\n * If called on main logger, resets both streams.\n * If called on stream-bound logger, resets only that stream.\n */\n resetIndent() {\n if (this.#boundStream) {\n // Only reset bound stream\n this.#setIndent(this.#boundStream, '')\n } else {\n // Reset both streams\n this.#setIndent('stderr', '')\n this.#setIndent('stdout', '')\n }\n return this\n }\n\n /**\n * Log a main step with blank line before (stateless).\n */\n step(msg: string, ...extras: unknown[]): this {\n // Add blank line before the step message.\n if (!this.#lastWasBlank) {\n // Use this.log() to properly track the blank line.\n this.log('')\n }\n // Let log() handle all tracking.\n return this.log(msg, ...extras)\n }\n\n /**\n * Log an indented substep (stateless).\n */\n substep(msg: string, ...extras: unknown[]): this {\n // Add 2-space indent to the message.\n const indentedMsg = ` ${msg}`\n // Let log() handle all tracking.\n return this.log(indentedMsg, ...extras)\n }\n\n /**\n * Log a success message with symbol.\n */\n success(...args: unknown[]): this {\n return this.#symbolApply('success', args)\n }\n\n /**\n * Log a done message (alias for success).\n * Does NOT auto-clear. Call clearLine() first if needed after progress().\n */\n done(...args: unknown[]): this {\n return this.#symbolApply('success', args)\n }\n\n /**\n * Display data in a table format.\n */\n table(tabularData: unknown, properties?: readonly string[]): this {\n const con = privateConsole.get(this)\n con.table(tabularData, properties)\n this[lastWasBlankSymbol](false)\n return this[incLogCallCountSymbol]()\n }\n\n /**\n * End a timer and log the elapsed time.\n */\n timeEnd(label?: string): this {\n const con = privateConsole.get(this)\n con.timeEnd(label)\n this[lastWasBlankSymbol](false)\n return this[incLogCallCountSymbol]()\n }\n\n /**\n * Log the current timer value.\n */\n timeLog(label?: string, ...data: unknown[]): this {\n const con = privateConsole.get(this)\n con.timeLog(label, ...data)\n this[lastWasBlankSymbol](false)\n return this[incLogCallCountSymbol]()\n }\n\n /**\n * Log a stack trace.\n */\n trace(message?: unknown, ...args: unknown[]): this {\n const con = privateConsole.get(this)\n con.trace(message, ...args)\n this[lastWasBlankSymbol](false)\n return this[incLogCallCountSymbol]()\n }\n\n /**\n * Log a warning message with symbol.\n */\n warn(...args: unknown[]): this {\n return this.#symbolApply('warn', args)\n }\n\n /**\n * Write to stdout without a newline or indentation.\n */\n write(text: string): this {\n const con = privateConsole.get(this)\n con._stdout.write(text)\n this[lastWasBlankSymbol](false)\n return this\n }\n\n /**\n * Show a progress indicator (can be cleared with clearLine).\n * Simple status message without spinner animation.\n */\n progress(text: string): this {\n const con = privateConsole.get(this)\n const stream = this.#getTargetStream()\n const streamObj = stream === 'stderr' ? con._stderr : con._stdout\n streamObj.write(`\u2234 ${text}`)\n this[lastWasBlankSymbol](false)\n return this\n }\n\n /**\n * Clear the current line.\n */\n clearLine(): this {\n const con = privateConsole.get(this)\n const stream = this.#getTargetStream()\n const streamObj = stream === 'stderr' ? con._stderr : con._stdout\n if (streamObj.isTTY) {\n streamObj.cursorTo(0)\n streamObj.clearLine(0)\n } else {\n streamObj.write('\\r\\x1b[K')\n }\n return this\n }\n}\n\nObject.defineProperties(\n Logger.prototype,\n Object.fromEntries(\n (() => {\n const entries: Array<[string | symbol, PropertyDescriptor]> = [\n [\n kGroupIndentationWidthSymbol,\n {\n ...consolePropAttributes,\n value: 2,\n },\n ],\n [\n Symbol.toStringTag,\n {\n __proto__: null,\n configurable: true,\n value: 'logger',\n } as PropertyDescriptor,\n ],\n ]\n for (const { 0: key, 1: value } of Object.entries(globalConsole)) {\n // biome-ignore lint/suspicious/noExplicitAny: Dynamic prototype check.\n if (!(Logger.prototype as any)[key] && typeof value === 'function') {\n // Dynamically name the log method without using Object.defineProperty.\n const { [key]: func } = {\n [key](...args: unknown[]) {\n const con = privateConsole.get(this)\n // biome-ignore lint/suspicious/noExplicitAny: Dynamic console method access.\n const result = (con as any)[key](...args)\n return result === undefined || result === con ? this : result\n },\n }\n entries.push([\n key,\n {\n ...consolePropAttributes,\n value: func,\n },\n ])\n }\n }\n return entries\n })(),\n ),\n)\n\nexport const logger = new Logger()\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,kCAA+B;AAC/B,6BAA2B;AAC3B,qBAA2C;AAC3C,qBAA+C;AAyB/C,MAAM,gBAAgB;AAKtB,MAAM,eAAe,QAAQ;AAC7B,MAAM,mBAAmB,QAAQ;AAEjC,IAAI;AAAA;AAMJ,SAAS,oBAAoB,MAAiB;AAC5C,MAAI,aAAa,QAAW;AAG1B,UAAM,cAA4B,QAAQ,cAAc;AACxD,eAAW,YAAY;AAAA,EACzB;AACA,SAAO;AAAA;AAAA,IAEL;AAAA;AAAA,IAGA;AAAA,EACF;AACF;AAAA;AAOA,SAAS,iBAAiB;AACxB,SAAO,uBAAAA;AACT;AAEO,MAAM,cAA6B,uBAAM;AAC9C,QAAM,SAAiC;AAAA,IACrC,WAAW;AAAA,EACb;AAEA,QAAM,UAAgD;AAAA,IACpD,WAAW;AAAA,EACb;AACA,QAAM,OAAO,MAAM;AACjB,UAAM,gBAAY,4BAAAC,SAAmB;AACrC,UAAM,SAAS,+BAAe;AAC9B,qCAAa,QAAQ;AAAA,MACnB,MAAM,OAAO,IAAI,YAAY,WAAM,MAAG;AAAA,MACtC,MAAM,OAAO,KAAK,YAAY,WAAM,GAAG;AAAA,MACvC,SAAS,OAAO,MAAM,YAAY,WAAM,QAAG;AAAA,MAC3C,MAAM,OAAO,OAAO,YAAY,WAAM,QAAG;AAAA,IAC3C,CAAC;AACD,qCAAa,MAAM;AAGnB,eAAW,YAAY,SAAS;AAC9B,aAAO,QAAQ,QAAsD;AAAA,IACvE;AAAA,EACF;AACA,aAAW,YAAY,QAAQ,QAAQ,OAAO,G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AU,CAAC;AAAA,IACvB,OAAO;AACL,gBAAU,MAAM,UAAU;AAAA,IAC5B;AACA,WAAO;AAAA,EACT;AACF;AAEA,OAAO;AAAA,EACL,OAAO;AAAA,EACP,OAAO;AAAA,KACJ,MAAM;AACL,YAAM,UAAwD;AAAA,QAC5D;AAAA,UACE;AAAA,UACA;AAAA,YACE,GAAG;AAAA,YACH,OAAO;AAAA,UACT;AAAA,QACF;AAAA,QACA;AAAA,UACE,OAAO;AAAA,UACP;AAAA,YACE,WAAW;AAAA,YACX,cAAc;AAAA,YACd,OAAO;AAAA,UACT;AAAA,QACF;AAAA,MACF;AACA,iBAAW,EAAE,GAAG,KAAK,GAAG,MAAM,KAAK,OAAO,QAAQ,aAAa,GAAG;AAEhE,YAAI,CAAE,OAAO,UAAkB,GAAG,KAAK,OAAO,UAAU,YAAY;AAElE,gBAAM,EAAE,CAAC,GAAG,GAAG,KAAK,IAAI;AAAA,YACtB,CAAC,GAAG,KAAK,MAAiB;AACxB,oBAAM,MAAM,eAAe,IAAI,IAAI;AAEnC,oBAAM,SAAU,IAAY,GAAG,EAAE,GAAG,IAAI;AACxC,qBAAO,WAAW,UAAa,WAAW,MAAM,OAAO;AAAA,YACzD;AAAA,UACF;AACA,kBAAQ,KAAK;AAAA,YACX;AAAA,YACA;AAAA,cACE,GAAG;AAAA,cACH,OAAO;AAAA,YACT;AAAA,UACF,CAAC;AAAA,QACH;AAAA,MACF;AACA,aAAO;AAAA,IACT,GAAG;AAAA,EACL;AACF;AAEO,MAAM,SAAS,IAAI,OAAO;",
4
+ "sourcesContent": ["/**\n * @fileoverview Console logging utilities with line prefix support.\n * Provides enhanced console methods with formatted output capabilities.\n */\n\nimport isUnicodeSupported from './external/@socketregistry/is-unicode-supported'\nimport yoctocolorsCjs from './external/yoctocolors-cjs'\nimport { objectAssign, objectFreeze } from './objects'\nimport { applyLinePrefix, isBlankString } from './strings'\n\n// Type definitions\ntype LogSymbols = {\n fail: string\n info: string\n success: string\n warn: string\n}\n\ntype LoggerMethods = {\n [K in keyof typeof console]: (typeof console)[K] extends (\n ...args: infer A\n // biome-ignore lint/suspicious/noExplicitAny: Console method return types are dynamic.\n ) => any\n ? (...args: A) => Logger\n : (typeof console)[K]\n}\n\ninterface Task {\n run<T>(f: () => T): T\n}\n\nexport type { LogSymbols, LoggerMethods, Task }\n\nconst globalConsole = console\n// IMPORTANT: Do not use destructuring here - use direct assignment instead.\n// tsgo has a bug that incorrectly transpiles destructured exports, resulting in\n// `exports.SomeName = void 0;` which causes runtime errors.\n// See: https://github.com/SocketDev/socket-packageurl-js/issues/3\nconst ReflectApply = Reflect.apply\nconst ReflectConstruct = Reflect.construct\n\nlet _Console: typeof import('console').Console | undefined\n/**\n * Construct a new Console instance.\n * @private\n */\n/*@__NO_SIDE_EFFECTS__*/\nfunction constructConsole(...args: unknown[]) {\n if (_Console === undefined) {\n // Use non-'node:' prefixed require to avoid Webpack errors.\n\n const nodeConsole = /*@__PURE__*/ require('node:console')\n _Console = nodeConsole.Console\n }\n return ReflectConstruct(\n // biome-ignore lint/style/noNonNullAssertion: Initialized above.\n _Console! as new (\n ...args: unknown[]\n ) => Console, // eslint-disable-line no-undef\n args,\n )\n}\n\n/**\n * Get the yoctocolors module for terminal colors.\n * @private\n */\n/*@__NO_SIDE_EFFECTS__*/\nfunction getYoctocolors() {\n return yoctocolorsCjs\n}\n\nexport const LOG_SYMBOLS = /*@__PURE__*/ (() => {\n const target: Record<string, string> = {\n __proto__: null,\n } as unknown as Record<string, string>\n // Mutable handler to simulate a frozen target.\n const handler: ProxyHandler<Record<string, string>> = {\n __proto__: null,\n } as unknown as ProxyHandler<Record<string, string>>\n const init = () => {\n const supported = isUnicodeSupported()\n const colors = getYoctocolors()\n objectAssign(target, {\n fail: colors.red(supported ? '\u2716' : '\u00D7'),\n info: colors.blue(supported ? '\u2139' : 'i'),\n success: colors.green(supported ? '\u2714' : '\u221A'),\n warn: colors.yellow(supported ? '\u26A0' : '\u203C'),\n })\n objectFreeze(target)\n // The handler of a Proxy is mutable after proxy instantiation.\n // We delete the traps to defer to native behavior.\n for (const trapName in handler) {\n delete handler[trapName as keyof ProxyHandler<Record<string, string>>]\n }\n }\n for (const trapName of Reflect.ownKeys(Reflect)) {\n const fn = (Reflect as Record<PropertyKey, unknown>)[trapName]\n if (typeof fn === 'function') {\n ;(handler as Record<string, (...args: unknown[]) => unknown>)[\n trapName as string\n ] = (...args: unknown[]) => {\n init()\n return fn(...args)\n }\n }\n }\n return new Proxy(target, handler)\n})()\n\nconst boundConsoleEntries = [\n // Add bound properties from console[kBindProperties](ignoreErrors, colorMode, groupIndentation).\n // https://github.com/nodejs/node/blob/v24.0.1/lib/internal/console/constructor.js#L230-L265\n '_stderrErrorHandler',\n '_stdoutErrorHandler',\n // Add methods that need to be bound to function properly.\n 'assert',\n 'clear',\n 'count',\n 'countReset',\n 'createTask',\n 'debug',\n 'dir',\n 'dirxml',\n 'error',\n // Skip group methods because in at least Node 20 with the Node --frozen-intrinsics\n // flag it triggers a readonly property for Symbol(kGroupIndent). Instead, we\n // implement these methods ourselves.\n //'group',\n //'groupCollapsed',\n //'groupEnd',\n 'info',\n 'log',\n 'table',\n 'time',\n 'timeEnd',\n 'timeLog',\n 'trace',\n 'warn',\n]\n // biome-ignore lint/suspicious/noExplicitAny: Dynamic console method access.\n .filter(n => typeof (globalConsole as any)[n] === 'function')\n // biome-ignore lint/suspicious/noExplicitAny: Dynamic console method access.\n .map(n => [n, (globalConsole as any)[n].bind(globalConsole)])\n\nconst consolePropAttributes = {\n __proto__: null,\n writable: true,\n enumerable: false,\n configurable: true,\n}\nconst maxIndentation = 1000\nconst privateConsole = new WeakMap()\n\nconst consoleSymbols = Object.getOwnPropertySymbols(globalConsole)\nexport const incLogCallCountSymbol = Symbol.for('logger.logCallCount++')\nconst kGroupIndentationWidthSymbol =\n // biome-ignore lint/suspicious/noExplicitAny: Symbol property access.\n consoleSymbols.find(s => (s as any).label === 'kGroupIndentWidth') ??\n Symbol('kGroupIndentWidth')\nexport const lastWasBlankSymbol = Symbol.for('logger.lastWasBlank')\n\n/**\n * Custom Logger class that wraps console with additional features.\n * Supports indentation, symbols, and blank line tracking.\n */\n/*@__PURE__*/\nexport class Logger {\n static LOG_SYMBOLS = LOG_SYMBOLS\n\n #parent?: Logger\n #boundStream?: 'stderr' | 'stdout'\n #stderrLogger?: Logger\n #stdoutLogger?: Logger\n #stderrIndention = ''\n #stdoutIndention = ''\n #lastWasBlank = false\n #logCallCount = 0\n #constructorArgs: unknown[]\n #options: Record<string, unknown>\n\n constructor(...args: unknown[]) {\n // Store constructor args for child loggers\n this.#constructorArgs = args\n\n // Store options if provided (for future extensibility)\n const options = args['0']\n if (typeof options === 'object' && options !== null) {\n this.#options = { __proto__: null, ...options }\n } else {\n this.#options = { __proto__: null }\n }\n\n if (args.length) {\n privateConsole.set(this, constructConsole(...args))\n } else {\n // Create a new console that acts like the builtin one so that it will\n // work with Node's --frozen-intrinsics flag.\n const con = constructConsole({\n stdout: process.stdout,\n stderr: process.stderr,\n }) as typeof console & Record<string, unknown>\n for (const { 0: key, 1: method } of boundConsoleEntries) {\n con[key] = method\n }\n privateConsole.set(this, con)\n }\n }\n\n /**\n * Get a logger instance bound to stderr.\n * All operations on this instance will use stderr.\n */\n get stderr(): Logger {\n if (!this.#stderrLogger) {\n // Pass parent's constructor args to maintain config\n const instance = new Logger(...this.#constructorArgs)\n instance.#parent = this\n instance.#boundStream = 'stderr'\n instance.#options = { __proto__: null, ...this.#options }\n this.#stderrLogger = instance\n }\n return this.#stderrLogger\n }\n\n /**\n * Get a logger instance bound to stdout.\n * All operations on this instance will use stdout.\n */\n get stdout(): Logger {\n if (!this.#stdoutLogger) {\n // Pass parent's constructor args to maintain config\n const instance = new Logger(...this.#constructorArgs)\n instance.#parent = this\n instance.#boundStream = 'stdout'\n instance.#options = { __proto__: null, ...this.#options }\n this.#stdoutLogger = instance\n }\n return this.#stdoutLogger\n }\n\n /**\n * Get the root logger (for accessing shared indentation state).\n * @private\n */\n #getRoot(): Logger {\n return this.#parent || this\n }\n\n /**\n * Get indentation for a specific stream.\n * @private\n */\n #getIndent(stream: 'stderr' | 'stdout'): string {\n const root = this.#getRoot()\n return stream === 'stderr' ? root.#stderrIndention : root.#stdoutIndention\n }\n\n /**\n * Set indentation for a specific stream.\n * @private\n */\n #setIndent(stream: 'stderr' | 'stdout', value: string): void {\n const root = this.#getRoot()\n if (stream === 'stderr') {\n root.#stderrIndention = value\n } else {\n root.#stdoutIndention = value\n }\n }\n\n /**\n * Get the target stream for this logger instance.\n * @private\n */\n #getTargetStream(): 'stderr' | 'stdout' {\n return this.#boundStream || 'stderr'\n }\n\n /**\n * Apply a console method with indentation.\n * @private\n */\n #apply(\n methodName: string,\n args: unknown[],\n stream?: 'stderr' | 'stdout',\n ): this {\n const con = privateConsole.get(this) as typeof console &\n Record<string, unknown>\n const text = args.at(0)\n const hasText = typeof text === 'string'\n // Determine which stream this method writes to\n const targetStream = stream || (methodName === 'log' ? 'stdout' : 'stderr')\n const indent = this.#getIndent(targetStream)\n const logArgs = hasText\n ? [applyLinePrefix(text, { prefix: indent }), ...args.slice(1)]\n : args\n ReflectApply(\n con[methodName] as (...args: unknown[]) => unknown,\n con,\n logArgs,\n )\n this[lastWasBlankSymbol](hasText && isBlankString(logArgs[0]))\n // biome-ignore lint/suspicious/noExplicitAny: Symbol method access.\n ;(this as any)[incLogCallCountSymbol]()\n return this\n }\n\n /**\n * Strip log symbols from the start of text.\n * @private\n */\n #stripSymbols(text: string): string {\n // Strip both unicode and emoji forms of log symbols from the start.\n // Matches: \u2716, \u2717, \u00D7, \u2716\uFE0F, \u26A0, \u203C, \u26A0\uFE0F, \u2714, \u2713, \u221A, \u2714\uFE0F, \u2713\uFE0F, \u2139, \u2139\uFE0F\n // Also handles variation selectors (U+FE0F) and whitespace after symbol.\n // Note: We don't strip standalone 'i' to avoid breaking words like 'info'.\n return text.replace(/^[\u2716\u2717\u00D7\u26A0\u203C\u2714\u2713\u221A\u2139]\\uFE0F?\\s*/u, '')\n }\n\n /**\n * Apply a method with a symbol prefix.\n * @private\n */\n #symbolApply(symbolType: string, args: unknown[]): this {\n const con = privateConsole.get(this)\n let text = args.at(0)\n // biome-ignore lint/suspicious/noImplicitAnyLet: Flexible argument handling.\n let extras\n if (typeof text === 'string') {\n text = this.#stripSymbols(text)\n extras = args.slice(1)\n } else {\n extras = args\n text = ''\n }\n // Note: Meta status messages (info/fail/etc) always go to stderr.\n const indent = this.#getIndent('stderr')\n con.error(\n applyLinePrefix(`${LOG_SYMBOLS[symbolType]} ${text}`, {\n prefix: indent,\n }),\n ...extras,\n )\n this.#lastWasBlank = false\n // biome-ignore lint/suspicious/noExplicitAny: Symbol method access.\n ;(this as any)[incLogCallCountSymbol]()\n return this\n }\n\n /**\n * Get the current log call count.\n */\n get logCallCount() {\n return this.#logCallCount\n }\n\n /**\n * Increment the log call count.\n */\n [incLogCallCountSymbol]() {\n this.#logCallCount += 1\n return this\n }\n\n /**\n * Set whether the last logged line was blank.\n */\n [lastWasBlankSymbol](value: unknown): this {\n this.#lastWasBlank = !!value\n return this\n }\n\n /**\n * Log an assertion.\n */\n assert(value: unknown, ...message: unknown[]): this {\n const con = privateConsole.get(this)\n con.assert(value, ...message)\n this[lastWasBlankSymbol](false)\n return value ? this : this[incLogCallCountSymbol]()\n }\n\n /**\n * Clear the visible terminal screen.\n * Only available on the main logger instance.\n */\n clearVisible() {\n if (this.#boundStream) {\n throw new Error(\n 'clearVisible() is only available on the main logger instance, not on stream-bound instances',\n )\n }\n const con = privateConsole.get(this)\n con.clear()\n // biome-ignore lint/suspicious/noExplicitAny: Internal console property access.\n if ((con as any)._stdout.isTTY) {\n // biome-ignore lint/suspicious/noExplicitAny: Symbol method access.\n ;(this as any)[lastWasBlankSymbol](true)\n this.#logCallCount = 0\n }\n return this\n }\n\n /**\n * Log a count for the given label.\n */\n count(label?: string): this {\n const con = privateConsole.get(this)\n con.count(label)\n this[lastWasBlankSymbol](false)\n return this[incLogCallCountSymbol]()\n }\n\n /**\n * Create a task with a given name.\n */\n createTask(name: string): Task {\n return {\n run: <T>(f: () => T): T => {\n this.log(`Starting task: ${name}`)\n const result = f()\n this.log(`Completed task: ${name}`)\n return result\n },\n }\n }\n\n /**\n * Decrease indentation level.\n * If called on main logger, affects both streams.\n * If called on stream-bound logger, affects only that stream.\n */\n dedent(spaces = 2) {\n if (this.#boundStream) {\n // Only affect bound stream\n const current = this.#getIndent(this.#boundStream)\n this.#setIndent(this.#boundStream, current.slice(0, -spaces))\n } else {\n // Affect both streams\n const stderrCurrent = this.#getIndent('stderr')\n const stdoutCurrent = this.#getIndent('stdout')\n this.#setIndent('stderr', stderrCurrent.slice(0, -spaces))\n this.#setIndent('stdout', stdoutCurrent.slice(0, -spaces))\n }\n return this\n }\n\n /**\n * Display an object's properties.\n */\n dir(obj: unknown, options?: unknown): this {\n const con = privateConsole.get(this)\n con.dir(obj, options)\n this[lastWasBlankSymbol](false)\n return this[incLogCallCountSymbol]()\n }\n\n /**\n * Display data as XML.\n */\n dirxml(...data: unknown[]): this {\n const con = privateConsole.get(this)\n con.dirxml(data)\n this[lastWasBlankSymbol](false)\n return this[incLogCallCountSymbol]()\n }\n\n /**\n * Log an error message.\n */\n error(...args: unknown[]): this {\n return this.#apply('error', args)\n }\n\n /**\n * Log a newline to stderr if last line wasn't blank.\n */\n errorNewline() {\n return this.#lastWasBlank ? this : this.error('')\n }\n\n /**\n * Log a failure message with symbol.\n */\n fail(...args: unknown[]): this {\n return this.#symbolApply('fail', args)\n }\n\n /**\n * Start a new log group.\n */\n group(...label: unknown[]): this {\n const { length } = label\n if (length) {\n ReflectApply(this.log, this, label)\n }\n // biome-ignore lint/suspicious/noExplicitAny: Symbol property access.\n this.indent((this as any)[kGroupIndentationWidthSymbol])\n if (length) {\n // biome-ignore lint/suspicious/noExplicitAny: Symbol method access.\n ;(this as any)[lastWasBlankSymbol](false)\n // biome-ignore lint/suspicious/noExplicitAny: Symbol method access.\n ;(this as any)[incLogCallCountSymbol]()\n }\n return this\n }\n\n /**\n * Start a new collapsed log group (alias for group).\n */\n // groupCollapsed is an alias of group.\n // https://nodejs.org/api/console.html#consolegroupcollapsed\n groupCollapsed(...label: unknown[]): this {\n return ReflectApply(this.group, this, label)\n }\n\n /**\n * End the current log group.\n */\n groupEnd() {\n // biome-ignore lint/suspicious/noExplicitAny: Symbol property access.\n this.dedent((this as any)[kGroupIndentationWidthSymbol])\n return this\n }\n\n /**\n * Increase indentation level.\n * If called on main logger, affects both streams.\n * If called on stream-bound logger, affects only that stream.\n */\n indent(spaces = 2) {\n const spacesToAdd = ' '.repeat(Math.min(spaces, maxIndentation))\n if (this.#boundStream) {\n // Only affect bound stream\n const current = this.#getIndent(this.#boundStream)\n this.#setIndent(this.#boundStream, current + spacesToAdd)\n } else {\n // Affect both streams\n const stderrCurrent = this.#getIndent('stderr')\n const stdoutCurrent = this.#getIndent('stdout')\n this.#setIndent('stderr', stderrCurrent + spacesToAdd)\n this.#setIndent('stdout', stdoutCurrent + spacesToAdd)\n }\n return this\n }\n\n /**\n * Log an info message with symbol.\n */\n info(...args: unknown[]): this {\n return this.#symbolApply('info', args)\n }\n\n /**\n * Log a message.\n */\n log(...args: unknown[]): this {\n return this.#apply('log', args)\n }\n\n /**\n * Log a newline to stdout if last line wasn't blank.\n */\n logNewline() {\n return this.#lastWasBlank ? this : this.log('')\n }\n\n /**\n * Reset indentation to zero.\n * If called on main logger, resets both streams.\n * If called on stream-bound logger, resets only that stream.\n */\n resetIndent() {\n if (this.#boundStream) {\n // Only reset bound stream\n this.#setIndent(this.#boundStream, '')\n } else {\n // Reset both streams\n this.#setIndent('stderr', '')\n this.#setIndent('stdout', '')\n }\n return this\n }\n\n /**\n * Log a main step with blank line before (stateless).\n */\n step(msg: string, ...extras: unknown[]): this {\n // Add blank line before the step message.\n if (!this.#lastWasBlank) {\n // Use this.log() to properly track the blank line.\n this.log('')\n }\n // Let log() handle all tracking.\n return this.log(msg, ...extras)\n }\n\n /**\n * Log an indented substep (stateless).\n */\n substep(msg: string, ...extras: unknown[]): this {\n // Add 2-space indent to the message.\n const indentedMsg = ` ${msg}`\n // Let log() handle all tracking.\n return this.log(indentedMsg, ...extras)\n }\n\n /**\n * Log a success message with symbol.\n */\n success(...args: unknown[]): this {\n return this.#symbolApply('success', args)\n }\n\n /**\n * Log a done message (alias for success).\n * Does NOT auto-clear. Call clearLine() first if needed after progress().\n */\n done(...args: unknown[]): this {\n return this.#symbolApply('success', args)\n }\n\n /**\n * Display data in a table format.\n */\n table(tabularData: unknown, properties?: readonly string[]): this {\n const con = privateConsole.get(this)\n con.table(tabularData, properties)\n this[lastWasBlankSymbol](false)\n return this[incLogCallCountSymbol]()\n }\n\n /**\n * End a timer and log the elapsed time.\n */\n timeEnd(label?: string): this {\n const con = privateConsole.get(this)\n con.timeEnd(label)\n this[lastWasBlankSymbol](false)\n return this[incLogCallCountSymbol]()\n }\n\n /**\n * Log the current timer value.\n */\n timeLog(label?: string, ...data: unknown[]): this {\n const con = privateConsole.get(this)\n con.timeLog(label, ...data)\n this[lastWasBlankSymbol](false)\n return this[incLogCallCountSymbol]()\n }\n\n /**\n * Log a stack trace.\n */\n trace(message?: unknown, ...args: unknown[]): this {\n const con = privateConsole.get(this)\n con.trace(message, ...args)\n this[lastWasBlankSymbol](false)\n return this[incLogCallCountSymbol]()\n }\n\n /**\n * Log a warning message with symbol.\n */\n warn(...args: unknown[]): this {\n return this.#symbolApply('warn', args)\n }\n\n /**\n * Write to stdout without a newline or indentation.\n */\n write(text: string): this {\n const con = privateConsole.get(this)\n con._stdout.write(text)\n this[lastWasBlankSymbol](false)\n return this\n }\n\n /**\n * Show a progress indicator (can be cleared with clearLine).\n * Simple status message without spinner animation.\n */\n progress(text: string): this {\n const con = privateConsole.get(this)\n const stream = this.#getTargetStream()\n const streamObj = stream === 'stderr' ? con._stderr : con._stdout\n streamObj.write(`\u2234 ${text}`)\n this[lastWasBlankSymbol](false)\n return this\n }\n\n /**\n * Clear the current line.\n */\n clearLine(): this {\n const con = privateConsole.get(this)\n const stream = this.#getTargetStream()\n const streamObj = stream === 'stderr' ? con._stderr : con._stdout\n if (streamObj.isTTY) {\n streamObj.cursorTo(0)\n streamObj.clearLine(0)\n } else {\n streamObj.write('\\r\\x1b[K')\n }\n return this\n }\n}\n\nObject.defineProperties(\n Logger.prototype,\n Object.fromEntries(\n (() => {\n const entries: Array<[string | symbol, PropertyDescriptor]> = [\n [\n kGroupIndentationWidthSymbol,\n {\n ...consolePropAttributes,\n value: 2,\n },\n ],\n [\n Symbol.toStringTag,\n {\n __proto__: null,\n configurable: true,\n value: 'logger',\n } as PropertyDescriptor,\n ],\n ]\n for (const { 0: key, 1: value } of Object.entries(globalConsole)) {\n // biome-ignore lint/suspicious/noExplicitAny: Dynamic prototype check.\n if (!(Logger.prototype as any)[key] && typeof value === 'function') {\n // Dynamically name the log method without using Object.defineProperty.\n const { [key]: func } = {\n [key](...args: unknown[]) {\n const con = privateConsole.get(this)\n // biome-ignore lint/suspicious/noExplicitAny: Dynamic console method access.\n const result = (con as any)[key](...args)\n return result === undefined || result === con ? this : result\n },\n }\n entries.push([\n key,\n {\n ...consolePropAttributes,\n value: func,\n },\n ])\n }\n }\n return entries\n })(),\n ),\n)\n\nexport const logger = new Logger()\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,kCAA+B;AAC/B,6BAA2B;AAC3B,qBAA2C;AAC3C,qBAA+C;AAyB/C,MAAM,gBAAgB;AAKtB,MAAM,eAAe,QAAQ;AAC7B,MAAM,mBAAmB,QAAQ;AAEjC,IAAI;AAAA;AAMJ,SAAS,oBAAoB,MAAiB;AAC5C,MAAI,aAAa,QAAW;AAG1B,UAAM,cAA4B,QAAQ,cAAc;AACxD,eAAW,YAAY;AAAA,EACzB;AACA,SAAO;AAAA;AAAA,IAEL;AAAA;AAAA,IAGA;AAAA,EACF;AACF;AAAA;A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oBAAM,MAAM,eAAe,IAAI,IAAI;AAEnC,oBAAM,SAAU,IAAY,GAAG,EAAE,GAAG,IAAI;AACxC,qBAAO,WAAW,UAAa,WAAW,MAAM,OAAO;AAAA,YACzD;AAAA,UACF;AACA,kBAAQ,KAAK;AAAA,YACX;AAAA,YACA;AAAA,cACE,GAAG;AAAA,cACH,OAAO;AAAA,YACT;AAAA,UACF,CAAC;AAAA,QACH;AAAA,MACF;AACA,aAAO;AAAA,IACT,GAAG;AAAA,EACL;AACF;AAEO,MAAM,SAAS,IAAI,OAAO;",
6
6
  "names": ["yoctocolorsCjs", "isUnicodeSupported"]
7
7
  }
package/dist/path.js CHANGED
@@ -307,7 +307,7 @@ function pathLikeToString(pathLike) {
307
307
  } catch {
308
308
  const pathname = pathLike.pathname;
309
309
  const decodedPathname = decodeURIComponent(pathname);
310
- const WIN322 = require("../constants/platform").WIN32;
310
+ const WIN322 = require("./constants/platform").WIN32;
311
311
  if (WIN322 && decodedPathname.startsWith("/")) {
312
312
  const letter = decodedPathname.charCodeAt(1) | 32;
313
313
  const hasValidDriveLetter = decodedPathname.length >= 3 && letter >= 97 && // 'a' to 'z'
@@ -365,7 +365,7 @@ function relative(from, to) {
365
365
  if (actualFrom === actualTo) {
366
366
  return "";
367
367
  }
368
- const WIN322 = require("../constants/platform").WIN32;
368
+ const WIN322 = require("./constants/platform").WIN32;
369
369
  if (WIN322) {
370
370
  const fromLower = actualFrom.toLowerCase();
371
371
  const toLower = actualTo.toLowerCase();
package/dist/spawn.js CHANGED
@@ -43,7 +43,7 @@ let _npmCliPromiseSpawn;
43
43
  // @__NO_SIDE_EFFECTS__
44
44
  function getNpmcliPromiseSpawn() {
45
45
  if (_npmCliPromiseSpawn === void 0) {
46
- _npmCliPromiseSpawn = require("../external/@npmcli/promise-spawn");
46
+ _npmCliPromiseSpawn = require("./external/@npmcli/promise-spawn");
47
47
  }
48
48
  return _npmCliPromiseSpawn;
49
49
  }
package/dist/spinner.js CHANGED
@@ -98,7 +98,7 @@ function renderProgressBar(percentage, width = 20) {
98
98
  const filled = Math.round(percentage / 100 * width);
99
99
  const empty = width - filled;
100
100
  const bar = "\u2588".repeat(filled) + "\u2591".repeat(empty);
101
- const colors = require("../external/yoctocolors-cjs");
101
+ const colors = require("./external/yoctocolors-cjs");
102
102
  return colors.cyan(bar);
103
103
  }
104
104
  let _cliSpinners;
package/dist/streams.js CHANGED
@@ -28,7 +28,7 @@ let _streamingIterables;
28
28
  // @__NO_SIDE_EFFECTS__
29
29
  function getStreamingIterables() {
30
30
  if (_streamingIterables === void 0) {
31
- _streamingIterables = require("../external/streaming-iterables");
31
+ _streamingIterables = require("./external/streaming-iterables");
32
32
  }
33
33
  return _streamingIterables;
34
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socketsecurity/lib",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "license": "MIT",
5
5
  "description": "Core utilities and infrastructure for Socket.dev security tools",
6
6
  "keywords": [