freestyle-sandboxes 0.1.24 → 0.1.26

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.
Files changed (3) hide show
  1. package/index.cjs +15 -0
  2. package/index.mjs +15 -0
  3. package/package.json +1 -1
package/index.cjs CHANGED
@@ -6402,6 +6402,18 @@ function collectSpecBuilders(spec) {
6402
6402
  }
6403
6403
  return builders;
6404
6404
  }
6405
+ function mergeWithBuildersIntoSpec(spec, withBuilders) {
6406
+ if (!withBuilders) {
6407
+ return spec;
6408
+ }
6409
+ return new VmSpec({
6410
+ ...spec.raw,
6411
+ with: {
6412
+ ...spec.with,
6413
+ ...withBuilders
6414
+ }
6415
+ });
6416
+ }
6405
6417
  class VmsNamespace {
6406
6418
  constructor(freestyle) {
6407
6419
  this.freestyle = freestyle;
@@ -6465,6 +6477,9 @@ class VmsNamespace {
6465
6477
  const { snapshot: _snapshot, ...rest } = options;
6466
6478
  options = rest;
6467
6479
  }
6480
+ if (options.spec instanceof VmSpec && options.with) {
6481
+ options.spec = mergeWithBuildersIntoSpec(options.spec, options.with);
6482
+ }
6468
6483
  if (options.spec instanceof VmSpec) {
6469
6484
  let spec = options.spec;
6470
6485
  spec = await processOuterSpecBuilders(spec);
package/index.mjs CHANGED
@@ -6400,6 +6400,18 @@ function collectSpecBuilders(spec) {
6400
6400
  }
6401
6401
  return builders;
6402
6402
  }
6403
+ function mergeWithBuildersIntoSpec(spec, withBuilders) {
6404
+ if (!withBuilders) {
6405
+ return spec;
6406
+ }
6407
+ return new VmSpec({
6408
+ ...spec.raw,
6409
+ with: {
6410
+ ...spec.with,
6411
+ ...withBuilders
6412
+ }
6413
+ });
6414
+ }
6403
6415
  class VmsNamespace {
6404
6416
  constructor(freestyle) {
6405
6417
  this.freestyle = freestyle;
@@ -6463,6 +6475,9 @@ class VmsNamespace {
6463
6475
  const { snapshot: _snapshot, ...rest } = options;
6464
6476
  options = rest;
6465
6477
  }
6478
+ if (options.spec instanceof VmSpec && options.with) {
6479
+ options.spec = mergeWithBuildersIntoSpec(options.spec, options.with);
6480
+ }
6466
6481
  if (options.spec instanceof VmSpec) {
6467
6482
  let spec = options.spec;
6468
6483
  spec = await processOuterSpecBuilders(spec);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freestyle-sandboxes",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "require": {