@vscode/test-web 0.0.9 → 0.0.13
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/fs-provider/dist/extension-web.js +4 -4
- package/fs-provider/dist/fsExtensionMain.js +569 -0
- package/fs-provider/package.json +2 -5
- package/out/index.js +8 -7
- package/out/server/app.js +5 -5
- package/out/server/download.js +4 -4
- package/out/server/main.js +1 -1
- package/out/server/mounts.js +4 -3
- package/out/server/workbench.js +8 -7
- package/package.json +16 -16
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/***/ ((module) => {
|
|
6
6
|
|
|
7
7
|
"use strict";
|
|
8
|
-
module.exports = require("vscode")
|
|
8
|
+
module.exports = require("vscode");
|
|
9
9
|
|
|
10
10
|
/***/ }),
|
|
11
11
|
/* 2 */
|
|
@@ -42,7 +42,7 @@ async function getStats(entry) {
|
|
|
42
42
|
if (stats === undefined) {
|
|
43
43
|
if (entry.serverUri) {
|
|
44
44
|
const url = entry.serverUri.with({ query: 'stat' }).toString();
|
|
45
|
-
const response = await request_light_1.xhr({ url
|
|
45
|
+
const response = await (0, request_light_1.xhr)({ url });
|
|
46
46
|
if (response.status === 200) {
|
|
47
47
|
try {
|
|
48
48
|
const res = JSON.parse(response.responseText);
|
|
@@ -67,7 +67,7 @@ async function getEntries(entry) {
|
|
|
67
67
|
entry.entries = new Map();
|
|
68
68
|
if (entry.serverUri) {
|
|
69
69
|
const url = entry.serverUri.with({ query: 'readdir' }).toString();
|
|
70
|
-
const response = await request_light_1.xhr({ url });
|
|
70
|
+
const response = await (0, request_light_1.xhr)({ url });
|
|
71
71
|
if (response.status === 200) {
|
|
72
72
|
try {
|
|
73
73
|
const res = JSON.parse(response.responseText);
|
|
@@ -117,7 +117,7 @@ class MountsFileSystemProvider {
|
|
|
117
117
|
}
|
|
118
118
|
const serverUri = entry.serverUri;
|
|
119
119
|
if (serverUri) {
|
|
120
|
-
const response = await request_light_1.xhr({ url: serverUri.toString() });
|
|
120
|
+
const response = await (0, request_light_1.xhr)({ url: serverUri.toString() });
|
|
121
121
|
if (response.status >= 200 && response.status <= 204) {
|
|
122
122
|
content = entry.content = response.body;
|
|
123
123
|
}
|
|
@@ -0,0 +1,569 @@
|
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ var __webpack_modules__ = ([
|
|
3
|
+
/* 0 */,
|
|
4
|
+
/* 1 */
|
|
5
|
+
/***/ ((module) => {
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
module.exports = require("vscode");
|
|
9
|
+
|
|
10
|
+
/***/ }),
|
|
11
|
+
/* 2 */
|
|
12
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
13
|
+
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
/*---------------------------------------------------------------------------------------------
|
|
17
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
18
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
19
|
+
*--------------------------------------------------------------------------------------------*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
21
|
+
exports.MountsFileSystemProvider = exports.SCHEME = void 0;
|
|
22
|
+
const vscode_1 = __webpack_require__(1);
|
|
23
|
+
const vscode_uri_1 = __webpack_require__(3);
|
|
24
|
+
const request_light_1 = __webpack_require__(5);
|
|
25
|
+
exports.SCHEME = 'vscode-test-web';
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
+
function isEntry(e) {
|
|
28
|
+
return e && (e.type == vscode_1.FileType.Directory || e.type == vscode_1.FileType.File) && typeof e.name === 'string' && e.name.length > 0;
|
|
29
|
+
}
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
+
function isStat(e) {
|
|
32
|
+
return e && (e.type == vscode_1.FileType.Directory || e.type == vscode_1.FileType.File) && typeof e.ctime === 'number' && typeof e.mtime === 'number' && typeof e.size === 'number';
|
|
33
|
+
}
|
|
34
|
+
function newFileStat(type, size) {
|
|
35
|
+
return { type, ctime: Date.now(), mtime: Date.now(), size };
|
|
36
|
+
}
|
|
37
|
+
function modifiedFileStat(stats, size) {
|
|
38
|
+
return { type: stats.type, ctime: stats.ctime, mtime: Date.now(), size: size !== null && size !== void 0 ? size : stats.size };
|
|
39
|
+
}
|
|
40
|
+
async function getStats(entry) {
|
|
41
|
+
let stats = entry.stats;
|
|
42
|
+
if (stats === undefined) {
|
|
43
|
+
if (entry.serverUri) {
|
|
44
|
+
const url = entry.serverUri.with({ query: 'stat' }).toString();
|
|
45
|
+
const response = await (0, request_light_1.xhr)({ url });
|
|
46
|
+
if (response.status === 200) {
|
|
47
|
+
try {
|
|
48
|
+
const res = JSON.parse(response.responseText);
|
|
49
|
+
if (isStat(res)) {
|
|
50
|
+
stats = res;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
// ignore
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (!stats) {
|
|
59
|
+
stats = newFileStat(entry.type, 0);
|
|
60
|
+
}
|
|
61
|
+
entry.stats = stats;
|
|
62
|
+
}
|
|
63
|
+
return stats;
|
|
64
|
+
}
|
|
65
|
+
async function getEntries(entry) {
|
|
66
|
+
if (entry.entries === undefined) {
|
|
67
|
+
entry.entries = new Map();
|
|
68
|
+
if (entry.serverUri) {
|
|
69
|
+
const url = entry.serverUri.with({ query: 'readdir' }).toString();
|
|
70
|
+
const response = await (0, request_light_1.xhr)({ url });
|
|
71
|
+
if (response.status === 200) {
|
|
72
|
+
try {
|
|
73
|
+
const res = JSON.parse(response.responseText);
|
|
74
|
+
if (Array.isArray(res)) {
|
|
75
|
+
for (const r of res) {
|
|
76
|
+
if (isEntry(r)) {
|
|
77
|
+
const newEntry = { type: r.type, name: r.name, serverUri: vscode_uri_1.Utils.joinPath(entry.serverUri, r.name) };
|
|
78
|
+
entry.entries.set(newEntry.name, newEntry);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// ignore
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return entry.entries;
|
|
90
|
+
}
|
|
91
|
+
class MountsFileSystemProvider {
|
|
92
|
+
constructor(serverUri) {
|
|
93
|
+
// --- manage file events
|
|
94
|
+
this._onDidChangeFile = new vscode_1.EventEmitter();
|
|
95
|
+
this.onDidChangeFile = this._onDidChangeFile.event;
|
|
96
|
+
this._bufferedChanges = [];
|
|
97
|
+
this.root = { type: vscode_1.FileType.Directory, name: '', serverUri };
|
|
98
|
+
}
|
|
99
|
+
// --- manage file metadata
|
|
100
|
+
async stat(resource) {
|
|
101
|
+
const entry = await this._lookup(resource, false);
|
|
102
|
+
return getStats(entry);
|
|
103
|
+
}
|
|
104
|
+
async readDirectory(resource) {
|
|
105
|
+
const entry = await this._lookupAsDirectory(resource, false);
|
|
106
|
+
const entries = await getEntries(entry);
|
|
107
|
+
const result = [];
|
|
108
|
+
entries.forEach((child, name) => result.push([name, child.type]));
|
|
109
|
+
return result;
|
|
110
|
+
}
|
|
111
|
+
// --- manage file contents
|
|
112
|
+
async readFile(resource) {
|
|
113
|
+
const entry = await this._lookupAsFile(resource, false);
|
|
114
|
+
let content = entry.content;
|
|
115
|
+
if (content) {
|
|
116
|
+
return content;
|
|
117
|
+
}
|
|
118
|
+
const serverUri = entry.serverUri;
|
|
119
|
+
if (serverUri) {
|
|
120
|
+
const response = await (0, request_light_1.xhr)({ url: serverUri.toString() });
|
|
121
|
+
if (response.status >= 200 && response.status <= 204) {
|
|
122
|
+
content = entry.content = response.body;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (!content) {
|
|
126
|
+
throw vscode_1.FileSystemError.FileNotFound(resource);
|
|
127
|
+
}
|
|
128
|
+
return content;
|
|
129
|
+
}
|
|
130
|
+
async writeFile(uri, content, opts) {
|
|
131
|
+
const basename = vscode_uri_1.Utils.basename(uri);
|
|
132
|
+
const parent = await this._lookupParentDirectory(uri);
|
|
133
|
+
const entries = await getEntries(parent);
|
|
134
|
+
let entry = entries.get(basename);
|
|
135
|
+
if (entry && entry.type === vscode_1.FileType.Directory) {
|
|
136
|
+
throw vscode_1.FileSystemError.FileIsADirectory(uri);
|
|
137
|
+
}
|
|
138
|
+
if (!entry && !opts.create) {
|
|
139
|
+
throw vscode_1.FileSystemError.FileNotFound(uri);
|
|
140
|
+
}
|
|
141
|
+
if (entry && opts.create && !opts.overwrite) {
|
|
142
|
+
throw vscode_1.FileSystemError.FileExists(uri);
|
|
143
|
+
}
|
|
144
|
+
const stats = newFileStat(vscode_1.FileType.File, content.byteLength);
|
|
145
|
+
if (!entry) {
|
|
146
|
+
entry = { type: vscode_1.FileType.File, name: basename, stats, content };
|
|
147
|
+
entries.set(basename, entry);
|
|
148
|
+
this._fireSoon({ type: vscode_1.FileChangeType.Created, uri });
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
entry.stats = stats;
|
|
152
|
+
entry.content = content;
|
|
153
|
+
}
|
|
154
|
+
this._fireSoon({ type: vscode_1.FileChangeType.Changed, uri });
|
|
155
|
+
}
|
|
156
|
+
// --- manage files/folders
|
|
157
|
+
async rename(from, to, opts) {
|
|
158
|
+
if (!opts.overwrite && await this._lookup(to, true)) {
|
|
159
|
+
throw vscode_1.FileSystemError.FileExists(to);
|
|
160
|
+
}
|
|
161
|
+
const entry = await this._lookup(from, false);
|
|
162
|
+
const oldParent = await this._lookupParentDirectory(from);
|
|
163
|
+
const newParent = await this._lookupParentDirectory(to);
|
|
164
|
+
const newName = vscode_uri_1.Utils.basename(to);
|
|
165
|
+
const oldParentEntries = await getEntries(oldParent);
|
|
166
|
+
oldParentEntries.delete(entry.name);
|
|
167
|
+
let newEntry;
|
|
168
|
+
if (entry.type === vscode_1.FileType.File) {
|
|
169
|
+
newEntry = { type: vscode_1.FileType.File, name: newName, stats: entry.stats, serverUri: entry.serverUri, content: entry.content };
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
newEntry = { type: vscode_1.FileType.Directory, name: newName, stats: entry.stats, serverUri: entry.serverUri, entries: entry.entries };
|
|
173
|
+
}
|
|
174
|
+
const newParentEntries = await getEntries(newParent);
|
|
175
|
+
newParentEntries.set(newName, newEntry);
|
|
176
|
+
this._fireSoon({ type: vscode_1.FileChangeType.Deleted, uri: from }, { type: vscode_1.FileChangeType.Created, uri: to });
|
|
177
|
+
}
|
|
178
|
+
async delete(uri, opts) {
|
|
179
|
+
const dirname = vscode_uri_1.Utils.dirname(uri);
|
|
180
|
+
const basename = vscode_uri_1.Utils.basename(uri);
|
|
181
|
+
const parent = await this._lookupAsDirectory(dirname, false);
|
|
182
|
+
const parentEntries = await getEntries(parent);
|
|
183
|
+
if (parentEntries.has(basename)) {
|
|
184
|
+
parentEntries.delete(basename);
|
|
185
|
+
parent.stats = newFileStat(parent.type, -1);
|
|
186
|
+
this._fireSoon({ type: vscode_1.FileChangeType.Changed, uri: dirname }, { uri, type: vscode_1.FileChangeType.Deleted });
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
async createDirectory(uri) {
|
|
190
|
+
const basename = vscode_uri_1.Utils.basename(uri);
|
|
191
|
+
const dirname = vscode_uri_1.Utils.dirname(uri);
|
|
192
|
+
const parent = await this._lookupAsDirectory(dirname, false);
|
|
193
|
+
const parentEntries = await getEntries(parent);
|
|
194
|
+
const entry = { type: vscode_1.FileType.Directory, name: basename, stats: newFileStat(vscode_1.FileType.Directory, 0) };
|
|
195
|
+
parentEntries.set(entry.name, entry);
|
|
196
|
+
const stats = await getStats(parent);
|
|
197
|
+
parent.stats = modifiedFileStat(stats, stats.size + 1);
|
|
198
|
+
this._fireSoon({ type: vscode_1.FileChangeType.Changed, uri: dirname }, { type: vscode_1.FileChangeType.Created, uri });
|
|
199
|
+
}
|
|
200
|
+
async _lookup(uri, silent) {
|
|
201
|
+
if (uri.scheme !== exports.SCHEME) {
|
|
202
|
+
if (!silent) {
|
|
203
|
+
throw vscode_1.FileSystemError.FileNotFound(uri);
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
return undefined;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
let entry = this.root;
|
|
210
|
+
const parts = uri.path.split('/');
|
|
211
|
+
for (const part of parts) {
|
|
212
|
+
if (!part) {
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
let child;
|
|
216
|
+
if (entry.type === vscode_1.FileType.Directory) {
|
|
217
|
+
child = (await getEntries(entry)).get(part);
|
|
218
|
+
}
|
|
219
|
+
if (!child) {
|
|
220
|
+
if (!silent) {
|
|
221
|
+
throw vscode_1.FileSystemError.FileNotFound(uri);
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
return undefined;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
entry = child;
|
|
228
|
+
}
|
|
229
|
+
return entry;
|
|
230
|
+
}
|
|
231
|
+
async _lookupAsDirectory(uri, silent) {
|
|
232
|
+
const entry = await this._lookup(uri, silent);
|
|
233
|
+
if ((entry === null || entry === void 0 ? void 0 : entry.type) === vscode_1.FileType.Directory) {
|
|
234
|
+
return entry;
|
|
235
|
+
}
|
|
236
|
+
throw vscode_1.FileSystemError.FileNotADirectory(uri);
|
|
237
|
+
}
|
|
238
|
+
async _lookupAsFile(uri, silent) {
|
|
239
|
+
const entry = await this._lookup(uri, silent);
|
|
240
|
+
if (!entry) {
|
|
241
|
+
throw vscode_1.FileSystemError.FileNotFound(uri);
|
|
242
|
+
}
|
|
243
|
+
if (entry.type === vscode_1.FileType.File) {
|
|
244
|
+
return entry;
|
|
245
|
+
}
|
|
246
|
+
throw vscode_1.FileSystemError.FileIsADirectory(uri);
|
|
247
|
+
}
|
|
248
|
+
_lookupParentDirectory(uri) {
|
|
249
|
+
const dirname = vscode_uri_1.Utils.dirname(uri);
|
|
250
|
+
return this._lookupAsDirectory(dirname, false);
|
|
251
|
+
}
|
|
252
|
+
watch(resource, opts) {
|
|
253
|
+
// ignore, fires for all changes...
|
|
254
|
+
return vscode_1.Disposable.from();
|
|
255
|
+
}
|
|
256
|
+
_fireSoon(...changes) {
|
|
257
|
+
this._bufferedChanges.push(...changes);
|
|
258
|
+
if (this._fireSoonHandle) {
|
|
259
|
+
clearTimeout(this._fireSoonHandle);
|
|
260
|
+
}
|
|
261
|
+
this._fireSoonHandle = setTimeout(() => {
|
|
262
|
+
this._onDidChangeFile.fire(this._bufferedChanges);
|
|
263
|
+
this._bufferedChanges.length = 0;
|
|
264
|
+
}, 5);
|
|
265
|
+
}
|
|
266
|
+
dispose() {
|
|
267
|
+
this._onDidChangeFile.dispose();
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
exports.MountsFileSystemProvider = MountsFileSystemProvider;
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
/***/ }),
|
|
274
|
+
/* 3 */
|
|
275
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
276
|
+
|
|
277
|
+
"use strict";
|
|
278
|
+
__webpack_require__.r(__webpack_exports__);
|
|
279
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
280
|
+
/* harmony export */ "URI": () => (/* binding */ URI),
|
|
281
|
+
/* harmony export */ "Utils": () => (/* binding */ Utils)
|
|
282
|
+
/* harmony export */ });
|
|
283
|
+
/* provided dependency */ var process = __webpack_require__(4);
|
|
284
|
+
var LIB;LIB=(()=>{"use strict";var t={470:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",o=0,i=-1,a=0,h=0;h<=t.length;++h){if(h<t.length)r=t.charCodeAt(h);else{if(47===r)break;r=47}if(47===r){if(i===h-1||1===a);else if(i!==h-1&&2===a){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var s=n.lastIndexOf("/");if(s!==n.length-1){-1===s?(n="",o=0):o=(n=n.slice(0,s)).length-1-n.lastIndexOf("/"),i=h,a=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=h,a=0;continue}e&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+t.slice(i+1,h):n=t.slice(i+1,h),o=h-i-1;i=h,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var n={resolve:function(){for(var t,n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a;i>=0?a=arguments[i]:(void 0===t&&(t=process.cwd()),a=t),e(a),0!==a.length&&(n=a+"/"+n,o=47===a.charCodeAt(0))}return n=r(n,!o),o?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),o=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&o&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r<arguments.length;++r){var o=arguments[r];e(o),o.length>0&&(void 0===t?t=o:t+="/"+o)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return"";if((t=n.resolve(t))===(r=n.resolve(r)))return"";for(var o=1;o<t.length&&47===t.charCodeAt(o);++o);for(var i=t.length,a=i-o,h=1;h<r.length&&47===r.charCodeAt(h);++h);for(var s=r.length-h,f=a<s?a:s,u=-1,c=0;c<=f;++c){if(c===f){if(s>f){if(47===r.charCodeAt(h+c))return r.slice(h+c+1);if(0===c)return r.slice(h+c)}else a>f&&(47===t.charCodeAt(o+c)?u=c:0===c&&(u=0));break}var l=t.charCodeAt(o+c);if(l!==r.charCodeAt(h+c))break;47===l&&(u=c)}var p="";for(c=o+u+1;c<=i;++c)c!==i&&47!==t.charCodeAt(c)||(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(h+u):(h+=u,47===r.charCodeAt(h)&&++h,r.slice(h))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(r=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,o=0,i=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var h=r.length-1,s=-1;for(n=t.length-1;n>=0;--n){var f=t.charCodeAt(n);if(47===f){if(!a){o=n+1;break}}else-1===s&&(a=!1,s=n+1),h>=0&&(f===r.charCodeAt(h)?-1==--h&&(i=n):(h=-1,i=s))}return o===i?i=s:-1===i&&(i=t.length),t.slice(o,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){o=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":t.slice(o,i)},extname:function(t){e(t);for(var r=-1,n=0,o=-1,i=!0,a=0,h=t.length-1;h>=0;--h){var s=t.charCodeAt(h);if(47!==s)-1===o&&(i=!1,o=h+1),46===s?-1===r?r=h:1!==a&&(a=1):-1!==r&&(a=-1);else if(!i){n=h+1;break}}return-1===r||-1===o||0===a||1===a&&r===o-1&&r===n+1?"":t.slice(r,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,o=t.charCodeAt(0),i=47===o;i?(r.root="/",n=1):n=0;for(var a=-1,h=0,s=-1,f=!0,u=t.length-1,c=0;u>=n;--u)if(47!==(o=t.charCodeAt(u)))-1===s&&(f=!1,s=u+1),46===o?-1===a?a=u:1!==c&&(c=1):-1!==a&&(c=-1);else if(!f){h=u+1;break}return-1===a||-1===s||0===c||1===c&&a===s-1&&a===h+1?-1!==s&&(r.base=r.name=0===h&&i?t.slice(1,s):t.slice(h,s)):(0===h&&i?(r.name=t.slice(1,a),r.base=t.slice(1,s)):(r.name=t.slice(h,a),r.base=t.slice(h,s)),r.ext=t.slice(a,s)),h>0?r.dir=t.slice(0,h-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n},447:(t,e,r)=>{var n;if(r.r(e),r.d(e,{URI:()=>g,Utils:()=>O}),"object"==typeof process)n="win32"===process.platform;else if("object"==typeof navigator){var o=navigator.userAgent;n=o.indexOf("Windows")>=0}var i,a,h=(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=/^\w[\w\d+.-]*$/,f=/^\//,u=/^\/\//,c="",l="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,g=function(){function t(t,e,r,n,o,i){void 0===i&&(i=!1),"object"==typeof t?(this.scheme=t.scheme||c,this.authority=t.authority||c,this.path=t.path||c,this.query=t.query||c,this.fragment=t.fragment||c):(this.scheme=function(t,e){return t||e?t:"file"}(t,i),this.authority=e||c,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==l&&(e=l+e):e=l}return e}(this.scheme,r||c),this.query=n||c,this.fragment=o||c,function(t,e){if(!t.scheme&&e)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+t.authority+'", path: "'+t.path+'", query: "'+t.query+'", fragment: "'+t.fragment+'"}');if(t.scheme&&!s.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!f.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(u.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,i))}return t.isUri=function(e){return e instanceof t||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"function"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString},Object.defineProperty(t.prototype,"fsPath",{get:function(){return C(this,!1)},enumerable:!1,configurable:!0}),t.prototype.with=function(t){if(!t)return this;var e=t.scheme,r=t.authority,n=t.path,o=t.query,i=t.fragment;return void 0===e?e=this.scheme:null===e&&(e=c),void 0===r?r=this.authority:null===r&&(r=c),void 0===n?n=this.path:null===n&&(n=c),void 0===o?o=this.query:null===o&&(o=c),void 0===i?i=this.fragment:null===i&&(i=c),e===this.scheme&&r===this.authority&&n===this.path&&o===this.query&&i===this.fragment?this:new v(e,r,n,o,i)},t.parse=function(t,e){void 0===e&&(e=!1);var r=p.exec(t);return r?new v(r[2]||c,x(r[4]||c),x(r[5]||c),x(r[7]||c),x(r[9]||c),e):new v(c,c,c,c,c)},t.file=function(t){var e=c;if(n&&(t=t.replace(/\\/g,l)),t[0]===l&&t[1]===l){var r=t.indexOf(l,2);-1===r?(e=t.substring(2),t=l):(e=t.substring(2,r),t=t.substring(r)||l)}return new v("file",e,t,c,c)},t.from=function(t){return new v(t.scheme,t.authority,t.path,t.query,t.fragment)},t.prototype.toString=function(t){return void 0===t&&(t=!1),A(this,t)},t.prototype.toJSON=function(){return this},t.revive=function(e){if(e){if(e instanceof t)return e;var r=new v(e);return r._formatted=e.external,r._fsPath=e._sep===d?e.fsPath:null,r}return e},t}(),d=n?1:void 0,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._formatted=null,e._fsPath=null,e}return h(e,t),Object.defineProperty(e.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=C(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),e.prototype.toString=function(t){return void 0===t&&(t=!1),t?A(this,!0):(this._formatted||(this._formatted=A(this,!1)),this._formatted)},e.prototype.toJSON=function(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=d),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t},e}(g),m=((a={})[58]="%3A",a[47]="%2F",a[63]="%3F",a[35]="%23",a[91]="%5B",a[93]="%5D",a[64]="%40",a[33]="%21",a[36]="%24",a[38]="%26",a[39]="%27",a[40]="%28",a[41]="%29",a[42]="%2A",a[43]="%2B",a[44]="%2C",a[59]="%3B",a[61]="%3D",a[32]="%20",a);function y(t,e){for(var r=void 0,n=-1,o=0;o<t.length;o++){var i=t.charCodeAt(o);if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||45===i||46===i||95===i||126===i||e&&47===i)-1!==n&&(r+=encodeURIComponent(t.substring(n,o)),n=-1),void 0!==r&&(r+=t.charAt(o));else{void 0===r&&(r=t.substr(0,o));var a=m[i];void 0!==a?(-1!==n&&(r+=encodeURIComponent(t.substring(n,o)),n=-1),r+=a):-1===n&&(n=o)}}return-1!==n&&(r+=encodeURIComponent(t.substring(n))),void 0!==r?r:t}function b(t){for(var e=void 0,r=0;r<t.length;r++){var n=t.charCodeAt(r);35===n||63===n?(void 0===e&&(e=t.substr(0,r)),e+=m[n]):void 0!==e&&(e+=t[r])}return void 0!==e?e:t}function C(t,e){var r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?"//"+t.authority+t.path:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,n&&(r=r.replace(/\//g,"\\")),r}function A(t,e){var r=e?b:y,n="",o=t.scheme,i=t.authority,a=t.path,h=t.query,s=t.fragment;if(o&&(n+=o,n+=":"),(i||"file"===o)&&(n+=l,n+=l),i){var f=i.indexOf("@");if(-1!==f){var u=i.substr(0,f);i=i.substr(f+1),-1===(f=u.indexOf(":"))?n+=r(u,!1):(n+=r(u.substr(0,f),!1),n+=":",n+=r(u.substr(f+1),!1)),n+="@"}-1===(f=(i=i.toLowerCase()).indexOf(":"))?n+=r(i,!1):(n+=r(i.substr(0,f),!1),n+=i.substr(f))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2))(c=a.charCodeAt(1))>=65&&c<=90&&(a="/"+String.fromCharCode(c+32)+":"+a.substr(3));else if(a.length>=2&&58===a.charCodeAt(1)){var c;(c=a.charCodeAt(0))>=65&&c<=90&&(a=String.fromCharCode(c+32)+":"+a.substr(2))}n+=r(a,!0)}return h&&(n+="?",n+=r(h,!1)),s&&(n+="#",n+=e?s:y(s,!1)),n}function w(t){try{return decodeURIComponent(t)}catch(e){return t.length>3?t.substr(0,3)+w(t.substr(3)):t}}var _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function x(t){return t.match(_)?t.replace(_,(function(t){return w(t)})):t}var O,P=r(470),j=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,h=i.length;a<h;a++,o++)n[o]=i[a];return n},U=P.posix||P;!function(t){t.joinPath=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return t.with({path:U.join.apply(U,j([t.path],e))})},t.resolvePath=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=t.path||"/";return t.with({path:U.resolve.apply(U,j([n],e))})},t.dirname=function(t){var e=U.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)?t:t.with({path:e})},t.basename=function(t){return U.basename(t.path)},t.extname=function(t){return U.extname(t.path)}}(O||(O={}))}},e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}return r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r(447)})();const{URI,Utils}=LIB;
|
|
285
|
+
//# sourceMappingURL=index.js.map
|
|
286
|
+
|
|
287
|
+
/***/ }),
|
|
288
|
+
/* 4 */
|
|
289
|
+
/***/ ((module) => {
|
|
290
|
+
|
|
291
|
+
// shim for using process in browser
|
|
292
|
+
var process = module.exports = {};
|
|
293
|
+
|
|
294
|
+
// cached from whatever global is present so that test runners that stub it
|
|
295
|
+
// don't break things. But we need to wrap it in a try catch in case it is
|
|
296
|
+
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
|
297
|
+
// function because try/catches deoptimize in certain engines.
|
|
298
|
+
|
|
299
|
+
var cachedSetTimeout;
|
|
300
|
+
var cachedClearTimeout;
|
|
301
|
+
|
|
302
|
+
function defaultSetTimout() {
|
|
303
|
+
throw new Error('setTimeout has not been defined');
|
|
304
|
+
}
|
|
305
|
+
function defaultClearTimeout () {
|
|
306
|
+
throw new Error('clearTimeout has not been defined');
|
|
307
|
+
}
|
|
308
|
+
(function () {
|
|
309
|
+
try {
|
|
310
|
+
if (typeof setTimeout === 'function') {
|
|
311
|
+
cachedSetTimeout = setTimeout;
|
|
312
|
+
} else {
|
|
313
|
+
cachedSetTimeout = defaultSetTimout;
|
|
314
|
+
}
|
|
315
|
+
} catch (e) {
|
|
316
|
+
cachedSetTimeout = defaultSetTimout;
|
|
317
|
+
}
|
|
318
|
+
try {
|
|
319
|
+
if (typeof clearTimeout === 'function') {
|
|
320
|
+
cachedClearTimeout = clearTimeout;
|
|
321
|
+
} else {
|
|
322
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
323
|
+
}
|
|
324
|
+
} catch (e) {
|
|
325
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
326
|
+
}
|
|
327
|
+
} ())
|
|
328
|
+
function runTimeout(fun) {
|
|
329
|
+
if (cachedSetTimeout === setTimeout) {
|
|
330
|
+
//normal enviroments in sane situations
|
|
331
|
+
return setTimeout(fun, 0);
|
|
332
|
+
}
|
|
333
|
+
// if setTimeout wasn't available but was latter defined
|
|
334
|
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
335
|
+
cachedSetTimeout = setTimeout;
|
|
336
|
+
return setTimeout(fun, 0);
|
|
337
|
+
}
|
|
338
|
+
try {
|
|
339
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
340
|
+
return cachedSetTimeout(fun, 0);
|
|
341
|
+
} catch(e){
|
|
342
|
+
try {
|
|
343
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
344
|
+
return cachedSetTimeout.call(null, fun, 0);
|
|
345
|
+
} catch(e){
|
|
346
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
347
|
+
return cachedSetTimeout.call(this, fun, 0);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
}
|
|
353
|
+
function runClearTimeout(marker) {
|
|
354
|
+
if (cachedClearTimeout === clearTimeout) {
|
|
355
|
+
//normal enviroments in sane situations
|
|
356
|
+
return clearTimeout(marker);
|
|
357
|
+
}
|
|
358
|
+
// if clearTimeout wasn't available but was latter defined
|
|
359
|
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
360
|
+
cachedClearTimeout = clearTimeout;
|
|
361
|
+
return clearTimeout(marker);
|
|
362
|
+
}
|
|
363
|
+
try {
|
|
364
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
365
|
+
return cachedClearTimeout(marker);
|
|
366
|
+
} catch (e){
|
|
367
|
+
try {
|
|
368
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
369
|
+
return cachedClearTimeout.call(null, marker);
|
|
370
|
+
} catch (e){
|
|
371
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
372
|
+
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
373
|
+
return cachedClearTimeout.call(this, marker);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
}
|
|
380
|
+
var queue = [];
|
|
381
|
+
var draining = false;
|
|
382
|
+
var currentQueue;
|
|
383
|
+
var queueIndex = -1;
|
|
384
|
+
|
|
385
|
+
function cleanUpNextTick() {
|
|
386
|
+
if (!draining || !currentQueue) {
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
draining = false;
|
|
390
|
+
if (currentQueue.length) {
|
|
391
|
+
queue = currentQueue.concat(queue);
|
|
392
|
+
} else {
|
|
393
|
+
queueIndex = -1;
|
|
394
|
+
}
|
|
395
|
+
if (queue.length) {
|
|
396
|
+
drainQueue();
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
function drainQueue() {
|
|
401
|
+
if (draining) {
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
var timeout = runTimeout(cleanUpNextTick);
|
|
405
|
+
draining = true;
|
|
406
|
+
|
|
407
|
+
var len = queue.length;
|
|
408
|
+
while(len) {
|
|
409
|
+
currentQueue = queue;
|
|
410
|
+
queue = [];
|
|
411
|
+
while (++queueIndex < len) {
|
|
412
|
+
if (currentQueue) {
|
|
413
|
+
currentQueue[queueIndex].run();
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
queueIndex = -1;
|
|
417
|
+
len = queue.length;
|
|
418
|
+
}
|
|
419
|
+
currentQueue = null;
|
|
420
|
+
draining = false;
|
|
421
|
+
runClearTimeout(timeout);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
process.nextTick = function (fun) {
|
|
425
|
+
var args = new Array(arguments.length - 1);
|
|
426
|
+
if (arguments.length > 1) {
|
|
427
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
428
|
+
args[i - 1] = arguments[i];
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
queue.push(new Item(fun, args));
|
|
432
|
+
if (queue.length === 1 && !draining) {
|
|
433
|
+
runTimeout(drainQueue);
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
// v8 likes predictible objects
|
|
438
|
+
function Item(fun, array) {
|
|
439
|
+
this.fun = fun;
|
|
440
|
+
this.array = array;
|
|
441
|
+
}
|
|
442
|
+
Item.prototype.run = function () {
|
|
443
|
+
this.fun.apply(null, this.array);
|
|
444
|
+
};
|
|
445
|
+
process.title = 'browser';
|
|
446
|
+
process.browser = true;
|
|
447
|
+
process.env = {};
|
|
448
|
+
process.argv = [];
|
|
449
|
+
process.version = ''; // empty string to avoid regexp issues
|
|
450
|
+
process.versions = {};
|
|
451
|
+
|
|
452
|
+
function noop() {}
|
|
453
|
+
|
|
454
|
+
process.on = noop;
|
|
455
|
+
process.addListener = noop;
|
|
456
|
+
process.once = noop;
|
|
457
|
+
process.off = noop;
|
|
458
|
+
process.removeListener = noop;
|
|
459
|
+
process.removeAllListeners = noop;
|
|
460
|
+
process.emit = noop;
|
|
461
|
+
process.prependListener = noop;
|
|
462
|
+
process.prependOnceListener = noop;
|
|
463
|
+
|
|
464
|
+
process.listeners = function (name) { return [] }
|
|
465
|
+
|
|
466
|
+
process.binding = function (name) {
|
|
467
|
+
throw new Error('process.binding is not supported');
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
process.cwd = function () { return '/' };
|
|
471
|
+
process.chdir = function (dir) {
|
|
472
|
+
throw new Error('process.chdir is not supported');
|
|
473
|
+
};
|
|
474
|
+
process.umask = function() { return 0; };
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
/***/ }),
|
|
478
|
+
/* 5 */
|
|
479
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
480
|
+
|
|
481
|
+
(()=>{"use strict";var e={};(()=>{var r=e;Object.defineProperty(r,"__esModule",{value:!0}),r.getErrorStatusDescription=r.xhr=r.configure=void 0,r.configure=(e,r)=>{},r.xhr=async e=>{const r=new Headers;if(e.headers)for(const t in e.headers){const s=e.headers[t];Array.isArray(s)?s.forEach((e=>r.set(t,e))):r.set(t,s)}e.user&&e.password&&r.set("Authorization","Basic "+btoa(e.user+":"+e.password));const t={method:e.type,redirect:e.followRedirects>0?"follow":"manual",mode:"cors",headers:r};e.data&&(t.body=e.data);const s=new Request(e.url,t),o=await fetch(s),a={};o.headers.forEach(((e,r)=>{a[r]=e}));const n=await o.arrayBuffer();return new class{constructor(){this.status=o.status,this.headers=a}get responseText(){return(new TextDecoder).decode(n)}get body(){return new Uint8Array(n)}}},r.getErrorStatusDescription=function(e){return String(e)}})();var r=exports;for(var t in e)r[t]=e[t];e.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
|
|
482
|
+
|
|
483
|
+
/***/ })
|
|
484
|
+
/******/ ]);
|
|
485
|
+
/************************************************************************/
|
|
486
|
+
/******/ // The module cache
|
|
487
|
+
/******/ var __webpack_module_cache__ = {};
|
|
488
|
+
/******/
|
|
489
|
+
/******/ // The require function
|
|
490
|
+
/******/ function __webpack_require__(moduleId) {
|
|
491
|
+
/******/ // Check if module is in cache
|
|
492
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
493
|
+
/******/ if (cachedModule !== undefined) {
|
|
494
|
+
/******/ return cachedModule.exports;
|
|
495
|
+
/******/ }
|
|
496
|
+
/******/ // Create a new module (and put it into the cache)
|
|
497
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
498
|
+
/******/ // no module.id needed
|
|
499
|
+
/******/ // no module.loaded needed
|
|
500
|
+
/******/ exports: {}
|
|
501
|
+
/******/ };
|
|
502
|
+
/******/
|
|
503
|
+
/******/ // Execute the module function
|
|
504
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
505
|
+
/******/
|
|
506
|
+
/******/ // Return the exports of the module
|
|
507
|
+
/******/ return module.exports;
|
|
508
|
+
/******/ }
|
|
509
|
+
/******/
|
|
510
|
+
/************************************************************************/
|
|
511
|
+
/******/ /* webpack/runtime/define property getters */
|
|
512
|
+
/******/ (() => {
|
|
513
|
+
/******/ // define getter functions for harmony exports
|
|
514
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
515
|
+
/******/ for(var key in definition) {
|
|
516
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
517
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
518
|
+
/******/ }
|
|
519
|
+
/******/ }
|
|
520
|
+
/******/ };
|
|
521
|
+
/******/ })();
|
|
522
|
+
/******/
|
|
523
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
524
|
+
/******/ (() => {
|
|
525
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
526
|
+
/******/ })();
|
|
527
|
+
/******/
|
|
528
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
529
|
+
/******/ (() => {
|
|
530
|
+
/******/ // define __esModule on exports
|
|
531
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
532
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
533
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
534
|
+
/******/ }
|
|
535
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
536
|
+
/******/ };
|
|
537
|
+
/******/ })();
|
|
538
|
+
/******/
|
|
539
|
+
/************************************************************************/
|
|
540
|
+
var __webpack_exports__ = {};
|
|
541
|
+
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
542
|
+
(() => {
|
|
543
|
+
"use strict";
|
|
544
|
+
var exports = __webpack_exports__;
|
|
545
|
+
|
|
546
|
+
/*---------------------------------------------------------------------------------------------
|
|
547
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
548
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
549
|
+
*--------------------------------------------------------------------------------------------*/
|
|
550
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
551
|
+
exports.activate = void 0;
|
|
552
|
+
const vscode = __webpack_require__(1);
|
|
553
|
+
const fsProvider_1 = __webpack_require__(2);
|
|
554
|
+
function activate(context) {
|
|
555
|
+
const serverUri = context.extensionUri.with({ path: '/static/mount', query: undefined });
|
|
556
|
+
const disposable = vscode.workspace.registerFileSystemProvider(fsProvider_1.SCHEME, new fsProvider_1.MountsFileSystemProvider(serverUri));
|
|
557
|
+
context.subscriptions.push(disposable);
|
|
558
|
+
console.log(`vscode-test-web-support fs provider registeres for ${fsProvider_1.SCHEME}, mount ${serverUri.toString()}`);
|
|
559
|
+
}
|
|
560
|
+
exports.activate = activate;
|
|
561
|
+
|
|
562
|
+
})();
|
|
563
|
+
|
|
564
|
+
var __webpack_export_target__ = exports;
|
|
565
|
+
for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i];
|
|
566
|
+
if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
|
|
567
|
+
/******/ })()
|
|
568
|
+
;
|
|
569
|
+
//# sourceMappingURL=fsExtensionMain.js.map
|
package/fs-provider/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vscode-test-web-fs",
|
|
3
|
+
"private": true,
|
|
3
4
|
"displayName": "vscode-test-web file system provider",
|
|
4
5
|
"description": "Provides a file provider for web tests to access local files and folders.",
|
|
5
6
|
"publisher": "vscode",
|
|
@@ -14,7 +15,7 @@
|
|
|
14
15
|
"activationEvents": [
|
|
15
16
|
"onFileSystem:vscode-test-web"
|
|
16
17
|
],
|
|
17
|
-
"browser": "./dist/
|
|
18
|
+
"browser": "./dist/fsExtensionMain.js",
|
|
18
19
|
"scripts": {
|
|
19
20
|
"vscode:prepublish": "npm run package-web",
|
|
20
21
|
"compile-web": "webpack",
|
|
@@ -23,11 +24,7 @@
|
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@types/vscode": "^1.55.0",
|
|
26
|
-
"@types/mocha": "^8.2.2",
|
|
27
|
-
"@types/lru-cache": "^5.1.1",
|
|
28
27
|
"@types/webpack-env": "^1.16.0",
|
|
29
|
-
"mocha": "^9.0.1",
|
|
30
|
-
"typescript": "^4.3.4",
|
|
31
28
|
"ts-loader": "^9.2.3",
|
|
32
29
|
"webpack": "^5.40.0",
|
|
33
30
|
"webpack-cli": "^4.7.2",
|
package/out/index.js
CHANGED
|
@@ -27,7 +27,7 @@ async function runTests(options) {
|
|
|
27
27
|
folderMountPath: options.folderPath
|
|
28
28
|
};
|
|
29
29
|
const port = 3000;
|
|
30
|
-
const server = await main_1.runServer(port, config);
|
|
30
|
+
const server = await (0, main_1.runServer)(port, config);
|
|
31
31
|
const endpoint = `http://localhost:${port}`;
|
|
32
32
|
const result = await openInBrowser({
|
|
33
33
|
browserType: options.browserType,
|
|
@@ -47,7 +47,7 @@ async function getBuild(version) {
|
|
|
47
47
|
if (version === 'sources') {
|
|
48
48
|
return { type: 'sources' };
|
|
49
49
|
}
|
|
50
|
-
return await download_1.downloadAndUnzipVSCode(version === 'stable' ? 'stable' : 'insider');
|
|
50
|
+
return await (0, download_1.downloadAndUnzipVSCode)(version === 'stable' ? 'stable' : 'insider');
|
|
51
51
|
}
|
|
52
52
|
async function open(options) {
|
|
53
53
|
var _a;
|
|
@@ -58,13 +58,14 @@ async function open(options) {
|
|
|
58
58
|
folderMountPath: options.folderPath
|
|
59
59
|
};
|
|
60
60
|
const port = 3000;
|
|
61
|
-
await main_1.runServer(port, config);
|
|
61
|
+
await (0, main_1.runServer)(port, config);
|
|
62
62
|
const endpoint = `http://localhost:${port}`;
|
|
63
63
|
await openInBrowser({
|
|
64
64
|
browserType: options.browserType,
|
|
65
65
|
endpoint,
|
|
66
66
|
headless: (_a = options.headless) !== null && _a !== void 0 ? _a : false,
|
|
67
|
-
devTools: options.devTools
|
|
67
|
+
devTools: options.devTools,
|
|
68
|
+
waitForDebugger: options.waitForDebugger
|
|
68
69
|
});
|
|
69
70
|
}
|
|
70
71
|
exports.open = open;
|
|
@@ -138,13 +139,13 @@ function valdiateBrowserType(browserType) {
|
|
|
138
139
|
async function validatePath(loc, isFile) {
|
|
139
140
|
loc = path.resolve(loc);
|
|
140
141
|
if (isFile) {
|
|
141
|
-
if (!await download_1.fileExists(loc)) {
|
|
142
|
+
if (!await (0, download_1.fileExists)(loc)) {
|
|
142
143
|
console.log(`'${loc}' must be an existing file.`);
|
|
143
144
|
process.exit(-1);
|
|
144
145
|
}
|
|
145
146
|
}
|
|
146
147
|
else {
|
|
147
|
-
if (!await download_1.directoryExists(loc)) {
|
|
148
|
+
if (!await (0, download_1.directoryExists)(loc)) {
|
|
148
149
|
console.log(`'${loc}' must be an existing folder.`);
|
|
149
150
|
process.exit(-1);
|
|
150
151
|
}
|
|
@@ -197,8 +198,8 @@ async function cliMain() {
|
|
|
197
198
|
folderPath = input;
|
|
198
199
|
if (folderUri) {
|
|
199
200
|
console.log(`Local folder provided as input, ignoring 'folder-uri'`);
|
|
201
|
+
folderUri = undefined;
|
|
200
202
|
}
|
|
201
|
-
folderUri = `vscode-test-web://mount/`;
|
|
202
203
|
}
|
|
203
204
|
}
|
|
204
205
|
if (extensionTestsPath) {
|
package/out/server/app.js
CHANGED
|
@@ -22,17 +22,17 @@ async function createApp(config) {
|
|
|
22
22
|
app.use(kmount('/static', kstatic(path.join(__dirname, '../static'))));
|
|
23
23
|
if (config.extensionPath) {
|
|
24
24
|
console.log('Serving extensions from ' + config.extensionPath);
|
|
25
|
-
app.use(kmount('/static/extensions', kstatic(config.extensionPath)));
|
|
25
|
+
app.use(kmount('/static/extensions', kstatic(config.extensionPath, { hidden: true })));
|
|
26
26
|
}
|
|
27
27
|
if (config.extensionDevelopmentPath) {
|
|
28
28
|
console.log('Serving dev extensions from ' + config.extensionDevelopmentPath);
|
|
29
|
-
app.use(kmount('/static/devextensions', kstatic(config.extensionDevelopmentPath)));
|
|
29
|
+
app.use(kmount('/static/devextensions', kstatic(config.extensionDevelopmentPath, { hidden: true })));
|
|
30
30
|
}
|
|
31
31
|
if (config.build.type === 'static') {
|
|
32
|
-
app.use(kmount('/static/build', kstatic(config.build.location)));
|
|
32
|
+
app.use(kmount('/static/build', kstatic(config.build.location, { hidden: true })));
|
|
33
33
|
}
|
|
34
|
-
mounts_1.configureMounts(config, app);
|
|
35
|
-
app.use(workbench_1.default(config));
|
|
34
|
+
(0, mounts_1.configureMounts)(config, app);
|
|
35
|
+
app.use((0, workbench_1.default)(config));
|
|
36
36
|
return app;
|
|
37
37
|
}
|
|
38
38
|
exports.default = createApp;
|
package/out/server/download.js
CHANGED
|
@@ -29,7 +29,7 @@ async function download(downloadUrl, destination, message) {
|
|
|
29
29
|
const total = Number(res.headers['content-length']);
|
|
30
30
|
let received = 0;
|
|
31
31
|
let timeout;
|
|
32
|
-
const outStream = fs_1.createWriteStream(destination);
|
|
32
|
+
const outStream = (0, fs_1.createWriteStream)(destination);
|
|
33
33
|
outStream.on('close', () => resolve(destination));
|
|
34
34
|
outStream.on('error', reject);
|
|
35
35
|
res.on('data', chunk => {
|
|
@@ -54,7 +54,7 @@ async function download(downloadUrl, destination, message) {
|
|
|
54
54
|
}
|
|
55
55
|
async function unzip(source, destination, message) {
|
|
56
56
|
process.stdout.write(message);
|
|
57
|
-
if (!fs_1.existsSync(destination)) {
|
|
57
|
+
if (!(0, fs_1.existsSync)(destination)) {
|
|
58
58
|
await fs_1.promises.mkdir(destination, { recursive: true });
|
|
59
59
|
}
|
|
60
60
|
await decompress(source, destination, {
|
|
@@ -69,10 +69,10 @@ async function downloadAndUnzipVSCode(quality) {
|
|
|
69
69
|
const info = await getLatestVersion(quality);
|
|
70
70
|
const folderName = `vscode-web-${quality}-${info.version}`;
|
|
71
71
|
const downloadedPath = path.resolve(vscodeTestDir, folderName);
|
|
72
|
-
if (fs_1.existsSync(downloadedPath) && fs_1.existsSync(path.join(downloadedPath, 'version'))) {
|
|
72
|
+
if ((0, fs_1.existsSync)(downloadedPath) && (0, fs_1.existsSync)(path.join(downloadedPath, 'version'))) {
|
|
73
73
|
return { type: 'static', location: downloadedPath };
|
|
74
74
|
}
|
|
75
|
-
if (fs_1.existsSync(vscodeTestDir)) {
|
|
75
|
+
if ((0, fs_1.existsSync)(vscodeTestDir)) {
|
|
76
76
|
await fs_1.promises.rmdir(vscodeTestDir, { recursive: true, maxRetries: 5 });
|
|
77
77
|
}
|
|
78
78
|
await fs_1.promises.mkdir(vscodeTestDir, { recursive: true });
|
package/out/server/main.js
CHANGED
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.runServer = void 0;
|
|
8
8
|
const app_1 = require("./app");
|
|
9
9
|
async function runServer(port, config) {
|
|
10
|
-
const app = await app_1.default(config);
|
|
10
|
+
const app = await (0, app_1.default)(config);
|
|
11
11
|
const server = app.listen(port);
|
|
12
12
|
console.log(`Listening on http://localhost:${port}`);
|
|
13
13
|
return server;
|
package/out/server/mounts.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.configureMounts = exports.fsProviderExtensionPrefix = void 0;
|
|
7
|
+
exports.configureMounts = exports.fsProviderFolderUri = exports.fsProviderExtensionPrefix = void 0;
|
|
8
8
|
const kstatic = require("koa-static");
|
|
9
9
|
const kmount = require("koa-mount");
|
|
10
10
|
const Router = require("@koa/router");
|
|
@@ -12,13 +12,14 @@ const fs_1 = require("fs");
|
|
|
12
12
|
const path = require("path");
|
|
13
13
|
const mountPrefix = '/static/mount';
|
|
14
14
|
exports.fsProviderExtensionPrefix = '/static/fsproviderextension';
|
|
15
|
+
exports.fsProviderFolderUri = 'vscode-test-web://mount/';
|
|
15
16
|
function configureMounts(config, app) {
|
|
16
17
|
const folderMountPath = config.folderMountPath;
|
|
17
18
|
if (folderMountPath) {
|
|
18
19
|
console.log(`Serving local content ${folderMountPath} at ${mountPrefix}`);
|
|
19
20
|
app.use(fileOps(mountPrefix, folderMountPath));
|
|
20
|
-
app.use(kmount(mountPrefix, kstatic(folderMountPath)));
|
|
21
|
-
app.use(kmount(exports.fsProviderExtensionPrefix, kstatic(path.join(__dirname, '../../fs-provider'))));
|
|
21
|
+
app.use(kmount(mountPrefix, kstatic(folderMountPath, { hidden: true })));
|
|
22
|
+
app.use(kmount(exports.fsProviderExtensionPrefix, kstatic(path.join(__dirname, '../../fs-provider'), { hidden: true })));
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
exports.configureMounts = configureMounts;
|
package/out/server/workbench.js
CHANGED
|
@@ -44,7 +44,7 @@ class Workbench {
|
|
|
44
44
|
+ `<script src="${this.baseUrl}/out/vs/code/browser/workbench/workbench.js"></script>`;
|
|
45
45
|
}
|
|
46
46
|
async renderCallback() {
|
|
47
|
-
return await download_1.fetch(`${this.baseUrl}/out/vs/code/browser/workbench/callback.html`);
|
|
47
|
+
return await (0, download_1.fetch)(`${this.baseUrl}/out/vs/code/browser/workbench/callback.html`);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
function valueOrFirst(value) {
|
|
@@ -53,7 +53,7 @@ function valueOrFirst(value) {
|
|
|
53
53
|
async function getWorkbenchOptions(ctx, config) {
|
|
54
54
|
const options = {};
|
|
55
55
|
if (config.extensionPath) {
|
|
56
|
-
options.additionalBuiltinExtensions = await extensions_1.scanForExtensions(config.extensionPath, {
|
|
56
|
+
options.additionalBuiltinExtensions = await (0, extensions_1.scanForExtensions)(config.extensionPath, {
|
|
57
57
|
scheme: ctx.protocol,
|
|
58
58
|
authority: ctx.host,
|
|
59
59
|
path: '/static/extensions',
|
|
@@ -61,7 +61,7 @@ async function getWorkbenchOptions(ctx, config) {
|
|
|
61
61
|
}
|
|
62
62
|
if (config.extensionDevelopmentPath) {
|
|
63
63
|
const developmentOptions = options.developmentOptions = {};
|
|
64
|
-
developmentOptions.extensions = await extensions_1.scanForExtensions(config.extensionDevelopmentPath, { scheme: ctx.protocol, authority: ctx.host, path: '/static/devextensions' });
|
|
64
|
+
developmentOptions.extensions = await (0, extensions_1.scanForExtensions)(config.extensionDevelopmentPath, { scheme: ctx.protocol, authority: ctx.host, path: '/static/devextensions' });
|
|
65
65
|
if (config.extensionTestsPath) {
|
|
66
66
|
let relativePath = path.relative(config.extensionDevelopmentPath, config.extensionTestsPath);
|
|
67
67
|
if (process.platform === 'win32') {
|
|
@@ -74,14 +74,15 @@ async function getWorkbenchOptions(ctx, config) {
|
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
if (config.folderUri) {
|
|
78
|
-
options.folderUri = vscode_uri_1.URI.parse(config.folderUri);
|
|
79
|
-
}
|
|
80
77
|
if (config.folderMountPath) {
|
|
81
78
|
if (!options.additionalBuiltinExtensions) {
|
|
82
79
|
options.additionalBuiltinExtensions = [];
|
|
83
80
|
}
|
|
84
81
|
options.additionalBuiltinExtensions.push({ scheme: ctx.protocol, authority: ctx.host, path: mounts_1.fsProviderExtensionPrefix });
|
|
82
|
+
options.folderUri = vscode_uri_1.URI.parse(mounts_1.fsProviderFolderUri);
|
|
83
|
+
}
|
|
84
|
+
else if (config.folderUri) {
|
|
85
|
+
options.folderUri = vscode_uri_1.URI.parse(config.folderUri);
|
|
85
86
|
}
|
|
86
87
|
return options;
|
|
87
88
|
}
|
|
@@ -90,7 +91,7 @@ function default_1(config) {
|
|
|
90
91
|
router.use(async (ctx, next) => {
|
|
91
92
|
if (ctx.query['dev'] || config.build.type === 'sources') {
|
|
92
93
|
try {
|
|
93
|
-
const builtInExtensions = await download_1.fetchJSON('http://localhost:8080/builtin');
|
|
94
|
+
const builtInExtensions = await (0, download_1.fetchJSON)('http://localhost:8080/builtin');
|
|
94
95
|
ctx.state.workbench = new Workbench('http://localhost:8080/static', true, builtInExtensions);
|
|
95
96
|
}
|
|
96
97
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vscode/test-web",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"scripts": {
|
|
5
|
-
"
|
|
5
|
+
"init": "yarn --cwd=fs-provider && yarn --cwd=sample",
|
|
6
6
|
"compile": "tsc -p ./ && yarn compile-fs-provider",
|
|
7
7
|
"watch": "tsc -w -p ./",
|
|
8
8
|
"prepublishOnly": "yarn compile",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"node": ">=8.9.3"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@koa/router": "^10.
|
|
25
|
+
"@koa/router": "^10.1.1",
|
|
26
26
|
"koa": "^2.13.1",
|
|
27
27
|
"koa-morgan": "^1.0.1",
|
|
28
28
|
"koa-mount": "^4.0.0",
|
|
29
29
|
"koa-static": "^5.0.0",
|
|
30
30
|
"minimist": "^1.2.5",
|
|
31
|
-
"playwright": "
|
|
31
|
+
"playwright": "1.14.1",
|
|
32
32
|
"vscode-uri": "^3.0.2",
|
|
33
33
|
"http-proxy-agent": "^4.0.1",
|
|
34
34
|
"https-proxy-agent": "^5.0.0",
|
|
@@ -36,19 +36,19 @@
|
|
|
36
36
|
"decompress-targz": "^4.1.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/koa": "^2.13.
|
|
40
|
-
"@types/koa-morgan": "^1.0.
|
|
41
|
-
"@types/koa-mount": "^4.0.
|
|
42
|
-
"@types/koa-static": "^4.0.
|
|
43
|
-
"@types/koa__router": "^8.0.
|
|
44
|
-
"@types/minimist": "^1.2.
|
|
39
|
+
"@types/koa": "^2.13.4",
|
|
40
|
+
"@types/koa-morgan": "^1.0.5",
|
|
41
|
+
"@types/koa-mount": "^4.0.1",
|
|
42
|
+
"@types/koa-static": "^4.0.2",
|
|
43
|
+
"@types/koa__router": "^8.0.8",
|
|
44
|
+
"@types/minimist": "^1.2.2",
|
|
45
45
|
"@types/node": "^12.19.9",
|
|
46
|
-
"@typescript-eslint/eslint-plugin": "^4.
|
|
47
|
-
"@typescript-eslint/parser": "^4.
|
|
48
|
-
"@types/decompress": "^4.2.
|
|
49
|
-
"eslint": "^7.
|
|
50
|
-
"eslint-plugin-header": "^3.1.
|
|
51
|
-
"typescript": "^4.
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "^4.31.1",
|
|
47
|
+
"@typescript-eslint/parser": "^4.31.1",
|
|
48
|
+
"@types/decompress": "^4.2.4",
|
|
49
|
+
"eslint": "^7.32.0",
|
|
50
|
+
"eslint-plugin-header": "^3.1.1",
|
|
51
|
+
"typescript": "^4.4.3"
|
|
52
52
|
},
|
|
53
53
|
"license": "MIT",
|
|
54
54
|
"author": "Visual Studio Code Team",
|