@phpsandbox/sdk 0.1.11 → 0.1.13

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.
@@ -9,6 +9,7 @@ const restActionRoutes = {
9
9
  'container.stop': { method: 'POST', path: '/runtime/container/stop' },
10
10
  'container.set-php': { method: 'PUT', path: '/runtime/container/php' },
11
11
  'container.opened-ports': { method: 'GET', path: '/runtime/container/ports' },
12
+ 'container.resolve-port': { method: 'POST', path: '/runtime/container/ports/resolve' },
12
13
  'container.stats': { method: 'GET', path: '/runtime/container/stats' },
13
14
  'terminal.list': { method: 'GET', path: '/runtime/terminals' },
14
15
  'shell.exec': { method: 'POST', path: '/runtime/executions' },
package/dist/runtime.d.ts CHANGED
@@ -28,6 +28,9 @@ export interface RuntimeActions {
28
28
  'container.restart': Action<{}, void>;
29
29
  'container.stop': Action<{}, void>;
30
30
  'container.opened-ports': Action<{}, PortInfo[]>;
31
+ 'container.resolve-port': Action<{
32
+ port: number;
33
+ }, PortInfo>;
31
34
  'container.stats': Action<{}, RuntimeStats | null>;
32
35
  'container.set-php': Action<{
33
36
  version: string;
@@ -54,6 +57,7 @@ export declare class RuntimePorts {
54
57
  private readonly ports;
55
58
  constructor(ports: Ports);
56
59
  list(): Promise<PortInfo[]>;
60
+ resolve(port: number): Promise<PortInfo>;
57
61
  watch(options?: RuntimeWatchOptions): ReadableStream<PortInfo[]>;
58
62
  }
59
63
  export default class Runtime {
package/dist/runtime.js CHANGED
@@ -28,6 +28,9 @@ export class RuntimePorts {
28
28
  list() {
29
29
  return this.ports.list();
30
30
  }
31
+ resolve(port) {
32
+ return this.ports.resolve(port);
33
+ }
31
34
  watch(options = {}) {
32
35
  return this.ports.watch(options);
33
36
  }
@@ -62,6 +62,7 @@ Connection lifecycle methods, streaming actions, and event subscriptions require
62
62
 
63
63
  - `notebook.runtime.logs.follow({ signal? })` returns `ReadableStream<RuntimeLogEntry>`
64
64
  - `notebook.runtime.ports.list()` returns the current preview ports
65
+ - `notebook.runtime.ports.resolve(port)` returns preview routing information even when the port is not open
65
66
  - `notebook.runtime.ports.watch({ signal? })` returns `ReadableStream<PortInfo[]>`
66
67
  - `notebook.runtime.metrics.current()` returns the current CPU, memory, and disk sample
67
68
  - `notebook.runtime.metrics.watch({ signal? })` returns `ReadableStream<RuntimeStats>`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phpsandbox/sdk",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "A comprehensive TypeScript SDK for interacting with cloud-based PHP development environments",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",