compiled files
This commit is contained in:
parent
3d6cfaaaaa
commit
f8ba295079
7
example/ts/dist/goapi.gen.d.ts
vendored
Normal file
7
example/ts/dist/goapi.gen.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
import { ParentIPC, ChildIPC } from "../../lib/ts/lib";
|
||||
export default class IpcApi {
|
||||
private ipc;
|
||||
constructor(ipc: ParentIPC | ChildIPC);
|
||||
Div(a: number, b: number): Promise<number>;
|
||||
}
|
||||
//# sourceMappingURL=goapi.gen.d.ts.map
|
||||
1
example/ts/dist/goapi.gen.d.ts.map
vendored
Normal file
1
example/ts/dist/goapi.gen.d.ts.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"goapi.gen.d.ts","sourceRoot":"","sources":["../src/goapi.gen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,OAAO,CAAC,GAAG,CAAuB;gBAEtB,GAAG,EAAE,SAAS,GAAG,QAAQ;IAI/B,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAGjD"}
|
||||
1
example/ts/dist/goapi.gen.js.map
vendored
Normal file
1
example/ts/dist/goapi.gen.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"goapi.gen.js","sourceRoot":"","sources":["../src/goapi.gen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,MAAM;IACjB,GAAG,CAAuB;IAElC,YAAY,GAAyB;QACnC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,CAAS,EAAE,CAAS;QAC5B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1C,CAAC;CACF"}
|
||||
2
example/ts/dist/index.d.ts
vendored
Normal file
2
example/ts/dist/index.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
example/ts/dist/index.d.ts.map
vendored
Normal file
1
example/ts/dist/index.d.ts.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
||||
1
example/ts/dist/index.js.map
vendored
Normal file
1
example/ts/dist/index.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC;;GAEG;AACH,MAAM,QAAQ;IACV,GAAG,CAAC,CAAS,EAAE,CAAS;QACpB,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;QACxC,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC;CACJ;AAED,KAAK,UAAU,IAAI;IACf,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;IAChC,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACnC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEhC,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;IAElB,OAAO,CAAC,GAAG,CAAC,QAAQ,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAE9C,IAAI,CAAC;QACD,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACT,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACrB,CAAC;IAED,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;AACrB,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;IACb,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC,CAAC,CAAC"}
|
||||
2
lib/ts/dist/index.d.ts
vendored
Normal file
2
lib/ts/dist/index.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export { ParentIPC, ChildIPC } from './lib.js';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
lib/ts/dist/index.d.ts.map
vendored
Normal file
1
lib/ts/dist/index.d.ts.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,UAAU,CAAC"}
|
||||
1
lib/ts/dist/index.js.map
vendored
Normal file
1
lib/ts/dist/index.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,UAAU,CAAC"}
|
||||
57
lib/ts/dist/lib.d.ts
vendored
Normal file
57
lib/ts/dist/lib.d.ts
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
import * as net from 'node:net';
|
||||
import { QueuedEvent } from 'ts-events';
|
||||
declare enum MsgType {
|
||||
Call = 1,
|
||||
Response = 2
|
||||
}
|
||||
type Vals = any[];
|
||||
interface CallMessage {
|
||||
type: MsgType.Call;
|
||||
id: number;
|
||||
method: string;
|
||||
params: Vals;
|
||||
}
|
||||
interface ResponseMessage {
|
||||
type: MsgType.Response;
|
||||
id: number;
|
||||
result?: Vals;
|
||||
error?: string;
|
||||
}
|
||||
type Message = CallMessage | ResponseMessage;
|
||||
interface CallResult {
|
||||
result: Vals;
|
||||
error: Error | null;
|
||||
}
|
||||
declare abstract class IPCCommon {
|
||||
protected localApi: any;
|
||||
protected socketPath: string;
|
||||
protected conn: net.Socket | null;
|
||||
protected nextId: number;
|
||||
protected pendingCalls: Record<number, (result: CallResult) => void>;
|
||||
protected errors: QueuedEvent<Error>;
|
||||
protected constructor(localApi: any, socketPath: string);
|
||||
protected readConn(): void;
|
||||
protected processMsg(msg: Message): void;
|
||||
protected handleCall(msg: CallMessage): void;
|
||||
protected sendMsg(msg: Message): void;
|
||||
protected handleResponse(msg: ResponseMessage): void;
|
||||
protected raiseErr(err: Error): void;
|
||||
call(method: string, ...params: Vals): Promise<Vals>;
|
||||
}
|
||||
export declare class ParentIPC extends IPCCommon {
|
||||
private readonly cmdPath;
|
||||
private readonly cmdArgs;
|
||||
private cmd;
|
||||
private readonly listener;
|
||||
constructor(cmdPath: string, cmdArgs: string[], localApi: any);
|
||||
start(): Promise<void>;
|
||||
private acceptConn;
|
||||
wait(): Promise<void>;
|
||||
}
|
||||
export declare class ChildIPC extends IPCCommon {
|
||||
constructor(localApi: any);
|
||||
start(): Promise<void>;
|
||||
wait(): Promise<void>;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=lib.d.ts.map
|
||||
1
lib/ts/dist/lib.d.ts.map
vendored
Normal file
1
lib/ts/dist/lib.d.ts.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAOhC,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AAItC,aAAK,OAAO;IACR,IAAI,IAAI;IACR,QAAQ,IAAI;CACf;AAED,KAAK,IAAI,GAAG,GAAG,EAAE,CAAC;AAElB,UAAU,WAAW;IACjB,IAAI,EA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CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAmBvD;AAGD,qBAAa,SAAU,SAAQ,SAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;IACnC,OAAO,CAAC,GAAG,CAA6B;IACxC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAa;gBAE1B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,GAAG;IAavD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAuBd,UAAU;IAmBlB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAgB9B;AAGD,qBAAa,QAAS,SAAQ,SAAS;gBACvB,QAAQ,EAAE,GAAG;IAInB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAUtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAK9B"}
|
||||
1
lib/ts/dist/lib.js.map
vendored
Normal file
1
lib/ts/dist/lib.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user