🔧 Pass local auth settings to the production web build and ignore AGENTS.md
Running the local console with WF_WEB_SERVE_MODE=production starts Next.js with NODE_ENV=production, which previously disabled development sign-in even when WF_DEPLOYMENT_MODE=development was explicitly set. Keep the deployment-mode gate explicit, forward the console's auth and API variables from scripts/dev.mjs, narrow the Temporal worker grace-time literal for TypeScript, and ignore local AGENTS.md instructions.
This commit is contained in:
parent
c75f429716
commit
22e7eb4ad7
1
.gitignore
vendored
1
.gitignore
vendored
@ -23,6 +23,7 @@ next-env.d.ts
|
||||
infra/compose.local.yaml
|
||||
.agents/
|
||||
.agent-teams/
|
||||
AGENTS.md
|
||||
|
||||
# Local-only runtime state (cluster kubeconfig, operator notes)
|
||||
local-data/
|
||||
|
||||
@ -41,7 +41,7 @@ type Discovery = {
|
||||
};
|
||||
/** Development conveniences need the explicit development deployment mode; anything else fails closed. */
|
||||
export function isDevelopment() {
|
||||
return process.env.WF_DEPLOYMENT_MODE === 'development' && process.env.NODE_ENV !== 'production';
|
||||
return process.env.WF_DEPLOYMENT_MODE === 'development';
|
||||
}
|
||||
export function isDevelopmentAuth() {
|
||||
return !localAccessEnabled() && isDevelopment() && Boolean(process.env.WF_DEV_AUTH_TOKEN);
|
||||
|
||||
@ -83,7 +83,17 @@ await startServices(
|
||||
String(web.port),
|
||||
],
|
||||
env: environment(
|
||||
[/^WF_LOCAL_ACCESS$/, /^WF_LOCAL_ACCESS_FILE$/, /^WF_LOCAL_ALLOWED_ORIGINS$/, /^WF_LOCAL_API_TOKEN$/],
|
||||
[
|
||||
/^WF_LOCAL_ACCESS/,
|
||||
/^WF_LOCAL_ACCESS_FILE$/,
|
||||
/^WF_LOCAL_ALLOWED_ORIGINS$/,
|
||||
/^WF_LOCAL_API_TOKEN$/,
|
||||
/^WF_DEV_AUTH_TOKEN$/,
|
||||
/^WF_API_URL$/,
|
||||
/^WF_PUBLIC_URL$/,
|
||||
/^WF_SESSION_SECRET$/,
|
||||
/^OIDC_/,
|
||||
],
|
||||
{ NODE_ENV: productionWeb ? 'production' : 'development' },
|
||||
),
|
||||
url: `http://${web.probe}:${web.port}${process.env.WF_LOCAL_ACCESS === 'true' ? '/login' : '/api/session'}`,
|
||||
|
||||
@ -35,7 +35,7 @@ describe.skipIf(!enabled)('Temporal durable runWorkflow recovery (fixture activi
|
||||
recordWaiting: (i: RunInput & { reason: string }) => Promise<{ status: 'waiting' }>;
|
||||
},
|
||||
) {
|
||||
const options = { connection: native, namespace, shutdownGraceTime: '1 second', maxCachedWorkflows: 0 };
|
||||
const options = { connection: native, namespace, shutdownGraceTime: '1 second' as const, maxCachedWorkflows: 0 };
|
||||
const workers = await Promise.all([
|
||||
Worker.create({
|
||||
...options,
|
||||
@ -272,7 +272,7 @@ describe.skipIf(!enabled)('Temporal durable runWorkflow recovery (fixture activi
|
||||
connection: native,
|
||||
namespace,
|
||||
taskQueue: `wishforge-executor-${next.tenantId}-${next.runId}-${next.generation}`,
|
||||
shutdownGraceTime: '1 second',
|
||||
shutdownGraceTime: '1 second' as const,
|
||||
activities: {
|
||||
executeRun: async () => {
|
||||
newExecutions++;
|
||||
@ -302,7 +302,7 @@ describe.skipIf(!enabled)('Temporal durable runWorkflow recovery (fixture activi
|
||||
namespace,
|
||||
taskQueue: 'wishforge-runs',
|
||||
workflowBundle: bundle,
|
||||
shutdownGraceTime: '1 second',
|
||||
shutdownGraceTime: '1 second' as const,
|
||||
activities: {
|
||||
inspectRunState: async () => ({ status: 'running' }),
|
||||
recordWaiting: async (i: RunInput & { reason: string }) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user