diff --git a/.github/workflows/cypress-canary.yml b/.github/workflows/cypress-canary.yml new file mode 100644 index 0000000000..ed769936a9 --- /dev/null +++ b/.github/workflows/cypress-canary.yml @@ -0,0 +1,73 @@ +name: Run e2e (canary demo) +on: + pull_request: + types: [opened, labeled, unlabeled, synchronize] + push: + branches: + - main + paths: + - 'demos/canary/**/*.{js,jsx,ts,tsx}' + - 'cypress/integration/canary/**/*.{ts,js}' + - 'src/**/*.{ts,js}' +jobs: + cypress: + name: Cypress + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + containers: [1, 2, 3, 4] + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Generate Github token + uses: navikt/github-app-token-generator@v1 + id: get-token + with: + private-key: ${{ secrets.TOKENS_PRIVATE_KEY }} + app-id: ${{ secrets.TOKENS_APP_ID }} + + - name: Checkout @netlify/wait-for-deploy-action + uses: actions/checkout@v2 + with: + repository: netlify/wait-for-deploy-action + token: ${{ steps.get-token.outputs.token }} + path: ./.github/actions/wait-for-netlify-deploy + + - name: Wait for Netlify Deploy + id: deploy + uses: ./.github/actions/wait-for-netlify-deploy + with: + site-name: netlify-plugin-nextjs-demo + timeout: 300 + + - name: Deploy successful + if: ${{ steps.deploy.outputs.origin-url }} + run: echo ${{ steps.deploy.outputs.origin-url }} + + - name: Node + uses: actions/setup-node@v2 + with: + node-version: '16' + + - run: npm install + + - name: Cypress run + if: ${{ steps.deploy.outputs.origin-url }} + id: cypress + uses: cypress-io/github-action@v2 + with: + browser: chrome + headless: true + record: true + parallel: true + config-file: cypress/config/canary.json + group: 'Next Plugin - Demo Canary' + spec: cypress/integration/canary/* + env: + DEBUG: '@cypress/github-action' + CYPRESS_baseUrl: ${{ steps.deploy.outputs.origin-url }} + CYPRESS_NETLIFY_CONTEXT: ${{ steps.deploy.outputs.context }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CYPRESS_RECORD_KEY: ${{ secrets.CANARY_CYPRESS_RECORD_KEY }} diff --git a/cypress/config/canary.json b/cypress/config/canary.json new file mode 100644 index 0000000000..b19a833549 --- /dev/null +++ b/cypress/config/canary.json @@ -0,0 +1,5 @@ +{ + "baseUrl": "http://localhost:3000", + "integrationFolder": "cypress/integration/canary", + "projectId": "5zbkdv" +} diff --git a/cypress/integration/canary/images.spec.ts b/cypress/integration/canary/images.spec.ts new file mode 100644 index 0000000000..4398ef6b15 --- /dev/null +++ b/cypress/integration/canary/images.spec.ts @@ -0,0 +1,15 @@ +/** + * @see {@link https://nextjs.org/docs/api-reference/next/image#required-props} + */ +describe('next/images', () => { + it('should show image from /public', () => { + cy.visit('/') + cy.findByRole('img').should('be.visible').and(($img) => { + // "naturalWidth" and "naturalHeight" are set when the image loads + expect( + $img[0].naturalWidth, + 'image has natural width' + ).to.be.greaterThan(0) + }) + }) +}) diff --git a/demos/canary/.eslintrc.json b/demos/canary/.eslintrc.json new file mode 100755 index 0000000000..bffb357a71 --- /dev/null +++ b/demos/canary/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/demos/canary/.gitignore b/demos/canary/.gitignore new file mode 100755 index 0000000000..5c8e186769 --- /dev/null +++ b/demos/canary/.gitignore @@ -0,0 +1,35 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env*.local + +# vercel +.vercel + +# netlify +.netlify diff --git a/demos/canary/README.md b/demos/canary/README.md new file mode 100755 index 0000000000..9869bf7455 --- /dev/null +++ b/demos/canary/README.md @@ -0,0 +1,28 @@ +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. + +[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. + +The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! diff --git a/demos/canary/netlify.toml b/demos/canary/netlify.toml new file mode 100644 index 0000000000..a75ca81b8d --- /dev/null +++ b/demos/canary/netlify.toml @@ -0,0 +1,15 @@ +[build] +command = "next build" +publish = ".next" +ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../../plugin; fi;" + +[build.environment] +TERM = "xterm" +NODE_VERSION = "17" + +[[plugins]] +package = "../plugin-wrapper/" + +# This is a fake plugin, that makes it run npm install +[[plugins]] +package = "@netlify/plugin-local-install-core" diff --git a/demos/canary/next.config.js b/demos/canary/next.config.js new file mode 100755 index 0000000000..a461e04b93 --- /dev/null +++ b/demos/canary/next.config.js @@ -0,0 +1,21 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + reactStrictMode: true, + eslint: { + // Warning: This allows production builds to successfully complete even if + // your project has ESLint errors. + ignoreDuringBuilds: true, + }, + experimental: { + images: { + remotePatterns: [ + { + protocol: 'https', + hostname: '*.githubusercontent.com', + }, + ], + }, + }, +} + +module.exports = nextConfig diff --git a/demos/canary/package-lock.json b/demos/canary/package-lock.json new file mode 100644 index 0000000000..5b4a6326d9 --- /dev/null +++ b/demos/canary/package-lock.json @@ -0,0 +1,1881 @@ +{ + "name": "canary", + "version": "0.1.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "canary", + "version": "0.1.0", + "dependencies": { + "next": "^12.1.7-canary.29", + "react": "18.1.0", + "react-dom": "18.1.0" + }, + "devDependencies": { + "eslint": "8.16.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.3.2", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.9.5", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@next/env": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.1.7-canary.29.tgz", + "integrity": "sha512-36l4x74ul94lqddrBiCHuq0d7vj00WYXiqEMcvvlrbFxwpdSKEMWxpqHpzP4gQi5Kz2kqJ0m63o1SgITsdGWqw==" + }, + "node_modules/@next/swc-android-arm-eabi": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.1.7-canary.29.tgz", + "integrity": "sha512-jUxPUfN+WipDovzC1TP6aZz+zFTCNeD4Z6EVCzby0S6tB2D88/UslGKOj4j9qXA04B1aJrO58M4ZX1fcDNHn6g==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-android-arm64": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.1.7-canary.29.tgz", + "integrity": "sha512-o2pk+SDeloVlic7sH5uosHQ8xNRE0A4SaWS4ccF9pTo3MfbfV6nqMfl308BP/z2UpSlEaqzBe/rpZalSUAtm5g==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-darwin-arm64": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.7-canary.29.tgz", + "integrity": "sha512-yitoEj3zQ2kIjXrMsmYqrQSaFCqmZl+07o8m9iPH+EcDQPiN6j2CKtVcjbUYP9wHD8JjTXJKqDVg7uieOXUymw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-darwin-x64": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.1.7-canary.29.tgz", + "integrity": "sha512-vrFFY591690Jpf3j0mpGU26yqz6vf7AcMyEjXvhHWKumEbY8K3M3+/iD3TJIEraGDJSuFCsM7nOlEsPY63P+2Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-freebsd-x64": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.1.7-canary.29.tgz", + "integrity": "sha512-Ni9HFw4IGFOQkqUVObHHVLfL4m+cVvpzVTRNZgp5XNnGmNC0o3uE0u8Wu6HPMVMR1H5OjMwgaAscxev6hg6wuA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm-gnueabihf": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.1.7-canary.29.tgz", + "integrity": "sha512-pmHz6dSKhf8wBn3ELGd3phubPgYcNTR8fvjR0sGm/Ph7ZcmFgVJ2sQQZCiGcRtg3XZriGrtf0ZqRh5ODaCX03Q==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.1.7-canary.29.tgz", + "integrity": "sha512-MOGQPjVvtibbHnXF7rgDO0e+0IkuxzDL6AWnVbKUq4EnDyDPvBr7F/zGmZntyQmg7PFM1twlcoxyIVSb3bpaRA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.1.7-canary.29.tgz", + "integrity": "sha512-VgCyebZU1uf5a6LVkjEbFZ9ZdJQ/0pvGHsrWW5CL90RprDuu09WnDVhP+tut9A4gUEYakkz54NpB/ToAwXohwg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.1.7-canary.29.tgz", + "integrity": "sha512-+CGZvVVBvujUlioaw/3fTtWKdBzoA+pdg6Sdj2uIONAo3Iz9jWolV+SSB5mEIDoms82oJrurW28POietyHAMUQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.1.7-canary.29.tgz", + "integrity": "sha512-LaCbMUA6Yfo7n0+EhKT3gDOmA0ly7HQiHeLYvZClYRe/k+KJuAyz2lXWrN/b7q15raE5bDNgylTK+qV8ntG9GA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.1.7-canary.29.tgz", + "integrity": "sha512-NjjjopR1JSh1cxlsxDZmJJc7K8kU/DcT2tTgEMeIICjbXdq8fPEY0jegDEf/C1LurAK8Yl2JTsi17thriUW+dQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-ia32-msvc": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.1.7-canary.29.tgz", + "integrity": "sha512-Fm9ZUNPZNZZvkHZSf1CbyZNcOwKMcb6tZ1JP9W14qoUq6LcInc4ybzd2mu6mjOoa5QLtZYzvywL2sGc2Bl8ljw==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-x64-msvc": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.1.7-canary.29.tgz", + "integrity": "sha512-jqNdWC7N15Z2SK51OkKsSw5Qg3scoix6o52dkicRhNJ4vV7hmV2KBFgh3Scvlz604dfe7ie9gho2lNaKYI13Tg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/acorn": { + "version": "8.7.1", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001344", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.16.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint/eslintrc": "^1.3.0", + "@humanwhocodes/config-array": "^0.9.2", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.2", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "7.1.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/doctrine": { + "version": "3.0.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/espree": { + "version": "9.3.2", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.7.1", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "dev": true, + "license": "MIT" + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.5", + "dev": true, + "license": "ISC" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/glob": { + "version": "7.2.3", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.15.0", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "dev": true, + "license": "ISC" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/levn": { + "version": "0.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "dev": true, + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.4", + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "dev": true, + "license": "MIT" + }, + "node_modules/next": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/next/-/next-12.1.7-canary.29.tgz", + "integrity": "sha512-tFghClc38QtGFVzAQXcuhTc728FFGRaKYN2QFXsrownIioZk7ZqsT9DCTqXkaVO9+GfkKgcuvsFRNvE4lfgBOw==", + "dependencies": { + "@next/env": "12.1.7-canary.29", + "caniuse-lite": "^1.0.30001332", + "postcss": "8.4.5", + "styled-jsx": "5.0.2", + "use-sync-external-store": "1.1.0" + }, + "bin": { + "next": "dist/bin/next" + }, + "engines": { + "node": ">=12.22.0" + }, + "optionalDependencies": { + "@next/swc-android-arm-eabi": "12.1.7-canary.29", + "@next/swc-android-arm64": "12.1.7-canary.29", + "@next/swc-darwin-arm64": "12.1.7-canary.29", + "@next/swc-darwin-x64": "12.1.7-canary.29", + "@next/swc-freebsd-x64": "12.1.7-canary.29", + "@next/swc-linux-arm-gnueabihf": "12.1.7-canary.29", + "@next/swc-linux-arm64-gnu": "12.1.7-canary.29", + "@next/swc-linux-arm64-musl": "12.1.7-canary.29", + "@next/swc-linux-x64-gnu": "12.1.7-canary.29", + "@next/swc-linux-x64-musl": "12.1.7-canary.29", + "@next/swc-win32-arm64-msvc": "12.1.7-canary.29", + "@next/swc-win32-ia32-msvc": "12.1.7-canary.29", + "@next/swc-win32-x64-msvc": "12.1.7-canary.29" + }, + "peerDependencies": { + "fibers": ">= 3.1.0", + "node-sass": "^6.0.0 || ^7.0.0", + "react": "^17.0.2 || ^18.0.0-0", + "react-dom": "^17.0.2 || ^18.0.0-0", + "sass": "^1.3.0" + }, + "peerDependenciesMeta": { + "fibers": { + "optional": true + }, + "node-sass": { + "optional": true + }, + "sass": { + "optional": true + } + } + }, + "node_modules/once": { + "version": "1.4.0", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "license": "ISC" + }, + "node_modules/postcss": { + "version": "8.4.5", + "license": "MIT", + "dependencies": { + "nanoid": "^3.1.30", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/react": { + "version": "18.1.0", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.1.0", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.22.0" + }, + "peerDependencies": { + "react": "^18.1.0" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/scheduler": { + "version": "0.22.0", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/styled-jsx": { + "version": "5.0.2", + "license": "MIT", + "engines": { + "node": ">= 12.0.0" + }, + "peerDependencies": { + "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/type-check": { + "version": "0.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/use-sync-external-store": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz", + "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "dev": true, + "license": "MIT" + }, + "node_modules/which": { + "version": "2.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "license": "ISC" + } + }, + "dependencies": { + "@eslint/eslintrc": { + "version": "1.3.0", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.3.2", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + } + }, + "@humanwhocodes/config-array": { + "version": "0.9.5", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "dev": true + }, + "@next/env": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.1.7-canary.29.tgz", + "integrity": "sha512-36l4x74ul94lqddrBiCHuq0d7vj00WYXiqEMcvvlrbFxwpdSKEMWxpqHpzP4gQi5Kz2kqJ0m63o1SgITsdGWqw==" + }, + "@next/swc-android-arm-eabi": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.1.7-canary.29.tgz", + "integrity": "sha512-jUxPUfN+WipDovzC1TP6aZz+zFTCNeD4Z6EVCzby0S6tB2D88/UslGKOj4j9qXA04B1aJrO58M4ZX1fcDNHn6g==", + "optional": true + }, + "@next/swc-android-arm64": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.1.7-canary.29.tgz", + "integrity": "sha512-o2pk+SDeloVlic7sH5uosHQ8xNRE0A4SaWS4ccF9pTo3MfbfV6nqMfl308BP/z2UpSlEaqzBe/rpZalSUAtm5g==", + "optional": true + }, + "@next/swc-darwin-arm64": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.7-canary.29.tgz", + "integrity": "sha512-yitoEj3zQ2kIjXrMsmYqrQSaFCqmZl+07o8m9iPH+EcDQPiN6j2CKtVcjbUYP9wHD8JjTXJKqDVg7uieOXUymw==", + "optional": true + }, + "@next/swc-darwin-x64": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.1.7-canary.29.tgz", + "integrity": "sha512-vrFFY591690Jpf3j0mpGU26yqz6vf7AcMyEjXvhHWKumEbY8K3M3+/iD3TJIEraGDJSuFCsM7nOlEsPY63P+2Q==", + "optional": true + }, + "@next/swc-freebsd-x64": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.1.7-canary.29.tgz", + "integrity": "sha512-Ni9HFw4IGFOQkqUVObHHVLfL4m+cVvpzVTRNZgp5XNnGmNC0o3uE0u8Wu6HPMVMR1H5OjMwgaAscxev6hg6wuA==", + "optional": true + }, + "@next/swc-linux-arm-gnueabihf": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.1.7-canary.29.tgz", + "integrity": "sha512-pmHz6dSKhf8wBn3ELGd3phubPgYcNTR8fvjR0sGm/Ph7ZcmFgVJ2sQQZCiGcRtg3XZriGrtf0ZqRh5ODaCX03Q==", + "optional": true + }, + "@next/swc-linux-arm64-gnu": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.1.7-canary.29.tgz", + "integrity": "sha512-MOGQPjVvtibbHnXF7rgDO0e+0IkuxzDL6AWnVbKUq4EnDyDPvBr7F/zGmZntyQmg7PFM1twlcoxyIVSb3bpaRA==", + "optional": true + }, + "@next/swc-linux-arm64-musl": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.1.7-canary.29.tgz", + "integrity": "sha512-VgCyebZU1uf5a6LVkjEbFZ9ZdJQ/0pvGHsrWW5CL90RprDuu09WnDVhP+tut9A4gUEYakkz54NpB/ToAwXohwg==", + "optional": true + }, + "@next/swc-linux-x64-gnu": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.1.7-canary.29.tgz", + "integrity": "sha512-+CGZvVVBvujUlioaw/3fTtWKdBzoA+pdg6Sdj2uIONAo3Iz9jWolV+SSB5mEIDoms82oJrurW28POietyHAMUQ==", + "optional": true + }, + "@next/swc-linux-x64-musl": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.1.7-canary.29.tgz", + "integrity": "sha512-LaCbMUA6Yfo7n0+EhKT3gDOmA0ly7HQiHeLYvZClYRe/k+KJuAyz2lXWrN/b7q15raE5bDNgylTK+qV8ntG9GA==", + "optional": true + }, + "@next/swc-win32-arm64-msvc": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.1.7-canary.29.tgz", + "integrity": "sha512-NjjjopR1JSh1cxlsxDZmJJc7K8kU/DcT2tTgEMeIICjbXdq8fPEY0jegDEf/C1LurAK8Yl2JTsi17thriUW+dQ==", + "optional": true + }, + "@next/swc-win32-ia32-msvc": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.1.7-canary.29.tgz", + "integrity": "sha512-Fm9ZUNPZNZZvkHZSf1CbyZNcOwKMcb6tZ1JP9W14qoUq6LcInc4ybzd2mu6mjOoa5QLtZYzvywL2sGc2Bl8ljw==", + "optional": true + }, + "@next/swc-win32-x64-msvc": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.1.7-canary.29.tgz", + "integrity": "sha512-jqNdWC7N15Z2SK51OkKsSw5Qg3scoix6o52dkicRhNJ4vV7hmV2KBFgh3Scvlz604dfe7ie9gho2lNaKYI13Tg==", + "optional": true + }, + "acorn": { + "version": "8.7.1", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.2", + "dev": true, + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "5.0.1", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "argparse": { + "version": "2.0.1", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "callsites": { + "version": "3.1.0", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001344" + }, + "chalk": { + "version": "4.1.2", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "debug": { + "version": "4.3.4", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "deep-is": { + "version": "0.1.4", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "dev": true + }, + "eslint": { + "version": "8.16.0", + "dev": true, + "requires": { + "@eslint/eslintrc": "^1.3.0", + "@humanwhocodes/config-array": "^0.9.2", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.2", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.15.0", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "doctrine": { + "version": "3.0.0", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + } + } + }, + "eslint-scope": { + "version": "7.1.1", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-utils": { + "version": "3.0.0", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "3.3.0", + "dev": true + }, + "espree": { + "version": "9.3.2", + "dev": true, + "requires": { + "acorn": "^8.7.1", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + } + }, + "esquery": { + "version": "1.4.0", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "dev": true + }, + "file-entry-cache": { + "version": "6.0.1", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "flat-cache": { + "version": "3.0.4", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.5", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "dev": true + }, + "glob": { + "version": "7.2.3", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "globals": { + "version": "13.15.0", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "has-flag": { + "version": "4.0.0", + "dev": true + }, + "ignore": { + "version": "5.2.0", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "isexe": { + "version": "2.0.0", + "dev": true + }, + "js-tokens": { + "version": "4.0.0" + }, + "js-yaml": { + "version": "4.1.0", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "dev": true + }, + "levn": { + "version": "0.4.1", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lodash.merge": { + "version": "4.6.2", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.2", + "dev": true + }, + "nanoid": { + "version": "3.3.4" + }, + "natural-compare": { + "version": "1.4.0", + "dev": true + }, + "next": { + "version": "12.1.7-canary.29", + "resolved": "https://registry.npmjs.org/next/-/next-12.1.7-canary.29.tgz", + "integrity": "sha512-tFghClc38QtGFVzAQXcuhTc728FFGRaKYN2QFXsrownIioZk7ZqsT9DCTqXkaVO9+GfkKgcuvsFRNvE4lfgBOw==", + "requires": { + "@next/env": "12.1.7-canary.29", + "@next/swc-android-arm-eabi": "12.1.7-canary.29", + "@next/swc-android-arm64": "12.1.7-canary.29", + "@next/swc-darwin-arm64": "12.1.7-canary.29", + "@next/swc-darwin-x64": "12.1.7-canary.29", + "@next/swc-freebsd-x64": "12.1.7-canary.29", + "@next/swc-linux-arm-gnueabihf": "12.1.7-canary.29", + "@next/swc-linux-arm64-gnu": "12.1.7-canary.29", + "@next/swc-linux-arm64-musl": "12.1.7-canary.29", + "@next/swc-linux-x64-gnu": "12.1.7-canary.29", + "@next/swc-linux-x64-musl": "12.1.7-canary.29", + "@next/swc-win32-arm64-msvc": "12.1.7-canary.29", + "@next/swc-win32-ia32-msvc": "12.1.7-canary.29", + "@next/swc-win32-x64-msvc": "12.1.7-canary.29", + "caniuse-lite": "^1.0.30001332", + "postcss": "8.4.5", + "styled-jsx": "5.0.2", + "use-sync-external-store": "1.1.0" + } + }, + "once": { + "version": "1.4.0", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optionator": { + "version": "0.9.1", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "parent-module": { + "version": "1.0.1", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "dev": true + }, + "picocolors": { + "version": "1.0.0" + }, + "postcss": { + "version": "8.4.5", + "requires": { + "nanoid": "^3.1.30", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.1" + } + }, + "prelude-ls": { + "version": "1.2.1", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "dev": true + }, + "react": { + "version": "18.1.0", + "requires": { + "loose-envify": "^1.1.0" + } + }, + "react-dom": { + "version": "18.1.0", + "requires": { + "loose-envify": "^1.1.0", + "scheduler": "^0.22.0" + } + }, + "regexpp": { + "version": "3.2.0", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "scheduler": { + "version": "0.22.0", + "requires": { + "loose-envify": "^1.1.0" + } + }, + "shebang-command": { + "version": "2.0.0", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "dev": true + }, + "source-map-js": { + "version": "1.0.2" + }, + "strip-ansi": { + "version": "6.0.1", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "dev": true + }, + "styled-jsx": { + "version": "5.0.2", + "requires": {} + }, + "supports-color": { + "version": "7.2.0", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "text-table": { + "version": "0.2.0", + "dev": true + }, + "type-check": { + "version": "0.4.0", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "dev": true + }, + "uri-js": { + "version": "4.4.1", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "use-sync-external-store": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz", + "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==", + "requires": {} + }, + "v8-compile-cache": { + "version": "2.3.0", + "dev": true + }, + "which": { + "version": "2.0.2", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "dev": true + } + } +} diff --git a/demos/canary/package.json b/demos/canary/package.json new file mode 100644 index 0000000000..bdc59656e3 --- /dev/null +++ b/demos/canary/package.json @@ -0,0 +1,19 @@ +{ + "name": "canary", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "next": "^12.1.7-canary.29", + "react": "18.1.0", + "react-dom": "18.1.0" + }, + "devDependencies": { + "eslint": "8.16.0" + } +} diff --git a/demos/canary/pages/_app.js b/demos/canary/pages/_app.js new file mode 100755 index 0000000000..1e1cec9242 --- /dev/null +++ b/demos/canary/pages/_app.js @@ -0,0 +1,7 @@ +import '../styles/globals.css' + +function MyApp({ Component, pageProps }) { + return +} + +export default MyApp diff --git a/demos/canary/pages/api/hello.js b/demos/canary/pages/api/hello.js new file mode 100755 index 0000000000..df63de88fa --- /dev/null +++ b/demos/canary/pages/api/hello.js @@ -0,0 +1,5 @@ +// Next.js API route support: https://nextjs.org/docs/api-routes/introduction + +export default function handler(req, res) { + res.status(200).json({ name: 'John Doe' }) +} diff --git a/demos/canary/pages/index.js b/demos/canary/pages/index.js new file mode 100755 index 0000000000..33cdbcbcc7 --- /dev/null +++ b/demos/canary/pages/index.js @@ -0,0 +1,27 @@ +import Head from 'next/head' +import Image from 'next/image' + +export default function Home() { + return ( +
+ + Canary Next App + + + +
+

Canary Next App

+
+

Here's where we test out Next's canary features to ensure they work with our plugin .

+
+
+ + Picture of the author +
+ ) +} diff --git a/demos/canary/public/favicon.ico b/demos/canary/public/favicon.ico new file mode 100755 index 0000000000..718d6fea48 Binary files /dev/null and b/demos/canary/public/favicon.ico differ diff --git a/demos/canary/styles/globals.css b/demos/canary/styles/globals.css new file mode 100755 index 0000000000..e5e2dcc23b --- /dev/null +++ b/demos/canary/styles/globals.css @@ -0,0 +1,16 @@ +html, +body { + padding: 0; + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, + Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; +} + +a { + color: inherit; + text-decoration: none; +} + +* { + box-sizing: border-box; +} diff --git a/package-lock.json b/package-lock.json index cc09b4e848..5e61d85a44 100644 --- a/package-lock.json +++ b/package-lock.json @@ -401,14 +401,6 @@ } } }, - "demos/middleware/node_modules/next/node_modules/use-sync-external-store": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz", - "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, "demos/next-export": { "name": "next-export-demo", "version": "1.0.0", @@ -5934,13 +5926,13 @@ "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "dev": true + "devOptional": true }, "node_modules/@types/react": { "version": "17.0.45", "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.45.tgz", "integrity": "sha512-YfhQ22Lah2e3CHPsb93tRwIGNiSwkuz1/blk4e6QrWS0jQzCSNbGLtOEYhPg02W0yGTTmpajp7dCTbBAMN3qsg==", - "dev": true, + "devOptional": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -5960,7 +5952,7 @@ "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "dev": true + "devOptional": true }, "node_modules/@types/sinonjs__fake-timers": { "version": "8.1.1", @@ -9486,7 +9478,7 @@ "version": "3.0.11", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz", "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==", - "dev": true + "devOptional": true }, "node_modules/cypress": { "version": "9.5.4", @@ -13676,7 +13668,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", - "dev": true + "devOptional": true }, "node_modules/import-fresh": { "version": "3.3.0", @@ -21165,7 +21157,7 @@ "version": "1.50.1", "resolved": "https://registry.npmjs.org/sass/-/sass-1.50.1.tgz", "integrity": "sha512-noTnY41KnlW2A9P8sdwESpDmo+KBNkukI1i8+hOK3footBUcohNHtdOJbckp46XO95nuvcHDDZ+4tmOnpK3hjw==", - "dev": true, + "devOptional": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -23501,6 +23493,14 @@ } } }, + "node_modules/use-sync-external-store": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz", + "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -24235,7 +24235,7 @@ "@types/fs-extra": "^9.0.13", "@types/jest": "^27.4.1", "@types/node": "^17.0.25", - "next": "^12.1.6", + "next": "^12.1.7-canary.33", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" }, @@ -24246,6 +24246,273 @@ "next": "*" } }, + "plugin/node_modules/@next/env": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.1.7-canary.38.tgz", + "integrity": "sha512-x6ko7i7hZoHk+GuftTFF4smuKxzWVy3cfm/V58rDRPKkrY0Cy9yVF0jGWvMVyP2KEupM372/yFn6OGUlGY/cNA==", + "dev": true + }, + "plugin/node_modules/@next/swc-android-arm-eabi": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.1.7-canary.38.tgz", + "integrity": "sha512-o/LTuqKWgAjw6IPVR0FyGvOQWkmG5Wevg5QhY6AC/te18L+41qwz+a0nxoFj9UFTMS1nLKD3EUaoVsNUYXVCcg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "plugin/node_modules/@next/swc-android-arm64": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.1.7-canary.38.tgz", + "integrity": "sha512-cLqzQD46E4a+W//cjuaz4dj/lxq6f8y3Ou9VNWhfvcqGctkjbborlXWU519kDM1bRjlzc4ODvKpniWAGMNe1Qw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "plugin/node_modules/@next/swc-darwin-arm64": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.7-canary.38.tgz", + "integrity": "sha512-Kj/ZIXQw+Y3aTjkNUpljhEKhp2+0iREphAjdZhvO8XP35PmuOP/ALJGWWUvMLm3C2AIZraifW85KcAHBOkeM0A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "plugin/node_modules/@next/swc-darwin-x64": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.1.7-canary.38.tgz", + "integrity": "sha512-ZrBrYy8Gx7e3Uk91CyQYTPx9J+2Dfb1J+6R24Ol9oiD7msTYeymS1co1kukj28juai83Ci09eNjlpMdJhEaTqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "plugin/node_modules/@next/swc-freebsd-x64": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.1.7-canary.38.tgz", + "integrity": "sha512-amu2IGraFrAPLgl6YSMzfbazJj6ybt4CQS3U24o5dNpxdpi+rZo4KrWq/I0iq6CpqTIuq1AO3a3eiAPdyrFK6w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "plugin/node_modules/@next/swc-linux-arm-gnueabihf": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.1.7-canary.38.tgz", + "integrity": "sha512-aUUCV7O6B/qDANVE19tDla4yBhEKtj2BZpPmHKwwcphgqhmkedhUt4NPtTGhzvXtte6UyUQTDZgO+PKnk/5oUw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "plugin/node_modules/@next/swc-linux-arm64-gnu": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.1.7-canary.38.tgz", + "integrity": "sha512-XJ0TV0/U7UY1pEMu5rAYQvWTw9pNjIB8U5rwroQJklX1AfciOrQlk4BhNts4VO4kAXNVQ9LVJC8QUuVc885TPg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "plugin/node_modules/@next/swc-linux-arm64-musl": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.1.7-canary.38.tgz", + "integrity": "sha512-fsIYn2WrjGiYG4RsvEq3AS9knpfptqF4CG5WIPV8KL1KSSSaVzVKiqvLzkJuVP755Sxuax2cb8n6gNtBQfDRMQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "plugin/node_modules/@next/swc-linux-x64-gnu": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.1.7-canary.38.tgz", + "integrity": "sha512-NToPCsLpdkXvbpx3BNzQ2lEa0MzCtFI63bt3eQskERV3weR79QBPM1Gz3r9IslFdchYUNC6nkRbEBqsxynFLyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "plugin/node_modules/@next/swc-linux-x64-musl": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.1.7-canary.38.tgz", + "integrity": "sha512-vUMOwLytLcny9s8VIa8hU3cr2Tq7FCMeXj5QGn92NLiKyNRbpNuWZM/rSYfF4cM+h4/oNN1OUpBATleOf2XVZQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "plugin/node_modules/@next/swc-win32-arm64-msvc": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.1.7-canary.38.tgz", + "integrity": "sha512-OZOA+K50mU5o9NW+aRbe8YF/R6fhHf8pSpKA4IjbiyXqxQ2pnTSFx2ujZ7cYN9D97bzrxwFjnR7V6K412pMcjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "plugin/node_modules/@next/swc-win32-ia32-msvc": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.1.7-canary.38.tgz", + "integrity": "sha512-7WmDd2ki8e8qsvP9fZgN8jYTNmCgAm3fsFCw/pYcFlMuypdptywTWoPeUGda5N0w9/vt6d0HIf8aTjAHeGwswA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "plugin/node_modules/@next/swc-win32-x64-msvc": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.1.7-canary.38.tgz", + "integrity": "sha512-DvtTPBouPG2J2k6DAJKLr24kDFvtXUe2Ew4GXHN2oUQuJNJUc7PqvEpMwPavH/S1oaWoR0NnsrmPA+jXMjIhdA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "plugin/node_modules/next": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/next/-/next-12.1.7-canary.38.tgz", + "integrity": "sha512-SRtCUwUdtdn+Vif1k2uE7Z/ZA1uNIC44Nwu/oWaL8Q1gMRv9BB43OGkSicKaVOHhTU3nQGkyzCUmLgh+jEBbtA==", + "dev": true, + "dependencies": { + "@next/env": "12.1.7-canary.38", + "@swc/helpers": "0.3.17", + "caniuse-lite": "^1.0.30001332", + "postcss": "8.4.5", + "styled-jsx": "5.0.2", + "use-sync-external-store": "1.1.0" + }, + "bin": { + "next": "dist/bin/next" + }, + "engines": { + "node": ">=12.22.0" + }, + "optionalDependencies": { + "@next/swc-android-arm-eabi": "12.1.7-canary.38", + "@next/swc-android-arm64": "12.1.7-canary.38", + "@next/swc-darwin-arm64": "12.1.7-canary.38", + "@next/swc-darwin-x64": "12.1.7-canary.38", + "@next/swc-freebsd-x64": "12.1.7-canary.38", + "@next/swc-linux-arm-gnueabihf": "12.1.7-canary.38", + "@next/swc-linux-arm64-gnu": "12.1.7-canary.38", + "@next/swc-linux-arm64-musl": "12.1.7-canary.38", + "@next/swc-linux-x64-gnu": "12.1.7-canary.38", + "@next/swc-linux-x64-musl": "12.1.7-canary.38", + "@next/swc-win32-arm64-msvc": "12.1.7-canary.38", + "@next/swc-win32-ia32-msvc": "12.1.7-canary.38", + "@next/swc-win32-x64-msvc": "12.1.7-canary.38" + }, + "peerDependencies": { + "fibers": ">= 3.1.0", + "node-sass": "^6.0.0 || ^7.0.0", + "react": "^17.0.2 || ^18.0.0-0", + "react-dom": "^17.0.2 || ^18.0.0-0", + "sass": "^1.3.0" + }, + "peerDependenciesMeta": { + "fibers": { + "optional": true + }, + "node-sass": { + "optional": true + }, + "sass": { + "optional": true + } + } + }, "plugin/node_modules/semver": { "version": "7.3.7", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", @@ -27323,7 +27590,7 @@ "fs-extra": "^10.0.0", "globby": "^11.0.4", "moize": "^6.1.0", - "next": "^12.1.6", + "next": "^12.1.7-canary.33", "node-fetch": "^2.6.6", "node-stream-zip": "^1.15.0", "npm-run-all": "^4.1.5", @@ -27337,6 +27604,130 @@ "typescript": "^4.6.3" }, "dependencies": { + "@next/env": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.1.7-canary.38.tgz", + "integrity": "sha512-x6ko7i7hZoHk+GuftTFF4smuKxzWVy3cfm/V58rDRPKkrY0Cy9yVF0jGWvMVyP2KEupM372/yFn6OGUlGY/cNA==", + "dev": true + }, + "@next/swc-android-arm-eabi": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.1.7-canary.38.tgz", + "integrity": "sha512-o/LTuqKWgAjw6IPVR0FyGvOQWkmG5Wevg5QhY6AC/te18L+41qwz+a0nxoFj9UFTMS1nLKD3EUaoVsNUYXVCcg==", + "dev": true, + "optional": true + }, + "@next/swc-android-arm64": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.1.7-canary.38.tgz", + "integrity": "sha512-cLqzQD46E4a+W//cjuaz4dj/lxq6f8y3Ou9VNWhfvcqGctkjbborlXWU519kDM1bRjlzc4ODvKpniWAGMNe1Qw==", + "dev": true, + "optional": true + }, + "@next/swc-darwin-arm64": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.7-canary.38.tgz", + "integrity": "sha512-Kj/ZIXQw+Y3aTjkNUpljhEKhp2+0iREphAjdZhvO8XP35PmuOP/ALJGWWUvMLm3C2AIZraifW85KcAHBOkeM0A==", + "dev": true, + "optional": true + }, + "@next/swc-darwin-x64": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.1.7-canary.38.tgz", + "integrity": "sha512-ZrBrYy8Gx7e3Uk91CyQYTPx9J+2Dfb1J+6R24Ol9oiD7msTYeymS1co1kukj28juai83Ci09eNjlpMdJhEaTqQ==", + "dev": true, + "optional": true + }, + "@next/swc-freebsd-x64": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.1.7-canary.38.tgz", + "integrity": "sha512-amu2IGraFrAPLgl6YSMzfbazJj6ybt4CQS3U24o5dNpxdpi+rZo4KrWq/I0iq6CpqTIuq1AO3a3eiAPdyrFK6w==", + "dev": true, + "optional": true + }, + "@next/swc-linux-arm-gnueabihf": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.1.7-canary.38.tgz", + "integrity": "sha512-aUUCV7O6B/qDANVE19tDla4yBhEKtj2BZpPmHKwwcphgqhmkedhUt4NPtTGhzvXtte6UyUQTDZgO+PKnk/5oUw==", + "dev": true, + "optional": true + }, + "@next/swc-linux-arm64-gnu": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.1.7-canary.38.tgz", + "integrity": "sha512-XJ0TV0/U7UY1pEMu5rAYQvWTw9pNjIB8U5rwroQJklX1AfciOrQlk4BhNts4VO4kAXNVQ9LVJC8QUuVc885TPg==", + "dev": true, + "optional": true + }, + "@next/swc-linux-arm64-musl": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.1.7-canary.38.tgz", + "integrity": "sha512-fsIYn2WrjGiYG4RsvEq3AS9knpfptqF4CG5WIPV8KL1KSSSaVzVKiqvLzkJuVP755Sxuax2cb8n6gNtBQfDRMQ==", + "dev": true, + "optional": true + }, + "@next/swc-linux-x64-gnu": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.1.7-canary.38.tgz", + "integrity": "sha512-NToPCsLpdkXvbpx3BNzQ2lEa0MzCtFI63bt3eQskERV3weR79QBPM1Gz3r9IslFdchYUNC6nkRbEBqsxynFLyQ==", + "dev": true, + "optional": true + }, + "@next/swc-linux-x64-musl": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.1.7-canary.38.tgz", + "integrity": "sha512-vUMOwLytLcny9s8VIa8hU3cr2Tq7FCMeXj5QGn92NLiKyNRbpNuWZM/rSYfF4cM+h4/oNN1OUpBATleOf2XVZQ==", + "dev": true, + "optional": true + }, + "@next/swc-win32-arm64-msvc": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.1.7-canary.38.tgz", + "integrity": "sha512-OZOA+K50mU5o9NW+aRbe8YF/R6fhHf8pSpKA4IjbiyXqxQ2pnTSFx2ujZ7cYN9D97bzrxwFjnR7V6K412pMcjg==", + "dev": true, + "optional": true + }, + "@next/swc-win32-ia32-msvc": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.1.7-canary.38.tgz", + "integrity": "sha512-7WmDd2ki8e8qsvP9fZgN8jYTNmCgAm3fsFCw/pYcFlMuypdptywTWoPeUGda5N0w9/vt6d0HIf8aTjAHeGwswA==", + "dev": true, + "optional": true + }, + "@next/swc-win32-x64-msvc": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.1.7-canary.38.tgz", + "integrity": "sha512-DvtTPBouPG2J2k6DAJKLr24kDFvtXUe2Ew4GXHN2oUQuJNJUc7PqvEpMwPavH/S1oaWoR0NnsrmPA+jXMjIhdA==", + "dev": true, + "optional": true + }, + "next": { + "version": "12.1.7-canary.38", + "resolved": "https://registry.npmjs.org/next/-/next-12.1.7-canary.38.tgz", + "integrity": "sha512-SRtCUwUdtdn+Vif1k2uE7Z/ZA1uNIC44Nwu/oWaL8Q1gMRv9BB43OGkSicKaVOHhTU3nQGkyzCUmLgh+jEBbtA==", + "dev": true, + "requires": { + "@next/env": "12.1.7-canary.38", + "@next/swc-android-arm-eabi": "12.1.7-canary.38", + "@next/swc-android-arm64": "12.1.7-canary.38", + "@next/swc-darwin-arm64": "12.1.7-canary.38", + "@next/swc-darwin-x64": "12.1.7-canary.38", + "@next/swc-freebsd-x64": "12.1.7-canary.38", + "@next/swc-linux-arm-gnueabihf": "12.1.7-canary.38", + "@next/swc-linux-arm64-gnu": "12.1.7-canary.38", + "@next/swc-linux-arm64-musl": "12.1.7-canary.38", + "@next/swc-linux-x64-gnu": "12.1.7-canary.38", + "@next/swc-linux-x64-musl": "12.1.7-canary.38", + "@next/swc-win32-arm64-msvc": "12.1.7-canary.38", + "@next/swc-win32-ia32-msvc": "12.1.7-canary.38", + "@next/swc-win32-x64-msvc": "12.1.7-canary.38", + "@swc/helpers": "0.3.17", + "caniuse-lite": "^1.0.30001332", + "postcss": "8.4.5", + "styled-jsx": "5.0.2", + "use-sync-external-store": "1.1.0" + } + }, "semver": { "version": "7.3.7", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", @@ -28058,13 +28449,13 @@ "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "dev": true + "devOptional": true }, "@types/react": { "version": "17.0.45", "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.45.tgz", "integrity": "sha512-YfhQ22Lah2e3CHPsb93tRwIGNiSwkuz1/blk4e6QrWS0jQzCSNbGLtOEYhPg02W0yGTTmpajp7dCTbBAMN3qsg==", - "dev": true, + "devOptional": true, "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -28084,7 +28475,7 @@ "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "dev": true + "devOptional": true }, "@types/sinonjs__fake-timers": { "version": "8.1.1", @@ -28392,7 +28783,8 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true + "dev": true, + "requires": {} }, "acorn-walk": { "version": "7.2.0", @@ -30724,7 +31116,7 @@ "version": "3.0.11", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz", "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==", - "dev": true + "devOptional": true }, "cypress": { "version": "9.5.4", @@ -31890,13 +32282,15 @@ "version": "8.5.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", - "dev": true + "dev": true, + "requires": {} }, "eslint-config-standard": { "version": "16.0.3", "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz", "integrity": "sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==", - "dev": true + "dev": true, + "requires": {} }, "eslint-import-resolver-node": { "version": "0.3.6", @@ -32351,7 +32745,8 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-5.2.0.tgz", "integrity": "sha512-SftLb1pUG01QYq2A/hGAWfDRXqYD82zE7j7TopDOyNdU+7SvvoXREls/+PRTY17vUXzXnZA/zfnyKgRH6x4JJw==", - "dev": true + "dev": true, + "requires": {} }, "eslint-plugin-react": { "version": "7.29.4", @@ -32399,7 +32794,8 @@ "version": "4.5.0", "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.5.0.tgz", "integrity": "sha512-8k1gRt7D7h03kd+SAAlzXkQwWK22BnK6GKZG+FJA6BAGy22CFvl8kCIXKpVux0cCxMWDQUPqSok0LKaZ0aOcCw==", - "dev": true + "dev": true, + "requires": {} }, "eslint-plugin-unicorn": { "version": "40.1.0", @@ -33889,7 +34285,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", - "dev": true + "devOptional": true }, "import-fresh": { "version": "3.3.0", @@ -34965,7 +35361,8 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true + "dev": true, + "requires": {} }, "jest-regex-util": { "version": "27.5.1", @@ -36673,7 +37070,7 @@ "@types/node": "^17.0.25", "@types/react": "^17.0.43", "husky": "^7.0.4", - "next": "12.1.7-canary.33", + "next": "^12.1.7-canary.33", "npm-run-all": "^4.1.5", "react": "18.0.0", "react-dom": "18.0.0", @@ -36781,13 +37178,6 @@ "postcss": "8.4.5", "styled-jsx": "5.0.2", "use-sync-external-store": "1.1.0" - }, - "dependencies": { - "use-sync-external-store": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz", - "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==" - } } } } @@ -39709,7 +40099,7 @@ "version": "1.50.1", "resolved": "https://registry.npmjs.org/sass/-/sass-1.50.1.tgz", "integrity": "sha512-noTnY41KnlW2A9P8sdwESpDmo+KBNkukI1i8+hOK3footBUcohNHtdOJbckp46XO95nuvcHDDZ+4tmOnpK3hjw==", - "dev": true, + "devOptional": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -40757,7 +41147,8 @@ "styled-jsx": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.2.tgz", - "integrity": "sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==" + "integrity": "sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==", + "requires": {} }, "supports-color": { "version": "9.2.2", @@ -41538,7 +41929,8 @@ "ws": { "version": "8.5.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==" + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "requires": {} } } }, @@ -41643,6 +42035,12 @@ "tslib": "^2.0.0" } }, + "use-sync-external-store": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz", + "integrity": "sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==", + "requires": {} + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -42042,7 +42440,8 @@ "version": "7.5.7", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", - "dev": true + "dev": true, + "requires": {} }, "xdg-basedir": { "version": "4.0.0", diff --git a/plugin/package.json b/plugin/package.json index 13816ceb06..1880f2bcaf 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -32,7 +32,7 @@ "@types/fs-extra": "^9.0.13", "@types/jest": "^27.4.1", "@types/node": "^17.0.25", - "next": "^12.1.6", + "next": "^12.1.7-canary.33", "npm-run-all": "^4.1.5", "typescript": "^4.6.3" }, diff --git a/plugin/src/helpers/functions.ts b/plugin/src/helpers/functions.ts index 281fea3a60..50fe41db97 100644 --- a/plugin/src/helpers/functions.ts +++ b/plugin/src/helpers/functions.ts @@ -1,7 +1,7 @@ import type { NetlifyConfig, NetlifyPluginConstants } from '@netlify/build' import bridgeFile from '@vercel/node-bridge' import { copyFile, ensureDir, writeFile, writeJSON } from 'fs-extra' -import type { ImageConfigComplete } from 'next/dist/shared/lib/image-config' +import type { ImageConfigComplete, RemotePattern } from 'next/dist/shared/lib/image-config' import { join, relative, resolve } from 'pathe' import { HANDLER_FUNCTION_NAME, ODB_FUNCTION_NAME, IMAGE_FUNCTION_NAME, DEFAULT_FUNCTIONS_SRC } from '../constants' @@ -59,11 +59,13 @@ export const setupImageFunction = async ({ imageconfig = {}, netlifyConfig, basePath, + remotePatterns, }: { constants: NetlifyPluginConstants netlifyConfig: NetlifyConfig basePath: string imageconfig: Partial + remotePatterns: RemotePattern[] }): Promise => { const functionsPath = INTERNAL_FUNCTIONS_SRC || FUNCTIONS_SRC const functionName = `${IMAGE_FUNCTION_NAME}.js` @@ -73,6 +75,7 @@ export const setupImageFunction = async ({ await writeJSON(join(functionDirectory, 'imageconfig.json'), { ...imageconfig, basePath: [basePath, IMAGE_FUNCTION_NAME].join('/'), + remotePatterns, }) await copyFile(join(__dirname, '..', '..', 'lib', 'templates', 'ipx.js'), join(functionDirectory, functionName)) diff --git a/plugin/src/index.ts b/plugin/src/index.ts index 834e28c060..5fd0a1699b 100644 --- a/plugin/src/index.ts +++ b/plugin/src/index.ts @@ -1,3 +1,4 @@ +/* eslint-disable max-lines */ import { join, relative } from 'path' import type { NetlifyPlugin } from '@netlify/build' @@ -71,7 +72,19 @@ const plugin: NetlifyPlugin = { checkNextSiteHasBuilt({ publish, failBuild }) - const { appDir, basePath, i18n, images, target, ignore, trailingSlash, outdir } = await getNextConfig({ + const { + appDir, + basePath, + i18n, + images, + target, + ignore, + trailingSlash, + outdir, + experimental: { + images: { remotePatterns }, + }, + } = await getNextConfig({ publish, failBuild, }) @@ -115,7 +128,7 @@ const plugin: NetlifyPlugin = { nextConfig: { basePath, i18n }, }) - await setupImageFunction({ constants, imageconfig: images, netlifyConfig, basePath }) + await setupImageFunction({ constants, imageconfig: images, netlifyConfig, basePath, remotePatterns }) await generateRedirects({ netlifyConfig, @@ -175,3 +188,4 @@ const plugin: NetlifyPlugin = { }, } module.exports = plugin +/* eslint-enable max-lines */ diff --git a/plugin/src/templates/ipx.ts b/plugin/src/templates/ipx.ts index ee1b06d1bd..27bb62acb9 100644 --- a/plugin/src/templates/ipx.ts +++ b/plugin/src/templates/ipx.ts @@ -3,10 +3,11 @@ import { Handler } from '@netlify/functions' import { createIPXHandler } from '@netlify/ipx' // @ts-ignore Injected at build time -import { basePath, domains } from './imageconfig.json' +import { basePath, domains, remotePatterns } from './imageconfig.json' export const handler: Handler = createIPXHandler({ basePath, domains, + remotePatterns, }) as Handler /* eslint-enable node/no-missing-import, import/no-unresolved, @typescript-eslint/ban-ts-comment */