Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/desktop/src/preview/BrowserImport/BrowserImport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export const writeCookies = Effect.fn("BrowserImport.writeCookies")(function* (
return { imported, skipped, skippedDomains: [...skippedDomains].slice(0, 20) };
});

/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* BrowserImportMake() {
const browserSession = yield* BrowserSession.BrowserSession;
const platform = yield* HostProcessPlatform;
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/src/preview/BrowserSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ const encodeScopeForDigest = (scope: string): Uint8Array =>
),
);

/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* BrowserSessionMake() {
const crypto = yield* Crypto.Crypto;
const sessionsRef = yield* SynchronizedRef.make<ReadonlyMap<string, Session>>(new Map());
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/preview/FaviconCapture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { FAVICON_DATA_URL_MAX_LENGTH } from "@t3tools/contracts";

export const MAX_FAVICON_RESPONSE_BYTES = 100_000;
export const MAX_FAVICON_CANDIDATES = 8;
export const MAX_FAVICON_HTTP_URL_LENGTH = 2_048;
const MAX_FAVICON_HTTP_URL_LENGTH = 2_048;

const MAX_FAVICON_CANDIDATE_INPUT_UNITS = 262_144;
const MIN_FAVICON_CANDIDATE_INPUT_UNITS = 256;
Expand Down
14 changes: 6 additions & 8 deletions apps/desktop/src/preview/Manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const DEFAULT_ANNOTATION_THEME: DesktopPreviewAnnotationTheme = {
fontMono: "ui-monospace, monospace",
};

export const buildPreviewPictureInPictureDataUrl = (): string => {
const buildPreviewPictureInPictureDataUrl = (): string => {
const html = `<!doctype html>
<html>
<head>
Expand Down Expand Up @@ -4271,7 +4271,7 @@ export class PreviewOperationError extends Schema.TaggedErrorClass<PreviewOperat
}
}

export const isPreviewOperationError = Schema.is(PreviewOperationError);
const isPreviewOperationError = Schema.is(PreviewOperationError);

export class PreviewArtifactPathOutsideDirectoryError extends Schema.TaggedErrorClass<PreviewArtifactPathOutsideDirectoryError>()(
"PreviewArtifactPathOutsideDirectoryError",
Expand Down Expand Up @@ -4472,14 +4472,11 @@ export const PreviewManagerError = Schema.Union([
]);
export type PreviewManagerError = typeof PreviewManagerError.Type;

export const isPreviewManagerError = Schema.is(PreviewManagerError);
export const isPreviewAutomationControlInterruptedError = Schema.is(
const isPreviewAutomationControlInterruptedError = Schema.is(
PreviewAutomationControlInterruptedError,
);
export const isPreviewAutomationEvaluationError = Schema.is(PreviewAutomationEvaluationError);
export const isPreviewAutomationInvalidSelectorError = Schema.is(
PreviewAutomationInvalidSelectorError,
);
const isPreviewAutomationEvaluationError = Schema.is(PreviewAutomationEvaluationError);
const isPreviewAutomationInvalidSelectorError = Schema.is(PreviewAutomationInvalidSelectorError);

export class PreviewManager extends Context.Service<
PreviewManager,
Expand Down Expand Up @@ -4592,6 +4589,7 @@ export class PreviewManager extends Context.Service<
}
>()("@t3tools/desktop/preview/Manager/PreviewManager") {}

/** @public Service construction is part of the canonical Effect module API. */
export const make = Effect.gen(function* PreviewManagerMake() {
const environment = yield* DesktopEnvironment.DesktopEnvironment;
const browserSession = yield* BrowserSession.BrowserSession;
Expand Down
Loading