dsh-multigameassistant 2.0.5 → 2.1.0

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/web/index.html CHANGED
@@ -5,8 +5,8 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <meta http-equiv="Content-Security-Policy" content="default-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data:; font-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self'" />
7
7
  <title>MultiGameAssistant</title>
8
- <script type="module" crossorigin src="./assets/index-BuStplKb.js"></script>
9
- <link rel="stylesheet" crossorigin href="./assets/index-CSB3B28L.css">
8
+ <script type="module" crossorigin src="./assets/index-C-csjWiw.js"></script>
9
+ <link rel="stylesheet" crossorigin href="./assets/index-CjtVfcDS.css">
10
10
  </head>
11
11
  <body>
12
12
  <div class="title-bar" aria-hidden="true"></div>
@@ -1,34 +0,0 @@
1
- import { createRequire as __adgCreateRequire } from 'node:module'; import { dirname as __adgDirname } from 'node:path'; import { fileURLToPath as __adgFileURLToPath } from 'node:url'; const require = __adgCreateRequire(import.meta.url); const __filename = __adgFileURLToPath(import.meta.url); const __dirname = __adgDirname(__filename);
2
-
3
- // packages/protocol/lib/node.js
4
- import { randomBytes } from "node:crypto";
5
- import { mkdir, rename, rm, writeFile } from "node:fs/promises";
6
- import { dirname } from "node:path";
7
- var queues = /* @__PURE__ */ new Map();
8
- function writeFileAtomic(file, text) {
9
- const previous = queues.get(file) ?? Promise.resolve();
10
- const next = previous.catch(() => {
11
- }).then(async () => {
12
- await mkdir(dirname(file), { recursive: true });
13
- const tmp = `${file}.${process.pid}.${randomBytes(4).toString("hex")}.tmp`;
14
- try {
15
- await writeFile(tmp, text);
16
- await rename(tmp, file);
17
- } catch (error) {
18
- await rm(tmp, { force: true }).catch(() => {
19
- });
20
- throw error;
21
- }
22
- });
23
- queues.set(file, next);
24
- void next.finally(() => {
25
- if (queues.get(file) === next)
26
- queues.delete(file);
27
- }).catch(() => {
28
- });
29
- return next;
30
- }
31
-
32
- export {
33
- writeFileAtomic
34
- };