@phpsandbox/sdk 0.2.3 → 0.3.1
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/README.md +41 -22
- package/dist/browser/phpsandbox-sdk.esm.js +18 -29
- package/dist/browser/phpsandbox-sdk.esm.min.js +23 -23
- package/dist/browser/phpsandbox-sdk.iife.js +18 -29
- package/dist/browser/phpsandbox-sdk.iife.min.js +8 -8
- package/dist/integrations/account.d.ts +1 -0
- package/dist/publication/instance.d.ts +0 -1
- package/dist/publication/instance.js +0 -9
- package/dist/publication/notebook.d.ts +10 -11
- package/dist/publication/notebook.js +20 -18
- package/dist/publication/types.d.ts +200 -111
- package/package.json +1 -1
|
@@ -15183,17 +15183,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15183
15183
|
follow() {
|
|
15184
15184
|
return new PublicationRun(this, this.client).start();
|
|
15185
15185
|
}
|
|
15186
|
-
async publish() {
|
|
15187
|
-
if (!this.notebookId) {
|
|
15188
|
-
throw new PHPSandboxError("Publishing requires a notebook-scoped publication instance.");
|
|
15189
|
-
}
|
|
15190
|
-
const response = await this.client.post(
|
|
15191
|
-
`/notebook/${encodeURIComponent(this.notebookId)}/publication`
|
|
15192
|
-
);
|
|
15193
|
-
const run = new PublicationRun(new _PublicationInstance(response.data, this.client, this.notebookId), this.client);
|
|
15194
|
-
run.start();
|
|
15195
|
-
return run;
|
|
15196
|
-
}
|
|
15197
15186
|
async destroy(options = {}) {
|
|
15198
15187
|
const query = options.deleteResources ? "?deleteResources=1" : "";
|
|
15199
15188
|
await this.client.delete(`/publications/${encodeURIComponent(this.data.id)}${query}`);
|
|
@@ -15320,24 +15309,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15320
15309
|
async readiness() {
|
|
15321
15310
|
return (await this.client.get(`${this.path}/publication/readiness`)).data;
|
|
15322
15311
|
}
|
|
15323
|
-
/**
|
|
15312
|
+
/** Inspect saved configuration and the actual inventory, including removed and legacy apps. */
|
|
15313
|
+
async configuration() {
|
|
15314
|
+
return (await this.client.get(`${this.path}/publication/configuration`)).data;
|
|
15315
|
+
}
|
|
15316
|
+
/** Explicit operations preserve omitted apps. Removals never stop deployments or delete resource data. */
|
|
15317
|
+
async updateConfiguration(input) {
|
|
15318
|
+
return (await this.client.patch(`${this.path}/publication/configuration`, input)).data;
|
|
15319
|
+
}
|
|
15320
|
+
/** Review all or selected configured apps at an exact saved revision. */
|
|
15324
15321
|
async prepare(input) {
|
|
15325
15322
|
return (await this.client.post(`${this.path}/publication/plan`, input)).data;
|
|
15326
15323
|
}
|
|
15327
|
-
/**
|
|
15328
|
-
async
|
|
15329
|
-
|
|
15330
|
-
|
|
15331
|
-
/** Publish every component in a reviewed application plan. */
|
|
15332
|
-
async publishApplication(input) {
|
|
15333
|
-
const application = (await this.client.post(`${this.path}/publication/application`, input)).data;
|
|
15334
|
-
this.startApplicationRuns(application);
|
|
15324
|
+
/** Publish the exact app selection in a server-owned review. */
|
|
15325
|
+
async publish(input) {
|
|
15326
|
+
const application = (await this.client.post(`${this.path}/publication`, input)).data;
|
|
15327
|
+
if (!("confirmationRequired" in application)) this.startApplicationRuns(application);
|
|
15335
15328
|
return application;
|
|
15336
15329
|
}
|
|
15337
15330
|
async application(applicationId) {
|
|
15338
15331
|
return (await this.client.get(`${this.path}/publication/application/${encodeURIComponent(applicationId)}`)).data;
|
|
15339
15332
|
}
|
|
15340
|
-
/** Retry
|
|
15333
|
+
/** Retry failed apps and pending route attachments while preserving running releases. */
|
|
15341
15334
|
async retryApplication(applicationId) {
|
|
15342
15335
|
const application = (await this.client.post(
|
|
15343
15336
|
`${this.path}/publication/application/${encodeURIComponent(applicationId)}/retry`,
|
|
@@ -15351,10 +15344,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15351
15344
|
await this.client.delete(`${this.path}/publication/application/${encodeURIComponent(applicationId)}${query}`);
|
|
15352
15345
|
}
|
|
15353
15346
|
startApplicationRuns(application) {
|
|
15354
|
-
for (const
|
|
15355
|
-
if (!
|
|
15347
|
+
for (const app of application.apps) {
|
|
15348
|
+
if (!(application.selectedAppIds ?? []).includes(app.appId)) continue;
|
|
15349
|
+
if (!["pending", "queued", "building", "deploying"].includes(app.publication.status)) continue;
|
|
15356
15350
|
new PublicationRun(
|
|
15357
|
-
new PublicationInstance(
|
|
15351
|
+
new PublicationInstance(app.publication, this.client, this.notebookId),
|
|
15358
15352
|
this.client
|
|
15359
15353
|
).start();
|
|
15360
15354
|
}
|
|
@@ -15366,11 +15360,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15366
15360
|
}
|
|
15367
15361
|
return (await this.client.get(`${this.path}/publication/catalog?${query}`)).data;
|
|
15368
15362
|
}
|
|
15369
|
-
/** Core validates the plan, prepares source and executes publishing. */
|
|
15370
|
-
async publish(input) {
|
|
15371
|
-
const response = await this.client.post(`${this.path}/publication`, input);
|
|
15372
|
-
return new PublicationRun(new PublicationInstance(response.data, this.client, this.notebookId), this.client).start();
|
|
15373
|
-
}
|
|
15374
15363
|
};
|
|
15375
15364
|
|
|
15376
15365
|
// src/publication/providers/laravel-cloud.ts
|