@microlink/function 0.2.6 → 0.2.8

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/README.md CHANGED
@@ -238,7 +238,7 @@ console.log(result.profiling)
238
238
  // {
239
239
  // phases: { install: 0, build: 120, spawn: 45, run: 890, total: 1055 },
240
240
  // cpu: 234,
241
- // memory: 8,
241
+ // memory: { total: 69996544, used: 2359296, heap: 4410880, external: 1742574 },
242
242
  // size: 156
243
243
  // }
244
244
  ```
@@ -251,7 +251,10 @@ console.log(result.profiling)
251
251
  | `phases.run` | Time spent executing the function. |
252
252
  | `phases.total` | Wall-clock time from start to finish. |
253
253
  | `cpu` | Peak CPU time in milliseconds. |
254
- | `memory` | Peak memory usage in MB. |
254
+ | `memory.total` | Resident memory of the sandbox, Node.js baseline included, in bytes. |
255
+ | `memory.used` | Resident memory attributable to your function, in bytes. |
256
+ | `memory.heap` | V8 heap in use, in bytes. The only field the memory limit bounds. |
257
+ | `memory.external` | Off-heap `Buffer`/`ArrayBuffer` memory, in bytes. |
255
258
  | `size` | Bundled code size in bytes. |
256
259
 
257
260
  ### Plan limits
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@microlink/function",
3
3
  "description": "Write JavaScript functions and run them remotely with Microlink — Puppeteer access, npm packages, and zero infrastructure.",
4
4
  "homepage": "https://function.microlink.io",
5
- "version": "0.2.6",
5
+ "version": "0.2.8",
6
6
  "types": "src/index.d.ts",
7
7
  "exports": {
8
8
  "types": "./src/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  "serverless"
35
35
  ],
36
36
  "dependencies": {
37
- "@microlink/mql": "0.17.0",
37
+ "@microlink/mql": "0.17.1",
38
38
  "lz-ts": "~1.1.2"
39
39
  },
40
40
  "devDependencies": {
@@ -62,11 +62,10 @@
62
62
  "build": "rollup -c rollup.config.js --bundleConfigAsCjs",
63
63
  "clean:build": "rm -rf dist/index.js",
64
64
  "dev": "pnpm run build -- -w",
65
- "lint": "tsd",
66
65
  "prebuild": "pnpm run clean:build",
67
66
  "prepublishOnly": "pnpm run build",
68
- "pretest": "pnpm run lint && pnpm run build",
69
- "test": "ava --verbose"
67
+ "pretest": "pnpm run build",
68
+ "test": "ava --verbose && tsd"
70
69
  },
71
70
  "license": "MIT",
72
71
  "ava": {
@@ -83,5 +82,5 @@
83
82
  },
84
83
  "directory": "test"
85
84
  },
86
- "gitHead": "b28aa7d6434ac1bb43b084d7e329efec97dab36a"
85
+ "gitHead": "28020344ffd40e3253e8cfa345e2a0bfe15deda9"
87
86
  }
package/src/index.d.ts CHANGED
@@ -10,7 +10,12 @@ export type FunctionProfiling = {
10
10
  total?: number
11
11
  }
12
12
  cpu?: number
13
- memory?: number
13
+ memory?: {
14
+ total?: number
15
+ used?: number
16
+ heap?: number
17
+ external?: number
18
+ }
14
19
  size?: number
15
20
  }
16
21