Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: firebase/firebase-admin-node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v8.9.2
Choose a base ref
...
head repository: firebase/firebase-admin-node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v8.10.0
Choose a head ref
  • 16 commits
  • 94 files changed
  • 4 contributors

Commits on Feb 13, 2020

  1. Custom Action for sending Tweets (#784)

    * Experimental custom Action for sending Tweets
    
    * Added license headers
    
    * Added README file
    
    * Updated package descriptions
    hiranya911 authored Feb 13, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    cf49e9a View commit details

Commits on Feb 14, 2020

  1. Improve customClaims Typing (#768)

    William Sedlacek authored Feb 14, 2020
    Copy the full SHA
    e57c262 View commit details
  2. chore: Experimental release flow based on Actions (#780)

    * chore: Experimental release flow based on Actions
    
    * Added tarball verification step; Simplified CI trigger
    
    * Splitting staging and publish phases into separate jobs
    
    * Fleshed out the full workflow
    
    * Trigger RC build
    hiranya911 authored Feb 14, 2020
    Copy the full SHA
    5abaab6 View commit details

Commits on Feb 26, 2020

  1. chore: Migrated to ESlint (#790)

    * chore: Migrated to ESlint
    
    * Added licesne header
    hiranya911 authored Feb 26, 2020
    Copy the full SHA
    2b952d4 View commit details

Commits on Feb 28, 2020

  1. Copy the full SHA
    c0e6ae1 View commit details

Commits on Mar 2, 2020

  1. Copy the full SHA
    0f6c02e View commit details

Commits on Mar 3, 2020

  1. Fix compilation error in integration tests (#798)

    Introduced by #790
    rsgowman authored Mar 3, 2020
    Copy the full SHA
    0438b10 View commit details
  2. Build integration tests during CI (and release) (#800)

    Note that this won't actually run them.
    
    Additionally, the *unit* tests are also built, impying that we're
    building them twice (once during this step, and possibly again when
    running the unit tests.)
    rsgowman authored Mar 3, 2020
    Copy the full SHA
    d83daa6 View commit details

Commits on Mar 4, 2020

  1. Fix revokeRefreshTokens to round consistently with the other platform…

    …s. (#801)
    
    This also makes it consistent with the comments a few lines above, as
    well as the integration test.
    rsgowman authored Mar 4, 2020
    Copy the full SHA
    224f65f View commit details

Commits on Mar 9, 2020

  1. feat(auth): Multi-factor Auth support with SMS for Google Cloud Ident…

    …ity Platform (#804)
    
    Defines multi-factor auth administrative APIs for Google Cloud Identity Platform.
    bojeil-google authored Mar 9, 2020
    Copy the full SHA
    0a6c956 View commit details

Commits on Mar 10, 2020

  1. Copy the full SHA
    4b7e99c View commit details
  2. Removes special char from index.d.ts. (#808)

    This is causing errors in the reference generation process.
    bojeil-google authored Mar 10, 2020
    Copy the full SHA
    6c7c9ba View commit details

Commits on Mar 11, 2020

  1. Defines MultiFactor{Create|Update}Settings interfaces. (#809)

    * Defines MultiFactor{Create|Update}Settings interfaces.
    bojeil-google authored Mar 11, 2020
    Copy the full SHA
    8580959 View commit details
  2. chore: Adding a .npmrc file to the root of the repo (#810)

    * chore: Adding a .npmrc file to the root of the repo
    
    * Removing the root-level .npmrc file
    hiranya911 authored Mar 11, 2020
    Copy the full SHA
    163463a View commit details

Commits on Mar 12, 2020

  1. Copy the full SHA
    3907c0c View commit details
  2. Copy the full SHA
    c35acac View commit details
Showing with 39,326 additions and 1,991 deletions.
  1. +48 −0 .eslintrc.js
  2. +49 −0 .github/actions/send-tweet/README.md
  3. +35 −0 .github/actions/send-tweet/action.yml
  4. +33,631 −0 .github/actions/send-tweet/dist/index.js
  5. +37 −0 .github/actions/send-tweet/index.js
  6. +364 −0 .github/actions/send-tweet/package-lock.json
  7. +23 −0 .github/actions/send-tweet/package.json
  8. BIN .github/resources/integ-service-account.json.gpg
  9. +65 −0 .github/scripts/generate_changelog.sh
  10. +23 −0 .github/scripts/publish_package.sh
  11. +170 −0 .github/scripts/publish_preflight_check.sh
  12. +25 −0 .github/scripts/run_integration_tests.sh
  13. +2 −3 .github/workflows/ci.yml
  14. +155 −0 .github/workflows/release.yml
  15. +18 −0 docgen/content-sources/node/toc.yaml
  16. +807 −68 package-lock.json
  17. +8 −6 package.json
  18. +4 −4 src/auth/action-code-settings-builder.ts
  19. +272 −127 src/auth/auth-api-request.ts
  20. +10 −10 src/auth/auth-config.ts
  21. +19 −17 src/auth/auth.ts
  22. +3 −1 src/auth/credential.ts
  23. +3 −3 src/auth/tenant-manager.ts
  24. +2 −2 src/auth/tenant.ts
  25. +7 −6 src/auth/token-generator.ts
  26. +4 −4 src/auth/token-verifier.ts
  27. +224 −146 src/auth/user-import-builder.ts
  28. +266 −17 src/auth/user-record.ts
  29. +8 −8 src/database/database.ts
  30. +3 −3 src/firebase-app.ts
  31. +12 −9 src/firebase-namespace.ts
  32. +3 −2 src/firestore/firestore.ts
  33. +233 −46 src/index.d.ts
  34. +1 −1 src/instance-id/instance-id-request.ts
  35. +1 −1 src/instance-id/instance-id.ts
  36. +4 −4 src/messaging/batch-request.ts
  37. +7 −7 src/messaging/messaging-api-request.ts
  38. +17 −17 src/messaging/messaging-errors.ts
  39. +25 −25 src/messaging/messaging-types.ts
  40. +13 −11 src/messaging/messaging.ts
  41. +62 −62 src/project-management/android-app.ts
  42. +35 −35 src/project-management/ios-app.ts
  43. +114 −114 src/project-management/project-management-api-request.ts
  44. +32 −32 src/project-management/project-management.ts
  45. +3 −3 src/security-rules/security-rules-api-client.ts
  46. +1 −1 src/security-rules/security-rules.ts
  47. +2 −2 src/storage/storage.ts
  48. +38 −38 src/utils/api-request.ts
  49. +3 −3 src/utils/deep-copy.ts
  50. +48 −0 src/utils/error.ts
  51. +3 −3 src/utils/index.ts
  52. +34 −3 src/utils/validator.ts
  53. +235 −85 test/integration/auth.spec.ts
  54. +8 −9 test/integration/database.spec.ts
  55. +7 −7 test/integration/firestore.spec.ts
  56. +85 −85 test/integration/project-management.spec.ts
  57. +3 −3 test/integration/security-rules.spec.ts
  58. +2 −3 test/integration/setup.ts
  59. +1 −1 test/integration/storage.spec.ts
  60. +40 −39 test/integration/typescript/src/example.test.ts
  61. +10 −10 test/integration/typescript/src/example.ts
  62. +22 −23 test/resources/mocks.ts
  63. +2 −2 test/unit/auth/action-code-settings-builder.spec.ts
  64. +561 −126 test/unit/auth/auth-api-request.spec.ts
  65. +12 −12 test/unit/auth/auth-config.spec.ts
  66. +64 −52 test/unit/auth/auth.spec.ts
  67. +3 −1 test/unit/auth/credential.spec.ts
  68. +8 −8 test/unit/auth/tenant-manager.spec.ts
  69. +4 −1 test/unit/auth/token-generator.spec.ts
  70. +2 −2 test/unit/auth/token-verifier.spec.ts
  71. +191 −33 test/unit/auth/user-import-builder.spec.ts
  72. +399 −35 test/unit/auth/user-record.spec.ts
  73. +3 −3 test/unit/database/database.spec.ts
  74. +9 −9 test/unit/firebase-app.spec.ts
  75. +2 −2 test/unit/firebase-namespace.spec.ts
  76. +5 −6 test/unit/firebase.spec.ts
  77. +1 −0 test/unit/firestore/firestore.spec.ts
  78. +41 −41 test/unit/instance-id/instance-id-request.spec.ts
  79. +2 −2 test/unit/instance-id/instance-id.spec.ts
  80. +4 −4 test/unit/messaging/batch-requests.spec.ts
  81. +25 −23 test/unit/messaging/messaging.spec.ts
  82. +79 −79 test/unit/project-management/android-app.spec.ts
  83. +37 −37 test/unit/project-management/ios-app.spec.ts
  84. +180 −180 test/unit/project-management/project-management-api-request.spec.ts
  85. +137 −137 test/unit/project-management/project-management.spec.ts
  86. +8 −8 test/unit/security-rules/security-rules.spec.ts
  87. +6 −6 test/unit/storage/storage.spec.ts
  88. +3 −3 test/unit/utils.ts
  89. +25 −21 test/unit/utils/api-request.spec.ts
  90. +7 −7 test/unit/utils/error.spec.ts
  91. +58 −1 test/unit/utils/index.spec.ts
  92. +59 −0 test/unit/utils/validator.spec.ts
  93. +0 −21 tslint-test.json
  94. +0 −20 tslint.json
48 changes: 48 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*!
* Copyright 2020 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
// Following checks are temporarily disabled. We shall incrementally enable them in the
// future, fixing any violations as we go.
'@typescript-eslint/no-non-null-assertion': 0,

// Disabled checks
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-use-before-define': 0,

// Required checks
'indent': ['error', 2],
'@typescript-eslint/explicit-function-return-type': [
'error',
{
'allowExpressions': true,
'allowTypedFunctionExpressions': true,
'allowHigherOrderFunctions': true
}
],
}
};
49 changes: 49 additions & 0 deletions .github/actions/send-tweet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Send Tweet GitHub Action

This is a minimalistic GitHub Action for posting Firebase release announcements
to Twitter. Simply specify the Twitter API keys along with the Tweet status to
be posted.

## Inputs

### `status`

**Required** Text of the Tweet to send.

### `consumer-key`

**Required** Consumer API key from Twitter.

### `consumer-secret`

**Required** Consumer API secret key from Twitter.

### `access-token`

**Required** Twitter application access token.

### `access-token-secret`

**Required** Twitter application access token secret.

## Example usage

```
- name: Send Tweet
uses: firebase/firebase-admin-node/.github/actions/send-tweet
with:
status: >
v1.2.3 of @Firebase Admin Node.js SDK is available.
Release notes at https://firebase.google.com.
consumer-key: ${{ secrets.TWITTER_CONSUMER_KEY }}
consumer-secret: ${{ secrets.TWITTER_CONSUMER_SECRET }}
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
```

## Implementation

This Action uses the `twitter` NPM package to send Tweets.

When making a code change remember to run `npm run pack` to rebuild the
`dist/index.js` file which is the executable of this Action.
35 changes: 35 additions & 0 deletions .github/actions/send-tweet/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2020 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: 'Send Tweet Action'
description: 'Send Tweets from GitHub Actions workflows.'
inputs:
repo:
status: Status (Tweet) to be posted
required: true
consumer-key:
description: Consumer API key.
required: true
consumer-secret:
description: Consumer API secret key.
required: true
access-token:
description: Application access token.
required: true
access-token-secret:
description: Application access token secret.
required: true
runs:
using: 'node12'
main: 'dist/index.js'
Loading