@faasjs/func 0.0.3-beta.13 → 0.0.3-beta.14
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.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -125,8 +125,8 @@ declare class Func<TEvent = any, TContext = any, TResult = any> {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
type UseifyPlugin<T> = T & {
|
|
128
|
-
mount?: (data
|
|
129
|
-
config
|
|
128
|
+
mount?: (data?: {
|
|
129
|
+
config?: Config;
|
|
130
130
|
}) => Promise<T>;
|
|
131
131
|
};
|
|
132
132
|
declare function usePlugin<T extends Plugin>(plugin: UseifyPlugin<T>): UseifyPlugin<T>;
|
package/dist/index.js
CHANGED
|
@@ -196,10 +196,10 @@ function usePlugin(plugin) {
|
|
|
196
196
|
if (!plugins.find((p) => p.name === plugin.name))
|
|
197
197
|
plugins.push(plugin);
|
|
198
198
|
if (!plugin.mount)
|
|
199
|
-
plugin.mount = async function(
|
|
199
|
+
plugin.mount = async function(data) {
|
|
200
200
|
if (plugin.onMount)
|
|
201
201
|
await plugin.onMount({
|
|
202
|
-
config: config || /* @__PURE__ */ Object.create(null),
|
|
202
|
+
config: (data == null ? void 0 : data.config) || /* @__PURE__ */ Object.create(null),
|
|
203
203
|
event: /* @__PURE__ */ Object.create(null),
|
|
204
204
|
context: /* @__PURE__ */ Object.create(null),
|
|
205
205
|
logger: new import_logger.Logger(plugin.name)
|
package/dist/index.mjs
CHANGED
|
@@ -170,10 +170,10 @@ function usePlugin(plugin) {
|
|
|
170
170
|
if (!plugins.find((p) => p.name === plugin.name))
|
|
171
171
|
plugins.push(plugin);
|
|
172
172
|
if (!plugin.mount)
|
|
173
|
-
plugin.mount = async function(
|
|
173
|
+
plugin.mount = async function(data) {
|
|
174
174
|
if (plugin.onMount)
|
|
175
175
|
await plugin.onMount({
|
|
176
|
-
config: config || /* @__PURE__ */ Object.create(null),
|
|
176
|
+
config: (data == null ? void 0 : data.config) || /* @__PURE__ */ Object.create(null),
|
|
177
177
|
event: /* @__PURE__ */ Object.create(null),
|
|
178
178
|
context: /* @__PURE__ */ Object.create(null),
|
|
179
179
|
logger: new Logger(plugin.name)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/func",
|
|
3
|
-
"version": "0.0.3-beta.
|
|
3
|
+
"version": "0.0.3-beta.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@faasjs/deep_merge": "^0.0.3-beta.
|
|
26
|
-
"@faasjs/logger": "^0.0.3-beta.
|
|
25
|
+
"@faasjs/deep_merge": "^0.0.3-beta.14",
|
|
26
|
+
"@faasjs/logger": "^0.0.3-beta.14"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"npm": ">=8.0.0",
|