-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: crisis support sections (#677)
# Pull Request type Please check the type of change your PR introduces: - [ ] Bugfix - [x] Feature - [ ] Code style update (formatting, renaming) - [ ] Refactoring (no functional changes, no API changes) - [ ] Build-related changes - [ ] Documentation content changes - [ ] Other (please describe): ## What is the current behavior? Issue Number: - IN-909 - PLI-37 - IN-908 ## What is the new behavior? - - - ## Does this introduce a breaking change? - [ ] Yes - [ ] No ## Other information PR-URL: #677 Co-authored-by: Joe Karow <[email protected]> Co-authored-by: InReach [Automated User] <[email protected]>
- Loading branch information
Showing
138 changed files
with
4,681 additions
and
838 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 |
---|---|---|
|
@@ -64,3 +64,5 @@ _generated/* | |
|
||
packages/db/backup | ||
|
||
# internal temp scripts | ||
___*.ts |
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,47 @@ | ||
import { Listr, type ListrDefaultRenderer, type ListrTask as ListrTaskObj, PRESET_TIMER } from 'listr2' | ||
|
||
import fs from 'fs' | ||
import path from 'path' | ||
|
||
import { getEnv } from '@weareinreach/env' | ||
|
||
const renderOptions = { | ||
bottomBar: 10, | ||
persistentOutput: true, | ||
timer: PRESET_TIMER, | ||
} satisfies ListrJob['options'] | ||
const injectOptions = (job: ListrJob): ListrJob => ({ ...job, options: renderOptions }) | ||
|
||
const tasks = new Listr( | ||
[ | ||
injectOptions({ | ||
title: 'Inject CRON_KEY into vercel.json', | ||
task: (_, task) => { | ||
if (getEnv('VERCEL_ENV') !== 'production') { | ||
return task.skip(`${task.title} (Not production deployment)`) | ||
} | ||
const regex = /\{\{KEY\}\}/ | ||
const vercelConfigFile = path.resolve(__dirname, '../vercel.json') | ||
const vercelConfig = fs.readFileSync(vercelConfigFile, 'utf8') | ||
fs.writeFileSync(vercelConfigFile, vercelConfig.replace(regex, getEnv('CRON_KEY'))) | ||
}, | ||
}), | ||
], | ||
{ | ||
rendererOptions: { | ||
formatOutput: 'wrap', | ||
timer: PRESET_TIMER, | ||
suffixSkips: true, | ||
collapseSubtasks: false, | ||
}, | ||
fallbackRendererOptions: { | ||
timer: PRESET_TIMER, | ||
}, | ||
exitOnError: false, | ||
forceColor: true, | ||
} | ||
) | ||
|
||
tasks.run() | ||
|
||
export type ListrJob = ListrTaskObj<unknown, ListrDefaultRenderer> |
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
Oops, something went wrong.