@socketsecurity/lib 1.3.2 → 1.3.3
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 +9 -0
- package/dist/abort.js +1 -60
- package/dist/abort.js.map +2 -2
- package/dist/agent.js +1 -289
- package/dist/agent.js.map +2 -2
- package/dist/ansi.js +1 -60
- package/dist/ansi.js.map +2 -2
- package/dist/argv/flags.js +1 -282
- package/dist/argv/flags.js.map +2 -2
- package/dist/argv/parse.js +1 -171
- package/dist/argv/parse.js.map +2 -2
- package/dist/arrays.js +1 -85
- package/dist/arrays.js.map +2 -2
- package/dist/bin.js +1 -402
- package/dist/bin.js.map +2 -2
- package/dist/cacache.js +1 -137
- package/dist/cacache.js.map +2 -2
- package/dist/cache-with-ttl.js +1 -223
- package/dist/cache-with-ttl.js.map +2 -2
- package/dist/constants/agents.js +1 -126
- package/dist/constants/agents.js.map +2 -2
- package/dist/constants/core.js +2 -57
- package/dist/constants/core.js.map +2 -2
- package/dist/constants/encoding.js +1 -48
- package/dist/constants/encoding.js.map +2 -2
- package/dist/constants/github.js +1 -30
- package/dist/constants/github.js.map +2 -2
- package/dist/constants/licenses.js +1 -66
- package/dist/constants/licenses.js.map +2 -2
- package/dist/constants/node.js +1 -171
- package/dist/constants/node.js.map +2 -2
- package/dist/constants/packages.js +1 -128
- package/dist/constants/packages.js.map +2 -2
- package/dist/constants/paths.js +1 -150
- package/dist/constants/paths.js.map +2 -2
- package/dist/constants/platform.js +1 -41
- package/dist/constants/platform.js.map +2 -2
- package/dist/constants/process.js +1 -52
- package/dist/constants/process.js.map +2 -2
- package/dist/constants/socket.js +1 -81
- package/dist/constants/socket.js.map +2 -2
- package/dist/constants/testing.js +1 -36
- package/dist/constants/testing.js.map +2 -2
- package/dist/constants/time.js +1 -39
- package/dist/constants/time.js.map +2 -2
- package/dist/constants/typescript.js +1 -54
- package/dist/constants/typescript.js.map +2 -2
- package/dist/cover/code.js +1 -135
- package/dist/cover/code.js.map +2 -2
- package/dist/cover/formatters.js +11 -101
- package/dist/cover/formatters.js.map +2 -2
- package/dist/cover/type.js +1 -63
- package/dist/cover/type.js.map +2 -2
- package/dist/cover/types.js +1 -15
- package/dist/cover/types.js.map +2 -2
- package/dist/debug.js +2 -343
- package/dist/debug.js.map +2 -2
- package/dist/dlx-binary.js +1 -259
- package/dist/dlx-binary.js.map +2 -2
- package/dist/dlx-package.js +1 -149
- package/dist/dlx-package.js.map +2 -2
- package/dist/dlx.js +1 -166
- package/dist/dlx.js.map +2 -2
- package/dist/download-lock.js +1 -137
- package/dist/download-lock.js.map +2 -2
- package/dist/effects/pulse-frames.js +1 -64
- package/dist/effects/pulse-frames.js.map +2 -2
- package/dist/effects/text-shimmer.js +1 -174
- package/dist/effects/text-shimmer.js.map +2 -2
- package/dist/effects/types.js +1 -15
- package/dist/effects/types.js.map +2 -2
- package/dist/effects/ultra.js +1 -61
- package/dist/effects/ultra.js.map +2 -2
- package/dist/env/appdata.js +1 -28
- package/dist/env/appdata.js.map +2 -2
- package/dist/env/ci.js +1 -29
- package/dist/env/ci.js.map +2 -2
- package/dist/env/comspec.js +1 -28
- package/dist/env/comspec.js.map +2 -2
- package/dist/env/debug.js +1 -28
- package/dist/env/debug.js.map +2 -2
- package/dist/env/getters.js +1 -281
- package/dist/env/getters.js.map +2 -2
- package/dist/env/github-api-url.js +1 -28
- package/dist/env/github-api-url.js.map +2 -2
- package/dist/env/github-base-ref.js +1 -28
- package/dist/env/github-base-ref.js.map +2 -2
- package/dist/env/github-ref-name.js +1 -28
- package/dist/env/github-ref-name.js.map +2 -2
- package/dist/env/github-ref-type.js +1 -28
- package/dist/env/github-ref-type.js.map +2 -2
- package/dist/env/github-repository.js +1 -28
- package/dist/env/github-repository.js.map +2 -2
- package/dist/env/github-server-url.js +1 -28
- package/dist/env/github-server-url.js.map +2 -2
- package/dist/env/github-token.js +1 -28
- package/dist/env/github-token.js.map +2 -2
- package/dist/env/helpers.js +1 -47
- package/dist/env/helpers.js.map +2 -2
- package/dist/env/home.js +1 -28
- package/dist/env/home.js.map +2 -2
- package/dist/env/jest-worker-id.js +1 -28
- package/dist/env/jest-worker-id.js.map +2 -2
- package/dist/env/lang.js +1 -28
- package/dist/env/lang.js.map +2 -2
- package/dist/env/lc-all.js +1 -28
- package/dist/env/lc-all.js.map +2 -2
- package/dist/env/lc-messages.js +1 -28
- package/dist/env/lc-messages.js.map +2 -2
- package/dist/env/localappdata.js +1 -28
- package/dist/env/localappdata.js.map +2 -2
- package/dist/env/node-auth-token.js +1 -28
- package/dist/env/node-auth-token.js.map +2 -2
- package/dist/env/node-env.js +1 -28
- package/dist/env/node-env.js.map +2 -2
- package/dist/env/npm-config-registry.js +1 -28
- package/dist/env/npm-config-registry.js.map +2 -2
- package/dist/env/npm-config-user-agent.js +1 -28
- package/dist/env/npm-config-user-agent.js.map +2 -2
- package/dist/env/npm-lifecycle-event.js +1 -28
- package/dist/env/npm-lifecycle-event.js.map +2 -2
- package/dist/env/npm-registry.js +1 -28
- package/dist/env/npm-registry.js.map +2 -2
- package/dist/env/npm-token.js +1 -28
- package/dist/env/npm-token.js.map +2 -2
- package/dist/env/path.js +1 -28
- package/dist/env/path.js.map +2 -2
- package/dist/env/pre-commit.js +1 -29
- package/dist/env/pre-commit.js.map +2 -2
- package/dist/env/shell.js +1 -28
- package/dist/env/shell.js.map +2 -2
- package/dist/env/socket-accept-risks.js +1 -29
- package/dist/env/socket-accept-risks.js.map +2 -2
- package/dist/env/socket-api-base-url.js +1 -28
- package/dist/env/socket-api-base-url.js.map +2 -2
- package/dist/env/socket-api-proxy.js +1 -28
- package/dist/env/socket-api-proxy.js.map +2 -2
- package/dist/env/socket-api-timeout.js +1 -29
- package/dist/env/socket-api-timeout.js.map +2 -2
- package/dist/env/socket-api-token.js +1 -28
- package/dist/env/socket-api-token.js.map +2 -2
- package/dist/env/socket-cacache-dir.js +1 -28
- package/dist/env/socket-cacache-dir.js.map +2 -2
- package/dist/env/socket-cli-accept-risks.js +1 -31
- package/dist/env/socket-cli-accept-risks.js.map +2 -2
- package/dist/env/socket-cli-api-base-url.js +1 -28
- package/dist/env/socket-cli-api-base-url.js.map +2 -2
- package/dist/env/socket-cli-api-proxy.js +1 -28
- package/dist/env/socket-cli-api-proxy.js.map +2 -2
- package/dist/env/socket-cli-api-timeout.js +1 -29
- package/dist/env/socket-cli-api-timeout.js.map +2 -2
- package/dist/env/socket-cli-api-token.js +1 -28
- package/dist/env/socket-cli-api-token.js.map +2 -2
- package/dist/env/socket-cli-config.js +1 -28
- package/dist/env/socket-cli-config.js.map +2 -2
- package/dist/env/socket-cli-fix.js +1 -28
- package/dist/env/socket-cli-fix.js.map +2 -2
- package/dist/env/socket-cli-no-api-token.js +1 -31
- package/dist/env/socket-cli-no-api-token.js.map +2 -2
- package/dist/env/socket-cli-optimize.js +1 -29
- package/dist/env/socket-cli-optimize.js.map +2 -2
- package/dist/env/socket-cli-org-slug.js +1 -28
- package/dist/env/socket-cli-org-slug.js.map +2 -2
- package/dist/env/socket-cli-shadow-accept-risks.js +1 -31
- package/dist/env/socket-cli-shadow-accept-risks.js.map +2 -2
- package/dist/env/socket-cli-shadow-api-token.js +1 -28
- package/dist/env/socket-cli-shadow-api-token.js.map +2 -2
- package/dist/env/socket-cli-shadow-bin.js +1 -28
- package/dist/env/socket-cli-shadow-bin.js.map +2 -2
- package/dist/env/socket-cli-shadow-progress.js +1 -31
- package/dist/env/socket-cli-shadow-progress.js.map +2 -2
- package/dist/env/socket-cli-shadow-silent.js +1 -31
- package/dist/env/socket-cli-shadow-silent.js.map +2 -2
- package/dist/env/socket-cli-view-all-risks.js +1 -31
- package/dist/env/socket-cli-view-all-risks.js.map +2 -2
- package/dist/env/socket-config.js +1 -28
- package/dist/env/socket-config.js.map +2 -2
- package/dist/env/socket-debug.js +1 -28
- package/dist/env/socket-debug.js.map +2 -2
- package/dist/env/socket-home.js +1 -28
- package/dist/env/socket-home.js.map +2 -2
- package/dist/env/socket-no-api-token.js +1 -29
- package/dist/env/socket-no-api-token.js.map +2 -2
- package/dist/env/socket-npm-registry.js +1 -28
- package/dist/env/socket-npm-registry.js.map +2 -2
- package/dist/env/socket-org-slug.js +1 -28
- package/dist/env/socket-org-slug.js.map +2 -2
- package/dist/env/socket-registry-url.js +1 -28
- package/dist/env/socket-registry-url.js.map +2 -2
- package/dist/env/socket-view-all-risks.js +1 -29
- package/dist/env/socket-view-all-risks.js.map +2 -2
- package/dist/env/temp.js +1 -28
- package/dist/env/temp.js.map +2 -2
- package/dist/env/term.js +1 -28
- package/dist/env/term.js.map +2 -2
- package/dist/env/tmp.js +1 -28
- package/dist/env/tmp.js.map +2 -2
- package/dist/env/tmpdir.js +1 -28
- package/dist/env/tmpdir.js.map +2 -2
- package/dist/env/userprofile.js +1 -28
- package/dist/env/userprofile.js.map +2 -2
- package/dist/env/vitest.js +1 -29
- package/dist/env/vitest.js.map +2 -2
- package/dist/env/xdg-cache-home.js +1 -28
- package/dist/env/xdg-cache-home.js.map +2 -2
- package/dist/env/xdg-config-home.js +1 -28
- package/dist/env/xdg-config-home.js.map +2 -2
- package/dist/env/xdg-data-home.js +1 -28
- package/dist/env/xdg-data-home.js.map +2 -2
- package/dist/env.js +1 -61
- package/dist/env.js.map +2 -2
- package/dist/fs.js +3 -626
- package/dist/fs.js.map +2 -2
- package/dist/functions.js +1 -68
- package/dist/functions.js.map +2 -2
- package/dist/git.js +2 -320
- package/dist/git.js.map +2 -2
- package/dist/github.js +1 -201
- package/dist/github.js.map +2 -2
- package/dist/globs.js +1 -152
- package/dist/globs.js.map +2 -2
- package/dist/http-request.js +1 -313
- package/dist/http-request.js.map +2 -2
- package/dist/index.js +1 -62
- package/dist/index.js.map +2 -2
- package/dist/ipc.js +1 -232
- package/dist/ipc.js.map +2 -2
- package/dist/json.js +1 -73
- package/dist/json.js.map +2 -2
- package/dist/logger.js +1 -1254
- package/dist/logger.js.map +2 -2
- package/dist/maintained-node-versions.js +1 -35
- package/dist/maintained-node-versions.js.map +2 -2
- package/dist/memoization.js +1 -210
- package/dist/memoization.js.map +2 -2
- package/dist/objects.d.ts +0 -3
- package/dist/objects.js +1 -319
- package/dist/objects.js.map +3 -3
- package/dist/packages/editable.js +9 -356
- package/dist/packages/editable.js.map +2 -2
- package/dist/packages/exports.js +1 -162
- package/dist/packages/exports.js.map +2 -2
- package/dist/packages/isolation.js +1 -195
- package/dist/packages/isolation.js.map +2 -2
- package/dist/packages/licenses.js +1 -214
- package/dist/packages/licenses.js.map +2 -2
- package/dist/packages/manifest.js +1 -190
- package/dist/packages/manifest.js.map +2 -2
- package/dist/packages/normalize.js +1 -120
- package/dist/packages/normalize.js.map +2 -2
- package/dist/packages/operations.js +1 -304
- package/dist/packages/operations.js.map +2 -2
- package/dist/packages/paths.js +1 -53
- package/dist/packages/paths.js.map +2 -2
- package/dist/packages/provenance.js +1 -178
- package/dist/packages/provenance.js.map +2 -2
- package/dist/packages/registry.js +1 -28
- package/dist/packages/registry.js.map +2 -2
- package/dist/packages/specs.js +1 -83
- package/dist/packages/specs.js.map +2 -2
- package/dist/packages/validation.js +1 -51
- package/dist/packages/validation.js.map +2 -2
- package/dist/packages.js +1 -129
- package/dist/packages.js.map +2 -2
- package/dist/path.js +1 -448
- package/dist/path.js.map +2 -2
- package/dist/paths.js +1 -143
- package/dist/paths.js.map +2 -2
- package/dist/performance.js +15 -216
- package/dist/performance.js.map +2 -2
- package/dist/promise-queue.js +1 -109
- package/dist/promise-queue.js.map +2 -2
- package/dist/promises.js +1 -269
- package/dist/promises.js.map +2 -2
- package/dist/prompts.js +1 -58
- package/dist/prompts.js.map +2 -2
- package/dist/regexps.js +1 -30
- package/dist/regexps.js.map +2 -2
- package/dist/sea.js +1 -44
- package/dist/sea.js.map +2 -2
- package/dist/shadow.js +1 -58
- package/dist/shadow.js.map +2 -2
- package/dist/signal-exit.js +1 -248
- package/dist/signal-exit.js.map +2 -2
- package/dist/sorts.js +1 -94
- package/dist/sorts.js.map +2 -2
- package/dist/spawn.js +1 -199
- package/dist/spawn.js.map +2 -2
- package/dist/spinner.js +1 -865
- package/dist/spinner.js.map +2 -2
- package/dist/ssri.js +1 -71
- package/dist/ssri.js.map +2 -2
- package/dist/stdio/clear.js +1 -82
- package/dist/stdio/clear.js.map +2 -2
- package/dist/stdio/divider.js +3 -89
- package/dist/stdio/divider.js.map +2 -2
- package/dist/stdio/footer.js +2 -94
- package/dist/stdio/footer.js.map +2 -2
- package/dist/stdio/header.js +2 -100
- package/dist/stdio/header.js.map +2 -2
- package/dist/stdio/mask.js +5 -206
- package/dist/stdio/mask.js.map +2 -2
- package/dist/stdio/progress.js +2 -209
- package/dist/stdio/progress.js.map +2 -2
- package/dist/stdio/prompts.js +1 -88
- package/dist/stdio/prompts.js.map +2 -2
- package/dist/stdio/stderr.js +2 -89
- package/dist/stdio/stderr.js.map +2 -2
- package/dist/stdio/stdout.js +2 -103
- package/dist/stdio/stdout.js.map +2 -2
- package/dist/streams.js +1 -78
- package/dist/streams.js.map +2 -2
- package/dist/strings.js +3 -251
- package/dist/strings.js.map +2 -2
- package/dist/suppress-warnings.js +1 -98
- package/dist/suppress-warnings.js.map +2 -2
- package/dist/tables.js +3 -128
- package/dist/tables.js.map +2 -2
- package/dist/temporary-executor.js +1 -53
- package/dist/temporary-executor.js.map +2 -2
- package/dist/types.js +1 -72
- package/dist/types.js.map +2 -2
- package/dist/url.js +1 -142
- package/dist/url.js.map +2 -2
- package/dist/utils/get-ipc.js +1 -58
- package/dist/utils/get-ipc.js.map +2 -2
- package/dist/validation/json-parser.js +1 -127
- package/dist/validation/json-parser.js.map +2 -2
- package/dist/validation/types.js +1 -15
- package/dist/validation/types.js.map +2 -2
- package/dist/versions.js +1 -153
- package/dist/versions.js.map +2 -2
- package/dist/words.js +1 -50
- package/dist/words.js.map +2 -2
- package/dist/zod.js +1 -27
- package/dist/zod.js.map +2 -2
- package/package.json +1 -1
package/dist/prompts.js
CHANGED
|
@@ -1,60 +1,3 @@
|
|
|
1
1
|
/* Socket Lib - Built with esbuild */
|
|
2
|
-
var
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var prompts_exports = {};
|
|
30
|
-
__export(prompts_exports, {
|
|
31
|
-
confirm: () => import_confirm.default,
|
|
32
|
-
createSeparator: () => createSeparator,
|
|
33
|
-
input: () => import_input.default,
|
|
34
|
-
password: () => import_password.default,
|
|
35
|
-
search: () => import_search.default,
|
|
36
|
-
select: () => import_select.default
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(prompts_exports);
|
|
39
|
-
var import_confirm = __toESM(require('./external/@inquirer/confirm'));
|
|
40
|
-
var import_input = __toESM(require('./external/@inquirer/input'));
|
|
41
|
-
var import_password = __toESM(require('./external/@inquirer/password'));
|
|
42
|
-
var import_search = __toESM(require('./external/@inquirer/search'));
|
|
43
|
-
var import_select = __toESM(require('./external/@inquirer/select'));
|
|
44
|
-
function createSeparator(text) {
|
|
45
|
-
return {
|
|
46
|
-
type: "separator",
|
|
47
|
-
separator: text || "\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
48
|
-
line: text || "\u2500\u2500\u2500\u2500\u2500\u2500\u2500"
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
-
0 && (module.exports = {
|
|
53
|
-
confirm,
|
|
54
|
-
createSeparator,
|
|
55
|
-
input,
|
|
56
|
-
password,
|
|
57
|
-
search,
|
|
58
|
-
select
|
|
59
|
-
});
|
|
2
|
+
var d=Object.create;var s=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var S=(r,e)=>{for(var t in e)s(r,t,{get:e[t],enumerable:!0})},p=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of m(e))!h.call(r,a)&&a!==t&&s(r,a,{get:()=>e[a],enumerable:!(n=g(e,a))||n.enumerable});return r};var o=(r,e,t)=>(t=r!=null?d(x(r)):{},p(e||!r||!r.__esModule?s(t,"default",{value:r,enumerable:!0}):t,r)),b=r=>p(s({},"__esModule",{value:!0}),r);var y={};S(y,{confirm:()=>i.default,createSeparator:()=>w,input:()=>f.default,password:()=>l.default,search:()=>u.default,select:()=>c.default});module.exports=b(y);var i=o(require('./external/@inquirer/confirm')),f=o(require('./external/@inquirer/input')),l=o(require('./external/@inquirer/password')),u=o(require('./external/@inquirer/search')),c=o(require('./external/@inquirer/select'));function w(r){return{type:"separator",separator:r||"\u2500\u2500\u2500\u2500\u2500\u2500\u2500",line:r||"\u2500\u2500\u2500\u2500\u2500\u2500\u2500"}}0&&(module.exports={confirm,createSeparator,input,password,search,select});
|
|
60
3
|
//# sourceMappingURL=prompts.js.map
|
package/dist/prompts.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/prompts.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * @fileoverview Interactive prompt utilities for CLI applications.\n * Re-exports commonly used prompt functions from inquirer packages.\n */\n\nexport { default as confirm } from '@inquirer/confirm'\nexport { default as input } from '@inquirer/input'\nexport { default as password } from '@inquirer/password'\nexport { default as search } from '@inquirer/search'\nexport { default as select } from '@inquirer/select'\n\n// Export types - Choice is a type interface, not a direct export\nexport interface Choice<Value = unknown> {\n value: Value\n name?: string\n description?: string\n short?: string\n disabled?: boolean | string\n}\n\n// Create a Separator type that matches the expected interface\nexport interface Separator {\n type: 'separator'\n separator?: string\n line?: string\n}\n\n/**\n * Create a separator for select prompts.\n */\nexport function createSeparator(text?: string): Separator {\n return {\n type: 'separator',\n separator: text || '\u2500\u2500\u2500\u2500\u2500\u2500\u2500',\n line: text || '\u2500\u2500\u2500\u2500\u2500\u2500\u2500',\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";6iBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,2CAAAE,EAAA,sGAAAC,EAAAH,GAKA,IAAAI,EAAmC,gCACnCC,EAAiC,8BACjCC,EAAoC,iCACpCC,EAAkC,+BAClCC,EAAkC,+BAqB3B,SAASN,EAAgBO,EAA0B,CACxD,MAAO,CACL,KAAM,YACN,UAAWA,GAAQ,6CACnB,KAAMA,GAAQ,4CAChB,CACF",
|
|
6
|
+
"names": ["prompts_exports", "__export", "createSeparator", "__toCommonJS", "import_confirm", "import_input", "import_password", "import_search", "import_select", "text"]
|
|
7
7
|
}
|
package/dist/regexps.js
CHANGED
|
@@ -1,32 +1,3 @@
|
|
|
1
1
|
/* Socket Lib - Built with esbuild */
|
|
2
|
-
var
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var regexps_exports = {};
|
|
20
|
-
__export(regexps_exports, {
|
|
21
|
-
escapeRegExp: () => escapeRegExp
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(regexps_exports);
|
|
24
|
-
// @__NO_SIDE_EFFECTS__
|
|
25
|
-
function escapeRegExp(str) {
|
|
26
|
-
return str.replace(/[\\|{}()[\]^$+*?.]/g, "\\$&");
|
|
27
|
-
}
|
|
28
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
-
0 && (module.exports = {
|
|
30
|
-
escapeRegExp
|
|
31
|
-
});
|
|
2
|
+
var g=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var a=(e,r)=>{for(var t in r)g(e,t,{get:r[t],enumerable:!0})},o=(e,r,t,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of i(r))!s.call(e,n)&&n!==t&&g(e,n,{get:()=>r[n],enumerable:!(p=c(r,n))||p.enumerable});return e};var u=e=>o(g({},"__esModule",{value:!0}),e);var $={};a($,{escapeRegExp:()=>x});module.exports=u($);function x(e){return e.replace(/[\\|{}()[\]^$+*?.]/g,"\\$&")}0&&(module.exports={escapeRegExp});
|
|
32
3
|
//# sourceMappingURL=regexps.js.map
|
package/dist/regexps.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/regexps.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * @fileoverview Regular expression utilities including escape-string-regexp implementation.\n * Provides regex escaping and pattern matching helpers.\n */\n\n// Inlined escape-string-regexp:\n// https://socket.dev/npm/package/escape-string-regexp/overview/5.0.0\n// MIT License\n// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)\n\n/**\n * Escape special characters in a string for use in a regular expression.\n */\n/*@__NO_SIDE_EFFECTS__*/\nexport function escapeRegExp(str: string): string {\n // Escape characters with special meaning either inside or outside character sets.\n // Use a simple backslash escape when it's always valid, and a `\\xnn` escape when\n // the simpler form would be disallowed by Unicode patterns' stricter grammar.\n return str.replace(/[\\\\|{}()[\\]^$+*?.]/g, '\\\\$&')\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,IAAA,eAAAC,EAAAH,GAcO,SAASE,EAAaE,EAAqB,CAIhD,OAAOA,EAAI,QAAQ,sBAAuB,MAAM,CAClD",
|
|
6
|
+
"names": ["regexps_exports", "__export", "escapeRegExp", "__toCommonJS", "str"]
|
|
7
7
|
}
|
package/dist/sea.js
CHANGED
|
@@ -1,46 +1,3 @@
|
|
|
1
1
|
/* Socket Lib - Built with esbuild */
|
|
2
|
-
var
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var sea_exports = {};
|
|
20
|
-
__export(sea_exports, {
|
|
21
|
-
getSeaBinaryPath: () => getSeaBinaryPath,
|
|
22
|
-
isSeaBinary: () => isSeaBinary
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(sea_exports);
|
|
25
|
-
var import_path = require("./path");
|
|
26
|
-
let _isSea;
|
|
27
|
-
function getSeaBinaryPath() {
|
|
28
|
-
return isSeaBinary() && process.argv[0] ? (0, import_path.normalizePath)(process.argv[0]) : void 0;
|
|
29
|
-
}
|
|
30
|
-
function isSeaBinary() {
|
|
31
|
-
if (_isSea === void 0) {
|
|
32
|
-
try {
|
|
33
|
-
const seaModule = require("node:sea");
|
|
34
|
-
_isSea = seaModule.isSea();
|
|
35
|
-
} catch {
|
|
36
|
-
_isSea = false;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return _isSea ?? false;
|
|
40
|
-
}
|
|
41
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
-
0 && (module.exports = {
|
|
43
|
-
getSeaBinaryPath,
|
|
44
|
-
isSeaBinary
|
|
45
|
-
});
|
|
2
|
+
var o=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(n,e)=>{for(var a in e)o(n,a,{get:e[a],enumerable:!0})},p=(n,e,a,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of f(e))!l.call(n,r)&&r!==a&&o(n,r,{get:()=>e[r],enumerable:!(t=d(e,r))||t.enumerable});return n};var g=n=>p(o({},"__esModule",{value:!0}),n);var h={};c(h,{getSeaBinaryPath:()=>S,isSeaBinary:()=>u});module.exports=g(h);var s=require("./path");let i;function S(){return u()&&process.argv[0]?(0,s.normalizePath)(process.argv[0]):void 0}function u(){if(i===void 0)try{i=require("node:sea").isSea()}catch{i=!1}return i??!1}0&&(module.exports={getSeaBinaryPath,isSeaBinary});
|
|
46
3
|
//# sourceMappingURL=sea.js.map
|
package/dist/sea.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/sea.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * @fileoverview SEA (Single Executable Application) detection utilities for Socket ecosystem.\n * Provides reliable detection of whether the current process is running\n * as a Node.js Single Executable Application.\n */\n\nimport { normalizePath } from './path'\n\n/**\n * Cached SEA detection result.\n */\nlet _isSea: boolean | undefined\n\n/**\n * Get the current SEA binary path.\n * Only valid when running as a SEA binary.\n */\nexport function getSeaBinaryPath(): string | undefined {\n return isSeaBinary() && process.argv[0]\n ? normalizePath(process.argv[0])\n : undefined\n}\n\n/**\n * Detect if the current process is running as a SEA binary.\n * Uses Node.js 24+ native API with caching for performance.\n */\nexport function isSeaBinary(): boolean {\n if (_isSea === undefined) {\n try {\n // Use Node.js 24+ native SEA detection API.\n // eslint-disable-next-line n/no-unsupported-features/node-builtins\n const seaModule = require('node:sea')\n _isSea = seaModule.isSea()\n } catch {\n // Node.js < 24 or SEA module not available.\n _isSea = false\n }\n }\n return _isSea ?? false\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,EAAA,gBAAAC,IAAA,eAAAC,EAAAJ,GAMA,IAAAK,EAA8B,kBAK9B,IAAIC,EAMG,SAASJ,GAAuC,CACrD,OAAOC,EAAY,GAAK,QAAQ,KAAK,CAAC,KAClC,iBAAc,QAAQ,KAAK,CAAC,CAAC,EAC7B,MACN,CAMO,SAASA,GAAuB,CACrC,GAAIG,IAAW,OACb,GAAI,CAIFA,EADkB,QAAQ,UAAU,EACjB,MAAM,CAC3B,MAAQ,CAENA,EAAS,EACX,CAEF,OAAOA,GAAU,EACnB",
|
|
6
|
+
"names": ["sea_exports", "__export", "getSeaBinaryPath", "isSeaBinary", "__toCommonJS", "import_path", "_isSea"]
|
|
7
7
|
}
|
package/dist/shadow.js
CHANGED
|
@@ -1,60 +1,3 @@
|
|
|
1
1
|
/* Socket Lib - Built with esbuild */
|
|
2
|
-
var
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var shadow_exports = {};
|
|
20
|
-
__export(shadow_exports, {
|
|
21
|
-
shouldSkipShadow: () => shouldSkipShadow
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(shadow_exports);
|
|
24
|
-
var import_path = require("./path");
|
|
25
|
-
function shouldSkipShadow(binPath, options) {
|
|
26
|
-
const { cwd = process.cwd(), win32 = false } = {
|
|
27
|
-
__proto__: null,
|
|
28
|
-
...options
|
|
29
|
-
};
|
|
30
|
-
if (win32 && binPath) {
|
|
31
|
-
return true;
|
|
32
|
-
}
|
|
33
|
-
const userAgent = process.env["npm_config_user_agent"];
|
|
34
|
-
if (userAgent?.includes("exec") || userAgent?.includes("npx") || userAgent?.includes("dlx")) {
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
const normalizedCwd = (0, import_path.normalizePath)(cwd);
|
|
38
|
-
const npmCache = process.env["npm_config_cache"];
|
|
39
|
-
if (npmCache && normalizedCwd.includes((0, import_path.normalizePath)(npmCache))) {
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
const tempPatterns = [
|
|
43
|
-
// npm's npx cache directory
|
|
44
|
-
"_npx",
|
|
45
|
-
// pnpm dlx temporary store
|
|
46
|
-
".pnpm-store",
|
|
47
|
-
// Common dlx directory prefix
|
|
48
|
-
"dlx-",
|
|
49
|
-
// Yarn Berry PnP virtual packages.
|
|
50
|
-
".yarn/$$",
|
|
51
|
-
// Yarn on Windows uses normalized forward slash paths.
|
|
52
|
-
"AppData/Local/Temp/xfs-"
|
|
53
|
-
];
|
|
54
|
-
return tempPatterns.some((pattern) => normalizedCwd.includes(pattern));
|
|
55
|
-
}
|
|
56
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
-
0 && (module.exports = {
|
|
58
|
-
shouldSkipShadow
|
|
59
|
-
});
|
|
2
|
+
var r=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var f=(e,n)=>{for(var o in n)r(e,o,{get:n[o],enumerable:!0})},m=(e,n,o,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of l(n))!u.call(e,t)&&t!==o&&r(e,t,{get:()=>n[t],enumerable:!(s=p(n,t))||s.enumerable});return e};var w=e=>m(r({},"__esModule",{value:!0}),e);var h={};f(h,{shouldSkipShadow:()=>_});module.exports=w(h);var i=require("./path");function _(e,n){const{cwd:o=process.cwd(),win32:s=!1}={__proto__:null,...n};if(s&&e)return!0;const t=process.env.npm_config_user_agent;if(t?.includes("exec")||t?.includes("npx")||t?.includes("dlx"))return!0;const a=(0,i.normalizePath)(o),c=process.env.npm_config_cache;return c&&a.includes((0,i.normalizePath)(c))?!0:["_npx",".pnpm-store","dlx-",".yarn/$$","AppData/Local/Temp/xfs-"].some(d=>a.includes(d))}0&&(module.exports={shouldSkipShadow});
|
|
60
3
|
//# sourceMappingURL=shadow.js.map
|
package/dist/shadow.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/shadow.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * @fileoverview Shadow binary installation utilities for Socket ecosystem.\n * Provides logic to determine when shadow binary installation should be skipped.\n */\n\nimport { normalizePath } from './path'\n\nexport interface ShadowInstallationOptions {\n cwd?: string | undefined\n win32?: boolean | undefined\n}\n\n/**\n * Determines if shadow binaries should be installed.\n * Shadows should NOT be installed when:\n * - Running in a temporary execution context (exec/npx/dlx)\n * - On Windows with an existing binary path (required for Windows to function)\n *\n * @param binPath - Path to the binary being shadowed\n * @param options - Configuration options\n * @param options.cwd - Current working directory path to check\n * @param options.win32 - Whether running on Windows\n * @returns true if shadow installation should be skipped\n */\nexport function shouldSkipShadow(\n binPath: string,\n options?: ShadowInstallationOptions | undefined,\n): boolean {\n const { cwd = process.cwd(), win32 = false } = {\n __proto__: null,\n ...options,\n } as ShadowInstallationOptions\n\n // Windows compatibility: Skip shadow installation if binary is already found.\n //\n // This check is required because Windows handles executables differently than Unix:\n // 1. File locking - Windows locks running executables, so cmd-shim creation would\n // fail with EBUSY/EACCES errors when trying to create wrapper files.\n // 2. PATH conflicts - Attempting to shadow an already-resolved binary can create\n // circular references or ambiguous command resolution.\n // 3. Registry integration - Windows package managers often use system-level\n // integrations beyond just PATH that our shadowing would interfere with.\n //\n // Without this check, users would see \"Access Denied\" or file locking errors\n // that are difficult to debug. This is not a performance optimization - the\n // shadow installation will fail without it.\n if (win32 && binPath) {\n return true\n }\n\n // Check environment variable for exec/npx/dlx indicators.\n const userAgent = process.env['npm_config_user_agent']\n if (\n userAgent?.includes('exec') ||\n userAgent?.includes('npx') ||\n userAgent?.includes('dlx')\n ) {\n return true\n }\n\n // Normalize the cwd path for consistent checking across platforms.\n const normalizedCwd = normalizePath(cwd)\n\n // Check if running from npm's npx cache.\n const npmCache = process.env['npm_config_cache']\n if (npmCache && normalizedCwd.includes(normalizePath(npmCache))) {\n return true\n }\n\n // Check common temporary execution path patterns.\n const tempPatterns = [\n // npm's npx cache directory\n '_npx',\n // pnpm dlx temporary store\n '.pnpm-store',\n // Common dlx directory prefix\n 'dlx-',\n // Yarn Berry PnP virtual packages.\n '.yarn/$$',\n // Yarn on Windows uses normalized forward slash paths.\n 'AppData/Local/Temp/xfs-',\n ]\n\n return tempPatterns.some(pattern => normalizedCwd.includes(pattern))\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAKA,IAAAI,EAA8B,kBAmBvB,SAASF,EACdG,EACAC,EACS,CACT,KAAM,CAAE,IAAAC,EAAM,QAAQ,IAAI,EAAG,MAAAC,EAAQ,EAAM,EAAI,CAC7C,UAAW,KACX,GAAGF,CACL,EAeA,GAAIE,GAASH,EACX,MAAO,GAIT,MAAMI,EAAY,QAAQ,IAAI,sBAC9B,GACEA,GAAW,SAAS,MAAM,GAC1BA,GAAW,SAAS,KAAK,GACzBA,GAAW,SAAS,KAAK,EAEzB,MAAO,GAIT,MAAMC,KAAgB,iBAAcH,CAAG,EAGjCI,EAAW,QAAQ,IAAI,iBAC7B,OAAIA,GAAYD,EAAc,YAAS,iBAAcC,CAAQ,CAAC,EACrD,GAIY,CAEnB,OAEA,cAEA,OAEA,WAEA,yBACF,EAEoB,KAAKC,GAAWF,EAAc,SAASE,CAAO,CAAC,CACrE",
|
|
6
|
+
"names": ["shadow_exports", "__export", "shouldSkipShadow", "__toCommonJS", "import_path", "binPath", "options", "cwd", "win32", "userAgent", "normalizedCwd", "npmCache", "pattern"]
|
|
7
7
|
}
|
package/dist/signal-exit.js
CHANGED
|
@@ -1,250 +1,3 @@
|
|
|
1
1
|
/* Socket Lib - Built with esbuild */
|
|
2
|
-
var
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var signal_exit_exports = {};
|
|
20
|
-
__export(signal_exit_exports, {
|
|
21
|
-
load: () => load,
|
|
22
|
-
onExit: () => onExit,
|
|
23
|
-
signals: () => signals,
|
|
24
|
-
unload: () => unload
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(signal_exit_exports);
|
|
27
|
-
const ReflectApply = Reflect.apply;
|
|
28
|
-
const globalProcess = globalThis.process;
|
|
29
|
-
const originalProcessEmit = globalProcess?.emit;
|
|
30
|
-
const platform = globalProcess?.platform ?? "";
|
|
31
|
-
const originalProcessReallyExit = globalProcess?.reallyExit;
|
|
32
|
-
const WIN32 = platform === "win32";
|
|
33
|
-
let _events;
|
|
34
|
-
// @__NO_SIDE_EFFECTS__
|
|
35
|
-
function getEvents() {
|
|
36
|
-
if (_events === void 0) {
|
|
37
|
-
_events = require("node:events");
|
|
38
|
-
}
|
|
39
|
-
return _events;
|
|
40
|
-
}
|
|
41
|
-
let _emitter;
|
|
42
|
-
// @__NO_SIDE_EFFECTS__
|
|
43
|
-
function getEmitter() {
|
|
44
|
-
if (_emitter === void 0) {
|
|
45
|
-
if (globalProcess?.__signal_exit_emitter__) {
|
|
46
|
-
_emitter = globalProcess.__signal_exit_emitter__;
|
|
47
|
-
} else if (globalProcess) {
|
|
48
|
-
const EventEmitter = (/* @__PURE__ */ getEvents()).EventEmitter;
|
|
49
|
-
_emitter = globalProcess.__signal_exit_emitter__ = new EventEmitter();
|
|
50
|
-
_emitter.count = 0;
|
|
51
|
-
_emitter.emitted = { __proto__: null };
|
|
52
|
-
}
|
|
53
|
-
if (_emitter && !_emitter.infinite) {
|
|
54
|
-
_emitter.setMaxListeners(Number.POSITIVE_INFINITY);
|
|
55
|
-
_emitter.infinite = true;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return _emitter;
|
|
59
|
-
}
|
|
60
|
-
let _sigListeners;
|
|
61
|
-
// @__NO_SIDE_EFFECTS__
|
|
62
|
-
function getSignalListeners() {
|
|
63
|
-
if (_sigListeners === void 0) {
|
|
64
|
-
_sigListeners = { __proto__: null };
|
|
65
|
-
const emitter = /* @__PURE__ */ getEmitter();
|
|
66
|
-
const sigs = /* @__PURE__ */ getSignals();
|
|
67
|
-
for (const sig of sigs) {
|
|
68
|
-
_sigListeners[sig] = function listener() {
|
|
69
|
-
const listeners = globalProcess?.listeners(sig) || [];
|
|
70
|
-
if (listeners.length === emitter.count) {
|
|
71
|
-
/* @__PURE__ */ unload();
|
|
72
|
-
/* @__PURE__ */ emit("exit", null, sig);
|
|
73
|
-
/* @__PURE__ */ emit("afterexit", null, sig);
|
|
74
|
-
const killSig = WIN32 && sig === "SIGHUP" ? "SIGINT" : sig;
|
|
75
|
-
globalProcess?.kill(globalProcess?.pid, killSig);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return _sigListeners;
|
|
81
|
-
}
|
|
82
|
-
let _signals;
|
|
83
|
-
// @__NO_SIDE_EFFECTS__
|
|
84
|
-
function getSignals() {
|
|
85
|
-
if (_signals === void 0) {
|
|
86
|
-
_signals = ["SIGABRT", "SIGALRM", "SIGHUP", "SIGINT", "SIGTERM"];
|
|
87
|
-
if (!WIN32) {
|
|
88
|
-
_signals.push(
|
|
89
|
-
"SIGVTALRM",
|
|
90
|
-
"SIGXCPU",
|
|
91
|
-
"SIGXFSZ",
|
|
92
|
-
"SIGUSR2",
|
|
93
|
-
"SIGTRAP",
|
|
94
|
-
"SIGSYS",
|
|
95
|
-
"SIGQUIT",
|
|
96
|
-
"SIGIOT"
|
|
97
|
-
// should detect profiler and enable/disable accordingly.
|
|
98
|
-
// see #21
|
|
99
|
-
// 'SIGPROF'
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
if (platform === "linux") {
|
|
103
|
-
_signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED");
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return _signals;
|
|
107
|
-
}
|
|
108
|
-
// @__NO_SIDE_EFFECTS__
|
|
109
|
-
function emit(event, code, signal) {
|
|
110
|
-
const emitter = /* @__PURE__ */ getEmitter();
|
|
111
|
-
if (emitter.emitted?.[event]) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
if (emitter.emitted) {
|
|
115
|
-
emitter.emitted[event] = true;
|
|
116
|
-
}
|
|
117
|
-
emitter.emit(event, code, signal);
|
|
118
|
-
}
|
|
119
|
-
let loaded = false;
|
|
120
|
-
// @__NO_SIDE_EFFECTS__
|
|
121
|
-
function load() {
|
|
122
|
-
if (loaded || !globalProcess) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
loaded = true;
|
|
126
|
-
const emitter = /* @__PURE__ */ getEmitter();
|
|
127
|
-
if (emitter.count !== void 0) {
|
|
128
|
-
emitter.count += 1;
|
|
129
|
-
}
|
|
130
|
-
const sigs = /* @__PURE__ */ getSignals();
|
|
131
|
-
const sigListeners = /* @__PURE__ */ getSignalListeners();
|
|
132
|
-
_signals = sigs.filter((sig) => {
|
|
133
|
-
try {
|
|
134
|
-
globalProcess.on(
|
|
135
|
-
sig,
|
|
136
|
-
sigListeners[sig]
|
|
137
|
-
);
|
|
138
|
-
return true;
|
|
139
|
-
} catch {
|
|
140
|
-
}
|
|
141
|
-
return false;
|
|
142
|
-
});
|
|
143
|
-
globalProcess.emit = processEmit;
|
|
144
|
-
globalProcess.reallyExit = processReallyExit;
|
|
145
|
-
}
|
|
146
|
-
// @__NO_SIDE_EFFECTS__
|
|
147
|
-
function processEmit(eventName, exitCode, ...args) {
|
|
148
|
-
if (eventName === "exit") {
|
|
149
|
-
let actualExitCode = exitCode;
|
|
150
|
-
if (actualExitCode === void 0) {
|
|
151
|
-
const processExitCode = globalProcess?.exitCode;
|
|
152
|
-
actualExitCode = typeof processExitCode === "number" ? processExitCode : void 0;
|
|
153
|
-
} else if (globalProcess) {
|
|
154
|
-
globalProcess.exitCode = actualExitCode;
|
|
155
|
-
}
|
|
156
|
-
const result = ReflectApply(
|
|
157
|
-
originalProcessEmit,
|
|
158
|
-
this,
|
|
159
|
-
[eventName, actualExitCode, ...args]
|
|
160
|
-
);
|
|
161
|
-
const numExitCode = typeof actualExitCode === "number" ? actualExitCode : null;
|
|
162
|
-
/* @__PURE__ */ emit("exit", numExitCode, null);
|
|
163
|
-
/* @__PURE__ */ emit("afterexit", numExitCode, null);
|
|
164
|
-
return result;
|
|
165
|
-
}
|
|
166
|
-
return ReflectApply(
|
|
167
|
-
originalProcessEmit,
|
|
168
|
-
this,
|
|
169
|
-
[eventName, exitCode, ...args]
|
|
170
|
-
);
|
|
171
|
-
}
|
|
172
|
-
// @__NO_SIDE_EFFECTS__
|
|
173
|
-
function processReallyExit(code) {
|
|
174
|
-
const exitCode = code || 0;
|
|
175
|
-
if (globalProcess) {
|
|
176
|
-
globalProcess.exitCode = exitCode;
|
|
177
|
-
}
|
|
178
|
-
/* @__PURE__ */ emit("exit", exitCode, null);
|
|
179
|
-
/* @__PURE__ */ emit("afterexit", exitCode, null);
|
|
180
|
-
ReflectApply(
|
|
181
|
-
originalProcessReallyExit,
|
|
182
|
-
globalProcess,
|
|
183
|
-
[exitCode]
|
|
184
|
-
);
|
|
185
|
-
throw new Error("processReallyExit should never return");
|
|
186
|
-
}
|
|
187
|
-
// @__NO_SIDE_EFFECTS__
|
|
188
|
-
function onExit(cb, options) {
|
|
189
|
-
if (!globalProcess) {
|
|
190
|
-
return function remove() {
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
if (typeof cb !== "function") {
|
|
194
|
-
throw new TypeError("a callback must be provided for exit handler");
|
|
195
|
-
}
|
|
196
|
-
if (loaded === false) {
|
|
197
|
-
/* @__PURE__ */ load();
|
|
198
|
-
}
|
|
199
|
-
const { alwaysLast } = { __proto__: null, ...options };
|
|
200
|
-
let eventName = "exit";
|
|
201
|
-
if (alwaysLast) {
|
|
202
|
-
eventName = "afterexit";
|
|
203
|
-
}
|
|
204
|
-
const emitter = /* @__PURE__ */ getEmitter();
|
|
205
|
-
emitter.on(eventName, cb);
|
|
206
|
-
return function remove() {
|
|
207
|
-
emitter.removeListener(eventName, cb);
|
|
208
|
-
if (!emitter.listeners("exit").length && !emitter.listeners("afterexit").length) {
|
|
209
|
-
/* @__PURE__ */ unload();
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
// @__NO_SIDE_EFFECTS__
|
|
214
|
-
function signals() {
|
|
215
|
-
return _signals;
|
|
216
|
-
}
|
|
217
|
-
// @__NO_SIDE_EFFECTS__
|
|
218
|
-
function unload() {
|
|
219
|
-
if (!loaded || !globalProcess) {
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
loaded = false;
|
|
223
|
-
const sigs = /* @__PURE__ */ getSignals();
|
|
224
|
-
const sigListeners = /* @__PURE__ */ getSignalListeners();
|
|
225
|
-
for (const sig of sigs) {
|
|
226
|
-
try {
|
|
227
|
-
globalProcess.removeListener(
|
|
228
|
-
sig,
|
|
229
|
-
sigListeners[sig]
|
|
230
|
-
);
|
|
231
|
-
} catch {
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
globalProcess.emit = originalProcessEmit;
|
|
235
|
-
if (originalProcessReallyExit !== void 0) {
|
|
236
|
-
globalProcess.reallyExit = originalProcessReallyExit;
|
|
237
|
-
}
|
|
238
|
-
const emitter = /* @__PURE__ */ getEmitter();
|
|
239
|
-
if (emitter.count !== void 0) {
|
|
240
|
-
emitter.count -= 1;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
244
|
-
0 && (module.exports = {
|
|
245
|
-
load,
|
|
246
|
-
onExit,
|
|
247
|
-
signals,
|
|
248
|
-
unload
|
|
249
|
-
});
|
|
2
|
+
var g=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var T=(e,t)=>{for(var s in t)g(e,s,{get:t[s],enumerable:!0})},w=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of h(t))!P.call(e,r)&&r!==s&&g(e,r,{get:()=>t[r],enumerable:!(n=G(t,r))||n.enumerable});return e};var R=e=>w(g({},"__esModule",{value:!0}),e);var U={};T(U,{load:()=>v,onExit:()=>k,signals:()=>C,unload:()=>E});module.exports=R(U);const S=Reflect.apply,i=globalThis.process,p=i?.emit,y=i?.platform??"",x=i?.reallyExit,b=y==="win32";let m;function N(){return m===void 0&&(m=require("node:events")),m}let o;function d(){if(o===void 0){if(i?.__signal_exit_emitter__)o=i.__signal_exit_emitter__;else if(i){const e=N().EventEmitter;o=i.__signal_exit_emitter__=new e,o.count=0,o.emitted={__proto__:null}}o&&!o.infinite&&(o.setMaxListeners(Number.POSITIVE_INFINITY),o.infinite=!0)}return o}let c;function L(){if(c===void 0){c={__proto__:null};const e=d(),t=_();for(const s of t)c[s]=function(){if((i?.listeners(s)||[]).length===e.count){const a=b&&s==="SIGHUP"?"SIGINT":s;i?.kill(i?.pid,a)}}}return c}let l;function _(){return l===void 0&&(l=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],b||l.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),y==="linux"&&l.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),l}function u(e,t,s){const n=d();n.emitted?.[e]||(n.emitted&&(n.emitted[e]=!0),n.emit(e,t,s))}let f=!1;function v(){if(f||!i)return;f=!0;const e=d();e.count!==void 0&&(e.count+=1);const t=_(),s=L();l=t.filter(n=>{try{return i.on(n,s[n]),!0}catch{}return!1}),i.emit=O,i.reallyExit=M}function O(e,t,...s){if(e==="exit"){let n=t;if(n===void 0){const I=i?.exitCode;n=typeof I=="number"?I:void 0}else i&&(i.exitCode=n);const r=S(p,this,[e,n,...s]),a=typeof n=="number"?n:null;return r}return S(p,this,[e,t,...s])}function M(e){const t=e||0;throw i&&(i.exitCode=t),S(x,i,[t]),new Error("processReallyExit should never return")}function k(e,t){if(!i)return function(){};if(typeof e!="function")throw new TypeError("a callback must be provided for exit handler");const{alwaysLast:s}={__proto__:null,...t};let n="exit";s&&(n="afterexit");const r=d();return r.on(n,e),function(){r.removeListener(n,e),!r.listeners("exit").length&&r.listeners("afterexit").length}}function C(){return l}function E(){if(!f||!i)return;f=!1;const e=_(),t=L();for(const n of e)try{i.removeListener(n,t[n])}catch{}i.emit=p,x!==void 0&&(i.reallyExit=x);const s=d();s.count!==void 0&&(s.count-=1)}0&&(module.exports={load,onExit,signals,unload});
|
|
250
3
|
//# sourceMappingURL=signal-exit.js.map
|
package/dist/signal-exit.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/signal-exit.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * @fileoverview Process signal handling utilities.\n * Provides cross-platform signal exit detection and cleanup handlers.\n */\n\n// Inlined signal-exit:\n// https://socket.dev/npm/package/signal-exit/overview/4.1.0\n// ISC License\n// Copyright (c) 2015-2023 Benjamin Coe, Isaac Z. Schlueter, and Contributors\n\n// This is not the set of all possible signals.\n//\n// It IS, however, the set of all signals that trigger\n// an exit on either Linux or BSD systems. Linux is a\n// superset of the signal names supported on BSD, and\n// the unknown signals just fail to register, so we can\n// catch that easily enough.\n//\n// Don't bother with SIGKILL. It's uncatchable, which\n// means that we can't fire any callbacks anyway.\n//\n// If a user does happen to register a handler on a non-\n// fatal signal like SIGWINCH or something, and then\n// exit, it'll end up firing `process.emit('exit')`, so\n// the handler will be fired anyway.\n//\n// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n// artificially, inherently leave the process in a\n// state from which it is not safe to try and enter JS\n// listeners.\n\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 globalProcess = globalThis.process as\n | (NodeJS.Process & {\n __signal_exit_emitter__?: any\n reallyExit?: (code?: number | undefined) => never\n })\n | undefined\nconst originalProcessEmit = globalProcess?.emit\nconst platform = globalProcess?.platform ?? ''\nconst originalProcessReallyExit = globalProcess?.reallyExit as\n | ((code?: number | undefined) => never)\n | undefined\nconst WIN32 = platform === 'win32'\n\nlet _events: typeof import('node:events') | undefined\n/*@__NO_SIDE_EFFECTS__*/\nfunction getEvents() {\n if (_events === undefined) {\n // Use non-'node:' prefixed require to avoid Webpack errors.\n\n _events = /*@__PURE__*/ require('node:events')\n }\n return _events as typeof import('node:events')\n}\n\n// Type for tracking emitted signals.\ntype EmittedSignals = {\n // Using string as signals can include custom events like 'exit' and 'afterexit'.\n [signal: string]: boolean\n}\n\ntype SignalExitEmitter = import('node:events').EventEmitter & {\n count?: number\n emitted?: EmittedSignals\n infinite?: boolean\n}\nlet _emitter: SignalExitEmitter | undefined\n/*@__NO_SIDE_EFFECTS__*/\nfunction getEmitter() {\n if (_emitter === undefined) {\n if (globalProcess?.__signal_exit_emitter__) {\n _emitter = globalProcess.__signal_exit_emitter__\n } else if (globalProcess) {\n const EventEmitter = getEvents().EventEmitter\n _emitter = globalProcess.__signal_exit_emitter__ =\n new EventEmitter() as SignalExitEmitter\n _emitter.count = 0\n _emitter.emitted = { __proto__: null } as unknown as EmittedSignals\n }\n // Because this emitter is a global, we have to check to see if a\n // previous version of this library failed to enable infinite listeners.\n // I know what you're about to say. But literally everything about\n // signal-exit is a compromise with evil. Get used to it.\n if (_emitter && !_emitter.infinite) {\n _emitter.setMaxListeners(Number.POSITIVE_INFINITY)\n _emitter.infinite = true\n }\n }\n return _emitter as SignalExitEmitter\n}\n\ntype SignalListener = () => void\n// Type for signal listeners indexed by signal name.\ntype SignalListenerMap = {\n [signal: string]: SignalListener\n}\nlet _sigListeners: SignalListenerMap | undefined\n/*@__NO_SIDE_EFFECTS__*/\nfunction getSignalListeners() {\n if (_sigListeners === undefined) {\n _sigListeners = { __proto__: null } as unknown as SignalListenerMap\n const emitter = getEmitter()\n const sigs = getSignals()\n for (const sig of sigs) {\n _sigListeners[sig] = function listener() {\n // If there are no other listeners, an exit is coming!\n // Simplest way: remove us and then re-send the signal.\n // We know that this will kill the process, so we can\n // safely emit now.\n const listeners = globalProcess?.listeners(sig as NodeJS.Signals) || []\n if (listeners.length === emitter.count) {\n unload()\n emit('exit', null, sig)\n emit('afterexit', null, sig)\n // \"SIGHUP\" throws an `ENOSYS` error on Windows,\n // so use a supported signal instead.\n const killSig = WIN32 && sig === 'SIGHUP' ? 'SIGINT' : sig\n globalProcess?.kill(globalProcess?.pid, killSig)\n }\n }\n }\n }\n return _sigListeners as SignalListenerMap\n}\n\nlet _signals: string[] | undefined\n/*@__NO_SIDE_EFFECTS__*/\nfunction getSignals() {\n if (_signals === undefined) {\n _signals = ['SIGABRT', 'SIGALRM', 'SIGHUP', 'SIGINT', 'SIGTERM']\n if (!WIN32) {\n _signals.push(\n 'SIGVTALRM',\n 'SIGXCPU',\n 'SIGXFSZ',\n 'SIGUSR2',\n 'SIGTRAP',\n 'SIGSYS',\n 'SIGQUIT',\n 'SIGIOT',\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n )\n }\n if (platform === 'linux') {\n _signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT', 'SIGUNUSED')\n }\n }\n return _signals as string[]\n}\n\n/*@__NO_SIDE_EFFECTS__*/\nfunction emit(event: string, code: number | null, signal: string | null): void {\n const emitter = getEmitter()\n if (emitter.emitted?.[event]) {\n return\n }\n if (emitter.emitted) {\n emitter.emitted[event] = true\n }\n emitter.emit(event, code, signal)\n}\n\nlet loaded = false\n\n/**\n * Load signal handlers and hook into process exit events.\n */\n/*@__NO_SIDE_EFFECTS__*/\nexport function load(): void {\n if (loaded || !globalProcess) {\n return\n }\n loaded = true\n\n // This is the number of onSignalExit's that are in play.\n // It's important so that we can count the correct number of\n // listeners on signals, and don't wait for the other one to\n // handle it instead of us.\n const emitter = getEmitter()\n if (emitter.count !== undefined) {\n emitter.count += 1\n }\n\n const sigs = getSignals()\n const sigListeners = getSignalListeners()\n _signals = sigs.filter(sig => {\n try {\n globalProcess.on(\n sig as NodeJS.Signals,\n sigListeners[sig] as SignalListener,\n )\n return true\n } catch {}\n return false\n })\n\n globalProcess.emit = processEmit as typeof globalProcess.emit\n globalProcess.reallyExit = processReallyExit\n}\n\n/*@__NO_SIDE_EFFECTS__*/\nfunction processEmit(\n this: NodeJS.Process,\n eventName: string,\n exitCode?: number | undefined,\n ...args: any[]\n): boolean {\n if (eventName === 'exit') {\n let actualExitCode = exitCode\n if (actualExitCode === undefined) {\n const processExitCode = globalProcess?.exitCode\n actualExitCode =\n typeof processExitCode === 'number' ? processExitCode : undefined\n } else if (globalProcess) {\n globalProcess.exitCode = actualExitCode\n }\n const result = ReflectApply(\n originalProcessEmit as (...args: unknown[]) => boolean,\n this,\n [eventName, actualExitCode, ...args],\n ) as boolean\n const numExitCode =\n typeof actualExitCode === 'number' ? actualExitCode : null\n emit('exit', numExitCode, null)\n emit('afterexit', numExitCode, null)\n return result\n }\n return ReflectApply(\n originalProcessEmit as (...args: unknown[]) => boolean,\n this,\n [eventName, exitCode, ...args],\n ) as boolean\n}\n\n/*@__NO_SIDE_EFFECTS__*/\nfunction processReallyExit(code?: number | undefined): never {\n const exitCode = code || 0\n if (globalProcess) {\n globalProcess.exitCode = exitCode\n }\n emit('exit', exitCode, null)\n emit('afterexit', exitCode, null)\n ReflectApply(\n originalProcessReallyExit as (code?: number) => never,\n globalProcess,\n [exitCode],\n )\n throw new Error('processReallyExit should never return')\n}\n\nexport interface OnExitOptions {\n alwaysLast?: boolean\n}\n\n/**\n * Register a callback to run on process exit or signal.\n */\n/*@__NO_SIDE_EFFECTS__*/\nexport function onExit(\n cb: (code: number | null, signal: string | null) => void,\n options?: OnExitOptions | undefined,\n): () => void {\n if (!globalProcess) {\n return function remove() {}\n }\n if (typeof cb !== 'function') {\n throw new TypeError('a callback must be provided for exit handler')\n }\n if (loaded === false) {\n load()\n }\n const { alwaysLast } = { __proto__: null, ...options } as OnExitOptions\n\n let eventName = 'exit'\n if (alwaysLast) {\n eventName = 'afterexit'\n }\n\n const emitter = getEmitter()\n emitter.on(eventName, cb)\n\n return function remove() {\n emitter.removeListener(eventName, cb)\n if (\n !emitter.listeners('exit').length &&\n !emitter.listeners('afterexit').length\n ) {\n unload()\n }\n }\n}\n\n/**\n * Get the list of signals that are currently being monitored.\n */\n/*@__NO_SIDE_EFFECTS__*/\nexport function signals(): string[] | undefined {\n return _signals\n}\n\n/**\n * Unload signal handlers and restore original process behavior.\n */\n/*@__NO_SIDE_EFFECTS__*/\nexport function unload(): void {\n if (!loaded || !globalProcess) {\n return\n }\n loaded = false\n\n const sigs = getSignals()\n const sigListeners = getSignalListeners()\n for (const sig of sigs) {\n try {\n globalProcess.removeListener(\n sig as NodeJS.Signals,\n sigListeners[sig] as SignalListener,\n )\n } catch {}\n }\n globalProcess.emit = originalProcessEmit as typeof globalProcess.emit\n if (originalProcessReallyExit !== undefined) {\n globalProcess.reallyExit = originalProcessReallyExit\n }\n const emitter = getEmitter()\n if (emitter.count !== undefined) {\n emitter.count -= 1\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["signal_exit_exports", "__export", "load", "onExit", "signals", "unload", "__toCommonJS", "ReflectApply", "globalProcess", "originalProcessEmit", "platform", "originalProcessReallyExit", "WIN32", "_events", "getEvents", "_emitter", "getEmitter", "EventEmitter", "_sigListeners", "getSignalListeners", "emitter", "sigs", "getSignals", "sig", "killSig", "_signals", "emit", "event", "code", "signal", "loaded", "sigListeners", "processEmit", "processReallyExit", "eventName", "exitCode", "args", "actualExitCode", "processExitCode", "result", "numExitCode", "cb", "options", "alwaysLast"]
|
|
7
7
|
}
|