-
-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add back files that are needed
- Loading branch information
1 parent
7103e7e
commit 6490c22
Showing
3 changed files
with
61 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as path from 'path' | ||
|
||
export const FUNCTIONS_DIR = path.resolve(__dirname, '../') | ||
|
||
// When passing to CLI only relative folder names used | ||
export const EMULATOR_SEED_FOLDER = 'data/seed' | ||
export const EMULATOR_IMPORT_FOLDER = 'data/emulated' | ||
export const EMULATOR_EXPORT_FOLDER = 'data/exported' | ||
|
||
// For custom scripts full paths user | ||
export const EMULATOR_SEED_PATH = path.resolve( | ||
FUNCTIONS_DIR, | ||
EMULATOR_SEED_FOLDER, | ||
) | ||
export const EMULATOR_IMPORT_PATH = path.resolve( | ||
FUNCTIONS_DIR, | ||
EMULATOR_IMPORT_FOLDER, | ||
) | ||
export const EMULATOR_EXPORT_PATH = path.resolve( | ||
FUNCTIONS_DIR, | ||
EMULATOR_EXPORT_FOLDER, | ||
) | ||
|
||
// For compiling src folder | ||
export const PLATFORM_ROOT_PATH = path.resolve(FUNCTIONS_DIR, '..') | ||
export const PLATFORM_LIB_PATH = path.resolve(PLATFORM_ROOT_PATH, 'lib') | ||
export const PLATFORM_TSCONFIG_TYPES_PATH = path.resolve( | ||
PLATFORM_ROOT_PATH, | ||
'tsconfig.src-types.json', | ||
) |
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,24 @@ | ||
import type { configVars } from '../../src/config/config' | ||
|
||
/** Variables populates in the same way firebase functions:config:set does for use in testing */ | ||
export const runtimeConfigTest: configVars = { | ||
analytics: { | ||
tracking_code: 'fake_tracking_code', | ||
view_id: 'fake_view_id', | ||
}, | ||
integrations: { | ||
discord_webhook: 'https://fake_discord_webhook.local', | ||
discord_alert_channel_webhook: | ||
'https://fake_discord_alert_channel_webhook.local', | ||
slack_webhook: 'https://fake_slack_webhook.local', | ||
patreon_client_id: 'fake_patreon_client_id', | ||
patreon_client_secret: 'fake_patreon_client_secret', | ||
}, | ||
service: null as any, | ||
deployment: { | ||
site_url: 'http://localhost:4000', | ||
}, | ||
prerender: { | ||
api_key: 'fake_prerender_key', | ||
}, | ||
} |
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,7 @@ | ||
import { writeFileSync } from 'fs' | ||
import { resolve } from 'path' | ||
import { FUNCTIONS_DIR } from '../paths' | ||
import { runtimeConfigTest } from './model' | ||
|
||
const runtimeConfigPath = resolve(FUNCTIONS_DIR, '.runtimeconfig.json') | ||
writeFileSync(runtimeConfigPath, JSON.stringify(runtimeConfigTest)) |