-
Notifications
You must be signed in to change notification settings - Fork 928
Add support for running the emulators over SSL #8967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
maneesht
wants to merge
21
commits into
main
Choose a base branch
from
mtewani/add-ssl-checks-use-emulat9or
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
02c52c6
Added test project to fdc
maneesht 37d0f18
Fixed formatting
maneesht a4d7813
Fix linting
maneesht 170b15a
Excluded example integration from tsconfig
maneesht ec405ae
Fixed example-integration package.json
maneesht 248f654
Added ssl check for firestore
maneesht 14ef1bc
Added ssl checks for RTDB
maneesht a8fe7de
Merge remote-tracking branch 'origin/main' into mtewani/add-ssl-check…
maneesht df4a115
Removed unnecessary files
maneesht f867d3b
Removed unnecessary data connect changes
maneesht 4f23f33
Create gentle-laws-kneel.md
maneesht e755d8c
Addressed feedback
maneesht ceed5ab
Addressed linting issue
maneesht 44e2d8b
Added functions change
maneesht a1b85e2
Removed linting rules
maneesht d67b284
Updated useEmulator
maneesht a8b208b
Updated functions signatures
maneesht 205f9ca
Updated docsite changes
maneesht 4bc9433
Added tests
maneesht a32ea8b
Updated docsite
maneesht 07f44b6
Fixed formatting
maneesht 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@firebase/database-compat": patch | ||
"@firebase/database-types": patch | ||
"@firebase/database": patch | ||
"@firebase/firestore": patch | ||
"@firebase/functions": patch | ||
"@firebase/storage": patch | ||
--- | ||
|
||
Add SSL checks to `connectDatabaseEmulator` and `connectFirestoreEmulator` |
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
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
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
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 |
---|---|---|
|
@@ -23,7 +23,7 @@ https://github.com/firebase/firebase-js-sdk | |
| <b>function(firestore, ...)</b> | | ||
| [collection(firestore, path, pathSegments)](./firestore_lite.md#collection_1eb4c23) | Gets a <code>CollectionReference</code> instance that refers to the collection at the specified absolute path. | | ||
| [collectionGroup(firestore, collectionId)](./firestore_lite.md#collectiongroup_1838fc3) | Creates and returns a new <code>Query</code> instance that includes all documents in the database that are contained in a collection or subcollection with the given <code>collectionId</code>. | | ||
| [connectFirestoreEmulator(firestore, host, port, options)](./firestore_lite.md#connectfirestoreemulator_7c247cd) | Modify this instance to communicate with the Cloud Firestore emulator.<!-- -->Note: This must be called before this instance has been used to do any operations. | | ||
| [connectFirestoreEmulator(firestore, host, port, options)](./firestore_lite.md#connectfirestoreemulator_6c8868a) | Modify this instance to communicate with the Cloud Firestore emulator.<!-- -->Note: This must be called before this instance has been used to do any operations. | | ||
| [doc(firestore, path, pathSegments)](./firestore_lite.md#doc_1eb4c23) | Gets a <code>DocumentReference</code> instance that refers to the document at the specified absolute path. | | ||
| [runTransaction(firestore, updateFunction, options)](./firestore_lite.md#runtransaction_6f03ec4) | Executes the given <code>updateFunction</code> and then attempts to commit the changes applied within the transaction. If any document read within the transaction has changed, Cloud Firestore retries the <code>updateFunction</code>. If it fails to commit after 5 attempts, the transaction fails.<!-- -->The maximum number of writes allowed in a single transaction is 500. | | ||
| [terminate(firestore)](./firestore_lite.md#terminate_231a8e0) | Terminates the provided <code>Firestore</code> instance.<!-- -->After calling <code>terminate()</code> only the <code>clearIndexedDbPersistence()</code> functions may be used. Any other function will throw a <code>FirestoreError</code>. Termination does not cancel any pending writes, and any promises that are awaiting a response from the server will not be resolved.<!-- -->To restart after termination, create a new instance of <code>Firestore</code> with [getFirestore()](./firestore_.md#getfirestore)<!-- -->.<!-- -->Note: Under normal circumstances, calling <code>terminate()</code> is not required. This function is useful only when you want to force this instance to release all of its resources or in combination with [clearIndexedDbPersistence()](./firestore_.md#clearindexeddbpersistence_231a8e0) to ensure that all local state is destroyed between test runs. | | ||
|
@@ -308,7 +308,7 @@ export declare function collectionGroup(firestore: Firestore, collectionId: stri | |
|
||
The created `Query`<!-- -->. | ||
|
||
### connectFirestoreEmulator(firestore, host, port, options) {:#connectfirestoreemulator_7c247cd} | ||
### connectFirestoreEmulator(firestore, host, port, options) {:#connectfirestoreemulator_6c8868a} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did this get updated? Just vagaries of the generation process I guess? |
||
|
||
Modify this instance to communicate with the Cloud Firestore emulator. | ||
|
||
|
@@ -319,6 +319,7 @@ Note: This must be called before this instance has been used to do any operation | |
```typescript | ||
export declare function connectFirestoreEmulator(firestore: Firestore, host: string, port: number, options?: { | ||
mockUserToken?: EmulatorMockTokenOptions | string; | ||
ssl?: boolean; | ||
}): void; | ||
``` | ||
|
||
|
@@ -329,7 +330,7 @@ export declare function connectFirestoreEmulator(firestore: Firestore, host: str | |
| firestore | [Firestore](./firestore_lite.firestore.md#firestore_class) | The <code>Firestore</code> instance to configure to connect to the emulator. | | ||
| host | string | the emulator host (ex: localhost). | | ||
| port | number | the emulator port (ex: 9000). | | ||
| options | { mockUserToken?: [EmulatorMockTokenOptions](./util.md#emulatormocktokenoptions) \| string; } | | | ||
| options | { mockUserToken?: [EmulatorMockTokenOptions](./util.md#emulatormocktokenoptions) \| string; ssl?: boolean; } | | | ||
|
||
<b>Returns:</b> | ||
|
||
|
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know what role this comment is meant to play in the generated docs?
It is in most (but not all, see database.md) of the identical added doc blurbs.