@rg-dev/stdlib 1.0.55 → 1.0.56
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/lib/browser-env.cjs +17 -0
- package/lib/browser-env.d.cts +2 -1
- package/lib/browser-env.d.ts +2 -1
- package/lib/browser-env.js +16 -0
- package/lib/common-env.cjs +7 -4
- package/lib/common-env.js +6 -4
- package/lib/index.cjs +1 -0
- package/lib/node-download.cjs +22 -0
- package/lib/node-download.js +21 -0
- package/lib/node-env.cjs +4 -2
- package/lib/node-env.js +3 -2
- package/lib/trpc-helpers.cjs +1 -0
- package/package.json +3 -2
package/lib/browser-env.cjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -21,6 +22,7 @@ var browser_env_exports = {};
|
|
|
21
22
|
__export(browser_env_exports, {
|
|
22
23
|
VERSION: () => VERSION,
|
|
23
24
|
copyToClipboard: () => copyToClipboard,
|
|
25
|
+
parseFileInput: () => parseFileInput,
|
|
24
26
|
parseFormData: () => parseFormData
|
|
25
27
|
});
|
|
26
28
|
module.exports = __toCommonJS(browser_env_exports);
|
|
@@ -29,6 +31,21 @@ module.exports = __toCommonJS(browser_env_exports);
|
|
|
29
31
|
var VERSION = "1";
|
|
30
32
|
|
|
31
33
|
// src/browser-env.ts
|
|
34
|
+
function parseFileInput(e) {
|
|
35
|
+
if (e instanceof HTMLInputElement) {
|
|
36
|
+
if (!e.files) {
|
|
37
|
+
throw new Error("no files field in InputElement");
|
|
38
|
+
}
|
|
39
|
+
const list2 = Array.from(e.files);
|
|
40
|
+
return list2;
|
|
41
|
+
}
|
|
42
|
+
const el = e.target;
|
|
43
|
+
if (!el.files) {
|
|
44
|
+
throw new Error("no files field on event target element");
|
|
45
|
+
}
|
|
46
|
+
const list = Array.from(el.files);
|
|
47
|
+
return list;
|
|
48
|
+
}
|
|
32
49
|
function parseFormData(e) {
|
|
33
50
|
if (e instanceof FormData) {
|
|
34
51
|
return Object.fromEntries(e.entries());
|
package/lib/browser-env.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { VERSION } from './index.cjs';
|
|
2
2
|
|
|
3
|
+
declare function parseFileInput(e: Event | HTMLInputElement): File[];
|
|
3
4
|
declare function parseFormData<T = Record<string, string>>(e: Event | FormData | HTMLFormElement): T;
|
|
4
5
|
declare function copyToClipboard(content: any, opts?: {
|
|
5
6
|
throwOnError: boolean;
|
|
6
7
|
}): Promise<boolean>;
|
|
7
8
|
|
|
8
|
-
export { copyToClipboard, parseFormData };
|
|
9
|
+
export { copyToClipboard, parseFileInput, parseFormData };
|
package/lib/browser-env.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { VERSION } from './index.js';
|
|
2
2
|
|
|
3
|
+
declare function parseFileInput(e: Event | HTMLInputElement): File[];
|
|
3
4
|
declare function parseFormData<T = Record<string, string>>(e: Event | FormData | HTMLFormElement): T;
|
|
4
5
|
declare function copyToClipboard(content: any, opts?: {
|
|
5
6
|
throwOnError: boolean;
|
|
6
7
|
}): Promise<boolean>;
|
|
7
8
|
|
|
8
|
-
export { copyToClipboard, parseFormData };
|
|
9
|
+
export { copyToClipboard, parseFileInput, parseFormData };
|
package/lib/browser-env.js
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
var VERSION = "1";
|
|
3
3
|
|
|
4
4
|
// src/browser-env.ts
|
|
5
|
+
function parseFileInput(e) {
|
|
6
|
+
if (e instanceof HTMLInputElement) {
|
|
7
|
+
if (!e.files) {
|
|
8
|
+
throw new Error("no files field in InputElement");
|
|
9
|
+
}
|
|
10
|
+
const list2 = Array.from(e.files);
|
|
11
|
+
return list2;
|
|
12
|
+
}
|
|
13
|
+
const el = e.target;
|
|
14
|
+
if (!el.files) {
|
|
15
|
+
throw new Error("no files field on event target element");
|
|
16
|
+
}
|
|
17
|
+
const list = Array.from(el.files);
|
|
18
|
+
return list;
|
|
19
|
+
}
|
|
5
20
|
function parseFormData(e) {
|
|
6
21
|
if (e instanceof FormData) {
|
|
7
22
|
return Object.fromEntries(e.entries());
|
|
@@ -72,5 +87,6 @@ function fallback(content) {
|
|
|
72
87
|
export {
|
|
73
88
|
VERSION,
|
|
74
89
|
copyToClipboard,
|
|
90
|
+
parseFileInput,
|
|
75
91
|
parseFormData
|
|
76
92
|
};
|
package/lib/common-env.cjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -56,7 +57,7 @@ module.exports = __toCommonJS(common_env_exports);
|
|
|
56
57
|
// src/index.ts
|
|
57
58
|
var VERSION = "1";
|
|
58
59
|
|
|
59
|
-
// src/promise-retry.ts
|
|
60
|
+
// src/mods/promise-retry.ts
|
|
60
61
|
var defaultOptions = {
|
|
61
62
|
maxAttempts: 10,
|
|
62
63
|
retryDelay: 0,
|
|
@@ -84,7 +85,7 @@ function promiseRetry(func, options = defaultOptions, attempt = 1) {
|
|
|
84
85
|
);
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
// src/StringBuilder.ts
|
|
88
|
+
// src/mods/StringBuilder.ts
|
|
88
89
|
var StringBuilder = class {
|
|
89
90
|
constructor() {
|
|
90
91
|
__publicField(this, "_chunks");
|
|
@@ -109,7 +110,7 @@ var StringBuilder = class {
|
|
|
109
110
|
}
|
|
110
111
|
};
|
|
111
112
|
|
|
112
|
-
// src/fetchHelper.ts
|
|
113
|
+
// src/mods/fetchHelper.ts
|
|
113
114
|
async function fetchHelperJSON(url, config) {
|
|
114
115
|
const res = await fetch(url, config);
|
|
115
116
|
if (!res.ok) {
|
|
@@ -211,7 +212,9 @@ async function catchInline(cb) {
|
|
|
211
212
|
}
|
|
212
213
|
function doSafe(safe, onError) {
|
|
213
214
|
var _a;
|
|
214
|
-
if (!safe)
|
|
215
|
+
if (!safe) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
215
218
|
try {
|
|
216
219
|
const result = safe();
|
|
217
220
|
if (isPromise(result)) {
|
package/lib/common-env.js
CHANGED
|
@@ -19,7 +19,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
19
19
|
// src/index.ts
|
|
20
20
|
var VERSION = "1";
|
|
21
21
|
|
|
22
|
-
// src/promise-retry.ts
|
|
22
|
+
// src/mods/promise-retry.ts
|
|
23
23
|
var defaultOptions = {
|
|
24
24
|
maxAttempts: 10,
|
|
25
25
|
retryDelay: 0,
|
|
@@ -47,7 +47,7 @@ function promiseRetry(func, options = defaultOptions, attempt = 1) {
|
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
// src/StringBuilder.ts
|
|
50
|
+
// src/mods/StringBuilder.ts
|
|
51
51
|
var StringBuilder = class {
|
|
52
52
|
constructor() {
|
|
53
53
|
__publicField(this, "_chunks");
|
|
@@ -72,7 +72,7 @@ var StringBuilder = class {
|
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
-
// src/fetchHelper.ts
|
|
75
|
+
// src/mods/fetchHelper.ts
|
|
76
76
|
async function fetchHelperJSON(url, config) {
|
|
77
77
|
const res = await fetch(url, config);
|
|
78
78
|
if (!res.ok) {
|
|
@@ -174,7 +174,9 @@ async function catchInline(cb) {
|
|
|
174
174
|
}
|
|
175
175
|
function doSafe(safe, onError) {
|
|
176
176
|
var _a;
|
|
177
|
-
if (!safe)
|
|
177
|
+
if (!safe) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
178
180
|
try {
|
|
179
181
|
const result = safe();
|
|
180
182
|
if (isPromise(result)) {
|
package/lib/index.cjs
CHANGED
package/lib/node-download.cjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __defProps = Object.defineProperties;
|
|
@@ -141,6 +142,7 @@ function dataUriToBuffer(uri) {
|
|
|
141
142
|
var dist_default;
|
|
142
143
|
var init_dist = __esm({
|
|
143
144
|
"node_modules/data-uri-to-buffer/dist/index.js"() {
|
|
145
|
+
"use strict";
|
|
144
146
|
dist_default = dataUriToBuffer;
|
|
145
147
|
}
|
|
146
148
|
});
|
|
@@ -148,6 +150,7 @@ var init_dist = __esm({
|
|
|
148
150
|
// node_modules/web-streams-polyfill/dist/ponyfill.es2018.js
|
|
149
151
|
var require_ponyfill_es2018 = __commonJS({
|
|
150
152
|
"node_modules/web-streams-polyfill/dist/ponyfill.es2018.js"(exports, module2) {
|
|
153
|
+
"use strict";
|
|
151
154
|
(function(global2, factory) {
|
|
152
155
|
typeof exports === "object" && typeof module2 !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.WebStreamsPolyfill = {}));
|
|
153
156
|
})(exports, (function(exports2) {
|
|
@@ -3960,6 +3963,7 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
3960
3963
|
// node_modules/fetch-blob/streams.cjs
|
|
3961
3964
|
var require_streams = __commonJS({
|
|
3962
3965
|
"node_modules/fetch-blob/streams.cjs"() {
|
|
3966
|
+
"use strict";
|
|
3963
3967
|
var POOL_SIZE2 = 65536;
|
|
3964
3968
|
if (!globalThis.ReadableStream) {
|
|
3965
3969
|
try {
|
|
@@ -4043,6 +4047,7 @@ function toIterator(parts, clone2 = true) {
|
|
|
4043
4047
|
var import_streams, POOL_SIZE, _parts, _type, _size, _endings, _a, _Blob, Blob, fetch_blob_default;
|
|
4044
4048
|
var init_fetch_blob = __esm({
|
|
4045
4049
|
"node_modules/fetch-blob/index.js"() {
|
|
4050
|
+
"use strict";
|
|
4046
4051
|
import_streams = __toESM(require_streams(), 1);
|
|
4047
4052
|
POOL_SIZE = 65536;
|
|
4048
4053
|
_Blob = (_a = class {
|
|
@@ -4237,6 +4242,7 @@ var init_fetch_blob = __esm({
|
|
|
4237
4242
|
var _lastModified, _name, _a2, _File, File, file_default;
|
|
4238
4243
|
var init_file = __esm({
|
|
4239
4244
|
"node_modules/fetch-blob/file.js"() {
|
|
4245
|
+
"use strict";
|
|
4240
4246
|
init_fetch_blob();
|
|
4241
4247
|
_File = (_a2 = class extends fetch_blob_default {
|
|
4242
4248
|
/**
|
|
@@ -4294,6 +4300,7 @@ Content-Type: ${v.type || "application/octet-stream"}\r
|
|
|
4294
4300
|
var t, i, h, r, m, f, e, x, _d, _a3, FormData;
|
|
4295
4301
|
var init_esm_min = __esm({
|
|
4296
4302
|
"node_modules/formdata-polyfill/esm.min.js"() {
|
|
4303
|
+
"use strict";
|
|
4297
4304
|
init_fetch_blob();
|
|
4298
4305
|
init_file();
|
|
4299
4306
|
({ toStringTag: t, iterator: i, hasInstance: h } = Symbol);
|
|
@@ -4378,6 +4385,7 @@ var init_esm_min = __esm({
|
|
|
4378
4385
|
var FetchBaseError;
|
|
4379
4386
|
var init_base = __esm({
|
|
4380
4387
|
"node_modules/node-fetch/src/errors/base.js"() {
|
|
4388
|
+
"use strict";
|
|
4381
4389
|
FetchBaseError = class extends Error {
|
|
4382
4390
|
constructor(message, type) {
|
|
4383
4391
|
super(message);
|
|
@@ -4398,6 +4406,7 @@ var init_base = __esm({
|
|
|
4398
4406
|
var FetchError;
|
|
4399
4407
|
var init_fetch_error = __esm({
|
|
4400
4408
|
"node_modules/node-fetch/src/errors/fetch-error.js"() {
|
|
4409
|
+
"use strict";
|
|
4401
4410
|
init_base();
|
|
4402
4411
|
FetchError = class extends FetchBaseError {
|
|
4403
4412
|
/**
|
|
@@ -4420,6 +4429,7 @@ var init_fetch_error = __esm({
|
|
|
4420
4429
|
var NAME, isURLSearchParameters, isBlob, isAbortSignal, isDomainOrSubdomain, isSameProtocol;
|
|
4421
4430
|
var init_is = __esm({
|
|
4422
4431
|
"node_modules/node-fetch/src/utils/is.js"() {
|
|
4432
|
+
"use strict";
|
|
4423
4433
|
NAME = Symbol.toStringTag;
|
|
4424
4434
|
isURLSearchParameters = (object) => {
|
|
4425
4435
|
return typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && typeof object.sort === "function" && object[NAME] === "URLSearchParams";
|
|
@@ -4446,6 +4456,7 @@ var init_is = __esm({
|
|
|
4446
4456
|
// node_modules/node-domexception/index.js
|
|
4447
4457
|
var require_node_domexception = __commonJS({
|
|
4448
4458
|
"node_modules/node-domexception/index.js"(exports, module2) {
|
|
4459
|
+
"use strict";
|
|
4449
4460
|
if (!globalThis.DOMException) {
|
|
4450
4461
|
try {
|
|
4451
4462
|
const { MessageChannel } = require("worker_threads"), port = new MessageChannel().port1, ab = new ArrayBuffer();
|
|
@@ -4462,6 +4473,7 @@ var require_node_domexception = __commonJS({
|
|
|
4462
4473
|
var import_node_fs, import_node_path, import_node_domexception, stat, blobFromSync, blobFrom, fileFrom, fileFromSync, fromBlob, fromFile, _path, _start, _BlobDataItem, BlobDataItem;
|
|
4463
4474
|
var init_from = __esm({
|
|
4464
4475
|
"node_modules/fetch-blob/from.js"() {
|
|
4476
|
+
"use strict";
|
|
4465
4477
|
import_node_fs = require("fs");
|
|
4466
4478
|
import_node_path = require("path");
|
|
4467
4479
|
import_node_domexception = __toESM(require_node_domexception(), 1);
|
|
@@ -4634,6 +4646,7 @@ async function toFormData(Body2, ct) {
|
|
|
4634
4646
|
var s, S, f2, F, LF, CR, SPACE, HYPHEN, COLON, A, Z, lower, noop, MultipartParser;
|
|
4635
4647
|
var init_multipart_parser = __esm({
|
|
4636
4648
|
"node_modules/node-fetch/src/utils/multipart-parser.js"() {
|
|
4649
|
+
"use strict";
|
|
4637
4650
|
init_from();
|
|
4638
4651
|
init_esm_min();
|
|
4639
4652
|
s = 0;
|
|
@@ -4961,6 +4974,7 @@ async function consumeBody(data) {
|
|
|
4961
4974
|
var import_node_stream, import_node_util, import_node_buffer, pipeline, INTERNALS, Body, clone, getNonSpecFormDataBoundary, extractContentType, getTotalBytes, writeToStream;
|
|
4962
4975
|
var init_body = __esm({
|
|
4963
4976
|
"node_modules/node-fetch/src/body.js"() {
|
|
4977
|
+
"use strict";
|
|
4964
4978
|
import_node_stream = __toESM(require("stream"), 1);
|
|
4965
4979
|
import_node_util = require("util");
|
|
4966
4980
|
import_node_buffer = require("buffer");
|
|
@@ -5193,6 +5207,7 @@ function fromRawHeaders(headers = []) {
|
|
|
5193
5207
|
var import_node_util2, import_node_http, validateHeaderName, validateHeaderValue, Headers;
|
|
5194
5208
|
var init_headers = __esm({
|
|
5195
5209
|
"node_modules/node-fetch/src/headers.js"() {
|
|
5210
|
+
"use strict";
|
|
5196
5211
|
import_node_util2 = require("util");
|
|
5197
5212
|
import_node_http = __toESM(require("http"), 1);
|
|
5198
5213
|
validateHeaderName = typeof import_node_http.default.validateHeaderName === "function" ? import_node_http.default.validateHeaderName : (name) => {
|
|
@@ -5366,6 +5381,7 @@ var init_headers = __esm({
|
|
|
5366
5381
|
var redirectStatus, isRedirect;
|
|
5367
5382
|
var init_is_redirect = __esm({
|
|
5368
5383
|
"node_modules/node-fetch/src/utils/is-redirect.js"() {
|
|
5384
|
+
"use strict";
|
|
5369
5385
|
redirectStatus = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
|
|
5370
5386
|
isRedirect = (code) => {
|
|
5371
5387
|
return redirectStatus.has(code);
|
|
@@ -5377,6 +5393,7 @@ var init_is_redirect = __esm({
|
|
|
5377
5393
|
var INTERNALS2, Response;
|
|
5378
5394
|
var init_response = __esm({
|
|
5379
5395
|
"node_modules/node-fetch/src/response.js"() {
|
|
5396
|
+
"use strict";
|
|
5380
5397
|
init_headers();
|
|
5381
5398
|
init_body();
|
|
5382
5399
|
init_is_redirect();
|
|
@@ -5502,6 +5519,7 @@ var init_response = __esm({
|
|
|
5502
5519
|
var getSearch;
|
|
5503
5520
|
var init_get_search = __esm({
|
|
5504
5521
|
"node_modules/node-fetch/src/utils/get-search.js"() {
|
|
5522
|
+
"use strict";
|
|
5505
5523
|
getSearch = (parsedURL) => {
|
|
5506
5524
|
if (parsedURL.search) {
|
|
5507
5525
|
return parsedURL.search;
|
|
@@ -5642,6 +5660,7 @@ function parseReferrerPolicyFromHeader(headers) {
|
|
|
5642
5660
|
var import_node_net, ReferrerPolicy, DEFAULT_REFERRER_POLICY;
|
|
5643
5661
|
var init_referrer = __esm({
|
|
5644
5662
|
"node_modules/node-fetch/src/utils/referrer.js"() {
|
|
5663
|
+
"use strict";
|
|
5645
5664
|
import_node_net = require("net");
|
|
5646
5665
|
ReferrerPolicy = /* @__PURE__ */ new Set([
|
|
5647
5666
|
"",
|
|
@@ -5662,6 +5681,7 @@ var init_referrer = __esm({
|
|
|
5662
5681
|
var import_node_url, import_node_util3, INTERNALS3, isRequest, doBadDataWarn, Request, getNodeRequestOptions;
|
|
5663
5682
|
var init_request = __esm({
|
|
5664
5683
|
"node_modules/node-fetch/src/request.js"() {
|
|
5684
|
+
"use strict";
|
|
5665
5685
|
import_node_url = require("url");
|
|
5666
5686
|
import_node_util3 = require("util");
|
|
5667
5687
|
init_headers();
|
|
@@ -5867,6 +5887,7 @@ var init_request = __esm({
|
|
|
5867
5887
|
var AbortError;
|
|
5868
5888
|
var init_abort_error = __esm({
|
|
5869
5889
|
"node_modules/node-fetch/src/errors/abort-error.js"() {
|
|
5890
|
+
"use strict";
|
|
5870
5891
|
init_base();
|
|
5871
5892
|
AbortError = class extends FetchBaseError {
|
|
5872
5893
|
constructor(message, type = "aborted") {
|
|
@@ -6158,6 +6179,7 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
|
|
|
6158
6179
|
var import_node_http2, import_node_https, import_node_zlib, import_node_stream2, import_node_buffer2, supportedSchemas;
|
|
6159
6180
|
var init_src = __esm({
|
|
6160
6181
|
"node_modules/node-fetch/src/index.js"() {
|
|
6182
|
+
"use strict";
|
|
6161
6183
|
import_node_http2 = __toESM(require("http"), 1);
|
|
6162
6184
|
import_node_https = __toESM(require("https"), 1);
|
|
6163
6185
|
import_node_zlib = __toESM(require("zlib"), 1);
|
package/lib/node-download.js
CHANGED
|
@@ -146,6 +146,7 @@ function dataUriToBuffer(uri) {
|
|
|
146
146
|
var dist_default;
|
|
147
147
|
var init_dist = __esm({
|
|
148
148
|
"node_modules/data-uri-to-buffer/dist/index.js"() {
|
|
149
|
+
"use strict";
|
|
149
150
|
dist_default = dataUriToBuffer;
|
|
150
151
|
}
|
|
151
152
|
});
|
|
@@ -153,6 +154,7 @@ var init_dist = __esm({
|
|
|
153
154
|
// node_modules/web-streams-polyfill/dist/ponyfill.es2018.js
|
|
154
155
|
var require_ponyfill_es2018 = __commonJS({
|
|
155
156
|
"node_modules/web-streams-polyfill/dist/ponyfill.es2018.js"(exports, module) {
|
|
157
|
+
"use strict";
|
|
156
158
|
(function(global2, factory) {
|
|
157
159
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.WebStreamsPolyfill = {}));
|
|
158
160
|
})(exports, (function(exports2) {
|
|
@@ -3965,6 +3967,7 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
3965
3967
|
// node_modules/fetch-blob/streams.cjs
|
|
3966
3968
|
var require_streams = __commonJS({
|
|
3967
3969
|
"node_modules/fetch-blob/streams.cjs"() {
|
|
3970
|
+
"use strict";
|
|
3968
3971
|
var POOL_SIZE2 = 65536;
|
|
3969
3972
|
if (!globalThis.ReadableStream) {
|
|
3970
3973
|
try {
|
|
@@ -4048,6 +4051,7 @@ function toIterator(parts, clone2 = true) {
|
|
|
4048
4051
|
var import_streams, POOL_SIZE, _parts, _type, _size, _endings, _a, _Blob, Blob, fetch_blob_default;
|
|
4049
4052
|
var init_fetch_blob = __esm({
|
|
4050
4053
|
"node_modules/fetch-blob/index.js"() {
|
|
4054
|
+
"use strict";
|
|
4051
4055
|
import_streams = __toESM(require_streams(), 1);
|
|
4052
4056
|
POOL_SIZE = 65536;
|
|
4053
4057
|
_Blob = (_a = class {
|
|
@@ -4242,6 +4246,7 @@ var init_fetch_blob = __esm({
|
|
|
4242
4246
|
var _lastModified, _name, _a2, _File, File, file_default;
|
|
4243
4247
|
var init_file = __esm({
|
|
4244
4248
|
"node_modules/fetch-blob/file.js"() {
|
|
4249
|
+
"use strict";
|
|
4245
4250
|
init_fetch_blob();
|
|
4246
4251
|
_File = (_a2 = class extends fetch_blob_default {
|
|
4247
4252
|
/**
|
|
@@ -4299,6 +4304,7 @@ Content-Type: ${v.type || "application/octet-stream"}\r
|
|
|
4299
4304
|
var t, i, h, r, m, f, e, x, _d, _a3, FormData;
|
|
4300
4305
|
var init_esm_min = __esm({
|
|
4301
4306
|
"node_modules/formdata-polyfill/esm.min.js"() {
|
|
4307
|
+
"use strict";
|
|
4302
4308
|
init_fetch_blob();
|
|
4303
4309
|
init_file();
|
|
4304
4310
|
({ toStringTag: t, iterator: i, hasInstance: h } = Symbol);
|
|
@@ -4383,6 +4389,7 @@ var init_esm_min = __esm({
|
|
|
4383
4389
|
var FetchBaseError;
|
|
4384
4390
|
var init_base = __esm({
|
|
4385
4391
|
"node_modules/node-fetch/src/errors/base.js"() {
|
|
4392
|
+
"use strict";
|
|
4386
4393
|
FetchBaseError = class extends Error {
|
|
4387
4394
|
constructor(message, type) {
|
|
4388
4395
|
super(message);
|
|
@@ -4403,6 +4410,7 @@ var init_base = __esm({
|
|
|
4403
4410
|
var FetchError;
|
|
4404
4411
|
var init_fetch_error = __esm({
|
|
4405
4412
|
"node_modules/node-fetch/src/errors/fetch-error.js"() {
|
|
4413
|
+
"use strict";
|
|
4406
4414
|
init_base();
|
|
4407
4415
|
FetchError = class extends FetchBaseError {
|
|
4408
4416
|
/**
|
|
@@ -4425,6 +4433,7 @@ var init_fetch_error = __esm({
|
|
|
4425
4433
|
var NAME, isURLSearchParameters, isBlob, isAbortSignal, isDomainOrSubdomain, isSameProtocol;
|
|
4426
4434
|
var init_is = __esm({
|
|
4427
4435
|
"node_modules/node-fetch/src/utils/is.js"() {
|
|
4436
|
+
"use strict";
|
|
4428
4437
|
NAME = Symbol.toStringTag;
|
|
4429
4438
|
isURLSearchParameters = (object) => {
|
|
4430
4439
|
return typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && typeof object.sort === "function" && object[NAME] === "URLSearchParams";
|
|
@@ -4451,6 +4460,7 @@ var init_is = __esm({
|
|
|
4451
4460
|
// node_modules/node-domexception/index.js
|
|
4452
4461
|
var require_node_domexception = __commonJS({
|
|
4453
4462
|
"node_modules/node-domexception/index.js"(exports, module) {
|
|
4463
|
+
"use strict";
|
|
4454
4464
|
if (!globalThis.DOMException) {
|
|
4455
4465
|
try {
|
|
4456
4466
|
const { MessageChannel } = __require("worker_threads"), port = new MessageChannel().port1, ab = new ArrayBuffer();
|
|
@@ -4469,6 +4479,7 @@ import { basename } from "path";
|
|
|
4469
4479
|
var import_node_domexception, stat, blobFromSync, blobFrom, fileFrom, fileFromSync, fromBlob, fromFile, _path, _start, _BlobDataItem, BlobDataItem;
|
|
4470
4480
|
var init_from = __esm({
|
|
4471
4481
|
"node_modules/fetch-blob/from.js"() {
|
|
4482
|
+
"use strict";
|
|
4472
4483
|
import_node_domexception = __toESM(require_node_domexception(), 1);
|
|
4473
4484
|
init_file();
|
|
4474
4485
|
init_fetch_blob();
|
|
@@ -4639,6 +4650,7 @@ async function toFormData(Body2, ct) {
|
|
|
4639
4650
|
var s, S, f2, F, LF, CR, SPACE, HYPHEN, COLON, A, Z, lower, noop, MultipartParser;
|
|
4640
4651
|
var init_multipart_parser = __esm({
|
|
4641
4652
|
"node_modules/node-fetch/src/utils/multipart-parser.js"() {
|
|
4653
|
+
"use strict";
|
|
4642
4654
|
init_from();
|
|
4643
4655
|
init_esm_min();
|
|
4644
4656
|
s = 0;
|
|
@@ -4969,6 +4981,7 @@ async function consumeBody(data) {
|
|
|
4969
4981
|
var pipeline, INTERNALS, Body, clone, getNonSpecFormDataBoundary, extractContentType, getTotalBytes, writeToStream;
|
|
4970
4982
|
var init_body = __esm({
|
|
4971
4983
|
"node_modules/node-fetch/src/body.js"() {
|
|
4984
|
+
"use strict";
|
|
4972
4985
|
init_fetch_blob();
|
|
4973
4986
|
init_esm_min();
|
|
4974
4987
|
init_fetch_error();
|
|
@@ -5200,6 +5213,7 @@ function fromRawHeaders(headers = []) {
|
|
|
5200
5213
|
var validateHeaderName, validateHeaderValue, Headers;
|
|
5201
5214
|
var init_headers = __esm({
|
|
5202
5215
|
"node_modules/node-fetch/src/headers.js"() {
|
|
5216
|
+
"use strict";
|
|
5203
5217
|
validateHeaderName = typeof http.validateHeaderName === "function" ? http.validateHeaderName : (name) => {
|
|
5204
5218
|
if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(name)) {
|
|
5205
5219
|
const error = new TypeError(`Header name must be a valid HTTP token [${name}]`);
|
|
@@ -5371,6 +5385,7 @@ var init_headers = __esm({
|
|
|
5371
5385
|
var redirectStatus, isRedirect;
|
|
5372
5386
|
var init_is_redirect = __esm({
|
|
5373
5387
|
"node_modules/node-fetch/src/utils/is-redirect.js"() {
|
|
5388
|
+
"use strict";
|
|
5374
5389
|
redirectStatus = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
|
|
5375
5390
|
isRedirect = (code) => {
|
|
5376
5391
|
return redirectStatus.has(code);
|
|
@@ -5382,6 +5397,7 @@ var init_is_redirect = __esm({
|
|
|
5382
5397
|
var INTERNALS2, Response;
|
|
5383
5398
|
var init_response = __esm({
|
|
5384
5399
|
"node_modules/node-fetch/src/response.js"() {
|
|
5400
|
+
"use strict";
|
|
5385
5401
|
init_headers();
|
|
5386
5402
|
init_body();
|
|
5387
5403
|
init_is_redirect();
|
|
@@ -5507,6 +5523,7 @@ var init_response = __esm({
|
|
|
5507
5523
|
var getSearch;
|
|
5508
5524
|
var init_get_search = __esm({
|
|
5509
5525
|
"node_modules/node-fetch/src/utils/get-search.js"() {
|
|
5526
|
+
"use strict";
|
|
5510
5527
|
getSearch = (parsedURL) => {
|
|
5511
5528
|
if (parsedURL.search) {
|
|
5512
5529
|
return parsedURL.search;
|
|
@@ -5648,6 +5665,7 @@ function parseReferrerPolicyFromHeader(headers) {
|
|
|
5648
5665
|
var ReferrerPolicy, DEFAULT_REFERRER_POLICY;
|
|
5649
5666
|
var init_referrer = __esm({
|
|
5650
5667
|
"node_modules/node-fetch/src/utils/referrer.js"() {
|
|
5668
|
+
"use strict";
|
|
5651
5669
|
ReferrerPolicy = /* @__PURE__ */ new Set([
|
|
5652
5670
|
"",
|
|
5653
5671
|
"no-referrer",
|
|
@@ -5669,6 +5687,7 @@ import { deprecate as deprecate2 } from "util";
|
|
|
5669
5687
|
var INTERNALS3, isRequest, doBadDataWarn, Request, getNodeRequestOptions;
|
|
5670
5688
|
var init_request = __esm({
|
|
5671
5689
|
"node_modules/node-fetch/src/request.js"() {
|
|
5690
|
+
"use strict";
|
|
5672
5691
|
init_headers();
|
|
5673
5692
|
init_body();
|
|
5674
5693
|
init_is();
|
|
@@ -5872,6 +5891,7 @@ var init_request = __esm({
|
|
|
5872
5891
|
var AbortError;
|
|
5873
5892
|
var init_abort_error = __esm({
|
|
5874
5893
|
"node_modules/node-fetch/src/errors/abort-error.js"() {
|
|
5894
|
+
"use strict";
|
|
5875
5895
|
init_base();
|
|
5876
5896
|
AbortError = class extends FetchBaseError {
|
|
5877
5897
|
constructor(message, type = "aborted") {
|
|
@@ -6168,6 +6188,7 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
|
|
|
6168
6188
|
var supportedSchemas;
|
|
6169
6189
|
var init_src = __esm({
|
|
6170
6190
|
"node_modules/node-fetch/src/index.js"() {
|
|
6191
|
+
"use strict";
|
|
6171
6192
|
init_dist();
|
|
6172
6193
|
init_body();
|
|
6173
6194
|
init_response();
|
package/lib/node-env.cjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -195,6 +196,7 @@ var require_command_exists = __commonJS({
|
|
|
195
196
|
// node_modules/command-exists/index.js
|
|
196
197
|
var require_command_exists2 = __commonJS({
|
|
197
198
|
"node_modules/command-exists/index.js"(exports, module2) {
|
|
199
|
+
"use strict";
|
|
198
200
|
module2.exports = require_command_exists();
|
|
199
201
|
}
|
|
200
202
|
});
|
|
@@ -223,7 +225,7 @@ var import_os = __toESM(require("os"), 1);
|
|
|
223
225
|
var import_path = __toESM(require("path"), 1);
|
|
224
226
|
var import_command_exists = __toESM(require_command_exists2(), 1);
|
|
225
227
|
|
|
226
|
-
// src/SSEResponse.ts
|
|
228
|
+
// src/mods/SSEResponse.ts
|
|
227
229
|
var SSEResponse = class {
|
|
228
230
|
constructor(resObject) {
|
|
229
231
|
__publicField(this, "res");
|
|
@@ -270,7 +272,7 @@ var SSEResponse = class {
|
|
|
270
272
|
}
|
|
271
273
|
};
|
|
272
274
|
|
|
273
|
-
// src/SSEClient.ts
|
|
275
|
+
// src/mods/SSEClient.ts
|
|
274
276
|
var import_events = require("events");
|
|
275
277
|
var SSEClient = class extends import_events.EventEmitter {
|
|
276
278
|
constructor(options) {
|
package/lib/node-env.js
CHANGED
|
@@ -196,6 +196,7 @@ var require_command_exists = __commonJS({
|
|
|
196
196
|
// node_modules/command-exists/index.js
|
|
197
197
|
var require_command_exists2 = __commonJS({
|
|
198
198
|
"node_modules/command-exists/index.js"(exports, module) {
|
|
199
|
+
"use strict";
|
|
199
200
|
module.exports = require_command_exists();
|
|
200
201
|
}
|
|
201
202
|
});
|
|
@@ -206,7 +207,7 @@ import * as fs from "fs-extra";
|
|
|
206
207
|
import os2 from "os";
|
|
207
208
|
import path2 from "path";
|
|
208
209
|
|
|
209
|
-
// src/SSEResponse.ts
|
|
210
|
+
// src/mods/SSEResponse.ts
|
|
210
211
|
var SSEResponse = class {
|
|
211
212
|
constructor(resObject) {
|
|
212
213
|
__publicField(this, "res");
|
|
@@ -253,7 +254,7 @@ var SSEResponse = class {
|
|
|
253
254
|
}
|
|
254
255
|
};
|
|
255
256
|
|
|
256
|
-
// src/SSEClient.ts
|
|
257
|
+
// src/mods/SSEClient.ts
|
|
257
258
|
import { EventEmitter } from "events";
|
|
258
259
|
var SSEClient = class extends EventEmitter {
|
|
259
260
|
constructor(options) {
|
package/lib/trpc-helpers.cjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rg-dev/stdlib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.56",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -71,14 +71,15 @@
|
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"env-paths": "^3.0.0",
|
|
75
74
|
"@trpc/server": "^11.1.1",
|
|
76
75
|
"@types/command-exists": "^1.2.3",
|
|
77
76
|
"@types/express": "^5.0.6",
|
|
78
77
|
"@types/fs-extra": "^11.0.4",
|
|
79
78
|
"@types/node": "^18.19.3",
|
|
79
|
+
"axios": "^1.13.4",
|
|
80
80
|
"builtin-modules": "^3.3.0",
|
|
81
81
|
"command-exists": "^1.2.9",
|
|
82
|
+
"env-paths": "^3.0.0",
|
|
82
83
|
"express": "^5.1.0",
|
|
83
84
|
"node-fetch": "^3.3.2",
|
|
84
85
|
"superjson": "^2.2.6",
|