@vercel/build-utils 2.13.0 → 2.14.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/.turbo/turbo-build.log +33 -0
- package/dist/debug.js +2 -2
- package/dist/fs/run-user-scripts.d.ts +16 -0
- package/dist/fs/run-user-scripts.js +55 -22
- package/dist/get-platform-env.d.ts +5 -0
- package/dist/get-platform-env.js +26 -0
- package/dist/index.d.ts +4 -8
- package/dist/index.js +205 -440
- package/dist/lambda.d.ts +16 -15
- package/dist/lambda.js +46 -43
- package/dist/nodejs-lambda.d.ts +14 -0
- package/dist/nodejs-lambda.js +14 -0
- package/dist/types.d.ts +38 -0
- package/package.json +3 -3
- package/dist/convert-runtime-to-plugin.d.ts +0 -65
- package/dist/convert-runtime-to-plugin.js +0 -298
package/dist/index.js
CHANGED
@@ -26579,7 +26579,7 @@ exports.frameworks = [
|
|
26579
26579
|
{
|
26580
26580
|
name: 'Blitz.js',
|
26581
26581
|
slug: 'blitzjs',
|
26582
|
-
demo: 'https://
|
26582
|
+
demo: 'https://blitz-template.vercel.app',
|
26583
26583
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/blitz.svg',
|
26584
26584
|
tagline: 'Blitz.js: The Fullstack React Framework',
|
26585
26585
|
description: 'A brand new Blitz.js app - the result of running `npx blitz new`.',
|
@@ -26615,7 +26615,7 @@ exports.frameworks = [
|
|
26615
26615
|
{
|
26616
26616
|
name: 'Next.js',
|
26617
26617
|
slug: 'nextjs',
|
26618
|
-
demo: 'https://nextjs.
|
26618
|
+
demo: 'https://nextjs-template.vercel.app',
|
26619
26619
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/next.svg',
|
26620
26620
|
tagline: 'Next.js makes you productive with React instantly — whether you want to build static or dynamic sites.',
|
26621
26621
|
description: 'A Next.js app and a Serverless Function API.',
|
@@ -26660,10 +26660,10 @@ exports.frameworks = [
|
|
26660
26660
|
{
|
26661
26661
|
name: 'Gatsby.js',
|
26662
26662
|
slug: 'gatsby',
|
26663
|
-
demo: 'https://gatsby.
|
26663
|
+
demo: 'https://gatsby.vercel.app',
|
26664
26664
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/gatsby.svg',
|
26665
26665
|
tagline: 'Gatsby helps developers build blazing fast websites and apps with React.',
|
26666
|
-
description: 'A Gatsby
|
26666
|
+
description: 'A Gatsby starter app with an API Route.',
|
26667
26667
|
website: 'https://gatsbyjs.org',
|
26668
26668
|
sort: 5,
|
26669
26669
|
envPrefix: 'GATSBY_',
|
@@ -26742,7 +26742,7 @@ exports.frameworks = [
|
|
26742
26742
|
{
|
26743
26743
|
name: 'Remix',
|
26744
26744
|
slug: 'remix',
|
26745
|
-
demo: 'https://remix.
|
26745
|
+
demo: 'https://remix-run-template.vercel.app',
|
26746
26746
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/remix-no-shadow.svg',
|
26747
26747
|
tagline: 'Build Better Websites',
|
26748
26748
|
description: 'A new Remix app — the result of running `npx create-remix`.',
|
@@ -26811,7 +26811,7 @@ exports.frameworks = [
|
|
26811
26811
|
{
|
26812
26812
|
name: 'Hexo',
|
26813
26813
|
slug: 'hexo',
|
26814
|
-
demo: 'https://hexo.
|
26814
|
+
demo: 'https://hexo-template.vercel.app',
|
26815
26815
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/hexo.svg',
|
26816
26816
|
tagline: 'Hexo is a fast, simple & powerful blog framework powered by Node.js.',
|
26817
26817
|
description: 'A Hexo site, created with the Hexo CLI.',
|
@@ -26846,7 +26846,7 @@ exports.frameworks = [
|
|
26846
26846
|
{
|
26847
26847
|
name: 'Eleventy',
|
26848
26848
|
slug: 'eleventy',
|
26849
|
-
demo: 'https://eleventy.
|
26849
|
+
demo: 'https://eleventy-template.vercel.app',
|
26850
26850
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/eleventy.svg',
|
26851
26851
|
tagline: '11ty is a simpler static site generator written in JavaScript, created to be an alternative to Jekyll.',
|
26852
26852
|
description: 'An Eleventy site, created with npm init.',
|
@@ -26882,7 +26882,7 @@ exports.frameworks = [
|
|
26882
26882
|
{
|
26883
26883
|
name: 'Docusaurus 2',
|
26884
26884
|
slug: 'docusaurus-2',
|
26885
|
-
demo: 'https://docusaurus-2.
|
26885
|
+
demo: 'https://docusaurus-2-template.vercel.app',
|
26886
26886
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/docusaurus.svg',
|
26887
26887
|
tagline: 'Docusaurus makes it easy to maintain Open Source documentation websites.',
|
26888
26888
|
description: 'A static Docusaurus site that makes it easy to maintain OSS documentation.',
|
@@ -27011,7 +27011,7 @@ exports.frameworks = [
|
|
27011
27011
|
{
|
27012
27012
|
name: 'Docusaurus 1',
|
27013
27013
|
slug: 'docusaurus',
|
27014
|
-
demo: 'https://docusaurus.
|
27014
|
+
demo: 'https://docusaurus-template.vercel.app',
|
27015
27015
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/docusaurus.svg',
|
27016
27016
|
tagline: 'Docusaurus makes it easy to maintain Open Source documentation websites.',
|
27017
27017
|
description: 'A static Docusaurus site that makes it easy to maintain OSS documentation.',
|
@@ -27060,7 +27060,7 @@ exports.frameworks = [
|
|
27060
27060
|
{
|
27061
27061
|
name: 'Preact',
|
27062
27062
|
slug: 'preact',
|
27063
|
-
demo: 'https://preact.
|
27063
|
+
demo: 'https://preact-template.vercel.app',
|
27064
27064
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/preact.svg',
|
27065
27065
|
tagline: 'Preact is a fast 3kB alternative to React with the same modern API.',
|
27066
27066
|
description: 'A Preact app, created with the Preact CLI.',
|
@@ -27111,7 +27111,7 @@ exports.frameworks = [
|
|
27111
27111
|
{
|
27112
27112
|
name: 'SolidStart',
|
27113
27113
|
slug: 'solidstart',
|
27114
|
-
demo: 'https://
|
27114
|
+
demo: 'https://solid-start-template.vercel.app',
|
27115
27115
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/solid.svg',
|
27116
27116
|
tagline: 'Simple and performant reactivity for building user interfaces.',
|
27117
27117
|
description: 'A Solid app, created with SolidStart.',
|
@@ -27149,7 +27149,7 @@ exports.frameworks = [
|
|
27149
27149
|
{
|
27150
27150
|
name: 'Dojo',
|
27151
27151
|
slug: 'dojo',
|
27152
|
-
demo: 'https://dojo.
|
27152
|
+
demo: 'https://dojo-template.vercel.app',
|
27153
27153
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/dojo.png',
|
27154
27154
|
tagline: 'Dojo is a modern progressive, TypeScript first framework.',
|
27155
27155
|
description: "A Dojo app, created with the Dojo CLI's cli-create-app command.",
|
@@ -27216,7 +27216,7 @@ exports.frameworks = [
|
|
27216
27216
|
{
|
27217
27217
|
name: 'Ember.js',
|
27218
27218
|
slug: 'ember',
|
27219
|
-
demo: 'https://ember.
|
27219
|
+
demo: 'https://ember-template.vercel.app',
|
27220
27220
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/ember.svg',
|
27221
27221
|
tagline: 'Ember.js helps webapp developers be more productive out of the box.',
|
27222
27222
|
description: 'An Ember app, created with the Ember CLI.',
|
@@ -27267,7 +27267,7 @@ exports.frameworks = [
|
|
27267
27267
|
{
|
27268
27268
|
name: 'Vue.js',
|
27269
27269
|
slug: 'vue',
|
27270
|
-
demo: 'https://vue.
|
27270
|
+
demo: 'https://vue-template.vercel.app',
|
27271
27271
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/vue.svg',
|
27272
27272
|
tagline: 'Vue.js is a versatile JavaScript framework that is as approachable as it is performant.',
|
27273
27273
|
description: 'A Vue.js app, created with the Vue CLI.',
|
@@ -27343,7 +27343,7 @@ exports.frameworks = [
|
|
27343
27343
|
{
|
27344
27344
|
name: 'Scully',
|
27345
27345
|
slug: 'scully',
|
27346
|
-
demo: 'https://scully.
|
27346
|
+
demo: 'https://scully-template.vercel.app',
|
27347
27347
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/scullyio-logo.png',
|
27348
27348
|
tagline: 'Scully is a static site generator for Angular.',
|
27349
27349
|
description: 'The Static Site Generator for Angular apps.',
|
@@ -27378,7 +27378,7 @@ exports.frameworks = [
|
|
27378
27378
|
{
|
27379
27379
|
name: 'Ionic Angular',
|
27380
27380
|
slug: 'ionic-angular',
|
27381
|
-
demo: 'https://ionic-angular.
|
27381
|
+
demo: 'https://ionic-angular-template.vercel.app',
|
27382
27382
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/ionic.svg',
|
27383
27383
|
tagline: 'Ionic Angular allows you to build mobile PWAs with Angular and the Ionic Framework.',
|
27384
27384
|
description: 'An Ionic Angular site, created with the Ionic CLI.',
|
@@ -27428,7 +27428,7 @@ exports.frameworks = [
|
|
27428
27428
|
{
|
27429
27429
|
name: 'Angular',
|
27430
27430
|
slug: 'angular',
|
27431
|
-
demo: 'https://angular.
|
27431
|
+
demo: 'https://angular-template.vercel.app',
|
27432
27432
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/angular.svg',
|
27433
27433
|
tagline: 'Angular is a TypeScript-based cross-platform framework from Google.',
|
27434
27434
|
description: 'An Angular app, created with the Angular CLI.',
|
@@ -27493,7 +27493,7 @@ exports.frameworks = [
|
|
27493
27493
|
{
|
27494
27494
|
name: 'Polymer',
|
27495
27495
|
slug: 'polymer',
|
27496
|
-
demo: 'https://polymer.
|
27496
|
+
demo: 'https://polymer-template.vercel.app',
|
27497
27497
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/polymer.svg',
|
27498
27498
|
tagline: 'Polymer is an open-source webapps library from Google, for building using Web Components.',
|
27499
27499
|
description: 'A Polymer app, created with the Polymer CLI.',
|
@@ -27556,7 +27556,7 @@ exports.frameworks = [
|
|
27556
27556
|
{
|
27557
27557
|
name: 'Svelte',
|
27558
27558
|
slug: 'svelte',
|
27559
|
-
demo: 'https://svelte.
|
27559
|
+
demo: 'https://svelte.vercel.app',
|
27560
27560
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/svelte.svg',
|
27561
27561
|
tagline: 'Svelte lets you write high performance reactive apps with significantly less boilerplate.',
|
27562
27562
|
description: 'A basic Svelte app using the default template.',
|
@@ -27611,10 +27611,10 @@ exports.frameworks = [
|
|
27611
27611
|
{
|
27612
27612
|
name: 'SvelteKit',
|
27613
27613
|
slug: 'sveltekit',
|
27614
|
-
demo: 'https://sveltekit.
|
27614
|
+
demo: 'https://sveltekit-template.vercel.app',
|
27615
27615
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/svelte.svg',
|
27616
27616
|
tagline: 'SvelteKit is a framework for building web applications of all sizes.',
|
27617
|
-
description: 'A SvelteKit app optimized
|
27617
|
+
description: 'A SvelteKit app optimized Edge-first.',
|
27618
27618
|
website: 'https://kit.svelte.dev',
|
27619
27619
|
envPrefix: 'VITE_',
|
27620
27620
|
detectors: {
|
@@ -27646,7 +27646,7 @@ exports.frameworks = [
|
|
27646
27646
|
{
|
27647
27647
|
name: 'Ionic React',
|
27648
27648
|
slug: 'ionic-react',
|
27649
|
-
demo: 'https://ionic-react.
|
27649
|
+
demo: 'https://ionic-react-template.vercel.app',
|
27650
27650
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/ionic.svg',
|
27651
27651
|
tagline: 'Ionic React allows you to build mobile PWAs with React and the Ionic Framework.',
|
27652
27652
|
description: 'An Ionic React site, created with the Ionic CLI.',
|
@@ -27744,10 +27744,10 @@ exports.frameworks = [
|
|
27744
27744
|
{
|
27745
27745
|
name: 'Create React App',
|
27746
27746
|
slug: 'create-react-app',
|
27747
|
-
demo: 'https://react-
|
27747
|
+
demo: 'https://create-react-template.vercel.app',
|
27748
27748
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/react.svg',
|
27749
27749
|
tagline: 'Create React App allows you to get going with React in no time.',
|
27750
|
-
description: 'A React app
|
27750
|
+
description: 'A client-side React app created with create-react-app.',
|
27751
27751
|
website: 'https://create-react-app.dev',
|
27752
27752
|
sort: 4,
|
27753
27753
|
envPrefix: 'REACT_APP_',
|
@@ -27848,7 +27848,7 @@ exports.frameworks = [
|
|
27848
27848
|
{
|
27849
27849
|
name: 'Gridsome',
|
27850
27850
|
slug: 'gridsome',
|
27851
|
-
demo: 'https://gridsome.
|
27851
|
+
demo: 'https://gridsome-template.vercel.app',
|
27852
27852
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/gridsome.svg',
|
27853
27853
|
tagline: 'Gridsome is a Vue.js-powered framework for building websites & apps that are fast by default.',
|
27854
27854
|
description: 'A Gridsome app, created with the Gridsome CLI.',
|
@@ -27883,7 +27883,7 @@ exports.frameworks = [
|
|
27883
27883
|
{
|
27884
27884
|
name: 'UmiJS',
|
27885
27885
|
slug: 'umijs',
|
27886
|
-
demo: 'https://umijs.
|
27886
|
+
demo: 'https://umijs-template.vercel.app',
|
27887
27887
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/umi.svg',
|
27888
27888
|
tagline: 'UmiJS is an extensible enterprise-level React application framework.',
|
27889
27889
|
description: 'An UmiJS app, created using the Umi CLI.',
|
@@ -27934,7 +27934,7 @@ exports.frameworks = [
|
|
27934
27934
|
{
|
27935
27935
|
name: 'Sapper',
|
27936
27936
|
slug: 'sapper',
|
27937
|
-
demo: 'https://sapper.
|
27937
|
+
demo: 'https://sapper-template.vercel.app',
|
27938
27938
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/svelte.svg',
|
27939
27939
|
tagline: 'Sapper is a framework for building high-performance universal web apps with Svelte.',
|
27940
27940
|
description: 'A Sapper app, using the Sapper template.',
|
@@ -27969,7 +27969,7 @@ exports.frameworks = [
|
|
27969
27969
|
{
|
27970
27970
|
name: 'Saber',
|
27971
27971
|
slug: 'saber',
|
27972
|
-
demo: 'https://saber.
|
27972
|
+
demo: 'https://saber-template.vercel.app',
|
27973
27973
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/saber.svg',
|
27974
27974
|
tagline: 'Saber is a framework for building static sites in Vue.js that supports data from any source.',
|
27975
27975
|
description: 'A Saber site, created with npm init.',
|
@@ -28035,7 +28035,7 @@ exports.frameworks = [
|
|
28035
28035
|
{
|
28036
28036
|
name: 'Stencil',
|
28037
28037
|
slug: 'stencil',
|
28038
|
-
demo: 'https://stencil.
|
28038
|
+
demo: 'https://stencil.vercel.app',
|
28039
28039
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/stencil.svg',
|
28040
28040
|
tagline: 'Stencil is a powerful toolchain for building Progressive Web Apps and Design Systems.',
|
28041
28041
|
description: 'A Stencil site, created with the Stencil CLI.',
|
@@ -28120,7 +28120,7 @@ exports.frameworks = [
|
|
28120
28120
|
{
|
28121
28121
|
name: 'Nuxt.js',
|
28122
28122
|
slug: 'nuxtjs',
|
28123
|
-
demo: 'https://nuxtjs.
|
28123
|
+
demo: 'https://nuxtjs-template.vercel.app',
|
28124
28124
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/nuxt.svg',
|
28125
28125
|
tagline: 'Nuxt.js is the web comprehensive framework that lets you dream big with Vue.js.',
|
28126
28126
|
description: 'A Nuxt.js app, bootstrapped with create-nuxt-app.',
|
@@ -28176,7 +28176,7 @@ exports.frameworks = [
|
|
28176
28176
|
{
|
28177
28177
|
name: 'RedwoodJS',
|
28178
28178
|
slug: 'redwoodjs',
|
28179
|
-
demo: 'https://
|
28179
|
+
demo: 'https://redwood-template.vercel.app',
|
28180
28180
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/redwoodjs.svg',
|
28181
28181
|
tagline: 'RedwoodJS is a full-stack framework for the Jamstack.',
|
28182
28182
|
description: 'A RedwoodJS app, bootstraped with create-redwood-app.',
|
@@ -28212,7 +28212,7 @@ exports.frameworks = [
|
|
28212
28212
|
{
|
28213
28213
|
name: 'Hugo',
|
28214
28214
|
slug: 'hugo',
|
28215
|
-
demo: 'https://hugo.
|
28215
|
+
demo: 'https://hugo-template.vercel.app',
|
28216
28216
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/hugo.svg',
|
28217
28217
|
tagline: 'Hugo is the world’s fastest framework for building websites, written in Go.',
|
28218
28218
|
description: 'A Hugo site, created with the Hugo CLI.',
|
@@ -28260,7 +28260,7 @@ exports.frameworks = [
|
|
28260
28260
|
{
|
28261
28261
|
name: 'Jekyll',
|
28262
28262
|
slug: 'jekyll',
|
28263
|
-
demo: 'https://jekyll.
|
28263
|
+
demo: 'https://jekyll-template.vercel.app',
|
28264
28264
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/jekyll.svg',
|
28265
28265
|
tagline: 'Jekyll makes it super easy to transform your plain text into static websites and blogs.',
|
28266
28266
|
description: 'A Jekyll site, created with the Jekyll CLI.',
|
@@ -28297,7 +28297,7 @@ exports.frameworks = [
|
|
28297
28297
|
{
|
28298
28298
|
name: 'Brunch',
|
28299
28299
|
slug: 'brunch',
|
28300
|
-
demo: 'https://brunch.
|
28300
|
+
demo: 'https://brunch-template.vercel.app',
|
28301
28301
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/brunch.svg',
|
28302
28302
|
tagline: 'Brunch is a fast and simple webapp build tool with seamless incremental compilation for rapid development.',
|
28303
28303
|
description: 'A Brunch app, created with the Brunch CLI.',
|
@@ -28330,7 +28330,7 @@ exports.frameworks = [
|
|
28330
28330
|
{
|
28331
28331
|
name: 'Middleman',
|
28332
28332
|
slug: 'middleman',
|
28333
|
-
demo: 'https://middleman.
|
28333
|
+
demo: 'https://middleman-template.vercel.app',
|
28334
28334
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/middleman.svg',
|
28335
28335
|
tagline: 'Middleman is a static site generator that uses all the shortcuts and tools in modern web development.',
|
28336
28336
|
description: 'A Middleman app, created with the Middleman CLI.',
|
@@ -28364,7 +28364,7 @@ exports.frameworks = [
|
|
28364
28364
|
{
|
28365
28365
|
name: 'Zola',
|
28366
28366
|
slug: 'zola',
|
28367
|
-
demo: 'https://zola.
|
28367
|
+
demo: 'https://zola-template.vercel.app',
|
28368
28368
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/zola.png',
|
28369
28369
|
tagline: 'Everything you need to make a static site engine in one binary.',
|
28370
28370
|
description: 'A Zola app, created with the "Getting Started" tutorial.',
|
@@ -28398,7 +28398,7 @@ exports.frameworks = [
|
|
28398
28398
|
{
|
28399
28399
|
name: 'Vite',
|
28400
28400
|
slug: 'vite',
|
28401
|
-
demo: 'https://vite.
|
28401
|
+
demo: 'https://vite-vue-template.vercel.app',
|
28402
28402
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/vite.svg',
|
28403
28403
|
tagline: 'Vite is a new breed of frontend build tool that significantly improves the frontend development experience.',
|
28404
28404
|
description: 'A Vue.js app, created with Vite.',
|
@@ -28422,7 +28422,7 @@ exports.frameworks = [
|
|
28422
28422
|
},
|
28423
28423
|
devCommand: {
|
28424
28424
|
placeholder: 'vite',
|
28425
|
-
value: 'vite',
|
28425
|
+
value: 'vite --port $PORT',
|
28426
28426
|
},
|
28427
28427
|
outputDirectory: {
|
28428
28428
|
value: 'dist',
|
@@ -28434,7 +28434,7 @@ exports.frameworks = [
|
|
28434
28434
|
{
|
28435
28435
|
name: 'Parcel',
|
28436
28436
|
slug: 'parcel',
|
28437
|
-
demo: 'https://parcel.
|
28437
|
+
demo: 'https://parcel-template.vercel.app',
|
28438
28438
|
logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/parcel.png',
|
28439
28439
|
tagline: 'Parcel is a zero configuration build tool for the web that scales to projects of any size and complexity.',
|
28440
28440
|
description: 'A vanilla web app built with Parcel.',
|
@@ -32713,312 +32713,6 @@ module.exports = new Type('tag:yaml.org,2002:timestamp', {
|
|
32713
32713
|
});
|
32714
32714
|
|
32715
32715
|
|
32716
|
-
/***/ }),
|
32717
|
-
|
32718
|
-
/***/ 7276:
|
32719
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
32720
|
-
|
32721
|
-
"use strict";
|
32722
|
-
|
32723
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
32724
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
32725
|
-
};
|
32726
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
32727
|
-
exports._experimental_updateRoutesManifest = exports._experimental_updateFunctionsManifest = exports._experimental_convertRuntimeToPlugin = void 0;
|
32728
|
-
const fs_extra_1 = __importDefault(__webpack_require__(5392));
|
32729
|
-
const path_1 = __webpack_require__(5622);
|
32730
|
-
const glob_1 = __importDefault(__webpack_require__(4240));
|
32731
|
-
const normalize_path_1 = __webpack_require__(6261);
|
32732
|
-
const lambda_1 = __webpack_require__(6721);
|
32733
|
-
const _1 = __webpack_require__(2855);
|
32734
|
-
// `.output` was already created by the Build Command, so we have
|
32735
|
-
// to ensure its contents don't get bundled into the Lambda. Similarily,
|
32736
|
-
// we don't want to bundle anything from `.vercel` either. Lastly,
|
32737
|
-
// Builders/Runtimes didn't have `vercel.json` or `now.json`.
|
32738
|
-
const ignoredPaths = ['.output', '.vercel', 'vercel.json', 'now.json'];
|
32739
|
-
const shouldIgnorePath = (file, ignoreFilter, ignoreFile) => {
|
32740
|
-
const isNative = ignoredPaths.some(item => {
|
32741
|
-
return file.startsWith(item);
|
32742
|
-
});
|
32743
|
-
if (!ignoreFile) {
|
32744
|
-
return isNative;
|
32745
|
-
}
|
32746
|
-
return isNative || ignoreFilter(file);
|
32747
|
-
};
|
32748
|
-
const getSourceFiles = async (workPath, ignoreFilter) => {
|
32749
|
-
const list = await glob_1.default('**', {
|
32750
|
-
cwd: workPath,
|
32751
|
-
});
|
32752
|
-
// We're not passing this as an `ignore` filter to the `glob` function above,
|
32753
|
-
// so that we can re-use exactly the same `getIgnoreFilter` method that the
|
32754
|
-
// Build Step uses (literally the same code). Note that this exclusion only applies
|
32755
|
-
// when deploying. Locally, another exclusion is needed, which is handled
|
32756
|
-
// further below in the `convertRuntimeToPlugin` function.
|
32757
|
-
for (const file in list) {
|
32758
|
-
if (shouldIgnorePath(file, ignoreFilter, true)) {
|
32759
|
-
delete list[file];
|
32760
|
-
}
|
32761
|
-
}
|
32762
|
-
return list;
|
32763
|
-
};
|
32764
|
-
/**
|
32765
|
-
* Convert legacy Runtime to a Plugin.
|
32766
|
-
* @param buildRuntime - a legacy build() function from a Runtime
|
32767
|
-
* @param packageName - the name of the package, for example `vercel-plugin-python`
|
32768
|
-
* @param ext - the file extension, for example `.py`
|
32769
|
-
*/
|
32770
|
-
function _experimental_convertRuntimeToPlugin(buildRuntime, packageName, ext) {
|
32771
|
-
// This `build()` signature should match `plugin.build()` signature in `vercel build`.
|
32772
|
-
return async function build({ workPath }) {
|
32773
|
-
// We also don't want to provide any files to Runtimes that were ignored
|
32774
|
-
// through `.vercelignore` or `.nowignore`, because the Build Step does the same.
|
32775
|
-
const ignoreFilter = await _1.getIgnoreFilter(workPath);
|
32776
|
-
// Retrieve the files that are currently available on the File System,
|
32777
|
-
// before the Legacy Runtime has even started to build.
|
32778
|
-
const sourceFilesPreBuild = await getSourceFiles(workPath, ignoreFilter);
|
32779
|
-
// Instead of doing another `glob` to get all the matching source files,
|
32780
|
-
// we'll filter the list of existing files down to only the ones
|
32781
|
-
// that are matching the entrypoint pattern, so we're first creating
|
32782
|
-
// a clean new list to begin.
|
32783
|
-
const entrypoints = Object.assign({}, sourceFilesPreBuild);
|
32784
|
-
const entrypointMatch = new RegExp(`^api/.*${ext}$`);
|
32785
|
-
// Up next, we'll strip out the files from the list of entrypoints
|
32786
|
-
// that aren't actually considered entrypoints.
|
32787
|
-
for (const file in entrypoints) {
|
32788
|
-
if (!entrypointMatch.test(file)) {
|
32789
|
-
delete entrypoints[file];
|
32790
|
-
}
|
32791
|
-
}
|
32792
|
-
const pages = {};
|
32793
|
-
const pluginName = packageName.replace('vercel-plugin-', '');
|
32794
|
-
const outputPath = path_1.join(workPath, '.output');
|
32795
|
-
const traceDir = path_1.join(outputPath, `inputs`,
|
32796
|
-
// Legacy Runtimes can only provide API Routes, so that's
|
32797
|
-
// why we can use this prefix for all of them. Here, we have to
|
32798
|
-
// make sure to not use a cryptic hash name, because people
|
32799
|
-
// need to be able to easily inspect the output.
|
32800
|
-
`api-routes-${pluginName}`);
|
32801
|
-
await fs_extra_1.default.ensureDir(traceDir);
|
32802
|
-
const entryRoot = path_1.join(outputPath, 'server', 'pages');
|
32803
|
-
for (const entrypoint of Object.keys(entrypoints)) {
|
32804
|
-
const { output } = await buildRuntime({
|
32805
|
-
files: sourceFilesPreBuild,
|
32806
|
-
entrypoint,
|
32807
|
-
workPath,
|
32808
|
-
config: {
|
32809
|
-
zeroConfig: true,
|
32810
|
-
},
|
32811
|
-
meta: {
|
32812
|
-
avoidTopLevelInstall: true,
|
32813
|
-
skipDownload: true,
|
32814
|
-
},
|
32815
|
-
});
|
32816
|
-
// @ts-ignore This symbol is a private API
|
32817
|
-
const lambdaFiles = output[lambda_1.FILES_SYMBOL];
|
32818
|
-
// When deploying, the `files` that are passed to the Legacy Runtimes already
|
32819
|
-
// have certain files that are ignored stripped, but locally, that list of
|
32820
|
-
// files isn't used by the Legacy Runtimes, so we need to apply the filters
|
32821
|
-
// to the outputs that they are returning instead.
|
32822
|
-
for (const file in lambdaFiles) {
|
32823
|
-
if (shouldIgnorePath(file, ignoreFilter, false)) {
|
32824
|
-
delete lambdaFiles[file];
|
32825
|
-
}
|
32826
|
-
}
|
32827
|
-
let handlerFileBase = output.handler;
|
32828
|
-
let handlerFile = lambdaFiles[handlerFileBase];
|
32829
|
-
let handlerHasImport = false;
|
32830
|
-
const { handler } = output;
|
32831
|
-
const handlerMethod = handler.split('.').pop();
|
32832
|
-
const handlerFileName = handler.replace(`.${handlerMethod}`, '');
|
32833
|
-
// For compiled languages, the launcher file for the Lambda generated
|
32834
|
-
// by the Legacy Runtime matches the `handler` defined for it, but for
|
32835
|
-
// interpreted languages, the `handler` consists of the launcher file name
|
32836
|
-
// without an extension, plus the name of the method inside of that file
|
32837
|
-
// that should be invoked, so we have to construct the file path explicitly.
|
32838
|
-
if (!handlerFile) {
|
32839
|
-
handlerFileBase = handlerFileName + ext;
|
32840
|
-
handlerFile = lambdaFiles[handlerFileBase];
|
32841
|
-
handlerHasImport = true;
|
32842
|
-
}
|
32843
|
-
if (!handlerFile || !handlerFile.fsPath) {
|
32844
|
-
throw new Error(`Could not find a handler file. Please ensure that \`files\` for the returned \`Lambda\` contains an \`FileFsRef\` named "${handlerFileBase}" with a valid \`fsPath\`.`);
|
32845
|
-
}
|
32846
|
-
const handlerExtName = path_1.extname(handlerFile.fsPath);
|
32847
|
-
const entryBase = path_1.basename(entrypoint).replace(ext, handlerExtName);
|
32848
|
-
const entryPath = path_1.join(path_1.dirname(entrypoint), entryBase);
|
32849
|
-
const entry = path_1.join(entryRoot, entryPath);
|
32850
|
-
// Create the parent directory of the API Route that will be created
|
32851
|
-
// for the current entrypoint inside of `.output/server/pages/api`.
|
32852
|
-
await fs_extra_1.default.ensureDir(path_1.dirname(entry));
|
32853
|
-
// For compiled languages, the launcher file will be binary and therefore
|
32854
|
-
// won't try to import a user-provided request handler (instead, it will
|
32855
|
-
// contain it). But for interpreted languages, the launcher might try to
|
32856
|
-
// load a user-provided request handler from the source file instead of bundling
|
32857
|
-
// it, so we have to adjust the import statement inside the launcher to point
|
32858
|
-
// to the respective source file. Previously, Legacy Runtimes simply expected
|
32859
|
-
// the user-provided request-handler to be copied right next to the launcher,
|
32860
|
-
// but with the new File System API, files won't be moved around unnecessarily.
|
32861
|
-
if (handlerHasImport) {
|
32862
|
-
const { fsPath } = handlerFile;
|
32863
|
-
const encoding = 'utf-8';
|
32864
|
-
// This is the true directory of the user-provided request handler in the
|
32865
|
-
// source files, so that's what we will use as an import path in the launcher.
|
32866
|
-
const locationPrefix = path_1.relative(entry, outputPath);
|
32867
|
-
let handlerContent = await fs_extra_1.default.readFile(fsPath, encoding);
|
32868
|
-
const importPaths = [
|
32869
|
-
// This is the full entrypoint path, like `./api/test.py`. In our tests
|
32870
|
-
// Python didn't support importing from a parent directory without using different
|
32871
|
-
// code in the launcher that registers it as a location for modules and then changing
|
32872
|
-
// the importing syntax, but continuing to import it like before seems to work. If
|
32873
|
-
// other languages need this, we should consider excluding Python explicitly.
|
32874
|
-
// `./${entrypoint}`,
|
32875
|
-
// This is the entrypoint path without extension, like `api/test`
|
32876
|
-
entrypoint.slice(0, -ext.length),
|
32877
|
-
];
|
32878
|
-
// Generate a list of regular expressions that we can use for
|
32879
|
-
// finding matches, but only allow matches if the import path is
|
32880
|
-
// wrapped inside single (') or double quotes (").
|
32881
|
-
const patterns = importPaths.map(path => {
|
32882
|
-
// eslint-disable-next-line no-useless-escape
|
32883
|
-
return new RegExp(`('|")(${path.replace(/\./g, '\\.')})('|")`, 'g');
|
32884
|
-
});
|
32885
|
-
let replacedMatch = null;
|
32886
|
-
for (const pattern of patterns) {
|
32887
|
-
const newContent = handlerContent.replace(pattern, (_, p1, p2, p3) => {
|
32888
|
-
return `${p1}${path_1.join(locationPrefix, p2)}${p3}`;
|
32889
|
-
});
|
32890
|
-
if (newContent !== handlerContent) {
|
32891
|
-
_1.debug(`Replaced "${pattern}" inside "${entry}" to ensure correct import of user-provided request handler`);
|
32892
|
-
handlerContent = newContent;
|
32893
|
-
replacedMatch = true;
|
32894
|
-
}
|
32895
|
-
}
|
32896
|
-
if (!replacedMatch) {
|
32897
|
-
new Error(`No replacable matches for "${importPaths[0]}" or "${importPaths[1]}" found in "${fsPath}"`);
|
32898
|
-
}
|
32899
|
-
await fs_extra_1.default.writeFile(entry, handlerContent, encoding);
|
32900
|
-
}
|
32901
|
-
else {
|
32902
|
-
await fs_extra_1.default.copy(handlerFile.fsPath, entry);
|
32903
|
-
}
|
32904
|
-
// Legacy Runtimes based on interpreted languages will create a new launcher file
|
32905
|
-
// for every entrypoint, but they will create each one inside `workPath`, which means that
|
32906
|
-
// the launcher for one entrypoint will overwrite the launcher provided for the previous
|
32907
|
-
// entrypoint. That's why, above, we copy the file contents into the new destination (and
|
32908
|
-
// optionally transform them along the way), instead of linking. We then also want to remove
|
32909
|
-
// the copy origin right here, so that the `workPath` doesn't contain a useless launcher file
|
32910
|
-
// once the build has finished running.
|
32911
|
-
await fs_extra_1.default.remove(handlerFile.fsPath);
|
32912
|
-
_1.debug(`Removed temporary file "${handlerFile.fsPath}"`);
|
32913
|
-
const nft = `${entry}.nft.json`;
|
32914
|
-
const json = JSON.stringify({
|
32915
|
-
version: 2,
|
32916
|
-
files: Object.keys(lambdaFiles)
|
32917
|
-
.map(file => {
|
32918
|
-
const { fsPath } = lambdaFiles[file];
|
32919
|
-
if (!fsPath) {
|
32920
|
-
throw new Error(`File "${file}" is missing valid \`fsPath\` property`);
|
32921
|
-
}
|
32922
|
-
// The handler was already moved into position above.
|
32923
|
-
if (file === handlerFileBase) {
|
32924
|
-
return;
|
32925
|
-
}
|
32926
|
-
return normalize_path_1.normalizePath(path_1.relative(path_1.dirname(nft), fsPath));
|
32927
|
-
})
|
32928
|
-
.filter(Boolean),
|
32929
|
-
});
|
32930
|
-
await fs_extra_1.default.writeFile(nft, json);
|
32931
|
-
// Add an entry that will later on be added to the `functions-manifest.json`
|
32932
|
-
// file that is placed inside of the `.output` directory.
|
32933
|
-
pages[normalize_path_1.normalizePath(entryPath)] = {
|
32934
|
-
// Because the underlying file used as a handler was placed
|
32935
|
-
// inside `.output/server/pages/api`, it no longer has the name it originally
|
32936
|
-
// had and is now named after the API Route that it's responsible for,
|
32937
|
-
// so we have to adjust the name of the Lambda handler accordingly.
|
32938
|
-
handler: handler.replace(handlerFileName, path_1.parse(entry).name),
|
32939
|
-
runtime: output.runtime,
|
32940
|
-
memory: output.memory,
|
32941
|
-
maxDuration: output.maxDuration,
|
32942
|
-
environment: output.environment,
|
32943
|
-
allowQuery: output.allowQuery,
|
32944
|
-
};
|
32945
|
-
}
|
32946
|
-
// Add any Serverless Functions that were exposed by the Legacy Runtime
|
32947
|
-
// to the `functions-manifest.json` file provided in `.output`.
|
32948
|
-
await _experimental_updateFunctionsManifest({ workPath, pages });
|
32949
|
-
};
|
32950
|
-
}
|
32951
|
-
exports._experimental_convertRuntimeToPlugin = _experimental_convertRuntimeToPlugin;
|
32952
|
-
async function readJson(filePath) {
|
32953
|
-
try {
|
32954
|
-
const str = await fs_extra_1.default.readFile(filePath, 'utf8');
|
32955
|
-
return JSON.parse(str);
|
32956
|
-
}
|
32957
|
-
catch (err) {
|
32958
|
-
if (err.code === 'ENOENT') {
|
32959
|
-
return {};
|
32960
|
-
}
|
32961
|
-
throw err;
|
32962
|
-
}
|
32963
|
-
}
|
32964
|
-
/**
|
32965
|
-
* If `.output/functions-manifest.json` exists, append to the pages
|
32966
|
-
* property. Otherwise write a new file.
|
32967
|
-
*/
|
32968
|
-
async function _experimental_updateFunctionsManifest({ workPath, pages, }) {
|
32969
|
-
const functionsManifestPath = path_1.join(workPath, '.output', 'functions-manifest.json');
|
32970
|
-
const functionsManifest = await readJson(functionsManifestPath);
|
32971
|
-
if (!functionsManifest.version)
|
32972
|
-
functionsManifest.version = 2;
|
32973
|
-
if (!functionsManifest.pages)
|
32974
|
-
functionsManifest.pages = {};
|
32975
|
-
for (const [pageKey, pageConfig] of Object.entries(pages)) {
|
32976
|
-
functionsManifest.pages[pageKey] = { ...pageConfig };
|
32977
|
-
}
|
32978
|
-
await fs_extra_1.default.writeFile(functionsManifestPath, JSON.stringify(functionsManifest));
|
32979
|
-
}
|
32980
|
-
exports._experimental_updateFunctionsManifest = _experimental_updateFunctionsManifest;
|
32981
|
-
/**
|
32982
|
-
* Append routes to the `routes-manifest.json` file.
|
32983
|
-
* If the file does not exist, it will be created.
|
32984
|
-
*/
|
32985
|
-
async function _experimental_updateRoutesManifest({ workPath, redirects, rewrites, headers, dynamicRoutes, staticRoutes, }) {
|
32986
|
-
const routesManifestPath = path_1.join(workPath, '.output', 'routes-manifest.json');
|
32987
|
-
const routesManifest = await readJson(routesManifestPath);
|
32988
|
-
if (!routesManifest.version)
|
32989
|
-
routesManifest.version = 3;
|
32990
|
-
if (routesManifest.pages404 === undefined)
|
32991
|
-
routesManifest.pages404 = true;
|
32992
|
-
if (redirects) {
|
32993
|
-
if (!routesManifest.redirects)
|
32994
|
-
routesManifest.redirects = [];
|
32995
|
-
routesManifest.redirects.push(...redirects);
|
32996
|
-
}
|
32997
|
-
if (rewrites) {
|
32998
|
-
if (!routesManifest.rewrites)
|
32999
|
-
routesManifest.rewrites = [];
|
33000
|
-
routesManifest.rewrites.push(...rewrites);
|
33001
|
-
}
|
33002
|
-
if (headers) {
|
33003
|
-
if (!routesManifest.headers)
|
33004
|
-
routesManifest.headers = [];
|
33005
|
-
routesManifest.headers.push(...headers);
|
33006
|
-
}
|
33007
|
-
if (dynamicRoutes) {
|
33008
|
-
if (!routesManifest.dynamicRoutes)
|
33009
|
-
routesManifest.dynamicRoutes = [];
|
33010
|
-
routesManifest.dynamicRoutes.push(...dynamicRoutes);
|
33011
|
-
}
|
33012
|
-
if (staticRoutes) {
|
33013
|
-
if (!routesManifest.staticRoutes)
|
33014
|
-
routesManifest.staticRoutes = [];
|
33015
|
-
routesManifest.staticRoutes.push(...staticRoutes);
|
33016
|
-
}
|
33017
|
-
await fs_extra_1.default.writeFile(routesManifestPath, JSON.stringify(routesManifest));
|
33018
|
-
}
|
33019
|
-
exports._experimental_updateRoutesManifest = _experimental_updateRoutesManifest;
|
33020
|
-
|
33021
|
-
|
33022
32716
|
/***/ }),
|
33023
32717
|
|
33024
32718
|
/***/ 1868:
|
@@ -33027,9 +32721,9 @@ exports._experimental_updateRoutesManifest = _experimental_updateRoutesManifest;
|
|
33027
32721
|
"use strict";
|
33028
32722
|
|
33029
32723
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
33030
|
-
const
|
32724
|
+
const get_platform_env_1 = __webpack_require__(4678);
|
33031
32725
|
function debug(message, ...additional) {
|
33032
|
-
if (
|
32726
|
+
if (get_platform_env_1.getPlatformEnv('BUILDER_DEBUG')) {
|
33033
32727
|
console.log(message, ...additional);
|
33034
32728
|
}
|
33035
32729
|
}
|
@@ -34837,7 +34531,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
34837
34531
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
34838
34532
|
};
|
34839
34533
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
34840
|
-
exports.installDependencies = exports.getScriptName = exports.runPipInstall = exports.runBundleInstall = exports.runPackageJsonScript = exports.runNpmInstall = exports.walkParentDirs = exports.scanParentDirs = exports.getNodeVersion = exports.getSpawnOptions = exports.runShellScript = exports.getNodeBinPath = exports.execCommand = exports.spawnCommand = exports.execAsync = exports.spawnAsync = void 0;
|
34534
|
+
exports.installDependencies = exports.getScriptName = exports.runPipInstall = exports.runBundleInstall = exports.runPackageJsonScript = exports.runCustomInstallCommand = exports.getEnvForPackageManager = exports.runNpmInstall = exports.walkParentDirs = exports.scanParentDirs = exports.getNodeVersion = exports.getSpawnOptions = exports.runShellScript = exports.getNodeBinPath = exports.execCommand = exports.spawnCommand = exports.execAsync = exports.spawnAsync = void 0;
|
34841
34535
|
const assert_1 = __importDefault(__webpack_require__(2357));
|
34842
34536
|
const fs_extra_1 = __importDefault(__webpack_require__(5392));
|
34843
34537
|
const path_1 = __importDefault(__webpack_require__(5622));
|
@@ -35055,36 +34749,66 @@ async function runNpmInstall(destPath, args = [], spawnOpts, meta, nodeVersion)
|
|
35055
34749
|
const opts = { cwd: destPath, ...spawnOpts };
|
35056
34750
|
const env = opts.env ? { ...opts.env } : { ...process.env };
|
35057
34751
|
delete env.NODE_ENV;
|
35058
|
-
opts.env =
|
34752
|
+
opts.env = getEnvForPackageManager({
|
34753
|
+
cliType,
|
34754
|
+
lockfileVersion,
|
34755
|
+
nodeVersion,
|
34756
|
+
env,
|
34757
|
+
});
|
35059
34758
|
let commandArgs;
|
35060
34759
|
if (cliType === 'npm') {
|
35061
34760
|
opts.prettyCommand = 'npm install';
|
35062
34761
|
commandArgs = args
|
35063
34762
|
.filter(a => a !== '--prefer-offline')
|
35064
34763
|
.concat(['install', '--no-audit', '--unsafe-perm']);
|
35065
|
-
|
34764
|
+
}
|
34765
|
+
else {
|
34766
|
+
opts.prettyCommand = 'yarn install';
|
34767
|
+
commandArgs = ['install', ...args];
|
34768
|
+
}
|
34769
|
+
if (process.env.NPM_ONLY_PRODUCTION) {
|
34770
|
+
commandArgs.push('--production');
|
34771
|
+
}
|
34772
|
+
return spawnAsync(cliType, commandArgs, opts);
|
34773
|
+
}
|
34774
|
+
exports.runNpmInstall = runNpmInstall;
|
34775
|
+
function getEnvForPackageManager({ cliType, lockfileVersion, nodeVersion, env, }) {
|
34776
|
+
const newEnv = { ...env };
|
34777
|
+
if (cliType === 'npm') {
|
35066
34778
|
if (typeof lockfileVersion === 'number' &&
|
35067
34779
|
lockfileVersion >= 2 &&
|
35068
34780
|
((nodeVersion === null || nodeVersion === void 0 ? void 0 : nodeVersion.major) || 0) < 16) {
|
35069
34781
|
// Ensure that npm 7 is at the beginning of the `$PATH`
|
35070
|
-
|
34782
|
+
newEnv.PATH = `/node16/bin-npm7:${env.PATH}`;
|
35071
34783
|
console.log('Detected `package-lock.json` generated by npm 7...');
|
35072
34784
|
}
|
35073
34785
|
}
|
35074
34786
|
else {
|
35075
|
-
opts.prettyCommand = 'yarn install';
|
35076
|
-
commandArgs = ['install', ...args];
|
35077
34787
|
// Yarn v2 PnP mode may be activated, so force "node-modules" linker style
|
35078
34788
|
if (!env.YARN_NODE_LINKER) {
|
35079
|
-
|
34789
|
+
newEnv.YARN_NODE_LINKER = 'node-modules';
|
35080
34790
|
}
|
35081
34791
|
}
|
35082
|
-
|
35083
|
-
commandArgs.push('--production');
|
35084
|
-
}
|
35085
|
-
return spawnAsync(cliType, commandArgs, opts);
|
34792
|
+
return newEnv;
|
35086
34793
|
}
|
35087
|
-
exports.
|
34794
|
+
exports.getEnvForPackageManager = getEnvForPackageManager;
|
34795
|
+
async function runCustomInstallCommand({ destPath, installCommand, nodeVersion, spawnOpts, }) {
|
34796
|
+
console.log(`Running "install" command: \`${installCommand}\`...`);
|
34797
|
+
const { cliType, lockfileVersion } = await scanParentDirs(destPath);
|
34798
|
+
const env = getEnvForPackageManager({
|
34799
|
+
cliType,
|
34800
|
+
lockfileVersion,
|
34801
|
+
nodeVersion,
|
34802
|
+
env: (spawnOpts === null || spawnOpts === void 0 ? void 0 : spawnOpts.env) || {},
|
34803
|
+
});
|
34804
|
+
debug_1.default(`Running with $PATH:`, (env === null || env === void 0 ? void 0 : env.PATH) || '');
|
34805
|
+
await execCommand(installCommand, {
|
34806
|
+
...spawnOpts,
|
34807
|
+
env,
|
34808
|
+
cwd: destPath,
|
34809
|
+
});
|
34810
|
+
}
|
34811
|
+
exports.runCustomInstallCommand = runCustomInstallCommand;
|
35088
34812
|
async function runPackageJsonScript(destPath, scriptNames, spawnOpts) {
|
35089
34813
|
assert_1.default(path_1.default.isAbsolute(destPath));
|
35090
34814
|
const { packageJson, cliType, lockfileVersion } = await scanParentDirs(destPath, true);
|
@@ -35093,21 +34817,24 @@ async function runPackageJsonScript(destPath, scriptNames, spawnOpts) {
|
|
35093
34817
|
return false;
|
35094
34818
|
debug_1.default('Running user script...');
|
35095
34819
|
const runScriptTime = Date.now();
|
35096
|
-
const opts = {
|
35097
|
-
|
34820
|
+
const opts = {
|
34821
|
+
cwd: destPath,
|
34822
|
+
...spawnOpts,
|
34823
|
+
env: getEnvForPackageManager({
|
34824
|
+
cliType,
|
34825
|
+
lockfileVersion,
|
34826
|
+
nodeVersion: undefined,
|
34827
|
+
env: {
|
34828
|
+
...process.env,
|
34829
|
+
...spawnOpts === null || spawnOpts === void 0 ? void 0 : spawnOpts.env,
|
34830
|
+
},
|
34831
|
+
}),
|
34832
|
+
};
|
35098
34833
|
if (cliType === 'npm') {
|
35099
34834
|
opts.prettyCommand = `npm run ${scriptName}`;
|
35100
|
-
if (typeof lockfileVersion === 'number' && lockfileVersion >= 2) {
|
35101
|
-
// Ensure that npm 7 is at the beginning of the `$PATH`
|
35102
|
-
env.PATH = `/node16/bin-npm7:${env.PATH}`;
|
35103
|
-
}
|
35104
34835
|
}
|
35105
34836
|
else {
|
35106
34837
|
opts.prettyCommand = `yarn run ${scriptName}`;
|
35107
|
-
// Yarn v2 PnP mode may be activated, so force "node-modules" linker style
|
35108
|
-
if (!env.YARN_NODE_LINKER) {
|
35109
|
-
env.YARN_NODE_LINKER = 'node-modules';
|
35110
|
-
}
|
35111
34838
|
}
|
35112
34839
|
console.log(`Running "${opts.prettyCommand}"`);
|
35113
34840
|
await spawnAsync(cliType, ['run', scriptName], opts);
|
@@ -35257,6 +34984,40 @@ async function default_1(downloadPath, rootDirectory) {
|
|
35257
34984
|
exports.default = default_1;
|
35258
34985
|
|
35259
34986
|
|
34987
|
+
/***/ }),
|
34988
|
+
|
34989
|
+
/***/ 4678:
|
34990
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
34991
|
+
|
34992
|
+
"use strict";
|
34993
|
+
|
34994
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
34995
|
+
exports.getPlatformEnv = void 0;
|
34996
|
+
const errors_1 = __webpack_require__(3983);
|
34997
|
+
/**
|
34998
|
+
* Helper function to support both `VERCEL_` and legacy `NOW_` env vars.
|
34999
|
+
* Throws an error if *both* env vars are defined.
|
35000
|
+
*/
|
35001
|
+
const getPlatformEnv = (name) => {
|
35002
|
+
const vName = `VERCEL_${name}`;
|
35003
|
+
const nName = `NOW_${name}`;
|
35004
|
+
const v = process.env[vName];
|
35005
|
+
const n = process.env[nName];
|
35006
|
+
if (typeof v === 'string') {
|
35007
|
+
if (typeof n === 'string') {
|
35008
|
+
throw new errors_1.NowBuildError({
|
35009
|
+
code: 'CONFLICTING_ENV_VAR_NAMES',
|
35010
|
+
message: `Both "${vName}" and "${nName}" env vars are defined. Please only define the "${vName}" env var.`,
|
35011
|
+
link: 'https://vercel.link/combining-old-and-new-config',
|
35012
|
+
});
|
35013
|
+
}
|
35014
|
+
return v;
|
35015
|
+
}
|
35016
|
+
return n;
|
35017
|
+
};
|
35018
|
+
exports.getPlatformEnv = getPlatformEnv;
|
35019
|
+
|
35020
|
+
|
35260
35021
|
/***/ }),
|
35261
35022
|
|
35262
35023
|
/***/ 2855:
|
@@ -35290,7 +35051,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35290
35051
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
35291
35052
|
};
|
35292
35053
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
35293
|
-
exports.
|
35054
|
+
exports.isStaticRuntime = exports.isOfficialRuntime = exports.normalizePath = exports.readConfigFile = exports.DetectorFilesystem = exports.detectFramework = exports.detectFileSystemAPI = exports.detectApiExtensions = exports.detectApiDirectory = exports.detectOutputDirectory = exports.detectBuilders = exports.getIgnoreFilter = exports.scanParentDirs = exports.getLambdaOptionsFromFunction = exports.isSymbolicLink = exports.debug = exports.shouldServe = exports.streamToBuffer = exports.getPlatformEnv = exports.getSpawnOptions = exports.getDiscontinuedNodeVersions = exports.getLatestNodeVersion = exports.getNodeVersion = exports.getEnvForPackageManager = exports.runCustomInstallCommand = exports.runShellScript = exports.runPipInstall = exports.runBundleInstall = exports.runNpmInstall = exports.getNodeBinPath = exports.walkParentDirs = exports.spawnCommand = exports.execCommand = exports.runPackageJsonScript = exports.installDependencies = exports.getScriptName = exports.spawnAsync = exports.execAsync = exports.rename = exports.glob = exports.getWriteableDirectory = exports.download = exports.Prerender = exports.createLambda = exports.NodejsLambda = exports.Lambda = exports.FileRef = exports.FileFsRef = exports.FileBlob = void 0;
|
35294
35055
|
const file_blob_1 = __importDefault(__webpack_require__(2397));
|
35295
35056
|
exports.FileBlob = file_blob_1.default;
|
35296
35057
|
const file_fs_ref_1 = __importDefault(__webpack_require__(9331));
|
@@ -35301,6 +35062,8 @@ const lambda_1 = __webpack_require__(6721);
|
|
35301
35062
|
Object.defineProperty(exports, "Lambda", ({ enumerable: true, get: function () { return lambda_1.Lambda; } }));
|
35302
35063
|
Object.defineProperty(exports, "createLambda", ({ enumerable: true, get: function () { return lambda_1.createLambda; } }));
|
35303
35064
|
Object.defineProperty(exports, "getLambdaOptionsFromFunction", ({ enumerable: true, get: function () { return lambda_1.getLambdaOptionsFromFunction; } }));
|
35065
|
+
const nodejs_lambda_1 = __webpack_require__(7049);
|
35066
|
+
Object.defineProperty(exports, "NodejsLambda", ({ enumerable: true, get: function () { return nodejs_lambda_1.NodejsLambda; } }));
|
35304
35067
|
const prerender_1 = __webpack_require__(2850);
|
35305
35068
|
Object.defineProperty(exports, "Prerender", ({ enumerable: true, get: function () { return prerender_1.Prerender; } }));
|
35306
35069
|
const download_1 = __importStar(__webpack_require__(1611));
|
@@ -35325,6 +35088,8 @@ Object.defineProperty(exports, "runNpmInstall", ({ enumerable: true, get: functi
|
|
35325
35088
|
Object.defineProperty(exports, "runBundleInstall", ({ enumerable: true, get: function () { return run_user_scripts_1.runBundleInstall; } }));
|
35326
35089
|
Object.defineProperty(exports, "runPipInstall", ({ enumerable: true, get: function () { return run_user_scripts_1.runPipInstall; } }));
|
35327
35090
|
Object.defineProperty(exports, "runShellScript", ({ enumerable: true, get: function () { return run_user_scripts_1.runShellScript; } }));
|
35091
|
+
Object.defineProperty(exports, "runCustomInstallCommand", ({ enumerable: true, get: function () { return run_user_scripts_1.runCustomInstallCommand; } }));
|
35092
|
+
Object.defineProperty(exports, "getEnvForPackageManager", ({ enumerable: true, get: function () { return run_user_scripts_1.getEnvForPackageManager; } }));
|
35328
35093
|
Object.defineProperty(exports, "getNodeVersion", ({ enumerable: true, get: function () { return run_user_scripts_1.getNodeVersion; } }));
|
35329
35094
|
Object.defineProperty(exports, "getSpawnOptions", ({ enumerable: true, get: function () { return run_user_scripts_1.getSpawnOptions; } }));
|
35330
35095
|
Object.defineProperty(exports, "getNodeBinPath", ({ enumerable: true, get: function () { return run_user_scripts_1.getNodeBinPath; } }));
|
@@ -35332,7 +35097,6 @@ Object.defineProperty(exports, "scanParentDirs", ({ enumerable: true, get: funct
|
|
35332
35097
|
const node_version_1 = __webpack_require__(7903);
|
35333
35098
|
Object.defineProperty(exports, "getLatestNodeVersion", ({ enumerable: true, get: function () { return node_version_1.getLatestNodeVersion; } }));
|
35334
35099
|
Object.defineProperty(exports, "getDiscontinuedNodeVersions", ({ enumerable: true, get: function () { return node_version_1.getDiscontinuedNodeVersions; } }));
|
35335
|
-
const errors_1 = __webpack_require__(3983);
|
35336
35100
|
const stream_to_buffer_1 = __importDefault(__webpack_require__(2560));
|
35337
35101
|
exports.streamToBuffer = stream_to_buffer_1.default;
|
35338
35102
|
const should_serve_1 = __importDefault(__webpack_require__(2564));
|
@@ -35341,6 +35105,8 @@ const debug_1 = __importDefault(__webpack_require__(1868));
|
|
35341
35105
|
exports.debug = debug_1.default;
|
35342
35106
|
const get_ignore_filter_1 = __importDefault(__webpack_require__(1148));
|
35343
35107
|
exports.getIgnoreFilter = get_ignore_filter_1.default;
|
35108
|
+
const get_platform_env_1 = __webpack_require__(4678);
|
35109
|
+
Object.defineProperty(exports, "getPlatformEnv", ({ enumerable: true, get: function () { return get_platform_env_1.getPlatformEnv; } }));
|
35344
35110
|
var detect_builders_1 = __webpack_require__(4246);
|
35345
35111
|
Object.defineProperty(exports, "detectBuilders", ({ enumerable: true, get: function () { return detect_builders_1.detectBuilders; } }));
|
35346
35112
|
Object.defineProperty(exports, "detectOutputDirectory", ({ enumerable: true, get: function () { return detect_builders_1.detectOutputDirectory; } }));
|
@@ -35356,10 +35122,6 @@ var read_config_file_1 = __webpack_require__(7792);
|
|
35356
35122
|
Object.defineProperty(exports, "readConfigFile", ({ enumerable: true, get: function () { return read_config_file_1.readConfigFile; } }));
|
35357
35123
|
var normalize_path_1 = __webpack_require__(6261);
|
35358
35124
|
Object.defineProperty(exports, "normalizePath", ({ enumerable: true, get: function () { return normalize_path_1.normalizePath; } }));
|
35359
|
-
var convert_runtime_to_plugin_1 = __webpack_require__(7276);
|
35360
|
-
Object.defineProperty(exports, "_experimental_convertRuntimeToPlugin", ({ enumerable: true, get: function () { return convert_runtime_to_plugin_1._experimental_convertRuntimeToPlugin; } }));
|
35361
|
-
Object.defineProperty(exports, "_experimental_updateFunctionsManifest", ({ enumerable: true, get: function () { return convert_runtime_to_plugin_1._experimental_updateFunctionsManifest; } }));
|
35362
|
-
Object.defineProperty(exports, "_experimental_updateRoutesManifest", ({ enumerable: true, get: function () { return convert_runtime_to_plugin_1._experimental_updateRoutesManifest; } }));
|
35363
35125
|
__exportStar(__webpack_require__(2416), exports);
|
35364
35126
|
__exportStar(__webpack_require__(5748), exports);
|
35365
35127
|
__exportStar(__webpack_require__(3983), exports);
|
@@ -35380,28 +35142,6 @@ const isStaticRuntime = (name) => {
|
|
35380
35142
|
return exports.isOfficialRuntime('static', name);
|
35381
35143
|
};
|
35382
35144
|
exports.isStaticRuntime = isStaticRuntime;
|
35383
|
-
/**
|
35384
|
-
* Helper function to support both `VERCEL_` and legacy `NOW_` env vars.
|
35385
|
-
* Throws an error if *both* env vars are defined.
|
35386
|
-
*/
|
35387
|
-
const getPlatformEnv = (name) => {
|
35388
|
-
const vName = `VERCEL_${name}`;
|
35389
|
-
const nName = `NOW_${name}`;
|
35390
|
-
const v = process.env[vName];
|
35391
|
-
const n = process.env[nName];
|
35392
|
-
if (typeof v === 'string') {
|
35393
|
-
if (typeof n === 'string') {
|
35394
|
-
throw new errors_1.NowBuildError({
|
35395
|
-
code: 'CONFLICTING_ENV_VAR_NAMES',
|
35396
|
-
message: `Both "${vName}" and "${nName}" env vars are defined. Please only define the "${vName}" env var.`,
|
35397
|
-
link: 'https://vercel.link/combining-old-and-new-config',
|
35398
|
-
});
|
35399
|
-
}
|
35400
|
-
return v;
|
35401
|
-
}
|
35402
|
-
return n;
|
35403
|
-
};
|
35404
|
-
exports.getPlatformEnv = getPlatformEnv;
|
35405
35145
|
|
35406
35146
|
|
35407
35147
|
/***/ }),
|
@@ -35415,7 +35155,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35415
35155
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
35416
35156
|
};
|
35417
35157
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
35418
|
-
exports.getLambdaOptionsFromFunction = exports.createZip = exports.createLambda = exports.Lambda =
|
35158
|
+
exports.getLambdaOptionsFromFunction = exports.createZip = exports.createLambda = exports.Lambda = void 0;
|
35419
35159
|
const assert_1 = __importDefault(__webpack_require__(2357));
|
35420
35160
|
const async_sema_1 = __importDefault(__webpack_require__(5758));
|
35421
35161
|
const yazl_1 = __webpack_require__(1223);
|
@@ -35423,11 +35163,30 @@ const minimatch_1 = __importDefault(__webpack_require__(9566));
|
|
35423
35163
|
const fs_extra_1 = __webpack_require__(5392);
|
35424
35164
|
const download_1 = __webpack_require__(1611);
|
35425
35165
|
const stream_to_buffer_1 = __importDefault(__webpack_require__(2560));
|
35426
|
-
exports.FILES_SYMBOL = Symbol('files');
|
35427
35166
|
class Lambda {
|
35428
|
-
constructor({
|
35167
|
+
constructor({ files, handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, zipBuffer, }) {
|
35168
|
+
if (!zipBuffer) {
|
35169
|
+
assert_1.default(typeof files === 'object', '"files" must be an object');
|
35170
|
+
}
|
35171
|
+
assert_1.default(typeof handler === 'string', '"handler" is not a string');
|
35172
|
+
assert_1.default(typeof runtime === 'string', '"runtime" is not a string');
|
35173
|
+
assert_1.default(typeof environment === 'object', '"environment" is not an object');
|
35174
|
+
if (memory !== undefined) {
|
35175
|
+
assert_1.default(typeof memory === 'number', '"memory" is not a number');
|
35176
|
+
}
|
35177
|
+
if (maxDuration !== undefined) {
|
35178
|
+
assert_1.default(typeof maxDuration === 'number', '"maxDuration" is not a number');
|
35179
|
+
}
|
35180
|
+
if (allowQuery !== undefined) {
|
35181
|
+
assert_1.default(Array.isArray(allowQuery), '"allowQuery" is not an Array');
|
35182
|
+
assert_1.default(allowQuery.every(q => typeof q === 'string'), '"allowQuery" is not a string Array');
|
35183
|
+
}
|
35184
|
+
if (regions !== undefined) {
|
35185
|
+
assert_1.default(Array.isArray(regions), '"regions" is not an Array');
|
35186
|
+
assert_1.default(regions.every(r => typeof r === 'string'), '"regions" is not a string Array');
|
35187
|
+
}
|
35429
35188
|
this.type = 'Lambda';
|
35430
|
-
this.
|
35189
|
+
this.files = files;
|
35431
35190
|
this.handler = handler;
|
35432
35191
|
this.runtime = runtime;
|
35433
35192
|
this.memory = memory;
|
@@ -35435,49 +35194,33 @@ class Lambda {
|
|
35435
35194
|
this.environment = environment;
|
35436
35195
|
this.allowQuery = allowQuery;
|
35437
35196
|
this.regions = regions;
|
35197
|
+
this.zipBuffer = zipBuffer;
|
35198
|
+
}
|
35199
|
+
async createZip() {
|
35200
|
+
let { zipBuffer } = this;
|
35201
|
+
if (!zipBuffer) {
|
35202
|
+
await sema.acquire();
|
35203
|
+
try {
|
35204
|
+
zipBuffer = await createZip(this.files);
|
35205
|
+
}
|
35206
|
+
finally {
|
35207
|
+
sema.release();
|
35208
|
+
}
|
35209
|
+
}
|
35210
|
+
return zipBuffer;
|
35438
35211
|
}
|
35439
35212
|
}
|
35440
35213
|
exports.Lambda = Lambda;
|
35441
35214
|
const sema = new async_sema_1.default(10);
|
35442
35215
|
const mtime = new Date(1540000000000);
|
35443
|
-
|
35444
|
-
|
35445
|
-
|
35446
|
-
|
35447
|
-
|
35448
|
-
|
35449
|
-
|
35450
|
-
|
35451
|
-
if (maxDuration !== undefined) {
|
35452
|
-
assert_1.default(typeof maxDuration === 'number', '"maxDuration" is not a number');
|
35453
|
-
}
|
35454
|
-
if (allowQuery !== undefined) {
|
35455
|
-
assert_1.default(Array.isArray(allowQuery), '"allowQuery" is not an Array');
|
35456
|
-
assert_1.default(allowQuery.every(q => typeof q === 'string'), '"allowQuery" is not a string Array');
|
35457
|
-
}
|
35458
|
-
if (regions !== undefined) {
|
35459
|
-
assert_1.default(Array.isArray(regions), '"regions" is not an Array');
|
35460
|
-
assert_1.default(regions.every(r => typeof r === 'string'), '"regions" is not a string Array');
|
35461
|
-
}
|
35462
|
-
await sema.acquire();
|
35463
|
-
try {
|
35464
|
-
const zipBuffer = await createZip(files);
|
35465
|
-
const lambda = new Lambda({
|
35466
|
-
zipBuffer,
|
35467
|
-
handler,
|
35468
|
-
runtime,
|
35469
|
-
memory,
|
35470
|
-
maxDuration,
|
35471
|
-
environment,
|
35472
|
-
regions,
|
35473
|
-
});
|
35474
|
-
// @ts-ignore This symbol is a private API
|
35475
|
-
lambda[exports.FILES_SYMBOL] = files;
|
35476
|
-
return lambda;
|
35477
|
-
}
|
35478
|
-
finally {
|
35479
|
-
sema.release();
|
35480
|
-
}
|
35216
|
+
/**
|
35217
|
+
* @deprecated Use `new Lambda()` instead.
|
35218
|
+
*/
|
35219
|
+
async function createLambda(opts) {
|
35220
|
+
const lambda = new Lambda(opts);
|
35221
|
+
// backwards compat
|
35222
|
+
lambda.zipBuffer = await lambda.createZip();
|
35223
|
+
return lambda;
|
35481
35224
|
}
|
35482
35225
|
exports.createLambda = createLambda;
|
35483
35226
|
async function createZip(files) {
|
@@ -35512,7 +35255,7 @@ async function createZip(files) {
|
|
35512
35255
|
}
|
35513
35256
|
exports.createZip = createZip;
|
35514
35257
|
async function getLambdaOptionsFromFunction({ sourceFile, config, }) {
|
35515
|
-
if (config
|
35258
|
+
if (config === null || config === void 0 ? void 0 : config.functions) {
|
35516
35259
|
for (const [pattern, fn] of Object.entries(config.functions)) {
|
35517
35260
|
if (sourceFile === pattern || minimatch_1.default(sourceFile, pattern)) {
|
35518
35261
|
return {
|
@@ -35527,6 +35270,28 @@ async function getLambdaOptionsFromFunction({ sourceFile, config, }) {
|
|
35527
35270
|
exports.getLambdaOptionsFromFunction = getLambdaOptionsFromFunction;
|
35528
35271
|
|
35529
35272
|
|
35273
|
+
/***/ }),
|
35274
|
+
|
35275
|
+
/***/ 7049:
|
35276
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
35277
|
+
|
35278
|
+
"use strict";
|
35279
|
+
|
35280
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
35281
|
+
exports.NodejsLambda = void 0;
|
35282
|
+
const lambda_1 = __webpack_require__(6721);
|
35283
|
+
class NodejsLambda extends lambda_1.Lambda {
|
35284
|
+
constructor({ shouldAddHelpers, shouldAddSourcemapSupport, awsLambdaHandler, ...opts }) {
|
35285
|
+
super(opts);
|
35286
|
+
this.launcherType = 'Nodejs';
|
35287
|
+
this.shouldAddHelpers = shouldAddHelpers;
|
35288
|
+
this.shouldAddSourcemapSupport = shouldAddSourcemapSupport;
|
35289
|
+
this.awsLambdaHandler = awsLambdaHandler;
|
35290
|
+
}
|
35291
|
+
}
|
35292
|
+
exports.NodejsLambda = NodejsLambda;
|
35293
|
+
|
35294
|
+
|
35530
35295
|
/***/ }),
|
35531
35296
|
|
35532
35297
|
/***/ 2850:
|