@vltpkg/cli-js 1.1.0 → 1.1.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/{access-GLWBGQLN.js → access-YYMAAPHV.js} +2 -2
- package/{bugs-OCQYFWFE.js → bugs-RK5JBPSC.js} +8 -8
- package/{build-CPWGNTCM.js → build-DVJSYCNF.js} +3 -3
- package/{cache-SL7DQMY2.js → cache-JKQNGZ7L.js} +4 -4
- package/{chunk-HYCYL4RX.js → chunk-34TE4HZS.js} +35 -3
- package/{chunk-6LEMBT22.js → chunk-3LUM7NX5.js} +3 -3
- package/{chunk-J2XWQVDK.js → chunk-6FT6K5YN.js} +1 -1
- package/{chunk-TXTK2PKN.js → chunk-BWEH7DHQ.js} +1 -1
- package/{chunk-ZDQJWRCU.js → chunk-DF5K4CYR.js} +5 -9
- package/{chunk-JSQUYHU7.js → chunk-DR4Z63B6.js} +1 -1
- package/{chunk-GJGQTRAT.js → chunk-DS7YMIHP.js} +87 -107
- package/{chunk-S6Y57MUS.js → chunk-GDT6KI4I.js} +4 -4
- package/{chunk-47M7IZ5P.js → chunk-JZJWASXL.js} +11 -4
- package/{chunk-BUXPKRYB.js → chunk-KDF7PEBY.js} +3 -3
- package/{chunk-CTQSUNNE.js → chunk-LN2A74PF.js} +1 -1
- package/{chunk-TNEMFBP5.js → chunk-LR42WTKN.js} +1 -1
- package/{chunk-2IMBYPYC.js → chunk-MZA6N2TA.js} +1 -1
- package/{chunk-TUXWDPCQ.js → chunk-QQYTPGIL.js} +1 -1
- package/{chunk-YKCGWKUE.js → chunk-V4YCZZHY.js} +2 -2
- package/chunk-WD74RJXW.js +75 -0
- package/{chunk-CF5EGH4W.js → chunk-XIF734VO.js} +1 -1
- package/chunk-YBVTY6ZW.js +91 -0
- package/{ci-O2RSLTBX.js → ci-WVYVR4XK.js} +4 -4
- package/cli-package.json +1 -1
- package/{config-ZBIF32GS.js → config-2MFZVP2N.js} +2 -2
- package/{config-ZPH7V77F.js → config-VYOTYBGS.js} +2 -2
- package/{create-2JX4RV5U.js → create-OJPLHBRR.js} +9 -9
- package/{deprecate-XJLP2TUW.js → deprecate-V4PKGFF7.js} +3 -3
- package/{dist-tag-F6ZFWGQU.js → dist-tag-DNLV4VDE.js} +2 -2
- package/{docs-IJCZZ4V6.js → docs-LXHDCGL5.js} +8 -8
- package/{exec-IWSS2LUA.js → exec-P32YSP44.js} +9 -9
- package/{exec-cache-AG77OOEE.js → exec-cache-JZ5PDTOY.js} +7 -7
- package/{exec-local-QXPWC4QG.js → exec-local-HHA464H4.js} +7 -7
- package/{help-TGNDNWLP.js → help-GVTTOYUL.js} +2 -3
- package/{init-WU7BRPKR.js → init-RENGG74N.js} +4 -4
- package/{install-74XKB5N7.js → install-V6VXOBH2.js} +8 -8
- package/{list-TOEC6Q3A.js → list-7N7Y5OXB.js} +9 -9
- package/{login-WJYMAFSL.js → login-D2QSAUJC.js} +4 -4
- package/{logout-MTRQWI3L.js → logout-QPOYBQNF.js} +2 -2
- package/{pack-FFWGLSNC.js → pack-4YYGXP3A.js} +4 -4
- package/package.json +1 -1
- package/{ping-DWUVTCJB.js → ping-QYRIZONU.js} +2 -2
- package/{pkg-KNZW5FIA.js → pkg-WQTNABKT.js} +5 -5
- package/{profile-6W2ABNXL.js → profile-PRI7WXK7.js} +2 -2
- package/{publish-HGNUONU3.js → publish-PSBYJQS7.js} +7 -7
- package/{query-FSCYPETX.js → query-UFYLQW4N.js} +9 -9
- package/registry-client-src-revalidate.js +198 -180
- package/{repo-OVIKYYWA.js → repo-4S6ETFXX.js} +8 -8
- package/{reporter-ZW7OMRZT.js → reporter-GLWYHI2Y.js} +3 -3
- package/{run-UPV3RPQJ.js → run-OU7NUB7A.js} +7 -7
- package/{run-exec-YJSMWMMP.js → run-exec-QPBY7ULE.js} +7 -7
- package/security-archive-src-update-expired.js +97 -63
- package/{setup-7DPMAPUY.js → setup-23QXG473.js} +28 -10
- package/{src-XJT4IJSV.js → src-3GN7TDNH.js} +5 -4
- package/{src-BNCFK4FH.js → src-575IYJOL.js} +7 -8
- package/{token-GA73ER5V.js → token-FCIA3RGD.js} +2 -2
- package/{uninstall-E3VKSC3B.js → uninstall-BQVZVKB5.js} +5 -5
- package/{unpublish-Q6MQHBPQ.js → unpublish-YGJ5HEYF.js} +2 -2
- package/{update-4CC44TR5.js → update-WCGV66JK.js} +7 -7
- package/{version-CRZBXNDG.js → version-7EA3UQG7.js} +4 -4
- package/{view-ILUULGSO.js → view-5FWIENVE.js} +3 -3
- package/vlr.js +1 -1
- package/vlrx.js +1 -1
- package/vlt.js +1 -1
- package/vlx.js +1 -1
- package/vlxl.js +1 -1
- package/{whoami-Z4TSLYTR.js → whoami-O4ZTBIC4.js} +2 -2
- package/chunk-A75UYRJC.js +0 -75
- package/chunk-E74WGW5C.js +0 -49
- package/registry-client-package.json +0 -80
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
registryErrorMessage
|
|
18
18
|
} from "./chunk-SNOBGFNM.js";
|
|
19
19
|
import {
|
|
20
|
-
|
|
21
|
-
} from "./chunk-
|
|
20
|
+
userAgent
|
|
21
|
+
} from "./chunk-YBVTY6ZW.js";
|
|
22
22
|
import {
|
|
23
23
|
I,
|
|
24
24
|
logRequest
|
|
@@ -936,33 +936,33 @@ var require_tree = __commonJS({
|
|
|
936
936
|
throw new TypeError("Unreachable");
|
|
937
937
|
}
|
|
938
938
|
let index = 0;
|
|
939
|
-
let
|
|
939
|
+
let node = this;
|
|
940
940
|
while (true) {
|
|
941
941
|
const code = key.charCodeAt(index);
|
|
942
942
|
if (code > 127) {
|
|
943
943
|
throw new TypeError("key must be ascii string");
|
|
944
944
|
}
|
|
945
|
-
if (
|
|
945
|
+
if (node.code === code) {
|
|
946
946
|
if (length === ++index) {
|
|
947
|
-
|
|
947
|
+
node.value = value;
|
|
948
948
|
break;
|
|
949
|
-
} else if (
|
|
950
|
-
|
|
949
|
+
} else if (node.middle !== null) {
|
|
950
|
+
node = node.middle;
|
|
951
951
|
} else {
|
|
952
|
-
|
|
952
|
+
node.middle = new _TstNode(key, value, index);
|
|
953
953
|
break;
|
|
954
954
|
}
|
|
955
|
-
} else if (
|
|
956
|
-
if (
|
|
957
|
-
|
|
955
|
+
} else if (node.code < code) {
|
|
956
|
+
if (node.left !== null) {
|
|
957
|
+
node = node.left;
|
|
958
958
|
} else {
|
|
959
|
-
|
|
959
|
+
node.left = new _TstNode(key, value, index);
|
|
960
960
|
break;
|
|
961
961
|
}
|
|
962
|
-
} else if (
|
|
963
|
-
|
|
962
|
+
} else if (node.right !== null) {
|
|
963
|
+
node = node.right;
|
|
964
964
|
} else {
|
|
965
|
-
|
|
965
|
+
node.right = new _TstNode(key, value, index);
|
|
966
966
|
break;
|
|
967
967
|
}
|
|
968
968
|
}
|
|
@@ -974,21 +974,21 @@ var require_tree = __commonJS({
|
|
|
974
974
|
search(key) {
|
|
975
975
|
const keylength = key.length;
|
|
976
976
|
let index = 0;
|
|
977
|
-
let
|
|
978
|
-
while (
|
|
977
|
+
let node = this;
|
|
978
|
+
while (node !== null && index < keylength) {
|
|
979
979
|
let code = key[index];
|
|
980
980
|
if (code <= 90 && code >= 65) {
|
|
981
981
|
code |= 32;
|
|
982
982
|
}
|
|
983
|
-
while (
|
|
984
|
-
if (code ===
|
|
983
|
+
while (node !== null) {
|
|
984
|
+
if (code === node.code) {
|
|
985
985
|
if (keylength === ++index) {
|
|
986
|
-
return
|
|
986
|
+
return node;
|
|
987
987
|
}
|
|
988
|
-
|
|
988
|
+
node = node.middle;
|
|
989
989
|
break;
|
|
990
990
|
}
|
|
991
|
-
|
|
991
|
+
node = node.code < code ? node.left : node.right;
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
994
|
return null;
|
|
@@ -1930,14 +1930,14 @@ var require_diagnostics = __commonJS({
|
|
|
1930
1930
|
"undici:client:beforeConnect",
|
|
1931
1931
|
(evt) => {
|
|
1932
1932
|
const {
|
|
1933
|
-
connectParams: { version
|
|
1933
|
+
connectParams: { version, protocol, port, host }
|
|
1934
1934
|
} = evt;
|
|
1935
1935
|
debugLog(
|
|
1936
1936
|
"connecting to %s%s using %s%s",
|
|
1937
1937
|
host,
|
|
1938
1938
|
port ? `:${port}` : "",
|
|
1939
1939
|
protocol,
|
|
1940
|
-
|
|
1940
|
+
version
|
|
1941
1941
|
);
|
|
1942
1942
|
}
|
|
1943
1943
|
);
|
|
@@ -1945,14 +1945,14 @@ var require_diagnostics = __commonJS({
|
|
|
1945
1945
|
"undici:client:connected",
|
|
1946
1946
|
(evt) => {
|
|
1947
1947
|
const {
|
|
1948
|
-
connectParams: { version
|
|
1948
|
+
connectParams: { version, protocol, port, host }
|
|
1949
1949
|
} = evt;
|
|
1950
1950
|
debugLog(
|
|
1951
1951
|
"connected to %s%s using %s%s",
|
|
1952
1952
|
host,
|
|
1953
1953
|
port ? `:${port}` : "",
|
|
1954
1954
|
protocol,
|
|
1955
|
-
|
|
1955
|
+
version
|
|
1956
1956
|
);
|
|
1957
1957
|
}
|
|
1958
1958
|
);
|
|
@@ -1960,7 +1960,7 @@ var require_diagnostics = __commonJS({
|
|
|
1960
1960
|
"undici:client:connectError",
|
|
1961
1961
|
(evt) => {
|
|
1962
1962
|
const {
|
|
1963
|
-
connectParams: { version
|
|
1963
|
+
connectParams: { version, protocol, port, host },
|
|
1964
1964
|
error: error2
|
|
1965
1965
|
} = evt;
|
|
1966
1966
|
debugLog(
|
|
@@ -1968,7 +1968,7 @@ var require_diagnostics = __commonJS({
|
|
|
1968
1968
|
host,
|
|
1969
1969
|
port ? `:${port}` : "",
|
|
1970
1970
|
protocol,
|
|
1971
|
-
|
|
1971
|
+
version,
|
|
1972
1972
|
error2.message
|
|
1973
1973
|
);
|
|
1974
1974
|
}
|
|
@@ -10155,10 +10155,10 @@ var require_socks5_client = __commonJS({
|
|
|
10155
10155
|
if (this.buffer.length < 2) {
|
|
10156
10156
|
return;
|
|
10157
10157
|
}
|
|
10158
|
-
const
|
|
10158
|
+
const version = this.buffer[0];
|
|
10159
10159
|
const method = this.buffer[1];
|
|
10160
|
-
if (
|
|
10161
|
-
throw new Socks5ProxyError(`Invalid SOCKS version: ${
|
|
10160
|
+
if (version !== SOCKS_VERSION) {
|
|
10161
|
+
throw new Socks5ProxyError(`Invalid SOCKS version: ${version}`, "UND_ERR_SOCKS5_VERSION");
|
|
10162
10162
|
}
|
|
10163
10163
|
if (method === AUTH_METHODS.NO_ACCEPTABLE) {
|
|
10164
10164
|
throw new Socks5ProxyError("No acceptable authentication method", "UND_ERR_SOCKS5_AUTH_REJECTED");
|
|
@@ -10203,10 +10203,10 @@ var require_socks5_client = __commonJS({
|
|
|
10203
10203
|
if (this.buffer.length < 2) {
|
|
10204
10204
|
return;
|
|
10205
10205
|
}
|
|
10206
|
-
const
|
|
10206
|
+
const version = this.buffer[0];
|
|
10207
10207
|
const status = this.buffer[1];
|
|
10208
|
-
if (
|
|
10209
|
-
throw new Socks5ProxyError(`Invalid auth sub-negotiation version: ${
|
|
10208
|
+
if (version !== 1) {
|
|
10209
|
+
throw new Socks5ProxyError(`Invalid auth sub-negotiation version: ${version}`, "UND_ERR_SOCKS5_AUTH_VERSION");
|
|
10210
10210
|
}
|
|
10211
10211
|
if (status !== 0) {
|
|
10212
10212
|
throw new Socks5ProxyError("Authentication failed", "UND_ERR_SOCKS5_AUTH_FAILED");
|
|
@@ -10253,11 +10253,11 @@ var require_socks5_client = __commonJS({
|
|
|
10253
10253
|
if (this.buffer.length < 4) {
|
|
10254
10254
|
return;
|
|
10255
10255
|
}
|
|
10256
|
-
const
|
|
10256
|
+
const version = this.buffer[0];
|
|
10257
10257
|
const reply = this.buffer[1];
|
|
10258
10258
|
const addressType = this.buffer[3];
|
|
10259
|
-
if (
|
|
10260
|
-
throw new Socks5ProxyError(`Invalid SOCKS version in reply: ${
|
|
10259
|
+
if (version !== SOCKS_VERSION) {
|
|
10260
|
+
throw new Socks5ProxyError(`Invalid SOCKS version in reply: ${version}`, "UND_ERR_SOCKS5_REPLY_VERSION");
|
|
10261
10261
|
}
|
|
10262
10262
|
let responseLength = 4;
|
|
10263
10263
|
if (addressType === ADDRESS_TYPES.IPV4) {
|
|
@@ -23910,24 +23910,24 @@ var require_sender = __commonJS({
|
|
|
23910
23910
|
this.#socket.write(createFrame(item, hint), cb);
|
|
23911
23911
|
}
|
|
23912
23912
|
} else {
|
|
23913
|
-
const
|
|
23913
|
+
const node2 = {
|
|
23914
23914
|
promise: null,
|
|
23915
23915
|
callback: cb,
|
|
23916
23916
|
frame: createFrame(item, hint)
|
|
23917
23917
|
};
|
|
23918
|
-
this.#queue.push(
|
|
23918
|
+
this.#queue.push(node2);
|
|
23919
23919
|
}
|
|
23920
23920
|
return;
|
|
23921
23921
|
}
|
|
23922
|
-
const
|
|
23922
|
+
const node = {
|
|
23923
23923
|
promise: item.arrayBuffer().then((ab) => {
|
|
23924
|
-
|
|
23925
|
-
|
|
23924
|
+
node.promise = null;
|
|
23925
|
+
node.frame = createFrame(ab, hint);
|
|
23926
23926
|
}),
|
|
23927
23927
|
callback: cb,
|
|
23928
23928
|
frame: null
|
|
23929
23929
|
};
|
|
23930
|
-
this.#queue.push(
|
|
23930
|
+
this.#queue.push(node);
|
|
23931
23931
|
if (!this.#running) {
|
|
23932
23932
|
this.#run();
|
|
23933
23933
|
}
|
|
@@ -23936,12 +23936,12 @@ var require_sender = __commonJS({
|
|
|
23936
23936
|
this.#running = true;
|
|
23937
23937
|
const queue = this.#queue;
|
|
23938
23938
|
while (!queue.isEmpty()) {
|
|
23939
|
-
const
|
|
23940
|
-
if (
|
|
23941
|
-
await
|
|
23939
|
+
const node = queue.shift();
|
|
23940
|
+
if (node.promise !== null) {
|
|
23941
|
+
await node.promise;
|
|
23942
23942
|
}
|
|
23943
|
-
this.#socket.write(
|
|
23944
|
-
|
|
23943
|
+
this.#socket.write(node.frame, node.callback);
|
|
23944
|
+
node.callback = node.frame = null;
|
|
23945
23945
|
}
|
|
23946
23946
|
this.#running = false;
|
|
23947
23947
|
}
|
|
@@ -26115,29 +26115,29 @@ var handleBeforeExit = () => {
|
|
|
26115
26115
|
}
|
|
26116
26116
|
args.push(__CODE_SPLIT_SCRIPT_NAME, path);
|
|
26117
26117
|
registered.delete(path);
|
|
26118
|
-
const
|
|
26118
|
+
const proc2 = spawn(process.execPath, args, {
|
|
26119
26119
|
detached,
|
|
26120
26120
|
stdio: ["pipe", "ignore", "ignore"],
|
|
26121
26121
|
env
|
|
26122
26122
|
});
|
|
26123
26123
|
for (const key of r) {
|
|
26124
|
-
|
|
26124
|
+
proc2.stdin.write(`${key}\0`);
|
|
26125
26125
|
}
|
|
26126
|
-
|
|
26126
|
+
proc2.stdin.end();
|
|
26127
26127
|
if (detached) {
|
|
26128
|
-
|
|
26128
|
+
proc2.unref();
|
|
26129
26129
|
}
|
|
26130
26130
|
}
|
|
26131
26131
|
};
|
|
26132
26132
|
|
|
26133
26133
|
// ../../src/registry-client/src/index.ts
|
|
26134
|
+
var import_undici3 = __toESM(require_undici(), 1);
|
|
26134
26135
|
import { randomUUID } from "node:crypto";
|
|
26135
26136
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
26136
26137
|
import { STATUS_CODES } from "node:http";
|
|
26137
26138
|
import { availableParallelism } from "node:os";
|
|
26138
26139
|
import { dirname as dirname3, resolve as resolve4 } from "node:path";
|
|
26139
26140
|
import { setTimeout as setTimeout2 } from "node:timers/promises";
|
|
26140
|
-
var import_undici3 = __toESM(require_undici(), 1);
|
|
26141
26141
|
|
|
26142
26142
|
// ../../src/registry-client/src/is-iterable.ts
|
|
26143
26143
|
var isIterable = (o) => !!o && typeof o === "object" && Symbol.iterator in o;
|
|
@@ -26145,27 +26145,23 @@ var isIterable = (o) => !!o && typeof o === "object" && Symbol.iterator in o;
|
|
|
26145
26145
|
// ../../src/registry-client/src/delete-header.ts
|
|
26146
26146
|
var deleteHeader = (headers, key) => {
|
|
26147
26147
|
if (!headers) return {};
|
|
26148
|
+
const lk = key.toLowerCase();
|
|
26148
26149
|
if (Array.isArray(headers)) {
|
|
26149
26150
|
if (!headers.length) return headers;
|
|
26150
|
-
|
|
26151
|
-
|
|
26152
|
-
|
|
26153
|
-
);
|
|
26154
|
-
if (
|
|
26155
|
-
|
|
26156
|
-
const h = headers;
|
|
26157
|
-
for (let i = 0; i < h.length; i += 2) {
|
|
26158
|
-
if (h[i]?.toLowerCase() === key.toLowerCase()) {
|
|
26159
|
-
headers.splice(i, 2);
|
|
26160
|
-
break;
|
|
26161
|
-
}
|
|
26162
|
-
}
|
|
26151
|
+
const step = Array.isArray(headers[0]) ? 1 : 2;
|
|
26152
|
+
for (let i = 0; i < headers.length; ) {
|
|
26153
|
+
const h = headers[i];
|
|
26154
|
+
const k = Array.isArray(h) ? h[0] : h;
|
|
26155
|
+
if (k.toLowerCase() === lk) headers.splice(i, step);
|
|
26156
|
+
else i += step;
|
|
26163
26157
|
}
|
|
26164
26158
|
return headers;
|
|
26165
26159
|
} else if (isIterable(headers)) {
|
|
26166
26160
|
return deleteHeader([...headers], key);
|
|
26167
26161
|
} else {
|
|
26168
|
-
|
|
26162
|
+
for (const k of Object.keys(headers)) {
|
|
26163
|
+
if (k.toLowerCase() === lk) delete headers[k];
|
|
26164
|
+
}
|
|
26169
26165
|
return headers;
|
|
26170
26166
|
}
|
|
26171
26167
|
};
|
|
@@ -26343,18 +26339,11 @@ var getTokenByURL = async (requestUrl, identity) => {
|
|
|
26343
26339
|
for (const k of await kc.keys()) {
|
|
26344
26340
|
candidates.push(k);
|
|
26345
26341
|
}
|
|
26346
|
-
|
|
26347
|
-
|
|
26348
|
-
|
|
26349
|
-
if (
|
|
26350
|
-
bestKey = candidate;
|
|
26351
|
-
bestLen = candidate.length;
|
|
26352
|
-
}
|
|
26353
|
-
}
|
|
26354
|
-
if (bestKey) {
|
|
26355
|
-
return getToken(bestKey, identity);
|
|
26342
|
+
const matches = candidates.filter((c) => normalized === c || normalized.startsWith(c + "/")).sort((a, b) => b.length - a.length);
|
|
26343
|
+
for (const key of matches) {
|
|
26344
|
+
const tok = await getToken(key, identity);
|
|
26345
|
+
if (tok) return tok;
|
|
26356
26346
|
}
|
|
26357
|
-
return getToken(requestUrl, identity);
|
|
26358
26347
|
};
|
|
26359
26348
|
|
|
26360
26349
|
// ../../src/registry-client/src/cache-entry.ts
|
|
@@ -26994,32 +26983,21 @@ var handleBeforeExit2 = () => {
|
|
|
26994
26983
|
args.push(__CODE_SPLIT_SCRIPT_NAME2, path);
|
|
26995
26984
|
registered2.delete(path);
|
|
26996
26985
|
const detached = !(isDeno2 && process.platform === "win32");
|
|
26997
|
-
const
|
|
26986
|
+
const proc2 = spawn2(process.execPath, args, {
|
|
26998
26987
|
detached,
|
|
26999
26988
|
stdio: ["pipe", "ignore", "ignore"],
|
|
27000
26989
|
env
|
|
27001
26990
|
});
|
|
27002
26991
|
for (const key of r) {
|
|
27003
|
-
|
|
26992
|
+
proc2.stdin.write(`${key}\0`);
|
|
27004
26993
|
}
|
|
27005
|
-
|
|
26994
|
+
proc2.stdin.end();
|
|
27006
26995
|
if (detached) {
|
|
27007
|
-
|
|
26996
|
+
proc2.unref();
|
|
27008
26997
|
}
|
|
27009
26998
|
}
|
|
27010
26999
|
};
|
|
27011
27000
|
|
|
27012
|
-
// ../../src/registry-client/src/env.ts
|
|
27013
|
-
import proc from "node:process";
|
|
27014
|
-
var { Deno, Bun } = globalThis;
|
|
27015
|
-
var isObj = (v) => typeof v === "object" && !!v;
|
|
27016
|
-
var isDeno3 = isObj(Deno);
|
|
27017
|
-
var isBun = !isDeno3 && isObj(Bun);
|
|
27018
|
-
var isNode = !isDeno3 && !isBun && "node" in proc.versions;
|
|
27019
|
-
var bun = isBun ? proc.versions.bun : void 0;
|
|
27020
|
-
var deno = isDeno3 ? proc.versions.deno : void 0;
|
|
27021
|
-
var node = isNode ? proc.versions.node : void 0;
|
|
27022
|
-
|
|
27023
27001
|
// ../../src/registry-client/src/get-header.ts
|
|
27024
27002
|
var isIterable2 = (o) => !!o && typeof o === "object" && Symbol.iterator in o;
|
|
27025
27003
|
var getHeader = (headers, key) => {
|
|
@@ -27169,8 +27147,8 @@ var otplease = async (client, options, response) => {
|
|
|
27169
27147
|
|
|
27170
27148
|
// ../../src/registry-client/src/proxy.ts
|
|
27171
27149
|
var import_undici = __toESM(require_undici(), 1);
|
|
27172
|
-
import
|
|
27173
|
-
var hasProxyEnv = () => !!(
|
|
27150
|
+
import proc from "node:process";
|
|
27151
|
+
var hasProxyEnv = () => !!(proc.env.http_proxy ?? proc.env.HTTP_PROXY) || !!(proc.env.https_proxy ?? proc.env.HTTPS_PROXY);
|
|
27174
27152
|
var getDispatcher = (options) => hasProxyEnv() ? new import_undici.EnvHttpProxyAgent(options) : new import_undici.Agent(options);
|
|
27175
27153
|
|
|
27176
27154
|
// ../../src/registry-client/src/redirect.ts
|
|
@@ -27203,6 +27181,12 @@ var redirect = (options, response, from) => {
|
|
|
27203
27181
|
};
|
|
27204
27182
|
delete nextOptions.path;
|
|
27205
27183
|
redirections.add(String(nextURL));
|
|
27184
|
+
if (nextURL.origin !== from.origin) {
|
|
27185
|
+
nextOptions.headers = deleteHeader(
|
|
27186
|
+
nextOptions.headers,
|
|
27187
|
+
"authorization"
|
|
27188
|
+
);
|
|
27189
|
+
}
|
|
27206
27190
|
switch (response.statusCode) {
|
|
27207
27191
|
case 303: {
|
|
27208
27192
|
nextOptions.method = "GET";
|
|
@@ -27420,12 +27404,6 @@ var exchangeToken = async (idToken, packageName, registry) => {
|
|
|
27420
27404
|
var log3 = (msg) => console.error(msg);
|
|
27421
27405
|
var isCacheableMethod = (m) => m === "GET" || m === "HEAD";
|
|
27422
27406
|
var cacheKey = (method, url) => `${method !== "GET" ? method + " " : ""}${url}`;
|
|
27423
|
-
var { version } = loadPackageJson(
|
|
27424
|
-
import.meta.filename,
|
|
27425
|
-
"registry-client-package.json"
|
|
27426
|
-
);
|
|
27427
|
-
var nua = globalThis.navigator?.userAgent ?? (bun ? `Bun/${bun}` : deno ? `Deno/${deno}` : node ? `Node.js/${node}` : "(unknown platform)");
|
|
27428
|
-
var userAgent = `@vltpkg/registry-client/${version} ${nua}`;
|
|
27429
27407
|
var agentOptions = {
|
|
27430
27408
|
bodyTimeout: 6e5,
|
|
27431
27409
|
headersTimeout: 6e5,
|
|
@@ -27792,6 +27770,7 @@ var RegistryClient = class {
|
|
|
27792
27770
|
logRequest(url, "start", { method });
|
|
27793
27771
|
const requestStart = Date.now();
|
|
27794
27772
|
setCacheHeaders(options, entry);
|
|
27773
|
+
const redirected = redirections.size > 0;
|
|
27795
27774
|
redirections.add(String(url));
|
|
27796
27775
|
options.path = u.pathname.replace(/\/+$/, "") + u.search;
|
|
27797
27776
|
options.origin = u.origin;
|
|
@@ -27819,11 +27798,13 @@ var RegistryClient = class {
|
|
|
27819
27798
|
);
|
|
27820
27799
|
}
|
|
27821
27800
|
options.method = options.method ?? "GET";
|
|
27822
|
-
options.headers
|
|
27823
|
-
options.headers
|
|
27824
|
-
|
|
27825
|
-
|
|
27826
|
-
|
|
27801
|
+
if (!redirected || !getHeader(options.headers, "authorization")) {
|
|
27802
|
+
options.headers = addHeader(
|
|
27803
|
+
options.headers,
|
|
27804
|
+
"authorization",
|
|
27805
|
+
await getTokenByURL(String(u), this.identity)
|
|
27806
|
+
);
|
|
27807
|
+
}
|
|
27827
27808
|
let response = null;
|
|
27828
27809
|
try {
|
|
27829
27810
|
response = await this.agent.request(
|
|
@@ -27943,7 +27924,6 @@ export {
|
|
|
27943
27924
|
oidc,
|
|
27944
27925
|
isCacheableMethod,
|
|
27945
27926
|
cacheKey,
|
|
27946
|
-
userAgent,
|
|
27947
27927
|
RegistryClient
|
|
27948
27928
|
};
|
|
27949
27929
|
/*! Bundled license information:
|
|
@@ -11,19 +11,19 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
openUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BWEH7DHQ.js";
|
|
15
15
|
import {
|
|
16
16
|
stderr
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LR42WTKN.js";
|
|
18
18
|
import {
|
|
19
19
|
mermaidOutput
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JZJWASXL.js";
|
|
21
21
|
import {
|
|
22
22
|
ViewClass
|
|
23
23
|
} from "./chunk-4KCU2KZL.js";
|
|
24
24
|
import {
|
|
25
25
|
getTokenByURL
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-DS7YMIHP.js";
|
|
27
27
|
|
|
28
28
|
// ../../src/cli-sdk/src/query-auth.ts
|
|
29
29
|
var createGetAuthHeader = (conf) => async (url) => getTokenByURL(url, conf.options.identity);
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
AbortError,
|
|
14
14
|
SecurityArchive,
|
|
15
15
|
pRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DF5K4CYR.js";
|
|
17
17
|
import {
|
|
18
18
|
Monorepo,
|
|
19
19
|
PackageJson,
|
|
@@ -43,6 +43,10 @@ import {
|
|
|
43
43
|
load,
|
|
44
44
|
walkUp
|
|
45
45
|
} from "./chunk-HTOTG4TS.js";
|
|
46
|
+
import {
|
|
47
|
+
userAgent,
|
|
48
|
+
userAgentHeaders
|
|
49
|
+
} from "./chunk-YBVTY6ZW.js";
|
|
46
50
|
import {
|
|
47
51
|
graphStep,
|
|
48
52
|
promiseSpawn
|
|
@@ -5331,7 +5335,7 @@ function hasNodeGypBinding(cwd) {
|
|
|
5331
5335
|
}
|
|
5332
5336
|
|
|
5333
5337
|
// ../../src/run/src/index.ts
|
|
5334
|
-
var npmConfigUserAgent =
|
|
5338
|
+
var npmConfigUserAgent = userAgent;
|
|
5335
5339
|
var dotBins = /* @__PURE__ */ new Map();
|
|
5336
5340
|
var dirExists = (p) => {
|
|
5337
5341
|
const cached = dotBins.get(p);
|
|
@@ -6380,7 +6384,8 @@ var retrieveDistTags = async (node, signal) => {
|
|
|
6380
6384
|
url.pathname = `/${node.name}`;
|
|
6381
6385
|
const response = await fetch(String(url), {
|
|
6382
6386
|
headers: {
|
|
6383
|
-
Accept: "application/vnd.npm.install-v1+json"
|
|
6387
|
+
Accept: "application/vnd.npm.install-v1+json",
|
|
6388
|
+
...userAgentHeaders
|
|
6384
6389
|
},
|
|
6385
6390
|
signal
|
|
6386
6391
|
});
|
|
@@ -6845,7 +6850,8 @@ var retrieveRemoteVersions = async (node, signal, getAuthHeader) => {
|
|
|
6845
6850
|
const base = spec2.registry.endsWith("/") ? spec2.registry : `${spec2.registry}/`;
|
|
6846
6851
|
const url = new URL(node.name, base);
|
|
6847
6852
|
const headers = {
|
|
6848
|
-
Accept: "application/vnd.npm.install-v1+json"
|
|
6853
|
+
Accept: "application/vnd.npm.install-v1+json",
|
|
6854
|
+
...userAgentHeaders
|
|
6849
6855
|
};
|
|
6850
6856
|
const auth = await getAuthHeader?.(String(url));
|
|
6851
6857
|
if (auth) {
|
|
@@ -7153,6 +7159,7 @@ var retrieveRemoteDate = async (node, signal) => {
|
|
|
7153
7159
|
const url = new URL(spec2.registry);
|
|
7154
7160
|
url.pathname = `/${node.name}`;
|
|
7155
7161
|
const response = await fetch(String(url), {
|
|
7162
|
+
headers: { ...userAgentHeaders },
|
|
7156
7163
|
signal
|
|
7157
7164
|
});
|
|
7158
7165
|
if (response.status === 404) {
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
} from "./chunk-RIYFGX27.js";
|
|
15
15
|
import {
|
|
16
16
|
createHostContextsMap
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3LUM7NX5.js";
|
|
18
18
|
import {
|
|
19
19
|
stderr,
|
|
20
20
|
stdout,
|
|
21
21
|
styleTextStdout
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-LR42WTKN.js";
|
|
23
23
|
import {
|
|
24
24
|
require_emoji_regex
|
|
25
25
|
} from "./chunk-VTEFO2FT.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
Query,
|
|
28
28
|
actual,
|
|
29
29
|
isRunResult
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-JZJWASXL.js";
|
|
31
31
|
import {
|
|
32
32
|
Monorepo
|
|
33
33
|
} from "./chunk-X2AWQGYG.js";
|
|
@@ -123,7 +123,7 @@ var PackageInfoClient = class {
|
|
|
123
123
|
#tarPoolPromise;
|
|
124
124
|
async getRegistryClient() {
|
|
125
125
|
if (this.#registryClient) return this.#registryClient;
|
|
126
|
-
this.#registryClientPromise ??= import("./src-
|
|
126
|
+
this.#registryClientPromise ??= import("./src-3GN7TDNH.js").then(({ RegistryClient }) => {
|
|
127
127
|
this.#registryClient = new RegistryClient(this.options);
|
|
128
128
|
return this.#registryClient;
|
|
129
129
|
});
|
|
@@ -11,11 +11,11 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
PackageInfoClient
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LN2A74PF.js";
|
|
15
15
|
import {
|
|
16
16
|
findCmdShimIfExists,
|
|
17
17
|
install
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JZJWASXL.js";
|
|
19
19
|
import {
|
|
20
20
|
PathScurry
|
|
21
21
|
} from "./chunk-X2AWQGYG.js";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
var global = globalThis;
|
|
2
|
+
import {Buffer} from "node:buffer";
|
|
3
|
+
import {setTimeout as _vlt_setTimeout,clearTimeout as _vlt_clearTimeout,setImmediate as _vlt_setImmediate,clearImmediate as _vlt_clearImmediate,setInterval as _vlt_setInterval,clearInterval as _vlt_clearInterval} from "node:timers";
|
|
4
|
+
globalThis.setTimeout = _vlt_setTimeout;
|
|
5
|
+
globalThis.clearTimeout = _vlt_clearTimeout;
|
|
6
|
+
globalThis.setImmediate = _vlt_setImmediate;
|
|
7
|
+
globalThis.clearImmediate = _vlt_clearImmediate;
|
|
8
|
+
globalThis.setInterval = _vlt_setInterval;
|
|
9
|
+
globalThis.clearInterval = _vlt_clearInterval;
|
|
10
|
+
import {createRequire as _vlt_createRequire} from "node:module";
|
|
11
|
+
var require = _vlt_createRequire(import.meta.filename);
|
|
12
|
+
import {
|
|
13
|
+
error
|
|
14
|
+
} from "./chunk-WZWDS3W4.js";
|
|
15
|
+
import {
|
|
16
|
+
__glob
|
|
17
|
+
} from "./chunk-PZLD7RTK.js";
|
|
18
|
+
|
|
19
|
+
// import("./commands/**/*.ts") in ../../src/cli-sdk/src/load-command.ts
|
|
20
|
+
var globImport_commands_ts = __glob({
|
|
21
|
+
"./commands/access.ts": () => import("./access-YYMAAPHV.js"),
|
|
22
|
+
"./commands/bugs.ts": () => import("./bugs-RK5JBPSC.js"),
|
|
23
|
+
"./commands/build.ts": () => import("./build-DVJSYCNF.js"),
|
|
24
|
+
"./commands/cache.ts": () => import("./cache-JKQNGZ7L.js"),
|
|
25
|
+
"./commands/ci.ts": () => import("./ci-WVYVR4XK.js"),
|
|
26
|
+
"./commands/config.ts": () => import("./config-2MFZVP2N.js"),
|
|
27
|
+
"./commands/create.ts": () => import("./create-OJPLHBRR.js"),
|
|
28
|
+
"./commands/deprecate.ts": () => import("./deprecate-V4PKGFF7.js"),
|
|
29
|
+
"./commands/dist-tag.ts": () => import("./dist-tag-DNLV4VDE.js"),
|
|
30
|
+
"./commands/docs.ts": () => import("./docs-LXHDCGL5.js"),
|
|
31
|
+
"./commands/exec-cache.ts": () => import("./exec-cache-JZ5PDTOY.js"),
|
|
32
|
+
"./commands/exec-local.ts": () => import("./exec-local-HHA464H4.js"),
|
|
33
|
+
"./commands/exec.ts": () => import("./exec-P32YSP44.js"),
|
|
34
|
+
"./commands/help.ts": () => import("./help-GVTTOYUL.js"),
|
|
35
|
+
"./commands/init.ts": () => import("./init-RENGG74N.js"),
|
|
36
|
+
"./commands/install.ts": () => import("./install-V6VXOBH2.js"),
|
|
37
|
+
"./commands/install/reporter.ts": () => import("./reporter-GLWYHI2Y.js"),
|
|
38
|
+
"./commands/list.ts": () => import("./list-7N7Y5OXB.js"),
|
|
39
|
+
"./commands/login.ts": () => import("./login-D2QSAUJC.js"),
|
|
40
|
+
"./commands/logout.ts": () => import("./logout-QPOYBQNF.js"),
|
|
41
|
+
"./commands/pack.ts": () => import("./pack-4YYGXP3A.js"),
|
|
42
|
+
"./commands/ping.ts": () => import("./ping-QYRIZONU.js"),
|
|
43
|
+
"./commands/pkg.ts": () => import("./pkg-WQTNABKT.js"),
|
|
44
|
+
"./commands/profile.ts": () => import("./profile-PRI7WXK7.js"),
|
|
45
|
+
"./commands/publish.ts": () => import("./publish-PSBYJQS7.js"),
|
|
46
|
+
"./commands/query.ts": () => import("./query-UFYLQW4N.js"),
|
|
47
|
+
"./commands/registry.ts": () => import("./registry-YTJZ3AQD.js"),
|
|
48
|
+
"./commands/repo.ts": () => import("./repo-4S6ETFXX.js"),
|
|
49
|
+
"./commands/run-exec.ts": () => import("./run-exec-QPBY7ULE.js"),
|
|
50
|
+
"./commands/run.ts": () => import("./run-OU7NUB7A.js"),
|
|
51
|
+
"./commands/setup.ts": () => import("./setup-23QXG473.js"),
|
|
52
|
+
"./commands/token.ts": () => import("./token-FCIA3RGD.js"),
|
|
53
|
+
"./commands/uninstall.ts": () => import("./uninstall-BQVZVKB5.js"),
|
|
54
|
+
"./commands/unpublish.ts": () => import("./unpublish-YGJ5HEYF.js"),
|
|
55
|
+
"./commands/update.ts": () => import("./update-WCGV66JK.js"),
|
|
56
|
+
"./commands/version.ts": () => import("./version-7EA3UQG7.js"),
|
|
57
|
+
"./commands/view.ts": () => import("./view-5FWIENVE.js"),
|
|
58
|
+
"./commands/whoami.ts": () => import("./whoami-O4ZTBIC4.js")
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// ../../src/cli-sdk/src/load-command.ts
|
|
62
|
+
var loadCommand = async (command) => {
|
|
63
|
+
try {
|
|
64
|
+
return await globImport_commands_ts(`./commands/${command}.ts`);
|
|
65
|
+
} catch (e) {
|
|
66
|
+
throw error("Could not load command", {
|
|
67
|
+
found: command,
|
|
68
|
+
cause: e
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export {
|
|
74
|
+
loadCommand
|
|
75
|
+
};
|