testchimp-runner-core 0.0.34 → 0.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/execution-service.d.ts +1 -4
- package/dist/execution-service.d.ts.map +1 -1
- package/dist/execution-service.js +155 -468
- package/dist/execution-service.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/orchestrator/decision-parser.d.ts +18 -0
- package/dist/orchestrator/decision-parser.d.ts.map +1 -0
- package/dist/orchestrator/decision-parser.js +127 -0
- package/dist/orchestrator/decision-parser.js.map +1 -0
- package/dist/orchestrator/index.d.ts +4 -2
- package/dist/orchestrator/index.d.ts.map +1 -1
- package/dist/orchestrator/index.js +14 -2
- package/dist/orchestrator/index.js.map +1 -1
- package/dist/orchestrator/orchestrator-agent.d.ts +17 -14
- package/dist/orchestrator/orchestrator-agent.d.ts.map +1 -1
- package/dist/orchestrator/orchestrator-agent.js +534 -204
- package/dist/orchestrator/orchestrator-agent.js.map +1 -1
- package/dist/orchestrator/orchestrator-prompts.d.ts +14 -2
- package/dist/orchestrator/orchestrator-prompts.d.ts.map +1 -1
- package/dist/orchestrator/orchestrator-prompts.js +529 -247
- package/dist/orchestrator/orchestrator-prompts.js.map +1 -1
- package/dist/orchestrator/page-som-handler.d.ts +106 -0
- package/dist/orchestrator/page-som-handler.d.ts.map +1 -0
- package/dist/orchestrator/page-som-handler.js +1353 -0
- package/dist/orchestrator/page-som-handler.js.map +1 -0
- package/dist/orchestrator/som-types.d.ts +149 -0
- package/dist/orchestrator/som-types.d.ts.map +1 -0
- package/dist/orchestrator/som-types.js +87 -0
- package/dist/orchestrator/som-types.js.map +1 -0
- package/dist/orchestrator/tool-registry.d.ts +2 -0
- package/dist/orchestrator/tool-registry.d.ts.map +1 -1
- package/dist/orchestrator/tool-registry.js.map +1 -1
- package/dist/orchestrator/tools/index.d.ts +4 -1
- package/dist/orchestrator/tools/index.d.ts.map +1 -1
- package/dist/orchestrator/tools/index.js +7 -2
- package/dist/orchestrator/tools/index.js.map +1 -1
- package/dist/orchestrator/tools/refresh-som-markers.d.ts +12 -0
- package/dist/orchestrator/tools/refresh-som-markers.d.ts.map +1 -0
- package/dist/orchestrator/tools/refresh-som-markers.js +64 -0
- package/dist/orchestrator/tools/refresh-som-markers.js.map +1 -0
- package/dist/orchestrator/tools/view-previous-screenshot.d.ts +15 -0
- package/dist/orchestrator/tools/view-previous-screenshot.d.ts.map +1 -0
- package/dist/orchestrator/tools/view-previous-screenshot.js +92 -0
- package/dist/orchestrator/tools/view-previous-screenshot.js.map +1 -0
- package/dist/orchestrator/types.d.ts +23 -1
- package/dist/orchestrator/types.d.ts.map +1 -1
- package/dist/orchestrator/types.js +11 -1
- package/dist/orchestrator/types.js.map +1 -1
- package/dist/scenario-service.d.ts +5 -0
- package/dist/scenario-service.d.ts.map +1 -1
- package/dist/scenario-service.js +17 -0
- package/dist/scenario-service.js.map +1 -1
- package/dist/scenario-worker-class.d.ts +4 -0
- package/dist/scenario-worker-class.d.ts.map +1 -1
- package/dist/scenario-worker-class.js +18 -3
- package/dist/scenario-worker-class.js.map +1 -1
- package/dist/testing/agent-tester.d.ts +35 -0
- package/dist/testing/agent-tester.d.ts.map +1 -0
- package/dist/testing/agent-tester.js +84 -0
- package/dist/testing/agent-tester.js.map +1 -0
- package/dist/testing/ref-translator-tester.d.ts +44 -0
- package/dist/testing/ref-translator-tester.d.ts.map +1 -0
- package/dist/testing/ref-translator-tester.js +104 -0
- package/dist/testing/ref-translator-tester.js.map +1 -0
- package/dist/utils/hierarchical-selector.d.ts +47 -0
- package/dist/utils/hierarchical-selector.d.ts.map +1 -0
- package/dist/utils/hierarchical-selector.js +212 -0
- package/dist/utils/hierarchical-selector.js.map +1 -0
- package/dist/utils/page-info-retry.d.ts +14 -0
- package/dist/utils/page-info-retry.d.ts.map +1 -0
- package/dist/utils/page-info-retry.js +60 -0
- package/dist/utils/page-info-retry.js.map +1 -0
- package/dist/utils/page-info-utils.d.ts +1 -0
- package/dist/utils/page-info-utils.d.ts.map +1 -1
- package/dist/utils/page-info-utils.js +46 -18
- package/dist/utils/page-info-utils.js.map +1 -1
- package/dist/utils/ref-attacher.d.ts +21 -0
- package/dist/utils/ref-attacher.d.ts.map +1 -0
- package/dist/utils/ref-attacher.js +149 -0
- package/dist/utils/ref-attacher.js.map +1 -0
- package/dist/utils/ref-translator.d.ts +49 -0
- package/dist/utils/ref-translator.d.ts.map +1 -0
- package/dist/utils/ref-translator.js +276 -0
- package/dist/utils/ref-translator.js.map +1 -0
- package/package.json +6 -1
- package/RELEASE_0.0.26.md +0 -165
- package/RELEASE_0.0.27.md +0 -236
- package/RELEASE_0.0.28.md +0 -286
- package/plandocs/BEFORE_AFTER_VERIFICATION.md +0 -148
- package/plandocs/COORDINATE_MODE_DIAGNOSIS.md +0 -144
- package/plandocs/CREDIT_CALLBACK_ARCHITECTURE.md +0 -253
- package/plandocs/HUMAN_LIKE_IMPROVEMENTS.md +0 -642
- package/plandocs/IMPLEMENTATION_STATUS.md +0 -108
- package/plandocs/INTEGRATION_COMPLETE.md +0 -322
- package/plandocs/MULTI_AGENT_ARCHITECTURE_REVIEW.md +0 -844
- package/plandocs/ORCHESTRATOR_MVP_SUMMARY.md +0 -539
- package/plandocs/PHASE1_ABSTRACTION_COMPLETE.md +0 -241
- package/plandocs/PHASE1_FINAL_STATUS.md +0 -210
- package/plandocs/PHASE_1_COMPLETE.md +0 -165
- package/plandocs/PHASE_1_SUMMARY.md +0 -184
- package/plandocs/PLANNING_SESSION_SUMMARY.md +0 -372
- package/plandocs/PROMPT_OPTIMIZATION_ANALYSIS.md +0 -120
- package/plandocs/PROMPT_SANITY_CHECK.md +0 -120
- package/plandocs/SCRIPT_CLEANUP_FEATURE.md +0 -201
- package/plandocs/SCRIPT_GENERATION_ARCHITECTURE.md +0 -364
- package/plandocs/SELECTOR_IMPROVEMENTS.md +0 -139
- package/plandocs/SESSION_SUMMARY_v0.0.33.md +0 -151
- package/plandocs/TROUBLESHOOTING_SESSION.md +0 -72
- package/plandocs/VISION_DIAGNOSTICS_IMPROVEMENTS.md +0 -336
- package/plandocs/VISUAL_AGENT_EVOLUTION_PLAN.md +0 -396
- package/plandocs/WHATS_NEW_v0.0.33.md +0 -183
- package/src/auth-config.ts +0 -84
- package/src/credit-usage-service.ts +0 -188
- package/src/env-loader.ts +0 -103
- package/src/execution-service.ts +0 -1413
- package/src/file-handler.ts +0 -104
- package/src/index.ts +0 -422
- package/src/llm-facade.ts +0 -821
- package/src/llm-provider.ts +0 -53
- package/src/model-constants.ts +0 -35
- package/src/orchestrator/index.ts +0 -34
- package/src/orchestrator/orchestrator-agent.ts +0 -862
- package/src/orchestrator/orchestrator-agent.ts.backup +0 -1386
- package/src/orchestrator/orchestrator-prompts.ts +0 -474
- package/src/orchestrator/tool-registry.ts +0 -182
- package/src/orchestrator/tools/check-page-ready.ts +0 -75
- package/src/orchestrator/tools/extract-data.ts +0 -92
- package/src/orchestrator/tools/index.ts +0 -12
- package/src/orchestrator/tools/inspect-page.ts +0 -42
- package/src/orchestrator/tools/recall-history.ts +0 -72
- package/src/orchestrator/tools/take-screenshot.ts +0 -128
- package/src/orchestrator/tools/verify-action-result.ts +0 -159
- package/src/orchestrator/types.ts +0 -248
- package/src/playwright-mcp-service.ts +0 -224
- package/src/progress-reporter.ts +0 -144
- package/src/prompts.ts +0 -842
- package/src/providers/backend-proxy-llm-provider.ts +0 -91
- package/src/providers/local-llm-provider.ts +0 -38
- package/src/scenario-service.ts +0 -232
- package/src/scenario-worker-class.ts +0 -1089
- package/src/script-utils.ts +0 -203
- package/src/types.ts +0 -239
- package/src/utils/browser-utils.ts +0 -348
- package/src/utils/coordinate-converter.ts +0 -162
- package/src/utils/page-info-utils.ts +0 -250
- package/testchimp-runner-core-0.0.33.tgz +0 -0
- package/tsconfig.json +0 -19
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
import { AuthConfig, getAuthHeaders } from './auth-config';
|
|
3
|
-
import { loadEnvConfig } from './env-loader';
|
|
4
|
-
|
|
5
|
-
export enum CreditUsageReason {
|
|
6
|
-
UNKNOWN_CREDIT_USAGE_REASON = 0,
|
|
7
|
-
EXPLORER_STEP = 1,
|
|
8
|
-
TEST_REPAIR = 2,
|
|
9
|
-
SCRIPT_GENERATE = 3
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface InsertCreditUsageRequest {
|
|
13
|
-
credits?: number;
|
|
14
|
-
usage_reason?: CreditUsageReason;
|
|
15
|
-
job_id?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface InsertCreditUsageResponse {
|
|
19
|
-
// Empty response as per the protobuf definition
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Credit usage information for callback
|
|
24
|
-
*/
|
|
25
|
-
export interface CreditUsage {
|
|
26
|
-
credits: number;
|
|
27
|
-
usageReason: CreditUsageReason;
|
|
28
|
-
jobId?: string;
|
|
29
|
-
timestamp: number;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Callback for credit usage reporting
|
|
34
|
-
* Allows consumers to track credit usage in their own systems
|
|
35
|
-
*/
|
|
36
|
-
export type CreditUsageCallback = (usage: CreditUsage) => void | Promise<void>;
|
|
37
|
-
|
|
38
|
-
export class CreditUsageService {
|
|
39
|
-
private backendUrl: string;
|
|
40
|
-
private authConfig: AuthConfig | null;
|
|
41
|
-
private logger?: (message: string, level?: 'log' | 'error' | 'warn') => void;
|
|
42
|
-
private creditUsageCallback?: CreditUsageCallback;
|
|
43
|
-
|
|
44
|
-
constructor(authConfig?: AuthConfig, backendUrl?: string, creditUsageCallback?: CreditUsageCallback) {
|
|
45
|
-
// Use provided backend URL or fall back to environment configuration
|
|
46
|
-
if (backendUrl) {
|
|
47
|
-
this.backendUrl = backendUrl;
|
|
48
|
-
} else {
|
|
49
|
-
// Fall back to environment configuration for backward compatibility
|
|
50
|
-
const envConfig = loadEnvConfig();
|
|
51
|
-
this.backendUrl = envConfig.TESTCHIMP_BACKEND_URL;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
this.authConfig = authConfig || null;
|
|
55
|
-
this.creditUsageCallback = creditUsageCallback;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Set a logger callback for capturing execution logs
|
|
60
|
-
*/
|
|
61
|
-
setLogger(logger: (message: string, level?: 'log' | 'error' | 'warn') => void): void {
|
|
62
|
-
this.logger = logger;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Set credit usage callback
|
|
67
|
-
* Allows consumers to track credit usage in their own systems
|
|
68
|
-
*/
|
|
69
|
-
setCreditUsageCallback(callback: CreditUsageCallback): void {
|
|
70
|
-
this.creditUsageCallback = callback;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Log a message using the configured logger
|
|
75
|
-
*/
|
|
76
|
-
private log(message: string, level: 'log' | 'error' | 'warn' = 'log'): void {
|
|
77
|
-
if (this.logger) {
|
|
78
|
-
this.logger(message, level);
|
|
79
|
-
}
|
|
80
|
-
// No console fallback - logs are routed to consumer
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Update authentication configuration
|
|
85
|
-
*/
|
|
86
|
-
setAuthConfig(authConfig: AuthConfig): void {
|
|
87
|
-
this.authConfig = authConfig;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Get current authentication configuration
|
|
92
|
-
*/
|
|
93
|
-
getAuthConfig(): AuthConfig | null {
|
|
94
|
-
return this.authConfig;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Report credit usage via callback and/or backend
|
|
99
|
-
*
|
|
100
|
-
* Behavior:
|
|
101
|
-
* 1. If callback provided: Call callback (server-side uses this to update DB directly)
|
|
102
|
-
* 2. If NO callback but auth configured: Make axios call to backend (client-side: vs-ext, github action)
|
|
103
|
-
* 3. Server-side: Provides callback, no axios calls made
|
|
104
|
-
* 4. Client-side: No callback, uses auth for axios calls to backend
|
|
105
|
-
*/
|
|
106
|
-
async reportCreditUsage(
|
|
107
|
-
credits: number = 1,
|
|
108
|
-
usageReason: CreditUsageReason,
|
|
109
|
-
jobId?: string
|
|
110
|
-
): Promise<InsertCreditUsageResponse> {
|
|
111
|
-
const creditUsage: CreditUsage = {
|
|
112
|
-
credits,
|
|
113
|
-
usageReason,
|
|
114
|
-
jobId,
|
|
115
|
-
timestamp: Date.now()
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
// 1. If callback provided: Use callback (server-side path)
|
|
119
|
-
if (this.creditUsageCallback) {
|
|
120
|
-
try {
|
|
121
|
-
await this.creditUsageCallback(creditUsage);
|
|
122
|
-
this.log(`Credit usage reported via callback: ${credits} credits for ${CreditUsageReason[usageReason]}`);
|
|
123
|
-
return {}; // Callback succeeded, no need for backend call
|
|
124
|
-
} catch (error: any) {
|
|
125
|
-
this.log(`Credit usage callback failed: ${error.message}`, 'error');
|
|
126
|
-
throw error; // Callback failure is critical for server-side
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// 2. No callback: Make axios call if auth configured (client-side path: vs-ext, github action)
|
|
131
|
-
if (this.authConfig) {
|
|
132
|
-
try {
|
|
133
|
-
const authHeaders = getAuthHeaders(this.authConfig);
|
|
134
|
-
const url = `${this.backendUrl}/localagent/insert_credit_usage`;
|
|
135
|
-
|
|
136
|
-
const request: InsertCreditUsageRequest = {
|
|
137
|
-
credits,
|
|
138
|
-
usage_reason: usageReason,
|
|
139
|
-
job_id: jobId
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
const response = await axios.post(url, request, {
|
|
143
|
-
headers: {
|
|
144
|
-
...authHeaders,
|
|
145
|
-
'Content-Type': 'application/json'
|
|
146
|
-
},
|
|
147
|
-
timeout: 10000 // 10 second timeout for credit usage calls
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
this.log(`Credit usage reported to backend: ${credits} credits for ${CreditUsageReason[usageReason]}`);
|
|
151
|
-
return response.data;
|
|
152
|
-
} catch (error: any) {
|
|
153
|
-
this.log(`Credit usage backend report failed: ${error.message}`, 'error');
|
|
154
|
-
throw error; // Backend failure is critical for client-side
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
// 3. No callback and no auth - no credit tracking (development mode)
|
|
159
|
-
this.log(`Credit usage not tracked (no callback or auth configured): ${credits} credits for ${CreditUsageReason[usageReason]}`, 'warn');
|
|
160
|
-
return {};
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Report script generation credit usage
|
|
165
|
-
*/
|
|
166
|
-
async reportScriptGenerationCredit(jobId?: string): Promise<void> {
|
|
167
|
-
try {
|
|
168
|
-
await this.reportCreditUsage(1, CreditUsageReason.SCRIPT_GENERATE, jobId);
|
|
169
|
-
this.log(`Credit usage reported for script generation${jobId ? ` (job: ${jobId})` : ''}`);
|
|
170
|
-
} catch (error) {
|
|
171
|
-
this.log(`Failed to report script generation credit usage: ${error}`, 'error');
|
|
172
|
-
// Don't throw - credit reporting should not break the main flow
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Report AI repair credit usage
|
|
178
|
-
*/
|
|
179
|
-
async reportAIRepairCredit(jobId?: string): Promise<void> {
|
|
180
|
-
try {
|
|
181
|
-
await this.reportCreditUsage(1, CreditUsageReason.TEST_REPAIR, jobId);
|
|
182
|
-
this.log(`Credit usage reported for AI repair${jobId ? ` (job: ${jobId})` : ''}`);
|
|
183
|
-
} catch (error) {
|
|
184
|
-
this.log(`Failed to report AI repair credit usage: ${error}`, 'error');
|
|
185
|
-
// Don't throw - credit reporting should not break the main flow
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
package/src/env-loader.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Environment Configuration Loader
|
|
3
|
-
*
|
|
4
|
-
* This module loads environment configuration from packaged env files
|
|
5
|
-
* instead of relying on process.env which may not be available in VS Code extensions
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
interface EnvConfig {
|
|
9
|
-
TESTCHIMP_BACKEND_URL: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
let cachedConfig: EnvConfig | null = null;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Load environment configuration from the packaged env file
|
|
16
|
-
* Falls back to process.env if env file is not available
|
|
17
|
-
*/
|
|
18
|
-
export function loadEnvConfig(): EnvConfig {
|
|
19
|
-
if (cachedConfig) {
|
|
20
|
-
return cachedConfig;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
try {
|
|
24
|
-
// Try multiple possible paths for the env file
|
|
25
|
-
const possiblePaths = [
|
|
26
|
-
require('path').join(String(__dirname), 'env'),
|
|
27
|
-
require('path').join(String(__dirname), './env'),
|
|
28
|
-
require('path').join(String(__dirname), '../env'),
|
|
29
|
-
require('path').join(String(__dirname), '../../runner-core/env'),
|
|
30
|
-
require('path').join(String(__dirname), '../../runner-core/dist/env'),
|
|
31
|
-
require('path').join(String(process.cwd()), 'env'),
|
|
32
|
-
require('path').join(String(process.cwd()), 'runner-core/env'),
|
|
33
|
-
require('path').join(String(process.cwd()), 'runner-core/dist/env'),
|
|
34
|
-
require('path').join(String(process.cwd()), 'local/runner-core/env'),
|
|
35
|
-
require('path').join(String(process.cwd()), 'local/runner-core/dist/env')
|
|
36
|
-
];
|
|
37
|
-
|
|
38
|
-
let envContent = '';
|
|
39
|
-
let envPath = '';
|
|
40
|
-
|
|
41
|
-
for (const path of possiblePaths) {
|
|
42
|
-
try {
|
|
43
|
-
envContent = require('fs').readFileSync(path, 'utf8');
|
|
44
|
-
envPath = path;
|
|
45
|
-
break;
|
|
46
|
-
} catch (error) {
|
|
47
|
-
// Silently continue to next path
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (!envContent) {
|
|
52
|
-
throw new Error('Could not find env file in any of the expected locations');
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const config: Partial<EnvConfig> = {};
|
|
56
|
-
|
|
57
|
-
envContent.split('\n').forEach((line: string) => {
|
|
58
|
-
const trimmedLine = line.trim();
|
|
59
|
-
if (trimmedLine && !trimmedLine.startsWith('#')) {
|
|
60
|
-
const [key, value] = trimmedLine.split('=');
|
|
61
|
-
if (key && value) {
|
|
62
|
-
const trimmedKey = key.trim() as keyof EnvConfig;
|
|
63
|
-
config[trimmedKey] = value.trim();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// Ensure required properties are present
|
|
69
|
-
const finalConfig: EnvConfig = {
|
|
70
|
-
TESTCHIMP_BACKEND_URL: config.TESTCHIMP_BACKEND_URL || 'https://featureservice.testchimp.io'
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
cachedConfig = finalConfig;
|
|
74
|
-
return finalConfig;
|
|
75
|
-
} catch (error) {
|
|
76
|
-
// Fallback to process.env
|
|
77
|
-
let backendUrl = process.env.TESTCHIMP_BACKEND_URL;
|
|
78
|
-
|
|
79
|
-
// If no explicit backend URL, determine from TESTCHIMP_ENV
|
|
80
|
-
if (!backendUrl) {
|
|
81
|
-
const testchimpEnv = process.env.TESTCHIMP_ENV;
|
|
82
|
-
if (testchimpEnv === 'staging') {
|
|
83
|
-
backendUrl = 'https://featureservice-staging.testchimp.io';
|
|
84
|
-
} else {
|
|
85
|
-
backendUrl = 'https://featureservice.testchimp.io';
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const config: EnvConfig = {
|
|
90
|
-
TESTCHIMP_BACKEND_URL: backendUrl
|
|
91
|
-
};
|
|
92
|
-
cachedConfig = config;
|
|
93
|
-
return config;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Get a specific environment variable
|
|
99
|
-
*/
|
|
100
|
-
export function getEnvVar(key: keyof EnvConfig): string | undefined {
|
|
101
|
-
const config = loadEnvConfig();
|
|
102
|
-
return config[key];
|
|
103
|
-
}
|