diff --git a/functions/debug-timeout.png b/functions/debug-timeout.png new file mode 100644 index 0000000..d87f1c3 Binary files /dev/null and b/functions/debug-timeout.png differ diff --git a/functions/debug.png b/functions/debug.png new file mode 100644 index 0000000..1bf6b59 Binary files /dev/null and b/functions/debug.png differ diff --git a/functions/endpoints/mainnet.js b/functions/endpoints/mainnet.js index 0c2cd49..3b52993 100644 --- a/functions/endpoints/mainnet.js +++ b/functions/endpoints/mainnet.js @@ -2,7 +2,7 @@ const app = require( './express' )() const { getTotalSupply } = require( '../modules/contract' ) const { safelyReturnRocketeer, web2domain } = require( '../nft-media/rocketeer' ) const { setAvatar, resetAvatar } = require( '../integrations/avatar' ) - +const { generateNewOutfit, setPrimaryOutfit } = require( '../integrations/changingroom' ) // /////////////////////////////// // Specific Rocketeer instances @@ -46,6 +46,11 @@ app.get( '/api/rocketeer/:id', async ( req, res ) => { app.post( '/api/integrations/avatar/', setAvatar ) app.delete( '/api/integrations/avatar/', resetAvatar ) +/* /////////////////////////////// +// Changing room endpoints +// /////////////////////////////*/ +app.post( '/api/rocketeer/:id/outfits', generateNewOutfit ) +app.put( '/api/rocketeer/:id/outfits', setPrimaryOutfit ) // /////////////////////////////// // Static collection data diff --git a/functions/firebase-debug.log b/functions/firebase-debug.log new file mode 100644 index 0000000..dcf72a9 --- /dev/null +++ b/functions/firebase-debug.log @@ -0,0 +1,424 @@ +[debug] [2021-11-29T13:51:15.596Z] ---------------------------------------------------------------------- +[debug] [2021-11-29T13:51:15.598Z] Command: /Users/mentor/.nvm/versions/node/v12.20.1/bin/node /Users/mentor/.nvm/versions/node/v12.20.1/bin/firebase functions:shell +[debug] [2021-11-29T13:51:15.598Z] CLI Version: 9.6.1 +[debug] [2021-11-29T13:51:15.598Z] Platform: darwin +[debug] [2021-11-29T13:51:15.598Z] Node Version: v12.20.1 +[debug] [2021-11-29T13:51:15.599Z] Time: Mon Nov 29 2021 14:51:15 GMT+0100 (Central European Standard Time) +[debug] [2021-11-29T13:51:15.599Z] ---------------------------------------------------------------------- +[debug] [2021-11-29T13:51:15.599Z] +[debug] [2021-11-29T13:51:15.606Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"] +[debug] [2021-11-29T13:51:15.607Z] > authorizing via signed-in user +[debug] [2021-11-29T13:51:15.607Z] [iam] checking project rocketeer-nft for permissions ["firebase.projects.get"] +[debug] [2021-11-29T13:51:15.609Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"] +[debug] [2021-11-29T13:51:15.609Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token + +[debug] [2021-11-29T13:51:15.750Z] <<< HTTP RESPONSE 200 {"date":"Mon, 29 Nov 2021 13:51:15 GMT","expires":"Mon, 01 Jan 1990 00:00:00 GMT","cache-control":"no-cache, no-store, max-age=0, must-revalidate","pragma":"no-cache","content-type":"application/json; charset=utf-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","server":"scaffolding on HTTPServer2","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"} +[debug] [2021-11-29T13:51:15.766Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/rocketeer-nft:testIamPermissions + {"permissions":["firebase.projects.get"]} +[debug] [2021-11-29T13:51:16.659Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 29 Nov 2021 13:51:16 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","server-timing":"gfet4t7; dur=577","alt-svc":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"} +[debug] [2021-11-29T13:51:16.675Z] [functions] Using node@12 from host. +[debug] [2021-11-29T13:51:16.677Z] defaultcredentials: writing to file /Users/mentor/.config/firebase/mentorpalokaj_gmail_com_application_default_credentials.json +[debug] [2021-11-29T13:51:16.678Z] DEBUG: Setting GAC to /Users/mentor/.config/firebase/mentorpalokaj_gmail_com_application_default_credentials.json +[debug] [2021-11-29T13:51:16.680Z] > refreshing access token with scopes: [] +[debug] [2021-11-29T13:51:16.680Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token + +[debug] [2021-11-29T13:51:16.766Z] <<< HTTP RESPONSE 200 {"expires":"Mon, 01 Jan 1990 00:00:00 GMT","cache-control":"no-cache, no-store, max-age=0, must-revalidate","pragma":"no-cache","date":"Mon, 29 Nov 2021 13:51:16 GMT","content-type":"application/json; charset=utf-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","server":"scaffolding on HTTPServer2","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"} +[debug] [2021-11-29T13:51:16.783Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/rocketeer-nft/adminSdkConfig [none] +[debug] [2021-11-29T13:51:17.001Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/rocketeer-nft/adminSdkConfig 200 +[debug] [2021-11-29T13:51:17.001Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/rocketeer-nft/adminSdkConfig {"projectId":"rocketeer-nft","storageBucket":"rocketeer-nft.appspot.com","locationId":"europe-west"} +[debug] [2021-11-29T13:51:17.029Z] [functions] Watching "/Users/mentor/dev/rocketeer-nft/functions" for Cloud Functions... +[debug] [2021-11-29T13:51:17.039Z] DEBUG: [worker-pool] addWorker(~diagnostic~) +[debug] [2021-11-29T13:51:17.040Z] DEBUG: [worker-pool] Adding worker with key ~diagnostic~, total=1 +[debug] [2021-11-29T13:51:17.040Z] DEBUG: [worker-pool] submitWork(triggerId=) +[debug] [2021-11-29T13:51:17.040Z] DEBUG: [worker-~diagnostic~-955569ea-8a3b-48b0-94bc-1a0db7286223]: Assigning socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_4794.sock +[debug] [2021-11-29T13:51:17.040Z] DEBUG: [worker-~diagnostic~-955569ea-8a3b-48b0-94bc-1a0db7286223]: BUSY +[debug] [2021-11-29T13:51:17.174Z] DEBUG: [runtime-status] [4794] Functions runtime initialized. {"cwd":"/Users/mentor/dev/rocketeer-nft/functions","node_version":"12.20.1"} +[debug] [2021-11-29T13:51:17.175Z] DEBUG: [runtime-status] [4794] Disabled runtime features: undefined +[debug] [2021-11-29T13:51:17.179Z] DEBUG: [runtime-status] [4794] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:51:17.181Z] DEBUG: [runtime-status] [4794] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:17.181Z] DEBUG: [runtime-status] [4794] Found local functions config: /Users/mentor/dev/rocketeer-nft/functions/.runtimeconfig.json +[debug] [2021-11-29T13:51:17.182Z] DEBUG: [runtime-status] [4794] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:17.183Z] DEBUG: [runtime-status] [4794] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}] +[debug] [2021-11-29T13:51:17.184Z] DEBUG: [runtime-status] [4794] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:17.229Z] DEBUG: [runtime-status] [4794] Checked functions.config() {"config":{"api":{"secret":"Only Mentor should ever manually call this endpoint!"},"infura":{"projectid":"47881c52385944a9b92504e7e975f6ec"},"integration":{"secret":"Only Mentor should ever manually call this endpoint!"}}} +[debug] [2021-11-29T13:51:17.229Z] DEBUG: [runtime-status] [4794] firebase-functions has been stubbed. {"functionsResolution":{"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"}} +[debug] [2021-11-29T13:51:17.229Z] DEBUG: [runtime-status] [4794] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:17.232Z] DEBUG: [runtime-status] [4794] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:51:17.232Z] DEBUG: [runtime-status] [4794] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:17.232Z] DEBUG: [runtime-status] [4794] firebase-admin has been stubbed. {"adminResolution":{"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"}} +[debug] [2021-11-29T13:51:18.621Z] [functions[testnetMetadata]] http function initialized (http://localhost:5000/rocketeer-nft/us-central1/testnetMetadata). +[debug] [2021-11-29T13:51:18.622Z] [functions[mainnetMetadata]] http function initialized (http://localhost:5000/rocketeer-nft/us-central1/mainnetMetadata). +[debug] [2021-11-29T13:51:18.622Z] [functions[refreshOpensea]] http function initialized (http://localhost:5000/rocketeer-nft/us-central1/refreshOpensea). +[info] i functions: Loaded functions: testnetMetadata, mainnetMetadata, refreshOpensea +[warn] ⚠ functions: The following emulators are not running, calls to these services will affect production: firestore, database, pubsub +[debug] [2021-11-29T13:51:18.630Z] DEBUG: [worker-~diagnostic~-955569ea-8a3b-48b0-94bc-1a0db7286223]: IDLE +[debug] [2021-11-29T13:51:23.489Z] [work-queue] {"queueLength":1,"workRunningCount":0} +[debug] [2021-11-29T13:51:23.489Z] [work-queue] {"queueLength":0,"workRunningCount":1} +[debug] [2021-11-29T13:51:23.490Z] Accepted request POST /rocketeer-nft/us-central1/refreshOpensea --> refreshOpensea +[debug] [2021-11-29T13:51:23.497Z] DEBUG: [worker-pool] addWorker(refreshOpensea) +[debug] [2021-11-29T13:51:23.497Z] DEBUG: [worker-pool] Adding worker with key refreshOpensea, total=1 +[debug] [2021-11-29T13:51:23.497Z] DEBUG: [worker-pool] submitWork(triggerId=refreshOpensea) +[debug] [2021-11-29T13:51:23.497Z] DEBUG: [worker-refreshOpensea-f408e628-f0d9-4a04-88dc-5863f6be8780]: Assigning socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_4987.sock +[debug] [2021-11-29T13:51:23.498Z] DEBUG: [worker-refreshOpensea-f408e628-f0d9-4a04-88dc-5863f6be8780]: BUSY +[debug] [2021-11-29T13:51:23.632Z] DEBUG: [runtime-status] [4987] Functions runtime initialized. {"cwd":"/Users/mentor/dev/rocketeer-nft/functions","node_version":"12.20.1"} +[debug] [2021-11-29T13:51:23.633Z] DEBUG: [runtime-status] [4987] Disabled runtime features: undefined +[debug] [2021-11-29T13:51:23.637Z] DEBUG: [runtime-status] [4987] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:51:23.638Z] DEBUG: [runtime-status] [4987] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:23.638Z] DEBUG: [runtime-status] [4987] Found local functions config: /Users/mentor/dev/rocketeer-nft/functions/.runtimeconfig.json +[debug] [2021-11-29T13:51:23.639Z] DEBUG: [runtime-status] [4987] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:23.640Z] DEBUG: [runtime-status] [4987] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}] +[debug] [2021-11-29T13:51:23.641Z] DEBUG: [runtime-status] [4987] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:23.676Z] DEBUG: [runtime-status] [4987] Checked functions.config() {"config":{"api":{"secret":"Only Mentor should ever manually call this endpoint!"},"infura":{"projectid":"47881c52385944a9b92504e7e975f6ec"},"integration":{"secret":"Only Mentor should ever manually call this endpoint!"}}} +[debug] [2021-11-29T13:51:23.676Z] DEBUG: [runtime-status] [4987] firebase-functions has been stubbed. {"functionsResolution":{"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"}} +[debug] [2021-11-29T13:51:23.676Z] DEBUG: [runtime-status] [4987] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:23.679Z] DEBUG: [runtime-status] [4987] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:51:23.679Z] DEBUG: [runtime-status] [4987] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:23.680Z] DEBUG: [runtime-status] [4987] firebase-admin has been stubbed. {"adminResolution":{"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"}} +[debug] [2021-11-29T13:51:24.696Z] DEBUG: [runtime-status] [4987] Trigger "refreshOpensea" has been found, beginning invocation! +[debug] [2021-11-29T13:51:24.696Z] [functions] Beginning execution of "refreshOpensea" +[debug] [2021-11-29T13:51:24.696Z] DEBUG: [runtime-status] [4987] triggerDefinition {"labels":{"deployment-callable":"true"},"timeout":"540s","availableMemoryMb":4096,"httpsTrigger":{},"name":"refreshOpensea","entryPoint":"refreshOpensea"} +[debug] [2021-11-29T13:51:24.696Z] DEBUG: [runtime-status] [4987] Running refreshOpensea in mode HTTPS +[debug] [2021-11-29T13:51:24.699Z] DEBUG: [runtime-status] [4987] Attempting to listen to socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_4987.sock +[debug] [2021-11-29T13:51:24.703Z] DEBUG: [functions] Runtime ready! Sending request! +[debug] [2021-11-29T13:51:24.704Z] DEBUG: [functions] Got req.url=/rocketeer-nft/us-central1/refreshOpensea, mapping to path=/ +[debug] [2021-11-29T13:51:25.713Z] DEBUG: [runtime-status] [4987] Ephemeral server handling POST request +[debug] [2021-11-29T13:51:25.713Z] DEBUG: [runtime-status] [4987] No callable functions auth found +[info] > {"verifications":{"app":"MISSING","auth":"MISSING"},"logging.googleapis.com/labels":{"firebase-log-type":"callable-request-verification"},"severity":"INFO","message":"Callable request verification passed"} {"user":{"verifications":{"app":"MISSING","auth":"MISSING"},"logging.googleapis.com/labels":{"firebase-log-type":"callable-request-verification"},"severity":"INFO","message":"Callable request verification passed"},"metadata":{"emulator":{"name":"functions"},"function":{"name":"refreshOpensea"},"message":"\u001b[90m> \u001b[39m {\"verifications\":{\"app\":\"MISSING\",\"auth\":\"MISSING\"},\"logging.googleapis.com/labels\":{\"firebase-log-type\":\"callable-request-verification\"},\"severity\":\"INFO\",\"message\":\"Callable request verification passed\"}"}} +[debug] [2021-11-29T13:51:37.642Z] DEBUG: File /Users/mentor/dev/rocketeer-nft/functions/pre-debug.png changed, reloading triggers +[debug] [2021-11-29T13:51:38.646Z] DEBUG: [worker-pool] Shutting down IDLE worker (~diagnostic~) +[debug] [2021-11-29T13:51:38.647Z] DEBUG: [worker-~diagnostic~-955569ea-8a3b-48b0-94bc-1a0db7286223]: FINISHING +[debug] [2021-11-29T13:51:38.647Z] DEBUG: [worker-pool] Marking BUSY worker to finish (refreshOpensea) +[debug] [2021-11-29T13:51:38.647Z] DEBUG: [worker-refreshOpensea-f408e628-f0d9-4a04-88dc-5863f6be8780]: FINISHING +[debug] [2021-11-29T13:51:38.657Z] DEBUG: [worker-pool] addWorker(~diagnostic~) +[debug] [2021-11-29T13:51:38.659Z] DEBUG: [worker-pool] Adding worker with key ~diagnostic~, total=2 +[debug] [2021-11-29T13:51:38.659Z] DEBUG: [worker-pool] submitWork(triggerId=) +[debug] [2021-11-29T13:51:38.659Z] DEBUG: [worker-~diagnostic~-867b4754-76fa-41af-acc8-e9ec57a45d0c]: Assigning socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_5496.sock +[debug] [2021-11-29T13:51:38.659Z] DEBUG: [worker-~diagnostic~-867b4754-76fa-41af-acc8-e9ec57a45d0c]: BUSY +[debug] [2021-11-29T13:51:38.661Z] DEBUG: [worker-~diagnostic~-955569ea-8a3b-48b0-94bc-1a0db7286223]: exited +[debug] [2021-11-29T13:51:38.661Z] DEBUG: [worker-~diagnostic~-955569ea-8a3b-48b0-94bc-1a0db7286223]: FINISHED +[debug] [2021-11-29T13:51:38.831Z] DEBUG: [runtime-status] [5496] Functions runtime initialized. {"cwd":"/Users/mentor/dev/rocketeer-nft/functions","node_version":"12.20.1"} +[debug] [2021-11-29T13:51:38.832Z] DEBUG: [runtime-status] [5496] Disabled runtime features: undefined +[debug] [2021-11-29T13:51:38.836Z] DEBUG: [runtime-status] [5496] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:51:38.837Z] DEBUG: [runtime-status] [5496] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:38.838Z] DEBUG: [runtime-status] [5496] Found local functions config: /Users/mentor/dev/rocketeer-nft/functions/.runtimeconfig.json +[debug] [2021-11-29T13:51:38.838Z] DEBUG: [runtime-status] [5496] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:38.840Z] DEBUG: [runtime-status] [5496] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}] +[debug] [2021-11-29T13:51:38.840Z] DEBUG: [runtime-status] [5496] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:38.888Z] DEBUG: [runtime-status] [5496] Checked functions.config() {"config":{"api":{"secret":"Only Mentor should ever manually call this endpoint!"},"infura":{"projectid":"47881c52385944a9b92504e7e975f6ec"},"integration":{"secret":"Only Mentor should ever manually call this endpoint!"}}} +[debug] [2021-11-29T13:51:38.888Z] DEBUG: [runtime-status] [5496] firebase-functions has been stubbed. {"functionsResolution":{"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"}} +[debug] [2021-11-29T13:51:38.888Z] DEBUG: [runtime-status] [5496] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:38.891Z] DEBUG: [runtime-status] [5496] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:51:38.891Z] DEBUG: [runtime-status] [5496] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:38.891Z] DEBUG: [runtime-status] [5496] firebase-admin has been stubbed. {"adminResolution":{"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"}} +[debug] [2021-11-29T13:51:40.306Z] DEBUG: [worker-~diagnostic~-867b4754-76fa-41af-acc8-e9ec57a45d0c]: IDLE +[debug] [2021-11-29T13:51:43.823Z] DEBUG: [runtime-status] [4987] Ephemeral server survived. +[debug] [2021-11-29T13:51:43.824Z] [functions] Finished "refreshOpensea" in ~19s +[debug] [2021-11-29T13:51:43.824Z] DEBUG: [worker-refreshOpensea-f408e628-f0d9-4a04-88dc-5863f6be8780]: IDLE --> FINISHING +[debug] [2021-11-29T13:51:43.843Z] DEBUG: [worker-refreshOpensea-f408e628-f0d9-4a04-88dc-5863f6be8780]: exited +[debug] [2021-11-29T13:51:43.843Z] DEBUG: [worker-refreshOpensea-f408e628-f0d9-4a04-88dc-5863f6be8780]: FINISHED +[debug] [2021-11-29T13:51:43.843Z] [work-queue] {"queueLength":0,"workRunningCount":0} +[debug] [2021-11-29T13:51:50.412Z] DEBUG: File /Users/mentor/dev/rocketeer-nft/functions/integrations/opensea.js changed, reloading triggers +[debug] [2021-11-29T13:51:51.414Z] DEBUG: [worker-pool] Shutting down IDLE worker (~diagnostic~) +[debug] [2021-11-29T13:51:51.414Z] DEBUG: [worker-~diagnostic~-867b4754-76fa-41af-acc8-e9ec57a45d0c]: FINISHING +[debug] [2021-11-29T13:51:51.414Z] DEBUG: [worker-pool] Cleaned up workers for ~diagnostic~: 2 --> 1 +[debug] [2021-11-29T13:51:51.414Z] DEBUG: [worker-pool] Cleaned up workers for refreshOpensea: 1 --> 0 +[debug] [2021-11-29T13:51:51.420Z] DEBUG: [worker-pool] addWorker(~diagnostic~) +[debug] [2021-11-29T13:51:51.422Z] DEBUG: [worker-pool] Adding worker with key ~diagnostic~, total=2 +[debug] [2021-11-29T13:51:51.422Z] DEBUG: [worker-pool] submitWork(triggerId=) +[debug] [2021-11-29T13:51:51.423Z] DEBUG: [worker-~diagnostic~-ec8d585d-8304-42e3-b3f1-4fdd08b8f73a]: Assigning socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_5980.sock +[debug] [2021-11-29T13:51:51.423Z] DEBUG: [worker-~diagnostic~-ec8d585d-8304-42e3-b3f1-4fdd08b8f73a]: BUSY +[debug] [2021-11-29T13:51:51.424Z] DEBUG: [worker-~diagnostic~-867b4754-76fa-41af-acc8-e9ec57a45d0c]: exited +[debug] [2021-11-29T13:51:51.424Z] DEBUG: [worker-~diagnostic~-867b4754-76fa-41af-acc8-e9ec57a45d0c]: FINISHED +[debug] [2021-11-29T13:51:51.582Z] DEBUG: [runtime-status] [5980] Functions runtime initialized. {"cwd":"/Users/mentor/dev/rocketeer-nft/functions","node_version":"12.20.1"} +[debug] [2021-11-29T13:51:51.583Z] DEBUG: [runtime-status] [5980] Disabled runtime features: undefined +[debug] [2021-11-29T13:51:51.587Z] DEBUG: [runtime-status] [5980] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:51:51.588Z] DEBUG: [runtime-status] [5980] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:51.588Z] DEBUG: [runtime-status] [5980] Found local functions config: /Users/mentor/dev/rocketeer-nft/functions/.runtimeconfig.json +[debug] [2021-11-29T13:51:51.589Z] DEBUG: [runtime-status] [5980] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:51.591Z] DEBUG: [runtime-status] [5980] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}] +[debug] [2021-11-29T13:51:51.591Z] DEBUG: [runtime-status] [5980] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:51.628Z] DEBUG: [runtime-status] [5980] Checked functions.config() {"config":{"api":{"secret":"Only Mentor should ever manually call this endpoint!"},"infura":{"projectid":"47881c52385944a9b92504e7e975f6ec"},"integration":{"secret":"Only Mentor should ever manually call this endpoint!"}}} +[debug] [2021-11-29T13:51:51.628Z] DEBUG: [runtime-status] [5980] firebase-functions has been stubbed. {"functionsResolution":{"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"}} +[debug] [2021-11-29T13:51:51.628Z] DEBUG: [runtime-status] [5980] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:51.631Z] DEBUG: [runtime-status] [5980] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:51:51.631Z] DEBUG: [runtime-status] [5980] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:51.631Z] DEBUG: [runtime-status] [5980] firebase-admin has been stubbed. {"adminResolution":{"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"}} +[debug] [2021-11-29T13:51:52.701Z] DEBUG: [worker-~diagnostic~-ec8d585d-8304-42e3-b3f1-4fdd08b8f73a]: IDLE +[debug] [2021-11-29T13:51:54.166Z] [work-queue] {"queueLength":1,"workRunningCount":0} +[debug] [2021-11-29T13:51:54.166Z] [work-queue] {"queueLength":0,"workRunningCount":1} +[debug] [2021-11-29T13:51:54.166Z] Accepted request POST /rocketeer-nft/us-central1/refreshOpensea --> refreshOpensea +[debug] [2021-11-29T13:51:54.166Z] DEBUG: [worker-pool] Cleaned up workers for ~diagnostic~: 2 --> 1 +[debug] [2021-11-29T13:51:54.172Z] DEBUG: [worker-pool] addWorker(refreshOpensea) +[debug] [2021-11-29T13:51:54.173Z] DEBUG: [worker-pool] Adding worker with key refreshOpensea, total=1 +[debug] [2021-11-29T13:51:54.173Z] DEBUG: [worker-pool] submitWork(triggerId=refreshOpensea) +[debug] [2021-11-29T13:51:54.173Z] DEBUG: [worker-refreshOpensea-52122550-9ad3-4eec-9381-7841a2551adc]: Assigning socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_6079.sock +[debug] [2021-11-29T13:51:54.173Z] DEBUG: [worker-refreshOpensea-52122550-9ad3-4eec-9381-7841a2551adc]: BUSY +[debug] [2021-11-29T13:51:54.367Z] DEBUG: [runtime-status] [6079] Functions runtime initialized. {"cwd":"/Users/mentor/dev/rocketeer-nft/functions","node_version":"12.20.1"} +[debug] [2021-11-29T13:51:54.368Z] DEBUG: [runtime-status] [6079] Disabled runtime features: undefined +[debug] [2021-11-29T13:51:54.372Z] DEBUG: [runtime-status] [6079] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:51:54.374Z] DEBUG: [runtime-status] [6079] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:54.374Z] DEBUG: [runtime-status] [6079] Found local functions config: /Users/mentor/dev/rocketeer-nft/functions/.runtimeconfig.json +[debug] [2021-11-29T13:51:54.375Z] DEBUG: [runtime-status] [6079] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:54.376Z] DEBUG: [runtime-status] [6079] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}] +[debug] [2021-11-29T13:51:54.377Z] DEBUG: [runtime-status] [6079] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:54.413Z] DEBUG: [runtime-status] [6079] Checked functions.config() {"config":{"api":{"secret":"Only Mentor should ever manually call this endpoint!"},"infura":{"projectid":"47881c52385944a9b92504e7e975f6ec"},"integration":{"secret":"Only Mentor should ever manually call this endpoint!"}}} +[debug] [2021-11-29T13:51:54.413Z] DEBUG: [runtime-status] [6079] firebase-functions has been stubbed. {"functionsResolution":{"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"}} +[debug] [2021-11-29T13:51:54.413Z] DEBUG: [runtime-status] [6079] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:54.416Z] DEBUG: [runtime-status] [6079] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:51:54.417Z] DEBUG: [runtime-status] [6079] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:51:54.417Z] DEBUG: [runtime-status] [6079] firebase-admin has been stubbed. {"adminResolution":{"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"}} +[debug] [2021-11-29T13:51:55.421Z] DEBUG: [runtime-status] [6079] Trigger "refreshOpensea" has been found, beginning invocation! +[debug] [2021-11-29T13:51:55.422Z] [functions] Beginning execution of "refreshOpensea" +[debug] [2021-11-29T13:51:55.422Z] DEBUG: [runtime-status] [6079] triggerDefinition {"labels":{"deployment-callable":"true"},"timeout":"540s","availableMemoryMb":4096,"httpsTrigger":{},"name":"refreshOpensea","entryPoint":"refreshOpensea"} +[debug] [2021-11-29T13:51:55.422Z] DEBUG: [runtime-status] [6079] Running refreshOpensea in mode HTTPS +[debug] [2021-11-29T13:51:55.424Z] DEBUG: [runtime-status] [6079] Attempting to listen to socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_6079.sock +[debug] [2021-11-29T13:51:55.429Z] DEBUG: [functions] Runtime ready! Sending request! +[debug] [2021-11-29T13:51:55.429Z] DEBUG: [functions] Got req.url=/rocketeer-nft/us-central1/refreshOpensea, mapping to path=/ +[debug] [2021-11-29T13:51:56.440Z] DEBUG: [runtime-status] [6079] Ephemeral server handling POST request +[debug] [2021-11-29T13:51:56.440Z] DEBUG: [runtime-status] [6079] No callable functions auth found +[info] > {"verifications":{"app":"MISSING","auth":"MISSING"},"logging.googleapis.com/labels":{"firebase-log-type":"callable-request-verification"},"severity":"INFO","message":"Callable request verification passed"} {"user":{"verifications":{"app":"MISSING","auth":"MISSING"},"logging.googleapis.com/labels":{"firebase-log-type":"callable-request-verification"},"severity":"INFO","message":"Callable request verification passed"},"metadata":{"emulator":{"name":"functions"},"function":{"name":"refreshOpensea"},"message":"\u001b[90m> \u001b[39m {\"verifications\":{\"app\":\"MISSING\",\"auth\":\"MISSING\"},\"logging.googleapis.com/labels\":{\"firebase-log-type\":\"callable-request-verification\"},\"severity\":\"INFO\",\"message\":\"Callable request verification passed\"}"}} +[debug] [2021-11-29T13:52:02.559Z] DEBUG: File /Users/mentor/dev/rocketeer-nft/functions/pre-debug.png changed, reloading triggers +[debug] [2021-11-29T13:52:03.561Z] DEBUG: [worker-pool] Shutting down IDLE worker (~diagnostic~) +[debug] [2021-11-29T13:52:03.561Z] DEBUG: [worker-~diagnostic~-ec8d585d-8304-42e3-b3f1-4fdd08b8f73a]: FINISHING +[debug] [2021-11-29T13:52:03.561Z] DEBUG: [worker-pool] Marking BUSY worker to finish (refreshOpensea) +[debug] [2021-11-29T13:52:03.561Z] DEBUG: [worker-refreshOpensea-52122550-9ad3-4eec-9381-7841a2551adc]: FINISHING +[debug] [2021-11-29T13:52:03.568Z] DEBUG: [worker-pool] addWorker(~diagnostic~) +[debug] [2021-11-29T13:52:03.570Z] DEBUG: [worker-pool] Adding worker with key ~diagnostic~, total=2 +[debug] [2021-11-29T13:52:03.570Z] DEBUG: [worker-pool] submitWork(triggerId=) +[debug] [2021-11-29T13:52:03.570Z] DEBUG: [worker-~diagnostic~-f5c585bf-3293-452e-b611-f949ea8d47f6]: Assigning socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_6379.sock +[debug] [2021-11-29T13:52:03.570Z] DEBUG: [worker-~diagnostic~-f5c585bf-3293-452e-b611-f949ea8d47f6]: BUSY +[debug] [2021-11-29T13:52:03.573Z] DEBUG: [worker-~diagnostic~-ec8d585d-8304-42e3-b3f1-4fdd08b8f73a]: exited +[debug] [2021-11-29T13:52:03.573Z] DEBUG: [worker-~diagnostic~-ec8d585d-8304-42e3-b3f1-4fdd08b8f73a]: FINISHED +[debug] [2021-11-29T13:52:03.574Z] DEBUG: File /Users/mentor/dev/rocketeer-nft/functions/debug.png changed, reloading triggers +[debug] [2021-11-29T13:52:03.714Z] DEBUG: [runtime-status] [6379] Functions runtime initialized. {"cwd":"/Users/mentor/dev/rocketeer-nft/functions","node_version":"12.20.1"} +[debug] [2021-11-29T13:52:03.715Z] DEBUG: [runtime-status] [6379] Disabled runtime features: undefined +[debug] [2021-11-29T13:52:03.719Z] DEBUG: [runtime-status] [6379] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:52:03.720Z] DEBUG: [runtime-status] [6379] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:52:03.720Z] DEBUG: [runtime-status] [6379] Found local functions config: /Users/mentor/dev/rocketeer-nft/functions/.runtimeconfig.json +[debug] [2021-11-29T13:52:03.721Z] DEBUG: [runtime-status] [6379] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:52:03.722Z] DEBUG: [runtime-status] [6379] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}] +[debug] [2021-11-29T13:52:03.723Z] DEBUG: [runtime-status] [6379] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:52:03.758Z] DEBUG: [runtime-status] [6379] Checked functions.config() {"config":{"api":{"secret":"Only Mentor should ever manually call this endpoint!"},"infura":{"projectid":"47881c52385944a9b92504e7e975f6ec"},"integration":{"secret":"Only Mentor should ever manually call this endpoint!"}}} +[debug] [2021-11-29T13:52:03.758Z] DEBUG: [runtime-status] [6379] firebase-functions has been stubbed. {"functionsResolution":{"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"}} +[debug] [2021-11-29T13:52:03.759Z] DEBUG: [runtime-status] [6379] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:52:03.762Z] DEBUG: [runtime-status] [6379] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:52:03.762Z] DEBUG: [runtime-status] [6379] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:52:03.762Z] DEBUG: [runtime-status] [6379] firebase-admin has been stubbed. {"adminResolution":{"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"}} +[debug] [2021-11-29T13:52:04.578Z] DEBUG: [worker-pool] Marking BUSY worker to finish (~diagnostic~) +[debug] [2021-11-29T13:52:04.578Z] DEBUG: [worker-~diagnostic~-f5c585bf-3293-452e-b611-f949ea8d47f6]: FINISHING +[debug] [2021-11-29T13:52:04.578Z] DEBUG: [worker-pool] Cleaned up workers for ~diagnostic~: 2 --> 1 +[debug] [2021-11-29T13:52:04.584Z] DEBUG: [worker-pool] addWorker(~diagnostic~) +[debug] [2021-11-29T13:52:04.585Z] DEBUG: [worker-pool] Adding worker with key ~diagnostic~, total=2 +[debug] [2021-11-29T13:52:04.585Z] DEBUG: [worker-pool] submitWork(triggerId=) +[debug] [2021-11-29T13:52:04.585Z] DEBUG: [worker-~diagnostic~-2cbb0c80-2225-474b-9a5b-cfd6d4d7f235]: Assigning socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_6425.sock +[debug] [2021-11-29T13:52:04.585Z] DEBUG: [worker-~diagnostic~-2cbb0c80-2225-474b-9a5b-cfd6d4d7f235]: BUSY +[debug] [2021-11-29T13:52:04.727Z] DEBUG: [runtime-status] [6425] Functions runtime initialized. {"cwd":"/Users/mentor/dev/rocketeer-nft/functions","node_version":"12.20.1"} +[debug] [2021-11-29T13:52:04.728Z] DEBUG: [runtime-status] [6425] Disabled runtime features: undefined +[debug] [2021-11-29T13:52:04.731Z] DEBUG: [runtime-status] [6425] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:52:04.733Z] DEBUG: [runtime-status] [6425] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:52:04.733Z] DEBUG: [runtime-status] [6425] Found local functions config: /Users/mentor/dev/rocketeer-nft/functions/.runtimeconfig.json +[debug] [2021-11-29T13:52:04.734Z] DEBUG: [runtime-status] [6425] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:52:04.735Z] DEBUG: [runtime-status] [6425] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}] +[debug] [2021-11-29T13:52:04.736Z] DEBUG: [runtime-status] [6425] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:52:04.772Z] DEBUG: [runtime-status] [6425] Checked functions.config() {"config":{"api":{"secret":"Only Mentor should ever manually call this endpoint!"},"infura":{"projectid":"47881c52385944a9b92504e7e975f6ec"},"integration":{"secret":"Only Mentor should ever manually call this endpoint!"}}} +[debug] [2021-11-29T13:52:04.773Z] DEBUG: [runtime-status] [6425] firebase-functions has been stubbed. {"functionsResolution":{"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"}} +[debug] [2021-11-29T13:52:04.773Z] DEBUG: [runtime-status] [6425] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:52:04.774Z] DEBUG: [runtime-status] [6425] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:52:04.779Z] DEBUG: [runtime-status] [6425] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:52:04.779Z] DEBUG: [runtime-status] [6425] firebase-admin has been stubbed. {"adminResolution":{"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"}} +[debug] [2021-11-29T13:52:04.819Z] DEBUG: [worker-~diagnostic~-f5c585bf-3293-452e-b611-f949ea8d47f6]: IDLE --> FINISHING +[debug] [2021-11-29T13:52:04.829Z] DEBUG: [worker-~diagnostic~-f5c585bf-3293-452e-b611-f949ea8d47f6]: exited +[debug] [2021-11-29T13:52:04.829Z] DEBUG: [worker-~diagnostic~-f5c585bf-3293-452e-b611-f949ea8d47f6]: FINISHED +[debug] [2021-11-29T13:52:05.818Z] DEBUG: [worker-~diagnostic~-2cbb0c80-2225-474b-9a5b-cfd6d4d7f235]: IDLE +[debug] [2021-11-29T13:52:08.822Z] DEBUG: [runtime-status] [6079] Ephemeral server survived. +[debug] [2021-11-29T13:52:08.822Z] [functions] Finished "refreshOpensea" in ~13s +[debug] [2021-11-29T13:52:08.822Z] DEBUG: [worker-refreshOpensea-52122550-9ad3-4eec-9381-7841a2551adc]: IDLE --> FINISHING +[debug] [2021-11-29T13:52:08.832Z] DEBUG: [worker-refreshOpensea-52122550-9ad3-4eec-9381-7841a2551adc]: exited +[debug] [2021-11-29T13:52:08.832Z] DEBUG: [worker-refreshOpensea-52122550-9ad3-4eec-9381-7841a2551adc]: FINISHED +[debug] [2021-11-29T13:52:08.832Z] [work-queue] {"queueLength":0,"workRunningCount":0} +[debug] [2021-11-29T13:52:08.889Z] DEBUG: File /Users/mentor/dev/rocketeer-nft/functions/debug-timeout.png changed, reloading triggers +[debug] [2021-11-29T13:52:09.895Z] DEBUG: [worker-pool] Shutting down IDLE worker (~diagnostic~) +[debug] [2021-11-29T13:52:09.895Z] DEBUG: [worker-~diagnostic~-2cbb0c80-2225-474b-9a5b-cfd6d4d7f235]: FINISHING +[debug] [2021-11-29T13:52:09.895Z] DEBUG: [worker-pool] Cleaned up workers for ~diagnostic~: 2 --> 1 +[debug] [2021-11-29T13:52:09.895Z] DEBUG: [worker-pool] Cleaned up workers for refreshOpensea: 1 --> 0 +[debug] [2021-11-29T13:52:09.904Z] DEBUG: [worker-pool] addWorker(~diagnostic~) +[debug] [2021-11-29T13:52:09.905Z] DEBUG: [worker-pool] Adding worker with key ~diagnostic~, total=2 +[debug] [2021-11-29T13:52:09.905Z] DEBUG: [worker-pool] submitWork(triggerId=) +[debug] [2021-11-29T13:52:09.905Z] DEBUG: [worker-~diagnostic~-22d88933-e8bf-4043-82cb-77dd8835b6d1]: Assigning socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_6571.sock +[debug] [2021-11-29T13:52:09.905Z] DEBUG: [worker-~diagnostic~-22d88933-e8bf-4043-82cb-77dd8835b6d1]: BUSY +[debug] [2021-11-29T13:52:09.906Z] DEBUG: [worker-~diagnostic~-2cbb0c80-2225-474b-9a5b-cfd6d4d7f235]: exited +[debug] [2021-11-29T13:52:09.907Z] DEBUG: [worker-~diagnostic~-2cbb0c80-2225-474b-9a5b-cfd6d4d7f235]: FINISHED +[debug] [2021-11-29T13:52:10.043Z] DEBUG: [runtime-status] [6571] Functions runtime initialized. {"cwd":"/Users/mentor/dev/rocketeer-nft/functions","node_version":"12.20.1"} +[debug] [2021-11-29T13:52:10.044Z] DEBUG: [runtime-status] [6571] Disabled runtime features: undefined +[debug] [2021-11-29T13:52:10.048Z] DEBUG: [runtime-status] [6571] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:52:10.049Z] DEBUG: [runtime-status] [6571] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:52:10.050Z] DEBUG: [runtime-status] [6571] Found local functions config: /Users/mentor/dev/rocketeer-nft/functions/.runtimeconfig.json +[debug] [2021-11-29T13:52:10.050Z] DEBUG: [runtime-status] [6571] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:52:10.052Z] DEBUG: [runtime-status] [6571] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}] +[debug] [2021-11-29T13:52:10.052Z] DEBUG: [runtime-status] [6571] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:52:10.088Z] DEBUG: [runtime-status] [6571] Checked functions.config() {"config":{"api":{"secret":"Only Mentor should ever manually call this endpoint!"},"infura":{"projectid":"47881c52385944a9b92504e7e975f6ec"},"integration":{"secret":"Only Mentor should ever manually call this endpoint!"}}} +[debug] [2021-11-29T13:52:10.088Z] DEBUG: [runtime-status] [6571] firebase-functions has been stubbed. {"functionsResolution":{"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"}} +[debug] [2021-11-29T13:52:10.088Z] DEBUG: [runtime-status] [6571] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:52:10.091Z] DEBUG: [runtime-status] [6571] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:52:10.092Z] DEBUG: [runtime-status] [6571] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:52:10.092Z] DEBUG: [runtime-status] [6571] firebase-admin has been stubbed. {"adminResolution":{"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"}} +[debug] [2021-11-29T13:52:11.205Z] DEBUG: [worker-~diagnostic~-22d88933-e8bf-4043-82cb-77dd8835b6d1]: IDLE +[debug] [2021-11-29T13:53:04.292Z] DEBUG: File /Users/mentor/dev/rocketeer-nft/functions/nft-media/rocketeer.js changed, reloading triggers +[debug] [2021-11-29T13:53:05.298Z] DEBUG: [worker-pool] Shutting down IDLE worker (~diagnostic~) +[debug] [2021-11-29T13:53:05.298Z] DEBUG: [worker-~diagnostic~-22d88933-e8bf-4043-82cb-77dd8835b6d1]: FINISHING +[debug] [2021-11-29T13:53:05.298Z] DEBUG: [worker-pool] Cleaned up workers for ~diagnostic~: 2 --> 1 +[debug] [2021-11-29T13:53:05.306Z] DEBUG: [worker-pool] addWorker(~diagnostic~) +[debug] [2021-11-29T13:53:05.308Z] DEBUG: [worker-pool] Adding worker with key ~diagnostic~, total=2 +[debug] [2021-11-29T13:53:05.308Z] DEBUG: [worker-pool] submitWork(triggerId=) +[debug] [2021-11-29T13:53:05.308Z] DEBUG: [worker-~diagnostic~-500c3e65-0f14-401e-a981-c8e3fc3421ac]: Assigning socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_8410.sock +[debug] [2021-11-29T13:53:05.308Z] DEBUG: [worker-~diagnostic~-500c3e65-0f14-401e-a981-c8e3fc3421ac]: BUSY +[debug] [2021-11-29T13:53:05.309Z] DEBUG: [worker-~diagnostic~-22d88933-e8bf-4043-82cb-77dd8835b6d1]: exited +[debug] [2021-11-29T13:53:05.309Z] DEBUG: [worker-~diagnostic~-22d88933-e8bf-4043-82cb-77dd8835b6d1]: FINISHED +[debug] [2021-11-29T13:53:05.452Z] DEBUG: [runtime-status] [8410] Functions runtime initialized. {"cwd":"/Users/mentor/dev/rocketeer-nft/functions","node_version":"12.20.1"} +[debug] [2021-11-29T13:53:05.454Z] DEBUG: [runtime-status] [8410] Disabled runtime features: undefined +[debug] [2021-11-29T13:53:05.457Z] DEBUG: [runtime-status] [8410] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:53:05.459Z] DEBUG: [runtime-status] [8410] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:53:05.459Z] DEBUG: [runtime-status] [8410] Found local functions config: /Users/mentor/dev/rocketeer-nft/functions/.runtimeconfig.json +[debug] [2021-11-29T13:53:05.460Z] DEBUG: [runtime-status] [8410] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:53:05.461Z] DEBUG: [runtime-status] [8410] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}] +[debug] [2021-11-29T13:53:05.461Z] DEBUG: [runtime-status] [8410] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:53:05.498Z] DEBUG: [runtime-status] [8410] Checked functions.config() {"config":{"api":{"secret":"Only Mentor should ever manually call this endpoint!"},"infura":{"projectid":"47881c52385944a9b92504e7e975f6ec"},"integration":{"secret":"Only Mentor should ever manually call this endpoint!"}}} +[debug] [2021-11-29T13:53:05.499Z] DEBUG: [runtime-status] [8410] firebase-functions has been stubbed. {"functionsResolution":{"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"}} +[debug] [2021-11-29T13:53:05.499Z] DEBUG: [runtime-status] [8410] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:53:05.500Z] DEBUG: [runtime-status] [8410] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:53:05.503Z] DEBUG: [runtime-status] [8410] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:53:05.503Z] DEBUG: [runtime-status] [8410] firebase-admin has been stubbed. {"adminResolution":{"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"}} +[debug] [2021-11-29T13:53:06.583Z] DEBUG: [worker-~diagnostic~-500c3e65-0f14-401e-a981-c8e3fc3421ac]: IDLE +[debug] [2021-11-29T13:53:22.377Z] DEBUG: File /Users/mentor/dev/rocketeer-nft/functions/integrations/opensea.js changed, reloading triggers +[debug] [2021-11-29T13:53:23.379Z] DEBUG: [worker-pool] Shutting down IDLE worker (~diagnostic~) +[debug] [2021-11-29T13:53:23.379Z] DEBUG: [worker-~diagnostic~-500c3e65-0f14-401e-a981-c8e3fc3421ac]: FINISHING +[debug] [2021-11-29T13:53:23.380Z] DEBUG: [worker-pool] Cleaned up workers for ~diagnostic~: 2 --> 1 +[debug] [2021-11-29T13:53:23.388Z] DEBUG: [worker-pool] addWorker(~diagnostic~) +[debug] [2021-11-29T13:53:23.390Z] DEBUG: [worker-pool] Adding worker with key ~diagnostic~, total=2 +[debug] [2021-11-29T13:53:23.390Z] DEBUG: [worker-pool] submitWork(triggerId=) +[debug] [2021-11-29T13:53:23.390Z] DEBUG: [worker-~diagnostic~-c2703dbc-52ca-484f-a116-81e987c03ea1]: Assigning socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_8989.sock +[debug] [2021-11-29T13:53:23.390Z] DEBUG: [worker-~diagnostic~-c2703dbc-52ca-484f-a116-81e987c03ea1]: BUSY +[debug] [2021-11-29T13:53:23.391Z] DEBUG: [worker-~diagnostic~-500c3e65-0f14-401e-a981-c8e3fc3421ac]: exited +[debug] [2021-11-29T13:53:23.391Z] DEBUG: [worker-~diagnostic~-500c3e65-0f14-401e-a981-c8e3fc3421ac]: FINISHED +[debug] [2021-11-29T13:53:23.529Z] DEBUG: [runtime-status] [8989] Functions runtime initialized. {"cwd":"/Users/mentor/dev/rocketeer-nft/functions","node_version":"12.20.1"} +[debug] [2021-11-29T13:53:23.530Z] DEBUG: [runtime-status] [8989] Disabled runtime features: undefined +[debug] [2021-11-29T13:53:23.534Z] DEBUG: [runtime-status] [8989] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:53:23.535Z] DEBUG: [runtime-status] [8989] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:53:23.535Z] DEBUG: [runtime-status] [8989] Found local functions config: /Users/mentor/dev/rocketeer-nft/functions/.runtimeconfig.json +[debug] [2021-11-29T13:53:23.536Z] DEBUG: [runtime-status] [8989] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:53:23.537Z] DEBUG: [runtime-status] [8989] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}] +[debug] [2021-11-29T13:53:23.538Z] DEBUG: [runtime-status] [8989] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:53:23.573Z] DEBUG: [runtime-status] [8989] Checked functions.config() {"config":{"api":{"secret":"Only Mentor should ever manually call this endpoint!"},"infura":{"projectid":"47881c52385944a9b92504e7e975f6ec"},"integration":{"secret":"Only Mentor should ever manually call this endpoint!"}}} +[debug] [2021-11-29T13:53:23.573Z] DEBUG: [runtime-status] [8989] firebase-functions has been stubbed. {"functionsResolution":{"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"}} +[debug] [2021-11-29T13:53:23.573Z] DEBUG: [runtime-status] [8989] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:53:23.576Z] DEBUG: [runtime-status] [8989] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:53:23.576Z] DEBUG: [runtime-status] [8989] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:53:23.576Z] DEBUG: [runtime-status] [8989] firebase-admin has been stubbed. {"adminResolution":{"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"}} +[debug] [2021-11-29T13:53:24.633Z] DEBUG: [worker-~diagnostic~-c2703dbc-52ca-484f-a116-81e987c03ea1]: IDLE +[debug] [2021-11-29T13:53:59.379Z] DEBUG: File /Users/mentor/dev/rocketeer-nft/functions/integrations/opensea.js changed, reloading triggers +[debug] [2021-11-29T13:54:00.384Z] DEBUG: [worker-pool] Shutting down IDLE worker (~diagnostic~) +[debug] [2021-11-29T13:54:00.384Z] DEBUG: [worker-~diagnostic~-c2703dbc-52ca-484f-a116-81e987c03ea1]: FINISHING +[debug] [2021-11-29T13:54:00.384Z] DEBUG: [worker-pool] Cleaned up workers for ~diagnostic~: 2 --> 1 +[debug] [2021-11-29T13:54:00.393Z] DEBUG: [worker-pool] addWorker(~diagnostic~) +[debug] [2021-11-29T13:54:00.394Z] DEBUG: [worker-pool] Adding worker with key ~diagnostic~, total=2 +[debug] [2021-11-29T13:54:00.394Z] DEBUG: [worker-pool] submitWork(triggerId=) +[debug] [2021-11-29T13:54:00.394Z] DEBUG: [worker-~diagnostic~-98c239f3-1752-4fb2-8f02-5817640696d2]: Assigning socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_10243.sock +[debug] [2021-11-29T13:54:00.394Z] DEBUG: [worker-~diagnostic~-98c239f3-1752-4fb2-8f02-5817640696d2]: BUSY +[debug] [2021-11-29T13:54:00.396Z] DEBUG: [worker-~diagnostic~-c2703dbc-52ca-484f-a116-81e987c03ea1]: exited +[debug] [2021-11-29T13:54:00.396Z] DEBUG: [worker-~diagnostic~-c2703dbc-52ca-484f-a116-81e987c03ea1]: FINISHED +[debug] [2021-11-29T13:54:00.543Z] DEBUG: [runtime-status] [10243] Functions runtime initialized. {"cwd":"/Users/mentor/dev/rocketeer-nft/functions","node_version":"12.20.1"} +[debug] [2021-11-29T13:54:00.545Z] DEBUG: [runtime-status] [10243] Disabled runtime features: undefined +[debug] [2021-11-29T13:54:00.549Z] DEBUG: [runtime-status] [10243] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:54:00.550Z] DEBUG: [runtime-status] [10243] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:00.550Z] DEBUG: [runtime-status] [10243] Found local functions config: /Users/mentor/dev/rocketeer-nft/functions/.runtimeconfig.json +[debug] [2021-11-29T13:54:00.551Z] DEBUG: [runtime-status] [10243] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:00.552Z] DEBUG: [runtime-status] [10243] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}] +[debug] [2021-11-29T13:54:00.553Z] DEBUG: [runtime-status] [10243] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:00.593Z] DEBUG: [runtime-status] [10243] Checked functions.config() {"config":{"api":{"secret":"Only Mentor should ever manually call this endpoint!"},"infura":{"projectid":"47881c52385944a9b92504e7e975f6ec"},"integration":{"secret":"Only Mentor should ever manually call this endpoint!"}}} +[debug] [2021-11-29T13:54:00.593Z] DEBUG: [runtime-status] [10243] firebase-functions has been stubbed. {"functionsResolution":{"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"}} +[debug] [2021-11-29T13:54:00.594Z] DEBUG: [runtime-status] [10243] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:00.595Z] DEBUG: [runtime-status] [10243] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:54:00.595Z] DEBUG: [runtime-status] [10243] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:00.597Z] DEBUG: [runtime-status] [10243] firebase-admin has been stubbed. {"adminResolution":{"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"}} +[debug] [2021-11-29T13:54:01.705Z] DEBUG: [worker-~diagnostic~-98c239f3-1752-4fb2-8f02-5817640696d2]: IDLE +[debug] [2021-11-29T13:54:05.899Z] DEBUG: File /Users/mentor/dev/rocketeer-nft/functions/index.js changed, reloading triggers +[debug] [2021-11-29T13:54:06.901Z] DEBUG: [worker-pool] Shutting down IDLE worker (~diagnostic~) +[debug] [2021-11-29T13:54:06.902Z] DEBUG: [worker-~diagnostic~-98c239f3-1752-4fb2-8f02-5817640696d2]: FINISHING +[debug] [2021-11-29T13:54:06.902Z] DEBUG: [worker-pool] Cleaned up workers for ~diagnostic~: 2 --> 1 +[debug] [2021-11-29T13:54:06.908Z] DEBUG: [worker-pool] addWorker(~diagnostic~) +[debug] [2021-11-29T13:54:06.909Z] DEBUG: [worker-pool] Adding worker with key ~diagnostic~, total=2 +[debug] [2021-11-29T13:54:06.909Z] DEBUG: [worker-pool] submitWork(triggerId=) +[debug] [2021-11-29T13:54:06.909Z] DEBUG: [worker-~diagnostic~-917542ae-c835-4ceb-b732-8d995c0d93d8]: Assigning socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_10467.sock +[debug] [2021-11-29T13:54:06.910Z] DEBUG: [worker-~diagnostic~-917542ae-c835-4ceb-b732-8d995c0d93d8]: BUSY +[debug] [2021-11-29T13:54:06.911Z] DEBUG: [worker-~diagnostic~-98c239f3-1752-4fb2-8f02-5817640696d2]: exited +[debug] [2021-11-29T13:54:06.911Z] DEBUG: [worker-~diagnostic~-98c239f3-1752-4fb2-8f02-5817640696d2]: FINISHED +[debug] [2021-11-29T13:54:07.059Z] DEBUG: [runtime-status] [10467] Functions runtime initialized. {"cwd":"/Users/mentor/dev/rocketeer-nft/functions","node_version":"12.20.1"} +[debug] [2021-11-29T13:54:07.060Z] DEBUG: [runtime-status] [10467] Disabled runtime features: undefined +[debug] [2021-11-29T13:54:07.063Z] DEBUG: [runtime-status] [10467] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:54:07.064Z] DEBUG: [runtime-status] [10467] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:07.065Z] DEBUG: [runtime-status] [10467] Found local functions config: /Users/mentor/dev/rocketeer-nft/functions/.runtimeconfig.json +[debug] [2021-11-29T13:54:07.065Z] DEBUG: [runtime-status] [10467] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:07.067Z] DEBUG: [runtime-status] [10467] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}] +[debug] [2021-11-29T13:54:07.068Z] DEBUG: [runtime-status] [10467] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:07.106Z] DEBUG: [runtime-status] [10467] Checked functions.config() {"config":{"api":{"secret":"Only Mentor should ever manually call this endpoint!"},"infura":{"projectid":"47881c52385944a9b92504e7e975f6ec"},"integration":{"secret":"Only Mentor should ever manually call this endpoint!"}}} +[debug] [2021-11-29T13:54:07.106Z] DEBUG: [runtime-status] [10467] firebase-functions has been stubbed. {"functionsResolution":{"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"}} +[debug] [2021-11-29T13:54:07.107Z] DEBUG: [runtime-status] [10467] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:07.107Z] DEBUG: [runtime-status] [10467] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:54:07.108Z] DEBUG: [runtime-status] [10467] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:07.108Z] DEBUG: [runtime-status] [10467] firebase-admin has been stubbed. {"adminResolution":{"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"}} +[debug] [2021-11-29T13:54:08.176Z] DEBUG: [worker-~diagnostic~-917542ae-c835-4ceb-b732-8d995c0d93d8]: IDLE +[debug] [2021-11-29T13:54:13.401Z] DEBUG: File /Users/mentor/dev/rocketeer-nft/functions/integrations/opensea.js changed, reloading triggers +[debug] [2021-11-29T13:54:14.404Z] DEBUG: [worker-pool] Shutting down IDLE worker (~diagnostic~) +[debug] [2021-11-29T13:54:14.404Z] DEBUG: [worker-~diagnostic~-917542ae-c835-4ceb-b732-8d995c0d93d8]: FINISHING +[debug] [2021-11-29T13:54:14.404Z] DEBUG: [worker-pool] Cleaned up workers for ~diagnostic~: 2 --> 1 +[debug] [2021-11-29T13:54:14.412Z] DEBUG: [worker-pool] addWorker(~diagnostic~) +[debug] [2021-11-29T13:54:14.413Z] DEBUG: [worker-pool] Adding worker with key ~diagnostic~, total=2 +[debug] [2021-11-29T13:54:14.413Z] DEBUG: [worker-pool] submitWork(triggerId=) +[debug] [2021-11-29T13:54:14.413Z] DEBUG: [worker-~diagnostic~-1c9a9909-2014-4d29-8afc-5fb6012fc70d]: Assigning socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_10726.sock +[debug] [2021-11-29T13:54:14.413Z] DEBUG: [worker-~diagnostic~-1c9a9909-2014-4d29-8afc-5fb6012fc70d]: BUSY +[debug] [2021-11-29T13:54:14.414Z] DEBUG: [worker-~diagnostic~-917542ae-c835-4ceb-b732-8d995c0d93d8]: exited +[debug] [2021-11-29T13:54:14.414Z] DEBUG: [worker-~diagnostic~-917542ae-c835-4ceb-b732-8d995c0d93d8]: FINISHED +[debug] [2021-11-29T13:54:14.567Z] DEBUG: [runtime-status] [10726] Functions runtime initialized. {"cwd":"/Users/mentor/dev/rocketeer-nft/functions","node_version":"12.20.1"} +[debug] [2021-11-29T13:54:14.568Z] DEBUG: [runtime-status] [10726] Disabled runtime features: undefined +[debug] [2021-11-29T13:54:14.571Z] DEBUG: [runtime-status] [10726] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:54:14.572Z] DEBUG: [runtime-status] [10726] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:14.573Z] DEBUG: [runtime-status] [10726] Found local functions config: /Users/mentor/dev/rocketeer-nft/functions/.runtimeconfig.json +[debug] [2021-11-29T13:54:14.576Z] DEBUG: [runtime-status] [10726] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:14.576Z] DEBUG: [runtime-status] [10726] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}] +[debug] [2021-11-29T13:54:14.576Z] DEBUG: [runtime-status] [10726] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:14.614Z] DEBUG: [runtime-status] [10726] Checked functions.config() {"config":{"api":{"secret":"Only Mentor should ever manually call this endpoint!"},"infura":{"projectid":"47881c52385944a9b92504e7e975f6ec"},"integration":{"secret":"Only Mentor should ever manually call this endpoint!"}}} +[debug] [2021-11-29T13:54:14.614Z] DEBUG: [runtime-status] [10726] firebase-functions has been stubbed. {"functionsResolution":{"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"}} +[debug] [2021-11-29T13:54:14.614Z] DEBUG: [runtime-status] [10726] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:14.615Z] DEBUG: [runtime-status] [10726] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:54:14.617Z] DEBUG: [runtime-status] [10726] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:14.618Z] DEBUG: [runtime-status] [10726] firebase-admin has been stubbed. {"adminResolution":{"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"}} +[debug] [2021-11-29T13:54:15.676Z] DEBUG: [worker-~diagnostic~-1c9a9909-2014-4d29-8afc-5fb6012fc70d]: IDLE +[debug] [2021-11-29T13:54:18.105Z] DEBUG: File /Users/mentor/dev/rocketeer-nft/functions/integrations/opensea.js changed, reloading triggers +[debug] [2021-11-29T13:54:19.111Z] DEBUG: [worker-pool] Shutting down IDLE worker (~diagnostic~) +[debug] [2021-11-29T13:54:19.111Z] DEBUG: [worker-~diagnostic~-1c9a9909-2014-4d29-8afc-5fb6012fc70d]: FINISHING +[debug] [2021-11-29T13:54:19.111Z] DEBUG: [worker-pool] Cleaned up workers for ~diagnostic~: 2 --> 1 +[debug] [2021-11-29T13:54:19.126Z] DEBUG: [worker-pool] addWorker(~diagnostic~) +[debug] [2021-11-29T13:54:19.127Z] DEBUG: [worker-pool] Adding worker with key ~diagnostic~, total=2 +[debug] [2021-11-29T13:54:19.127Z] DEBUG: [worker-pool] submitWork(triggerId=) +[debug] [2021-11-29T13:54:19.127Z] DEBUG: [worker-~diagnostic~-9a6400ca-8655-45b5-9d84-6aa03d29e9ab]: Assigning socketPath: /var/folders/px/qc_bkgpd79n7vssdnpwhqbs00000gn/T/fire_emu_10870.sock +[debug] [2021-11-29T13:54:19.127Z] DEBUG: [worker-~diagnostic~-9a6400ca-8655-45b5-9d84-6aa03d29e9ab]: BUSY +[debug] [2021-11-29T13:54:19.129Z] DEBUG: [worker-~diagnostic~-1c9a9909-2014-4d29-8afc-5fb6012fc70d]: exited +[debug] [2021-11-29T13:54:19.129Z] DEBUG: [worker-~diagnostic~-1c9a9909-2014-4d29-8afc-5fb6012fc70d]: FINISHED +[debug] [2021-11-29T13:54:19.316Z] DEBUG: [runtime-status] [10870] Functions runtime initialized. {"cwd":"/Users/mentor/dev/rocketeer-nft/functions","node_version":"12.20.1"} +[debug] [2021-11-29T13:54:19.317Z] DEBUG: [runtime-status] [10870] Disabled runtime features: undefined +[debug] [2021-11-29T13:54:19.320Z] DEBUG: [runtime-status] [10870] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:54:19.321Z] DEBUG: [runtime-status] [10870] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:19.322Z] DEBUG: [runtime-status] [10870] Found local functions config: /Users/mentor/dev/rocketeer-nft/functions/.runtimeconfig.json +[debug] [2021-11-29T13:54:19.322Z] DEBUG: [runtime-status] [10870] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:19.324Z] DEBUG: [runtime-status] [10870] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"}] +[debug] [2021-11-29T13:54:19.324Z] DEBUG: [runtime-status] [10870] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:19.361Z] DEBUG: [runtime-status] [10870] Checked functions.config() {"config":{"api":{"secret":"Only Mentor should ever manually call this endpoint!"},"infura":{"projectid":"47881c52385944a9b92504e7e975f6ec"},"integration":{"secret":"Only Mentor should ever manually call this endpoint!"}}} +[debug] [2021-11-29T13:54:19.361Z] DEBUG: [runtime-status] [10870] firebase-functions has been stubbed. {"functionsResolution":{"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"}} +[debug] [2021-11-29T13:54:19.362Z] DEBUG: [runtime-status] [10870] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:19.363Z] DEBUG: [runtime-status] [10870] Resolved module firebase-admin {"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"} +[debug] [2021-11-29T13:54:19.365Z] DEBUG: [runtime-status] [10870] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.15.7","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-functions/lib/index.js"} +[debug] [2021-11-29T13:54:19.365Z] DEBUG: [runtime-status] [10870] firebase-admin has been stubbed. {"adminResolution":{"declared":true,"installed":true,"version":"10.0.0","resolution":"/Users/mentor/dev/rocketeer-nft/functions/node_modules/firebase-admin/lib/index.js"}} +[debug] [2021-11-29T13:54:20.052Z] [functions] Stopping Functions Emulator +[warn] ⚠ Your function was killed because it raised an unhandled error. {"metadata":{"emulator":{"name":"functions"},"message":"Your function was killed because it raised an unhandled error."}} +[debug] [2021-11-29T13:54:20.061Z] DEBUG: [worker-~diagnostic~-9a6400ca-8655-45b5-9d84-6aa03d29e9ab]: exited +[debug] [2021-11-29T13:54:20.061Z] DEBUG: [worker-~diagnostic~-9a6400ca-8655-45b5-9d84-6aa03d29e9ab]: FINISHED diff --git a/functions/index.js b/functions/index.js index 980a365..94fa6cd 100644 --- a/functions/index.js +++ b/functions/index.js @@ -12,4 +12,7 @@ const runtime = { exports.testnetMetadata = functions.runWith( runtime ).https.onRequest( testnetAPI ) // Mainnet endpoint -exports.mainnetMetadata = functions.runWith( runtime ).https.onRequest( mainnetAPI ) \ No newline at end of file +exports.mainnetMetadata = functions.runWith( runtime ).https.onRequest( mainnetAPI ) + +// const { forceOpenseaToUpdateMetadataForRocketeer } = require( './integrations/opensea' ) +// exports.refreshOpensea = functions.runWith( runtime ).https.onCall( ( id, context ) => forceOpenseaToUpdateMetadataForRocketeer( id ) ) \ No newline at end of file diff --git a/functions/integrations/changingroom.js b/functions/integrations/changingroom.js index 3e88b54..5bc58a3 100644 --- a/functions/integrations/changingroom.js +++ b/functions/integrations/changingroom.js @@ -21,6 +21,10 @@ exports.generateNewOutfit = async function( req, res ) { try { + // Disable changing room for now + const potentialLaunchDate = new Date( `2021-12-10` ) + if( new Date() < potentialLaunchDate ) throw new Error( `Changing room is not yet live, sorry. Stay tuned on Discord.` ) + // Get request data const { message, signature, signatory } = req.body if( !message || !signatory || !signature ) throw new Error( `Malformed request` ) diff --git a/functions/integrations/opensea.js b/functions/integrations/opensea.js new file mode 100644 index 0000000..8e34644 --- /dev/null +++ b/functions/integrations/opensea.js @@ -0,0 +1,32 @@ +const { contractAddress } = require( '../modules/contract' ) +const puppeteer = require( 'puppeteer-extra' ) +const StealthPlugin = require('puppeteer-extra-plugin-stealth') + +/* /////////////////////////////// +// Force opensea to update metadata +// /////////////////////////////*/ +exports.forceOpenseaToUpdateMetadataForRocketeer = async function( tokenId, network='mainnet' ) { + + try { + + const contract = contractAddress[ network ] + + puppeteer.use(StealthPlugin()) + + const browser = await puppeteer.launch( { headless: true } ) + const page = await browser.newPage() + + await page.goto( `https://opensea.io/assets/${ contract }/${ tokenId }`, { waitUntil: 'networkidle2' } ) + await page.screenshot( { path: 'pre-debug.png' } ) + await page.click( `i[value=refresh]` ) + await page.waitForTimeout(5000) + await browser.close() + + return true + + } catch( e ) { + // Silently log but do not break + console.error( e ) + } + +} \ No newline at end of file diff --git a/functions/modules/contract.js b/functions/modules/contract.js index 3e76ceb..2600f32 100644 --- a/functions/modules/contract.js +++ b/functions/modules/contract.js @@ -40,5 +40,6 @@ async function getTotalSupply( network='mainnet' ) { } module.exports = { - getTotalSupply: getTotalSupply + getTotalSupply: getTotalSupply, + contractAddress: contractAddress } \ No newline at end of file diff --git a/functions/modules/helpers.js b/functions/modules/helpers.js index 106ff25..54a48a4 100644 --- a/functions/modules/helpers.js +++ b/functions/modules/helpers.js @@ -2,6 +2,9 @@ // Helper functions // /////////////////////////////// +// Wait in async +exports.wait = timeInMs => new Promise( resolve => setTimeout( resolve ), timeInMs ) + // Pick random item from an array const pickRandomArrayEntry = array => array[ Math.floor( Math.random() * array.length ) ] exports.pickRandomArrayEntry = pickRandomArrayEntry diff --git a/functions/nft-media/rocketeer.js b/functions/nft-media/rocketeer.js index be9c5e1..c44b396 100644 --- a/functions/nft-media/rocketeer.js +++ b/functions/nft-media/rocketeer.js @@ -3,7 +3,7 @@ const { db } = require( '../modules/firebase' ) const { getTotalSupply } = require( '../modules/contract' ) const { pickRandomArrayEntry, pickRandomAttributes, randomNumberBetween, globalAttributes, heavenlyBodies, web2domain, getColorName } = require( '../modules/helpers' ) const svgFromAttributes = require( './svg-generator' ) - +const { forceOpenseaToUpdateMetadataForRocketeer } = require( '../integrations/opensea' ) // /////////////////////////////// // Caching @@ -123,6 +123,9 @@ async function generateRocketeer( id, network='mainnet' ) { // Save new Rocketeer await db.collection( `${ network }Rocketeers` ).doc( id ).set( rocketeer, { merge: true } ) + // Force opensea to update metadata + await forceOpenseaToUpdateMetadataForRocketeer( id, network ) + return rocketeer } diff --git a/functions/package-lock.json b/functions/package-lock.json index 8be990b..a24ea00 100644 --- a/functions/package-lock.json +++ b/functions/package-lock.json @@ -894,6 +894,14 @@ "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==" }, + "@types/debug": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "requires": { + "@types/ms": "*" + } + }, "@types/express": { "version": "4.17.13", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz", @@ -949,6 +957,11 @@ "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==" }, + "@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" + }, "@types/node": { "version": "16.10.5", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.5.tgz", @@ -962,6 +975,14 @@ "@types/node": "*" } }, + "@types/puppeteer": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/@types/puppeteer/-/puppeteer-5.4.4.tgz", + "integrity": "sha512-3Nau+qi69CN55VwZb0ATtdUAlYlqOOQ3OfQfq0Hqgc4JMFXiQT/XInlwQ9g6LbicDslE6loIFsXFklGh5XmI6Q==", + "requires": { + "@types/node": "*" + } + }, "@types/qs": { "version": "6.9.7", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", @@ -989,6 +1010,15 @@ "@types/node": "*" } }, + "@types/yauzl": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.2.tgz", + "integrity": "sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA==", + "optional": true, + "requires": { + "@types/node": "*" + } + }, "abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -1084,6 +1114,11 @@ "sprintf-js": "~1.0.2" } }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -1190,6 +1225,16 @@ "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "blakejs": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", @@ -1547,6 +1592,18 @@ "wrap-ansi": "^7.0.0" } }, + "clone-deep": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.2.4.tgz", + "integrity": "sha1-TnPdCen7lxzDhnDF3O2cGJZIHMY=", + "requires": { + "for-own": "^0.1.3", + "is-plain-object": "^2.0.1", + "kind-of": "^3.0.2", + "lazy-cache": "^1.0.3", + "shallow-clone": "^0.1.2" + } + }, "clone-response": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", @@ -1740,6 +1797,14 @@ "tmp": "0.0.33" }, "dependencies": { + "agent-base": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", + "requires": { + "es6-promisify": "^5.0.0" + } + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -1775,6 +1840,95 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "extract-zip": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz", + "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==", + "requires": { + "concat-stream": "^1.6.2", + "debug": "^2.6.9", + "mkdirp": "^0.5.4", + "yauzl": "^2.10.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "https-proxy-agent": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "requires": { + "agent-base": "^4.3.0", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "puppeteer": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.20.0.tgz", + "integrity": "sha512-bt48RDBy2eIwZPrkgbcwHtb51mj2nKvHOPMaSH2IsWiv7lOG9k9zhaRzpDZafrk05ajMc3cu+lSQYYOfH2DkVQ==", + "requires": { + "debug": "^4.1.0", + "extract-zip": "^1.6.6", + "https-proxy-agent": "^2.2.1", + "mime": "^2.0.3", + "progress": "^2.0.1", + "proxy-from-env": "^1.0.0", + "rimraf": "^2.6.1", + "ws": "^6.1.0" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + }, + "ws": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", + "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", + "requires": { + "async-limiter": "~1.0.0" + } } } }, @@ -2001,6 +2155,11 @@ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" + }, "defer-to-connect": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", @@ -2038,6 +2197,11 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, + "devtools-protocol": { + "version": "0.0.937139", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.937139.tgz", + "integrity": "sha512-daj+rzR3QSxsPRy5vjjthn58axO8c11j58uY0lG5vvlJk/EiOdCWOptGdkXDjtuRHr78emKq0udHCXM4trhoDQ==" + }, "dicer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.3.0.tgz", @@ -2729,36 +2893,23 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "extract-zip": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz", - "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "requires": { - "concat-stream": "^1.6.2", - "debug": "^2.6.9", - "mkdirp": "^0.5.4", + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", "yauzl": "^2.10.0" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "requires": { - "ms": "2.0.0" + "pump": "^3.0.0" } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, @@ -2847,6 +2998,15 @@ } } }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, "firebase-admin": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/firebase-admin/-/firebase-admin-10.0.0.tgz", @@ -2913,6 +3073,19 @@ "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", "dev": true }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "requires": { + "for-in": "^1.0.1" + } + }, "foreach": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", @@ -2943,6 +3116,11 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "fs-extra": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", @@ -3468,6 +3646,11 @@ "has-tostringtag": "^1.0.0" } }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, "is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", @@ -3481,6 +3664,11 @@ "has-tostringtag": "^1.0.0" } }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3548,6 +3736,14 @@ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "^3.0.1" + } + }, "is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", @@ -3636,6 +3832,11 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -3935,6 +4136,19 @@ "json-buffer": "3.0.0" } }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -3950,6 +4164,14 @@ "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.5.tgz", "integrity": "sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA==" }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -4091,6 +4313,16 @@ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, + "merge-deep": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/merge-deep/-/merge-deep-3.0.3.tgz", + "integrity": "sha512-qtmzAS6t6grwEkNrunqTBdn0qKwFgNWvlxUbAV8es9M7Ot1EbyApytCnvE0jALPa46ZpKDUo527kKiaWplmlFA==", + "requires": { + "arr-union": "^3.1.0", + "clone-deep": "^0.2.4", + "kind-of": "^3.0.2" + } + }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -4188,11 +4420,32 @@ "minipass": "^2.9.0" } }, + "mixin-object": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", + "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", + "requires": { + "for-in": "^0.1.3", + "is-extendable": "^0.1.1" + }, + "dependencies": { + "for-in": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", + "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=" + } + } + }, "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, "mkdirp-promise": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", @@ -4279,7 +4532,6 @@ "version": "2.6.5", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.5.tgz", "integrity": "sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==", - "optional": true, "requires": { "whatwg-url": "^5.0.0" } @@ -4425,6 +4677,24 @@ "yocto-queue": "^0.1.0" } }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + }, + "dependencies": { + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + } + } + }, "p-timeout": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", @@ -4433,6 +4703,11 @@ "p-finally": "^1.0.0" } }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4469,6 +4744,11 @@ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -4513,6 +4793,14 @@ "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", "dev": true }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "requires": { + "find-up": "^4.0.0" + } + }, "pollock": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/pollock/-/pollock-0.2.1.tgz", @@ -4639,65 +4927,109 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "puppeteer": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.20.0.tgz", - "integrity": "sha512-bt48RDBy2eIwZPrkgbcwHtb51mj2nKvHOPMaSH2IsWiv7lOG9k9zhaRzpDZafrk05ajMc3cu+lSQYYOfH2DkVQ==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-12.0.0.tgz", + "integrity": "sha512-a+vLxtwuDLUIq8Vz8X5bX+YMhcQrgyfq0Jo5Wcm49EfUawgCxeCN9/rUAS3VdAAiQZ1PKiv9pGyQN8jj1ypecQ==", "requires": { - "debug": "^4.1.0", - "extract-zip": "^1.6.6", - "https-proxy-agent": "^2.2.1", - "mime": "^2.0.3", - "progress": "^2.0.1", - "proxy-from-env": "^1.0.0", - "rimraf": "^2.6.1", - "ws": "^6.1.0" + "debug": "4.3.2", + "devtools-protocol": "0.0.937139", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.0", + "node-fetch": "2.6.5", + "pkg-dir": "4.2.0", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "rimraf": "3.0.2", + "tar-fs": "2.1.1", + "unbzip2-stream": "1.4.3", + "ws": "8.2.3" }, "dependencies": { - "agent-base": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", - "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", - "requires": { - "es6-promisify": "^5.0.0" - } - }, - "https-proxy-agent": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", - "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", - "requires": { - "agent-base": "^4.3.0", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "requires": { - "glob": "^7.1.3" - } - }, "ws": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", - "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", - "requires": { - "async-limiter": "~1.0.0" - } + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", + "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==" } } }, + "puppeteer-extra": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/puppeteer-extra/-/puppeteer-extra-3.2.3.tgz", + "integrity": "sha512-CnSN9yIedbAbS8WmRybaDHJLf6goRk+VYM/kbH6i/+EMadCaAeh2O+1/mFUMN2LbkbDNAp2Vd/UwrTVCHjTxyg==", + "requires": { + "@types/debug": "^4.1.0", + "@types/puppeteer": "*", + "debug": "^4.1.1", + "deepmerge": "^4.2.2" + } + }, + "puppeteer-extra-plugin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/puppeteer-extra-plugin/-/puppeteer-extra-plugin-3.2.0.tgz", + "integrity": "sha512-wbiw12USE3b+maMk/IMaroYsz7rusVI9G+ml6pCFCnFFh91Z9BAEiVzhCpOHuquVXEiCCsDTWhDUgvdNxQHOyw==", + "requires": { + "@types/debug": "^4.1.0", + "debug": "^4.1.1", + "merge-deep": "^3.0.1" + } + }, + "puppeteer-extra-plugin-stealth": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/puppeteer-extra-plugin-stealth/-/puppeteer-extra-plugin-stealth-2.9.0.tgz", + "integrity": "sha512-erZ9lkIcOkfYmLPP2jv2AiqvNBFhQJinWJhcm40pqSjwJTsZXHsTARUyRCsBYEEBvNIs3Wz3E0zVlTRc4IJ6Hg==", + "requires": { + "debug": "^4.1.1", + "puppeteer-extra-plugin": "^3.2.0", + "puppeteer-extra-plugin-user-preferences": "^2.3.1" + } + }, + "puppeteer-extra-plugin-user-data-dir": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/puppeteer-extra-plugin-user-data-dir/-/puppeteer-extra-plugin-user-data-dir-2.3.1.tgz", + "integrity": "sha512-yhaYMaNFdfQ1LbA94ZElW1zU8rh+MFmO+GZA0gtQ8BXc+UZ6aRrWS9flIZvlXDzk+ZsXhCbTEohEwZ8lEDLRVA==", + "requires": { + "debug": "^4.1.1", + "fs-extra": "^10.0.0", + "puppeteer-extra-plugin": "^3.2.0" + }, + "dependencies": { + "fs-extra": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", + "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + } + } + }, + "puppeteer-extra-plugin-user-preferences": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/puppeteer-extra-plugin-user-preferences/-/puppeteer-extra-plugin-user-preferences-2.3.1.tgz", + "integrity": "sha512-t/FyGQj2aqtHOROqL02z+k2kNQe0cjT0Hd9pG5FJ7x0JXx1722PhOuK7FeJLQMJ+BLl2YvCUgaWSC8Zohjts5A==", + "requires": { + "debug": "^4.1.1", + "deepmerge": "^4.2.2", + "puppeteer-extra-plugin": "^3.2.0", + "puppeteer-extra-plugin-user-data-dir": "^2.3.1" + } + }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", @@ -4852,7 +5184,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, "requires": { "glob": "^7.1.3" } @@ -5008,6 +5339,32 @@ "safe-buffer": "^5.0.1" } }, + "shallow-clone": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", + "integrity": "sha1-WQnodLp3EG1zrEFM/sH/yofZcGA=", + "requires": { + "is-extendable": "^0.1.1", + "kind-of": "^2.0.1", + "lazy-cache": "^0.2.3", + "mixin-object": "^2.0.1" + }, + "dependencies": { + "kind-of": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", + "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", + "requires": { + "is-buffer": "^1.0.2" + } + }, + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + } + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -5346,6 +5703,29 @@ } } }, + "tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "requires": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + }, "teeny-request": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-7.1.3.tgz", @@ -5365,6 +5745,11 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -5406,8 +5791,7 @@ "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", - "optional": true + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, "tslib": { "version": "2.3.1", @@ -5485,6 +5869,15 @@ "which-boxed-primitive": "^1.0.2" } }, + "unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, "unique-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", @@ -5905,8 +6298,7 @@ "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", - "optional": true + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" }, "websocket": { "version": "1.0.34", @@ -5978,7 +6370,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "optional": true, "requires": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" diff --git a/functions/package.json b/functions/package.json index 4e9cfff..7edabdf 100644 --- a/functions/package.json +++ b/functions/package.json @@ -22,6 +22,9 @@ "firebase-admin": "^10.0.0", "firebase-functions": "^3.11.0", "jsdom": "^18.0.0", + "puppeteer": "^12.0.0", + "puppeteer-extra": "^3.2.3", + "puppeteer-extra-plugin-stealth": "^2.9.0", "random-name": "^0.1.2", "web3": "^1.6.0" }, diff --git a/functions/pre-debug.png b/functions/pre-debug.png new file mode 100644 index 0000000..9c18a30 Binary files /dev/null and b/functions/pre-debug.png differ