@lace-cloud/host 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 +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -144,6 +144,15 @@ interface Use {
|
|
|
144
144
|
count: Binding | undefined;
|
|
145
145
|
/** for_each meta-argument */
|
|
146
146
|
for_each: Binding | undefined;
|
|
147
|
+
/**
|
|
148
|
+
* A module call's `providers = {}` map (child-local name → root ref).
|
|
149
|
+
* Each entry targets the child's default provider slot for that name;
|
|
150
|
+
* aliased child slots are not expressible in this message
|
|
151
|
+
* (ProviderRequirement carries no configuration_aliases).
|
|
152
|
+
*/
|
|
153
|
+
providers: {
|
|
154
|
+
[key: string]: string;
|
|
155
|
+
};
|
|
147
156
|
}
|
|
148
157
|
declare const Use: MessageFns$1<Use>;
|
|
149
158
|
interface Resource {
|
package/dist/index.d.ts
CHANGED
|
@@ -144,6 +144,15 @@ interface Use {
|
|
|
144
144
|
count: Binding | undefined;
|
|
145
145
|
/** for_each meta-argument */
|
|
146
146
|
for_each: Binding | undefined;
|
|
147
|
+
/**
|
|
148
|
+
* A module call's `providers = {}` map (child-local name → root ref).
|
|
149
|
+
* Each entry targets the child's default provider slot for that name;
|
|
150
|
+
* aliased child slots are not expressible in this message
|
|
151
|
+
* (ProviderRequirement carries no configuration_aliases).
|
|
152
|
+
*/
|
|
153
|
+
providers: {
|
|
154
|
+
[key: string]: string;
|
|
155
|
+
};
|
|
147
156
|
}
|
|
148
157
|
declare const Use: MessageFns$1<Use>;
|
|
149
158
|
interface Resource {
|
package/dist/index.mjs
CHANGED
|
@@ -1857,7 +1857,7 @@ var Local = {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
};
|
|
1859
1859
|
function createBaseUse() {
|
|
1860
|
-
return { id: "", module: "", inputs: {}, depends_on: [], count: void 0, for_each: void 0 };
|
|
1860
|
+
return { id: "", module: "", inputs: {}, depends_on: [], count: void 0, for_each: void 0, providers: {} };
|
|
1861
1861
|
}
|
|
1862
1862
|
var Use = {
|
|
1863
1863
|
encode(message, writer = new BinaryWriter3()) {
|
|
@@ -1879,6 +1879,9 @@ var Use = {
|
|
|
1879
1879
|
if (message.for_each !== void 0) {
|
|
1880
1880
|
Binding.encode(message.for_each, writer.uint32(50).fork()).join();
|
|
1881
1881
|
}
|
|
1882
|
+
globalThis.Object.entries(message.providers).forEach(([key, value]) => {
|
|
1883
|
+
Use_ProvidersEntry.encode({ key, value }, writer.uint32(58).fork()).join();
|
|
1884
|
+
});
|
|
1882
1885
|
return writer;
|
|
1883
1886
|
},
|
|
1884
1887
|
decode(input, length) {
|
|
@@ -1933,6 +1936,16 @@ var Use = {
|
|
|
1933
1936
|
message.for_each = Binding.decode(reader, reader.uint32());
|
|
1934
1937
|
continue;
|
|
1935
1938
|
}
|
|
1939
|
+
case 7: {
|
|
1940
|
+
if (tag !== 58) {
|
|
1941
|
+
break;
|
|
1942
|
+
}
|
|
1943
|
+
const entry7 = Use_ProvidersEntry.decode(reader, reader.uint32());
|
|
1944
|
+
if (entry7.value !== void 0) {
|
|
1945
|
+
message.providers[entry7.key] = entry7.value;
|
|
1946
|
+
}
|
|
1947
|
+
continue;
|
|
1948
|
+
}
|
|
1936
1949
|
}
|
|
1937
1950
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1938
1951
|
break;
|
|
@@ -1954,7 +1967,14 @@ var Use = {
|
|
|
1954
1967
|
) : {},
|
|
1955
1968
|
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)) : [],
|
|
1956
1969
|
count: isSet2(object.count) ? Binding.fromJSON(object.count) : void 0,
|
|
1957
|
-
for_each: isSet2(object.forEach) ? Binding.fromJSON(object.forEach) : isSet2(object.for_each) ? Binding.fromJSON(object.for_each) : void 0
|
|
1970
|
+
for_each: isSet2(object.forEach) ? Binding.fromJSON(object.forEach) : isSet2(object.for_each) ? Binding.fromJSON(object.for_each) : void 0,
|
|
1971
|
+
providers: isObject2(object.providers) ? globalThis.Object.entries(object.providers).reduce(
|
|
1972
|
+
(acc, [key, value]) => {
|
|
1973
|
+
acc[key] = globalThis.String(value);
|
|
1974
|
+
return acc;
|
|
1975
|
+
},
|
|
1976
|
+
{}
|
|
1977
|
+
) : {}
|
|
1958
1978
|
};
|
|
1959
1979
|
},
|
|
1960
1980
|
toJSON(message) {
|
|
@@ -1983,6 +2003,15 @@ var Use = {
|
|
|
1983
2003
|
if (message.for_each !== void 0) {
|
|
1984
2004
|
obj.forEach = Binding.toJSON(message.for_each);
|
|
1985
2005
|
}
|
|
2006
|
+
if (message.providers) {
|
|
2007
|
+
const entries = globalThis.Object.entries(message.providers);
|
|
2008
|
+
if (entries.length > 0) {
|
|
2009
|
+
obj.providers = {};
|
|
2010
|
+
entries.forEach(([k, v]) => {
|
|
2011
|
+
obj.providers[k] = v;
|
|
2012
|
+
});
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
1986
2015
|
return obj;
|
|
1987
2016
|
},
|
|
1988
2017
|
create(base) {
|
|
@@ -2004,6 +2033,15 @@ var Use = {
|
|
|
2004
2033
|
message.depends_on = object.depends_on?.map((e) => e) || [];
|
|
2005
2034
|
message.count = object.count !== void 0 && object.count !== null ? Binding.fromPartial(object.count) : void 0;
|
|
2006
2035
|
message.for_each = object.for_each !== void 0 && object.for_each !== null ? Binding.fromPartial(object.for_each) : void 0;
|
|
2036
|
+
message.providers = globalThis.Object.entries(object.providers ?? {}).reduce(
|
|
2037
|
+
(acc, [key, value]) => {
|
|
2038
|
+
if (value !== void 0) {
|
|
2039
|
+
acc[key] = globalThis.String(value);
|
|
2040
|
+
}
|
|
2041
|
+
return acc;
|
|
2042
|
+
},
|
|
2043
|
+
{}
|
|
2044
|
+
);
|
|
2007
2045
|
return message;
|
|
2008
2046
|
}
|
|
2009
2047
|
};
|
|
@@ -2075,6 +2113,74 @@ var Use_InputsEntry = {
|
|
|
2075
2113
|
return message;
|
|
2076
2114
|
}
|
|
2077
2115
|
};
|
|
2116
|
+
function createBaseUse_ProvidersEntry() {
|
|
2117
|
+
return { key: "", value: "" };
|
|
2118
|
+
}
|
|
2119
|
+
var Use_ProvidersEntry = {
|
|
2120
|
+
encode(message, writer = new BinaryWriter3()) {
|
|
2121
|
+
if (message.key !== "") {
|
|
2122
|
+
writer.uint32(10).string(message.key);
|
|
2123
|
+
}
|
|
2124
|
+
if (message.value !== "") {
|
|
2125
|
+
writer.uint32(18).string(message.value);
|
|
2126
|
+
}
|
|
2127
|
+
return writer;
|
|
2128
|
+
},
|
|
2129
|
+
decode(input, length) {
|
|
2130
|
+
const reader = input instanceof BinaryReader3 ? input : new BinaryReader3(input);
|
|
2131
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
2132
|
+
const message = createBaseUse_ProvidersEntry();
|
|
2133
|
+
while (reader.pos < end) {
|
|
2134
|
+
const tag = reader.uint32();
|
|
2135
|
+
switch (tag >>> 3) {
|
|
2136
|
+
case 1: {
|
|
2137
|
+
if (tag !== 10) {
|
|
2138
|
+
break;
|
|
2139
|
+
}
|
|
2140
|
+
message.key = reader.string();
|
|
2141
|
+
continue;
|
|
2142
|
+
}
|
|
2143
|
+
case 2: {
|
|
2144
|
+
if (tag !== 18) {
|
|
2145
|
+
break;
|
|
2146
|
+
}
|
|
2147
|
+
message.value = reader.string();
|
|
2148
|
+
continue;
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2152
|
+
break;
|
|
2153
|
+
}
|
|
2154
|
+
reader.skip(tag & 7);
|
|
2155
|
+
}
|
|
2156
|
+
return message;
|
|
2157
|
+
},
|
|
2158
|
+
fromJSON(object) {
|
|
2159
|
+
return {
|
|
2160
|
+
key: isSet2(object.key) ? globalThis.String(object.key) : "",
|
|
2161
|
+
value: isSet2(object.value) ? globalThis.String(object.value) : ""
|
|
2162
|
+
};
|
|
2163
|
+
},
|
|
2164
|
+
toJSON(message) {
|
|
2165
|
+
const obj = {};
|
|
2166
|
+
if (message.key !== "") {
|
|
2167
|
+
obj.key = message.key;
|
|
2168
|
+
}
|
|
2169
|
+
if (message.value !== "") {
|
|
2170
|
+
obj.value = message.value;
|
|
2171
|
+
}
|
|
2172
|
+
return obj;
|
|
2173
|
+
},
|
|
2174
|
+
create(base) {
|
|
2175
|
+
return Use_ProvidersEntry.fromPartial(base ?? {});
|
|
2176
|
+
},
|
|
2177
|
+
fromPartial(object) {
|
|
2178
|
+
const message = createBaseUse_ProvidersEntry();
|
|
2179
|
+
message.key = object.key ?? "";
|
|
2180
|
+
message.value = object.value ?? "";
|
|
2181
|
+
return message;
|
|
2182
|
+
}
|
|
2183
|
+
};
|
|
2078
2184
|
function createBaseResource() {
|
|
2079
2185
|
return {
|
|
2080
2186
|
id: "",
|