@based/functions 2.2.0 → 2.2.2
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/functions.d.ts +6 -1
- package/dist/functions.js.map +1 -1
- package/package.json +1 -1
- package/src/functions.ts +6 -1
package/dist/functions.d.ts
CHANGED
|
@@ -20,7 +20,11 @@ export type BasedAppFunction = (based: BasedFunctionClient, assets: {
|
|
|
20
20
|
text: Promise<string>;
|
|
21
21
|
url: string;
|
|
22
22
|
};
|
|
23
|
-
favicon:
|
|
23
|
+
favicon: {
|
|
24
|
+
url: string;
|
|
25
|
+
content: string;
|
|
26
|
+
path: string;
|
|
27
|
+
};
|
|
24
28
|
}, ctx: Context) => Promise<string>;
|
|
25
29
|
export type StreamPayload<P = any> = {
|
|
26
30
|
payload?: P;
|
|
@@ -152,6 +156,7 @@ type BasedAppFunctionConfig = {
|
|
|
152
156
|
type: 'app';
|
|
153
157
|
main: string;
|
|
154
158
|
path?: string;
|
|
159
|
+
favicon?: string;
|
|
155
160
|
};
|
|
156
161
|
export type BasedFunctionConfig<T extends BasedFunctionTypes = BasedFunctionTypes> = T extends 'channel' ? BasedChannelFunctionConfig & FunctionConfigShared : T extends 'function' ? BasedCallFunctionConfig & FunctionConfigShared : T extends 'query' ? BasedQueryFunctionConfig & FunctionConfigShared : T extends 'stream' ? BasedStreamFunctionConfig & FunctionConfigShared : T extends 'app' ? BasedAppFunctionConfig & FunctionConfigShared : (BasedChannelFunctionConfig & FunctionConfigShared) | (BasedCallFunctionConfig & FunctionConfigShared) | (BasedQueryFunctionConfig & FunctionConfigShared) | (BasedStreamFunctionConfig & FunctionConfigShared) | (BasedAppFunctionConfig & FunctionConfigShared);
|
|
157
162
|
export type BasedFunctionConfigComplete<T extends BasedFunctionTypes = BasedFunctionTypes> = T extends 'channel' ? BasedChannelFunctionConfig & FunctionConfigSharedComplete : T extends 'function' ? BasedCallFunctionConfig & FunctionConfigSharedComplete : T extends 'query' ? BasedQueryFunctionConfig & FunctionConfigSharedComplete : T extends 'stream' ? BasedStreamFunctionConfig & FunctionConfigSharedComplete : T extends 'app' ? BasedAppFunctionConfig & FunctionConfigSharedComplete : (BasedChannelFunctionConfig & FunctionConfigSharedComplete) | (BasedCallFunctionConfig & FunctionConfigSharedComplete) | (BasedQueryFunctionConfig & FunctionConfigSharedComplete) | (BasedStreamFunctionConfig & FunctionConfigSharedComplete) | (BasedAppFunctionConfig & FunctionConfigSharedComplete);
|
package/dist/functions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../src/functions.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../src/functions.ts"],"names":[],"mappings":";;;AAiTA,SAAgB,YAAY,CAC1B,IAAO,EACP,KAAU;IAEV,OAAO,CACL,KAAK;QACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,CAAC,IAAI,KAAK,IAAI;QACnB,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAC/B,CAAA;AACH,CAAC;AAVD,oCAUC;AAED,SAAgB,eAAe,CAAC,KAAU;IACxC,OAAO,CACL,KAAK;QACL,OAAO,KAAK,KAAK,QAAQ;QACzB,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS;YACvB,KAAK,CAAC,IAAI,KAAK,OAAO;YACtB,KAAK,CAAC,IAAI,KAAK,UAAU;YACzB,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC;QAC1B,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAC/B,CAAA;AACH,CAAC;AAVD,0CAUC;AAED,SAAgB,qBAAqB,CACnC,IAAO,EACP,MAAW;IAEX,OAAO,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;AACnC,CAAC;AALD,sDAKC;AAED,SAAgB,wBAAwB,CACtC,MAAW;IAEX,OAAO,eAAe,CAAC,MAAM,CAAC,CAAA;AAChC,CAAC;AAJD,4DAIC"}
|
package/package.json
CHANGED
package/src/functions.ts
CHANGED
|
@@ -51,7 +51,11 @@ export type BasedAppFunction = (
|
|
|
51
51
|
text: Promise<string>
|
|
52
52
|
url: string
|
|
53
53
|
}
|
|
54
|
-
favicon:
|
|
54
|
+
favicon: {
|
|
55
|
+
url: string
|
|
56
|
+
content: string
|
|
57
|
+
path: string
|
|
58
|
+
}
|
|
55
59
|
},
|
|
56
60
|
ctx: Context
|
|
57
61
|
) => Promise<string>
|
|
@@ -240,6 +244,7 @@ type BasedAppFunctionConfig = {
|
|
|
240
244
|
type: 'app'
|
|
241
245
|
main: string
|
|
242
246
|
path?: string
|
|
247
|
+
favicon?: string
|
|
243
248
|
}
|
|
244
249
|
|
|
245
250
|
export type BasedFunctionConfig<
|