vercel 23.1.3-canary.53 → 23.1.3-canary.54
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 +76 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
@@ -250604,8 +250604,12 @@ async function main(client) {
|
|
250604
250604
|
// We cannot rely on the `framework` alone, as it might be a static export,
|
250605
250605
|
// and the current build might use a differnt project that's not in the settings.
|
250606
250606
|
const isNextOutput = Boolean(dotNextDir);
|
250607
|
-
const
|
250608
|
-
const
|
250607
|
+
const nextExport = await getNextExportStatus(dotNextDir);
|
250608
|
+
const outputDir = isNextOutput && !nextExport ? OUTPUT_DIR : path_1.join(OUTPUT_DIR, 'static');
|
250609
|
+
const distDir = ((nextExport === null || nextExport === void 0 ? void 0 : nextExport.exportDetail.outDirectory)
|
250610
|
+
? path_1.relative(cwd, nextExport.exportDetail.outDirectory)
|
250611
|
+
: false) ||
|
250612
|
+
dotNextDir ||
|
250609
250613
|
userOutputDirectory ||
|
250610
250614
|
(await framework.getFsOutputDir(cwd));
|
250611
250615
|
await fs_extra_1.default.ensureDir(path_1.join(cwd, outputDir));
|
@@ -250663,7 +250667,38 @@ async function main(client) {
|
|
250663
250667
|
await fs_extra_1.default.writeJSON(path_1.join(cwd, OUTPUT_DIR, 'routes-manifest.json'), routesManifest, { spaces: 2 });
|
250664
250668
|
}
|
250665
250669
|
// Special Next.js processing.
|
250666
|
-
if (
|
250670
|
+
if (nextExport) {
|
250671
|
+
client.output.debug('Found `next export` output.');
|
250672
|
+
const htmlFiles = await build_utils_1.glob('**/*.html', path_1.join(cwd, OUTPUT_DIR, 'static'));
|
250673
|
+
if (nextExport.exportDetail.success !== true) {
|
250674
|
+
client.output.error(`Export of Next.js app failed. Please check your build logs.`);
|
250675
|
+
process.exit(1);
|
250676
|
+
}
|
250677
|
+
await fs_extra_1.default.mkdirp(path_1.join(cwd, OUTPUT_DIR, 'server', 'pages'));
|
250678
|
+
await fs_extra_1.default.mkdirp(path_1.join(cwd, OUTPUT_DIR, 'static'));
|
250679
|
+
await Promise.all(Object.keys(htmlFiles).map(async (fileName) => {
|
250680
|
+
await sema.acquire();
|
250681
|
+
const input = path_1.join(cwd, OUTPUT_DIR, 'static', fileName);
|
250682
|
+
const target = path_1.join(cwd, OUTPUT_DIR, 'server', 'pages', fileName);
|
250683
|
+
await fs_extra_1.default.mkdirp(path_1.dirname(target));
|
250684
|
+
await fs_extra_1.default.promises.rename(input, target).finally(() => {
|
250685
|
+
sema.release();
|
250686
|
+
});
|
250687
|
+
}));
|
250688
|
+
for (const file of [
|
250689
|
+
'BUILD_ID',
|
250690
|
+
'images-manifest.json',
|
250691
|
+
'routes-manifest.json',
|
250692
|
+
'build-manifest.json',
|
250693
|
+
]) {
|
250694
|
+
const input = path_1.join(nextExport.dotNextDir, file);
|
250695
|
+
if (fs_extra_1.default.existsSync(input)) {
|
250696
|
+
// Do not use `smartCopy`, since we want to overwrite if they already exist.
|
250697
|
+
await fs_extra_1.default.copyFile(input, path_1.join(OUTPUT_DIR, file));
|
250698
|
+
}
|
250699
|
+
}
|
250700
|
+
}
|
250701
|
+
else if (isNextOutput) {
|
250667
250702
|
// The contents of `.output/static` should be placed inside of `.output/static/_next/static`
|
250668
250703
|
const tempStatic = '___static';
|
250669
250704
|
await fs_extra_1.default.rename(path_1.join(cwd, OUTPUT_DIR, 'static'), path_1.join(cwd, OUTPUT_DIR, tempStatic));
|
@@ -250979,6 +251014,42 @@ async function resolveNftToOutput({ client, baseDir, outputDir, nftFileName, dis
|
|
250979
251014
|
files: newFilesList,
|
250980
251015
|
});
|
250981
251016
|
}
|
251017
|
+
/**
|
251018
|
+
* Files will only exist when `next export` was used.
|
251019
|
+
*/
|
251020
|
+
async function getNextExportStatus(dotNextDir) {
|
251021
|
+
if (!dotNextDir) {
|
251022
|
+
return null;
|
251023
|
+
}
|
251024
|
+
const exportDetail = await fs_extra_1.default
|
251025
|
+
.readJson(path_1.join(dotNextDir, 'export-detail.json'))
|
251026
|
+
.catch(error => {
|
251027
|
+
if (error.code === 'ENOENT') {
|
251028
|
+
return null;
|
251029
|
+
}
|
251030
|
+
throw error;
|
251031
|
+
});
|
251032
|
+
if (!exportDetail) {
|
251033
|
+
return null;
|
251034
|
+
}
|
251035
|
+
const exportMarker = await fs_extra_1.default
|
251036
|
+
.readJSON(path_1.join(dotNextDir, 'export-marker.json'))
|
251037
|
+
.catch(error => {
|
251038
|
+
if (error.code === 'ENOENT') {
|
251039
|
+
return null;
|
251040
|
+
}
|
251041
|
+
throw error;
|
251042
|
+
});
|
251043
|
+
return {
|
251044
|
+
dotNextDir,
|
251045
|
+
exportDetail,
|
251046
|
+
exportMarker: {
|
251047
|
+
trailingSlash: (exportMarker === null || exportMarker === void 0 ? void 0 : exportMarker.hasExportPathMap)
|
251048
|
+
? exportMarker.exportTrailingSlash
|
251049
|
+
: false,
|
251050
|
+
},
|
251051
|
+
};
|
251052
|
+
}
|
250982
251053
|
|
250983
251054
|
|
250984
251055
|
/***/ }),
|
@@ -271146,7 +271217,7 @@ module.exports = JSON.parse("[\"ac\",\"com.ac\",\"edu.ac\",\"gov.ac\",\"net.ac\"
|
|
271146
271217
|
/***/ ((module) => {
|
271147
271218
|
|
271148
271219
|
"use strict";
|
271149
|
-
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"23.1.3-canary.
|
271220
|
+
module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"23.1.3-canary.54\",\"preferGlobal\":true,\"license\":\"Apache-2.0\",\"description\":\"The command-line interface for Vercel\",\"homepage\":\"https://vercel.com\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/vercel/vercel.git\",\"directory\":\"packages/cli\"},\"scripts\":{\"preinstall\":\"node ./scripts/preinstall.js\",\"test\":\"jest\",\"test-unit\":\"jest --coverage --verbose\",\"test-integration-cli\":\"rimraf test/fixtures/integration && ava test/integration.js --serial --fail-fast --verbose\",\"test-integration-dev\":\"ava test/dev/integration.js --serial --fail-fast --verbose\",\"prepublishOnly\":\"yarn build\",\"coverage\":\"codecov\",\"build\":\"node -r ts-eager/register ./scripts/build.ts\",\"build-dev\":\"node -r ts-eager/register ./scripts/build.ts --dev\"},\"bin\":{\"vc\":\"./dist/index.js\",\"vercel\":\"./dist/index.js\"},\"files\":[\"dist\",\"scripts/preinstall.js\"],\"ava\":{\"compileEnhancements\":false,\"extensions\":[\"ts\"],\"require\":[\"ts-node/register/transpile-only\",\"esm\"]},\"engines\":{\"node\":\">= 12\"},\"dependencies\":{\"@vercel/build-utils\":\"2.12.3-canary.32\",\"@vercel/go\":\"1.2.4-canary.4\",\"@vercel/node\":\"1.12.2-canary.7\",\"@vercel/python\":\"2.1.2-canary.1\",\"@vercel/ruby\":\"1.2.8-canary.6\",\"update-notifier\":\"4.1.0\",\"vercel-plugin-middleware\":\"0.0.0-canary.8\",\"vercel-plugin-node\":\"1.12.2-canary.24\"},\"devDependencies\":{\"@next/env\":\"11.1.2\",\"@sentry/node\":\"5.5.0\",\"@sindresorhus/slugify\":\"0.11.0\",\"@tootallnate/once\":\"1.1.2\",\"@types/ansi-escapes\":\"3.0.0\",\"@types/ansi-regex\":\"4.0.0\",\"@types/async-retry\":\"1.2.1\",\"@types/bytes\":\"3.0.0\",\"@types/chance\":\"1.1.3\",\"@types/debug\":\"0.0.31\",\"@types/dotenv\":\"6.1.1\",\"@types/escape-html\":\"0.0.20\",\"@types/express\":\"4.17.13\",\"@types/fs-extra\":\"9.0.13\",\"@types/glob\":\"7.1.1\",\"@types/http-proxy\":\"1.16.2\",\"@types/inquirer\":\"7.3.1\",\"@types/jest\":\"27.0.1\",\"@types/load-json-file\":\"2.0.7\",\"@types/mime-types\":\"2.1.0\",\"@types/minimatch\":\"3.0.3\",\"@types/mri\":\"1.1.0\",\"@types/ms\":\"0.7.30\",\"@types/node\":\"11.11.0\",\"@types/node-fetch\":\"2.5.10\",\"@types/npm-package-arg\":\"6.1.0\",\"@types/pluralize\":\"0.0.29\",\"@types/progress\":\"2.0.3\",\"@types/psl\":\"1.1.0\",\"@types/semver\":\"6.0.1\",\"@types/tar-fs\":\"1.16.1\",\"@types/text-table\":\"0.2.0\",\"@types/title\":\"3.4.1\",\"@types/universal-analytics\":\"0.4.2\",\"@types/update-notifier\":\"5.1.0\",\"@types/which\":\"1.3.2\",\"@types/write-json-file\":\"2.2.1\",\"@vercel/frameworks\":\"0.5.1-canary.16\",\"@vercel/ncc\":\"0.24.0\",\"@vercel/nft\":\"0.17.0\",\"@zeit/fun\":\"0.11.2\",\"@zeit/source-map-support\":\"0.6.2\",\"ajv\":\"6.12.2\",\"alpha-sort\":\"2.0.1\",\"ansi-escapes\":\"3.0.0\",\"ansi-regex\":\"3.0.0\",\"arg\":\"5.0.0\",\"async-listen\":\"1.2.0\",\"async-retry\":\"1.1.3\",\"async-sema\":\"2.1.4\",\"ava\":\"2.2.0\",\"bytes\":\"3.0.0\",\"chalk\":\"4.1.0\",\"chance\":\"1.1.7\",\"chokidar\":\"3.3.1\",\"clipboardy\":\"2.1.0\",\"codecov\":\"3.8.2\",\"cpy\":\"7.2.0\",\"credit-card\":\"3.0.1\",\"date-fns\":\"1.29.0\",\"debug\":\"3.1.0\",\"dot\":\"1.1.3\",\"dotenv\":\"4.0.0\",\"email-prompt\":\"0.3.2\",\"email-validator\":\"1.1.1\",\"epipebomb\":\"1.0.0\",\"escape-html\":\"1.0.3\",\"esm\":\"3.1.4\",\"execa\":\"3.2.0\",\"express\":\"4.17.1\",\"fast-deep-equal\":\"3.1.3\",\"fs-extra\":\"10.0.0\",\"get-port\":\"5.1.1\",\"glob\":\"7.1.2\",\"http-proxy\":\"1.18.1\",\"inquirer\":\"7.0.4\",\"is-docker\":\"2.2.1\",\"is-port-reachable\":\"3.0.0\",\"is-url\":\"1.2.2\",\"jaro-winkler\":\"0.2.8\",\"jsonlines\":\"0.1.1\",\"load-json-file\":\"3.0.0\",\"mime-types\":\"2.1.24\",\"minimatch\":\"3.0.4\",\"mri\":\"1.1.5\",\"ms\":\"2.1.2\",\"node-fetch\":\"2.6.1\",\"npm-package-arg\":\"6.1.0\",\"open\":\"8.2.0\",\"ora\":\"3.4.0\",\"pcre-to-regexp\":\"1.0.0\",\"pluralize\":\"7.0.0\",\"progress\":\"2.0.3\",\"promisepipe\":\"3.0.0\",\"psl\":\"1.1.31\",\"qr-image\":\"3.2.0\",\"raw-body\":\"2.4.1\",\"rimraf\":\"3.0.2\",\"semver\":\"5.5.0\",\"serve-handler\":\"6.1.1\",\"strip-ansi\":\"5.2.0\",\"stripe\":\"5.1.0\",\"tar-fs\":\"1.16.3\",\"test-listen\":\"1.1.0\",\"text-table\":\"0.2.0\",\"title\":\"3.4.1\",\"tmp-promise\":\"1.0.3\",\"tree-kill\":\"1.2.2\",\"ts-eager\":\"2.0.2\",\"ts-node\":\"8.3.0\",\"typescript\":\"4.3.4\",\"universal-analytics\":\"0.4.20\",\"utility-types\":\"2.1.0\",\"which\":\"2.0.2\",\"write-json-file\":\"2.2.0\",\"xdg-app-paths\":\"5.1.0\"},\"jest\":{\"preset\":\"ts-jest\",\"globals\":{\"ts-jest\":{\"diagnostics\":false,\"isolatedModules\":true}},\"verbose\":false,\"testEnvironment\":\"node\",\"testMatch\":[\"<rootDir>/test/**/*.test.ts\"]},\"gitHead\":\"5ccb98300786813cb17201a25854b365889fbb6d\"}");
|
271150
271221
|
|
271151
271222
|
/***/ }),
|
271152
271223
|
|
@@ -271162,7 +271233,7 @@ module.exports = JSON.parse("{\"VISA\":\"Visa\",\"MASTERCARD\":\"MasterCard\",\"
|
|
271162
271233
|
/***/ ((module) => {
|
271163
271234
|
|
271164
271235
|
"use strict";
|
271165
|
-
module.exports = JSON.parse("{\"name\":\"@vercel/client\",\"version\":\"10.2.3-canary.33\",\"main\":\"dist/index.js\",\"typings\":\"dist/index.d.ts\",\"homepage\":\"https://vercel.com\",\"license\":\"MIT\",\"files\":[\"dist\"],\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/vercel/vercel.git\",\"directory\":\"packages/client\"},\"scripts\":{\"build\":\"tsc\",\"test-integration-once\":\"jest --verbose --runInBand --bail tests/create-deployment.test.ts tests/create-legacy-deployment.test.ts tests/paths.test.ts\",\"test-unit\":\"jest --verbose --runInBand --bail tests/unit.*test.*\"},\"engines\":{\"node\":\">= 12\"},\"devDependencies\":{\"@types/async-retry\":\"1.4.1\",\"@types/fs-extra\":\"7.0.0\",\"@types/jest\":\"27.0.1\",\"@types/ms\":\"0.7.30\",\"@types/node\":\"12.0.4\",\"@types/node-fetch\":\"2.5.4\",\"@types/recursive-readdir\":\"2.2.0\",\"typescript\":\"4.3.4\"},\"jest\":{\"preset\":\"ts-jest\",\"testEnvironment\":\"node\",\"verbose\":false,\"setupFilesAfterEnv\":[\"<rootDir>/tests/setup/index.ts\"]},\"dependencies\":{\"@vercel/build-utils\":\"2.12.3-canary.32\",\"@zeit/fetch\":\"5.2.0\",\"async-retry\":\"1.2.3\",\"async-sema\":\"3.0.0\",\"fs-extra\":\"8.0.1\",\"ignore\":\"4.0.6\",\"ms\":\"2.1.2\",\"node-fetch\":\"2.6.1\",\"querystring\":\"^0.2.0\",\"recursive-readdir\":\"2.2.2\",\"sleep-promise\":\"8.0.1\"}
|
271236
|
+
module.exports = JSON.parse("{\"name\":\"@vercel/client\",\"version\":\"10.2.3-canary.33\",\"main\":\"dist/index.js\",\"typings\":\"dist/index.d.ts\",\"homepage\":\"https://vercel.com\",\"license\":\"MIT\",\"files\":[\"dist\"],\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/vercel/vercel.git\",\"directory\":\"packages/client\"},\"scripts\":{\"build\":\"tsc\",\"test-integration-once\":\"jest --verbose --runInBand --bail tests/create-deployment.test.ts tests/create-legacy-deployment.test.ts tests/paths.test.ts\",\"test-unit\":\"jest --verbose --runInBand --bail tests/unit.*test.*\"},\"engines\":{\"node\":\">= 12\"},\"devDependencies\":{\"@types/async-retry\":\"1.4.1\",\"@types/fs-extra\":\"7.0.0\",\"@types/jest\":\"27.0.1\",\"@types/ms\":\"0.7.30\",\"@types/node\":\"12.0.4\",\"@types/node-fetch\":\"2.5.4\",\"@types/recursive-readdir\":\"2.2.0\",\"typescript\":\"4.3.4\"},\"jest\":{\"preset\":\"ts-jest\",\"testEnvironment\":\"node\",\"verbose\":false,\"setupFilesAfterEnv\":[\"<rootDir>/tests/setup/index.ts\"]},\"dependencies\":{\"@vercel/build-utils\":\"2.12.3-canary.32\",\"@zeit/fetch\":\"5.2.0\",\"async-retry\":\"1.2.3\",\"async-sema\":\"3.0.0\",\"fs-extra\":\"8.0.1\",\"ignore\":\"4.0.6\",\"ms\":\"2.1.2\",\"node-fetch\":\"2.6.1\",\"querystring\":\"^0.2.0\",\"recursive-readdir\":\"2.2.2\",\"sleep-promise\":\"8.0.1\"}}");
|
271166
271237
|
|
271167
271238
|
/***/ }),
|
271168
271239
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vercel",
|
3
|
-
"version": "23.1.3-canary.
|
3
|
+
"version": "23.1.3-canary.54",
|
4
4
|
"preferGlobal": true,
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"description": "The command-line interface for Vercel",
|
@@ -49,7 +49,7 @@
|
|
49
49
|
"@vercel/python": "2.1.2-canary.1",
|
50
50
|
"@vercel/ruby": "1.2.8-canary.6",
|
51
51
|
"update-notifier": "4.1.0",
|
52
|
-
"vercel-plugin-middleware": "0.0.0-canary.
|
52
|
+
"vercel-plugin-middleware": "0.0.0-canary.8",
|
53
53
|
"vercel-plugin-node": "1.12.2-canary.24"
|
54
54
|
},
|
55
55
|
"devDependencies": {
|
@@ -184,5 +184,5 @@
|
|
184
184
|
"<rootDir>/test/**/*.test.ts"
|
185
185
|
]
|
186
186
|
},
|
187
|
-
"gitHead": "
|
187
|
+
"gitHead": "5ccb98300786813cb17201a25854b365889fbb6d"
|
188
188
|
}
|