Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: prevent module not found error when opting into redux - #282 * fix: do not throw error for disabling notifications * build(app): update firebase and notistack * examples: update redux examples * build(deps-dev): bump @babel/preset-env from 7.11.0 to 7.11.5 (#281) * build(deps-dev): bump @babel/polyfill from 7.10.4 to 7.11.5 (#280) * build(deps-dev): bump @babel/plugin-transform-runtime (#279) * build(deps-dev): bump mocha from 8.1.1 to 8.1.3 (#278)
- Loading branch information
1 parent
8cb04a0
commit 30867bb
Showing
136 changed files
with
6,551 additions
and
8,469 deletions.
There are no files selected for viewing
This file contains 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 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,17 @@ | ||
# For for information on config options, visit docs: | ||
# https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "npm" | ||
directory: "/functions" | ||
open-pull-requests-limit: 3 | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
This file contains 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 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 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 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 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,15 +1,25 @@ | ||
module.exports = { | ||
extends: ['../.eslintrc.js', 'plugin:jsdoc/recommended'], | ||
plugins: ['jsdoc'], | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
moduleDirectory: ['node_modules', '/'] | ||
} | ||
} | ||
}, | ||
extends: [ | ||
'../.eslintrc.js', | ||
'plugin:jsdoc/recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier/@typescript-eslint' | ||
], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['node', 'jsdoc', '@typescript-eslint'], | ||
rules: { | ||
'no-console': 0, | ||
'jsdoc/newline-after-description': 0 | ||
} | ||
'jsdoc/newline-after-description': 0, | ||
'jsdoc/require-param-type': 0, | ||
'jsdoc/require-returns-type': 0, | ||
'@typescript-eslint/no-explicit-any': 0 | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['./index.js'], | ||
rules: { | ||
'@typescript-eslint/no-var-requires': 0 | ||
} | ||
} | ||
] | ||
} |
This file contains 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,42 +1,34 @@ | ||
const glob = require('glob') | ||
const path = require('path') | ||
const admin = require('firebase-admin') | ||
const functions = require('firebase-functions') | ||
require('source-map-support/register') | ||
|
||
// Initialize Firebase so it is available within functions | ||
// Initialize firebase-admin so it is available within functions | ||
try { | ||
admin.initializeApp(functions.config().firebase) | ||
} catch (e) { | ||
admin.initializeApp() | ||
} catch (err) { | ||
/* istanbul ignore next: not called in tests */ | ||
console.error( | ||
'Caught error initializing app with functions.config():', | ||
e.message || e | ||
'Caught error initializing default firebase-admin app instance:', | ||
err | ||
) | ||
} | ||
|
||
// Set Firestore timestamp settings | ||
// NOTE: Skipped when running tests tests so it does not have to be mocked | ||
if (process.env.NODE_ENV !== 'test') { | ||
admin.firestore().settings({ timestampsInSnapshots: true }) | ||
} | ||
|
||
// Load all folders within dist directory (mirrors layout of src) | ||
const files = glob.sync('./dist/**/index.js', { | ||
cwd: __dirname, | ||
ignore: ['./node_modules/**', './dist/utils/**', './dist/constants/**'] | ||
}) | ||
|
||
// Loop over all folders found within dist loading only the relevant function | ||
// instead of all functions. Done to help improve function cold start times. | ||
// Load only files associated with the current function if FUNCTION_NAME env | ||
// variable exists - Done to help improve function cold start times. | ||
files.forEach((functionFile) => { | ||
// Get folder name from file name (removing any dashes) | ||
const folderName = path | ||
.basename(path.dirname(functionFile)) | ||
.replace(/[-]/g, '') | ||
|
||
// Load single function from default | ||
// Load single function from default export of function folder's index file | ||
!process.env.FUNCTION_NAME || process.env.FUNCTION_NAME === folderName // eslint-disable-line no-unused-expressions | ||
? (exports[folderName] = require(functionFile).default) // eslint-disable-line global-require | ||
: () => {} | ||
: () => {} // eslint-disable-line @typescript-eslint/no-empty-function | ||
}) |
This file contains 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.