@faasjs/func 0.0.4-beta.14 → 0.0.4-beta.16

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.js CHANGED
@@ -15,8 +15,8 @@ var RunHandler = class {
15
15
  if (data.handler)
16
16
  if (!data.runHandler) {
17
17
  try {
18
- data.response = await new Promise(function(resolve, reject) {
19
- data.callback = function(error, result) {
18
+ data.response = await new Promise((resolve, reject) => {
19
+ data.callback = (error, result) => {
20
20
  if (error)
21
21
  reject(error);
22
22
  else
@@ -72,10 +72,10 @@ var Func = class {
72
72
  }
73
73
  this.cachedFunctions[key] = list;
74
74
  }
75
- return async function(data, next) {
75
+ return async (data, next) => {
76
76
  let index = -1;
77
77
  const logger$1 = (data == null ? void 0 : data.logger) || new logger.Logger();
78
- const dispatch = async function(i) {
78
+ const dispatch = async (i) => {
79
79
  if (i <= index)
80
80
  return Promise.reject(Error("next() called multiple times"));
81
81
  index = i;
@@ -205,7 +205,7 @@ function usePlugin(plugin) {
205
205
  if (!plugins.find((p) => p.name === plugin.name))
206
206
  plugins.push(plugin);
207
207
  if (!plugin.mount)
208
- plugin.mount = async function(data) {
208
+ plugin.mount = async (data) => {
209
209
  if (plugin.onMount)
210
210
  await plugin.onMount(
211
211
  {
package/dist/index.mjs CHANGED
@@ -13,8 +13,8 @@ var RunHandler = class {
13
13
  if (data.handler)
14
14
  if (!data.runHandler) {
15
15
  try {
16
- data.response = await new Promise(function(resolve, reject) {
17
- data.callback = function(error, result) {
16
+ data.response = await new Promise((resolve, reject) => {
17
+ data.callback = (error, result) => {
18
18
  if (error)
19
19
  reject(error);
20
20
  else
@@ -70,10 +70,10 @@ var Func = class {
70
70
  }
71
71
  this.cachedFunctions[key] = list;
72
72
  }
73
- return async function(data, next) {
73
+ return async (data, next) => {
74
74
  let index = -1;
75
75
  const logger = (data == null ? void 0 : data.logger) || new Logger();
76
- const dispatch = async function(i) {
76
+ const dispatch = async (i) => {
77
77
  if (i <= index)
78
78
  return Promise.reject(Error("next() called multiple times"));
79
79
  index = i;
@@ -203,7 +203,7 @@ function usePlugin(plugin) {
203
203
  if (!plugins.find((p) => p.name === plugin.name))
204
204
  plugins.push(plugin);
205
205
  if (!plugin.mount)
206
- plugin.mount = async function(data) {
206
+ plugin.mount = async (data) => {
207
207
  if (plugin.onMount)
208
208
  await plugin.onMount(
209
209
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/func",
3
- "version": "0.0.4-beta.14",
3
+ "version": "0.0.4-beta.16",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,8 +21,8 @@
21
21
  "dist"
22
22
  ],
23
23
  "dependencies": {
24
- "@faasjs/deep_merge": "0.0.4-beta.14",
25
- "@faasjs/logger": "0.0.4-beta.14"
24
+ "@faasjs/deep_merge": "0.0.4-beta.16",
25
+ "@faasjs/logger": "0.0.4-beta.16"
26
26
  },
27
27
  "engines": {
28
28
  "npm": ">=9.0.0",