···11const DEFAULTS = {
22- appUrl: 'https://bsky.app',
33- publicApiUrl: 'https://public.api.bsky.app',
22+ appUrl: "https://bsky.app",
33+ publicApiUrl: "https://public.api.bsky.app",
44 publicCheckTimeoutMs: 180000,
55 stepTimeoutMs: 120000,
66- birthdate: '1990-01-01',
66+ birthdate: "1990-01-01",
77 headless: true,
88 strictErrors: false,
99 publicChecks: true,
1010};
11111212const requireString = (value, label) => {
1313- if (typeof value !== 'string' || value.trim() === '') {
1313+ if (typeof value !== "string" || value.trim() === "") {
1414 throw new Error(`${label} is required`);
1515 }
1616 return value;
···2020 if (value === undefined || value === null) {
2121 return undefined;
2222 }
2323- if (typeof value !== 'string') {
2424- throw new Error('optional string values must be strings when provided');
2323+ if (typeof value !== "string") {
2424+ throw new Error("optional string values must be strings when provided");
2525 }
2626 const trimmed = value.trim();
2727- return trimmed === '' ? undefined : trimmed;
2727+ return trimmed === "" ? undefined : trimmed;
2828};
29293030const optionalPostUrl = (value, label) => {
···5252 return [];
5353 }
5454 if (!Array.isArray(prefixes)) {
5555- throw new Error('cleanupPostPrefixes must be an array when provided');
5555+ throw new Error("cleanupPostPrefixes must be an array when provided");
5656 }
5757 return prefixes
5858 .map((value) => {
5959- if (typeof value !== 'string') {
6060- throw new Error('cleanup post prefixes must be strings');
5959+ if (typeof value !== "string") {
6060+ throw new Error("cleanup post prefixes must be strings");
6161 }
6262 return value.length ? value : undefined;
6363 })
···8787 ...rest
8888} = {}) => {
8989 const normalized = {
9090- handle: requireString(handle, 'account.handle'),
9191- password: requireString(password, 'account.password'),
9090+ handle: requireString(handle, "account.handle"),
9191+ password: requireString(password, "account.password"),
9292 birthdate: optionalString(birthdate) || DEFAULTS.birthdate,
9393 cleanupPostPrefixes: normalizeCleanupPrefixes(cleanupPostPrefixes),
9494 ...rest,
···142142 ...rest
143143} = {}) => {
144144 const normalized = {
145145- pdsUrl: requireString(pdsUrl, 'pdsUrl'),
146146- artifactsDir: requireString(artifactsDir, 'artifactsDir'),
145145+ pdsUrl: requireString(pdsUrl, "pdsUrl"),
146146+ artifactsDir: requireString(artifactsDir, "artifactsDir"),
147147 appUrl: optionalString(appUrl) || DEFAULTS.appUrl,
148148 publicApiUrl: optionalString(publicApiUrl) || DEFAULTS.publicApiUrl,
149149- publicCheckTimeoutMs: Number(publicCheckTimeoutMs || DEFAULTS.publicCheckTimeoutMs),
149149+ publicCheckTimeoutMs: Number(
150150+ publicCheckTimeoutMs || DEFAULTS.publicCheckTimeoutMs,
151151+ ),
150152 stepTimeoutMs: Number(stepTimeoutMs || DEFAULTS.stepTimeoutMs),
151151- headless: !!headless,
152152- strictErrors: !!strictErrors,
153153- publicChecks: !!publicChecks,
153153+ headless: Boolean(headless),
154154+ strictErrors: Boolean(strictErrors),
155155+ publicChecks: Boolean(publicChecks),
154156 ...rest,
155157 };
156158157157- normalized.pdsHost = optionalString(pdsHost) || derivePdsHost(normalized.pdsUrl);
159159+ normalized.pdsHost =
160160+ optionalString(pdsHost) || derivePdsHost(normalized.pdsUrl);
158161 if (!normalized.pdsHost) {
159159- throw new Error('pdsHost could not be derived from pdsUrl');
162162+ throw new Error("pdsHost could not be derived from pdsUrl");
160163 }
161164162165 const maybeTarget = optionalString(targetHandle);
···164167 normalized.targetHandle = maybeTarget;
165168 }
166169167167- const maybeRemoteReplyPostUrl = optionalPostUrl(remoteReplyPostUrl, 'remoteReplyPostUrl');
170170+ const maybeRemoteReplyPostUrl = optionalPostUrl(
171171+ remoteReplyPostUrl,
172172+ "remoteReplyPostUrl",
173173+ );
168174 if (maybeRemoteReplyPostUrl) {
169175 normalized.remoteReplyPostUrl = maybeRemoteReplyPostUrl;
170176 }
···189195} = {}) => {
190196 const suite = createSuiteConfig(rest);
191197 if (!suite.targetHandle) {
192192- throw new Error('targetHandle is required for single-mode runs');
198198+ throw new Error("targetHandle is required for single-mode runs");
193199 }
194200 return {
195201 ...suite,
196202 ...createAccountConfig(account),
197197- editProfile: !!editProfile,
203203+ editProfile: Boolean(editProfile),
198204 };
199205};
200206
+9-9
src/index.mjs
···11-export * from './config.mjs';
22-export * from './adapters/bring-your-own.mjs';
33-export * from './adapters/perlsky.mjs';
44-export * from './adapters/tranquil-pds.mjs';
55-export * from './adapters/registry.mjs';
66-export * from './lab/pdslab-targets.mjs';
77-export * from './browser/run-single.mjs';
88-export * from './browser/run-dual.mjs';
99-export * from './cli.mjs';
11+export * from "./config.mjs";
22+export * from "./adapters/bring-your-own.mjs";
33+export * from "./adapters/perlsky.mjs";
44+export * from "./adapters/tranquil-pds.mjs";
55+export * from "./adapters/registry.mjs";
66+export * from "./lab/pdslab-targets.mjs";
77+export * from "./browser/run-single.mjs";
88+export * from "./browser/run-dual.mjs";
99+export * from "./cli.mjs";