@intelligentgraphics/ig.gfx.packager 3.0.9 → 3.0.11
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/build/bin.mjs +6 -0
- package/build/bin.mjs.map +1 -0
- package/build/cli-381989cc.mjs +1389 -0
- package/build/cli-381989cc.mjs.map +1 -0
- package/build/dependencies-1f665204.mjs +129 -0
- package/build/dependencies-1f665204.mjs.map +1 -0
- package/build/generateIndex-074f4aa1.mjs +257 -0
- package/build/generateIndex-074f4aa1.mjs.map +1 -0
- package/build/generateParameterType-4c9e95a5.mjs +75 -0
- package/build/generateParameterType-4c9e95a5.mjs.map +1 -0
- package/build/index-06ac2c4c.mjs +495 -0
- package/build/index-06ac2c4c.mjs.map +1 -0
- package/build/index-cc42a478.mjs +312 -0
- package/build/index-cc42a478.mjs.map +1 -0
- package/build/postinstall-c38d9b55.mjs +67 -0
- package/build/postinstall-c38d9b55.mjs.map +1 -0
- package/build/publishNpm-8ec1b871.mjs +134 -0
- package/build/publishNpm-8ec1b871.mjs.map +1 -0
- package/build/versionFile-aa8b6b7a.mjs +384 -0
- package/build/versionFile-aa8b6b7a.mjs.map +1 -0
- package/lib/lib.mjs +1476 -0
- package/package.json +13 -9
- package/readme.md +86 -2
- package/build/cli-17d957b0.js +0 -2531
- package/build/cli-17d957b0.js.map +0 -1
- package/build/dependencies-51916db0.js +0 -149
- package/build/dependencies-51916db0.js.map +0 -1
- package/build/generateIndex-59993f0f.js +0 -266
- package/build/generateIndex-59993f0f.js.map +0 -1
- package/build/generateParameterType-d3ab08fd.js +0 -74
- package/build/generateParameterType-d3ab08fd.js.map +0 -1
- package/build/index-a48c5d0a.js +0 -480
- package/build/index-a48c5d0a.js.map +0 -1
- package/build/index-ac2cd050.js +0 -308
- package/build/index-ac2cd050.js.map +0 -1
- package/build/index.mjs +0 -6
- package/build/index.mjs.map +0 -1
- package/build/postinstall-9990fb31.js +0 -64
- package/build/postinstall-9990fb31.js.map +0 -1
- package/build/publishNpm-74a96626.js +0 -133
- package/build/publishNpm-74a96626.js.map +0 -1
- package/build/versionFile-68e35b54.js +0 -370
- package/build/versionFile-68e35b54.js.map +0 -1
package/build/cli-17d957b0.js
DELETED
|
@@ -1,2531 +0,0 @@
|
|
|
1
|
-
import updateNotifier from 'update-notifier';
|
|
2
|
-
import * as fs$1 from 'fs';
|
|
3
|
-
import fs__default from 'fs';
|
|
4
|
-
import * as path$1 from 'path';
|
|
5
|
-
import path__default from 'path';
|
|
6
|
-
import yargs from 'yargs/yargs';
|
|
7
|
-
import { fileURLToPath } from 'url';
|
|
8
|
-
import glob from 'glob';
|
|
9
|
-
import 'resolve';
|
|
10
|
-
import { writePackageSync } from 'write-pkg';
|
|
11
|
-
import 'node:path';
|
|
12
|
-
import 'node:fs';
|
|
13
|
-
import require$$0 from 'assert';
|
|
14
|
-
import require$$2 from 'events';
|
|
15
|
-
import require$$6 from 'util';
|
|
16
|
-
import axios from 'axios';
|
|
17
|
-
import inquirer from 'inquirer';
|
|
18
|
-
|
|
19
|
-
const stripUtf8Bom = text => {
|
|
20
|
-
// Catches EFBBBF (UTF-8 BOM) because the buffer-to-string
|
|
21
|
-
// conversion translates it to FEFF (UTF-16 BOM).
|
|
22
|
-
if (text.charCodeAt(0) === 0xfeff) {
|
|
23
|
-
return text.slice(1);
|
|
24
|
-
}
|
|
25
|
-
return text;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const readNpmManifest = directory => {
|
|
29
|
-
const packageJsonPath = path$1.join(directory, "package.json");
|
|
30
|
-
const packageJson = stripUtf8Bom(fs$1.readFileSync(packageJsonPath, {
|
|
31
|
-
encoding: "utf8"
|
|
32
|
-
}));
|
|
33
|
-
return JSON.parse(packageJson);
|
|
34
|
-
};
|
|
35
|
-
const writeNpmManifest = (directory, packageJson) => {
|
|
36
|
-
const packageJsonPath = path$1.join(directory, "package.json");
|
|
37
|
-
writePackageSync(packageJsonPath, packageJson);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const getNodeErrorCode = error => {
|
|
41
|
-
if (error !== null && typeof error === "object" && error.code !== undefined) {
|
|
42
|
-
return error.code;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* No such file or directory: Commonly raised by fs operations to indicate that a component of the specified pathname does not exist. No entity (file or directory) could be found by the given path.
|
|
48
|
-
*
|
|
49
|
-
* @param {unknown} error
|
|
50
|
-
*/
|
|
51
|
-
const isErrorENOENT = error => getNodeErrorCode(error) === "ENOENT";
|
|
52
|
-
|
|
53
|
-
// Functionality related to working with a single package.
|
|
54
|
-
const PACKAGE_FILE = "_Package.json";
|
|
55
|
-
const INDEX_FILE = "_Index.json";
|
|
56
|
-
const ANIMATION_FILE_SUFFIX = ".animation.json";
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Describes the location of a single package.
|
|
60
|
-
*
|
|
61
|
-
* @export
|
|
62
|
-
* @interface PackageLocation
|
|
63
|
-
*/
|
|
64
|
-
|
|
65
|
-
const getCreatorIndexParameterPrimaryJSType = type => {
|
|
66
|
-
switch (type) {
|
|
67
|
-
case "LengthM":
|
|
68
|
-
case "ArcDEG":
|
|
69
|
-
case "Integer":
|
|
70
|
-
case "Int":
|
|
71
|
-
case "Float":
|
|
72
|
-
return "number";
|
|
73
|
-
case "Boolean":
|
|
74
|
-
case "Bool":
|
|
75
|
-
return "boolean";
|
|
76
|
-
case "String":
|
|
77
|
-
case "Material":
|
|
78
|
-
case "Geometry":
|
|
79
|
-
case "Animation":
|
|
80
|
-
case "Interactor":
|
|
81
|
-
case "Evaluator":
|
|
82
|
-
default:
|
|
83
|
-
return "string";
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
const parseCreatorPackageName = manifest => {
|
|
87
|
-
const [domain, ...subdomainParts] = manifest.Package.split(".");
|
|
88
|
-
return {
|
|
89
|
-
domain,
|
|
90
|
-
subdomain: subdomainParts.join(".")
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
/**
|
|
94
|
-
* Detects the package at the given directory.
|
|
95
|
-
*
|
|
96
|
-
* @param {string} directory
|
|
97
|
-
* @returns {PackageLocation}
|
|
98
|
-
*/
|
|
99
|
-
const detectPackage = (workspace, directory) => {
|
|
100
|
-
directory = path$1.resolve(workspace.path, directory);
|
|
101
|
-
const scriptsPath = path$1.join(directory, "Scripts");
|
|
102
|
-
const tsPath = path$1.join(directory, "ts");
|
|
103
|
-
let location;
|
|
104
|
-
if (fs$1.existsSync(scriptsPath)) {
|
|
105
|
-
location = {
|
|
106
|
-
_kind: "PackageLocation",
|
|
107
|
-
path: directory,
|
|
108
|
-
scriptsDir: scriptsPath,
|
|
109
|
-
manifestDir: scriptsPath
|
|
110
|
-
};
|
|
111
|
-
} else if (fs$1.existsSync(tsPath)) {
|
|
112
|
-
location = {
|
|
113
|
-
_kind: "PackageLocation",
|
|
114
|
-
path: directory,
|
|
115
|
-
scriptsDir: tsPath,
|
|
116
|
-
manifestDir: directory
|
|
117
|
-
};
|
|
118
|
-
} else {
|
|
119
|
-
location = {
|
|
120
|
-
_kind: "PackageLocation",
|
|
121
|
-
path: directory,
|
|
122
|
-
scriptsDir: directory,
|
|
123
|
-
manifestDir: directory
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
try {
|
|
127
|
-
readPackageCreatorManifest(location);
|
|
128
|
-
} catch (err) {
|
|
129
|
-
if (isErrorENOENT(err)) {
|
|
130
|
-
throw new Error(`No _Package.json found in ${location.manifestDir}`);
|
|
131
|
-
}
|
|
132
|
-
throw err;
|
|
133
|
-
}
|
|
134
|
-
return location;
|
|
135
|
-
};
|
|
136
|
-
const readPackageCreatorManifest = location => {
|
|
137
|
-
const packageJsonPath = path$1.join(location.manifestDir, PACKAGE_FILE);
|
|
138
|
-
const packageJson = stripUtf8Bom(fs$1.readFileSync(packageJsonPath, {
|
|
139
|
-
encoding: "utf8"
|
|
140
|
-
}));
|
|
141
|
-
const result = JSON.parse(packageJson);
|
|
142
|
-
return {
|
|
143
|
-
...result,
|
|
144
|
-
Scope: result.Scope || result.Package
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
const writePackageCreatorManifest = (location, creatorPackage) => {
|
|
148
|
-
const packageJsonPath = path$1.join(location.manifestDir, PACKAGE_FILE);
|
|
149
|
-
fs$1.writeFileSync(packageJsonPath, JSON.stringify(creatorPackage, null, "\t") + "\n");
|
|
150
|
-
};
|
|
151
|
-
const getPackageCreatorIndexPath = location => path$1.join(location.manifestDir, INDEX_FILE);
|
|
152
|
-
const readPackageCreatorIndex = location => {
|
|
153
|
-
try {
|
|
154
|
-
const indexPath = getPackageCreatorIndexPath(location);
|
|
155
|
-
const index = stripUtf8Bom(fs$1.readFileSync(indexPath, {
|
|
156
|
-
encoding: "utf8"
|
|
157
|
-
}));
|
|
158
|
-
return JSON.parse(index);
|
|
159
|
-
} catch (err) {
|
|
160
|
-
if (isErrorENOENT(err)) {
|
|
161
|
-
return undefined;
|
|
162
|
-
}
|
|
163
|
-
throw err;
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
const writePackageCreatorIndex = (location, index) => {
|
|
167
|
-
const indexPath = getPackageCreatorIndexPath(location);
|
|
168
|
-
fs$1.writeFileSync(indexPath, JSON.stringify(index, null, "\t") + "\n");
|
|
169
|
-
};
|
|
170
|
-
const readPackageNpmManifest = location => {
|
|
171
|
-
try {
|
|
172
|
-
return readNpmManifest(location.manifestDir);
|
|
173
|
-
} catch (err) {
|
|
174
|
-
if (isErrorENOENT(err)) {
|
|
175
|
-
return undefined;
|
|
176
|
-
}
|
|
177
|
-
throw err;
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
const writePackageNpmManifest = (location, packageJson) => {
|
|
181
|
-
writeNpmManifest(location.manifestDir, packageJson);
|
|
182
|
-
};
|
|
183
|
-
const readPackageAnimationList = location => {
|
|
184
|
-
const directoryContent = fs$1.readdirSync(location.manifestDir);
|
|
185
|
-
const animationPathList = [];
|
|
186
|
-
for (const entry of directoryContent) {
|
|
187
|
-
if (entry.endsWith(ANIMATION_FILE_SUFFIX)) {
|
|
188
|
-
const animationPath = path$1.join(location.manifestDir, entry);
|
|
189
|
-
animationPathList.push(animationPath);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
return animationPathList;
|
|
193
|
-
};
|
|
194
|
-
const getPackageReleasesDirectory = location => path$1.join(location.path, "Releases");
|
|
195
|
-
|
|
196
|
-
// Functionality related to working with a workspace consisting of multiple packages.
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Describe the location of a workspace constining of n packages.
|
|
200
|
-
*
|
|
201
|
-
* @export
|
|
202
|
-
* @interface WorkspaceLocation
|
|
203
|
-
*/
|
|
204
|
-
|
|
205
|
-
const detectWorkspace = directory => {
|
|
206
|
-
directory = path$1.resolve(process.cwd(), directory);
|
|
207
|
-
return {
|
|
208
|
-
_kind: "WorkspaceLocation",
|
|
209
|
-
path: directory
|
|
210
|
-
};
|
|
211
|
-
};
|
|
212
|
-
const readWorkspaceNpmManifest = workspace => {
|
|
213
|
-
try {
|
|
214
|
-
return readNpmManifest(workspace.path);
|
|
215
|
-
} catch (err) {
|
|
216
|
-
if (isErrorENOENT(err)) {
|
|
217
|
-
throw new Error(`Expected a package.json file to exist in ${workspace.path}. See packager readme for instructions on how to create the package.json.`);
|
|
218
|
-
}
|
|
219
|
-
throw err;
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
const writeWorkspaceNpmManifest = (workspace, packageJson) => writeNpmManifest(workspace.path, packageJson);
|
|
223
|
-
const getWorkspaceOutputPath = workspace => path$1.join(workspace.path, "bin");
|
|
224
|
-
const getWorkspaceLibPath = workspace => path$1.join(workspace.path, "lib");
|
|
225
|
-
function* iterateWorkspacePackages(workspace) {
|
|
226
|
-
const entries = fs$1.readdirSync(workspace.path, {
|
|
227
|
-
withFileTypes: true
|
|
228
|
-
});
|
|
229
|
-
for (const entry of entries) {
|
|
230
|
-
if (!entry.isDirectory()) {
|
|
231
|
-
continue;
|
|
232
|
-
}
|
|
233
|
-
try {
|
|
234
|
-
yield detectPackage(workspace, entry.name);
|
|
235
|
-
} catch {}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
const getPackageTypescriptFiles = location => glob.sync("**/*.ts", {
|
|
240
|
-
absolute: true,
|
|
241
|
-
cwd: location.scriptsDir,
|
|
242
|
-
ignore: "node_modules/**/*"
|
|
243
|
-
});
|
|
244
|
-
|
|
245
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
246
|
-
|
|
247
|
-
var writeFileAtomicExports = {};
|
|
248
|
-
var writeFileAtomic = {
|
|
249
|
-
get exports(){ return writeFileAtomicExports; },
|
|
250
|
-
set exports(v){ writeFileAtomicExports = v; },
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
var imurmurhashExports = {};
|
|
254
|
-
var imurmurhash = {
|
|
255
|
-
get exports(){ return imurmurhashExports; },
|
|
256
|
-
set exports(v){ imurmurhashExports = v; },
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* @preserve
|
|
261
|
-
* JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
|
|
262
|
-
*
|
|
263
|
-
* @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
|
|
264
|
-
* @see http://github.com/homebrewing/brauhaus-diff
|
|
265
|
-
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
|
|
266
|
-
* @see http://github.com/garycourt/murmurhash-js
|
|
267
|
-
* @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
|
|
268
|
-
* @see http://sites.google.com/site/murmurhash/
|
|
269
|
-
*/
|
|
270
|
-
(function (module) {
|
|
271
|
-
(function () {
|
|
272
|
-
var cache;
|
|
273
|
-
|
|
274
|
-
// Call this function without `new` to use the cached object (good for
|
|
275
|
-
// single-threaded environments), or with `new` to create a new object.
|
|
276
|
-
//
|
|
277
|
-
// @param {string} key A UTF-16 or ASCII string
|
|
278
|
-
// @param {number} seed An optional positive integer
|
|
279
|
-
// @return {object} A MurmurHash3 object for incremental hashing
|
|
280
|
-
function MurmurHash3(key, seed) {
|
|
281
|
-
var m = this instanceof MurmurHash3 ? this : cache;
|
|
282
|
-
m.reset(seed);
|
|
283
|
-
if (typeof key === 'string' && key.length > 0) {
|
|
284
|
-
m.hash(key);
|
|
285
|
-
}
|
|
286
|
-
if (m !== this) {
|
|
287
|
-
return m;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
// Incrementally add a string to this hash
|
|
292
|
-
//
|
|
293
|
-
// @param {string} key A UTF-16 or ASCII string
|
|
294
|
-
// @return {object} this
|
|
295
|
-
MurmurHash3.prototype.hash = function (key) {
|
|
296
|
-
var h1, k1, i, top, len;
|
|
297
|
-
len = key.length;
|
|
298
|
-
this.len += len;
|
|
299
|
-
k1 = this.k1;
|
|
300
|
-
i = 0;
|
|
301
|
-
switch (this.rem) {
|
|
302
|
-
case 0:
|
|
303
|
-
k1 ^= len > i ? key.charCodeAt(i++) & 0xffff : 0;
|
|
304
|
-
case 1:
|
|
305
|
-
k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 8 : 0;
|
|
306
|
-
case 2:
|
|
307
|
-
k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 16 : 0;
|
|
308
|
-
case 3:
|
|
309
|
-
k1 ^= len > i ? (key.charCodeAt(i) & 0xff) << 24 : 0;
|
|
310
|
-
k1 ^= len > i ? (key.charCodeAt(i++) & 0xff00) >> 8 : 0;
|
|
311
|
-
}
|
|
312
|
-
this.rem = len + this.rem & 3; // & 3 is same as % 4
|
|
313
|
-
len -= this.rem;
|
|
314
|
-
if (len > 0) {
|
|
315
|
-
h1 = this.h1;
|
|
316
|
-
while (1) {
|
|
317
|
-
k1 = k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000 & 0xffffffff;
|
|
318
|
-
k1 = k1 << 15 | k1 >>> 17;
|
|
319
|
-
k1 = k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000 & 0xffffffff;
|
|
320
|
-
h1 ^= k1;
|
|
321
|
-
h1 = h1 << 13 | h1 >>> 19;
|
|
322
|
-
h1 = h1 * 5 + 0xe6546b64 & 0xffffffff;
|
|
323
|
-
if (i >= len) {
|
|
324
|
-
break;
|
|
325
|
-
}
|
|
326
|
-
k1 = key.charCodeAt(i++) & 0xffff ^ (key.charCodeAt(i++) & 0xffff) << 8 ^ (key.charCodeAt(i++) & 0xffff) << 16;
|
|
327
|
-
top = key.charCodeAt(i++);
|
|
328
|
-
k1 ^= (top & 0xff) << 24 ^ (top & 0xff00) >> 8;
|
|
329
|
-
}
|
|
330
|
-
k1 = 0;
|
|
331
|
-
switch (this.rem) {
|
|
332
|
-
case 3:
|
|
333
|
-
k1 ^= (key.charCodeAt(i + 2) & 0xffff) << 16;
|
|
334
|
-
case 2:
|
|
335
|
-
k1 ^= (key.charCodeAt(i + 1) & 0xffff) << 8;
|
|
336
|
-
case 1:
|
|
337
|
-
k1 ^= key.charCodeAt(i) & 0xffff;
|
|
338
|
-
}
|
|
339
|
-
this.h1 = h1;
|
|
340
|
-
}
|
|
341
|
-
this.k1 = k1;
|
|
342
|
-
return this;
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
// Get the result of this hash
|
|
346
|
-
//
|
|
347
|
-
// @return {number} The 32-bit hash
|
|
348
|
-
MurmurHash3.prototype.result = function () {
|
|
349
|
-
var k1, h1;
|
|
350
|
-
k1 = this.k1;
|
|
351
|
-
h1 = this.h1;
|
|
352
|
-
if (k1 > 0) {
|
|
353
|
-
k1 = k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000 & 0xffffffff;
|
|
354
|
-
k1 = k1 << 15 | k1 >>> 17;
|
|
355
|
-
k1 = k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000 & 0xffffffff;
|
|
356
|
-
h1 ^= k1;
|
|
357
|
-
}
|
|
358
|
-
h1 ^= this.len;
|
|
359
|
-
h1 ^= h1 >>> 16;
|
|
360
|
-
h1 = h1 * 0xca6b + (h1 & 0xffff) * 0x85eb0000 & 0xffffffff;
|
|
361
|
-
h1 ^= h1 >>> 13;
|
|
362
|
-
h1 = h1 * 0xae35 + (h1 & 0xffff) * 0xc2b20000 & 0xffffffff;
|
|
363
|
-
h1 ^= h1 >>> 16;
|
|
364
|
-
return h1 >>> 0;
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
// Reset the hash object for reuse
|
|
368
|
-
//
|
|
369
|
-
// @param {number} seed An optional positive integer
|
|
370
|
-
MurmurHash3.prototype.reset = function (seed) {
|
|
371
|
-
this.h1 = typeof seed === 'number' ? seed : 0;
|
|
372
|
-
this.rem = this.k1 = this.len = 0;
|
|
373
|
-
return this;
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
// A cached object to use. This can be safely used if you're in a single-
|
|
377
|
-
// threaded environment, otherwise you need to create new hashes to use.
|
|
378
|
-
cache = new MurmurHash3();
|
|
379
|
-
{
|
|
380
|
-
module.exports = MurmurHash3;
|
|
381
|
-
}
|
|
382
|
-
})();
|
|
383
|
-
})(imurmurhash);
|
|
384
|
-
|
|
385
|
-
var signalExitExports = {};
|
|
386
|
-
var signalExit = {
|
|
387
|
-
get exports(){ return signalExitExports; },
|
|
388
|
-
set exports(v){ signalExitExports = v; },
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
var signalsExports = {};
|
|
392
|
-
var signals$1 = {
|
|
393
|
-
get exports(){ return signalsExports; },
|
|
394
|
-
set exports(v){ signalsExports = v; },
|
|
395
|
-
};
|
|
396
|
-
|
|
397
|
-
var hasRequiredSignals;
|
|
398
|
-
function requireSignals() {
|
|
399
|
-
if (hasRequiredSignals) return signalsExports;
|
|
400
|
-
hasRequiredSignals = 1;
|
|
401
|
-
(function (module) {
|
|
402
|
-
// This is not the set of all possible signals.
|
|
403
|
-
//
|
|
404
|
-
// It IS, however, the set of all signals that trigger
|
|
405
|
-
// an exit on either Linux or BSD systems. Linux is a
|
|
406
|
-
// superset of the signal names supported on BSD, and
|
|
407
|
-
// the unknown signals just fail to register, so we can
|
|
408
|
-
// catch that easily enough.
|
|
409
|
-
//
|
|
410
|
-
// Don't bother with SIGKILL. It's uncatchable, which
|
|
411
|
-
// means that we can't fire any callbacks anyway.
|
|
412
|
-
//
|
|
413
|
-
// If a user does happen to register a handler on a non-
|
|
414
|
-
// fatal signal like SIGWINCH or something, and then
|
|
415
|
-
// exit, it'll end up firing `process.emit('exit')`, so
|
|
416
|
-
// the handler will be fired anyway.
|
|
417
|
-
//
|
|
418
|
-
// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
|
|
419
|
-
// artificially, inherently leave the process in a
|
|
420
|
-
// state from which it is not safe to try and enter JS
|
|
421
|
-
// listeners.
|
|
422
|
-
module.exports = ['SIGABRT', 'SIGALRM', 'SIGHUP', 'SIGINT', 'SIGTERM'];
|
|
423
|
-
if (process.platform !== 'win32') {
|
|
424
|
-
module.exports.push('SIGVTALRM', 'SIGXCPU', 'SIGXFSZ', 'SIGUSR2', 'SIGTRAP', 'SIGSYS', 'SIGQUIT', 'SIGIOT'
|
|
425
|
-
// should detect profiler and enable/disable accordingly.
|
|
426
|
-
// see #21
|
|
427
|
-
// 'SIGPROF'
|
|
428
|
-
);
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
if (process.platform === 'linux') {
|
|
432
|
-
module.exports.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT', 'SIGUNUSED');
|
|
433
|
-
}
|
|
434
|
-
})(signals$1);
|
|
435
|
-
return signalsExports;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
// Note: since nyc uses this module to output coverage, any lines
|
|
439
|
-
// that are in the direct sync flow of nyc's outputCoverage are
|
|
440
|
-
// ignored, since we can never get coverage for them.
|
|
441
|
-
// grab a reference to node's real process object right away
|
|
442
|
-
var process$2 = commonjsGlobal.process;
|
|
443
|
-
const processOk = function (process) {
|
|
444
|
-
return process && typeof process === 'object' && typeof process.removeListener === 'function' && typeof process.emit === 'function' && typeof process.reallyExit === 'function' && typeof process.listeners === 'function' && typeof process.kill === 'function' && typeof process.pid === 'number' && typeof process.on === 'function';
|
|
445
|
-
};
|
|
446
|
-
|
|
447
|
-
// some kind of non-node environment, just no-op
|
|
448
|
-
/* istanbul ignore if */
|
|
449
|
-
if (!processOk(process$2)) {
|
|
450
|
-
signalExit.exports = function () {
|
|
451
|
-
return function () {};
|
|
452
|
-
};
|
|
453
|
-
} else {
|
|
454
|
-
var assert = require$$0;
|
|
455
|
-
var signals = requireSignals();
|
|
456
|
-
var isWin = /^win/i.test(process$2.platform);
|
|
457
|
-
var EE = require$$2;
|
|
458
|
-
/* istanbul ignore if */
|
|
459
|
-
if (typeof EE !== 'function') {
|
|
460
|
-
EE = EE.EventEmitter;
|
|
461
|
-
}
|
|
462
|
-
var emitter;
|
|
463
|
-
if (process$2.__signal_exit_emitter__) {
|
|
464
|
-
emitter = process$2.__signal_exit_emitter__;
|
|
465
|
-
} else {
|
|
466
|
-
emitter = process$2.__signal_exit_emitter__ = new EE();
|
|
467
|
-
emitter.count = 0;
|
|
468
|
-
emitter.emitted = {};
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
// Because this emitter is a global, we have to check to see if a
|
|
472
|
-
// previous version of this library failed to enable infinite listeners.
|
|
473
|
-
// I know what you're about to say. But literally everything about
|
|
474
|
-
// signal-exit is a compromise with evil. Get used to it.
|
|
475
|
-
if (!emitter.infinite) {
|
|
476
|
-
emitter.setMaxListeners(Infinity);
|
|
477
|
-
emitter.infinite = true;
|
|
478
|
-
}
|
|
479
|
-
signalExit.exports = function (cb, opts) {
|
|
480
|
-
/* istanbul ignore if */
|
|
481
|
-
if (!processOk(commonjsGlobal.process)) {
|
|
482
|
-
return function () {};
|
|
483
|
-
}
|
|
484
|
-
assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler');
|
|
485
|
-
if (loaded === false) {
|
|
486
|
-
load();
|
|
487
|
-
}
|
|
488
|
-
var ev = 'exit';
|
|
489
|
-
if (opts && opts.alwaysLast) {
|
|
490
|
-
ev = 'afterexit';
|
|
491
|
-
}
|
|
492
|
-
var remove = function () {
|
|
493
|
-
emitter.removeListener(ev, cb);
|
|
494
|
-
if (emitter.listeners('exit').length === 0 && emitter.listeners('afterexit').length === 0) {
|
|
495
|
-
unload();
|
|
496
|
-
}
|
|
497
|
-
};
|
|
498
|
-
emitter.on(ev, cb);
|
|
499
|
-
return remove;
|
|
500
|
-
};
|
|
501
|
-
var unload = function unload() {
|
|
502
|
-
if (!loaded || !processOk(commonjsGlobal.process)) {
|
|
503
|
-
return;
|
|
504
|
-
}
|
|
505
|
-
loaded = false;
|
|
506
|
-
signals.forEach(function (sig) {
|
|
507
|
-
try {
|
|
508
|
-
process$2.removeListener(sig, sigListeners[sig]);
|
|
509
|
-
} catch (er) {}
|
|
510
|
-
});
|
|
511
|
-
process$2.emit = originalProcessEmit;
|
|
512
|
-
process$2.reallyExit = originalProcessReallyExit;
|
|
513
|
-
emitter.count -= 1;
|
|
514
|
-
};
|
|
515
|
-
signalExitExports.unload = unload;
|
|
516
|
-
var emit = function emit(event, code, signal) {
|
|
517
|
-
/* istanbul ignore if */
|
|
518
|
-
if (emitter.emitted[event]) {
|
|
519
|
-
return;
|
|
520
|
-
}
|
|
521
|
-
emitter.emitted[event] = true;
|
|
522
|
-
emitter.emit(event, code, signal);
|
|
523
|
-
};
|
|
524
|
-
|
|
525
|
-
// { <signal>: <listener fn>, ... }
|
|
526
|
-
var sigListeners = {};
|
|
527
|
-
signals.forEach(function (sig) {
|
|
528
|
-
sigListeners[sig] = function listener() {
|
|
529
|
-
/* istanbul ignore if */
|
|
530
|
-
if (!processOk(commonjsGlobal.process)) {
|
|
531
|
-
return;
|
|
532
|
-
}
|
|
533
|
-
// If there are no other listeners, an exit is coming!
|
|
534
|
-
// Simplest way: remove us and then re-send the signal.
|
|
535
|
-
// We know that this will kill the process, so we can
|
|
536
|
-
// safely emit now.
|
|
537
|
-
var listeners = process$2.listeners(sig);
|
|
538
|
-
if (listeners.length === emitter.count) {
|
|
539
|
-
unload();
|
|
540
|
-
emit('exit', null, sig);
|
|
541
|
-
/* istanbul ignore next */
|
|
542
|
-
emit('afterexit', null, sig);
|
|
543
|
-
/* istanbul ignore next */
|
|
544
|
-
if (isWin && sig === 'SIGHUP') {
|
|
545
|
-
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
|
546
|
-
// so use a supported signal instead
|
|
547
|
-
sig = 'SIGINT';
|
|
548
|
-
}
|
|
549
|
-
/* istanbul ignore next */
|
|
550
|
-
process$2.kill(process$2.pid, sig);
|
|
551
|
-
}
|
|
552
|
-
};
|
|
553
|
-
});
|
|
554
|
-
signalExitExports.signals = function () {
|
|
555
|
-
return signals;
|
|
556
|
-
};
|
|
557
|
-
var loaded = false;
|
|
558
|
-
var load = function load() {
|
|
559
|
-
if (loaded || !processOk(commonjsGlobal.process)) {
|
|
560
|
-
return;
|
|
561
|
-
}
|
|
562
|
-
loaded = true;
|
|
563
|
-
|
|
564
|
-
// This is the number of onSignalExit's that are in play.
|
|
565
|
-
// It's important so that we can count the correct number of
|
|
566
|
-
// listeners on signals, and don't wait for the other one to
|
|
567
|
-
// handle it instead of us.
|
|
568
|
-
emitter.count += 1;
|
|
569
|
-
signals = signals.filter(function (sig) {
|
|
570
|
-
try {
|
|
571
|
-
process$2.on(sig, sigListeners[sig]);
|
|
572
|
-
return true;
|
|
573
|
-
} catch (er) {
|
|
574
|
-
return false;
|
|
575
|
-
}
|
|
576
|
-
});
|
|
577
|
-
process$2.emit = processEmit;
|
|
578
|
-
process$2.reallyExit = processReallyExit;
|
|
579
|
-
};
|
|
580
|
-
signalExitExports.load = load;
|
|
581
|
-
var originalProcessReallyExit = process$2.reallyExit;
|
|
582
|
-
var processReallyExit = function processReallyExit(code) {
|
|
583
|
-
/* istanbul ignore if */
|
|
584
|
-
if (!processOk(commonjsGlobal.process)) {
|
|
585
|
-
return;
|
|
586
|
-
}
|
|
587
|
-
process$2.exitCode = code || /* istanbul ignore next */0;
|
|
588
|
-
emit('exit', process$2.exitCode, null);
|
|
589
|
-
/* istanbul ignore next */
|
|
590
|
-
emit('afterexit', process$2.exitCode, null);
|
|
591
|
-
/* istanbul ignore next */
|
|
592
|
-
originalProcessReallyExit.call(process$2, process$2.exitCode);
|
|
593
|
-
};
|
|
594
|
-
var originalProcessEmit = process$2.emit;
|
|
595
|
-
var processEmit = function processEmit(ev, arg) {
|
|
596
|
-
if (ev === 'exit' && processOk(commonjsGlobal.process)) {
|
|
597
|
-
/* istanbul ignore else */
|
|
598
|
-
if (arg !== undefined) {
|
|
599
|
-
process$2.exitCode = arg;
|
|
600
|
-
}
|
|
601
|
-
var ret = originalProcessEmit.apply(this, arguments);
|
|
602
|
-
/* istanbul ignore next */
|
|
603
|
-
emit('exit', process$2.exitCode, null);
|
|
604
|
-
/* istanbul ignore next */
|
|
605
|
-
emit('afterexit', process$2.exitCode, null);
|
|
606
|
-
/* istanbul ignore next */
|
|
607
|
-
return ret;
|
|
608
|
-
} else {
|
|
609
|
-
return originalProcessEmit.apply(this, arguments);
|
|
610
|
-
}
|
|
611
|
-
};
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
var check = function (it) {
|
|
615
|
-
return it && it.Math == Math && it;
|
|
616
|
-
};
|
|
617
|
-
|
|
618
|
-
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
619
|
-
var global$b =
|
|
620
|
-
// eslint-disable-next-line es/no-global-this -- safe
|
|
621
|
-
check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) ||
|
|
622
|
-
// eslint-disable-next-line no-restricted-globals -- safe
|
|
623
|
-
check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
624
|
-
// eslint-disable-next-line no-new-func -- fallback
|
|
625
|
-
function () {
|
|
626
|
-
return this;
|
|
627
|
-
}() || Function('return this')();
|
|
628
|
-
|
|
629
|
-
var fails$8 = function (exec) {
|
|
630
|
-
try {
|
|
631
|
-
return !!exec();
|
|
632
|
-
} catch (error) {
|
|
633
|
-
return true;
|
|
634
|
-
}
|
|
635
|
-
};
|
|
636
|
-
|
|
637
|
-
var fails$7 = fails$8;
|
|
638
|
-
var functionBindNative = !fails$7(function () {
|
|
639
|
-
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
640
|
-
var test = function () {/* empty */}.bind();
|
|
641
|
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
642
|
-
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
643
|
-
});
|
|
644
|
-
|
|
645
|
-
var NATIVE_BIND$1 = functionBindNative;
|
|
646
|
-
var call$4 = Function.prototype.call;
|
|
647
|
-
var functionCall = NATIVE_BIND$1 ? call$4.bind(call$4) : function () {
|
|
648
|
-
return call$4.apply(call$4, arguments);
|
|
649
|
-
};
|
|
650
|
-
|
|
651
|
-
// eslint-disable-next-line es/no-typed-arrays -- safe
|
|
652
|
-
var arrayBufferBasicDetection = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
|
|
653
|
-
|
|
654
|
-
var fails$6 = fails$8;
|
|
655
|
-
|
|
656
|
-
// Detect IE8's incomplete defineProperty implementation
|
|
657
|
-
var descriptors = !fails$6(function () {
|
|
658
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
659
|
-
return Object.defineProperty({}, 1, {
|
|
660
|
-
get: function () {
|
|
661
|
-
return 7;
|
|
662
|
-
}
|
|
663
|
-
})[1] != 7;
|
|
664
|
-
});
|
|
665
|
-
|
|
666
|
-
var documentAll$2 = typeof document == 'object' && document.all;
|
|
667
|
-
|
|
668
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
669
|
-
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
670
|
-
var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
|
|
671
|
-
var documentAll_1 = {
|
|
672
|
-
all: documentAll$2,
|
|
673
|
-
IS_HTMLDDA: IS_HTMLDDA
|
|
674
|
-
};
|
|
675
|
-
|
|
676
|
-
var $documentAll$1 = documentAll_1;
|
|
677
|
-
var documentAll$1 = $documentAll$1.all;
|
|
678
|
-
|
|
679
|
-
// `IsCallable` abstract operation
|
|
680
|
-
// https://tc39.es/ecma262/#sec-iscallable
|
|
681
|
-
var isCallable$d = $documentAll$1.IS_HTMLDDA ? function (argument) {
|
|
682
|
-
return typeof argument == 'function' || argument === documentAll$1;
|
|
683
|
-
} : function (argument) {
|
|
684
|
-
return typeof argument == 'function';
|
|
685
|
-
};
|
|
686
|
-
|
|
687
|
-
var isCallable$c = isCallable$d;
|
|
688
|
-
var $documentAll = documentAll_1;
|
|
689
|
-
var documentAll = $documentAll.all;
|
|
690
|
-
var isObject$6 = $documentAll.IS_HTMLDDA ? function (it) {
|
|
691
|
-
return typeof it == 'object' ? it !== null : isCallable$c(it) || it === documentAll;
|
|
692
|
-
} : function (it) {
|
|
693
|
-
return typeof it == 'object' ? it !== null : isCallable$c(it);
|
|
694
|
-
};
|
|
695
|
-
|
|
696
|
-
var NATIVE_BIND = functionBindNative;
|
|
697
|
-
var FunctionPrototype$1 = Function.prototype;
|
|
698
|
-
var call$3 = FunctionPrototype$1.call;
|
|
699
|
-
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$3, call$3);
|
|
700
|
-
var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
|
|
701
|
-
return function () {
|
|
702
|
-
return call$3.apply(fn, arguments);
|
|
703
|
-
};
|
|
704
|
-
};
|
|
705
|
-
|
|
706
|
-
// we can't use just `it == null` since of `document.all` special case
|
|
707
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
708
|
-
var isNullOrUndefined$2 = function (it) {
|
|
709
|
-
return it === null || it === undefined;
|
|
710
|
-
};
|
|
711
|
-
|
|
712
|
-
var isNullOrUndefined$1 = isNullOrUndefined$2;
|
|
713
|
-
var $TypeError$6 = TypeError;
|
|
714
|
-
|
|
715
|
-
// `RequireObjectCoercible` abstract operation
|
|
716
|
-
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
717
|
-
var requireObjectCoercible$1 = function (it) {
|
|
718
|
-
if (isNullOrUndefined$1(it)) throw $TypeError$6("Can't call method on " + it);
|
|
719
|
-
return it;
|
|
720
|
-
};
|
|
721
|
-
|
|
722
|
-
var requireObjectCoercible = requireObjectCoercible$1;
|
|
723
|
-
var $Object$3 = Object;
|
|
724
|
-
|
|
725
|
-
// `ToObject` abstract operation
|
|
726
|
-
// https://tc39.es/ecma262/#sec-toobject
|
|
727
|
-
var toObject$2 = function (argument) {
|
|
728
|
-
return $Object$3(requireObjectCoercible(argument));
|
|
729
|
-
};
|
|
730
|
-
|
|
731
|
-
var uncurryThis$6 = functionUncurryThis;
|
|
732
|
-
var toObject$1 = toObject$2;
|
|
733
|
-
var hasOwnProperty = uncurryThis$6({}.hasOwnProperty);
|
|
734
|
-
|
|
735
|
-
// `HasOwnProperty` abstract operation
|
|
736
|
-
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
737
|
-
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
738
|
-
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
739
|
-
return hasOwnProperty(toObject$1(it), key);
|
|
740
|
-
};
|
|
741
|
-
|
|
742
|
-
var sharedExports = {};
|
|
743
|
-
var shared$3 = {
|
|
744
|
-
get exports(){ return sharedExports; },
|
|
745
|
-
set exports(v){ sharedExports = v; },
|
|
746
|
-
};
|
|
747
|
-
|
|
748
|
-
var global$a = global$b;
|
|
749
|
-
|
|
750
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
751
|
-
var defineProperty$2 = Object.defineProperty;
|
|
752
|
-
var defineGlobalProperty$2 = function (key, value) {
|
|
753
|
-
try {
|
|
754
|
-
defineProperty$2(global$a, key, {
|
|
755
|
-
value: value,
|
|
756
|
-
configurable: true,
|
|
757
|
-
writable: true
|
|
758
|
-
});
|
|
759
|
-
} catch (error) {
|
|
760
|
-
global$a[key] = value;
|
|
761
|
-
}
|
|
762
|
-
return value;
|
|
763
|
-
};
|
|
764
|
-
|
|
765
|
-
var global$9 = global$b;
|
|
766
|
-
var defineGlobalProperty$1 = defineGlobalProperty$2;
|
|
767
|
-
var SHARED = '__core-js_shared__';
|
|
768
|
-
var store$3 = global$9[SHARED] || defineGlobalProperty$1(SHARED, {});
|
|
769
|
-
var sharedStore = store$3;
|
|
770
|
-
|
|
771
|
-
var store$2 = sharedStore;
|
|
772
|
-
(shared$3.exports = function (key, value) {
|
|
773
|
-
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
774
|
-
})('versions', []).push({
|
|
775
|
-
version: '3.29.1',
|
|
776
|
-
mode: 'global',
|
|
777
|
-
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
778
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE',
|
|
779
|
-
source: 'https://github.com/zloirock/core-js'
|
|
780
|
-
});
|
|
781
|
-
|
|
782
|
-
var uncurryThis$5 = functionUncurryThis;
|
|
783
|
-
var id = 0;
|
|
784
|
-
var postfix = Math.random();
|
|
785
|
-
var toString$2 = uncurryThis$5(1.0.toString);
|
|
786
|
-
var uid$3 = function (key) {
|
|
787
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36);
|
|
788
|
-
};
|
|
789
|
-
|
|
790
|
-
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
791
|
-
|
|
792
|
-
var global$8 = global$b;
|
|
793
|
-
var userAgent = engineUserAgent;
|
|
794
|
-
var process$1 = global$8.process;
|
|
795
|
-
var Deno = global$8.Deno;
|
|
796
|
-
var versions = process$1 && process$1.versions || Deno && Deno.version;
|
|
797
|
-
var v8 = versions && versions.v8;
|
|
798
|
-
var match, version;
|
|
799
|
-
if (v8) {
|
|
800
|
-
match = v8.split('.');
|
|
801
|
-
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
802
|
-
// but their correct versions are not interesting for us
|
|
803
|
-
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
807
|
-
// so check `userAgent` even if `.v8` exists, but 0
|
|
808
|
-
if (!version && userAgent) {
|
|
809
|
-
match = userAgent.match(/Edge\/(\d+)/);
|
|
810
|
-
if (!match || match[1] >= 74) {
|
|
811
|
-
match = userAgent.match(/Chrome\/(\d+)/);
|
|
812
|
-
if (match) version = +match[1];
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
var engineV8Version = version;
|
|
816
|
-
|
|
817
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
818
|
-
var V8_VERSION = engineV8Version;
|
|
819
|
-
var fails$5 = fails$8;
|
|
820
|
-
|
|
821
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
822
|
-
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5(function () {
|
|
823
|
-
var symbol = Symbol();
|
|
824
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
|
825
|
-
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
826
|
-
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
827
|
-
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
828
|
-
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
829
|
-
});
|
|
830
|
-
|
|
831
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
832
|
-
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
833
|
-
var useSymbolAsUid = NATIVE_SYMBOL$1 && !Symbol.sham && typeof Symbol.iterator == 'symbol';
|
|
834
|
-
|
|
835
|
-
var global$7 = global$b;
|
|
836
|
-
var shared$2 = sharedExports;
|
|
837
|
-
var hasOwn$5 = hasOwnProperty_1;
|
|
838
|
-
var uid$2 = uid$3;
|
|
839
|
-
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
840
|
-
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
841
|
-
var Symbol$1 = global$7.Symbol;
|
|
842
|
-
var WellKnownSymbolsStore = shared$2('wks');
|
|
843
|
-
var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$2;
|
|
844
|
-
var wellKnownSymbol$4 = function (name) {
|
|
845
|
-
if (!hasOwn$5(WellKnownSymbolsStore, name)) {
|
|
846
|
-
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$5(Symbol$1, name) ? Symbol$1[name] : createWellKnownSymbol('Symbol.' + name);
|
|
847
|
-
}
|
|
848
|
-
return WellKnownSymbolsStore[name];
|
|
849
|
-
};
|
|
850
|
-
|
|
851
|
-
var wellKnownSymbol$3 = wellKnownSymbol$4;
|
|
852
|
-
var TO_STRING_TAG$2 = wellKnownSymbol$3('toStringTag');
|
|
853
|
-
var test = {};
|
|
854
|
-
test[TO_STRING_TAG$2] = 'z';
|
|
855
|
-
var toStringTagSupport = String(test) === '[object z]';
|
|
856
|
-
|
|
857
|
-
var uncurryThis$4 = functionUncurryThis;
|
|
858
|
-
var toString$1 = uncurryThis$4({}.toString);
|
|
859
|
-
var stringSlice$1 = uncurryThis$4(''.slice);
|
|
860
|
-
var classofRaw$1 = function (it) {
|
|
861
|
-
return stringSlice$1(toString$1(it), 8, -1);
|
|
862
|
-
};
|
|
863
|
-
|
|
864
|
-
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
865
|
-
var isCallable$b = isCallable$d;
|
|
866
|
-
var classofRaw = classofRaw$1;
|
|
867
|
-
var wellKnownSymbol$2 = wellKnownSymbol$4;
|
|
868
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
|
|
869
|
-
var $Object$2 = Object;
|
|
870
|
-
|
|
871
|
-
// ES3 wrong here
|
|
872
|
-
var CORRECT_ARGUMENTS = classofRaw(function () {
|
|
873
|
-
return arguments;
|
|
874
|
-
}()) == 'Arguments';
|
|
875
|
-
|
|
876
|
-
// fallback for IE11 Script Access Denied error
|
|
877
|
-
var tryGet = function (it, key) {
|
|
878
|
-
try {
|
|
879
|
-
return it[key];
|
|
880
|
-
} catch (error) {/* empty */}
|
|
881
|
-
};
|
|
882
|
-
|
|
883
|
-
// getting tag from ES6+ `Object.prototype.toString`
|
|
884
|
-
var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
885
|
-
var O, tag, result;
|
|
886
|
-
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
887
|
-
// @@toStringTag case
|
|
888
|
-
: typeof (tag = tryGet(O = $Object$2(it), TO_STRING_TAG$1)) == 'string' ? tag
|
|
889
|
-
// builtinTag case
|
|
890
|
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
891
|
-
// ES3 arguments fallback
|
|
892
|
-
: (result = classofRaw(O)) == 'Object' && isCallable$b(O.callee) ? 'Arguments' : result;
|
|
893
|
-
};
|
|
894
|
-
|
|
895
|
-
var $String$3 = String;
|
|
896
|
-
var tryToString$2 = function (argument) {
|
|
897
|
-
try {
|
|
898
|
-
return $String$3(argument);
|
|
899
|
-
} catch (error) {
|
|
900
|
-
return 'Object';
|
|
901
|
-
}
|
|
902
|
-
};
|
|
903
|
-
|
|
904
|
-
var objectDefineProperty = {};
|
|
905
|
-
|
|
906
|
-
var global$6 = global$b;
|
|
907
|
-
var isObject$5 = isObject$6;
|
|
908
|
-
var document$1 = global$6.document;
|
|
909
|
-
// typeof document.createElement is 'object' in old IE
|
|
910
|
-
var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
|
|
911
|
-
var documentCreateElement = function (it) {
|
|
912
|
-
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
913
|
-
};
|
|
914
|
-
|
|
915
|
-
var DESCRIPTORS$6 = descriptors;
|
|
916
|
-
var fails$4 = fails$8;
|
|
917
|
-
var createElement = documentCreateElement;
|
|
918
|
-
|
|
919
|
-
// Thanks to IE8 for its funny defineProperty
|
|
920
|
-
var ie8DomDefine = !DESCRIPTORS$6 && !fails$4(function () {
|
|
921
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
922
|
-
return Object.defineProperty(createElement('div'), 'a', {
|
|
923
|
-
get: function () {
|
|
924
|
-
return 7;
|
|
925
|
-
}
|
|
926
|
-
}).a != 7;
|
|
927
|
-
});
|
|
928
|
-
|
|
929
|
-
var DESCRIPTORS$5 = descriptors;
|
|
930
|
-
var fails$3 = fails$8;
|
|
931
|
-
|
|
932
|
-
// V8 ~ Chrome 36-
|
|
933
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
934
|
-
var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$3(function () {
|
|
935
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
936
|
-
return Object.defineProperty(function () {/* empty */}, 'prototype', {
|
|
937
|
-
value: 42,
|
|
938
|
-
writable: false
|
|
939
|
-
}).prototype != 42;
|
|
940
|
-
});
|
|
941
|
-
|
|
942
|
-
var isObject$4 = isObject$6;
|
|
943
|
-
var $String$2 = String;
|
|
944
|
-
var $TypeError$5 = TypeError;
|
|
945
|
-
|
|
946
|
-
// `Assert: Type(argument) is Object`
|
|
947
|
-
var anObject$2 = function (argument) {
|
|
948
|
-
if (isObject$4(argument)) return argument;
|
|
949
|
-
throw $TypeError$5($String$2(argument) + ' is not an object');
|
|
950
|
-
};
|
|
951
|
-
|
|
952
|
-
var global$5 = global$b;
|
|
953
|
-
var isCallable$a = isCallable$d;
|
|
954
|
-
var aFunction = function (argument) {
|
|
955
|
-
return isCallable$a(argument) ? argument : undefined;
|
|
956
|
-
};
|
|
957
|
-
var getBuiltIn$1 = function (namespace, method) {
|
|
958
|
-
return arguments.length < 2 ? aFunction(global$5[namespace]) : global$5[namespace] && global$5[namespace][method];
|
|
959
|
-
};
|
|
960
|
-
|
|
961
|
-
var uncurryThis$3 = functionUncurryThis;
|
|
962
|
-
var objectIsPrototypeOf = uncurryThis$3({}.isPrototypeOf);
|
|
963
|
-
|
|
964
|
-
var getBuiltIn = getBuiltIn$1;
|
|
965
|
-
var isCallable$9 = isCallable$d;
|
|
966
|
-
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
967
|
-
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
968
|
-
var $Object$1 = Object;
|
|
969
|
-
var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
|
|
970
|
-
return typeof it == 'symbol';
|
|
971
|
-
} : function (it) {
|
|
972
|
-
var $Symbol = getBuiltIn('Symbol');
|
|
973
|
-
return isCallable$9($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$1(it));
|
|
974
|
-
};
|
|
975
|
-
|
|
976
|
-
var isCallable$8 = isCallable$d;
|
|
977
|
-
var tryToString$1 = tryToString$2;
|
|
978
|
-
var $TypeError$4 = TypeError;
|
|
979
|
-
|
|
980
|
-
// `Assert: IsCallable(argument) is true`
|
|
981
|
-
var aCallable$2 = function (argument) {
|
|
982
|
-
if (isCallable$8(argument)) return argument;
|
|
983
|
-
throw $TypeError$4(tryToString$1(argument) + ' is not a function');
|
|
984
|
-
};
|
|
985
|
-
|
|
986
|
-
var aCallable$1 = aCallable$2;
|
|
987
|
-
var isNullOrUndefined = isNullOrUndefined$2;
|
|
988
|
-
|
|
989
|
-
// `GetMethod` abstract operation
|
|
990
|
-
// https://tc39.es/ecma262/#sec-getmethod
|
|
991
|
-
var getMethod$1 = function (V, P) {
|
|
992
|
-
var func = V[P];
|
|
993
|
-
return isNullOrUndefined(func) ? undefined : aCallable$1(func);
|
|
994
|
-
};
|
|
995
|
-
|
|
996
|
-
var call$2 = functionCall;
|
|
997
|
-
var isCallable$7 = isCallable$d;
|
|
998
|
-
var isObject$3 = isObject$6;
|
|
999
|
-
var $TypeError$3 = TypeError;
|
|
1000
|
-
|
|
1001
|
-
// `OrdinaryToPrimitive` abstract operation
|
|
1002
|
-
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
1003
|
-
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
1004
|
-
var fn, val;
|
|
1005
|
-
if (pref === 'string' && isCallable$7(fn = input.toString) && !isObject$3(val = call$2(fn, input))) return val;
|
|
1006
|
-
if (isCallable$7(fn = input.valueOf) && !isObject$3(val = call$2(fn, input))) return val;
|
|
1007
|
-
if (pref !== 'string' && isCallable$7(fn = input.toString) && !isObject$3(val = call$2(fn, input))) return val;
|
|
1008
|
-
throw $TypeError$3("Can't convert object to primitive value");
|
|
1009
|
-
};
|
|
1010
|
-
|
|
1011
|
-
var call$1 = functionCall;
|
|
1012
|
-
var isObject$2 = isObject$6;
|
|
1013
|
-
var isSymbol$1 = isSymbol$2;
|
|
1014
|
-
var getMethod = getMethod$1;
|
|
1015
|
-
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
1016
|
-
var wellKnownSymbol$1 = wellKnownSymbol$4;
|
|
1017
|
-
var $TypeError$2 = TypeError;
|
|
1018
|
-
var TO_PRIMITIVE = wellKnownSymbol$1('toPrimitive');
|
|
1019
|
-
|
|
1020
|
-
// `ToPrimitive` abstract operation
|
|
1021
|
-
// https://tc39.es/ecma262/#sec-toprimitive
|
|
1022
|
-
var toPrimitive$1 = function (input, pref) {
|
|
1023
|
-
if (!isObject$2(input) || isSymbol$1(input)) return input;
|
|
1024
|
-
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
1025
|
-
var result;
|
|
1026
|
-
if (exoticToPrim) {
|
|
1027
|
-
if (pref === undefined) pref = 'default';
|
|
1028
|
-
result = call$1(exoticToPrim, input, pref);
|
|
1029
|
-
if (!isObject$2(result) || isSymbol$1(result)) return result;
|
|
1030
|
-
throw $TypeError$2("Can't convert object to primitive value");
|
|
1031
|
-
}
|
|
1032
|
-
if (pref === undefined) pref = 'number';
|
|
1033
|
-
return ordinaryToPrimitive(input, pref);
|
|
1034
|
-
};
|
|
1035
|
-
|
|
1036
|
-
var toPrimitive = toPrimitive$1;
|
|
1037
|
-
var isSymbol = isSymbol$2;
|
|
1038
|
-
|
|
1039
|
-
// `ToPropertyKey` abstract operation
|
|
1040
|
-
// https://tc39.es/ecma262/#sec-topropertykey
|
|
1041
|
-
var toPropertyKey$1 = function (argument) {
|
|
1042
|
-
var key = toPrimitive(argument, 'string');
|
|
1043
|
-
return isSymbol(key) ? key : key + '';
|
|
1044
|
-
};
|
|
1045
|
-
|
|
1046
|
-
var DESCRIPTORS$4 = descriptors;
|
|
1047
|
-
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
1048
|
-
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1049
|
-
var anObject$1 = anObject$2;
|
|
1050
|
-
var toPropertyKey = toPropertyKey$1;
|
|
1051
|
-
var $TypeError$1 = TypeError;
|
|
1052
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
1053
|
-
var $defineProperty = Object.defineProperty;
|
|
1054
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1055
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
1056
|
-
var ENUMERABLE = 'enumerable';
|
|
1057
|
-
var CONFIGURABLE$1 = 'configurable';
|
|
1058
|
-
var WRITABLE = 'writable';
|
|
1059
|
-
|
|
1060
|
-
// `Object.defineProperty` method
|
|
1061
|
-
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
1062
|
-
objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
|
|
1063
|
-
anObject$1(O);
|
|
1064
|
-
P = toPropertyKey(P);
|
|
1065
|
-
anObject$1(Attributes);
|
|
1066
|
-
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
1067
|
-
var current = $getOwnPropertyDescriptor(O, P);
|
|
1068
|
-
if (current && current[WRITABLE]) {
|
|
1069
|
-
O[P] = Attributes.value;
|
|
1070
|
-
Attributes = {
|
|
1071
|
-
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
|
1072
|
-
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
1073
|
-
writable: false
|
|
1074
|
-
};
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
return $defineProperty(O, P, Attributes);
|
|
1078
|
-
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
1079
|
-
anObject$1(O);
|
|
1080
|
-
P = toPropertyKey(P);
|
|
1081
|
-
anObject$1(Attributes);
|
|
1082
|
-
if (IE8_DOM_DEFINE) try {
|
|
1083
|
-
return $defineProperty(O, P, Attributes);
|
|
1084
|
-
} catch (error) {/* empty */}
|
|
1085
|
-
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$1('Accessors not supported');
|
|
1086
|
-
if ('value' in Attributes) O[P] = Attributes.value;
|
|
1087
|
-
return O;
|
|
1088
|
-
};
|
|
1089
|
-
|
|
1090
|
-
var createPropertyDescriptor$1 = function (bitmap, value) {
|
|
1091
|
-
return {
|
|
1092
|
-
enumerable: !(bitmap & 1),
|
|
1093
|
-
configurable: !(bitmap & 2),
|
|
1094
|
-
writable: !(bitmap & 4),
|
|
1095
|
-
value: value
|
|
1096
|
-
};
|
|
1097
|
-
};
|
|
1098
|
-
|
|
1099
|
-
var DESCRIPTORS$3 = descriptors;
|
|
1100
|
-
var definePropertyModule$1 = objectDefineProperty;
|
|
1101
|
-
var createPropertyDescriptor = createPropertyDescriptor$1;
|
|
1102
|
-
var createNonEnumerableProperty$2 = DESCRIPTORS$3 ? function (object, key, value) {
|
|
1103
|
-
return definePropertyModule$1.f(object, key, createPropertyDescriptor(1, value));
|
|
1104
|
-
} : function (object, key, value) {
|
|
1105
|
-
object[key] = value;
|
|
1106
|
-
return object;
|
|
1107
|
-
};
|
|
1108
|
-
|
|
1109
|
-
var makeBuiltInExports = {};
|
|
1110
|
-
var makeBuiltIn$3 = {
|
|
1111
|
-
get exports(){ return makeBuiltInExports; },
|
|
1112
|
-
set exports(v){ makeBuiltInExports = v; },
|
|
1113
|
-
};
|
|
1114
|
-
|
|
1115
|
-
var DESCRIPTORS$2 = descriptors;
|
|
1116
|
-
var hasOwn$4 = hasOwnProperty_1;
|
|
1117
|
-
var FunctionPrototype = Function.prototype;
|
|
1118
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1119
|
-
var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
|
|
1120
|
-
var EXISTS = hasOwn$4(FunctionPrototype, 'name');
|
|
1121
|
-
// additional protection from minified / mangled / dropped function names
|
|
1122
|
-
var PROPER = EXISTS && function something() {/* empty */}.name === 'something';
|
|
1123
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || DESCRIPTORS$2 && getDescriptor(FunctionPrototype, 'name').configurable);
|
|
1124
|
-
var functionName = {
|
|
1125
|
-
EXISTS: EXISTS,
|
|
1126
|
-
PROPER: PROPER,
|
|
1127
|
-
CONFIGURABLE: CONFIGURABLE
|
|
1128
|
-
};
|
|
1129
|
-
|
|
1130
|
-
var uncurryThis$2 = functionUncurryThis;
|
|
1131
|
-
var isCallable$6 = isCallable$d;
|
|
1132
|
-
var store$1 = sharedStore;
|
|
1133
|
-
var functionToString = uncurryThis$2(Function.toString);
|
|
1134
|
-
|
|
1135
|
-
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
1136
|
-
if (!isCallable$6(store$1.inspectSource)) {
|
|
1137
|
-
store$1.inspectSource = function (it) {
|
|
1138
|
-
return functionToString(it);
|
|
1139
|
-
};
|
|
1140
|
-
}
|
|
1141
|
-
var inspectSource$1 = store$1.inspectSource;
|
|
1142
|
-
|
|
1143
|
-
var global$4 = global$b;
|
|
1144
|
-
var isCallable$5 = isCallable$d;
|
|
1145
|
-
var WeakMap$1 = global$4.WeakMap;
|
|
1146
|
-
var weakMapBasicDetection = isCallable$5(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
1147
|
-
|
|
1148
|
-
var shared$1 = sharedExports;
|
|
1149
|
-
var uid$1 = uid$3;
|
|
1150
|
-
var keys = shared$1('keys');
|
|
1151
|
-
var sharedKey$2 = function (key) {
|
|
1152
|
-
return keys[key] || (keys[key] = uid$1(key));
|
|
1153
|
-
};
|
|
1154
|
-
|
|
1155
|
-
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
1156
|
-
var global$3 = global$b;
|
|
1157
|
-
var isObject$1 = isObject$6;
|
|
1158
|
-
var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
|
|
1159
|
-
var hasOwn$3 = hasOwnProperty_1;
|
|
1160
|
-
var shared = sharedStore;
|
|
1161
|
-
var sharedKey$1 = sharedKey$2;
|
|
1162
|
-
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
1163
|
-
var TypeError$2 = global$3.TypeError;
|
|
1164
|
-
var WeakMap = global$3.WeakMap;
|
|
1165
|
-
var set, get, has;
|
|
1166
|
-
var enforce = function (it) {
|
|
1167
|
-
return has(it) ? get(it) : set(it, {});
|
|
1168
|
-
};
|
|
1169
|
-
var getterFor = function (TYPE) {
|
|
1170
|
-
return function (it) {
|
|
1171
|
-
var state;
|
|
1172
|
-
if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
|
|
1173
|
-
throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
|
|
1174
|
-
}
|
|
1175
|
-
return state;
|
|
1176
|
-
};
|
|
1177
|
-
};
|
|
1178
|
-
if (NATIVE_WEAK_MAP || shared.state) {
|
|
1179
|
-
var store = shared.state || (shared.state = new WeakMap());
|
|
1180
|
-
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
1181
|
-
store.get = store.get;
|
|
1182
|
-
store.has = store.has;
|
|
1183
|
-
store.set = store.set;
|
|
1184
|
-
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
1185
|
-
set = function (it, metadata) {
|
|
1186
|
-
if (store.has(it)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
1187
|
-
metadata.facade = it;
|
|
1188
|
-
store.set(it, metadata);
|
|
1189
|
-
return metadata;
|
|
1190
|
-
};
|
|
1191
|
-
get = function (it) {
|
|
1192
|
-
return store.get(it) || {};
|
|
1193
|
-
};
|
|
1194
|
-
has = function (it) {
|
|
1195
|
-
return store.has(it);
|
|
1196
|
-
};
|
|
1197
|
-
} else {
|
|
1198
|
-
var STATE = sharedKey$1('state');
|
|
1199
|
-
set = function (it, metadata) {
|
|
1200
|
-
if (hasOwn$3(it, STATE)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
1201
|
-
metadata.facade = it;
|
|
1202
|
-
createNonEnumerableProperty$1(it, STATE, metadata);
|
|
1203
|
-
return metadata;
|
|
1204
|
-
};
|
|
1205
|
-
get = function (it) {
|
|
1206
|
-
return hasOwn$3(it, STATE) ? it[STATE] : {};
|
|
1207
|
-
};
|
|
1208
|
-
has = function (it) {
|
|
1209
|
-
return hasOwn$3(it, STATE);
|
|
1210
|
-
};
|
|
1211
|
-
}
|
|
1212
|
-
var internalState = {
|
|
1213
|
-
set: set,
|
|
1214
|
-
get: get,
|
|
1215
|
-
has: has,
|
|
1216
|
-
enforce: enforce,
|
|
1217
|
-
getterFor: getterFor
|
|
1218
|
-
};
|
|
1219
|
-
|
|
1220
|
-
var uncurryThis$1 = functionUncurryThis;
|
|
1221
|
-
var fails$2 = fails$8;
|
|
1222
|
-
var isCallable$4 = isCallable$d;
|
|
1223
|
-
var hasOwn$2 = hasOwnProperty_1;
|
|
1224
|
-
var DESCRIPTORS$1 = descriptors;
|
|
1225
|
-
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
1226
|
-
var inspectSource = inspectSource$1;
|
|
1227
|
-
var InternalStateModule$1 = internalState;
|
|
1228
|
-
var enforceInternalState$1 = InternalStateModule$1.enforce;
|
|
1229
|
-
var getInternalState$1 = InternalStateModule$1.get;
|
|
1230
|
-
var $String$1 = String;
|
|
1231
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
1232
|
-
var defineProperty$1 = Object.defineProperty;
|
|
1233
|
-
var stringSlice = uncurryThis$1(''.slice);
|
|
1234
|
-
var replace = uncurryThis$1(''.replace);
|
|
1235
|
-
var join = uncurryThis$1([].join);
|
|
1236
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$2(function () {
|
|
1237
|
-
return defineProperty$1(function () {/* empty */}, 'length', {
|
|
1238
|
-
value: 8
|
|
1239
|
-
}).length !== 8;
|
|
1240
|
-
});
|
|
1241
|
-
var TEMPLATE = String(String).split('String');
|
|
1242
|
-
var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
|
|
1243
|
-
if (stringSlice($String$1(name), 0, 7) === 'Symbol(') {
|
|
1244
|
-
name = '[' + replace($String$1(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
1245
|
-
}
|
|
1246
|
-
if (options && options.getter) name = 'get ' + name;
|
|
1247
|
-
if (options && options.setter) name = 'set ' + name;
|
|
1248
|
-
if (!hasOwn$2(value, 'name') || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
|
|
1249
|
-
if (DESCRIPTORS$1) defineProperty$1(value, 'name', {
|
|
1250
|
-
value: name,
|
|
1251
|
-
configurable: true
|
|
1252
|
-
});else value.name = name;
|
|
1253
|
-
}
|
|
1254
|
-
if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
|
|
1255
|
-
defineProperty$1(value, 'length', {
|
|
1256
|
-
value: options.arity
|
|
1257
|
-
});
|
|
1258
|
-
}
|
|
1259
|
-
try {
|
|
1260
|
-
if (options && hasOwn$2(options, 'constructor') && options.constructor) {
|
|
1261
|
-
if (DESCRIPTORS$1) defineProperty$1(value, 'prototype', {
|
|
1262
|
-
writable: false
|
|
1263
|
-
});
|
|
1264
|
-
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
1265
|
-
} else if (value.prototype) value.prototype = undefined;
|
|
1266
|
-
} catch (error) {/* empty */}
|
|
1267
|
-
var state = enforceInternalState$1(value);
|
|
1268
|
-
if (!hasOwn$2(state, 'source')) {
|
|
1269
|
-
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
1270
|
-
}
|
|
1271
|
-
return value;
|
|
1272
|
-
};
|
|
1273
|
-
|
|
1274
|
-
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
1275
|
-
// eslint-disable-next-line no-extend-native -- required
|
|
1276
|
-
Function.prototype.toString = makeBuiltIn$2(function toString() {
|
|
1277
|
-
return isCallable$4(this) && getInternalState$1(this).source || inspectSource(this);
|
|
1278
|
-
}, 'toString');
|
|
1279
|
-
|
|
1280
|
-
var isCallable$3 = isCallable$d;
|
|
1281
|
-
var definePropertyModule = objectDefineProperty;
|
|
1282
|
-
var makeBuiltIn$1 = makeBuiltInExports;
|
|
1283
|
-
var defineGlobalProperty = defineGlobalProperty$2;
|
|
1284
|
-
var defineBuiltIn$1 = function (O, key, value, options) {
|
|
1285
|
-
if (!options) options = {};
|
|
1286
|
-
var simple = options.enumerable;
|
|
1287
|
-
var name = options.name !== undefined ? options.name : key;
|
|
1288
|
-
if (isCallable$3(value)) makeBuiltIn$1(value, name, options);
|
|
1289
|
-
if (options.global) {
|
|
1290
|
-
if (simple) O[key] = value;else defineGlobalProperty(key, value);
|
|
1291
|
-
} else {
|
|
1292
|
-
try {
|
|
1293
|
-
if (!options.unsafe) delete O[key];else if (O[key]) simple = true;
|
|
1294
|
-
} catch (error) {/* empty */}
|
|
1295
|
-
if (simple) O[key] = value;else definePropertyModule.f(O, key, {
|
|
1296
|
-
value: value,
|
|
1297
|
-
enumerable: false,
|
|
1298
|
-
configurable: !options.nonConfigurable,
|
|
1299
|
-
writable: !options.nonWritable
|
|
1300
|
-
});
|
|
1301
|
-
}
|
|
1302
|
-
return O;
|
|
1303
|
-
};
|
|
1304
|
-
|
|
1305
|
-
var makeBuiltIn = makeBuiltInExports;
|
|
1306
|
-
var defineProperty = objectDefineProperty;
|
|
1307
|
-
var defineBuiltInAccessor$1 = function (target, name, descriptor) {
|
|
1308
|
-
if (descriptor.get) makeBuiltIn(descriptor.get, name, {
|
|
1309
|
-
getter: true
|
|
1310
|
-
});
|
|
1311
|
-
if (descriptor.set) makeBuiltIn(descriptor.set, name, {
|
|
1312
|
-
setter: true
|
|
1313
|
-
});
|
|
1314
|
-
return defineProperty.f(target, name, descriptor);
|
|
1315
|
-
};
|
|
1316
|
-
|
|
1317
|
-
var fails$1 = fails$8;
|
|
1318
|
-
var correctPrototypeGetter = !fails$1(function () {
|
|
1319
|
-
function F() {/* empty */}
|
|
1320
|
-
F.prototype.constructor = null;
|
|
1321
|
-
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
1322
|
-
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
1323
|
-
});
|
|
1324
|
-
|
|
1325
|
-
var hasOwn$1 = hasOwnProperty_1;
|
|
1326
|
-
var isCallable$2 = isCallable$d;
|
|
1327
|
-
var toObject = toObject$2;
|
|
1328
|
-
var sharedKey = sharedKey$2;
|
|
1329
|
-
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1330
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1331
|
-
var $Object = Object;
|
|
1332
|
-
var ObjectPrototype$1 = $Object.prototype;
|
|
1333
|
-
|
|
1334
|
-
// `Object.getPrototypeOf` method
|
|
1335
|
-
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1336
|
-
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
1337
|
-
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
|
1338
|
-
var object = toObject(O);
|
|
1339
|
-
if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
|
|
1340
|
-
var constructor = object.constructor;
|
|
1341
|
-
if (isCallable$2(constructor) && object instanceof constructor) {
|
|
1342
|
-
return constructor.prototype;
|
|
1343
|
-
}
|
|
1344
|
-
return object instanceof $Object ? ObjectPrototype$1 : null;
|
|
1345
|
-
};
|
|
1346
|
-
|
|
1347
|
-
var uncurryThis = functionUncurryThis;
|
|
1348
|
-
var aCallable = aCallable$2;
|
|
1349
|
-
var functionUncurryThisAccessor = function (object, key, method) {
|
|
1350
|
-
try {
|
|
1351
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1352
|
-
return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
1353
|
-
} catch (error) {/* empty */}
|
|
1354
|
-
};
|
|
1355
|
-
|
|
1356
|
-
var isCallable$1 = isCallable$d;
|
|
1357
|
-
var $String = String;
|
|
1358
|
-
var $TypeError = TypeError;
|
|
1359
|
-
var aPossiblePrototype$1 = function (argument) {
|
|
1360
|
-
if (typeof argument == 'object' || isCallable$1(argument)) return argument;
|
|
1361
|
-
throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
|
|
1362
|
-
};
|
|
1363
|
-
|
|
1364
|
-
/* eslint-disable no-proto -- safe */
|
|
1365
|
-
var uncurryThisAccessor = functionUncurryThisAccessor;
|
|
1366
|
-
var anObject = anObject$2;
|
|
1367
|
-
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1368
|
-
|
|
1369
|
-
// `Object.setPrototypeOf` method
|
|
1370
|
-
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
1371
|
-
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
1372
|
-
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
1373
|
-
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
1374
|
-
var CORRECT_SETTER = false;
|
|
1375
|
-
var test = {};
|
|
1376
|
-
var setter;
|
|
1377
|
-
try {
|
|
1378
|
-
setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
|
|
1379
|
-
setter(test, []);
|
|
1380
|
-
CORRECT_SETTER = test instanceof Array;
|
|
1381
|
-
} catch (error) {/* empty */}
|
|
1382
|
-
return function setPrototypeOf(O, proto) {
|
|
1383
|
-
anObject(O);
|
|
1384
|
-
aPossiblePrototype(proto);
|
|
1385
|
-
if (CORRECT_SETTER) setter(O, proto);else O.__proto__ = proto;
|
|
1386
|
-
return O;
|
|
1387
|
-
};
|
|
1388
|
-
}() : undefined);
|
|
1389
|
-
|
|
1390
|
-
var NATIVE_ARRAY_BUFFER = arrayBufferBasicDetection;
|
|
1391
|
-
var DESCRIPTORS = descriptors;
|
|
1392
|
-
var global$2 = global$b;
|
|
1393
|
-
var isCallable = isCallable$d;
|
|
1394
|
-
var isObject = isObject$6;
|
|
1395
|
-
var hasOwn = hasOwnProperty_1;
|
|
1396
|
-
var classof = classof$1;
|
|
1397
|
-
var tryToString = tryToString$2;
|
|
1398
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$2;
|
|
1399
|
-
var defineBuiltIn = defineBuiltIn$1;
|
|
1400
|
-
var defineBuiltInAccessor = defineBuiltInAccessor$1;
|
|
1401
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
1402
|
-
var getPrototypeOf = objectGetPrototypeOf;
|
|
1403
|
-
var setPrototypeOf = objectSetPrototypeOf;
|
|
1404
|
-
var wellKnownSymbol = wellKnownSymbol$4;
|
|
1405
|
-
var uid = uid$3;
|
|
1406
|
-
var InternalStateModule = internalState;
|
|
1407
|
-
var enforceInternalState = InternalStateModule.enforce;
|
|
1408
|
-
var getInternalState = InternalStateModule.get;
|
|
1409
|
-
var Int8Array$2 = global$2.Int8Array;
|
|
1410
|
-
var Int8ArrayPrototype$1 = Int8Array$2 && Int8Array$2.prototype;
|
|
1411
|
-
var Uint8ClampedArray$1 = global$2.Uint8ClampedArray;
|
|
1412
|
-
var Uint8ClampedArrayPrototype = Uint8ClampedArray$1 && Uint8ClampedArray$1.prototype;
|
|
1413
|
-
var TypedArray = Int8Array$2 && getPrototypeOf(Int8Array$2);
|
|
1414
|
-
var TypedArrayPrototype = Int8ArrayPrototype$1 && getPrototypeOf(Int8ArrayPrototype$1);
|
|
1415
|
-
var ObjectPrototype = Object.prototype;
|
|
1416
|
-
var TypeError$1 = global$2.TypeError;
|
|
1417
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
1418
|
-
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
|
|
1419
|
-
var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
|
|
1420
|
-
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
|
|
1421
|
-
var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global$2.opera) !== 'Opera';
|
|
1422
|
-
var TYPED_ARRAY_TAG_REQUIRED = false;
|
|
1423
|
-
var NAME, Constructor, Prototype;
|
|
1424
|
-
var TypedArrayConstructorsList = {
|
|
1425
|
-
Int8Array: 1,
|
|
1426
|
-
Uint8Array: 1,
|
|
1427
|
-
Uint8ClampedArray: 1,
|
|
1428
|
-
Int16Array: 2,
|
|
1429
|
-
Uint16Array: 2,
|
|
1430
|
-
Int32Array: 4,
|
|
1431
|
-
Uint32Array: 4,
|
|
1432
|
-
Float32Array: 4,
|
|
1433
|
-
Float64Array: 8
|
|
1434
|
-
};
|
|
1435
|
-
var BigIntArrayConstructorsList = {
|
|
1436
|
-
BigInt64Array: 8,
|
|
1437
|
-
BigUint64Array: 8
|
|
1438
|
-
};
|
|
1439
|
-
var isView = function isView(it) {
|
|
1440
|
-
if (!isObject(it)) return false;
|
|
1441
|
-
var klass = classof(it);
|
|
1442
|
-
return klass === 'DataView' || hasOwn(TypedArrayConstructorsList, klass) || hasOwn(BigIntArrayConstructorsList, klass);
|
|
1443
|
-
};
|
|
1444
|
-
var getTypedArrayConstructor = function (it) {
|
|
1445
|
-
var proto = getPrototypeOf(it);
|
|
1446
|
-
if (!isObject(proto)) return;
|
|
1447
|
-
var state = getInternalState(proto);
|
|
1448
|
-
return state && hasOwn(state, TYPED_ARRAY_CONSTRUCTOR) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor(proto);
|
|
1449
|
-
};
|
|
1450
|
-
var isTypedArray$3 = function (it) {
|
|
1451
|
-
if (!isObject(it)) return false;
|
|
1452
|
-
var klass = classof(it);
|
|
1453
|
-
return hasOwn(TypedArrayConstructorsList, klass) || hasOwn(BigIntArrayConstructorsList, klass);
|
|
1454
|
-
};
|
|
1455
|
-
var aTypedArray$1 = function (it) {
|
|
1456
|
-
if (isTypedArray$3(it)) return it;
|
|
1457
|
-
throw TypeError$1('Target is not a typed array');
|
|
1458
|
-
};
|
|
1459
|
-
var aTypedArrayConstructor = function (C) {
|
|
1460
|
-
if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C;
|
|
1461
|
-
throw TypeError$1(tryToString(C) + ' is not a typed array constructor');
|
|
1462
|
-
};
|
|
1463
|
-
var exportTypedArrayMethod$1 = function (KEY, property, forced, options) {
|
|
1464
|
-
if (!DESCRIPTORS) return;
|
|
1465
|
-
if (forced) for (var ARRAY in TypedArrayConstructorsList) {
|
|
1466
|
-
var TypedArrayConstructor = global$2[ARRAY];
|
|
1467
|
-
if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try {
|
|
1468
|
-
delete TypedArrayConstructor.prototype[KEY];
|
|
1469
|
-
} catch (error) {
|
|
1470
|
-
// old WebKit bug - some methods are non-configurable
|
|
1471
|
-
try {
|
|
1472
|
-
TypedArrayConstructor.prototype[KEY] = property;
|
|
1473
|
-
} catch (error2) {/* empty */}
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
if (!TypedArrayPrototype[KEY] || forced) {
|
|
1477
|
-
defineBuiltIn(TypedArrayPrototype, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype$1[KEY] || property, options);
|
|
1478
|
-
}
|
|
1479
|
-
};
|
|
1480
|
-
var exportTypedArrayStaticMethod = function (KEY, property, forced) {
|
|
1481
|
-
var ARRAY, TypedArrayConstructor;
|
|
1482
|
-
if (!DESCRIPTORS) return;
|
|
1483
|
-
if (setPrototypeOf) {
|
|
1484
|
-
if (forced) for (ARRAY in TypedArrayConstructorsList) {
|
|
1485
|
-
TypedArrayConstructor = global$2[ARRAY];
|
|
1486
|
-
if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try {
|
|
1487
|
-
delete TypedArrayConstructor[KEY];
|
|
1488
|
-
} catch (error) {/* empty */}
|
|
1489
|
-
}
|
|
1490
|
-
if (!TypedArray[KEY] || forced) {
|
|
1491
|
-
// V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
|
|
1492
|
-
try {
|
|
1493
|
-
return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
|
|
1494
|
-
} catch (error) {/* empty */}
|
|
1495
|
-
} else return;
|
|
1496
|
-
}
|
|
1497
|
-
for (ARRAY in TypedArrayConstructorsList) {
|
|
1498
|
-
TypedArrayConstructor = global$2[ARRAY];
|
|
1499
|
-
if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
|
|
1500
|
-
defineBuiltIn(TypedArrayConstructor, KEY, property);
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
};
|
|
1504
|
-
for (NAME in TypedArrayConstructorsList) {
|
|
1505
|
-
Constructor = global$2[NAME];
|
|
1506
|
-
Prototype = Constructor && Constructor.prototype;
|
|
1507
|
-
if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;else NATIVE_ARRAY_BUFFER_VIEWS = false;
|
|
1508
|
-
}
|
|
1509
|
-
for (NAME in BigIntArrayConstructorsList) {
|
|
1510
|
-
Constructor = global$2[NAME];
|
|
1511
|
-
Prototype = Constructor && Constructor.prototype;
|
|
1512
|
-
if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
|
|
1513
|
-
}
|
|
1514
|
-
|
|
1515
|
-
// WebKit bug - typed arrays constructors prototype is Object.prototype
|
|
1516
|
-
if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
|
|
1517
|
-
// eslint-disable-next-line no-shadow -- safe
|
|
1518
|
-
TypedArray = function TypedArray() {
|
|
1519
|
-
throw TypeError$1('Incorrect invocation');
|
|
1520
|
-
};
|
|
1521
|
-
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
|
|
1522
|
-
if (global$2[NAME]) setPrototypeOf(global$2[NAME], TypedArray);
|
|
1523
|
-
}
|
|
1524
|
-
}
|
|
1525
|
-
if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
|
|
1526
|
-
TypedArrayPrototype = TypedArray.prototype;
|
|
1527
|
-
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
|
|
1528
|
-
if (global$2[NAME]) setPrototypeOf(global$2[NAME].prototype, TypedArrayPrototype);
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
// WebKit bug - one more object in Uint8ClampedArray prototype chain
|
|
1533
|
-
if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
|
|
1534
|
-
setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
|
|
1535
|
-
}
|
|
1536
|
-
if (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) {
|
|
1537
|
-
TYPED_ARRAY_TAG_REQUIRED = true;
|
|
1538
|
-
defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG, {
|
|
1539
|
-
configurable: true,
|
|
1540
|
-
get: function () {
|
|
1541
|
-
return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
|
|
1542
|
-
}
|
|
1543
|
-
});
|
|
1544
|
-
for (NAME in TypedArrayConstructorsList) if (global$2[NAME]) {
|
|
1545
|
-
createNonEnumerableProperty(global$2[NAME], TYPED_ARRAY_TAG, NAME);
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
var arrayBufferViewCore = {
|
|
1549
|
-
NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
|
|
1550
|
-
TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,
|
|
1551
|
-
aTypedArray: aTypedArray$1,
|
|
1552
|
-
aTypedArrayConstructor: aTypedArrayConstructor,
|
|
1553
|
-
exportTypedArrayMethod: exportTypedArrayMethod$1,
|
|
1554
|
-
exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
|
|
1555
|
-
getTypedArrayConstructor: getTypedArrayConstructor,
|
|
1556
|
-
isView: isView,
|
|
1557
|
-
isTypedArray: isTypedArray$3,
|
|
1558
|
-
TypedArray: TypedArray,
|
|
1559
|
-
TypedArrayPrototype: TypedArrayPrototype
|
|
1560
|
-
};
|
|
1561
|
-
|
|
1562
|
-
var ceil = Math.ceil;
|
|
1563
|
-
var floor = Math.floor;
|
|
1564
|
-
|
|
1565
|
-
// `Math.trunc` method
|
|
1566
|
-
// https://tc39.es/ecma262/#sec-math.trunc
|
|
1567
|
-
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
1568
|
-
var mathTrunc = Math.trunc || function trunc(x) {
|
|
1569
|
-
var n = +x;
|
|
1570
|
-
return (n > 0 ? floor : ceil)(n);
|
|
1571
|
-
};
|
|
1572
|
-
|
|
1573
|
-
var trunc = mathTrunc;
|
|
1574
|
-
|
|
1575
|
-
// `ToIntegerOrInfinity` abstract operation
|
|
1576
|
-
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
1577
|
-
var toIntegerOrInfinity$2 = function (argument) {
|
|
1578
|
-
var number = +argument;
|
|
1579
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
1580
|
-
return number !== number || number === 0 ? 0 : trunc(number);
|
|
1581
|
-
};
|
|
1582
|
-
|
|
1583
|
-
var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
|
|
1584
|
-
var min = Math.min;
|
|
1585
|
-
|
|
1586
|
-
// `ToLength` abstract operation
|
|
1587
|
-
// https://tc39.es/ecma262/#sec-tolength
|
|
1588
|
-
var toLength$1 = function (argument) {
|
|
1589
|
-
return argument > 0 ? min(toIntegerOrInfinity$1(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
1590
|
-
};
|
|
1591
|
-
|
|
1592
|
-
var toLength = toLength$1;
|
|
1593
|
-
|
|
1594
|
-
// `LengthOfArrayLike` abstract operation
|
|
1595
|
-
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
1596
|
-
var lengthOfArrayLike$1 = function (obj) {
|
|
1597
|
-
return toLength(obj.length);
|
|
1598
|
-
};
|
|
1599
|
-
|
|
1600
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$2;
|
|
1601
|
-
var $RangeError$1 = RangeError;
|
|
1602
|
-
var toPositiveInteger$1 = function (it) {
|
|
1603
|
-
var result = toIntegerOrInfinity(it);
|
|
1604
|
-
if (result < 0) throw $RangeError$1("The argument can't be less than 0");
|
|
1605
|
-
return result;
|
|
1606
|
-
};
|
|
1607
|
-
|
|
1608
|
-
var toPositiveInteger = toPositiveInteger$1;
|
|
1609
|
-
var $RangeError = RangeError;
|
|
1610
|
-
var toOffset$1 = function (it, BYTES) {
|
|
1611
|
-
var offset = toPositiveInteger(it);
|
|
1612
|
-
if (offset % BYTES) throw $RangeError('Wrong offset');
|
|
1613
|
-
return offset;
|
|
1614
|
-
};
|
|
1615
|
-
|
|
1616
|
-
var global$1 = global$b;
|
|
1617
|
-
var call = functionCall;
|
|
1618
|
-
var ArrayBufferViewCore = arrayBufferViewCore;
|
|
1619
|
-
var lengthOfArrayLike = lengthOfArrayLike$1;
|
|
1620
|
-
var toOffset = toOffset$1;
|
|
1621
|
-
var toIndexedObject = toObject$2;
|
|
1622
|
-
var fails = fails$8;
|
|
1623
|
-
var RangeError$1 = global$1.RangeError;
|
|
1624
|
-
var Int8Array$1 = global$1.Int8Array;
|
|
1625
|
-
var Int8ArrayPrototype = Int8Array$1 && Int8Array$1.prototype;
|
|
1626
|
-
var $set = Int8ArrayPrototype && Int8ArrayPrototype.set;
|
|
1627
|
-
var aTypedArray = ArrayBufferViewCore.aTypedArray;
|
|
1628
|
-
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
|
|
1629
|
-
var WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS = !fails(function () {
|
|
1630
|
-
// eslint-disable-next-line es/no-typed-arrays -- required for testing
|
|
1631
|
-
var array = new Uint8ClampedArray(2);
|
|
1632
|
-
call($set, array, {
|
|
1633
|
-
length: 1,
|
|
1634
|
-
0: 3
|
|
1635
|
-
}, 1);
|
|
1636
|
-
return array[1] !== 3;
|
|
1637
|
-
});
|
|
1638
|
-
|
|
1639
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other
|
|
1640
|
-
var TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {
|
|
1641
|
-
var array = new Int8Array$1(2);
|
|
1642
|
-
array.set(1);
|
|
1643
|
-
array.set('2', 1);
|
|
1644
|
-
return array[0] !== 0 || array[1] !== 2;
|
|
1645
|
-
});
|
|
1646
|
-
|
|
1647
|
-
// `%TypedArray%.prototype.set` method
|
|
1648
|
-
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
|
|
1649
|
-
exportTypedArrayMethod('set', function set(arrayLike /* , offset */) {
|
|
1650
|
-
aTypedArray(this);
|
|
1651
|
-
var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
|
|
1652
|
-
var src = toIndexedObject(arrayLike);
|
|
1653
|
-
if (WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);
|
|
1654
|
-
var length = this.length;
|
|
1655
|
-
var len = lengthOfArrayLike(src);
|
|
1656
|
-
var index = 0;
|
|
1657
|
-
if (len + offset > length) throw RangeError$1('Wrong length');
|
|
1658
|
-
while (index < len) this[offset + index] = src[index++];
|
|
1659
|
-
}, !WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);
|
|
1660
|
-
|
|
1661
|
-
var isTypedarray = isTypedArray$2;
|
|
1662
|
-
isTypedArray$2.strict = isStrictTypedArray;
|
|
1663
|
-
isTypedArray$2.loose = isLooseTypedArray;
|
|
1664
|
-
var toString = Object.prototype.toString;
|
|
1665
|
-
var names = {
|
|
1666
|
-
'[object Int8Array]': true,
|
|
1667
|
-
'[object Int16Array]': true,
|
|
1668
|
-
'[object Int32Array]': true,
|
|
1669
|
-
'[object Uint8Array]': true,
|
|
1670
|
-
'[object Uint8ClampedArray]': true,
|
|
1671
|
-
'[object Uint16Array]': true,
|
|
1672
|
-
'[object Uint32Array]': true,
|
|
1673
|
-
'[object Float32Array]': true,
|
|
1674
|
-
'[object Float64Array]': true
|
|
1675
|
-
};
|
|
1676
|
-
function isTypedArray$2(arr) {
|
|
1677
|
-
return isStrictTypedArray(arr) || isLooseTypedArray(arr);
|
|
1678
|
-
}
|
|
1679
|
-
function isStrictTypedArray(arr) {
|
|
1680
|
-
return arr instanceof Int8Array || arr instanceof Int16Array || arr instanceof Int32Array || arr instanceof Uint8Array || arr instanceof Uint8ClampedArray || arr instanceof Uint16Array || arr instanceof Uint32Array || arr instanceof Float32Array || arr instanceof Float64Array;
|
|
1681
|
-
}
|
|
1682
|
-
function isLooseTypedArray(arr) {
|
|
1683
|
-
return names[toString.call(arr)];
|
|
1684
|
-
}
|
|
1685
|
-
|
|
1686
|
-
/**
|
|
1687
|
-
* Convert a typed array to a Buffer without a copy
|
|
1688
|
-
*
|
|
1689
|
-
* Author: Feross Aboukhadijeh <https://feross.org>
|
|
1690
|
-
* License: MIT
|
|
1691
|
-
*
|
|
1692
|
-
* `npm install typedarray-to-buffer`
|
|
1693
|
-
*/
|
|
1694
|
-
var isTypedArray$1 = isTypedarray.strict;
|
|
1695
|
-
var typedarrayToBuffer = function typedarrayToBuffer(arr) {
|
|
1696
|
-
if (isTypedArray$1(arr)) {
|
|
1697
|
-
// To avoid a copy, use the typed array's underlying ArrayBuffer to back new Buffer
|
|
1698
|
-
var buf = Buffer.from(arr.buffer);
|
|
1699
|
-
if (arr.byteLength !== arr.buffer.byteLength) {
|
|
1700
|
-
// Respect the "view", i.e. byteOffset and byteLength, without doing a copy
|
|
1701
|
-
buf = buf.slice(arr.byteOffset, arr.byteOffset + arr.byteLength);
|
|
1702
|
-
}
|
|
1703
|
-
return buf;
|
|
1704
|
-
} else {
|
|
1705
|
-
// Pass through all other types to `Buffer.from`
|
|
1706
|
-
return Buffer.from(arr);
|
|
1707
|
-
}
|
|
1708
|
-
};
|
|
1709
|
-
|
|
1710
|
-
writeFileAtomic.exports = writeFile;
|
|
1711
|
-
writeFileAtomicExports.sync = writeFileSync;
|
|
1712
|
-
writeFileAtomicExports._getTmpname = getTmpname; // for testing
|
|
1713
|
-
writeFileAtomicExports._cleanupOnExit = cleanupOnExit;
|
|
1714
|
-
const fs = fs__default;
|
|
1715
|
-
const MurmurHash3 = imurmurhashExports;
|
|
1716
|
-
const onExit = signalExitExports;
|
|
1717
|
-
const path = path__default;
|
|
1718
|
-
const isTypedArray = isTypedarray;
|
|
1719
|
-
const typedArrayToBuffer = typedarrayToBuffer;
|
|
1720
|
-
const {
|
|
1721
|
-
promisify
|
|
1722
|
-
} = require$$6;
|
|
1723
|
-
const activeFiles = {};
|
|
1724
|
-
|
|
1725
|
-
// if we run inside of a worker_thread, `process.pid` is not unique
|
|
1726
|
-
/* istanbul ignore next */
|
|
1727
|
-
const threadId = function getId() {
|
|
1728
|
-
try {
|
|
1729
|
-
const workerThreads = require('worker_threads');
|
|
1730
|
-
|
|
1731
|
-
/// if we are in main thread, this is set to `0`
|
|
1732
|
-
return workerThreads.threadId;
|
|
1733
|
-
} catch (e) {
|
|
1734
|
-
// worker_threads are not available, fallback to 0
|
|
1735
|
-
return 0;
|
|
1736
|
-
}
|
|
1737
|
-
}();
|
|
1738
|
-
let invocations = 0;
|
|
1739
|
-
function getTmpname(filename) {
|
|
1740
|
-
return filename + '.' + MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result();
|
|
1741
|
-
}
|
|
1742
|
-
function cleanupOnExit(tmpfile) {
|
|
1743
|
-
return () => {
|
|
1744
|
-
try {
|
|
1745
|
-
fs.unlinkSync(typeof tmpfile === 'function' ? tmpfile() : tmpfile);
|
|
1746
|
-
} catch (_) {}
|
|
1747
|
-
};
|
|
1748
|
-
}
|
|
1749
|
-
function serializeActiveFile(absoluteName) {
|
|
1750
|
-
return new Promise(resolve => {
|
|
1751
|
-
// make a queue if it doesn't already exist
|
|
1752
|
-
if (!activeFiles[absoluteName]) activeFiles[absoluteName] = [];
|
|
1753
|
-
activeFiles[absoluteName].push(resolve); // add this job to the queue
|
|
1754
|
-
if (activeFiles[absoluteName].length === 1) resolve(); // kick off the first one
|
|
1755
|
-
});
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
// https://github.com/isaacs/node-graceful-fs/blob/master/polyfills.js#L315-L342
|
|
1759
|
-
function isChownErrOk(err) {
|
|
1760
|
-
if (err.code === 'ENOSYS') {
|
|
1761
|
-
return true;
|
|
1762
|
-
}
|
|
1763
|
-
const nonroot = !process.getuid || process.getuid() !== 0;
|
|
1764
|
-
if (nonroot) {
|
|
1765
|
-
if (err.code === 'EINVAL' || err.code === 'EPERM') {
|
|
1766
|
-
return true;
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
|
-
return false;
|
|
1770
|
-
}
|
|
1771
|
-
async function writeFileAsync(filename, data, options = {}) {
|
|
1772
|
-
if (typeof options === 'string') {
|
|
1773
|
-
options = {
|
|
1774
|
-
encoding: options
|
|
1775
|
-
};
|
|
1776
|
-
}
|
|
1777
|
-
let fd;
|
|
1778
|
-
let tmpfile;
|
|
1779
|
-
/* istanbul ignore next -- The closure only gets called when onExit triggers */
|
|
1780
|
-
const removeOnExitHandler = onExit(cleanupOnExit(() => tmpfile));
|
|
1781
|
-
const absoluteName = path.resolve(filename);
|
|
1782
|
-
try {
|
|
1783
|
-
await serializeActiveFile(absoluteName);
|
|
1784
|
-
const truename = await promisify(fs.realpath)(filename).catch(() => filename);
|
|
1785
|
-
tmpfile = getTmpname(truename);
|
|
1786
|
-
if (!options.mode || !options.chown) {
|
|
1787
|
-
// Either mode or chown is not explicitly set
|
|
1788
|
-
// Default behavior is to copy it from original file
|
|
1789
|
-
const stats = await promisify(fs.stat)(truename).catch(() => {});
|
|
1790
|
-
if (stats) {
|
|
1791
|
-
if (options.mode == null) {
|
|
1792
|
-
options.mode = stats.mode;
|
|
1793
|
-
}
|
|
1794
|
-
if (options.chown == null && process.getuid) {
|
|
1795
|
-
options.chown = {
|
|
1796
|
-
uid: stats.uid,
|
|
1797
|
-
gid: stats.gid
|
|
1798
|
-
};
|
|
1799
|
-
}
|
|
1800
|
-
}
|
|
1801
|
-
}
|
|
1802
|
-
fd = await promisify(fs.open)(tmpfile, 'w', options.mode);
|
|
1803
|
-
if (options.tmpfileCreated) {
|
|
1804
|
-
await options.tmpfileCreated(tmpfile);
|
|
1805
|
-
}
|
|
1806
|
-
if (isTypedArray(data)) {
|
|
1807
|
-
data = typedArrayToBuffer(data);
|
|
1808
|
-
}
|
|
1809
|
-
if (Buffer.isBuffer(data)) {
|
|
1810
|
-
await promisify(fs.write)(fd, data, 0, data.length, 0);
|
|
1811
|
-
} else if (data != null) {
|
|
1812
|
-
await promisify(fs.write)(fd, String(data), 0, String(options.encoding || 'utf8'));
|
|
1813
|
-
}
|
|
1814
|
-
if (options.fsync !== false) {
|
|
1815
|
-
await promisify(fs.fsync)(fd);
|
|
1816
|
-
}
|
|
1817
|
-
await promisify(fs.close)(fd);
|
|
1818
|
-
fd = null;
|
|
1819
|
-
if (options.chown) {
|
|
1820
|
-
await promisify(fs.chown)(tmpfile, options.chown.uid, options.chown.gid).catch(err => {
|
|
1821
|
-
if (!isChownErrOk(err)) {
|
|
1822
|
-
throw err;
|
|
1823
|
-
}
|
|
1824
|
-
});
|
|
1825
|
-
}
|
|
1826
|
-
if (options.mode) {
|
|
1827
|
-
await promisify(fs.chmod)(tmpfile, options.mode).catch(err => {
|
|
1828
|
-
if (!isChownErrOk(err)) {
|
|
1829
|
-
throw err;
|
|
1830
|
-
}
|
|
1831
|
-
});
|
|
1832
|
-
}
|
|
1833
|
-
await promisify(fs.rename)(tmpfile, truename);
|
|
1834
|
-
} finally {
|
|
1835
|
-
if (fd) {
|
|
1836
|
-
await promisify(fs.close)(fd).catch( /* istanbul ignore next */
|
|
1837
|
-
() => {});
|
|
1838
|
-
}
|
|
1839
|
-
removeOnExitHandler();
|
|
1840
|
-
await promisify(fs.unlink)(tmpfile).catch(() => {});
|
|
1841
|
-
activeFiles[absoluteName].shift(); // remove the element added by serializeSameFile
|
|
1842
|
-
if (activeFiles[absoluteName].length > 0) {
|
|
1843
|
-
activeFiles[absoluteName][0](); // start next job if one is pending
|
|
1844
|
-
} else delete activeFiles[absoluteName];
|
|
1845
|
-
}
|
|
1846
|
-
}
|
|
1847
|
-
function writeFile(filename, data, options, callback) {
|
|
1848
|
-
if (options instanceof Function) {
|
|
1849
|
-
callback = options;
|
|
1850
|
-
options = {};
|
|
1851
|
-
}
|
|
1852
|
-
const promise = writeFileAsync(filename, data, options);
|
|
1853
|
-
if (callback) {
|
|
1854
|
-
promise.then(callback, callback);
|
|
1855
|
-
}
|
|
1856
|
-
return promise;
|
|
1857
|
-
}
|
|
1858
|
-
function writeFileSync(filename, data, options) {
|
|
1859
|
-
if (typeof options === 'string') options = {
|
|
1860
|
-
encoding: options
|
|
1861
|
-
};else if (!options) options = {};
|
|
1862
|
-
try {
|
|
1863
|
-
filename = fs.realpathSync(filename);
|
|
1864
|
-
} catch (ex) {
|
|
1865
|
-
// it's ok, it'll happen on a not yet existing file
|
|
1866
|
-
}
|
|
1867
|
-
const tmpfile = getTmpname(filename);
|
|
1868
|
-
if (!options.mode || !options.chown) {
|
|
1869
|
-
// Either mode or chown is not explicitly set
|
|
1870
|
-
// Default behavior is to copy it from original file
|
|
1871
|
-
try {
|
|
1872
|
-
const stats = fs.statSync(filename);
|
|
1873
|
-
options = Object.assign({}, options);
|
|
1874
|
-
if (!options.mode) {
|
|
1875
|
-
options.mode = stats.mode;
|
|
1876
|
-
}
|
|
1877
|
-
if (!options.chown && process.getuid) {
|
|
1878
|
-
options.chown = {
|
|
1879
|
-
uid: stats.uid,
|
|
1880
|
-
gid: stats.gid
|
|
1881
|
-
};
|
|
1882
|
-
}
|
|
1883
|
-
} catch (ex) {
|
|
1884
|
-
// ignore stat errors
|
|
1885
|
-
}
|
|
1886
|
-
}
|
|
1887
|
-
let fd;
|
|
1888
|
-
const cleanup = cleanupOnExit(tmpfile);
|
|
1889
|
-
const removeOnExitHandler = onExit(cleanup);
|
|
1890
|
-
let threw = true;
|
|
1891
|
-
try {
|
|
1892
|
-
fd = fs.openSync(tmpfile, 'w', options.mode || 0o666);
|
|
1893
|
-
if (options.tmpfileCreated) {
|
|
1894
|
-
options.tmpfileCreated(tmpfile);
|
|
1895
|
-
}
|
|
1896
|
-
if (isTypedArray(data)) {
|
|
1897
|
-
data = typedArrayToBuffer(data);
|
|
1898
|
-
}
|
|
1899
|
-
if (Buffer.isBuffer(data)) {
|
|
1900
|
-
fs.writeSync(fd, data, 0, data.length, 0);
|
|
1901
|
-
} else if (data != null) {
|
|
1902
|
-
fs.writeSync(fd, String(data), 0, String(options.encoding || 'utf8'));
|
|
1903
|
-
}
|
|
1904
|
-
if (options.fsync !== false) {
|
|
1905
|
-
fs.fsyncSync(fd);
|
|
1906
|
-
}
|
|
1907
|
-
fs.closeSync(fd);
|
|
1908
|
-
fd = null;
|
|
1909
|
-
if (options.chown) {
|
|
1910
|
-
try {
|
|
1911
|
-
fs.chownSync(tmpfile, options.chown.uid, options.chown.gid);
|
|
1912
|
-
} catch (err) {
|
|
1913
|
-
if (!isChownErrOk(err)) {
|
|
1914
|
-
throw err;
|
|
1915
|
-
}
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
if (options.mode) {
|
|
1919
|
-
try {
|
|
1920
|
-
fs.chmodSync(tmpfile, options.mode);
|
|
1921
|
-
} catch (err) {
|
|
1922
|
-
if (!isChownErrOk(err)) {
|
|
1923
|
-
throw err;
|
|
1924
|
-
}
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
fs.renameSync(tmpfile, filename);
|
|
1928
|
-
threw = false;
|
|
1929
|
-
} finally {
|
|
1930
|
-
if (fd) {
|
|
1931
|
-
try {
|
|
1932
|
-
fs.closeSync(fd);
|
|
1933
|
-
} catch (ex) {
|
|
1934
|
-
// ignore close errors at this stage, error may have closed fd already.
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
removeOnExitHandler();
|
|
1938
|
-
if (threw) {
|
|
1939
|
-
cleanup();
|
|
1940
|
-
}
|
|
1941
|
-
}
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
const PLUGIN_ID = "0feba3a0-b6d1-11e6-9598-0800200c9a66";
|
|
1945
|
-
/**
|
|
1946
|
-
* Starts an IG.Asset.Server session and returns the sessionId
|
|
1947
|
-
*
|
|
1948
|
-
* @param {SessionStartParams} params
|
|
1949
|
-
* @returns
|
|
1950
|
-
*/
|
|
1951
|
-
const startSession = async ({
|
|
1952
|
-
url,
|
|
1953
|
-
authentication,
|
|
1954
|
-
...params
|
|
1955
|
-
}) => {
|
|
1956
|
-
const payload = {
|
|
1957
|
-
...params,
|
|
1958
|
-
user: undefined,
|
|
1959
|
-
password: undefined,
|
|
1960
|
-
license: undefined,
|
|
1961
|
-
plugin: PLUGIN_ID
|
|
1962
|
-
};
|
|
1963
|
-
if (authentication.type === "credentials") {
|
|
1964
|
-
payload.user = authentication.username;
|
|
1965
|
-
payload.password = authentication.password;
|
|
1966
|
-
} else if (authentication.type === "license") {
|
|
1967
|
-
payload.license = authentication.license;
|
|
1968
|
-
}
|
|
1969
|
-
const {
|
|
1970
|
-
data: {
|
|
1971
|
-
session: sessionId,
|
|
1972
|
-
state,
|
|
1973
|
-
response
|
|
1974
|
-
}
|
|
1975
|
-
} = await axios.post(`Session/Start2`, JSON.stringify(payload), {
|
|
1976
|
-
baseURL: url
|
|
1977
|
-
});
|
|
1978
|
-
if (state !== "SUCCESS") {
|
|
1979
|
-
let message = `Could not start session. IG.Asset.Server responded with ${state}`;
|
|
1980
|
-
if (response) {
|
|
1981
|
-
message += `: ${response}`;
|
|
1982
|
-
}
|
|
1983
|
-
throw new Error(message);
|
|
1984
|
-
}
|
|
1985
|
-
return {
|
|
1986
|
-
_kind: "AssetService",
|
|
1987
|
-
url,
|
|
1988
|
-
sessionId,
|
|
1989
|
-
domain: params.domain,
|
|
1990
|
-
subDomain: params.subDomain
|
|
1991
|
-
};
|
|
1992
|
-
};
|
|
1993
|
-
const closeSession = async session => {
|
|
1994
|
-
await axios.get(`Session/Close/${session.sessionId}`, {
|
|
1995
|
-
baseURL: session.url
|
|
1996
|
-
});
|
|
1997
|
-
};
|
|
1998
|
-
const uploadPackage = async (session, {
|
|
1999
|
-
name,
|
|
2000
|
-
version
|
|
2001
|
-
}, zipFilePath) => {
|
|
2002
|
-
try {
|
|
2003
|
-
await uploadPackageToUrl(session.url, `UploadPackage/${session.sessionId}/${name}_${version}`, zipFilePath);
|
|
2004
|
-
} catch (err) {
|
|
2005
|
-
await uploadPackageToUrl(session.url, `UploadPackage/${session.sessionId}/${name}_${version}/`, zipFilePath);
|
|
2006
|
-
}
|
|
2007
|
-
};
|
|
2008
|
-
const uploadPackageToUrl = async (url, path, zipFilePath) => {
|
|
2009
|
-
const {
|
|
2010
|
-
data,
|
|
2011
|
-
status
|
|
2012
|
-
} = await axios.post(path, fs$1.createReadStream(zipFilePath), {
|
|
2013
|
-
baseURL: url
|
|
2014
|
-
});
|
|
2015
|
-
let objectBody;
|
|
2016
|
-
if (typeof data === "string") {
|
|
2017
|
-
try {
|
|
2018
|
-
objectBody = JSON.parse(data);
|
|
2019
|
-
} catch (err) {}
|
|
2020
|
-
} else if (typeof data === "object") {
|
|
2021
|
-
objectBody = data;
|
|
2022
|
-
}
|
|
2023
|
-
if (objectBody !== undefined) {
|
|
2024
|
-
if ("state" in objectBody && objectBody.state !== "SUCCESS") {
|
|
2025
|
-
throw new Error(objectBody.response ?? objectBody.state);
|
|
2026
|
-
}
|
|
2027
|
-
}
|
|
2028
|
-
if (status >= 400) {
|
|
2029
|
-
if (objectBody !== undefined) {
|
|
2030
|
-
let text_1 = "";
|
|
2031
|
-
for (const key in objectBody) {
|
|
2032
|
-
text_1 += key + ": \n";
|
|
2033
|
-
if (typeof objectBody[key] === "object") {
|
|
2034
|
-
text_1 += JSON.stringify(objectBody[key], undefined, 2);
|
|
2035
|
-
} else {
|
|
2036
|
-
text_1 += objectBody[key];
|
|
2037
|
-
}
|
|
2038
|
-
text_1 += "\n\n";
|
|
2039
|
-
}
|
|
2040
|
-
throw new Error(text_1);
|
|
2041
|
-
}
|
|
2042
|
-
throw new Error(data);
|
|
2043
|
-
}
|
|
2044
|
-
return data;
|
|
2045
|
-
};
|
|
2046
|
-
const getExistingPackages = async session => {
|
|
2047
|
-
const {
|
|
2048
|
-
data
|
|
2049
|
-
} = await axios.get(`Script/GetInformation/${session.sessionId}`, {
|
|
2050
|
-
baseURL: session.url,
|
|
2051
|
-
validateStatus: status => status === 404 || status === 200
|
|
2052
|
-
}).catch(err => {
|
|
2053
|
-
throw new Error(`Failed to get existing packages: ${err.message}`);
|
|
2054
|
-
});
|
|
2055
|
-
return data;
|
|
2056
|
-
};
|
|
2057
|
-
|
|
2058
|
-
const createDefaultPrompter = () => {
|
|
2059
|
-
return {
|
|
2060
|
-
confirm: async message => {
|
|
2061
|
-
const {
|
|
2062
|
-
confirm
|
|
2063
|
-
} = await inquirer.prompt([{
|
|
2064
|
-
type: "confirm",
|
|
2065
|
-
message,
|
|
2066
|
-
name: "confirm"
|
|
2067
|
-
}]);
|
|
2068
|
-
return confirm;
|
|
2069
|
-
},
|
|
2070
|
-
ask: async question => {
|
|
2071
|
-
const {
|
|
2072
|
-
answer
|
|
2073
|
-
} = await inquirer.prompt([{
|
|
2074
|
-
type: "list",
|
|
2075
|
-
message: question.message,
|
|
2076
|
-
name: "answer",
|
|
2077
|
-
choices: question.options,
|
|
2078
|
-
default: question.default
|
|
2079
|
-
}]);
|
|
2080
|
-
return answer;
|
|
2081
|
-
}
|
|
2082
|
-
};
|
|
2083
|
-
};
|
|
2084
|
-
|
|
2085
|
-
const __filename$1 = fileURLToPath(import.meta.url);
|
|
2086
|
-
const __dirname = path$1.dirname(__filename$1);
|
|
2087
|
-
const pjson = JSON.parse(fs$1.readFileSync(path$1.join(__dirname, "..", "package.json"), "utf8"));
|
|
2088
|
-
const captureError = err => {
|
|
2089
|
-
console.log("");
|
|
2090
|
-
if (process.env.NODE_ENV !== "production") {
|
|
2091
|
-
console.error(err);
|
|
2092
|
-
} else {
|
|
2093
|
-
console.error("Stopped execution because of the following error: " + err.message);
|
|
2094
|
-
}
|
|
2095
|
-
process.exit(1);
|
|
2096
|
-
};
|
|
2097
|
-
const buildOptions = {
|
|
2098
|
-
outDir: {
|
|
2099
|
-
description: "Output directory",
|
|
2100
|
-
type: "string",
|
|
2101
|
-
default: "bin",
|
|
2102
|
-
coerce: input => input === undefined || input === null ? undefined : path$1.resolve(process.cwd(), input)
|
|
2103
|
-
},
|
|
2104
|
-
minimize: {
|
|
2105
|
-
description: "Minify output",
|
|
2106
|
-
type: "boolean",
|
|
2107
|
-
default: true
|
|
2108
|
-
},
|
|
2109
|
-
cwd: {
|
|
2110
|
-
description: "Working directory",
|
|
2111
|
-
type: "string",
|
|
2112
|
-
default: process.cwd()
|
|
2113
|
-
},
|
|
2114
|
-
clean: {
|
|
2115
|
-
description: "Empty output dir before compiling",
|
|
2116
|
-
type: "boolean",
|
|
2117
|
-
default: false
|
|
2118
|
-
},
|
|
2119
|
-
docs: {
|
|
2120
|
-
type: "boolean",
|
|
2121
|
-
default: false
|
|
2122
|
-
}
|
|
2123
|
-
};
|
|
2124
|
-
const preCommandCheck = async workspaceLocation => {
|
|
2125
|
-
var _repositoryPackage$de, _repositoryPackage$de2;
|
|
2126
|
-
const executedLocalPackager = __filename$1.startsWith(workspaceLocation.path);
|
|
2127
|
-
const repositoryPackage = readWorkspaceNpmManifest(workspaceLocation);
|
|
2128
|
-
if (repositoryPackage !== null && repositoryPackage !== void 0 && (_repositoryPackage$de = repositoryPackage.dependencies) !== null && _repositoryPackage$de !== void 0 && _repositoryPackage$de["@intelligentgraphics/ig.gfx.packager"] || repositoryPackage !== null && repositoryPackage !== void 0 && (_repositoryPackage$de2 = repositoryPackage.devDependencies) !== null && _repositoryPackage$de2 !== void 0 && _repositoryPackage$de2["@intelligentgraphics/ig.gfx.packager"]) {
|
|
2129
|
-
const parts = ["Detected locally installed ig.gfx.packager."];
|
|
2130
|
-
if (executedLocalPackager) {
|
|
2131
|
-
parts.push('Run "npm install -g @intelligentgraphics/ig.gfx.packager@latest" to install the global version, if it is not yet installed.');
|
|
2132
|
-
}
|
|
2133
|
-
parts.push('Run "npm uninstall @intelligentgraphics/ig.gfx.packager" to remove the local version.');
|
|
2134
|
-
console.error(parts.join("\n"));
|
|
2135
|
-
process.exit(1);
|
|
2136
|
-
}
|
|
2137
|
-
if (executedLocalPackager) {
|
|
2138
|
-
console.error(`Detected locally installed ig.gfx.packager.
|
|
2139
|
-
Run "npm install -g @intelligentgraphics/ig.gfx.packager@latest" to install the global version, if it is not yet installed.
|
|
2140
|
-
Run "npm install" to get rid of the local packager version.`);
|
|
2141
|
-
process.exit(1);
|
|
2142
|
-
}
|
|
2143
|
-
const notifier = updateNotifier({
|
|
2144
|
-
pkg: pjson,
|
|
2145
|
-
shouldNotifyInNpmScript: true,
|
|
2146
|
-
updateCheckInterval: 1000 * 60
|
|
2147
|
-
});
|
|
2148
|
-
notifier.notify({
|
|
2149
|
-
isGlobal: true,
|
|
2150
|
-
defer: true
|
|
2151
|
-
});
|
|
2152
|
-
if (repositoryPackage === undefined) {
|
|
2153
|
-
throw new Error("Could not load package.json file in current directory");
|
|
2154
|
-
}
|
|
2155
|
-
repositoryPackage.scripts ??= {};
|
|
2156
|
-
repositoryPackage.scripts.postinstall = "packager postinstall";
|
|
2157
|
-
writeWorkspaceNpmManifest(workspaceLocation, repositoryPackage);
|
|
2158
|
-
};
|
|
2159
|
-
const yargsInstance = yargs(process.argv.slice(2));
|
|
2160
|
-
const resolvePackagesWithTypescriptFromMaybePatterns = (args = [], workspace) => {
|
|
2161
|
-
const folders = new Map();
|
|
2162
|
-
for (const arg of args) {
|
|
2163
|
-
glob.sync(arg, {
|
|
2164
|
-
cwd: workspace.path,
|
|
2165
|
-
absolute: true
|
|
2166
|
-
}).forEach(folder => {
|
|
2167
|
-
try {
|
|
2168
|
-
const location = detectPackage(workspace, folder);
|
|
2169
|
-
if (getPackageTypescriptFiles(location).length === 0) {
|
|
2170
|
-
return;
|
|
2171
|
-
}
|
|
2172
|
-
folders.set(folder, location);
|
|
2173
|
-
} catch (err) {}
|
|
2174
|
-
});
|
|
2175
|
-
}
|
|
2176
|
-
return Array.from(folders.values());
|
|
2177
|
-
};
|
|
2178
|
-
yargsInstance.command("build [directories...]", "Builds the specified directories", argv => argv.options(buildOptions), async ({
|
|
2179
|
-
directories = [],
|
|
2180
|
-
...options
|
|
2181
|
-
}) => {
|
|
2182
|
-
const workspace = detectWorkspace(options.cwd);
|
|
2183
|
-
const folders = resolvePackagesWithTypescriptFromMaybePatterns(directories, workspace);
|
|
2184
|
-
await preCommandCheck(workspace);
|
|
2185
|
-
if (folders.length === 0) {
|
|
2186
|
-
return console.log("No build targets found. Please check wether a folder with the provided name exists and wether it has _Package.json.");
|
|
2187
|
-
}
|
|
2188
|
-
const {
|
|
2189
|
-
buildFolders
|
|
2190
|
-
} = await import('./index-ac2cd050.js').then(function (n) { return n.i; });
|
|
2191
|
-
await buildFolders({
|
|
2192
|
-
...options,
|
|
2193
|
-
packages: folders,
|
|
2194
|
-
workspace
|
|
2195
|
-
}).catch(captureError);
|
|
2196
|
-
});
|
|
2197
|
-
yargsInstance.command("publish [directory]", "Publishes the specified directory", argv => argv.options({
|
|
2198
|
-
...buildOptions,
|
|
2199
|
-
noUpload: {
|
|
2200
|
-
type: "boolean",
|
|
2201
|
-
default: false,
|
|
2202
|
-
description: "Only zip built files and do not upload them"
|
|
2203
|
-
},
|
|
2204
|
-
domain: {
|
|
2205
|
-
type: "string",
|
|
2206
|
-
description: "Overwrite the publish domain. Defaults to the one in the _Package.json"
|
|
2207
|
-
},
|
|
2208
|
-
subdomain: {
|
|
2209
|
-
type: "string",
|
|
2210
|
-
description: "Overwrite the publish subdomain. Defaults to the one in the _Package.json"
|
|
2211
|
-
},
|
|
2212
|
-
newVersion: {
|
|
2213
|
-
type: "string",
|
|
2214
|
-
description: "The name of the new version",
|
|
2215
|
-
default: process.env.VERSION,
|
|
2216
|
-
required: true
|
|
2217
|
-
},
|
|
2218
|
-
address: {
|
|
2219
|
-
type: "string",
|
|
2220
|
-
description: "Address",
|
|
2221
|
-
default: "localhost"
|
|
2222
|
-
},
|
|
2223
|
-
service: {
|
|
2224
|
-
type: "string",
|
|
2225
|
-
description: "IG.Asset.Server url",
|
|
2226
|
-
default: process.env.IG_GFX_ASSET_SERVICE,
|
|
2227
|
-
required: true
|
|
2228
|
-
},
|
|
2229
|
-
user: {
|
|
2230
|
-
type: "string",
|
|
2231
|
-
description: "User",
|
|
2232
|
-
default: process.env.IG_GFX_USER
|
|
2233
|
-
},
|
|
2234
|
-
password: {
|
|
2235
|
-
type: "string",
|
|
2236
|
-
description: "Password",
|
|
2237
|
-
default: process.env.IG_GFX_PWD
|
|
2238
|
-
},
|
|
2239
|
-
docs: {
|
|
2240
|
-
type: "boolean",
|
|
2241
|
-
default: false,
|
|
2242
|
-
description: "Generate typedoc documentation"
|
|
2243
|
-
},
|
|
2244
|
-
pushOnly: {
|
|
2245
|
-
type: "boolean",
|
|
2246
|
-
default: false,
|
|
2247
|
-
description: "Try to upload an existing zip file without building and validating the version number"
|
|
2248
|
-
},
|
|
2249
|
-
license: {
|
|
2250
|
-
type: "string",
|
|
2251
|
-
description: "Path to a license file",
|
|
2252
|
-
default: process.env.IG_GFX_LICENSE
|
|
2253
|
-
},
|
|
2254
|
-
skipDependencies: {
|
|
2255
|
-
type: "boolean",
|
|
2256
|
-
default: false,
|
|
2257
|
-
description: "Skip dependency checks"
|
|
2258
|
-
}
|
|
2259
|
-
}), async ({
|
|
2260
|
-
directory,
|
|
2261
|
-
user,
|
|
2262
|
-
password,
|
|
2263
|
-
service,
|
|
2264
|
-
license,
|
|
2265
|
-
...options
|
|
2266
|
-
}) => {
|
|
2267
|
-
const workspace = detectWorkspace(options.cwd);
|
|
2268
|
-
const folder = detectPackage(workspace, directory);
|
|
2269
|
-
await preCommandCheck(workspace);
|
|
2270
|
-
if (!options.noUpload) {
|
|
2271
|
-
if (!service) {
|
|
2272
|
-
captureError(new Error('The IG.Asset.Server url has to either be provided using the option --service or through the "IG_GFX_ASSET_SERVICE" environment variable'));
|
|
2273
|
-
return;
|
|
2274
|
-
}
|
|
2275
|
-
if (!license && (!user || !password)) {
|
|
2276
|
-
captureError(new Error(`Expected authentication to be provided through either of the following methods:
|
|
2277
|
-
- as a path to a license file using the --license option or the IG_GFX_LICENSE environment variable
|
|
2278
|
-
- as a username and password using the --user and --password options, or the IG_GFX_USER and IG_GFX_PWD environment variables`));
|
|
2279
|
-
return;
|
|
2280
|
-
}
|
|
2281
|
-
if (license && !license.endsWith(".iglic")) {
|
|
2282
|
-
captureError(new Error(`Expected the license path to end with the extension .iglic. Received the path "${license}". You may need to reload your environment variables by restarting the program you're using to execute the packager.`));
|
|
2283
|
-
return;
|
|
2284
|
-
}
|
|
2285
|
-
}
|
|
2286
|
-
let authentication;
|
|
2287
|
-
if (license) {
|
|
2288
|
-
const fullLicensePath = path$1.resolve(process.cwd(), license);
|
|
2289
|
-
try {
|
|
2290
|
-
const content = fs$1.readFileSync(fullLicensePath);
|
|
2291
|
-
authentication = {
|
|
2292
|
-
type: "license",
|
|
2293
|
-
license: content.toString("base64")
|
|
2294
|
-
};
|
|
2295
|
-
} catch (err) {
|
|
2296
|
-
if ((err === null || err === void 0 ? void 0 : err.code) === "ENOENT") {
|
|
2297
|
-
captureError(new Error(`Expected to find a license file at path: ${fullLicensePath}`));
|
|
2298
|
-
return;
|
|
2299
|
-
}
|
|
2300
|
-
captureError(new Error(`Failed to read license file at path: ${fullLicensePath}`));
|
|
2301
|
-
return;
|
|
2302
|
-
}
|
|
2303
|
-
} else if (user && password) {
|
|
2304
|
-
console.log(`Detected usage of username and password authentication. Please migrate to the new license file based authentication.`);
|
|
2305
|
-
authentication = {
|
|
2306
|
-
type: "credentials",
|
|
2307
|
-
username: user,
|
|
2308
|
-
password
|
|
2309
|
-
};
|
|
2310
|
-
}
|
|
2311
|
-
const {
|
|
2312
|
-
releaseFolder
|
|
2313
|
-
} = await import('./index-a48c5d0a.js');
|
|
2314
|
-
const prompter = createDefaultPrompter();
|
|
2315
|
-
const fullOptions = {
|
|
2316
|
-
...options,
|
|
2317
|
-
authentication,
|
|
2318
|
-
service: service,
|
|
2319
|
-
directory: folder,
|
|
2320
|
-
banner: true,
|
|
2321
|
-
prompter,
|
|
2322
|
-
newVersion: options.newVersion,
|
|
2323
|
-
workspace
|
|
2324
|
-
};
|
|
2325
|
-
await releaseFolder(fullOptions).catch(captureError);
|
|
2326
|
-
});
|
|
2327
|
-
yargsInstance.command("testConnection [directory]", "Tests connection to asset service", argv => argv.options({
|
|
2328
|
-
domain: {
|
|
2329
|
-
type: "string",
|
|
2330
|
-
description: "Overwrite the publish domain. Defaults to the one in the _Package.json"
|
|
2331
|
-
},
|
|
2332
|
-
subdomain: {
|
|
2333
|
-
type: "string",
|
|
2334
|
-
description: "Overwrite the publish subdomain. Defaults to the one in the _Package.json"
|
|
2335
|
-
},
|
|
2336
|
-
address: {
|
|
2337
|
-
type: "string",
|
|
2338
|
-
description: "Address",
|
|
2339
|
-
default: "localhost"
|
|
2340
|
-
},
|
|
2341
|
-
service: {
|
|
2342
|
-
type: "string",
|
|
2343
|
-
description: "IG.Asset.Server url",
|
|
2344
|
-
default: process.env.IG_GFX_ASSET_SERVICE,
|
|
2345
|
-
required: true
|
|
2346
|
-
},
|
|
2347
|
-
user: {
|
|
2348
|
-
type: "string",
|
|
2349
|
-
description: "User",
|
|
2350
|
-
default: process.env.IG_GFX_USER
|
|
2351
|
-
},
|
|
2352
|
-
password: {
|
|
2353
|
-
type: "string",
|
|
2354
|
-
description: "Password",
|
|
2355
|
-
default: process.env.IG_GFX_PWD
|
|
2356
|
-
},
|
|
2357
|
-
license: {
|
|
2358
|
-
type: "string",
|
|
2359
|
-
description: "Path to a license file",
|
|
2360
|
-
default: process.env.IG_GFX_LICENSE
|
|
2361
|
-
}
|
|
2362
|
-
}), async ({
|
|
2363
|
-
user,
|
|
2364
|
-
password,
|
|
2365
|
-
service,
|
|
2366
|
-
license,
|
|
2367
|
-
subdomain,
|
|
2368
|
-
domain,
|
|
2369
|
-
address,
|
|
2370
|
-
directory
|
|
2371
|
-
}) => {
|
|
2372
|
-
if (!service) {
|
|
2373
|
-
captureError(new Error('The IG.Asset.Server url has to either be provided using the option --service or through the "IG_GFX_ASSET_SERVICE" environment variable'));
|
|
2374
|
-
return;
|
|
2375
|
-
}
|
|
2376
|
-
if (!license && (!user || !password)) {
|
|
2377
|
-
captureError(new Error(`Expected authentication to be provided through either of the following methods:
|
|
2378
|
-
- as a path to a license file using the --license option or the IG_GFX_LICENSE environment variable
|
|
2379
|
-
- as a username and password using the --user and --password options, or the IG_GFX_USER and IG_GFX_PWD environment variables`));
|
|
2380
|
-
return;
|
|
2381
|
-
}
|
|
2382
|
-
if (license && !license.endsWith(".iglic")) {
|
|
2383
|
-
captureError(new Error(`Expected the license path to end with the extension .iglic. Received the path "${license}". You may need to reload your environment variables by restarting the program you're using to execute the packager.`));
|
|
2384
|
-
return;
|
|
2385
|
-
}
|
|
2386
|
-
let authentication;
|
|
2387
|
-
if (license) {
|
|
2388
|
-
const fullLicensePath = path$1.resolve(process.cwd(), license);
|
|
2389
|
-
try {
|
|
2390
|
-
const content = fs$1.readFileSync(fullLicensePath);
|
|
2391
|
-
authentication = {
|
|
2392
|
-
type: "license",
|
|
2393
|
-
license: content.toString("base64")
|
|
2394
|
-
};
|
|
2395
|
-
} catch (err) {
|
|
2396
|
-
if ((err === null || err === void 0 ? void 0 : err.code) === "ENOENT") {
|
|
2397
|
-
captureError(new Error(`Expected to find a license file at path: ${fullLicensePath}`));
|
|
2398
|
-
return;
|
|
2399
|
-
}
|
|
2400
|
-
captureError(new Error(`Failed to read license file at path: ${fullLicensePath}`));
|
|
2401
|
-
return;
|
|
2402
|
-
}
|
|
2403
|
-
} else if (user && password) {
|
|
2404
|
-
console.log(`Detected usage of username and password authentication. Please migrate to the new license file based authentication.`);
|
|
2405
|
-
authentication = {
|
|
2406
|
-
type: "credentials",
|
|
2407
|
-
username: user,
|
|
2408
|
-
password
|
|
2409
|
-
};
|
|
2410
|
-
}
|
|
2411
|
-
if (authentication === undefined) {
|
|
2412
|
-
throw new Error(`Expected authentication to be available`);
|
|
2413
|
-
}
|
|
2414
|
-
if (typeof directory === "string") {
|
|
2415
|
-
const workspace = detectWorkspace(process.cwd());
|
|
2416
|
-
const folder = detectPackage(workspace, directory);
|
|
2417
|
-
const manifest = readPackageCreatorManifest(folder);
|
|
2418
|
-
const parsedName = parseCreatorPackageName(manifest);
|
|
2419
|
-
if (domain === undefined) {
|
|
2420
|
-
domain = parsedName.domain;
|
|
2421
|
-
}
|
|
2422
|
-
if (subdomain === undefined) {
|
|
2423
|
-
subdomain = parsedName.subdomain;
|
|
2424
|
-
}
|
|
2425
|
-
}
|
|
2426
|
-
if (domain === undefined || subdomain === undefined) {
|
|
2427
|
-
throw new Error(`Expected either domain and subdomain to be provided through options or to be executed for a specific package directory`);
|
|
2428
|
-
}
|
|
2429
|
-
const session = await startSession({
|
|
2430
|
-
url: service,
|
|
2431
|
-
address,
|
|
2432
|
-
domain,
|
|
2433
|
-
subDomain: subdomain,
|
|
2434
|
-
authentication
|
|
2435
|
-
});
|
|
2436
|
-
await closeSession(session);
|
|
2437
|
-
console.log(`Asset service session successfully started and closed`);
|
|
2438
|
-
});
|
|
2439
|
-
yargsInstance.command({
|
|
2440
|
-
command: "generateIndex [directory]",
|
|
2441
|
-
builder: argv => argv.option("ignore", {
|
|
2442
|
-
type: "array",
|
|
2443
|
-
default: [],
|
|
2444
|
-
description: "Files to ignore while generating index"
|
|
2445
|
-
}),
|
|
2446
|
-
handler: async ({
|
|
2447
|
-
directory,
|
|
2448
|
-
ignore
|
|
2449
|
-
}) => {
|
|
2450
|
-
const workspace = detectWorkspace(process.cwd());
|
|
2451
|
-
await preCommandCheck(workspace);
|
|
2452
|
-
const {
|
|
2453
|
-
generateIndex
|
|
2454
|
-
} = await import('./generateIndex-59993f0f.js');
|
|
2455
|
-
const location = detectPackage(workspace, directory);
|
|
2456
|
-
generateIndex({
|
|
2457
|
-
location,
|
|
2458
|
-
ignore
|
|
2459
|
-
});
|
|
2460
|
-
},
|
|
2461
|
-
describe: "Generates an index file for a package based on typescript types"
|
|
2462
|
-
});
|
|
2463
|
-
yargsInstance.command({
|
|
2464
|
-
command: "generateParameterType [directory] [name]",
|
|
2465
|
-
handler: async ({
|
|
2466
|
-
directory,
|
|
2467
|
-
name
|
|
2468
|
-
}) => {
|
|
2469
|
-
const workspace = detectWorkspace(process.cwd());
|
|
2470
|
-
await preCommandCheck(workspace);
|
|
2471
|
-
const {
|
|
2472
|
-
generateParameterType
|
|
2473
|
-
} = await import('./generateParameterType-d3ab08fd.js');
|
|
2474
|
-
const location = detectPackage(workspace, directory);
|
|
2475
|
-
generateParameterType({
|
|
2476
|
-
location,
|
|
2477
|
-
name
|
|
2478
|
-
});
|
|
2479
|
-
},
|
|
2480
|
-
describe: "Generates a parameter type for an interactor or evaluator"
|
|
2481
|
-
});
|
|
2482
|
-
yargsInstance.command({
|
|
2483
|
-
command: "postinstall",
|
|
2484
|
-
builder: argv => argv,
|
|
2485
|
-
handler: async () => {
|
|
2486
|
-
const {
|
|
2487
|
-
executePostInstall
|
|
2488
|
-
} = await import('./postinstall-9990fb31.js');
|
|
2489
|
-
executePostInstall(detectWorkspace(process.cwd()));
|
|
2490
|
-
},
|
|
2491
|
-
describe: "Runs postinstall tasks"
|
|
2492
|
-
});
|
|
2493
|
-
yargsInstance.command({
|
|
2494
|
-
command: "publishNpm [directory]",
|
|
2495
|
-
builder: argv => argv.options({
|
|
2496
|
-
newVersion: {
|
|
2497
|
-
type: "string",
|
|
2498
|
-
description: "Name of the new version",
|
|
2499
|
-
default: process.env.VERSION,
|
|
2500
|
-
required: true
|
|
2501
|
-
},
|
|
2502
|
-
dryRun: {
|
|
2503
|
-
type: "boolean"
|
|
2504
|
-
}
|
|
2505
|
-
}),
|
|
2506
|
-
handler: async ({
|
|
2507
|
-
directory,
|
|
2508
|
-
newVersion,
|
|
2509
|
-
dryRun
|
|
2510
|
-
}) => {
|
|
2511
|
-
const workspace = detectWorkspace(process.cwd());
|
|
2512
|
-
const {
|
|
2513
|
-
publishToNpm
|
|
2514
|
-
} = await import('./publishNpm-74a96626.js');
|
|
2515
|
-
await publishToNpm({
|
|
2516
|
-
workspace,
|
|
2517
|
-
location: detectPackage(workspace, directory),
|
|
2518
|
-
version: newVersion,
|
|
2519
|
-
dryRun
|
|
2520
|
-
}).catch(captureError);
|
|
2521
|
-
},
|
|
2522
|
-
describe: "Publishes the package to npm"
|
|
2523
|
-
});
|
|
2524
|
-
yargsInstance.demandCommand().pkgConf("packager").showHelpOnFail(false).version(pjson.version).argv;
|
|
2525
|
-
|
|
2526
|
-
var cli = /*#__PURE__*/Object.freeze({
|
|
2527
|
-
__proto__: null
|
|
2528
|
-
});
|
|
2529
|
-
|
|
2530
|
-
export { INDEX_FILE as I, PACKAGE_FILE as P, readPackageAnimationList as a, readPackageCreatorIndex as b, readWorkspaceNpmManifest as c, getPackageReleasesDirectory as d, getExistingPackages as e, closeSession as f, getWorkspaceOutputPath as g, getPackageTypescriptFiles as h, isErrorENOENT as i, writePackageCreatorIndex as j, getCreatorIndexParameterPrimaryJSType as k, getWorkspaceLibPath as l, readNpmManifest as m, stripUtf8Bom as n, readPackageNpmManifest as o, parseCreatorPackageName as p, writePackageNpmManifest as q, readPackageCreatorManifest as r, startSession as s, iterateWorkspacePackages as t, uploadPackage as u, cli as v, writePackageCreatorManifest as w };
|
|
2531
|
-
//# sourceMappingURL=cli-17d957b0.js.map
|