dsh-mobile 0.6.4 → 0.6.5

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/lib/index.d.mts CHANGED
@@ -1150,6 +1150,85 @@ export declare class FrpComponentManager {
1150
1150
  private enqueue;
1151
1151
  }
1152
1152
  //#endregion
1153
+ //#region src/cpolar-component.d.ts
1154
+ /** Pinned cpolar components fetched only after an explicit user action. */
1155
+ interface CpolarArtifact {
1156
+ readonly version: string;
1157
+ readonly platform: NodeJS.Platform;
1158
+ readonly arch: string;
1159
+ readonly downloadUrl: string;
1160
+ readonly downloadBytes: number;
1161
+ readonly downloadSha256: string;
1162
+ readonly executableName: string;
1163
+ readonly executableBytes: number;
1164
+ readonly executableSha256: string;
1165
+ /** Windows ships an MSI inside a zip; Linux ships the binary in a tarball. */
1166
+ readonly archiveKind: 'msi-zip' | 'tar.gz';
1167
+ }
1168
+ /** Pinned official cpolar release metadata for supported desktop targets. */
1169
+ export declare const CPOLAR_COMPONENT_RELEASES: Readonly<Record<string, CpolarArtifact>>;
1170
+ /**
1171
+ * Canonical release metadata. New code should select from
1172
+ * {@link CPOLAR_COMPONENT_RELEASES} by platform and architecture; this alias
1173
+ * preserves the original Windows x64 entry for existing callers.
1174
+ */
1175
+ export declare const CPOLAR_COMPONENT_RELEASE: CpolarArtifact;
1176
+ /** Public, credential-free description of the managed cpolar component. */
1177
+ interface CpolarComponentStatus {
1178
+ readonly supported: boolean;
1179
+ readonly installed: boolean;
1180
+ readonly configured: boolean;
1181
+ readonly version: string;
1182
+ readonly downloadBytes: number;
1183
+ readonly installedBytes: number;
1184
+ readonly sourceUrl: string;
1185
+ readonly downloadPage: string;
1186
+ readonly signupUrl: string;
1187
+ readonly dashboardUrl: string;
1188
+ readonly termsUrl: string;
1189
+ readonly storagePath: string;
1190
+ readonly errorCode?: string;
1191
+ }
1192
+ interface CpolarComponentManagerOptions {
1193
+ readonly stateDirectory: string;
1194
+ readonly platform?: NodeJS.Platform;
1195
+ readonly arch?: string;
1196
+ readonly fetchArtifact?: (url: string, signal: AbortSignal) => Promise<Uint8Array>;
1197
+ readonly extractArtifact?: (archive: string, destination: string) => Promise<void>;
1198
+ }
1199
+ /** Owns the optional cpolar binary and account configuration inside DSH Mobile state. */
1200
+ export declare class CpolarComponentManager {
1201
+ readonly executable: string;
1202
+ readonly configFile: string;
1203
+ readonly componentRoot: string;
1204
+ readonly componentStorage: string;
1205
+ readonly stateRoot: string;
1206
+ readonly logRoot: string;
1207
+ private readonly stagingRoot;
1208
+ private readonly stateDirectory;
1209
+ private readonly platform;
1210
+ private readonly arch;
1211
+ private readonly release;
1212
+ private readonly fetchArtifact;
1213
+ private readonly extractArtifact;
1214
+ private installed;
1215
+ private configured;
1216
+ private errorCode;
1217
+ private queue;
1218
+ constructor(options: CpolarComponentManagerOptions);
1219
+ /** Inspect the managed binary and configuration without using global cpolar state. */
1220
+ initialize(): Promise<void>;
1221
+ /** Return a safe status that never includes the account token. */
1222
+ status(): CpolarComponentStatus;
1223
+ /** Download and verify cpolar, reading archive data without running installer actions. */
1224
+ install(): Promise<CpolarComponentStatus>;
1225
+ /** Store only the cpolar token in a private, self-update-disabled configuration. */
1226
+ configure(authtoken: unknown): Promise<CpolarComponentStatus>;
1227
+ /** Remove every cpolar file owned by DSH Mobile without touching global state. */
1228
+ purge(): Promise<CpolarComponentStatus>;
1229
+ private enqueue;
1230
+ }
1231
+ //#endregion
1153
1232
  //#region src/frp-template.d.ts
1154
1233
  /** Loopback-only HTTP vhost port used between Caddy and frps. */
1155
1234
  export declare const FRP_VHOST_HTTP_PORT = 7080;