@veris-ai/daytona 0.3.1 → 0.4.0
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 +9 -153
- package/dist/index.cjs +1 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +1 -36
- package/dist/index.js.map +1 -1
- package/package.json +1 -4
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -2138
- package/dist/cli.js.map +0 -1
- package/dist/exec.d.ts +0 -15
- package/dist/provision.d.ts +0 -100
- package/dist/push.d.ts +0 -11
- package/dist/run.d.ts +0 -87
- package/dist/teardown.d.ts +0 -52
package/dist/index.d.ts
CHANGED
|
@@ -14,8 +14,6 @@ export { DEFAULT_API_BASE, profilePath, resolveVerisCredentials, requireVerisCre
|
|
|
14
14
|
export type { VerisCredentials, ResolveOpts, ProfileFile } from './profile';
|
|
15
15
|
export { DAYTONA_API_URL, DELETE_SANDBOXES, daytonaApiUrl, fetchDaytonaKey, canDeleteSandboxes, cannotTeardownWarning, } from './daytona-key';
|
|
16
16
|
export type { DaytonaKeyInfo } from './daytona-key';
|
|
17
|
-
export { isPermissionDenied, sandboxBrakes, teardownRefusedMessage } from './teardown';
|
|
18
|
-
export type { RefusedTeardown } from './teardown';
|
|
19
17
|
export { fetchManual, assertHttpControlPlane } from './state';
|
|
20
18
|
export { VerisError, MissingCredentialsError, VerisGatewayUnreachableError, VerisGatewayNotOfferedError, ReceiptIntegrityError, VerisUntouchedError, TwinExpiredError, SnapshotUnsupportedError, UnsupportedOperationError, } from './errors';
|
|
21
19
|
export type { VerisErrorPhase } from './errors';
|
package/dist/index.js
CHANGED
|
@@ -949,7 +949,7 @@ function requireVerisCredentials(opts = {}) {
|
|
|
949
949
|
}
|
|
950
950
|
|
|
951
951
|
// src/version.ts
|
|
952
|
-
var SDK_VERSION = true ? "0.
|
|
952
|
+
var SDK_VERSION = true ? "0.4.0" : "0.0.0-dev";
|
|
953
953
|
|
|
954
954
|
// src/daytona.ts
|
|
955
955
|
var LABEL = {
|
|
@@ -1295,38 +1295,6 @@ var DELETE_PERMISSION_FIX = 'create a key with the "delete sandboxes" permission
|
|
|
1295
1295
|
function cannotTeardownWarning(key, autoStopMinutes, autoDeleteMinutes) {
|
|
1296
1296
|
return `DAYTONA_API_KEY ${describeKey(key)} lacks \`${DELETE_SANDBOXES}\`, so \`veris-daytona teardown\` will be refused for the sandbox about to be created, and \`run\` cannot delete its own. The box still stops after ${autoStopMinutes} idle minutes and is deleted ${autoDeleteMinutes} minutes after it stops. For a teardown that works, ${DELETE_PERMISSION_FIX} and use it instead.`;
|
|
1297
1297
|
}
|
|
1298
|
-
|
|
1299
|
-
// src/teardown.ts
|
|
1300
|
-
var TEARDOWN_USAGE = `usage: veris-daytona teardown <daytona-sandbox-id>
|
|
1301
|
-
|
|
1302
|
-
Deletes the Daytona sandbox. The id is the one \`veris-daytona provision\`
|
|
1303
|
-
printed as daytonaSandboxId \u2014 not the Veris twin's id.
|
|
1304
|
-
|
|
1305
|
-
The twin follows the rule it was created under: one this package created is
|
|
1306
|
-
deleted with the sandbox, one it attached to (\`provision\`, or \`run --sandbox\`)
|
|
1307
|
-
is yours and is left running. Which of the two happened is printed.
|
|
1308
|
-
|
|
1309
|
-
needs: DAYTONA_API_KEY with the ${DELETE_SANDBOXES} permission \u2014 a key made with
|
|
1310
|
-
"write sandboxes" alone is refused, and the refusal says when Daytona will stop
|
|
1311
|
-
and delete the box on its own. To reach a twin that must be deleted, a Veris
|
|
1312
|
-
key too: VERIS_API_KEY, or the profile \`veris login\` saved.
|
|
1313
|
-
|
|
1314
|
-
exit code: 0 when the sandbox is deleted; 1 when there is no such sandbox, or
|
|
1315
|
-
the key may not delete one.`;
|
|
1316
|
-
function isPermissionDenied(e) {
|
|
1317
|
-
return typeof e === "object" && e !== null && e.statusCode === 403;
|
|
1318
|
-
}
|
|
1319
|
-
function sandboxBrakes(r) {
|
|
1320
|
-
const stop = r.autoStopMinutes && r.autoStopMinutes > 0 ? `stops after ${r.autoStopMinutes} idle minutes` : "never stops on its own";
|
|
1321
|
-
const del = r.autoDeleteMinutes === void 0 || r.autoDeleteMinutes < 0 ? "is never auto-deleted" : r.autoDeleteMinutes === 0 ? "is deleted as soon as it stops" : `is deleted ${r.autoDeleteMinutes} minutes after it stops`;
|
|
1322
|
-
const destroy = r.expiresAt ? `, and is destroyed at ${r.expiresAt} whatever state it is in` : "";
|
|
1323
|
-
return `${stop} and ${del}${destroy}`;
|
|
1324
|
-
}
|
|
1325
|
-
function teardownRefusedMessage(r) {
|
|
1326
|
-
const key = r.key ? `this DAYTONA_API_KEY ${describeKey(r.key)} lacks the \`${DELETE_SANDBOXES}\` permission` : `Daytona answered 403 (Access denied), which is what a DAYTONA_API_KEY without the \`${DELETE_SANDBOXES}\` permission gets \u2014 the key's own record could not be read to confirm it`;
|
|
1327
|
-
const twin = r.twinId === void 0 ? "" : r.ownsTwin ? ` Its twin ${r.twinId} was deleted before Daytona refused, so nothing is left on the Veris side.` : ` Twin ${r.twinId} is yours and was not touched.`;
|
|
1328
|
-
return `Daytona refused to delete sandbox ${r.sandboxId}: ${key}. The sandbox is still there: it ${sandboxBrakes(r)}.${twin} To delete it sooner, ${DELETE_PERMISSION_FIX}, then run \`veris-daytona teardown ${r.sandboxId}\` with it \u2014 or delete the sandbox in the Daytona dashboard.`;
|
|
1329
|
-
}
|
|
1330
1298
|
export {
|
|
1331
1299
|
BUNDLED_CA_FILES,
|
|
1332
1300
|
BUNDLED_CA_PATCH_SCRIPT,
|
|
@@ -1364,7 +1332,6 @@ export {
|
|
|
1364
1332
|
fetchManual,
|
|
1365
1333
|
gatewayIps,
|
|
1366
1334
|
gatewayProxyUrl,
|
|
1367
|
-
isPermissionDenied,
|
|
1368
1335
|
isVerisSandbox,
|
|
1369
1336
|
missingKeyMessage,
|
|
1370
1337
|
nodeOptionsWithProxy,
|
|
@@ -1374,8 +1341,6 @@ export {
|
|
|
1374
1341
|
profilePath,
|
|
1375
1342
|
requireVerisCredentials,
|
|
1376
1343
|
resolveVerisCredentials,
|
|
1377
|
-
sandboxBrakes,
|
|
1378
|
-
teardownRefusedMessage,
|
|
1379
1344
|
trustPrelude,
|
|
1380
1345
|
twinHosts,
|
|
1381
1346
|
vendorHosts,
|