@withgateway/sdk 0.2.2 → 0.2.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/cli.js +129 -22
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +130 -23
- package/dist/cli.mjs.map +1 -1
- package/dist/files/index.js +9 -5
- package/dist/files/index.js.map +1 -1
- package/dist/files/index.mjs +9 -5
- package/dist/files/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -8
- package/dist/index.mjs.map +1 -1
- package/dist/traces/index.js +9 -5
- package/dist/traces/index.js.map +1 -1
- package/dist/traces/index.mjs +9 -5
- package/dist/traces/index.mjs.map +1 -1
- package/dist/tracing/index.js +1 -1
- package/dist/tracing/index.js.map +1 -1
- package/dist/tracing/index.mjs +1 -1
- package/dist/tracing/index.mjs.map +1 -1
- package/dist/worlds/index.d.mts +7 -1
- package/dist/worlds/index.d.ts +7 -1
- package/dist/worlds/index.js +12 -7
- package/dist/worlds/index.js.map +1 -1
- package/dist/worlds/index.mjs +12 -7
- package/dist/worlds/index.mjs.map +1 -1
- package/package.json +1 -1
- package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/SKILL.md +5 -5
- package/skills/worlds-getting-started/SKILL.md +5 -5
package/dist/worlds/index.mjs
CHANGED
|
@@ -1341,7 +1341,7 @@ async function push(dir, opts = {}) {
|
|
|
1341
1341
|
const pyproject = readPyproject(dir);
|
|
1342
1342
|
const contractVersion = pyproject.version ? void 0 : readWorldContractVersion(dir).version;
|
|
1343
1343
|
if (contractVersion) pyproject.version = contractVersion;
|
|
1344
|
-
const slug = opts.slug ?? pyproject.name ?? path.basename(path.resolve(dir));
|
|
1344
|
+
const slug = opts.slug ?? localMeta.slug ?? pyproject.name ?? path.basename(path.resolve(dir));
|
|
1345
1345
|
const resolve6 = await apiRequest(
|
|
1346
1346
|
options,
|
|
1347
1347
|
"POST",
|
|
@@ -3470,6 +3470,7 @@ var init_ingest = __esm({
|
|
|
3470
3470
|
// src/worlds/index.ts
|
|
3471
3471
|
var worlds_exports = {};
|
|
3472
3472
|
__export(worlds_exports, {
|
|
3473
|
+
ApiError: () => ApiError2,
|
|
3473
3474
|
BrowserActionRecorder: () => BrowserActionRecorder,
|
|
3474
3475
|
COMPUTER_USE_SPECS: () => COMPUTER_USE_SPECS,
|
|
3475
3476
|
DEFAULT_BRANCH: () => DEFAULT_BRANCH,
|
|
@@ -3578,11 +3579,7 @@ async function apiRequest(options, method, path8, body) {
|
|
|
3578
3579
|
...body === void 0 ? {} : { body: JSON.stringify(body) }
|
|
3579
3580
|
});
|
|
3580
3581
|
const text2 = await res.text();
|
|
3581
|
-
if (!res.ok)
|
|
3582
|
-
throw new Error(
|
|
3583
|
-
`${method} ${path8} -> ${res.status}: ${text2.slice(0, 400)}`
|
|
3584
|
-
);
|
|
3585
|
-
}
|
|
3582
|
+
if (!res.ok) throw new ApiError2(res.status, method, path8, text2.slice(0, 400));
|
|
3586
3583
|
return JSON.parse(text2);
|
|
3587
3584
|
}
|
|
3588
3585
|
async function setEnvSecret(slug, key, value, options = {}) {
|
|
@@ -3734,7 +3731,7 @@ async function openWorld(slugRef, options = {}) {
|
|
|
3734
3731
|
}
|
|
3735
3732
|
return world;
|
|
3736
3733
|
}
|
|
3737
|
-
var WorldTask, WorldSet;
|
|
3734
|
+
var ApiError2, WorldTask, WorldSet;
|
|
3738
3735
|
var init_worlds = __esm({
|
|
3739
3736
|
"src/worlds/index.ts"() {
|
|
3740
3737
|
init_session();
|
|
@@ -3748,6 +3745,13 @@ var init_worlds = __esm({
|
|
|
3748
3745
|
init_query();
|
|
3749
3746
|
init_migrate();
|
|
3750
3747
|
init_ingest();
|
|
3748
|
+
ApiError2 = class extends Error {
|
|
3749
|
+
constructor(status, method, path8, body) {
|
|
3750
|
+
super(`${method} ${path8} -> ${status}: ${body}`);
|
|
3751
|
+
this.status = status;
|
|
3752
|
+
this.name = "ApiError";
|
|
3753
|
+
}
|
|
3754
|
+
};
|
|
3751
3755
|
WorldTask = class {
|
|
3752
3756
|
constructor(world, name, variant) {
|
|
3753
3757
|
this.world = world;
|
|
@@ -3814,6 +3818,7 @@ var init_worlds = __esm({
|
|
|
3814
3818
|
});
|
|
3815
3819
|
init_worlds();
|
|
3816
3820
|
export {
|
|
3821
|
+
ApiError2 as ApiError,
|
|
3817
3822
|
BrowserActionRecorder,
|
|
3818
3823
|
COMPUTER_USE_SPECS,
|
|
3819
3824
|
DEFAULT_BRANCH,
|