vis-dev-utils 3.0.2 → 3.0.3
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/babel-register/index.js +7 -7
- package/babel-register/index.js.map +1 -1
- package/bin/ci-utils.js +7 -7
- package/bin/ci-utils.js.map +1 -1
- package/bin/generate-examples-index.js +155 -155
- package/bin/generate-examples-index.js.map +1 -1
- package/bin/test-e2e-interop.js +87 -87
- package/bin/test-e2e-interop.js.map +1 -1
- package/dist/vis-dev-utils.cjs.js +62 -62
- package/dist/vis-dev-utils.cjs.js.map +1 -1
- package/dist/vis-dev-utils.esm.js +2 -2
- package/dist/vis-dev-utils.esm.js.map +1 -1
- package/package.json +9 -9
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Development utilities for the Vis family projects.
|
|
6
6
|
*
|
|
7
|
-
* @version 3.0.
|
|
8
|
-
* @date 2022-03-
|
|
7
|
+
* @version 3.0.3
|
|
8
|
+
* @date 2022-03-10T13:40:06.338Z
|
|
9
9
|
*
|
|
10
10
|
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
11
11
|
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
@@ -121,7 +121,7 @@ var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefaultLegacy(_sliceI
|
|
|
121
121
|
var _trimInstanceProperty__default = /*#__PURE__*/_interopDefaultLegacy(_trimInstanceProperty);
|
|
122
122
|
var _findInstanceProperty__default = /*#__PURE__*/_interopDefaultLegacy(_findInstanceProperty);
|
|
123
123
|
|
|
124
|
-
var BABEL_IGNORE_RE = _Object$freeze__default[
|
|
124
|
+
var BABEL_IGNORE_RE = _Object$freeze__default["default"](/[\\/]node_modules[\\/](?!.*[\\/]esnext[\\/])/);
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
127
|
* Take a string and return a doc block comment.
|
|
@@ -135,11 +135,11 @@ var BABEL_IGNORE_RE = _Object$freeze__default['default'](/[\\/]node_modules[\\/]
|
|
|
135
135
|
function textToComment(string) {
|
|
136
136
|
var _context, _context2;
|
|
137
137
|
|
|
138
|
-
if (_includesInstanceProperty__default[
|
|
138
|
+
if (_includesInstanceProperty__default["default"](string).call(string, "*/")) {
|
|
139
139
|
throw new Error("Don't include comments in the input string. It will be converted automatically.");
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
return "/**\n" + _mapInstanceProperty__default[
|
|
142
|
+
return "/**\n" + _mapInstanceProperty__default["default"](_context = _mapInstanceProperty__default["default"](_context2 = string // Remove empty lines from the start.
|
|
143
143
|
.replace(/^[\n\r]*/, "") // Remove empty lines from the end.
|
|
144
144
|
.replace(/[\n\r\s]*$/, "") // Process each line on it's own from now on.
|
|
145
145
|
.split("\n") // Prefix each line with an asterisk.
|
|
@@ -162,7 +162,7 @@ var buildHeader = function buildHeader(_ref) {
|
|
|
162
162
|
homepage = _ref.homepage,
|
|
163
163
|
name = _ref.name,
|
|
164
164
|
version = _ref.version;
|
|
165
|
-
return textToComment(_concatInstanceProperty__default[
|
|
165
|
+
return textToComment(_concatInstanceProperty__default["default"](_context3 = _concatInstanceProperty__default["default"](_context4 = _concatInstanceProperty__default["default"](_context5 = _concatInstanceProperty__default["default"](_context6 = _concatInstanceProperty__default["default"](_context7 = "\n".concat(name, "\n")).call(_context7, homepage, "\n\n")).call(_context6, description, "\n\n@version ")).call(_context5, version, "\n@date ")).call(_context4, date, "\n\n@copyright (c) 2011-2017 Almende B.V, http://almende.com\n@copyright (c) 2017-2019 visjs contributors, https://github.com/visjs\n\n@license\nvis.js is dual licensed under both\n\n 1. The Apache 2.0 License\n http://www.apache.org/licenses/LICENSE-2.0\n\n and\n\n 2. The MIT License\n http://opensource.org/licenses/MIT\n\nvis.js may be distributed under either license.\n\n")).call(_context3, customText, "\n"));
|
|
166
166
|
};
|
|
167
167
|
|
|
168
168
|
var defaultDate = new Date().toISOString();
|
|
@@ -210,15 +210,15 @@ var _excluded = ["dependencies", "devDependencies", "peerDependencies"];
|
|
|
210
210
|
|
|
211
211
|
var _context, _context2;
|
|
212
212
|
|
|
213
|
-
function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
213
|
+
function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
214
214
|
|
|
215
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var _context22, _context23; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default[
|
|
216
|
-
chai.config.truncateThreshold = _Number$MAX_SAFE_INTEGER__default[
|
|
217
|
-
chai.use(chaiFs__default[
|
|
215
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var _context22, _context23; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context22 = ownKeys$1(Object(source), !0)).call(_context22, function (key) { _defineProperty__default["default"](target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context23 = ownKeys$1(Object(source))).call(_context23, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
216
|
+
chai.config.truncateThreshold = _Number$MAX_SAFE_INTEGER__default["default"];
|
|
217
|
+
chai.use(chaiFs__default["default"]);
|
|
218
218
|
|
|
219
|
-
var VIS_DEBUG = _includesInstanceProperty__default[
|
|
219
|
+
var VIS_DEBUG = _includesInstanceProperty__default["default"](_context = ["1", "true", "y", "yes"]).call(_context, process.env["VIS_DEBUG"] || "false");
|
|
220
220
|
|
|
221
|
-
var VIS_TEST = _includesInstanceProperty__default[
|
|
221
|
+
var VIS_TEST = _includesInstanceProperty__default["default"](_context2 = ["1", "true", "y", "yes"]).call(_context2, process.env["VIS_TEST"] || "false");
|
|
222
222
|
/**
|
|
223
223
|
* Simple glob with workaround for non-posix paths.
|
|
224
224
|
*
|
|
@@ -245,9 +245,9 @@ var dependenciesWithVisExportStructure = ["vis-data", "vis-graph3d", "vis-networ
|
|
|
245
245
|
*/
|
|
246
246
|
|
|
247
247
|
function processDependencies(deps) {
|
|
248
|
-
var depNames = _Array$isArray__default[
|
|
249
|
-
return _flatMapInstanceProperty__default[
|
|
250
|
-
return _includesInstanceProperty__default[
|
|
248
|
+
var depNames = _Array$isArray__default["default"](deps) ? deps : _Object$keys__default["default"](deps);
|
|
249
|
+
return _flatMapInstanceProperty__default["default"](depNames).call(depNames, function (key) {
|
|
250
|
+
return _includesInstanceProperty__default["default"](dependenciesWithVisExportStructure).call(dependenciesWithVisExportStructure, key) ? [key + "/esnext"] : [key];
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
253
|
/**
|
|
@@ -263,14 +263,14 @@ function processDependencies(deps) {
|
|
|
263
263
|
function processGlobals(globals) {
|
|
264
264
|
var _context3;
|
|
265
265
|
|
|
266
|
-
return _reduceInstanceProperty__default[
|
|
267
|
-
var _ref2 = _slicedToArray__default[
|
|
266
|
+
return _reduceInstanceProperty__default["default"](_context3 = _Object$entries__default["default"](globals)).call(_context3, function (acc, _ref) {
|
|
267
|
+
var _ref2 = _slicedToArray__default["default"](_ref, 2),
|
|
268
268
|
key = _ref2[0],
|
|
269
269
|
value = _ref2[1];
|
|
270
270
|
|
|
271
|
-
acc[_includesInstanceProperty__default[
|
|
271
|
+
acc[_includesInstanceProperty__default["default"](dependenciesWithVisExportStructure).call(dependenciesWithVisExportStructure, key) ? key + "/esnext" : key] = value;
|
|
272
272
|
return acc;
|
|
273
|
-
}, _Object$create__default[
|
|
273
|
+
}, _Object$create__default["default"](null));
|
|
274
274
|
}
|
|
275
275
|
/**
|
|
276
276
|
* @param path
|
|
@@ -278,7 +278,7 @@ function processGlobals(globals) {
|
|
|
278
278
|
|
|
279
279
|
|
|
280
280
|
function isTS(path) {
|
|
281
|
-
return _endsWithInstanceProperty__default[
|
|
281
|
+
return _endsWithInstanceProperty__default["default"](path).call(path, ".ts");
|
|
282
282
|
}
|
|
283
283
|
/*
|
|
284
284
|
* Make sure that Chai doesn't throw and therefore stop execution on failed
|
|
@@ -311,7 +311,7 @@ function getPaths(buildVariant, moduleFormat) {
|
|
|
311
311
|
function getPath(lib) {
|
|
312
312
|
var _context4, _context5, _context6;
|
|
313
313
|
|
|
314
|
-
return _defineProperty__default[
|
|
314
|
+
return _defineProperty__default["default"]({}, "vis-".concat(lib, "/esnext"), _concatInstanceProperty__default["default"](_context4 = _concatInstanceProperty__default["default"](_context5 = _concatInstanceProperty__default["default"](_context6 = "vis-".concat(lib, "/")).call(_context6, buildVariant, "/")).call(_context5, moduleFormat, "/vis-")).call(_context4, lib, ".js"));
|
|
315
315
|
}
|
|
316
316
|
|
|
317
317
|
return _objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({}, getPath("charts")), getPath("data")), getPath("graph3d")), getPath("network")), getPath("timeline")), getPath("util")), getPath("uuid"));
|
|
@@ -330,10 +330,10 @@ function scopeCopyTarget() {
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
return function (target) {
|
|
333
|
-
var dest = _Array$isArray__default[
|
|
333
|
+
var dest = _Array$isArray__default["default"](target.dest) ? target.dest : [target.dest];
|
|
334
334
|
|
|
335
|
-
var bundleDest = _flatMapInstanceProperty__default[
|
|
336
|
-
return _mapInstanceProperty__default[
|
|
335
|
+
var bundleDest = _flatMapInstanceProperty__default["default"](dest).call(dest, function (path$1) {
|
|
336
|
+
return _mapInstanceProperty__default["default"](dirs).call(dirs, function (dir) {
|
|
337
337
|
return path.join(dir, path$1);
|
|
338
338
|
});
|
|
339
339
|
});
|
|
@@ -363,31 +363,31 @@ var generateRollupPluginArray = function generateRollupPluginArray(libraryFilena
|
|
|
363
363
|
_ref4$typescript = _ref4.typescript,
|
|
364
364
|
typescript = _ref4$typescript === void 0 ? false : _ref4$typescript;
|
|
365
365
|
|
|
366
|
-
var fullLibraryFilename = _concatInstanceProperty__default[
|
|
366
|
+
var fullLibraryFilename = _concatInstanceProperty__default["default"](_context7 = "".concat(libraryFilename)).call(_context7, minimize ? ".min" : "");
|
|
367
367
|
|
|
368
368
|
var bundleDir = bundleType;
|
|
369
369
|
|
|
370
|
-
var bundleVariantDirs = _mapInstanceProperty__default[
|
|
370
|
+
var bundleVariantDirs = _mapInstanceProperty__default["default"](_context8 = ["esm", "umd"]).call(_context8, function (variant) {
|
|
371
371
|
return path.join(bundleDir, variant);
|
|
372
372
|
});
|
|
373
373
|
|
|
374
|
-
return _concatInstanceProperty__default[
|
|
374
|
+
return _concatInstanceProperty__default["default"](_context9 = []).call(_context9, _toConsumableArray__default["default"](strip ? [// This should be first because it removes code from source files.
|
|
375
375
|
// It's much easier to follow if the removal happens before any
|
|
376
376
|
// transformations.
|
|
377
|
-
stripCodePlugin__default[
|
|
377
|
+
stripCodePlugin__default["default"]({
|
|
378
378
|
start_comment: "develblock:start",
|
|
379
379
|
end_comment: "develblock:end"
|
|
380
380
|
})] : [// Remove the comments marking devel blocks as they can cause problems
|
|
381
381
|
// later on because transpilation shuffles things around which may
|
|
382
382
|
// lead to all kinds of issues including syntax errors.
|
|
383
|
-
stripCodePlugin__default[
|
|
383
|
+
stripCodePlugin__default["default"]({
|
|
384
384
|
pattern: /[\t ]*\/\* ?develblock:(start|end) ?\*\//g
|
|
385
|
-
})]), [analyzerPlugin__default[
|
|
385
|
+
})]), [analyzerPlugin__default["default"](VIS_DEBUG ? undefined : {
|
|
386
386
|
limit: 10,
|
|
387
387
|
summaryOnly: true
|
|
388
|
-
}), copyPlugin__default[
|
|
388
|
+
}), copyPlugin__default["default"]({
|
|
389
389
|
verbose: VIS_DEBUG,
|
|
390
|
-
targets: _concatInstanceProperty__default[
|
|
390
|
+
targets: _concatInstanceProperty__default["default"](_context10 = [// JavaScript
|
|
391
391
|
{
|
|
392
392
|
src: path.resolve(__dirname, "assets/bundle-root.js"),
|
|
393
393
|
dest: bundleDir,
|
|
@@ -418,29 +418,29 @@ var generateRollupPluginArray = function generateRollupPluginArray(libraryFilena
|
|
|
418
418
|
transform: function transform(content) {
|
|
419
419
|
return content.toString().replace("{{bundle-type}}", bundleType);
|
|
420
420
|
}
|
|
421
|
-
}]).call(_context10, _toConsumableArray__default[
|
|
422
|
-
}), nodeResolvePlugin__default[
|
|
421
|
+
}]).call(_context10, _toConsumableArray__default["default"](_mapInstanceProperty__default["default"](copyTargetsBundle).call(copyTargetsBundle, scopeCopyTarget(bundleDir))), _toConsumableArray__default["default"](_mapInstanceProperty__default["default"](copyTargetsVariant).call(copyTargetsVariant, scopeCopyTarget.apply(void 0, _toConsumableArray__default["default"](bundleVariantDirs)))))
|
|
422
|
+
}), nodeResolvePlugin__default["default"]({
|
|
423
423
|
browser: true,
|
|
424
424
|
extensions: [".js", ".json", ".ts"],
|
|
425
425
|
mainFields: ["jsnext", "module", "main"],
|
|
426
426
|
preferBuiltins: false
|
|
427
|
-
})], _toConsumableArray__default[
|
|
427
|
+
})], _toConsumableArray__default["default"](typescript ? [typescriptPlugin__default["default"]({
|
|
428
428
|
tsconfig: tsconfig
|
|
429
|
-
})] : []), [commonjsPlugin__default[
|
|
429
|
+
})] : []), [commonjsPlugin__default["default"](), postcssPlugin__default["default"]({
|
|
430
430
|
extract: !injectCSS && "styles/".concat(fullLibraryFilename, ".css"),
|
|
431
431
|
inject: injectCSS,
|
|
432
432
|
minimize: minimize,
|
|
433
433
|
// Prevent the sourcemaps from being injected into JS files.
|
|
434
434
|
sourceMap: !injectCSS,
|
|
435
|
-
plugins: [postcssAssetsPlugin__default[
|
|
435
|
+
plugins: [postcssAssetsPlugin__default["default"]({
|
|
436
436
|
loadPaths: [assets]
|
|
437
437
|
})]
|
|
438
|
-
}), jsonPlugin__default[
|
|
438
|
+
}), jsonPlugin__default["default"](), rollupPluginString.string({
|
|
439
439
|
include: "**/*.txt"
|
|
440
|
-
})], _toConsumableArray__default[
|
|
440
|
+
})], _toConsumableArray__default["default"](transpile ? [babelPlugin__default["default"]({
|
|
441
441
|
extensions: [".js", ".ts"],
|
|
442
442
|
runtimeHelpers: true
|
|
443
|
-
})] : []), _toConsumableArray__default[
|
|
443
|
+
})] : []), _toConsumableArray__default["default"](minimize ? [rollupPluginTerser.terser({
|
|
444
444
|
format: {
|
|
445
445
|
comments: "some"
|
|
446
446
|
}
|
|
@@ -513,7 +513,7 @@ function generateRollupConfiguration(options) {
|
|
|
513
513
|
devDependencies = _ref5$packageJSON$dev === void 0 ? {} : _ref5$packageJSON$dev,
|
|
514
514
|
_ref5$packageJSON$pee = _ref5$packageJSON.peerDependencies,
|
|
515
515
|
peerDependencies = _ref5$packageJSON$pee === void 0 ? {} : _ref5$packageJSON$pee,
|
|
516
|
-
packageJSONRest = _objectWithoutProperties__default[
|
|
516
|
+
packageJSONRest = _objectWithoutProperties__default["default"](_ref5$packageJSON, _excluded),
|
|
517
517
|
_ref5$entryPoints = _ref5.entryPoints,
|
|
518
518
|
entryPoint = _ref5$entryPoints === void 0 ? "./src" : _ref5$entryPoints,
|
|
519
519
|
_ref5$tsconfig = _ref5.tsconfig,
|
|
@@ -521,20 +521,20 @@ function generateRollupConfiguration(options) {
|
|
|
521
521
|
|
|
522
522
|
validate(function (expect) {
|
|
523
523
|
// Note: Every array is a superset of empty array.
|
|
524
|
-
if (_Object$keys__default[
|
|
525
|
-
expect(_Object$keys__default[
|
|
524
|
+
if (_Object$keys__default["default"](peerDependencies).length > 0) {
|
|
525
|
+
expect(_Object$keys__default["default"](dependencies), "The dependencies and peer dependencies have to be disjoint sets").to.be.an("array").that.does.not.include.any.members(_Object$keys__default["default"](peerDependencies));
|
|
526
526
|
}
|
|
527
527
|
});
|
|
528
528
|
validate(function (expect) {
|
|
529
|
-
_includesInstanceProperty__default[
|
|
529
|
+
_includesInstanceProperty__default["default"](expect(_Object$keys__default["default"](devDependencies), "For convenience all peer dependencies also have to be dev dependencies").to.be.an("array").that).all.members(_Object$keys__default["default"](peerDependencies));
|
|
530
530
|
});
|
|
531
531
|
validate(function (expect) {
|
|
532
|
-
_includesInstanceProperty__default[
|
|
532
|
+
_includesInstanceProperty__default["default"](expect(_Object$keys__default["default"](peerDependencies), "Peer build externals have to be a subset of peer dependencies").to.be.an("array").that).all.members(externalForPeerBuild);
|
|
533
533
|
});
|
|
534
534
|
validate(function (expect) {
|
|
535
535
|
var _context11, _context12, _context13;
|
|
536
536
|
|
|
537
|
-
expect(_sortInstanceProperty__default[
|
|
537
|
+
expect(_sortInstanceProperty__default["default"](_context11 = _concatInstanceProperty__default["default"](_context12 = []).call(_context12, _toConsumableArray__default["default"](_Object$keys__default["default"](dependencies)), _toConsumableArray__default["default"](_Object$keys__default["default"](peerDependencies)))).call(_context11), "Globals have to be provided for all runtime and peer dependencies but nothing else").to.be.an("array").that.deep.equals(_sortInstanceProperty__default["default"](_context13 = _Object$keys__default["default"](globals)).call(_context13));
|
|
538
538
|
});
|
|
539
539
|
validate(function (expect) {
|
|
540
540
|
expect(path.resolve(assets), "Assets have to be a directory").to.be.a("string").and.a.directory();
|
|
@@ -543,17 +543,17 @@ function generateRollupConfiguration(options) {
|
|
|
543
543
|
expect(entryPoint, "The entry point has to be directory").to.be.a("string").and.a.directory();
|
|
544
544
|
});
|
|
545
545
|
|
|
546
|
-
var _map = _mapInstanceProperty__default[
|
|
546
|
+
var _map = _mapInstanceProperty__default["default"](_context14 = ["ESNext", "peer", "standalone"]).call(_context14, function (name) {
|
|
547
547
|
var filenameGlob = "entry-".concat(name.toLowerCase(), ".{js,ts}");
|
|
548
548
|
var files = glob(path.resolve(entryPoint, filenameGlob));
|
|
549
549
|
validate(function (expect) {
|
|
550
550
|
var _context15;
|
|
551
551
|
|
|
552
|
-
expect(files, _concatInstanceProperty__default[
|
|
552
|
+
expect(files, _concatInstanceProperty__default["default"](_context15 = "There has to be a single entry file (".concat(filenameGlob, ") for the ")).call(_context15, name, " build")).to.have.lengthOf(1).and.to.have.ownProperty("0").that.is.a.file();
|
|
553
553
|
});
|
|
554
554
|
return files[0];
|
|
555
555
|
}),
|
|
556
|
-
_map2 = _slicedToArray__default[
|
|
556
|
+
_map2 = _slicedToArray__default["default"](_map, 3),
|
|
557
557
|
esnextEntry = _map2[0],
|
|
558
558
|
peerEntry = _map2[1],
|
|
559
559
|
standaloneEntry = _map2[2];
|
|
@@ -562,7 +562,7 @@ function generateRollupConfiguration(options) {
|
|
|
562
562
|
expect(path.resolve("./declarations"), "There has to be a directory with TypeScript declarations").to.be.a("string").and.a.directory();
|
|
563
563
|
});
|
|
564
564
|
validate(function (expect) {
|
|
565
|
-
_includesInstanceProperty__default[
|
|
565
|
+
_includesInstanceProperty__default["default"](expect(packageJSONRest, "The directories with built files have to be included in the package").to.have.ownProperty("files").that.is.an("array").and).all.members(["declarations", "esnext", "peer", "standalone"]);
|
|
566
566
|
});
|
|
567
567
|
validate(function (expect) {
|
|
568
568
|
expect(packageJSONRest, "Package JSON's type property has to point to the declarations").to.have.ownProperty("types").that.is.a("string").and.equals("declarations/index.d.ts");
|
|
@@ -589,7 +589,7 @@ function generateRollupConfiguration(options) {
|
|
|
589
589
|
var banner = generateHeader(header);
|
|
590
590
|
var external = {
|
|
591
591
|
// No dependencies are bundled.
|
|
592
|
-
esnext: processDependencies(_concatInstanceProperty__default[
|
|
592
|
+
esnext: processDependencies(_concatInstanceProperty__default["default"](_context16 = []).call(_context16, _toConsumableArray__default["default"](_Object$keys__default["default"](dependencies)), _toConsumableArray__default["default"](_Object$keys__default["default"](peerDependencies)), _toConsumableArray__default["default"](_Object$keys__default["default"](devDependencies)))),
|
|
593
593
|
// Only dependencies that cause compatibility issues are not bundled.
|
|
594
594
|
peer: processDependencies(externalForPeerBuild),
|
|
595
595
|
// No runtime dependencies, everything's bundled.
|
|
@@ -616,7 +616,7 @@ function generateRollupConfiguration(options) {
|
|
|
616
616
|
}); // Note: Binding more than 4 at a time is not typesafe in TS.
|
|
617
617
|
|
|
618
618
|
|
|
619
|
-
var getPlugins = _bindInstanceProperty__default[
|
|
619
|
+
var getPlugins = _bindInstanceProperty__default["default"](_context17 = _bindInstanceProperty__default["default"](_context18 = _bindInstanceProperty__default["default"](_context19 = _bindInstanceProperty__default["default"](_context20 = _bindInstanceProperty__default["default"](_context21 = _bindInstanceProperty__default["default"](generateRollupPluginArray).call(generateRollupPluginArray, null, libraryFilename)).call(_context21, null, assets)).call(_context20, null, copyTargetsBundle)).call(_context19, null, copyTargetsVariant)).call(_context18, null, tsconfig)).call(_context17, null, mode);
|
|
620
620
|
|
|
621
621
|
return [{
|
|
622
622
|
external: external.standalone,
|
|
@@ -704,9 +704,9 @@ function generateRollupConfiguration(options) {
|
|
|
704
704
|
}];
|
|
705
705
|
}
|
|
706
706
|
|
|
707
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
707
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
708
708
|
|
|
709
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context8, _context9; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default[
|
|
709
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context8, _context9; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys(Object(source), !0)).call(_context8, function (key) { _defineProperty__default["default"](target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys(Object(source))).call(_context9, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
710
710
|
tmpPromise.setGracefulCleanup();
|
|
711
711
|
var PACK_CMD = ["npm", "pack", "--dry-run"];
|
|
712
712
|
/**
|
|
@@ -716,7 +716,7 @@ var PACK_CMD = ["npm", "pack", "--dry-run"];
|
|
|
716
716
|
|
|
717
717
|
function logStderr(textOrLines, message) {
|
|
718
718
|
console.group('"npm pack" output');
|
|
719
|
-
console.error(_Array$isArray__default[
|
|
719
|
+
console.error(_Array$isArray__default["default"](textOrLines) ? textOrLines.join("\n") : textOrLines);
|
|
720
720
|
console.groupEnd();
|
|
721
721
|
throw new Error(message);
|
|
722
722
|
}
|
|
@@ -732,7 +732,7 @@ function runNpmPack() {
|
|
|
732
732
|
// into Node. Saving it into tmp file using shell redirection and reading it
|
|
733
733
|
// from there doesn't exhibit those issues.
|
|
734
734
|
|
|
735
|
-
child_process.execSync(_concatInstanceProperty__default[
|
|
735
|
+
child_process.execSync(_concatInstanceProperty__default["default"](_context = "".concat(PACK_CMD.join(" "), " 2> ")).call(_context, tmpFile), {
|
|
736
736
|
encoding: "utf-8",
|
|
737
737
|
env: _objectSpread(_objectSpread({}, process.env), {}, {
|
|
738
738
|
LC_ALL: "C"
|
|
@@ -749,23 +749,23 @@ function runNpmPack() {
|
|
|
749
749
|
function extractFiles(lines) {
|
|
750
750
|
var _context2, _context3, _context4, _context5, _context6;
|
|
751
751
|
|
|
752
|
-
var fileListingStart = _indexOfInstanceProperty__default[
|
|
752
|
+
var fileListingStart = _indexOfInstanceProperty__default["default"](lines).call(lines, "npm notice === Tarball Contents === ");
|
|
753
753
|
|
|
754
|
-
var fileListingEnd = _indexOfInstanceProperty__default[
|
|
754
|
+
var fileListingEnd = _indexOfInstanceProperty__default["default"](lines).call(lines, "npm notice === Tarball Details === ");
|
|
755
755
|
|
|
756
756
|
if (fileListingStart === -1 || fileListingEnd === -1) {
|
|
757
757
|
logStderr(lines.join("\n"), 'Couldn\'t find tarball contents in "npm pack" output.');
|
|
758
758
|
}
|
|
759
759
|
|
|
760
|
-
var files = _mapInstanceProperty__default[
|
|
760
|
+
var files = _mapInstanceProperty__default["default"](_context2 = _sortInstanceProperty__default["default"](_context3 = _mapInstanceProperty__default["default"](_context4 = _mapInstanceProperty__default["default"](_context5 = _mapInstanceProperty__default["default"](_context6 = _sliceInstanceProperty__default["default"](lines).call(lines, fileListingStart + 1, fileListingEnd)).call(_context6, function (line) {
|
|
761
761
|
return line.replace(/^npm notice /, "");
|
|
762
762
|
})).call(_context5, function (line) {
|
|
763
|
-
return _trimInstanceProperty__default[
|
|
763
|
+
return _trimInstanceProperty__default["default"](line).call(line);
|
|
764
764
|
})).call(_context4, function (line) {
|
|
765
765
|
return line.replace(/^([^ ]+) +(.*)/, function (_, size, path) {
|
|
766
766
|
var _context7;
|
|
767
767
|
|
|
768
|
-
return _concatInstanceProperty__default[
|
|
768
|
+
return _concatInstanceProperty__default["default"](_context7 = "".concat(path)).call(_context7, size === "0" ? "(empty)" : " ");
|
|
769
769
|
});
|
|
770
770
|
})).call(_context3)).call(_context2, function (line) {
|
|
771
771
|
return line.replace(/^(.*)(.{7})$/, "$2 $1");
|
|
@@ -783,7 +783,7 @@ function extractFiles(lines) {
|
|
|
783
783
|
|
|
784
784
|
|
|
785
785
|
function extractName(lines) {
|
|
786
|
-
var nameLine = _findInstanceProperty__default[
|
|
786
|
+
var nameLine = _findInstanceProperty__default["default"](lines).call(lines, function (line) {
|
|
787
787
|
return /^npm notice name:/.test(line);
|
|
788
788
|
});
|
|
789
789
|
|