Skip to content

Commit

Permalink
v0.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
prescottprue committed Jul 27, 2020
1 parent d372b4a commit 3f34279
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fireadmin",
"version": "0.10.0",
"version": "0.10.1",
"description": "Application for Managing Firebase Applications. Includes support for multiple environments and data migrations.",
"scripts": {
"clean": "rimraf build",
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ export default function useActionRunner({
const firestore = useFirestore()
const user = useUser()
const { FieldValue } = useFirestore
const { ServerValue } = useDatabase
const environmentsRef = firestore.collection(
`${PROJECTS_COLLECTION}/${projectId}/environments`
)
@@ -80,7 +81,7 @@ export default function useActionRunner({
'A valid template must be selected in order to run an action'
showError(errMsg)
triggerAnalyticsEvent('invalidTemplateRunAttempt', {
projectId: projectId,
projectId,
environmentValues
})
return errMsg
@@ -89,12 +90,13 @@ export default function useActionRunner({
const { templateId } = selectedTemplate
// Build request object for action run
const actionRequest = {
projectId: projectId,
...omit(formValues, ['_highlightResult', 'updatedAt', 'createdAt']),
projectId,
serviceAccountType: 'firestore',
templateId,
createdBy: user.uid,
template: omit(selectedTemplate, ['_highlightResult']),
...omit(formValues, ['_highlightResult', 'updatedAt'])
createdAt: ServerValue.TIMESTAMP,
template: omit(selectedTemplate, ['_highlightResult'])
}

// Convert selected environment keys into their associated environment objects
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ import {
useFirestoreCollectionData,
useStorage
} from 'reactfire'
import * as Sentry from '@sentry/browser'
import useNotifications from 'modules/notification/useNotifications'
import { triggerAnalyticsEvent, createProjectEvent } from 'utils/analytics'
import { to } from 'utils/async'
@@ -80,6 +81,7 @@ export default function useEnvironmentsPage({ projectId }) {
'Error uploading service account: ',
uploadErr.message || 'Could not add project'
)
Sentry.captureException(uploadErr)
throw uploadErr
}

@@ -106,6 +108,7 @@ export default function useEnvironmentsPage({ projectId }) {
if (newEnvErr) {
console.error('Error creating environment', newEnvErr) // eslint-disable-line no-console
showError('Error creating new environment: ', newEnvErr.message)
Sentry.captureException(newEnvErr)
throw newEnvErr
}

@@ -165,6 +168,7 @@ export default function useEnvironmentsPage({ projectId }) {
} catch (err) {
console.error('error', err) // eslint-disable-line no-console
showError('Error: ', err.message || 'Could not remove environment')
Sentry.captureException(err)
}
}

@@ -204,7 +208,7 @@ export default function useEnvironmentsPage({ projectId }) {
} catch (err) {
console.error('Error updating environment:', err.message) // eslint-disable-line no-console
showError('Error: ', err.message || 'Could not update environment')
throw err
Sentry.captureException(err)
}
}

0 comments on commit 3f34279

Please sign in to comment.