@tapi-dev/sdk 0.1.15 → 0.1.20

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/cli.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import type { TapiDevSession } from "./types.js";
2
3
  import { type TapiWorkspace } from "./workspace.js";
3
4
  export type StudioChannel = "pilot" | "stable" | "nightly";
4
5
  export interface StudioReleaseManifest {
@@ -48,12 +49,13 @@ export interface ServiceReleaseManifest {
48
49
  mobileChrome?: Record<string, unknown>;
49
50
  contents?: string[];
50
51
  }
51
- interface StudioCliOptions {
52
+ export interface StudioCliOptions {
52
53
  channel: StudioChannel;
53
54
  apiBaseUrl: string;
54
55
  manifestUrl: string;
55
56
  manifestUrlOverride?: string;
56
57
  cacheDir: string;
58
+ installDir: string;
57
59
  downloadOnly: boolean;
58
60
  silent: boolean;
59
61
  exePath?: string;
@@ -63,6 +65,7 @@ interface StudioCliOptions {
63
65
  projectId?: string;
64
66
  projectSlug?: string;
65
67
  workspaceMode: boolean;
68
+ launchUrlQuery?: string;
66
69
  }
67
70
  export interface ServiceStatus {
68
71
  installed: boolean;
@@ -71,9 +74,14 @@ export interface ServiceStatus {
71
74
  pathName?: string;
72
75
  installedVersion?: string;
73
76
  }
74
- type FetchLike = typeof fetch;
77
+ export type FetchLike = typeof fetch;
75
78
  export declare function runCli(argv?: string[]): Promise<number>;
76
79
  export declare function parseStudioOptions(args: string[]): StudioCliOptions;
80
+ export declare function trySelectDevSessionInOpenStudio(session: TapiDevSession, options: StudioCliOptions, fetchImpl?: FetchLike): Promise<{
81
+ selected: boolean;
82
+ baseUrl?: string;
83
+ reason?: string;
84
+ }>;
77
85
  export declare function installedServiceVersionFromPathName(pathName: string): string | undefined;
78
86
  export declare function serviceNeedsInstall(status: ServiceStatus, manifest: ServiceReleaseManifest): boolean;
79
87
  export declare function getDefaultStudioCacheDir(): string;
@@ -102,7 +110,14 @@ export declare function getStudioExecutableCandidates(): string[];
102
110
  export declare function validateStudioManifest(input: unknown): StudioReleaseManifest;
103
111
  export declare function validateServiceReleaseManifest(input: unknown): ServiceReleaseManifest;
104
112
  export declare function compareVersions(left: string, right: string): number;
113
+ export declare function memoizeStudioInstallToken(options: StudioCliOptions, installToken?: string): string;
105
114
  export declare function findPortablePlaywrightBrowsersDir(exePath: string): string | undefined;
106
115
  export declare function waitForHttpOk(url: string, timeoutMs?: number, intervalMs?: number, fetchImpl?: FetchLike): Promise<void>;
116
+ export declare function studioInstanceRecordPathForOptions(options: StudioCliOptions): string;
107
117
  export declare function findPortableStudioServerExe(releaseDir: string, manifest: StudioReleaseManifest): string | undefined;
118
+ export declare function buildExpandArchiveCommand(zipPath: string, destination: string): string;
119
+ export declare function formatZipExtractionFailure(zipPath: string, destination: string, error: unknown): string;
120
+ export declare function pruneManagedFiles(directory: string, keepPaths: string[], isManagedFileName: (name: string) => boolean, maxNoncurrentEntries?: number, label?: string): Promise<number>;
121
+ export declare function isTapiStudioDownloadArtifact(fileName: string): boolean;
122
+ export declare function isTapiServiceDownloadArtifact(fileName: string): boolean;
108
123
  export {};