chore: upgrade measurement-protocol to 0.1.1 (#377)

* chore: upgrade measurement-protocol to 0.1.1
* fix: update measurement-protocol invocation
pull/379/head
晋晓炜 Amio / 2020-04-19 23:45:12 +08:00 zatwierdzone przez GitHub
rodzic 588a7b2584
commit 537598c7ec
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 16 dodań i 16 usunięć

Wyświetl plik

@ -185,10 +185,10 @@ export function createBadgenHandler (conf: BadgenServeConfig): BadgenHandler {
} }
const { TRACKING_GA, NOW_REGION } = process.env const { TRACKING_GA, NOW_REGION } = process.env
const tracker = TRACKING_GA && measure(TRACKING_GA).setCustomDimension([NOW_REGION || 'unknown']) const tracker = TRACKING_GA && measure(TRACKING_GA).setCustomDimensions([NOW_REGION || 'unknown'])
async function measurementLogInvocation (host: string, urlPath: string) { async function measurementLogInvocation (host: string, urlPath: string) {
tracker && tracker.pageview({ dh: host, dp: urlPath}).send() tracker && tracker.pageview({ host, path: urlPath}).send()
} }
async function measurementLogError (category: string, action: string, label?: string, value?: number) { async function measurementLogError (category: string, action: string, label?: string, value?: number) {

24
package-lock.json wygenerowano
Wyświetl plik

@ -1931,6 +1931,11 @@
"to-fast-properties": "^2.0.0" "to-fast-properties": "^2.0.0"
} }
}, },
"@lukeed/uuid": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@lukeed/uuid/-/uuid-1.0.1.tgz",
"integrity": "sha512-shtopUGL/WuVicOTppRGDb2he9aGp+OF5EB11Xsbe3K4W6qN7HtK3F+ayNxcfbrG/SSL/Z9B+Xrb0Foz9x83gw=="
},
"@sentry/apm": { "@sentry/apm": {
"version": "5.15.4", "version": "5.15.4",
"resolved": "https://registry.npmjs.org/@sentry/apm/-/apm-5.15.4.tgz", "resolved": "https://registry.npmjs.org/@sentry/apm/-/apm-5.15.4.tgz",
@ -2131,9 +2136,9 @@
} }
}, },
"@types/node": { "@types/node": {
"version": "12.12.35", "version": "12.12.36",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.35.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.36.tgz",
"integrity": "sha512-ASYsaKecA7TUsDrqIGPNk3JeEox0z/0XR/WsJJ8BIX/9+SkMSImQXKWfU/yBrSyc7ZSE/NPqLu36Nur0miCFfQ==" "integrity": "sha512-hmmypvyO/uTLFYCYu6Hlb3ydeJ11vXRxg8/WJ0E3wvwmPO0y47VqnfmXFVuWlysO0Zyj+je1Y33rQeuYkZ51GQ=="
}, },
"@types/prop-types": { "@types/prop-types": {
"version": "15.7.3", "version": "15.7.3",
@ -6281,11 +6286,11 @@
"dev": true "dev": true
}, },
"measurement-protocol": { "measurement-protocol": {
"version": "0.0.2", "version": "0.1.1",
"resolved": "https://registry.npmjs.org/measurement-protocol/-/measurement-protocol-0.0.2.tgz", "resolved": "https://registry.npmjs.org/measurement-protocol/-/measurement-protocol-0.1.1.tgz",
"integrity": "sha512-ZDYSxSd9z45G9AJB0j984otYWUkkF3bg+L4pfribdJpNVNE50kE7S6Jd8vpSsWpSo/LNkBwpL8HSrLhNuCZoDw==", "integrity": "sha512-s3RaVbZUd/+ddLXH8VbAVZhBgk62As6lZZB5k7b8uczE76A9qzfSrqDF+7MrosJ7nLY2nTnSNc7YacYZaSDJ3g==",
"requires": { "requires": {
"uuid": "^3.4.0" "@lukeed/uuid": "^1.0.1"
} }
}, },
"memory-fs": { "memory-fs": {
@ -10352,11 +10357,6 @@
"object.getownpropertydescriptors": "^2.1.0" "object.getownpropertydescriptors": "^2.1.0"
} }
}, },
"uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
},
"v8-compile-cache": { "v8-compile-cache": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz",

Wyświetl plik

@ -32,7 +32,7 @@
"date-fns": "^2.12.0", "date-fns": "^2.12.0",
"got": "^10.7.0", "got": "^10.7.0",
"lodash.debounce": "^4.0.8", "lodash.debounce": "^4.0.8",
"measurement-protocol": "0.0.2", "measurement-protocol": "^0.1.1",
"micro": "^9.3.4", "micro": "^9.3.4",
"millify": "^3.1.3", "millify": "^3.1.3",
"my-way": "^2.0.0", "my-way": "^2.0.0",
@ -48,7 +48,7 @@
"@types/fs-extra": "^8.1.0", "@types/fs-extra": "^8.1.0",
"@types/lodash.debounce": "^4.0.6", "@types/lodash.debounce": "^4.0.6",
"@types/micro": "^7.3.3", "@types/micro": "^7.3.3",
"@types/node": "^12.12.35", "@types/node": "^12.12.36",
"@types/react": "^16.9.34", "@types/react": "^16.9.34",
"@types/react-dom": "^16.9.6", "@types/react-dom": "^16.9.6",
"@types/semver": "^7.1.0", "@types/semver": "^7.1.0",