Unverified Commit fafbea8b authored by Kiko Beats's avatar Kiko Beats Committed by GitHub

Use Edge Runtime for running Edge Functions locally (#37024)

This PR introduces [Edge Runtime](https://edge-runtime.vercel.app/) for emulating [Edge Functions](https://vercel.com/features/edge-functions) locally.

Every time you run a [middleware](https://nextjs.org/docs/advanced-features/middleware) locally via `next dev`, an isolated edge runtime context will be created.

These contexts have the same constraints as production servers, plus they don't pollute the global scope; Instead, all the code run in a vm on top of a Node.js process.

Additionally, `@edge-runtime/jest-environment` has been added to make easier testing Edge Functions in a programmatic way.

It dropped the following polyfills from Next.js codebase, since they are now part of Edge Runtime:

- abort-controller
- formdata
- uuid
- web-crypto
- web-streams
Co-authored-by: 's avatarGal Schlezinger <2054772+Schniz@users.noreply.github.com>
parent ec572b0b
const escape = require('shell-quote').quote
const { quote } = require('shell-quote')
const { ESLint } = require('eslint')
const eslint = new ESLint()
......@@ -26,3 +26,8 @@ module.exports = {
]
},
}
function escape(str) {
const escaped = quote(str)
return escaped.replace(/\\@/g, '@')
}
......@@ -54,6 +54,7 @@
"@babel/plugin-proposal-object-rest-spread": "7.14.7",
"@babel/preset-flow": "7.14.5",
"@babel/preset-react": "7.14.5",
"@edge-runtime/jest-environment": "1.0.1-beta.10",
"@fullhuman/postcss-purgecss": "1.3.0",
"@mdx-js/loader": "0.18.0",
"@next/bundle-analyzer": "workspace:*",
......@@ -191,7 +192,6 @@
"turbo": "1.2.9",
"typescript": "4.6.3",
"wait-port": "0.2.2",
"web-streams-polyfill": "2.1.1",
"webpack": "link:./node_modules/webpack5",
"webpack-bundle-analyzer": "4.3.0",
"worker-loader": "3.0.7"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{"name":"@edge-runtime/primitives","version":"1.0.1-beta.10","main":"./index.js","license":"MPLv2"}
{"name":"@peculiar/webcrypto","main":"webcrypto.js","author":"PeculiarVentures","license":"MIT"}
MIT License
Copyright (c) 2017 Toru Nagashima
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
{"name":"abort-controller","main":"abort-controller.js","author":"Toru Nagashima (https://github.com/mysticatea)","license":"MIT"}
(()=>{var e={901:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EdgeVM=void 0;const n=r(951);const s=r(108);class EdgeVM extends s.VM{constructor(e={}){super({...e,extend:t=>e.extend?e.extend((0,n.addPrimitives)(t)):(0,n.addPrimitives)(t)})}}t.EdgeVM=EdgeVM},118:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VM=t.EdgeVM=void 0;var n=r(901);Object.defineProperty(t,"EdgeVM",{enumerable:true,get:function(){return n.EdgeVM}});var s=r(108);Object.defineProperty(t,"VM",{enumerable:true,get:function(){return s.VM}})},878:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createRequire=t.requireDependencies=void 0;const n=r(147);const s=r(144);const o=r(17);function requireDependencies(e){const{context:t,requireCache:r,dependencies:n}=e;const s=createRequire(t,r);for(const{path:e,mapExports:r}of n){const n=s(e,e);for(const e of Object.keys(r)){t[r[e]]=n[e]}}}t.requireDependencies=requireDependencies;function createRequire(e,t){return function requireFn(r,i){const a=require.resolve(i,{paths:[(0,o.dirname)(r)]});const E=t.get(a);if(E!==undefined){return E.exports}const d={exports:{},loaded:false,id:a};t.set(a,d);const c=(0,s.runInContext)(`(function(module,exports,require,__dirname,__filename) {${(0,n.readFileSync)(a,"utf-8")}\n})`,e);try{c(d,d.exports,requireFn.bind(null,a),(0,o.dirname)(a),a)}finally{t.delete(a)}d.loaded=true;return d.exports}}t.createRequire=createRequire},722:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.tempFile=void 0;const s=n(r(147));const o=n(r(37));const i=n(r(17));const a=n(r(951));const{crypto:E}=a.default;function tempFile(e){const t=i.default.join(o.default.tmpdir(),E.randomUUID());s.default.writeFileSync(t,e);return{path:t,remove:()=>s.default.unlinkSync(t)}}t.tempFile=tempFile},108:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VM=void 0;const n=r(144);const s=r(878);const o=r(722);class VM{constructor(e={}){var t,r,o,i;const a=(0,n.createContext)({},{name:"Edge Runtime",codeGeneration:(t=e.codeGeneration)!==null&&t!==void 0?t:{strings:false,wasm:false}});this.requireCache=(r=e.requireCache)!==null&&r!==void 0?r:new Map;this.context=(i=(o=e.extend)===null||o===void 0?void 0:o.call(e,a))!==null&&i!==void 0?i:a;this.requireFn=(0,s.createRequire)(this.context,this.requireCache)}evaluate(e){return(0,n.runInContext)(e,this.context)}require(e){return this.requireFn(e,e)}requireInContext(e){const t=this.require(e);for(const[e,r]of Object.entries(t)){this.context[e]=r}}requireInlineInContext(e){const t=(0,o.tempFile)(e);this.requireInContext(t.path);t.remove()}}t.VM=VM},734:e=>{"use strict";e.exports=e=>{const t=e[0]*1e9+e[1];const r=t/1e6;const n=t/1e9;return{seconds:n,milliseconds:r,nanoseconds:t}}},141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EdgeRuntime=void 0;const n=r(118);const s=r(526);let o;class EdgeRuntime extends n.EdgeVM{constructor(e){super({...e,extend:t=>{var r,n;return(n=(r=e===null||e===void 0?void 0:e.extend)===null||r===void 0?void 0:r.call(e,t))!==null&&n!==void 0?n:t}});Object.defineProperty(this.context,"__onUnhandledRejectionHandler",{value:e=>o=e,configurable:false,enumerable:false,writable:true});Object.defineProperty(this,"__rejectionHandlers",{get:()=>o,configurable:false,enumerable:false});Object.defineProperty(this.context,"VercelRuntime",{configurable:false,enumerable:false,writable:false,value:{version:s.VERSION}});this.evaluate(getFetchEventCode());this.evaluate(getDefineEventListenersCode());this.dispatchFetch=this.evaluate(getDispatchFetchCode());if(e===null||e===void 0?void 0:e.initialCode){this.evaluate(e.initialCode)}}}t.EdgeRuntime=EdgeRuntime;process.on("unhandledRejection",((e,t)=>{o===null||o===void 0?void 0:o.forEach((r=>r(e,t)))}));function getFetchEventCode(){return`\n class FetchEvent extends Event {\n constructor(request) {\n super('fetch')\n this.request = request\n this.response = null\n this.awaiting = new Set()\n }\n\n respondWith(response) {\n this.response = response\n }\n\n waitUntil(promise) {\n this.awaiting.add(promise)\n promise.finally(() => this.awaiting.delete(promise))\n }\n }\n\n class PromiseRejectionEvent extends Event {\n constructor(type, init) {\n super(type, { cancelable: true })\n this.promise = init.promise\n this.reason = init.reason\n }\n }\n `}function getDefineEventListenersCode(){return`\n Object.defineProperty(self, '__listeners', {\n configurable: false,\n enumerable: false,\n value: {},\n writable: true,\n })\n\n function addEventListener(type, handler) {\n const eventType = type.toLowerCase();\n if (eventType === 'fetch' && self.__listeners.fetch) {\n throw new TypeError('You can register just one "fetch" event listener');\n }\n\n self.__listeners[eventType] = self.__listeners[eventType] || [];\n self.__listeners[eventType].push(handler);\n\n if (eventType === 'unhandledrejection') {\n self.__onUnhandledRejectionHandler(self.__listeners.unhandledrejection)\n }\n }\n\n function removeEventListener(type, handler) {\n const eventType = type.toLowerCase();\n if (self.__listeners[eventType]) {\n self.__listeners[eventType] = self.__listeners[eventType].filter(item => {\n return item !== handler;\n });\n\n if (self.__listeners[eventType].length === 0) {\n delete self.__listeners[eventType];\n }\n }\n\n if (eventType === 'unhandledrejection') {\n self.__onUnhandledRejectionHandler(self.__listeners.unhandledrejection)\n }\n }\n `}function getDispatchFetchCode(){return`(async function dispatchFetch(input, init) {\n const request = new Request(input, init);\n const event = new FetchEvent(request);\n if (!self.__listeners.fetch) {\n throw new Error("No fetch event listeners found");\n }\n\n const getResponse = ({ response, error }) => {\n if (error || !response || !(response instanceof Response)) {\n console.error(error ? error : 'The event listener did not respond')\n response = new Response(null, {\n statusText: 'Internal Server Error',\n status: 500\n })\n }\n\n response.waitUntil = () => Promise.all(event.awaiting);\n return response;\n }\n\n try {\n await self.__listeners.fetch[0].call(event, event)\n } catch (error) {\n return getResponse({ error })\n }\n\n return Promise.resolve(event.response)\n .then(response => getResponse({ response }))\n .catch(error => getResponse({ error }))\n })`}},424:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getClonableBodyStream=void 0;const n=r(781);function getClonableBodyStream(e,t){let r=null;return{finalize(){if(r){replaceRequestBody(e,bodyStreamToNodeStream(r))}},cloneBodyStream(){const n=r!==null&&r!==void 0?r:requestToBodyStream(e,t);const[s,o]=n.tee();r=s;return o}}}t.getClonableBodyStream=getClonableBodyStream;function requestToBodyStream(e,t){const r=new t({start(t){e.on("data",(e=>t.enqueue(e)));e.on("end",(()=>t.terminate()));e.on("error",(e=>t.error(e)))}});return r.readable}function bodyStreamToNodeStream(e){const t=e.getReader();return n.Readable.from(async function*(){while(true){const{done:e,value:r}=await t.read();if(e){return}yield r}}())}function replaceRequestBody(e,t){for(const r in t){let n=t[r];if(typeof n==="function"){n=n.bind(t)}e[r]=n}return e}},186:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.createHandler=void 0;const s=r(424);const o=n(r(720));const i=n(r(242));const a=n(r(504));function createHandler(e){const t=new Set;return{handler:async(r,n)=>{var E,d;const c=(0,a.default)();const u=r.method!=="GET"&&r.method!=="HEAD"?(0,s.getClonableBodyStream)(r,e.runtime.context.TransformStream):undefined;const _=await e.runtime.dispatchFetch(String(getURL(r)),{headers:toRequestInitHeaders(r),method:r.method,body:u===null||u===void 0?void 0:u.cloneBodyStream()});const l=_.waitUntil();t.add(l);l.finally((()=>t.delete(l)));n.statusCode=_.status;n.statusMessage=_.statusText;for(const[e,t]of Object.entries(toNodeHeaders(_.headers))){if(e!=="content-encoding"&&t!==undefined){n.setHeader(e,t)}}if(_.body){for await(const e of _.body){n.write(e)}}const S=`${r.socket.remoteAddress} ${r.method} ${r.url}`;const R=`${(E=(0,o.default)(c()).match(/[a-zA-Z]+|[0-9]+/g))===null||E===void 0?void 0:E.join(" ")}`;const h=`${n.statusCode} ${i.default[n.statusCode]}`;(d=e.logger)===null||d===void 0?void 0:d.debug(`${S} → ${h} in ${R}`);n.end()},waitUntil:()=>Promise.all(Array.from(t))}}t.createHandler=createHandler;function getURL(e){var t;const r=((t=e.socket)===null||t===void 0?void 0:t.encrypted)?"https":"http";return new URL(String(e.url),`${r}://${String(e.headers.host)}`)}function toRequestInitHeaders(e){return Object.keys(e.headers).map((t=>{const r=e.headers[t];return[t,Array.isArray(r)?r.join(", "):r!==null&&r!==void 0?r:""]}))}function toNodeHeaders(e){const t={};if(e){for(const[r,n]of e.entries()){t[r]=r.toLowerCase()==="set-cookie"?e.getAll("set-cookie"):n}}return t}},520:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runServer=t.createHandler=void 0;var n=r(186);Object.defineProperty(t,"createHandler",{enumerable:true,get:function(){return n.createHandler}});var s=r(216);Object.defineProperty(t,"runServer",{enumerable:true,get:function(){return s.runServer}})},216:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.runServer=void 0;const s=r(186);const o=r(361);const i=n(r(685));async function runServer(e){const{handler:t,waitUntil:r}=(0,s.createHandler)(e);const n=i.default.createServer(t);n.listen(e.port);try{await(0,o.once)(n,"listening")}catch(t){if((t===null||t===void 0?void 0:t.code)==="EADDRINUSE"){return runServer({...e,port:undefined})}throw t}const a=n.address();const E=typeof a==="string"||a==null?String(a):`http://localhost:${a.port}`;return{url:E,close:async()=>{await r();await new Promise(((e,t)=>n.close((r=>{if(r)t(r);e()}))))},waitUntil:r}}t.runServer=runServer},526:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VERSION=void 0;t.VERSION="1.0.1-beta.10"},242:e=>{var t;t={"1xx":"Informational","1xx_NAME":"INFORMATIONAL","1xx_MESSAGE":"Indicates an interim response for communicating connection status or request progress prior to completing the requested action and sending a final response.",INFORMATIONAL:"1xx","2xx":"Successful","2xx_NAME":"SUCCESSFUL","2xx_MESSAGE":"Indicates that the client's request was successfully received, understood, and accepted.",SUCCESSFUL:"2xx","3xx":"Redirection","3xx_NAME":"REDIRECTION","3xx_MESSAGE":"Indicates that further action needs to be taken by the user agent in order to fulfill the request.",REDIRECTION:"3xx","4xx":"Client Error","4xx_NAME":"CLIENT_ERROR","4xx_MESSAGE":"Indicates that the client seems to have erred.",CLIENT_ERROR:"4xx","5xx":"Server Error","5xx_NAME":"SERVER_ERROR","5xx_MESSAGE":"Indicates that the server is aware that it has erred or is incapable of performing the requested method.",SERVER_ERROR:"5xx"};e.exports={classes:t,100:"Continue","100_NAME":"CONTINUE","100_MESSAGE":"The server has received the request headers and the client should proceed to send the request body.","100_CLASS":t.INFORMATIONAL,CONTINUE:100,101:"Switching Protocols","101_NAME":"SWITCHING_PROTOCOLS","101_MESSAGE":"The requester has asked the server to switch protocols and the server has agreed to do so.","101_CLASS":t.INFORMATIONAL,SWITCHING_PROTOCOLS:101,102:"Processing","102_NAME":"PROCESSING","102_MESSAGE":"A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request. This code indicates that the server has received and is processing the request, but no response is available yet.[7] This prevents the client from timing out and assuming the request was lost.","102_CLASS":t.INFORMATIONAL,PROCESSING:102,103:"Early Hints","103_NAME":"EARLY_HINTS","103_MESSAGE":"Used to return some response headers before final HTTP message.","103_CLASS":t.INFORMATIONAL,EARLY_HINTS:103,200:"OK","200_NAME":"OK","200_MESSAGE":"Standard response for successful HTTP requests.","200_CLASS":t.SUCCESSFUL,OK:200,201:"Created","201_NAME":"CREATED","201_MESSAGE":"The request has been fulfilled, resulting in the creation of a new resource.","201_CLASS":t.SUCCESSFUL,CREATED:201,202:"Accepted","202_NAME":"ACCEPTED","202_MESSAGE":"The request has been accepted for processing, but the processing has not been completed.","202_CLASS":t.SUCCESSFUL,ACCEPTED:202,203:"Non-Authoritative Information","203_NAME":"NON_AUTHORITATIVE_INFORMATION","203_MESSAGE":"The server is a transforming proxy (e.g. a Web accelerator) that received a 200 OK from its origin, but is returning a modified version of the origin's response.","203_CLASS":t.SUCCESSFUL,NON_AUTHORITATIVE_INFORMATION:203,204:"No Content","204_NAME":"NO_CONTENT","204_MESSAGE":"The server successfully processed the request and is not returning any content.","204_CLASS":t.SUCCESSFUL,NO_CONTENT:204,205:"Reset Content","205_NAME":"RESET_CONTENT","205_MESSAGE":"The server successfully processed the request, but is not returning any content. Unlike a 204 response, this response requires that the requester reset the document view.","205_CLASS":t.SUCCESSFUL,RESET_CONTENT:205,206:"Partial Content","206_NAME":"PARTIAL_CONTENT","206_MESSAGE":"The server is delivering only part of the resource (byte serving) due to a range header sent by the client.","206_CLASS":t.SUCCESSFUL,PARTIAL_CONTENT:206,207:"Multi Status","207_NAME":"MULTI_STATUS","207_MESSAGE":"The message body that follows is by default an XML message and can contain a number of separate response codes, depending on how many sub-requests were made.","207_CLASS":t.SUCCESSFUL,MULTI_STATUS:207,208:"Already Reported","208_NAME":"ALREADY_REPORTED","208_MESSAGE":"The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response, and are not being included again.","208_CLASS":t.SUCCESSFUL,ALREADY_REPORTED:208,226:"IM Used","226_NAME":"IM_USED","226_MESSAGE":"The server has fulfilled a request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.","226_CLASS":t.SUCCESSFUL,IM_USED:226,300:"Multiple Choices","300_NAME":"MULTIPLE_CHOICES","300_MESSAGE":"Indicates multiple options for the resource from which the client may choose.","300_CLASS":t.REDIRECTION,MULTIPLE_CHOICES:300,301:"Moved Permanently","301_NAME":"MOVED_PERMANENTLY","301_MESSAGE":"This and all future requests should be directed to the given URI.","301_CLASS":t.REDIRECTION,MOVED_PERMANENTLY:301,302:"Found","302_NAME":"FOUND","302_MESSAGE":'This is an example of industry practice contradicting the standard. The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302 with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307 to distinguish between the two behaviours.',"302_CLASS":t.REDIRECTION,FOUND:302,303:"See Other","303_NAME":"SEE_OTHER","303_MESSAGE":"The response to the request can be found under another URI using the GET method.","303_CLASS":t.REDIRECTION,SEE_OTHER:303,304:"Not Modified","304_NAME":"NOT_MODIFIED","304_MESSAGE":"Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.","304_CLASS":t.REDIRECTION,NOT_MODIFIED:304,305:"Use Proxy","305_NAME":"USE_PROXY","305_MESSAGE":"The requested resource is available only through a proxy, the address for which is provided in the response.","305_CLASS":t.REDIRECTION,USE_PROXY:305,306:"Switch Proxy","306_NAME":"SWITCH_PROXY","306_MESSAGE":'No longer used. Originally meant "Subsequent requests should use the specified proxy.',"306_CLASS":t.REDIRECTION,SWITCH_PROXY:306,307:"Temporary Redirect","307_NAME":"TEMPORARY_REDIRECT","307_MESSAGE":"In this case, the request should be repeated with another URI; however, future requests should still use the original URI.","307_CLASS":t.REDIRECTION,TEMPORARY_REDIRECT:307,308:"Permanent Redirect","308_NAME":"PERMANENT_REDIRECT","308_MESSAGE":"The request and all future requests should be repeated using another URI.","308_CLASS":t.REDIRECTION,PERMANENT_REDIRECT:308,400:"Bad Request","400_NAME":"BAD_REQUEST","400_MESSAGE":"The server cannot or will not process the request due to an apparent client error.","400_CLASS":t.CLIENT_ERROR,BAD_REQUEST:400,401:"Unauthorized","401_NAME":"UNAUTHORIZED","401_MESSAGE":"Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.","401_CLASS":t.CLIENT_ERROR,UNAUTHORIZED:401,402:"Payment Required","402_NAME":"PAYMENT_REQUIRED","402_MESSAGE":"Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, as proposed for example by GNU Taler, but that has not yet happened, and this code is not usually used.","402_CLASS":t.CLIENT_ERROR,PAYMENT_REQUIRED:402,403:"Forbidden","403_NAME":"FORBIDDEN","403_MESSAGE":"The request was valid, but the server is refusing action.","403_CLASS":t.CLIENT_ERROR,FORBIDDEN:403,404:"Not Found","404_NAME":"NOT_FOUND","404_MESSAGE":"The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.","404_CLASS":t.CLIENT_ERROR,NOT_FOUND:404,405:"Method Not Allowed","405_NAME":"METHOD_NOT_ALLOWED","405_MESSAGE":"A request method is not supported for the requested resource.","405_CLASS":t.CLIENT_ERROR,METHOD_NOT_ALLOWED:405,406:"Not Acceptable","406_NAME":"NOT_ACCEPTABLE","406_MESSAGE":"The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.","406_CLASS":t.CLIENT_ERROR,NOT_ACCEPTABLE:406,407:"Proxy Authentication Required","407_NAME":"PROXY_AUTHENTICATION_REQUIRED","407_MESSAGE":"The client must first authenticate itself with the proxy.","407_CLASS":t.CLIENT_ERROR,PROXY_AUTHENTICATION_REQUIRED:407,408:"Request Time-out","408_NAME":"REQUEST_TIMEOUT","408_MESSAGE":"The server timed out waiting for the request.","408_CLASS":t.CLIENT_ERROR,REQUEST_TIMEOUT:408,409:"Conflict","409_NAME":"CONFLICT","409_MESSAGE":"Indicates that the request could not be processed because of conflict in the request, such as an edit conflict between multiple simultaneous updates.","409_CLASS":t.CLIENT_ERROR,CONFLICT:409,410:"Gone","410_NAME":"GONE","410_MESSAGE":"Indicates that the resource requested is no longer available and will not be available again.","410_CLASS":t.CLIENT_ERROR,GONE:410,411:"Length Required","411_NAME":"LENGTH_REQUIRED","411_MESSAGE":"The request did not specify the length of its content, which is required by the requested resource.","411_CLASS":t.CLIENT_ERROR,LENGTH_REQUIRED:411,412:"Precondition Failed","412_NAME":"PRECONDITION_FAILED","412_MESSAGE":"The server does not meet one of the preconditions that the requester put on the request.","412_CLASS":t.CLIENT_ERROR,PRECONDITION_FAILED:412,413:"Request Entity Too Large","413_NAME":"REQUEST_ENTITY_TOO_LARGE","413_MESSAGE":'The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".',"413_CLASS":t.CLIENT_ERROR,REQUEST_ENTITY_TOO_LARGE:413,414:"Request-URI Too Large","414_NAME":"REQUEST_URI_TOO_LONG","414_MESSAGE":"The URI provided was too long for the server to process.","414_CLASS":t.CLIENT_ERROR,REQUEST_URI_TOO_LONG:414,415:"Unsupported Media Type","415_NAME":"UNSUPPORTED_MEDIA_TYPE","415_MESSAGE":"The request entity has a media type which the server or resource does not support.","415_CLASS":t.CLIENT_ERROR,UNSUPPORTED_MEDIA_TYPE:415,416:"Requested Range not Satisfiable","416_NAME":"REQUESTED_RANGE_NOT_SATISFIABLE","416_MESSAGE":"The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.","416_CLASS":t.CLIENT_ERROR,REQUESTED_RANGE_NOT_SATISFIABLE:416,417:"Expectation Failed","417_NAME":"EXPECTATION_FAILED","417_MESSAGE":"The server cannot meet the requirements of the Expect request-header field.","417_CLASS":t.CLIENT_ERROR,EXPECTATION_FAILED:417,418:"I'm a teapot","418_NAME":"IM_A_TEAPOT","418_MESSAGE":'Any attempt to brew coffee with a teapot should result in the error code "418 I\'m a teapot". The resulting entity body MAY be short and stout.',"418_CLASS":t.CLIENT_ERROR,IM_A_TEAPOT:418,421:"Misdirected Request","421_NAME":"MISDIRECTED_REQUEST","421_MESSAGE":"The request was directed at a server that is not able to produce a response.","421_CLASS":t.CLIENT_ERROR,MISDIRECTED_REQUEST:421,422:"Unprocessable Entity","422_NAME":"UNPROCESSABLE_ENTITY","422_MESSAGE":"The request was well-formed but was unable to be followed due to semantic errors.","422_CLASS":t.CLIENT_ERROR,UNPROCESSABLE_ENTITY:422,423:"Locked","423_NAME":"LOCKED","423_MESSAGE":"The resource that is being accessed is locked.","423_CLASS":t.CLIENT_ERROR,LOCKED:423,424:"Failed Dependency","424_NAME":"FAILED_DEPENDENCY","424_MESSAGE":"The request failed because it depended on another request and that request failed.","424_CLASS":t.CLIENT_ERROR,FAILED_DEPENDENCY:424,426:"Upgrade Required","426_NAME":"UPGRADE_REQUIRED","426_MESSAGE":"The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.","426_CLASS":t.CLIENT_ERROR,UPGRADE_REQUIRED:426,428:"Precondition Required","428_NAME":"PRECONDITION_REQUIRED","428_MESSAGE":"The origin server requires the request to be conditional.","428_CLASS":t.CLIENT_ERROR,PRECONDITION_REQUIRED:428,429:"Too Many Requests","429_NAME":"TOO_MANY_REQUESTS","429_MESSAGE":"The user has sent too many requests in a given amount of time.","429_CLASS":t.CLIENT_ERROR,TOO_MANY_REQUESTS:429,431:"Request Header Fields Too Large","431_NAME":"REQUEST_HEADER_FIELDS_TOO_LARGE","431_MESSAGE":"The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large.","431_CLASS":t.CLIENT_ERROR,REQUEST_HEADER_FIELDS_TOO_LARGE:431,451:"Unavailable For Legal Reasons","451_NAME":"UNAVAILABLE_FOR_LEGAL_REASONS","451_MESSAGE":"A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource.","451_CLASS":t.CLIENT_ERROR,UNAVAILABLE_FOR_LEGAL_REASONS:451,500:"Internal Server Error","500_NAME":"INTERNAL_SERVER_ERROR","500_MESSAGE":"A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.","500_CLASS":t.SERVER_ERROR,INTERNAL_SERVER_ERROR:500,501:"Not Implemented","501_NAME":"NOT_IMPLEMENTED","501_MESSAGE":"The server either does not recognize the request method, or it lacks the ability to fulfil the request. Usually this implies future availability.","501_CLASS":t.SERVER_ERROR,NOT_IMPLEMENTED:501,502:"Bad Gateway","502_NAME":"BAD_GATEWAY","502_MESSAGE":"The server was acting as a gateway or proxy and received an invalid response from the upstream server.","502_CLASS":t.SERVER_ERROR,BAD_GATEWAY:502,503:"Service Unavailable","503_NAME":"SERVICE_UNAVAILABLE","503_MESSAGE":"The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.","503_CLASS":t.SERVER_ERROR,SERVICE_UNAVAILABLE:503,504:"Gateway Time-out","504_NAME":"GATEWAY_TIMEOUT","504_MESSAGE":"The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.","504_CLASS":t.SERVER_ERROR,GATEWAY_TIMEOUT:504,505:"HTTP Version not Supported","505_NAME":"HTTP_VERSION_NOT_SUPPORTED","505_MESSAGE":"The server does not support the HTTP protocol version used in the request.","505_CLASS":t.SERVER_ERROR,HTTP_VERSION_NOT_SUPPORTED:505,506:"Variant Also Negotiates","506_NAME":"VARIANT_ALSO_NEGOTIATES","506_MESSAGE":"Transparent content negotiation for the request results in a circular reference.","506_CLASS":t.SERVER_ERROR,VARIANT_ALSO_NEGOTIATES:506,507:"Insufficient Storage","507_NAME":"INSUFFICIENT_STORAGE","507_MESSAGE":"The server is unable to store the representation needed to complete the request.","507_CLASS":t.SERVER_ERROR,INSUFFICIENT_STORAGE:507,508:"Loop Detected","508_NAME":"LOOP_DETECTED","508_MESSAGE":"The server detected an infinite loop while processing the request.","508_CLASS":t.SERVER_ERROR,LOOP_DETECTED:508,510:"Not Extended","510_NAME":"NOT_EXTENDED","510_MESSAGE":"Further extensions to the request are required for the server to fulfil it.","510_CLASS":t.SERVER_ERROR,NOT_EXTENDED:510,511:"Network Authentication Required","511_NAME":"NETWORK_AUTHENTICATION_REQUIRED","511_MESSAGE":"The client needs to authenticate to gain network access. Intended for use by intercepting proxies used to control access to the network.","511_CLASS":t.SERVER_ERROR,NETWORK_AUTHENTICATION_REQUIRED:511,extra:{unofficial:{103:"Checkpoint","103_NAME":"CHECKPOINT","103_MESSAGE":"Used in the resumable requests proposal to resume aborted PUT or POST requests.","103_CLASS":t.INFORMATIONAL,CHECKPOINT:103,419:"Page Expired","419_NAME":"PAGE_EXPIRED","419_MESSAGE":"Used by the Laravel Framework when a CSRF Token is missing or expired.","419_CLASS":t.CLIENT_ERROR,PAGE_EXPIRED:419,218:"This is fine","218_NAME":"THIS_IS_FINE","218_MESSAGE":"Used as a catch-all error condition for allowing response bodies to flow through Apache when ProxyErrorOverride is enabled. When ProxyErrorOverride is enabled in Apache, response bodies that contain a status code of 4xx or 5xx are automatically discarded by Apache in favor of a generic response or a custom response specified by the ErrorDocument directive.","218_CLASS":t.SUCCESSFUL,THIS_IS_FINE:218,420:"Enhance Your Calm","420_NAME":"ENHANCE_YOUR_CALM","420_MESSAGE":"Returned by version 1 of the Twitter Search and Trends API when the client is being rate limited; versions 1.1 and later use the 429 Too Many Requests response code instead.","420_CLASS":t.CLIENT_ERROR,ENHANCE_YOUR_CALM:420,450:"Blocked by Windows Parental Controls","450_NAME":"BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS","450_MESSAGE":"The Microsoft extension code indicated when Windows Parental Controls are turned on and are blocking access to the requested webpage.","450_CLASS":t.CLIENT_ERROR,BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS:450,498:"Invalid Token","498_NAME":"INVALID_TOKEN","498_MESSAGE":"Returned by ArcGIS for Server. Code 498 indicates an expired or otherwise invalid token.","498_CLASS":t.CLIENT_ERROR,INVALID_TOKEN:498,499:"Token Required","499_NAME":"TOKEN_REQUIRED","499_MESSAGE":"Returned by ArcGIS for Server. Code 499 indicates that a token is required but was not submitted.","499_CLASS":t.CLIENT_ERROR,TOKEN_REQUIRED:499,509:"Bandwidth Limit Exceeded","509_NAME":"BANDWIDTH_LIMIT_EXCEEDED","509_MESSAGE":"The server has exceeded the bandwidth specified by the server administrator.","509_CLASS":t.SERVER_ERROR,BANDWIDTH_LIMIT_EXCEEDED:509,530:"Site is frozen","530_NAME":"SITE_IS_FROZEN","530_MESSAGE":"Used by the Pantheon web platform to indicate a site that has been frozen due to inactivity.","530_CLASS":t.SERVER_ERROR,SITE_IS_FROZEN:530,598:"Network read timeout error","598_NAME":"NETWORK_READ_TIMEOUT_ERROR","598_MESSAGE":"Used by some HTTP proxies to signal a network read timeout behind the proxy to a client in front of the proxy.","598_CLASS":t.SERVER_ERROR,NETWORK_READ_TIMEOUT_ERROR:598},iis:{440:"Login Time-out","440_NAME":"LOGIN_TIME_OUT","440_MESSAGE":"The client's session has expired and must log in again.","440_CLASS":t.CLIENT_ERROR,LOGIN_TIME_OUT:440,449:"Retry With","449_NAME":"RETRY_WITH","449_MESSAGE":"The server cannot honour the request because the user has not provided the required information.","449_CLASS":t.CLIENT_ERROR,RETRY_WITH:449,451:"Redirect","451_NAME":"REDIRECT","451_MESSAGE":"Used in Exchange ActiveSync when either a more efficient server is available or the server cannot access the users' mailbox.","451_CLASS":t.CLIENT_ERROR,REDIRECT:451},nginx:{444:"No Response","444_NAME":"NO_RESPONSE","444_MESSAGE":"Used internally to instruct the server to return no information to the client and close the connection immediately.","444_CLASS":t.CLIENT_ERROR,NO_RESPONSE:444,494:"Request header too large","494_NAME":"REQUEST_HEADER_TOO_LARGE","494_MESSAGE":"Client sent too large request or too long header line.","494_CLASS":t.CLIENT_ERROR,REQUEST_HEADER_TOO_LARGE:494,495:"SSL Certificate Error","495_NAME":"SSL_CERTIFICATE_ERROR","495_MESSAGE":"An expansion of the 400 Bad Request response code, used when the client has provided an invalid client certificate.","495_CLASS":t.CLIENT_ERROR,SSL_CERTIFICATE_ERROR:495,496:"SSL Certificate Required","496_NAME":"SSL_CERTIFICATE_REQUIRED","496_MESSAGE":"An expansion of the 400 Bad Request response code, used when a client certificate is required but not provided.","496_CLASS":t.CLIENT_ERROR,SSL_CERTIFICATE_REQUIRED:496,497:"HTTP Request Sent to HTTPS Port","497_NAME":"HTTP_REQUEST_SENT_TO_HTTPS_PORT","497_MESSAGE":"An expansion of the 400 Bad Request response code, used when the client has made a HTTP request to a port listening for HTTPS requests.","497_CLASS":t.CLIENT_ERROR,HTTP_REQUEST_SENT_TO_HTTPS_PORT:497,499:"Client Closed Request","499_NAME":"CLIENT_CLOSED_REQUEST","499_MESSAGE":"Used when the client has closed the request before the server could send a response.","499_CLASS":t.CLIENT_ERROR,CLIENT_CLOSED_REQUEST:499},cloudflare:{520:"Unknown Error","520_NAME":"UNKNOWN_ERROR","520_MESSAGE":'The 520 error is used as a "catch-all response for when the origin server returns something unexpected", listing connection resets, large headers, and empty or invalid responses as common triggers.',"520_CLASS":t.SERVER_ERROR,UNKNOWN_ERROR:520,521:"Web Server Is Down","521_NAME":"WEB_SERVER_IS_DOWN","521_MESSAGE":"The origin server has refused the connection from Cloudflare.","521_CLASS":t.SERVER_ERROR,WEB_SERVER_IS_DOWN:521,522:"Connection Timed Out","522_NAME":"CONNECTION_TIMED_OUT","522_MESSAGE":"Cloudflare could not negotiate a TCP handshake with the origin server.","522_CLASS":t.SERVER_ERROR,CONNECTION_TIMED_OUT:522,523:"Origin Is Unreachable","523_NAME":"ORIGIN_IS_UNREACHABLE","523_MESSAGE":"Cloudflare could not reach the origin server.","523_CLASS":t.SERVER_ERROR,ORIGIN_IS_UNREACHABLE:523,524:"A Timeout Occurred","524_NAME":"A_TIMEOUT_OCCURRED","524_MESSAGE":"Cloudflare was able to complete a TCP connection to the origin server, but did not receive a timely HTTP response.","524_CLASS":t.SERVER_ERROR,A_TIMEOUT_OCCURRED:524,525:"SSL Handshake Failed","525_NAME":"SSL_HANDSHAKE_FAILED","525_MESSAGE":"Cloudflare could not negotiate a SSL/TLS handshake with the origin server.","525_CLASS":t.SERVER_ERROR,SSL_HANDSHAKE_FAILED:525,526:"Invalid SSL Certificate","526_NAME":"INVALID_SSL_CERTIFICATE","526_MESSAGE":"Cloudflare could not validate the SSL/TLS certificate that the origin server presented.","526_CLASS":t.SERVER_ERROR,INVALID_SSL_CERTIFICATE:526,527:"Railgun Error","527_NAME":"RAILGUN_ERROR","527_MESSAGE":"Error 527 indicates that the request timed out or failed after the WAN connection had been established.","527_CLASS":t.SERVER_ERROR,RAILGUN_ERROR:527}}}},672:e=>{"use strict";e.exports=e=>{if(typeof e!=="number"){throw new TypeError("Expected a number")}const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}}},720:(e,t,r)=>{"use strict";const n=r(672);const pluralize=(e,t)=>t===1?e:`${e}s`;const s=1e-7;e.exports=(e,t={})=>{if(!Number.isFinite(e)){throw new TypeError("Expected a finite number")}if(t.colonNotation){t.compact=false;t.formatSubMilliseconds=false;t.separateMilliseconds=false;t.verbose=false}if(t.compact){t.secondsDecimalDigits=0;t.millisecondsDecimalDigits=0}const r=[];const floorDecimals=(e,t)=>{const r=Math.floor(e*10**t+s);const n=Math.round(r)/10**t;return n.toFixed(t)};const add=(e,n,s,o)=>{if((r.length===0||!t.colonNotation)&&e===0&&!(t.colonNotation&&s==="m")){return}o=(o||e||"0").toString();let i;let a;if(t.colonNotation){i=r.length>0?":":"";a="";const e=o.includes(".")?o.split(".")[0].length:o.length;const t=r.length>0?2:1;o="0".repeat(Math.max(0,t-e))+o}else{i="";a=t.verbose?" "+pluralize(n,e):s}r.push(i+o+a)};const o=n(e);add(Math.trunc(o.days/365),"year","y");add(o.days%365,"day","d");add(o.hours,"hour","h");add(o.minutes,"minute","m");if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){add(o.seconds,"second","s");if(t.formatSubMilliseconds){add(o.milliseconds,"millisecond","ms");add(o.microseconds,"microsecond","µs");add(o.nanoseconds,"nanosecond","ns")}else{const e=o.milliseconds+o.microseconds/1e3+o.nanoseconds/1e6;const r=typeof t.millisecondsDecimalDigits==="number"?t.millisecondsDecimalDigits:0;const n=e>=1?Math.round(e):Math.ceil(e);const s=r?e.toFixed(r):n;add(Number.parseFloat(s,10),"millisecond","ms",s)}}else{const r=e/1e3%60;const n=typeof t.secondsDecimalDigits==="number"?t.secondsDecimalDigits:1;const s=floorDecimals(r,n);const o=t.keepDecimalsOnWholeSeconds?s:s.replace(/\.0+$/,"");add(Number.parseFloat(o,10),"second","s",o)}if(r.length===0){return"0"+(t.verbose?" milliseconds":"ms")}if(t.compact){return r[0]}if(typeof t.unitCount==="number"){const e=t.colonNotation?"":" ";return r.slice(0,Math.max(t.unitCount,1)).join(e)}return t.colonNotation?r.join(""):r.join(" ")}},504:(e,t,r)=>{"use strict";const n=r(734);e.exports=()=>{const e=process.hrtime();const end=t=>n(process.hrtime(e))[t];const returnValue=()=>end("milliseconds");returnValue.rounded=()=>Math.round(end("milliseconds"));returnValue.seconds=()=>end("seconds");returnValue.nanoseconds=()=>end("nanoseconds");return returnValue}},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},685:e=>{"use strict";e.exports=require("http")},951:e=>{"use strict";e.exports=require("next/dist/compiled/@edge-runtime/primitives")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},781:e=>{"use strict";e.exports=require("stream")},144:e=>{"use strict";e.exports=require("vm")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var s=t[r]={exports:{}};var o=true;try{e[r].call(s.exports,s,s.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return s.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:true});e.EdgeRuntime=e.runServer=e.createHandler=void 0;var t=__nccwpck_require__(520);Object.defineProperty(e,"createHandler",{enumerable:true,get:function(){return t.createHandler}});Object.defineProperty(e,"runServer",{enumerable:true,get:function(){return t.runServer}});var n=__nccwpck_require__(141);Object.defineProperty(e,"EdgeRuntime",{enumerable:true,get:function(){return n.EdgeRuntime}})})();module.exports=r})();
\ No newline at end of file
{"name":"edge-runtime","main":"index.js","license":"MPLv2"}
The MIT License (MIT)
Copyright (c) 2017-present Nick K.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
{"name":"formdata-node","main":"index.js","author":"Nick K. <io@octetstream.me>","license":"MIT"}
{"name":"uuid","main":"index.js","license":"MIT"}
The MIT License (MIT)
Copyright (c) 2020 Mattias Buelens
Copyright (c) 2016 Diwank Singh Tomer
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
{"name":"web-streams-polyfill","main":"ponyfill.js","author":"Mattias Buelens <mattias@buelens.com>","license":"MIT"}
......@@ -115,6 +115,8 @@
"@babel/runtime": "7.15.4",
"@babel/traverse": "7.15.0",
"@babel/types": "7.15.0",
"@edge-runtime/primitives": "1.0.1-beta.10",
"@edge-runtime/vm": "1.0.1-beta.10",
"@hapi/accept": "5.0.2",
"@napi-rs/cli": "2.4.4",
"@napi-rs/triples": "1.1.0",
......@@ -123,7 +125,6 @@
"@next/react-dev-overlay": "12.1.7-canary.23",
"@next/react-refresh-utils": "12.1.7-canary.23",
"@next/swc": "12.1.7-canary.23",
"@peculiar/webcrypto": "1.3.1",
"@taskr/clear": "1.1.0",
"@taskr/esnext": "1.1.0",
"@taskr/watch": "1.1.0",
......@@ -192,11 +193,11 @@
"debug": "4.1.1",
"devalue": "2.0.1",
"domain-browser": "4.19.0",
"edge-runtime": "1.0.1-beta.10",
"etag": "1.8.1",
"events": "3.3.0",
"find-cache-dir": "3.3.1",
"find-up": "4.1.0",
"formdata-node": "4.3.0",
"fresh": "0.5.2",
"get-orientation": "1.1.2",
"glob": "7.1.7",
......@@ -268,7 +269,6 @@
"uuid": "8.3.2",
"vm-browserify": "1.1.2",
"watchpack": "2.3.1",
"web-streams-polyfill": "3.0.3",
"web-vitals": "2.1.0",
"webpack-sources1": "npm:webpack-sources@1.4.3",
"webpack-sources3": "npm:webpack-sources@3.2.3",
......
import Primitives from 'next/dist/compiled/@edge-runtime/primitives'
import type { IncomingMessage } from 'http'
import { Readable } from 'stream'
import { TransformStream } from 'next/dist/compiled/web-streams-polyfill'
type BodyStream = ReadableStream<Uint8Array>
......@@ -8,7 +8,7 @@ type BodyStream = ReadableStream<Uint8Array>
* Creates a ReadableStream from a Node.js HTTP request
*/
function requestToBodyStream(request: IncomingMessage): BodyStream {
const transform = new TransformStream<Uint8Array, Uint8Array>({
const transform = new Primitives.TransformStream<Uint8Array, Uint8Array>({
start(controller) {
request.on('data', (chunk) => controller.enqueue(chunk))
request.on('end', () => controller.terminate())
......
import {
ReadableStream,
TransformStream,
} from 'next/dist/compiled/web-streams-polyfill'
import Primitives from 'next/dist/compiled/@edge-runtime/primitives'
// Polyfill Web Streams for the Node.js runtime.
if (!global.ReadableStream) {
global.ReadableStream = ReadableStream
global.ReadableStream = Primitives.ReadableStream
}
if (!global.TransformStream) {
global.TransformStream = TransformStream
global.TransformStream = Primitives.TransformStream
}
......@@ -5,7 +5,7 @@ import { fromNodeHeaders } from './utils'
import { NextFetchEvent } from './spec-extension/fetch-event'
import { NextRequest } from './spec-extension/request'
import { NextResponse } from './spec-extension/response'
import { waitUntilSymbol } from './spec-compliant/fetch-event'
import { waitUntilSymbol } from './spec-extension/fetch-event'
import { NextURL } from './next-url'
export async function adapter(params: {
......
import { isBlob } from './is'
import { streamToIterator } from './utils'
const carriage = '\r\n'
const dashes = '--'
const carriageLength = 2
function escape(str: string) {
return str.replace(/"/g, '\\"')
}
function getFooter(boundary: string) {
return `${dashes}${boundary}${dashes}${carriage.repeat(2)}`
}
function getHeader(boundary: string, name: string, field: FormDataEntryValue) {
let header = ''
header += `${dashes}${boundary}${carriage}`
header += `Content-Disposition: form-data; name="${escape(name)}"`
if (isBlob(field)) {
header += `; filename="${escape(field.name)}"${carriage}`
header += `Content-Type: ${field.type || 'application/octet-stream'}`
}
return `${header}${carriage.repeat(2)}`
}
export function getBoundary() {
const array = new Uint8Array(32)
crypto.getRandomValues(array)
let str = ''
for (var i = 0; i < array.length; i++) {
str += array[i].toString(16).padStart(2, '0')
}
return str
}
export async function* formDataIterator(
form: FormData,
boundary: string
): AsyncIterableIterator<Uint8Array> {
const encoder = new TextEncoder()
for (const [name, value] of form) {
yield encoder.encode(getHeader(boundary, name, value))
if (isBlob(value)) {
const stream: ReadableStream<Uint8Array> = value.stream()
yield* streamToIterator(stream)
} else {
yield encoder.encode(value)
}
yield encoder.encode(carriage)
}
yield encoder.encode(getFooter(boundary))
}
export function getFormDataLength(form: FormData, boundary: string) {
let length = 0
for (const [name, value] of form) {
length += Buffer.byteLength(getHeader(boundary, name, value))
length += isBlob(value) ? value.size : Buffer.byteLength(String(value))
length += carriageLength
}
length += Buffer.byteLength(getFooter(boundary))
return length
}
/**
* The ArrayBuffer object is used to represent a generic, fixed-length raw
* binary data buffer. It is an array of bytes, often referred to in other
* languages as a "byte array". You cannot directly manipulate the contents of
* an ArrayBuffer; instead, you create one of the typed array objects or a
* DataView object which represents the buffer in a specific format, and use
* that to read and write the contents of the buffer.
*/
export function isArrayBuffer(value: any): value is ArrayBuffer {
return ArrayBuffer.prototype.isPrototypeOf(value)
}
/**
* ArrayBufferView is a helper type representing any of the following JS
* TypedArray types which correspond to the list below. It is checked by duck
* typing the provided object.
*/
export function isArrayBufferView(value: any): value is ArrayBufferView {
return ArrayBuffer.isView(value)
}
/**
* The DataView view provides a low-level interface for reading and writing
* multiple number types in a binary ArrayBuffer, without having to care about
* the platform's endianness.
*/
export function isDataView(value: any): value is DataView {
return DataView.prototype.isPrototypeOf(value)
}
/**
* The URLSearchParams interface defines utility methods to work with the
* query string of a URL.
*/
export function isURLSearchParams(value: any): value is URLSearchParams {
return URLSearchParams.prototype.isPrototypeOf(value)
}
/**
* The Blob object represents a blob, which is a file-like object of immutable,
* raw data; they can be read as text or binary data. Blobs can represent data
* that isn't necessarily in a JavaScript-native format.
*/
export function isBlob(value: any): value is Blob {
return Blob.prototype.isPrototypeOf(value)
}
/**
* The FormData interface provides a way to easily construct a set of key/value
* pairs representing form fields and their values, which can then be easily
* sent using the XMLHttpRequest.send() method. It uses the same format a
* form would use if the encoding type were set to "multipart/form-data".
*/
export function isFormData(value: any): value is FormData {
return FormData.prototype.isPrototypeOf(value)
}
/**
* The ReadableStream interface of the Streams API represents a readable stream
* of byte data. Because we want to allow alternative implementations we also
* duck type here.
*/
export function isReadableStream(value: any): value is ReadableStream {
return (
value &&
(ReadableStream.prototype.isPrototypeOf(value) ||
(value.constructor.name === 'ReadableStream' && 'getReader' in value))
)
}
/**
* Checks in an object implements an Iterable interface
*/
export function isIterable(object: any): object is Iterable<unknown> {
return (
object &&
Symbol.iterator in object &&
typeof object[Symbol.iterator] === 'function'
)
}
import type { Context } from 'vm'
import { Blob, File, FormData } from 'next/dist/compiled/formdata-node'
import { readFileSync, promises as fs } from 'fs'
import { requireDependencies } from './require'
import '../../node-polyfill-web-streams'
import cookie from 'next/dist/compiled/cookie'
import * as polyfills from './polyfills'
import {
AbortController,
AbortSignal,
} from 'next/dist/compiled/abort-controller'
import vm from 'vm'
import type { Primitives } from 'next/dist/compiled/@edge-runtime/primitives'
import type { WasmBinding } from '../../../build/webpack/loaders/get-module-build-info'
import { EDGE_UNSUPPORTED_NODE_APIS } from '../../../shared/lib/constants'
import { EdgeRuntime } from 'next/dist/compiled/edge-runtime'
import { readFileSync, promises as fs } from 'fs'
import { validateURL } from '../utils'
const WEBPACK_HASH_REGEX =
/__webpack_require__\.h = function\(\) \{ return "[0-9a-f]+"; \}/g
interface ModuleContext {
runtime: EdgeRuntime<Primitives>
paths: Map<string, string>
warnedEvals: Set<string>
}
/**
* For a given path a context, this function checks if there is any module
* context that contains the path with an older content and, if that's the
* case, removes the context from the cache.
*/
export function clearModuleContext(path: string, content: Buffer | string) {
for (const [key, cache] of caches) {
for (const [key, cache] of moduleContexts) {
const prev = cache?.paths.get(path)?.replace(WEBPACK_HASH_REGEX, '')
if (
typeof prev !== 'undefined' &&
prev !== content.toString().replace(WEBPACK_HASH_REGEX, '')
) {
caches.delete(key)
moduleContexts.delete(key)
}
}
}
......@@ -38,246 +36,145 @@ export function clearModuleContext(path: string, content: Buffer | string) {
* to have a different cache scoped per module name or depending on the
* provided module key on creation.
*/
const caches = new Map<
string,
{
context: Context
paths: Map<string, string>
require: Map<string, any>
warnedEvals: Set<string>
}
>()
const moduleContexts = new Map<string, ModuleContext>()
interface ModuleContextOptions {
module: string
moduleName: string
onWarning: (warn: Error) => void
useCache: boolean
env: string[]
wasm: WasmBinding[]
}
const pendingModuleCaches = new Map<string, Promise<ModuleContext>>()
function getModuleContextShared(options: ModuleContextOptions) {
let deferredModuleContext = pendingModuleCaches.get(options.moduleName)
if (!deferredModuleContext) {
deferredModuleContext = createModuleContext(options)
pendingModuleCaches.set(options.moduleName, deferredModuleContext)
}
return deferredModuleContext
}
/**
* For a given module name this function will create a context for the
* runtime. It returns a function where we can provide a module path and
* run in within the context. It may or may not use a cache depending on
* the parameters.
* For a given module name this function will get a cached module
* context or create it. It will return the module context along
* with a function that allows to run some code from a given
* filepath within the context.
*/
export async function getModuleContext(options: ModuleContextOptions) {
let moduleCache = options.useCache
? caches.get(options.module)
: await createModuleContext(options)
let moduleContext = options.useCache
? moduleContexts.get(options.moduleName)
: await getModuleContextShared(options)
if (!moduleCache) {
moduleCache = await createModuleContext(options)
caches.set(options.module, moduleCache)
if (!moduleContext) {
moduleContext = await createModuleContext(options)
moduleContexts.set(options.moduleName, moduleContext)
}
return {
context: moduleCache.context,
runInContext: (paramPath: string) => {
if (!moduleCache!.paths.has(paramPath)) {
const content = readFileSync(paramPath, 'utf-8')
try {
vm.runInNewContext(content, moduleCache!.context, {
filename: paramPath,
})
moduleCache!.paths.set(paramPath, content)
} catch (error) {
if (options.useCache) {
caches.delete(options.module)
}
throw error
const evaluateInContext = (filepath: string) => {
if (!moduleContext!.paths.has(filepath)) {
const content = readFileSync(filepath, 'utf-8')
try {
moduleContext?.runtime.evaluate(content)
moduleContext!.paths.set(filepath, content)
} catch (error) {
if (options.useCache) {
moduleContext?.paths.delete(options.moduleName)
}
throw error
}
},
}
}
return { ...moduleContext, evaluateInContext }
}
/**
* Create a module cache specific for the provided parameters. It includes
* a context, require cache and paths cache and loads three types:
* 1. Dependencies that hold no runtime dependencies.
* 2. Dependencies that require runtime globals such as Blob.
* 3. Dependencies that are scoped for the provided parameters.
* a runtime context, require cache and paths cache.
*/
async function createModuleContext(options: ModuleContextOptions) {
const requireCache = new Map([
[require.resolve('next/dist/compiled/cookie'), { exports: cookie }],
])
const context = createContext(options)
requireDependencies({
requireCache: requireCache,
context: context,
dependencies: [
{
path: require.resolve('../spec-compliant/headers'),
mapExports: { Headers: 'Headers' },
},
{
path: require.resolve('../spec-compliant/response'),
mapExports: { Response: 'Response' },
},
{
path: require.resolve('../spec-compliant/request'),
mapExports: { Request: 'Request' },
},
],
})
const warnedEvals = new Set<string>()
const wasm = await loadWasm(options.wasm)
const runtime = new EdgeRuntime({
codeGeneration:
process.env.NODE_ENV !== 'production'
? { strings: true, wasm: false }
: undefined,
extend: (context) => {
context.process = createProcessPolyfill(options)
context.__next_eval__ = function __next_eval__(fn: Function) {
const key = fn.toString()
if (!warnedEvals.has(key)) {
const warning = new Error(
`Dynamic Code Evaluation (e. g. 'eval', 'new Function') not allowed in Middleware`
)
warning.name = 'DynamicCodeEvaluationWarning'
Error.captureStackTrace(warning, __next_eval__)
warnedEvals.add(key)
options.onWarning(warning)
}
return fn()
}
const moduleCache = {
context: context,
paths: new Map<string, string>(),
require: requireCache,
warnedEvals: new Set<string>(),
}
const __fetch = context.fetch
context.fetch = (input: RequestInfo, init: RequestInit = {}) => {
init.headers = new Headers(init.headers ?? {})
const prevs =
init.headers.get(`x-middleware-subrequest`)?.split(':') || []
const value = prevs.concat(options.moduleName).join(':')
init.headers.set('x-middleware-subrequest', value)
context.__next_eval__ = function __next_eval__(fn: Function) {
const key = fn.toString()
if (!moduleCache.warnedEvals.has(key)) {
const warning = new Error(
`Dynamic Code Evaluation (e. g. 'eval', 'new Function') not allowed in Middleware`
)
warning.name = 'DynamicCodeEvaluationWarning'
Error.captureStackTrace(warning, __next_eval__)
moduleCache.warnedEvals.add(key)
options.onWarning(warning)
}
return fn()
}
if (!init.headers.has('user-agent')) {
init.headers.set(`user-agent`, `Next.js Middleware`)
}
context.fetch = (input: RequestInfo, init: RequestInit = {}) => {
init.headers = new Headers(init.headers ?? {})
const prevs = init.headers.get(`x-middleware-subrequest`)?.split(':') || []
const value = prevs.concat(options.module).join(':')
init.headers.set('x-middleware-subrequest', value)
if (typeof input === 'object' && 'url' in input) {
return __fetch(input.url, {
...init,
headers: {
...Object.fromEntries(input.headers),
...Object.fromEntries(init.headers),
},
})
}
if (!init.headers.has('user-agent')) {
init.headers.set(`user-agent`, `Next.js Middleware`)
}
return __fetch(String(input), init)
}
if (typeof input === 'object' && 'url' in input) {
return fetch(input.url, {
...init,
headers: {
...Object.fromEntries(input.headers),
...Object.fromEntries(init.headers),
},
})
}
const __Request = context.Request
context.Request = class extends __Request {
constructor(input: RequestInfo, init?: RequestInit | undefined) {
const url = typeof input === 'string' ? input : input.url
validateURL(url)
super(input, init)
}
}
return fetch(String(input), init)
}
const __redirect = context.Response.redirect.bind(context.Response)
context.Response.redirect = (...args) => {
validateURL(args[0])
return __redirect(...args)
}
Object.assign(context, await loadWasm(options.wasm))
for (const name of EDGE_UNSUPPORTED_NODE_APIS) {
addStub(context, name, options)
}
return moduleCache
}
Object.assign(context, wasm)
/**
* Create a base context with all required globals for the runtime that
* won't depend on any externally provided dependency.
*/
function createContext(
options: Pick<ModuleContextOptions, 'env' | 'onWarning'>
) {
const context: Context = {
_ENTRIES: {},
atob: polyfills.atob,
Blob,
btoa: polyfills.btoa,
clearInterval,
clearTimeout,
console: {
assert: console.assert.bind(console),
error: console.error.bind(console),
info: console.info.bind(console),
log: console.log.bind(console),
time: console.time.bind(console),
timeEnd: console.timeEnd.bind(console),
timeLog: console.timeLog.bind(console),
warn: console.warn.bind(console),
return context
},
AbortController,
AbortSignal,
CryptoKey: polyfills.CryptoKey,
Crypto: polyfills.Crypto,
crypto: new polyfills.Crypto(),
DataView,
File,
FormData,
process: createProcessPolyfill(options),
ReadableStream,
setInterval,
setTimeout,
queueMicrotask,
TextDecoder,
TextEncoder,
TransformStream,
URL,
URLSearchParams,
WebAssembly,
// Indexed collections
Array,
Int8Array,
Uint8Array,
Uint8ClampedArray,
Int16Array,
Uint16Array,
Int32Array,
Uint32Array,
Float32Array,
Float64Array,
BigInt64Array,
BigUint64Array,
// Keyed collections
Map,
Set,
WeakMap,
WeakSet,
// Structured data
ArrayBuffer,
SharedArrayBuffer,
// These APIs are supported by the Edge runtime, but not by the version of Node.js we're using
// Since we'll soon replace this sandbox with the edge-runtime itself, it's not worth polyfilling.
// ReadableStreamBYOBReader,
// ReadableStreamDefaultReader,
// structuredClone,
// SubtleCrypto,
// WritableStream,
// WritableStreamDefaultWriter,
}
for (const name of EDGE_UNSUPPORTED_NODE_APIS) {
addStub(context, name, options)
}
// Self references
context.self = context
context.globalThis = context
return vm.createContext(context, {
codeGeneration:
process.env.NODE_ENV === 'production'
? {
strings: false,
wasm: false,
}
: undefined,
})
}
function buildEnvironmentVariablesFrom(
keys: string[]
): Record<string, string | undefined> {
const pairs = keys.map((key) => [key, process.env[key]])
const env = Object.fromEntries(pairs)
env.NEXT_RUNTIME = 'edge'
return env
return {
runtime,
paths: new Map<string, string>(),
warnedEvals: new Set<string>(),
}
}
async function loadWasm(
......@@ -297,6 +194,15 @@ async function loadWasm(
return modules
}
function buildEnvironmentVariablesFrom(
keys: string[]
): Record<string, string | undefined> {
const pairs = keys.map((key) => [key, process.env[key]])
const env = Object.fromEntries(pairs)
env.NEXT_RUNTIME = 'edge'
return env
}
function createProcessPolyfill(
options: Pick<ModuleContextOptions, 'env' | 'onWarning'>
) {
......@@ -323,7 +229,7 @@ function createProcessPolyfill(
const warnedAlready = new Set<string>()
function addStub(
context: Context,
context: Primitives,
name: string,
contextOptions: Pick<ModuleContextOptions, 'onWarning'>
) {
......
import { Crypto as WebCrypto } from 'next/dist/compiled/@peculiar/webcrypto'
import { CryptoKey } from 'next/dist/compiled/@peculiar/webcrypto'
import { v4 as uuid } from 'next/dist/compiled/uuid'
import crypto from 'crypto'
export function atob(b64Encoded: string) {
return Buffer.from(b64Encoded, 'base64').toString('binary')
}
export function btoa(str: string) {
return Buffer.from(str, 'binary').toString('base64')
}
export { CryptoKey }
export class Crypto extends WebCrypto {
// @ts-ignore Remove once types are updated and we deprecate node 12
randomUUID = crypto.randomUUID || uuid
}
import type { Context } from 'vm'
import { dirname } from 'path'
import { readFileSync } from 'fs'
import { runInContext } from 'vm'
/**
* Allows to require a series of dependencies provided by their path
* into a provided module context. It fills and accepts a require
* cache to ensure each module is loaded once.
*/
export function requireDependencies(params: {
context: Context
requireCache: Map<string, any>
dependencies: {
mapExports: { [key: string]: string }
path: string
}[]
}) {
const { context, requireCache, dependencies } = params
const requireFn = createRequire(context, requireCache)
for (const { path, mapExports } of dependencies) {
const mod = requireFn(path, path)
for (const mapKey of Object.keys(mapExports)) {
context[mapExports[mapKey]] = mod[mapKey]
}
}
}
function createRequire(context: Context, cache: Map<string, any>) {
return function requireFn(referrer: string, specifier: string) {
const resolved = require.resolve(specifier, {
paths: [dirname(referrer)],
})
const cached = cache.get(resolved)
if (cached !== undefined) {
return cached.exports
}
const module = {
exports: {},
loaded: false,
id: resolved,
}
cache.set(resolved, module)
const fn = runInContext(
`(function(module,exports,require,__dirname,__filename) {${readFileSync(
resolved,
'utf-8'
)}\n})`,
context
)
try {
fn(
module,
module.exports,
requireFn.bind(null, resolved),
dirname(resolved),
resolved
)
} finally {
cache.delete(resolved)
}
module.loaded = true
return module.exports
}
}
......@@ -11,8 +11,8 @@ export async function run(params: {
useCache: boolean
wasm: WasmBinding[]
}): Promise<FetchEventResult> {
const { runInContext, context } = await getModuleContext({
module: params.name,
const { runtime, evaluateInContext } = await getModuleContext({
moduleName: params.name,
onWarning: params.onWarning,
useCache: params.useCache !== false,
env: params.env,
......@@ -20,7 +20,7 @@ export async function run(params: {
})
for (const paramPath of params.paths) {
runInContext(paramPath)
evaluateInContext(paramPath)
}
const subreq = params.request.headers[`x-middleware-subrequest`]
......@@ -28,7 +28,7 @@ export async function run(params: {
if (subrequests.includes(params.name)) {
return {
waitUntil: Promise.resolve(),
response: new context.Response(null, {
response: new runtime.context.Response(null, {
headers: {
'x-middleware-next': '1',
},
......@@ -36,7 +36,7 @@ export async function run(params: {
}
}
return context._ENTRIES[`middleware_${params.name}`].default({
return runtime.context._ENTRIES[`middleware_${params.name}`].default({
request: params.request,
})
}
import { formDataIterator, getBoundary } from '../form-data'
import { streamToIterator } from '../utils'
import * as util from '../is'
const INTERNALS = Symbol('internal body')
abstract class BaseBody implements Body {
abstract headers: Headers
[INTERNALS]: {
bodyInit?: BodyInit
boundary?: string
disturbed: boolean
stream?: ReadableStream<Uint8Array> | null
}
constructor(bodyInit?: BodyInit) {
this[INTERNALS] = {
bodyInit: bodyInit,
disturbed: false,
}
if (util.isFormData(bodyInit)) {
this[INTERNALS].boundary = getBoundary()
}
}
get body(): ReadableStream<Uint8Array> | null {
const body = this[INTERNALS].bodyInit
if (!body) {
return null
}
const that = this
if (!this[INTERNALS].stream) {
const readable = new ReadableStream({
async start(controller) {
if (typeof body === 'string') {
const encoder = new TextEncoder()
controller.enqueue(encoder.encode(body))
} else if (util.isBlob(body)) {
const buffer = await body.arrayBuffer()
controller.enqueue(new Uint8Array(buffer))
} else if (util.isDataView(body)) {
controller.enqueue(body)
} else if (util.isArrayBuffer(body)) {
controller.enqueue(body)
} else if (util.isArrayBufferView(body)) {
controller.enqueue(body)
} else if (util.isURLSearchParams(body)) {
const encoder = new TextEncoder()
controller.enqueue(encoder.encode(body.toString()))
} else if (util.isFormData(body)) {
for await (const chunk of formDataIterator(
body,
that[INTERNALS].boundary!
)) {
controller.enqueue(chunk)
}
} else if (util.isReadableStream(body)) {
for await (const chunk of streamToIterator(body)) {
if (chunk.length) {
controller.enqueue(chunk)
}
}
} else {
const text = Object.prototype.toString.call(body)
const encoder = new TextEncoder()
controller.enqueue(encoder.encode(text))
}
controller.close()
},
})
// Spy on reading chunks to set the stream as disturbed
const getReader = readable.getReader.bind(readable)
readable.getReader = () => {
const reader = getReader()
const read = reader.read.bind(reader)
reader.read = () => {
this[INTERNALS].disturbed = true
return read()
}
return reader
}
this[INTERNALS].stream = readable
}
return this[INTERNALS].stream!
}
get bodyUsed(): boolean {
return this[INTERNALS].disturbed
}
_consume() {
if (this[INTERNALS].disturbed) {
return Promise.reject(
new TypeError(
`Body has already been used. It can only be used once. Use tee() first if you need to read it twice.`
)
)
}
this[INTERNALS].disturbed = true
const body = this.body
return new Promise<Uint8Array>((resolve, reject) => {
let buffer = new Uint8Array(0)
if (!body) {
return resolve(buffer)
}
const reader = body.getReader()
;(function pump() {
reader.read().then(({ value, done }) => {
if (done) {
return resolve(buffer)
} else if (value) {
const merge = new Uint8Array(buffer.length + value.length)
merge.set(buffer)
merge.set(value, buffer.length)
buffer = merge
}
pump()
}, reject)
})()
})
}
async arrayBuffer() {
const buffer = await this._consume()
const arrayBuffer = new ArrayBuffer(buffer.length)
const view = new Uint8Array(arrayBuffer)
for (let i = 0; i < buffer.length; ++i) {
view[i] = buffer[i]
}
return arrayBuffer
}
async blob() {
const buffer = await this._consume()
return new Blob([buffer])
}
async formData() {
const bodyInit = this[INTERNALS].bodyInit
if (util.isURLSearchParams(bodyInit)) {
const form = new FormData()
for (const [key, value] of bodyInit) {
form.append(key, value)
}
return form
} else if (util.isFormData(bodyInit)) {
return bodyInit
} else {
throw new TypeError(
`Unrecognized Content-Type header value. FormData can only parse the following MIME types: multipart/form-data, application/x-www-form-urlencoded.`
)
}
}
async text() {
const decoder = new TextDecoder()
const buffer = await this._consume()
return decoder.decode(buffer)
}
async json() {
const text = await this.text()
try {
return JSON.parse(text)
} catch (err: any) {
throw new TypeError(`invalid json body reason: ${err.message}`)
}
}
}
export { BaseBody as Body }
export type BodyInit =
| null
| string
| Blob
| BufferSource
| FormData
| URLSearchParams
| ReadableStream<Uint8Array>
export function extractContentType(instance: BaseBody) {
const body = instance[INTERNALS].bodyInit
if (typeof body === 'string') {
return 'text/plain;charset=UTF-8'
} else if (util.isBlob(body)) {
return body.type
} else if (util.isDataView(body)) {
return null
} else if (util.isArrayBuffer(body)) {
return null
} else if (util.isArrayBufferView(body)) {
return null
} else if (util.isURLSearchParams(body)) {
return 'application/x-www-form-urlencoded;charset=UTF-8'
} else if (util.isFormData(body)) {
return `multipart/form-data;boundary=${instance[INTERNALS].boundary}`
} else if (util.isReadableStream(body)) {
return null
} else {
return 'text/plain;charset=UTF-8'
}
}
export function cloneBody(instance: BaseBody) {
if (instance.bodyUsed) {
throw new Error('cannot clone body after it is used')
}
const body = instance[INTERNALS].bodyInit
if (util.isReadableStream(body)) {
const [r1, r2] = body.tee()
instance[INTERNALS].bodyInit = r1
return r2
}
return body || null
}
export function getInstanceBody(instance: BaseBody) {
return instance[INTERNALS].bodyInit
}
export const responseSymbol = Symbol('response')
export const passThroughSymbol = Symbol('passThrough')
export const waitUntilSymbol = Symbol('waitUntil')
export class FetchEvent {
readonly [waitUntilSymbol]: Promise<any>[] = [];
[responseSymbol]?: Promise<Response>;
[passThroughSymbol] = false
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
constructor(_request: Request) {}
respondWith(response: Response | Promise<Response>): void {
if (!this[responseSymbol]) {
this[responseSymbol] = Promise.resolve(response)
}
}
passThroughOnException(): void {
this[passThroughSymbol] = true
}
waitUntil(promise: Promise<any>): void {
this[waitUntilSymbol].push(promise)
}
}
import { isIterable } from '../is'
export type HeadersInit = Headers | string[][] | { [key: string]: string }
const MAP = Symbol('map')
const INTERNAL = Symbol('internal')
const INVALID_TOKEN_REGEX = /[^^_`a-zA-Z\-0-9!#$%&'*+.|~]/
const INVALID_HEADER_CHAR_REGEX = /[^\t\x20-\x7e\x80-\xff]/
class BaseHeaders implements Headers {
[MAP]: { [k: string]: string[] } = {}
constructor(init?: HeadersInit) {
if (init instanceof BaseHeaders) {
const rawHeaders = init.raw()
for (const headerName of Object.keys(rawHeaders)) {
for (const value of rawHeaders[headerName]) {
this.append(headerName, value)
}
}
} else if (isIterable(init)) {
const pairs = []
for (const pair of init) {
if (!isIterable(pair)) {
throw new TypeError('Each header pair must be iterable')
}
pairs.push(Array.from(pair))
}
for (const pair of pairs) {
if (pair.length !== 2) {
throw new TypeError('Each header pair must be a name/value tuple')
}
this.append(pair[0], pair[1])
}
} else if (typeof init === 'object') {
for (const key of Object.keys(init)) {
this.append(key, init[key])
}
} else if (init) {
throw new TypeError('Provided initializer must be an object')
}
}
get(name: string) {
const _name = `${name}`
validateName(_name)
const key = find(this[MAP], _name)
if (key === undefined) {
return null
}
return this[MAP][key].join(', ')
}
forEach(
callback: (value: string, name: string, parent: BaseHeaders) => void,
thisArg: any = undefined
): void {
let pairs = getHeaders(this)
let i = 0
while (i < pairs.length) {
const [name, value] = pairs[i]
callback.call(thisArg, value, name, this)
pairs = getHeaders(this)
i++
}
}
set(name: string, value: string) {
name = `${name}`
value = `${value}`
validateName(name)
validateValue(value)
const key = find(this[MAP], name)
this[MAP][key !== undefined ? key : name] = [value]
}
append(name: string, value: string) {
name = `${name}`
value = `${value}`
validateName(name)
validateValue(value)
const key = find(this[MAP], name)
if (key !== undefined) {
this[MAP][key].push(value)
} else {
this[MAP][name] = [value]
}
}
has(name: string) {
name = `${name}`
validateName(name)
return find(this[MAP], name) !== undefined
}
delete(name: string) {
name = `${name}`
validateName(name)
const key = find(this[MAP], name)
if (key !== undefined) {
delete this[MAP][key]
}
}
raw() {
return this[MAP]
}
keys() {
return createHeadersIterator(this, 'key')
}
values() {
return createHeadersIterator(this, 'value')
}
entries() {
return createHeadersIterator(this, 'key+value')
}
[Symbol.iterator]() {
return createHeadersIterator(this, 'key+value')
}
}
function createHeadersIterator(
target: BaseHeaders,
kind: 'key' | 'value' | 'key+value'
) {
const iterator = Object.create(HeadersIteratorPrototype)
iterator[INTERNAL] = {
target,
kind,
index: 0,
}
return iterator
}
function validateName(name: string) {
name = `${name}`
if (INVALID_TOKEN_REGEX.test(name)) {
throw new TypeError(`${name} is not a legal HTTP header name`)
}
}
function validateValue(value: string) {
value = `${value}`
if (INVALID_HEADER_CHAR_REGEX.test(value)) {
throw new TypeError(`${value} is not a legal HTTP header value`)
}
}
function find(
map: { [k: string]: string[] },
name: string
): string | undefined {
name = name.toLowerCase()
for (const key in map) {
if (key.toLowerCase() === name) {
return key
}
}
return undefined
}
Object.defineProperty(BaseHeaders.prototype, Symbol.toStringTag, {
value: 'Headers',
writable: false,
enumerable: false,
configurable: true,
})
Object.defineProperties(BaseHeaders.prototype, {
append: { enumerable: true },
delete: { enumerable: true },
entries: { enumerable: true },
forEach: { enumerable: true },
get: { enumerable: true },
has: { enumerable: true },
keys: { enumerable: true },
raw: { enumerable: false },
set: { enumerable: true },
values: { enumerable: true },
})
function getHeaders(
headers: BaseHeaders,
kind: 'key' | 'value' | 'key+value' = 'key+value'
) {
const fn =
kind === 'key'
? (key: string) => key.toLowerCase()
: kind === 'value'
? (key: string) => headers[MAP][key].join(', ')
: (key: string) => [key.toLowerCase(), headers[MAP][key].join(', ')]
return Object.keys(headers[MAP])
.sort()
.map((key) => fn(key))
}
const HeadersIteratorPrototype = Object.setPrototypeOf(
{
next() {
if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
throw new TypeError('Value of `this` is not a HeadersIterator')
}
const { target, kind, index } = this[INTERNAL]
const values = getHeaders(target, kind)
const len = values.length
if (index >= len) {
return {
value: undefined,
done: true,
}
}
this[INTERNAL].index = index + 1
return {
value: values[index],
done: false,
}
},
},
Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))
)
Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
value: 'HeadersIterator',
writable: false,
enumerable: false,
configurable: true,
})
export { BaseHeaders as Headers }
import { Body, cloneBody, extractContentType, getInstanceBody } from './body'
import { Headers as BaseHeaders } from './headers'
import { NextURL } from '../next-url'
import { notImplemented } from '../utils'
export const INTERNALS = Symbol('internal request')
class BaseRequest extends Body implements Request {
[INTERNALS]: {
credentials: RequestCredentials
headers: Headers
method: string
referrer: string
redirect: RequestRedirect
url: NextURL
}
constructor(input: BaseRequest | string, init: RequestInit = {}) {
const method =
init.method?.toUpperCase() ??
(input instanceof BaseRequest ? input.method?.toUpperCase() : 'GET')
if (
(method === 'GET' || method === 'HEAD') &&
(init.body || (input instanceof BaseRequest && getInstanceBody(input)))
) {
throw new TypeError('Request with GET/HEAD method cannot have body')
}
let inputBody: BodyInit | null = null
if (init.body) {
inputBody = init.body
} else if (input instanceof BaseRequest && getInstanceBody(input)) {
inputBody = cloneBody(input)
}
super(inputBody)
const headers = new BaseHeaders(
init.headers || getProp(input, 'headers') || {}
)
if (inputBody !== null) {
const contentType = extractContentType(this)
if (contentType !== null && !headers.has('Content-Type')) {
headers.append('Content-Type', contentType)
}
}
this[INTERNALS] = {
credentials:
init.credentials || getProp(input, 'credentials') || 'same-origin',
headers,
method,
referrer: init.referrer || 'about:client',
redirect: init.redirect || getProp(input, 'redirect') || 'follow',
url: new NextURL(typeof input === 'string' ? input : input.url),
}
}
get url() {
return this[INTERNALS].url.toString()
}
get credentials() {
return this[INTERNALS].credentials
}
get method() {
return this[INTERNALS].method
}
get referrer() {
return this[INTERNALS].referrer
}
get headers() {
return this[INTERNALS].headers
}
get redirect() {
return this[INTERNALS].redirect
}
public clone() {
return new BaseRequest(this)
}
get cache() {
return notImplemented('Request', 'cache')
}
get integrity() {
return notImplemented('Request', 'integrity')
}
get keepalive() {
return notImplemented('Request', 'keepalive')
}
get mode() {
return notImplemented('Request', 'mode')
}
get destination() {
return notImplemented('Request', 'destination')
}
get referrerPolicy() {
return notImplemented('Request', 'referrerPolicy')
}
get signal() {
return notImplemented('Request', 'signal')
}
get [Symbol.toStringTag]() {
return 'Request'
}
}
export { BaseRequest as Request }
function getProp<K extends keyof BaseRequest>(
input: BaseRequest | string,
key: K
): BaseRequest[K] | undefined {
return input instanceof BaseRequest ? input[key] : undefined
}
import { Body, BodyInit, cloneBody, extractContentType } from './body'
import { NextURL } from '../next-url'
import { validateURL } from '../utils'
const INTERNALS = Symbol('internal response')
const REDIRECTS = new Set([301, 302, 303, 307, 308])
class BaseResponse extends Body implements Response {
[INTERNALS]: {
headers: Headers
status: number
statusText: string
type: 'default' | 'error'
url?: NextURL
}
constructor(body?: BodyInit | null, init?: ResponseInit) {
super(body)
this[INTERNALS] = {
headers: new Headers(init?.headers),
status: init?.status || 200,
statusText: init?.statusText || '',
type: 'default',
url: init?.url ? new NextURL(init.url) : undefined,
}
if (this[INTERNALS].status < 200 || this[INTERNALS].status > 599) {
throw new RangeError(
`Responses may only be constructed with status codes in the range 200 to 599, inclusive.`
)
}
if (body !== null && !this[INTERNALS].headers.has('Content-Type')) {
const contentType = extractContentType(this)
if (contentType) {
this[INTERNALS].headers.append('Content-Type', contentType)
}
}
}
static redirect(url: string, status = 307) {
if (!REDIRECTS.has(status)) {
throw new RangeError(
'Failed to execute "redirect" on "response": Invalid status code'
)
}
return new Response(null, {
headers: { Location: validateURL(url) },
status,
})
}
static error() {
const response = new BaseResponse(null, { status: 0, statusText: '' })
response[INTERNALS].type = 'error'
return response
}
get url() {
return this[INTERNALS].url?.toString() || ''
}
get ok() {
return this[INTERNALS].status >= 200 && this[INTERNALS].status < 300
}
get status() {
return this[INTERNALS].status
}
get statusText() {
return this[INTERNALS].statusText
}
get headers() {
return this[INTERNALS].headers
}
get redirected() {
return (
this[INTERNALS].status > 299 &&
this[INTERNALS].status < 400 &&
this[INTERNALS].headers.has('Location')
)
}
get type() {
return this[INTERNALS].type
}
clone() {
return new BaseResponse(cloneBody(this), {
headers: this.headers,
status: this.status,
statusText: this.statusText,
url: this.url,
})
}
get [Symbol.toStringTag]() {
return 'Response'
}
}
export interface ResponseInit {
headers?: HeadersInit
status?: number
statusText?: string
url?: string
}
export { BaseResponse as Response }
import { DeprecationError } from '../error'
import { FetchEvent } from '../spec-compliant/fetch-event'
import { NextRequest } from './request'
const responseSymbol = Symbol('response')
const passThroughSymbol = Symbol('passThrough')
export const waitUntilSymbol = Symbol('waitUntil')
class FetchEvent {
readonly [waitUntilSymbol]: Promise<any>[] = [];
[responseSymbol]?: Promise<Response>;
[passThroughSymbol] = false
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
constructor(_request: Request) {}
respondWith(response: Response | Promise<Response>): void {
if (!this[responseSymbol]) {
this[responseSymbol] = Promise.resolve(response)
}
}
passThroughOnException(): void {
this[passThroughSymbol] = true
}
waitUntil(promise: Promise<any>): void {
this[waitUntilSymbol].push(promise)
}
}
export class NextFetchEvent extends FetchEvent {
sourcePage: string
......
......@@ -2,7 +2,7 @@ import type { I18NConfig } from '../../config-shared'
import type { RequestData } from '../types'
import { NextURL } from '../next-url'
import { isBot } from '../../utils'
import { toNodeHeaders } from '../utils'
import { toNodeHeaders, validateURL } from '../utils'
import parseua from 'next/dist/compiled/ua-parser-js'
import { NextCookies } from './cookies'
......@@ -20,14 +20,15 @@ export class NextRequest extends Request {
}
constructor(input: Request | string, init: RequestInit = {}) {
const url = typeof input === 'string' ? input : input.url
validateURL(url)
super(input, init)
this[INTERNALS] = {
cookies: new NextCookies(this),
geo: init.geo || {},
ip: init.ip,
page: init.page,
url: new NextURL(typeof input === 'string' ? input : input.url, {
url: new NextURL(url, {
headers: toNodeHeaders(this.headers),
nextConfig: init.nextConfig,
}),
......
import type { NodeHeaders } from './types'
export async function* streamToIterator<T>(
readable: ReadableStream<T>
): AsyncIterableIterator<T> {
const reader = readable.getReader()
while (true) {
const { value, done } = await reader.read()
if (done) break
if (value) {
yield value
}
}
reader.releaseLock()
}
export function notImplemented(name: string, method: string): any {
throw new Error(
`Failed to get the '${method}' property on '${name}': the property is not implemented`
)
}
export function fromNodeHeaders(object: NodeHeaders): Headers {
const headers = new Headers()
for (let [key, value] of Object.entries(object)) {
......
......@@ -83,7 +83,6 @@ export const EDGE_UNSUPPORTED_NODE_APIS = [
'CountQueuingStrategy',
'DecompressionStream',
'DomException',
'Event',
'EventTarget',
'MessageChannel',
'MessageEvent',
......
......@@ -8,5 +8,15 @@ export function isPlainObject(value: any): boolean {
}
const prototype = Object.getPrototypeOf(value)
return prototype === null || prototype === Object.prototype
/**
* this used to be previously:
*
* `return prototype === null || prototype === Object.prototype`
*
* but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.
*
* It was changed to the current implementation since it's resilient to serialization.
*/
return prototype === null || prototype.hasOwnProperty('isPrototypeOf')
}
......@@ -144,6 +144,39 @@ export async function ncc_acorn(task, opts) {
.target('compiled/acorn')
}
// eslint-disable-next-line camelcase
externals['@edge-runtime/primitives'] =
'next/dist/compiled/@edge-runtime/primitives'
export async function ncc_edge_runtime_primitives() {
// `@edge-runtime/primitives` is precompiled and pre-bundled
// so we vendor the package as it is.
const dest = 'compiled/@edge-runtime/primitives'
const pkg = await fs.readJson(
require.resolve('@edge-runtime/primitives/package.json')
)
await fs.remove(dest)
await fs.outputJson(join(dest, 'package.json'), {
name: '@edge-runtime/primitives',
version: pkg.version,
main: './index.js',
license: pkg.license,
})
await fs.copy(
require.resolve('@edge-runtime/primitives'),
join(dest, 'index.js')
)
}
// eslint-disable-next-line camelcase
externals['edge-runtime'] = 'next/dist/compiled/edge-runtime'
export async function ncc_edge_runtime(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('edge-runtime')))
.ncc({ packageName: 'edge-runtime', externals })
.target('compiled/edge-runtime')
}
// eslint-disable-next-line camelcase
export async function ncc_next__react_dev_overlay(task, opts) {
const overlayExternals = {
......@@ -1533,35 +1566,6 @@ export async function ncc_mini_css_extract_plugin(task, opts) {
.target('compiled/mini-css-extract-plugin')
}
// eslint-disable-next-line camelcase
externals['web-streams-polyfill'] = 'next/dist/compiled/web-streams-polyfill'
export async function ncc_web_streams_polyfill(task, opts) {
await task
.source(
opts.src ||
relative(__dirname, require.resolve('web-streams-polyfill/ponyfill'))
)
.ncc({ packageName: 'web-streams-polyfill', externals })
.target('compiled/web-streams-polyfill')
}
// eslint-disable-next-line camelcase
externals['abort-controller'] = 'next/dist/compiled/abort-controller'
export async function ncc_abort_controller(task, opts) {
await task
.source(
opts.src || relative(__dirname, require.resolve('abort-controller'))
)
.ncc({ packageName: 'abort-controller', externals })
.target('compiled/abort-controller')
}
// eslint-disable-next-line camelcase
externals['formdata-node'] = 'next/dist/compiled/formdata-node'
export async function ncc_formdata_node(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('formdata-node')))
.ncc({ packageName: 'formdata-node', externals })
.target('compiled/formdata-node')
}
// eslint-disable-next-line camelcase
externals['ua-parser-js'] = 'next/dist/compiled/ua-parser-js'
export async function ncc_ua_parser_js(task, opts) {
await task
......@@ -1569,25 +1573,6 @@ export async function ncc_ua_parser_js(task, opts) {
.ncc({ packageName: 'ua-parser-js', externals })
.target('compiled/ua-parser-js')
}
// eslint-disable-next-line camelcase
externals['@peculiar/webcrypto'] = 'next/dist/compiled/@peculiar/webcrypto'
export async function ncc_webcrypto(task, opts) {
await task
.source(
opts.src || relative(__dirname, require.resolve('@peculiar/webcrypto'))
)
.ncc({ packageName: '@peculiar/webcrypto', externals })
.target('compiled/@peculiar/webcrypto')
}
// eslint-disable-next-line camelcase
externals['uuid'] = 'next/dist/compiled/uuid'
export async function ncc_uuid(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('uuid')))
.ncc({ packageName: 'uuid', externals })
.target('compiled/uuid')
}
// eslint-disable-next-line camelcase
export async function ncc_webpack_bundle5(task, opts) {
const bundleExternals = {
......@@ -1671,6 +1656,8 @@ export async function ncc(task, opts) {
'ncc_p_limit',
'ncc_raw_body',
'ncc_cssnano_simple',
'ncc_edge_runtime_primitives',
'ncc_edge_runtime',
'ncc_image_size',
'ncc_get_orientation',
'ncc_hapi_accept',
......@@ -1762,11 +1749,6 @@ export async function ncc(task, opts) {
'ncc_webpack_sources3',
'ncc_ws',
'ncc_ua_parser_js',
'ncc_webcrypto',
'ncc_uuid',
'ncc_formdata_node',
'ncc_web_streams_polyfill',
'ncc_abort_controller',
'ncc_minimatch',
'ncc_mini_css_extract_plugin',
],
......
......@@ -259,32 +259,10 @@ declare module 'next/dist/compiled/string-hash' {
import m from 'string-hash'
export = m
}
declare module 'next/dist/compiled/web-streams-polyfill' {
import m from 'web-streams-polyfill/ponyfill'
export = m
}
declare module 'next/dist/compiled/abort-controller' {
type BaseAbortController = typeof AbortController
type BaseAbortSignal = typeof AbortSignal
export { BaseAbortController as AbortController }
export { BaseAbortSignal as AbortSignal }
}
declare module 'next/dist/compiled/ua-parser-js' {
import m from 'ua-parser-js'
export = m
}
declare module 'next/dist/compiled/formdata-node' {
import m from 'formdata-node'
export = m
}
declare module 'next/dist/compiled/@peculiar/webcrypto' {
import m from '@peculiar/webcrypto'
export = m
}
declare module 'next/dist/compiled/uuid' {
import m from 'uuid'
export = m
}
declare module 'next/dist/compiled/strip-ansi' {
import m from 'strip-ansi'
export = m
......@@ -346,6 +324,16 @@ declare module 'next/dist/compiled/process' {
export = m
}
declare module 'next/dist/compiled/edge-runtime' {
import m from 'edge-runtime'
export = m
}
declare module 'next/dist/compiled/@edge-runtime/primitives' {
import * as m from '@edge-runtime/primitives'
export = m
}
declare module 'pnp-webpack-plugin' {
import webpack from 'webpack4'
......
lockfileVersion: 5.4
lockfileVersion: 5.3
overrides:
browserslist: 4.20.2
......@@ -19,6 +19,7 @@ importers:
'@babel/plugin-proposal-object-rest-spread': 7.14.7
'@babel/preset-flow': 7.14.5
'@babel/preset-react': 7.14.5
'@edge-runtime/jest-environment': 1.0.1-beta.10
'@fullhuman/postcss-purgecss': 1.3.0
'@mdx-js/loader': 0.18.0
'@next/bundle-analyzer': workspace:*
......@@ -156,20 +157,20 @@ importers:
turbo: 1.2.9
typescript: 4.6.3
wait-port: 0.2.2
web-streams-polyfill: 2.1.1
webpack: link:./node_modules/webpack5
webpack-bundle-analyzer: 4.3.0
worker-loader: 3.0.7
devDependencies:
'@babel/core': 7.17.5
'@babel/eslint-parser': 7.15.0_zfufu2skozopumvzuksw2qh3pm
'@babel/eslint-parser': 7.15.0_@babel+core@7.17.5+eslint@7.24.0
'@babel/generator': 7.15.0
'@babel/parser': 7.15.0
'@babel/plugin-proposal-object-rest-spread': 7.14.7_@babel+core@7.17.5
'@babel/preset-flow': 7.14.5_@babel+core@7.17.5
'@babel/preset-react': 7.14.5_@babel+core@7.17.5
'@edge-runtime/jest-environment': 1.0.1-beta.10
'@fullhuman/postcss-purgecss': 1.3.0
'@mdx-js/loader': 0.18.0_chjjl7ahzp5qndxdetcmaga4n4
'@mdx-js/loader': 0.18.0_@babel+core@7.17.5+react@18.1.0
'@next/bundle-analyzer': link:packages/next-bundle-analyzer
'@next/env': link:packages/next-env
'@next/eslint-plugin-next': link:packages/eslint-plugin-next
......@@ -181,7 +182,7 @@ importers:
'@svgr/webpack': 5.5.0
'@swc/cli': 0.1.55_@swc+core@1.2.148
'@swc/core': 1.2.148
'@testing-library/react': 13.0.0_ef5jwxihqo6n7gxfmzogljlgcm
'@testing-library/react': 13.0.0_react-dom@18.1.0+react@18.1.0
'@types/cheerio': 0.22.16
'@types/fs-extra': 8.1.0
'@types/html-validator': 5.0.2
......@@ -195,9 +196,9 @@ importers:
'@types/sharp': 0.29.3
'@types/string-hash': 1.1.1
'@types/trusted-types': 2.0.2
'@typescript-eslint/eslint-plugin': 4.29.1_h7pkbj7dyzxk3ymw6sjfdovo2m
'@typescript-eslint/parser': 4.29.1_sphjtq24gqflsrz3rov2wazhhy
'@vercel/fetch': 6.1.1_fii5qhbaymjqmfm7e2spxc5z4m
'@typescript-eslint/eslint-plugin': 4.29.1_3fdea0a7e3c66eade196f49251baaed3
'@typescript-eslint/parser': 4.29.1_eslint@7.24.0+typescript@4.6.3
'@vercel/fetch': 6.1.1_2a11d81c20c31306159f26a4fb8bb9e3
'@webassemblyjs/ast': 1.11.1
'@webassemblyjs/floating-point-hex-parser': 1.11.1
'@webassemblyjs/helper-api-error': 1.11.1
......@@ -235,8 +236,8 @@ importers:
escape-string-regexp: 2.0.0
eslint: 7.24.0
eslint-config-next: link:packages/eslint-config-next
eslint-plugin-import: 2.22.1_23iivq3ybsthf4qrv3kgatrvhe
eslint-plugin-jest: 24.3.5_lqson4bxnnkvr5juyhnlzmz4rq
eslint-plugin-import: 2.22.1_d6d08ac3780ca672f211aed4604e3539
eslint-plugin-jest: 24.3.5_5c24e6f0376b5558f534c1dabcb33c8c
eslint-plugin-react: 7.23.2_eslint@7.24.0
eslint-plugin-react-hooks: 4.2.0_eslint@7.24.0
execa: 2.0.3
......@@ -255,7 +256,7 @@ importers:
isomorphic-unfetch: 3.0.0
jest: 27.0.6_node-notifier@8.0.1
ky: 0.19.1
ky-universal: 0.6.0_nhqkqulgur6nsykqmo3ck5c3cu
ky-universal: 0.6.0_ky@0.19.1
lerna: 4.0.0
lint-staged: 10.1.7
lost: 8.3.1
......@@ -284,8 +285,8 @@ importers:
react-17: /react/17.0.2
react-dom: 18.1.0_react@18.1.0
react-dom-17: /react-dom/17.0.2_react@18.1.0
react-ssr-prepass: 1.0.8_hlgeuu36mywb3l5da2rxhzh74u
react-virtualized: 9.22.3_ef5jwxihqo6n7gxfmzogljlgcm
react-ssr-prepass: 1.0.8_react-is@16.13.1+react@18.1.0
react-virtualized: 9.22.3_react-dom@18.1.0+react@18.1.0
relay-compiler: 13.0.2
relay-runtime: 13.0.2
release: 6.3.0
......@@ -296,16 +297,15 @@ importers:
selenium-webdriver: 4.0.0-beta.4
semver: 7.3.7
shell-quote: 1.7.3
styled-components: 5.3.3_mg42qvqxyojuro644naflvwmve
styled-components: 5.3.3_61b9a85617c39348bbdce34055d6cca9
styled-jsx-plugin-postcss: 3.0.2
tailwindcss: 1.1.3
taskr: 1.1.0
tree-kill: 1.2.2
tsec: 0.2.1_go7yo5n4vesd3xwliytss2haoa
tsec: 0.2.1_33bf8775bca9243ddecb46272968e070
turbo: 1.2.9
typescript: 4.6.3
wait-port: 0.2.2
web-streams-polyfill: 2.1.1
webpack: 5.72.0_@swc+core@1.2.148
webpack-bundle-analyzer: 4.3.0
worker-loader: 3.0.7_webpack@5.72.0
......@@ -366,10 +366,10 @@ importers:
dependencies:
'@next/eslint-plugin-next': link:../eslint-plugin-next
'@rushstack/eslint-patch': 1.1.3
'@typescript-eslint/parser': 5.21.0_hrkuebk64jiu2ut2d2sm4oylnu
'@typescript-eslint/parser': 5.21.0_eslint@7.32.0+typescript@4.6.3
eslint-import-resolver-node: 0.3.6
eslint-import-resolver-typescript: 2.7.1_hpmu7kn6tcn2vnxpfzvv33bxmy
eslint-plugin-import: 2.26.0_asoxhzjlkaozogjqriaz4fv5ly
eslint-import-resolver-typescript: 2.7.1_3bd94fa9be989baab6ef2e6b5dec3766
eslint-plugin-import: 2.26.0_049d73e52b501d9719308a019e16bd5e
eslint-plugin-jsx-a11y: 6.5.1_eslint@7.32.0
eslint-plugin-react: 7.29.4_eslint@7.32.0
eslint-plugin-react-hooks: 4.5.0_eslint@7.32.0
......@@ -406,6 +406,8 @@ importers:
'@babel/runtime': 7.15.4
'@babel/traverse': 7.15.0
'@babel/types': 7.15.0
'@edge-runtime/primitives': 1.0.1-beta.10
'@edge-runtime/vm': 1.0.1-beta.10
'@hapi/accept': 5.0.2
'@napi-rs/cli': 2.4.4
'@napi-rs/triples': 1.1.0
......@@ -415,7 +417,6 @@ importers:
'@next/react-dev-overlay': 12.1.7-canary.23
'@next/react-refresh-utils': 12.1.7-canary.23
'@next/swc': 12.1.7-canary.23
'@peculiar/webcrypto': 1.3.1
'@taskr/clear': 1.1.0
'@taskr/esnext': 1.1.0
'@taskr/watch': 1.1.0
......@@ -485,11 +486,11 @@ importers:
debug: 4.1.1
devalue: 2.0.1
domain-browser: 4.19.0
edge-runtime: 1.0.1-beta.10
etag: 1.8.1
events: 3.3.0
find-cache-dir: 3.3.1
find-up: 4.1.0
formdata-node: 4.3.0
fresh: 0.5.2
get-orientation: 1.1.2
glob: 7.1.7
......@@ -564,7 +565,6 @@ importers:
uuid: 8.3.2
vm-browserify: 1.1.2
watchpack: 2.3.1
web-streams-polyfill: 3.0.3
web-vitals: 2.1.0
webpack-sources1: npm:webpack-sources@1.4.3
webpack-sources3: npm:webpack-sources@3.2.3
......@@ -575,13 +575,13 @@ importers:
'@next/env': link:../next-env
caniuse-lite: 1.0.30001332
postcss: 8.4.5
styled-jsx: 5.0.2_@babel+core@7.15.0
use-sync-external-store: 1.1.0
styled-jsx: 5.0.2_@babel+core@7.15.0+react@18.1.0
use-sync-external-store: 1.1.0_react@18.1.0
devDependencies:
'@ampproject/toolbox-optimizer': 2.8.3
'@babel/code-frame': 7.12.11
'@babel/core': 7.15.0
'@babel/eslint-parser': 7.15.0_xw2oyqbzhnjfmqehyjkh3ainty
'@babel/eslint-parser': 7.15.0_@babel+core@7.15.0+eslint@7.32.0
'@babel/generator': 7.15.0
'@babel/plugin-proposal-class-properties': 7.14.5_@babel+core@7.15.0
'@babel/plugin-proposal-export-namespace-from': 7.14.5_@babel+core@7.15.0
......@@ -599,6 +599,8 @@ importers:
'@babel/runtime': 7.15.4
'@babel/traverse': 7.15.0
'@babel/types': 7.15.0
'@edge-runtime/primitives': 1.0.1-beta.10
'@edge-runtime/vm': 1.0.1-beta.10
'@hapi/accept': 5.0.2
'@napi-rs/cli': 2.4.4
'@napi-rs/triples': 1.1.0
......@@ -607,7 +609,6 @@ importers:
'@next/react-dev-overlay': link:../react-dev-overlay
'@next/react-refresh-utils': link:../react-refresh-utils
'@next/swc': link:../next-swc
'@peculiar/webcrypto': 1.3.1
'@taskr/clear': 1.1.0
'@taskr/esnext': 1.1.0
'@taskr/watch': 1.1.0
......@@ -676,11 +677,11 @@ importers:
debug: 4.1.1
devalue: 2.0.1
domain-browser: 4.19.0
edge-runtime: 1.0.1-beta.10
etag: 1.8.1
events: 3.3.0
find-cache-dir: 3.3.1
find-up: 4.1.0
formdata-node: 4.3.0
fresh: 0.5.2
get-orientation: 1.1.2
glob: 7.1.7
......@@ -726,9 +727,9 @@ importers:
raw-body: 2.4.1
react-is: 17.0.2
react-refresh: 0.12.0
react-server-dom-webpack: 0.0.0-experimental-577f2de46-20220320_webpack@5.72.0
react-server-dom-webpack: 0.0.0-experimental-577f2de46-20220320_react@18.1.0+webpack@5.72.0
regenerator-runtime: 0.13.4
sass-loader: 12.4.0_webpack@5.72.0
sass-loader: 12.4.0_node-sass@6.0.1+webpack@5.72.0
schema-utils2: /schema-utils/2.7.1
schema-utils3: /schema-utils/3.0.0
semver: 7.3.2
......@@ -747,17 +748,16 @@ importers:
timers-browserify: 2.0.12
tty-browserify: 0.0.1
ua-parser-js: 0.7.28
unistore: 3.4.1
unistore: 3.4.1_react@18.1.0
util: 0.12.4
uuid: 8.3.2
vm-browserify: 1.1.2
watchpack: 2.3.1
web-streams-polyfill: 3.0.3
web-vitals: 2.1.0
webpack-sources1: /webpack-sources/1.4.3
webpack-sources3: /webpack-sources/3.2.3
webpack4: /webpack/4.44.1
webpack5: /webpack/5.72.0
webpack5: /webpack/5.72.0_@swc+core@1.2.148
ws: 8.2.3
packages/next-bundle-analyzer:
......@@ -980,7 +980,7 @@ packages:
transitivePeerDependencies:
- supports-color
/@babel/eslint-parser/7.15.0_xw2oyqbzhnjfmqehyjkh3ainty:
/@babel/eslint-parser/7.15.0_@babel+core@7.15.0+eslint@7.32.0:
resolution: {integrity: sha512-+gSPtjSBxOZz4Uh8Ggqu7HbfpB8cT1LwW0DnVVLZEJvzXauiD0Di3zszcBkRmfGGrLdYeHUwcflG7i3tr9kQlw==}
engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0}
peerDependencies:
......@@ -994,7 +994,7 @@ packages:
semver: 6.3.0
dev: true
/@babel/eslint-parser/7.15.0_zfufu2skozopumvzuksw2qh3pm:
/@babel/eslint-parser/7.15.0_@babel+core@7.17.5+eslint@7.24.0:
resolution: {integrity: sha512-+gSPtjSBxOZz4Uh8Ggqu7HbfpB8cT1LwW0DnVVLZEJvzXauiD0Di3zszcBkRmfGGrLdYeHUwcflG7i3tr9kQlw==}
engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0}
peerDependencies:
......@@ -3421,6 +3421,31 @@ packages:
protobufjs: 6.11.2
dev: true
/@edge-runtime/format/1.0.0:
resolution: {integrity: sha512-mxi0n00nJwnjaXUQIfTS7l64yvwGXs435gEjuDhzTHZyrmnCYdELXdJr3Q+6v4DO1mmmtNTYFHUvIlpCmMUC6g==}
dev: true
/@edge-runtime/jest-environment/1.0.1-beta.10:
resolution: {integrity: sha512-+uiCWvF9YDX5rZn1K1vySw3NcJ+TcTP6fsXgPUKYhERy52jChOoNhjYSEjZ52HdcoXtPH3rkuclGUr4VYpVy6w==}
dependencies:
'@edge-runtime/vm': 1.0.1-beta.10
'@jest/environment': 28.1.0
'@jest/fake-timers': 28.1.0
'@jest/types': 28.1.0
jest-mock: 28.1.0
jest-util: 28.1.0
dev: true
/@edge-runtime/primitives/1.0.1-beta.10:
resolution: {integrity: sha512-57fr6p2+iRJyfnh1vfu2Z0WX+3sNvSUhvCPHjiQ2TUSm0ZQsTSXtrBUbseE6R5fQ07/8S55FLZLmepy6IK0JVQ==}
dev: true
/@edge-runtime/vm/1.0.1-beta.10:
resolution: {integrity: sha512-+0NfrfyXjxhyJsEuhxSmZj87/zvPT7IU7X1mdfGOSiRF3Mt92780gLqT6cfv3/2h5009o79asc4aH1C4OfYAtA==}
dependencies:
'@edge-runtime/primitives': 1.0.1-beta.10
dev: true
/@emotion/is-prop-valid/0.8.8:
resolution: {integrity: sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==}
dependencies:
......@@ -3459,7 +3484,7 @@ packages:
resolution: {integrity: sha512-63vVJ5NIBh/JF8l9LuPrQYSzFimk7zYHySQB4Dk9rVdJ8kV/vGQoVTvRu1UW05sEc2Ug5PqtEChtTHU+9hvPcA==}
dev: true
/@firebase/analytics/0.3.5_4tdhdiy4fyxu45m3zxk7uipic4:
/@firebase/analytics/0.3.5_e4c671a31c2e2f4e759bcdd5fa21e817:
resolution: {integrity: sha512-p+h1s9A8EjGWfjAObu8ei46JoN2Ogbtl1RzqW7HjcPuclOIOmPTXKEXXCEXgO79OLxnzzezVeBtHPSx6r6gxJA==}
peerDependencies:
'@firebase/app': 0.x
......@@ -3469,7 +3494,7 @@ packages:
'@firebase/app': 0.6.4
'@firebase/app-types': 0.6.1
'@firebase/component': 0.1.12
'@firebase/installations': 0.4.10_4tdhdiy4fyxu45m3zxk7uipic4
'@firebase/installations': 0.4.10_e4c671a31c2e2f4e759bcdd5fa21e817
'@firebase/logger': 0.2.4
'@firebase/util': 0.2.47
tslib: 1.11.1
......@@ -3491,7 +3516,7 @@ packages:
xmlhttprequest: 1.8.0
dev: true
/@firebase/auth-interop-types/0.1.5_tjy5ngyd4qmypdmf5zwa73nppu:
/@firebase/auth-interop-types/0.1.5_9a71d69b03e419878d85ee6c0fedaf7d:
resolution: {integrity: sha512-88h74TMQ6wXChPA6h9Q3E1Jg6TkTHep2+k63OWg3s0ozyGVMeY+TTOti7PFPzq5RhszQPQOoCi59es4MaRvgCw==}
peerDependencies:
'@firebase/app-types': 0.x
......@@ -3501,7 +3526,7 @@ packages:
'@firebase/util': 0.2.47
dev: true
/@firebase/auth-types/0.10.1_tjy5ngyd4qmypdmf5zwa73nppu:
/@firebase/auth-types/0.10.1_9a71d69b03e419878d85ee6c0fedaf7d:
resolution: {integrity: sha512-/+gBHb1O9x/YlG7inXfxff/6X3BPZt4zgBv4kql6HEmdzNQCodIRlEYnI+/da+lN+dha7PjaFH7C7ewMmfV7rw==}
peerDependencies:
'@firebase/app-types': 0.x
......@@ -3511,13 +3536,13 @@ packages:
'@firebase/util': 0.2.47
dev: true
/@firebase/auth/0.14.6_mgjznm6ljckgbtskimppmdqgem:
/@firebase/auth/0.14.6_619396b3cb489460ce4a431ef60e0623:
resolution: {integrity: sha512-7gaEUWhUubWBGfOXAZvpTpJqBJT9KyG83RXC6VnjSQIfNUaarHZ485WkzERil43A6KvIl+f4kHxfZShE6ZCK3A==}
peerDependencies:
'@firebase/app': 0.x
dependencies:
'@firebase/app': 0.6.4
'@firebase/auth-types': 0.10.1_tjy5ngyd4qmypdmf5zwa73nppu
'@firebase/auth-types': 0.10.1_9a71d69b03e419878d85ee6c0fedaf7d
transitivePeerDependencies:
- '@firebase/app-types'
- '@firebase/util'
......@@ -3539,7 +3564,7 @@ packages:
/@firebase/database/0.6.3_@firebase+app-types@0.6.1:
resolution: {integrity: sha512-gHoCISHQVLoq+rGu+PorYxMkhsjhXov3ocBxz/0uVdznNhrbKkAZaEKF+dIAsUPDlwSYeZuwWuik7xcV3DtRaw==}
dependencies:
'@firebase/auth-interop-types': 0.1.5_tjy5ngyd4qmypdmf5zwa73nppu
'@firebase/auth-interop-types': 0.1.5_9a71d69b03e419878d85ee6c0fedaf7d
'@firebase/component': 0.1.12
'@firebase/database-types': 0.5.1
'@firebase/logger': 0.2.4
......@@ -3558,7 +3583,7 @@ packages:
'@firebase/app-types': 0.6.1
dev: true
/@firebase/firestore/1.14.5_4tdhdiy4fyxu45m3zxk7uipic4:
/@firebase/firestore/1.14.5_e4c671a31c2e2f4e759bcdd5fa21e817:
resolution: {integrity: sha512-BZD3RqlAEnq15i8Y53VUFsuWkbujslGaQIcuEnt6bOENzlKiLBwESmt/uGKRIsdQjc1krG2qdoPmaSMqULR0dA==}
engines: {node: ^8.13.0 || >=10.10.0}
peerDependencies:
......@@ -3581,7 +3606,7 @@ packages:
resolution: {integrity: sha512-DGR4i3VI55KnYk4IxrIw7+VG7Q3gA65azHnZxo98Il8IvYLr2UTBlSh72dTLlDf25NW51HqvJgYJDKvSaAeyHQ==}
dev: true
/@firebase/functions/0.4.44_4tdhdiy4fyxu45m3zxk7uipic4:
/@firebase/functions/0.4.44_e4c671a31c2e2f4e759bcdd5fa21e817:
resolution: {integrity: sha512-Nbw+V/jYqfgq7wscsSDidqIzx8TrnmA2wRD1auCFNmf+gSJg8o+gNyCDdNHZI407jvrZcxp3nG1eMbqwmmnp7Q==}
peerDependencies:
'@firebase/app': 0.x
......@@ -3604,7 +3629,7 @@ packages:
'@firebase/app-types': 0.6.1
dev: true
/@firebase/installations/0.4.10_4tdhdiy4fyxu45m3zxk7uipic4:
/@firebase/installations/0.4.10_e4c671a31c2e2f4e759bcdd5fa21e817:
resolution: {integrity: sha512-Nf7VK9++0eQzjdvBkBNNaOdxPjFiKD0EllLCIQycHozF97BmuFUqb2Ik5L2JaWspWg7vxLNacLHvW48nPGx4Zw==}
peerDependencies:
'@firebase/app': 0.x
......@@ -3631,7 +3656,7 @@ packages:
'@firebase/app-types': 0.6.1
dev: true
/@firebase/messaging/0.6.16_4tdhdiy4fyxu45m3zxk7uipic4:
/@firebase/messaging/0.6.16_e4c671a31c2e2f4e759bcdd5fa21e817:
resolution: {integrity: sha512-TAPISK5y3xbxUw81HxLDP6YPsRryU6Nl8Z7AjNnem13BoN9LJ2/wCi9RDMfPnQhAn0h0N+mpxy/GB+0IlEARlg==}
peerDependencies:
'@firebase/app': 0.x
......@@ -3640,7 +3665,7 @@ packages:
'@firebase/app': 0.6.4
'@firebase/app-types': 0.6.1
'@firebase/component': 0.1.12
'@firebase/installations': 0.4.10_4tdhdiy4fyxu45m3zxk7uipic4
'@firebase/installations': 0.4.10_e4c671a31c2e2f4e759bcdd5fa21e817
'@firebase/messaging-types': 0.4.5_@firebase+app-types@0.6.1
'@firebase/util': 0.2.47
idb: 3.0.2
......@@ -3651,7 +3676,7 @@ packages:
resolution: {integrity: sha512-6fZfIGjQpwo9S5OzMpPyqgYAUZcFzZxHFqOyNtorDIgNXq33nlldTL/vtaUZA8iT9TT5cJlCrF/jthKU7X21EA==}
dev: true
/@firebase/performance/0.3.4_4tdhdiy4fyxu45m3zxk7uipic4:
/@firebase/performance/0.3.4_e4c671a31c2e2f4e759bcdd5fa21e817:
resolution: {integrity: sha512-VDoqJSB+2RuXlyyP7oSvBPEmoznG84HmEtb8DQWsAHeVkf+qlec1OTZR8IjktlIv+8Pg8MMuYoB0crx5g7xU5A==}
peerDependencies:
'@firebase/app': 0.x
......@@ -3660,7 +3685,7 @@ packages:
'@firebase/app': 0.6.4
'@firebase/app-types': 0.6.1
'@firebase/component': 0.1.12
'@firebase/installations': 0.4.10_4tdhdiy4fyxu45m3zxk7uipic4
'@firebase/installations': 0.4.10_e4c671a31c2e2f4e759bcdd5fa21e817
'@firebase/logger': 0.2.4
'@firebase/performance-types': 0.0.13
'@firebase/util': 0.2.47
......@@ -3679,7 +3704,7 @@ packages:
resolution: {integrity: sha512-G96qnF3RYGbZsTRut7NBX0sxyczxt1uyCgXQuH/eAfUCngxjEGcZQnBdy6mvSdqdJh5mC31rWPO4v9/s7HwtzA==}
dev: true
/@firebase/remote-config/0.1.21_4tdhdiy4fyxu45m3zxk7uipic4:
/@firebase/remote-config/0.1.21_e4c671a31c2e2f4e759bcdd5fa21e817:
resolution: {integrity: sha512-EwDNU1mT+8Jn66IUwwNP5SM8AbaI7wmCXjp7djZtTXNrpPoh3xqzSRM1vTgp4Uu/mHffEDfbydsoJAIftADIfQ==}
peerDependencies:
'@firebase/app': 0.x
......@@ -3688,14 +3713,14 @@ packages:
'@firebase/app': 0.6.4
'@firebase/app-types': 0.6.1
'@firebase/component': 0.1.12
'@firebase/installations': 0.4.10_4tdhdiy4fyxu45m3zxk7uipic4
'@firebase/installations': 0.4.10_e4c671a31c2e2f4e759bcdd5fa21e817
'@firebase/logger': 0.2.4
'@firebase/remote-config-types': 0.1.9
'@firebase/util': 0.2.47
tslib: 1.11.1
dev: true
/@firebase/storage-types/0.3.12_tjy5ngyd4qmypdmf5zwa73nppu:
/@firebase/storage-types/0.3.12_9a71d69b03e419878d85ee6c0fedaf7d:
resolution: {integrity: sha512-DDV6Fs6aYoGw3w/zZZTkqiipxihnsvHf6znbeZYjIIHit3tr1uLJdGPDPiCTfZcTGPpg2ux6ZmvNDvVgJdHALw==}
peerDependencies:
'@firebase/app-types': 0.x
......@@ -3705,7 +3730,7 @@ packages:
'@firebase/util': 0.2.47
dev: true
/@firebase/storage/0.3.34_4tdhdiy4fyxu45m3zxk7uipic4:
/@firebase/storage/0.3.34_e4c671a31c2e2f4e759bcdd5fa21e817:
resolution: {integrity: sha512-vuR1PpGdaCk25D2dT2trfmZZjpdfOn0rPTksvoqg7TAPLeoVsVoDyT2LgF3Arna/jqx52sAIRx1HLrlvzE1pgA==}
peerDependencies:
'@firebase/app': 0.x
......@@ -3714,7 +3739,7 @@ packages:
'@firebase/app': 0.6.4
'@firebase/app-types': 0.6.1
'@firebase/component': 0.1.12
'@firebase/storage-types': 0.3.12_tjy5ngyd4qmypdmf5zwa73nppu
'@firebase/storage-types': 0.3.12_9a71d69b03e419878d85ee6c0fedaf7d
'@firebase/util': 0.2.47
tslib: 1.11.1
dev: true
......@@ -3865,6 +3890,16 @@ packages:
jest-mock: 27.0.6
dev: true
/@jest/environment/28.1.0:
resolution: {integrity: sha512-S44WGSxkRngzHslhV6RoAExekfF7Qhwa6R5+IYFa81mpcj0YgdBnRSmvHe3SNwOt64yXaE5GG8Y2xM28ii5ssA==}
engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0}
dependencies:
'@jest/fake-timers': 28.1.0
'@jest/types': 28.1.0
'@types/node': 17.0.21
jest-mock: 28.1.0
dev: true
/@jest/fake-timers/27.0.6:
resolution: {integrity: sha512-sqd+xTWtZ94l3yWDKnRTdvTeZ+A/V7SSKrxsrOKSqdyddb9CeNRF8fbhAU0D7ZJBpTTW2nbp6MftmKJDZfW2LQ==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
......@@ -3877,6 +3912,18 @@ packages:
jest-util: 27.0.6
dev: true
/@jest/fake-timers/28.1.0:
resolution: {integrity: sha512-Xqsf/6VLeAAq78+GNPzI7FZQRf5cCHj1qgQxCjws9n8rKw8r1UYoeaALwBvyuzOkpU3c1I6emeMySPa96rxtIg==}
engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0}
dependencies:
'@jest/types': 28.1.0
'@sinonjs/fake-timers': 9.1.2
'@types/node': 17.0.21
jest-message-util: 28.1.0
jest-mock: 28.1.0
jest-util: 28.1.0
dev: true
/@jest/globals/27.0.6:
resolution: {integrity: sha512-DdTGCP606rh9bjkdQ7VvChV18iS7q0IMJVP1piwTWyWskol4iqcVwthZmoJEf7obE1nc34OpIyoVGPeqLC+ryw==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
......@@ -3924,6 +3971,13 @@ packages:
- supports-color
dev: true
/@jest/schemas/28.0.2:
resolution: {integrity: sha512-YVDJZjd4izeTDkij00vHHAymNXQ6WWsdChFRK86qck6Jpr3DCL5W3Is3vslviRlP+bLuMYRLbdp98amMvqudhA==}
engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0}
dependencies:
'@sinclair/typebox': 0.23.5
dev: true
/@jest/source-map/27.0.6:
resolution: {integrity: sha512-Fek4mi5KQrqmlY07T23JRi0e7Z9bXTOOD86V/uS0EIW4PClvPDqZOyFlLpNJheS6QI0FNX1CgmPjtJ4EA/2M+g==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
......@@ -3989,6 +4043,18 @@ packages:
chalk: 4.1.2
dev: true
/@jest/types/28.1.0:
resolution: {integrity: sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==}
engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0}
dependencies:
'@jest/schemas': 28.0.2
'@types/istanbul-lib-coverage': 2.0.3
'@types/istanbul-reports': 3.0.0
'@types/node': 17.0.21
'@types/yargs': 17.0.10
chalk: 4.1.2
dev: true
/@jridgewell/resolve-uri/3.0.5:
resolution: {integrity: sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==}
engines: {node: '>=6.0.0'}
......@@ -4713,7 +4779,7 @@ packages:
- supports-color
dev: true
/@mdx-js/loader/0.18.0_chjjl7ahzp5qndxdetcmaga4n4:
/@mdx-js/loader/0.18.0_@babel+core@7.17.5+react@18.1.0:
resolution: {integrity: sha512-eRgtB14JwyIiZZPXjrpYhSHHQ5+GtZ5cbG744EV2DZVKjxxg4OT/EtKc4JoxWHRK2HVU6W7cf8IXjQpqDviRuQ==}
dependencies:
'@mdx-js/mdx': 0.18.2_@babel+core@7.17.5
......@@ -4978,33 +5044,6 @@ packages:
'@types/node': 17.0.21
dev: true
/@peculiar/asn1-schema/2.0.44:
resolution: {integrity: sha512-uaCnjQ9A9WwQSMuDJcNOCYEPXTahgKbFMvI7eMOMd8lXgx0J1eU7F3BoMsK5PFxa3dVUxjSQbaOjfgGoeHGgoQ==}
dependencies:
'@types/asn1js': 2.0.2
asn1js: 2.2.0
pvtsutils: 1.2.2
tslib: 2.3.1
dev: true
/@peculiar/json-schema/1.1.12:
resolution: {integrity: sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==}
engines: {node: '>=8.0.0'}
dependencies:
tslib: 2.3.1
dev: true
/@peculiar/webcrypto/1.3.1:
resolution: {integrity: sha512-BdzqCnzquMaoPYsFqWP/Q8SNslweb6A+oVaVbt9JBuXuvb528CEDUGVA0NSEZrgXj8jt++2kx3anChiKhOV3Nw==}
engines: {node: '>=10.12.0'}
dependencies:
'@peculiar/asn1-schema': 2.0.44
'@peculiar/json-schema': 1.1.12
pvtsutils: 1.2.2
tslib: 2.3.1
webcrypto-core: 1.6.0
dev: true
/@polka/url/1.0.0-next.11:
resolution: {integrity: sha512-3NsZsJIA/22P3QUyrEDNA2D133H4j224twJrdipXN38dpnIOzAbUDtOwkcJ5pXmn75w7LSQDjA4tO9dm1XlqlA==}
......@@ -5061,7 +5100,7 @@ packages:
slash: 3.0.0
dev: true
/@rollup/plugin-babel/5.2.2_fyfyge2tip5t6i2ifo2ygxhw54:
/@rollup/plugin-babel/5.2.2_@babel+core@7.17.5+rollup@2.35.1:
resolution: {integrity: sha512-MjmH7GvFT4TW8xFdIeFS3wqIX646y5tACdxkTO+khbHvS3ZcVJL6vkAHLw2wqPmkhwCfWHoNsp15VYNwW6JEJA==}
engines: {node: '>= 10.0.0'}
peerDependencies:
......@@ -5164,6 +5203,10 @@ packages:
leven: 3.1.0
dev: true
/@sinclair/typebox/0.23.5:
resolution: {integrity: sha512-AFBVi/iT4g20DHoujvMH1aEDn8fGJh4xsRGCP6d8RpLPMqsNPvW01Jcn0QysXTsg++/xj25NmJsGyH9xug/wKg==}
dev: true
/@sindresorhus/is/0.14.0:
resolution: {integrity: sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==}
engines: {node: '>=6'}
......@@ -5186,6 +5229,12 @@ packages:
'@sinonjs/commons': 1.7.2
dev: true
/@sinonjs/fake-timers/9.1.2:
resolution: {integrity: sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==}
dependencies:
'@sinonjs/commons': 1.7.2
dev: true
/@svgr/babel-plugin-add-jsx-attribute/5.4.0:
resolution: {integrity: sha512-ZFf2gs/8/6B8PnSofI0inYXr2SDNTDScPXhN7k5EqD4aZ3gi6u+rbmZHVB8IM3wDyx8ntKACZbtXSm7oZGRqVg==}
engines: {node: '>=10'}
......@@ -5502,7 +5551,7 @@ packages:
pretty-format: 27.5.1
dev: true
/@testing-library/react/13.0.0_ef5jwxihqo6n7gxfmzogljlgcm:
/@testing-library/react/13.0.0_react-dom@18.1.0+react@18.1.0:
resolution: {integrity: sha512-p0lYA1M7uoEmk2LnCbZLGmHJHyH59sAaZVXChTXlyhV/PRW9LoIh4mdf7tiXsO8BoNG+vN8UnFJff1hbZeXv+w==}
engines: {node: '>=12'}
peerDependencies:
......@@ -5531,10 +5580,6 @@ packages:
resolution: {integrity: sha512-S6oPal772qJZHoRZLFc/XoZW2gFvwXusYUmXPXkgxJLuEk2vOt7jc4Yo6z/vtI0EBkbPBVrJJ0B+prLIKiWqHg==}
dev: true
/@types/asn1js/2.0.2:
resolution: {integrity: sha512-t4YHCgtD+ERvH0FyxvNlYwJ2ezhqw7t+Ygh4urQ7dJER8i185JPv6oIM3ey5YQmGN6Zp9EMbpohkjZi9t3UxwA==}
dev: true
/@types/async-retry/1.2.1:
resolution: {integrity: sha512-yMQ6CVgICWtyFNBqJT3zqOc+TnqqEPLo4nKJNPFwcialiylil38Ie6q1ENeFTjvaLOkVim9K5LisHgAKJWidGQ==}
dev: true
......@@ -6085,10 +6130,6 @@ packages:
'@types/vfile-message': 2.0.0
dev: true
/@types/web/0.0.67:
resolution: {integrity: sha512-gB8AszSq0hXzzW4uhmf+rmuggfjnvoF+WlkD8oJ3EkgUjLEgMAlF/RPfnwcI80jSOauKRitWEA4qZacQrJu5Ow==}
dev: true
/@types/webpack-sources/0.1.5:
resolution: {integrity: sha512-zfvjpp7jiafSmrzJ2/i3LqOyTYTuJ7u1KOXlKgDlvsj9Rr0x7ZiYu5lZbXwobL7lmsRNtPXlBfmaUD8eU2Hu8w==}
dependencies:
......@@ -6113,6 +6154,12 @@ packages:
'@types/yargs-parser': 13.1.0
dev: true
/@types/yargs/17.0.10:
resolution: {integrity: sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==}
dependencies:
'@types/yargs-parser': 13.1.0
dev: true
/@types/yauzl/2.9.2:
resolution: {integrity: sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA==}
requiresBuild: true
......@@ -6121,7 +6168,7 @@ packages:
dev: true
optional: true
/@typescript-eslint/eslint-plugin/4.29.1_h7pkbj7dyzxk3ymw6sjfdovo2m:
/@typescript-eslint/eslint-plugin/4.29.1_3fdea0a7e3c66eade196f49251baaed3:
resolution: {integrity: sha512-AHqIU+SqZZgBEiWOrtN94ldR3ZUABV5dUG94j8Nms9rQnHFc8fvDOue/58K4CFz6r8OtDDc35Pw9NQPWo0Ayrw==}
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
......@@ -6132,8 +6179,8 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/experimental-utils': 4.29.1_sphjtq24gqflsrz3rov2wazhhy
'@typescript-eslint/parser': 4.29.1_sphjtq24gqflsrz3rov2wazhhy
'@typescript-eslint/experimental-utils': 4.29.1_eslint@7.24.0+typescript@4.6.3
'@typescript-eslint/parser': 4.29.1_eslint@7.24.0+typescript@4.6.3
'@typescript-eslint/scope-manager': 4.29.1
debug: 4.3.4
eslint: 7.24.0
......@@ -6146,7 +6193,7 @@ packages:
- supports-color
dev: true
/@typescript-eslint/experimental-utils/4.29.1_sphjtq24gqflsrz3rov2wazhhy:
/@typescript-eslint/experimental-utils/4.29.1_eslint@7.24.0+typescript@4.6.3:
resolution: {integrity: sha512-kl6QG6qpzZthfd2bzPNSJB2YcZpNOrP6r9jueXupcZHnL74WiuSjaft7WSu17J9+ae9zTlk0KJMXPUj0daBxMw==}
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
......@@ -6164,7 +6211,7 @@ packages:
- typescript
dev: true
/@typescript-eslint/parser/4.29.1_sphjtq24gqflsrz3rov2wazhhy:
/@typescript-eslint/parser/4.29.1_eslint@7.24.0+typescript@4.6.3:
resolution: {integrity: sha512-3fL5iN20hzX3Q4OkG7QEPFjZV2qsVGiDhEwwh+EkmE/w7oteiOvUNzmpu5eSwGJX/anCryONltJ3WDmAzAoCMg==}
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
......@@ -6184,7 +6231,7 @@ packages:
- supports-color
dev: true
/@typescript-eslint/parser/5.21.0_hrkuebk64jiu2ut2d2sm4oylnu:
/@typescript-eslint/parser/5.21.0_eslint@7.32.0+typescript@4.6.3:
resolution: {integrity: sha512-8RUwTO77hstXUr3pZoWZbRQUxXcSXafZ8/5gpnQCfXvgmP9gpNlRGlWzvfbEQ14TLjmtU8eGnONkff8U2ui2Eg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
......@@ -6199,6 +6246,7 @@ packages:
'@typescript-eslint/typescript-estree': 5.21.0_typescript@4.6.3
debug: 4.3.4
eslint: 7.32.0
typescript: 4.6.3
transitivePeerDependencies:
- supports-color
dev: false
......@@ -6309,7 +6357,7 @@ packages:
- supports-color
dev: true
/@vercel/fetch/6.1.1_fii5qhbaymjqmfm7e2spxc5z4m:
/@vercel/fetch/6.1.1_2a11d81c20c31306159f26a4fb8bb9e3:
resolution: {integrity: sha512-nddCkgpA0aVIqOlzh+qVlzDNcQq0cSnqefM+x6SciGI4GCvVZeaZ7WEowgX8I/HwBAq8Uj5Bdnd+r0+sYsJsig==}
peerDependencies:
'@types/node-fetch': '2'
......@@ -7126,13 +7174,6 @@ packages:
safer-buffer: 2.1.2
dev: true
/asn1js/2.2.0:
resolution: {integrity: sha512-oagLNqpfNv7CvmyMoexMDNyVDSiq1rya0AEUgcLlNHdHgNl6U/hi8xY370n5y+ZIFEXOx0J4B1qF2NDjMRxklA==}
engines: {node: '>=6.0.0'}
dependencies:
pvutils: 1.1.3
dev: true
/assert-plus/1.0.0:
resolution: {integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==}
engines: {node: '>=0.8'}
......@@ -7421,7 +7462,7 @@ packages:
'@babel/helper-module-imports': 7.16.7
babel-plugin-syntax-jsx: 6.18.0
lodash: 4.17.21
styled-components: 5.3.3_mg42qvqxyojuro644naflvwmve
styled-components: 5.3.3_61b9a85617c39348bbdce34055d6cca9
dev: true
/babel-plugin-syntax-jsx/6.18.0:
......@@ -8331,8 +8372,8 @@ packages:
resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==}
dev: true
/ci-info/3.1.1:
resolution: {integrity: sha512-kdRWLBIJwdsYJWYJFtAFFYxybguqeF91qpZaggjG5Nf8QKdizFG2hjqvaTXbxFIcYbSaD74KpAXv6BSm17DHEQ==}
/ci-info/3.3.1:
resolution: {integrity: sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==}
dev: true
/cipher-base/1.0.4:
......@@ -8636,7 +8677,7 @@ packages:
dev: true
/concat-map/0.0.1:
resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
/concat-stream/1.6.2:
resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==}
......@@ -8840,6 +8881,11 @@ packages:
q: 1.5.1
dev: true
/convert-hrtime/3.0.0:
resolution: {integrity: sha512-7V+KqSvMiHp8yWDuwfww06XleMWVVB9b9tURBx+G7UTADuo5hYPuowKloz4OzOqbPezxgo+fdQ1522WzPG4OeA==}
engines: {node: '>=8'}
dev: true
/convert-source-map/1.7.0:
resolution: {integrity: sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==}
dependencies:
......@@ -10013,6 +10059,21 @@ packages:
safe-buffer: 5.2.0
dev: true
/edge-runtime/1.0.1-beta.10:
resolution: {integrity: sha512-4Afw1iAixoXjb1xgYSC9aeA0BbMFnWYQEuYJ5b3vP332N/Ubu3Em/Pt2YVtNQeYC30dSIUcBWyUIWJKUFy0QQQ==}
hasBin: true
dependencies:
'@edge-runtime/format': 1.0.0
'@edge-runtime/vm': 1.0.1-beta.10
exit-hook: 2.2.1
http-status: 1.5.2
mri: 1.2.0
picocolors: 1.0.0
pretty-bytes: 5.6.0
pretty-ms: 7.0.1
time-span: 4.0.0
dev: true
/ee-first/1.1.1:
resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=}
dev: true
......@@ -10265,7 +10326,7 @@ packages:
transitivePeerDependencies:
- supports-color
/eslint-import-resolver-typescript/2.7.1_hpmu7kn6tcn2vnxpfzvv33bxmy:
/eslint-import-resolver-typescript/2.7.1_3bd94fa9be989baab6ef2e6b5dec3766:
resolution: {integrity: sha512-00UbgGwV8bSgUv34igBDbTOtKhqoRMy9bFjNehT40bXg6585PNIct8HhXZ0SybqB9rWtXj9crcku8ndDn/gIqQ==}
engines: {node: '>=4'}
peerDependencies:
......@@ -10274,7 +10335,7 @@ packages:
dependencies:
debug: 4.3.4
eslint: 7.32.0
eslint-plugin-import: 2.26.0_asoxhzjlkaozogjqriaz4fv5ly
eslint-plugin-import: 2.26.0_049d73e52b501d9719308a019e16bd5e
glob: 7.2.0
is-glob: 4.0.3
resolve: 1.22.0
......@@ -10283,7 +10344,7 @@ packages:
- supports-color
dev: false
/eslint-module-utils/2.7.3_5zeicuv6z6i32arielnnarwece:
/eslint-module-utils/2.7.3_4a9a9cb7453f006c957a627d3fa03939:
resolution: {integrity: sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==}
engines: {node: '>=4'}
peerDependencies:
......@@ -10301,16 +10362,15 @@ packages:
eslint-import-resolver-webpack:
optional: true
dependencies:
'@typescript-eslint/parser': 5.21.0_hrkuebk64jiu2ut2d2sm4oylnu
'@typescript-eslint/parser': 4.29.1_eslint@7.24.0+typescript@4.6.3
debug: 3.2.7
eslint-import-resolver-node: 0.3.6
eslint-import-resolver-typescript: 2.7.1_hpmu7kn6tcn2vnxpfzvv33bxmy
find-up: 2.1.0
transitivePeerDependencies:
- supports-color
dev: false
dev: true
/eslint-module-utils/2.7.3_jknjzn2fh4agzfl2mj6t7ibzhe:
/eslint-module-utils/2.7.3_ee488152becf91bd022822dad046c411:
resolution: {integrity: sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==}
engines: {node: '>=4'}
peerDependencies:
......@@ -10328,15 +10388,16 @@ packages:
eslint-import-resolver-webpack:
optional: true
dependencies:
'@typescript-eslint/parser': 4.29.1_sphjtq24gqflsrz3rov2wazhhy
'@typescript-eslint/parser': 5.21.0_eslint@7.32.0+typescript@4.6.3
debug: 3.2.7
eslint-import-resolver-node: 0.3.6
eslint-import-resolver-typescript: 2.7.1_3bd94fa9be989baab6ef2e6b5dec3766
find-up: 2.1.0
transitivePeerDependencies:
- supports-color
dev: true
dev: false
/eslint-plugin-import/2.22.1_23iivq3ybsthf4qrv3kgatrvhe:
/eslint-plugin-import/2.22.1_d6d08ac3780ca672f211aed4604e3539:
resolution: {integrity: sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==}
engines: {node: '>=4'}
peerDependencies:
......@@ -10346,7 +10407,7 @@ packages:
'@typescript-eslint/parser':
optional: true
dependencies:
'@typescript-eslint/parser': 4.29.1_sphjtq24gqflsrz3rov2wazhhy
'@typescript-eslint/parser': 4.29.1_eslint@7.24.0+typescript@4.6.3
array-includes: 3.1.4
array.prototype.flat: 1.2.5
contains-path: 0.1.0
......@@ -10354,7 +10415,7 @@ packages:
doctrine: 1.5.0
eslint: 7.24.0
eslint-import-resolver-node: 0.3.6
eslint-module-utils: 2.7.3_jknjzn2fh4agzfl2mj6t7ibzhe
eslint-module-utils: 2.7.3_4a9a9cb7453f006c957a627d3fa03939
has: 1.0.3
minimatch: 3.1.2
object.values: 1.1.5
......@@ -10367,7 +10428,7 @@ packages:
- supports-color
dev: true
/eslint-plugin-import/2.26.0_asoxhzjlkaozogjqriaz4fv5ly:
/eslint-plugin-import/2.26.0_049d73e52b501d9719308a019e16bd5e:
resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==}
engines: {node: '>=4'}
peerDependencies:
......@@ -10377,14 +10438,14 @@ packages:
'@typescript-eslint/parser':
optional: true
dependencies:
'@typescript-eslint/parser': 5.21.0_hrkuebk64jiu2ut2d2sm4oylnu
'@typescript-eslint/parser': 5.21.0_eslint@7.32.0+typescript@4.6.3
array-includes: 3.1.4
array.prototype.flat: 1.2.5
debug: 2.6.9
doctrine: 2.1.0
eslint: 7.32.0
eslint-import-resolver-node: 0.3.6
eslint-module-utils: 2.7.3_5zeicuv6z6i32arielnnarwece
eslint-module-utils: 2.7.3_ee488152becf91bd022822dad046c411
has: 1.0.3
is-core-module: 2.9.0
is-glob: 4.0.3
......@@ -10398,7 +10459,7 @@ packages:
- supports-color
dev: false
/eslint-plugin-jest/24.3.5_lqson4bxnnkvr5juyhnlzmz4rq:
/eslint-plugin-jest/24.3.5_5c24e6f0376b5558f534c1dabcb33c8c:
resolution: {integrity: sha512-XG4rtxYDuJykuqhsOqokYIR84/C8pRihRtEpVskYLbIIKGwPNW2ySxdctuVzETZE+MbF/e7wmsnbNVpzM0rDug==}
engines: {node: '>=10'}
peerDependencies:
......@@ -10408,8 +10469,8 @@ packages:
'@typescript-eslint/eslint-plugin':
optional: true
dependencies:
'@typescript-eslint/eslint-plugin': 4.29.1_h7pkbj7dyzxk3ymw6sjfdovo2m
'@typescript-eslint/experimental-utils': 4.29.1_sphjtq24gqflsrz3rov2wazhhy
'@typescript-eslint/eslint-plugin': 4.29.1_3fdea0a7e3c66eade196f49251baaed3
'@typescript-eslint/experimental-utils': 4.29.1_eslint@7.24.0+typescript@4.6.3
eslint: 7.24.0
transitivePeerDependencies:
- supports-color
......@@ -10784,6 +10845,11 @@ packages:
strip-final-newline: 2.0.0
dev: true
/exit-hook/2.2.1:
resolution: {integrity: sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==}
engines: {node: '>=6'}
dev: true
/exit/0.1.2:
resolution: {integrity: sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=}
engines: {node: '>= 0.8.0'}
......@@ -11246,19 +11312,19 @@ packages:
resolution: {integrity: sha512-1vrC1UZIVhaT7owaElQoEseP81xqRt6tHQmxRJRojn0yI3JNXrdWCFsD+26xA1eQQCwodJuMsYJLzQSScgjHuQ==}
engines: {node: ^8.13.0 || >=10.10.0}
dependencies:
'@firebase/analytics': 0.3.5_4tdhdiy4fyxu45m3zxk7uipic4
'@firebase/analytics': 0.3.5_e4c671a31c2e2f4e759bcdd5fa21e817
'@firebase/app': 0.6.4
'@firebase/app-types': 0.6.1
'@firebase/auth': 0.14.6_mgjznm6ljckgbtskimppmdqgem
'@firebase/auth': 0.14.6_619396b3cb489460ce4a431ef60e0623
'@firebase/database': 0.6.3_@firebase+app-types@0.6.1
'@firebase/firestore': 1.14.5_4tdhdiy4fyxu45m3zxk7uipic4
'@firebase/functions': 0.4.44_4tdhdiy4fyxu45m3zxk7uipic4
'@firebase/installations': 0.4.10_4tdhdiy4fyxu45m3zxk7uipic4
'@firebase/messaging': 0.6.16_4tdhdiy4fyxu45m3zxk7uipic4
'@firebase/performance': 0.3.4_4tdhdiy4fyxu45m3zxk7uipic4
'@firebase/firestore': 1.14.5_e4c671a31c2e2f4e759bcdd5fa21e817
'@firebase/functions': 0.4.44_e4c671a31c2e2f4e759bcdd5fa21e817
'@firebase/installations': 0.4.10_e4c671a31c2e2f4e759bcdd5fa21e817
'@firebase/messaging': 0.6.16_e4c671a31c2e2f4e759bcdd5fa21e817
'@firebase/performance': 0.3.4_e4c671a31c2e2f4e759bcdd5fa21e817
'@firebase/polyfill': 0.3.36
'@firebase/remote-config': 0.1.21_4tdhdiy4fyxu45m3zxk7uipic4
'@firebase/storage': 0.3.34_4tdhdiy4fyxu45m3zxk7uipic4
'@firebase/remote-config': 0.1.21_e4c671a31c2e2f4e759bcdd5fa21e817
'@firebase/storage': 0.3.34_e4c671a31c2e2f4e759bcdd5fa21e817
'@firebase/util': 0.2.47
dev: true
......@@ -11366,14 +11432,6 @@ packages:
engines: {node: '>=0.4.x'}
dev: true
/formdata-node/4.3.0:
resolution: {integrity: sha512-TwqhWUZd2jB5l0kUhhcy1XYNsXq46NH6k60zmiu7xsxMztul+cCMuPSAQrSDV62zznhBKJdA9O+zeWj5i5Pbfg==}
engines: {node: '>= 12.20'}
dependencies:
node-domexception: 1.0.0
web-streams-polyfill: 4.0.0-beta.1
dev: true
/formidable/1.2.1:
resolution: {integrity: sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==}
deprecated: 'Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau'
......@@ -12472,6 +12530,11 @@ packages:
sshpk: 1.16.1
dev: true
/http-status/1.5.2:
resolution: {integrity: sha512-HzxX+/hV/8US1Gq4V6R6PgUmJ5Pt/DGATs4QhdEOpG8LrdS9/3UG2nnOvkqUpRks04yjVtV5p/NODjO+wvf6vg==}
engines: {node: '>= 0.4.0'}
dev: true
/https-browserify/1.0.0:
resolution: {integrity: sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=}
dev: true
......@@ -12895,7 +12958,7 @@ packages:
resolution: {integrity: sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ==}
hasBin: true
dependencies:
ci-info: 3.1.1
ci-info: 3.3.1
dev: true
/is-color-stop/1.1.0:
......@@ -13712,6 +13775,21 @@ packages:
stack-utils: 2.0.3
dev: true
/jest-message-util/28.1.0:
resolution: {integrity: sha512-RpA8mpaJ/B2HphDMiDlrAZdDytkmwFqgjDZovM21F35lHGeUeCvYmm6W+sbQ0ydaLpg5bFAUuWG1cjqOl8vqrw==}
engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0}
dependencies:
'@babel/code-frame': 7.16.7
'@jest/types': 28.1.0
'@types/stack-utils': 2.0.0
chalk: 4.1.2
graceful-fs: 4.2.9
micromatch: 4.0.4
pretty-format: 28.1.0
slash: 3.0.0
stack-utils: 2.0.3
dev: true
/jest-mock/27.0.6:
resolution: {integrity: sha512-lzBETUoK8cSxts2NYXSBWT+EJNzmUVtVVwS1sU9GwE1DLCfGsngg+ZVSIe0yd0ZSm+y791esiuo+WSwpXJQ5Bw==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
......@@ -13720,6 +13798,14 @@ packages:
'@types/node': 17.0.21
dev: true
/jest-mock/28.1.0:
resolution: {integrity: sha512-H7BrhggNn77WhdL7O1apG0Q/iwl0Bdd5E1ydhCJzL3oBLh/UYxAwR3EJLsBZ9XA3ZU4PA3UNw4tQjduBTCTmLw==}
engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0}
dependencies:
'@jest/types': 28.1.0
'@types/node': 17.0.21
dev: true
/jest-pnp-resolver/1.2.2_jest-resolve@27.0.6:
resolution: {integrity: sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==}
engines: {node: '>=6'}
......@@ -13882,6 +13968,18 @@ packages:
picomatch: 2.2.3
dev: true
/jest-util/28.1.0:
resolution: {integrity: sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==}
engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0}
dependencies:
'@jest/types': 28.1.0
'@types/node': 17.0.21
chalk: 4.1.2
ci-info: 3.3.1
graceful-fs: 4.2.9
picomatch: 2.2.3
dev: true
/jest-validate/27.0.6:
resolution: {integrity: sha512-yhZZOaMH3Zg6DC83n60pLmdU1DQE46DW+KLozPiPbSbPhlXXaiUTDlhHQhHFpaqIFRrInko1FHXjTRpjWRuWfA==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
......@@ -14222,7 +14320,7 @@ packages:
is-buffer: 1.1.6
/kind-of/4.0.0:
resolution: {integrity: sha1-IIE989cSkosgc3hpGkUGb65y3Vc=}
resolution: {integrity: sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==}
engines: {node: '>=0.10.0'}
requiresBuild: true
dependencies:
......@@ -14257,7 +14355,7 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
/ky-universal/0.6.0_nhqkqulgur6nsykqmo3ck5c3cu:
/ky-universal/0.6.0_ky@0.19.1:
resolution: {integrity: sha512-GvKOzAO5Ec4LiI2jCYRib/7FJwirI3xUFcxUQi9SY3kPZflLY8N289UlsYekwg7gtiLPeU1abYnTFA9N6IO9ig==}
engines: {node: '>=10'}
peerDependencies:
......@@ -14270,7 +14368,6 @@ packages:
abort-controller: 3.0.0
ky: 0.19.1
node-fetch: 2.6.7
web-streams-polyfill: 2.1.1
transitivePeerDependencies:
- encoding
dev: true
......@@ -14737,7 +14834,7 @@ packages:
dev: true
/lodash.truncate/4.4.2:
resolution: {integrity: sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=}
resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==}
/lodash.uniq/4.5.0:
resolution: {integrity: sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=}
......@@ -15225,7 +15322,7 @@ packages:
'@babel/preset-flow': 7.16.7_@babel+core@7.17.5
'@babel/preset-react': 7.14.5_@babel+core@7.17.5
'@rollup/plugin-alias': 3.1.1_rollup@2.35.1
'@rollup/plugin-babel': 5.2.2_fyfyge2tip5t6i2ifo2ygxhw54
'@rollup/plugin-babel': 5.2.2_@babel+core@7.17.5+rollup@2.35.1
'@rollup/plugin-commonjs': 17.0.0_rollup@2.35.1
'@rollup/plugin-json': 4.1.0_rollup@2.35.1
'@rollup/plugin-node-resolve': 11.0.1_rollup@2.35.1
......@@ -15248,7 +15345,7 @@ packages:
rollup-plugin-bundle-size: 1.0.3
rollup-plugin-postcss: 4.0.0_postcss@8.4.5
rollup-plugin-terser: 7.0.2_rollup@2.35.1
rollup-plugin-typescript2: 0.29.0_qdoq77m3lkibs3ktoonmxnobxy
rollup-plugin-typescript2: 0.29.0_rollup@2.35.1+typescript@4.6.3
sade: 1.7.4
tiny-glob: 0.2.8
tslib: 2.3.1
......@@ -15433,7 +15530,7 @@ packages:
webpack: ^5.0.0
dependencies:
schema-utils: 3.1.1
webpack: 5.72.0
webpack: 5.72.0_@swc+core@1.2.148
dev: true
/minimalistic-assert/1.0.1:
......@@ -15625,6 +15722,11 @@ packages:
engines: {node: '>=4'}
dev: true
/mri/1.2.0:
resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==}
engines: {node: '>=4'}
dev: true
/ms/2.0.0:
resolution: {integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=}
......@@ -15793,11 +15895,6 @@ packages:
minimatch: 3.1.2
dev: false
/node-domexception/1.0.0:
resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
engines: {node: '>=10.5.0'}
dev: true
/node-emoji/1.10.0:
resolution: {integrity: sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw==}
dependencies:
......@@ -18021,6 +18118,11 @@ packages:
engines: {node: '>=6'}
dev: true
/pretty-bytes/5.6.0:
resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==}
engines: {node: '>=6'}
dev: true
/pretty-format/27.5.1:
resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
......@@ -18030,6 +18132,16 @@ packages:
react-is: 17.0.2
dev: true
/pretty-format/28.1.0:
resolution: {integrity: sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==}
engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0}
dependencies:
'@jest/schemas': 28.0.2
ansi-regex: 5.0.1
ansi-styles: 5.1.0
react-is: 18.1.0
dev: true
/pretty-hrtime/1.0.3:
resolution: {integrity: sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=}
engines: {node: '>= 0.8'}
......@@ -18042,6 +18154,13 @@ packages:
parse-ms: 2.1.0
dev: true
/pretty-ms/7.0.1:
resolution: {integrity: sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==}
engines: {node: '>=10'}
dependencies:
parse-ms: 2.1.0
dev: true
/private/0.1.8:
resolution: {integrity: sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==}
engines: {node: '>= 0.6'}
......@@ -18289,17 +18408,6 @@ packages:
yargs: 14.2.2
dev: true
/pvtsutils/1.2.2:
resolution: {integrity: sha512-OALo5ZEdqiI127i64+CXwkCOyFHUA+tCQgaUO/MvRDFXWPr53f2sx28ECNztUEzuyu5xvuuD1EB/szg9mwJoGA==}
dependencies:
tslib: 2.3.1
dev: true
/pvutils/1.1.3:
resolution: {integrity: sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==}
engines: {node: '>=6.0.0'}
dev: true
/q/1.5.1:
resolution: {integrity: sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=}
engines: {node: '>=0.6.0', teleport: '>=0.2.0'}
......@@ -18448,6 +18556,10 @@ packages:
resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==}
dev: true
/react-is/18.1.0:
resolution: {integrity: sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==}
dev: true
/react-lifecycles-compat/3.0.4:
resolution: {integrity: sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==}
dev: true
......@@ -18457,7 +18569,7 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
/react-server-dom-webpack/0.0.0-experimental-577f2de46-20220320_webpack@5.72.0:
/react-server-dom-webpack/0.0.0-experimental-577f2de46-20220320_react@18.1.0+webpack@5.72.0:
resolution: {integrity: sha512-n8pAJOqCaJHG/Xz0/SqiX4lOnXx7hnZm2iY/vDGmtzQn3bPqbgUljQHgPDIfDeUt8KINhKPFD9j/Dbn6t0yTuw==}
engines: {node: '>=0.10.0'}
peerDependencies:
......@@ -18467,10 +18579,11 @@ packages:
acorn: 6.4.2
loose-envify: 1.4.0
neo-async: 2.6.2
webpack: 5.72.0
react: 18.1.0
webpack: 5.72.0_@swc+core@1.2.148
dev: true
/react-ssr-prepass/1.0.8_hlgeuu36mywb3l5da2rxhzh74u:
/react-ssr-prepass/1.0.8_react-is@16.13.1+react@18.1.0:
resolution: {integrity: sha512-O0gfRA1SaK+9ITKxqfnXsej2jF+OHGP/+GxD4unROQaM/0/UczGF9fuF+wTboxaQoKdIf4FvS3h/OigWh704VA==}
peerDependencies:
react: ^16.8.0
......@@ -18481,7 +18594,7 @@ packages:
react-is: 16.13.1
dev: true
/react-virtualized/9.22.3_ef5jwxihqo6n7gxfmzogljlgcm:
/react-virtualized/9.22.3_react-dom@18.1.0+react@18.1.0:
resolution: {integrity: sha512-MKovKMxWTcwPSxE1kK1HcheQTWfuCxAuBoSTf2gwyMM21NdX/PXUhnoP8Uc5dRKd+nKm8v41R36OellhdCpkrw==}
peerDependencies:
react: ^15.3.0 || ^16.0.0-alpha
......@@ -18510,7 +18623,6 @@ packages:
engines: {node: '>=0.10.0'}
dependencies:
loose-envify: 1.4.0
dev: true
/read-cmd-shim/2.0.0:
resolution: {integrity: sha512-HJpV9bQpkl6KwjxlJcBoqu9Ba0PQg8TqSNIOrulGt54a0uup0HtevreFHzYzkm0lpnleRdNBzXznKrgxglEHQw==}
......@@ -19316,7 +19428,7 @@ packages:
terser: 5.10.0
dev: true
/rollup-plugin-typescript2/0.29.0_qdoq77m3lkibs3ktoonmxnobxy:
/rollup-plugin-typescript2/0.29.0_rollup@2.35.1+typescript@4.6.3:
resolution: {integrity: sha512-YytahBSZCIjn/elFugEGQR5qTsVhxhUwGZIsA9TmrSsC88qroGo65O5HZP/TTArH2dm0vUmYWhKchhwi2wL9bw==}
peerDependencies:
rollup: '>=1.26.3'
......@@ -19414,7 +19526,7 @@ packages:
yargs: 13.3.2
dev: true
/sass-loader/12.4.0_webpack@5.72.0:
/sass-loader/12.4.0_node-sass@6.0.1+webpack@5.72.0:
resolution: {integrity: sha512-7xN+8khDIzym1oL9XyS6zP6Ges+Bo2B2xbPrjdMHEYyV3AQYhd/wXeru++3ODHF0zMjYmVadblSKrPrjEkL8mg==}
engines: {node: '>= 12.13.0'}
peerDependencies:
......@@ -19432,7 +19544,8 @@ packages:
dependencies:
klona: 2.0.4
neo-async: 2.6.2
webpack: 5.72.0
node-sass: 6.0.1
webpack: 5.72.0_@swc+core@1.2.148
dev: true
/sax/1.2.4:
......@@ -20356,7 +20469,7 @@ packages:
resolution: {integrity: sha512-IezA2qp+vcdlhJaVm5SOdPPTUu0FCEqfNSli2vRuSIBbu5Nq5UvygTk/VzeCqfLz2Atj3dVII5QBKGZRZ0edzw==}
dev: true
/styled-components/5.3.3_mg42qvqxyojuro644naflvwmve:
/styled-components/5.3.3_61b9a85617c39348bbdce34055d6cca9:
resolution: {integrity: sha512-++4iHwBM7ZN+x6DtPPWkCI4vdtwumQ+inA/DdAsqYd4SVgUKJie5vXyzotA00ttcFdQkCng7zc6grwlfIfw+lw==}
engines: {node: '>=10'}
peerDependencies:
......@@ -20386,7 +20499,7 @@ packages:
postcss-load-plugins: 2.3.0
dev: true
/styled-jsx/5.0.2_@babel+core@7.15.0:
/styled-jsx/5.0.2_@babel+core@7.15.0+react@18.1.0:
resolution: {integrity: sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==}
engines: {node: '>= 12.0.0'}
peerDependencies:
......@@ -20400,6 +20513,7 @@ packages:
optional: true
dependencies:
'@babel/core': 7.15.0
react: 18.1.0
dev: false
/stylehacks/4.0.3:
......@@ -20674,12 +20788,12 @@ packages:
serialize-javascript: 3.1.0
source-map: 0.6.1
terser: 4.8.0
webpack: 5.72.0
webpack: 5.72.0_@swc+core@1.2.148
webpack-sources: 1.4.3
worker-farm: 1.7.0
dev: true
/terser-webpack-plugin/5.2.4_a3rzcru6raakdgoskst7nmekiu:
/terser-webpack-plugin/5.2.4_@swc+core@1.2.148+webpack@5.72.0:
resolution: {integrity: sha512-E2CkNMN+1cho04YpdANyRrn8CyN4yMy+WdFKZIySFZrGXZxJwJP6PMNGGc/Mcr6qygQHUUqRxnAPmi0M9f00XA==}
engines: {node: '>= 10.13.0'}
peerDependencies:
......@@ -20705,31 +20819,6 @@ packages:
webpack: 5.72.0_@swc+core@1.2.148
dev: true
/terser-webpack-plugin/5.2.4_webpack@5.72.0:
resolution: {integrity: sha512-E2CkNMN+1cho04YpdANyRrn8CyN4yMy+WdFKZIySFZrGXZxJwJP6PMNGGc/Mcr6qygQHUUqRxnAPmi0M9f00XA==}
engines: {node: '>= 10.13.0'}
peerDependencies:
'@swc/core': '*'
esbuild: '*'
uglify-js: '*'
webpack: ^5.1.0
peerDependenciesMeta:
'@swc/core':
optional: true
esbuild:
optional: true
uglify-js:
optional: true
dependencies:
jest-worker: 27.0.6
p-limit: 3.1.0
schema-utils: 3.1.1
serialize-javascript: 6.0.0
source-map: 0.6.1
terser: 5.10.0
webpack: 5.72.0
dev: true
/terser/4.8.0:
resolution: {integrity: sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==}
engines: {node: '>=6.0.0'}
......@@ -20817,6 +20906,13 @@ packages:
readable-stream: 3.6.0
dev: true
/time-span/4.0.0:
resolution: {integrity: sha512-MyqZCTGLDZ77u4k+jqg4UlrzPTPZ49NDlaekU6uuFaJLzPIN1woaRXCbGeqOfxwc3Y37ZROGAJ614Rdv7Olt+g==}
engines: {node: '>=10'}
dependencies:
convert-hrtime: 3.0.0
dev: true
/timed-out/4.0.1:
resolution: {integrity: sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=}
engines: {node: '>=0.10.0'}
......@@ -21030,7 +21126,7 @@ packages:
minimist: 1.2.6
strip-bom: 3.0.0
/tsec/0.2.1_go7yo5n4vesd3xwliytss2haoa:
/tsec/0.2.1_33bf8775bca9243ddecb46272968e070:
resolution: {integrity: sha512-RP9vhbRbRI9VH4CfOlQvo5W9HdfiPKq0gdiUOWI5oKmLaZKNFN8CsPwBfT5ySmhnKNwmmAS/BtY3WoTfABwwig==}
hasBin: true
peerDependencies:
......@@ -21572,7 +21668,7 @@ packages:
unist-util-visit-parents: 3.1.1
dev: true
/unistore/3.4.1:
/unistore/3.4.1_react@18.1.0:
resolution: {integrity: sha512-p2Ej8qqrqcD10Ah0ZUKUU/mhRB8pM4q6gzjxq9kZpgxa8dks7oHT8jDP4CqLhoRof3RXOZLKB9EBV1DTzHiJRw==}
peerDependencies:
preact: '*'
......@@ -21582,6 +21678,8 @@ packages:
optional: true
react:
optional: true
dependencies:
react: 18.1.0
dev: true
/universal-user-agent/6.0.0:
......@@ -21727,10 +21825,12 @@ packages:
querystring: 0.2.0
dev: true
/use-sync-external-store/1.1.0:
/use-sync-external-store/1.1.0_react@18.1.0:
resolution: {integrity: sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==}
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0
dependencies:
react: 18.1.0
dev: false
/use/3.1.1:
......@@ -21991,36 +22091,10 @@ packages:
resolution: {integrity: sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==}
dev: true
/web-streams-polyfill/2.1.1:
resolution: {integrity: sha512-dlNpL2aab3g8CKfGz6rl8FNmGaRWLLn2g/DtSc9IjB30mEdE6XxzPfPSig5BwGSzI+oLxHyETrQGKjrVVhbLCg==}
engines: {node: '>= 8'}
dev: true
/web-streams-polyfill/3.0.3:
resolution: {integrity: sha512-d2H/t0eqRNM4w2WvmTdoeIvzAUSpK7JmATB8Nr2lb7nQ9BTIJVjbQ/TRFVEh2gUH1HwclPdoPtfMoFfetXaZnA==}
engines: {node: '>= 8'}
dev: true
/web-streams-polyfill/4.0.0-beta.1:
resolution: {integrity: sha512-3ux37gEX670UUphBF9AMCq8XM6iQ8Ac6A+DSRRjDoRBm1ufCkaCDdNVbaqq60PsEkdNlLKrGtv/YBP4EJXqNtQ==}
engines: {node: '>= 12'}
dev: true
/web-vitals/2.1.0:
resolution: {integrity: sha512-npEyJP8jHf3J71t1tRTEtz9FeKp8H2udWJUUq5ykfPhhstr//TUxiYhIEzLNwk4zv2ybAilMn7v7N6Mxmuitmg==}
dev: true
/webcrypto-core/1.6.0:
resolution: {integrity: sha512-jBBhCjNrdqp2iMtbxiHPtBSWvBt/gxmtV6AfaQ/tWopxKX79WBUoydamDFObPsUIR7F3vLRJwCKCBLkCEpGe3A==}
dependencies:
'@peculiar/asn1-schema': 2.0.44
'@peculiar/json-schema': 1.1.12
'@typescript/lib-dom': /@types/web/0.0.67
asn1js: 2.2.0
pvtsutils: 1.2.2
tslib: 2.3.1
dev: true
/webidl-conversions/3.0.1:
resolution: {integrity: sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=}
dev: true
......@@ -22109,46 +22183,6 @@ packages:
- supports-color
dev: true
/webpack/5.72.0:
resolution: {integrity: sha512-qmSmbspI0Qo5ld49htys8GY9XhS9CGqFoHTsOVAnjBdg0Zn79y135R+k4IR4rKK6+eKaabMhJwiVB7xw0SJu5w==}
engines: {node: '>=10.13.0'}
hasBin: true
peerDependencies:
webpack-cli: '*'
peerDependenciesMeta:
webpack-cli:
optional: true
dependencies:
'@types/eslint-scope': 3.7.3
'@types/estree': 0.0.51
'@webassemblyjs/ast': 1.11.1
'@webassemblyjs/wasm-edit': 1.11.1
'@webassemblyjs/wasm-parser': 1.11.1
acorn: 8.6.0
acorn-import-assertions: 1.7.6_acorn@8.6.0
browserslist: 4.20.2
chrome-trace-event: 1.0.2
enhanced-resolve: 5.9.3
es-module-lexer: 0.9.0
eslint-scope: 5.1.1
events: 3.3.0
glob-to-regexp: 0.4.1
graceful-fs: 4.2.9
json-parse-better-errors: 1.0.2
loader-runner: 4.2.0
mime-types: 2.1.30
neo-async: 2.6.2
schema-utils: 3.1.1
tapable: 2.2.0
terser-webpack-plugin: 5.2.4_webpack@5.72.0
watchpack: 2.3.1
webpack-sources: 3.2.3
transitivePeerDependencies:
- '@swc/core'
- esbuild
- uglify-js
dev: true
/webpack/5.72.0_@swc+core@1.2.148:
resolution: {integrity: sha512-qmSmbspI0Qo5ld49htys8GY9XhS9CGqFoHTsOVAnjBdg0Zn79y135R+k4IR4rKK6+eKaabMhJwiVB7xw0SJu5w==}
engines: {node: '>=10.13.0'}
......@@ -22180,7 +22214,7 @@ packages:
neo-async: 2.6.2
schema-utils: 3.1.1
tapable: 2.2.0
terser-webpack-plugin: 5.2.4_a3rzcru6raakdgoskst7nmekiu
terser-webpack-plugin: 5.2.4_@swc+core@1.2.148+webpack@5.72.0
watchpack: 2.3.1
webpack-sources: 3.2.3
transitivePeerDependencies:
......
// Use CJS format for represent next/dist/compiled/node-polyfill-web-streams.js
const Primitives =
require('next/dist/compiled/@edge-runtime/primitives').default
const {
WritableStreamDefaultWriter,
ReadableStream,
TransformStream,
} = require('next/dist/compiled/web-streams-polyfill')
const OriginWritableStreamWrite = WritableStreamDefaultWriter.prototype.write
const OriginWritableStreamWrite =
Primitives.WritableStreamDefaultWriter.prototype.write
// Override writable stream write method to validate chunk type.
// Currently CF workers only allow to write the encoded chunk in Uint8Array format.
WritableStreamDefaultWriter.prototype.write = function (chunk) {
Primitives.WritableStreamDefaultWriter.prototype.write = function (chunk) {
if (!(chunk instanceof Uint8Array)) {
throw new Error('Writing non-Uint8Array chunks in a stream is not allowed.')
}
return OriginWritableStreamWrite.call(this, chunk)
}
global.ReadableStream = ReadableStream
global.TransformStream = TransformStream
global.ReadableStream = Primitives.ReadableStream
global.TransformStream = Primitives.TransformStream
......@@ -189,18 +189,18 @@ function tests(context, locale = '') {
})
it(`should accept a URL instance for fetch`, async () => {
const res = await fetchViaHTTP(context.appPort, '/fetch-url')
const response = readMiddlewareJSON(res)
expect(response).toHaveProperty('error.name')
expect(response.error.name).not.toBe('TypeError')
const response = await fetchViaHTTP(context.appPort, '/fetch-url')
const { error } = readMiddlewareJSON(response)
expect(error).toBeTruthy()
expect(error.message).not.toContain("Failed to construct 'URL'")
})
it(`should allow to abort a fetch request`, async () => {
const res = await fetchViaHTTP(context.appPort, '/abort-controller')
const response = readMiddlewareJSON(res)
expect('error' in response).toBe(true)
expect(response.error.name).toBe('AbortError')
expect(response.error.message).toBe('The user aborted a request.')
const response = await fetchViaHTTP(context.appPort, '/abort-controller')
const payload = readMiddlewareJSON(response)
expect('error' in payload).toBe(true)
expect(payload.error.name).toBe('AbortError')
expect(payload.error.message).toBe('The operation was aborted')
})
it(`should validate & parse request url from any route`, async () => {
......@@ -250,16 +250,19 @@ function tests(context, locale = '') {
})
it('should throw when using Request with a relative URL', async () => {
const res = await fetchViaHTTP(context.appPort, `/url/relative-request`)
expect(readMiddlewareError(res)).toContain('Invalid URL')
const response = await fetchViaHTTP(
context.appPort,
`/url/relative-request`
)
expect(readMiddlewareError(response)).toContain(urlsError)
})
it('should throw when using NextRequest with a relative URL', async () => {
const res = await fetchViaHTTP(
const response = await fetchViaHTTP(
context.appPort,
`/url/relative-next-request`
)
expect(readMiddlewareError(res)).toContain('Invalid URL')
expect(readMiddlewareError(response)).toContain(urlsError)
})
it('should warn when using Response.redirect with a relative URL', async () => {
......
......@@ -36,9 +36,6 @@ export default function middleware({ nextUrl: { pathname } }) {
if (pathname === '/DomException') {
new DomException()
}
if (pathname === '/Event') {
new Event()
}
if (pathname === '/EventTarget') {
new EventTarget()
}
......
......@@ -27,7 +27,6 @@ const unsupportedClasses = [
'CountQueuingStrategy',
'DecompressionStream',
'DomException',
'Event',
'EventTarget',
'MessageChannel',
'MessageEvent',
......
......@@ -7,7 +7,7 @@ export const middleware: NextMiddleware = function (request) {
data: 'hello from middleware',
'req-url-basepath': request.nextUrl.basePath,
'req-url-pathname': request.nextUrl.pathname,
'req-url-params': JSON.stringify(request.page.params),
'req-url-params': JSON.stringify(request.page.params) || '',
'req-url-page': request.page.name || '',
'req-url-query': request.nextUrl.searchParams.get('foo') || '',
'req-url-locale': request.nextUrl.locale,
......
/* eslint-env jest */
import { Blob, File, FormData } from 'next/dist/compiled/formdata-node'
import { Body } from 'next/dist/server/web/spec-compliant/body'
import { Crypto } from 'next/dist/server/web/sandbox/polyfills'
import { Headers } from 'next/dist/server/web/spec-compliant/headers'
import { streamToIterator } from 'next/dist/server/web/utils'
import * as streams from 'web-streams-polyfill/ponyfill'
class Implementation extends Body {
headers: Headers
constructor(init: BodyInit) {
super(init)
this.headers = new Headers()
}
}
beforeAll(() => {
global['Blob'] = Blob
global['crypto'] = new Crypto()
global['File'] = File
global['FormData'] = FormData
global['Headers'] = Headers
global['ReadableStream'] = streams.ReadableStream
global['TransformStream'] = streams.TransformStream
})
afterAll(() => {
delete global['Blob']
delete global['crypto']
delete global['File']
delete global['Headers']
delete global['FormData']
delete global['ReadableStream']
delete global['TransformStream']
})
it('flags the body as used after reading it', async () => {
const { readable, writable } = new TransformStream()
const encoder = new TextEncoder()
const writer = writable.getWriter()
writer.write(encoder.encode(''))
writer.close()
const body = new Implementation(readable)
expect(body.bodyUsed).toEqual(false)
const reader = body.body.getReader()
expect(body.bodyUsed).toEqual(false)
while (true) {
const { done } = await reader.read()
if (done) break
}
reader.releaseLock()
expect(body.bodyUsed).toEqual(true)
})
it('throws when the body was directly consumed', async () => {
global['crypto'].getRandomValues = (array: number[]) => array
const object = { hello: 'world' }
const blob = new Blob([JSON.stringify(object, null, 2)], {
type: 'application/json',
})
const formData = new FormData()
formData.append('name', 'John')
formData.append('lastname', 'Doe')
formData.append('metadata', blob)
const body = new Implementation(formData)
// Read the body through the stream
for await (const item of streamToIterator(body.body)) {
expect(item).toBeTruthy()
}
// It allows to access again the already read stream
const reader = body.body.getReader()
const { done } = await reader.read()
expect(done).toBeTruthy()
const error = await body.text().catch((err) => err)
expect(error).toBeInstanceOf(TypeError)
expect(error.message).toEqual(
'Body has already been used. It can only be used once. Use tee() first if you need to read it twice.'
)
})
it('throws when the body was indirectly consumed', async () => {
global['crypto'].getRandomValues = (array: number[]) => array
const object = { hello: 'world' }
const blob = new Blob([JSON.stringify(object, null, 2)], {
type: 'application/json',
})
const formData = new FormData()
formData.append('name', 'John')
formData.append('lastname', 'Doe')
formData.append('metadata', blob)
const body = new Implementation(formData)
const text = await body.text()
expect(text).toBeTruthy()
const error = await body.text().catch((err) => err)
expect(error).toBeInstanceOf(TypeError)
expect(error.message).toEqual(
'Body has already been used. It can only be used once. Use tee() first if you need to read it twice.'
)
})
it('allows to read a FormData body as text', async () => {
global['crypto'].getRandomValues = (array: number[]) => array
const object = { hello: 'world' }
const blob = new Blob([JSON.stringify(object, null, 2)], {
type: 'application/json',
})
const formData = new FormData()
formData.append('name', 'John')
formData.append('lastname', 'Doe')
formData.append('metadata', blob)
const body = new Implementation(formData)
const text = await body.text()
expect(text).toMatchInlineSnapshot(`
"--0000000000000000000000000000000000000000000000000000000000000000
Content-Disposition: form-data; name=\\"name\\"
John
--0000000000000000000000000000000000000000000000000000000000000000
Content-Disposition: form-data; name=\\"lastname\\"
Doe
--0000000000000000000000000000000000000000000000000000000000000000
Content-Disposition: form-data; name=\\"metadata\\"; filename=\\"blob\\"
Content-Type: application/json
{
\\"hello\\": \\"world\\"
}
--0000000000000000000000000000000000000000000000000000000000000000--
"
`)
})
it('allows to read a null body as ArrayBuffer', async () => {
const body = new Implementation(null)
const value = await body.arrayBuffer()
expect(new Uint8Array(value)).toHaveLength(0)
})
it('allows to read a text body as ArrayBuffer', async () => {
const body = new Implementation('Hello world')
const enc = new TextEncoder()
const dec = new TextDecoder()
const value = await body.arrayBuffer()
const decoded = dec.decode(value)
expect(decoded).toEqual('Hello world')
expect(value).toEqual(enc.encode('Hello world').buffer)
})
it('allows to read a chunked body as ArrayBuffer', async () => {
const { readable, writable } = new TransformStream()
const encoder = new TextEncoder()
const writer = writable.getWriter()
writer.write(encoder.encode('Hello '))
writer.write(encoder.encode('world!'))
writer.close()
const body = new Implementation(readable)
const value = await body.arrayBuffer()
const decoder = new TextDecoder()
const decoded = decoder.decode(value)
expect(decoded).toEqual('Hello world!')
expect(value).toEqual(encoder.encode('Hello world!').buffer)
})
it('allows to read a URLSearchParams body as FormData', async () => {
const params = new URLSearchParams('q=URLUtils.searchParams&topic=api')
const body = new Implementation(params)
const formData = await body.formData()
expect(formData.get('topic')).toEqual('api')
})
it('allows to read a Blob body as Blob', async () => {
const object = { hello: 'world' }
const str = JSON.stringify(object, null, 2)
const body = new Implementation(new Blob([str]))
const blob = await body.blob()
const txt = await blob.text()
expect(txt).toEqual(str)
})
it('allows to read a text body as JSON', async () => {
const body = new Implementation(JSON.stringify({ message: 'hi', value: 10 }))
const value = await body.json()
expect(value).toEqual({ message: 'hi', value: 10 })
})
it('throws when reading a text body as JSON but it is invalid', async () => {
const body = new Implementation('{ hi: "there", ')
const error = await body.json().catch((err) => err)
expect(error).toBeInstanceOf(TypeError)
expect(error.message).toEqual(
'invalid json body reason: Unexpected token h in JSON at position 2'
)
})
/* eslint-env jest */
/**
* @jest-environment @edge-runtime/jest-environment
*/
import {
Cookies,
CookieSerializeOptions,
} from 'next/dist/server/web/spec-extension/cookies'
import { Blob, File, FormData } from 'next/dist/compiled/formdata-node'
import { Headers } from 'next/dist/server/web/spec-compliant/headers'
import { Crypto } from 'next/dist/server/web/sandbox/polyfills'
import * as streams from 'web-streams-polyfill/ponyfill'
beforeAll(() => {
global['Blob'] = Blob
global['crypto'] = new Crypto()
global['File'] = File
global['FormData'] = FormData
global['Headers'] = Headers
global['ReadableStream'] = streams.ReadableStream
global['TransformStream'] = streams.TransformStream
})
afterAll(() => {
delete global['Blob']
delete global['crypto']
delete global['File']
delete global['Headers']
delete global['FormData']
delete global['ReadableStream']
delete global['TransformStream']
})
it('create a empty cookies bag', async () => {
const cookies = new Cookies()
expect(Object.entries(cookies)).toStrictEqual([])
expect(Object.entries(cookies)).toEqual([])
})
it('create a cookies bag from string', async () => {
const cookies = new Cookies('foo=bar; equation=E%3Dmc%5E2')
expect(Array.from(cookies.entries())).toStrictEqual([
expect(Array.from(cookies.entries())).toEqual([
['foo', 'foo=bar; Path=/'],
['equation', 'equation=E%3Dmc%5E2; Path=/'],
])
......@@ -45,9 +23,7 @@ it('create a cookies bag from string', async () => {
it('.set', async () => {
const cookies = new Cookies()
cookies.set('foo', 'bar')
expect(Array.from(cookies.entries())).toStrictEqual([
['foo', 'foo=bar; Path=/'],
])
expect(Array.from(cookies.entries())).toEqual([['foo', 'foo=bar; Path=/']])
})
it('.set with options', async () => {
......@@ -63,7 +39,7 @@ it('.set with options', async () => {
cookies.set('foo', 'bar', options)
expect(options).toStrictEqual({
expect(options).toEqual({
path: '/',
maxAge: 60 * 60 * 24 * 7,
httpOnly: true,
......@@ -76,7 +52,7 @@ it('.set with options', async () => {
expect(key).toBe('foo')
expect(values).toStrictEqual([
expect(values).toEqual([
'foo=bar',
'Max-Age=604800',
'Domain=example.com',
......@@ -91,7 +67,7 @@ it('.delete', async () => {
const cookies = new Cookies()
cookies.set('foo', 'bar')
cookies.delete('foo')
expect(Array.from(cookies.entries())).toStrictEqual([])
expect(Array.from(cookies.entries())).toEqual([])
})
it('.has', async () => {
......
/* eslint-env jest */
import { Blob, File, FormData } from 'next/dist/compiled/formdata-node'
import { Crypto } from 'next/dist/server/web/sandbox/polyfills'
import { Response } from 'next/dist/server/web/spec-compliant/response'
import { Headers } from 'next/dist/server/web/spec-compliant/headers'
import * as streams from 'web-streams-polyfill/ponyfill'
beforeAll(() => {
global['Blob'] = Blob
global['crypto'] = new Crypto()
global['File'] = File
global['FormData'] = FormData
global['Headers'] = Headers
global['ReadableStream'] = streams.ReadableStream
global['TransformStream'] = streams.TransformStream
global['Response'] = Response
})
afterAll(() => {
delete global['Blob']
delete global['crypto']
delete global['File']
delete global['Headers']
delete global['FormData']
delete global['ReadableStream']
delete global['TransformStream']
})
/**
* @jest-environment @edge-runtime/jest-environment
*/
it('reflect .set into `set-cookie`', async () => {
const { NextResponse } = await import(
......
/**
* @jest-environment @edge-runtime/jest-environment
*/
import { NextResponse } from 'next/dist/server/web/spec-extension/response'
const toJSON = async (response) => ({
body: await response.json(),
contentType: response.headers.get('content-type'),
status: response.status,
})
it('automatically parses and formats JSON', async () => {
expect(await toJSON(NextResponse.json({ message: 'hello!' }))).toMatchObject({
contentType: 'application/json',
body: { message: 'hello!' },
})
expect(
await toJSON(NextResponse.json({ status: 'success' }, { status: 201 }))
).toMatchObject({
contentType: 'application/json',
body: { status: 'success' },
status: 201,
})
expect(
await toJSON(
NextResponse.json({ error: { code: 'bad_request' } }, { status: 400 })
)
).toMatchObject({
contentType: 'application/json',
body: { error: { code: 'bad_request' } },
status: 400,
})
expect(await toJSON(NextResponse.json(null))).toMatchObject({
contentType: 'application/json',
body: null,
})
expect(await toJSON(NextResponse.json(''))).toMatchObject({
contentType: 'application/json',
body: '',
})
})
/* eslint-env jest */
/**
* @jest-environment @edge-runtime/jest-environment
*/
import { NextURL } from 'next/dist/server/web/next-url'
// TODO Make NextURL extend URL
......
/* eslint-env jest */
import { Blob, File, FormData } from 'next/dist/compiled/formdata-node'
import { Crypto } from 'next/dist/server/web/sandbox/polyfills'
import { Headers } from 'next/dist/server/web/spec-compliant/headers'
import { Request } from 'next/dist/server/web/spec-compliant/request'
import * as streams from 'web-streams-polyfill/ponyfill'
beforeAll(() => {
global['Blob'] = Blob
global['crypto'] = new Crypto()
global['File'] = File
global['FormData'] = FormData
global['Headers'] = Headers
global['ReadableStream'] = streams.ReadableStream
global['TransformStream'] = streams.TransformStream
})
afterAll(() => {
delete global['Blob']
delete global['crypto']
delete global['File']
delete global['Headers']
delete global['FormData']
delete global['ReadableStream']
delete global['TransformStream']
})
it('parses and reconstructs the URL alone', async () => {
const url = 'https://vercel.com/foo/bar?one=value'
const req = new Request(url)
expect(req.url).toEqual(url)
})
it('throws when the URL is malformed', async () => {
expect(() => new Request('meeeh')).toThrowError('Invalid URL')
})
it('Request.referrer is `about:client` by default', async () => {
const request = new Request('https://vercel.com')
expect(request.referrer).toBe('about:client')
})
it('Request.referrer can be customized', async () => {
const request = new Request('https://vercel.com', { referrer: 'client' })
expect(request.referrer).toBe('client')
})
it('Request copies over method', async () => {
const request = new Request('https://vercel.com', {
method: 'POST',
body: 'hello',
})
const clonedRequest = new Request(request)
expect(clonedRequest.method).toBe(request.method)
})
/* eslint-env jest */
import { Blob, File, FormData } from 'next/dist/compiled/formdata-node'
import { Response } from 'next/dist/server/web/spec-compliant/response'
import { Crypto } from 'next/dist/server/web/sandbox/polyfills'
import { Headers } from 'next/dist/server/web/spec-compliant/headers'
import * as streams from 'web-streams-polyfill/ponyfill'
beforeAll(() => {
global['Blob'] = Blob
global['crypto'] = new Crypto()
global['File'] = File
global['FormData'] = FormData
global['Headers'] = Headers
global['ReadableStream'] = streams.ReadableStream
global['TransformStream'] = streams.TransformStream
})
afterAll(() => {
delete global['Blob']
delete global['crypto']
delete global['File']
delete global['Headers']
delete global['FormData']
delete global['ReadableStream']
delete global['TransformStream']
})
it('clones responses', async () => {
const { readable, writable } = new TransformStream()
const encoder = new TextEncoder()
const writer = writable.getWriter()
writer.write(encoder.encode('Hello '))
writer.write(encoder.encode('world!'))
writer.close()
const res1 = new Response(readable)
const res2 = res1.clone()
expect(await res1.text()).toEqual('Hello world!')
expect(await res2.text()).toEqual('Hello world!')
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment