-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[sync] feat(onboarding): redesign recommendation step as a sequential card deck (T6882) #3620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| /* eslint-disable @typescript-eslint/naming-convention */ | ||
| import fs from 'fs'; | ||
| import path from 'path'; | ||
| import type { DynamicModule } from '@nestjs/common'; | ||
| import { Logger, Module } from '@nestjs/common'; | ||
|
|
@@ -13,6 +14,7 @@ import { loggerConfig } from './logger.config'; | |
| import { mailConfig } from './mail.config'; | ||
| import { oauthConfig } from './oauth.config'; | ||
| import { riskControlConfig } from './risk-control.config'; | ||
| import { enforceSecretsPolicy } from './secrets/secrets-policy'; | ||
| import { storageConfig } from './storage'; | ||
| import { thresholdConfig } from './threshold.config'; | ||
| import { trashConfig } from './trash.config'; | ||
|
|
@@ -32,24 +34,42 @@ const configurations = [ | |
| riskControlConfig, | ||
| ]; | ||
|
|
||
| // The env files live in the nextjs-app package. NEXTJS_DIR is relative to the | ||
| // backend package dir, but the process may be started from the repo root (make, | ||
| // IDE run configs) β probe the known anchors instead of trusting cwd, since a | ||
| // silently unresolved path means the secrets policy would warn and fall back | ||
| // to the legacy source-code defaults instead of using your .env values. | ||
| const resolveEnvFileDir = (): string => { | ||
| const nextJsDir = nextJsConfig().dir; | ||
| const candidates = [ | ||
| path.join(process.cwd(), nextJsDir), | ||
| path.join(process.cwd(), 'community/apps/nextjs-app'), | ||
|
Comment on lines
+45
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the backend is started from the repository root with Useful? React with πΒ / π. |
||
| ]; | ||
| return candidates.find((dir) => fs.existsSync(dir)) ?? candidates[0]; | ||
| }; | ||
|
|
||
| @Module({}) | ||
| export class ConfigModule { | ||
| static register(): DynamicModule { | ||
| return BaseConfigModule.forRoot({ | ||
| const envDir = resolveEnvFileDir(); | ||
| const dynamicModule = BaseConfigModule.forRoot({ | ||
| isGlobal: true, | ||
| cache: true, | ||
| expandVariables: true, | ||
| load: configurations, | ||
| envFilePath: ['.env.development.local', '.env.development', '.env'].map((str) => { | ||
| const nextJsDir = nextJsConfig().dir; | ||
| const envDir = nextJsDir ? path.join(process.cwd(), nextJsDir, str) : str; | ||
| const envFile = path.join(envDir, str); | ||
|
|
||
| Logger.attachBuffer(); | ||
| Logger.log(`[Env File Path]: ${envDir}`); | ||
| Logger.log(`[Env File Path]: ${envFile}`); | ||
| Logger.detachBuffer(); | ||
| return envDir; | ||
| return envFile; | ||
| }), | ||
| validationSchema: envValidationSchema, | ||
| }); | ||
| // forRoot has synchronously merged the env files into process.env; enforce | ||
| // the secrets policy now, before any config factory resolves a secret. | ||
| enforceSecretsPolicy(); | ||
| return dynamicModule; | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once this consumer starts moving deleted and archived record snapshots into
record-removal/v1/{tableId}/..., permanent table and base deletion still cleans only the record-history cold prefix:TableOpenApiV2Service.cleanupRecordHistoryAfterPermanentDeleteand the V1cleanupColdHistoryPrefixesnever call the removal store's availabledeleteTablePrefix. Every permanently deleted table can therefore leave all of its cold trash/archive objects and stats in private storage indefinitely, retaining customer snapshots and accumulating unbounded storage cost; wire removal-prefix cleanup into the same post-commit purge paths.Useful? React with πΒ / π.