@socketsecurity/lib 5.26.0 → 5.27.0
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 +371 -1185
- package/README.md +1 -1
- package/dist/abort.js +7 -6
- package/dist/agent.js +16 -15
- package/dist/ansi.js +3 -2
- package/dist/archives.js +18 -17
- package/dist/argv/flags.js +29 -28
- package/dist/argv/parse.js +4 -3
- package/dist/arrays.js +3 -2
- package/dist/bin.js +12 -11
- package/dist/cacache.js +16 -11
- package/dist/cache-with-ttl.js +26 -21
- package/dist/colors.js +2 -1
- package/dist/constants/licenses.js +2 -1
- package/dist/constants/lifecycle-script-names.js +2 -1
- package/dist/constants/maintained-node-versions.js +2 -1
- package/dist/constants/node.js +4 -3
- package/dist/constants/package-default-socket-categories.js +2 -1
- package/dist/constants/packages.js +4 -3
- package/dist/constants/socket.js +1 -1
- package/dist/cover/code.js +9 -8
- package/dist/cover/formatters.js +12 -11
- package/dist/cover/type.js +5 -4
- package/dist/crypto.d.ts +36 -0
- package/dist/{effects/ultra.js → crypto.js} +26 -37
- package/dist/debug.js +12 -15
- package/dist/dlx/arborist.js +10 -9
- package/dist/dlx/binary.js +27 -24
- package/dist/dlx/cache.js +2 -10
- package/dist/dlx/detect.js +6 -5
- package/dist/dlx/integrity.js +13 -11
- package/dist/dlx/lockfile.js +7 -6
- package/dist/dlx/manifest.js +6 -5
- package/dist/dlx/package.js +17 -16
- package/dist/dlx/packages.js +6 -5
- package/dist/dlx/paths.d.ts +1 -1
- package/dist/dlx/paths.js +2 -1
- package/dist/effects/pulse-frames.js +4 -3
- package/dist/effects/shimmer-keyframes.d.ts +62 -0
- package/dist/effects/shimmer-keyframes.js +55 -0
- package/dist/effects/shimmer-terminal.d.ts +66 -0
- package/dist/effects/shimmer-terminal.js +57 -0
- package/dist/effects/shimmer.d.ts +293 -0
- package/dist/effects/shimmer.js +180 -0
- package/dist/env/rewire.js +4 -3
- package/dist/env.js +5 -4
- package/dist/errors.js +1 -1
- package/dist/external/@npmcli/package-json/lib/read-package.js +10 -10
- package/dist/external/@npmcli/package-json.js +372 -372
- package/dist/external/@npmcli/promise-spawn.js +24 -24
- package/dist/external/@socketregistry/packageurl-js.js +19 -18
- package/dist/external/@socketregistry/yocto-spinner.js +4 -3
- package/dist/external/@yarnpkg/extensions.js +2 -1
- package/dist/external/adm-zip.js +71 -71
- package/dist/external/debug.js +22 -22
- package/dist/external/external-pack.js +45 -45
- package/dist/external/fast-sort.js +5 -5
- package/dist/external/libnpmexec.js +4 -3
- package/dist/external/npm-pack.js +369 -369
- package/dist/external/p-map.js +9 -9
- package/dist/external/pico-pack.js +190 -190
- package/dist/external/pony-cause.js +2 -1
- package/dist/external/spdx-pack.js +11 -10
- package/dist/external/tar-fs.js +58 -58
- package/dist/external/which.js +13 -13
- package/dist/external/yargs-parser.js +71 -71
- package/dist/fs.js +50 -68
- package/dist/git.js +14 -13
- package/dist/github.d.ts +34 -0
- package/dist/github.js +248 -23
- package/dist/globs.d.ts +20 -0
- package/dist/globs.js +134 -25
- package/dist/http-request.d.ts +4 -3
- package/dist/http-request.js +39 -32
- package/dist/ipc-cli.js +2 -1
- package/dist/ipc.js +5 -4
- package/dist/json/edit.js +4 -3
- package/dist/json/format.js +3 -2
- package/dist/json/parse.js +7 -6
- package/dist/links.js +2 -1
- package/dist/logger.js +21 -14
- package/dist/memoization.js +16 -15
- package/dist/node/async-hooks.d.ts +6 -0
- package/dist/node/async-hooks.js +34 -0
- package/dist/node/child-process.d.ts +11 -0
- package/dist/node/child-process.js +34 -0
- package/dist/node/crypto.d.ts +6 -0
- package/dist/node/crypto.js +34 -0
- package/dist/node/events.d.ts +6 -0
- package/dist/node/events.js +34 -0
- package/dist/node/fs-promises.d.ts +6 -0
- package/dist/node/fs-promises.js +34 -0
- package/dist/node/fs.d.ts +14 -0
- package/dist/node/fs.js +34 -0
- package/dist/node/http.d.ts +6 -0
- package/dist/node/http.js +34 -0
- package/dist/node/https.d.ts +6 -0
- package/dist/node/https.js +34 -0
- package/dist/node/os.d.ts +6 -0
- package/dist/node/os.js +34 -0
- package/dist/node/path.d.ts +6 -0
- package/dist/node/path.js +34 -0
- package/dist/node/timers-promises.d.ts +6 -0
- package/dist/node/timers-promises.js +34 -0
- package/dist/node/url.d.ts +6 -0
- package/dist/node/url.js +34 -0
- package/dist/node/util.d.ts +6 -0
- package/dist/node/util.js +34 -0
- package/dist/objects.js +2 -2
- package/dist/packages/edit.js +8 -7
- package/dist/packages/exports.js +17 -16
- package/dist/packages/isolation.js +20 -13
- package/dist/packages/licenses.js +6 -3
- package/dist/packages/manifest.js +2 -1
- package/dist/packages/normalize.js +8 -4
- package/dist/packages/operations.js +5 -4
- package/dist/packages/provenance.js +7 -6
- package/dist/packages/specs.js +2 -1
- package/dist/packages/validation.js +2 -1
- package/dist/paths/normalize.js +32 -40
- package/dist/paths/packages.js +2 -1
- package/dist/paths/rewire.js +3 -2
- package/dist/performance.js +19 -18
- package/dist/primordials.d.ts +85 -2
- package/dist/primordials.js +311 -23
- package/dist/process-lock.js +14 -13
- package/dist/promise-queue.js +17 -9
- package/dist/promises.d.ts +29 -6
- package/dist/promises.js +19 -15
- package/dist/regexps.js +9 -8
- package/dist/releases/github-api.d.ts +56 -0
- package/dist/releases/github-api.js +275 -0
- package/dist/releases/github-archives.d.ts +60 -0
- package/dist/releases/github-archives.js +136 -0
- package/dist/releases/github-assets.d.ts +21 -0
- package/dist/releases/github-assets.js +52 -0
- package/dist/releases/github-auth.d.ts +16 -0
- package/dist/releases/github-auth.js +51 -0
- package/dist/releases/github-downloads.d.ts +42 -0
- package/dist/releases/github-downloads.js +155 -0
- package/dist/releases/github-types.d.ts +66 -0
- package/dist/{effects/types.js → releases/github-types.js} +2 -2
- package/dist/releases/socket-btm.d.ts +1 -1
- package/dist/releases/socket-btm.js +17 -17
- package/dist/schema/parse.js +2 -1
- package/dist/schema/validate.js +6 -5
- package/dist/sea/util.d.ts +43 -0
- package/dist/{sea.js → sea/util.js} +7 -7
- package/dist/shadow.js +2 -1
- package/dist/signal-exit.js +2 -2
- package/dist/smol/primordial.d.ts +80 -0
- package/dist/smol/primordial.js +46 -0
- package/dist/smol/util.d.ts +87 -0
- package/dist/smol/util.js +59 -0
- package/dist/smol/versions.d.ts +46 -0
- package/dist/smol/versions.js +46 -0
- package/dist/spawn.js +58 -63
- package/dist/spinner.d.ts +13 -6
- package/dist/spinner.js +75 -57
- package/dist/ssri.js +8 -7
- package/dist/stdio/footer.js +13 -12
- package/dist/stdio/header.js +5 -4
- package/dist/stdio/progress.js +13 -12
- package/dist/strings.js +19 -18
- package/dist/suppress-warnings.js +2 -2
- package/dist/tables.js +16 -13
- package/dist/temporary-executor.js +2 -1
- package/dist/themes/context.js +2 -1
- package/dist/themes/types.d.ts +1 -1
- package/dist/themes/utils.d.ts +8 -3
- package/dist/themes/utils.js +29 -5
- package/dist/url.js +4 -3
- package/dist/versions.js +27 -22
- package/package.json +120 -26
- package/dist/effects/text-shimmer.d.ts +0 -58
- package/dist/effects/text-shimmer.js +0 -192
- package/dist/effects/types.d.ts +0 -47
- package/dist/effects/ultra.d.ts +0 -22
- package/dist/releases/github.d.ts +0 -234
- package/dist/releases/github.js +0 -417
- package/dist/sea.d.ts +0 -30
- package/dist/themes/index.d.ts +0 -49
- package/dist/themes/index.js +0 -60
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Lazy-loader for `node:child_process`. See `node/fs.ts`
|
|
3
|
+
* for the design rationale shared across all `node/*.ts` lazy-loaders.
|
|
4
|
+
*
|
|
5
|
+
* Filename uses `child-process` (kebab-case) to match the rest of
|
|
6
|
+
* socket-lib's filename convention. The exported getter name is
|
|
7
|
+
* `getNodeChildProcess` (camelCase, prefixed with `Node` to match
|
|
8
|
+
* every other `node/*` lazy-loader).
|
|
9
|
+
*/
|
|
10
|
+
import type * as NodeChildProcess from 'node:child_process';
|
|
11
|
+
export declare function getNodeChildProcess(): typeof NodeChildProcess;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Socket Lib - Built with esbuild */
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var child_process_exports = {};
|
|
22
|
+
__export(child_process_exports, {
|
|
23
|
+
getNodeChildProcess: () => getNodeChildProcess
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(child_process_exports);
|
|
26
|
+
let _childProcess;
|
|
27
|
+
// @__NO_SIDE_EFFECTS__
|
|
28
|
+
function getNodeChildProcess() {
|
|
29
|
+
return _childProcess ??= require("node:child_process");
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
getNodeChildProcess
|
|
34
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Socket Lib - Built with esbuild */
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var crypto_exports = {};
|
|
22
|
+
__export(crypto_exports, {
|
|
23
|
+
getNodeCrypto: () => getNodeCrypto
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(crypto_exports);
|
|
26
|
+
let _crypto;
|
|
27
|
+
// @__NO_SIDE_EFFECTS__
|
|
28
|
+
function getNodeCrypto() {
|
|
29
|
+
return _crypto ??= require("node:crypto");
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
getNodeCrypto
|
|
34
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Socket Lib - Built with esbuild */
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var events_exports = {};
|
|
22
|
+
__export(events_exports, {
|
|
23
|
+
getNodeEvents: () => getNodeEvents
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(events_exports);
|
|
26
|
+
let _events;
|
|
27
|
+
// @__NO_SIDE_EFFECTS__
|
|
28
|
+
function getNodeEvents() {
|
|
29
|
+
return _events ??= require("node:events");
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
getNodeEvents
|
|
34
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Lazy-loader for `node:fs/promises`. See `node/fs.ts`
|
|
3
|
+
* for the design rationale shared across all `node/*.ts` lazy-loaders.
|
|
4
|
+
*/
|
|
5
|
+
import type * as NodeFsPromises from 'node:fs/promises';
|
|
6
|
+
export declare function getNodeFsPromises(): typeof NodeFsPromises;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Socket Lib - Built with esbuild */
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var fs_promises_exports = {};
|
|
22
|
+
__export(fs_promises_exports, {
|
|
23
|
+
getNodeFsPromises: () => getNodeFsPromises
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(fs_promises_exports);
|
|
26
|
+
let _fsPromises;
|
|
27
|
+
// @__NO_SIDE_EFFECTS__
|
|
28
|
+
function getNodeFsPromises() {
|
|
29
|
+
return _fsPromises ??= require("node:fs/promises");
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
getNodeFsPromises
|
|
34
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Lazy-loader for `node:fs`.
|
|
3
|
+
*
|
|
4
|
+
* Bundlers (Webpack/Rollup/esbuild) targeting browsers can't statically
|
|
5
|
+
* resolve `require('node:fs')` — but they CAN drop the call entirely
|
|
6
|
+
* if it's wrapped in a `/*@__NO_SIDE_EFFECTS__*\/`-marked function and
|
|
7
|
+
* never called. So we always go through `getFs()` instead of importing
|
|
8
|
+
* top-level.
|
|
9
|
+
*
|
|
10
|
+
* Cache slot is module-local: first call resolves the require, every
|
|
11
|
+
* subsequent call returns the cached reference.
|
|
12
|
+
*/
|
|
13
|
+
import type * as NodeFs from 'node:fs';
|
|
14
|
+
export declare function getNodeFs(): typeof NodeFs;
|
package/dist/node/fs.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Socket Lib - Built with esbuild */
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var fs_exports = {};
|
|
22
|
+
__export(fs_exports, {
|
|
23
|
+
getNodeFs: () => getNodeFs
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(fs_exports);
|
|
26
|
+
let _fs;
|
|
27
|
+
// @__NO_SIDE_EFFECTS__
|
|
28
|
+
function getNodeFs() {
|
|
29
|
+
return _fs ??= require("node:fs");
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
getNodeFs
|
|
34
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Socket Lib - Built with esbuild */
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var http_exports = {};
|
|
22
|
+
__export(http_exports, {
|
|
23
|
+
getNodeHttp: () => getNodeHttp
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(http_exports);
|
|
26
|
+
let _http;
|
|
27
|
+
// @__NO_SIDE_EFFECTS__
|
|
28
|
+
function getNodeHttp() {
|
|
29
|
+
return _http ??= require("node:http");
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
getNodeHttp
|
|
34
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Socket Lib - Built with esbuild */
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var https_exports = {};
|
|
22
|
+
__export(https_exports, {
|
|
23
|
+
getNodeHttps: () => getNodeHttps
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(https_exports);
|
|
26
|
+
let _https;
|
|
27
|
+
// @__NO_SIDE_EFFECTS__
|
|
28
|
+
function getNodeHttps() {
|
|
29
|
+
return _https ??= require("node:https");
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
getNodeHttps
|
|
34
|
+
});
|
package/dist/node/os.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Socket Lib - Built with esbuild */
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var os_exports = {};
|
|
22
|
+
__export(os_exports, {
|
|
23
|
+
getNodeOs: () => getNodeOs
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(os_exports);
|
|
26
|
+
let _os;
|
|
27
|
+
// @__NO_SIDE_EFFECTS__
|
|
28
|
+
function getNodeOs() {
|
|
29
|
+
return _os ??= require("node:os");
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
getNodeOs
|
|
34
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Socket Lib - Built with esbuild */
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var path_exports = {};
|
|
22
|
+
__export(path_exports, {
|
|
23
|
+
getNodePath: () => getNodePath
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(path_exports);
|
|
26
|
+
let _path;
|
|
27
|
+
// @__NO_SIDE_EFFECTS__
|
|
28
|
+
function getNodePath() {
|
|
29
|
+
return _path ??= require("node:path");
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
getNodePath
|
|
34
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Lazy-loader for `node:timers/promises`. See `node/fs.ts`
|
|
3
|
+
* for the design rationale shared across all `node/*.ts` lazy-loaders.
|
|
4
|
+
*/
|
|
5
|
+
import type * as NodeTimersPromises from 'node:timers/promises';
|
|
6
|
+
export declare function getNodeTimersPromises(): typeof NodeTimersPromises;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Socket Lib - Built with esbuild */
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var timers_promises_exports = {};
|
|
22
|
+
__export(timers_promises_exports, {
|
|
23
|
+
getNodeTimersPromises: () => getNodeTimersPromises
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(timers_promises_exports);
|
|
26
|
+
let _timersPromises;
|
|
27
|
+
// @__NO_SIDE_EFFECTS__
|
|
28
|
+
function getNodeTimersPromises() {
|
|
29
|
+
return _timersPromises ??= require("node:timers/promises");
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
getNodeTimersPromises
|
|
34
|
+
});
|
package/dist/node/url.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Socket Lib - Built with esbuild */
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var url_exports = {};
|
|
22
|
+
__export(url_exports, {
|
|
23
|
+
getNodeUrl: () => getNodeUrl
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(url_exports);
|
|
26
|
+
let _url;
|
|
27
|
+
// @__NO_SIDE_EFFECTS__
|
|
28
|
+
function getNodeUrl() {
|
|
29
|
+
return _url ??= require("node:url");
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
getNodeUrl
|
|
34
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Socket Lib - Built with esbuild */
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var util_exports = {};
|
|
22
|
+
__export(util_exports, {
|
|
23
|
+
getNodeUtil: () => getNodeUtil
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(util_exports);
|
|
26
|
+
let _util;
|
|
27
|
+
// @__NO_SIDE_EFFECTS__
|
|
28
|
+
function getNodeUtil() {
|
|
29
|
+
return _util ??= require("node:util");
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
getNodeUtil
|
|
34
|
+
});
|
package/dist/objects.js
CHANGED
|
@@ -66,7 +66,7 @@ function createConstantsObject(props, options_) {
|
|
|
66
66
|
});
|
|
67
67
|
const lazyGetterStats = (0, import_primordials.ObjectFreeze)({
|
|
68
68
|
__proto__: null,
|
|
69
|
-
initialized:
|
|
69
|
+
initialized: new import_primordials.SetCtor()
|
|
70
70
|
});
|
|
71
71
|
const object = defineLazyGetters(
|
|
72
72
|
{
|
|
@@ -207,7 +207,7 @@ function merge(target, source) {
|
|
|
207
207
|
let { length: queueLength } = queue;
|
|
208
208
|
while (pos < queueLength) {
|
|
209
209
|
if (pos === import_core.LOOP_SENTINEL) {
|
|
210
|
-
throw new
|
|
210
|
+
throw new import_primordials.ErrorCtor("Detected infinite loop in object crawl of merge");
|
|
211
211
|
}
|
|
212
212
|
const { 0: currentTarget, 1: currentSource } = queue[pos++];
|
|
213
213
|
if (!currentSource || !currentTarget) {
|
package/dist/packages/edit.js
CHANGED
|
@@ -43,6 +43,7 @@ var import_format = require("../json/format");
|
|
|
43
43
|
var import_normalize = require("../paths/normalize");
|
|
44
44
|
var import_normalize2 = require("./normalize");
|
|
45
45
|
var import_packages = require("../paths/packages");
|
|
46
|
+
var import_primordials = require("../primordials");
|
|
46
47
|
let _EditablePackageJsonClass;
|
|
47
48
|
let _fs;
|
|
48
49
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -87,7 +88,7 @@ function getEditablePackageJsonClass() {
|
|
|
87
88
|
if (!path) {
|
|
88
89
|
return "";
|
|
89
90
|
}
|
|
90
|
-
if (
|
|
91
|
+
if ((0, import_primordials.StringPrototypeEndsWith)(path, "package.json")) {
|
|
91
92
|
return path;
|
|
92
93
|
}
|
|
93
94
|
const nodePath = /* @__PURE__ */ getPath();
|
|
@@ -191,7 +192,7 @@ function getEditablePackageJsonClass() {
|
|
|
191
192
|
}
|
|
192
193
|
async save(options) {
|
|
193
194
|
if (!this._canSave || this.content === void 0) {
|
|
194
|
-
throw new
|
|
195
|
+
throw new import_primordials.ErrorCtor("No package.json to save to");
|
|
195
196
|
}
|
|
196
197
|
if (!(0, import_format.shouldSave)(
|
|
197
198
|
this.content,
|
|
@@ -217,7 +218,7 @@ function getEditablePackageJsonClass() {
|
|
|
217
218
|
}
|
|
218
219
|
saveSync(options) {
|
|
219
220
|
if (!this._canSave || this.content === void 0) {
|
|
220
|
-
throw new
|
|
221
|
+
throw new import_primordials.ErrorCtor("No package.json to save to");
|
|
221
222
|
}
|
|
222
223
|
const { ignoreWhitespace = false, sort = false } = {
|
|
223
224
|
__proto__: null,
|
|
@@ -234,7 +235,7 @@ function getEditablePackageJsonClass() {
|
|
|
234
235
|
}
|
|
235
236
|
const format = indent === void 0 || indent === null ? " " : indent;
|
|
236
237
|
const eol = newline === void 0 || newline === null ? "\n" : newline;
|
|
237
|
-
const fileContent = `${
|
|
238
|
+
const fileContent = `${(0, import_primordials.JSONStringify)(
|
|
238
239
|
content,
|
|
239
240
|
void 0,
|
|
240
241
|
format
|
|
@@ -272,7 +273,7 @@ function getEditablePackageJsonClass() {
|
|
|
272
273
|
}
|
|
273
274
|
const format = indent === void 0 || indent === null ? " " : indent;
|
|
274
275
|
const eol = newline === void 0 || newline === null ? "\n" : newline;
|
|
275
|
-
const fileContent = `${
|
|
276
|
+
const fileContent = `${(0, import_primordials.JSONStringify)(
|
|
276
277
|
content,
|
|
277
278
|
void 0,
|
|
278
279
|
format
|
|
@@ -311,7 +312,7 @@ async function toEditablePackageJson(pkgJson, options) {
|
|
|
311
312
|
const EditablePackageJson = /* @__PURE__ */ getEditablePackageJsonClass();
|
|
312
313
|
const pkgJsonPath = (0, import_packages.resolvePackageJsonDirname)(filepath);
|
|
313
314
|
return (await EditablePackageJson.load(pkgJsonPath, { create: true })).fromJSON(
|
|
314
|
-
`${
|
|
315
|
+
`${(0, import_primordials.JSONStringify)(
|
|
315
316
|
normalize ? (0, import_normalize2.normalizePackageJson)(pkgJson, {
|
|
316
317
|
...(0, import_normalize.isNodeModules)(pkgJsonPath) ? {} : { preserve: ["repository"] },
|
|
317
318
|
...normalizeOptions
|
|
@@ -335,7 +336,7 @@ function toEditablePackageJsonSync(pkgJson, options) {
|
|
|
335
336
|
const EditablePackageJson = /* @__PURE__ */ getEditablePackageJsonClass();
|
|
336
337
|
const pkgJsonPath = (0, import_packages.resolvePackageJsonDirname)(filepath);
|
|
337
338
|
return new EditablePackageJson().create(pkgJsonPath).fromJSON(
|
|
338
|
-
`${
|
|
339
|
+
`${(0, import_primordials.JSONStringify)(
|
|
339
340
|
normalize ? (0, import_normalize2.normalizePackageJson)(pkgJson, {
|
|
340
341
|
...(0, import_normalize.isNodeModules)(pkgJsonPath) ? {} : { preserve: ["repository"] },
|
|
341
342
|
...normalizeOptions
|