@phreshos/client 0.1.23 → 0.1.24
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/main.d.ts +1 -1
- package/dist/main.js +1 -1
- package/dist/service.d.ts +7 -7
- package/dist/service.js +3 -3
- package/dist/system.d.ts +4 -4
- package/package.json +3 -3
package/dist/main.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ export { type SystemPointer, type PointerEvents, type PointerPosition } from "./
|
|
|
3
3
|
export { type DesktopEvents, type DesktopSize, type SystemDesktop } from "./desktop.js";
|
|
4
4
|
export { current, type Current, type CurrentServer } from "./current.js";
|
|
5
5
|
export { type Channel, type ChannelCapture, type ChannelEvents, type ChannelMessage } from "./channel.js";
|
|
6
|
-
export {
|
|
6
|
+
export { ClientService, ServerService, Service, type ClientServiceChannel, type ServerServiceChannel, type ServiceChannel, type ServiceKey, type ServiceLifecycleEvents } from "@phreshos/core";
|
|
7
7
|
export { Client, Endpoint, Process, Program, Server, type Window, type ProgramProcess, type AnswerCapture, type AnswerMessage, type AnswerObserver, type AskCapture, type AskMessage, type AskObserver, type ClientTraffic, type EndpointTraffic, type ServerTraffic, type TrafficCapture, type TrafficEvents, type TrafficMessage } from "./domain.js";
|
|
8
8
|
export type { Askable, Capture, Captures, ClientDeclaration, Cleanup, DirectoryStat, EndpointDeclaration, EntryStat, EventMessage, EventName, EventObserver, EventOptions, EventSubscriber, Exit, FileStat, Launch, LaunchClient, Layer, LogKind, LogRecord, LogSource, Message, OtherStat, Outcome, PermissionDecision, Permission, Position, Storage, ProgramEvents, ProgramProcessEvents, ProgramProcessExit, ProgramSql, ProgramStore, ProcessEvents, Publishable, SystemUploads, Upload, Size, Subscribable, SubscribableEvents, SubscribableFallback, TimedAskable, TimedPermission, Timeoutable, Appearance, AppearanceEvents, AppearanceSource, AppearanceSurface, AnimationsPreference, DesktopPreferences, DesktopPreferencesEvents, DesktopPreferencesUpdate, SystemDesktopPreferences, ThemedValue, Theme, ThemePreference, Value, WindowEvents, WindowGeometry, WindowLayer, WindowState, Easing, LocalWindow, LocalWindowSurface, VisibilityTransition, Transaction } from "@phreshos/core";
|
package/dist/main.js
CHANGED
|
@@ -3,5 +3,5 @@ export {} from "./pointer.js";
|
|
|
3
3
|
export {} from "./desktop.js";
|
|
4
4
|
export { current } from "./current.js";
|
|
5
5
|
export {} from "./channel.js";
|
|
6
|
-
export {
|
|
6
|
+
export { ClientService, ServerService, Service } from "@phreshos/core";
|
|
7
7
|
export { Client, Endpoint, Process, Program, Server } from "./domain.js";
|
package/dist/service.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ClientService, type ServerService, type Service, type ServiceKey } from "@phreshos/core";
|
|
2
2
|
import type { HandleAddress } from "./domain.js";
|
|
3
3
|
export declare function prepareService<EventsMap extends object = {}>(key: ServiceKey & {
|
|
4
4
|
endpoint: "server";
|
|
5
|
-
}):
|
|
5
|
+
}): ServerService<EventsMap>;
|
|
6
6
|
export declare function prepareService<EventsMap extends object = {}>(key: ServiceKey & {
|
|
7
7
|
endpoint: "client";
|
|
8
|
-
}):
|
|
9
|
-
export declare function prepareService(key: ServiceKey):
|
|
8
|
+
}): ClientService<EventsMap>;
|
|
9
|
+
export declare function prepareService(key: ServiceKey): Service;
|
|
10
10
|
export declare function enableCurrentService(name: string): Promise<void>;
|
|
11
11
|
export declare function disableCurrentService(): Promise<void>;
|
|
12
|
-
export declare function endpointService<EventsMap extends object = {}>(target: HandleAddress | null, endpoint: "server"): Promise<
|
|
13
|
-
export declare function endpointService<EventsMap extends object = {}>(target: HandleAddress | null, endpoint: "client"): Promise<
|
|
14
|
-
export declare function endpointService(target: HandleAddress | null, endpoint: "server" | "client"): Promise<
|
|
12
|
+
export declare function endpointService<EventsMap extends object = {}>(target: HandleAddress | null, endpoint: "server"): Promise<ServerService<EventsMap> | null>;
|
|
13
|
+
export declare function endpointService<EventsMap extends object = {}>(target: HandleAddress | null, endpoint: "client"): Promise<ClientService<EventsMap> | null>;
|
|
14
|
+
export declare function endpointService(target: HandleAddress | null, endpoint: "server" | "client"): Promise<Service | null>;
|
package/dist/service.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ClientService as CoreClientService, ServerService as CoreServerService, isServiceKey } from "@phreshos/core";
|
|
2
2
|
import Deadline from "./deadline.js";
|
|
3
3
|
import Events from "./events.js";
|
|
4
4
|
import HandleRegistry from "./handle-registry.js";
|
|
5
5
|
import wire from "./wire.js";
|
|
6
6
|
const handles = new HandleRegistry();
|
|
7
|
-
const ServerServiceBase =
|
|
8
|
-
const ClientServiceBase =
|
|
7
|
+
const ServerServiceBase = CoreServerService;
|
|
8
|
+
const ClientServiceBase = CoreClientService;
|
|
9
9
|
class ServerChannelHandle extends Events {
|
|
10
10
|
key;
|
|
11
11
|
constructor(key) {
|
package/dist/system.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { AppearanceSource,
|
|
1
|
+
import type { AppearanceSource, ClientService, SystemDesktopPreferences, ServerService, ServiceKey, SystemUploads } from "@phreshos/core";
|
|
2
2
|
import { type SystemPointer } from "./pointer.js";
|
|
3
3
|
import { type SystemDesktop } from "./desktop.js";
|
|
4
4
|
type ServiceEndpoint = ServiceKey["endpoint"];
|
|
5
5
|
type ServiceAddress<Endpoint extends ServiceEndpoint> = Omit<ServiceKey, "endpoint"> & Readonly<{
|
|
6
6
|
endpoint: Endpoint;
|
|
7
7
|
}>;
|
|
8
|
-
type ServiceHandle<Endpoint extends ServiceEndpoint, Events extends object> = Endpoint extends "server" ?
|
|
8
|
+
type ServiceHandle<Endpoint extends ServiceEndpoint, Events extends object> = Endpoint extends "server" ? ServerService<Events> : ClientService<Events>;
|
|
9
9
|
/** Desktop capabilities structurally available to a Client endpoint. */
|
|
10
10
|
export interface System {
|
|
11
11
|
/** Complete unresolved Appearance read from the System authority. */
|
|
@@ -23,9 +23,9 @@ export interface System {
|
|
|
23
23
|
/** Returns a precisely typed stable handle for either service endpoint. */
|
|
24
24
|
service<Endpoint extends ServiceEndpoint>(key: ServiceAddress<Endpoint>): ServiceHandle<Endpoint, {}>;
|
|
25
25
|
/** Returns a typed stable handle for one exact Server service identity. */
|
|
26
|
-
service<ServiceEvents extends object>(key: ServiceAddress<"server">):
|
|
26
|
+
service<ServiceEvents extends object>(key: ServiceAddress<"server">): ServerService<ServiceEvents>;
|
|
27
27
|
/** Returns a typed stable handle for one exact Client service identity. */
|
|
28
|
-
service<ServiceEvents extends object>(key: ServiceAddress<"client">):
|
|
28
|
+
service<ServiceEvents extends object>(key: ServiceAddress<"client">): ClientService<ServiceEvents>;
|
|
29
29
|
}
|
|
30
30
|
/** Desktop capabilities available to this Client. */
|
|
31
31
|
export declare const system: System;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phreshos/client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.24",
|
|
4
4
|
"description": "The SDK used by a Program's client endpoint.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"prepack": "node --run build"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@phreshos/core": "^0.1.
|
|
50
|
+
"@phreshos/core": "^0.1.24"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@msgpack/msgpack": "^3.1.3"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@phreshos/core": "^0.1.
|
|
56
|
+
"@phreshos/core": "^0.1.24",
|
|
57
57
|
"typescript": "^6.0.3"
|
|
58
58
|
}
|
|
59
59
|
}
|