@prisma/compute 0.1.0-dev.14.1 → 0.1.0-dev.141.1

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.
@@ -1,7 +1,7 @@
1
1
  import fs from "node:fs";
2
2
  let controlFileState = {
3
3
  kind: "uninitialized",
4
- path: "/uk/libukp/scale_to_zero_disable"
4
+ paths: ["/run/prisma/compute/keep-awake", "/uk/libukp/scale_to_zero_disable"]
5
5
  };
6
6
  function writeScaleToZeroSignal(signal) {
7
7
  const state = getControlFileState();
@@ -15,18 +15,19 @@ function writeScaleToZeroSignal(signal) {
15
15
  }
16
16
  function getControlFileState() {
17
17
  if (controlFileState.kind !== "uninitialized") return controlFileState;
18
- try {
18
+ const paths = controlFileState.paths;
19
+ for (const path of paths) try {
19
20
  controlFileState = {
20
21
  kind: "open",
21
- fd: fs.openSync(controlFileState.path, fs.constants.O_WRONLY),
22
- path: controlFileState.path
22
+ fd: fs.openSync(path, fs.constants.O_WRONLY),
23
+ path
23
24
  };
24
- } catch {
25
- controlFileState = {
26
- kind: "unavailable",
27
- path: controlFileState.path
28
- };
29
- }
25
+ return controlFileState;
26
+ } catch {}
27
+ controlFileState = {
28
+ kind: "unavailable",
29
+ paths
30
+ };
30
31
  return controlFileState;
31
32
  }
32
33
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/compute",
3
- "version": "0.1.0-dev.14.1",
3
+ "version": "0.1.0-dev.141.1",
4
4
  "description": "Utilities for applications running on the Prisma compute runtime.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -38,9 +38,11 @@
38
38
  "scripts": {
39
39
  "build": "tsdown",
40
40
  "prepack": "pnpm run build",
41
+ "typecheck": "tsc --noEmit",
41
42
  "test": "vitest run"
42
43
  },
43
44
  "devDependencies": {
45
+ "@repo/tsconfig": "workspace:8.0.0-rc.15",
44
46
  "@types/node": "^22.19.19",
45
47
  "tsdown": "^0.21.10",
46
48
  "typescript": "^6.0.3",