@phpsandbox/sdk 0.0.42 → 0.0.44
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/beacon/index.d.ts +5 -1
- package/dist/beacon/index.d.ts.map +1 -1
- package/dist/beacon/index.js +7 -0
- package/dist/beacon/index.js.map +1 -1
- package/dist/beacon/types.d.ts +47 -0
- package/dist/beacon/types.d.ts.map +1 -1
- package/dist/browser/phpsandbox-sdk.esm.js +24 -0
- package/dist/browser/phpsandbox-sdk.esm.js.map +3 -3
- package/dist/browser/phpsandbox-sdk.esm.min.js +2 -2
- package/dist/browser/phpsandbox-sdk.esm.min.js.map +4 -4
- package/dist/browser/phpsandbox-sdk.iife.js +24 -0
- package/dist/browser/phpsandbox-sdk.iife.js.map +3 -3
- package/dist/browser/phpsandbox-sdk.iife.min.js +2 -2
- package/dist/browser/phpsandbox-sdk.iife.min.js.map +4 -4
- package/dist/config.d.ts +28 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +15 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1249,6 +1249,22 @@ var PHPSandbox = (() => {
|
|
|
1249
1249
|
}
|
|
1250
1250
|
};
|
|
1251
1251
|
|
|
1252
|
+
// src/config.ts
|
|
1253
|
+
var Config = class {
|
|
1254
|
+
constructor(okra) {
|
|
1255
|
+
this.okra = okra;
|
|
1256
|
+
}
|
|
1257
|
+
get() {
|
|
1258
|
+
return this.okra.invoke("config.get");
|
|
1259
|
+
}
|
|
1260
|
+
update(config) {
|
|
1261
|
+
return this.okra.invoke("config.update", { config });
|
|
1262
|
+
}
|
|
1263
|
+
setPorts(ports) {
|
|
1264
|
+
return this.okra.invoke("config.set-ports", { ports });
|
|
1265
|
+
}
|
|
1266
|
+
};
|
|
1267
|
+
|
|
1252
1268
|
// node_modules/@msgpack/msgpack/dist.esm/utils/utf8.mjs
|
|
1253
1269
|
function utf8Count(str) {
|
|
1254
1270
|
const strLength = str.length;
|
|
@@ -4967,6 +4983,13 @@ var PHPSandbox = (() => {
|
|
|
4967
4983
|
async fetch(request) {
|
|
4968
4984
|
return this.sendAndWaitFor("fetch", "fetchResult", request);
|
|
4969
4985
|
}
|
|
4986
|
+
/**
|
|
4987
|
+
* Capture the current beacon document, optionally clipped to a viewport or document rectangle.
|
|
4988
|
+
*/
|
|
4989
|
+
async captureScreenshot(request = {}) {
|
|
4990
|
+
const timeoutMs = (request.timeout || 3e4) + 5e3;
|
|
4991
|
+
return this.sendAndWaitFor("captureScreenshot", "screenshotResult", request, timeoutMs);
|
|
4992
|
+
}
|
|
4970
4993
|
/**
|
|
4971
4994
|
* Debug a page (navigate and capture debug information). It loads
|
|
4972
4995
|
* the page fresh in the IFRAME so that we can capture the latest state.
|
|
@@ -5274,6 +5297,7 @@ var PHPSandbox = (() => {
|
|
|
5274
5297
|
this.shell = new Shell(this);
|
|
5275
5298
|
this.git = new Git(this);
|
|
5276
5299
|
this.services = new Services(this);
|
|
5300
|
+
this.config = new Config(this);
|
|
5277
5301
|
this.secrets = new NotebookSecrets(client, this.data.id);
|
|
5278
5302
|
this.preview = new NotebookPreview(client, this.data.id);
|
|
5279
5303
|
this.mail = new NotebookMail(client, this.data.id);
|