@wopr-network/platform-core 1.42.2 → 1.42.3
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/fleet/instance.d.ts +2 -0
- package/dist/fleet/instance.js +15 -0
- package/package.json +1 -1
- package/src/fleet/instance.ts +16 -0
package/dist/fleet/instance.d.ts
CHANGED
|
@@ -39,6 +39,8 @@ export declare class Instance {
|
|
|
39
39
|
/** Simple per-instance mutex to serialize start/stop/restart/remove. */
|
|
40
40
|
private lockPromise;
|
|
41
41
|
constructor(deps: InstanceDeps);
|
|
42
|
+
/** Serialize to a plain object safe for JSON.stringify / tRPC responses. */
|
|
43
|
+
toJSON(): Record<string, unknown>;
|
|
42
44
|
/**
|
|
43
45
|
* Remote instances have containerId like "remote:node-3".
|
|
44
46
|
* Local Docker operations are not supported — callers (e.g. wopr-platform)
|
package/dist/fleet/instance.js
CHANGED
|
@@ -25,6 +25,21 @@ export class Instance {
|
|
|
25
25
|
this.eventEmitter = deps.eventEmitter;
|
|
26
26
|
this.botMetricsTracker = deps.botMetricsTracker;
|
|
27
27
|
}
|
|
28
|
+
/** Serialize to a plain object safe for JSON.stringify / tRPC responses. */
|
|
29
|
+
toJSON() {
|
|
30
|
+
return {
|
|
31
|
+
id: this.id,
|
|
32
|
+
containerId: this.containerId,
|
|
33
|
+
containerName: this.containerName,
|
|
34
|
+
url: this.url,
|
|
35
|
+
name: this.profile.name,
|
|
36
|
+
image: this.profile.image,
|
|
37
|
+
tenantId: this.profile.tenantId,
|
|
38
|
+
env: this.profile.env,
|
|
39
|
+
restartPolicy: this.profile.restartPolicy,
|
|
40
|
+
nodeId: this.profile.nodeId,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
28
43
|
/**
|
|
29
44
|
* Remote instances have containerId like "remote:node-3".
|
|
30
45
|
* Local Docker operations are not supported — callers (e.g. wopr-platform)
|
package/package.json
CHANGED
package/src/fleet/instance.ts
CHANGED
|
@@ -59,6 +59,22 @@ export class Instance {
|
|
|
59
59
|
this.botMetricsTracker = deps.botMetricsTracker;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
/** Serialize to a plain object safe for JSON.stringify / tRPC responses. */
|
|
63
|
+
toJSON(): Record<string, unknown> {
|
|
64
|
+
return {
|
|
65
|
+
id: this.id,
|
|
66
|
+
containerId: this.containerId,
|
|
67
|
+
containerName: this.containerName,
|
|
68
|
+
url: this.url,
|
|
69
|
+
name: this.profile.name,
|
|
70
|
+
image: this.profile.image,
|
|
71
|
+
tenantId: this.profile.tenantId,
|
|
72
|
+
env: this.profile.env,
|
|
73
|
+
restartPolicy: this.profile.restartPolicy,
|
|
74
|
+
nodeId: this.profile.nodeId,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
62
78
|
/**
|
|
63
79
|
* Remote instances have containerId like "remote:node-3".
|
|
64
80
|
* Local Docker operations are not supported — callers (e.g. wopr-platform)
|