This repository was archived by the owner on Oct 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Add triggered cloud functions for submitting Glean pings #333
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
f76cccf
Add Glean metrics, pings, docs, and npm scripts
aaga 92f37de
Add triggered function stubs (no Glean pings yet)
aaga 8efa6ff
Add getRallyID function, fix some function naming
aaga 1813e86
Port /functions from CommonJS to ESM
aaga 71cbd8f
Fix existing Jest tests to use ESM
aaga 2580bce
Implement Glean pings
aaga 323b6f1
Disable function triggers in integration test; cleanup some unused code
aaga 9e4fef6
Add APP_ID and VERSION to Glean; rename sendPingFlag to submitPingFlag
aaga 9f70f04
Add minor comment explanation for function test
aaga d739c0f
Change package.json version require to import
aaga 1c18b7f
Rollback version string; was creating import problems
aaga d5ea869
Remove unnecessary 'set' from testing script
aaga 66e9552
Remove explicit true/false in cors.ts
aaga 654164d
Move testenv loading to integration-test.sh
aaga 876506c
Keep function triggers enabled in UX integration test. Disable Glean …
aaga 18c39f6
Add app_display_version for Glean
aaga 6451d39
Change function export format to enable better stack traces
aaga e5cc687
Tidy up demographics logic
aaga 59294da
Fix typo
aaga 8d7c402
Fix up some types
aaga df236a2
tidy up return value
aaga 6400587
Fix demographic logic
aaga 18cc63a
Remove allowJS: true, no longer needed
aaga f37a248
Use function logger instead of console.log
aaga cc5489c
Clean up logic
aaga cd9923c
Change order of extensionUser deletion
aaga d602f8d
Change rallytoken tests to use callback instead of await; remove Prom…
aaga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,4 @@ | ||
| GCLOUD_PROJECT="demo-rally" | ||
| FIRESTORE_EMULATOR_HOST="localhost:8080" | ||
| FIRESTORE_EMULATOR_HOST="localhost:8080" | ||
| FIREBASE_EMULATOR_HUB="localhost:4400" | ||
| NODE_OPTIONS=--experimental-vm-modules | ||
thomik-corp marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,22 @@ | ||
| module.exports = { | ||
| preset: "ts-jest", | ||
| export default { | ||
| preset: "ts-jest/presets/default-esm", | ||
| globals: { | ||
| "ts-jest": { | ||
| useESM: true, | ||
| }, | ||
| }, | ||
| resolver: "ts-jest-resolver", | ||
| moduleNameMapper: { | ||
aaga marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "^@mozilla/glean/node": "@mozilla/glean/dist/index/node.js", | ||
| "^@mozilla/glean/plugins/(.*)": "@mozilla/glean/dist/plugins/$1.js", | ||
| "^@mozilla/glean/uploader": "@mozilla/glean/dist/core/upload/uploader.js", | ||
| "^@mozilla/glean/private/metrics/(.*)": | ||
| "@mozilla/glean/dist/core/metrics/types/$1.js", | ||
| "^@mozilla/glean/private/ping": | ||
| "@mozilla/glean/dist/core/pings/ping_type.js", | ||
| }, | ||
| testRegex: "src(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", | ||
| testPathIgnorePatterns: ["lib/", "node_modules/", "setupTests.js"], | ||
| moduleFileExtensions: ["js", "ts", "tsx", "jsx", "json", "node"], | ||
| testEnvironment: "node", | ||
| testEnvironment: "node", | ||
| }; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.