@mercuryo-ai/magicpay-home 0.1.3 → 0.1.4
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/config.d.ts +35 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +166 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -23,7 +23,42 @@ export interface MagicPaySharedConfig {
|
|
|
23
23
|
checkForCliUpdates?: boolean;
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
+
export type MagicPayConfigDoctorConfigState = 'missing' | 'invalid_json' | 'ok';
|
|
27
|
+
export interface MagicPayConfigDoctorIssue {
|
|
28
|
+
code: 'config_missing' | 'config_invalid_json' | 'gateway_config_missing' | 'gateway_api_key_missing' | 'gateway_api_url_missing' | 'gateway_api_url_invalid' | 'gateway_api_url_unexpected';
|
|
29
|
+
message: string;
|
|
30
|
+
fixCommand?: string;
|
|
31
|
+
suggestedApiUrl?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface MagicPayConfigDoctorGatewayState {
|
|
34
|
+
apiKeyConfigured: boolean;
|
|
35
|
+
apiUrl?: string;
|
|
36
|
+
}
|
|
37
|
+
export type MagicPayConfigDoctorSuccess = {
|
|
38
|
+
success: true;
|
|
39
|
+
healthy: true;
|
|
40
|
+
message: 'MagicPay config is healthy.';
|
|
41
|
+
configPath: string;
|
|
42
|
+
configState: 'ok';
|
|
43
|
+
gateway: MagicPayConfigDoctorGatewayState & {
|
|
44
|
+
apiKeyConfigured: true;
|
|
45
|
+
apiUrl: string;
|
|
46
|
+
};
|
|
47
|
+
issues: [];
|
|
48
|
+
};
|
|
49
|
+
export type MagicPayConfigDoctorFailure = {
|
|
50
|
+
success: false;
|
|
51
|
+
healthy: false;
|
|
52
|
+
error: 'config_doctor_failed';
|
|
53
|
+
message: 'MagicPay config check failed.';
|
|
54
|
+
configPath: string;
|
|
55
|
+
configState: MagicPayConfigDoctorConfigState;
|
|
56
|
+
gateway: MagicPayConfigDoctorGatewayState;
|
|
57
|
+
issues: MagicPayConfigDoctorIssue[];
|
|
58
|
+
};
|
|
59
|
+
export type MagicPayConfigDoctorResult = MagicPayConfigDoctorSuccess | MagicPayConfigDoctorFailure;
|
|
26
60
|
export declare function normalizeMagicPayApiUrl(value: string): string;
|
|
61
|
+
export declare function doctorMagicPayConfig(commandName?: string): MagicPayConfigDoctorResult;
|
|
27
62
|
export declare function readMagicPayConfig(): MagicPaySharedConfig;
|
|
28
63
|
export declare function writeMagicPayConfig(config: MagicPaySharedConfig): void;
|
|
29
64
|
export declare function getMagicPayBrowserDefaults(): {
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,YAAY,CAAC;AAGpB,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,MAAM,CAAC;AAE3D,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,0BAA0B,GAAG,IAAI,CAAC;AAErF,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,OAAO,CAAC,EAAE;QACR,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,KAAK,CAAC,EAAE,2BAA2B,CAAC;QACpC,MAAM,CAAC,EAAE;YACP,IAAI,CAAC,EAAE,yBAAyB,CAAC;SAClC,CAAC;KACH,CAAC;IACF,OAAO,CAAC,EAAE;QACR,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC9B,CAAC;CACH;AAED,MAAM,MAAM,+BAA+B,GAAG,SAAS,GAAG,cAAc,GAAG,IAAI,CAAC;AAEhF,MAAM,WAAW,yBAAyB;IACxC,IAAI,EACA,gBAAgB,GAChB,qBAAqB,GACrB,wBAAwB,GACxB,yBAAyB,GACzB,yBAAyB,GACzB,yBAAyB,GACzB,4BAA4B,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,gCAAgC;IAC/C,gBAAgB,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,6BAA6B,CAAC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,IAAI,CAAC;IAClB,OAAO,EAAE,gCAAgC,GAAG;QAC1C,gBAAgB,EAAE,IAAI,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,MAAM,EAAE,EAAE,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,EAAE,KAAK,CAAC;IACf,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,sBAAsB,CAAC;IAC9B,OAAO,EAAE,+BAA+B,CAAC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,+BAA+B,CAAC;IAC7C,OAAO,EAAE,gCAAgC,CAAC;IAC1C,MAAM,EAAE,yBAAyB,EAAE,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAClC,2BAA2B,GAC3B,2BAA2B,CAAC;AAuDhC,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAe7D;AAwLD,wBAAgB,oBAAoB,CAAC,WAAW,SAAa,GAAG,0BAA0B,CAwGzF;AAED,wBAAgB,kBAAkB,IAAI,oBAAoB,CAEzD;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAEtE;AAED,wBAAgB,0BAA0B,IAAI;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,2BAA2B,CAAC;IACpC,UAAU,CAAC,EAAE,yBAAyB,CAAC;CACxC,CAUA;AAED,wBAAgB,iBAAiB,IAAI;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAMA;AAED,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,GAC3B,CAAC"}
|
package/dist/config.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
1
2
|
import { getMagicPayConfigPath, getMagicPayHomeDir, getMagicPayProfilesDir, getMagicPayUpdateStatePath, } from './paths.js';
|
|
2
3
|
import { atomicWriteJson, readJsonFile } from './fs.js';
|
|
3
4
|
const MAGICPAY_API_BASE_PATH = '/functions/v1/api';
|
|
@@ -97,10 +98,7 @@ function normalizeConfig(raw) {
|
|
|
97
98
|
? Reflect.get(raw, 'updates')
|
|
98
99
|
: undefined;
|
|
99
100
|
const gatewayApiKey = trimOptionalString(gatewaySource?.apiKey) ?? trimOptionalString(legacySource?.apiKey);
|
|
100
|
-
const
|
|
101
|
-
const gatewayApiUrl = gatewayApiUrlRaw
|
|
102
|
-
? normalizeMagicPayApiUrl(gatewayApiUrlRaw)
|
|
103
|
-
: undefined;
|
|
101
|
+
const gatewayApiUrl = trimOptionalString(gatewaySource?.apiUrl) ?? trimOptionalString(legacySource?.apiUrl);
|
|
104
102
|
const browserDefaultProfile = trimOptionalString(browserSource?.defaultProfile);
|
|
105
103
|
const browserHeadless = typeof browserSource?.headless === 'boolean' ? browserSource.headless : undefined;
|
|
106
104
|
const browserProxy = normalizeProxySetting(browserSource?.proxy);
|
|
@@ -141,6 +139,170 @@ function normalizeConfig(raw) {
|
|
|
141
139
|
: {}),
|
|
142
140
|
};
|
|
143
141
|
}
|
|
142
|
+
function appendDoctorIssue(issues, issue) {
|
|
143
|
+
if (issue) {
|
|
144
|
+
issues.push(issue);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function buildDoctorFixCommand(commandName, apiUrl) {
|
|
148
|
+
return apiUrl
|
|
149
|
+
? `${commandName} init <apiKey> --api-url ${JSON.stringify(apiUrl)}`
|
|
150
|
+
: `${commandName} init <apiKey> --api-url <url>`;
|
|
151
|
+
}
|
|
152
|
+
function buildApiUrlDoctorIssue(apiUrl, commandName) {
|
|
153
|
+
const trimmed = apiUrl.trim();
|
|
154
|
+
if (trimmed.length === 0) {
|
|
155
|
+
return {
|
|
156
|
+
code: 'gateway_api_url_missing',
|
|
157
|
+
message: 'Gateway apiUrl is empty.',
|
|
158
|
+
fixCommand: buildDoctorFixCommand(commandName),
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
let url;
|
|
162
|
+
try {
|
|
163
|
+
url = new URL(trimmed);
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
return {
|
|
167
|
+
code: 'gateway_api_url_invalid',
|
|
168
|
+
message: 'Gateway apiUrl is not a valid absolute URL.',
|
|
169
|
+
fixCommand: buildDoctorFixCommand(commandName),
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
if (url.protocol !== 'https:' && url.protocol !== 'http:') {
|
|
173
|
+
return {
|
|
174
|
+
code: 'gateway_api_url_invalid',
|
|
175
|
+
message: 'Gateway apiUrl must use http or https.',
|
|
176
|
+
fixCommand: buildDoctorFixCommand(commandName),
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
const normalizedApiUrl = normalizeMagicPayApiUrl(trimmed);
|
|
180
|
+
if (trimmed === normalizedApiUrl) {
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
183
|
+
const normalizedPath = url.pathname.replace(/\/+$/, '') || '/';
|
|
184
|
+
let message = 'Gateway apiUrl must point to the MagicPay API base URL.';
|
|
185
|
+
if (normalizedPath === '/') {
|
|
186
|
+
message =
|
|
187
|
+
'Gateway apiUrl points to the bare host. It must point to the MagicPay API base URL.';
|
|
188
|
+
}
|
|
189
|
+
else if (normalizedPath === '/functions/v1') {
|
|
190
|
+
message = 'Gateway apiUrl is missing the `/api` suffix.';
|
|
191
|
+
}
|
|
192
|
+
else if (normalizedPath.startsWith(`${MAGICPAY_API_BASE_PATH}/`)) {
|
|
193
|
+
message =
|
|
194
|
+
'Gateway apiUrl points to a leaf endpoint. It must point to the MagicPay API base URL.';
|
|
195
|
+
}
|
|
196
|
+
else if (url.search || url.hash) {
|
|
197
|
+
message =
|
|
198
|
+
'Gateway apiUrl must not include query or hash components. It must point to the MagicPay API base URL.';
|
|
199
|
+
}
|
|
200
|
+
return {
|
|
201
|
+
code: 'gateway_api_url_unexpected',
|
|
202
|
+
message,
|
|
203
|
+
suggestedApiUrl: normalizedApiUrl,
|
|
204
|
+
fixCommand: buildDoctorFixCommand(commandName, normalizedApiUrl),
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
export function doctorMagicPayConfig(commandName = 'magicpay') {
|
|
208
|
+
const configPath = getMagicPayConfigPath();
|
|
209
|
+
const issues = [];
|
|
210
|
+
if (!existsSync(configPath)) {
|
|
211
|
+
appendDoctorIssue(issues, {
|
|
212
|
+
code: 'config_missing',
|
|
213
|
+
message: 'MagicPay config file does not exist.',
|
|
214
|
+
fixCommand: buildDoctorFixCommand(commandName),
|
|
215
|
+
});
|
|
216
|
+
return {
|
|
217
|
+
success: false,
|
|
218
|
+
healthy: false,
|
|
219
|
+
error: 'config_doctor_failed',
|
|
220
|
+
message: 'MagicPay config check failed.',
|
|
221
|
+
configPath,
|
|
222
|
+
configState: 'missing',
|
|
223
|
+
gateway: {
|
|
224
|
+
apiKeyConfigured: false,
|
|
225
|
+
},
|
|
226
|
+
issues,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
let rawConfig;
|
|
230
|
+
try {
|
|
231
|
+
rawConfig = JSON.parse(readFileSync(configPath, 'utf-8'));
|
|
232
|
+
}
|
|
233
|
+
catch {
|
|
234
|
+
appendDoctorIssue(issues, {
|
|
235
|
+
code: 'config_invalid_json',
|
|
236
|
+
message: 'MagicPay config file exists but does not contain valid JSON.',
|
|
237
|
+
fixCommand: buildDoctorFixCommand(commandName),
|
|
238
|
+
});
|
|
239
|
+
return {
|
|
240
|
+
success: false,
|
|
241
|
+
healthy: false,
|
|
242
|
+
error: 'config_doctor_failed',
|
|
243
|
+
message: 'MagicPay config check failed.',
|
|
244
|
+
configPath,
|
|
245
|
+
configState: 'invalid_json',
|
|
246
|
+
gateway: {
|
|
247
|
+
apiKeyConfigured: false,
|
|
248
|
+
},
|
|
249
|
+
issues,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
const config = normalizeConfig(rawConfig);
|
|
253
|
+
const gatewayState = {
|
|
254
|
+
apiKeyConfigured: Boolean(config.gateway?.apiKey),
|
|
255
|
+
...(config.gateway?.apiUrl ? { apiUrl: config.gateway.apiUrl } : {}),
|
|
256
|
+
};
|
|
257
|
+
if (!config.gateway) {
|
|
258
|
+
appendDoctorIssue(issues, {
|
|
259
|
+
code: 'gateway_config_missing',
|
|
260
|
+
message: 'MagicPay gateway config is missing.',
|
|
261
|
+
fixCommand: buildDoctorFixCommand(commandName),
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
if (!config.gateway?.apiKey) {
|
|
265
|
+
appendDoctorIssue(issues, {
|
|
266
|
+
code: 'gateway_api_key_missing',
|
|
267
|
+
message: 'Gateway apiKey is missing.',
|
|
268
|
+
fixCommand: buildDoctorFixCommand(commandName, config.gateway?.apiUrl),
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
if (!config.gateway?.apiUrl) {
|
|
272
|
+
appendDoctorIssue(issues, {
|
|
273
|
+
code: 'gateway_api_url_missing',
|
|
274
|
+
message: 'Gateway apiUrl is missing.',
|
|
275
|
+
fixCommand: buildDoctorFixCommand(commandName),
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
appendDoctorIssue(issues, buildApiUrlDoctorIssue(config.gateway.apiUrl, commandName));
|
|
280
|
+
}
|
|
281
|
+
if (issues.length > 0) {
|
|
282
|
+
return {
|
|
283
|
+
success: false,
|
|
284
|
+
healthy: false,
|
|
285
|
+
error: 'config_doctor_failed',
|
|
286
|
+
message: 'MagicPay config check failed.',
|
|
287
|
+
configPath,
|
|
288
|
+
configState: 'ok',
|
|
289
|
+
gateway: gatewayState,
|
|
290
|
+
issues,
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
return {
|
|
294
|
+
success: true,
|
|
295
|
+
healthy: true,
|
|
296
|
+
message: 'MagicPay config is healthy.',
|
|
297
|
+
configPath,
|
|
298
|
+
configState: 'ok',
|
|
299
|
+
gateway: {
|
|
300
|
+
apiKeyConfigured: true,
|
|
301
|
+
apiUrl: config.gateway.apiUrl,
|
|
302
|
+
},
|
|
303
|
+
issues: [],
|
|
304
|
+
};
|
|
305
|
+
}
|
|
144
306
|
export function readMagicPayConfig() {
|
|
145
307
|
return normalizeConfig(readJsonFile(getMagicPayConfigPath()));
|
|
146
308
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type MagicPayBrowserProxyConfig, type MagicPayBrowserProxySetting, type MagicPayBrowserWindowMode, type MagicPaySharedConfig, getMagicPayBrowserDefaults, getMagicPayConfigPath, getMagicPayHomeDir, getMagicPayProfilesDir, getMagicPayUpdateStatePath, loadGatewayConfig, normalizeMagicPayApiUrl, readMagicPayConfig, writeMagicPayConfig, } from './config.js';
|
|
1
|
+
export { type MagicPayBrowserProxyConfig, type MagicPayBrowserProxySetting, type MagicPayBrowserWindowMode, type MagicPayConfigDoctorConfigState, type MagicPayConfigDoctorFailure, type MagicPayConfigDoctorGatewayState, type MagicPayConfigDoctorIssue, type MagicPayConfigDoctorResult, type MagicPayConfigDoctorSuccess, type MagicPaySharedConfig, doctorMagicPayConfig, getMagicPayBrowserDefaults, getMagicPayConfigPath, getMagicPayHomeDir, getMagicPayProfilesDir, getMagicPayUpdateStatePath, loadGatewayConfig, normalizeMagicPayApiUrl, readMagicPayConfig, writeMagicPayConfig, } from './config.js';
|
|
2
2
|
export { deleteFileIfExists, ensureMagicPayHomeDir, ensureParentDir, atomicWriteJson, atomicWriteText, readJsonFile, } from './fs.js';
|
|
3
3
|
export { MAGICPAY_BROWSER_SESSION_FILENAME, MAGICPAY_CONFIG_FILENAME, MAGICPAY_HOME_DIRNAME, MAGICPAY_MOCK_SECRET_REQUESTS_FILENAME, MAGICPAY_MOCK_STORED_SECRETS_FILENAME, MAGICPAY_PROFILES_DIRNAME, MAGICPAY_RUNS_DIRNAME, MAGICPAY_UPDATE_STATE_FILENAME, MAGICPAY_WORKFLOW_STATE_FILENAME, getMagicPayBrowserSessionPath, getMagicPayMockSecretRequestsPath, getMagicPayMockStoredSecretsPath, getMagicPayRunsDir, getMagicPayWorkflowStatePath, } from './paths.js';
|
|
4
4
|
export { type CachedTransientSecretEntry, type MagicPaySession, type MagicPayWorkflowContext, buildWorkflowContextForPersistence, cacheTransientSecret, canHydrateWorkflowContext, cleanupTransientSecretCache, clearWorkflowState, deleteCachedTransientSecret, deleteMagicPayBrowserSession, deleteWorkflowContext, getCachedTransientSecret, loadMagicPayBrowserSession, loadMagicPaySession, loadWorkflowContext, saveMagicPayBrowserSession, saveMagicPaySession, saveWorkflowContext, } from './workflow-state.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,eAAe,EACf,YAAY,GACb,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,iCAAiC,EACjC,wBAAwB,EACxB,qBAAqB,EACrB,sCAAsC,EACtC,qCAAqC,EACrC,yBAAyB,EACzB,qBAAqB,EACrB,8BAA8B,EAC9B,gCAAgC,EAChC,6BAA6B,EAC7B,iCAAiC,EACjC,gCAAgC,EAChC,kBAAkB,EAClB,4BAA4B,GAC7B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,kCAAkC,EAClC,oBAAoB,EACpB,yBAAyB,EACzB,2BAA2B,EAC3B,kBAAkB,EAClB,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,EACrB,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,EACrC,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,eAAe,EACf,YAAY,GACb,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,iCAAiC,EACjC,wBAAwB,EACxB,qBAAqB,EACrB,sCAAsC,EACtC,qCAAqC,EACrC,yBAAyB,EACzB,qBAAqB,EACrB,8BAA8B,EAC9B,gCAAgC,EAChC,6BAA6B,EAC7B,iCAAiC,EACjC,gCAAgC,EAChC,kBAAkB,EAClB,4BAA4B,GAC7B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,kCAAkC,EAClC,oBAAoB,EACpB,yBAAyB,EACzB,2BAA2B,EAC3B,kBAAkB,EAClB,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,EACrB,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { getMagicPayBrowserDefaults, getMagicPayConfigPath, getMagicPayHomeDir, getMagicPayProfilesDir, getMagicPayUpdateStatePath, loadGatewayConfig, normalizeMagicPayApiUrl, readMagicPayConfig, writeMagicPayConfig, } from './config.js';
|
|
1
|
+
export { doctorMagicPayConfig, getMagicPayBrowserDefaults, getMagicPayConfigPath, getMagicPayHomeDir, getMagicPayProfilesDir, getMagicPayUpdateStatePath, loadGatewayConfig, normalizeMagicPayApiUrl, readMagicPayConfig, writeMagicPayConfig, } from './config.js';
|
|
2
2
|
export { deleteFileIfExists, ensureMagicPayHomeDir, ensureParentDir, atomicWriteJson, atomicWriteText, readJsonFile, } from './fs.js';
|
|
3
3
|
export { MAGICPAY_BROWSER_SESSION_FILENAME, MAGICPAY_CONFIG_FILENAME, MAGICPAY_HOME_DIRNAME, MAGICPAY_MOCK_SECRET_REQUESTS_FILENAME, MAGICPAY_MOCK_STORED_SECRETS_FILENAME, MAGICPAY_PROFILES_DIRNAME, MAGICPAY_RUNS_DIRNAME, MAGICPAY_UPDATE_STATE_FILENAME, MAGICPAY_WORKFLOW_STATE_FILENAME, getMagicPayBrowserSessionPath, getMagicPayMockSecretRequestsPath, getMagicPayMockStoredSecretsPath, getMagicPayRunsDir, getMagicPayWorkflowStatePath, } from './paths.js';
|
|
4
4
|
export { buildWorkflowContextForPersistence, cacheTransientSecret, canHydrateWorkflowContext, cleanupTransientSecretCache, clearWorkflowState, deleteCachedTransientSecret, deleteMagicPayBrowserSession, deleteWorkflowContext, getCachedTransientSecret, loadMagicPayBrowserSession, loadMagicPaySession, loadWorkflowContext, saveMagicPayBrowserSession, saveMagicPaySession, saveWorkflowContext, } from './workflow-state.js';
|