@phpsandbox/sdk 0.0.67 → 0.0.68

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.
@@ -153,9 +153,7 @@ export interface DeploymentData<TProvider extends DeploymentTargetProvider = Dep
153
153
  strategy: string;
154
154
  targetProvider: TProvider;
155
155
  options: DeploymentOptionsForProvider<TProvider>;
156
- eventStreamUrl?: string | null;
157
- /** @deprecated Use eventStreamUrl instead. */
158
- okraUrl: string | null;
156
+ eventStreamUrl: string | null;
159
157
  originUrl: string | null;
160
158
  currentRelease?: DeploymentReleaseData | null;
161
159
  domains?: DeploymentDomainData[];
@@ -124,7 +124,7 @@ export class DeploymentRun {
124
124
  if (this.started) {
125
125
  return this;
126
126
  }
127
- const eventStreamUrl = this.initial.data.eventStreamUrl ?? this.initial.data.okraUrl;
127
+ const eventStreamUrl = this.initial.data.eventStreamUrl;
128
128
  if (!eventStreamUrl) {
129
129
  throw new Error(`Deployment ${this.initial.data.id} has no eventStreamUrl for SSE streaming`);
130
130
  }
package/dist/index.d.ts CHANGED
@@ -308,8 +308,6 @@ export interface PHPSandboxClientOptions {
308
308
  fetch?: typeof globalThis.fetch;
309
309
  webSocket?: unknown;
310
310
  runtimeUrlProvider?: (notebookId: string) => Promise<string>;
311
- /** @deprecated Use runtimeUrlProvider instead. */
312
- okraUrlProvider?: (notebookId: string) => Promise<string>;
313
311
  }
314
312
  export type RuntimeTransport = 'realtime' | 'rest';
315
313
  export declare class Client {
@@ -379,9 +377,7 @@ export declare class NotebookMailApi {
379
377
  }
380
378
  export interface NotebookData {
381
379
  id: string;
382
- runtimeUrl?: string;
383
- /** @deprecated Use runtimeUrl instead. */
384
- okraUrl: string;
380
+ runtimeUrl: string;
385
381
  gitUrl: string;
386
382
  type?: string;
387
383
  title?: string;
package/dist/index.js CHANGED
@@ -347,8 +347,7 @@ export class NotebookInstance {
347
347
  this.initialized = false;
348
348
  _NotebookInstance_initPromise.set(this, null);
349
349
  this.disposables = [];
350
- const runtimeUrl = data.runtimeUrl ?? data.okraUrl;
351
- const runtimeUrlProvider = client.options.runtimeUrlProvider ?? client.options.okraUrlProvider;
350
+ const runtimeUrlProvider = client.options.runtimeUrlProvider;
352
351
  this.emitter = EventManager.createInstance();
353
352
  if (client.runtimeTransport === 'rest') {
354
353
  this.socket = null;
@@ -360,11 +359,11 @@ export class NotebookInstance {
360
359
  this.restInvoker = null;
361
360
  let initialConnection = true;
362
361
  const connectionUrl = runtimeUrlProvider === undefined
363
- ? runtimeUrl
362
+ ? data.runtimeUrl
364
363
  : async () => {
365
364
  if (initialConnection) {
366
365
  initialConnection = false;
367
- return runtimeUrl;
366
+ return data.runtimeUrl;
368
367
  }
369
368
  return runtimeUrlProvider(data.id);
370
369
  };
@@ -62,7 +62,7 @@ export class RestRuntimeInvoker {
62
62
  this.refresh = refresh;
63
63
  this.refreshPromise = null;
64
64
  this.notebookId = data.id;
65
- this.configure(data.runtimeUrl ?? data.okraUrl);
65
+ this.configure(data.runtimeUrl);
66
66
  }
67
67
  configure(runtimeUrl) {
68
68
  const actionUrl = new URL(runtimeUrl);
@@ -478,7 +478,7 @@ async function runScenario(
478
478
 
479
479
  const data = {
480
480
  ...created.data,
481
- runtimeUrl: resolveRuntimeUrl(created.data.runtimeUrl ?? created.data.okraUrl, options),
481
+ runtimeUrl: resolveRuntimeUrl(created.data.runtimeUrl, options),
482
482
  };
483
483
  created.dispose();
484
484
 
@@ -103,13 +103,13 @@ async function main(): Promise<void> {
103
103
  const result = await client.get<NotebookData>(`/notebook/${options.notebookId}`);
104
104
  return {
105
105
  data: result.data,
106
- detail: `id=${result.data.id} type=${result.data.type ?? ''} title=${result.data.title ?? ''} runtimeUrl=${redactUrl(result.data.runtimeUrl ?? result.data.okraUrl)}`,
106
+ detail: `id=${result.data.id} type=${result.data.type ?? ''} title=${result.data.title ?? ''} runtimeUrl=${redactUrl(result.data.runtimeUrl)}`,
107
107
  };
108
108
  });
109
109
 
110
110
  notebookData = {
111
111
  ...response.data,
112
- runtimeUrl: resolveRuntimeUrl(response.data.runtimeUrl ?? response.data.okraUrl, options),
112
+ runtimeUrl: resolveRuntimeUrl(response.data.runtimeUrl, options),
113
113
  };
114
114
 
115
115
  notebook = new NotebookInstance(notebookData, client);
@@ -300,7 +300,7 @@ async function main(): Promise<void> {
300
300
  id: notebookData.id,
301
301
  title: notebookData.title,
302
302
  type: notebookData.type,
303
- runtimeUrl: redactUrl(notebookData.runtimeUrl ?? notebookData.okraUrl),
303
+ runtimeUrl: redactUrl(notebookData.runtimeUrl),
304
304
  }
305
305
  : undefined,
306
306
  initTrace,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phpsandbox/sdk",
3
- "version": "0.0.67",
3
+ "version": "0.0.68",
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",