@nuxt/devtools 0.1.5 → 0.2.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 +2 -0
- package/dist/chunks/module-main.mjs +687 -672
- package/dist/chunks/vscode.mjs +35 -30
- package/dist/cli.mjs +21 -60
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/__inspecting/index.html +2 -2
- package/dist/client/_nuxt/{Badge.ec9e349b.js → Badge.4e9c300b.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.29183a21.js → FilepathItem.vue.b36b22b8.js} +1 -1
- package/dist/client/_nuxt/LaunchPage.vue.c9d8bfbe.js +1 -0
- package/dist/client/_nuxt/NButton.a7fda268.css +1 -0
- package/dist/client/_nuxt/{NButton.vue.09cc4471.js → NButton.vue.b50294f1.js} +2 -2
- package/dist/client/_nuxt/NCheckbox.vue.69c13749.js +1 -0
- package/dist/client/_nuxt/NIcon.vue.656cdb1e.js +1 -0
- package/dist/client/_nuxt/NTextInput.vue.928c9e2a.js +1 -0
- package/dist/client/_nuxt/{NuxtLogo.9f2db884.js → NuxtLogo.f9908c64.js} +1 -1
- package/dist/client/_nuxt/SectionBlock.48da9d80.css +1 -0
- package/dist/client/_nuxt/SectionBlock.914c7802.js +1 -0
- package/dist/client/_nuxt/StateEditor.ce27b0a9.css +1 -0
- package/dist/client/_nuxt/StateEditor.vue.24b581fe.js +1 -0
- package/dist/client/_nuxt/{StateEditor.vue.ab9d7157.js → StateEditor.vue.99c457ec.js} +81 -79
- package/dist/client/_nuxt/{TabIcon.vue.6890c56a.js → TabIcon.vue.c3d4f8eb.js} +1 -1
- package/dist/client/_nuxt/__inspecting.f0beaf14.js +1 -0
- package/dist/client/_nuxt/{asyncData.c8345f31.js → asyncData.d4a4cc23.js} +1 -1
- package/dist/client/_nuxt/components.2f7ee4ee.js +1 -0
- package/dist/client/_nuxt/composables.a4d79ae5.js +1 -0
- package/dist/client/_nuxt/{context.d25709fd.js → context.f290c514.js} +1 -1
- package/dist/client/_nuxt/custom-_name_.6fcfe01b.js +1 -0
- package/dist/client/_nuxt/default.7c4cf2ae.js +1 -0
- package/dist/client/_nuxt/editor.cdd0d584.js +1 -0
- package/dist/client/_nuxt/entry.3f184dda.js +5 -0
- package/dist/client/_nuxt/entry.aace963d.css +1 -0
- package/dist/client/_nuxt/error-404.2618a69f.css +1 -0
- package/dist/client/_nuxt/error-404.42d6fea6.js +1 -0
- package/dist/client/_nuxt/error-500.12a2683b.css +1 -0
- package/dist/client/_nuxt/error-500.c25057d1.js +1 -0
- package/dist/client/_nuxt/{error-component.ae83d235.js → error-component.f5255ea4.js} +2 -2
- package/dist/client/_nuxt/hooks.f2f7f7c0.js +1 -0
- package/dist/client/_nuxt/imports.c6403530.js +1 -0
- package/dist/client/_nuxt/{index.fe0907d3.js → index.cb924a24.js} +1 -1
- package/dist/client/_nuxt/layouts.c6fb5d9f.js +1 -0
- package/dist/client/_nuxt/{middleware.5410fce5.js → middleware.986c1dcb.js} +1 -1
- package/dist/client/_nuxt/modules.67212f2b.js +1 -0
- package/dist/client/_nuxt/{none.76eeebc3.js → none.64c3c69e.js} +1 -1
- package/dist/client/_nuxt/{nuxt-link.3aeeed3f.js → nuxt-link.7c2ecc54.js} +1 -1
- package/dist/client/_nuxt/overview.39e81b24.js +1 -0
- package/dist/client/_nuxt/pages.28f6050f.js +1 -0
- package/dist/client/_nuxt/payload.482e4157.js +1 -0
- package/dist/client/_nuxt/plugins.dc220904.js +1 -0
- package/dist/client/_nuxt/{runtime-configs.7cc77728.js → runtime-configs.a7793337.js} +1 -1
- package/dist/client/_nuxt/{server-routes.ffdf17b0.js → server-routes.7dbce087.js} +1 -1
- package/dist/client/_nuxt/state.99106176.js +1 -0
- package/dist/client/_nuxt/unocss-runtime.bcfb14a2.js +2 -0
- package/dist/client/_nuxt/{virtual-files.a26c8c69.js → virtual-files.1c188f74.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/modules/components/index.html +2 -2
- package/dist/client/modules/hooks/index.html +2 -2
- package/dist/client/modules/imports/index.html +2 -2
- package/dist/client/modules/layouts/index.html +2 -2
- package/dist/client/modules/middleware/index.html +2 -2
- package/dist/client/modules/modules/index.html +2 -2
- package/dist/client/modules/overview/index.html +2 -2
- package/dist/client/modules/pages/index.html +2 -2
- package/dist/client/modules/payload/index.html +2 -2
- package/dist/client/modules/plugins/index.html +2 -2
- package/dist/client/modules/runtime-configs/index.html +2 -2
- package/dist/client/modules/server-routes/index.html +2 -2
- package/dist/client/modules/virtual-files/index.html +2 -2
- package/dist/iframe-client.d.ts +1 -1
- package/dist/module.d.ts +3 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -30
- package/dist/runtime/plugins/devtools.client.mjs +1 -1
- package/dist/runtime/plugins/view/Frame.vue +22 -5
- package/dist/runtime/plugins/view/state.d.ts +2 -1
- package/dist/runtime/plugins/view/state.mjs +1 -0
- package/dist/runtime/plugins/view/utils.d.ts +1 -1
- package/dist/runtime/plugins/view/utils.mjs +9 -7
- package/dist/shared/{devtools.28239661.mjs → devtools.894440bf.mjs} +1 -1
- package/dist/shared/devtools.edb7b427.mjs +35 -0
- package/dist/types.d.ts +3 -2
- package/package.json +34 -37
- package/dist/client/_nuxt/LaunchPage.vue.f4239533.js +0 -1
- package/dist/client/_nuxt/NButton.db724adb.css +0 -1
- package/dist/client/_nuxt/NIcon.vue.701f4547.js +0 -1
- package/dist/client/_nuxt/NTextInput.vue.276e32b3.js +0 -1
- package/dist/client/_nuxt/SectionBlock.082cb101.css +0 -1
- package/dist/client/_nuxt/SectionBlock.8ff5d737.js +0 -1
- package/dist/client/_nuxt/Settings.vue.b55fa306.js +0 -1
- package/dist/client/_nuxt/StateEditor.989cce56.css +0 -1
- package/dist/client/_nuxt/StateEditor.vue.d668b11c.js +0 -1
- package/dist/client/_nuxt/__inspecting.12d34e8c.js +0 -1
- package/dist/client/_nuxt/components.08e98322.js +0 -1
- package/dist/client/_nuxt/composables.8c342cc5.js +0 -1
- package/dist/client/_nuxt/custom-_name_.89baf527.js +0 -1
- package/dist/client/_nuxt/default.975e4e70.js +0 -1
- package/dist/client/_nuxt/editor.f74d7351.js +0 -1
- package/dist/client/_nuxt/entry.d28dd037.js +0 -5
- package/dist/client/_nuxt/entry.e7b3d8fd.css +0 -1
- package/dist/client/_nuxt/error-404.1469f10f.css +0 -1
- package/dist/client/_nuxt/error-404.bdee7391.js +0 -1
- package/dist/client/_nuxt/error-500.92b94fae.css +0 -1
- package/dist/client/_nuxt/error-500.c5180cef.js +0 -1
- package/dist/client/_nuxt/hooks.8f89faa2.js +0 -1
- package/dist/client/_nuxt/imports.f7970750.js +0 -1
- package/dist/client/_nuxt/layouts.d5a3dabe.js +0 -1
- package/dist/client/_nuxt/modules.6fc7bd71.js +0 -1
- package/dist/client/_nuxt/overview.e7e9880f.js +0 -1
- package/dist/client/_nuxt/pages.40900507.js +0 -1
- package/dist/client/_nuxt/payload.36dbfdde.js +0 -1
- package/dist/client/_nuxt/plugins.8195b406.js +0 -1
- package/dist/client/_nuxt/state.a5c5a841.js +0 -1
- package/dist/client/_nuxt/unocss-runtime.1fec3315.js +0 -2
|
@@ -15,13 +15,14 @@ import require$$0$4 from 'url';
|
|
|
15
15
|
import * as qs from 'querystring';
|
|
16
16
|
import require$$0$5 from 'tty';
|
|
17
17
|
import isInstalledGlobally from 'is-installed-globally';
|
|
18
|
-
import { v as version } from '../shared/devtools.
|
|
18
|
+
import { v as version } from '../shared/devtools.894440bf.mjs';
|
|
19
19
|
import { createBirpcGroup } from 'birpc';
|
|
20
20
|
import { resolvePreset } from 'unimport';
|
|
21
21
|
import { join as join$1, dirname, resolve as resolve$1 } from 'pathe';
|
|
22
22
|
import fsp from 'fs/promises';
|
|
23
23
|
import 'pkg-types';
|
|
24
24
|
import { runtimeDir, clientDir, packageDir } from '../dirs.mjs';
|
|
25
|
+
import { R as ROUTE_ENTRY, a as ROUTE_CLIENT } from '../shared/devtools.edb7b427.mjs';
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
|
|
@@ -2289,7 +2290,7 @@ const { tokenChars: tokenChars$1 } = validationExports;
|
|
|
2289
2290
|
* parameter value
|
|
2290
2291
|
* @private
|
|
2291
2292
|
*/
|
|
2292
|
-
function push
|
|
2293
|
+
function push(dest, name, elem) {
|
|
2293
2294
|
if (dest[name] === undefined) dest[name] = [elem];
|
|
2294
2295
|
else dest[name].push(elem);
|
|
2295
2296
|
}
|
|
@@ -2333,7 +2334,7 @@ function parse$b(header) {
|
|
|
2333
2334
|
if (end === -1) end = i;
|
|
2334
2335
|
const name = header.slice(start, end);
|
|
2335
2336
|
if (code === 0x2c) {
|
|
2336
|
-
push
|
|
2337
|
+
push(offers, name, params);
|
|
2337
2338
|
params = Object.create(null);
|
|
2338
2339
|
} else {
|
|
2339
2340
|
extensionName = name;
|
|
@@ -2354,9 +2355,9 @@ function parse$b(header) {
|
|
|
2354
2355
|
}
|
|
2355
2356
|
|
|
2356
2357
|
if (end === -1) end = i;
|
|
2357
|
-
push
|
|
2358
|
+
push(params, header.slice(start, end), true);
|
|
2358
2359
|
if (code === 0x2c) {
|
|
2359
|
-
push
|
|
2360
|
+
push(offers, extensionName, params);
|
|
2360
2361
|
params = Object.create(null);
|
|
2361
2362
|
extensionName = undefined;
|
|
2362
2363
|
}
|
|
@@ -2409,9 +2410,9 @@ function parse$b(header) {
|
|
|
2409
2410
|
value = value.replace(/\\/g, '');
|
|
2410
2411
|
mustUnescape = false;
|
|
2411
2412
|
}
|
|
2412
|
-
push
|
|
2413
|
+
push(params, paramName, value);
|
|
2413
2414
|
if (code === 0x2c) {
|
|
2414
|
-
push
|
|
2415
|
+
push(offers, extensionName, params);
|
|
2415
2416
|
params = Object.create(null);
|
|
2416
2417
|
extensionName = undefined;
|
|
2417
2418
|
}
|
|
@@ -2431,16 +2432,16 @@ function parse$b(header) {
|
|
|
2431
2432
|
if (end === -1) end = i;
|
|
2432
2433
|
const token = header.slice(start, end);
|
|
2433
2434
|
if (extensionName === undefined) {
|
|
2434
|
-
push
|
|
2435
|
+
push(offers, token, params);
|
|
2435
2436
|
} else {
|
|
2436
2437
|
if (paramName === undefined) {
|
|
2437
|
-
push
|
|
2438
|
+
push(params, token, true);
|
|
2438
2439
|
} else if (mustUnescape) {
|
|
2439
|
-
push
|
|
2440
|
+
push(params, paramName, token.replace(/\\/g, ''));
|
|
2440
2441
|
} else {
|
|
2441
|
-
push
|
|
2442
|
+
push(params, paramName, token);
|
|
2442
2443
|
}
|
|
2443
|
-
push
|
|
2444
|
+
push(offers, extensionName, params);
|
|
2444
2445
|
}
|
|
2445
2446
|
|
|
2446
2447
|
return offers;
|
|
@@ -6085,765 +6086,782 @@ function requireIterator () {
|
|
|
6085
6086
|
return iterator;
|
|
6086
6087
|
}
|
|
6087
6088
|
|
|
6088
|
-
var yallist
|
|
6089
|
+
var yallist;
|
|
6090
|
+
var hasRequiredYallist;
|
|
6089
6091
|
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
+
function requireYallist () {
|
|
6093
|
+
if (hasRequiredYallist) return yallist;
|
|
6094
|
+
hasRequiredYallist = 1;
|
|
6095
|
+
yallist = Yallist;
|
|
6092
6096
|
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
if (!(self instanceof Yallist$1)) {
|
|
6096
|
-
self = new Yallist$1();
|
|
6097
|
-
}
|
|
6097
|
+
Yallist.Node = Node;
|
|
6098
|
+
Yallist.create = Yallist;
|
|
6098
6099
|
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6100
|
+
function Yallist (list) {
|
|
6101
|
+
var self = this;
|
|
6102
|
+
if (!(self instanceof Yallist)) {
|
|
6103
|
+
self = new Yallist();
|
|
6104
|
+
}
|
|
6102
6105
|
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
});
|
|
6107
|
-
} else if (arguments.length > 0) {
|
|
6108
|
-
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
6109
|
-
self.push(arguments[i]);
|
|
6110
|
-
}
|
|
6111
|
-
}
|
|
6106
|
+
self.tail = null;
|
|
6107
|
+
self.head = null;
|
|
6108
|
+
self.length = 0;
|
|
6112
6109
|
|
|
6113
|
-
|
|
6114
|
-
|
|
6110
|
+
if (list && typeof list.forEach === 'function') {
|
|
6111
|
+
list.forEach(function (item) {
|
|
6112
|
+
self.push(item);
|
|
6113
|
+
});
|
|
6114
|
+
} else if (arguments.length > 0) {
|
|
6115
|
+
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
6116
|
+
self.push(arguments[i]);
|
|
6117
|
+
}
|
|
6118
|
+
}
|
|
6115
6119
|
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
throw new Error('removing node which does not belong to this list')
|
|
6119
|
-
}
|
|
6120
|
+
return self
|
|
6121
|
+
}
|
|
6120
6122
|
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
+
Yallist.prototype.removeNode = function (node) {
|
|
6124
|
+
if (node.list !== this) {
|
|
6125
|
+
throw new Error('removing node which does not belong to this list')
|
|
6126
|
+
}
|
|
6123
6127
|
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
}
|
|
6128
|
+
var next = node.next;
|
|
6129
|
+
var prev = node.prev;
|
|
6127
6130
|
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
+
if (next) {
|
|
6132
|
+
next.prev = prev;
|
|
6133
|
+
}
|
|
6131
6134
|
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
if (node === this.tail) {
|
|
6136
|
-
this.tail = prev;
|
|
6137
|
-
}
|
|
6135
|
+
if (prev) {
|
|
6136
|
+
prev.next = next;
|
|
6137
|
+
}
|
|
6138
6138
|
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6139
|
+
if (node === this.head) {
|
|
6140
|
+
this.head = next;
|
|
6141
|
+
}
|
|
6142
|
+
if (node === this.tail) {
|
|
6143
|
+
this.tail = prev;
|
|
6144
|
+
}
|
|
6143
6145
|
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
+
node.list.length--;
|
|
6147
|
+
node.next = null;
|
|
6148
|
+
node.prev = null;
|
|
6149
|
+
node.list = null;
|
|
6146
6150
|
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
return
|
|
6150
|
-
}
|
|
6151
|
+
return next
|
|
6152
|
+
};
|
|
6151
6153
|
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6154
|
+
Yallist.prototype.unshiftNode = function (node) {
|
|
6155
|
+
if (node === this.head) {
|
|
6156
|
+
return
|
|
6157
|
+
}
|
|
6155
6158
|
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
if (head) {
|
|
6160
|
-
head.prev = node;
|
|
6161
|
-
}
|
|
6159
|
+
if (node.list) {
|
|
6160
|
+
node.list.removeNode(node);
|
|
6161
|
+
}
|
|
6162
6162
|
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
}
|
|
6163
|
+
var head = this.head;
|
|
6164
|
+
node.list = this;
|
|
6165
|
+
node.next = head;
|
|
6166
|
+
if (head) {
|
|
6167
|
+
head.prev = node;
|
|
6168
|
+
}
|
|
6169
6169
|
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6170
|
+
this.head = node;
|
|
6171
|
+
if (!this.tail) {
|
|
6172
|
+
this.tail = node;
|
|
6173
|
+
}
|
|
6174
|
+
this.length++;
|
|
6175
|
+
};
|
|
6174
6176
|
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6177
|
+
Yallist.prototype.pushNode = function (node) {
|
|
6178
|
+
if (node === this.tail) {
|
|
6179
|
+
return
|
|
6180
|
+
}
|
|
6178
6181
|
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
if (tail) {
|
|
6183
|
-
tail.next = node;
|
|
6184
|
-
}
|
|
6182
|
+
if (node.list) {
|
|
6183
|
+
node.list.removeNode(node);
|
|
6184
|
+
}
|
|
6185
6185
|
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
}
|
|
6186
|
+
var tail = this.tail;
|
|
6187
|
+
node.list = this;
|
|
6188
|
+
node.prev = tail;
|
|
6189
|
+
if (tail) {
|
|
6190
|
+
tail.next = node;
|
|
6191
|
+
}
|
|
6192
6192
|
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
};
|
|
6193
|
+
this.tail = node;
|
|
6194
|
+
if (!this.head) {
|
|
6195
|
+
this.head = node;
|
|
6196
|
+
}
|
|
6197
|
+
this.length++;
|
|
6198
|
+
};
|
|
6199
6199
|
|
|
6200
|
-
Yallist
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
};
|
|
6200
|
+
Yallist.prototype.push = function () {
|
|
6201
|
+
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
6202
|
+
push(this, arguments[i]);
|
|
6203
|
+
}
|
|
6204
|
+
return this.length
|
|
6205
|
+
};
|
|
6206
6206
|
|
|
6207
|
-
Yallist
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6207
|
+
Yallist.prototype.unshift = function () {
|
|
6208
|
+
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
6209
|
+
unshift(this, arguments[i]);
|
|
6210
|
+
}
|
|
6211
|
+
return this.length
|
|
6212
|
+
};
|
|
6211
6213
|
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
} else {
|
|
6217
|
-
this.head = null;
|
|
6218
|
-
}
|
|
6219
|
-
this.length--;
|
|
6220
|
-
return res
|
|
6221
|
-
};
|
|
6214
|
+
Yallist.prototype.pop = function () {
|
|
6215
|
+
if (!this.tail) {
|
|
6216
|
+
return undefined
|
|
6217
|
+
}
|
|
6222
6218
|
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6219
|
+
var res = this.tail.value;
|
|
6220
|
+
this.tail = this.tail.prev;
|
|
6221
|
+
if (this.tail) {
|
|
6222
|
+
this.tail.next = null;
|
|
6223
|
+
} else {
|
|
6224
|
+
this.head = null;
|
|
6225
|
+
}
|
|
6226
|
+
this.length--;
|
|
6227
|
+
return res
|
|
6228
|
+
};
|
|
6227
6229
|
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
} else {
|
|
6233
|
-
this.tail = null;
|
|
6234
|
-
}
|
|
6235
|
-
this.length--;
|
|
6236
|
-
return res
|
|
6237
|
-
};
|
|
6230
|
+
Yallist.prototype.shift = function () {
|
|
6231
|
+
if (!this.head) {
|
|
6232
|
+
return undefined
|
|
6233
|
+
}
|
|
6238
6234
|
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
}
|
|
6235
|
+
var res = this.head.value;
|
|
6236
|
+
this.head = this.head.next;
|
|
6237
|
+
if (this.head) {
|
|
6238
|
+
this.head.prev = null;
|
|
6239
|
+
} else {
|
|
6240
|
+
this.tail = null;
|
|
6241
|
+
}
|
|
6242
|
+
this.length--;
|
|
6243
|
+
return res
|
|
6244
|
+
};
|
|
6246
6245
|
|
|
6247
|
-
Yallist
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
};
|
|
6246
|
+
Yallist.prototype.forEach = function (fn, thisp) {
|
|
6247
|
+
thisp = thisp || this;
|
|
6248
|
+
for (var walker = this.head, i = 0; walker !== null; i++) {
|
|
6249
|
+
fn.call(thisp, walker.value, i, this);
|
|
6250
|
+
walker = walker.next;
|
|
6251
|
+
}
|
|
6252
|
+
};
|
|
6254
6253
|
|
|
6255
|
-
Yallist
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
}
|
|
6263
|
-
};
|
|
6254
|
+
Yallist.prototype.forEachReverse = function (fn, thisp) {
|
|
6255
|
+
thisp = thisp || this;
|
|
6256
|
+
for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
|
|
6257
|
+
fn.call(thisp, walker.value, i, this);
|
|
6258
|
+
walker = walker.prev;
|
|
6259
|
+
}
|
|
6260
|
+
};
|
|
6264
6261
|
|
|
6265
|
-
Yallist
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
};
|
|
6262
|
+
Yallist.prototype.get = function (n) {
|
|
6263
|
+
for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
|
|
6264
|
+
// abort out of the list early if we hit a cycle
|
|
6265
|
+
walker = walker.next;
|
|
6266
|
+
}
|
|
6267
|
+
if (i === n && walker !== null) {
|
|
6268
|
+
return walker.value
|
|
6269
|
+
}
|
|
6270
|
+
};
|
|
6274
6271
|
|
|
6275
|
-
Yallist
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
};
|
|
6272
|
+
Yallist.prototype.getReverse = function (n) {
|
|
6273
|
+
for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
|
|
6274
|
+
// abort out of the list early if we hit a cycle
|
|
6275
|
+
walker = walker.prev;
|
|
6276
|
+
}
|
|
6277
|
+
if (i === n && walker !== null) {
|
|
6278
|
+
return walker.value
|
|
6279
|
+
}
|
|
6280
|
+
};
|
|
6284
6281
|
|
|
6285
|
-
Yallist
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
};
|
|
6282
|
+
Yallist.prototype.map = function (fn, thisp) {
|
|
6283
|
+
thisp = thisp || this;
|
|
6284
|
+
var res = new Yallist();
|
|
6285
|
+
for (var walker = this.head; walker !== null;) {
|
|
6286
|
+
res.push(fn.call(thisp, walker.value, this));
|
|
6287
|
+
walker = walker.next;
|
|
6288
|
+
}
|
|
6289
|
+
return res
|
|
6290
|
+
};
|
|
6294
6291
|
|
|
6295
|
-
Yallist
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
throw new TypeError('Reduce of empty list with no initial value')
|
|
6305
|
-
}
|
|
6292
|
+
Yallist.prototype.mapReverse = function (fn, thisp) {
|
|
6293
|
+
thisp = thisp || this;
|
|
6294
|
+
var res = new Yallist();
|
|
6295
|
+
for (var walker = this.tail; walker !== null;) {
|
|
6296
|
+
res.push(fn.call(thisp, walker.value, this));
|
|
6297
|
+
walker = walker.prev;
|
|
6298
|
+
}
|
|
6299
|
+
return res
|
|
6300
|
+
};
|
|
6306
6301
|
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6302
|
+
Yallist.prototype.reduce = function (fn, initial) {
|
|
6303
|
+
var acc;
|
|
6304
|
+
var walker = this.head;
|
|
6305
|
+
if (arguments.length > 1) {
|
|
6306
|
+
acc = initial;
|
|
6307
|
+
} else if (this.head) {
|
|
6308
|
+
walker = this.head.next;
|
|
6309
|
+
acc = this.head.value;
|
|
6310
|
+
} else {
|
|
6311
|
+
throw new TypeError('Reduce of empty list with no initial value')
|
|
6312
|
+
}
|
|
6311
6313
|
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
+
for (var i = 0; walker !== null; i++) {
|
|
6315
|
+
acc = fn(acc, walker.value, i);
|
|
6316
|
+
walker = walker.next;
|
|
6317
|
+
}
|
|
6314
6318
|
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
var walker = this.tail;
|
|
6318
|
-
if (arguments.length > 1) {
|
|
6319
|
-
acc = initial;
|
|
6320
|
-
} else if (this.tail) {
|
|
6321
|
-
walker = this.tail.prev;
|
|
6322
|
-
acc = this.tail.value;
|
|
6323
|
-
} else {
|
|
6324
|
-
throw new TypeError('Reduce of empty list with no initial value')
|
|
6325
|
-
}
|
|
6319
|
+
return acc
|
|
6320
|
+
};
|
|
6326
6321
|
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6322
|
+
Yallist.prototype.reduceReverse = function (fn, initial) {
|
|
6323
|
+
var acc;
|
|
6324
|
+
var walker = this.tail;
|
|
6325
|
+
if (arguments.length > 1) {
|
|
6326
|
+
acc = initial;
|
|
6327
|
+
} else if (this.tail) {
|
|
6328
|
+
walker = this.tail.prev;
|
|
6329
|
+
acc = this.tail.value;
|
|
6330
|
+
} else {
|
|
6331
|
+
throw new TypeError('Reduce of empty list with no initial value')
|
|
6332
|
+
}
|
|
6331
6333
|
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
+
for (var i = this.length - 1; walker !== null; i--) {
|
|
6335
|
+
acc = fn(acc, walker.value, i);
|
|
6336
|
+
walker = walker.prev;
|
|
6337
|
+
}
|
|
6334
6338
|
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
for (var i = 0, walker = this.head; walker !== null; i++) {
|
|
6338
|
-
arr[i] = walker.value;
|
|
6339
|
-
walker = walker.next;
|
|
6340
|
-
}
|
|
6341
|
-
return arr
|
|
6342
|
-
};
|
|
6339
|
+
return acc
|
|
6340
|
+
};
|
|
6343
6341
|
|
|
6344
|
-
Yallist
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
};
|
|
6342
|
+
Yallist.prototype.toArray = function () {
|
|
6343
|
+
var arr = new Array(this.length);
|
|
6344
|
+
for (var i = 0, walker = this.head; walker !== null; i++) {
|
|
6345
|
+
arr[i] = walker.value;
|
|
6346
|
+
walker = walker.next;
|
|
6347
|
+
}
|
|
6348
|
+
return arr
|
|
6349
|
+
};
|
|
6352
6350
|
|
|
6353
|
-
Yallist
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
}
|
|
6362
|
-
var ret = new Yallist$1();
|
|
6363
|
-
if (to < from || to < 0) {
|
|
6364
|
-
return ret
|
|
6365
|
-
}
|
|
6366
|
-
if (from < 0) {
|
|
6367
|
-
from = 0;
|
|
6368
|
-
}
|
|
6369
|
-
if (to > this.length) {
|
|
6370
|
-
to = this.length;
|
|
6371
|
-
}
|
|
6372
|
-
for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
|
|
6373
|
-
walker = walker.next;
|
|
6374
|
-
}
|
|
6375
|
-
for (; walker !== null && i < to; i++, walker = walker.next) {
|
|
6376
|
-
ret.push(walker.value);
|
|
6377
|
-
}
|
|
6378
|
-
return ret
|
|
6379
|
-
};
|
|
6351
|
+
Yallist.prototype.toArrayReverse = function () {
|
|
6352
|
+
var arr = new Array(this.length);
|
|
6353
|
+
for (var i = 0, walker = this.tail; walker !== null; i++) {
|
|
6354
|
+
arr[i] = walker.value;
|
|
6355
|
+
walker = walker.prev;
|
|
6356
|
+
}
|
|
6357
|
+
return arr
|
|
6358
|
+
};
|
|
6380
6359
|
|
|
6381
|
-
Yallist
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
};
|
|
6360
|
+
Yallist.prototype.slice = function (from, to) {
|
|
6361
|
+
to = to || this.length;
|
|
6362
|
+
if (to < 0) {
|
|
6363
|
+
to += this.length;
|
|
6364
|
+
}
|
|
6365
|
+
from = from || 0;
|
|
6366
|
+
if (from < 0) {
|
|
6367
|
+
from += this.length;
|
|
6368
|
+
}
|
|
6369
|
+
var ret = new Yallist();
|
|
6370
|
+
if (to < from || to < 0) {
|
|
6371
|
+
return ret
|
|
6372
|
+
}
|
|
6373
|
+
if (from < 0) {
|
|
6374
|
+
from = 0;
|
|
6375
|
+
}
|
|
6376
|
+
if (to > this.length) {
|
|
6377
|
+
to = this.length;
|
|
6378
|
+
}
|
|
6379
|
+
for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
|
|
6380
|
+
walker = walker.next;
|
|
6381
|
+
}
|
|
6382
|
+
for (; walker !== null && i < to; i++, walker = walker.next) {
|
|
6383
|
+
ret.push(walker.value);
|
|
6384
|
+
}
|
|
6385
|
+
return ret
|
|
6386
|
+
};
|
|
6408
6387
|
|
|
6409
|
-
Yallist
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6388
|
+
Yallist.prototype.sliceReverse = function (from, to) {
|
|
6389
|
+
to = to || this.length;
|
|
6390
|
+
if (to < 0) {
|
|
6391
|
+
to += this.length;
|
|
6392
|
+
}
|
|
6393
|
+
from = from || 0;
|
|
6394
|
+
if (from < 0) {
|
|
6395
|
+
from += this.length;
|
|
6396
|
+
}
|
|
6397
|
+
var ret = new Yallist();
|
|
6398
|
+
if (to < from || to < 0) {
|
|
6399
|
+
return ret
|
|
6400
|
+
}
|
|
6401
|
+
if (from < 0) {
|
|
6402
|
+
from = 0;
|
|
6403
|
+
}
|
|
6404
|
+
if (to > this.length) {
|
|
6405
|
+
to = this.length;
|
|
6406
|
+
}
|
|
6407
|
+
for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
|
|
6408
|
+
walker = walker.prev;
|
|
6409
|
+
}
|
|
6410
|
+
for (; walker !== null && i > from; i--, walker = walker.prev) {
|
|
6411
|
+
ret.push(walker.value);
|
|
6412
|
+
}
|
|
6413
|
+
return ret
|
|
6414
|
+
};
|
|
6416
6415
|
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6416
|
+
Yallist.prototype.splice = function (start, deleteCount, ...nodes) {
|
|
6417
|
+
if (start > this.length) {
|
|
6418
|
+
start = this.length - 1;
|
|
6419
|
+
}
|
|
6420
|
+
if (start < 0) {
|
|
6421
|
+
start = this.length + start;
|
|
6422
|
+
}
|
|
6420
6423
|
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
walker = this.removeNode(walker);
|
|
6425
|
-
}
|
|
6426
|
-
if (walker === null) {
|
|
6427
|
-
walker = this.tail;
|
|
6428
|
-
}
|
|
6424
|
+
for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
|
|
6425
|
+
walker = walker.next;
|
|
6426
|
+
}
|
|
6429
6427
|
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6428
|
+
var ret = [];
|
|
6429
|
+
for (var i = 0; walker && i < deleteCount; i++) {
|
|
6430
|
+
ret.push(walker.value);
|
|
6431
|
+
walker = this.removeNode(walker);
|
|
6432
|
+
}
|
|
6433
|
+
if (walker === null) {
|
|
6434
|
+
walker = this.tail;
|
|
6435
|
+
}
|
|
6433
6436
|
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
return ret;
|
|
6438
|
-
};
|
|
6437
|
+
if (walker !== this.head && walker !== this.tail) {
|
|
6438
|
+
walker = walker.prev;
|
|
6439
|
+
}
|
|
6439
6440
|
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
walker.prev = walker.next;
|
|
6446
|
-
walker.next = p;
|
|
6447
|
-
}
|
|
6448
|
-
this.head = tail;
|
|
6449
|
-
this.tail = head;
|
|
6450
|
-
return this
|
|
6451
|
-
};
|
|
6441
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
6442
|
+
walker = insert(this, walker, nodes[i]);
|
|
6443
|
+
}
|
|
6444
|
+
return ret;
|
|
6445
|
+
};
|
|
6452
6446
|
|
|
6453
|
-
function
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6447
|
+
Yallist.prototype.reverse = function () {
|
|
6448
|
+
var head = this.head;
|
|
6449
|
+
var tail = this.tail;
|
|
6450
|
+
for (var walker = head; walker !== null; walker = walker.prev) {
|
|
6451
|
+
var p = walker.prev;
|
|
6452
|
+
walker.prev = walker.next;
|
|
6453
|
+
walker.next = p;
|
|
6454
|
+
}
|
|
6455
|
+
this.head = tail;
|
|
6456
|
+
this.tail = head;
|
|
6457
|
+
return this
|
|
6458
|
+
};
|
|
6457
6459
|
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
self.head = inserted;
|
|
6463
|
-
}
|
|
6460
|
+
function insert (self, node, value) {
|
|
6461
|
+
var inserted = node === self.head ?
|
|
6462
|
+
new Node(value, null, node, self) :
|
|
6463
|
+
new Node(value, node, node.next, self);
|
|
6464
6464
|
|
|
6465
|
-
|
|
6465
|
+
if (inserted.next === null) {
|
|
6466
|
+
self.tail = inserted;
|
|
6467
|
+
}
|
|
6468
|
+
if (inserted.prev === null) {
|
|
6469
|
+
self.head = inserted;
|
|
6470
|
+
}
|
|
6466
6471
|
|
|
6467
|
-
|
|
6468
|
-
}
|
|
6472
|
+
self.length++;
|
|
6469
6473
|
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
if (!self.head) {
|
|
6473
|
-
self.head = self.tail;
|
|
6474
|
-
}
|
|
6475
|
-
self.length++;
|
|
6476
|
-
}
|
|
6474
|
+
return inserted
|
|
6475
|
+
}
|
|
6477
6476
|
|
|
6478
|
-
function
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
}
|
|
6477
|
+
function push (self, item) {
|
|
6478
|
+
self.tail = new Node(item, self.tail, null, self);
|
|
6479
|
+
if (!self.head) {
|
|
6480
|
+
self.head = self.tail;
|
|
6481
|
+
}
|
|
6482
|
+
self.length++;
|
|
6483
|
+
}
|
|
6485
6484
|
|
|
6486
|
-
function
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6485
|
+
function unshift (self, item) {
|
|
6486
|
+
self.head = new Node(item, null, self.head, self);
|
|
6487
|
+
if (!self.tail) {
|
|
6488
|
+
self.tail = self.head;
|
|
6489
|
+
}
|
|
6490
|
+
self.length++;
|
|
6491
|
+
}
|
|
6490
6492
|
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
+
function Node (value, prev, next, list) {
|
|
6494
|
+
if (!(this instanceof Node)) {
|
|
6495
|
+
return new Node(value, prev, next, list)
|
|
6496
|
+
}
|
|
6493
6497
|
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
this.prev = prev;
|
|
6497
|
-
} else {
|
|
6498
|
-
this.prev = null;
|
|
6499
|
-
}
|
|
6498
|
+
this.list = list;
|
|
6499
|
+
this.value = value;
|
|
6500
6500
|
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
}
|
|
6501
|
+
if (prev) {
|
|
6502
|
+
prev.next = this;
|
|
6503
|
+
this.prev = prev;
|
|
6504
|
+
} else {
|
|
6505
|
+
this.prev = null;
|
|
6506
|
+
}
|
|
6508
6507
|
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
}
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
const MAX = Symbol('max');
|
|
6518
|
-
const LENGTH = Symbol('length');
|
|
6519
|
-
const LENGTH_CALCULATOR = Symbol('lengthCalculator');
|
|
6520
|
-
const ALLOW_STALE = Symbol('allowStale');
|
|
6521
|
-
const MAX_AGE = Symbol('maxAge');
|
|
6522
|
-
const DISPOSE = Symbol('dispose');
|
|
6523
|
-
const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet');
|
|
6524
|
-
const LRU_LIST = Symbol('lruList');
|
|
6525
|
-
const CACHE = Symbol('cache');
|
|
6526
|
-
const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet');
|
|
6527
|
-
|
|
6528
|
-
const naiveLength = () => 1;
|
|
6529
|
-
|
|
6530
|
-
// lruList is a yallist where the head is the youngest
|
|
6531
|
-
// item, and the tail is the oldest. the list contains the Hit
|
|
6532
|
-
// objects as the entries.
|
|
6533
|
-
// Each Hit object has a reference to its Yallist.Node. This
|
|
6534
|
-
// never changes.
|
|
6535
|
-
//
|
|
6536
|
-
// cache is a Map (or PseudoMap) that matches the keys to
|
|
6537
|
-
// the Yallist.Node object.
|
|
6538
|
-
class LRUCache {
|
|
6539
|
-
constructor (options) {
|
|
6540
|
-
if (typeof options === 'number')
|
|
6541
|
-
options = { max: options };
|
|
6542
|
-
|
|
6543
|
-
if (!options)
|
|
6544
|
-
options = {};
|
|
6508
|
+
if (next) {
|
|
6509
|
+
next.prev = this;
|
|
6510
|
+
this.next = next;
|
|
6511
|
+
} else {
|
|
6512
|
+
this.next = null;
|
|
6513
|
+
}
|
|
6514
|
+
}
|
|
6545
6515
|
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6516
|
+
try {
|
|
6517
|
+
// add if support for Symbol.iterator is present
|
|
6518
|
+
requireIterator()(Yallist);
|
|
6519
|
+
} catch (er) {}
|
|
6520
|
+
return yallist;
|
|
6521
|
+
}
|
|
6550
6522
|
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6523
|
+
var lruCache;
|
|
6524
|
+
var hasRequiredLruCache;
|
|
6525
|
+
|
|
6526
|
+
function requireLruCache () {
|
|
6527
|
+
if (hasRequiredLruCache) return lruCache;
|
|
6528
|
+
hasRequiredLruCache = 1;
|
|
6529
|
+
|
|
6530
|
+
// A linked list to keep track of recently-used-ness
|
|
6531
|
+
const Yallist = requireYallist();
|
|
6532
|
+
|
|
6533
|
+
const MAX = Symbol('max');
|
|
6534
|
+
const LENGTH = Symbol('length');
|
|
6535
|
+
const LENGTH_CALCULATOR = Symbol('lengthCalculator');
|
|
6536
|
+
const ALLOW_STALE = Symbol('allowStale');
|
|
6537
|
+
const MAX_AGE = Symbol('maxAge');
|
|
6538
|
+
const DISPOSE = Symbol('dispose');
|
|
6539
|
+
const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet');
|
|
6540
|
+
const LRU_LIST = Symbol('lruList');
|
|
6541
|
+
const CACHE = Symbol('cache');
|
|
6542
|
+
const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet');
|
|
6543
|
+
|
|
6544
|
+
const naiveLength = () => 1;
|
|
6545
|
+
|
|
6546
|
+
// lruList is a yallist where the head is the youngest
|
|
6547
|
+
// item, and the tail is the oldest. the list contains the Hit
|
|
6548
|
+
// objects as the entries.
|
|
6549
|
+
// Each Hit object has a reference to its Yallist.Node. This
|
|
6550
|
+
// never changes.
|
|
6551
|
+
//
|
|
6552
|
+
// cache is a Map (or PseudoMap) that matches the keys to
|
|
6553
|
+
// the Yallist.Node object.
|
|
6554
|
+
class LRUCache {
|
|
6555
|
+
constructor (options) {
|
|
6556
|
+
if (typeof options === 'number')
|
|
6557
|
+
options = { max: options };
|
|
6558
|
+
|
|
6559
|
+
if (!options)
|
|
6560
|
+
options = {};
|
|
6561
|
+
|
|
6562
|
+
if (options.max && (typeof options.max !== 'number' || options.max < 0))
|
|
6563
|
+
throw new TypeError('max must be a non-negative number')
|
|
6564
|
+
// Kind of weird to have a default max of Infinity, but oh well.
|
|
6565
|
+
this[MAX] = options.max || Infinity;
|
|
6566
|
+
|
|
6567
|
+
const lc = options.length || naiveLength;
|
|
6568
|
+
this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc;
|
|
6569
|
+
this[ALLOW_STALE] = options.stale || false;
|
|
6570
|
+
if (options.maxAge && typeof options.maxAge !== 'number')
|
|
6571
|
+
throw new TypeError('maxAge must be a number')
|
|
6572
|
+
this[MAX_AGE] = options.maxAge || 0;
|
|
6573
|
+
this[DISPOSE] = options.dispose;
|
|
6574
|
+
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
|
|
6575
|
+
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
|
|
6576
|
+
this.reset();
|
|
6577
|
+
}
|
|
6562
6578
|
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6579
|
+
// resize the cache when the max changes.
|
|
6580
|
+
set max (mL) {
|
|
6581
|
+
if (typeof mL !== 'number' || mL < 0)
|
|
6582
|
+
throw new TypeError('max must be a non-negative number')
|
|
6567
6583
|
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6584
|
+
this[MAX] = mL || Infinity;
|
|
6585
|
+
trim(this);
|
|
6586
|
+
}
|
|
6587
|
+
get max () {
|
|
6588
|
+
return this[MAX]
|
|
6589
|
+
}
|
|
6574
6590
|
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6591
|
+
set allowStale (allowStale) {
|
|
6592
|
+
this[ALLOW_STALE] = !!allowStale;
|
|
6593
|
+
}
|
|
6594
|
+
get allowStale () {
|
|
6595
|
+
return this[ALLOW_STALE]
|
|
6596
|
+
}
|
|
6581
6597
|
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6598
|
+
set maxAge (mA) {
|
|
6599
|
+
if (typeof mA !== 'number')
|
|
6600
|
+
throw new TypeError('maxAge must be a non-negative number')
|
|
6585
6601
|
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6602
|
+
this[MAX_AGE] = mA;
|
|
6603
|
+
trim(this);
|
|
6604
|
+
}
|
|
6605
|
+
get maxAge () {
|
|
6606
|
+
return this[MAX_AGE]
|
|
6607
|
+
}
|
|
6592
6608
|
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6609
|
+
// resize the cache when the lengthCalculator changes.
|
|
6610
|
+
set lengthCalculator (lC) {
|
|
6611
|
+
if (typeof lC !== 'function')
|
|
6612
|
+
lC = naiveLength;
|
|
6613
|
+
|
|
6614
|
+
if (lC !== this[LENGTH_CALCULATOR]) {
|
|
6615
|
+
this[LENGTH_CALCULATOR] = lC;
|
|
6616
|
+
this[LENGTH] = 0;
|
|
6617
|
+
this[LRU_LIST].forEach(hit => {
|
|
6618
|
+
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
|
|
6619
|
+
this[LENGTH] += hit.length;
|
|
6620
|
+
});
|
|
6621
|
+
}
|
|
6622
|
+
trim(this);
|
|
6623
|
+
}
|
|
6624
|
+
get lengthCalculator () { return this[LENGTH_CALCULATOR] }
|
|
6597
6625
|
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
this[LENGTH] = 0;
|
|
6601
|
-
this[LRU_LIST].forEach(hit => {
|
|
6602
|
-
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
|
|
6603
|
-
this[LENGTH] += hit.length;
|
|
6604
|
-
});
|
|
6605
|
-
}
|
|
6606
|
-
trim(this);
|
|
6607
|
-
}
|
|
6608
|
-
get lengthCalculator () { return this[LENGTH_CALCULATOR] }
|
|
6626
|
+
get length () { return this[LENGTH] }
|
|
6627
|
+
get itemCount () { return this[LRU_LIST].length }
|
|
6609
6628
|
|
|
6610
|
-
|
|
6611
|
-
|
|
6629
|
+
rforEach (fn, thisp) {
|
|
6630
|
+
thisp = thisp || this;
|
|
6631
|
+
for (let walker = this[LRU_LIST].tail; walker !== null;) {
|
|
6632
|
+
const prev = walker.prev;
|
|
6633
|
+
forEachStep(this, fn, walker, thisp);
|
|
6634
|
+
walker = prev;
|
|
6635
|
+
}
|
|
6636
|
+
}
|
|
6612
6637
|
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6638
|
+
forEach (fn, thisp) {
|
|
6639
|
+
thisp = thisp || this;
|
|
6640
|
+
for (let walker = this[LRU_LIST].head; walker !== null;) {
|
|
6641
|
+
const next = walker.next;
|
|
6642
|
+
forEachStep(this, fn, walker, thisp);
|
|
6643
|
+
walker = next;
|
|
6644
|
+
}
|
|
6645
|
+
}
|
|
6621
6646
|
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
const next = walker.next;
|
|
6626
|
-
forEachStep(this, fn, walker, thisp);
|
|
6627
|
-
walker = next;
|
|
6628
|
-
}
|
|
6629
|
-
}
|
|
6647
|
+
keys () {
|
|
6648
|
+
return this[LRU_LIST].toArray().map(k => k.key)
|
|
6649
|
+
}
|
|
6630
6650
|
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6651
|
+
values () {
|
|
6652
|
+
return this[LRU_LIST].toArray().map(k => k.value)
|
|
6653
|
+
}
|
|
6634
6654
|
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6655
|
+
reset () {
|
|
6656
|
+
if (this[DISPOSE] &&
|
|
6657
|
+
this[LRU_LIST] &&
|
|
6658
|
+
this[LRU_LIST].length) {
|
|
6659
|
+
this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value));
|
|
6660
|
+
}
|
|
6638
6661
|
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value));
|
|
6644
|
-
}
|
|
6662
|
+
this[CACHE] = new Map(); // hash of items by key
|
|
6663
|
+
this[LRU_LIST] = new Yallist(); // list of items in order of use recency
|
|
6664
|
+
this[LENGTH] = 0; // length of items in the list
|
|
6665
|
+
}
|
|
6645
6666
|
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6667
|
+
dump () {
|
|
6668
|
+
return this[LRU_LIST].map(hit =>
|
|
6669
|
+
isStale(this, hit) ? false : {
|
|
6670
|
+
k: hit.key,
|
|
6671
|
+
v: hit.value,
|
|
6672
|
+
e: hit.now + (hit.maxAge || 0)
|
|
6673
|
+
}).toArray().filter(h => h)
|
|
6674
|
+
}
|
|
6650
6675
|
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
k: hit.key,
|
|
6655
|
-
v: hit.value,
|
|
6656
|
-
e: hit.now + (hit.maxAge || 0)
|
|
6657
|
-
}).toArray().filter(h => h)
|
|
6658
|
-
}
|
|
6676
|
+
dumpLru () {
|
|
6677
|
+
return this[LRU_LIST]
|
|
6678
|
+
}
|
|
6659
6679
|
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
}
|
|
6680
|
+
set (key, value, maxAge) {
|
|
6681
|
+
maxAge = maxAge || this[MAX_AGE];
|
|
6663
6682
|
|
|
6664
|
-
|
|
6665
|
-
|
|
6683
|
+
if (maxAge && typeof maxAge !== 'number')
|
|
6684
|
+
throw new TypeError('maxAge must be a number')
|
|
6666
6685
|
|
|
6667
|
-
|
|
6668
|
-
|
|
6686
|
+
const now = maxAge ? Date.now() : 0;
|
|
6687
|
+
const len = this[LENGTH_CALCULATOR](value, key);
|
|
6669
6688
|
|
|
6670
|
-
|
|
6671
|
-
|
|
6689
|
+
if (this[CACHE].has(key)) {
|
|
6690
|
+
if (len > this[MAX]) {
|
|
6691
|
+
del(this, this[CACHE].get(key));
|
|
6692
|
+
return false
|
|
6693
|
+
}
|
|
6672
6694
|
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
del(this, this[CACHE].get(key));
|
|
6676
|
-
return false
|
|
6677
|
-
}
|
|
6695
|
+
const node = this[CACHE].get(key);
|
|
6696
|
+
const item = node.value;
|
|
6678
6697
|
|
|
6679
|
-
|
|
6680
|
-
|
|
6698
|
+
// dispose of the old one before overwriting
|
|
6699
|
+
// split out into 2 ifs for better coverage tracking
|
|
6700
|
+
if (this[DISPOSE]) {
|
|
6701
|
+
if (!this[NO_DISPOSE_ON_SET])
|
|
6702
|
+
this[DISPOSE](key, item.value);
|
|
6703
|
+
}
|
|
6681
6704
|
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6705
|
+
item.now = now;
|
|
6706
|
+
item.maxAge = maxAge;
|
|
6707
|
+
item.value = value;
|
|
6708
|
+
this[LENGTH] += len - item.length;
|
|
6709
|
+
item.length = len;
|
|
6710
|
+
this.get(key);
|
|
6711
|
+
trim(this);
|
|
6712
|
+
return true
|
|
6713
|
+
}
|
|
6688
6714
|
|
|
6689
|
-
|
|
6690
|
-
item.maxAge = maxAge;
|
|
6691
|
-
item.value = value;
|
|
6692
|
-
this[LENGTH] += len - item.length;
|
|
6693
|
-
item.length = len;
|
|
6694
|
-
this.get(key);
|
|
6695
|
-
trim(this);
|
|
6696
|
-
return true
|
|
6697
|
-
}
|
|
6715
|
+
const hit = new Entry(key, value, len, now, maxAge);
|
|
6698
6716
|
|
|
6699
|
-
|
|
6717
|
+
// oversized objects fall out of cache automatically.
|
|
6718
|
+
if (hit.length > this[MAX]) {
|
|
6719
|
+
if (this[DISPOSE])
|
|
6720
|
+
this[DISPOSE](key, value);
|
|
6700
6721
|
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
if (this[DISPOSE])
|
|
6704
|
-
this[DISPOSE](key, value);
|
|
6722
|
+
return false
|
|
6723
|
+
}
|
|
6705
6724
|
|
|
6706
|
-
|
|
6707
|
-
|
|
6725
|
+
this[LENGTH] += hit.length;
|
|
6726
|
+
this[LRU_LIST].unshift(hit);
|
|
6727
|
+
this[CACHE].set(key, this[LRU_LIST].head);
|
|
6728
|
+
trim(this);
|
|
6729
|
+
return true
|
|
6730
|
+
}
|
|
6708
6731
|
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
}
|
|
6732
|
+
has (key) {
|
|
6733
|
+
if (!this[CACHE].has(key)) return false
|
|
6734
|
+
const hit = this[CACHE].get(key).value;
|
|
6735
|
+
return !isStale(this, hit)
|
|
6736
|
+
}
|
|
6715
6737
|
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
return !isStale(this, hit)
|
|
6720
|
-
}
|
|
6738
|
+
get (key) {
|
|
6739
|
+
return get(this, key, true)
|
|
6740
|
+
}
|
|
6721
6741
|
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6742
|
+
peek (key) {
|
|
6743
|
+
return get(this, key, false)
|
|
6744
|
+
}
|
|
6725
6745
|
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6746
|
+
pop () {
|
|
6747
|
+
const node = this[LRU_LIST].tail;
|
|
6748
|
+
if (!node)
|
|
6749
|
+
return null
|
|
6729
6750
|
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
return null
|
|
6751
|
+
del(this, node);
|
|
6752
|
+
return node.value
|
|
6753
|
+
}
|
|
6734
6754
|
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6755
|
+
del (key) {
|
|
6756
|
+
del(this, this[CACHE].get(key));
|
|
6757
|
+
}
|
|
6738
6758
|
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6759
|
+
load (arr) {
|
|
6760
|
+
// reset the cache
|
|
6761
|
+
this.reset();
|
|
6762
|
+
|
|
6763
|
+
const now = Date.now();
|
|
6764
|
+
// A previous serialized cache has the most recent items first
|
|
6765
|
+
for (let l = arr.length - 1; l >= 0; l--) {
|
|
6766
|
+
const hit = arr[l];
|
|
6767
|
+
const expiresAt = hit.e || 0;
|
|
6768
|
+
if (expiresAt === 0)
|
|
6769
|
+
// the item was created without expiration in a non aged cache
|
|
6770
|
+
this.set(hit.k, hit.v);
|
|
6771
|
+
else {
|
|
6772
|
+
const maxAge = expiresAt - now;
|
|
6773
|
+
// dont add already expired items
|
|
6774
|
+
if (maxAge > 0) {
|
|
6775
|
+
this.set(hit.k, hit.v, maxAge);
|
|
6776
|
+
}
|
|
6777
|
+
}
|
|
6778
|
+
}
|
|
6779
|
+
}
|
|
6742
6780
|
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6781
|
+
prune () {
|
|
6782
|
+
this[CACHE].forEach((value, key) => get(this, key, false));
|
|
6783
|
+
}
|
|
6784
|
+
}
|
|
6746
6785
|
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6786
|
+
const get = (self, key, doUse) => {
|
|
6787
|
+
const node = self[CACHE].get(key);
|
|
6788
|
+
if (node) {
|
|
6789
|
+
const hit = node.value;
|
|
6790
|
+
if (isStale(self, hit)) {
|
|
6791
|
+
del(self, node);
|
|
6792
|
+
if (!self[ALLOW_STALE])
|
|
6793
|
+
return undefined
|
|
6794
|
+
} else {
|
|
6795
|
+
if (doUse) {
|
|
6796
|
+
if (self[UPDATE_AGE_ON_GET])
|
|
6797
|
+
node.value.now = Date.now();
|
|
6798
|
+
self[LRU_LIST].unshiftNode(node);
|
|
6799
|
+
}
|
|
6800
|
+
}
|
|
6801
|
+
return hit.value
|
|
6802
|
+
}
|
|
6803
|
+
};
|
|
6764
6804
|
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
}
|
|
6805
|
+
const isStale = (self, hit) => {
|
|
6806
|
+
if (!hit || (!hit.maxAge && !self[MAX_AGE]))
|
|
6807
|
+
return false
|
|
6769
6808
|
|
|
6770
|
-
const
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
if (isStale(self, hit)) {
|
|
6775
|
-
del(self, node);
|
|
6776
|
-
if (!self[ALLOW_STALE])
|
|
6777
|
-
return undefined
|
|
6778
|
-
} else {
|
|
6779
|
-
if (doUse) {
|
|
6780
|
-
if (self[UPDATE_AGE_ON_GET])
|
|
6781
|
-
node.value.now = Date.now();
|
|
6782
|
-
self[LRU_LIST].unshiftNode(node);
|
|
6783
|
-
}
|
|
6784
|
-
}
|
|
6785
|
-
return hit.value
|
|
6786
|
-
}
|
|
6787
|
-
};
|
|
6809
|
+
const diff = Date.now() - hit.now;
|
|
6810
|
+
return hit.maxAge ? diff > hit.maxAge
|
|
6811
|
+
: self[MAX_AGE] && (diff > self[MAX_AGE])
|
|
6812
|
+
};
|
|
6788
6813
|
|
|
6789
|
-
const
|
|
6790
|
-
|
|
6791
|
-
|
|
6814
|
+
const trim = self => {
|
|
6815
|
+
if (self[LENGTH] > self[MAX]) {
|
|
6816
|
+
for (let walker = self[LRU_LIST].tail;
|
|
6817
|
+
self[LENGTH] > self[MAX] && walker !== null;) {
|
|
6818
|
+
// We know that we're about to delete this one, and also
|
|
6819
|
+
// what the next least recently used key will be, so just
|
|
6820
|
+
// go ahead and set it now.
|
|
6821
|
+
const prev = walker.prev;
|
|
6822
|
+
del(self, walker);
|
|
6823
|
+
walker = prev;
|
|
6824
|
+
}
|
|
6825
|
+
}
|
|
6826
|
+
};
|
|
6792
6827
|
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6828
|
+
const del = (self, node) => {
|
|
6829
|
+
if (node) {
|
|
6830
|
+
const hit = node.value;
|
|
6831
|
+
if (self[DISPOSE])
|
|
6832
|
+
self[DISPOSE](hit.key, hit.value);
|
|
6797
6833
|
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
// what the next least recently used key will be, so just
|
|
6804
|
-
// go ahead and set it now.
|
|
6805
|
-
const prev = walker.prev;
|
|
6806
|
-
del(self, walker);
|
|
6807
|
-
walker = prev;
|
|
6808
|
-
}
|
|
6809
|
-
}
|
|
6810
|
-
};
|
|
6834
|
+
self[LENGTH] -= hit.length;
|
|
6835
|
+
self[CACHE].delete(hit.key);
|
|
6836
|
+
self[LRU_LIST].removeNode(node);
|
|
6837
|
+
}
|
|
6838
|
+
};
|
|
6811
6839
|
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6840
|
+
class Entry {
|
|
6841
|
+
constructor (key, value, length, now, maxAge) {
|
|
6842
|
+
this.key = key;
|
|
6843
|
+
this.value = value;
|
|
6844
|
+
this.length = length;
|
|
6845
|
+
this.now = now;
|
|
6846
|
+
this.maxAge = maxAge || 0;
|
|
6847
|
+
}
|
|
6848
|
+
}
|
|
6817
6849
|
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6850
|
+
const forEachStep = (self, fn, node, thisp) => {
|
|
6851
|
+
let hit = node.value;
|
|
6852
|
+
if (isStale(self, hit)) {
|
|
6853
|
+
del(self, node);
|
|
6854
|
+
if (!self[ALLOW_STALE])
|
|
6855
|
+
hit = undefined;
|
|
6856
|
+
}
|
|
6857
|
+
if (hit)
|
|
6858
|
+
fn.call(thisp, hit.value, hit.key, self);
|
|
6859
|
+
};
|
|
6823
6860
|
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
this.key = key;
|
|
6827
|
-
this.value = value;
|
|
6828
|
-
this.length = length;
|
|
6829
|
-
this.now = now;
|
|
6830
|
-
this.maxAge = maxAge || 0;
|
|
6831
|
-
}
|
|
6861
|
+
lruCache = LRUCache;
|
|
6862
|
+
return lruCache;
|
|
6832
6863
|
}
|
|
6833
6864
|
|
|
6834
|
-
const forEachStep = (self, fn, node, thisp) => {
|
|
6835
|
-
let hit = node.value;
|
|
6836
|
-
if (isStale(self, hit)) {
|
|
6837
|
-
del(self, node);
|
|
6838
|
-
if (!self[ALLOW_STALE])
|
|
6839
|
-
hit = undefined;
|
|
6840
|
-
}
|
|
6841
|
-
if (hit)
|
|
6842
|
-
fn.call(thisp, hit.value, hit.key, self);
|
|
6843
|
-
};
|
|
6844
|
-
|
|
6845
|
-
var lruCache = LRUCache;
|
|
6846
|
-
|
|
6847
6865
|
var range;
|
|
6848
6866
|
var hasRequiredRange;
|
|
6849
6867
|
|
|
@@ -7044,7 +7062,7 @@ function requireRange () {
|
|
|
7044
7062
|
}
|
|
7045
7063
|
range = Range;
|
|
7046
7064
|
|
|
7047
|
-
const LRU =
|
|
7065
|
+
const LRU = requireLruCache();
|
|
7048
7066
|
const cache = new LRU({ max: 1000 });
|
|
7049
7067
|
|
|
7050
7068
|
const parseOptions = parseOptions_1;
|
|
@@ -8348,9 +8366,6 @@ function setupRPC(nuxt, _options) {
|
|
|
8348
8366
|
};
|
|
8349
8367
|
}
|
|
8350
8368
|
|
|
8351
|
-
const PATH = "/__nuxt_devtools__";
|
|
8352
|
-
const PATH_ENTRY = `${PATH}/entry`;
|
|
8353
|
-
const PATH_CLIENT = `${PATH}/client`;
|
|
8354
8369
|
async function enableModule(options, nuxt) {
|
|
8355
8370
|
if (process.env.TEST || process.env.NODE_ENV === "test")
|
|
8356
8371
|
return;
|
|
@@ -8382,10 +8397,10 @@ async function enableModule(options, nuxt) {
|
|
|
8382
8397
|
});
|
|
8383
8398
|
}
|
|
8384
8399
|
nuxt.hook("vite:serverCreated", (server) => {
|
|
8385
|
-
server.middlewares.use(
|
|
8386
|
-
server.middlewares.use(
|
|
8400
|
+
server.middlewares.use(ROUTE_ENTRY, tinyws());
|
|
8401
|
+
server.middlewares.use(ROUTE_ENTRY, rpcMiddleware);
|
|
8387
8402
|
if (clientDirExists)
|
|
8388
|
-
server.middlewares.use(
|
|
8403
|
+
server.middlewares.use(ROUTE_CLIENT, sirv(clientDir, { single: true, dev: true }));
|
|
8389
8404
|
});
|
|
8390
8405
|
const integrations = [
|
|
8391
8406
|
import('./vue-inspector.mjs').then(({ setup }) => setup(nuxt, serverFunctions)),
|