@mastra/react 0.1.0-beta.9 → 1.0.0-beta.25
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 +374 -0
- package/dist/chunk-55VPMN3N-Ax1F4Y75.js +249 -0
- package/dist/chunk-55VPMN3N-Ax1F4Y75.js.map +1 -0
- package/dist/chunk-55VPMN3N-BHqoDkCq.cjs +251 -0
- package/dist/chunk-55VPMN3N-BHqoDkCq.cjs.map +1 -0
- package/dist/index-BaK_Y6TP.cjs +185 -0
- package/dist/index-BaK_Y6TP.cjs.map +1 -0
- package/dist/index-C1OzXW5i.js +180 -0
- package/dist/index-C1OzXW5i.js.map +1 -0
- package/dist/index-ChvWx-iU.cjs +20711 -0
- package/dist/index-ChvWx-iU.cjs.map +1 -0
- package/dist/index-D3JtF_Zl.js +20628 -0
- package/dist/index-D3JtF_Zl.js.map +1 -0
- package/dist/index.cjs +65 -1878
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1818
- package/dist/index.js.map +1 -1
- package/dist/src/agent/hooks.d.ts +9 -0
- package/dist/src/lib/ai-sdk/types.d.ts +78 -3
- package/dist/token-6GSAFR2W-SPYPLMBM-CWoxKwfk.cjs +64 -0
- package/dist/token-6GSAFR2W-SPYPLMBM-CWoxKwfk.cjs.map +1 -0
- package/dist/token-6GSAFR2W-SPYPLMBM-ChURikIE.js +60 -0
- package/dist/token-6GSAFR2W-SPYPLMBM-ChURikIE.js.map +1 -0
- package/dist/token-util-NEHG7TUY-JRJTGTAB-BU9ZxL1w.cjs +11 -0
- package/dist/token-util-NEHG7TUY-JRJTGTAB-BU9ZxL1w.cjs.map +1 -0
- package/dist/token-util-NEHG7TUY-JRJTGTAB-hEay2AHp.js +7 -0
- package/dist/token-util-NEHG7TUY-JRJTGTAB-hEay2AHp.js.map +1 -0
- package/package.json +12 -10
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-ChvWx-iU.cjs');
|
|
4
|
+
|
|
5
|
+
// ../_vendored/ai_v5/dist/chunk-OL3SSKUZ.js
|
|
6
|
+
var require_token_io = index.__commonJS({
|
|
7
|
+
"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/token-io.js"(exports, module) {
|
|
8
|
+
var __create = Object.create;
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
12
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
27
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
28
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
29
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
30
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
31
|
+
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
32
|
+
mod
|
|
33
|
+
));
|
|
34
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
|
+
var token_io_exports = {};
|
|
36
|
+
__export(token_io_exports, {
|
|
37
|
+
findRootDir: () => findRootDir,
|
|
38
|
+
getUserDataDir: () => getUserDataDir
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(token_io_exports);
|
|
41
|
+
var import_path = __toESM(index.__require2("path"));
|
|
42
|
+
var import_fs = __toESM(index.__require2("fs"));
|
|
43
|
+
var import_os = __toESM(index.__require2("os"));
|
|
44
|
+
var import_token_error = index.require_token_error();
|
|
45
|
+
function findRootDir() {
|
|
46
|
+
try {
|
|
47
|
+
let dir = process.cwd();
|
|
48
|
+
while (dir !== import_path.default.dirname(dir)) {
|
|
49
|
+
const pkgPath = import_path.default.join(dir, ".vercel");
|
|
50
|
+
if (import_fs.default.existsSync(pkgPath)) {
|
|
51
|
+
return dir;
|
|
52
|
+
}
|
|
53
|
+
dir = import_path.default.dirname(dir);
|
|
54
|
+
}
|
|
55
|
+
} catch (e) {
|
|
56
|
+
throw new import_token_error.VercelOidcTokenError(
|
|
57
|
+
"Token refresh only supported in node server environments"
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
throw new import_token_error.VercelOidcTokenError("Unable to find root directory");
|
|
61
|
+
}
|
|
62
|
+
function getUserDataDir() {
|
|
63
|
+
if (process.env.XDG_DATA_HOME) {
|
|
64
|
+
return process.env.XDG_DATA_HOME;
|
|
65
|
+
}
|
|
66
|
+
switch (import_os.default.platform()) {
|
|
67
|
+
case "darwin":
|
|
68
|
+
return import_path.default.join(import_os.default.homedir(), "Library/Application Support");
|
|
69
|
+
case "linux":
|
|
70
|
+
return import_path.default.join(import_os.default.homedir(), ".local/share");
|
|
71
|
+
case "win32":
|
|
72
|
+
if (process.env.LOCALAPPDATA) {
|
|
73
|
+
return process.env.LOCALAPPDATA;
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
default:
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
var require_token_util = index.__commonJS({
|
|
83
|
+
"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/token-util.js"(exports, module) {
|
|
84
|
+
var __create = Object.create;
|
|
85
|
+
var __defProp = Object.defineProperty;
|
|
86
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
87
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
88
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
89
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
90
|
+
var __export = (target, all) => {
|
|
91
|
+
for (var name in all)
|
|
92
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
93
|
+
};
|
|
94
|
+
var __copyProps = (to, from, except, desc) => {
|
|
95
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
96
|
+
for (let key of __getOwnPropNames(from))
|
|
97
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
98
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
99
|
+
}
|
|
100
|
+
return to;
|
|
101
|
+
};
|
|
102
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
103
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
104
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
105
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
106
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
107
|
+
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
108
|
+
mod
|
|
109
|
+
));
|
|
110
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
111
|
+
var token_util_exports = {};
|
|
112
|
+
__export(token_util_exports, {
|
|
113
|
+
assertVercelOidcTokenResponse: () => assertVercelOidcTokenResponse,
|
|
114
|
+
findProjectInfo: () => findProjectInfo,
|
|
115
|
+
getTokenPayload: () => getTokenPayload,
|
|
116
|
+
getVercelCliToken: () => getVercelCliToken,
|
|
117
|
+
getVercelDataDir: () => getVercelDataDir,
|
|
118
|
+
getVercelOidcToken: () => getVercelOidcToken,
|
|
119
|
+
isExpired: () => isExpired,
|
|
120
|
+
loadToken: () => loadToken,
|
|
121
|
+
saveToken: () => saveToken
|
|
122
|
+
});
|
|
123
|
+
module.exports = __toCommonJS(token_util_exports);
|
|
124
|
+
var path = __toESM(index.__require2("path"));
|
|
125
|
+
var fs = __toESM(index.__require2("fs"));
|
|
126
|
+
var import_token_error = index.require_token_error();
|
|
127
|
+
var import_token_io = require_token_io();
|
|
128
|
+
function getVercelDataDir() {
|
|
129
|
+
const vercelFolder = "com.vercel.cli";
|
|
130
|
+
const dataDir = (0, import_token_io.getUserDataDir)();
|
|
131
|
+
if (!dataDir) {
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
return path.join(dataDir, vercelFolder);
|
|
135
|
+
}
|
|
136
|
+
function getVercelCliToken() {
|
|
137
|
+
const dataDir = getVercelDataDir();
|
|
138
|
+
if (!dataDir) {
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
const tokenPath = path.join(dataDir, "auth.json");
|
|
142
|
+
if (!fs.existsSync(tokenPath)) {
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
const token = fs.readFileSync(tokenPath, "utf8");
|
|
146
|
+
if (!token) {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
return JSON.parse(token).token;
|
|
150
|
+
}
|
|
151
|
+
async function getVercelOidcToken(authToken, projectId, teamId) {
|
|
152
|
+
try {
|
|
153
|
+
const url = `https://api.vercel.com/v1/projects/${projectId}/token?source=vercel-oidc-refresh${teamId ? `&teamId=${teamId}` : ""}`;
|
|
154
|
+
const res = await fetch(url, {
|
|
155
|
+
method: "POST",
|
|
156
|
+
headers: {
|
|
157
|
+
Authorization: `Bearer ${authToken}`
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
if (!res.ok) {
|
|
161
|
+
throw new import_token_error.VercelOidcTokenError(
|
|
162
|
+
`Failed to refresh OIDC token: ${res.statusText}`
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
const tokenRes = await res.json();
|
|
166
|
+
assertVercelOidcTokenResponse(tokenRes);
|
|
167
|
+
return tokenRes;
|
|
168
|
+
} catch (e) {
|
|
169
|
+
throw new import_token_error.VercelOidcTokenError(`Failed to refresh OIDC token`, e);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function assertVercelOidcTokenResponse(res) {
|
|
173
|
+
if (!res || typeof res !== "object") {
|
|
174
|
+
throw new TypeError("Expected an object");
|
|
175
|
+
}
|
|
176
|
+
if (!("token" in res) || typeof res.token !== "string") {
|
|
177
|
+
throw new TypeError("Expected a string-valued token property");
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
function findProjectInfo() {
|
|
181
|
+
const dir = (0, import_token_io.findRootDir)();
|
|
182
|
+
if (!dir) {
|
|
183
|
+
throw new import_token_error.VercelOidcTokenError("Unable to find root directory");
|
|
184
|
+
}
|
|
185
|
+
try {
|
|
186
|
+
const prjPath = path.join(dir, ".vercel", "project.json");
|
|
187
|
+
if (!fs.existsSync(prjPath)) {
|
|
188
|
+
throw new import_token_error.VercelOidcTokenError("project.json not found");
|
|
189
|
+
}
|
|
190
|
+
const prj = JSON.parse(fs.readFileSync(prjPath, "utf8"));
|
|
191
|
+
if (typeof prj.projectId !== "string" && typeof prj.orgId !== "string") {
|
|
192
|
+
throw new TypeError("Expected a string-valued projectId property");
|
|
193
|
+
}
|
|
194
|
+
return { projectId: prj.projectId, teamId: prj.orgId };
|
|
195
|
+
} catch (e) {
|
|
196
|
+
throw new import_token_error.VercelOidcTokenError(`Unable to find project ID`, e);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
function saveToken(token, projectId) {
|
|
200
|
+
try {
|
|
201
|
+
const dir = (0, import_token_io.getUserDataDir)();
|
|
202
|
+
if (!dir) {
|
|
203
|
+
throw new import_token_error.VercelOidcTokenError("Unable to find user data directory");
|
|
204
|
+
}
|
|
205
|
+
const tokenPath = path.join(dir, "com.vercel.token", `${projectId}.json`);
|
|
206
|
+
const tokenJson = JSON.stringify(token);
|
|
207
|
+
fs.mkdirSync(path.dirname(tokenPath), { mode: 504, recursive: true });
|
|
208
|
+
fs.writeFileSync(tokenPath, tokenJson);
|
|
209
|
+
fs.chmodSync(tokenPath, 432);
|
|
210
|
+
return;
|
|
211
|
+
} catch (e) {
|
|
212
|
+
throw new import_token_error.VercelOidcTokenError(`Failed to save token`, e);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
function loadToken(projectId) {
|
|
216
|
+
try {
|
|
217
|
+
const dir = (0, import_token_io.getUserDataDir)();
|
|
218
|
+
if (!dir) {
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
const tokenPath = path.join(dir, "com.vercel.token", `${projectId}.json`);
|
|
222
|
+
if (!fs.existsSync(tokenPath)) {
|
|
223
|
+
return null;
|
|
224
|
+
}
|
|
225
|
+
const token = JSON.parse(fs.readFileSync(tokenPath, "utf8"));
|
|
226
|
+
assertVercelOidcTokenResponse(token);
|
|
227
|
+
return token;
|
|
228
|
+
} catch (e) {
|
|
229
|
+
throw new import_token_error.VercelOidcTokenError(`Failed to load token`, e);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
function getTokenPayload(token) {
|
|
233
|
+
const tokenParts = token.split(".");
|
|
234
|
+
if (tokenParts.length !== 3) {
|
|
235
|
+
throw new import_token_error.VercelOidcTokenError("Invalid token");
|
|
236
|
+
}
|
|
237
|
+
const base64 = tokenParts[1].replace(/-/g, "+").replace(/_/g, "/");
|
|
238
|
+
const padded = base64.padEnd(
|
|
239
|
+
base64.length + (4 - base64.length % 4) % 4,
|
|
240
|
+
"="
|
|
241
|
+
);
|
|
242
|
+
return JSON.parse(Buffer.from(padded, "base64").toString("utf8"));
|
|
243
|
+
}
|
|
244
|
+
function isExpired(token) {
|
|
245
|
+
return token.exp * 1e3 < Date.now();
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
exports.require_token_util = require_token_util;
|
|
251
|
+
//# sourceMappingURL=chunk-55VPMN3N-BHqoDkCq.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-55VPMN3N-BHqoDkCq.cjs","sources":["../../../packages/core/dist/chunk-55VPMN3N.js"],"sourcesContent":["import { __commonJS, __require, require_token_error } from './chunk-D22XABFZ.js';\n\n// ../_vendored/ai_v5/dist/chunk-OL3SSKUZ.js\nvar require_token_io = __commonJS({\n \"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/token-io.js\"(exports, module) {\n var __create = Object.create;\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __getProtoOf = Object.getPrototypeOf;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n ));\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n var token_io_exports = {};\n __export(token_io_exports, {\n findRootDir: () => findRootDir,\n getUserDataDir: () => getUserDataDir\n });\n module.exports = __toCommonJS(token_io_exports);\n var import_path = __toESM(__require(\"path\"));\n var import_fs = __toESM(__require(\"fs\"));\n var import_os = __toESM(__require(\"os\"));\n var import_token_error = require_token_error();\n function findRootDir() {\n try {\n let dir = process.cwd();\n while (dir !== import_path.default.dirname(dir)) {\n const pkgPath = import_path.default.join(dir, \".vercel\");\n if (import_fs.default.existsSync(pkgPath)) {\n return dir;\n }\n dir = import_path.default.dirname(dir);\n }\n } catch (e) {\n throw new import_token_error.VercelOidcTokenError(\n \"Token refresh only supported in node server environments\"\n );\n }\n throw new import_token_error.VercelOidcTokenError(\"Unable to find root directory\");\n }\n function getUserDataDir() {\n if (process.env.XDG_DATA_HOME) {\n return process.env.XDG_DATA_HOME;\n }\n switch (import_os.default.platform()) {\n case \"darwin\":\n return import_path.default.join(import_os.default.homedir(), \"Library/Application Support\");\n case \"linux\":\n return import_path.default.join(import_os.default.homedir(), \".local/share\");\n case \"win32\":\n if (process.env.LOCALAPPDATA) {\n return process.env.LOCALAPPDATA;\n }\n return null;\n default:\n return null;\n }\n }\n }\n});\nvar require_token_util = __commonJS({\n \"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/token-util.js\"(exports, module) {\n var __create = Object.create;\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __getProtoOf = Object.getPrototypeOf;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n ));\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n var token_util_exports = {};\n __export(token_util_exports, {\n assertVercelOidcTokenResponse: () => assertVercelOidcTokenResponse,\n findProjectInfo: () => findProjectInfo,\n getTokenPayload: () => getTokenPayload,\n getVercelCliToken: () => getVercelCliToken,\n getVercelDataDir: () => getVercelDataDir,\n getVercelOidcToken: () => getVercelOidcToken,\n isExpired: () => isExpired,\n loadToken: () => loadToken,\n saveToken: () => saveToken\n });\n module.exports = __toCommonJS(token_util_exports);\n var path = __toESM(__require(\"path\"));\n var fs = __toESM(__require(\"fs\"));\n var import_token_error = require_token_error();\n var import_token_io = require_token_io();\n function getVercelDataDir() {\n const vercelFolder = \"com.vercel.cli\";\n const dataDir = (0, import_token_io.getUserDataDir)();\n if (!dataDir) {\n return null;\n }\n return path.join(dataDir, vercelFolder);\n }\n function getVercelCliToken() {\n const dataDir = getVercelDataDir();\n if (!dataDir) {\n return null;\n }\n const tokenPath = path.join(dataDir, \"auth.json\");\n if (!fs.existsSync(tokenPath)) {\n return null;\n }\n const token = fs.readFileSync(tokenPath, \"utf8\");\n if (!token) {\n return null;\n }\n return JSON.parse(token).token;\n }\n async function getVercelOidcToken(authToken, projectId, teamId) {\n try {\n const url = `https://api.vercel.com/v1/projects/${projectId}/token?source=vercel-oidc-refresh${teamId ? `&teamId=${teamId}` : \"\"}`;\n const res = await fetch(url, {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${authToken}`\n }\n });\n if (!res.ok) {\n throw new import_token_error.VercelOidcTokenError(\n `Failed to refresh OIDC token: ${res.statusText}`\n );\n }\n const tokenRes = await res.json();\n assertVercelOidcTokenResponse(tokenRes);\n return tokenRes;\n } catch (e) {\n throw new import_token_error.VercelOidcTokenError(`Failed to refresh OIDC token`, e);\n }\n }\n function assertVercelOidcTokenResponse(res) {\n if (!res || typeof res !== \"object\") {\n throw new TypeError(\"Expected an object\");\n }\n if (!(\"token\" in res) || typeof res.token !== \"string\") {\n throw new TypeError(\"Expected a string-valued token property\");\n }\n }\n function findProjectInfo() {\n const dir = (0, import_token_io.findRootDir)();\n if (!dir) {\n throw new import_token_error.VercelOidcTokenError(\"Unable to find root directory\");\n }\n try {\n const prjPath = path.join(dir, \".vercel\", \"project.json\");\n if (!fs.existsSync(prjPath)) {\n throw new import_token_error.VercelOidcTokenError(\"project.json not found\");\n }\n const prj = JSON.parse(fs.readFileSync(prjPath, \"utf8\"));\n if (typeof prj.projectId !== \"string\" && typeof prj.orgId !== \"string\") {\n throw new TypeError(\"Expected a string-valued projectId property\");\n }\n return { projectId: prj.projectId, teamId: prj.orgId };\n } catch (e) {\n throw new import_token_error.VercelOidcTokenError(`Unable to find project ID`, e);\n }\n }\n function saveToken(token, projectId) {\n try {\n const dir = (0, import_token_io.getUserDataDir)();\n if (!dir) {\n throw new import_token_error.VercelOidcTokenError(\"Unable to find user data directory\");\n }\n const tokenPath = path.join(dir, \"com.vercel.token\", `${projectId}.json`);\n const tokenJson = JSON.stringify(token);\n fs.mkdirSync(path.dirname(tokenPath), { mode: 504, recursive: true });\n fs.writeFileSync(tokenPath, tokenJson);\n fs.chmodSync(tokenPath, 432);\n return;\n } catch (e) {\n throw new import_token_error.VercelOidcTokenError(`Failed to save token`, e);\n }\n }\n function loadToken(projectId) {\n try {\n const dir = (0, import_token_io.getUserDataDir)();\n if (!dir) {\n return null;\n }\n const tokenPath = path.join(dir, \"com.vercel.token\", `${projectId}.json`);\n if (!fs.existsSync(tokenPath)) {\n return null;\n }\n const token = JSON.parse(fs.readFileSync(tokenPath, \"utf8\"));\n assertVercelOidcTokenResponse(token);\n return token;\n } catch (e) {\n throw new import_token_error.VercelOidcTokenError(`Failed to load token`, e);\n }\n }\n function getTokenPayload(token) {\n const tokenParts = token.split(\".\");\n if (tokenParts.length !== 3) {\n throw new import_token_error.VercelOidcTokenError(\"Invalid token\");\n }\n const base64 = tokenParts[1].replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padded = base64.padEnd(\n base64.length + (4 - base64.length % 4) % 4,\n \"=\"\n );\n return JSON.parse(Buffer.from(padded, \"base64\").toString(\"utf8\"));\n }\n function isExpired(token) {\n return token.exp * 1e3 < Date.now();\n }\n }\n});\n\nexport { require_token_util };\n//# sourceMappingURL=chunk-55VPMN3N.js.map\n//# sourceMappingURL=chunk-55VPMN3N.js.map"],"names":["__commonJS","__require","require_token_error"],"mappings":";;;;AAEA;AACA,IAAI,gBAAgB,GAAGA,gBAAU,CAAC;AAClC,EAAE,2FAA2F,CAAC,OAAO,EAAE,MAAM,EAAE;AAC/G,IAAI,IAAI,QAAQ,GAAG,MAAM,CAAC,MAAM;AAChC,IAAI,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc;AACzC,IAAI,IAAI,gBAAgB,GAAG,MAAM,CAAC,wBAAwB;AAC1D,IAAI,IAAI,iBAAiB,GAAG,MAAM,CAAC,mBAAmB;AACtD,IAAI,IAAI,YAAY,GAAG,MAAM,CAAC,cAAc;AAC5C,IAAI,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc;AACtD,IAAI,IAAI,QAAQ,GAAG,CAAC,MAAM,EAAE,GAAG,KAAK;AACpC,MAAM,KAAK,IAAI,IAAI,IAAI,GAAG;AAC1B,QAAQ,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;AACrE,IAAI,CAA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AG,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;AACzC,IAAI;AACJ,EAAE;AACF,CAAC;;;;"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
async function pMap(
|
|
6
|
+
iterable,
|
|
7
|
+
mapper,
|
|
8
|
+
{
|
|
9
|
+
concurrency = Number.POSITIVE_INFINITY,
|
|
10
|
+
stopOnError = true,
|
|
11
|
+
signal,
|
|
12
|
+
} = {},
|
|
13
|
+
) {
|
|
14
|
+
return new Promise((resolve_, reject_) => {
|
|
15
|
+
if (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {
|
|
16
|
+
throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (typeof mapper !== 'function') {
|
|
20
|
+
throw new TypeError('Mapper function is required');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {
|
|
24
|
+
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const result = [];
|
|
28
|
+
const errors = [];
|
|
29
|
+
const skippedIndexesMap = new Map();
|
|
30
|
+
let isRejected = false;
|
|
31
|
+
let isResolved = false;
|
|
32
|
+
let isIterableDone = false;
|
|
33
|
+
let resolvingCount = 0;
|
|
34
|
+
let currentIndex = 0;
|
|
35
|
+
const iterator = iterable[Symbol.iterator] === undefined ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
|
|
36
|
+
|
|
37
|
+
const signalListener = () => {
|
|
38
|
+
reject(signal.reason);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const cleanup = () => {
|
|
42
|
+
signal?.removeEventListener('abort', signalListener);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const resolve = value => {
|
|
46
|
+
resolve_(value);
|
|
47
|
+
cleanup();
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const reject = reason => {
|
|
51
|
+
isRejected = true;
|
|
52
|
+
isResolved = true;
|
|
53
|
+
reject_(reason);
|
|
54
|
+
cleanup();
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
if (signal) {
|
|
58
|
+
if (signal.aborted) {
|
|
59
|
+
reject(signal.reason);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
signal.addEventListener('abort', signalListener, {once: true});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const next = async () => {
|
|
66
|
+
if (isResolved) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const nextItem = await iterator.next();
|
|
71
|
+
|
|
72
|
+
const index = currentIndex;
|
|
73
|
+
currentIndex++;
|
|
74
|
+
|
|
75
|
+
// Note: `iterator.next()` can be called many times in parallel.
|
|
76
|
+
// This can cause multiple calls to this `next()` function to
|
|
77
|
+
// receive a `nextItem` with `done === true`.
|
|
78
|
+
// The shutdown logic that rejects/resolves must be protected
|
|
79
|
+
// so it runs only one time as the `skippedIndex` logic is
|
|
80
|
+
// non-idempotent.
|
|
81
|
+
if (nextItem.done) {
|
|
82
|
+
isIterableDone = true;
|
|
83
|
+
|
|
84
|
+
if (resolvingCount === 0 && !isResolved) {
|
|
85
|
+
if (!stopOnError && errors.length > 0) {
|
|
86
|
+
reject(new AggregateError(errors)); // eslint-disable-line unicorn/error-message
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
isResolved = true;
|
|
91
|
+
|
|
92
|
+
if (skippedIndexesMap.size === 0) {
|
|
93
|
+
resolve(result);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const pureResult = [];
|
|
98
|
+
|
|
99
|
+
// Support multiple `pMapSkip`'s.
|
|
100
|
+
for (const [index, value] of result.entries()) {
|
|
101
|
+
if (skippedIndexesMap.get(index) === pMapSkip) {
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
pureResult.push(value);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
resolve(pureResult);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
resolvingCount++;
|
|
115
|
+
|
|
116
|
+
// Intentionally detached
|
|
117
|
+
(async () => {
|
|
118
|
+
try {
|
|
119
|
+
const element = await nextItem.value;
|
|
120
|
+
|
|
121
|
+
if (isResolved) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const value = await mapper(element, index);
|
|
126
|
+
|
|
127
|
+
// Use Map to stage the index of the element.
|
|
128
|
+
if (value === pMapSkip) {
|
|
129
|
+
skippedIndexesMap.set(index, value);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
result[index] = value;
|
|
133
|
+
|
|
134
|
+
resolvingCount--;
|
|
135
|
+
await next();
|
|
136
|
+
} catch (error) {
|
|
137
|
+
if (stopOnError) {
|
|
138
|
+
reject(error);
|
|
139
|
+
} else {
|
|
140
|
+
errors.push(error);
|
|
141
|
+
resolvingCount--;
|
|
142
|
+
|
|
143
|
+
// In that case we can't really continue regardless of `stopOnError` state
|
|
144
|
+
// since an iterable is likely to continue throwing after it throws once.
|
|
145
|
+
// If we continue calling `next()` indefinitely we will likely end up
|
|
146
|
+
// in an infinite loop of failed iteration.
|
|
147
|
+
try {
|
|
148
|
+
await next();
|
|
149
|
+
} catch (error) {
|
|
150
|
+
reject(error);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
})();
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
// Create the concurrent runners in a detached (non-awaited)
|
|
158
|
+
// promise. We need this so we can await the `next()` calls
|
|
159
|
+
// to stop creating runners before hitting the concurrency limit
|
|
160
|
+
// if the iterable has already been marked as done.
|
|
161
|
+
// NOTE: We *must* do this for async iterators otherwise we'll spin up
|
|
162
|
+
// infinite `next()` calls by default and never start the event loop.
|
|
163
|
+
(async () => {
|
|
164
|
+
for (let index = 0; index < concurrency; index++) {
|
|
165
|
+
try {
|
|
166
|
+
// eslint-disable-next-line no-await-in-loop
|
|
167
|
+
await next();
|
|
168
|
+
} catch (error) {
|
|
169
|
+
reject(error);
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (isIterableDone || isRejected) {
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
})();
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const pMapSkip = Symbol('skip');
|
|
182
|
+
|
|
183
|
+
exports.default = pMap;
|
|
184
|
+
exports.pMapSkip = pMapSkip;
|
|
185
|
+
//# sourceMappingURL=index-BaK_Y6TP.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BaK_Y6TP.cjs","sources":["../../../node_modules/.pnpm/p-map@7.0.3/node_modules/p-map/index.js"],"sourcesContent":["export default async function pMap(\n\titerable,\n\tmapper,\n\t{\n\t\tconcurrency = Number.POSITIVE_INFINITY,\n\t\tstopOnError = true,\n\t\tsignal,\n\t} = {},\n) {\n\treturn new Promise((resolve_, reject_) => {\n\t\tif (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {\n\t\t\tthrow new TypeError(`Expected \\`input\\` to be either an \\`Iterable\\` or \\`AsyncIterable\\`, got (${typeof iterable})`);\n\t\t}\n\n\t\tif (typeof mapper !== 'function') {\n\t\t\tthrow new TypeError('Mapper function is required');\n\t\t}\n\n\t\tif (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {\n\t\t\tthrow new TypeError(`Expected \\`concurrency\\` to be an integer from 1 and up or \\`Infinity\\`, got \\`${concurrency}\\` (${typeof concurrency})`);\n\t\t}\n\n\t\tconst result = [];\n\t\tconst errors = [];\n\t\tconst skippedIndexesMap = new Map();\n\t\tlet isRejected = false;\n\t\tlet isResolved = false;\n\t\tlet isIterableDone = false;\n\t\tlet resolvingCount = 0;\n\t\tlet currentIndex = 0;\n\t\tconst iterator = iterable[Symbol.iterator] === undefined ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();\n\n\t\tconst signalListener = () => {\n\t\t\treject(signal.reason);\n\t\t};\n\n\t\tconst cleanup = () => {\n\t\t\tsignal?.removeEventListener('abort', signalListener);\n\t\t};\n\n\t\tconst resolve = value => {\n\t\t\tresolve_(value);\n\t\t\tcleanup();\n\t\t};\n\n\t\tconst reject = reason => {\n\t\t\tisRejected = true;\n\t\t\tisResolved = true;\n\t\t\treject_(reason);\n\t\t\tcleanup();\n\t\t};\n\n\t\tif (signal) {\n\t\t\tif (signal.aborted) {\n\t\t\t\treject(signal.reason);\n\t\t\t}\n\n\t\t\tsignal.addEventListener('abort', signalListener, {once: true});\n\t\t}\n\n\t\tconst next = async () => {\n\t\t\tif (isResolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst nextItem = await iterator.next();\n\n\t\t\tconst index = currentIndex;\n\t\t\tcurrentIndex++;\n\n\t\t\t// Note: `iterator.next()` can be called many times in parallel.\n\t\t\t// This can cause multiple calls to this `next()` function to\n\t\t\t// receive a `nextItem` with `done === true`.\n\t\t\t// The shutdown logic that rejects/resolves must be protected\n\t\t\t// so it runs only one time as the `skippedIndex` logic is\n\t\t\t// non-idempotent.\n\t\t\tif (nextItem.done) {\n\t\t\t\tisIterableDone = true;\n\n\t\t\t\tif (resolvingCount === 0 && !isResolved) {\n\t\t\t\t\tif (!stopOnError && errors.length > 0) {\n\t\t\t\t\t\treject(new AggregateError(errors)); // eslint-disable-line unicorn/error-message\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tisResolved = true;\n\n\t\t\t\t\tif (skippedIndexesMap.size === 0) {\n\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst pureResult = [];\n\n\t\t\t\t\t// Support multiple `pMapSkip`'s.\n\t\t\t\t\tfor (const [index, value] of result.entries()) {\n\t\t\t\t\t\tif (skippedIndexesMap.get(index) === pMapSkip) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpureResult.push(value);\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(pureResult);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresolvingCount++;\n\n\t\t\t// Intentionally detached\n\t\t\t(async () => {\n\t\t\t\ttry {\n\t\t\t\t\tconst element = await nextItem.value;\n\n\t\t\t\t\tif (isResolved) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst value = await mapper(element, index);\n\n\t\t\t\t\t// Use Map to stage the index of the element.\n\t\t\t\t\tif (value === pMapSkip) {\n\t\t\t\t\t\tskippedIndexesMap.set(index, value);\n\t\t\t\t\t}\n\n\t\t\t\t\tresult[index] = value;\n\n\t\t\t\t\tresolvingCount--;\n\t\t\t\t\tawait next();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (stopOnError) {\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrors.push(error);\n\t\t\t\t\t\tresolvingCount--;\n\n\t\t\t\t\t\t// In that case we can't really continue regardless of `stopOnError` state\n\t\t\t\t\t\t// since an iterable is likely to continue throwing after it throws once.\n\t\t\t\t\t\t// If we continue calling `next()` indefinitely we will likely end up\n\t\t\t\t\t\t// in an infinite loop of failed iteration.\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait next();\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\treject(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})();\n\t\t};\n\n\t\t// Create the concurrent runners in a detached (non-awaited)\n\t\t// promise. We need this so we can await the `next()` calls\n\t\t// to stop creating runners before hitting the concurrency limit\n\t\t// if the iterable has already been marked as done.\n\t\t// NOTE: We *must* do this for async iterators otherwise we'll spin up\n\t\t// infinite `next()` calls by default and never start the event loop.\n\t\t(async () => {\n\t\t\tfor (let index = 0; index < concurrency; index++) {\n\t\t\t\ttry {\n\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\tawait next();\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (isIterableDone || isRejected) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t})();\n\t});\n}\n\nexport function pMapIterable(\n\titerable,\n\tmapper,\n\t{\n\t\tconcurrency = Number.POSITIVE_INFINITY,\n\t\tbackpressure = concurrency,\n\t} = {},\n) {\n\tif (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {\n\t\tthrow new TypeError(`Expected \\`input\\` to be either an \\`Iterable\\` or \\`AsyncIterable\\`, got (${typeof iterable})`);\n\t}\n\n\tif (typeof mapper !== 'function') {\n\t\tthrow new TypeError('Mapper function is required');\n\t}\n\n\tif (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {\n\t\tthrow new TypeError(`Expected \\`concurrency\\` to be an integer from 1 and up or \\`Infinity\\`, got \\`${concurrency}\\` (${typeof concurrency})`);\n\t}\n\n\tif (!((Number.isSafeInteger(backpressure) && backpressure >= concurrency) || backpressure === Number.POSITIVE_INFINITY)) {\n\t\tthrow new TypeError(`Expected \\`backpressure\\` to be an integer from \\`concurrency\\` (${concurrency}) and up or \\`Infinity\\`, got \\`${backpressure}\\` (${typeof backpressure})`);\n\t}\n\n\treturn {\n\t\tasync * [Symbol.asyncIterator]() {\n\t\t\tconst iterator = iterable[Symbol.asyncIterator] === undefined ? iterable[Symbol.iterator]() : iterable[Symbol.asyncIterator]();\n\n\t\t\tconst promises = [];\n\t\t\tlet runningMappersCount = 0;\n\t\t\tlet isDone = false;\n\t\t\tlet index = 0;\n\n\t\t\tfunction trySpawn() {\n\t\t\t\tif (isDone || !(runningMappersCount < concurrency && promises.length < backpressure)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst promise = (async () => {\n\t\t\t\t\tconst {done, value} = await iterator.next();\n\n\t\t\t\t\tif (done) {\n\t\t\t\t\t\treturn {done: true};\n\t\t\t\t\t}\n\n\t\t\t\t\trunningMappersCount++;\n\n\t\t\t\t\t// Spawn if still below concurrency and backpressure limit\n\t\t\t\t\ttrySpawn();\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst returnValue = await mapper(await value, index++);\n\n\t\t\t\t\t\trunningMappersCount--;\n\n\t\t\t\t\t\tif (returnValue === pMapSkip) {\n\t\t\t\t\t\t\tconst index = promises.indexOf(promise);\n\n\t\t\t\t\t\t\tif (index > 0) {\n\t\t\t\t\t\t\t\tpromises.splice(index, 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Spawn if still below backpressure limit and just dropped below concurrency limit\n\t\t\t\t\t\ttrySpawn();\n\n\t\t\t\t\t\treturn {done: false, value: returnValue};\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tisDone = true;\n\t\t\t\t\t\treturn {error};\n\t\t\t\t\t}\n\t\t\t\t})();\n\n\t\t\t\tpromises.push(promise);\n\t\t\t}\n\n\t\t\ttrySpawn();\n\n\t\t\twhile (promises.length > 0) {\n\t\t\t\tconst {error, done, value} = await promises[0]; // eslint-disable-line no-await-in-loop\n\n\t\t\t\tpromises.shift();\n\n\t\t\t\tif (error) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\n\t\t\t\tif (done) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Spawn if just dropped below backpressure limit and below the concurrency limit\n\t\t\t\ttrySpawn();\n\n\t\t\t\tif (value === pMapSkip) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tyield value;\n\t\t\t}\n\t\t},\n\t};\n}\n\nexport const pMapSkip = Symbol('skip');\n"],"names":[],"mappings":";;;;AAAe,eAAe,IAAI;AAClC,CAAC,QAAQ;AACT,CAAC,MAAM;AACP,CAAC;AACD,EAAE,WAAW,GAAG,MAAM,CAAC,iBAAiB;AACxC,EAAE,WAAW,GAAG,IAAI;AACpB,EAAE,MAAM;AACR,EAAE,GAAG,EAAE;AACP,EAAE;AACF,CAAC,OAAO,IAAI,OAAO,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAK;AAC3C,EAAE,IAAI,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,SAAS,IAAI,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,SAAS,EAAE;AAC/F,GAAG,MAAM,IAAI,SAAS,CAAC,CAAC,2EAA2E,EAAE,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;AACxH,EAAE;;AAEF,EAAE,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;AACpC,GAAG,MAAM,IAAI,SAAS,CAAC,6BAA6B,CAAC;AACrD,EAAE;;AAEF,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,WAAW,IAAI,CAAC,KAAK,WAAW,KAAK,MAAM,CAAC,iBAAiB,CAAC,EAAE;AAC9G,GAAG,MAAM,IAAI,SAAS,CAAC,CAAC,+EAA+E,EAAE,WAAW,CAAC,IAAI,EAAE,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC;AACjJ,EAAE;;AAEF,EAAE,MAAM,MAAM,GAAG,EAAE;AACnB,EAAE,MAAM,MAAM,GAAG,EAAE;AACnB,EAAE,MAAM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