@rindo/core 2.18.0 → 2.22.2
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/cli/config-flags.d.ts +33 -21
- package/cli/index.cjs +670 -388
- package/cli/index.d.ts +3 -0
- package/cli/index.js +670 -388
- package/cli/package.json +1 -1
- package/compiler/lib.dom.d.ts +434 -251
- package/compiler/lib.dom.iterable.d.ts +7 -13
- package/compiler/lib.es2015.collection.d.ts +62 -1
- package/compiler/lib.es2015.promise.d.ts +9 -4
- package/compiler/lib.es2015.proxy.d.ts +91 -2
- package/compiler/lib.es2015.reflect.d.ts +25 -2
- package/compiler/lib.es2015.symbol.wellknown.d.ts +3 -3
- package/compiler/lib.es2017.intl.d.ts +16 -1
- package/compiler/lib.es2019.d.ts +1 -0
- package/compiler/lib.es2019.intl.d.ts +25 -0
- package/compiler/lib.es2020.intl.d.ts +31 -6
- package/compiler/lib.es2021.intl.d.ts +11 -3
- package/compiler/lib.es2022.d.ts +1 -0
- package/compiler/lib.es2022.error.d.ts +2 -2
- package/compiler/lib.es2022.sharedmemory.d.ts +27 -0
- package/compiler/lib.es5.d.ts +39 -14
- package/compiler/lib.esnext.intl.d.ts +5 -1
- package/compiler/lib.webworker.d.ts +318 -55
- package/compiler/lib.webworker.iterable.d.ts +11 -3
- package/compiler/package.json +1 -1
- package/compiler/rindo.d.ts +3 -25
- package/compiler/rindo.js +53912 -51834
- package/compiler/rindo.min.js +2 -2
- package/compiler/sys/in-memory-fs.d.ts +3 -3
- package/compiler/transpile.d.ts +32 -0
- package/dependencies.json +3 -1
- package/dev-server/client/app-error.d.ts +1 -1
- package/dev-server/client/index.d.ts +2 -2
- package/dev-server/client/index.js +241 -241
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +3 -3
- package/dev-server/index.d.ts +1 -1
- package/dev-server/index.js +2 -2
- package/dev-server/open-in-editor-api.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +1182 -1148
- package/dev-server/ws.js +1 -1
- package/internal/app-data/package.json +1 -1
- package/internal/client/css-shim.js +2 -2
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +800 -673
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +19 -1
- package/internal/client/patch-esm.js +1 -1
- package/internal/client/polyfills/css-shim.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/index.js +154 -143
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.d.ts +1 -1
- package/internal/hydrate/runner.js +106 -106
- package/internal/package.json +1 -1
- package/internal/rindo-core/index.d.ts +9 -10
- package/internal/rindo-private.d.ts +149 -80
- package/internal/rindo-public-compiler.d.ts +42 -31
- package/internal/rindo-public-docs.d.ts +24 -0
- package/internal/rindo-public-runtime.d.ts +79 -7
- package/internal/testing/index.js +187 -175
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +905 -896
- package/mock-doc/index.d.ts +2 -2
- package/mock-doc/index.js +905 -896
- package/mock-doc/package.json +1 -1
- package/package.json +48 -57
- package/readme.md +44 -31
- package/screenshot/compare/build/p-f4745c2f.entry.js +1 -1
- package/screenshot/index.d.ts +1 -1
- package/screenshot/index.js +3 -3
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +983 -849
- package/sys/node/autoprefixer.js +2 -2
- package/sys/node/glob.js +1 -1
- package/sys/node/index.d.ts +4 -0
- package/sys/node/index.js +399 -413
- package/sys/node/package.json +1 -1
- package/sys/node/prompts.js +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.d.ts +6 -6
- package/testing/index.js +1136 -1277
- package/testing/jest/jest-config.d.ts +1 -1
- package/testing/jest/jest-preprocessor.d.ts +3 -3
- package/testing/jest/jest-serializer.d.ts +1 -2
- package/testing/matchers/index.d.ts +3 -3
- package/testing/mock-fetch.d.ts +1 -1
- package/testing/mocks.d.ts +2 -2
- package/testing/package.json +1 -1
- package/testing/puppeteer/puppeteer-declarations.d.ts +5 -5
- package/testing/puppeteer/puppeteer-element.d.ts +2 -2
- package/testing/puppeteer/puppeteer-events.d.ts +1 -1
- package/testing/testing-logger.d.ts +1 -1
- package/testing/testing-utils.d.ts +1 -1
- package/testing/testing.d.ts +1 -1
package/testing/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Rindo Testing v2.
|
|
2
|
+
Rindo Testing v2.22.2 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
function _lazyRequire(e) {
|
|
5
5
|
return new Proxy({}, {
|
|
6
6
|
get(t, r) {
|
|
7
|
-
const n = require(e);
|
|
8
|
-
return Reflect.get(n, r);
|
|
9
|
-
},
|
|
10
|
-
set(t, r, n) {
|
|
11
7
|
const s = require(e);
|
|
12
|
-
return Reflect.
|
|
8
|
+
return Reflect.get(s, r);
|
|
9
|
+
},
|
|
10
|
+
set(t, r, s) {
|
|
11
|
+
const n = require(e);
|
|
12
|
+
return Reflect.set(n, r, s);
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
}
|
|
@@ -25,8 +25,8 @@ function _interopNamespace(e) {
|
|
|
25
25
|
var t = Object.create(null);
|
|
26
26
|
return e && Object.keys(e).forEach((function(r) {
|
|
27
27
|
if ("default" !== r) {
|
|
28
|
-
var
|
|
29
|
-
Object.defineProperty(t, r,
|
|
28
|
+
var s = Object.getOwnPropertyDescriptor(e, r);
|
|
29
|
+
Object.defineProperty(t, r, s.get ? s : {
|
|
30
30
|
enumerable: !0,
|
|
31
31
|
get: function() {
|
|
32
32
|
return e[r];
|
|
@@ -38,10 +38,10 @@ function _interopNamespace(e) {
|
|
|
38
38
|
|
|
39
39
|
async function startPuppeteerBrowser(e) {
|
|
40
40
|
if (!e.flags.e2e) return null;
|
|
41
|
-
const t = process.env, r = e.testing.browserExecutablePath ? "puppeteer-core" : "puppeteer",
|
|
42
|
-
t.__RINDO_PUPPETEER_MODULE__ =
|
|
41
|
+
const t = process.env, r = e.testing.browserExecutablePath ? "puppeteer-core" : "puppeteer", s = e.sys.lazyRequire.getModulePath(e.rootDir, r), n = e.sys.lazyRequire.require(e.rootDir, s);
|
|
42
|
+
t.__RINDO_PUPPETEER_MODULE__ = s, t.__RINDO_BROWSER_WAIT_UNTIL = e.testing.browserWaitUntil,
|
|
43
43
|
e.flags.devtools && (e.testing.browserDevtools = !0, e.testing.browserHeadless = !1,
|
|
44
|
-
t.__RINDO_E2E_DEVTOOLS__ = "true"), e.logger.debug(`puppeteer: ${
|
|
44
|
+
t.__RINDO_E2E_DEVTOOLS__ = "true"), e.logger.debug(`puppeteer: ${s}`), e.logger.debug(`puppeteer headless: ${e.testing.browserHeadless}`),
|
|
45
45
|
Array.isArray(e.testing.browserArgs) && e.logger.debug(`puppeteer args: ${e.testing.browserArgs.join(" ")}`),
|
|
46
46
|
"boolean" == typeof e.testing.browserDevtools && e.logger.debug(`puppeteer devtools: ${e.testing.browserDevtools}`),
|
|
47
47
|
"number" == typeof e.testing.browserSlowMo && e.logger.debug(`puppeteer slowMo: ${e.testing.browserSlowMo}`);
|
|
@@ -50,7 +50,7 @@ async function startPuppeteerBrowser(e) {
|
|
|
50
50
|
slowMo: e.testing.browserSlowMo
|
|
51
51
|
};
|
|
52
52
|
let i;
|
|
53
|
-
if (e.testing.browserWSEndpoint) i = await
|
|
53
|
+
if (e.testing.browserWSEndpoint) i = await n.connect({
|
|
54
54
|
browserWSEndpoint: e.testing.browserWSEndpoint,
|
|
55
55
|
...o
|
|
56
56
|
}); else {
|
|
@@ -61,7 +61,7 @@ async function startPuppeteerBrowser(e) {
|
|
|
61
61
|
...o
|
|
62
62
|
};
|
|
63
63
|
e.testing.browserExecutablePath && (t.executablePath = e.testing.browserExecutablePath),
|
|
64
|
-
i = await
|
|
64
|
+
i = await n.launch({
|
|
65
65
|
...t
|
|
66
66
|
});
|
|
67
67
|
}
|
|
@@ -69,22 +69,90 @@ async function startPuppeteerBrowser(e) {
|
|
|
69
69
|
i;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
function
|
|
73
|
-
|
|
72
|
+
function transpile(e, t = {}) {
|
|
73
|
+
t = {
|
|
74
|
+
...t,
|
|
75
|
+
componentExport: null,
|
|
76
|
+
componentMetadata: "compilerstatic",
|
|
77
|
+
coreImportPath: isString(t.coreImportPath) ? t.coreImportPath : "@rindo/core/internal/testing",
|
|
78
|
+
currentDirectory: t.currentDirectory || process.cwd(),
|
|
79
|
+
module: "cjs",
|
|
80
|
+
proxy: null,
|
|
81
|
+
sourceMap: "inline",
|
|
82
|
+
style: null,
|
|
83
|
+
styleImportData: "queryparams",
|
|
84
|
+
target: "es2015"
|
|
85
|
+
};
|
|
86
|
+
try {
|
|
87
|
+
const e = process.versions.node.split(".");
|
|
88
|
+
parseInt(e[0], 10) >= 10 && (t.target = "es2017");
|
|
89
|
+
} catch (e) {}
|
|
90
|
+
return rindo_js.transpileSync(e, t);
|
|
74
91
|
}
|
|
75
92
|
|
|
76
|
-
function
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
93
|
+
function formatDiagnostic(e) {
|
|
94
|
+
let t = "";
|
|
95
|
+
return e.relFilePath && (t += e.relFilePath, "number" == typeof e.lineNumber && (t += ":" + e.lineNumber + 1,
|
|
96
|
+
"number" == typeof e.columnNumber && (t += ":" + e.columnNumber)), t += "\n"), t += e.messageText,
|
|
97
|
+
t;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function getCompilerOptions(e) {
|
|
101
|
+
if (_tsCompilerOptions) return _tsCompilerOptions;
|
|
102
|
+
if ("string" != typeof e) return null;
|
|
103
|
+
e = normalizePath(e);
|
|
104
|
+
const t = rindo_js.ts.findConfigFile(e, rindo_js.ts.sys.fileExists);
|
|
105
|
+
if (!t) return null;
|
|
106
|
+
const r = rindo_js.ts.readConfigFile(t, rindo_js.ts.sys.readFile);
|
|
107
|
+
if (r.error) throw new Error(formatDiagnostic((e => {
|
|
108
|
+
const t = {
|
|
109
|
+
level: "warn",
|
|
110
|
+
type: "typescript",
|
|
111
|
+
language: "typescript",
|
|
112
|
+
header: "TypeScript",
|
|
113
|
+
code: e.code.toString(),
|
|
114
|
+
messageText: flattenDiagnosticMessageText(e, e.messageText),
|
|
115
|
+
relFilePath: null,
|
|
116
|
+
absFilePath: null,
|
|
117
|
+
lines: []
|
|
118
|
+
};
|
|
119
|
+
if (1 === e.category && (t.level = "error"), e.file) {
|
|
120
|
+
t.absFilePath = e.file.fileName;
|
|
121
|
+
const s = "string" != typeof (r = e.file.text) ? [] : (r = r.replace(/\\r/g, "\n")).split("\n"), n = e.file.getLineAndCharacterOfPosition(e.start), o = {
|
|
122
|
+
lineIndex: n.line,
|
|
123
|
+
lineNumber: n.line + 1,
|
|
124
|
+
text: s[n.line],
|
|
125
|
+
errorCharStart: n.character,
|
|
126
|
+
errorLength: Math.max(e.length, 1)
|
|
127
|
+
};
|
|
128
|
+
if (t.lineNumber = o.lineNumber, t.columnNumber = o.errorCharStart + 1, t.lines.push(o),
|
|
129
|
+
0 === o.errorLength && o.errorCharStart > 0 && (o.errorLength = 1, o.errorCharStart--),
|
|
130
|
+
o.lineIndex > 0) {
|
|
131
|
+
const e = {
|
|
132
|
+
lineIndex: o.lineIndex - 1,
|
|
133
|
+
lineNumber: o.lineNumber - 1,
|
|
134
|
+
text: s[o.lineIndex - 1],
|
|
135
|
+
errorCharStart: -1,
|
|
136
|
+
errorLength: -1
|
|
137
|
+
};
|
|
138
|
+
t.lines.unshift(e);
|
|
139
|
+
}
|
|
140
|
+
if (o.lineIndex + 1 < s.length) {
|
|
141
|
+
const e = {
|
|
142
|
+
lineIndex: o.lineIndex + 1,
|
|
143
|
+
lineNumber: o.lineNumber + 1,
|
|
144
|
+
text: s[o.lineIndex + 1],
|
|
145
|
+
errorCharStart: -1,
|
|
146
|
+
errorLength: -1
|
|
147
|
+
};
|
|
148
|
+
t.lines.push(e);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
var r;
|
|
152
|
+
return t;
|
|
153
|
+
})(r.error)));
|
|
154
|
+
const s = rindo_js.ts.parseJsonConfigFileContent(r.config, rindo_js.ts.sys, e, void 0, t);
|
|
155
|
+
return _tsCompilerOptions = s.options, _tsCompilerOptions;
|
|
88
156
|
}
|
|
89
157
|
|
|
90
158
|
function setScreenshotEmulateData(e, t) {
|
|
@@ -100,9 +168,9 @@ function setScreenshotEmulateData(e, t) {
|
|
|
100
168
|
}
|
|
101
169
|
};
|
|
102
170
|
if ("string" == typeof e.device) try {
|
|
103
|
-
const
|
|
104
|
-
if (!
|
|
105
|
-
r.device = e.device, r.userAgent =
|
|
171
|
+
const s = require(t.__RINDO_PUPPETEER_MODULE__ + "/DeviceDescriptors")[e.device];
|
|
172
|
+
if (!s) return void console.error(`invalid emulate device: ${e.device}`);
|
|
173
|
+
r.device = e.device, r.userAgent = s.userAgent, r.viewport = s.viewport;
|
|
106
174
|
} catch (e) {
|
|
107
175
|
return void console.error("error loading puppeteer DeviceDescriptors", e);
|
|
108
176
|
}
|
|
@@ -118,7 +186,7 @@ function setScreenshotEmulateData(e, t) {
|
|
|
118
186
|
async function runJest(e, t) {
|
|
119
187
|
let r = !1;
|
|
120
188
|
try {
|
|
121
|
-
const
|
|
189
|
+
const s = function s(e, t) {
|
|
122
190
|
let r = e.emulate.slice();
|
|
123
191
|
if ("string" == typeof t.emulate) {
|
|
124
192
|
const e = t.emulate.toLowerCase();
|
|
@@ -126,14 +194,16 @@ async function runJest(e, t) {
|
|
|
126
194
|
}
|
|
127
195
|
return r;
|
|
128
196
|
}(e.testing, e.flags);
|
|
129
|
-
t.__RINDO_EMULATE_CONFIGS__ = JSON.stringify(
|
|
197
|
+
t.__RINDO_EMULATE_CONFIGS__ = JSON.stringify(s), t.__RINDO_ENV__ = JSON.stringify(e.env),
|
|
130
198
|
e.flags.ci || e.flags.e2e ? t.__RINDO_DEFAULT_TIMEOUT__ = "30000" : t.__RINDO_DEFAULT_TIMEOUT__ = "15000",
|
|
131
199
|
e.flags.devtools && (t.__RINDO_DEFAULT_TIMEOUT__ = "300000000"), e.logger.debug(`default timeout: ${t.__RINDO_DEFAULT_TIMEOUT__}`);
|
|
132
|
-
const
|
|
133
|
-
const t = require("yargs"), r =
|
|
200
|
+
const n = function n(e) {
|
|
201
|
+
const t = require("yargs"), r = e.flags.knownArgs.slice();
|
|
134
202
|
r.some((e => e.startsWith("--max-workers") || e.startsWith("--maxWorkers"))) || r.push(`--max-workers=${e.maxConcurrentWorkers}`),
|
|
135
|
-
e.flags.devtools && r.push("--runInBand")
|
|
136
|
-
|
|
203
|
+
e.flags.devtools && r.push("--runInBand");
|
|
204
|
+
const s = [ ...r, ...e.flags.unknownArgs ];
|
|
205
|
+
e.logger.info(e.logger.magenta(`jest args: ${s.join(" ")}`));
|
|
206
|
+
let n = t(s).argv;
|
|
137
207
|
if (n = {
|
|
138
208
|
detectLeaks: !1,
|
|
139
209
|
"detect-leaks": !1,
|
|
@@ -154,18 +224,18 @@ async function runJest(e, t) {
|
|
|
154
224
|
testLocationInResults: !1,
|
|
155
225
|
"test-location-in-results": !1,
|
|
156
226
|
...n
|
|
157
|
-
}, n.config = function
|
|
158
|
-
const t = e.testing, r = require("jest-config").defaults,
|
|
227
|
+
}, n.config = function o(e) {
|
|
228
|
+
const t = e.testing, r = require("jest-config").defaults, s = Object.keys(r), n = {};
|
|
159
229
|
return Object.keys(t).forEach((e => {
|
|
160
|
-
|
|
161
|
-
})),
|
|
162
|
-
Array.isArray(t.collectCoverageFrom) && (
|
|
163
|
-
isString(t.coverageDirectory) && (
|
|
164
|
-
isString(t.globalSetup) && (
|
|
165
|
-
isString(t.preset) && (
|
|
166
|
-
Array.isArray(t.reporters) && (
|
|
167
|
-
t.transform && (
|
|
168
|
-
|
|
230
|
+
s.includes(e) && (n[e] = t[e]);
|
|
231
|
+
})), n.rootDir = e.rootDir, isString(t.collectCoverage) && (n.collectCoverage = t.collectCoverage),
|
|
232
|
+
Array.isArray(t.collectCoverageFrom) && (n.collectCoverageFrom = t.collectCoverageFrom),
|
|
233
|
+
isString(t.coverageDirectory) && (n.coverageDirectory = t.coverageDirectory), t.coverageThreshold && (n.coverageThreshold = t.coverageThreshold),
|
|
234
|
+
isString(t.globalSetup) && (n.globalSetup = t.globalSetup), isString(t.globalTeardown) && (n.globalTeardown = t.globalTeardown),
|
|
235
|
+
isString(t.preset) && (n.preset = t.preset), t.projects && (n.projects = t.projects),
|
|
236
|
+
Array.isArray(t.reporters) && (n.reporters = t.reporters), isString(t.testResultsProcessor) && (n.testResultsProcessor = t.testResultsProcessor),
|
|
237
|
+
t.transform && (n.transform = t.transform), t.verbose && (n.verbose = t.verbose),
|
|
238
|
+
n.testRunner = "jest-jasmine2", JSON.stringify(n);
|
|
169
239
|
}(e), "string" == typeof n.maxWorkers) try {
|
|
170
240
|
n.maxWorkers = parseInt(n.maxWorkers, 10);
|
|
171
241
|
} catch (e) {}
|
|
@@ -173,132 +243,41 @@ async function runJest(e, t) {
|
|
|
173
243
|
}(e), o = function o(e, t) {
|
|
174
244
|
const r = t.projects ? t.projects : [];
|
|
175
245
|
return r.push(e.rootDir), r;
|
|
176
|
-
}(e,
|
|
177
|
-
r = !!(await i(
|
|
246
|
+
}(e, n), {runCLI: i} = require("@jest/core");
|
|
247
|
+
r = !!(await i(n, o)).results.success;
|
|
178
248
|
} catch (t) {
|
|
179
249
|
e.logger.error(`runJest: ${t}`);
|
|
180
250
|
}
|
|
181
251
|
return r;
|
|
182
252
|
}
|
|
183
253
|
|
|
184
|
-
function
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
function createBuildMessage() {
|
|
193
|
-
const e = new Date;
|
|
194
|
-
let t = e.getFullYear() + "-";
|
|
195
|
-
return t += ("0" + (e.getMonth() + 1)).slice(-2) + "-", t += ("0" + e.getDate()).slice(-2) + " ",
|
|
196
|
-
t += ("0" + e.getHours()).slice(-2) + ":", t += ("0" + e.getMinutes()).slice(-2) + ":",
|
|
197
|
-
t += ("0" + e.getSeconds()).slice(-2), `Build: ${t}`;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
function transpile(e, t = {}) {
|
|
201
|
-
t = {
|
|
202
|
-
...t,
|
|
203
|
-
componentExport: null,
|
|
204
|
-
componentMetadata: "compilerstatic",
|
|
205
|
-
coreImportPath: isString(t.coreImportPath) ? t.coreImportPath : "@rindo/core/internal/testing",
|
|
206
|
-
currentDirectory: t.currentDirectory || process.cwd(),
|
|
207
|
-
module: "cjs",
|
|
208
|
-
proxy: null,
|
|
209
|
-
sourceMap: "inline",
|
|
210
|
-
style: null,
|
|
211
|
-
styleImportData: "queryparams",
|
|
212
|
-
target: "es2015"
|
|
254
|
+
function toHaveClasses(e, t) {
|
|
255
|
+
if (!e) throw new Error("expect toHaveClasses value is null");
|
|
256
|
+
if ("function" == typeof e.then) throw new Error("element must be a resolved value, not a promise, before it can be tested");
|
|
257
|
+
if (1 !== e.nodeType) throw new Error("expect toHaveClasses value is not an element");
|
|
258
|
+
const r = t.every((t => e.classList.contains(t)));
|
|
259
|
+
return {
|
|
260
|
+
message: () => `expected to ${r ? "not " : ""}have css classes "${t.join(" ")}", but className is "${e.className}"`,
|
|
261
|
+
pass: r
|
|
213
262
|
};
|
|
214
|
-
try {
|
|
215
|
-
const e = process.versions.node.split(".");
|
|
216
|
-
parseInt(e[0], 10) >= 10 && (t.target = "es2017");
|
|
217
|
-
} catch (e) {}
|
|
218
|
-
return rindo_js.transpileSync(e, t);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
function formatDiagnostic(e) {
|
|
222
|
-
let t = "";
|
|
223
|
-
return e.relFilePath && (t += e.relFilePath, "number" == typeof e.lineNumber && (t += ":" + e.lineNumber + 1,
|
|
224
|
-
"number" == typeof e.columnNumber && (t += ":" + e.columnNumber)), t += "\n"), t += e.messageText,
|
|
225
|
-
t;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
function getCompilerOptions(e) {
|
|
229
|
-
if (_tsCompilerOptions) return _tsCompilerOptions;
|
|
230
|
-
if ("string" != typeof e) return null;
|
|
231
|
-
e = normalizePath(e);
|
|
232
|
-
const t = rindo_js.ts.findConfigFile(e, rindo_js.ts.sys.fileExists);
|
|
233
|
-
if (!t) return null;
|
|
234
|
-
const r = rindo_js.ts.readConfigFile(t, rindo_js.ts.sys.readFile);
|
|
235
|
-
if (r.error) throw new Error(formatDiagnostic((e => {
|
|
236
|
-
const t = {
|
|
237
|
-
level: "warn",
|
|
238
|
-
type: "typescript",
|
|
239
|
-
language: "typescript",
|
|
240
|
-
header: "TypeScript",
|
|
241
|
-
code: e.code.toString(),
|
|
242
|
-
messageText: flattenDiagnosticMessageText(e, e.messageText),
|
|
243
|
-
relFilePath: null,
|
|
244
|
-
absFilePath: null,
|
|
245
|
-
lines: []
|
|
246
|
-
};
|
|
247
|
-
if (1 === e.category && (t.level = "error"), e.file) {
|
|
248
|
-
t.absFilePath = e.file.fileName;
|
|
249
|
-
const n = "string" != typeof (r = e.file.text) ? [] : (r = r.replace(/\\r/g, "\n")).split("\n"), s = e.file.getLineAndCharacterOfPosition(e.start), o = {
|
|
250
|
-
lineIndex: s.line,
|
|
251
|
-
lineNumber: s.line + 1,
|
|
252
|
-
text: n[s.line],
|
|
253
|
-
errorCharStart: s.character,
|
|
254
|
-
errorLength: Math.max(e.length, 1)
|
|
255
|
-
};
|
|
256
|
-
if (t.lineNumber = o.lineNumber, t.columnNumber = o.errorCharStart + 1, t.lines.push(o),
|
|
257
|
-
0 === o.errorLength && o.errorCharStart > 0 && (o.errorLength = 1, o.errorCharStart--),
|
|
258
|
-
o.lineIndex > 0) {
|
|
259
|
-
const e = {
|
|
260
|
-
lineIndex: o.lineIndex - 1,
|
|
261
|
-
lineNumber: o.lineNumber - 1,
|
|
262
|
-
text: n[o.lineIndex - 1],
|
|
263
|
-
errorCharStart: -1,
|
|
264
|
-
errorLength: -1
|
|
265
|
-
};
|
|
266
|
-
t.lines.unshift(e);
|
|
267
|
-
}
|
|
268
|
-
if (o.lineIndex + 1 < n.length) {
|
|
269
|
-
const e = {
|
|
270
|
-
lineIndex: o.lineIndex + 1,
|
|
271
|
-
lineNumber: o.lineNumber + 1,
|
|
272
|
-
text: n[o.lineIndex + 1],
|
|
273
|
-
errorCharStart: -1,
|
|
274
|
-
errorLength: -1
|
|
275
|
-
};
|
|
276
|
-
t.lines.push(e);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
var r;
|
|
280
|
-
return t;
|
|
281
|
-
})(r.error)));
|
|
282
|
-
const n = rindo_js.ts.parseJsonConfigFileContent(r.config, rindo_js.ts.sys, e, void 0, t);
|
|
283
|
-
return _tsCompilerOptions = n.options, _tsCompilerOptions;
|
|
284
263
|
}
|
|
285
264
|
|
|
286
265
|
function compareHtml(e, t, r) {
|
|
287
266
|
if (null == e) throw new Error(`expect toEqualHtml() value is "${e}"`);
|
|
288
267
|
if ("function" == typeof e.then) throw new Error("element must be a resolved value, not a promise, before it can be tested");
|
|
289
|
-
let
|
|
268
|
+
let s;
|
|
290
269
|
if (1 === e.nodeType) {
|
|
291
|
-
const t = function
|
|
270
|
+
const t = function n(e) {
|
|
292
271
|
return e && e.ownerDocument && e.ownerDocument.defaultView && e.ownerDocument.defaultView.__rindo_spec_options || {};
|
|
293
272
|
}(e);
|
|
294
|
-
|
|
273
|
+
s = index_cjs.serializeNodeToHtml(e, {
|
|
295
274
|
prettyHtml: !0,
|
|
296
275
|
outerHtml: !0,
|
|
297
276
|
removeHtmlComments: !1 === t.includeAnnotations,
|
|
298
277
|
excludeTags: [ "body" ],
|
|
299
278
|
serializeShadowRoot: r
|
|
300
279
|
});
|
|
301
|
-
} else if (11 === e.nodeType)
|
|
280
|
+
} else if (11 === e.nodeType) s = index_cjs.serializeNodeToHtml(e, {
|
|
302
281
|
prettyHtml: !0,
|
|
303
282
|
excludeTags: [ "style" ],
|
|
304
283
|
excludeTagContent: [ "style" ],
|
|
@@ -307,7 +286,7 @@ function compareHtml(e, t, r) {
|
|
|
307
286
|
if ("string" != typeof e) throw new Error("expect toEqualHtml() value should be an element, shadow root or string.");
|
|
308
287
|
{
|
|
309
288
|
const t = index_cjs.parseHtmlToFragment(e);
|
|
310
|
-
|
|
289
|
+
s = index_cjs.serializeNodeToHtml(t, {
|
|
311
290
|
prettyHtml: !0,
|
|
312
291
|
serializeShadowRoot: r
|
|
313
292
|
});
|
|
@@ -317,7 +296,7 @@ function compareHtml(e, t, r) {
|
|
|
317
296
|
prettyHtml: !0,
|
|
318
297
|
excludeTags: [ "body" ]
|
|
319
298
|
});
|
|
320
|
-
return
|
|
299
|
+
return s !== i ? (expect(s).toBe(i), {
|
|
321
300
|
message: () => "HTML does not match",
|
|
322
301
|
pass: !1
|
|
323
302
|
}) : {
|
|
@@ -326,17 +305,6 @@ function compareHtml(e, t, r) {
|
|
|
326
305
|
};
|
|
327
306
|
}
|
|
328
307
|
|
|
329
|
-
function toHaveClasses(e, t) {
|
|
330
|
-
if (!e) throw new Error("expect toHaveClasses value is null");
|
|
331
|
-
if ("function" == typeof e.then) throw new Error("element must be a resolved value, not a promise, before it can be tested");
|
|
332
|
-
if (1 !== e.nodeType) throw new Error("expect toHaveClasses value is not an element");
|
|
333
|
-
const r = t.every((t => e.classList.contains(t)));
|
|
334
|
-
return {
|
|
335
|
-
message: () => `expected to ${r ? "not " : ""}have css classes "${t.join(" ")}", but className is "${e.className}"`,
|
|
336
|
-
pass: r
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
|
|
340
308
|
async function globalMockFetch(e) {
|
|
341
309
|
let t;
|
|
342
310
|
if (null == e) throw new Error("missing url input for mock fetch()");
|
|
@@ -351,22 +319,22 @@ async function globalMockFetch(e) {
|
|
|
351
319
|
r = mockedResponses.get(e.href);
|
|
352
320
|
}
|
|
353
321
|
if (null == r) return new MockResponse404;
|
|
354
|
-
const
|
|
355
|
-
return "number" != typeof
|
|
356
|
-
|
|
357
|
-
|
|
322
|
+
const s = r.response.clone();
|
|
323
|
+
return "number" != typeof s.status && (s.status = 200), "string" != typeof s.statusText && (s.status >= 500 ? s.statusText = "Internal Server Error" : 404 === s.status ? s.statusText = "Not Found" : s.status >= 400 ? s.statusText = "Bad Request" : 302 === s.status ? s.statusText = "Found" : 301 === s.status ? s.statusText = "Moved Permanently" : s.status >= 300 ? s.statusText = "Redirection" : s.statusText = "OK"),
|
|
324
|
+
s.ok = s.status >= 200 && s.status <= 299, "string" != typeof s.type && (s.type = "basic"),
|
|
325
|
+
s;
|
|
358
326
|
}
|
|
359
327
|
|
|
360
328
|
function setMockedResponse(e, t, r) {
|
|
361
329
|
if (!e) throw new Error("MockResponse required");
|
|
362
330
|
"string" == typeof e.url && "" !== e.url || ("string" == typeof t ? e.url = t : t && "string" == typeof t.url ? e.url = t.url : e.url = FETCH_DEFAULT_PATH);
|
|
363
|
-
const
|
|
364
|
-
e.url =
|
|
365
|
-
const
|
|
331
|
+
const s = new URL(e.url, location.href);
|
|
332
|
+
e.url = s.href;
|
|
333
|
+
const n = {
|
|
366
334
|
response: e,
|
|
367
335
|
reject: r
|
|
368
336
|
};
|
|
369
|
-
mockedResponses.set(e.url,
|
|
337
|
+
mockedResponses.set(e.url, n);
|
|
370
338
|
}
|
|
371
339
|
|
|
372
340
|
function resetBuildConditionals(e) {
|
|
@@ -388,48 +356,48 @@ function assertPath(e) {
|
|
|
388
356
|
}
|
|
389
357
|
|
|
390
358
|
function normalizeStringPosix(e, t) {
|
|
391
|
-
var r,
|
|
392
|
-
for (
|
|
393
|
-
if (
|
|
359
|
+
var r, s, n, o = "", i = 0, a = -1, l = 0;
|
|
360
|
+
for (s = 0; s <= e.length; ++s) {
|
|
361
|
+
if (s < e.length) r = e.charCodeAt(s); else {
|
|
394
362
|
if (47 === r) break;
|
|
395
363
|
r = 47;
|
|
396
364
|
}
|
|
397
365
|
if (47 === r) {
|
|
398
|
-
if (a ===
|
|
366
|
+
if (a === s - 1 || 1 === l) ; else if (a !== s - 1 && 2 === l) {
|
|
399
367
|
if (o.length < 2 || 2 !== i || 46 !== o.charCodeAt(o.length - 1) || 46 !== o.charCodeAt(o.length - 2)) if (o.length > 2) {
|
|
400
|
-
if ((
|
|
401
|
-
-1 ===
|
|
402
|
-
a =
|
|
368
|
+
if ((n = o.lastIndexOf("/")) !== o.length - 1) {
|
|
369
|
+
-1 === n ? (o = "", i = 0) : i = (o = o.slice(0, n)).length - 1 - o.lastIndexOf("/"),
|
|
370
|
+
a = s, l = 0;
|
|
403
371
|
continue;
|
|
404
372
|
}
|
|
405
373
|
} else if (2 === o.length || 1 === o.length) {
|
|
406
|
-
o = "", i = 0, a =
|
|
374
|
+
o = "", i = 0, a = s, l = 0;
|
|
407
375
|
continue;
|
|
408
376
|
}
|
|
409
377
|
t && (o.length > 0 ? o += "/.." : o = "..", i = 2);
|
|
410
|
-
} else o.length > 0 ? o += "/" + e.slice(a + 1,
|
|
411
|
-
a =
|
|
378
|
+
} else o.length > 0 ? o += "/" + e.slice(a + 1, s) : o = e.slice(a + 1, s), i = s - a - 1;
|
|
379
|
+
a = s, l = 0;
|
|
412
380
|
} else 46 === r && -1 !== l ? ++l : l = -1;
|
|
413
381
|
}
|
|
414
382
|
return o;
|
|
415
383
|
}
|
|
416
384
|
|
|
417
385
|
function specifierIncluded$1(e, t) {
|
|
418
|
-
var r,
|
|
419
|
-
for (r = 0; r < 3; ++r) if ((
|
|
386
|
+
var r, s, n, o = e.split("."), i = t.split(" "), a = i.length > 1 ? i[0] : "=", l = (i.length > 1 ? i[1] : i[0]).split(".");
|
|
387
|
+
for (r = 0; r < 3; ++r) if ((s = parseInt(o[r] || 0, 10)) !== (n = parseInt(l[r] || 0, 10))) return "<" === a ? s < n : ">=" === a && s >= n;
|
|
420
388
|
return ">=" === a;
|
|
421
389
|
}
|
|
422
390
|
|
|
423
391
|
function matchesRange$1(e, t) {
|
|
424
|
-
var r,
|
|
425
|
-
if (0 ===
|
|
426
|
-
for (r = 0; r <
|
|
392
|
+
var r, s = t.split(/ ?&& ?/);
|
|
393
|
+
if (0 === s.length) return !1;
|
|
394
|
+
for (r = 0; r < s.length; ++r) if (!specifierIncluded$1(e, s[r])) return !1;
|
|
427
395
|
return !0;
|
|
428
396
|
}
|
|
429
397
|
|
|
430
398
|
function specifierIncluded(e) {
|
|
431
|
-
var t, r,
|
|
432
|
-
for (t = 0; t < 3; ++t) if ((r = parseInt(current[t] || 0, 10)) !== (
|
|
399
|
+
var t, r, s, n = e.split(" "), o = n.length > 1 ? n[0] : "=", i = (n.length > 1 ? n[1] : n[0]).split(".");
|
|
400
|
+
for (t = 0; t < 3; ++t) if ((r = parseInt(current[t] || 0, 10)) !== (s = parseInt(i[t] || 0, 10))) return "<" === o ? r < s : ">=" === o && r >= s;
|
|
433
401
|
return ">=" === o;
|
|
434
402
|
}
|
|
435
403
|
|
|
@@ -524,29 +492,29 @@ function mockCompilerCtx(e) {
|
|
|
524
492
|
return Object.defineProperty(t, "fs", {
|
|
525
493
|
get() {
|
|
526
494
|
return null == this._fs && (this._fs = (e => {
|
|
527
|
-
const t = new Map, r = new Map,
|
|
495
|
+
const t = new Map, r = new Map, s = async (e, r = {}) => {
|
|
528
496
|
e = normalizePath(e);
|
|
529
|
-
const
|
|
497
|
+
const s = [];
|
|
530
498
|
if (!0 === r.inMemoryOnly) {
|
|
531
|
-
let
|
|
532
|
-
|
|
499
|
+
let n = e;
|
|
500
|
+
n.endsWith("/") || (n += "/");
|
|
533
501
|
const i = e.split("/");
|
|
534
|
-
t.forEach(((t,
|
|
535
|
-
if (!
|
|
536
|
-
const a =
|
|
502
|
+
t.forEach(((t, n) => {
|
|
503
|
+
if (!n.startsWith(e)) return;
|
|
504
|
+
const a = n.split("/");
|
|
537
505
|
if ((a.length === i.length + 1 || r.recursive && a.length > i.length) && t.exists) {
|
|
538
506
|
const e = {
|
|
539
|
-
absPath:
|
|
507
|
+
absPath: n,
|
|
540
508
|
relPath: a[i.length],
|
|
541
509
|
isDirectory: t.isDirectory,
|
|
542
510
|
isFile: t.isFile
|
|
543
511
|
};
|
|
544
|
-
o(r, e) ||
|
|
512
|
+
o(r, e) || s.push(e);
|
|
545
513
|
}
|
|
546
514
|
}));
|
|
547
|
-
} else await
|
|
548
|
-
return
|
|
549
|
-
},
|
|
515
|
+
} else await n(e, e, r, s);
|
|
516
|
+
return s.sort(((e, t) => e.absPath < t.absPath ? -1 : e.absPath > t.absPath ? 1 : 0));
|
|
517
|
+
}, n = async (t, r, s, i) => {
|
|
550
518
|
const a = await e.readDir(r);
|
|
551
519
|
if (a.length > 0) {
|
|
552
520
|
const e = v(r);
|
|
@@ -557,7 +525,7 @@ function mockCompilerCtx(e) {
|
|
|
557
525
|
isDirectory: c.isDirectory,
|
|
558
526
|
isFile: c.isFile
|
|
559
527
|
};
|
|
560
|
-
o(
|
|
528
|
+
o(s, u) || (i.push(u), !0 === s.recursive && !0 === c.isDirectory && await n(t, r, s, i));
|
|
561
529
|
})));
|
|
562
530
|
}
|
|
563
531
|
}, o = (e, t) => {
|
|
@@ -575,7 +543,7 @@ function mockCompilerCtx(e) {
|
|
|
575
543
|
const t = v(e);
|
|
576
544
|
t.isFile = !1, t.isDirectory = !0, t.queueWriteToDisk || (t.queueDeleteFromDisk = !0);
|
|
577
545
|
try {
|
|
578
|
-
const t = await
|
|
546
|
+
const t = await s(e, {
|
|
579
547
|
recursive: !0
|
|
580
548
|
});
|
|
581
549
|
await Promise.all(t.map((e => e.relPath.endsWith(".gitkeep") ? null : a(e.absPath))));
|
|
@@ -586,9 +554,9 @@ function mockCompilerCtx(e) {
|
|
|
586
554
|
}, l = async t => {
|
|
587
555
|
const r = v(t);
|
|
588
556
|
if ("boolean" != typeof r.isDirectory || "boolean" != typeof r.isFile) {
|
|
589
|
-
const
|
|
590
|
-
|
|
591
|
-
r.size =
|
|
557
|
+
const s = await e.stat(t);
|
|
558
|
+
s.error ? r.exists = !1 : (r.exists = !0, s.isFile ? (r.isFile = !0, r.isDirectory = !1,
|
|
559
|
+
r.size = s.size) : s.isDirectory ? (r.isFile = !1, r.isDirectory = !0, r.size = s.size) : (r.isFile = !1,
|
|
592
560
|
r.isDirectory = !1, r.size = null));
|
|
593
561
|
}
|
|
594
562
|
return {
|
|
@@ -600,9 +568,9 @@ function mockCompilerCtx(e) {
|
|
|
600
568
|
}, c = t => {
|
|
601
569
|
const r = v(t);
|
|
602
570
|
if ("boolean" != typeof r.isDirectory || "boolean" != typeof r.isFile) {
|
|
603
|
-
const
|
|
604
|
-
|
|
605
|
-
r.size =
|
|
571
|
+
const s = e.statSync(t);
|
|
572
|
+
s.error ? r.exists = !1 : (r.exists = !0, s.isFile ? (r.isFile = !0, r.isDirectory = !1,
|
|
573
|
+
r.size = s.size) : s.isDirectory ? (r.isFile = !1, r.isDirectory = !0, r.size = s.size) : (r.isFile = !1,
|
|
606
574
|
r.isDirectory = !1, r.size = null));
|
|
607
575
|
}
|
|
608
576
|
return {
|
|
@@ -611,9 +579,9 @@ function mockCompilerCtx(e) {
|
|
|
611
579
|
isDirectory: !!r.isDirectory,
|
|
612
580
|
size: r.size
|
|
613
581
|
};
|
|
614
|
-
}, u = async (t,
|
|
582
|
+
}, u = async (t, s, n) => {
|
|
615
583
|
if ("string" != typeof t) throw new Error(`writeFile, invalid filePath: ${t}`);
|
|
616
|
-
if ("string" != typeof
|
|
584
|
+
if ("string" != typeof s) throw new Error(`writeFile, invalid content: ${t}`);
|
|
617
585
|
const o = {
|
|
618
586
|
ignored: !1,
|
|
619
587
|
changedContent: !1,
|
|
@@ -622,11 +590,11 @@ function mockCompilerCtx(e) {
|
|
|
622
590
|
if (!0 === shouldIgnore(t)) return o.ignored = !0, o;
|
|
623
591
|
const i = v(t);
|
|
624
592
|
if (i.exists = !0, i.isFile = !0, i.isDirectory = !1, i.queueDeleteFromDisk = !1,
|
|
625
|
-
"string" == typeof i.fileText ? o.changedContent = i.fileText.replace(/\r/g, "") !==
|
|
626
|
-
i.fileText =
|
|
627
|
-
!1 ===
|
|
628
|
-
await d(t, !0); else if (null !=
|
|
629
|
-
if (o.changedContent || !0 !==
|
|
593
|
+
"string" == typeof i.fileText ? o.changedContent = i.fileText.replace(/\r/g, "") !== s.replace(/\r/g, "") : o.changedContent = !0,
|
|
594
|
+
i.fileText = s, o.queuedWrite = !1, null != n && ("string" == typeof n.outputTargetType && r.set(t, n.outputTargetType),
|
|
595
|
+
!1 === n.useCache && (i.useCache = !1)), null != n && !0 === n.inMemoryOnly) i.queueWriteToDisk ? o.queuedWrite = !0 : i.queueWriteToDisk = !1,
|
|
596
|
+
await d(t, !0); else if (null != n && !0 === n.immediateWrite) {
|
|
597
|
+
if (o.changedContent || !0 !== n.useCache) {
|
|
630
598
|
const r = await e.readFile(t);
|
|
631
599
|
"string" == typeof r && (o.changedContent = i.fileText.replace(/\r/g, "") !== r.replace(/\r/g, "")),
|
|
632
600
|
o.changedContent && (await d(t, !1), await e.writeFile(t, i.fileText));
|
|
@@ -639,18 +607,21 @@ function mockCompilerCtx(e) {
|
|
|
639
607
|
for (;"string" == typeof (e = path$2.dirname(e)) && e.length > 0 && "/" !== e && !1 === e.endsWith(":/") && !1 === e.endsWith(":\\"); ) r.push(e);
|
|
640
608
|
r.reverse(), await h(r, t);
|
|
641
609
|
}, h = async (t, r) => {
|
|
642
|
-
const
|
|
643
|
-
for (const
|
|
644
|
-
const t = v(
|
|
610
|
+
const s = [];
|
|
611
|
+
for (const n of t) {
|
|
612
|
+
const t = v(n);
|
|
645
613
|
if (!0 !== t.exists || !0 !== t.isDirectory) try {
|
|
646
|
-
t.exists = !0, t.isDirectory = !0, t.isFile = !1, r || await e.createDir(
|
|
614
|
+
t.exists = !0, t.isDirectory = !0, t.isFile = !1, r || await e.createDir(n), s.push(n);
|
|
647
615
|
} catch (e) {}
|
|
648
616
|
}
|
|
649
|
-
return
|
|
650
|
-
}, p = t =>
|
|
651
|
-
const
|
|
652
|
-
|
|
653
|
-
|
|
617
|
+
return s;
|
|
618
|
+
}, p = t => {
|
|
619
|
+
const r = Promise.all(t.map((async t => {
|
|
620
|
+
const [r, s] = t;
|
|
621
|
+
return await e.copyFile(r, s), [ r, s ];
|
|
622
|
+
})));
|
|
623
|
+
return r;
|
|
624
|
+
}, f = e => Promise.all(e.map((async e => {
|
|
654
625
|
if ("string" != typeof e) throw new Error("unable to writeFile without filePath");
|
|
655
626
|
return m(e);
|
|
656
627
|
}))), m = async t => {
|
|
@@ -662,12 +633,12 @@ function mockCompilerCtx(e) {
|
|
|
662
633
|
return await e.removeFile(t), t;
|
|
663
634
|
}))), y = async t => {
|
|
664
635
|
const r = [];
|
|
665
|
-
for (const
|
|
636
|
+
for (const s of t) await e.removeDir(s), r.push(s);
|
|
666
637
|
return r;
|
|
667
638
|
}, w = e => {
|
|
668
639
|
e = normalizePath(e), t.forEach(((t, r) => {
|
|
669
|
-
const
|
|
670
|
-
|
|
640
|
+
const s = path$2.relative(e, r).split("/")[0];
|
|
641
|
+
s.startsWith(".") || s.startsWith("/") || _(r);
|
|
671
642
|
}));
|
|
672
643
|
}, _ = e => {
|
|
673
644
|
e = normalizePath(e);
|
|
@@ -716,10 +687,10 @@ function mockCompilerCtx(e) {
|
|
|
716
687
|
clearDirCache: w,
|
|
717
688
|
clearFileCache: _,
|
|
718
689
|
commit: async () => {
|
|
719
|
-
const e = getCommitInstructions(t), r = await h(e.dirsToEnsure, !1),
|
|
690
|
+
const e = getCommitInstructions(t), r = await h(e.dirsToEnsure, !1), s = await f(e.filesToWrite), n = await p(e.filesToCopy), o = await g(e.filesToDelete), i = await y(e.dirsToDelete);
|
|
720
691
|
return e.filesToDelete.forEach(_), e.dirsToDelete.forEach(w), {
|
|
721
|
-
filesCopied:
|
|
722
|
-
filesWritten:
|
|
692
|
+
filesCopied: n,
|
|
693
|
+
filesWritten: s,
|
|
723
694
|
filesDeleted: o,
|
|
724
695
|
dirsDeleted: i,
|
|
725
696
|
dirsAdded: r
|
|
@@ -731,13 +702,13 @@ function mockCompilerCtx(e) {
|
|
|
731
702
|
emptyDirs: async e => {
|
|
732
703
|
e = e.filter(isString).map(normalizePath).reduce(((e, t) => (e.includes(t) || e.push(t),
|
|
733
704
|
e)), []);
|
|
734
|
-
const t = await Promise.all(e.map((e =>
|
|
705
|
+
const t = await Promise.all(e.map((e => s(e, {
|
|
735
706
|
recursive: !0
|
|
736
707
|
})))), r = [];
|
|
737
708
|
for (const e of t) for (const t of e) r.includes(t.absPath) || r.push(t.absPath);
|
|
738
709
|
r.sort(((e, t) => {
|
|
739
|
-
const r = e.split("/").length,
|
|
740
|
-
return r <
|
|
710
|
+
const r = e.split("/").length, s = t.split("/").length;
|
|
711
|
+
return r < s ? 1 : r > s ? -1 : 0;
|
|
741
712
|
})), await Promise.all(r.map(a)), e.forEach((e => {
|
|
742
713
|
const t = v(e);
|
|
743
714
|
t.isFile = !1, t.isDirectory = !0, t.queueWriteToDisk = !0, t.queueDeleteFromDisk = !1;
|
|
@@ -746,8 +717,8 @@ function mockCompilerCtx(e) {
|
|
|
746
717
|
getBuildOutputs: () => {
|
|
747
718
|
const e = [];
|
|
748
719
|
return r.forEach(((t, r) => {
|
|
749
|
-
const
|
|
750
|
-
|
|
720
|
+
const s = e.find((e => e.type === t));
|
|
721
|
+
s ? s.files.push(r) : e.push({
|
|
751
722
|
type: t,
|
|
752
723
|
files: [ r ]
|
|
753
724
|
});
|
|
@@ -760,20 +731,20 @@ function mockCompilerCtx(e) {
|
|
|
760
731
|
const e = v(t);
|
|
761
732
|
if (e.exists && "string" == typeof e.fileText) return e.fileText;
|
|
762
733
|
}
|
|
763
|
-
const
|
|
764
|
-
return "string" == typeof
|
|
765
|
-
|
|
734
|
+
const s = await e.readFile(t), n = v(t);
|
|
735
|
+
return "string" == typeof s ? s.length < b && (n.exists = !0, n.isFile = !0, n.isDirectory = !1,
|
|
736
|
+
n.fileText = s) : n.exists = !1, s;
|
|
766
737
|
},
|
|
767
738
|
readFileSync: (t, r) => {
|
|
768
739
|
if (null == r || !0 === r.useCache || void 0 === r.useCache) {
|
|
769
740
|
const e = v(t);
|
|
770
741
|
if (e.exists && "string" == typeof e.fileText) return e.fileText;
|
|
771
742
|
}
|
|
772
|
-
const
|
|
773
|
-
return "string" == typeof
|
|
774
|
-
|
|
743
|
+
const s = e.readFileSync(t), n = v(t);
|
|
744
|
+
return "string" == typeof s ? s.length < b && (n.exists = !0, n.isFile = !0, n.isDirectory = !1,
|
|
745
|
+
n.fileText = s) : n.exists = !1, s;
|
|
775
746
|
},
|
|
776
|
-
readdir:
|
|
747
|
+
readdir: s,
|
|
777
748
|
remove: async e => {
|
|
778
749
|
const t = await l(e);
|
|
779
750
|
!0 === t.isDirectory ? await i(e) : !0 === t.isFile && await a(e);
|
|
@@ -784,10 +755,10 @@ function mockCompilerCtx(e) {
|
|
|
784
755
|
writeFile: u,
|
|
785
756
|
writeFiles: (e, t) => {
|
|
786
757
|
const r = [];
|
|
787
|
-
return isIterable(e) ? e.forEach(((e,
|
|
788
|
-
r.push(u(
|
|
789
|
-
})) : Object.keys(e).map((
|
|
790
|
-
r.push(u(
|
|
758
|
+
return isIterable(e) ? e.forEach(((e, s) => {
|
|
759
|
+
r.push(u(s, e, t));
|
|
760
|
+
})) : Object.keys(e).map((s => {
|
|
761
|
+
r.push(u(s, e[s], t));
|
|
791
762
|
})), Promise.all(r);
|
|
792
763
|
}
|
|
793
764
|
};
|
|
@@ -808,73 +779,58 @@ function mockLogger() {
|
|
|
808
779
|
return new TestingLogger;
|
|
809
780
|
}
|
|
810
781
|
|
|
811
|
-
function findRootComponent(e, t) {
|
|
812
|
-
if (null != t) {
|
|
813
|
-
const r = t.children, n = r.length;
|
|
814
|
-
for (let t = 0; t < n; t++) {
|
|
815
|
-
const n = r[t];
|
|
816
|
-
if (e.has(n.nodeName.toLowerCase())) return n;
|
|
817
|
-
}
|
|
818
|
-
for (let t = 0; t < n; t++) {
|
|
819
|
-
const n = findRootComponent(e, r[t]);
|
|
820
|
-
if (null != n) return n;
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
return null;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
782
|
async function initPageEvents(e) {
|
|
827
783
|
e._e2eEvents = new Map, e._e2eEventIds = 0, e.spyOnEvent = pageSpyOnEvent.bind(e, e),
|
|
828
784
|
await e.exposeFunction("rindoOnEvent", ((t, r) => {
|
|
829
|
-
!function
|
|
830
|
-
const
|
|
831
|
-
|
|
785
|
+
!function s(e, t, r) {
|
|
786
|
+
const s = e.get(t);
|
|
787
|
+
s && s.callback(r);
|
|
832
788
|
}(e._e2eEvents, t, r);
|
|
833
789
|
})), await e.evaluateOnNewDocument(browserContextEvents);
|
|
834
790
|
}
|
|
835
791
|
|
|
836
792
|
async function pageSpyOnEvent(e, t, r) {
|
|
837
|
-
const
|
|
793
|
+
const s = new EventSpy(t), n = "document" !== r ? () => window : () => document, o = await e.evaluateHandle(n);
|
|
838
794
|
return await addE2EListener(e, o, t, (e => {
|
|
839
|
-
|
|
840
|
-
})),
|
|
795
|
+
s.push(e);
|
|
796
|
+
})), s;
|
|
841
797
|
}
|
|
842
798
|
|
|
843
799
|
async function waitForEvent(e, t, r) {
|
|
844
|
-
const
|
|
800
|
+
const s = .5 * jasmine.DEFAULT_TIMEOUT_INTERVAL, n = await e.evaluate(((e, t, r) => new Promise(((s, n) => {
|
|
845
801
|
const o = setTimeout((() => {
|
|
846
|
-
|
|
802
|
+
n(new Error(`waitForEvent() timeout, eventName: ${t}`));
|
|
847
803
|
}), r);
|
|
848
804
|
e.addEventListener(t, (e => {
|
|
849
|
-
clearTimeout(o),
|
|
805
|
+
clearTimeout(o), s(window.rindoSerializeEvent(e));
|
|
850
806
|
}), {
|
|
851
807
|
once: !0
|
|
852
808
|
});
|
|
853
|
-
}))), r, t,
|
|
854
|
-
return await e.waitForChanges(),
|
|
809
|
+
}))), r, t, s);
|
|
810
|
+
return await e.waitForChanges(), n;
|
|
855
811
|
}
|
|
856
812
|
|
|
857
|
-
async function addE2EListener(e, t, r,
|
|
858
|
-
const
|
|
859
|
-
e._e2eEvents.set(
|
|
813
|
+
async function addE2EListener(e, t, r, s) {
|
|
814
|
+
const n = e._e2eEventIds++;
|
|
815
|
+
e._e2eEvents.set(n, {
|
|
860
816
|
eventName: r,
|
|
861
|
-
callback:
|
|
817
|
+
callback: s
|
|
862
818
|
});
|
|
863
819
|
const o = t.executionContext();
|
|
864
820
|
await o.evaluate(((e, t, r) => {
|
|
865
821
|
e.addEventListener(r, (e => {
|
|
866
822
|
window.rindoOnEvent(t, window.rindoSerializeEvent(e));
|
|
867
823
|
}));
|
|
868
|
-
}), t,
|
|
824
|
+
}), t, n, r);
|
|
869
825
|
}
|
|
870
826
|
|
|
871
827
|
function browserContextEvents() {
|
|
872
828
|
const e = () => {
|
|
873
829
|
const e = [], t = (e, r) => {
|
|
874
|
-
if (null != r && 1 === r.nodeType) for (let
|
|
875
|
-
const
|
|
876
|
-
|
|
877
|
-
t(e,
|
|
830
|
+
if (null != r && 1 === r.nodeType) for (let s = 0; s < r.children.length; s++) {
|
|
831
|
+
const n = r.children[s];
|
|
832
|
+
n.tagName.includes("-") && "function" == typeof n.componentOnReady && e.push(n.componentOnReady()),
|
|
833
|
+
t(e, n);
|
|
878
834
|
}
|
|
879
835
|
};
|
|
880
836
|
return t(e, window.document.documentElement), Promise.all(e).catch((e => console.error(e)));
|
|
@@ -917,62 +873,62 @@ function browserContextEvents() {
|
|
|
917
873
|
}
|
|
918
874
|
|
|
919
875
|
async function find(e, t, r) {
|
|
920
|
-
const {lightSelector:
|
|
876
|
+
const {lightSelector: s, shadowSelector: n, text: o, contains: i} = getSelector(r);
|
|
921
877
|
let a;
|
|
922
|
-
if (a = "string" == typeof
|
|
923
|
-
let
|
|
924
|
-
if (!
|
|
925
|
-
if (
|
|
878
|
+
if (a = "string" == typeof s ? await async function l(e, t, r, s) {
|
|
879
|
+
let n = await t.$(r);
|
|
880
|
+
if (!n) return null;
|
|
881
|
+
if (s) {
|
|
926
882
|
const t = await e.evaluateHandle(((e, t) => {
|
|
927
883
|
if (!e.shadowRoot) throw new Error(`shadow root does not exist for element: ${e.tagName.toLowerCase()}`);
|
|
928
884
|
return e.shadowRoot.querySelector(t);
|
|
929
|
-
}),
|
|
930
|
-
if (await
|
|
931
|
-
|
|
885
|
+
}), n, s);
|
|
886
|
+
if (await n.dispose(), !t) return null;
|
|
887
|
+
n = t.asElement();
|
|
932
888
|
}
|
|
933
|
-
return
|
|
934
|
-
}(e, t,
|
|
935
|
-
const
|
|
936
|
-
let
|
|
937
|
-
return function e(
|
|
938
|
-
if (
|
|
939
|
-
if ("string" == typeof t &&
|
|
940
|
-
if ("string" == typeof r &&
|
|
889
|
+
return n;
|
|
890
|
+
}(e, t, s, n) : await async function c(e, t, r, s) {
|
|
891
|
+
const n = await e.evaluateHandle(((e, t, r) => {
|
|
892
|
+
let s = null;
|
|
893
|
+
return function e(n) {
|
|
894
|
+
if (n && !s) if (3 === n.nodeType) {
|
|
895
|
+
if ("string" == typeof t && n.textContent.trim() === t) return void (s = n.parentElement);
|
|
896
|
+
if ("string" == typeof r && n.textContent.includes(r)) return void (s = n.parentElement);
|
|
941
897
|
} else {
|
|
942
|
-
if ("SCRIPT" ===
|
|
943
|
-
if (e(
|
|
898
|
+
if ("SCRIPT" === n.nodeName || "STYLE" === n.nodeName) return;
|
|
899
|
+
if (e(n.shadowRoot), n.childNodes) for (let t = 0; t < n.childNodes.length; t++) e(n.childNodes[t]);
|
|
944
900
|
}
|
|
945
|
-
}(e),
|
|
946
|
-
}), t, r,
|
|
947
|
-
return
|
|
901
|
+
}(e), s;
|
|
902
|
+
}), t, r, s);
|
|
903
|
+
return n ? n.asElement() : null;
|
|
948
904
|
}(e, t, o, i), !a) return null;
|
|
949
905
|
const u = new E2EElement(e, a);
|
|
950
906
|
return await u.e2eSync(), u;
|
|
951
907
|
}
|
|
952
908
|
|
|
953
909
|
async function findAll(e, t, r) {
|
|
954
|
-
const
|
|
955
|
-
if (0 === i.length) return
|
|
910
|
+
const s = [], {lightSelector: n, shadowSelector: o} = getSelector(r), i = await t.$$(n);
|
|
911
|
+
if (0 === i.length) return s;
|
|
956
912
|
if (o) for (let t = 0; t < i.length; t++) {
|
|
957
|
-
const r = i[t].executionContext(),
|
|
913
|
+
const r = i[t].executionContext(), n = await r.evaluateHandle(((e, t) => {
|
|
958
914
|
if (!e.shadowRoot) throw new Error(`shadow root does not exist for element: ${e.tagName.toLowerCase()}`);
|
|
959
915
|
return e.shadowRoot.querySelectorAll(t);
|
|
960
916
|
}), i[t], o);
|
|
961
917
|
await i[t].dispose();
|
|
962
|
-
const a = await
|
|
963
|
-
await
|
|
918
|
+
const a = await n.getProperties();
|
|
919
|
+
await n.dispose();
|
|
964
920
|
for (const t of a.values()) {
|
|
965
921
|
const r = t.asElement();
|
|
966
922
|
if (r) {
|
|
967
923
|
const t = new E2EElement(e, r);
|
|
968
|
-
await t.e2eSync(),
|
|
924
|
+
await t.e2eSync(), s.push(t);
|
|
969
925
|
}
|
|
970
926
|
}
|
|
971
927
|
} else for (let t = 0; t < i.length; t++) {
|
|
972
928
|
const r = new E2EElement(e, i[t]);
|
|
973
|
-
await r.e2eSync(),
|
|
929
|
+
await r.e2eSync(), s.push(r);
|
|
974
930
|
}
|
|
975
|
-
return
|
|
931
|
+
return s;
|
|
976
932
|
}
|
|
977
933
|
|
|
978
934
|
function getSelector(e) {
|
|
@@ -993,29 +949,30 @@ function getSelector(e) {
|
|
|
993
949
|
}
|
|
994
950
|
|
|
995
951
|
async function writeScreenshotData(e, t) {
|
|
996
|
-
const r = function
|
|
952
|
+
const r = function s(e, t) {
|
|
997
953
|
const r = `${t}.json`;
|
|
998
954
|
return path__default.default.join(e, r);
|
|
999
|
-
}(e, t.id),
|
|
1000
|
-
await writeFile(r,
|
|
955
|
+
}(e, t.id), n = JSON.stringify(t, null, 2);
|
|
956
|
+
await writeFile(r, n);
|
|
1001
957
|
}
|
|
1002
958
|
|
|
1003
959
|
function writeFile(e, t) {
|
|
1004
|
-
return new Promise(((r,
|
|
960
|
+
return new Promise(((r, s) => {
|
|
1005
961
|
fs__default.default.writeFile(e, t, (e => {
|
|
1006
|
-
e ?
|
|
962
|
+
e ? s(e) : r();
|
|
1007
963
|
}));
|
|
1008
964
|
}));
|
|
1009
965
|
}
|
|
1010
966
|
|
|
1011
|
-
async function compareScreenshot(e, t, r,
|
|
967
|
+
async function compareScreenshot(e, t, r, s, n, o, i, a) {
|
|
1012
968
|
const l = `${crypto$3.createHash("md5").update(r).digest("hex")}.png`, c = path$2.join(t.imagesDir, l);
|
|
1013
969
|
await async function u(e, t) {
|
|
1014
|
-
await function
|
|
970
|
+
const r = await function s(e) {
|
|
1015
971
|
return new Promise((t => {
|
|
1016
972
|
fs__default.default.access(e, (e => t(!e)));
|
|
1017
973
|
}));
|
|
1018
|
-
}(e)
|
|
974
|
+
}(e);
|
|
975
|
+
r || await writeFile(e, t);
|
|
1019
976
|
}(c, r), r = null, i && (i = normalizePath(path$2.relative(t.rootDir, i)));
|
|
1020
977
|
const d = function h(e, t) {
|
|
1021
978
|
if ("string" != typeof t || 0 === t.trim().length) throw new Error("invalid test description");
|
|
@@ -1023,14 +980,14 @@ async function compareScreenshot(e, t, r, n, s, o, i, a) {
|
|
|
1023
980
|
return r.update(t + ":"), r.update(e.userAgent + ":"), r.update(e.viewport.width + ":"),
|
|
1024
981
|
r.update(e.viewport.height + ":"), r.update(e.viewport.deviceScaleFactor + ":"),
|
|
1025
982
|
r.update(e.viewport.hasTouch + ":"), r.update(e.viewport.isMobile + ":"), r.digest("hex").slice(0, 8).toLowerCase();
|
|
1026
|
-
}(e,
|
|
983
|
+
}(e, s), p = {
|
|
1027
984
|
id: d,
|
|
1028
985
|
image: l,
|
|
1029
986
|
device: e.device,
|
|
1030
987
|
userAgent: e.userAgent,
|
|
1031
|
-
desc:
|
|
988
|
+
desc: s,
|
|
1032
989
|
testPath: i,
|
|
1033
|
-
width:
|
|
990
|
+
width: n,
|
|
1034
991
|
height: o,
|
|
1035
992
|
deviceScaleFactor: e.viewport.deviceScaleFactor,
|
|
1036
993
|
hasTouch: e.viewport.hasTouch,
|
|
@@ -1038,13 +995,13 @@ async function compareScreenshot(e, t, r, n, s, o, i, a) {
|
|
|
1038
995
|
isMobile: e.viewport.isMobile,
|
|
1039
996
|
diff: {
|
|
1040
997
|
id: d,
|
|
1041
|
-
desc:
|
|
998
|
+
desc: s,
|
|
1042
999
|
imageA: l,
|
|
1043
1000
|
imageB: l,
|
|
1044
1001
|
mismatchedPixels: 0,
|
|
1045
1002
|
device: e.device,
|
|
1046
1003
|
userAgent: e.userAgent,
|
|
1047
|
-
width:
|
|
1004
|
+
width: n,
|
|
1048
1005
|
height: o,
|
|
1049
1006
|
deviceScaleFactor: e.viewport.deviceScaleFactor,
|
|
1050
1007
|
hasTouch: e.viewport.hasTouch,
|
|
@@ -1060,40 +1017,40 @@ async function compareScreenshot(e, t, r, n, s, o, i, a) {
|
|
|
1060
1017
|
if (!f) return await writeScreenshotData(t.currentBuildDir, p), p.diff;
|
|
1061
1018
|
if (p.diff.imageA = f, p.diff.imageA !== p.diff.imageB) {
|
|
1062
1019
|
p.diff.cacheKey = function m(e, t, r) {
|
|
1063
|
-
const
|
|
1064
|
-
return
|
|
1020
|
+
const s = crypto$3.createHash("md5");
|
|
1021
|
+
return s.update(`${e}:${t}:${r}`), s.digest("hex").slice(0, 10);
|
|
1065
1022
|
}(p.diff.imageA, p.diff.imageB, a);
|
|
1066
1023
|
const r = t.cache[p.diff.cacheKey];
|
|
1067
1024
|
if ("number" != typeof r || isNaN(r)) {
|
|
1068
|
-
const r = Math.round(e.viewport.width * e.viewport.deviceScaleFactor),
|
|
1025
|
+
const r = Math.round(e.viewport.width * e.viewport.deviceScaleFactor), s = Math.round(e.viewport.height * e.viewport.deviceScaleFactor), n = {
|
|
1069
1026
|
imageAPath: path$2.join(t.imagesDir, p.diff.imageA),
|
|
1070
1027
|
imageBPath: path$2.join(t.imagesDir, p.diff.imageB),
|
|
1071
1028
|
width: r,
|
|
1072
|
-
height:
|
|
1029
|
+
height: s,
|
|
1073
1030
|
pixelmatchThreshold: a
|
|
1074
1031
|
};
|
|
1075
1032
|
p.diff.mismatchedPixels = await async function g(e, t) {
|
|
1076
|
-
return new Promise(((r,
|
|
1077
|
-
const
|
|
1078
|
-
|
|
1079
|
-
}),
|
|
1033
|
+
return new Promise(((r, s) => {
|
|
1034
|
+
const n = .5 * jasmine.DEFAULT_TIMEOUT_INTERVAL, o = setTimeout((() => {
|
|
1035
|
+
s(`getMismatchedPixels timeout: ${n}ms`);
|
|
1036
|
+
}), n);
|
|
1080
1037
|
try {
|
|
1081
|
-
const
|
|
1038
|
+
const n = {
|
|
1082
1039
|
execArgv: process.execArgv.filter((e => !/^--(debug|inspect)/.test(e))),
|
|
1083
1040
|
env: process.env,
|
|
1084
1041
|
cwd: process.cwd(),
|
|
1085
1042
|
stdio: [ "pipe", "pipe", "pipe", "ipc" ]
|
|
1086
|
-
}, i = child_process$2.fork(e, [],
|
|
1043
|
+
}, i = child_process$2.fork(e, [], n);
|
|
1087
1044
|
i.on("message", (e => {
|
|
1088
1045
|
i.kill(), clearTimeout(o), r(e);
|
|
1089
1046
|
})), i.on("error", (e => {
|
|
1090
|
-
clearTimeout(o),
|
|
1047
|
+
clearTimeout(o), s(e);
|
|
1091
1048
|
})), i.send(t);
|
|
1092
1049
|
} catch (e) {
|
|
1093
|
-
clearTimeout(o),
|
|
1050
|
+
clearTimeout(o), s(`getMismatchedPixels error: ${e}`);
|
|
1094
1051
|
}
|
|
1095
1052
|
}));
|
|
1096
|
-
}(t.pixelmatchModulePath,
|
|
1053
|
+
}(t.pixelmatchModulePath, n);
|
|
1097
1054
|
} else p.diff.mismatchedPixels = r;
|
|
1098
1055
|
}
|
|
1099
1056
|
return await writeScreenshotData(t.currentBuildDir, p), p.diff;
|
|
@@ -1103,11 +1060,11 @@ async function e2eGoTo(e, t, r = {}) {
|
|
|
1103
1060
|
if (e.isClosed()) throw new Error("e2eGoTo unavailable: page already closed");
|
|
1104
1061
|
if ("string" != typeof t) throw new Error("invalid gotoTest() url");
|
|
1105
1062
|
if (!t.startsWith("/")) throw new Error("gotoTest() url must start with /");
|
|
1106
|
-
const
|
|
1107
|
-
if ("string" != typeof
|
|
1108
|
-
const
|
|
1063
|
+
const s = env.__RINDO_BROWSER_URL__;
|
|
1064
|
+
if ("string" != typeof s) throw new Error("invalid gotoTest() browser url");
|
|
1065
|
+
const n = s + t.substring(1);
|
|
1109
1066
|
r.waitUntil || (r.waitUntil = env.__RINDO_BROWSER_WAIT_UNTIL);
|
|
1110
|
-
const o = await e._e2eGoto(
|
|
1067
|
+
const o = await e._e2eGoto(n, r);
|
|
1111
1068
|
if (!o.ok()) throw new Error(`Testing unable to load ${t}, HTTP status: ${o.status()}`);
|
|
1112
1069
|
return await waitForRindo(e, r), o;
|
|
1113
1070
|
}
|
|
@@ -1115,18 +1072,18 @@ async function e2eGoTo(e, t, r = {}) {
|
|
|
1115
1072
|
async function e2eSetContent(e, t, r = {}) {
|
|
1116
1073
|
if (e.isClosed()) throw new Error("e2eSetContent unavailable: page already closed");
|
|
1117
1074
|
if ("string" != typeof t) throw new Error("invalid e2eSetContent() html");
|
|
1118
|
-
const
|
|
1119
|
-
if ("string" != typeof
|
|
1120
|
-
|
|
1075
|
+
const s = [], n = env.__RINDO_APP_SCRIPT_URL__;
|
|
1076
|
+
if ("string" != typeof n) throw new Error("invalid e2eSetContent() app script url");
|
|
1077
|
+
s.push("<!doctype html>"), s.push("<html>"), s.push("<head>");
|
|
1121
1078
|
const o = env.__RINDO_APP_STYLE_URL__;
|
|
1122
|
-
"string" == typeof o &&
|
|
1123
|
-
|
|
1079
|
+
"string" == typeof o && s.push(`<link rel="stylesheet" href="${o}">`), s.push(`<script type="module" src="${n}"><\/script>`),
|
|
1080
|
+
s.push("</head>"), s.push("<body>"), s.push(t), s.push("</body>"), s.push("</html>");
|
|
1124
1081
|
const i = env.__RINDO_BROWSER_URL__;
|
|
1125
1082
|
await e.setRequestInterception(!0), e.on("request", (e => {
|
|
1126
1083
|
i === e.url() ? e.respond({
|
|
1127
1084
|
status: 200,
|
|
1128
1085
|
contentType: "text/html",
|
|
1129
|
-
body:
|
|
1086
|
+
body: s.join("\n")
|
|
1130
1087
|
}) : e.continue();
|
|
1131
1088
|
})), r.waitUntil || (r.waitUntil = env.__RINDO_BROWSER_WAIT_UNTIL);
|
|
1132
1089
|
const a = await e._e2eGoto(i, r);
|
|
@@ -1154,11 +1111,11 @@ async function waitForChanges(e) {
|
|
|
1154
1111
|
const t = [], r = (e, t) => {
|
|
1155
1112
|
if (null != e) {
|
|
1156
1113
|
"shadowRoot" in e && e.shadowRoot instanceof ShadowRoot && r(e.shadowRoot, t);
|
|
1157
|
-
const
|
|
1158
|
-
for (let e = 0; e <
|
|
1159
|
-
const
|
|
1160
|
-
null !=
|
|
1161
|
-
r(
|
|
1114
|
+
const s = e.children, n = s.length;
|
|
1115
|
+
for (let e = 0; e < n; e++) {
|
|
1116
|
+
const n = s[e];
|
|
1117
|
+
null != n && (n.tagName.includes("-") && "function" == typeof n.componentOnReady && t.push(n.componentOnReady()),
|
|
1118
|
+
r(n, t));
|
|
1162
1119
|
}
|
|
1163
1120
|
}
|
|
1164
1121
|
};
|
|
@@ -1182,9 +1139,58 @@ function serializeConsoleMessage(e) {
|
|
|
1182
1139
|
}(e.location())}`;
|
|
1183
1140
|
}
|
|
1184
1141
|
|
|
1185
|
-
|
|
1142
|
+
function findRootComponent(e, t) {
|
|
1143
|
+
if (null != t) {
|
|
1144
|
+
const r = t.children, s = r.length;
|
|
1145
|
+
for (let t = 0; t < s; t++) {
|
|
1146
|
+
const s = r[t];
|
|
1147
|
+
if (e.has(s.nodeName.toLowerCase())) return s;
|
|
1148
|
+
}
|
|
1149
|
+
for (let t = 0; t < s; t++) {
|
|
1150
|
+
const s = findRootComponent(e, r[t]);
|
|
1151
|
+
if (null != s) return s;
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
return null;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
function createBuildId() {
|
|
1158
|
+
const e = new Date;
|
|
1159
|
+
let t = e.getFullYear() + "";
|
|
1160
|
+
return t += ("0" + (e.getMonth() + 1)).slice(-2), t += ("0" + e.getDate()).slice(-2),
|
|
1161
|
+
t += ("0" + e.getHours()).slice(-2), t += ("0" + e.getMinutes()).slice(-2), t += ("0" + e.getSeconds()).slice(-2),
|
|
1162
|
+
t;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
function createBuildMessage() {
|
|
1166
|
+
const e = new Date;
|
|
1167
|
+
let t = e.getFullYear() + "-";
|
|
1168
|
+
return t += ("0" + (e.getMonth() + 1)).slice(-2) + "-", t += ("0" + e.getDate()).slice(-2) + " ",
|
|
1169
|
+
t += ("0" + e.getHours()).slice(-2) + ":", t += ("0" + e.getMinutes()).slice(-2) + ":",
|
|
1170
|
+
t += ("0" + e.getSeconds()).slice(-2), `Build: ${t}`;
|
|
1171
|
+
}
|
|
1186
1172
|
|
|
1187
|
-
|
|
1173
|
+
function getAppStyleUrl(e, t) {
|
|
1174
|
+
return e.globalStyle ? getAppUrl(e, t, `${e.fsNamespace}.css`) : null;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
function getAppUrl(e, t, r) {
|
|
1178
|
+
const s = e.outputTargets.find(isOutputTargetWww);
|
|
1179
|
+
if (s) {
|
|
1180
|
+
const e = s.buildDir, n = path$2.join(e, r), o = path$2.relative(s.dir, n);
|
|
1181
|
+
return new URL(o, t).href;
|
|
1182
|
+
}
|
|
1183
|
+
const n = e.outputTargets.find(isOutputTargetDistLazy);
|
|
1184
|
+
if (n) {
|
|
1185
|
+
const s = n.esmDir, o = path$2.join(s, r), i = path$2.relative(e.rootDir, o);
|
|
1186
|
+
return new URL(i, t).href;
|
|
1187
|
+
}
|
|
1188
|
+
return t;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
var posix, pathBrowserify, caller, pathParse, parse, getNodeModulesDirs, nodeModulesPaths, normalizeOptions, ERROR_MESSAGE, slice, toStr, implementation, functionBind, src, isCoreModule, realpathFS$1, defaultIsFile$1, defaultIsDir$1, defaultRealpath, maybeRealpath, defaultReadPackage, getPackageCandidates$1, async, current, core, mod, core_1, isCore, realpathFS, defaultIsFile, defaultIsDir, defaultRealpathSync, maybeRealpathSync, defaultReadPackageSync, getPackageCandidates, sync, resolve;
|
|
1192
|
+
|
|
1193
|
+
const rindo_js = require("../compiler/rindo.js"), appData = _lazyRequire("@rindo/core/internal/app-data"), testing = _lazyRequire("@rindo/core/internal/testing"), index_cjs = _lazyRequire("../mock-doc/index.cjs"), path$2 = require("path"), crypto$3 = require("crypto"), os$2 = require("os"), process$3 = require("process"), fs$2 = require("fs"), index_js = _lazyRequire("../dev-server/index.js"), child_process$2 = require("child_process"), path__default = _interopDefaultLegacy(path$2), os__namespace = _interopNamespace(os$2), process__namespace = _interopNamespace(process$3), fs__default = _interopDefaultLegacy(fs$2), formatComponentRuntimeMembers = (e, t = !0) => ({
|
|
1188
1194
|
...formatPropertiesRuntimeMember(e.properties),
|
|
1189
1195
|
...formatStatesRuntimeMember(e.states),
|
|
1190
1196
|
...t ? formatMethodsRuntimeMember(e.methods) : {}
|
|
@@ -1237,21 +1243,21 @@ const path$2 = require("path"), index_js = _lazyRequire("../dev-server/index.js"
|
|
|
1237
1243
|
}, noop = () => {}, isFunction = e => "function" == typeof e, isString = e => "string" == typeof e, isIterable = e => (e => null != e)(e) && isFunction(e[Symbol.iterator]), windowsPathRegex = /^(?:[a-zA-Z]:|[\\/]{2}[^\\/]+[\\/]+[^\\/]+)?[\\/]$/, hasError = e => null != e && 0 !== e.length && e.some((e => "error" === e.level && "runtime" !== e.type)), normalizePath = e => {
|
|
1238
1244
|
if ("string" != typeof e) throw new Error("invalid path to normalize");
|
|
1239
1245
|
e = normalizeSlashes(e.trim());
|
|
1240
|
-
const t = pathComponents(e, getRootLength(e)), r = reducePathComponents(t),
|
|
1241
|
-
return "" === o ? "." : "" ===
|
|
1246
|
+
const t = pathComponents(e, getRootLength(e)), r = reducePathComponents(t), s = r[0], n = r[1], o = s + r.slice(1).join("/");
|
|
1247
|
+
return "" === o ? "." : "" === s && n && e.includes("/") && !n.startsWith(".") && !n.startsWith("@") ? "./" + o : o;
|
|
1242
1248
|
}, normalizeSlashes = e => e.replace(backslashRegExp, "/"), backslashRegExp = /\\/g, reducePathComponents = e => {
|
|
1243
1249
|
if (!Array.isArray(e) || 0 === e.length) return [];
|
|
1244
1250
|
const t = [ e[0] ];
|
|
1245
1251
|
for (let r = 1; r < e.length; r++) {
|
|
1246
|
-
const
|
|
1247
|
-
if (
|
|
1248
|
-
if (".." ===
|
|
1252
|
+
const s = e[r];
|
|
1253
|
+
if (s && "." !== s) {
|
|
1254
|
+
if (".." === s) if (t.length > 1) {
|
|
1249
1255
|
if (".." !== t[t.length - 1]) {
|
|
1250
1256
|
t.pop();
|
|
1251
1257
|
continue;
|
|
1252
1258
|
}
|
|
1253
1259
|
} else if (t[0]) continue;
|
|
1254
|
-
t.push(
|
|
1260
|
+
t.push(s);
|
|
1255
1261
|
}
|
|
1256
1262
|
}
|
|
1257
1263
|
return t;
|
|
@@ -1273,17 +1279,17 @@ const path$2 = require("path"), index_js = _lazyRequire("../dev-server/index.js"
|
|
|
1273
1279
|
}
|
|
1274
1280
|
const r = e.indexOf("://");
|
|
1275
1281
|
if (-1 !== r) {
|
|
1276
|
-
const t = r + "://".length,
|
|
1277
|
-
if (-1 !==
|
|
1278
|
-
const
|
|
1279
|
-
if ("file" ===
|
|
1280
|
-
const t = getFileUrlVolumeSeparatorEnd(e,
|
|
1282
|
+
const t = r + "://".length, s = e.indexOf("/", t);
|
|
1283
|
+
if (-1 !== s) {
|
|
1284
|
+
const n = e.slice(0, r), o = e.slice(t, s);
|
|
1285
|
+
if ("file" === n && ("" === o || "localhost" === o) && isVolumeCharacter(e.charCodeAt(s + 1))) {
|
|
1286
|
+
const t = getFileUrlVolumeSeparatorEnd(e, s + 2);
|
|
1281
1287
|
if (-1 !== t) {
|
|
1282
1288
|
if (47 === e.charCodeAt(t)) return ~(t + 1);
|
|
1283
1289
|
if (t === e.length) return ~t;
|
|
1284
1290
|
}
|
|
1285
1291
|
}
|
|
1286
|
-
return ~(
|
|
1292
|
+
return ~(s + 1);
|
|
1287
1293
|
}
|
|
1288
1294
|
return ~e.length;
|
|
1289
1295
|
}
|
|
@@ -1297,40 +1303,41 @@ const path$2 = require("path"), index_js = _lazyRequire("../dev-server/index.js"
|
|
|
1297
1303
|
}
|
|
1298
1304
|
return -1;
|
|
1299
1305
|
}, pathComponents = (e, t) => {
|
|
1300
|
-
const r = e.substring(0, t),
|
|
1301
|
-
return
|
|
1306
|
+
const r = e.substring(0, t), s = e.substring(t).split("/"), n = s.length;
|
|
1307
|
+
return n > 0 && !s[n - 1] && s.pop(), [ r, ...s ];
|
|
1302
1308
|
}, normalizeFsPath = e => normalizePath(e.split("?")[0].replace(/\0/g, "")), flattenDiagnosticMessageText = (e, t) => {
|
|
1309
|
+
var r, s;
|
|
1303
1310
|
if ("string" == typeof t) return t;
|
|
1304
1311
|
if (void 0 === t) return "";
|
|
1305
|
-
const
|
|
1306
|
-
|
|
1307
|
-
let
|
|
1308
|
-
if (!
|
|
1309
|
-
return
|
|
1310
|
-
|
|
1311
|
-
},
|
|
1312
|
+
const n = [], o = (null !== (s = null === (r = e.file) || void 0 === r ? void 0 : r.fileName) && void 0 !== s ? s : "").includes("rindo.config");
|
|
1313
|
+
o && n.push(2322);
|
|
1314
|
+
let i = "";
|
|
1315
|
+
if (!n.includes(t.code) && (i = t.messageText, isIterable(t.next))) for (const r of t.next) i += flattenDiagnosticMessageText(e, r);
|
|
1316
|
+
return o && (i = i.replace("type 'RindoConfig'", "Rindo Config"), i = i.replace("Object literal may only specify known properties, but ", ""),
|
|
1317
|
+
i = i.replace("Object literal may only specify known properties, and ", "")), i.trim();
|
|
1318
|
+
}, isJest27TransformOptions = e => null != e && "object" == typeof e && e.hasOwnProperty("config");
|
|
1312
1319
|
|
|
1313
1320
|
let _tsCompilerOptions = null, _tsCompilerOptionsKey = null;
|
|
1314
1321
|
|
|
1315
1322
|
const jestPreprocessor = {
|
|
1316
|
-
process(e, t, r,
|
|
1317
|
-
if (isJest27TransformOptions(r) && (
|
|
1318
|
-
if (function
|
|
1323
|
+
process(e, t, r, s) {
|
|
1324
|
+
if (isJest27TransformOptions(r) && (s = r.config), !s) throw "Unable to find Jest transformation options.";
|
|
1325
|
+
if (function n(e, t) {
|
|
1319
1326
|
var r;
|
|
1320
|
-
const
|
|
1321
|
-
if ("ts" ===
|
|
1322
|
-
if ("mjs" ===
|
|
1323
|
-
if ("js" ===
|
|
1327
|
+
const s = (null !== (r = e.split(".").pop()) && void 0 !== r ? r : "").toLowerCase().split("?")[0];
|
|
1328
|
+
if ("ts" === s || "tsx" === s || "jsx" === s) return !0;
|
|
1329
|
+
if ("mjs" === s) return !0;
|
|
1330
|
+
if ("js" === s) {
|
|
1324
1331
|
if (t.includes("import ") || t.includes("import.") || t.includes("import(")) return !0;
|
|
1325
1332
|
if (t.includes("export ")) return !0;
|
|
1326
1333
|
}
|
|
1327
|
-
return "css" ===
|
|
1334
|
+
return "css" === s;
|
|
1328
1335
|
}(t, e)) {
|
|
1329
1336
|
const r = {
|
|
1330
1337
|
file: t,
|
|
1331
|
-
currentDirectory:
|
|
1332
|
-
},
|
|
1333
|
-
|
|
1338
|
+
currentDirectory: s.rootDir
|
|
1339
|
+
}, n = getCompilerOptions(s.rootDir);
|
|
1340
|
+
n && (n.baseUrl && (r.baseUrl = n.baseUrl), n.paths && (r.paths = n.paths));
|
|
1334
1341
|
const o = transpile(e, r), i = o.diagnostics.some((e => "error" === e.level));
|
|
1335
1342
|
if (o.diagnostics && i) {
|
|
1336
1343
|
const e = o.diagnostics.map(formatDiagnostic).join("\n\n");
|
|
@@ -1340,25 +1347,25 @@ const jestPreprocessor = {
|
|
|
1340
1347
|
}
|
|
1341
1348
|
return e;
|
|
1342
1349
|
},
|
|
1343
|
-
getCacheKey(e, t, r,
|
|
1344
|
-
if (isJest27TransformOptions(r) && (
|
|
1350
|
+
getCacheKey(e, t, r, s) {
|
|
1351
|
+
if (isJest27TransformOptions(r) && (s = r.config), !s) throw "Unable to find Jest transformation options.";
|
|
1345
1352
|
if (!_tsCompilerOptionsKey) {
|
|
1346
|
-
const e = getCompilerOptions(
|
|
1353
|
+
const e = getCompilerOptions(s.rootDir);
|
|
1347
1354
|
_tsCompilerOptionsKey = JSON.stringify(e);
|
|
1348
1355
|
}
|
|
1349
|
-
return [ process.version, _tsCompilerOptionsKey, e, t, r, !!
|
|
1356
|
+
return [ process.version, _tsCompilerOptionsKey, e, t, r, !!s.instrument, 7 ].join(":");
|
|
1350
1357
|
}
|
|
1351
1358
|
}, deepEqual = function e(t, r) {
|
|
1352
1359
|
if (t === r) return !0;
|
|
1353
1360
|
if (t && r && "object" == typeof t && "object" == typeof r) {
|
|
1354
|
-
const
|
|
1361
|
+
const s = Array.isArray(t), n = Array.isArray(r);
|
|
1355
1362
|
let o, i, a;
|
|
1356
|
-
if (
|
|
1363
|
+
if (s && n) {
|
|
1357
1364
|
if (i = t.length, i != r.length) return !1;
|
|
1358
1365
|
for (o = i; 0 != o--; ) if (!e(t[o], r[o])) return !1;
|
|
1359
1366
|
return !0;
|
|
1360
1367
|
}
|
|
1361
|
-
if (
|
|
1368
|
+
if (s != n) return !1;
|
|
1362
1369
|
const l = t instanceof Date, c = r instanceof Date;
|
|
1363
1370
|
if (l != c) return !1;
|
|
1364
1371
|
if (l && c) return t.getTime() == r.getTime();
|
|
@@ -1377,25 +1384,25 @@ const jestPreprocessor = {
|
|
|
1377
1384
|
if (!e) throw new Error("expect toMatchAttribute value is null");
|
|
1378
1385
|
if ("function" == typeof e.then) throw new Error("element must be a resolved value, not a promise, before it can be tested");
|
|
1379
1386
|
if (1 !== e.nodeType) throw new Error("expect toMatchAttribute value is not an element");
|
|
1380
|
-
let
|
|
1381
|
-
null != r && (r = String(r)), null !=
|
|
1382
|
-
const
|
|
1387
|
+
let s = e.getAttribute(t);
|
|
1388
|
+
null != r && (r = String(r)), null != s && (s = String(s));
|
|
1389
|
+
const n = r === s;
|
|
1383
1390
|
return {
|
|
1384
|
-
message: () => `expected attribute ${t} "${r}" to ${
|
|
1385
|
-
pass:
|
|
1391
|
+
message: () => `expected attribute ${t} "${r}" to ${n ? "not " : ""}equal "${s}"`,
|
|
1392
|
+
pass: n
|
|
1386
1393
|
};
|
|
1387
1394
|
},
|
|
1388
1395
|
toEqualAttributes: function toEqualAttributes(e, t) {
|
|
1389
1396
|
if (!e) throw new Error("expect toEqualAttributes value is null");
|
|
1390
1397
|
if ("function" == typeof e.then) throw new Error("element must be a resolved value, not a promise, before it can be tested");
|
|
1391
1398
|
if (1 !== e.nodeType) throw new Error("expect toEqualAttributes value is not an element");
|
|
1392
|
-
const r = Object.keys(t),
|
|
1393
|
-
let
|
|
1394
|
-
return null !=
|
|
1399
|
+
const r = Object.keys(t), s = r.every((r => {
|
|
1400
|
+
let s = t[r];
|
|
1401
|
+
return null != s && (s = String(s)), e.getAttribute(r) === s;
|
|
1395
1402
|
}));
|
|
1396
1403
|
return {
|
|
1397
|
-
message: () => `expected attributes to ${
|
|
1398
|
-
pass:
|
|
1404
|
+
message: () => `expected attributes to ${s ? "not " : ""}equal ${r.map((e => `[${e}="${t[e]}"]`)).join(", ")}`,
|
|
1405
|
+
pass: s
|
|
1399
1406
|
};
|
|
1400
1407
|
},
|
|
1401
1408
|
toEqualHtml: function toEqualHtml(e, t) {
|
|
@@ -1410,10 +1417,10 @@ const jestPreprocessor = {
|
|
|
1410
1417
|
let r;
|
|
1411
1418
|
1 === e.nodeType ? r = e.textContent.replace(/\s\s+/g, " ").trim() : null != e && (r = String(e).replace(/\s\s+/g, " ").trim()),
|
|
1412
1419
|
"string" == typeof t && (t = t.replace(/\s\s+/g, " ").trim());
|
|
1413
|
-
const
|
|
1420
|
+
const s = r === t;
|
|
1414
1421
|
return {
|
|
1415
|
-
message: () => `expected textContent "${t}" to ${
|
|
1416
|
-
pass:
|
|
1422
|
+
message: () => `expected textContent "${t}" to ${s ? "not " : ""}equal "${r}"`,
|
|
1423
|
+
pass: s
|
|
1417
1424
|
};
|
|
1418
1425
|
},
|
|
1419
1426
|
toHaveAttribute: function toHaveAttribute(e, t) {
|
|
@@ -1490,12 +1497,12 @@ const jestPreprocessor = {
|
|
|
1490
1497
|
if ("function" == typeof e.then) throw new Error("event spy must be a resolved value, not a promise, before it can be tested");
|
|
1491
1498
|
if (!e.eventName) throw new Error("toHaveNthReceivedEventDetail did not receive an event spy");
|
|
1492
1499
|
if (!e.firstEvent) throw new Error(`event "${e.eventName}" was not received`);
|
|
1493
|
-
const
|
|
1494
|
-
if (!
|
|
1495
|
-
const
|
|
1496
|
-
return expect(
|
|
1497
|
-
message: () => `expected event "${e.eventName}" detail to ${
|
|
1498
|
-
pass:
|
|
1500
|
+
const s = e.events[t];
|
|
1501
|
+
if (!s) throw new Error(`event at index ${t} was not received`);
|
|
1502
|
+
const n = deepEqual(s.detail, r);
|
|
1503
|
+
return expect(s.detail).toEqual(r), {
|
|
1504
|
+
message: () => `expected event "${e.eventName}" detail to ${n ? "not " : ""}equal`,
|
|
1505
|
+
pass: n
|
|
1499
1506
|
};
|
|
1500
1507
|
},
|
|
1501
1508
|
toMatchScreenshot: function toMatchScreenshot(e, t = {}) {
|
|
@@ -1505,10 +1512,10 @@ const jestPreprocessor = {
|
|
|
1505
1512
|
const r = e.device || e.userAgent;
|
|
1506
1513
|
if ("number" == typeof t.allowableMismatchedRatio) {
|
|
1507
1514
|
if (t.allowableMismatchedRatio < 0 || t.allowableMismatchedRatio > 1) throw new Error("expect toMatchScreenshot() allowableMismatchedRatio must be a value ranging from 0 to 1");
|
|
1508
|
-
const
|
|
1515
|
+
const s = e.mismatchedPixels / (e.width * e.deviceScaleFactor * (e.height * e.deviceScaleFactor));
|
|
1509
1516
|
return {
|
|
1510
|
-
message: () => `${r}: screenshot has a mismatch ratio of "${
|
|
1511
|
-
pass:
|
|
1517
|
+
message: () => `${r}: screenshot has a mismatch ratio of "${s}" for "${e.desc}", but expected ratio to be less than "${t.allowableMismatchedRatio}"`,
|
|
1518
|
+
pass: s <= t.allowableMismatchedRatio
|
|
1512
1519
|
};
|
|
1513
1520
|
}
|
|
1514
1521
|
if ("number" == typeof t.allowableMismatchedPixels) {
|
|
@@ -1719,7 +1726,13 @@ const FETCH_DEFAULT_PATH = "/mock-fetch-data", HtmlSerializer = {
|
|
|
1719
1726
|
outerHtml: !0
|
|
1720
1727
|
}),
|
|
1721
1728
|
test: e => null != e && (e instanceof HTMLElement || e instanceof index_cjs.MockNode)
|
|
1722
|
-
}
|
|
1729
|
+
}, createConfigFlags = (e = {}) => ({
|
|
1730
|
+
task: null,
|
|
1731
|
+
args: [],
|
|
1732
|
+
knownArgs: [],
|
|
1733
|
+
unknownArgs: [],
|
|
1734
|
+
...e
|
|
1735
|
+
});
|
|
1723
1736
|
|
|
1724
1737
|
class BuildContext {
|
|
1725
1738
|
constructor(e, t) {
|
|
@@ -1766,9 +1779,9 @@ class BuildContext {
|
|
|
1766
1779
|
}
|
|
1767
1780
|
return {
|
|
1768
1781
|
duration: () => r.duration(),
|
|
1769
|
-
finish: (e,
|
|
1782
|
+
finish: (e, s, n, o) => {
|
|
1770
1783
|
if ((!this.hasFinished || t) && (t && this.config.watch && (e = `${this.config.logger.cyan("[" + this.buildId + "]")} ${e}`),
|
|
1771
|
-
r.finish(e,
|
|
1784
|
+
r.finish(e, s, n, o), !t)) {
|
|
1772
1785
|
const e = {
|
|
1773
1786
|
buildId: this.buildId,
|
|
1774
1787
|
messages: this.buildMessages.slice(),
|
|
@@ -1813,8 +1826,8 @@ const getBuildTimestamp = () => {
|
|
|
1813
1826
|
}, getProgress = e => {
|
|
1814
1827
|
let t = 0;
|
|
1815
1828
|
const r = Object.keys(ProgressTask);
|
|
1816
|
-
return r.forEach(((r,
|
|
1817
|
-
e.includes(ProgressTask[r]) && (t =
|
|
1829
|
+
return r.forEach(((r, s) => {
|
|
1830
|
+
e.includes(ProgressTask[r]) && (t = s);
|
|
1818
1831
|
})), (t + 1) / r.length;
|
|
1819
1832
|
}, ProgressTask = {
|
|
1820
1833
|
emptyOutputTargets: {},
|
|
@@ -1883,13 +1896,13 @@ class Cache {
|
|
|
1883
1896
|
const e = Date.now(), t = await this.sys.cacheStorage.get(EXP_STORAGE_KEY);
|
|
1884
1897
|
if (null != t) {
|
|
1885
1898
|
if (e - t < ONE_DAY) return;
|
|
1886
|
-
const r = this.cacheFs.sys,
|
|
1899
|
+
const r = this.cacheFs.sys, s = await r.readDir(this.config.cacheDir), n = s.map((e => path$2.join(this.config.cacheDir, e)));
|
|
1887
1900
|
let o = 0;
|
|
1888
|
-
const i =
|
|
1889
|
-
const
|
|
1890
|
-
e -
|
|
1901
|
+
const i = n.map((async t => {
|
|
1902
|
+
const s = (await r.stat(t)).mtimeMs;
|
|
1903
|
+
e - s > ONE_WEEK && (await r.removeFile(t), o++);
|
|
1891
1904
|
}));
|
|
1892
|
-
await Promise.all(i), this.logger.debug(`clearExpiredCache, cachedFileNames: ${
|
|
1905
|
+
await Promise.all(i), this.logger.debug(`clearExpiredCache, cachedFileNames: ${s.length}, totalCleared: ${o}`);
|
|
1893
1906
|
}
|
|
1894
1907
|
this.logger.debug("clearExpiredCache, set last clear"), await this.sys.cacheStorage.set(EXP_STORAGE_KEY, e);
|
|
1895
1908
|
}
|
|
@@ -1905,7 +1918,46 @@ class Cache {
|
|
|
1905
1918
|
}
|
|
1906
1919
|
}
|
|
1907
1920
|
|
|
1908
|
-
const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY = "last_clear_expired_cache", CACHE_DIR_README = '# Rindo Cache Directory\n\nThis directory contains files which the compiler has\ncached for faster builds. To disable caching, please set\n"enableCache: false" within the rindo config.\n\nTo change the cache directory, please update the\n"cacheDir" property within the rindo config.\n',
|
|
1921
|
+
const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY = "last_clear_expired_cache", CACHE_DIR_README = '# Rindo Cache Directory\n\nThis directory contains files which the compiler has\ncached for faster builds. To disable caching, please set\n"enableCache: false" within the rindo config.\n\nTo change the cache directory, please update the\n"cacheDir" property within the rindo config.\n', buildEvents = () => {
|
|
1922
|
+
const e = [], t = t => {
|
|
1923
|
+
const r = e.findIndex((e => e.callback === t));
|
|
1924
|
+
return r > -1 && (e.splice(r, 1), !0);
|
|
1925
|
+
};
|
|
1926
|
+
return {
|
|
1927
|
+
emit: (t, r) => {
|
|
1928
|
+
const s = t.toLowerCase().trim(), n = e.slice();
|
|
1929
|
+
for (const e of n) if (null == e.eventName) try {
|
|
1930
|
+
e.callback(t, r);
|
|
1931
|
+
} catch (e) {
|
|
1932
|
+
console.error(e);
|
|
1933
|
+
} else if (e.eventName === s) try {
|
|
1934
|
+
e.callback(r);
|
|
1935
|
+
} catch (e) {
|
|
1936
|
+
console.error(e);
|
|
1937
|
+
}
|
|
1938
|
+
},
|
|
1939
|
+
on: (r, s) => {
|
|
1940
|
+
if ("function" == typeof r) {
|
|
1941
|
+
const s = null, n = r;
|
|
1942
|
+
return e.push({
|
|
1943
|
+
eventName: s,
|
|
1944
|
+
callback: n
|
|
1945
|
+
}), () => t(n);
|
|
1946
|
+
}
|
|
1947
|
+
if ("string" == typeof r && "function" == typeof s) {
|
|
1948
|
+
const n = r.toLowerCase().trim(), o = s;
|
|
1949
|
+
return e.push({
|
|
1950
|
+
eventName: n,
|
|
1951
|
+
callback: o
|
|
1952
|
+
}), () => t(o);
|
|
1953
|
+
}
|
|
1954
|
+
return () => !1;
|
|
1955
|
+
},
|
|
1956
|
+
unsubscribeAll: () => {
|
|
1957
|
+
e.length = 0;
|
|
1958
|
+
}
|
|
1959
|
+
};
|
|
1960
|
+
}, getCommitInstructions = e => {
|
|
1909
1961
|
const t = {
|
|
1910
1962
|
filesToDelete: [],
|
|
1911
1963
|
filesToWrite: [],
|
|
@@ -1919,23 +1971,23 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
|
|
|
1919
1971
|
t.filesToWrite.push(r);
|
|
1920
1972
|
const e = normalizePath(path$2.dirname(r));
|
|
1921
1973
|
t.dirsToEnsure.includes(e) || t.dirsToEnsure.push(e);
|
|
1922
|
-
const
|
|
1923
|
-
|
|
1924
|
-
const
|
|
1925
|
-
|
|
1974
|
+
const s = t.dirsToDelete.indexOf(e);
|
|
1975
|
+
s > -1 && t.dirsToDelete.splice(s, 1);
|
|
1976
|
+
const n = t.filesToDelete.indexOf(r);
|
|
1977
|
+
n > -1 && t.filesToDelete.splice(n, 1);
|
|
1926
1978
|
} else if (!0 === e.isDirectory) {
|
|
1927
1979
|
t.dirsToEnsure.includes(r) || t.dirsToEnsure.push(r);
|
|
1928
1980
|
const e = t.dirsToDelete.indexOf(r);
|
|
1929
1981
|
e > -1 && t.dirsToDelete.splice(e, 1);
|
|
1930
1982
|
}
|
|
1931
1983
|
} else if (!0 === e.queueDeleteFromDisk) e.isDirectory && !t.dirsToEnsure.includes(r) ? t.dirsToDelete.push(r) : e.isFile && !t.filesToWrite.includes(r) && t.filesToDelete.push(r); else if ("string" == typeof e.queueCopyFileToDest) {
|
|
1932
|
-
const
|
|
1933
|
-
t.filesToCopy.push([
|
|
1934
|
-
const o = normalizePath(path$2.dirname(
|
|
1984
|
+
const s = r, n = e.queueCopyFileToDest;
|
|
1985
|
+
t.filesToCopy.push([ s, n ]);
|
|
1986
|
+
const o = normalizePath(path$2.dirname(n));
|
|
1935
1987
|
t.dirsToEnsure.includes(o) || t.dirsToEnsure.push(o);
|
|
1936
1988
|
const i = t.dirsToDelete.indexOf(o);
|
|
1937
1989
|
i > -1 && t.dirsToDelete.splice(i, 1);
|
|
1938
|
-
const a = t.filesToDelete.indexOf(
|
|
1990
|
+
const a = t.filesToDelete.indexOf(n);
|
|
1939
1991
|
a > -1 && t.filesToDelete.splice(a, 1);
|
|
1940
1992
|
}
|
|
1941
1993
|
e.queueDeleteFromDisk = !1, e.queueWriteToDisk = !1;
|
|
@@ -1943,68 +1995,132 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
|
|
|
1943
1995
|
for (let e = 0, r = t.dirsToEnsure.length; e < r; e++) {
|
|
1944
1996
|
const r = t.dirsToEnsure[e].split("/");
|
|
1945
1997
|
for (let e = 2; e < r.length; e++) {
|
|
1946
|
-
const
|
|
1947
|
-
!1 === t.dirsToEnsure.includes(
|
|
1998
|
+
const s = r.slice(0, e).join("/");
|
|
1999
|
+
!1 === t.dirsToEnsure.includes(s) && t.dirsToEnsure.push(s);
|
|
1948
2000
|
}
|
|
1949
2001
|
}
|
|
1950
|
-
t.dirsToEnsure.sort(((e, t) => {
|
|
1951
|
-
const r = e.split("/").length,
|
|
1952
|
-
return r <
|
|
1953
|
-
})), t.dirsToDelete.sort(((e, t) => {
|
|
1954
|
-
const r = e.split("/").length,
|
|
1955
|
-
return r <
|
|
1956
|
-
}));
|
|
1957
|
-
for (const e of t.dirsToEnsure) {
|
|
1958
|
-
const r = t.dirsToDelete.indexOf(e);
|
|
1959
|
-
r > -1 && t.dirsToDelete.splice(r, 1);
|
|
2002
|
+
t.dirsToEnsure.sort(((e, t) => {
|
|
2003
|
+
const r = e.split("/").length, s = t.split("/").length;
|
|
2004
|
+
return r < s ? -1 : r > s ? 1 : e.length < t.length ? -1 : e.length > t.length ? 1 : 0;
|
|
2005
|
+
})), t.dirsToDelete.sort(((e, t) => {
|
|
2006
|
+
const r = e.split("/").length, s = t.split("/").length;
|
|
2007
|
+
return r < s ? 1 : r > s ? -1 : e.length < t.length ? 1 : e.length > t.length ? -1 : 0;
|
|
2008
|
+
}));
|
|
2009
|
+
for (const e of t.dirsToEnsure) {
|
|
2010
|
+
const r = t.dirsToDelete.indexOf(e);
|
|
2011
|
+
r > -1 && t.dirsToDelete.splice(r, 1);
|
|
2012
|
+
}
|
|
2013
|
+
return t.dirsToDelete = t.dirsToDelete.filter((e => "/" !== e && !0 !== e.endsWith(":/"))),
|
|
2014
|
+
t.dirsToEnsure = t.dirsToEnsure.filter((t => {
|
|
2015
|
+
const r = e.get(t);
|
|
2016
|
+
return (null == r || !0 !== r.exists || !0 !== r.isDirectory) && "/" !== t && !t.endsWith(":/");
|
|
2017
|
+
})), t;
|
|
2018
|
+
}, shouldIgnore = e => (e = e.trim().toLowerCase(), IGNORE.some((t => e.endsWith(t)))), IGNORE = [ ".ds_store", ".gitignore", "desktop.ini", "thumbs.db" ];
|
|
2019
|
+
|
|
2020
|
+
class TestingLogger {
|
|
2021
|
+
constructor() {
|
|
2022
|
+
this.isEnabled = !1;
|
|
2023
|
+
}
|
|
2024
|
+
setLevel(e) {}
|
|
2025
|
+
getLevel() {
|
|
2026
|
+
return "info";
|
|
2027
|
+
}
|
|
2028
|
+
enableColors(e) {}
|
|
2029
|
+
emoji(e) {
|
|
2030
|
+
return "";
|
|
2031
|
+
}
|
|
2032
|
+
info(...e) {
|
|
2033
|
+
this.isEnabled && console.log(...e);
|
|
2034
|
+
}
|
|
2035
|
+
warn(...e) {
|
|
2036
|
+
this.isEnabled && console.warn(...e);
|
|
2037
|
+
}
|
|
2038
|
+
error(...e) {
|
|
2039
|
+
this.isEnabled && console.error(...e);
|
|
2040
|
+
}
|
|
2041
|
+
debug(...e) {
|
|
2042
|
+
this.isEnabled && console.log(...e);
|
|
2043
|
+
}
|
|
2044
|
+
color(e, t) {}
|
|
2045
|
+
red(e) {
|
|
2046
|
+
return e;
|
|
2047
|
+
}
|
|
2048
|
+
green(e) {
|
|
2049
|
+
return e;
|
|
2050
|
+
}
|
|
2051
|
+
yellow(e) {
|
|
2052
|
+
return e;
|
|
1960
2053
|
}
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
}
|
|
2054
|
+
blue(e) {
|
|
2055
|
+
return e;
|
|
2056
|
+
}
|
|
2057
|
+
magenta(e) {
|
|
2058
|
+
return e;
|
|
2059
|
+
}
|
|
2060
|
+
cyan(e) {
|
|
2061
|
+
return e;
|
|
2062
|
+
}
|
|
2063
|
+
gray(e) {
|
|
2064
|
+
return e;
|
|
2065
|
+
}
|
|
2066
|
+
bold(e) {
|
|
2067
|
+
return e;
|
|
2068
|
+
}
|
|
2069
|
+
dim(e) {
|
|
2070
|
+
return e;
|
|
2071
|
+
}
|
|
2072
|
+
bgRed(e) {
|
|
2073
|
+
return e;
|
|
2074
|
+
}
|
|
2075
|
+
createTimeSpan(e, t = !1) {
|
|
2076
|
+
return {
|
|
2077
|
+
duration: () => 0,
|
|
2078
|
+
finish: () => 0
|
|
2079
|
+
};
|
|
2080
|
+
}
|
|
2081
|
+
printDiagnostics(e) {}
|
|
2082
|
+
}
|
|
1967
2083
|
|
|
1968
2084
|
(posix = {
|
|
1969
2085
|
resolve: function e() {
|
|
1970
|
-
var t, r,
|
|
1971
|
-
for (r = arguments.length - 1; r >= -1 && !o; r--) r >= 0 ?
|
|
1972
|
-
|
|
1973
|
-
return
|
|
2086
|
+
var t, r, s, n = "", o = !1;
|
|
2087
|
+
for (r = arguments.length - 1; r >= -1 && !o; r--) r >= 0 ? s = arguments[r] : (void 0 === t && (t = process.cwd()),
|
|
2088
|
+
s = t), assertPath(s), 0 !== s.length && (n = s + "/" + n, o = 47 === s.charCodeAt(0));
|
|
2089
|
+
return n = normalizeStringPosix(n, !o), o ? n.length > 0 ? "/" + n : "/" : n.length > 0 ? n : ".";
|
|
1974
2090
|
},
|
|
1975
2091
|
normalize: function e(t) {
|
|
1976
|
-
var r,
|
|
1977
|
-
return assertPath(t), 0 === t.length ? "." : (r = 47 === t.charCodeAt(0),
|
|
1978
|
-
0 !== (t = normalizeStringPosix(t, !r)).length || r || (t = "."), t.length > 0 &&
|
|
2092
|
+
var r, s;
|
|
2093
|
+
return assertPath(t), 0 === t.length ? "." : (r = 47 === t.charCodeAt(0), s = 47 === t.charCodeAt(t.length - 1),
|
|
2094
|
+
0 !== (t = normalizeStringPosix(t, !r)).length || r || (t = "."), t.length > 0 && s && (t += "/"),
|
|
1979
2095
|
r ? "/" + t : t);
|
|
1980
2096
|
},
|
|
1981
2097
|
isAbsolute: function e(t) {
|
|
1982
2098
|
return assertPath(t), t.length > 0 && 47 === t.charCodeAt(0);
|
|
1983
2099
|
},
|
|
1984
2100
|
join: function e() {
|
|
1985
|
-
var t, r,
|
|
2101
|
+
var t, r, s;
|
|
1986
2102
|
if (0 === arguments.length) return ".";
|
|
1987
|
-
for (r = 0; r < arguments.length; ++r) assertPath(
|
|
2103
|
+
for (r = 0; r < arguments.length; ++r) assertPath(s = arguments[r]), s.length > 0 && (void 0 === t ? t = s : t += "/" + s);
|
|
1988
2104
|
return void 0 === t ? "." : posix.normalize(t);
|
|
1989
2105
|
},
|
|
1990
2106
|
relative: function e(t, r) {
|
|
1991
|
-
var
|
|
2107
|
+
var s, n, o, i, a, l, c, u, d, h;
|
|
1992
2108
|
if (assertPath(t), assertPath(r), t === r) return "";
|
|
1993
2109
|
if ((t = posix.resolve(t)) === (r = posix.resolve(r))) return "";
|
|
1994
|
-
for (
|
|
1995
|
-
for (o = (
|
|
2110
|
+
for (s = 1; s < t.length && 47 === t.charCodeAt(s); ++s) ;
|
|
2111
|
+
for (o = (n = t.length) - s, i = 1; i < r.length && 47 === r.charCodeAt(i); ++i) ;
|
|
1996
2112
|
for (l = o < (a = r.length - i) ? o : a, c = -1, u = 0; u <= l; ++u) {
|
|
1997
2113
|
if (u === l) {
|
|
1998
2114
|
if (a > l) {
|
|
1999
2115
|
if (47 === r.charCodeAt(i + u)) return r.slice(i + u + 1);
|
|
2000
2116
|
if (0 === u) return r.slice(i + u);
|
|
2001
|
-
} else o > l && (47 === t.charCodeAt(
|
|
2117
|
+
} else o > l && (47 === t.charCodeAt(s + u) ? c = u : 0 === u && (c = 0));
|
|
2002
2118
|
break;
|
|
2003
2119
|
}
|
|
2004
|
-
if ((d = t.charCodeAt(
|
|
2120
|
+
if ((d = t.charCodeAt(s + u)) !== r.charCodeAt(i + u)) break;
|
|
2005
2121
|
47 === d && (c = u);
|
|
2006
2122
|
}
|
|
2007
|
-
for (h = "", u =
|
|
2123
|
+
for (h = "", u = s + c + 1; u <= n; ++u) u !== n && 47 !== t.charCodeAt(u) || (0 === h.length ? h += ".." : h += "/..");
|
|
2008
2124
|
return h.length > 0 ? h + r.slice(i + c) : (i += c, 47 === r.charCodeAt(i) && ++i,
|
|
2009
2125
|
r.slice(i));
|
|
2010
2126
|
},
|
|
@@ -2012,56 +2128,56 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
|
|
|
2012
2128
|
return t;
|
|
2013
2129
|
},
|
|
2014
2130
|
dirname: function e(t) {
|
|
2015
|
-
var r,
|
|
2131
|
+
var r, s, n, o;
|
|
2016
2132
|
if (assertPath(t), 0 === t.length) return ".";
|
|
2017
|
-
for (r = 47 === t.charCodeAt(0),
|
|
2018
|
-
if (!
|
|
2019
|
-
|
|
2133
|
+
for (r = 47 === t.charCodeAt(0), s = -1, n = !0, o = t.length - 1; o >= 1; --o) if (47 === t.charCodeAt(o)) {
|
|
2134
|
+
if (!n) {
|
|
2135
|
+
s = o;
|
|
2020
2136
|
break;
|
|
2021
2137
|
}
|
|
2022
|
-
} else
|
|
2023
|
-
return -1 ===
|
|
2138
|
+
} else n = !1;
|
|
2139
|
+
return -1 === s ? r ? "/" : "." : r && 1 === s ? "//" : t.slice(0, s);
|
|
2024
2140
|
},
|
|
2025
2141
|
basename: function e(t, r) {
|
|
2026
|
-
var
|
|
2142
|
+
var s, n, o, i, a, l, c;
|
|
2027
2143
|
if (void 0 !== r && "string" != typeof r) throw new TypeError('"ext" argument must be a string');
|
|
2028
|
-
if (assertPath(t),
|
|
2144
|
+
if (assertPath(t), s = 0, n = -1, o = !0, void 0 !== r && r.length > 0 && r.length <= t.length) {
|
|
2029
2145
|
if (r.length === t.length && r === t) return "";
|
|
2030
2146
|
for (a = r.length - 1, l = -1, i = t.length - 1; i >= 0; --i) if (47 === (c = t.charCodeAt(i))) {
|
|
2031
2147
|
if (!o) {
|
|
2032
|
-
|
|
2148
|
+
s = i + 1;
|
|
2033
2149
|
break;
|
|
2034
2150
|
}
|
|
2035
|
-
} else -1 === l && (o = !1, l = i + 1), a >= 0 && (c === r.charCodeAt(a) ? -1 == --a && (
|
|
2036
|
-
|
|
2037
|
-
return
|
|
2151
|
+
} else -1 === l && (o = !1, l = i + 1), a >= 0 && (c === r.charCodeAt(a) ? -1 == --a && (n = i) : (a = -1,
|
|
2152
|
+
n = l));
|
|
2153
|
+
return s === n ? n = l : -1 === n && (n = t.length), t.slice(s, n);
|
|
2038
2154
|
}
|
|
2039
2155
|
for (i = t.length - 1; i >= 0; --i) if (47 === t.charCodeAt(i)) {
|
|
2040
2156
|
if (!o) {
|
|
2041
|
-
|
|
2157
|
+
s = i + 1;
|
|
2042
2158
|
break;
|
|
2043
2159
|
}
|
|
2044
|
-
} else -1 ===
|
|
2045
|
-
return -1 ===
|
|
2160
|
+
} else -1 === n && (o = !1, n = i + 1);
|
|
2161
|
+
return -1 === n ? "" : t.slice(s, n);
|
|
2046
2162
|
},
|
|
2047
2163
|
extname: function e(t) {
|
|
2048
|
-
var r,
|
|
2049
|
-
for (assertPath(t), r = -1,
|
|
2050
|
-
|
|
2051
|
-
|
|
2164
|
+
var r, s, n, o, i, a, l;
|
|
2165
|
+
for (assertPath(t), r = -1, s = 0, n = -1, o = !0, i = 0, a = t.length - 1; a >= 0; --a) if (47 !== (l = t.charCodeAt(a))) -1 === n && (o = !1,
|
|
2166
|
+
n = a + 1), 46 === l ? -1 === r ? r = a : 1 !== i && (i = 1) : -1 !== r && (i = -1); else if (!o) {
|
|
2167
|
+
s = a + 1;
|
|
2052
2168
|
break;
|
|
2053
2169
|
}
|
|
2054
|
-
return -1 === r || -1 ===
|
|
2170
|
+
return -1 === r || -1 === n || 0 === i || 1 === i && r === n - 1 && r === s + 1 ? "" : t.slice(r, n);
|
|
2055
2171
|
},
|
|
2056
2172
|
format: function e(t) {
|
|
2057
2173
|
if (null === t || "object" != typeof t) throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof t);
|
|
2058
2174
|
return function r(e, t) {
|
|
2059
|
-
var r = t.dir || t.root,
|
|
2060
|
-
return r ? r === t.root ? r +
|
|
2175
|
+
var r = t.dir || t.root, s = t.base || (t.name || "") + (t.ext || "");
|
|
2176
|
+
return r ? r === t.root ? r + s : r + e + s : s;
|
|
2061
2177
|
}("/", t);
|
|
2062
2178
|
},
|
|
2063
2179
|
parse: function e(t) {
|
|
2064
|
-
var r,
|
|
2180
|
+
var r, s, n, o, i, a, l, c, u, d;
|
|
2065
2181
|
if (assertPath(t), r = {
|
|
2066
2182
|
root: "",
|
|
2067
2183
|
dir: "",
|
|
@@ -2069,15 +2185,15 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
|
|
|
2069
2185
|
ext: "",
|
|
2070
2186
|
name: ""
|
|
2071
2187
|
}, 0 === t.length) return r;
|
|
2072
|
-
for ((
|
|
2073
|
-
a = 0, l = -1, c = !0, u = t.length - 1, d = 0; u >= o; --u) if (47 !== (
|
|
2074
|
-
l = u + 1), 46 ===
|
|
2188
|
+
for ((n = 47 === (s = t.charCodeAt(0))) ? (r.root = "/", o = 1) : o = 0, i = -1,
|
|
2189
|
+
a = 0, l = -1, c = !0, u = t.length - 1, d = 0; u >= o; --u) if (47 !== (s = t.charCodeAt(u))) -1 === l && (c = !1,
|
|
2190
|
+
l = u + 1), 46 === s ? -1 === i ? i = u : 1 !== d && (d = 1) : -1 !== i && (d = -1); else if (!c) {
|
|
2075
2191
|
a = u + 1;
|
|
2076
2192
|
break;
|
|
2077
2193
|
}
|
|
2078
|
-
return -1 === i || -1 === l || 0 === d || 1 === d && i === l - 1 && i === a + 1 ? -1 !== l && (r.base = r.name = 0 === a &&
|
|
2194
|
+
return -1 === i || -1 === l || 0 === d || 1 === d && i === l - 1 && i === a + 1 ? -1 !== l && (r.base = r.name = 0 === a && n ? t.slice(1, l) : t.slice(a, l)) : (0 === a && n ? (r.name = t.slice(1, i),
|
|
2079
2195
|
r.base = t.slice(1, l)) : (r.name = t.slice(a, i), r.base = t.slice(a, l)), r.ext = t.slice(i, l)),
|
|
2080
|
-
a > 0 ? r.dir = t.slice(0, a - 1) :
|
|
2196
|
+
a > 0 ? r.dir = t.slice(0, a - 1) : n && (r.dir = "/"), r;
|
|
2081
2197
|
},
|
|
2082
2198
|
sep: "/",
|
|
2083
2199
|
delimiter: ":",
|
|
@@ -2085,46 +2201,7 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
|
|
|
2085
2201
|
posix: null
|
|
2086
2202
|
}).posix = posix, pathBrowserify = posix;
|
|
2087
2203
|
|
|
2088
|
-
const
|
|
2089
|
-
const e = [], t = t => {
|
|
2090
|
-
const r = e.findIndex((e => e.callback === t));
|
|
2091
|
-
return r > -1 && (e.splice(r, 1), !0);
|
|
2092
|
-
};
|
|
2093
|
-
return {
|
|
2094
|
-
emit: (t, r) => {
|
|
2095
|
-
const n = t.toLowerCase().trim(), s = e.slice();
|
|
2096
|
-
for (const e of s) if (null == e.eventName) try {
|
|
2097
|
-
e.callback(t, r);
|
|
2098
|
-
} catch (e) {
|
|
2099
|
-
console.error(e);
|
|
2100
|
-
} else if (e.eventName === n) try {
|
|
2101
|
-
e.callback(r);
|
|
2102
|
-
} catch (e) {
|
|
2103
|
-
console.error(e);
|
|
2104
|
-
}
|
|
2105
|
-
},
|
|
2106
|
-
on: (r, n) => {
|
|
2107
|
-
if ("function" == typeof r) {
|
|
2108
|
-
const n = null, s = r;
|
|
2109
|
-
return e.push({
|
|
2110
|
-
eventName: n,
|
|
2111
|
-
callback: s
|
|
2112
|
-
}), () => t(s);
|
|
2113
|
-
}
|
|
2114
|
-
if ("string" == typeof r && "function" == typeof n) {
|
|
2115
|
-
const s = r.toLowerCase().trim(), o = n;
|
|
2116
|
-
return e.push({
|
|
2117
|
-
eventName: s,
|
|
2118
|
-
callback: o
|
|
2119
|
-
}), () => t(o);
|
|
2120
|
-
}
|
|
2121
|
-
return () => !1;
|
|
2122
|
-
},
|
|
2123
|
-
unsubscribeAll: () => {
|
|
2124
|
-
e.length = 0;
|
|
2125
|
-
}
|
|
2126
|
-
};
|
|
2127
|
-
}, IS_NODE_ENV = !("undefined" == typeof global || "function" != typeof require || !global.process || "string" != typeof __filename || global.origin && "string" == typeof global.origin);
|
|
2204
|
+
const IS_NODE_ENV = !("undefined" == typeof global || "function" != typeof require || !global.process || "string" != typeof __filename || global.origin && "string" == typeof global.origin);
|
|
2128
2205
|
|
|
2129
2206
|
IS_NODE_ENV && process.platform;
|
|
2130
2207
|
|
|
@@ -2132,79 +2209,9 @@ const IS_BROWSER_ENV = "undefined" != typeof location && "undefined" != typeof n
|
|
|
2132
2209
|
|
|
2133
2210
|
IS_NODE_ENV && require, IS_NODE_ENV && process.cwd;
|
|
2134
2211
|
|
|
2135
|
-
const YELLOW = "#f39c12", RED = "#c0392b", BLUE = "#3498db"
|
|
2136
|
-
const r = normalizePath(e).split("/"), n = (e => {
|
|
2137
|
-
e.startsWith("~") && (e = e.substring(1));
|
|
2138
|
-
const t = e.split("/"), r = {
|
|
2139
|
-
moduleId: null,
|
|
2140
|
-
filePath: null,
|
|
2141
|
-
scope: null,
|
|
2142
|
-
scopeSubModuleId: null
|
|
2143
|
-
};
|
|
2144
|
-
return e.startsWith("@") && t.length > 1 ? (r.moduleId = t.slice(0, 2).join("/"),
|
|
2145
|
-
r.filePath = t.slice(2).join("/"), r.scope = t[0], r.scopeSubModuleId = t[1]) : (r.moduleId = t[0],
|
|
2146
|
-
r.filePath = t.slice(1).join("/")), r;
|
|
2147
|
-
})(t);
|
|
2148
|
-
for (let e = r.length - 1; e >= 1; e--) if ("node_modules" === r[e - 1]) if (n.scope) {
|
|
2149
|
-
if (r[e] === n.scope && r[e + 1] === n.scopeSubModuleId) return r.slice(0, e + 2).join("/");
|
|
2150
|
-
} else if (r[e] === n.moduleId) return r.slice(0, e + 1).join("/");
|
|
2151
|
-
return null;
|
|
2152
|
-
}, packageVersions = new Map, known404Urls = new Set, getCommonDirUrl = (e, t, r, n) => getNodeModuleFetchUrl(e, t, r) + "/" + n, getNodeModuleFetchUrl = (e, t, r) => {
|
|
2153
|
-
let n = (r = normalizePath(r)).split("/").filter((e => e.length));
|
|
2154
|
-
const s = n.lastIndexOf("node_modules");
|
|
2155
|
-
s > -1 && s < n.length - 1 && (n = n.slice(s + 1));
|
|
2156
|
-
let o = n.shift();
|
|
2157
|
-
o.startsWith("@") && (o += "/" + n.shift());
|
|
2158
|
-
const i = n.join("/");
|
|
2159
|
-
return "@rindo/core" === o ? ((e, t) => {
|
|
2160
|
-
let r = (t = normalizePath(t)).split("/");
|
|
2161
|
-
const n = r.lastIndexOf("node_modules");
|
|
2162
|
-
n > -1 && n < r.length - 1 && (r = r.slice(n + 1), r = r[0].startsWith("@") ? r.slice(2) : r.slice(1),
|
|
2163
|
-
t = r.join("/"));
|
|
2164
|
-
const s = new URL("../", e).href;
|
|
2165
|
-
return new URL("./" + t, s).href;
|
|
2166
|
-
})(e.getCompilerExecutingPath(), i) : e.getRemoteModuleUrl({
|
|
2167
|
-
moduleId: o,
|
|
2168
|
-
version: t.get(o),
|
|
2169
|
-
path: i
|
|
2170
|
-
});
|
|
2171
|
-
}, knownUrlSkips = [ "/@rindo/core/internal.js", "/@rindo/core/internal.json", "/@rindo/core/internal.mjs", "/@rindo/core/internal/rindo-core.js/index.json", "/@rindo/core/internal/rindo-core.js.json", "/@rindo/core/internal/rindo-core.js/package.json", "/@rindo/core.js", "/@rindo/core.json", "/@rindo/core.mjs", "/@rindo/core.css", "/@rindo/core/index.js", "/@rindo/core/index.json", "/@rindo/core/index.mjs", "/@rindo/core/index.css", "/@rindo/package.json" ], fetchModuleAsync = async (e, t, r, n, s) => {
|
|
2172
|
-
if (!((e => {
|
|
2173
|
-
if (!(e => e.endsWith(".d.ts"))(t = e) && t.endsWith(".ts") || (e => e.endsWith(".tsx"))(e)) return !0;
|
|
2174
|
-
var t;
|
|
2175
|
-
const r = e.split("/"), n = r[r.length - 2], s = r[r.length - 1];
|
|
2176
|
-
return !("node_modules" !== n || !isCommonDirModuleFile(s));
|
|
2177
|
-
})(s) || known404Urls.has(n) || (e => knownUrlSkips.some((t => e.endsWith(t))))(n))) try {
|
|
2178
|
-
const o = await ((e, t, r) => e && isFunction(e.fetch) ? e.fetch(t, r) : fetch(t, r))(e, n);
|
|
2179
|
-
if (o) {
|
|
2180
|
-
if (o.ok) {
|
|
2181
|
-
const i = await o.clone().text();
|
|
2182
|
-
return await (async (e, t, r, n, s, o) => {
|
|
2183
|
-
r.endsWith("package.json") && ((e, t) => {
|
|
2184
|
-
try {
|
|
2185
|
-
const r = JSON.parse(t);
|
|
2186
|
-
r.name && r.version && ((e, t, r) => {
|
|
2187
|
-
e.set(t, r);
|
|
2188
|
-
})(e, r.name, r.version);
|
|
2189
|
-
} catch (e) {}
|
|
2190
|
-
})(o, s);
|
|
2191
|
-
let i = path$2.dirname(n);
|
|
2192
|
-
for (;"/" !== i && "" !== i; ) t ? (t.clearFileCache(i), await t.sys.createDir(i)) : await e.createDir(i),
|
|
2193
|
-
i = path$2.dirname(i);
|
|
2194
|
-
t ? (t.clearFileCache(n), await t.sys.writeFile(n, s)) : await e.writeFile(n, s);
|
|
2195
|
-
})(e, t, n, s, i, r), i;
|
|
2196
|
-
}
|
|
2197
|
-
404 === o.status && known404Urls.add(n);
|
|
2198
|
-
}
|
|
2199
|
-
} catch (e) {
|
|
2200
|
-
console.error(e);
|
|
2201
|
-
}
|
|
2202
|
-
};
|
|
2212
|
+
const YELLOW = "#f39c12", RED = "#c0392b", BLUE = "#3498db";
|
|
2203
2213
|
|
|
2204
|
-
|
|
2205
|
-
var t = process.env.HOME, r = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME;
|
|
2206
|
-
return "win32" === process.platform ? process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || t || null : "darwin" === process.platform ? t || (r ? "/Users/" + r : null) : "linux" === process.platform ? t || (0 === process.getuid() ? "/root" : r ? "/home/" + r : null) : t || null;
|
|
2207
|
-
}, caller = function() {
|
|
2214
|
+
caller = function() {
|
|
2208
2215
|
var e, t = Error.prepareStackTrace;
|
|
2209
2216
|
return Error.prepareStackTrace = function(e, t) {
|
|
2210
2217
|
return t;
|
|
@@ -2214,17 +2221,17 @@ homedir$2 = os__default.default.homedir || function e() {
|
|
|
2214
2221
|
path: t,
|
|
2215
2222
|
exports: {},
|
|
2216
2223
|
require: function(e, t) {
|
|
2217
|
-
return function
|
|
2224
|
+
return function s() {
|
|
2218
2225
|
throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
|
|
2219
2226
|
}(null == t && r.path);
|
|
2220
2227
|
}
|
|
2221
2228
|
}, r.exports), r.exports;
|
|
2222
2229
|
}((function(e) {
|
|
2223
|
-
var t, r,
|
|
2230
|
+
var t, r, s = "win32" === process.platform, n = /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/, o = {
|
|
2224
2231
|
parse: function(e) {
|
|
2225
2232
|
if ("string" != typeof e) throw new TypeError("Parameter 'pathString' must be a string, not " + typeof e);
|
|
2226
2233
|
var t = function r(e) {
|
|
2227
|
-
return
|
|
2234
|
+
return n.exec(e).slice(1);
|
|
2228
2235
|
}(e);
|
|
2229
2236
|
if (!t || 5 !== t.length) throw new TypeError("Invalid path '" + e + "'");
|
|
2230
2237
|
return {
|
|
@@ -2238,7 +2245,7 @@ homedir$2 = os__default.default.homedir || function e() {
|
|
|
2238
2245
|
};
|
|
2239
2246
|
t = /^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/, (r = {}).parse = function(e) {
|
|
2240
2247
|
if ("string" != typeof e) throw new TypeError("Parameter 'pathString' must be a string, not " + typeof e);
|
|
2241
|
-
var r = function
|
|
2248
|
+
var r = function s(e) {
|
|
2242
2249
|
return t.exec(e).slice(1);
|
|
2243
2250
|
}(e);
|
|
2244
2251
|
if (!r || 5 !== r.length) throw new TypeError("Invalid path '" + e + "'");
|
|
@@ -2249,208 +2256,136 @@ homedir$2 = os__default.default.homedir || function e() {
|
|
|
2249
2256
|
ext: r[4],
|
|
2250
2257
|
name: r[3]
|
|
2251
2258
|
};
|
|
2252
|
-
}, e.exports =
|
|
2259
|
+
}, e.exports = s ? o.parse : r.parse, e.exports.posix = r.parse, e.exports.win32 = o.parse;
|
|
2253
2260
|
})), parse = path__default.default.parse || pathParse, getNodeModulesDirs = function e(t, r) {
|
|
2254
|
-
var
|
|
2255
|
-
for (/^([A-Za-z]:)/.test(t) ? o = "" : /^\\\\/.test(t) && (o = "\\\\"),
|
|
2256
|
-
|
|
2257
|
-
return
|
|
2261
|
+
var s, n, o = "/";
|
|
2262
|
+
for (/^([A-Za-z]:)/.test(t) ? o = "" : /^\\\\/.test(t) && (o = "\\\\"), s = [ t ],
|
|
2263
|
+
n = parse(t); n.dir !== s[s.length - 1]; ) s.push(n.dir), n = parse(n.dir);
|
|
2264
|
+
return s.reduce((function(e, t) {
|
|
2258
2265
|
return e.concat(r.map((function(e) {
|
|
2259
2266
|
return path__default.default.resolve(o, t, e);
|
|
2260
2267
|
})));
|
|
2261
2268
|
}), []);
|
|
2262
|
-
}, nodeModulesPaths = function e(t, r,
|
|
2263
|
-
var
|
|
2264
|
-
return r && "function" == typeof r.paths ? r.paths(
|
|
2269
|
+
}, nodeModulesPaths = function e(t, r, s) {
|
|
2270
|
+
var n, o = r && r.moduleDirectory ? [].concat(r.moduleDirectory) : [ "node_modules" ];
|
|
2271
|
+
return r && "function" == typeof r.paths ? r.paths(s, t, (function() {
|
|
2265
2272
|
return getNodeModulesDirs(t, o);
|
|
2266
|
-
}), r) : (
|
|
2273
|
+
}), r) : (n = getNodeModulesDirs(t, o), r && r.paths ? n.concat(r.paths) : n);
|
|
2267
2274
|
}, normalizeOptions = function(e, t) {
|
|
2268
2275
|
return t || {};
|
|
2269
2276
|
}, ERROR_MESSAGE = "Function.prototype.bind called on incompatible ", slice = Array.prototype.slice,
|
|
2270
2277
|
toStr = Object.prototype.toString, implementation = function e(t) {
|
|
2271
|
-
var r,
|
|
2278
|
+
var r, s, n, o, i, a, l, c = this;
|
|
2272
2279
|
if ("function" != typeof c || "[object Function]" !== toStr.call(c)) throw new TypeError(ERROR_MESSAGE + c);
|
|
2273
|
-
for (r = slice.call(arguments, 1),
|
|
2274
|
-
if (this instanceof
|
|
2280
|
+
for (r = slice.call(arguments, 1), n = function() {
|
|
2281
|
+
if (this instanceof s) {
|
|
2275
2282
|
var e = c.apply(this, r.concat(slice.call(arguments)));
|
|
2276
2283
|
return Object(e) === e ? e : this;
|
|
2277
2284
|
}
|
|
2278
2285
|
return c.apply(t, r.concat(slice.call(arguments)));
|
|
2279
2286
|
}, o = Math.max(0, c.length - r.length), i = [], a = 0; a < o; a++) i.push("$" + a);
|
|
2280
|
-
return
|
|
2281
|
-
c.prototype && ((l = function e() {}).prototype = c.prototype,
|
|
2282
|
-
l.prototype = null),
|
|
2287
|
+
return s = Function("binder", "return function (" + i.join(",") + "){ return binder.apply(this,arguments); }")(n),
|
|
2288
|
+
c.prototype && ((l = function e() {}).prototype = c.prototype, s.prototype = new l,
|
|
2289
|
+
l.prototype = null), s;
|
|
2283
2290
|
}, functionBind = Function.prototype.bind || implementation, src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
|
|
2284
2291
|
|
|
2285
2292
|
const data$1 = {
|
|
2286
2293
|
assert: !0,
|
|
2287
|
-
"node:assert": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2288
2294
|
"assert/strict": ">= 15",
|
|
2289
|
-
"node:assert/strict": ">= 16",
|
|
2290
2295
|
async_hooks: ">= 8",
|
|
2291
|
-
|
|
2292
|
-
buffer_ieee754: ">= 0.5 && < 0.9.7",
|
|
2296
|
+
buffer_ieee754: "< 0.9.7",
|
|
2293
2297
|
buffer: !0,
|
|
2294
|
-
"node:buffer": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2295
2298
|
child_process: !0,
|
|
2296
|
-
|
|
2297
|
-
cluster: ">= 0.5",
|
|
2298
|
-
"node:cluster": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2299
|
+
cluster: !0,
|
|
2299
2300
|
console: !0,
|
|
2300
|
-
"node:console": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2301
2301
|
constants: !0,
|
|
2302
|
-
"node:constants": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2303
2302
|
crypto: !0,
|
|
2304
|
-
"node:crypto": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2305
2303
|
_debug_agent: ">= 1 && < 8",
|
|
2306
2304
|
_debugger: "< 8",
|
|
2307
2305
|
dgram: !0,
|
|
2308
|
-
|
|
2309
|
-
diagnostics_channel: [ ">= 14.17 && < 15", ">= 15.1" ],
|
|
2310
|
-
"node:diagnostics_channel": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2306
|
+
diagnostics_channel: ">= 15.1",
|
|
2311
2307
|
dns: !0,
|
|
2312
|
-
"node:dns": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2313
2308
|
"dns/promises": ">= 15",
|
|
2314
|
-
"node:dns/promises": ">= 16",
|
|
2315
2309
|
domain: ">= 0.7.12",
|
|
2316
|
-
"node:domain": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2317
2310
|
events: !0,
|
|
2318
|
-
"node:events": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2319
2311
|
freelist: "< 6",
|
|
2320
2312
|
fs: !0,
|
|
2321
|
-
"node:fs": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2322
2313
|
"fs/promises": [ ">= 10 && < 10.1", ">= 14" ],
|
|
2323
|
-
"node:fs/promises": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2324
2314
|
_http_agent: ">= 0.11.1",
|
|
2325
|
-
"node:_http_agent": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2326
2315
|
_http_client: ">= 0.11.1",
|
|
2327
|
-
"node:_http_client": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2328
2316
|
_http_common: ">= 0.11.1",
|
|
2329
|
-
"node:_http_common": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2330
2317
|
_http_incoming: ">= 0.11.1",
|
|
2331
|
-
"node:_http_incoming": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2332
2318
|
_http_outgoing: ">= 0.11.1",
|
|
2333
|
-
"node:_http_outgoing": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2334
2319
|
_http_server: ">= 0.11.1",
|
|
2335
|
-
"node:_http_server": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2336
2320
|
http: !0,
|
|
2337
|
-
"node:http": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2338
2321
|
http2: ">= 8.8",
|
|
2339
|
-
"node:http2": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2340
2322
|
https: !0,
|
|
2341
|
-
|
|
2342
|
-
inspector: ">= 8",
|
|
2343
|
-
"node:inspector": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2323
|
+
inspector: ">= 8.0.0",
|
|
2344
2324
|
_linklist: "< 8",
|
|
2345
2325
|
module: !0,
|
|
2346
|
-
"node:module": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2347
2326
|
net: !0,
|
|
2348
|
-
"node
|
|
2349
|
-
"node-inspect/lib/
|
|
2350
|
-
"node-inspect/lib/internal/
|
|
2351
|
-
"node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12",
|
|
2327
|
+
"node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
|
|
2328
|
+
"node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
|
|
2329
|
+
"node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
|
|
2352
2330
|
os: !0,
|
|
2353
|
-
"node:os": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2354
2331
|
path: !0,
|
|
2355
|
-
"node:path": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2356
2332
|
"path/posix": ">= 15.3",
|
|
2357
|
-
"node:path/posix": ">= 16",
|
|
2358
2333
|
"path/win32": ">= 15.3",
|
|
2359
|
-
"node:path/win32": ">= 16",
|
|
2360
2334
|
perf_hooks: ">= 8.5",
|
|
2361
|
-
"node:perf_hooks": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2362
2335
|
process: ">= 1",
|
|
2363
|
-
|
|
2364
|
-
punycode: ">= 0.5",
|
|
2365
|
-
"node:punycode": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2336
|
+
punycode: !0,
|
|
2366
2337
|
querystring: !0,
|
|
2367
|
-
"node:querystring": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2368
2338
|
readline: !0,
|
|
2369
|
-
"node:readline": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2370
|
-
"readline/promises": ">= 17",
|
|
2371
|
-
"node:readline/promises": ">= 17",
|
|
2372
2339
|
repl: !0,
|
|
2373
|
-
"node:repl": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2374
2340
|
smalloc: ">= 0.11.5 && < 3",
|
|
2375
2341
|
_stream_duplex: ">= 0.9.4",
|
|
2376
|
-
"node:_stream_duplex": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2377
2342
|
_stream_transform: ">= 0.9.4",
|
|
2378
|
-
"node:_stream_transform": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2379
2343
|
_stream_wrap: ">= 1.4.1",
|
|
2380
|
-
"node:_stream_wrap": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2381
2344
|
_stream_passthrough: ">= 0.9.4",
|
|
2382
|
-
"node:_stream_passthrough": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2383
2345
|
_stream_readable: ">= 0.9.4",
|
|
2384
|
-
"node:_stream_readable": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2385
2346
|
_stream_writable: ">= 0.9.4",
|
|
2386
|
-
"node:_stream_writable": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2387
2347
|
stream: !0,
|
|
2388
|
-
"node:stream": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2389
|
-
"stream/consumers": ">= 16.7",
|
|
2390
|
-
"node:stream/consumers": ">= 16.7",
|
|
2391
2348
|
"stream/promises": ">= 15",
|
|
2392
|
-
"node:stream/promises": ">= 16",
|
|
2393
|
-
"stream/web": ">= 16.5",
|
|
2394
|
-
"node:stream/web": ">= 16.5",
|
|
2395
2349
|
string_decoder: !0,
|
|
2396
|
-
|
|
2397
|
-
sys: [ ">= 0.4 && < 0.7", ">= 0.8" ],
|
|
2398
|
-
"node:sys": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2399
|
-
"node:test": [ ">= 16.17 && < 17", ">= 18" ],
|
|
2350
|
+
sys: [ ">= 0.6 && < 0.7", ">= 0.8" ],
|
|
2400
2351
|
timers: !0,
|
|
2401
|
-
"node:timers": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2402
2352
|
"timers/promises": ">= 15",
|
|
2403
|
-
"node:timers/promises": ">= 16",
|
|
2404
2353
|
_tls_common: ">= 0.11.13",
|
|
2405
|
-
"node:_tls_common": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2406
2354
|
_tls_legacy: ">= 0.11.3 && < 10",
|
|
2407
2355
|
_tls_wrap: ">= 0.11.3",
|
|
2408
|
-
"node:_tls_wrap": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2409
2356
|
tls: !0,
|
|
2410
|
-
"node:tls": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2411
2357
|
trace_events: ">= 10",
|
|
2412
|
-
"node:trace_events": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2413
2358
|
tty: !0,
|
|
2414
|
-
"node:tty": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2415
2359
|
url: !0,
|
|
2416
|
-
"node:url": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2417
2360
|
util: !0,
|
|
2418
|
-
"node:util": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2419
2361
|
"util/types": ">= 15.3",
|
|
2420
|
-
"node:util/types": ">= 16",
|
|
2421
2362
|
"v8/tools/arguments": ">= 10 && < 12",
|
|
2422
|
-
"v8/tools/codemap": [ ">= 4.4 && < 5", ">= 5.2 && < 12" ],
|
|
2423
|
-
"v8/tools/consarray": [ ">= 4.4 && < 5", ">= 5.2 && < 12" ],
|
|
2424
|
-
"v8/tools/csvparser": [ ">= 4.4 && < 5", ">= 5.2 && < 12" ],
|
|
2425
|
-
"v8/tools/logreader": [ ">= 4.4 && < 5", ">= 5.2 && < 12" ],
|
|
2426
|
-
"v8/tools/profile_view": [ ">= 4.4 && < 5", ">= 5.2 && < 12" ],
|
|
2427
|
-
"v8/tools/splaytree": [ ">= 4.4 && < 5", ">= 5.2 && < 12" ],
|
|
2363
|
+
"v8/tools/codemap": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
|
|
2364
|
+
"v8/tools/consarray": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
|
|
2365
|
+
"v8/tools/csvparser": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
|
|
2366
|
+
"v8/tools/logreader": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
|
|
2367
|
+
"v8/tools/profile_view": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
|
|
2368
|
+
"v8/tools/splaytree": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
|
|
2428
2369
|
v8: ">= 1",
|
|
2429
|
-
"node:v8": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2430
2370
|
vm: !0,
|
|
2431
|
-
"node:vm": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2432
2371
|
wasi: ">= 13.4 && < 13.5",
|
|
2433
2372
|
worker_threads: ">= 11.7",
|
|
2434
|
-
|
|
2435
|
-
zlib: ">= 0.5",
|
|
2436
|
-
"node:zlib": [ ">= 14.18 && < 15", ">= 16" ]
|
|
2373
|
+
zlib: !0
|
|
2437
2374
|
};
|
|
2438
2375
|
|
|
2439
2376
|
isCoreModule = function e(t, r) {
|
|
2440
|
-
return src(data$1, t) && function
|
|
2441
|
-
var r,
|
|
2377
|
+
return src(data$1, t) && function s(e, t) {
|
|
2378
|
+
var r, s;
|
|
2442
2379
|
if ("boolean" == typeof t) return t;
|
|
2443
|
-
if ("string" != typeof (r = void 0 === e ? process.versions && process.versions.node : e)) throw new TypeError(void 0 === e ? "Unable to determine current node version" : "If provided, a valid node version is required");
|
|
2380
|
+
if ("string" != typeof (r = void 0 === e ? process.versions && process.versions.node && process.versions.node : e)) throw new TypeError(void 0 === e ? "Unable to determine current node version" : "If provided, a valid node version is required");
|
|
2444
2381
|
if (t && "object" == typeof t) {
|
|
2445
|
-
for (
|
|
2382
|
+
for (s = 0; s < t.length; ++s) if (matchesRange$1(r, t[s])) return !0;
|
|
2446
2383
|
return !1;
|
|
2447
2384
|
}
|
|
2448
2385
|
return matchesRange$1(r, t);
|
|
2449
2386
|
}(r, data$1[t]);
|
|
2450
|
-
}, realpathFS$1 =
|
|
2451
|
-
|
|
2452
|
-
return [ path__default.default.join(homedir$1, ".node_modules"), path__default.default.join(homedir$1, ".node_libraries") ];
|
|
2453
|
-
}, defaultIsFile$1 = function e(t, r) {
|
|
2387
|
+
}, realpathFS$1 = fs__default.default.realpath && "function" == typeof fs__default.default.realpath.native ? fs__default.default.realpath.native : fs__default.default.realpath,
|
|
2388
|
+
defaultIsFile$1 = function e(t, r) {
|
|
2454
2389
|
fs__default.default.stat(t, (function(e, t) {
|
|
2455
2390
|
return e ? "ENOENT" === e.code || "ENOTDIR" === e.code ? r(null, !1) : r(e) : r(null, t.isFile() || t.isFIFO());
|
|
2456
2391
|
}));
|
|
@@ -2459,117 +2394,117 @@ homedir$1 = homedir$2(), defaultPaths$1 = function() {
|
|
|
2459
2394
|
return e ? "ENOENT" === e.code || "ENOTDIR" === e.code ? r(null, !1) : r(e) : r(null, t.isDirectory());
|
|
2460
2395
|
}));
|
|
2461
2396
|
}, defaultRealpath = function e(t, r) {
|
|
2462
|
-
realpathFS$1(t, (function(e,
|
|
2463
|
-
e && "ENOENT" !== e.code ? r(e) : r(null, e ? t :
|
|
2397
|
+
realpathFS$1(t, (function(e, s) {
|
|
2398
|
+
e && "ENOENT" !== e.code ? r(e) : r(null, e ? t : s);
|
|
2464
2399
|
}));
|
|
2465
|
-
}, maybeRealpath = function e(t, r,
|
|
2466
|
-
|
|
2467
|
-
}, defaultReadPackage = function e(t, r,
|
|
2400
|
+
}, maybeRealpath = function e(t, r, s, n) {
|
|
2401
|
+
s && !1 === s.preserveSymlinks ? t(r, n) : n(null, r);
|
|
2402
|
+
}, defaultReadPackage = function e(t, r, s) {
|
|
2468
2403
|
t(r, (function(e, t) {
|
|
2469
|
-
if (e)
|
|
2404
|
+
if (e) s(e); else try {
|
|
2470
2405
|
var r = JSON.parse(t);
|
|
2471
|
-
|
|
2406
|
+
s(null, r);
|
|
2472
2407
|
} catch (e) {
|
|
2473
|
-
|
|
2408
|
+
s(null);
|
|
2474
2409
|
}
|
|
2475
2410
|
}));
|
|
2476
|
-
}, getPackageCandidates$1 = function e(t, r,
|
|
2477
|
-
var
|
|
2478
|
-
for (
|
|
2411
|
+
}, getPackageCandidates$1 = function e(t, r, s) {
|
|
2412
|
+
var n, o = nodeModulesPaths(r, s, t);
|
|
2413
|
+
for (n = 0; n < o.length; n++) o[n] = path__default.default.join(o[n], t);
|
|
2479
2414
|
return o;
|
|
2480
|
-
}, async = function e(t, r,
|
|
2481
|
-
function
|
|
2415
|
+
}, async = function e(t, r, s) {
|
|
2416
|
+
function n(e) {
|
|
2482
2417
|
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t)) T = path__default.default.resolve(e, t),
|
|
2483
2418
|
"." !== t && ".." !== t && "/" !== t.slice(-1) || (T += "/"), /\/$/.test(t) && T === e ? l(T, S.package, o) : i(T, S.package, o); else {
|
|
2484
2419
|
if (_ && isCoreModule(t)) return D(null, t);
|
|
2485
|
-
!function r(e, t,
|
|
2486
|
-
var
|
|
2420
|
+
!function r(e, t, s) {
|
|
2421
|
+
var n = function() {
|
|
2487
2422
|
return getPackageCandidates$1(e, t, S);
|
|
2488
2423
|
};
|
|
2489
|
-
c(
|
|
2490
|
-
}(t, e, (function(e, r,
|
|
2424
|
+
c(s, y ? y(e, t, n, S) : n());
|
|
2425
|
+
}(t, e, (function(e, r, s) {
|
|
2491
2426
|
if (e) D(e); else {
|
|
2492
2427
|
if (r) return maybeRealpath(f, r, S, (function(e, t) {
|
|
2493
|
-
e ? D(e) : D(null, t,
|
|
2428
|
+
e ? D(e) : D(null, t, s);
|
|
2494
2429
|
}));
|
|
2495
|
-
var
|
|
2496
|
-
|
|
2430
|
+
var n = new Error("Cannot find module '" + t + "' from '" + b + "'");
|
|
2431
|
+
n.code = "MODULE_NOT_FOUND", D(n);
|
|
2497
2432
|
}
|
|
2498
2433
|
}));
|
|
2499
2434
|
}
|
|
2500
2435
|
}
|
|
2501
|
-
function o(e, r,
|
|
2502
|
-
e ? D(e) : r ? D(null, r,
|
|
2436
|
+
function o(e, r, s) {
|
|
2437
|
+
e ? D(e) : r ? D(null, r, s) : l(T, (function(e, r, s) {
|
|
2503
2438
|
if (e) D(e); else if (r) maybeRealpath(f, r, S, (function(e, t) {
|
|
2504
|
-
e ? D(e) : D(null, t,
|
|
2439
|
+
e ? D(e) : D(null, t, s);
|
|
2505
2440
|
})); else {
|
|
2506
|
-
var
|
|
2507
|
-
|
|
2441
|
+
var n = new Error("Cannot find module '" + t + "' from '" + b + "'");
|
|
2442
|
+
n.code = "MODULE_NOT_FOUND", D(n);
|
|
2508
2443
|
}
|
|
2509
2444
|
}));
|
|
2510
2445
|
}
|
|
2511
2446
|
function i(e, t, r) {
|
|
2512
|
-
var
|
|
2513
|
-
"function" == typeof
|
|
2514
|
-
function o(
|
|
2447
|
+
var s = t, n = r;
|
|
2448
|
+
"function" == typeof s && (n = s, s = void 0), function e(t, r, s) {
|
|
2449
|
+
function o(s, o, a) {
|
|
2515
2450
|
var u, h, p;
|
|
2516
|
-
return c = o,
|
|
2451
|
+
return c = o, s ? n(s) : a && c && S.pathFilter && (h = (u = path__default.default.relative(a, l)).slice(0, u.length - t[0].length),
|
|
2517
2452
|
p = S.pathFilter(c, r, h)) ? e([ "" ].concat(w.slice()), path__default.default.resolve(a, p), c) : void d(l, i);
|
|
2518
2453
|
}
|
|
2519
|
-
function i(
|
|
2520
|
-
return
|
|
2454
|
+
function i(s, o) {
|
|
2455
|
+
return s ? n(s) : o ? n(null, l, c) : void e(t.slice(1), r, c);
|
|
2521
2456
|
}
|
|
2522
2457
|
var l, c;
|
|
2523
|
-
if (0 === t.length) return
|
|
2524
|
-
l = r + t[0], (c =
|
|
2525
|
-
}([ "" ].concat(w), e,
|
|
2458
|
+
if (0 === t.length) return n(null, void 0, s);
|
|
2459
|
+
l = r + t[0], (c = s) ? o(null, c) : a(path__default.default.dirname(l), o);
|
|
2460
|
+
}([ "" ].concat(w), e, s);
|
|
2526
2461
|
}
|
|
2527
2462
|
function a(e, t) {
|
|
2528
|
-
return "" === e || "/" === e || "win32" === process.platform && /^\w:[/\\]*$/.test(e) || /[/\\]node_modules[/\\]*$/.test(e) ? t(null) : void maybeRealpath(f, e, S, (function(r,
|
|
2463
|
+
return "" === e || "/" === e || "win32" === process.platform && /^\w:[/\\]*$/.test(e) || /[/\\]node_modules[/\\]*$/.test(e) ? t(null) : void maybeRealpath(f, e, S, (function(r, s) {
|
|
2529
2464
|
if (r) return a(path__default.default.dirname(e), t);
|
|
2530
|
-
var
|
|
2531
|
-
d(
|
|
2532
|
-
if (!
|
|
2533
|
-
m(p,
|
|
2465
|
+
var n = path__default.default.join(s, "package.json");
|
|
2466
|
+
d(n, (function(r, s) {
|
|
2467
|
+
if (!s) return a(path__default.default.dirname(e), t);
|
|
2468
|
+
m(p, n, (function(r, s) {
|
|
2534
2469
|
r && t(r);
|
|
2535
|
-
var o =
|
|
2536
|
-
o && S.packageFilter && (o = S.packageFilter(o,
|
|
2470
|
+
var o = s;
|
|
2471
|
+
o && S.packageFilter && (o = S.packageFilter(o, n)), t(null, o, e);
|
|
2537
2472
|
}));
|
|
2538
2473
|
}));
|
|
2539
2474
|
}));
|
|
2540
2475
|
}
|
|
2541
2476
|
function l(e, t, r) {
|
|
2542
|
-
var
|
|
2543
|
-
"function" == typeof
|
|
2544
|
-
if (t) return
|
|
2477
|
+
var s = r, n = t;
|
|
2478
|
+
"function" == typeof n && (s = n, n = S.package), maybeRealpath(f, e, S, (function(t, r) {
|
|
2479
|
+
if (t) return s(t);
|
|
2545
2480
|
var o = path__default.default.join(r, "package.json");
|
|
2546
2481
|
d(o, (function(t, r) {
|
|
2547
|
-
return t ?
|
|
2548
|
-
var
|
|
2549
|
-
return t ?
|
|
2550
|
-
|
|
2551
|
-
return t ?
|
|
2552
|
-
return t ?
|
|
2553
|
-
})) : i(path__default.default.join(e, "index"),
|
|
2554
|
-
}))) : void i(path__default.default.join(e, "/index"),
|
|
2555
|
-
})) : i(path__default.default.join(e, "index"),
|
|
2482
|
+
return t ? s(t) : r ? void m(p, o, (function(t, r) {
|
|
2483
|
+
var n, a;
|
|
2484
|
+
return t ? s(t) : ((n = r) && S.packageFilter && (n = S.packageFilter(n, o)), n && n.main ? "string" != typeof n.main ? ((a = new TypeError("package “" + n.name + "” `main` must be a string")).code = "INVALID_PACKAGE_MAIN",
|
|
2485
|
+
s(a)) : ("." !== n.main && "./" !== n.main || (n.main = "index"), void i(path__default.default.resolve(e, n.main), n, (function(t, r, n) {
|
|
2486
|
+
return t ? s(t) : r ? s(null, r, n) : n ? void l(path__default.default.resolve(e, n.main), n, (function(t, r, n) {
|
|
2487
|
+
return t ? s(t) : r ? s(null, r, n) : void i(path__default.default.join(e, "index"), n, s);
|
|
2488
|
+
})) : i(path__default.default.join(e, "index"), n, s);
|
|
2489
|
+
}))) : void i(path__default.default.join(e, "/index"), n, s));
|
|
2490
|
+
})) : i(path__default.default.join(e, "index"), n, s);
|
|
2556
2491
|
}));
|
|
2557
2492
|
}));
|
|
2558
2493
|
}
|
|
2559
2494
|
function c(e, t) {
|
|
2560
2495
|
function r(t, r, o) {
|
|
2561
|
-
return t ? e(t) : r ? e(null, r, o) : void l(
|
|
2496
|
+
return t ? e(t) : r ? e(null, r, o) : void l(n, S.package, s);
|
|
2562
2497
|
}
|
|
2563
|
-
function
|
|
2564
|
-
return r ? e(r) :
|
|
2498
|
+
function s(r, s, n) {
|
|
2499
|
+
return r ? e(r) : s ? e(null, s, n) : void c(e, t.slice(1));
|
|
2565
2500
|
}
|
|
2566
2501
|
if (0 === t.length) return e(null, void 0);
|
|
2567
|
-
var
|
|
2568
|
-
h(path__default.default.dirname(
|
|
2569
|
-
return
|
|
2502
|
+
var n = t[0];
|
|
2503
|
+
h(path__default.default.dirname(n), (function o(s, a) {
|
|
2504
|
+
return s ? e(s) : a ? void i(n, S.package, r) : c(e, t.slice(1));
|
|
2570
2505
|
}));
|
|
2571
2506
|
}
|
|
2572
|
-
var u, d, h, p, f, m, g, y, w, _, v, b, E, T, D =
|
|
2507
|
+
var u, d, h, p, f, m, g, y, w, _, v, b, E, T, D = s, S = r;
|
|
2573
2508
|
return "function" == typeof r && (D = S, S = {}), "string" != typeof t ? (u = new TypeError("Path must be a string."),
|
|
2574
2509
|
process.nextTick((function() {
|
|
2575
2510
|
D(u);
|
|
@@ -2579,164 +2514,94 @@ homedir$1 = homedir$2(), defaultPaths$1 = function() {
|
|
|
2579
2514
|
process.nextTick((function() {
|
|
2580
2515
|
D(g);
|
|
2581
2516
|
}))) : (y = S.packageIterator, w = S.extensions || [ ".js" ], _ = !1 !== S.includeCoreModules,
|
|
2582
|
-
v = S.basedir || path__default.default.dirname(caller()), b = S.filename || v, S.paths = S.paths ||
|
|
2517
|
+
v = S.basedir || path__default.default.dirname(caller()), b = S.filename || v, S.paths = S.paths || [],
|
|
2583
2518
|
E = path__default.default.resolve(v), void maybeRealpath(f, E, S, (function(e, t) {
|
|
2584
|
-
e ? D(e) :
|
|
2519
|
+
e ? D(e) : n(t);
|
|
2585
2520
|
}))));
|
|
2586
2521
|
};
|
|
2587
2522
|
|
|
2588
2523
|
const data = {
|
|
2589
2524
|
assert: !0,
|
|
2590
|
-
"node:assert": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2591
2525
|
"assert/strict": ">= 15",
|
|
2592
|
-
"node:assert/strict": ">= 16",
|
|
2593
2526
|
async_hooks: ">= 8",
|
|
2594
|
-
|
|
2595
|
-
buffer_ieee754: ">= 0.5 && < 0.9.7",
|
|
2527
|
+
buffer_ieee754: "< 0.9.7",
|
|
2596
2528
|
buffer: !0,
|
|
2597
|
-
"node:buffer": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2598
2529
|
child_process: !0,
|
|
2599
|
-
|
|
2600
|
-
cluster: ">= 0.5",
|
|
2601
|
-
"node:cluster": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2530
|
+
cluster: !0,
|
|
2602
2531
|
console: !0,
|
|
2603
|
-
"node:console": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2604
2532
|
constants: !0,
|
|
2605
|
-
"node:constants": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2606
2533
|
crypto: !0,
|
|
2607
|
-
"node:crypto": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2608
2534
|
_debug_agent: ">= 1 && < 8",
|
|
2609
2535
|
_debugger: "< 8",
|
|
2610
2536
|
dgram: !0,
|
|
2611
|
-
|
|
2612
|
-
diagnostics_channel: [ ">= 14.17 && < 15", ">= 15.1" ],
|
|
2613
|
-
"node:diagnostics_channel": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2537
|
+
diagnostics_channel: ">= 15.1",
|
|
2614
2538
|
dns: !0,
|
|
2615
|
-
"node:dns": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2616
2539
|
"dns/promises": ">= 15",
|
|
2617
|
-
"node:dns/promises": ">= 16",
|
|
2618
2540
|
domain: ">= 0.7.12",
|
|
2619
|
-
"node:domain": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2620
2541
|
events: !0,
|
|
2621
|
-
"node:events": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2622
2542
|
freelist: "< 6",
|
|
2623
2543
|
fs: !0,
|
|
2624
|
-
"node:fs": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2625
2544
|
"fs/promises": [ ">= 10 && < 10.1", ">= 14" ],
|
|
2626
|
-
"node:fs/promises": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2627
2545
|
_http_agent: ">= 0.11.1",
|
|
2628
|
-
"node:_http_agent": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2629
2546
|
_http_client: ">= 0.11.1",
|
|
2630
|
-
"node:_http_client": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2631
2547
|
_http_common: ">= 0.11.1",
|
|
2632
|
-
"node:_http_common": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2633
2548
|
_http_incoming: ">= 0.11.1",
|
|
2634
|
-
"node:_http_incoming": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2635
2549
|
_http_outgoing: ">= 0.11.1",
|
|
2636
|
-
"node:_http_outgoing": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2637
2550
|
_http_server: ">= 0.11.1",
|
|
2638
|
-
"node:_http_server": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2639
2551
|
http: !0,
|
|
2640
|
-
"node:http": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2641
2552
|
http2: ">= 8.8",
|
|
2642
|
-
"node:http2": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2643
2553
|
https: !0,
|
|
2644
|
-
|
|
2645
|
-
inspector: ">= 8",
|
|
2646
|
-
"node:inspector": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2554
|
+
inspector: ">= 8.0.0",
|
|
2647
2555
|
_linklist: "< 8",
|
|
2648
2556
|
module: !0,
|
|
2649
|
-
"node:module": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2650
2557
|
net: !0,
|
|
2651
|
-
"node
|
|
2652
|
-
"node-inspect/lib/
|
|
2653
|
-
"node-inspect/lib/internal/
|
|
2654
|
-
"node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12",
|
|
2558
|
+
"node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
|
|
2559
|
+
"node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
|
|
2560
|
+
"node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
|
|
2655
2561
|
os: !0,
|
|
2656
|
-
"node:os": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2657
2562
|
path: !0,
|
|
2658
|
-
"node:path": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2659
2563
|
"path/posix": ">= 15.3",
|
|
2660
|
-
"node:path/posix": ">= 16",
|
|
2661
2564
|
"path/win32": ">= 15.3",
|
|
2662
|
-
"node:path/win32": ">= 16",
|
|
2663
2565
|
perf_hooks: ">= 8.5",
|
|
2664
|
-
"node:perf_hooks": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2665
2566
|
process: ">= 1",
|
|
2666
|
-
|
|
2667
|
-
punycode: ">= 0.5",
|
|
2668
|
-
"node:punycode": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2567
|
+
punycode: !0,
|
|
2669
2568
|
querystring: !0,
|
|
2670
|
-
"node:querystring": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2671
2569
|
readline: !0,
|
|
2672
|
-
"node:readline": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2673
|
-
"readline/promises": ">= 17",
|
|
2674
|
-
"node:readline/promises": ">= 17",
|
|
2675
2570
|
repl: !0,
|
|
2676
|
-
"node:repl": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2677
2571
|
smalloc: ">= 0.11.5 && < 3",
|
|
2678
2572
|
_stream_duplex: ">= 0.9.4",
|
|
2679
|
-
"node:_stream_duplex": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2680
2573
|
_stream_transform: ">= 0.9.4",
|
|
2681
|
-
"node:_stream_transform": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2682
2574
|
_stream_wrap: ">= 1.4.1",
|
|
2683
|
-
"node:_stream_wrap": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2684
2575
|
_stream_passthrough: ">= 0.9.4",
|
|
2685
|
-
"node:_stream_passthrough": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2686
2576
|
_stream_readable: ">= 0.9.4",
|
|
2687
|
-
"node:_stream_readable": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2688
2577
|
_stream_writable: ">= 0.9.4",
|
|
2689
|
-
"node:_stream_writable": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2690
2578
|
stream: !0,
|
|
2691
|
-
"node:stream": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2692
|
-
"stream/consumers": ">= 16.7",
|
|
2693
|
-
"node:stream/consumers": ">= 16.7",
|
|
2694
2579
|
"stream/promises": ">= 15",
|
|
2695
|
-
"node:stream/promises": ">= 16",
|
|
2696
|
-
"stream/web": ">= 16.5",
|
|
2697
|
-
"node:stream/web": ">= 16.5",
|
|
2698
2580
|
string_decoder: !0,
|
|
2699
|
-
|
|
2700
|
-
sys: [ ">= 0.4 && < 0.7", ">= 0.8" ],
|
|
2701
|
-
"node:sys": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2702
|
-
"node:test": ">= 18",
|
|
2581
|
+
sys: [ ">= 0.6 && < 0.7", ">= 0.8" ],
|
|
2703
2582
|
timers: !0,
|
|
2704
|
-
"node:timers": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2705
2583
|
"timers/promises": ">= 15",
|
|
2706
|
-
"node:timers/promises": ">= 16",
|
|
2707
2584
|
_tls_common: ">= 0.11.13",
|
|
2708
|
-
"node:_tls_common": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2709
2585
|
_tls_legacy: ">= 0.11.3 && < 10",
|
|
2710
2586
|
_tls_wrap: ">= 0.11.3",
|
|
2711
|
-
"node:_tls_wrap": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2712
2587
|
tls: !0,
|
|
2713
|
-
"node:tls": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2714
2588
|
trace_events: ">= 10",
|
|
2715
|
-
"node:trace_events": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2716
2589
|
tty: !0,
|
|
2717
|
-
"node:tty": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2718
2590
|
url: !0,
|
|
2719
|
-
"node:url": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2720
2591
|
util: !0,
|
|
2721
|
-
"node:util": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2722
2592
|
"util/types": ">= 15.3",
|
|
2723
|
-
"node:util/types": ">= 16",
|
|
2724
2593
|
"v8/tools/arguments": ">= 10 && < 12",
|
|
2725
|
-
"v8/tools/codemap": [ ">= 4.4 && < 5", ">= 5.2 && < 12" ],
|
|
2726
|
-
"v8/tools/consarray": [ ">= 4.4 && < 5", ">= 5.2 && < 12" ],
|
|
2727
|
-
"v8/tools/csvparser": [ ">= 4.4 && < 5", ">= 5.2 && < 12" ],
|
|
2728
|
-
"v8/tools/logreader": [ ">= 4.4 && < 5", ">= 5.2 && < 12" ],
|
|
2729
|
-
"v8/tools/profile_view": [ ">= 4.4 && < 5", ">= 5.2 && < 12" ],
|
|
2730
|
-
"v8/tools/splaytree": [ ">= 4.4 && < 5", ">= 5.2 && < 12" ],
|
|
2594
|
+
"v8/tools/codemap": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
|
|
2595
|
+
"v8/tools/consarray": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
|
|
2596
|
+
"v8/tools/csvparser": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
|
|
2597
|
+
"v8/tools/logreader": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
|
|
2598
|
+
"v8/tools/profile_view": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
|
|
2599
|
+
"v8/tools/splaytree": [ ">= 4.4.0 && < 5", ">= 5.2.0 && < 12" ],
|
|
2731
2600
|
v8: ">= 1",
|
|
2732
|
-
"node:v8": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2733
2601
|
vm: !0,
|
|
2734
|
-
"node:vm": [ ">= 14.18 && < 15", ">= 16" ],
|
|
2735
2602
|
wasi: ">= 13.4 && < 13.5",
|
|
2736
2603
|
worker_threads: ">= 11.7",
|
|
2737
|
-
|
|
2738
|
-
zlib: ">= 0.5",
|
|
2739
|
-
"node:zlib": [ ">= 14.18 && < 15", ">= 16" ]
|
|
2604
|
+
zlib: !0
|
|
2740
2605
|
};
|
|
2741
2606
|
|
|
2742
2607
|
for (mod in current = process.versions && process.versions.node && process.versions.node.split(".") || [],
|
|
@@ -2744,29 +2609,23 @@ core = {}, data) Object.prototype.hasOwnProperty.call(data, mod) && (core[mod] =
|
|
|
2744
2609
|
|
|
2745
2610
|
core_1 = core, isCore = function e(t) {
|
|
2746
2611
|
return isCoreModule(t);
|
|
2747
|
-
}, realpathFS =
|
|
2748
|
-
|
|
2749
|
-
return [ path__default.default.join(homedir, ".node_modules"), path__default.default.join(homedir, ".node_libraries") ];
|
|
2750
|
-
}, defaultIsFile = function e(t) {
|
|
2612
|
+
}, realpathFS = fs__default.default.realpathSync && "function" == typeof fs__default.default.realpathSync.native ? fs__default.default.realpathSync.native : fs__default.default.realpathSync,
|
|
2613
|
+
defaultIsFile = function e(t) {
|
|
2751
2614
|
try {
|
|
2752
|
-
var r = fs__default.default.statSync(t
|
|
2753
|
-
throwIfNoEntry: !1
|
|
2754
|
-
});
|
|
2615
|
+
var r = fs__default.default.statSync(t);
|
|
2755
2616
|
} catch (e) {
|
|
2756
2617
|
if (e && ("ENOENT" === e.code || "ENOTDIR" === e.code)) return !1;
|
|
2757
2618
|
throw e;
|
|
2758
2619
|
}
|
|
2759
|
-
return
|
|
2620
|
+
return r.isFile() || r.isFIFO();
|
|
2760
2621
|
}, defaultIsDir = function e(t) {
|
|
2761
2622
|
try {
|
|
2762
|
-
var r = fs__default.default.statSync(t
|
|
2763
|
-
throwIfNoEntry: !1
|
|
2764
|
-
});
|
|
2623
|
+
var r = fs__default.default.statSync(t);
|
|
2765
2624
|
} catch (e) {
|
|
2766
2625
|
if (e && ("ENOENT" === e.code || "ENOTDIR" === e.code)) return !1;
|
|
2767
2626
|
throw e;
|
|
2768
2627
|
}
|
|
2769
|
-
return
|
|
2628
|
+
return r.isDirectory();
|
|
2770
2629
|
}, defaultRealpathSync = function e(t) {
|
|
2771
2630
|
try {
|
|
2772
2631
|
return realpathFS(t);
|
|
@@ -2774,35 +2633,35 @@ homedir = homedir$2(), defaultPaths = function() {
|
|
|
2774
2633
|
if ("ENOENT" !== e.code) throw e;
|
|
2775
2634
|
}
|
|
2776
2635
|
return t;
|
|
2777
|
-
}, maybeRealpathSync = function e(t, r,
|
|
2778
|
-
return
|
|
2636
|
+
}, maybeRealpathSync = function e(t, r, s) {
|
|
2637
|
+
return s && !1 === s.preserveSymlinks ? t(r) : r;
|
|
2779
2638
|
}, defaultReadPackageSync = function e(t, r) {
|
|
2780
|
-
var
|
|
2639
|
+
var s = t(r);
|
|
2781
2640
|
try {
|
|
2782
|
-
return JSON.parse(
|
|
2641
|
+
return JSON.parse(s);
|
|
2783
2642
|
} catch (e) {}
|
|
2784
|
-
}, getPackageCandidates = function e(t, r,
|
|
2785
|
-
var
|
|
2786
|
-
for (
|
|
2643
|
+
}, getPackageCandidates = function e(t, r, s) {
|
|
2644
|
+
var n, o = nodeModulesPaths(r, s, t);
|
|
2645
|
+
for (n = 0; n < o.length; n++) o[n] = path__default.default.join(o[n], t);
|
|
2787
2646
|
return o;
|
|
2788
2647
|
}, sync = function e(t, r) {
|
|
2789
|
-
function
|
|
2790
|
-
var t, r,
|
|
2648
|
+
function s(e) {
|
|
2649
|
+
var t, r, s, o, l = n(path__default.default.dirname(e));
|
|
2791
2650
|
if (l && l.dir && l.pkg && i.pathFilter && (t = path__default.default.relative(l.dir, e),
|
|
2792
2651
|
(r = i.pathFilter(l.pkg, e, t)) && (e = path__default.default.resolve(l.dir, r))),
|
|
2793
2652
|
a(e)) return e;
|
|
2794
|
-
for (
|
|
2653
|
+
for (s = 0; s < p.length; s++) if (o = e + p[s], a(o)) return o;
|
|
2795
2654
|
}
|
|
2796
|
-
function
|
|
2655
|
+
function n(e) {
|
|
2797
2656
|
var t, r;
|
|
2798
2657
|
if ("" !== e && "/" !== e && !("win32" === process.platform && /^\w:[/\\]*$/.test(e) || /[/\\]node_modules[/\\]*$/.test(e))) return t = path__default.default.join(maybeRealpathSync(u, e, i), "package.json"),
|
|
2799
2658
|
a(t) ? ((r = d(l, t)) && i.packageFilter && (r = i.packageFilter(r, e)), {
|
|
2800
2659
|
pkg: r,
|
|
2801
2660
|
dir: e
|
|
2802
|
-
}) :
|
|
2661
|
+
}) : n(path__default.default.dirname(e));
|
|
2803
2662
|
}
|
|
2804
2663
|
function o(e) {
|
|
2805
|
-
var t, r,
|
|
2664
|
+
var t, r, n, c, h = path__default.default.join(maybeRealpathSync(u, e, i), "/package.json");
|
|
2806
2665
|
if (a(h)) {
|
|
2807
2666
|
try {
|
|
2808
2667
|
t = d(l, h);
|
|
@@ -2812,12 +2671,12 @@ homedir = homedir$2(), defaultPaths = function() {
|
|
|
2812
2671
|
r;
|
|
2813
2672
|
"." !== t.main && "./" !== t.main || (t.main = "index");
|
|
2814
2673
|
try {
|
|
2815
|
-
if (
|
|
2674
|
+
if (n = s(path__default.default.resolve(e, t.main))) return n;
|
|
2816
2675
|
if (c = o(path__default.default.resolve(e, t.main))) return c;
|
|
2817
2676
|
} catch (e) {}
|
|
2818
2677
|
}
|
|
2819
2678
|
}
|
|
2820
|
-
return
|
|
2679
|
+
return s(path__default.default.join(e, "/index"));
|
|
2821
2680
|
}
|
|
2822
2681
|
var i, a, l, c, u, d, h, p, f, m, g, y, w, _, v, b;
|
|
2823
2682
|
if ("string" != typeof t) throw new TypeError("Path must be a string.");
|
|
@@ -2825,28 +2684,96 @@ homedir = homedir$2(), defaultPaths = function() {
|
|
|
2825
2684
|
c = i.isDirectory || defaultIsDir, u = i.realpathSync || defaultRealpathSync, d = i.readPackageSync || defaultReadPackageSync,
|
|
2826
2685
|
i.readFileSync && i.readPackageSync) throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");
|
|
2827
2686
|
if (h = i.packageIterator, p = i.extensions || [ ".js" ], f = !1 !== i.includeCoreModules,
|
|
2828
|
-
m = i.basedir || path__default.default.dirname(caller()), g = i.filename || m, i.paths = i.paths ||
|
|
2687
|
+
m = i.basedir || path__default.default.dirname(caller()), g = i.filename || m, i.paths = i.paths || [],
|
|
2829
2688
|
y = maybeRealpathSync(u, path__default.default.resolve(m), i), /^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t)) {
|
|
2830
2689
|
if (w = path__default.default.resolve(y, t), "." !== t && ".." !== t && "/" !== t.slice(-1) || (w += "/"),
|
|
2831
|
-
_ =
|
|
2690
|
+
_ = s(w) || o(w)) return maybeRealpathSync(u, _, i);
|
|
2832
2691
|
} else {
|
|
2833
2692
|
if (f && isCoreModule(t)) return t;
|
|
2834
2693
|
if (v = function E(e, t) {
|
|
2835
|
-
var r,
|
|
2694
|
+
var r, n, a, l, u = function() {
|
|
2836
2695
|
return getPackageCandidates(e, t, i);
|
|
2837
2696
|
}, d = h ? h(e, t, u, i) : u();
|
|
2838
|
-
for (r = 0; r < d.length; r++) if (
|
|
2839
|
-
if (a = n
|
|
2840
|
-
if (l = o(
|
|
2697
|
+
for (r = 0; r < d.length; r++) if (n = d[r], c(path__default.default.dirname(n))) {
|
|
2698
|
+
if (a = s(n)) return a;
|
|
2699
|
+
if (l = o(n)) return l;
|
|
2841
2700
|
}
|
|
2842
|
-
}(t, y)) return maybeRealpathSync(u, v, i);
|
|
2701
|
+
}(t, y), v) return maybeRealpathSync(u, v, i);
|
|
2843
2702
|
}
|
|
2844
2703
|
throw (b = new Error("Cannot find module '" + t + "' from '" + g + "'")).code = "MODULE_NOT_FOUND",
|
|
2845
2704
|
b;
|
|
2846
2705
|
}, async.core = core_1, async.isCore = isCore, async.sync = sync, resolve = async;
|
|
2847
2706
|
|
|
2848
|
-
const
|
|
2849
|
-
const
|
|
2707
|
+
const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json", ".md" ], COMMON_DIR_FILENAMES = [ "package.json", "index.js", "index.mjs" ], getCommonDirName = (e, t) => e + "/" + t, isCommonDirModuleFile = e => COMMON_DIR_MODULE_EXTS.some((t => e.endsWith(t))), shouldFetchModule = e => IS_FETCH_ENV && IS_BROWSER_ENV && isNodeModulePath(e), isNodeModulePath = e => normalizePath(e).split("/").includes("node_modules"), getPackageDirPath = (e, t) => {
|
|
2708
|
+
const r = normalizePath(e).split("/"), s = (e => {
|
|
2709
|
+
e.startsWith("~") && (e = e.substring(1));
|
|
2710
|
+
const t = e.split("/"), r = {
|
|
2711
|
+
moduleId: null,
|
|
2712
|
+
filePath: null,
|
|
2713
|
+
scope: null,
|
|
2714
|
+
scopeSubModuleId: null
|
|
2715
|
+
};
|
|
2716
|
+
return e.startsWith("@") && t.length > 1 ? (r.moduleId = t.slice(0, 2).join("/"),
|
|
2717
|
+
r.filePath = t.slice(2).join("/"), r.scope = t[0], r.scopeSubModuleId = t[1]) : (r.moduleId = t[0],
|
|
2718
|
+
r.filePath = t.slice(1).join("/")), r;
|
|
2719
|
+
})(t);
|
|
2720
|
+
for (let e = r.length - 1; e >= 1; e--) if ("node_modules" === r[e - 1]) if (s.scope) {
|
|
2721
|
+
if (r[e] === s.scope && r[e + 1] === s.scopeSubModuleId) return r.slice(0, e + 2).join("/");
|
|
2722
|
+
} else if (r[e] === s.moduleId) return r.slice(0, e + 1).join("/");
|
|
2723
|
+
return null;
|
|
2724
|
+
}, packageVersions = new Map, known404Urls = new Set, getCommonDirUrl = (e, t, r, s) => getNodeModuleFetchUrl(e, t, r) + "/" + s, getNodeModuleFetchUrl = (e, t, r) => {
|
|
2725
|
+
let s = (r = normalizePath(r)).split("/").filter((e => e.length));
|
|
2726
|
+
const n = s.lastIndexOf("node_modules");
|
|
2727
|
+
n > -1 && n < s.length - 1 && (s = s.slice(n + 1));
|
|
2728
|
+
let o = s.shift();
|
|
2729
|
+
o.startsWith("@") && (o += "/" + s.shift());
|
|
2730
|
+
const i = s.join("/");
|
|
2731
|
+
return "@rindo/core" === o ? ((e, t) => {
|
|
2732
|
+
let r = (t = normalizePath(t)).split("/");
|
|
2733
|
+
const s = r.lastIndexOf("node_modules");
|
|
2734
|
+
s > -1 && s < r.length - 1 && (r = r.slice(s + 1), r = r[0].startsWith("@") ? r.slice(2) : r.slice(1),
|
|
2735
|
+
t = r.join("/"));
|
|
2736
|
+
const n = new URL("../", e).href;
|
|
2737
|
+
return new URL("./" + t, n).href;
|
|
2738
|
+
})(e.getCompilerExecutingPath(), i) : e.getRemoteModuleUrl({
|
|
2739
|
+
moduleId: o,
|
|
2740
|
+
version: t.get(o),
|
|
2741
|
+
path: i
|
|
2742
|
+
});
|
|
2743
|
+
}, knownUrlSkips = [ "/@rindo/core/internal.js", "/@rindo/core/internal.json", "/@rindo/core/internal.mjs", "/@rindo/core/internal/rindo-core.js/index.json", "/@rindo/core/internal/rindo-core.js.json", "/@rindo/core/internal/rindo-core.js/package.json", "/@rindo/core.js", "/@rindo/core.json", "/@rindo/core.mjs", "/@rindo/core.css", "/@rindo/core/index.js", "/@rindo/core/index.json", "/@rindo/core/index.mjs", "/@rindo/core/index.css", "/@rindo/package.json" ], fetchModuleAsync = async (e, t, r, s, n) => {
|
|
2744
|
+
if (!((e => {
|
|
2745
|
+
if (!(e => e.endsWith(".d.ts"))(t = e) && t.endsWith(".ts") || (e => e.endsWith(".tsx"))(e)) return !0;
|
|
2746
|
+
var t;
|
|
2747
|
+
const r = e.split("/"), s = r[r.length - 2], n = r[r.length - 1];
|
|
2748
|
+
return !("node_modules" !== s || !isCommonDirModuleFile(n));
|
|
2749
|
+
})(n) || known404Urls.has(s) || (e => knownUrlSkips.some((t => e.endsWith(t))))(s))) try {
|
|
2750
|
+
const o = await ((e, t, r) => e && isFunction(e.fetch) ? e.fetch(t, r) : fetch(t, r))(e, s);
|
|
2751
|
+
if (o) {
|
|
2752
|
+
if (o.ok) {
|
|
2753
|
+
const i = await o.clone().text();
|
|
2754
|
+
return await (async (e, t, r, s, n, o) => {
|
|
2755
|
+
r.endsWith("package.json") && ((e, t) => {
|
|
2756
|
+
try {
|
|
2757
|
+
const r = JSON.parse(t);
|
|
2758
|
+
r.name && r.version && ((e, t, r) => {
|
|
2759
|
+
e.set(t, r);
|
|
2760
|
+
})(e, r.name, r.version);
|
|
2761
|
+
} catch (e) {}
|
|
2762
|
+
})(o, n);
|
|
2763
|
+
let i = path$2.dirname(s);
|
|
2764
|
+
for (;"/" !== i && "" !== i; ) t ? (t.clearFileCache(i), await t.sys.createDir(i)) : await e.createDir(i),
|
|
2765
|
+
i = path$2.dirname(i);
|
|
2766
|
+
t ? (t.clearFileCache(s), await t.sys.writeFile(s, n)) : await e.writeFile(s, n);
|
|
2767
|
+
})(e, t, s, n, i, r), i;
|
|
2768
|
+
}
|
|
2769
|
+
404 === o.status && known404Urls.add(s);
|
|
2770
|
+
}
|
|
2771
|
+
} catch (e) {
|
|
2772
|
+
console.error(e);
|
|
2773
|
+
}
|
|
2774
|
+
}, createSystem = e => {
|
|
2775
|
+
var t;
|
|
2776
|
+
const r = null !== (t = null == e ? void 0 : e.logger) && void 0 !== t ? t : (() => {
|
|
2850
2777
|
let e = IS_BROWSER_ENV, t = "info";
|
|
2851
2778
|
return {
|
|
2852
2779
|
enableColors: t => e = t,
|
|
@@ -2873,30 +2800,30 @@ const createSystem = e => {
|
|
|
2873
2800
|
}),
|
|
2874
2801
|
printDiagnostics(t) {
|
|
2875
2802
|
t.forEach((t => ((e, t) => {
|
|
2876
|
-
let r = BLUE,
|
|
2877
|
-
"error" === e.level ? (r = RED,
|
|
2878
|
-
|
|
2803
|
+
let r = BLUE, s = "Build", n = "";
|
|
2804
|
+
"error" === e.level ? (r = RED, s = "Error") : "warn" === e.level && (r = YELLOW,
|
|
2805
|
+
s = "Warning"), e.header && (s = e.header);
|
|
2879
2806
|
const o = e.relFilePath || e.absFilePath;
|
|
2880
|
-
if (o && (
|
|
2881
|
-
"number" == typeof e.columnNumber && e.columnNumber > 0 && (
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
})),
|
|
2885
|
-
const e = [ "%c" +
|
|
2886
|
-
console.log(...e,
|
|
2887
|
-
} else "error" === e.level ? console.error(
|
|
2807
|
+
if (o && (n += o, "number" == typeof e.lineNumber && e.lineNumber > 0 && (n += ", line " + e.lineNumber,
|
|
2808
|
+
"number" == typeof e.columnNumber && e.columnNumber > 0 && (n += ", column " + e.columnNumber)),
|
|
2809
|
+
n += "\n"), n += e.messageText, e.lines && e.lines.length > 0 && (e.lines.forEach((e => {
|
|
2810
|
+
n += "\n" + e.lineNumber + ": " + e.text;
|
|
2811
|
+
})), n += "\n"), t) {
|
|
2812
|
+
const e = [ "%c" + s, `background: ${r}; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;` ];
|
|
2813
|
+
console.log(...e, n);
|
|
2814
|
+
} else "error" === e.level ? console.error(n) : "warn" === e.level ? console.warn(n) : console.log(n);
|
|
2888
2815
|
})(t, e)));
|
|
2889
2816
|
}
|
|
2890
2817
|
};
|
|
2891
|
-
})(),
|
|
2818
|
+
})(), s = new Map, n = new Set, o = e => n.add(e), i = e => n.delete(e), a = buildEvents(), l = IS_BROWSER_ENV && navigator.hardwareConcurrency || 1, c = e => {
|
|
2892
2819
|
if ("/" === e || "" === e) return "/";
|
|
2893
2820
|
const t = path$2.dirname(e), r = path$2.basename(e);
|
|
2894
2821
|
return t.endsWith("/") ? normalizePath(`${t}${r}`) : normalizePath(`${t}/${r}`);
|
|
2895
|
-
},
|
|
2896
|
-
const t =
|
|
2822
|
+
}, u = e => {
|
|
2823
|
+
const t = s.get(c(e));
|
|
2897
2824
|
return !(!t || !(t.isDirectory || t.isFile && "string" == typeof t.data));
|
|
2898
|
-
},
|
|
2899
|
-
e =
|
|
2825
|
+
}, d = (e, t) => {
|
|
2826
|
+
e = c(e);
|
|
2900
2827
|
const r = {
|
|
2901
2828
|
basename: path$2.basename(e),
|
|
2902
2829
|
dirname: path$2.dirname(e),
|
|
@@ -2904,60 +2831,60 @@ const createSystem = e => {
|
|
|
2904
2831
|
newDirs: [],
|
|
2905
2832
|
error: null
|
|
2906
2833
|
};
|
|
2907
|
-
return
|
|
2908
|
-
},
|
|
2909
|
-
const
|
|
2910
|
-
t && t.recursive && !(e => "/" === e || windowsPathRegex.test(e))(
|
|
2911
|
-
const o =
|
|
2912
|
-
o ? (o.isDirectory = !0, o.isFile = !1) : (
|
|
2834
|
+
return h(e, t, r), r;
|
|
2835
|
+
}, h = (e, t, r) => {
|
|
2836
|
+
const n = path$2.dirname(e);
|
|
2837
|
+
t && t.recursive && !(e => "/" === e || windowsPathRegex.test(e))(n) && h(n, t, r);
|
|
2838
|
+
const o = s.get(e);
|
|
2839
|
+
o ? (o.isDirectory = !0, o.isFile = !1) : (s.set(e, {
|
|
2913
2840
|
basename: path$2.basename(e),
|
|
2914
|
-
dirname:
|
|
2841
|
+
dirname: n,
|
|
2915
2842
|
isDirectory: !0,
|
|
2916
2843
|
isFile: !1,
|
|
2917
2844
|
watcherCallbacks: null,
|
|
2918
2845
|
data: void 0
|
|
2919
|
-
}),
|
|
2920
|
-
}, h = e => {
|
|
2921
|
-
e = l(e);
|
|
2922
|
-
const t = [], n = r.get(e);
|
|
2923
|
-
return n && n.isDirectory && r.forEach(((r, n) => {
|
|
2924
|
-
"/" !== n && (r.isDirectory || r.isFile && "string" == typeof r.data) && (e.endsWith("/") && `${e}${r.basename}` === n || `${e}/${r.basename}` === n) && t.push(n);
|
|
2925
|
-
})), t.sort();
|
|
2846
|
+
}), r.newDirs.push(e), b(e, new Set));
|
|
2926
2847
|
}, p = e => {
|
|
2927
|
-
e =
|
|
2928
|
-
const t = r.get(e);
|
|
2848
|
+
e = c(e);
|
|
2849
|
+
const t = [], r = s.get(e);
|
|
2850
|
+
return r && r.isDirectory && s.forEach(((r, s) => {
|
|
2851
|
+
"/" !== s && (r.isDirectory || r.isFile && "string" == typeof r.data) && (e.endsWith("/") && `${e}${r.basename}` === s || `${e}/${r.basename}` === s) && t.push(s);
|
|
2852
|
+
})), t.sort();
|
|
2853
|
+
}, f = e => {
|
|
2854
|
+
e = c(e);
|
|
2855
|
+
const t = s.get(e);
|
|
2929
2856
|
if (t && t.isFile) return t.data;
|
|
2930
|
-
},
|
|
2931
|
-
path:
|
|
2857
|
+
}, m = e => ({
|
|
2858
|
+
path: c(e),
|
|
2932
2859
|
error: null
|
|
2933
|
-
}),
|
|
2934
|
-
const
|
|
2935
|
-
if (!
|
|
2936
|
-
const
|
|
2860
|
+
}), g = (e, t, r) => {
|
|
2861
|
+
const n = _(e);
|
|
2862
|
+
if (!n.error && !r.error) if (n.isFile) {
|
|
2863
|
+
const n = path$2.dirname(t), o = d(n, {
|
|
2937
2864
|
recursive: !0
|
|
2938
|
-
}), i =
|
|
2939
|
-
|
|
2865
|
+
}), i = s.get(e).data, a = E(t, i);
|
|
2866
|
+
r.newDirs.push(...o.newDirs), r.renamed.push({
|
|
2940
2867
|
oldPath: e,
|
|
2941
2868
|
newPath: t,
|
|
2942
2869
|
isDirectory: !1,
|
|
2943
2870
|
isFile: !0
|
|
2944
|
-
}), a.error ?
|
|
2945
|
-
} else if (
|
|
2946
|
-
const
|
|
2871
|
+
}), a.error ? r.error = a.error : r.newFiles.push(t);
|
|
2872
|
+
} else if (n.isDirectory) {
|
|
2873
|
+
const s = p(e), n = d(t, {
|
|
2947
2874
|
recursive: !0
|
|
2948
2875
|
});
|
|
2949
|
-
|
|
2876
|
+
r.newDirs.push(...n.newDirs), r.renamed.push({
|
|
2950
2877
|
oldPath: e,
|
|
2951
2878
|
newPath: t,
|
|
2952
2879
|
isDirectory: !0,
|
|
2953
2880
|
isFile: !1
|
|
2954
2881
|
});
|
|
2955
|
-
for (const
|
|
2956
|
-
const
|
|
2957
|
-
|
|
2882
|
+
for (const n of s) {
|
|
2883
|
+
const s = n.replace(e, t);
|
|
2884
|
+
g(n, s, r);
|
|
2958
2885
|
}
|
|
2959
2886
|
}
|
|
2960
|
-
},
|
|
2887
|
+
}, y = (e, t = {}) => {
|
|
2961
2888
|
const r = {
|
|
2962
2889
|
basename: path$2.basename(e),
|
|
2963
2890
|
dirname: path$2.dirname(e),
|
|
@@ -2966,23 +2893,23 @@ const createSystem = e => {
|
|
|
2966
2893
|
removedFiles: [],
|
|
2967
2894
|
error: null
|
|
2968
2895
|
};
|
|
2969
|
-
return
|
|
2970
|
-
},
|
|
2971
|
-
if (!
|
|
2972
|
-
e =
|
|
2973
|
-
const
|
|
2974
|
-
if (t && t.recursive) for (const e of
|
|
2975
|
-
const
|
|
2976
|
-
if (
|
|
2977
|
-
const t =
|
|
2978
|
-
t.error ?
|
|
2896
|
+
return w(e, t, r), r;
|
|
2897
|
+
}, w = (e, t, r) => {
|
|
2898
|
+
if (!r.error) {
|
|
2899
|
+
e = c(e);
|
|
2900
|
+
const n = p(e);
|
|
2901
|
+
if (t && t.recursive) for (const e of n) {
|
|
2902
|
+
const n = s.get(e);
|
|
2903
|
+
if (n) if (n.isDirectory) w(e, t, r); else if (n.isFile) {
|
|
2904
|
+
const t = v(e);
|
|
2905
|
+
t.error ? r.error = t.error : r.removedFiles.push(e);
|
|
2979
2906
|
}
|
|
2980
|
-
} else if (
|
|
2981
|
-
|
|
2907
|
+
} else if (n.length > 0) return void (r.error = "cannot delete directory that contains files/subdirectories");
|
|
2908
|
+
s.delete(e), b(e, new Set), r.removedDirs.push(e);
|
|
2982
2909
|
}
|
|
2983
|
-
},
|
|
2984
|
-
e =
|
|
2985
|
-
const t =
|
|
2910
|
+
}, _ = e => {
|
|
2911
|
+
e = c(e);
|
|
2912
|
+
const t = s.get(e);
|
|
2986
2913
|
return t && (t.isDirectory || t.isFile && "string" == typeof t.data) ? {
|
|
2987
2914
|
isDirectory: t.isDirectory,
|
|
2988
2915
|
isFile: t.isFile,
|
|
@@ -2996,52 +2923,52 @@ const createSystem = e => {
|
|
|
2996
2923
|
size: 0,
|
|
2997
2924
|
error: `ENOENT: no such file or directory, statSync '${e}'`
|
|
2998
2925
|
};
|
|
2999
|
-
},
|
|
3000
|
-
e =
|
|
2926
|
+
}, v = e => {
|
|
2927
|
+
e = c(e);
|
|
3001
2928
|
const t = {
|
|
3002
2929
|
basename: path$2.basename(e),
|
|
3003
2930
|
dirname: path$2.dirname(e),
|
|
3004
2931
|
path: e,
|
|
3005
2932
|
error: null
|
|
3006
|
-
},
|
|
3007
|
-
if (
|
|
3008
|
-
if (
|
|
3009
|
-
|
|
2933
|
+
}, r = s.get(e);
|
|
2934
|
+
if (r) {
|
|
2935
|
+
if (r.watcherCallbacks) for (const t of r.watcherCallbacks) t(e, "fileDelete");
|
|
2936
|
+
s.delete(e), b(e, new Set);
|
|
3010
2937
|
}
|
|
3011
2938
|
return t;
|
|
3012
|
-
}, v = (e, t) => {
|
|
3013
|
-
const n = l(path$2.dirname(e)), s = r.get(n);
|
|
3014
|
-
if (s && s.isDirectory && s.watcherCallbacks) for (const t of s.watcherCallbacks) t(e, null);
|
|
3015
|
-
t.has(n) || (t.add(n), v(n, t));
|
|
3016
2939
|
}, b = (e, t) => {
|
|
3017
|
-
const n =
|
|
3018
|
-
|
|
2940
|
+
const r = c(path$2.dirname(e)), n = s.get(r);
|
|
2941
|
+
if (n && n.isDirectory && n.watcherCallbacks) for (const t of n.watcherCallbacks) t(e, null);
|
|
2942
|
+
t.has(r) || (t.add(r), b(r, t));
|
|
2943
|
+
}, E = (e, t) => {
|
|
2944
|
+
const r = {
|
|
2945
|
+
path: e = c(e),
|
|
3019
2946
|
error: null
|
|
3020
|
-
},
|
|
3021
|
-
if (
|
|
3022
|
-
const r =
|
|
3023
|
-
if (
|
|
3024
|
-
} else
|
|
2947
|
+
}, n = s.get(e);
|
|
2948
|
+
if (n) {
|
|
2949
|
+
const r = n.data !== t;
|
|
2950
|
+
if (n.data = t, r && n.watcherCallbacks) for (const t of n.watcherCallbacks) t(e, "fileUpdate");
|
|
2951
|
+
} else s.set(e, {
|
|
3025
2952
|
basename: path$2.basename(e),
|
|
3026
2953
|
dirname: path$2.dirname(e),
|
|
3027
2954
|
isDirectory: !1,
|
|
3028
2955
|
isFile: !0,
|
|
3029
2956
|
watcherCallbacks: null,
|
|
3030
2957
|
data: t
|
|
3031
|
-
}),
|
|
3032
|
-
return
|
|
3033
|
-
},
|
|
3034
|
-
|
|
3035
|
-
const
|
|
2958
|
+
}), b(e, new Set);
|
|
2959
|
+
return r;
|
|
2960
|
+
}, T = "undefined" != typeof self ? null === self || void 0 === self ? void 0 : self.fetch : "undefined" != typeof window ? null === window || void 0 === window ? void 0 : window.fetch : "undefined" != typeof global ? null === global || void 0 === global ? void 0 : global.fetch : void 0, D = Promise.resolve();
|
|
2961
|
+
d("/");
|
|
2962
|
+
const S = {
|
|
3036
2963
|
name: "in-memory",
|
|
3037
|
-
version: "2.
|
|
3038
|
-
events:
|
|
3039
|
-
access: async e =>
|
|
3040
|
-
accessSync:
|
|
3041
|
-
addDestory:
|
|
3042
|
-
copyFile: async (e, t) => (
|
|
3043
|
-
createDir: async (e, t) =>
|
|
3044
|
-
createDirSync:
|
|
2964
|
+
version: "2.22.2",
|
|
2965
|
+
events: a,
|
|
2966
|
+
access: async e => u(e),
|
|
2967
|
+
accessSync: u,
|
|
2968
|
+
addDestory: o,
|
|
2969
|
+
copyFile: async (e, t) => (E(t, f(e)), !0),
|
|
2970
|
+
createDir: async (e, t) => d(e, t),
|
|
2971
|
+
createDirSync: d,
|
|
3045
2972
|
homeDir: () => os__namespace.homedir(),
|
|
3046
2973
|
isTTY: () => {
|
|
3047
2974
|
var e;
|
|
@@ -3050,19 +2977,19 @@ const createSystem = e => {
|
|
|
3050
2977
|
getEnvironmentVar: e => null == process__namespace ? void 0 : process__namespace.env[e],
|
|
3051
2978
|
destroy: async () => {
|
|
3052
2979
|
const e = [];
|
|
3053
|
-
n.forEach((
|
|
2980
|
+
n.forEach((t => {
|
|
3054
2981
|
try {
|
|
3055
|
-
const
|
|
3056
|
-
|
|
2982
|
+
const r = t();
|
|
2983
|
+
r && r.then && e.push(r);
|
|
3057
2984
|
} catch (e) {
|
|
3058
|
-
|
|
2985
|
+
r.error(`rindo sys destroy: ${e}`);
|
|
3059
2986
|
}
|
|
3060
2987
|
})), await Promise.all(e), n.clear();
|
|
3061
2988
|
},
|
|
3062
2989
|
encodeToBase64: e => btoa(unescape(encodeURIComponent(e))),
|
|
3063
|
-
exit: async e =>
|
|
2990
|
+
exit: async e => r.warn(`exit ${e}`),
|
|
3064
2991
|
getCurrentDirectory: () => "/",
|
|
3065
|
-
getCompilerExecutingPath: () => IS_WEB_WORKER_ENV ? location.href :
|
|
2992
|
+
getCompilerExecutingPath: () => IS_WEB_WORKER_ENV ? location.href : S.getRemoteModuleUrl({
|
|
3066
2993
|
moduleId: "@rindo/core",
|
|
3067
2994
|
path: "compiler/rindo.min.js"
|
|
3068
2995
|
}),
|
|
@@ -3071,18 +2998,18 @@ const createSystem = e => {
|
|
|
3071
2998
|
const t = `${e.moduleId}${e.version ? "@" + e.version : ""}/${e.path}`;
|
|
3072
2999
|
return new URL(t, "https://cdn.jsdelivr.net/npm/").href;
|
|
3073
3000
|
},
|
|
3074
|
-
hardwareConcurrency:
|
|
3001
|
+
hardwareConcurrency: l,
|
|
3075
3002
|
isSymbolicLink: async e => !1,
|
|
3076
|
-
nextTick: e =>
|
|
3077
|
-
normalizePath:
|
|
3003
|
+
nextTick: e => D.then(e),
|
|
3004
|
+
normalizePath: c,
|
|
3078
3005
|
platformPath: pathBrowserify,
|
|
3079
|
-
readDir: async e =>
|
|
3080
|
-
readDirSync:
|
|
3081
|
-
readFile: async e =>
|
|
3082
|
-
readFileSync:
|
|
3083
|
-
realpath: async e =>
|
|
3084
|
-
realpathSync:
|
|
3085
|
-
removeDestory:
|
|
3006
|
+
readDir: async e => p(e),
|
|
3007
|
+
readDirSync: p,
|
|
3008
|
+
readFile: async e => f(e),
|
|
3009
|
+
readFileSync: f,
|
|
3010
|
+
realpath: async e => m(e),
|
|
3011
|
+
realpathSync: m,
|
|
3012
|
+
removeDestory: i,
|
|
3086
3013
|
rename: async (e, t) => {
|
|
3087
3014
|
const r = {
|
|
3088
3015
|
oldPath: e = normalizePath(e),
|
|
@@ -3095,39 +3022,39 @@ const createSystem = e => {
|
|
|
3095
3022
|
isFile: !1,
|
|
3096
3023
|
isDirectory: !1,
|
|
3097
3024
|
error: null
|
|
3098
|
-
},
|
|
3099
|
-
if (
|
|
3100
|
-
|
|
3101
|
-
const t =
|
|
3025
|
+
}, s = _(e);
|
|
3026
|
+
if (s.error) r.error = `${e} does not exist`; else if (s.isFile ? r.isFile = !0 : s.isDirectory && (r.isDirectory = !0),
|
|
3027
|
+
g(e, t, r), !r.error) if (r.isDirectory) {
|
|
3028
|
+
const t = y(e, {
|
|
3102
3029
|
recursive: !0
|
|
3103
3030
|
});
|
|
3104
3031
|
t.error ? r.error = t.error : (r.oldDirs.push(...t.removedDirs), r.oldFiles.push(...t.removedFiles));
|
|
3105
3032
|
} else if (r.isFile) {
|
|
3106
|
-
const t =
|
|
3033
|
+
const t = v(e);
|
|
3107
3034
|
t.error ? r.error = t.error : r.oldFiles.push(e);
|
|
3108
3035
|
}
|
|
3109
3036
|
return r;
|
|
3110
3037
|
},
|
|
3111
|
-
fetch:
|
|
3112
|
-
resolvePath: e =>
|
|
3113
|
-
removeDir: async (e, t = {}) =>
|
|
3114
|
-
removeDirSync:
|
|
3115
|
-
stat: async e =>
|
|
3116
|
-
statSync:
|
|
3038
|
+
fetch: T,
|
|
3039
|
+
resolvePath: e => c(e),
|
|
3040
|
+
removeDir: async (e, t = {}) => y(e, t),
|
|
3041
|
+
removeDirSync: y,
|
|
3042
|
+
stat: async e => _(e),
|
|
3043
|
+
statSync: _,
|
|
3117
3044
|
tmpDirSync: () => "/.tmp",
|
|
3118
|
-
removeFile: async e =>
|
|
3119
|
-
removeFileSync:
|
|
3045
|
+
removeFile: async e => v(e),
|
|
3046
|
+
removeFileSync: v,
|
|
3120
3047
|
watchDirectory: (e, t) => {
|
|
3121
|
-
e =
|
|
3122
|
-
const
|
|
3123
|
-
const
|
|
3124
|
-
if (
|
|
3125
|
-
const e =
|
|
3126
|
-
e > -1 &&
|
|
3048
|
+
e = c(e);
|
|
3049
|
+
const r = s.get(e), n = () => {
|
|
3050
|
+
const r = s.get(e);
|
|
3051
|
+
if (r && r.watcherCallbacks) {
|
|
3052
|
+
const e = r.watcherCallbacks.indexOf(t);
|
|
3053
|
+
e > -1 && r.watcherCallbacks.splice(e, 1);
|
|
3127
3054
|
}
|
|
3128
3055
|
};
|
|
3129
|
-
return
|
|
3130
|
-
|
|
3056
|
+
return o(n), r ? (r.isDirectory = !0, r.isFile = !1, r.watcherCallbacks = r.watcherCallbacks || [],
|
|
3057
|
+
r.watcherCallbacks.push(t)) : s.set(e, {
|
|
3131
3058
|
basename: path$2.basename(e),
|
|
3132
3059
|
dirname: path$2.dirname(e),
|
|
3133
3060
|
isDirectory: !0,
|
|
@@ -3136,21 +3063,21 @@ const createSystem = e => {
|
|
|
3136
3063
|
data: void 0
|
|
3137
3064
|
}), {
|
|
3138
3065
|
close() {
|
|
3139
|
-
|
|
3066
|
+
i(n), n();
|
|
3140
3067
|
}
|
|
3141
3068
|
};
|
|
3142
3069
|
},
|
|
3143
3070
|
watchFile: (e, t) => {
|
|
3144
|
-
e =
|
|
3145
|
-
const
|
|
3146
|
-
const
|
|
3147
|
-
if (
|
|
3148
|
-
const e =
|
|
3149
|
-
e > -1 &&
|
|
3071
|
+
e = c(e);
|
|
3072
|
+
const r = s.get(e), n = () => {
|
|
3073
|
+
const r = s.get(e);
|
|
3074
|
+
if (r && r.watcherCallbacks) {
|
|
3075
|
+
const e = r.watcherCallbacks.indexOf(t);
|
|
3076
|
+
e > -1 && r.watcherCallbacks.splice(e, 1);
|
|
3150
3077
|
}
|
|
3151
3078
|
};
|
|
3152
|
-
return
|
|
3153
|
-
|
|
3079
|
+
return o(n), r ? (r.isDirectory = !1, r.isFile = !0, r.watcherCallbacks = r.watcherCallbacks || [],
|
|
3080
|
+
r.watcherCallbacks.push(t)) : s.set(e, {
|
|
3154
3081
|
basename: path$2.basename(e),
|
|
3155
3082
|
dirname: path$2.dirname(e),
|
|
3156
3083
|
isDirectory: !1,
|
|
@@ -3159,29 +3086,29 @@ const createSystem = e => {
|
|
|
3159
3086
|
data: void 0
|
|
3160
3087
|
}), {
|
|
3161
3088
|
close() {
|
|
3162
|
-
|
|
3089
|
+
i(n), n();
|
|
3163
3090
|
}
|
|
3164
3091
|
};
|
|
3165
3092
|
},
|
|
3166
3093
|
watchTimeout: 32,
|
|
3167
|
-
writeFile: async (e, t) =>
|
|
3168
|
-
writeFileSync:
|
|
3094
|
+
writeFile: async (e, t) => E(e, t),
|
|
3095
|
+
writeFileSync: E,
|
|
3169
3096
|
generateContentHash: async (e, t) => {
|
|
3170
3097
|
const r = await crypto.subtle.digest("SHA-256", (new TextEncoder).encode(e));
|
|
3171
|
-
let
|
|
3172
|
-
return "number" == typeof t && (
|
|
3098
|
+
let s = Array.from(new Uint8Array(r)).map((e => e.toString(16).padStart(2, "0"))).join("");
|
|
3099
|
+
return "number" == typeof t && (s = s.slice(0, t)), s;
|
|
3173
3100
|
},
|
|
3174
3101
|
createWorkerController: HAS_WEB_WORKER ? e => ((e, t) => {
|
|
3175
|
-
let r,
|
|
3102
|
+
let r, s = 0, n = !1, o = !1, i = 0;
|
|
3176
3103
|
const a = new Map, l = [], c = [], u = Math.max(Math.min(t, e.hardwareConcurrency), 2) - 1, d = Promise.resolve(), h = e => console.error(e), p = () => {
|
|
3177
3104
|
let t = null;
|
|
3178
|
-
const
|
|
3105
|
+
const s = e.getCompilerExecutingPath(), o = {
|
|
3179
3106
|
name: "rindo.worker." + i++
|
|
3180
3107
|
};
|
|
3181
3108
|
try {
|
|
3182
|
-
t = new Worker(
|
|
3109
|
+
t = new Worker(s, o);
|
|
3183
3110
|
} catch (e) {
|
|
3184
|
-
null == r && (r = new Blob([ `importScripts('${
|
|
3111
|
+
null == r && (r = new Blob([ `importScripts('${s}');` ], {
|
|
3185
3112
|
type: "application/javascript"
|
|
3186
3113
|
})), t = new Worker(URL.createObjectURL(r), o);
|
|
3187
3114
|
}
|
|
@@ -3191,7 +3118,7 @@ const createSystem = e => {
|
|
|
3191
3118
|
sendQueue: []
|
|
3192
3119
|
};
|
|
3193
3120
|
return t.onerror = h, t.onmessage = e => ((e, t) => {
|
|
3194
|
-
if (!
|
|
3121
|
+
if (!n) {
|
|
3195
3122
|
const r = t.data;
|
|
3196
3123
|
if (Array.isArray(r)) for (const t of r) if (t) {
|
|
3197
3124
|
const r = a.get(t.rindoId);
|
|
@@ -3214,12 +3141,12 @@ const createSystem = e => {
|
|
|
3214
3141
|
}, g = () => {
|
|
3215
3142
|
o = !1, l.forEach(m), l.length = 0, c.forEach(f);
|
|
3216
3143
|
}, y = (...e) => new Promise(((t, r) => {
|
|
3217
|
-
if (
|
|
3218
|
-
const
|
|
3219
|
-
rindoId:
|
|
3144
|
+
if (n) r("task canceled"); else {
|
|
3145
|
+
const n = {
|
|
3146
|
+
rindoId: s++,
|
|
3220
3147
|
args: e
|
|
3221
3148
|
};
|
|
3222
|
-
l.push(
|
|
3149
|
+
l.push(n), a.set(n.rindoId, {
|
|
3223
3150
|
resolve: t,
|
|
3224
3151
|
reject: r
|
|
3225
3152
|
}), o || (o = !0, d.then(g));
|
|
@@ -3228,7 +3155,7 @@ const createSystem = e => {
|
|
|
3228
3155
|
return {
|
|
3229
3156
|
send: y,
|
|
3230
3157
|
destroy: () => {
|
|
3231
|
-
|
|
3158
|
+
n = !0, a.forEach((e => e.reject("task canceled"))), a.clear(), c.forEach((e => e.worker.terminate())),
|
|
3232
3159
|
c.length = 0;
|
|
3233
3160
|
},
|
|
3234
3161
|
handler: e => function(...t) {
|
|
@@ -3236,7 +3163,7 @@ const createSystem = e => {
|
|
|
3236
3163
|
},
|
|
3237
3164
|
maxWorkers: u
|
|
3238
3165
|
};
|
|
3239
|
-
})(
|
|
3166
|
+
})(S, e) : null,
|
|
3240
3167
|
details: {
|
|
3241
3168
|
cpuModel: "",
|
|
3242
3169
|
freemem: () => 0,
|
|
@@ -3244,65 +3171,65 @@ const createSystem = e => {
|
|
|
3244
3171
|
release: "",
|
|
3245
3172
|
totalmem: 0
|
|
3246
3173
|
},
|
|
3247
|
-
copy: async (e,
|
|
3174
|
+
copy: async (e, t) => (r.info("todo, copy task", e.length, t), {
|
|
3248
3175
|
diagnostics: [],
|
|
3249
3176
|
dirPaths: [],
|
|
3250
3177
|
filePaths: []
|
|
3251
3178
|
})
|
|
3252
3179
|
};
|
|
3253
|
-
return
|
|
3254
|
-
const
|
|
3255
|
-
async isFile(
|
|
3256
|
-
const o = normalizeFsPath(
|
|
3257
|
-
if ((await t.stat(o)).isFile)
|
|
3180
|
+
return S.resolveModuleId = e => ((e, t, r) => {
|
|
3181
|
+
const s = ((e, t, r) => ({
|
|
3182
|
+
async isFile(s, n) {
|
|
3183
|
+
const o = normalizeFsPath(s);
|
|
3184
|
+
if ((await t.stat(o)).isFile) n(null, !0); else {
|
|
3258
3185
|
if (shouldFetchModule(o) && r.some((e => o.endsWith(e)))) {
|
|
3259
3186
|
const r = getNodeModuleFetchUrl(e, packageVersions, o);
|
|
3260
|
-
return void
|
|
3187
|
+
return void n(null, "string" == typeof await fetchModuleAsync(e, t, packageVersions, r, o));
|
|
3261
3188
|
}
|
|
3262
|
-
|
|
3189
|
+
n(null, !1);
|
|
3263
3190
|
}
|
|
3264
3191
|
},
|
|
3265
|
-
async isDirectory(r,
|
|
3266
|
-
const
|
|
3267
|
-
if ((await t.stat(
|
|
3268
|
-
if (shouldFetchModule(
|
|
3269
|
-
if ("node_modules" === path$2.basename(
|
|
3270
|
-
void
|
|
3271
|
-
if (isCommonDirModuleFile(
|
|
3192
|
+
async isDirectory(r, s) {
|
|
3193
|
+
const n = normalizeFsPath(r);
|
|
3194
|
+
if ((await t.stat(n)).isDirectory) s(null, !0); else {
|
|
3195
|
+
if (shouldFetchModule(n)) {
|
|
3196
|
+
if ("node_modules" === path$2.basename(n)) return t.sys.createDirSync(n), t.clearFileCache(n),
|
|
3197
|
+
void s(null, !0);
|
|
3198
|
+
if (isCommonDirModuleFile(n)) return void s(null, !1);
|
|
3272
3199
|
for (const r of COMMON_DIR_FILENAMES) {
|
|
3273
|
-
const o = getCommonDirUrl(e, packageVersions,
|
|
3274
|
-
if (isString(a)) return void
|
|
3200
|
+
const o = getCommonDirUrl(e, packageVersions, n, r), i = getCommonDirName(n, r), a = await fetchModuleAsync(e, t, packageVersions, o, i);
|
|
3201
|
+
if (isString(a)) return void s(null, !0);
|
|
3275
3202
|
}
|
|
3276
3203
|
}
|
|
3277
|
-
|
|
3204
|
+
s(null, !1);
|
|
3278
3205
|
}
|
|
3279
3206
|
},
|
|
3280
3207
|
async readFile(e, r) {
|
|
3281
|
-
const
|
|
3282
|
-
return isString(
|
|
3208
|
+
const s = normalizeFsPath(e), n = await t.readFile(s);
|
|
3209
|
+
return isString(n) ? r(null, n) : r(`readFile not found: ${e}`);
|
|
3283
3210
|
},
|
|
3284
3211
|
async realpath(t, r) {
|
|
3285
|
-
const
|
|
3286
|
-
|
|
3212
|
+
const s = normalizeFsPath(t), n = await e.realpath(s);
|
|
3213
|
+
n.error && "ENOENT" !== n.error.code ? r(n.error) : r(null, n.error ? s : n.path);
|
|
3287
3214
|
},
|
|
3288
3215
|
extensions: r
|
|
3289
3216
|
}))(e, null, r.exts);
|
|
3290
|
-
return
|
|
3217
|
+
return s.basedir = path$2.dirname(normalizeFsPath(r.containingFile)), r.packageFilter ? s.packageFilter = r.packageFilter : null !== r.packageFilter && (s.packageFilter = e => (isString(e.main) && "" !== e.main || (e.main = "package.json"),
|
|
3291
3218
|
e)), new Promise(((e, t) => {
|
|
3292
|
-
resolve(r.moduleId,
|
|
3293
|
-
if (
|
|
3294
|
-
|
|
3219
|
+
resolve(r.moduleId, s, ((s, n, o) => {
|
|
3220
|
+
if (s) t(s); else {
|
|
3221
|
+
n = normalizePath(n);
|
|
3295
3222
|
const t = {
|
|
3296
3223
|
moduleId: r.moduleId,
|
|
3297
|
-
resolveId:
|
|
3224
|
+
resolveId: n,
|
|
3298
3225
|
pkgData: o,
|
|
3299
|
-
pkgDirPath: getPackageDirPath(
|
|
3226
|
+
pkgDirPath: getPackageDirPath(n, r.moduleId)
|
|
3300
3227
|
};
|
|
3301
3228
|
e(t);
|
|
3302
3229
|
}
|
|
3303
3230
|
}));
|
|
3304
3231
|
}));
|
|
3305
|
-
})(
|
|
3232
|
+
})(S, 0, e), S;
|
|
3306
3233
|
}, createTestingSystem = () => {
|
|
3307
3234
|
let e = 0, t = 0;
|
|
3308
3235
|
const r = createSystem();
|
|
@@ -3310,19 +3237,19 @@ const createSystem = e => {
|
|
|
3310
3237
|
let r = crypto$3.createHash("sha1").update(e).digest("hex").toLowerCase();
|
|
3311
3238
|
return "number" == typeof t && (r = r.slice(0, t)), Promise.resolve(r);
|
|
3312
3239
|
};
|
|
3313
|
-
const
|
|
3240
|
+
const s = t => {
|
|
3314
3241
|
const r = t;
|
|
3315
3242
|
return (...t) => (e++, r.apply(r, t));
|
|
3316
|
-
},
|
|
3243
|
+
}, n = e => {
|
|
3317
3244
|
const r = e;
|
|
3318
3245
|
return (...e) => (t++, r.apply(r, e));
|
|
3319
3246
|
};
|
|
3320
|
-
if (r.access =
|
|
3321
|
-
r.readFile =
|
|
3322
|
-
r.readDirSync =
|
|
3323
|
-
r.copyFile =
|
|
3324
|
-
r.removeFile =
|
|
3325
|
-
r.writeFileSync =
|
|
3247
|
+
if (r.access = s(r.access), r.accessSync = s(r.accessSync), r.homeDir = s(r.homeDir),
|
|
3248
|
+
r.readFile = s(r.readFile), r.readFileSync = s(r.readFileSync), r.readDir = s(r.readDir),
|
|
3249
|
+
r.readDirSync = s(r.readDirSync), r.stat = s(r.stat), r.statSync = s(r.statSync),
|
|
3250
|
+
r.copyFile = n(r.copyFile), r.createDir = n(r.createDir), r.createDirSync = n(r.createDirSync),
|
|
3251
|
+
r.removeFile = n(r.removeFile), r.removeFileSync = n(r.removeFileSync), r.writeFile = n(r.writeFile),
|
|
3252
|
+
r.writeFileSync = n(r.writeFileSync), r.getCompilerExecutingPath = () => "bin/rindo.js",
|
|
3326
3253
|
Object.defineProperties(r, {
|
|
3327
3254
|
diskReads: {
|
|
3328
3255
|
get: () => e,
|
|
@@ -3342,78 +3269,6 @@ const createSystem = e => {
|
|
|
3342
3269
|
return r;
|
|
3343
3270
|
};
|
|
3344
3271
|
|
|
3345
|
-
class TestingLogger {
|
|
3346
|
-
constructor() {
|
|
3347
|
-
this.isEnabled = !1;
|
|
3348
|
-
}
|
|
3349
|
-
setLevel(e) {}
|
|
3350
|
-
getLevel() {
|
|
3351
|
-
return "info";
|
|
3352
|
-
}
|
|
3353
|
-
enableColors(e) {}
|
|
3354
|
-
emoji(e) {
|
|
3355
|
-
return "";
|
|
3356
|
-
}
|
|
3357
|
-
info(...e) {
|
|
3358
|
-
this.isEnabled && console.log(...e);
|
|
3359
|
-
}
|
|
3360
|
-
warn(...e) {
|
|
3361
|
-
this.isEnabled && console.warn(...e);
|
|
3362
|
-
}
|
|
3363
|
-
error(...e) {
|
|
3364
|
-
this.isEnabled && console.error(...e);
|
|
3365
|
-
}
|
|
3366
|
-
debug(...e) {
|
|
3367
|
-
this.isEnabled && console.log(...e);
|
|
3368
|
-
}
|
|
3369
|
-
color(e, t) {}
|
|
3370
|
-
red(e) {
|
|
3371
|
-
return e;
|
|
3372
|
-
}
|
|
3373
|
-
green(e) {
|
|
3374
|
-
return e;
|
|
3375
|
-
}
|
|
3376
|
-
yellow(e) {
|
|
3377
|
-
return e;
|
|
3378
|
-
}
|
|
3379
|
-
blue(e) {
|
|
3380
|
-
return e;
|
|
3381
|
-
}
|
|
3382
|
-
magenta(e) {
|
|
3383
|
-
return e;
|
|
3384
|
-
}
|
|
3385
|
-
cyan(e) {
|
|
3386
|
-
return e;
|
|
3387
|
-
}
|
|
3388
|
-
gray(e) {
|
|
3389
|
-
return e;
|
|
3390
|
-
}
|
|
3391
|
-
bold(e) {
|
|
3392
|
-
return e;
|
|
3393
|
-
}
|
|
3394
|
-
dim(e) {
|
|
3395
|
-
return e;
|
|
3396
|
-
}
|
|
3397
|
-
bgRed(e) {
|
|
3398
|
-
return e;
|
|
3399
|
-
}
|
|
3400
|
-
createTimeSpan(e, t = !1) {
|
|
3401
|
-
return {
|
|
3402
|
-
duration: () => 0,
|
|
3403
|
-
finish: () => 0
|
|
3404
|
-
};
|
|
3405
|
-
}
|
|
3406
|
-
printDiagnostics(e) {}
|
|
3407
|
-
}
|
|
3408
|
-
|
|
3409
|
-
const createConfigFlags = (e = {}) => ({
|
|
3410
|
-
task: null,
|
|
3411
|
-
args: [],
|
|
3412
|
-
knownArgs: [],
|
|
3413
|
-
unknownArgs: [],
|
|
3414
|
-
...e
|
|
3415
|
-
});
|
|
3416
|
-
|
|
3417
3272
|
class EventSpy {
|
|
3418
3273
|
constructor(e) {
|
|
3419
3274
|
this.eventName = e, this.events = [], this.cursor = 0, this.queuedHandler = [];
|
|
@@ -3452,13 +3307,13 @@ class EventSpy {
|
|
|
3452
3307
|
}
|
|
3453
3308
|
|
|
3454
3309
|
class E2EElement extends index_cjs.MockHTMLElement {
|
|
3310
|
+
_queueAction(e) {
|
|
3311
|
+
this._queuedActions.push(e);
|
|
3312
|
+
}
|
|
3455
3313
|
constructor(e, t) {
|
|
3456
3314
|
super(null, null), this._page = e, this._elmHandle = t, this._queuedActions = [],
|
|
3457
3315
|
e._e2eElements.push(this);
|
|
3458
3316
|
}
|
|
3459
|
-
_queueAction(e) {
|
|
3460
|
-
this._queuedActions.push(e);
|
|
3461
|
-
}
|
|
3462
3317
|
find(e) {
|
|
3463
3318
|
return find(this._page, this._elmHandle, e);
|
|
3464
3319
|
}
|
|
@@ -3517,18 +3372,18 @@ class E2EElement extends index_cjs.MockHTMLElement {
|
|
|
3517
3372
|
return new Promise(((e, t) => {
|
|
3518
3373
|
const r = setInterval((async () => {
|
|
3519
3374
|
await this.isVisible() && (clearInterval(r), clearTimeout(o), e());
|
|
3520
|
-
}), 10),
|
|
3521
|
-
clearTimeout(r), t(
|
|
3522
|
-
}),
|
|
3375
|
+
}), 10), s = .5 * jasmine.DEFAULT_TIMEOUT_INTERVAL, n = new Error(`waitForVisible timed out: ${s}ms`), o = setTimeout((() => {
|
|
3376
|
+
clearTimeout(r), t(n);
|
|
3377
|
+
}), s);
|
|
3523
3378
|
}));
|
|
3524
3379
|
}
|
|
3525
3380
|
waitForNotVisible() {
|
|
3526
3381
|
return new Promise(((e, t) => {
|
|
3527
3382
|
const r = setInterval((async () => {
|
|
3528
3383
|
await this.isVisible() || (clearInterval(r), clearTimeout(o), e());
|
|
3529
|
-
}), 10),
|
|
3530
|
-
clearTimeout(r), t(
|
|
3531
|
-
}),
|
|
3384
|
+
}), 10), s = .5 * jasmine.DEFAULT_TIMEOUT_INTERVAL, n = new Error(`waitForNotVisible timed out: ${s}ms`), o = setTimeout((() => {
|
|
3385
|
+
clearTimeout(r), t(n);
|
|
3386
|
+
}), s);
|
|
3532
3387
|
}));
|
|
3533
3388
|
}
|
|
3534
3389
|
isIntersectingViewport() {
|
|
@@ -3684,15 +3539,15 @@ class E2EElement extends index_cjs.MockHTMLElement {
|
|
|
3684
3539
|
}
|
|
3685
3540
|
async getComputedStyle(e) {
|
|
3686
3541
|
const t = await this._page.evaluate(((e, t) => {
|
|
3687
|
-
const r = {},
|
|
3688
|
-
return Object.keys(
|
|
3542
|
+
const r = {}, s = window.getComputedStyle(e, t);
|
|
3543
|
+
return Object.keys(s).forEach((e => {
|
|
3689
3544
|
if (isNaN(e)) {
|
|
3690
|
-
const t =
|
|
3545
|
+
const t = s[e];
|
|
3691
3546
|
null != t && (r[e] = t);
|
|
3692
3547
|
} else {
|
|
3693
|
-
const t =
|
|
3548
|
+
const t = s[e];
|
|
3694
3549
|
if (t.includes("-")) {
|
|
3695
|
-
const e =
|
|
3550
|
+
const e = s.getPropertyValue(t);
|
|
3696
3551
|
null != e && (r[t] = e);
|
|
3697
3552
|
}
|
|
3698
3553
|
}
|
|
@@ -3709,8 +3564,8 @@ class E2EElement extends index_cjs.MockHTMLElement {
|
|
|
3709
3564
|
const r = t.eventInitDict || {};
|
|
3710
3565
|
"boolean" != typeof r.bubbles && (r.bubbles = !0), "boolean" != typeof r.cancelable && (r.cancelable = !0),
|
|
3711
3566
|
"boolean" != typeof r.composed && (r.composed = !0);
|
|
3712
|
-
const
|
|
3713
|
-
e.dispatchEvent(
|
|
3567
|
+
const s = new CustomEvent(t.eventName, r);
|
|
3568
|
+
e.dispatchEvent(s);
|
|
3714
3569
|
}
|
|
3715
3570
|
})), r && "function" == typeof r.then ? r.then((e => e)) : r;
|
|
3716
3571
|
}))), this._elmHandle, this._queuedActions);
|
|
@@ -3722,9 +3577,9 @@ class E2EElement extends index_cjs.MockHTMLElement {
|
|
|
3722
3577
|
shadowRootHTML: e.shadowRoot ? e.shadowRoot.innerHTML : null
|
|
3723
3578
|
})), this._elmHandle);
|
|
3724
3579
|
"string" == typeof r ? (this.shadowRoot = index_cjs.parseHtmlToFragment(r), this.shadowRoot.host = this) : this.shadowRoot = null;
|
|
3725
|
-
const
|
|
3726
|
-
for (this.nodeName =
|
|
3727
|
-
for (;
|
|
3580
|
+
const s = index_cjs.parseHtmlToFragment(t).firstElementChild;
|
|
3581
|
+
for (this.nodeName = s.nodeName, this.attributes = index_cjs.cloneAttributes(s.attributes); this.childNodes.length > 0; ) this.removeChild(this.childNodes[0]);
|
|
3582
|
+
for (;s.childNodes.length > 0; ) this.appendChild(s.childNodes[0]);
|
|
3728
3583
|
}
|
|
3729
3584
|
_validate() {
|
|
3730
3585
|
if (this._queuedActions.length > 0) throw new Error("await page.waitForChanges() must be called before reading element information");
|
|
@@ -3736,7 +3591,7 @@ class E2EElement extends index_cjs.MockHTMLElement {
|
|
|
3736
3591
|
}
|
|
3737
3592
|
}
|
|
3738
3593
|
|
|
3739
|
-
const env = process.env;
|
|
3594
|
+
const env = process.env, isOutputTargetDistLazy = e => e.type === DIST_LAZY, isOutputTargetWww = e => e.type === WWW, DIST_LAZY = "dist-lazy", WWW = "www";
|
|
3740
3595
|
|
|
3741
3596
|
exports.MockHeaders = MockHeaders, exports.MockRequest = MockRequest, exports.MockResponse = MockResponse,
|
|
3742
3597
|
exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment() {
|
|
@@ -3756,15 +3611,15 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3756
3611
|
const r = {
|
|
3757
3612
|
browserWSEndpoint: t,
|
|
3758
3613
|
ignoreHTTPSErrors: !0
|
|
3759
|
-
},
|
|
3760
|
-
return await
|
|
3614
|
+
}, s = require(e.__RINDO_PUPPETEER_MODULE__);
|
|
3615
|
+
return await s.connect(r);
|
|
3761
3616
|
}());
|
|
3762
3617
|
const t = await function r(e) {
|
|
3763
3618
|
return e.newPage();
|
|
3764
3619
|
}(this.browser);
|
|
3765
3620
|
this.pages.push(t);
|
|
3766
|
-
const
|
|
3767
|
-
return "string" == typeof
|
|
3621
|
+
const s = process.env;
|
|
3622
|
+
return "string" == typeof s.__RINDO_DEFAULT_TIMEOUT__ && t.setDefaultTimeout(parseInt(s.__RINDO_DEFAULT_TIMEOUT__, 10)),
|
|
3768
3623
|
t;
|
|
3769
3624
|
}
|
|
3770
3625
|
async closeOpenPages() {
|
|
@@ -3785,15 +3640,15 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3785
3640
|
var e;
|
|
3786
3641
|
const t = null !== (e = require("jest-runner").default) && void 0 !== e ? e : require("jest-runner");
|
|
3787
3642
|
return class r extends t {
|
|
3788
|
-
async runTests(e, t, r,
|
|
3643
|
+
async runTests(e, t, r, s, n, o) {
|
|
3789
3644
|
const i = process.env;
|
|
3790
3645
|
if (e = e.filter((e => function t(e, r) {
|
|
3791
|
-
const
|
|
3792
|
-
return !("true" !== r.__RINDO_E2E_TESTS__ || !
|
|
3646
|
+
const s = (e = e.toLowerCase().replace(/\\/g, "/")).includes(".e2e.") || e.includes("/e2e.");
|
|
3647
|
+
return !("true" !== r.__RINDO_E2E_TESTS__ || !s) || "true" === r.__RINDO_SPEC_TESTS__ && !s;
|
|
3793
3648
|
}(e.path, i))), "true" === i.__RINDO_SCREENSHOT__) {
|
|
3794
3649
|
const a = JSON.parse(i.__RINDO_EMULATE_CONFIGS__);
|
|
3795
|
-
for (let l = 0; l < a.length; l++) setScreenshotEmulateData(a[l], i), await super.runTests(e, t, r,
|
|
3796
|
-
} else await super.runTests(e, t, r,
|
|
3650
|
+
for (let l = 0; l < a.length; l++) setScreenshotEmulateData(a[l], i), await super.runTests(e, t, r, s, n, o);
|
|
3651
|
+
} else await super.runTests(e, t, r, s, n, o);
|
|
3797
3652
|
}
|
|
3798
3653
|
};
|
|
3799
3654
|
}, exports.createTesting = async e => {
|
|
@@ -3804,12 +3659,12 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3804
3659
|
"www" === e.type && (e.serviceWorker = null);
|
|
3805
3660
|
})), e.flags.args.includes("--watchAll") && (e.watch = !0), e;
|
|
3806
3661
|
}(e);
|
|
3807
|
-
const {createCompiler: r} = require("../compiler/rindo.js"),
|
|
3808
|
-
let
|
|
3662
|
+
const {createCompiler: r} = require("../compiler/rindo.js"), s = await r(e);
|
|
3663
|
+
let n, o;
|
|
3809
3664
|
const i = async () => {
|
|
3810
3665
|
const t = [];
|
|
3811
|
-
e && (e.sys && e.sys.destroy && t.push(e.sys.destroy()), e = null),
|
|
3812
|
-
|
|
3666
|
+
e && (e.sys && e.sys.destroy && t.push(e.sys.destroy()), e = null), n && (n.close && t.push(n.close()),
|
|
3667
|
+
n = null), o && (o.close && t.push(o.close()), o = null), await Promise.all(t);
|
|
3813
3668
|
};
|
|
3814
3669
|
return {
|
|
3815
3670
|
destroy: i,
|
|
@@ -3828,22 +3683,22 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3828
3683
|
e.empty = !1;
|
|
3829
3684
|
}));
|
|
3830
3685
|
const a = !(e.flags && !1 === e.flags.build);
|
|
3831
|
-
a && e.watch && (c = await
|
|
3686
|
+
a && e.watch && (c = await s.createWatcher()), a && (c ? (t = new Promise((e => {
|
|
3832
3687
|
const t = c.on("buildFinish", (r => {
|
|
3833
3688
|
t(), e(r);
|
|
3834
3689
|
}));
|
|
3835
|
-
})), c.start()) : t =
|
|
3690
|
+
})), c.start()) : t = s.build()), e.devServer.openBrowser = !1, e.devServer.gzip = !1,
|
|
3836
3691
|
e.devServer.reloadStrategy = null;
|
|
3837
3692
|
const l = await Promise.all([ index_js.start(e.devServer, e.logger), startPuppeteerBrowser(e) ]);
|
|
3838
|
-
if (
|
|
3693
|
+
if (n = l[0], o = l[1], t) {
|
|
3839
3694
|
const r = await t;
|
|
3840
3695
|
if (!r || !e.watch && hasError(r && r.diagnostics)) return await i(), !1;
|
|
3841
3696
|
}
|
|
3842
|
-
|
|
3697
|
+
n && (r.__RINDO_BROWSER_URL__ = n.browserUrl, e.logger.debug(`e2e dev server url: ${r.__RINDO_BROWSER_URL__}`),
|
|
3843
3698
|
r.__RINDO_APP_SCRIPT_URL__ = function d(e, t) {
|
|
3844
3699
|
return getAppUrl(e, t, `${e.fsNamespace}.esm.js`);
|
|
3845
|
-
}(e,
|
|
3846
|
-
getAppStyleUrl(e,
|
|
3700
|
+
}(e, n.browserUrl), e.logger.debug(`e2e app script url: ${r.__RINDO_APP_SCRIPT_URL__}`),
|
|
3701
|
+
getAppStyleUrl(e, n.browserUrl) && (r.__RINDO_APP_STYLE_URL__ = getAppStyleUrl(e, n.browserUrl),
|
|
3847
3702
|
e.logger.debug(`e2e app style url: ${r.__RINDO_APP_STYLE_URL__}`)));
|
|
3848
3703
|
}
|
|
3849
3704
|
} catch (t) {
|
|
@@ -3852,9 +3707,9 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3852
3707
|
try {
|
|
3853
3708
|
l = a ? await async function h(e, t) {
|
|
3854
3709
|
e.logger.debug(`screenshot connector: ${e.testing.screenshotConnector}`);
|
|
3855
|
-
const r = new (require(e.testing.screenshotConnector)),
|
|
3856
|
-
e.logger.debug(`pixelmatch module: ${
|
|
3857
|
-
const
|
|
3710
|
+
const r = new (require(e.testing.screenshotConnector)), s = path$2.join(e.sys.getCompilerExecutingPath(), "..", "..", "screenshot", "pixel-match.js");
|
|
3711
|
+
e.logger.debug(`pixelmatch module: ${s}`);
|
|
3712
|
+
const n = e.logger.createTimeSpan("screenshot, initBuild started", !0);
|
|
3858
3713
|
await r.initBuild({
|
|
3859
3714
|
buildId: createBuildId(),
|
|
3860
3715
|
buildMessage: createBuildMessage(),
|
|
@@ -3869,25 +3724,25 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3869
3724
|
allowableMismatchedRatio: e.testing.allowableMismatchedRatio,
|
|
3870
3725
|
pixelmatchThreshold: e.testing.pixelmatchThreshold,
|
|
3871
3726
|
waitBeforeScreenshot: e.testing.waitBeforeScreenshot,
|
|
3872
|
-
pixelmatchModulePath:
|
|
3873
|
-
}), e.flags.updateScreenshot || await r.pullMasterBuild(),
|
|
3727
|
+
pixelmatchModulePath: s
|
|
3728
|
+
}), e.flags.updateScreenshot || await r.pullMasterBuild(), n.finish("screenshot, initBuild finished");
|
|
3874
3729
|
const o = await Promise.all([ await r.getMasterBuild(), await r.getScreenshotCache() ]), i = o[0], a = o[1];
|
|
3875
3730
|
t.__RINDO_SCREENSHOT_BUILD__ = r.toJson(i, a);
|
|
3876
3731
|
const l = e.logger.createTimeSpan("screenshot, tests started", !0), c = await runJest(e, t);
|
|
3877
3732
|
l.finish(`screenshot, tests finished, passed: ${c}`);
|
|
3878
3733
|
try {
|
|
3879
3734
|
const t = e.logger.createTimeSpan("screenshot, completeTimespan started", !0);
|
|
3880
|
-
let
|
|
3881
|
-
if (t.finish("screenshot, completeTimespan finished"),
|
|
3735
|
+
let s = await r.completeBuild(i);
|
|
3736
|
+
if (t.finish("screenshot, completeTimespan finished"), s) {
|
|
3882
3737
|
const t = e.logger.createTimeSpan("screenshot, publishBuild started", !0);
|
|
3883
|
-
if (
|
|
3884
|
-
e.flags.updateScreenshot)
|
|
3738
|
+
if (s = await r.publishBuild(s), t.finish("screenshot, publishBuild finished"),
|
|
3739
|
+
e.flags.updateScreenshot) s.currentBuild && "string" == typeof s.currentBuild.previewUrl && e.logger.info(e.logger.magenta(s.currentBuild.previewUrl)); else if (s.compare) {
|
|
3885
3740
|
try {
|
|
3886
|
-
await r.updateScreenshotCache(a,
|
|
3741
|
+
await r.updateScreenshotCache(a, s);
|
|
3887
3742
|
} catch (t) {
|
|
3888
3743
|
e.logger.error(t);
|
|
3889
3744
|
}
|
|
3890
|
-
e.logger.info(`screenshots compared: ${
|
|
3745
|
+
e.logger.info(`screenshots compared: ${s.compare.diffs.length}`), "string" == typeof s.compare.url && e.logger.info(e.logger.magenta(s.compare.url));
|
|
3891
3746
|
}
|
|
3892
3747
|
}
|
|
3893
3748
|
} catch (t) {
|
|
@@ -3998,26 +3853,26 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3998
3853
|
if (!global.__NEW_TEST_PAGE__) throw new Error("newE2EPage() is only available from E2E tests, and ran with the --e2e cmd line flag.");
|
|
3999
3854
|
const t = await global.__NEW_TEST_PAGE__(), r = [];
|
|
4000
3855
|
try {
|
|
4001
|
-
t._e2eElements = [], t._e2eGoto = t.goto, t._e2eClose = t.close, await async function
|
|
3856
|
+
t._e2eElements = [], t._e2eGoto = t.goto, t._e2eClose = t.close, await async function s(e) {
|
|
4002
3857
|
if (e.isClosed()) return;
|
|
4003
3858
|
const t = env.__RINDO_EMULATE__;
|
|
4004
3859
|
if (!t) return;
|
|
4005
|
-
const r = JSON.parse(t),
|
|
3860
|
+
const r = JSON.parse(t), s = {
|
|
4006
3861
|
viewport: r.viewport,
|
|
4007
3862
|
userAgent: r.userAgent
|
|
4008
3863
|
};
|
|
4009
|
-
await e.emulate(
|
|
4010
|
-
}(t), await t.setCacheEnabled(!1), await initPageEvents(t), function
|
|
3864
|
+
await e.emulate(s);
|
|
3865
|
+
}(t), await t.setCacheEnabled(!1), await initPageEvents(t), function n(e) {
|
|
4011
3866
|
const t = process.env;
|
|
4012
|
-
"true" === t.__RINDO_SCREENSHOT__ ? e.compareScreenshot = (r,
|
|
4013
|
-
const
|
|
3867
|
+
"true" === t.__RINDO_SCREENSHOT__ ? e.compareScreenshot = (r, s) => {
|
|
3868
|
+
const n = global;
|
|
4014
3869
|
let o, i = "", a = "";
|
|
4015
|
-
if (
|
|
4016
|
-
"string" == typeof
|
|
4017
|
-
"object" == typeof
|
|
3870
|
+
if (n.currentSpec && ("string" == typeof n.currentSpec.fullName && (i = n.currentSpec.fullName),
|
|
3871
|
+
"string" == typeof n.currentSpec.testPath && (a = n.currentSpec.testPath)), "string" == typeof r ? (i.length > 0 ? i += ", " + r : i = r,
|
|
3872
|
+
"object" == typeof s && (o = s)) : "object" == typeof r && (o = r), i = i.trim(),
|
|
4018
3873
|
o = o || {}, !i) throw new Error(`Invalid screenshot description in "${a}"`);
|
|
4019
|
-
if (
|
|
4020
|
-
return
|
|
3874
|
+
if (n.screenshotDescriptions.has(i)) throw new Error(`Screenshot description "${i}" found in "${a}" cannot be used for multiple screenshots and must be unique. To make screenshot descriptions unique within the same test, use the first argument to "compareScreenshot", such as "compareScreenshot('more to the description')".`);
|
|
3875
|
+
return n.screenshotDescriptions.add(i), async function l(e, t, r, s, n) {
|
|
4021
3876
|
if ("string" != typeof t.__RINDO_EMULATE__) throw new Error("compareScreenshot, missing screenshot emulate env var");
|
|
4022
3877
|
if ("string" != typeof t.__RINDO_SCREENSHOT_BUILD__) throw new Error("compareScreenshot, missing screen build env var");
|
|
4023
3878
|
const o = JSON.parse(t.__RINDO_EMULATE__), i = JSON.parse(t.__RINDO_SCREENSHOT_BUILD__);
|
|
@@ -4041,10 +3896,10 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4041
3896
|
width: e.clip.width,
|
|
4042
3897
|
height: e.clip.height
|
|
4043
3898
|
}), t;
|
|
4044
|
-
}(
|
|
3899
|
+
}(n), u = await e.screenshot(l), d = "number" == typeof n.pixelmatchThreshold ? n.pixelmatchThreshold : i.pixelmatchThreshold;
|
|
4045
3900
|
let h = o.viewport.width, p = o.viewport.height;
|
|
4046
|
-
return
|
|
4047
|
-
await compareScreenshot(o, i, u, r, h, p,
|
|
3901
|
+
return n && n.clip && ("number" == typeof n.clip.width && (h = n.clip.width), "number" == typeof n.clip.height && (p = n.clip.height)),
|
|
3902
|
+
await compareScreenshot(o, i, u, r, h, p, s, d);
|
|
4048
3903
|
}(e, t, i, a, o);
|
|
4049
3904
|
} : e.compareScreenshot = async () => ({
|
|
4050
3905
|
mismatchedPixels: 0,
|
|
@@ -4056,7 +3911,7 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4056
3911
|
deviceScaleFactor: 1
|
|
4057
3912
|
});
|
|
4058
3913
|
}(t);
|
|
4059
|
-
let
|
|
3914
|
+
let s = null;
|
|
4060
3915
|
t.close = async e => {
|
|
4061
3916
|
try {
|
|
4062
3917
|
if (Array.isArray(t._e2eElements)) {
|
|
@@ -4076,15 +3931,15 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4076
3931
|
t.isClosed() || await t._e2eClose(e);
|
|
4077
3932
|
} catch (e) {}
|
|
4078
3933
|
};
|
|
4079
|
-
const
|
|
3934
|
+
const n = async () => (s || (s = t.evaluateHandle((() => document))), (await s).asElement());
|
|
4080
3935
|
t.find = async e => {
|
|
4081
|
-
const r = await
|
|
3936
|
+
const r = await n();
|
|
4082
3937
|
return find(t, r, e);
|
|
4083
3938
|
}, t.findAll = async e => {
|
|
4084
|
-
const r = await
|
|
3939
|
+
const r = await n();
|
|
4085
3940
|
return findAll(t, r, e);
|
|
4086
3941
|
}, t.waitForEvent = async e => {
|
|
4087
|
-
const r = await
|
|
3942
|
+
const r = await n();
|
|
4088
3943
|
return waitForEvent(t, e, r);
|
|
4089
3944
|
}, t.getDiagnostics = () => r, t.waitForChanges = waitForChanges.bind(null, t),
|
|
4090
3945
|
t.debugger = () => {
|
|
@@ -4101,8 +3956,8 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4101
3956
|
location: e.location().url
|
|
4102
3957
|
}), o)) throw new Error(serializeConsoleMessage(e));
|
|
4103
3958
|
!function t(e) {
|
|
4104
|
-
const t = serializeConsoleMessage(e), r = e.type(),
|
|
4105
|
-
"debug" !==
|
|
3959
|
+
const t = serializeConsoleMessage(e), r = e.type(), s = "warning" === r ? "warn" : r;
|
|
3960
|
+
"debug" !== s && ("function" == typeof console[s] ? console[s](t) : console.log(r, t));
|
|
4106
3961
|
}(e);
|
|
4107
3962
|
})), t.on("pageerror", (e => {
|
|
4108
3963
|
throw r.push({
|
|
@@ -4127,63 +3982,67 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4127
3982
|
}
|
|
4128
3983
|
return t;
|
|
4129
3984
|
}, exports.newSpecPage = async function newSpecPage(e) {
|
|
3985
|
+
var t;
|
|
4130
3986
|
if (null == e) throw new Error("NewSpecPageOptions required");
|
|
4131
|
-
testing.resetPlatform(
|
|
4132
|
-
e.
|
|
4133
|
-
testing.setSupportsShadowDom(!1)) : (e.includeAnnotations = !!e.includeAnnotations,
|
|
3987
|
+
testing.resetPlatform(null !== (t = e.platform) && void 0 !== t ? t : {}), resetBuildConditionals(appData.BUILD),
|
|
3988
|
+
Array.isArray(e.components) && testing.registerComponents(e.components), e.hydrateClientSide && (e.includeAnnotations = !0),
|
|
3989
|
+
e.hydrateServerSide ? (e.includeAnnotations = !0, testing.setSupportsShadowDom(!1)) : (e.includeAnnotations = !!e.includeAnnotations,
|
|
4134
3990
|
!1 === e.supportsShadowDom ? testing.setSupportsShadowDom(!1) : testing.setSupportsShadowDom(!0)),
|
|
4135
3991
|
appData.BUILD.cssAnnotations = e.includeAnnotations;
|
|
4136
|
-
const
|
|
3992
|
+
const r = new Set;
|
|
4137
3993
|
testing.win.__rindo_spec_options = e;
|
|
4138
|
-
const
|
|
3994
|
+
const s = testing.win.document, n = {
|
|
4139
3995
|
win: testing.win,
|
|
4140
|
-
doc:
|
|
4141
|
-
body:
|
|
3996
|
+
doc: s,
|
|
3997
|
+
body: s.body,
|
|
4142
3998
|
build: appData.BUILD,
|
|
4143
3999
|
styles: testing.styles,
|
|
4144
|
-
setContent: e => (
|
|
4000
|
+
setContent: e => (s.body.innerHTML = e, testing.flushAll()),
|
|
4145
4001
|
waitForChanges: testing.flushAll,
|
|
4146
4002
|
flushLoadModule: testing.flushLoadModule,
|
|
4147
4003
|
flushQueue: testing.flushQueue
|
|
4148
|
-
},
|
|
4004
|
+
}, o = e.components.map((e => {
|
|
4149
4005
|
if (null == e.COMPILER_META) throw new Error('Invalid component class: Missing static "COMPILER_META" property.');
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
e.prototype.
|
|
4154
|
-
e.prototype.
|
|
4006
|
+
r.add(e.COMPILER_META.tagName), e.isProxied = !1, function t(e) {
|
|
4007
|
+
var t, r, s, n, o, i;
|
|
4008
|
+
"function" == typeof (null === (t = e.prototype) || void 0 === t ? void 0 : t.__componentWillLoad) && (e.prototype.componentWillLoad = e.prototype.__componentWillLoad,
|
|
4009
|
+
e.prototype.__componentWillLoad = null), "function" == typeof (null === (r = e.prototype) || void 0 === r ? void 0 : r.__componentWillUpdate) && (e.prototype.componentWillUpdate = e.prototype.__componentWillUpdate,
|
|
4010
|
+
e.prototype.__componentWillUpdate = null), "function" == typeof (null === (s = e.prototype) || void 0 === s ? void 0 : s.__componentWillRender) && (e.prototype.componentWillRender = e.prototype.__componentWillRender,
|
|
4011
|
+
e.prototype.__componentWillRender = null), "function" == typeof (null === (n = e.prototype) || void 0 === n ? void 0 : n.componentWillLoad) && (e.prototype.__componentWillLoad = e.prototype.componentWillLoad,
|
|
4155
4012
|
e.prototype.componentWillLoad = function() {
|
|
4156
4013
|
const e = this.__componentWillLoad();
|
|
4157
4014
|
return null != e && "function" == typeof e.then ? testing.writeTask((() => e)) : testing.writeTask((() => Promise.resolve())),
|
|
4158
4015
|
e;
|
|
4159
|
-
}), "function" == typeof e.prototype.componentWillUpdate && (e.prototype.__componentWillUpdate = e.prototype.componentWillUpdate,
|
|
4016
|
+
}), "function" == typeof (null === (o = e.prototype) || void 0 === o ? void 0 : o.componentWillUpdate) && (e.prototype.__componentWillUpdate = e.prototype.componentWillUpdate,
|
|
4160
4017
|
e.prototype.componentWillUpdate = function() {
|
|
4161
4018
|
const e = this.__componentWillUpdate();
|
|
4162
4019
|
return null != e && "function" == typeof e.then ? testing.writeTask((() => e)) : testing.writeTask((() => Promise.resolve())),
|
|
4163
4020
|
e;
|
|
4164
|
-
}), "function" == typeof e.prototype.componentWillRender && (e.prototype.__componentWillRender = e.prototype.componentWillRender,
|
|
4021
|
+
}), "function" == typeof (null === (i = e.prototype) || void 0 === i ? void 0 : i.componentWillRender) && (e.prototype.__componentWillRender = e.prototype.componentWillRender,
|
|
4165
4022
|
e.prototype.componentWillRender = function() {
|
|
4166
4023
|
const e = this.__componentWillRender();
|
|
4167
4024
|
return null != e && "function" == typeof e.then ? testing.writeTask((() => e)) : testing.writeTask((() => Promise.resolve())),
|
|
4168
4025
|
e;
|
|
4169
4026
|
});
|
|
4170
4027
|
}(e);
|
|
4171
|
-
const
|
|
4172
|
-
if (Array.isArray(
|
|
4028
|
+
const s = `${e.COMPILER_META.tagName}.${Math.round(899999 * Math.random()) + 1e5}`, n = e.COMPILER_META.styles;
|
|
4029
|
+
if (Array.isArray(n)) if (n.length > 1) {
|
|
4173
4030
|
const t = {};
|
|
4174
|
-
|
|
4031
|
+
n.forEach((e => {
|
|
4175
4032
|
t[e.modeName] = e.styleStr;
|
|
4176
4033
|
})), e.style = t;
|
|
4177
|
-
} else 1 ===
|
|
4178
|
-
|
|
4034
|
+
} else 1 === n.length && (e.style = n[0].styleStr);
|
|
4035
|
+
testing.registerModule(s, e);
|
|
4036
|
+
const o = ((e, t) => [ e, t.map((e => ((e, t) => {
|
|
4179
4037
|
let r = 0;
|
|
4180
4038
|
"shadow" === e.encapsulation ? (r |= 1, e.shadowDelegatesFocus && (r |= 16)) : "scoped" === e.encapsulation && (r |= 2),
|
|
4181
4039
|
"shadow" !== e.encapsulation && e.htmlTagNames.includes("slot") && (r |= 4), e.hasMode && (r |= 32);
|
|
4182
|
-
const
|
|
4183
|
-
return trimFalsy([ r, e.tagName, Object.keys(
|
|
4184
|
-
})(e, !0))) ])(
|
|
4185
|
-
|
|
4186
|
-
|
|
4040
|
+
const s = formatComponentRuntimeMembers(e, t), n = formatHostListeners(e);
|
|
4041
|
+
return trimFalsy([ r, e.tagName, Object.keys(s).length > 0 ? s : void 0, n.length > 0 ? n : void 0 ]);
|
|
4042
|
+
})(e, !0))) ])(s, [ e.COMPILER_META ]);
|
|
4043
|
+
return o;
|
|
4044
|
+
})), i = (e => {
|
|
4045
|
+
const t = e.some((e => e.htmlTagNames.includes("slot"))), r = e.some((e => "shadow" === e.encapsulation)), s = e.some((e => "shadow" !== e.encapsulation && e.htmlTagNames.includes("slot"))), n = {
|
|
4187
4046
|
allRenderFn: e.every((e => e.hasRenderFn)),
|
|
4188
4047
|
cmpDidLoad: e.some((e => e.hasComponentDidLoadFn)),
|
|
4189
4048
|
cmpShouldUpdate: e.some((e => e.hasComponentShouldUpdateFn)),
|
|
@@ -4220,7 +4079,7 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4220
4079
|
shadowDom: r,
|
|
4221
4080
|
shadowDelegatesFocus: r && e.some((e => e.shadowDelegatesFocus)),
|
|
4222
4081
|
slot: t,
|
|
4223
|
-
slotRelocation:
|
|
4082
|
+
slotRelocation: s,
|
|
4224
4083
|
state: e.some((e => e.hasState)),
|
|
4225
4084
|
style: e.some((e => e.hasStyle)),
|
|
4226
4085
|
svg: e.some((e => e.htmlTagNames.includes("svg"))),
|
|
@@ -4239,11 +4098,11 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4239
4098
|
watchCallback: e.some((e => e.hasWatchCallback)),
|
|
4240
4099
|
taskQueue: !0
|
|
4241
4100
|
};
|
|
4242
|
-
return
|
|
4243
|
-
|
|
4101
|
+
return n.asyncLoading = n.cmpWillUpdate || n.cmpWillLoad || n.cmpWillRender, n.vdomAttribute = n.vdomAttribute || n.reflect,
|
|
4102
|
+
n.vdomPropOrAttr = n.vdomPropOrAttr || n.reflect, n;
|
|
4244
4103
|
})(e.components.map((e => e.COMPILER_META)));
|
|
4245
|
-
if (e.strictBuild ? Object.assign(appData.BUILD,
|
|
4246
|
-
!0 ===
|
|
4104
|
+
if (e.strictBuild ? Object.assign(appData.BUILD, i) : Object.keys(i).forEach((e => {
|
|
4105
|
+
!0 === i[e] && (appData.BUILD[e] = !0);
|
|
4247
4106
|
})), appData.BUILD.asyncLoading = !0, e.hydrateClientSide ? (appData.BUILD.hydrateClientSide = !0,
|
|
4248
4107
|
appData.BUILD.hydrateServerSide = !1) : e.hydrateServerSide && (appData.BUILD.hydrateServerSide = !0,
|
|
4249
4108
|
appData.BUILD.hydrateClientSide = !1), appData.BUILD.cloneNodeFix = !1, appData.BUILD.shadowDomShim = !1,
|
|
@@ -4259,7 +4118,7 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4259
4118
|
if ("string" == typeof e.userAgent) try {
|
|
4260
4119
|
n.win.navigator.userAgent = e.userAgent;
|
|
4261
4120
|
} catch (e) {}
|
|
4262
|
-
if (testing.bootstrapLazy(
|
|
4121
|
+
if (testing.bootstrapLazy(o), "function" == typeof e.template) {
|
|
4263
4122
|
const t = {
|
|
4264
4123
|
$ancestorComponent$: void 0,
|
|
4265
4124
|
$flags$: 0,
|
|
@@ -4273,10 +4132,10 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4273
4132
|
testing.renderVdom(t, e.template());
|
|
4274
4133
|
} else "string" == typeof e.html && (n.body.innerHTML = e.html);
|
|
4275
4134
|
!1 !== e.flushQueue && await n.waitForChanges();
|
|
4276
|
-
let
|
|
4135
|
+
let a = null;
|
|
4277
4136
|
return Object.defineProperty(n, "root", {
|
|
4278
4137
|
get() {
|
|
4279
|
-
if (null ==
|
|
4138
|
+
if (null == a && (a = findRootComponent(r, n.body)), null != a) return a;
|
|
4280
4139
|
const e = n.body.firstElementChild;
|
|
4281
4140
|
return null != e ? e : null;
|
|
4282
4141
|
}
|
|
@@ -4285,12 +4144,12 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4285
4144
|
const e = testing.getHostRef(n.root);
|
|
4286
4145
|
return null != e ? e.$lazyInstance$ : null;
|
|
4287
4146
|
}
|
|
4288
|
-
}), e.hydrateServerSide && testing.insertVdomAnnotations(
|
|
4147
|
+
}), e.hydrateServerSide && testing.insertVdomAnnotations(s, []), e.autoApplyChanges && (testing.startAutoApplyChanges(),
|
|
4289
4148
|
n.waitForChanges = () => (console.error('waitForChanges() cannot be used manually if the "startAutoApplyChanges" option is enabled'),
|
|
4290
4149
|
Promise.resolve())), n;
|
|
4291
4150
|
}, exports.shuffleArray = function shuffleArray(e) {
|
|
4292
|
-
let t, r,
|
|
4293
|
-
for (;0 !==
|
|
4151
|
+
let t, r, s = e.length;
|
|
4152
|
+
for (;0 !== s; ) r = Math.floor(Math.random() * s), s -= 1, t = e[s], e[s] = e[r],
|
|
4294
4153
|
e[r] = t;
|
|
4295
4154
|
return e;
|
|
4296
4155
|
}, exports.transpile = transpile;
|