@vercel/static-build 0.25.1 → 0.25.2-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +77 -77
- package/package.json +10 -8
package/dist/index.js
CHANGED
|
@@ -2595,6 +2595,82 @@ function unflatten (target, opts) {
|
|
|
2595
2595
|
}
|
|
2596
2596
|
|
|
2597
2597
|
|
|
2598
|
+
/***/ }),
|
|
2599
|
+
|
|
2600
|
+
/***/ 4959:
|
|
2601
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2602
|
+
|
|
2603
|
+
"use strict";
|
|
2604
|
+
|
|
2605
|
+
const net = __webpack_require__(1631);
|
|
2606
|
+
|
|
2607
|
+
const getAvailablePort = options => new Promise((resolve, reject) => {
|
|
2608
|
+
const server = net.createServer();
|
|
2609
|
+
server.unref();
|
|
2610
|
+
server.on('error', reject);
|
|
2611
|
+
server.listen(options, () => {
|
|
2612
|
+
const {port} = server.address();
|
|
2613
|
+
server.close(() => {
|
|
2614
|
+
resolve(port);
|
|
2615
|
+
});
|
|
2616
|
+
});
|
|
2617
|
+
});
|
|
2618
|
+
|
|
2619
|
+
const portCheckSequence = function * (ports) {
|
|
2620
|
+
if (ports) {
|
|
2621
|
+
yield * ports;
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
yield 0; // Fall back to 0 if anything else failed
|
|
2625
|
+
};
|
|
2626
|
+
|
|
2627
|
+
module.exports = async options => {
|
|
2628
|
+
let ports = null;
|
|
2629
|
+
|
|
2630
|
+
if (options) {
|
|
2631
|
+
ports = typeof options.port === 'number' ? [options.port] : options.port;
|
|
2632
|
+
}
|
|
2633
|
+
|
|
2634
|
+
for (const port of portCheckSequence(ports)) {
|
|
2635
|
+
try {
|
|
2636
|
+
return await getAvailablePort({...options, port}); // eslint-disable-line no-await-in-loop
|
|
2637
|
+
} catch (error) {
|
|
2638
|
+
if (error.code !== 'EADDRINUSE') {
|
|
2639
|
+
throw error;
|
|
2640
|
+
}
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
throw new Error('No available ports found');
|
|
2645
|
+
};
|
|
2646
|
+
|
|
2647
|
+
module.exports.makeRange = (from, to) => {
|
|
2648
|
+
if (!Number.isInteger(from) || !Number.isInteger(to)) {
|
|
2649
|
+
throw new TypeError('`from` and `to` must be integer numbers');
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2652
|
+
if (from < 1024 || from > 65535) {
|
|
2653
|
+
throw new RangeError('`from` must be between 1024 and 65535');
|
|
2654
|
+
}
|
|
2655
|
+
|
|
2656
|
+
if (to < 1024 || to > 65536) {
|
|
2657
|
+
throw new RangeError('`to` must be between 1024 and 65536');
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2660
|
+
if (to < from) {
|
|
2661
|
+
throw new RangeError('`to` must be greater than or equal to `from`');
|
|
2662
|
+
}
|
|
2663
|
+
|
|
2664
|
+
const generator = function * (from, to) {
|
|
2665
|
+
for (let port = from; port <= to; port++) {
|
|
2666
|
+
yield port;
|
|
2667
|
+
}
|
|
2668
|
+
};
|
|
2669
|
+
|
|
2670
|
+
return generator(from, to);
|
|
2671
|
+
};
|
|
2672
|
+
|
|
2673
|
+
|
|
2598
2674
|
/***/ }),
|
|
2599
2675
|
|
|
2600
2676
|
/***/ 6315:
|
|
@@ -13679,82 +13755,6 @@ module.exports = new Type('tag:yaml.org,2002:timestamp', {
|
|
|
13679
13755
|
});
|
|
13680
13756
|
|
|
13681
13757
|
|
|
13682
|
-
/***/ }),
|
|
13683
|
-
|
|
13684
|
-
/***/ 9142:
|
|
13685
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
13686
|
-
|
|
13687
|
-
"use strict";
|
|
13688
|
-
|
|
13689
|
-
const net = __webpack_require__(1631);
|
|
13690
|
-
|
|
13691
|
-
const getAvailablePort = options => new Promise((resolve, reject) => {
|
|
13692
|
-
const server = net.createServer();
|
|
13693
|
-
server.unref();
|
|
13694
|
-
server.on('error', reject);
|
|
13695
|
-
server.listen(options, () => {
|
|
13696
|
-
const {port} = server.address();
|
|
13697
|
-
server.close(() => {
|
|
13698
|
-
resolve(port);
|
|
13699
|
-
});
|
|
13700
|
-
});
|
|
13701
|
-
});
|
|
13702
|
-
|
|
13703
|
-
const portCheckSequence = function * (ports) {
|
|
13704
|
-
if (ports) {
|
|
13705
|
-
yield * ports;
|
|
13706
|
-
}
|
|
13707
|
-
|
|
13708
|
-
yield 0; // Fall back to 0 if anything else failed
|
|
13709
|
-
};
|
|
13710
|
-
|
|
13711
|
-
module.exports = async options => {
|
|
13712
|
-
let ports = null;
|
|
13713
|
-
|
|
13714
|
-
if (options) {
|
|
13715
|
-
ports = typeof options.port === 'number' ? [options.port] : options.port;
|
|
13716
|
-
}
|
|
13717
|
-
|
|
13718
|
-
for (const port of portCheckSequence(ports)) {
|
|
13719
|
-
try {
|
|
13720
|
-
return await getAvailablePort({...options, port}); // eslint-disable-line no-await-in-loop
|
|
13721
|
-
} catch (error) {
|
|
13722
|
-
if (error.code !== 'EADDRINUSE') {
|
|
13723
|
-
throw error;
|
|
13724
|
-
}
|
|
13725
|
-
}
|
|
13726
|
-
}
|
|
13727
|
-
|
|
13728
|
-
throw new Error('No available ports found');
|
|
13729
|
-
};
|
|
13730
|
-
|
|
13731
|
-
module.exports.makeRange = (from, to) => {
|
|
13732
|
-
if (!Number.isInteger(from) || !Number.isInteger(to)) {
|
|
13733
|
-
throw new TypeError('`from` and `to` must be integer numbers');
|
|
13734
|
-
}
|
|
13735
|
-
|
|
13736
|
-
if (from < 1024 || from > 65535) {
|
|
13737
|
-
throw new RangeError('`from` must be between 1024 and 65535');
|
|
13738
|
-
}
|
|
13739
|
-
|
|
13740
|
-
if (to < 1024 || to > 65536) {
|
|
13741
|
-
throw new RangeError('`to` must be between 1024 and 65536');
|
|
13742
|
-
}
|
|
13743
|
-
|
|
13744
|
-
if (to < from) {
|
|
13745
|
-
throw new RangeError('`to` must be greater than or equal to `from`');
|
|
13746
|
-
}
|
|
13747
|
-
|
|
13748
|
-
const generator = function * (from, to) {
|
|
13749
|
-
for (let port = from; port <= to; port++) {
|
|
13750
|
-
yield port;
|
|
13751
|
-
}
|
|
13752
|
-
};
|
|
13753
|
-
|
|
13754
|
-
return generator(from, to);
|
|
13755
|
-
};
|
|
13756
|
-
|
|
13757
|
-
|
|
13758
13758
|
/***/ }),
|
|
13759
13759
|
|
|
13760
13760
|
/***/ 2855:
|
|
@@ -13789,7 +13789,7 @@ exports.prepareCache = exports.build = exports.version = void 0;
|
|
|
13789
13789
|
const ms_1 = __importDefault(__webpack_require__(40));
|
|
13790
13790
|
const path_1 = __importDefault(__webpack_require__(5622));
|
|
13791
13791
|
const node_fetch_1 = __importDefault(__webpack_require__(2197));
|
|
13792
|
-
const get_port_1 = __importDefault(__webpack_require__(
|
|
13792
|
+
const get_port_1 = __importDefault(__webpack_require__(4959));
|
|
13793
13793
|
const is_port_reachable_1 = __importDefault(__webpack_require__(153));
|
|
13794
13794
|
const frameworks_1 = __importDefault(__webpack_require__(8438));
|
|
13795
13795
|
const fs_1 = __webpack_require__(5747);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/static-build",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.2-canary.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/build-step",
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "node build",
|
|
17
|
-
"test
|
|
18
|
-
"test-
|
|
17
|
+
"test": "jest --env node --verbose --bail --runInBand",
|
|
18
|
+
"test-unit": "yarn test test/build.test.ts test/prepare-cache.test.ts",
|
|
19
|
+
"test-integration-once": "yarn test test/integration-*.test.js",
|
|
19
20
|
"prepublishOnly": "node build"
|
|
20
21
|
},
|
|
21
22
|
"jest": {
|
|
@@ -35,16 +36,17 @@
|
|
|
35
36
|
"@types/ms": "0.7.31",
|
|
36
37
|
"@types/node-fetch": "2.5.4",
|
|
37
38
|
"@types/promise-timeout": "1.3.0",
|
|
38
|
-
"@vercel/build-utils": "3.0.
|
|
39
|
-
"@vercel/frameworks": "0.9.0",
|
|
39
|
+
"@vercel/build-utils": "3.0.2-canary.0",
|
|
40
|
+
"@vercel/frameworks": "0.9.1-canary.0",
|
|
40
41
|
"@vercel/ncc": "0.24.0",
|
|
41
|
-
"@vercel/routing-utils": "1.13.
|
|
42
|
+
"@vercel/routing-utils": "1.13.3-canary.0",
|
|
42
43
|
"fs-extra": "10.0.0",
|
|
43
44
|
"get-port": "5.0.0",
|
|
44
45
|
"is-port-reachable": "2.0.1",
|
|
45
46
|
"ms": "2.1.2",
|
|
46
47
|
"node-fetch": "2.6.1",
|
|
47
|
-
"rc9": "1.2.0"
|
|
48
|
+
"rc9": "1.2.0",
|
|
49
|
+
"typescript": "4.3.4"
|
|
48
50
|
},
|
|
49
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "f26858b735ad5d54e01afa67133b9f9456fbe72f"
|
|
50
52
|
}
|