MNTOR-2329/switch from mozlog to winston (#3596)
* MNTOR-2329 - remove `mozlog` and switch to `winston` wherever possible
This commit is contained in:
Родитель
a229d4f75a
Коммит
9ac2c85450
|
@ -7,7 +7,6 @@
|
|||
"": {
|
||||
"name": "monitor",
|
||||
"version": "1.0.0",
|
||||
"hasInstallScript": true,
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.428.0",
|
||||
|
@ -34,11 +33,9 @@
|
|||
"jsonwebtoken": "^9.0.0",
|
||||
"jwk-to-pem": "^2.0.5",
|
||||
"knex": "^3.0.1",
|
||||
"mozlog": "^3.0.2",
|
||||
"next": "^13.5.4",
|
||||
"next-auth": "^4.23.2",
|
||||
"nodemailer": "^6.9.1",
|
||||
"patch-package": "^8.0.0",
|
||||
"pg": "^8.11.3",
|
||||
"react": "^18.2.0",
|
||||
"react-aria": "^3.29.0",
|
||||
|
@ -12609,11 +12606,6 @@
|
|||
"node": ">=12 <14 || 14.2 - 14.9 || >14.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@yarnpkg/lockfile": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz",
|
||||
"integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ=="
|
||||
},
|
||||
"node_modules/abab": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz",
|
||||
|
@ -13182,14 +13174,6 @@
|
|||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
||||
},
|
||||
"node_modules/at-least-node": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
|
||||
"integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==",
|
||||
"engines": {
|
||||
"node": ">= 4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/available-typed-arrays": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
|
||||
|
@ -14305,6 +14289,7 @@
|
|||
"version": "3.8.0",
|
||||
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz",
|
||||
"integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
|
@ -15202,11 +15187,6 @@
|
|||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/dbug": {
|
||||
"version": "0.4.2",
|
||||
"resolved": "https://registry.npmjs.org/dbug/-/dbug-0.4.2.tgz",
|
||||
"integrity": "sha512-nrmsMK1msY0WXwfA2czrKVDgpIYJR2JJaq5cX4DwW7Rxm11nXHqouh9wmubEs44bHYxk8CqeP/Jx4URqSB961w=="
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
|
@ -17625,14 +17605,6 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/find-yarn-workspace-root": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz",
|
||||
"integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==",
|
||||
"dependencies": {
|
||||
"micromatch": "^4.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/flat-cache": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
|
||||
|
@ -17829,28 +17801,6 @@
|
|||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fs-extra": {
|
||||
"version": "9.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
|
||||
"integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
|
||||
"dependencies": {
|
||||
"at-least-node": "^1.0.0",
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/fs-extra/node_modules/universalify": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
||||
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fs-minipass": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
|
||||
|
@ -18502,25 +18452,6 @@
|
|||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/has-ansi": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
||||
"integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==",
|
||||
"dependencies": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/has-ansi/node_modules/ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/has-bigints": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz",
|
||||
|
@ -19086,80 +19017,6 @@
|
|||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/intel": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/intel/-/intel-1.2.0.tgz",
|
||||
"integrity": "sha512-CUDyAtEeEeDo5YtwANOuDhxuFEOgInHvbMrBbhXCD4tAaHuzHM2llevtTeq2bmP8Jf7NkpN305pwDncRmhc1Wg==",
|
||||
"dependencies": {
|
||||
"chalk": "^1.1.0",
|
||||
"dbug": "~0.4.2",
|
||||
"stack-trace": "~0.0.9",
|
||||
"strftime": "~0.10.0",
|
||||
"symbol": "~0.3.1",
|
||||
"utcstring": "~0.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/intel/node_modules/ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/intel/node_modules/ansi-styles": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||
"integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/intel/node_modules/chalk": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^2.2.1",
|
||||
"escape-string-regexp": "^1.0.2",
|
||||
"has-ansi": "^2.0.0",
|
||||
"strip-ansi": "^3.0.0",
|
||||
"supports-color": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/intel/node_modules/escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/intel/node_modules/strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==",
|
||||
"dependencies": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/intel/node_modules/supports-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
||||
"integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==",
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/internal-slot": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz",
|
||||
|
@ -19385,6 +19242,7 @@
|
|||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
|
||||
"integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"is-docker": "cli.js"
|
||||
},
|
||||
|
@ -19731,6 +19589,7 @@
|
|||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
|
||||
"integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"is-docker": "^2.0.0"
|
||||
},
|
||||
|
@ -21973,17 +21832,6 @@
|
|||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
||||
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
|
||||
},
|
||||
"node_modules/json-stable-stringify": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.2.tgz",
|
||||
"integrity": "sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==",
|
||||
"dependencies": {
|
||||
"jsonify": "^0.0.1"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/json-stable-stringify-without-jsonify": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
|
||||
|
@ -22004,6 +21852,7 @@
|
|||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
||||
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
|
@ -22015,18 +21864,11 @@
|
|||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
||||
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonify": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz",
|
||||
"integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonwebtoken": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz",
|
||||
|
@ -22092,14 +21934,6 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/klaw-sync": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz",
|
||||
"integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.1.11"
|
||||
}
|
||||
},
|
||||
"node_modules/kleur": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
|
||||
|
@ -22967,11 +22801,6 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/merge": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/merge/-/merge-2.1.1.tgz",
|
||||
"integrity": "sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w=="
|
||||
},
|
||||
"node_modules/merge-descriptors": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
||||
|
@ -23187,15 +23016,6 @@
|
|||
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/mozlog": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/mozlog/-/mozlog-3.0.2.tgz",
|
||||
"integrity": "sha512-nu2pJV98gT0KFWE3sIHopR+QcSxZ2vCgnV+dvAAcCcOLjRoT3obtcINS4Vl0oc7zGEdhm0/MfE7D2MJGIwD/Ag==",
|
||||
"dependencies": {
|
||||
"intel": "^1.2.0",
|
||||
"merge": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/mri": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
|
||||
|
@ -23882,14 +23702,6 @@
|
|||
"integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/os-tmpdir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/p-defer": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-defer/-/p-defer-3.0.0.tgz",
|
||||
|
@ -24055,98 +23867,6 @@
|
|||
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/patch-package": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.0.tgz",
|
||||
"integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==",
|
||||
"dependencies": {
|
||||
"@yarnpkg/lockfile": "^1.1.0",
|
||||
"chalk": "^4.1.2",
|
||||
"ci-info": "^3.7.0",
|
||||
"cross-spawn": "^7.0.3",
|
||||
"find-yarn-workspace-root": "^2.0.0",
|
||||
"fs-extra": "^9.0.0",
|
||||
"json-stable-stringify": "^1.0.2",
|
||||
"klaw-sync": "^6.0.0",
|
||||
"minimist": "^1.2.6",
|
||||
"open": "^7.4.2",
|
||||
"rimraf": "^2.6.3",
|
||||
"semver": "^7.5.3",
|
||||
"slash": "^2.0.0",
|
||||
"tmp": "^0.0.33",
|
||||
"yaml": "^2.2.2"
|
||||
},
|
||||
"bin": {
|
||||
"patch-package": "index.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14",
|
||||
"npm": ">5"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dependencies": {
|
||||
"color-convert": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/open": {
|
||||
"version": "7.4.2",
|
||||
"resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz",
|
||||
"integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==",
|
||||
"dependencies": {
|
||||
"is-docker": "^2.0.0",
|
||||
"is-wsl": "^2.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/rimraf": {
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
|
||||
"integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
|
||||
"dependencies": {
|
||||
"glob": "^7.1.3"
|
||||
},
|
||||
"bin": {
|
||||
"rimraf": "bin.js"
|
||||
}
|
||||
},
|
||||
"node_modules/patch-package/node_modules/slash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
|
||||
"integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/path-browserify": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
|
||||
|
@ -26803,14 +26523,6 @@
|
|||
"node": ">=10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/strftime": {
|
||||
"version": "0.10.1",
|
||||
"resolved": "https://registry.npmjs.org/strftime/-/strftime-0.10.1.tgz",
|
||||
"integrity": "sha512-nVvH6JG8KlXFPC0f8lojLgEsPA18lRpLZ+RrJh/NkQV2tqOgZfbas8gcU8SFgnnqR3rWzZPYu6N2A3xzs/8rQg==",
|
||||
"engines": {
|
||||
"node": ">=0.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
|
@ -27347,11 +27059,6 @@
|
|||
"webpack": ">=2"
|
||||
}
|
||||
},
|
||||
"node_modules/symbol": {
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/symbol/-/symbol-0.3.1.tgz",
|
||||
"integrity": "sha512-SxMrE6uv9zhnBmTCpZna1u0TcZix1k2QASZ/DpF13rAo+0Ts40faFYsMTuAirgvbbjHw1byhJ949/fP20XzVZA=="
|
||||
},
|
||||
"node_modules/symbol-tree": {
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
|
||||
|
@ -27864,17 +27571,6 @@
|
|||
"integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/tmp": {
|
||||
"version": "0.0.33",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
|
||||
"integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
|
||||
"dependencies": {
|
||||
"os-tmpdir": "~1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tmpl": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz",
|
||||
|
@ -28633,11 +28329,6 @@
|
|||
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/utcstring": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/utcstring/-/utcstring-0.1.0.tgz",
|
||||
"integrity": "sha512-1EpWQ6CECkoys7aX3LImrFo4nYIigY2RQHJTvgzZQCB4/oA6jJvTLTcgilTxX57GrSHDIVMtGwYd+SujGJvvyw=="
|
||||
},
|
||||
"node_modules/util": {
|
||||
"version": "0.12.5",
|
||||
"resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz",
|
||||
|
@ -29406,6 +29097,7 @@
|
|||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz",
|
||||
"integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
|
@ -38852,11 +38544,6 @@
|
|||
"tslib": "^1.13.0"
|
||||
}
|
||||
},
|
||||
"@yarnpkg/lockfile": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz",
|
||||
"integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ=="
|
||||
},
|
||||
"abab": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz",
|
||||
|
@ -39292,11 +38979,6 @@
|
|||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
||||
},
|
||||
"at-least-node": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
|
||||
"integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg=="
|
||||
},
|
||||
"available-typed-arrays": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
|
||||
|
@ -40105,7 +39787,8 @@
|
|||
"ci-info": {
|
||||
"version": "3.8.0",
|
||||
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz",
|
||||
"integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw=="
|
||||
"integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==",
|
||||
"dev": true
|
||||
},
|
||||
"cipher-base": {
|
||||
"version": "1.0.4",
|
||||
|
@ -40825,11 +40508,6 @@
|
|||
"whatwg-url": "^12.0.0"
|
||||
}
|
||||
},
|
||||
"dbug": {
|
||||
"version": "0.4.2",
|
||||
"resolved": "https://registry.npmjs.org/dbug/-/dbug-0.4.2.tgz",
|
||||
"integrity": "sha512-nrmsMK1msY0WXwfA2czrKVDgpIYJR2JJaq5cX4DwW7Rxm11nXHqouh9wmubEs44bHYxk8CqeP/Jx4URqSB961w=="
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
|
@ -42710,14 +42388,6 @@
|
|||
"path-exists": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"find-yarn-workspace-root": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz",
|
||||
"integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==",
|
||||
"requires": {
|
||||
"micromatch": "^4.0.2"
|
||||
}
|
||||
},
|
||||
"flat-cache": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
|
||||
|
@ -42866,24 +42536,6 @@
|
|||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
|
||||
"dev": true
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "9.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
|
||||
"integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
|
||||
"requires": {
|
||||
"at-least-node": "^1.0.0",
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"universalify": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
||||
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"fs-minipass": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
|
||||
|
@ -43391,21 +43043,6 @@
|
|||
"function-bind": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"has-ansi": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
||||
"integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==",
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"has-bigints": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz",
|
||||
|
@ -43795,61 +43432,6 @@
|
|||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
|
||||
"dev": true
|
||||
},
|
||||
"intel": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/intel/-/intel-1.2.0.tgz",
|
||||
"integrity": "sha512-CUDyAtEeEeDo5YtwANOuDhxuFEOgInHvbMrBbhXCD4tAaHuzHM2llevtTeq2bmP8Jf7NkpN305pwDncRmhc1Wg==",
|
||||
"requires": {
|
||||
"chalk": "^1.1.0",
|
||||
"dbug": "~0.4.2",
|
||||
"stack-trace": "~0.0.9",
|
||||
"strftime": "~0.10.0",
|
||||
"symbol": "~0.3.1",
|
||||
"utcstring": "~0.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA=="
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||
"integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA=="
|
||||
},
|
||||
"chalk": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==",
|
||||
"requires": {
|
||||
"ansi-styles": "^2.2.1",
|
||||
"escape-string-regexp": "^1.0.2",
|
||||
"has-ansi": "^2.0.0",
|
||||
"strip-ansi": "^3.0.0",
|
||||
"supports-color": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==",
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
||||
"integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"internal-slot": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz",
|
||||
|
@ -44013,7 +43595,8 @@
|
|||
"is-docker": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
|
||||
"integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ=="
|
||||
"integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
|
||||
"dev": true
|
||||
},
|
||||
"is-extglob": {
|
||||
"version": "2.1.1",
|
||||
|
@ -44231,6 +43814,7 @@
|
|||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
|
||||
"integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-docker": "^2.0.0"
|
||||
}
|
||||
|
@ -45906,14 +45490,6 @@
|
|||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
||||
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
|
||||
},
|
||||
"json-stable-stringify": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.2.tgz",
|
||||
"integrity": "sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==",
|
||||
"requires": {
|
||||
"jsonify": "^0.0.1"
|
||||
}
|
||||
},
|
||||
"json-stable-stringify-without-jsonify": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
|
||||
|
@ -45931,6 +45507,7 @@
|
|||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
||||
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.6",
|
||||
"universalify": "^2.0.0"
|
||||
|
@ -45939,15 +45516,11 @@
|
|||
"universalify": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
||||
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ=="
|
||||
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"jsonify": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz",
|
||||
"integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg=="
|
||||
},
|
||||
"jsonwebtoken": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz",
|
||||
|
@ -46003,14 +45576,6 @@
|
|||
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
|
||||
"dev": true
|
||||
},
|
||||
"klaw-sync": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz",
|
||||
"integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.11"
|
||||
}
|
||||
},
|
||||
"kleur": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
|
||||
|
@ -46645,11 +46210,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"merge": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/merge/-/merge-2.1.1.tgz",
|
||||
"integrity": "sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w=="
|
||||
},
|
||||
"merge-descriptors": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
||||
|
@ -46814,15 +46374,6 @@
|
|||
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
|
||||
"dev": true
|
||||
},
|
||||
"mozlog": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/mozlog/-/mozlog-3.0.2.tgz",
|
||||
"integrity": "sha512-nu2pJV98gT0KFWE3sIHopR+QcSxZ2vCgnV+dvAAcCcOLjRoT3obtcINS4Vl0oc7zGEdhm0/MfE7D2MJGIwD/Ag==",
|
||||
"requires": {
|
||||
"intel": "^1.2.0",
|
||||
"merge": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"mri": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
|
||||
|
@ -47321,11 +46872,6 @@
|
|||
"integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==",
|
||||
"dev": true
|
||||
},
|
||||
"os-tmpdir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g=="
|
||||
},
|
||||
"p-defer": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-defer/-/p-defer-3.0.0.tgz",
|
||||
|
@ -47456,69 +47002,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"patch-package": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.0.tgz",
|
||||
"integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==",
|
||||
"requires": {
|
||||
"@yarnpkg/lockfile": "^1.1.0",
|
||||
"chalk": "^4.1.2",
|
||||
"ci-info": "^3.7.0",
|
||||
"cross-spawn": "^7.0.3",
|
||||
"find-yarn-workspace-root": "^2.0.0",
|
||||
"fs-extra": "^9.0.0",
|
||||
"json-stable-stringify": "^1.0.2",
|
||||
"klaw-sync": "^6.0.0",
|
||||
"minimist": "^1.2.6",
|
||||
"open": "^7.4.2",
|
||||
"rimraf": "^2.6.3",
|
||||
"semver": "^7.5.3",
|
||||
"slash": "^2.0.0",
|
||||
"tmp": "^0.0.33",
|
||||
"yaml": "^2.2.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"requires": {
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"open": {
|
||||
"version": "7.4.2",
|
||||
"resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz",
|
||||
"integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==",
|
||||
"requires": {
|
||||
"is-docker": "^2.0.0",
|
||||
"is-wsl": "^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"
|
||||
}
|
||||
},
|
||||
"slash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
|
||||
"integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"path-browserify": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
|
||||
|
@ -49503,11 +48986,6 @@
|
|||
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
|
||||
"integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg=="
|
||||
},
|
||||
"strftime": {
|
||||
"version": "0.10.1",
|
||||
"resolved": "https://registry.npmjs.org/strftime/-/strftime-0.10.1.tgz",
|
||||
"integrity": "sha512-nVvH6JG8KlXFPC0f8lojLgEsPA18lRpLZ+RrJh/NkQV2tqOgZfbas8gcU8SFgnnqR3rWzZPYu6N2A3xzs/8rQg=="
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
|
@ -49895,11 +49373,6 @@
|
|||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"symbol": {
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/symbol/-/symbol-0.3.1.tgz",
|
||||
"integrity": "sha512-SxMrE6uv9zhnBmTCpZna1u0TcZix1k2QASZ/DpF13rAo+0Ts40faFYsMTuAirgvbbjHw1byhJ949/fP20XzVZA=="
|
||||
},
|
||||
"symbol-tree": {
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
|
||||
|
@ -50303,14 +49776,6 @@
|
|||
"integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==",
|
||||
"dev": true
|
||||
},
|
||||
"tmp": {
|
||||
"version": "0.0.33",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
|
||||
"integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
|
||||
"requires": {
|
||||
"os-tmpdir": "~1.0.2"
|
||||
}
|
||||
},
|
||||
"tmpl": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz",
|
||||
|
@ -50818,11 +50283,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"utcstring": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/utcstring/-/utcstring-0.1.0.tgz",
|
||||
"integrity": "sha512-1EpWQ6CECkoys7aX3LImrFo4nYIigY2RQHJTvgzZQCB4/oA6jJvTLTcgilTxX57GrSHDIVMtGwYd+SujGJvvyw=="
|
||||
},
|
||||
"util": {
|
||||
"version": "0.12.5",
|
||||
"resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz",
|
||||
|
@ -51394,7 +50854,8 @@
|
|||
"yaml": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz",
|
||||
"integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ=="
|
||||
"integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==",
|
||||
"dev": true
|
||||
},
|
||||
"yargs": {
|
||||
"version": "17.7.2",
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
"db:migrate": "node -r dotenv/config node_modules/knex/bin/cli.js migrate:latest --knexfile src/db/knexfile.js",
|
||||
"db:rollback": "node -r dotenv/config node_modules/knex/bin/cli.js migrate:rollback --knexfile src/db/knexfile.js",
|
||||
"prepare": "husky install",
|
||||
"postinstall": "patch-package",
|
||||
"storybook": "storybook dev -p 6006",
|
||||
"build-storybook": "storybook build",
|
||||
"create-location-data": "node src/scripts/uploadAutoCompleteLocations.js",
|
||||
|
@ -71,11 +70,9 @@
|
|||
"jsonwebtoken": "^9.0.0",
|
||||
"jwk-to-pem": "^2.0.5",
|
||||
"knex": "^3.0.1",
|
||||
"mozlog": "^3.0.2",
|
||||
"next": "^13.5.4",
|
||||
"next-auth": "^4.23.2",
|
||||
"nodemailer": "^6.9.1",
|
||||
"patch-package": "^8.0.0",
|
||||
"pg": "^8.11.3",
|
||||
"react": "^18.2.0",
|
||||
"react-aria": "^3.29.0",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import AppConstants from "../../../../../appConstants.js";
|
||||
import { logger } from "../../../../functions/server/logging";
|
||||
import {
|
||||
EmailTemplateType,
|
||||
getMonthlyDummyData,
|
||||
|
@ -81,7 +82,7 @@ export async function POST(req: NextRequest) {
|
|||
}
|
||||
}
|
||||
|
||||
console.info(`Sent test email: ${emailId}`);
|
||||
logger.info(`Sent test email: ${emailId}`);
|
||||
|
||||
// The notify function has its own response
|
||||
if (emailId !== EmailTemplateType.Notification) {
|
||||
|
|
|
@ -8,6 +8,7 @@ import { getServerSession } from "next-auth";
|
|||
import Image from "next/image";
|
||||
import Script from "next/script";
|
||||
|
||||
import { logger } from "../../../functions/server/logging";
|
||||
import "../../../../client/css/index.css";
|
||||
import { UserMenu } from "../../components/client/UserMenu";
|
||||
import { SignInButton } from "../../components/client/SignInButton";
|
||||
|
@ -41,21 +42,21 @@ const MainLayout = async (props: Props) => {
|
|||
if (process.env.NIMBUS_UUID_NAMESPACE) {
|
||||
userId = uuidv5(accountId, process.env.NIMBUS_UUID_NAMESPACE);
|
||||
} else {
|
||||
console.error("NIMBUS_UUID_NAMESPACE env var not set");
|
||||
logger.error("NIMBUS_UUID_NAMESPACE env var not set");
|
||||
}
|
||||
}
|
||||
|
||||
if (!userId) {
|
||||
console.error("No user ID for Nimbus telemetry");
|
||||
logger.error("No user ID for Nimbus telemetry");
|
||||
}
|
||||
|
||||
try {
|
||||
// TODO For initial A/A testing `features` is unused. https://mozilla-hub.atlassian.net/browse/MNTOR-2182
|
||||
const features = await getExperiments(userId);
|
||||
// TODO remove debug for A/A testing https://mozilla-hub.atlassian.net/browse/MNTOR-2182
|
||||
console.debug("Nimbus features in authenticated session:", features);
|
||||
logger.debug("Nimbus features in authenticated session:", features);
|
||||
} catch (ex) {
|
||||
console.error("Could not fetch Nimbus features:", ex);
|
||||
logger.error("Could not fetch Nimbus features:", ex);
|
||||
}
|
||||
|
||||
const l10n = getL10n();
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
import { v5 as uuidv5 } from "uuid";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
import { logger } from "../../functions/server/logging";
|
||||
import "../../../client/css/index.css";
|
||||
import Image from "next/image";
|
||||
import MonitorLogo from "../../../client/images/monitor-logo-transparent@2x.webp";
|
||||
|
@ -35,7 +37,7 @@ const GuestLayout = async (props: Props) => {
|
|||
if (process.env.NIMBUS_UUID_NAMESPACE) {
|
||||
userId = uuidv5(accountId, process.env.NIMBUS_UUID_NAMESPACE);
|
||||
} else {
|
||||
console.error("NIMBUS_UUID_NAMESPACE env var not set");
|
||||
logger.error("NIMBUS_UUID_NAMESPACE env var not set");
|
||||
}
|
||||
} else {
|
||||
// if the user is not logged in, use a cookie with a randomly-generated Nimbus user ID.
|
||||
|
@ -51,16 +53,16 @@ const GuestLayout = async (props: Props) => {
|
|||
}
|
||||
|
||||
if (!userId) {
|
||||
console.error("No user ID for Nimbus telemetry");
|
||||
logger.error("No user ID for Nimbus telemetry");
|
||||
}
|
||||
|
||||
try {
|
||||
// TODO For initial A/A testing `features` is unused. https://mozilla-hub.atlassian.net/browse/MNTOR-2182
|
||||
const features = await getExperiments(userId);
|
||||
// TODO remove debug for A/A testing https://mozilla-hub.atlassian.net/browse/MNTOR-2182
|
||||
console.debug("Nimbus features in guest session:", features);
|
||||
logger.debug("Nimbus features in guest session:", features);
|
||||
} catch (ex) {
|
||||
console.error("Could not fetch Nimbus features:", ex);
|
||||
logger.error("Could not fetch Nimbus features:", ex);
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import { NextRequest } from "next/server";
|
||||
import { AuthOptions, Profile as FxaProfile, User } from "next-auth";
|
||||
import mozlog from "../../../utils/log.js";
|
||||
import { logger } from "../../functions/server/logging";
|
||||
|
||||
import AppConstants from "../../../appConstants.js";
|
||||
import {
|
||||
|
@ -22,8 +22,6 @@ import { getL10n } from "../../functions/server/l10n";
|
|||
import { OAuthConfig } from "next-auth/providers/oauth.js";
|
||||
import { SerializedSubscriber } from "../../../next-auth.js";
|
||||
|
||||
const log = mozlog("controllers.auth");
|
||||
|
||||
const fxaProviderConfig: OAuthConfig<FxaProfile> = {
|
||||
// As per https://mozilla.slack.com/archives/C4D36CAJW/p1683642497940629?thread_ts=1683642325.465929&cid=C4D36CAJW,
|
||||
// we should file a ticket against SVCSE with the `fxa` component to add
|
||||
|
@ -52,7 +50,6 @@ const fxaProviderConfig: OAuthConfig<FxaProfile> = {
|
|||
clientSecret: AppConstants.OAUTH_CLIENT_SECRET,
|
||||
// Parse data returned by FxA's /userinfo/
|
||||
profile: (profile) => {
|
||||
log.debug("fxa-confirmed-profile-data", profile);
|
||||
return convertFxaProfile(profile);
|
||||
},
|
||||
};
|
||||
|
@ -83,7 +80,6 @@ export const authOptions: AuthOptions = {
|
|||
}
|
||||
if (account && typeof profile?.email === "string") {
|
||||
// We're signing in with FxA; store user in database if not present yet.
|
||||
log.debug("fxa-confirmed-fxaUser", account);
|
||||
|
||||
// Note: we could create an [Adapter](https://next-auth.js.org/tutorials/creating-a-database-adapter)
|
||||
// to store the user in the database, but by doing it in the callback,
|
||||
|
@ -172,10 +168,10 @@ export const authOptions: AuthOptions = {
|
|||
},
|
||||
events: {
|
||||
signIn(message) {
|
||||
log.debug("fxa-confirmed-profile-data", message.user);
|
||||
logger.debug("fxa-confirmed-profile-data", message.user.id);
|
||||
},
|
||||
signOut(message) {
|
||||
log.debug("logout", message.token.email ?? undefined);
|
||||
logger.debug("logout", message.token.subscriber?.id ?? undefined);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { logger } from "../../../../../functions/server/logging";
|
||||
import {
|
||||
enableFeatureFlagByName,
|
||||
getFeatureFlagByName,
|
||||
|
@ -27,7 +28,7 @@ export async function GET(
|
|||
const flag = await getFeatureFlagByName(flagName);
|
||||
return NextResponse.json(flag);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
return NextResponse.json({ success: false }, { status: 500 });
|
||||
}
|
||||
} else {
|
||||
|
@ -65,7 +66,7 @@ export async function PUT(req: NextRequest) {
|
|||
|
||||
return NextResponse.json({ success: true }, { status: 200 });
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
return NextResponse.json({ success: false }, { status: 500 });
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { logger } from "../../../../functions/server/logging";
|
||||
import {
|
||||
getAllFeatureFlags,
|
||||
addFeatureFlag,
|
||||
|
@ -45,7 +46,7 @@ export async function POST(req: NextRequest) {
|
|||
const resp = await addFeatureFlag(newFlag);
|
||||
return NextResponse.json(resp);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
return NextResponse.json({ success: false }, { status: 500 });
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -6,6 +6,8 @@ import * as jwt from "jsonwebtoken";
|
|||
import jwkToPem from "jwk-to-pem";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { captureException, captureMessage } from "@sentry/node";
|
||||
|
||||
import { logger } from "../../../functions/server/logging";
|
||||
import {
|
||||
deleteSubscriber,
|
||||
getSubscriberByFxaUid,
|
||||
|
@ -45,13 +47,13 @@ const getJwtPubKey = async () => {
|
|||
},
|
||||
});
|
||||
const { keys } = (await response.json()) as { keys: jwkToPem.JWK[] };
|
||||
console.info(
|
||||
logger.info(
|
||||
"getJwtPubKey",
|
||||
`fetched jwt public keys from: ${jwtKeyUri} - ${keys.length}`,
|
||||
);
|
||||
return keys;
|
||||
} catch (e: unknown) {
|
||||
console.error("getJwtPubKey", `Could not get JWT public key: ${jwtKeyUri}`);
|
||||
logger.error("getJwtPubKey", `Could not get JWT public key: ${jwtKeyUri}`);
|
||||
captureException(
|
||||
new Error(`Could not get JWT public key: ${jwtKeyUri} - ${e as string}`),
|
||||
);
|
||||
|
@ -116,14 +118,14 @@ export async function POST(request: NextRequest) {
|
|||
try {
|
||||
decodedJWT = (await authenticateFxaJWT(request)) as JwtPayload;
|
||||
} catch (e) {
|
||||
console.error("fxaRpEvents", e);
|
||||
logger.error("fxaRpEvents", e);
|
||||
captureException(e);
|
||||
return NextResponse.json({ success: false }, { status: 401 });
|
||||
}
|
||||
|
||||
if (!decodedJWT?.events) {
|
||||
// capture an exception in Sentry only. Throwing error will trigger FXA retry
|
||||
console.error("fxaRpEvents", decodedJWT);
|
||||
logger.error("fxaRpEvents", decodedJWT);
|
||||
captureMessage(
|
||||
`fxaRpEvents: decodedJWT is missing attribute "events", ${
|
||||
decodedJWT as unknown as string
|
||||
|
@ -166,7 +168,7 @@ export async function POST(request: NextRequest) {
|
|||
const e = new Error(
|
||||
`could not find subscriber with fxa user id: ${fxaUserId}`,
|
||||
);
|
||||
console.error("fxaRpEvents", e);
|
||||
logger.error("fxaRpEvents", e);
|
||||
captureException(e);
|
||||
return NextResponse.json({ success: true, message: "OK" }, { status: 200 });
|
||||
}
|
||||
|
@ -175,7 +177,7 @@ export async function POST(request: NextRequest) {
|
|||
for (const event in decodedJWT?.events) {
|
||||
switch (event) {
|
||||
case FXA_DELETE_USER_EVENT:
|
||||
console.debug("fxa_delete_user", {
|
||||
logger.debug("fxa_delete_user", {
|
||||
subscriber,
|
||||
event,
|
||||
});
|
||||
|
@ -187,7 +189,7 @@ export async function POST(request: NextRequest) {
|
|||
const updatedProfileFromEvent = decodedJWT.events[
|
||||
event
|
||||
] as ProfileChangeEvent;
|
||||
console.debug("fxa_profile_update", {
|
||||
logger.debug("fxa_profile_update", {
|
||||
fxaUserId,
|
||||
event,
|
||||
updatedProfileFromEvent,
|
||||
|
@ -218,7 +220,7 @@ export async function POST(request: NextRequest) {
|
|||
}
|
||||
case FXA_PASSWORD_CHANGE_EVENT: {
|
||||
const updateFromEvent = decodedJWT.events[event];
|
||||
console.debug("fxa_password_change", {
|
||||
logger.debug("fxa_password_change", {
|
||||
fxaUserId,
|
||||
event,
|
||||
updateFromEvent,
|
||||
|
@ -229,7 +231,7 @@ export async function POST(request: NextRequest) {
|
|||
const updatedSubscriptionFromEvent = decodedJWT.events[
|
||||
event
|
||||
] as SubscriptionStateChangeEvent;
|
||||
console.debug("fxa_subscription_change", {
|
||||
logger.debug("fxa_subscription_change", {
|
||||
fxaUserId,
|
||||
event,
|
||||
updatedSubscriptionFromEvent,
|
||||
|
@ -239,11 +241,11 @@ export async function POST(request: NextRequest) {
|
|||
const result = await getOnerepProfileId(subscriber.id);
|
||||
const oneRepProfileId = result?.[0]?.["onerep_profile_id"] as number;
|
||||
|
||||
console.debug("fxa_subscription_change", JSON.stringify(result));
|
||||
logger.debug("fxa_subscription_change", JSON.stringify(result));
|
||||
|
||||
// MNTOR-2103: if one rep profile id doesn't exist in the db, fail silently
|
||||
if (!oneRepProfileId) {
|
||||
console.error(
|
||||
logger.error(
|
||||
"No OneRep profile Id found, subscriber: ",
|
||||
subscriber.id,
|
||||
);
|
||||
|
@ -287,7 +289,7 @@ export async function POST(request: NextRequest) {
|
|||
break;
|
||||
}
|
||||
default:
|
||||
console.warn("unhandled_event", {
|
||||
logger.warn("unhandled_event", {
|
||||
event,
|
||||
});
|
||||
break;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { bearerToken } from "../../../utils/auth";
|
||||
import { logger } from "../../../../functions/server/logging";
|
||||
|
||||
import { PubSub } from "@google-cloud/pubsub";
|
||||
import { getEnabledFeatureFlags } from "../../../../../db/tables/featureFlags";
|
||||
|
@ -24,7 +25,7 @@ export async function POST(req: NextRequest) {
|
|||
const enabledFlags = await getEnabledFeatureFlags({ ignoreAllowlist: true });
|
||||
try {
|
||||
if (!enabledFlags.includes("HibpBreachNotifications")) {
|
||||
console.info("Feature flag not enabled: HibpBreachNotifications");
|
||||
logger.info("Feature flag not enabled: HibpBreachNotifications");
|
||||
return NextResponse.json({}, { status: 429 });
|
||||
}
|
||||
if (!projectId) {
|
||||
|
@ -42,7 +43,7 @@ export async function POST(req: NextRequest) {
|
|||
json = await req.json();
|
||||
|
||||
if (!(json.breachName && json.hashPrefix && json.hashSuffixes)) {
|
||||
console.error(
|
||||
logger.error(
|
||||
"HIBP breach notification: requires breachName, hashPrefix, and hashSuffixes.",
|
||||
);
|
||||
return NextResponse.json({ success: false }, { status: 400 });
|
||||
|
@ -50,7 +51,7 @@ export async function POST(req: NextRequest) {
|
|||
|
||||
pubsub = new PubSub({ projectId });
|
||||
} catch (ex) {
|
||||
console.error("Error connecting to PubSub:", ex);
|
||||
logger.error("Error connecting to PubSub:", ex);
|
||||
return NextResponse.json({ success: false }, { status: 500 });
|
||||
}
|
||||
|
||||
|
@ -58,6 +59,7 @@ export async function POST(req: NextRequest) {
|
|||
try {
|
||||
topic = pubsub.topic(topicName);
|
||||
await topic.publishMessage({ json });
|
||||
logger.info("Successfully queued breach notification", json);
|
||||
return NextResponse.json({ success: true }, { status: 200 });
|
||||
} catch (ex) {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
|
@ -67,10 +69,10 @@ export async function POST(req: NextRequest) {
|
|||
await pubsub.createTopic(topicName);
|
||||
await pubsub.topic(topicName).createSubscription(subscriptionName);
|
||||
} else {
|
||||
console.error("Topic not found:", topicName);
|
||||
logger.error("Topic not found:", topicName);
|
||||
return NextResponse.json({ success: false }, { status: 500 });
|
||||
}
|
||||
console.error("Error queuing HIBP breach:", topicName);
|
||||
logger.error("Error queuing HIBP breach:", topicName);
|
||||
return NextResponse.json({ success: false }, { status: 500 });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import { NextRequest, NextResponse } from "next/server";
|
|||
import { captureException } from "@sentry/node";
|
||||
import crypto from "crypto";
|
||||
|
||||
import { logger } from "../../../functions/server/logging";
|
||||
import { addOnerepScanResults } from "../../../../db/tables/onerep_scans";
|
||||
import { getAllScanResults, Scan } from "../../../functions/server/onerep";
|
||||
|
||||
|
@ -53,7 +54,7 @@ export async function POST(req: NextRequest) {
|
|||
throw new Error("Webhook signature invalid");
|
||||
}
|
||||
} catch (ex) {
|
||||
console.error(ex);
|
||||
logger.error(ex);
|
||||
captureException(ex);
|
||||
|
||||
return NextResponse.json({ success: false }, { status: 401 });
|
||||
|
@ -61,15 +62,15 @@ export async function POST(req: NextRequest) {
|
|||
|
||||
try {
|
||||
const result: OnerepWebhookRequest = JSON.parse(finalBuffer.toString());
|
||||
console.debug("OneRep Webhook Request received:", result);
|
||||
logger.debug("OneRep Webhook Request received:", result);
|
||||
|
||||
if (result.type !== "scan.completed") {
|
||||
console.debug("Unexpected OneRep webhook type received:", result.type);
|
||||
logger.debug("Unexpected OneRep webhook type received:", result.type);
|
||||
return;
|
||||
}
|
||||
|
||||
if (result.data.object.status !== "finished") {
|
||||
console.debug(
|
||||
logger.debug(
|
||||
"Received OneRep webhook, but scan not finished",
|
||||
result.data.object.status,
|
||||
);
|
||||
|
@ -93,7 +94,7 @@ export async function POST(req: NextRequest) {
|
|||
|
||||
return NextResponse.json({ success: true }, { status: 200 });
|
||||
} catch (ex) {
|
||||
console.error(ex);
|
||||
logger.error(ex);
|
||||
captureException(ex);
|
||||
|
||||
return NextResponse.json({ success: false }, { status: 500 });
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { getToken } from "next-auth/jwt";
|
||||
|
||||
import { logger } from "../../../../functions/server/logging";
|
||||
import {
|
||||
BreachResolutionRequest,
|
||||
Subscriber,
|
||||
} from "../../../../(nextjs_migration)/(authenticated)/user/breaches/breaches.js";
|
||||
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { getToken } from "next-auth/jwt";
|
||||
import { getBreaches } from "../../../../functions/server/getBreaches";
|
||||
import { getAllEmailsAndBreaches } from "../../../../../utils/breaches";
|
||||
import {
|
||||
|
@ -32,7 +33,7 @@ export async function GET(req: NextRequest) {
|
|||
};
|
||||
return NextResponse.json(successResponse);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
return NextResponse.json({ success: false }, { status: 500 });
|
||||
}
|
||||
} else {
|
||||
|
@ -147,7 +148,7 @@ export async function PUT(req: NextRequest) {
|
|||
breachResolutions: updatedSubscriber.breach_resolution,
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
return NextResponse.json({ success: false }, { status: 500 });
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
|
||||
import { getToken } from "next-auth/jwt";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import AppConstants from "../../../../../appConstants";
|
||||
|
||||
import { logger } from "../../../../functions/server/logging";
|
||||
import AppConstants from "../../../../../appConstants";
|
||||
import {
|
||||
getSubscriberByEmail,
|
||||
deleteResolutionsWithEmail,
|
||||
|
@ -50,7 +51,7 @@ export async function POST(req: NextRequest) {
|
|||
301,
|
||||
);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
return NextResponse.json({ success: false }, { status: 500 });
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
import { getToken } from "next-auth/jwt";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
import { logger } from "../../../../functions/server/logging";
|
||||
import AppConstants from "../../../../../appConstants";
|
||||
import { getSubscriberByEmail } from "../../../../../db/tables/subscribers";
|
||||
import { getUserEmails } from "../../../../../db/tables/emailAddresses";
|
||||
|
@ -51,7 +53,7 @@ export async function POST(req: NextRequest) {
|
|||
message: "Sent the verification email",
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
if (
|
||||
e instanceof Error &&
|
||||
e.message === "error-email-validation-pending"
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
import { getServerSession } from "next-auth";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
import { logger } from "../../../../../../functions/server/logging";
|
||||
import { authOptions } from "../../../../../utils/auth";
|
||||
import {
|
||||
isOnerepScanResultForSubscriber,
|
||||
|
@ -55,7 +56,7 @@ export async function POST(
|
|||
{ status: 200 },
|
||||
);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
return new NextResponse<ResolveScanResultResponse>(
|
||||
JSON.stringify({
|
||||
success: false,
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
import { getToken } from "next-auth/jwt";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
import { logger } from "../../../../functions/server/logging";
|
||||
import AppConstants from "../../../../../appConstants";
|
||||
|
||||
import {
|
||||
|
@ -33,7 +35,7 @@ export async function POST(req: NextRequest) {
|
|||
message: "Communications options updated",
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
return NextResponse.json({ success: false }, { status: 500 });
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
import { logger } from "../../../../functions/server/logging";
|
||||
import { verifyEmailHash } from "../../../../../db/tables/emailAddresses.js";
|
||||
export async function GET(req: NextRequest) {
|
||||
try {
|
||||
|
@ -17,7 +19,7 @@ export async function GET(req: NextRequest) {
|
|||
301,
|
||||
);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
return NextResponse.json({ success: false }, { status: 500 });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ import { getServerSession } from "next-auth";
|
|||
import { authOptions } from "../../../../utils/auth";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
import { logger } from "../../../../../functions/server/logging";
|
||||
|
||||
import {
|
||||
createProfile,
|
||||
createScan,
|
||||
|
@ -98,7 +100,7 @@ export async function POST(
|
|||
|
||||
return NextResponse.json({ success: true }, { status: 200 });
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
return NextResponse.json({ success: false }, { status: 500 });
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -6,6 +6,8 @@ import { getServerSession } from "next-auth";
|
|||
import { authOptions } from "../../../../utils/auth";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
import { logger } from "../../../../../functions/server/logging";
|
||||
|
||||
import AppConstants from "../../../../../../appConstants";
|
||||
import {
|
||||
getOnerepProfileId,
|
||||
|
@ -69,7 +71,7 @@ export async function GET(
|
|||
|
||||
return NextResponse.json({ success: true }, { status: 200 });
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
return NextResponse.json({ success: false }, { status: 500 });
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -7,6 +7,8 @@ import { OnerepScanResultRow, OnerepScanRow } from "knex/types/tables";
|
|||
import { authOptions } from "../../../../utils/auth";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
import { logger } from "../../../../../functions/server/logging";
|
||||
|
||||
import AppConstants from "../../../../../../appConstants";
|
||||
import {
|
||||
getOnerepProfileId,
|
||||
|
@ -37,7 +39,7 @@ export async function GET() {
|
|||
{ status: 200 },
|
||||
);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
return NextResponse.json({ success: false }, { status: 500 });
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import mozlog from "../../../utils/log.js";
|
||||
import { logger } from "./logging";
|
||||
import {
|
||||
HibpLikeDbBreach,
|
||||
formatDataClassesArray,
|
||||
|
@ -12,7 +12,6 @@ import {
|
|||
import { upsertBreaches } from "../../../db/tables/breaches.js";
|
||||
import { Breach } from "../../(nextjs_migration)/(authenticated)/user/breaches/breaches.js";
|
||||
|
||||
const log = mozlog("hibp");
|
||||
let breaches: Array<Breach | HibpLikeDbBreach>;
|
||||
|
||||
export async function getBreaches() {
|
||||
|
@ -20,7 +19,7 @@ export async function getBreaches() {
|
|||
return breaches;
|
||||
}
|
||||
breaches = await getAllBreachesFromDb();
|
||||
log.debug(
|
||||
logger.debug(
|
||||
"loadBreachesIntoApp",
|
||||
`loaded breaches from database: ${breaches.length}`,
|
||||
);
|
||||
|
@ -28,7 +27,7 @@ export async function getBreaches() {
|
|||
// if "breaches" table does not return results, fall back to HIBP request
|
||||
if (breaches?.length < 1) {
|
||||
const breachesResponse = (await req("/breaches")) as Breach[];
|
||||
log.debug(
|
||||
logger.debug(
|
||||
"loadBreachesIntoApp",
|
||||
`loaded breaches from HIBP: ${breachesResponse.length}`,
|
||||
);
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { captureException } from "@sentry/node";
|
||||
import { logger } from "./logging";
|
||||
|
||||
/**
|
||||
* Call the Cirrus sidecar, which returns a list of eligible experiments for the current user.
|
||||
|
@ -33,7 +34,7 @@ export async function getExperiments(
|
|||
}),
|
||||
});
|
||||
} catch (ex) {
|
||||
console.error(`Could not connect to Cirrus on ${serverUrl}`, ex);
|
||||
logger.error(`Could not connect to Cirrus on ${serverUrl}`, ex);
|
||||
captureException(ex);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,11 +14,10 @@ const loggingWinston = new LoggingWinston({
|
|||
|
||||
export const logger = createLogger({
|
||||
level: "info",
|
||||
transports: [],
|
||||
transports: [new transports.Console()],
|
||||
});
|
||||
|
||||
// In GCP environments, use cloud logging instead of stdout.
|
||||
if (["stage", "production"].includes(process.env.APP_ENV ?? "local")) {
|
||||
logger.transports.push(loggingWinston);
|
||||
} else {
|
||||
logger.transports.push(new transports.Console());
|
||||
logger.transports = [loggingWinston];
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
import type { Session } from "next-auth";
|
||||
import { getOnerepProfileId } from "../../../db/tables/subscribers.js";
|
||||
import mozlog from "../../../utils/log.js";
|
||||
import {
|
||||
E164PhoneNumberString,
|
||||
ISO8601DateString,
|
||||
|
@ -16,7 +15,7 @@ import {
|
|||
FeatureFlagName,
|
||||
getEnabledFeatureFlags,
|
||||
} from "../../../db/tables/featureFlags";
|
||||
const log = mozlog("external.onerep");
|
||||
import { logger } from "./logging";
|
||||
|
||||
export type CreateProfileRequest = {
|
||||
first_name: string;
|
||||
|
@ -127,7 +126,7 @@ export async function createProfile(
|
|||
body: JSON.stringify(requestBody),
|
||||
});
|
||||
if (!response.ok) {
|
||||
log.info(
|
||||
logger.error(
|
||||
`Failed to create OneRep profile: [${response.status}] [${
|
||||
response.statusText
|
||||
}] [${JSON.stringify(await response.json())}]`,
|
||||
|
@ -154,7 +153,7 @@ export async function getProfile(
|
|||
method: "GET",
|
||||
});
|
||||
if (!response.ok) {
|
||||
log.info(
|
||||
logger.error(
|
||||
`Failed to fetch OneRep profile: [${response.status}] [${response.statusText}]`,
|
||||
);
|
||||
throw new Error(
|
||||
|
@ -174,7 +173,7 @@ export async function activateProfile(profileId: number): Promise<void> {
|
|||
},
|
||||
);
|
||||
if (!response.ok) {
|
||||
log.info(
|
||||
logger.error(
|
||||
`Failed to activate OneRep profile: [${response.status}] [${response.statusText}]`,
|
||||
);
|
||||
throw new Error(
|
||||
|
@ -191,7 +190,7 @@ export async function deactivateProfile(profileId: number): Promise<void> {
|
|||
},
|
||||
);
|
||||
if (!response.ok) {
|
||||
log.info(
|
||||
logger.error(
|
||||
`Failed to deactivate OneRep profile: [${response.status}] [${response.statusText}]`,
|
||||
);
|
||||
throw new Error(
|
||||
|
@ -205,7 +204,7 @@ export async function optoutProfile(profileId: number): Promise<void> {
|
|||
method: "POST",
|
||||
});
|
||||
if (!response.ok) {
|
||||
log.info(
|
||||
logger.error(
|
||||
`Failed to opt-out OneRep profile: [${response.status}] [${
|
||||
response.statusText
|
||||
}] [${JSON.stringify(await response.json())}]`,
|
||||
|
@ -227,7 +226,7 @@ export async function createScan(
|
|||
method: "POST",
|
||||
});
|
||||
if (!response.ok) {
|
||||
log.info(
|
||||
logger.error(
|
||||
`Failed to create a scan: [${response.status}] [${response.statusText}]`,
|
||||
);
|
||||
throw new Error(
|
||||
|
@ -255,7 +254,7 @@ export async function listScans(
|
|||
},
|
||||
);
|
||||
if (!response.ok) {
|
||||
log.info(
|
||||
logger.error(
|
||||
`Failed to fetch scans: [${response.status}] [${response.statusText}]`,
|
||||
);
|
||||
throw new Error(
|
||||
|
@ -297,7 +296,7 @@ export async function listScanResults(
|
|||
},
|
||||
);
|
||||
if (!response.ok) {
|
||||
log.info(
|
||||
logger.error(
|
||||
`Failed to fetch scan results: [${response.status}] [${response.statusText}]`,
|
||||
);
|
||||
throw new Error(
|
||||
|
@ -329,7 +328,7 @@ export async function isEligibleForFreeScan(
|
|||
const scanResult = await getLatestOnerepScanResults(profileId);
|
||||
|
||||
if (scanResult.results.length) {
|
||||
console.warn("User has already used free scan");
|
||||
logger.warn("User has already used free scan");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -364,7 +363,7 @@ export async function getScanDetails(
|
|||
method: "GET",
|
||||
});
|
||||
if (!response.ok) {
|
||||
log.info(
|
||||
logger.error(
|
||||
`Failed to fetch scan details: [${response.status}] [${response.statusText}]`,
|
||||
);
|
||||
throw new Error(
|
||||
|
|
|
@ -7,6 +7,7 @@ import {
|
|||
getLatestOnerepScanResults,
|
||||
} from "../../../db/tables/onerep_scans";
|
||||
import { ScanResult, getAllScanResults, getScanDetails } from "./onerep";
|
||||
import { logger } from "./logging";
|
||||
|
||||
/**
|
||||
* Attempt to fetch the current scan results from the provider.
|
||||
|
@ -71,6 +72,6 @@ export async function refreshStoredScanResults(profileId: number) {
|
|||
);
|
||||
}
|
||||
} catch (ex) {
|
||||
console.warn("Could not fetch current OneRep results:", ex);
|
||||
logger.warn("Could not fetch current OneRep results:", ex);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,25 +18,6 @@ type FxaProfile = {
|
|||
metricsEnabled?: boolean;
|
||||
sub?: string;
|
||||
};
|
||||
|
||||
declare module "mozlog" {
|
||||
type LogFunction = (_op: string, _details?: object | string) => void;
|
||||
|
||||
type Options = {
|
||||
app: string;
|
||||
level: string;
|
||||
fmt: string;
|
||||
};
|
||||
const defaultFunction: (_options: Options) => (_scope: string) => {
|
||||
debug: LogFunction;
|
||||
info: LogFunction;
|
||||
warn: LogFunction;
|
||||
error: LogFunction;
|
||||
};
|
||||
|
||||
export default defaultFunction;
|
||||
}
|
||||
|
||||
interface Window {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
gtag: any;
|
||||
|
|
|
@ -4,9 +4,8 @@
|
|||
|
||||
import initKnex from 'knex'
|
||||
import knexConfig from '../knexfile.js'
|
||||
import mozlog from '../../utils/log.js'
|
||||
import { logger } from '../../app/functions/server/logging'
|
||||
const knex = initKnex(knexConfig)
|
||||
const log = mozlog('DB.breaches')
|
||||
|
||||
/**
|
||||
* Get all records from "breaches" table
|
||||
|
@ -48,7 +47,7 @@ async function getAllBreachesCount() {
|
|||
// Not covered by tests; mostly side-effects. See test-coverage.md#mock-heavy
|
||||
/* c8 ignore start */
|
||||
async function upsertBreaches(hibpBreaches) {
|
||||
log.debug('upsertBreaches', hibpBreaches[0])
|
||||
logger.debug('upsertBreaches', hibpBreaches[0])
|
||||
|
||||
return knex.transaction(async trx => {
|
||||
const queries = hibpBreaches.map(breach =>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
import { v4 as uuidv4 } from 'uuid'
|
||||
import initKnex from 'knex'
|
||||
import knexConfig from '../knexfile.js'
|
||||
import mozlog from '../../utils/log.js'
|
||||
import { logger} from '../../app/functions/server/logging';
|
||||
import { subscribeHash } from '../../utils/hibp.js'
|
||||
import { getSha1 } from '../../utils/fxa.js'
|
||||
import { getSubscriberByEmail, updateFxAData } from './subscribers.js'
|
||||
|
@ -16,7 +16,6 @@ import {
|
|||
} from '../../utils/error.js'
|
||||
import { getMessage } from '../../utils/fluent.js'
|
||||
const knex = initKnex(knexConfig)
|
||||
const log = mozlog('DB.email_addresses')
|
||||
|
||||
/**
|
||||
* @param {string} token
|
||||
|
@ -58,7 +57,7 @@ async function getEmailAddressRecordByEmail (email) {
|
|||
}
|
||||
if (emailAddresses.length > 1) {
|
||||
// TODO: handle multiple emails in separate(?) subscriber accounts?
|
||||
log.warn('getEmailAddressRecordByEmail', { msg: 'found the same email multiple times' })
|
||||
logger.warn('getEmailAddressRecordByEmail', { msg: 'found the same email multiple times' })
|
||||
}
|
||||
return emailAddresses[0]
|
||||
}
|
||||
|
@ -172,7 +171,7 @@ async function _getSha1EntryAndDo (sha1, aFoundCallback, aNotFoundCallback) {
|
|||
// Not covered by tests; mostly side-effects. See test-coverage.md#mock-heavy
|
||||
/* c8 ignore start */
|
||||
async function _addEmailHash (sha1, email, signupLanguage, verified = false) {
|
||||
log.debug('_addEmailHash', { sha1, email, signupLanguage, verified })
|
||||
logger.debug('_addEmailHash', { sha1, email, signupLanguage, verified })
|
||||
try {
|
||||
return await _getSha1EntryAndDo(sha1, async (/** @type {any} */ aEntry) => {
|
||||
// Entry existed, patch the email value if supplied.
|
||||
|
@ -202,7 +201,7 @@ async function _addEmailHash (sha1, email, signupLanguage, verified = false) {
|
|||
})
|
||||
} catch (e) {
|
||||
// @ts-ignore Log whatever, we don't care
|
||||
log.error(e)
|
||||
logger.error(e)
|
||||
throw new InternalServerError(getMessage('error-could-not-add-email'))
|
||||
}
|
||||
}
|
||||
|
@ -322,7 +321,7 @@ async function removeEmail (email) {
|
|||
if (!subscriber) {
|
||||
const emailAddress = await getEmailAddressRecordByEmail(email)
|
||||
if (!emailAddress) {
|
||||
log.warn('removed-subscriber-not-found')
|
||||
logger.warn('removed-subscriber-not-found')
|
||||
return
|
||||
}
|
||||
await knex('email_addresses')
|
||||
|
|
|
@ -4,10 +4,9 @@
|
|||
|
||||
import initKnex from "knex";
|
||||
import knexConfig from "../knexfile.js";
|
||||
import mozlog from "../../utils/log.js";
|
||||
import { logger } from "../../app/functions/server/logging";
|
||||
import { FeatureFlagRow } from "knex/types/tables";
|
||||
const knex = initKnex(knexConfig);
|
||||
const log = mozlog("DB.flags");
|
||||
|
||||
export type FeatureFlag = {
|
||||
name: string;
|
||||
|
@ -59,14 +58,14 @@ export async function getEnabledFeatureFlags(
|
|||
}
|
||||
|
||||
async function getFeatureFlagByName(name: string) {
|
||||
log.info("getFeatureFlagByName", name);
|
||||
logger.info("getFeatureFlagByName", name);
|
||||
const res = await knex("feature_flags").where("name", name);
|
||||
|
||||
return res[0] || null;
|
||||
}
|
||||
|
||||
async function addFeatureFlag(flag: FeatureFlag) {
|
||||
log.info("addFeatureFlag", flag);
|
||||
logger.info("addFeatureFlag", flag);
|
||||
const featureFlagDb: FeatureFlagRow = {
|
||||
name: flag.name,
|
||||
is_enabled: flag.isEnabled,
|
||||
|
@ -91,7 +90,7 @@ async function addFeatureFlag(flag: FeatureFlag) {
|
|||
}
|
||||
|
||||
async function deleteFeatureFlagByName(name: string) {
|
||||
log.info("deleteFeatureFlagByName", name);
|
||||
logger.info("deleteFeatureFlagByName", name);
|
||||
const res = await knex("feature_flags")
|
||||
.where("name", name)
|
||||
.update({
|
||||
|
@ -104,7 +103,7 @@ async function deleteFeatureFlagByName(name: string) {
|
|||
}
|
||||
|
||||
async function updateDependencies(name: string, dependencies: string[]) {
|
||||
log.info("updateDependencies", { name, dependencies });
|
||||
logger.info("updateDependencies", { name, dependencies });
|
||||
const res = await knex("feature_flags")
|
||||
.where("name", name)
|
||||
.update({
|
||||
|
@ -119,7 +118,7 @@ async function updateDependencies(name: string, dependencies: string[]) {
|
|||
}
|
||||
|
||||
async function updateOwner(name: string, owner: string) {
|
||||
log.info("updateOwner", { name, owner });
|
||||
logger.info("updateOwner", { name, owner });
|
||||
const res = await knex("feature_flags")
|
||||
.where("name", name)
|
||||
.update({
|
||||
|
@ -139,7 +138,7 @@ async function updateAllowList(name: string, allowList: string[]) {
|
|||
if (e) acc.push(e);
|
||||
return acc;
|
||||
}, []);
|
||||
log.info("updateAllowList", { name, allowList });
|
||||
logger.info("updateAllowList", { name, allowList });
|
||||
const res = await knex("feature_flags")
|
||||
.where("name", name)
|
||||
.update({
|
||||
|
@ -159,7 +158,7 @@ async function updateWaitList(name: string, waitList: string[]) {
|
|||
if (e) acc.push(e);
|
||||
return acc;
|
||||
}, []);
|
||||
log.info("updateWaitList", { name, waitList });
|
||||
logger.info("updateWaitList", { name, waitList });
|
||||
const res = await knex("feature_flags")
|
||||
.where("name", name)
|
||||
.update({
|
||||
|
@ -174,7 +173,7 @@ async function updateWaitList(name: string, waitList: string[]) {
|
|||
}
|
||||
|
||||
async function enableFeatureFlagByName(name: string, isEnabled: boolean) {
|
||||
log.info("enableFeatureFlagByName", name);
|
||||
logger.info("enableFeatureFlagByName", name);
|
||||
const res = await knex("feature_flags")
|
||||
.where("name", name)
|
||||
.update({
|
||||
|
@ -189,7 +188,7 @@ async function enableFeatureFlagByName(name: string, isEnabled: boolean) {
|
|||
}
|
||||
|
||||
async function disableFeatureFlagByName(name: string) {
|
||||
log.info("disableFeatureFlagByName", name);
|
||||
logger.info("disableFeatureFlagByName", name);
|
||||
const res = await knex("feature_flags")
|
||||
.where("name", name)
|
||||
.update({
|
||||
|
|
|
@ -5,30 +5,13 @@
|
|||
import initKnex from "knex";
|
||||
import knexConfig from "../knexfile.js";
|
||||
|
||||
import { createLogger, transports } from "winston";
|
||||
import { LoggingWinston } from "@google-cloud/logging-winston";
|
||||
import { logger } from "../../app/functions/server/logging";
|
||||
|
||||
import { ScanResult, Scan } from "../../app/functions/server/onerep.js";
|
||||
import { Subscriber } from "../../app/(nextjs_migration)/(authenticated)/user/breaches/breaches.js";
|
||||
import { OnerepScanResultRow, OnerepScanRow } from "knex/types/tables";
|
||||
|
||||
const knex = initKnex(knexConfig);
|
||||
const loggingWinston = new LoggingWinston({
|
||||
labels: {
|
||||
name: "onerep-stats",
|
||||
version: "0.1.0",
|
||||
},
|
||||
});
|
||||
|
||||
const logger = createLogger({
|
||||
level: "info",
|
||||
transports: [new transports.Console()],
|
||||
});
|
||||
|
||||
if (["stage", "production"].includes(process.env.APP_ENV ?? "local")) {
|
||||
logger.transports.push(loggingWinston);
|
||||
}
|
||||
|
||||
export interface LatestOnerepScanData {
|
||||
scan: OnerepScanRow | null;
|
||||
results: OnerepScanResultRow[];
|
||||
|
|
|
@ -6,10 +6,9 @@ import { destroyOAuthToken } from '../../utils/fxa.js'
|
|||
import initKnex from 'knex'
|
||||
import knexConfig from '../knexfile.js'
|
||||
import AppConstants from '../../appConstants.js'
|
||||
import mozlog from '../../utils/log.js'
|
||||
|
||||
const knex = initKnex(knexConfig)
|
||||
const { DELETE_UNVERIFIED_SUBSCRIBERS_TIMER } = AppConstants
|
||||
const log = mozlog('DB.subscribers')
|
||||
|
||||
/**
|
||||
* @param {string} token
|
||||
|
@ -133,12 +132,12 @@ async function updatePrimaryEmail (subscriber, updatedEmail) {
|
|||
.transacting(trx)
|
||||
|
||||
await trx.commit()
|
||||
log.debug('updatePrimaryEmail', { subscriberTableUpdated })
|
||||
log.debug('updatePrimaryEmail', { emailTableUpdated })
|
||||
console.debug('updatePrimaryEmail', { subscriberTableUpdated })
|
||||
console.debug('updatePrimaryEmail', { emailTableUpdated })
|
||||
} catch (error) {
|
||||
await trx.rollback()
|
||||
// @ts-ignore Type annotations added later; type unknown:
|
||||
log.error('updatePrimaryEmail', error)
|
||||
console.error('updatePrimaryEmail', error)
|
||||
}
|
||||
const updatedSubscriber = Array.isArray(subscriberTableUpdated) ? subscriberTableUpdated[0] : null
|
||||
return updatedSubscriber
|
||||
|
@ -208,7 +207,7 @@ async function updateFxAProfileData (subscriber, fxaProfileData) {
|
|||
// Not covered by tests; mostly side-effects. See test-coverage.md#mock-heavy
|
||||
/* c8 ignore start */
|
||||
async function removeFxAData (subscriber) {
|
||||
log.debug('removeFxAData', subscriber)
|
||||
console.debug('removeFxAData', subscriber)
|
||||
const updated = await knex('subscribers')
|
||||
.where('id', '=', subscriber.id)
|
||||
.update({
|
||||
|
@ -381,7 +380,7 @@ async function deleteUnverifiedSubscribers () {
|
|||
.where('primary_verified', false)
|
||||
.andWhere('created_at', '<', expiredTimeStamp)
|
||||
.del()
|
||||
log.info('deleteUnverifiedSubscribers', { msg: `Deleted ${numDeleted} rows.` })
|
||||
console.info('deleteUnverifiedSubscribers', { msg: `Deleted ${numDeleted} rows.` })
|
||||
}
|
||||
/* c8 ignore stop */
|
||||
|
||||
|
@ -395,7 +394,7 @@ async function deleteUnverifiedSubscribers () {
|
|||
/* c8 ignore start */
|
||||
async function deleteSubscriber (sub) {
|
||||
const trx = await knex.transaction()
|
||||
log.debug('deleteSubscriber', JSON.stringify(sub))
|
||||
console.debug('deleteSubscriber', JSON.stringify(sub))
|
||||
|
||||
try {
|
||||
await knex('email_addresses').where({ subscriber_id: sub.id }).del().transacting(trx)
|
||||
|
@ -404,7 +403,7 @@ async function deleteSubscriber (sub) {
|
|||
} catch (error) {
|
||||
await trx.rollback()
|
||||
// @ts-ignore Type annotations added later; type unknown:
|
||||
log.error('deleteSubscriber', error)
|
||||
console.error('deleteSubscriber', error)
|
||||
}
|
||||
// const subscriber = await knex('subscribers').returning('id').where('fxa_uid', fxaUID).del()
|
||||
// if (subscriber && subscriber[0]) { await knex('email_addresses').where({ subscriber_id: subscriber[0].id }).del() }
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
import { createTransport } from 'nodemailer'
|
||||
import { URL } from 'url'
|
||||
|
||||
import mozlog from './log.js'
|
||||
import AppConstants from '../appConstants.js'
|
||||
import {
|
||||
BadRequestError,
|
||||
|
@ -16,7 +15,6 @@ import { getMessage, getStringLookup } from '../utils/fluent.js'
|
|||
import { updateMonthlyEmailOptout } from '../db/tables/subscribers.js'
|
||||
import SMTPTransport from 'nodemailer/lib/smtp-transport/index.js'
|
||||
|
||||
const log = mozlog('email-utils')
|
||||
|
||||
const { SERVER_URL } = AppConstants
|
||||
|
||||
|
@ -37,7 +35,7 @@ const EmailTemplateType = {
|
|||
async function initEmail (smtpUrl = AppConstants.SMTP_URL) {
|
||||
// Allow a debug mode that will log JSON instead of sending emails.
|
||||
if (!smtpUrl) {
|
||||
log.info('smtpUrl-empty', { message: 'EmailUtils will log a JSON response instead of sending emails.' })
|
||||
console.info('smtpUrl-empty', { message: 'EmailUtils will log a JSON response instead of sending emails.' })
|
||||
gTransporter = createTransport({ jsonTransport: true })
|
||||
return true
|
||||
}
|
||||
|
@ -82,7 +80,7 @@ function sendEmail (recipient, subject, html) {
|
|||
/* c8 ignore next 4 */
|
||||
if (gTransporter.transporter.name === 'JSONTransport') {
|
||||
// @ts-ignore Added typing later, but it disagrees with actual use:
|
||||
log.info('JSONTransport', { message: info.message.toString() })
|
||||
console.info('JSONTransport', { message: info.message.toString() })
|
||||
}
|
||||
resolve(info)
|
||||
})
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import mozlog from './log.js'
|
||||
import AppConstants from '../appConstants.js'
|
||||
import { getAllBreaches, upsertBreaches, knex } from '../db/tables/breaches.js'
|
||||
import { InternalServerError } from '../utils/error.js'
|
||||
|
@ -17,7 +16,6 @@ const RENAMED_BREACHES = ['covve']
|
|||
const RENAMED_BREACHES_MAP = {
|
||||
covve: 'db8151dd'
|
||||
}
|
||||
const log = mozlog('hibp')
|
||||
|
||||
// TODO: Add unit test when changing this code:
|
||||
/* c8 ignore start */
|
||||
|
@ -49,7 +47,7 @@ async function _throttledFetch (url, reqOptions, tryCount = 1) {
|
|||
// 404 can mean "no results", return undefined response
|
||||
return undefined
|
||||
case 429:
|
||||
log.info('_throttledFetch', { err: 'Error 429, tryCount: ' + tryCount })
|
||||
console.info('_throttledFetch', { err: 'Error 429, tryCount: ' + tryCount })
|
||||
// @ts-ignore TODO: Explicitly parse into a number
|
||||
if (tryCount >= HIBP_THROTTLE_MAX_TRIES) {
|
||||
throw new InternalServerError(getMessage('error-hibp-throttled'))
|
||||
|
@ -63,7 +61,7 @@ async function _throttledFetch (url, reqOptions, tryCount = 1) {
|
|||
throw new InternalServerError(`bad response: ${response.status}`)
|
||||
}
|
||||
} catch (err) {
|
||||
log.error('_throttledFetch', { err })
|
||||
console.error('_throttledFetch', { err })
|
||||
throw new InternalServerError(getMessage('error-hibp-connect'))
|
||||
}
|
||||
}
|
||||
|
@ -141,7 +139,7 @@ async function getAllBreachesFromDb () {
|
|||
try {
|
||||
dbBreaches = await getAllBreaches()
|
||||
} catch (e) {
|
||||
log.error('getAllBreachesFromDb', 'No breaches exist in the database: ' + e)
|
||||
console.error('getAllBreachesFromDb', 'No breaches exist in the database: ' + e)
|
||||
return dbBreaches
|
||||
}
|
||||
|
||||
|
@ -178,12 +176,12 @@ async function getAllBreachesFromDb () {
|
|||
async function loadBreachesIntoApp (app) {
|
||||
// attempt to fetch breaches from the "breaches" database table
|
||||
const breaches = await getAllBreachesFromDb()
|
||||
log.debug('loadBreachesIntoApp', `loaded breaches from database: ${breaches.length}`)
|
||||
console.debug('loadBreachesIntoApp', `loaded breaches from database: ${breaches.length}`)
|
||||
|
||||
// if "breaches" table does not return results, fall back to HIBP request
|
||||
if (breaches?.length < 1) {
|
||||
const breachesResponse = await req('/breaches')
|
||||
log.debug('loadBreachesIntoApp', `loaded breaches from HIBP: ${breachesResponse.length}`)
|
||||
console.debug('loadBreachesIntoApp', `loaded breaches from HIBP: ${breachesResponse.length}`)
|
||||
|
||||
for (const breach of breachesResponse) {
|
||||
breach.DataClasses = formatDataClassesArray(breach.DataClasses)
|
||||
|
@ -201,7 +199,7 @@ async function loadBreachesIntoApp (app) {
|
|||
app.locals.breachLogoMap = new Map()
|
||||
app.locals.breaches = breaches
|
||||
app.locals.breachesLoadedDateTime = Date.now()
|
||||
log.info('done-loading-breaches', 'great success 👍')
|
||||
console.info('done-loading-breaches', 'great success 👍')
|
||||
}
|
||||
/* c8 ignore stop */
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// @ts-ignore No type definitions available
|
||||
import mozlog from 'mozlog'
|
||||
|
||||
import AppConstants from '../appConstants.js'
|
||||
|
||||
const log = mozlog({
|
||||
app: 'fx-monitor',
|
||||
level: AppConstants.MOZLOG_LEVEL,
|
||||
fmt: AppConstants.MOZLOG_FMT
|
||||
})
|
||||
|
||||
export default log
|
Загрузка…
Ссылка в новой задаче