Skip to content

Commit

Permalink
🤖 Release PR (#1447)
Browse files Browse the repository at this point in the history
* chore: functions build tidying

* chore: update scripts and dep refs

* refactor: frontend type imports

* fix: remove precompile script

* chore: remove project refs

* feat: removes legacy mail function (#1448)

A legacy function exists that served mostly as a proof of concept to
automate sending emails from the platform based on db updates.

As the feature is outdated, not currently used, and requires additional
setup from firebase console to enable integration and mail provider,
assume easiest for now to just remove.

BREAKING CHANGE: The function will need to be manually deleted across all current instances

Co-authored-by: Chris Clarke <chris.m.clarke@live.co.uk>
  • Loading branch information
github-actions[bot] and chrismclarke authored Feb 2, 2022
1 parent 33aa706 commit 21c9a0f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 46 deletions.
10 changes: 5 additions & 5 deletions functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"webpack": "^4.46.0"
},
"scripts": {
"start": "npm run precompile && ts-node scripts/start.ts",
"serve:live": "npm run copyDevConfig && npm run serve",
"start": "ts-node scripts/start.ts",
"serve:live": "yarn copyDevConfig && yarn serve",
"lint": "tslint --project tsconfig.json",
"build": "webpack",
"watch": "webpack --watch",
"copyDevConfig": "firebase functions:config:get > .runtimeconfig.json",
"db:backup:local": "firestore-export -a service.json -b backup.json -p",
"shell": "npm run build && firebase functions:shell",
"shell": "yarn build && firebase functions:shell",
"emulator:seed": "ts-node scripts/emulator/seed.ts"
},
"main": "index.js",
Expand All @@ -29,8 +29,8 @@
"google-auth-library": "^6.1.1",
"googleapis": "^61.0.0",
"log-update": "^4.0.0",
"oa-shared": "^1.0.0",
"one-army-community-platform": "^1",
"oa-shared": "workspace:*",
"one-army-community-platform": "workspace:*",
"request": "^2.88.2",
"sharp": "^0.26.1"
},
Expand Down
27 changes: 0 additions & 27 deletions functions/src/Integrations/firebase-email.ts

This file was deleted.

2 changes: 0 additions & 2 deletions functions/src/Integrations/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import * as IntegrationsSlack from './firebase-slack'
import * as IntegrationsDiscord from './firebase-discord'
import * as IntegrationsEmail from './firebase-email'

exports.notifyNewPin = IntegrationsSlack.notifyNewPin
exports.notifyNewHowTo = IntegrationsSlack.notifyNewHowTo
exports.notifyNewEvent = IntegrationsSlack.notifyNewEvent
exports.notifyPinAccepted = IntegrationsDiscord.notifyPinAccepted
exports.notifyHowToAccepted = IntegrationsDiscord.notifyHowToAccepted
exports.notifyEventAccepted = IntegrationsDiscord.notifyEventAccepted
exports.emailNotificationDemo = IntegrationsEmail.notifyEmailDemo
4 changes: 2 additions & 2 deletions functions/src/models.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import * as functions from 'firebase-functions'

// Import and Re-export models from the main platform if required by functions
import {
import type {
DBDoc,
IDBEndpoint,
IEventDB,
IHowtoDB,
IHowtoStats,
IUserDB,
IMapPin,
} from '../../src/models'
} from 'one-army-community-platform/src/models'
export { DBDoc, IDBEndpoint, IEventDB, IHowtoDB, IHowtoStats, IUserDB, IMapPin }

import { generateDBEndpoints } from 'oa-shared'
Expand Down
6 changes: 0 additions & 6 deletions functions/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true
},
"references": [
// these (should) be compiled ahead of functions, although can break: https://github.com/microsoft/TypeScript/issues/25864#issuecomment-596217193
// in these cases manual build might be required on other projects first (currently done in firebase.json)
{ "path": "../tsconfig.src-types.json" },
{ "path": "../shared/tsconfig.json" }
],
"include": ["src/**/*", "../types"],
"exclude": ["src/**/*.test.tsx", "../src/**/*.test.tsx"]
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15679,8 +15679,8 @@ fsevents@^1.2.7:
googleapis: ^61.0.0
jszip: ^3.7.0
log-update: ^4.0.0
oa-shared: ^1.0.0
one-army-community-platform: ^1
oa-shared: "workspace:*"
one-army-community-platform: "workspace:*"
request: ^2.88.2
sharp: ^0.26.1
ts-node: ^10.0.0
Expand Down Expand Up @@ -21935,7 +21935,7 @@ fsevents@^1.2.7:
languageName: unknown
linkType: soft

"oa-shared@1.0.0, oa-shared@^1.0.0, oa-shared@workspace:*, oa-shared@workspace:shared":
"oa-shared@1.0.0, oa-shared@workspace:*, oa-shared@workspace:shared":
version: 0.0.0-use.local
resolution: "oa-shared@workspace:shared"
languageName: unknown
Expand Down Expand Up @@ -22146,7 +22146,7 @@ fsevents@^1.2.7:
languageName: node
linkType: hard

"one-army-community-platform@^1, one-army-community-platform@workspace:.":
"one-army-community-platform@workspace:*, one-army-community-platform@workspace:.":
version: 0.0.0-use.local
resolution: "one-army-community-platform@workspace:."
dependencies:
Expand Down

0 comments on commit 21c9a0f

Please sign in to comment.