@depup/vercel 57.0.0-depup.0 → 58.4.4-depup.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/README.md +5 -5
- package/changes.json +4 -4
- package/dist/chunks/{add-YRZTDNXX.js → add-245XOFJO.js} +14 -9
- package/dist/chunks/{add-7M577U56.js → add-P7WBQMBW.js} +10 -8
- package/dist/chunks/add-XH24V5VU.js +187 -0
- package/dist/chunks/build-M7NJYJPE.js +243 -0
- package/dist/chunks/{chunk-HD7B425F.js → chunk-2FMPLU44.js} +4 -4
- package/dist/chunks/{chunk-LMHT3QR3.js → chunk-2LBVX2H3.js} +3 -3
- package/dist/chunks/{chunk-YOZCJHLZ.js → chunk-2MAPZXVV.js} +10 -8
- package/dist/chunks/{chunk-DWMH5M4Q.js → chunk-2SFMOCWR.js} +1 -1
- package/dist/chunks/{chunk-F5PQWDOC.js → chunk-2WILSD7J.js} +1 -1
- package/dist/chunks/{chunk-3PKFXNJZ.js → chunk-3KNPVXJ3.js} +7 -5
- package/dist/chunks/{chunk-A2TYQBX2.js → chunk-3QAUXPIR.js} +927 -518
- package/dist/chunks/chunk-3ZE5CFVM.js +346 -0
- package/dist/chunks/{chunk-555WJSO5.js → chunk-4BUPRO5B.js} +7 -5
- package/dist/chunks/{chunk-TBR2Q37Y.js → chunk-4CCY5OPH.js} +1232 -1216
- package/dist/chunks/{chunk-FHEMFAHB.js → chunk-4LDQIDRM.js} +15 -9
- package/dist/chunks/{chunk-R5FOIIHT.js → chunk-4N7XLXM2.js} +2 -2
- package/dist/chunks/{chunk-KCF6S3XF.js → chunk-4UYKSYKQ.js} +10 -6
- package/dist/chunks/{chunk-GP5VCTEU.js → chunk-62MH5KPX.js} +207 -4
- package/dist/chunks/{chunk-OGG6UBXK.js → chunk-7QVJTI5H.js} +1 -1
- package/dist/chunks/{chunk-FYQPTH5C.js → chunk-A5KP5HAI.js} +7 -5
- package/dist/chunks/{chunk-2EDWKVNP.js → chunk-AQDWMAPM.js} +32 -16
- package/dist/chunks/{chunk-3VS4DTAU.js → chunk-AW5YINX6.js} +106 -12
- package/dist/chunks/{chunk-GIL3VAUR.js → chunk-B3JTF4CF.js} +5 -3
- package/dist/chunks/{chunk-4QVAYRYH.js → chunk-BEQV3X2L.js} +16 -1
- package/dist/chunks/chunk-CPFNFVCL.js +85 -0
- package/dist/chunks/{chunk-4G6QZSBL.js → chunk-CSJBZKC5.js} +6 -4
- package/dist/chunks/{chunk-3PGXYIKC.js → chunk-EBLH23AQ.js} +2 -2
- package/dist/chunks/{chunk-YA3WQFLY.js → chunk-GFG6QDIE.js} +1 -1
- package/dist/chunks/{chunk-IOAZNR6Z.js → chunk-HSYF5SI3.js} +1 -1
- package/dist/chunks/{chunk-F7X55TOY.js → chunk-IEDUCUDV.js} +6 -5
- package/dist/chunks/chunk-J6LK45HT.js +163 -0
- package/dist/chunks/{chunk-ZVLPUREX.js → chunk-JLWQWYKO.js} +2 -2
- package/dist/chunks/{chunk-SZXT3PDQ.js → chunk-KBEX5MYS.js} +1 -136
- package/dist/chunks/{chunk-NZRWTCRM.js → chunk-KT4XXKJK.js} +1 -1
- package/dist/chunks/{chunk-VZSZBD4V.js → chunk-M22O6CYY.js} +1 -1
- package/dist/chunks/{chunk-3242RXCN.js → chunk-M5NOLAJ4.js} +1 -1
- package/dist/chunks/{chunk-2MJROFVC.js → chunk-MAHXF73X.js} +8 -5
- package/dist/chunks/{chunk-RYO6FJFB.js → chunk-NJ6QXKQD.js} +2 -2
- package/dist/chunks/{chunk-LHFNIZ2P.js → chunk-O5GNPPTU.js} +4 -2
- package/dist/chunks/chunk-RBIFXFZX.js +52 -0
- package/dist/chunks/{chunk-OF2GNB42.js → chunk-RQ7H43CJ.js} +1 -1
- package/dist/chunks/{chunk-4PGF367U.js → chunk-SJYAUEZR.js} +232 -50
- package/dist/chunks/{chunk-KSSNLCL4.js → chunk-SOFC4MLS.js} +2 -2
- package/dist/chunks/{chunk-UDWRZXIT.js → chunk-TJJ562C5.js} +18 -14
- package/dist/chunks/{chunk-NRNMT43R.js → chunk-UE3JUVUZ.js} +7 -13
- package/dist/chunks/chunk-V5P25P7F.js +22 -0
- package/dist/chunks/{chunk-MIFDRYTN.js → chunk-XE5VSQ25.js} +2 -2
- package/dist/chunks/{chunk-QZD5DKUR.js → chunk-XIG4GH62.js} +2 -2
- package/dist/chunks/chunk-XLKFJPMT.js +150 -0
- package/dist/chunks/{chunk-MAHINYBW.js → chunk-Y5GTPWXB.js} +2 -2
- package/dist/chunks/{chunk-NH43BFJ3.js → chunk-YCPUAG77.js} +2 -2
- package/dist/chunks/{chunk-T4NODP6Y.js → chunk-YDUINEII.js} +3 -3
- package/dist/chunks/{chunk-RAFH25WW.js → chunk-ZGBBPJ6B.js} +10 -6
- package/dist/chunks/{chunk-DMSLNAVH.js → chunk-ZX2FSPWV.js} +2 -2
- package/dist/chunks/clear-HWIKQ4NC.js +132 -0
- package/dist/chunks/{compile-vercel-config-3OHO3TJA.js → compile-vercel-config-U5NRIMZ2.js} +5 -4
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{delete-3DZOCWCC.js → delete-FZCOUFGN.js} +7 -6
- package/dist/chunks/{delete-VOSJLNEA.js → delete-NVMGVD5Z.js} +7 -6
- package/dist/chunks/{disable-LQDEVRQF.js → disable-ERM2BWEQ.js} +7 -6
- package/dist/chunks/{discard-RGV4JKXQ.js → discard-KM5OLEN4.js} +7 -6
- package/dist/chunks/{edit-SFIEOQ24.js → edit-HT3UTATZ.js} +8 -7
- package/dist/chunks/{edit-UPZPI54L.js → edit-TOSB2EMI.js} +7 -6
- package/dist/chunks/{enable-6UVH35WC.js → enable-BQL6AOQV.js} +7 -6
- package/dist/chunks/{export-6CEG3CK7.js → export-UOWQHOG3.js} +7 -6
- package/dist/chunks/{image-CQRCD2OE.js → image-F5SC6Q7Y.js} +5 -5
- package/dist/chunks/{inspect-ZFRY3X3H.js → inspect-35FU5R62.js} +16 -13
- package/dist/chunks/{inspect-UM3LDRPV.js → inspect-5J5GSTOB.js} +14 -12
- package/dist/chunks/{inspect-K5ZMQG7X.js → inspect-GKJ6T5H4.js} +14 -12
- package/dist/chunks/{inspect-4ZAH3RFT.js → inspect-LGKOLH2O.js} +8 -7
- package/dist/chunks/{inspect-EXQBIAFF.js → inspect-PZJM2CWT.js} +13 -11
- package/dist/chunks/{list-KCUHD4OA.js → list-2IIE7CAP.js} +8 -7
- package/dist/chunks/{list-4DRVM7Q4.js → list-ITFJYYQ2.js} +13 -11
- package/dist/chunks/{list-FJCBOCCA.js → list-KZETH3ZE.js} +8 -6
- package/dist/chunks/{login-DFGYNU3K.js → login-BQPJCJEZ.js} +22 -51
- package/dist/chunks/{ls-RHEQ6YQB.js → ls-7GHDK4MD.js} +13 -11
- package/dist/chunks/{ls-CG6A7UXF.js → ls-DL2LA35C.js} +15 -13
- package/dist/chunks/{ls-34NCZKBE.js → ls-UXUEP54B.js} +15 -13
- package/dist/chunks/ls-YSFWSM6J.js +178 -0
- package/dist/chunks/{ls-4QHHVXXD.js → ls-ZZFLH7PK.js} +17 -14
- package/dist/chunks/{open-E3XADEMX.js → open-ADNJQN5E.js} +7 -6
- package/dist/chunks/permissions-72SZCBIY.js +95 -0
- package/dist/chunks/{publish-Z3AQRUCS.js → publish-OOAGSEBM.js} +7 -6
- package/dist/chunks/push-B6TZDXNF.js +183 -0
- package/dist/chunks/{query-3EV66DO3.js → query-LZWS5TDH.js} +12 -10
- package/dist/chunks/{reorder-VA5E5ZJT.js → reorder-MRHFKPMK.js} +7 -6
- package/dist/chunks/{reply-SNSCNKAW.js → reply-BKTJXO3B.js} +7 -6
- package/dist/chunks/{resolve-6ZX4RTXX.js → resolve-BKVGSGPN.js} +7 -6
- package/dist/chunks/{restore-NEHI5B5P.js → restore-USR7SKWV.js} +7 -6
- package/dist/chunks/{rm-FR6KE744.js → rm-2UO6BT3A.js} +10 -8
- package/dist/chunks/rm-37MKKV3I.js +186 -0
- package/dist/chunks/{rm-E5ZVLAKO.js → rm-KUWPNZIS.js} +15 -10
- package/dist/chunks/{rm-22B22E47.js → rm-VY3OHKFH.js} +12 -8
- package/dist/chunks/{rule-inspect-DMP2CKJQ.js → rule-inspect-JVDOOTWK.js} +13 -11
- package/dist/chunks/{rules-EYGXEI2Z.js → rules-NTBFZBIF.js} +8 -8
- package/dist/chunks/{schema-2IIWOBSQ.js → schema-6EZ72OVH.js} +11 -9
- package/dist/chunks/{tags-ZDVYRHAY.js → tags-HNPC63QA.js} +4 -4
- package/dist/chunks/{types-QKLIFDDP.js → types-QTOA2BTQ.js} +7 -5
- package/dist/chunks/{update-QH4DQMZV.js → update-LUYWNZP3.js} +10 -8
- package/dist/commands/build/index.js +16 -20
- package/dist/commands/deploy/index.js +39 -28
- package/dist/commands/dev/index.js +112 -20
- package/dist/commands/env/index.js +308 -36
- package/dist/commands/link/index.js +26 -23
- package/dist/commands/list/index.js +16 -9
- package/dist/commands-bulk.js +5414 -2654
- package/dist/help.js +1 -1
- package/dist/index.js +50 -44
- package/dist/version.mjs +1 -1
- package/package.json +47 -105
- package/dist/chunks/chunk-6OMC3HOW.js +0 -73
- package/dist/chunks/chunk-V4RMJKQP.js +0 -36
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
import {
|
|
8
|
+
__commonJS,
|
|
9
|
+
__require
|
|
10
|
+
} from "./chunk-TZ2YI2VH.js";
|
|
11
|
+
|
|
12
|
+
// ../../node_modules/.pnpm/double-ended-queue@2.1.0-0/node_modules/double-ended-queue/js/deque.js
|
|
13
|
+
var require_deque = __commonJS({
|
|
14
|
+
"../../node_modules/.pnpm/double-ended-queue@2.1.0-0/node_modules/double-ended-queue/js/deque.js"(exports, module) {
|
|
15
|
+
"use strict";
|
|
16
|
+
function Deque(capacity) {
|
|
17
|
+
this._capacity = getCapacity(capacity);
|
|
18
|
+
this._length = 0;
|
|
19
|
+
this._front = 0;
|
|
20
|
+
if (isArray(capacity)) {
|
|
21
|
+
var len = capacity.length;
|
|
22
|
+
for (var i = 0; i < len; ++i) {
|
|
23
|
+
this[i] = capacity[i];
|
|
24
|
+
}
|
|
25
|
+
this._length = len;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
Deque.prototype.toArray = function Deque$toArray() {
|
|
29
|
+
var len = this._length;
|
|
30
|
+
var ret = new Array(len);
|
|
31
|
+
var front = this._front;
|
|
32
|
+
var capacity = this._capacity;
|
|
33
|
+
for (var j = 0; j < len; ++j) {
|
|
34
|
+
ret[j] = this[front + j & capacity - 1];
|
|
35
|
+
}
|
|
36
|
+
return ret;
|
|
37
|
+
};
|
|
38
|
+
Deque.prototype.push = function Deque$push(item) {
|
|
39
|
+
var argsLength = arguments.length;
|
|
40
|
+
var length = this._length;
|
|
41
|
+
if (argsLength > 1) {
|
|
42
|
+
var capacity = this._capacity;
|
|
43
|
+
if (length + argsLength > capacity) {
|
|
44
|
+
for (var i = 0; i < argsLength; ++i) {
|
|
45
|
+
this._checkCapacity(length + 1);
|
|
46
|
+
var j = this._front + length & this._capacity - 1;
|
|
47
|
+
this[j] = arguments[i];
|
|
48
|
+
length++;
|
|
49
|
+
this._length = length;
|
|
50
|
+
}
|
|
51
|
+
return length;
|
|
52
|
+
} else {
|
|
53
|
+
var j = this._front;
|
|
54
|
+
for (var i = 0; i < argsLength; ++i) {
|
|
55
|
+
this[j + length & capacity - 1] = arguments[i];
|
|
56
|
+
j++;
|
|
57
|
+
}
|
|
58
|
+
this._length = length + argsLength;
|
|
59
|
+
return length + argsLength;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (argsLength === 0)
|
|
63
|
+
return length;
|
|
64
|
+
this._checkCapacity(length + 1);
|
|
65
|
+
var i = this._front + length & this._capacity - 1;
|
|
66
|
+
this[i] = item;
|
|
67
|
+
this._length = length + 1;
|
|
68
|
+
return length + 1;
|
|
69
|
+
};
|
|
70
|
+
Deque.prototype.pop = function Deque$pop() {
|
|
71
|
+
var length = this._length;
|
|
72
|
+
if (length === 0) {
|
|
73
|
+
return void 0;
|
|
74
|
+
}
|
|
75
|
+
var i = this._front + length - 1 & this._capacity - 1;
|
|
76
|
+
var ret = this[i];
|
|
77
|
+
this[i] = void 0;
|
|
78
|
+
this._length = length - 1;
|
|
79
|
+
return ret;
|
|
80
|
+
};
|
|
81
|
+
Deque.prototype.shift = function Deque$shift() {
|
|
82
|
+
var length = this._length;
|
|
83
|
+
if (length === 0) {
|
|
84
|
+
return void 0;
|
|
85
|
+
}
|
|
86
|
+
var front = this._front;
|
|
87
|
+
var ret = this[front];
|
|
88
|
+
this[front] = void 0;
|
|
89
|
+
this._front = front + 1 & this._capacity - 1;
|
|
90
|
+
this._length = length - 1;
|
|
91
|
+
return ret;
|
|
92
|
+
};
|
|
93
|
+
Deque.prototype.unshift = function Deque$unshift(item) {
|
|
94
|
+
var length = this._length;
|
|
95
|
+
var argsLength = arguments.length;
|
|
96
|
+
if (argsLength > 1) {
|
|
97
|
+
var capacity = this._capacity;
|
|
98
|
+
if (length + argsLength > capacity) {
|
|
99
|
+
for (var i = argsLength - 1; i >= 0; i--) {
|
|
100
|
+
this._checkCapacity(length + 1);
|
|
101
|
+
var capacity = this._capacity;
|
|
102
|
+
var j = (this._front - 1 & capacity - 1 ^ capacity) - capacity;
|
|
103
|
+
this[j] = arguments[i];
|
|
104
|
+
length++;
|
|
105
|
+
this._length = length;
|
|
106
|
+
this._front = j;
|
|
107
|
+
}
|
|
108
|
+
return length;
|
|
109
|
+
} else {
|
|
110
|
+
var front = this._front;
|
|
111
|
+
for (var i = argsLength - 1; i >= 0; i--) {
|
|
112
|
+
var j = (front - 1 & capacity - 1 ^ capacity) - capacity;
|
|
113
|
+
this[j] = arguments[i];
|
|
114
|
+
front = j;
|
|
115
|
+
}
|
|
116
|
+
this._front = front;
|
|
117
|
+
this._length = length + argsLength;
|
|
118
|
+
return length + argsLength;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (argsLength === 0)
|
|
122
|
+
return length;
|
|
123
|
+
this._checkCapacity(length + 1);
|
|
124
|
+
var capacity = this._capacity;
|
|
125
|
+
var i = (this._front - 1 & capacity - 1 ^ capacity) - capacity;
|
|
126
|
+
this[i] = item;
|
|
127
|
+
this._length = length + 1;
|
|
128
|
+
this._front = i;
|
|
129
|
+
return length + 1;
|
|
130
|
+
};
|
|
131
|
+
Deque.prototype.peekBack = function Deque$peekBack() {
|
|
132
|
+
var length = this._length;
|
|
133
|
+
if (length === 0) {
|
|
134
|
+
return void 0;
|
|
135
|
+
}
|
|
136
|
+
var index = this._front + length - 1 & this._capacity - 1;
|
|
137
|
+
return this[index];
|
|
138
|
+
};
|
|
139
|
+
Deque.prototype.peekFront = function Deque$peekFront() {
|
|
140
|
+
if (this._length === 0) {
|
|
141
|
+
return void 0;
|
|
142
|
+
}
|
|
143
|
+
return this[this._front];
|
|
144
|
+
};
|
|
145
|
+
Deque.prototype.get = function Deque$get(index) {
|
|
146
|
+
var i = index;
|
|
147
|
+
if (i !== (i | 0)) {
|
|
148
|
+
return void 0;
|
|
149
|
+
}
|
|
150
|
+
var len = this._length;
|
|
151
|
+
if (i < 0) {
|
|
152
|
+
i = i + len;
|
|
153
|
+
}
|
|
154
|
+
if (i < 0 || i >= len) {
|
|
155
|
+
return void 0;
|
|
156
|
+
}
|
|
157
|
+
return this[this._front + i & this._capacity - 1];
|
|
158
|
+
};
|
|
159
|
+
Deque.prototype.isEmpty = function Deque$isEmpty() {
|
|
160
|
+
return this._length === 0;
|
|
161
|
+
};
|
|
162
|
+
Deque.prototype.clear = function Deque$clear() {
|
|
163
|
+
var len = this._length;
|
|
164
|
+
var front = this._front;
|
|
165
|
+
var capacity = this._capacity;
|
|
166
|
+
for (var j = 0; j < len; ++j) {
|
|
167
|
+
this[front + j & capacity - 1] = void 0;
|
|
168
|
+
}
|
|
169
|
+
this._length = 0;
|
|
170
|
+
this._front = 0;
|
|
171
|
+
};
|
|
172
|
+
Deque.prototype.toString = function Deque$toString() {
|
|
173
|
+
return this.toArray().toString();
|
|
174
|
+
};
|
|
175
|
+
Deque.prototype.valueOf = Deque.prototype.toString;
|
|
176
|
+
Deque.prototype.removeFront = Deque.prototype.shift;
|
|
177
|
+
Deque.prototype.removeBack = Deque.prototype.pop;
|
|
178
|
+
Deque.prototype.insertFront = Deque.prototype.unshift;
|
|
179
|
+
Deque.prototype.insertBack = Deque.prototype.push;
|
|
180
|
+
Deque.prototype.enqueue = Deque.prototype.push;
|
|
181
|
+
Deque.prototype.dequeue = Deque.prototype.shift;
|
|
182
|
+
Deque.prototype.toJSON = Deque.prototype.toArray;
|
|
183
|
+
Object.defineProperty(Deque.prototype, "length", {
|
|
184
|
+
get: function() {
|
|
185
|
+
return this._length;
|
|
186
|
+
},
|
|
187
|
+
set: function() {
|
|
188
|
+
throw new RangeError("");
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
Deque.prototype._checkCapacity = function Deque$_checkCapacity(size) {
|
|
192
|
+
if (this._capacity < size) {
|
|
193
|
+
this._resizeTo(getCapacity(this._capacity * 1.5 + 16));
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
Deque.prototype._resizeTo = function Deque$_resizeTo(capacity) {
|
|
197
|
+
var oldCapacity = this._capacity;
|
|
198
|
+
this._capacity = capacity;
|
|
199
|
+
var front = this._front;
|
|
200
|
+
var length = this._length;
|
|
201
|
+
if (front + length > oldCapacity) {
|
|
202
|
+
var moveItemsCount = front + length & oldCapacity - 1;
|
|
203
|
+
arrayMove(this, 0, this, oldCapacity, moveItemsCount);
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
var isArray = Array.isArray;
|
|
207
|
+
function arrayMove(src, srcIndex, dst, dstIndex, len) {
|
|
208
|
+
for (var j = 0; j < len; ++j) {
|
|
209
|
+
dst[j + dstIndex] = src[j + srcIndex];
|
|
210
|
+
src[j + srcIndex] = void 0;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
function pow2AtLeast(n) {
|
|
214
|
+
n = n >>> 0;
|
|
215
|
+
n = n - 1;
|
|
216
|
+
n = n | n >> 1;
|
|
217
|
+
n = n | n >> 2;
|
|
218
|
+
n = n | n >> 4;
|
|
219
|
+
n = n | n >> 8;
|
|
220
|
+
n = n | n >> 16;
|
|
221
|
+
return n + 1;
|
|
222
|
+
}
|
|
223
|
+
function getCapacity(capacity) {
|
|
224
|
+
if (typeof capacity !== "number") {
|
|
225
|
+
if (isArray(capacity)) {
|
|
226
|
+
capacity = capacity.length;
|
|
227
|
+
} else {
|
|
228
|
+
return 16;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return pow2AtLeast(
|
|
232
|
+
Math.min(
|
|
233
|
+
Math.max(16, capacity),
|
|
234
|
+
1073741824
|
|
235
|
+
)
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
module.exports = Deque;
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
// ../../node_modules/.pnpm/async-sema@2.1.4/node_modules/async-sema/index.js
|
|
243
|
+
var require_async_sema = __commonJS({
|
|
244
|
+
"../../node_modules/.pnpm/async-sema@2.1.4/node_modules/async-sema/index.js"(exports, module) {
|
|
245
|
+
var EventEmitter = __require("events");
|
|
246
|
+
var util = __require("util");
|
|
247
|
+
var Deque = require_deque();
|
|
248
|
+
var ReleaseEmitter = class extends EventEmitter {
|
|
249
|
+
};
|
|
250
|
+
function isFn(x) {
|
|
251
|
+
return typeof x === "function";
|
|
252
|
+
}
|
|
253
|
+
function defaultInit() {
|
|
254
|
+
return "1";
|
|
255
|
+
}
|
|
256
|
+
var Sema = class {
|
|
257
|
+
constructor(nr, { initFn = defaultInit, pauseFn, resumeFn, capacity = 10 } = {}) {
|
|
258
|
+
if (isFn(pauseFn) ^ isFn(resumeFn)) {
|
|
259
|
+
throw new Error("pauseFn and resumeFn must be both set for pausing");
|
|
260
|
+
}
|
|
261
|
+
this.nrTokens = nr;
|
|
262
|
+
this.free = new Deque(nr);
|
|
263
|
+
this.waiting = new Deque(capacity);
|
|
264
|
+
this.releaseEmitter = new ReleaseEmitter();
|
|
265
|
+
this.noTokens = initFn === defaultInit;
|
|
266
|
+
this.pauseFn = pauseFn;
|
|
267
|
+
this.resumeFn = resumeFn;
|
|
268
|
+
this.releaseEmitter.on("release", (token) => {
|
|
269
|
+
const p = this.waiting.shift();
|
|
270
|
+
if (p) {
|
|
271
|
+
p.resolve(token);
|
|
272
|
+
} else {
|
|
273
|
+
if (this.resumeFn && this.paused) {
|
|
274
|
+
this.paused = false;
|
|
275
|
+
this.resumeFn();
|
|
276
|
+
}
|
|
277
|
+
this.free.push(token);
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
for (let i = 0; i < nr; i++) {
|
|
281
|
+
this.free.push(initFn());
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
async acquire() {
|
|
285
|
+
let token = this.free.pop();
|
|
286
|
+
if (token) {
|
|
287
|
+
return token;
|
|
288
|
+
}
|
|
289
|
+
return new Promise((resolve, reject) => {
|
|
290
|
+
if (this.pauseFn && !this.paused) {
|
|
291
|
+
this.paused = true;
|
|
292
|
+
this.pauseFn();
|
|
293
|
+
}
|
|
294
|
+
this.waiting.push({ resolve, reject });
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
async v() {
|
|
298
|
+
return this.acquire();
|
|
299
|
+
}
|
|
300
|
+
release(token) {
|
|
301
|
+
this.releaseEmitter.emit("release", this.noTokens ? "1" : token);
|
|
302
|
+
}
|
|
303
|
+
p(token) {
|
|
304
|
+
return this.release(token);
|
|
305
|
+
}
|
|
306
|
+
drain() {
|
|
307
|
+
const a = new Array(this.nrTokens);
|
|
308
|
+
for (let i = 0; i < this.nrTokens; i++) {
|
|
309
|
+
a[i] = this.acquire();
|
|
310
|
+
}
|
|
311
|
+
return Promise.all(a);
|
|
312
|
+
}
|
|
313
|
+
nrWaiting() {
|
|
314
|
+
return this.waiting.length;
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
Sema.prototype.v = util.deprecate(Sema.prototype.v, "`v()` is deperecated; use `acquire()` instead");
|
|
318
|
+
Sema.prototype.p = util.deprecate(Sema.prototype.p, "`p()` is deprecated; use `release()` instead");
|
|
319
|
+
module.exports = Sema;
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
// src/commands/vcr/permissions/team-refs.ts
|
|
324
|
+
var MAX_CONCURRENT_REQUESTS = 10;
|
|
325
|
+
function parseTeamRefs(args) {
|
|
326
|
+
const refs = [];
|
|
327
|
+
for (const arg of args) {
|
|
328
|
+
for (const piece of arg.split(",")) {
|
|
329
|
+
const ref = piece.trim();
|
|
330
|
+
if (ref && !refs.includes(ref)) {
|
|
331
|
+
refs.push(ref);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
return refs;
|
|
336
|
+
}
|
|
337
|
+
function teamRefBody(ref) {
|
|
338
|
+
return ref.startsWith("team_") ? { teamId: ref } : { teamSlug: ref };
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export {
|
|
342
|
+
require_async_sema,
|
|
343
|
+
MAX_CONCURRENT_REQUESTS,
|
|
344
|
+
parseTeamRefs,
|
|
345
|
+
teamRefBody
|
|
346
|
+
};
|
|
@@ -6,24 +6,26 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveProjectContext
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4CCY5OPH.js";
|
|
10
10
|
import {
|
|
11
11
|
AGENT_REASON,
|
|
12
12
|
AGENT_STATUS,
|
|
13
13
|
buildCommandWithYes,
|
|
14
14
|
outputAgentError,
|
|
15
15
|
withGlobalFlags
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TJJ562C5.js";
|
|
17
17
|
import {
|
|
18
|
-
parseArguments,
|
|
19
18
|
printError
|
|
20
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KBEX5MYS.js";
|
|
20
|
+
import {
|
|
21
|
+
parseArguments
|
|
22
|
+
} from "./chunk-XLKFJPMT.js";
|
|
21
23
|
import {
|
|
22
24
|
getCommandName,
|
|
23
25
|
getCommandNamePlain,
|
|
24
26
|
getFlagsSpecification,
|
|
25
27
|
getGlobalFlagsFromArgs
|
|
26
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-SOFC4MLS.js";
|
|
27
29
|
import {
|
|
28
30
|
output_manager_default
|
|
29
31
|
} from "./chunk-OX7KI3LF.js";
|