@computesdk/sandbox0 1.0.27 → 1.0.29

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/index.js CHANGED
@@ -22756,6 +22756,20 @@ async function createSandbox(config, options) {
22756
22756
  }
22757
22757
  var _provider = (0, import_provider.defineProvider)({
22758
22758
  name: "sandbox0",
22759
+ sizes: (_config, profile) => {
22760
+ if (profile.memoryMiB > 16 * 1024) {
22761
+ return {
22762
+ status: "unsupported",
22763
+ reason: "Sandbox0 documents a 16 GiB platform memory limit and lists no larger public shape."
22764
+ };
22765
+ }
22766
+ const memoryMiB = Math.max(profile.memoryMiB, profile.vcpus * 2048);
22767
+ return {
22768
+ status: "supported",
22769
+ nativeOptions: { memory: memoryMiB },
22770
+ ...memoryMiB === profile.memoryMiB ? {} : { resolved: { vcpus: profile.vcpus, memoryMiB } }
22771
+ };
22772
+ },
22759
22773
  methods: {
22760
22774
  instances: {
22761
22775
  create: createSandbox,
@@ -22999,7 +23013,7 @@ var _provider = (0, import_provider.defineProvider)({
22999
23013
  getInstance: (sandbox) => sandbox
23000
23014
  },
23001
23015
  volume: {
23002
- create: async (config, options) => {
23016
+ create: async (config, _options) => {
23003
23017
  const client = createClient(config);
23004
23018
  const volume = await client.volumes.create({ backend: "s0fs", accessMode: "RWO" });
23005
23019
  return { id: volume.id, native: volume };