deepline 0.1.313 → 0.1.315

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
@@ -760,7 +760,7 @@ var SDK_RELEASE = {
760
760
  // 0.1.253 makes play-page browser opening opt-in and retires --no-open.
761
761
  // 0.1.254 removes the internal operations tree from the published SDK CLI.
762
762
  // Operators use the checkout-local deepline-admin binary instead.
763
- version: "0.1.313",
763
+ version: "0.1.315",
764
764
  contracts: {
765
765
  api: {
766
766
  name: "sdk-http-api",
package/dist/index.mjs CHANGED
@@ -686,7 +686,7 @@ var SDK_RELEASE = {
686
686
  // 0.1.253 makes play-page browser opening opt-in and retires --no-open.
687
687
  // 0.1.254 removes the internal operations tree from the published SDK CLI.
688
688
  // Operators use the checkout-local deepline-admin binary instead.
689
- version: "0.1.313",
689
+ version: "0.1.315",
690
690
  contracts: {
691
691
  api: {
692
692
  name: "sdk-http-api",
@@ -40,11 +40,10 @@ type PlayBundleArtifact = {
40
40
  cacheHit: boolean;
41
41
  };
42
42
 
43
+ type PlaySandboxSize = 'standard';
43
44
  type PlaySandboxRuntimeDeclaration = {
44
45
  timeout?: string;
45
- memory?: string;
46
- cpu?: number;
47
- disk?: string;
46
+ size?: PlaySandboxSize;
48
47
  };
49
48
 
50
49
  type ImportedPlayDependency = {
@@ -40,11 +40,10 @@ type PlayBundleArtifact = {
40
40
  cacheHit: boolean;
41
41
  };
42
42
 
43
+ type PlaySandboxSize = 'standard';
43
44
  type PlaySandboxRuntimeDeclaration = {
44
45
  timeout?: string;
45
- memory?: string;
46
- cpu?: number;
47
- disk?: string;
46
+ size?: PlaySandboxSize;
48
47
  };
49
48
 
50
49
  type ImportedPlayDependency = {
@@ -556,6 +556,30 @@ function resolveStaticProperty(node, propertyName, context, ancestors = /* @__PU
556
556
  }
557
557
  return resolution;
558
558
  }
559
+ function staticPropertyNames(node, context, ancestors = /* @__PURE__ */ new Set()) {
560
+ if (!node) return /* @__PURE__ */ new Set();
561
+ const object = objectExpressionFromNode(node, context);
562
+ if (!object || ancestors.has(object)) return null;
563
+ const nextAncestors = new Set(ancestors).add(object);
564
+ const names = /* @__PURE__ */ new Set();
565
+ for (const property of astArray(object.properties)) {
566
+ if (property.type === "SpreadElement") {
567
+ const spreadNames = staticPropertyNames(
568
+ isAstNode(property.argument) ? property.argument : null,
569
+ context,
570
+ nextAncestors
571
+ );
572
+ if (!spreadNames) return null;
573
+ for (const name2 of spreadNames) names.add(name2);
574
+ continue;
575
+ }
576
+ if (property.type !== "Property") return null;
577
+ const name = propertyNameFromKey(property);
578
+ if (name === null) return null;
579
+ names.add(name);
580
+ }
581
+ return names;
582
+ }
559
583
  function staticNumberFromExpression(node, context, seen = /* @__PURE__ */ new Set()) {
560
584
  const expression = unwrapStaticExpression(node);
561
585
  if (!expression) return null;
@@ -600,30 +624,27 @@ function sandboxRuntimeDeclarationFromOptions(node, context) {
600
624
  const bindingRuntime = bindings.kind === "found" ? resolveStaticProperty(bindings.value, "runtime", context) : { kind: "absent" };
601
625
  const runtime = directRuntime.kind === "found" ? directRuntime : bindingRuntime;
602
626
  if (runtime.kind !== "found") return null;
627
+ const propertyNames = staticPropertyNames(runtime.value, context);
628
+ const unsupportedProperties = propertyNames ? [...propertyNames].filter(
629
+ (propertyName) => propertyName !== "timeout" && propertyName !== "size"
630
+ ) : [];
631
+ if (unsupportedProperties.length > 0) {
632
+ throw new Error(
633
+ `Unsupported runtime sandbox option${unsupportedProperties.length === 1 ? "" : "s"} "${unsupportedProperties.join('", "')}". Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: "standard".`
634
+ );
635
+ }
603
636
  const timeout = resolveStaticProperty(runtime.value, "timeout", context);
604
- const memory = resolveStaticProperty(runtime.value, "memory", context);
605
- const cpu = resolveStaticProperty(runtime.value, "cpu", context);
606
- const disk = resolveStaticProperty(runtime.value, "disk", context);
637
+ const size = resolveStaticProperty(runtime.value, "size", context);
607
638
  const declaration = {};
608
639
  if (timeout.kind === "found") {
609
640
  const value = staticStringFromExpression(timeout.value, context);
610
641
  if (value === null) return null;
611
642
  declaration.timeout = value;
612
643
  }
613
- if (memory.kind === "found") {
614
- const value = staticStringFromExpression(memory.value, context);
615
- if (value === null) return null;
616
- declaration.memory = value;
617
- }
618
- if (cpu.kind === "found") {
619
- const value = staticNumberFromExpression(cpu.value, context);
620
- if (value === null) return null;
621
- declaration.cpu = value;
622
- }
623
- if (disk.kind === "found") {
624
- const value = staticStringFromExpression(disk.value, context);
644
+ if (size.kind === "found") {
645
+ const value = staticStringFromExpression(size.value, context);
625
646
  if (value === null) return null;
626
- declaration.disk = value;
647
+ declaration.size = value;
627
648
  }
628
649
  return declaration;
629
650
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.313",
3
+ "version": "0.1.315",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {