@lace-cloud/canvas 0.12.0 → 0.13.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/dist/index.cjs +108 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.mjs +108 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -95,6 +95,15 @@ interface Use {
|
|
|
95
95
|
count: Binding | undefined;
|
|
96
96
|
/** for_each meta-argument */
|
|
97
97
|
for_each: Binding | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* A module call's `providers = {}` map (child-local name → root ref).
|
|
100
|
+
* Each entry targets the child's default provider slot for that name;
|
|
101
|
+
* aliased child slots are not expressible in this message
|
|
102
|
+
* (ProviderRequirement carries no configuration_aliases).
|
|
103
|
+
*/
|
|
104
|
+
providers: {
|
|
105
|
+
[key: string]: string;
|
|
106
|
+
};
|
|
98
107
|
}
|
|
99
108
|
declare const Use: MessageFns<Use>;
|
|
100
109
|
interface Resource {
|
package/dist/index.d.ts
CHANGED
|
@@ -95,6 +95,15 @@ interface Use {
|
|
|
95
95
|
count: Binding | undefined;
|
|
96
96
|
/** for_each meta-argument */
|
|
97
97
|
for_each: Binding | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* A module call's `providers = {}` map (child-local name → root ref).
|
|
100
|
+
* Each entry targets the child's default provider slot for that name;
|
|
101
|
+
* aliased child slots are not expressible in this message
|
|
102
|
+
* (ProviderRequirement carries no configuration_aliases).
|
|
103
|
+
*/
|
|
104
|
+
providers: {
|
|
105
|
+
[key: string]: string;
|
|
106
|
+
};
|
|
98
107
|
}
|
|
99
108
|
declare const Use: MessageFns<Use>;
|
|
100
109
|
interface Resource {
|
package/dist/index.mjs
CHANGED
|
@@ -6506,7 +6506,7 @@ var Local = {
|
|
|
6506
6506
|
}
|
|
6507
6507
|
};
|
|
6508
6508
|
function createBaseUse() {
|
|
6509
|
-
return { id: "", module: "", inputs: {}, depends_on: [], count: void 0, for_each: void 0 };
|
|
6509
|
+
return { id: "", module: "", inputs: {}, depends_on: [], count: void 0, for_each: void 0, providers: {} };
|
|
6510
6510
|
}
|
|
6511
6511
|
var Use = {
|
|
6512
6512
|
encode(message, writer = new BinaryWriter3()) {
|
|
@@ -6528,6 +6528,9 @@ var Use = {
|
|
|
6528
6528
|
if (message.for_each !== void 0) {
|
|
6529
6529
|
Binding.encode(message.for_each, writer.uint32(50).fork()).join();
|
|
6530
6530
|
}
|
|
6531
|
+
globalThis.Object.entries(message.providers).forEach(([key, value]) => {
|
|
6532
|
+
Use_ProvidersEntry.encode({ key, value }, writer.uint32(58).fork()).join();
|
|
6533
|
+
});
|
|
6531
6534
|
return writer;
|
|
6532
6535
|
},
|
|
6533
6536
|
decode(input, length) {
|
|
@@ -6582,6 +6585,16 @@ var Use = {
|
|
|
6582
6585
|
message.for_each = Binding.decode(reader, reader.uint32());
|
|
6583
6586
|
continue;
|
|
6584
6587
|
}
|
|
6588
|
+
case 7: {
|
|
6589
|
+
if (tag !== 58) {
|
|
6590
|
+
break;
|
|
6591
|
+
}
|
|
6592
|
+
const entry7 = Use_ProvidersEntry.decode(reader, reader.uint32());
|
|
6593
|
+
if (entry7.value !== void 0) {
|
|
6594
|
+
message.providers[entry7.key] = entry7.value;
|
|
6595
|
+
}
|
|
6596
|
+
continue;
|
|
6597
|
+
}
|
|
6585
6598
|
}
|
|
6586
6599
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6587
6600
|
break;
|
|
@@ -6603,7 +6616,14 @@ var Use = {
|
|
|
6603
6616
|
) : {},
|
|
6604
6617
|
depends_on: globalThis.Array.isArray(object?.dependsOn) ? object.dependsOn.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.depends_on) ? object.depends_on.map((e) => globalThis.String(e)) : [],
|
|
6605
6618
|
count: isSet2(object.count) ? Binding.fromJSON(object.count) : void 0,
|
|
6606
|
-
for_each: isSet2(object.forEach) ? Binding.fromJSON(object.forEach) : isSet2(object.for_each) ? Binding.fromJSON(object.for_each) : void 0
|
|
6619
|
+
for_each: isSet2(object.forEach) ? Binding.fromJSON(object.forEach) : isSet2(object.for_each) ? Binding.fromJSON(object.for_each) : void 0,
|
|
6620
|
+
providers: isObject2(object.providers) ? globalThis.Object.entries(object.providers).reduce(
|
|
6621
|
+
(acc, [key, value]) => {
|
|
6622
|
+
acc[key] = globalThis.String(value);
|
|
6623
|
+
return acc;
|
|
6624
|
+
},
|
|
6625
|
+
{}
|
|
6626
|
+
) : {}
|
|
6607
6627
|
};
|
|
6608
6628
|
},
|
|
6609
6629
|
toJSON(message) {
|
|
@@ -6632,6 +6652,15 @@ var Use = {
|
|
|
6632
6652
|
if (message.for_each !== void 0) {
|
|
6633
6653
|
obj.forEach = Binding.toJSON(message.for_each);
|
|
6634
6654
|
}
|
|
6655
|
+
if (message.providers) {
|
|
6656
|
+
const entries = globalThis.Object.entries(message.providers);
|
|
6657
|
+
if (entries.length > 0) {
|
|
6658
|
+
obj.providers = {};
|
|
6659
|
+
entries.forEach(([k, v]) => {
|
|
6660
|
+
obj.providers[k] = v;
|
|
6661
|
+
});
|
|
6662
|
+
}
|
|
6663
|
+
}
|
|
6635
6664
|
return obj;
|
|
6636
6665
|
},
|
|
6637
6666
|
create(base) {
|
|
@@ -6653,6 +6682,15 @@ var Use = {
|
|
|
6653
6682
|
message.depends_on = object.depends_on?.map((e) => e) || [];
|
|
6654
6683
|
message.count = object.count !== void 0 && object.count !== null ? Binding.fromPartial(object.count) : void 0;
|
|
6655
6684
|
message.for_each = object.for_each !== void 0 && object.for_each !== null ? Binding.fromPartial(object.for_each) : void 0;
|
|
6685
|
+
message.providers = globalThis.Object.entries(object.providers ?? {}).reduce(
|
|
6686
|
+
(acc, [key, value]) => {
|
|
6687
|
+
if (value !== void 0) {
|
|
6688
|
+
acc[key] = globalThis.String(value);
|
|
6689
|
+
}
|
|
6690
|
+
return acc;
|
|
6691
|
+
},
|
|
6692
|
+
{}
|
|
6693
|
+
);
|
|
6656
6694
|
return message;
|
|
6657
6695
|
}
|
|
6658
6696
|
};
|
|
@@ -6724,6 +6762,74 @@ var Use_InputsEntry = {
|
|
|
6724
6762
|
return message;
|
|
6725
6763
|
}
|
|
6726
6764
|
};
|
|
6765
|
+
function createBaseUse_ProvidersEntry() {
|
|
6766
|
+
return { key: "", value: "" };
|
|
6767
|
+
}
|
|
6768
|
+
var Use_ProvidersEntry = {
|
|
6769
|
+
encode(message, writer = new BinaryWriter3()) {
|
|
6770
|
+
if (message.key !== "") {
|
|
6771
|
+
writer.uint32(10).string(message.key);
|
|
6772
|
+
}
|
|
6773
|
+
if (message.value !== "") {
|
|
6774
|
+
writer.uint32(18).string(message.value);
|
|
6775
|
+
}
|
|
6776
|
+
return writer;
|
|
6777
|
+
},
|
|
6778
|
+
decode(input, length) {
|
|
6779
|
+
const reader = input instanceof BinaryReader3 ? input : new BinaryReader3(input);
|
|
6780
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
6781
|
+
const message = createBaseUse_ProvidersEntry();
|
|
6782
|
+
while (reader.pos < end) {
|
|
6783
|
+
const tag = reader.uint32();
|
|
6784
|
+
switch (tag >>> 3) {
|
|
6785
|
+
case 1: {
|
|
6786
|
+
if (tag !== 10) {
|
|
6787
|
+
break;
|
|
6788
|
+
}
|
|
6789
|
+
message.key = reader.string();
|
|
6790
|
+
continue;
|
|
6791
|
+
}
|
|
6792
|
+
case 2: {
|
|
6793
|
+
if (tag !== 18) {
|
|
6794
|
+
break;
|
|
6795
|
+
}
|
|
6796
|
+
message.value = reader.string();
|
|
6797
|
+
continue;
|
|
6798
|
+
}
|
|
6799
|
+
}
|
|
6800
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6801
|
+
break;
|
|
6802
|
+
}
|
|
6803
|
+
reader.skip(tag & 7);
|
|
6804
|
+
}
|
|
6805
|
+
return message;
|
|
6806
|
+
},
|
|
6807
|
+
fromJSON(object) {
|
|
6808
|
+
return {
|
|
6809
|
+
key: isSet2(object.key) ? globalThis.String(object.key) : "",
|
|
6810
|
+
value: isSet2(object.value) ? globalThis.String(object.value) : ""
|
|
6811
|
+
};
|
|
6812
|
+
},
|
|
6813
|
+
toJSON(message) {
|
|
6814
|
+
const obj = {};
|
|
6815
|
+
if (message.key !== "") {
|
|
6816
|
+
obj.key = message.key;
|
|
6817
|
+
}
|
|
6818
|
+
if (message.value !== "") {
|
|
6819
|
+
obj.value = message.value;
|
|
6820
|
+
}
|
|
6821
|
+
return obj;
|
|
6822
|
+
},
|
|
6823
|
+
create(base) {
|
|
6824
|
+
return Use_ProvidersEntry.fromPartial(base ?? {});
|
|
6825
|
+
},
|
|
6826
|
+
fromPartial(object) {
|
|
6827
|
+
const message = createBaseUse_ProvidersEntry();
|
|
6828
|
+
message.key = object.key ?? "";
|
|
6829
|
+
message.value = object.value ?? "";
|
|
6830
|
+
return message;
|
|
6831
|
+
}
|
|
6832
|
+
};
|
|
6727
6833
|
function createBaseResource() {
|
|
6728
6834
|
return {
|
|
6729
6835
|
id: "",
|