freestyle-sandboxes 0.1.7 → 0.1.8
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/index.cjs +7 -3
- package/index.d.cts +5 -1
- package/index.d.mts +5 -1
- package/index.mjs +7 -3
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -4641,10 +4641,14 @@ class VmWith {
|
|
|
4641
4641
|
composeTemplates(...templates) {
|
|
4642
4642
|
return composeVmTemplates(templates);
|
|
4643
4643
|
}
|
|
4644
|
-
|
|
4644
|
+
/**
|
|
4645
|
+
* @deprecated This method is no longer needed. Use vms.get with allowedSpecs instead.
|
|
4646
|
+
*/
|
|
4645
4647
|
async configureReturnedVm(vm, template) {
|
|
4646
4648
|
if (template.raw) {
|
|
4647
|
-
|
|
4649
|
+
if (this.configure) {
|
|
4650
|
+
await this.configure(template.raw);
|
|
4651
|
+
}
|
|
4648
4652
|
const instance = this.createInstance();
|
|
4649
4653
|
instance._init(vm);
|
|
4650
4654
|
this.instance = instance;
|
|
@@ -5310,7 +5314,7 @@ class VmsNamespace {
|
|
|
5310
5314
|
const keys = Object.keys(builders);
|
|
5311
5315
|
for (const key of keys) {
|
|
5312
5316
|
const builder = builders[key];
|
|
5313
|
-
if (builder) {
|
|
5317
|
+
if (builder?.configure) {
|
|
5314
5318
|
config = await builder.configure(config);
|
|
5315
5319
|
}
|
|
5316
5320
|
}
|
package/index.d.cts
CHANGED
|
@@ -10899,13 +10899,14 @@ declare class VmWithInstance {
|
|
|
10899
10899
|
declare abstract class VmWith<TInstance extends VmWithInstance = VmWithInstance> {
|
|
10900
10900
|
instance: TInstance;
|
|
10901
10901
|
/**
|
|
10902
|
+
* @deprecated Use configureSpec instead.
|
|
10902
10903
|
* Transform the VM configuration by applying this component's config.
|
|
10903
10904
|
* Acts as middleware - receives existing config, returns transformed config.
|
|
10904
10905
|
*
|
|
10905
10906
|
* @param existingConfig - The current VM configuration
|
|
10906
10907
|
* @returns The transformed VM configuration with this component's changes applied
|
|
10907
10908
|
*/
|
|
10908
|
-
|
|
10909
|
+
configure?(existingConfig: CreateVmOptions): CreateVmOptions | Promise<CreateVmOptions>;
|
|
10909
10910
|
/**
|
|
10910
10911
|
* Configure the spec that this VmWith is directly attached to.
|
|
10911
10912
|
* Override this to modify the parent spec's configuration.
|
|
@@ -10967,6 +10968,9 @@ declare abstract class VmWith<TInstance extends VmWithInstance = VmWithInstance>
|
|
|
10967
10968
|
* Useful in configureTemplate and configureNestedTemplate methods.
|
|
10968
10969
|
*/
|
|
10969
10970
|
protected composeTemplates(...templates: VmTemplate[]): VmTemplate;
|
|
10971
|
+
/**
|
|
10972
|
+
* @deprecated This method is no longer needed. Use vms.get with allowedSpecs instead.
|
|
10973
|
+
*/
|
|
10970
10974
|
configureReturnedVm(vm: Vm, template: VmTemplate): Promise<void>;
|
|
10971
10975
|
}
|
|
10972
10976
|
declare const VmService: typeof VmWith;
|
package/index.d.mts
CHANGED
|
@@ -10899,13 +10899,14 @@ declare class VmWithInstance {
|
|
|
10899
10899
|
declare abstract class VmWith<TInstance extends VmWithInstance = VmWithInstance> {
|
|
10900
10900
|
instance: TInstance;
|
|
10901
10901
|
/**
|
|
10902
|
+
* @deprecated Use configureSpec instead.
|
|
10902
10903
|
* Transform the VM configuration by applying this component's config.
|
|
10903
10904
|
* Acts as middleware - receives existing config, returns transformed config.
|
|
10904
10905
|
*
|
|
10905
10906
|
* @param existingConfig - The current VM configuration
|
|
10906
10907
|
* @returns The transformed VM configuration with this component's changes applied
|
|
10907
10908
|
*/
|
|
10908
|
-
|
|
10909
|
+
configure?(existingConfig: CreateVmOptions): CreateVmOptions | Promise<CreateVmOptions>;
|
|
10909
10910
|
/**
|
|
10910
10911
|
* Configure the spec that this VmWith is directly attached to.
|
|
10911
10912
|
* Override this to modify the parent spec's configuration.
|
|
@@ -10967,6 +10968,9 @@ declare abstract class VmWith<TInstance extends VmWithInstance = VmWithInstance>
|
|
|
10967
10968
|
* Useful in configureTemplate and configureNestedTemplate methods.
|
|
10968
10969
|
*/
|
|
10969
10970
|
protected composeTemplates(...templates: VmTemplate[]): VmTemplate;
|
|
10971
|
+
/**
|
|
10972
|
+
* @deprecated This method is no longer needed. Use vms.get with allowedSpecs instead.
|
|
10973
|
+
*/
|
|
10970
10974
|
configureReturnedVm(vm: Vm, template: VmTemplate): Promise<void>;
|
|
10971
10975
|
}
|
|
10972
10976
|
declare const VmService: typeof VmWith;
|
package/index.mjs
CHANGED
|
@@ -4639,10 +4639,14 @@ class VmWith {
|
|
|
4639
4639
|
composeTemplates(...templates) {
|
|
4640
4640
|
return composeVmTemplates(templates);
|
|
4641
4641
|
}
|
|
4642
|
-
|
|
4642
|
+
/**
|
|
4643
|
+
* @deprecated This method is no longer needed. Use vms.get with allowedSpecs instead.
|
|
4644
|
+
*/
|
|
4643
4645
|
async configureReturnedVm(vm, template) {
|
|
4644
4646
|
if (template.raw) {
|
|
4645
|
-
|
|
4647
|
+
if (this.configure) {
|
|
4648
|
+
await this.configure(template.raw);
|
|
4649
|
+
}
|
|
4646
4650
|
const instance = this.createInstance();
|
|
4647
4651
|
instance._init(vm);
|
|
4648
4652
|
this.instance = instance;
|
|
@@ -5308,7 +5312,7 @@ class VmsNamespace {
|
|
|
5308
5312
|
const keys = Object.keys(builders);
|
|
5309
5313
|
for (const key of keys) {
|
|
5310
5314
|
const builder = builders[key];
|
|
5311
|
-
if (builder) {
|
|
5315
|
+
if (builder?.configure) {
|
|
5312
5316
|
config = await builder.configure(config);
|
|
5313
5317
|
}
|
|
5314
5318
|
}
|