@rpcbase/api 0.68.0 → 0.70.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/dist/index.js +32 -20
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6,12 +6,13 @@ import require$$4$1 from "node:zlib";
|
|
|
6
6
|
import require$$1$2 from "path";
|
|
7
7
|
import require$$1$5 from "node:events";
|
|
8
8
|
import require$$0$5 from "url";
|
|
9
|
-
import require$$
|
|
9
|
+
import require$$8 from "node:path";
|
|
10
10
|
import require$$2$1 from "node:fs";
|
|
11
11
|
import require$$2$2 from "node:http";
|
|
12
12
|
import require$$0$6 from "crypto";
|
|
13
13
|
import require$$1$3 from "fs";
|
|
14
|
-
import require$$6$1 from "querystring";
|
|
14
|
+
import require$$6$1 from "node:querystring";
|
|
15
|
+
import require$$7$1 from "node:buffer";
|
|
15
16
|
import require$$1$4 from "node:net";
|
|
16
17
|
import require$$13 from "stream";
|
|
17
18
|
import require$$14 from "util";
|
|
@@ -14219,7 +14220,7 @@ function requireShams() {
|
|
|
14219
14220
|
return true;
|
|
14220
14221
|
}
|
|
14221
14222
|
var obj = {};
|
|
14222
|
-
var sym = Symbol("test");
|
|
14223
|
+
var sym = /* @__PURE__ */ Symbol("test");
|
|
14223
14224
|
var symObj = Object(sym);
|
|
14224
14225
|
if (typeof sym === "string") {
|
|
14225
14226
|
return false;
|
|
@@ -14278,7 +14279,7 @@ function requireHasSymbols() {
|
|
|
14278
14279
|
if (typeof origSymbol("foo") !== "symbol") {
|
|
14279
14280
|
return false;
|
|
14280
14281
|
}
|
|
14281
|
-
if (typeof Symbol("bar") !== "symbol") {
|
|
14282
|
+
if (typeof /* @__PURE__ */ Symbol("bar") !== "symbol") {
|
|
14282
14283
|
return false;
|
|
14283
14284
|
}
|
|
14284
14285
|
return hasSymbolSham();
|
|
@@ -16229,7 +16230,7 @@ function requireView() {
|
|
|
16229
16230
|
if (hasRequiredView) return view;
|
|
16230
16231
|
hasRequiredView = 1;
|
|
16231
16232
|
var debug = requireBrowser$1()("express:view");
|
|
16232
|
-
var path = require$$
|
|
16233
|
+
var path = require$$8;
|
|
16233
16234
|
var fs = require$$2$1;
|
|
16234
16235
|
var dirname = path.dirname;
|
|
16235
16236
|
var basename = path.basename;
|
|
@@ -17196,6 +17197,7 @@ function requireUtils() {
|
|
|
17196
17197
|
var proxyaddr = requireProxyAddr();
|
|
17197
17198
|
var qs = /* @__PURE__ */ requireLib();
|
|
17198
17199
|
var querystring = require$$6$1;
|
|
17200
|
+
const { Buffer: Buffer2 } = require$$7$1;
|
|
17199
17201
|
exports$1.methods = METHODS.map((method) => method.toLowerCase());
|
|
17200
17202
|
exports$1.etag = createETagGenerator({ weak: false });
|
|
17201
17203
|
exports$1.wetag = createETagGenerator({ weak: true });
|
|
@@ -17299,7 +17301,7 @@ function requireUtils() {
|
|
|
17299
17301
|
};
|
|
17300
17302
|
function createETagGenerator(options) {
|
|
17301
17303
|
return function generateETag(body, encoding2) {
|
|
17302
|
-
var buf = !
|
|
17304
|
+
var buf = !Buffer2.isBuffer(body) ? Buffer2.from(body, encoding2) : body;
|
|
17303
17305
|
return etag(buf, options);
|
|
17304
17306
|
};
|
|
17305
17307
|
}
|
|
@@ -18435,7 +18437,7 @@ function requireApplication() {
|
|
|
18435
18437
|
var compileETag = requireUtils().compileETag;
|
|
18436
18438
|
var compileQueryParser = requireUtils().compileQueryParser;
|
|
18437
18439
|
var compileTrust = requireUtils().compileTrust;
|
|
18438
|
-
var resolve = require$$
|
|
18440
|
+
var resolve = require$$8.resolve;
|
|
18439
18441
|
var once2 = requireOnce();
|
|
18440
18442
|
var Router = requireRouter();
|
|
18441
18443
|
var slice = Array.prototype.slice;
|
|
@@ -18664,7 +18666,7 @@ function requireApplication() {
|
|
|
18664
18666
|
};
|
|
18665
18667
|
app.listen = function listen() {
|
|
18666
18668
|
var server = http.createServer(this);
|
|
18667
|
-
var args =
|
|
18669
|
+
var args = slice.call(arguments);
|
|
18668
18670
|
if (typeof args[args.length - 1] === "function") {
|
|
18669
18671
|
var done = args[args.length - 1] = once2(args[args.length - 1]);
|
|
18670
18672
|
server.once("error", done);
|
|
@@ -19474,9 +19476,8 @@ function requireRequest() {
|
|
|
19474
19476
|
var accept = accepts2(this);
|
|
19475
19477
|
return accept.charsets.apply(accept, arguments);
|
|
19476
19478
|
};
|
|
19477
|
-
req.acceptsLanguages = function() {
|
|
19478
|
-
|
|
19479
|
-
return accept.languages.apply(accept, arguments);
|
|
19479
|
+
req.acceptsLanguages = function(...languages) {
|
|
19480
|
+
return accepts2(this).languages(...languages);
|
|
19480
19481
|
};
|
|
19481
19482
|
req.range = function range2(size, options) {
|
|
19482
19483
|
var range3 = this.get("Range");
|
|
@@ -19502,9 +19503,9 @@ function requireRequest() {
|
|
|
19502
19503
|
return typeis(this, arr);
|
|
19503
19504
|
};
|
|
19504
19505
|
defineGetter(req, "protocol", function protocol() {
|
|
19505
|
-
var proto = this.
|
|
19506
|
+
var proto = this.socket.encrypted ? "https" : "http";
|
|
19506
19507
|
var trust = this.app.get("trust proxy fn");
|
|
19507
|
-
if (!trust(this.
|
|
19508
|
+
if (!trust(this.socket.remoteAddress, 0)) {
|
|
19508
19509
|
return proto;
|
|
19509
19510
|
}
|
|
19510
19511
|
var header = this.get("X-Forwarded-Proto") || proto;
|
|
@@ -19537,7 +19538,7 @@ function requireRequest() {
|
|
|
19537
19538
|
defineGetter(req, "host", function host() {
|
|
19538
19539
|
var trust = this.app.get("trust proxy fn");
|
|
19539
19540
|
var val = this.get("X-Forwarded-Host");
|
|
19540
|
-
if (!val || !trust(this.
|
|
19541
|
+
if (!val || !trust(this.socket.remoteAddress, 0)) {
|
|
19541
19542
|
val = this.get("Host");
|
|
19542
19543
|
} else if (val.indexOf(",") !== -1) {
|
|
19543
19544
|
val = val.substring(0, val.indexOf(",")).trimRight();
|
|
@@ -20493,13 +20494,14 @@ function requireResponse() {
|
|
|
20493
20494
|
hasRequiredResponse = 1;
|
|
20494
20495
|
var contentDisposition2 = requireContentDisposition();
|
|
20495
20496
|
var createError = requireHttpErrors();
|
|
20497
|
+
var deprecate = requireBrowser()("express");
|
|
20496
20498
|
var encodeUrl = requireEncodeurl();
|
|
20497
20499
|
var escapeHtml = requireEscapeHtml();
|
|
20498
20500
|
var http = require$$2$2;
|
|
20499
20501
|
var onFinished2 = requireOnFinished();
|
|
20500
20502
|
var mime = requireMimeTypes();
|
|
20501
|
-
var path = require$$
|
|
20502
|
-
var pathIsAbsolute = require$$
|
|
20503
|
+
var path = require$$8;
|
|
20504
|
+
var pathIsAbsolute = require$$8.isAbsolute;
|
|
20503
20505
|
var statuses2 = requireStatuses();
|
|
20504
20506
|
var sign2 = requireCookieSignature().sign;
|
|
20505
20507
|
var normalizeType = requireUtils().normalizeType;
|
|
@@ -20510,6 +20512,7 @@ function requireResponse() {
|
|
|
20510
20512
|
var extname = path.extname;
|
|
20511
20513
|
var resolve = path.resolve;
|
|
20512
20514
|
var vary2 = requireVary();
|
|
20515
|
+
const { Buffer: Buffer2 } = require$$7$1;
|
|
20513
20516
|
var res = Object.create(http.ServerResponse.prototype);
|
|
20514
20517
|
response = res;
|
|
20515
20518
|
res.status = function status(code) {
|
|
@@ -20573,12 +20576,12 @@ function requireResponse() {
|
|
|
20573
20576
|
var generateETag = !this.get("ETag") && typeof etagFn === "function";
|
|
20574
20577
|
var len;
|
|
20575
20578
|
if (chunk !== void 0) {
|
|
20576
|
-
if (
|
|
20579
|
+
if (Buffer2.isBuffer(chunk)) {
|
|
20577
20580
|
len = chunk.length;
|
|
20578
20581
|
} else if (!generateETag && chunk.length < 1e3) {
|
|
20579
|
-
len =
|
|
20582
|
+
len = Buffer2.byteLength(chunk, encoding2);
|
|
20580
20583
|
} else {
|
|
20581
|
-
chunk =
|
|
20584
|
+
chunk = Buffer2.from(chunk, encoding2);
|
|
20582
20585
|
encoding2 = void 0;
|
|
20583
20586
|
len = chunk.length;
|
|
20584
20587
|
}
|
|
@@ -20817,6 +20820,15 @@ function requireResponse() {
|
|
|
20817
20820
|
status = arguments[0];
|
|
20818
20821
|
address = arguments[1];
|
|
20819
20822
|
}
|
|
20823
|
+
if (!address) {
|
|
20824
|
+
deprecate("Provide a url argument");
|
|
20825
|
+
}
|
|
20826
|
+
if (typeof address !== "string") {
|
|
20827
|
+
deprecate("Url must be a string");
|
|
20828
|
+
}
|
|
20829
|
+
if (typeof status !== "number") {
|
|
20830
|
+
deprecate("Status must be a number");
|
|
20831
|
+
}
|
|
20820
20832
|
address = this.location(address).get("Location");
|
|
20821
20833
|
this.format({
|
|
20822
20834
|
text: function() {
|
|
@@ -20831,7 +20843,7 @@ function requireResponse() {
|
|
|
20831
20843
|
}
|
|
20832
20844
|
});
|
|
20833
20845
|
this.status(status);
|
|
20834
|
-
this.set("Content-Length",
|
|
20846
|
+
this.set("Content-Length", Buffer2.byteLength(body));
|
|
20835
20847
|
if (this.req.method === "HEAD") {
|
|
20836
20848
|
this.end();
|
|
20837
20849
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpcbase/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.70.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
"peerDependencies": {},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"bluebird": "3.7.2",
|
|
57
|
-
"express": "5.1
|
|
57
|
+
"express": "5.2.1"
|
|
58
58
|
}
|
|
59
59
|
}
|