Chenloong999 commited on
Commit
357391b
·
verified ·
1 Parent(s): ec892d6

backup 2026-08-23T20:24:25.191693 (part 12)

Browse files
.opencode/node_modules/uuid/dist-node/rng.js CHANGED
@@ -1,10 +1,4 @@
1
- import { randomFillSync } from 'node:crypto';
2
- const rnds8Pool = new Uint8Array(256);
3
- let poolPtr = rnds8Pool.length;
4
  export default function rng() {
5
- if (poolPtr > rnds8Pool.length - 16) {
6
- randomFillSync(rnds8Pool);
7
- poolPtr = 0;
8
- }
9
- return rnds8Pool.slice(poolPtr, (poolPtr += 16));
10
  }
 
1
+ const rnds8 = new Uint8Array(16);
 
 
2
  export default function rng() {
3
+ return crypto.getRandomValues(rnds8);
 
 
 
 
4
  }
.opencode/node_modules/uuid/dist-node/v1.js CHANGED
@@ -61,14 +61,18 @@ function v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) {
61
  msecs ??= Date.now();
62
  nsecs ??= 0;
63
  clockseq ??= ((rnds[8] << 8) | rnds[9]) & 0x3fff;
64
- node ??= rnds.slice(10, 16);
 
 
 
65
  msecs += 12219292800000;
66
- const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
 
67
  buf[offset++] = (tl >>> 24) & 0xff;
68
  buf[offset++] = (tl >>> 16) & 0xff;
69
  buf[offset++] = (tl >>> 8) & 0xff;
70
  buf[offset++] = tl & 0xff;
71
- const tmh = ((msecs / 0x100000000) * 10000) & 0xfffffff;
72
  buf[offset++] = (tmh >>> 8) & 0xff;
73
  buf[offset++] = tmh & 0xff;
74
  buf[offset++] = ((tmh >>> 24) & 0xf) | 0x10;
 
61
  msecs ??= Date.now();
62
  nsecs ??= 0;
63
  clockseq ??= ((rnds[8] << 8) | rnds[9]) & 0x3fff;
64
+ if (node == null) {
65
+ node = rnds.slice(10, 16);
66
+ node[0] |= 0x01;
67
+ }
68
  msecs += 12219292800000;
69
+ const t = (msecs & 0xfffffff) * 10000 + nsecs;
70
+ const tl = t >>> 0;
71
  buf[offset++] = (tl >>> 24) & 0xff;
72
  buf[offset++] = (tl >>> 16) & 0xff;
73
  buf[offset++] = (tl >>> 8) & 0xff;
74
  buf[offset++] = tl & 0xff;
75
+ const tmh = (((msecs / 0x10000000) | 0) * 625 + ((t / 0x100000000) | 0)) & 0xfffffff;
76
  buf[offset++] = (tmh >>> 8) & 0xff;
77
  buf[offset++] = tmh & 0xff;
78
  buf[offset++] = ((tmh >>> 24) & 0xf) | 0x10;
.opencode/node_modules/uuid/dist-node/v35.js CHANGED
@@ -26,7 +26,7 @@ export default function v35(version, hash, value, namespace, buf, offset) {
26
  bytes[6] = (bytes[6] & 0x0f) | version;
27
  bytes[8] = (bytes[8] & 0x3f) | 0x80;
28
  if (buf) {
29
- offset = offset || 0;
30
  if (offset < 0 || offset + 16 > buf.length) {
31
  throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
32
  }
 
26
  bytes[6] = (bytes[6] & 0x0f) | version;
27
  bytes[8] = (bytes[8] & 0x3f) | 0x80;
28
  if (buf) {
29
+ offset ??= 0;
30
  if (offset < 0 || offset + 16 > buf.length) {
31
  throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
32
  }
.opencode/node_modules/uuid/dist-node/v4.js CHANGED
@@ -1,6 +1,11 @@
1
- import native from './native.js';
2
  import rng from './rng.js';
3
  import { unsafeStringify } from './stringify.js';
 
 
 
 
 
 
4
  function _v4(options, buf, offset) {
5
  options = options || {};
6
  const rnds = options.random ?? options.rng?.() ?? rng();
@@ -21,10 +26,4 @@ function _v4(options, buf, offset) {
21
  }
22
  return unsafeStringify(rnds);
23
  }
24
- function v4(options, buf, offset) {
25
- if (native.randomUUID && !buf && !options) {
26
- return native.randomUUID();
27
- }
28
- return _v4(options, buf, offset);
29
- }
30
  export default v4;
 
 
1
  import rng from './rng.js';
2
  import { unsafeStringify } from './stringify.js';
3
+ function v4(options, buf, offset) {
4
+ if (!buf && !options && crypto.randomUUID) {
5
+ return crypto.randomUUID();
6
+ }
7
+ return _v4(options, buf, offset);
8
+ }
9
  function _v4(options, buf, offset) {
10
  options = options || {};
11
  const rnds = options.random ?? options.rng?.() ?? rng();
 
26
  }
27
  return unsafeStringify(rnds);
28
  }
 
 
 
 
 
 
29
  export default v4;
.opencode/node_modules/uuid/dist-node/v7.js CHANGED
@@ -18,7 +18,7 @@ export function updateV7State(state, now, rnds) {
18
  state.msecs ??= -Infinity;
19
  state.seq ??= 0;
20
  if (now > state.msecs) {
21
- state.seq = (rnds[6] << 23) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9];
22
  state.msecs = now;
23
  }
24
  else {
@@ -43,7 +43,7 @@ function v7Bytes(rnds, msecs, seq, buf, offset = 0) {
43
  }
44
  }
45
  msecs ??= Date.now();
46
- seq ??= ((rnds[6] * 0x7f) << 24) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9];
47
  buf[offset++] = (msecs / 0x10000000000) & 0xff;
48
  buf[offset++] = (msecs / 0x100000000) & 0xff;
49
  buf[offset++] = (msecs / 0x1000000) & 0xff;
@@ -62,4 +62,7 @@ function v7Bytes(rnds, msecs, seq, buf, offset = 0) {
62
  buf[offset++] = rnds[15];
63
  return buf;
64
  }
 
 
 
65
  export default v7;
 
18
  state.msecs ??= -Infinity;
19
  state.seq ??= 0;
20
  if (now > state.msecs) {
21
+ state.seq = v7Sequence(rnds);
22
  state.msecs = now;
23
  }
24
  else {
 
43
  }
44
  }
45
  msecs ??= Date.now();
46
+ seq ??= v7Sequence(rnds);
47
  buf[offset++] = (msecs / 0x10000000000) & 0xff;
48
  buf[offset++] = (msecs / 0x100000000) & 0xff;
49
  buf[offset++] = (msecs / 0x1000000) & 0xff;
 
62
  buf[offset++] = rnds[15];
63
  return buf;
64
  }
65
+ function v7Sequence(rnds) {
66
+ return ((rnds[6] & 0x7f) << 24) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9];
67
+ }
68
  export default v7;
.opencode/node_modules/uuid/package.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "uuid",
3
- "version": "13.0.2",
4
  "description": "RFC9562 UUIDs",
5
  "type": "module",
6
  "funding": [
@@ -26,7 +26,10 @@
26
  "types": "./dist/index.d.ts",
27
  "exports": {
28
  ".": {
29
- "node": "./dist-node/index.js",
 
 
 
30
  "default": "./dist/index.js"
31
  },
32
  "./package.json": "./package.json"
@@ -37,60 +40,56 @@
37
  "!**/test"
38
  ],
39
  "devDependencies": {
40
- "@babel/eslint-parser": "7.27.1",
41
- "@commitlint/cli": "19.8.0",
42
- "@commitlint/config-conventional": "19.8.0",
43
- "@eslint/js": "9.26.0",
44
  "bundlewatch": "0.4.1",
45
- "commander": "13.1.0",
46
- "eslint": "9.26.0",
47
- "eslint-config-prettier": "10.1.2",
48
- "eslint-plugin-prettier": "5.4.0",
49
- "globals": "16.0.0",
50
- "husky": "9.1.7",
51
- "jest": "29.7.0",
52
- "lint-staged": "15.5.2",
53
- "neostandard": "0.12.1",
54
- "npm-run-all": "4.1.5",
55
- "prettier": "3.5.3",
56
- "release-please": "17.0.0",
57
- "runmd": "1.4.1",
58
  "standard-version": "9.5.0",
59
- "typescript": "5.2.2",
60
- "typescript-eslint": "8.32.0"
61
  },
62
  "optionalDevDependencies": {
63
- "@wdio/browserstack-service": "9.2.1",
64
- "@wdio/cli": "9.2.1",
65
- "@wdio/jasmine-framework": "9.2.1",
66
- "@wdio/local-runner": "9.2.1",
67
- "@wdio/spec-reporter": "9.1.3",
68
- "@wdio/static-server-service": "9.1.3"
69
  },
70
  "scripts": {
71
  "build": "./scripts/build.sh",
72
  "build:watch": "tsc --watch -p tsconfig.json",
73
  "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json",
74
- "docs:diff": "npm run docs && git diff --quiet -I \"[0-9a-f-]{36}\" README.md",
75
  "docs": "npm run build && npx runmd --output=README.md README_js.md",
76
- "eslint:check": "eslint src/ test/ examples/ *.[jt]s",
77
- "eslint:fix": "eslint --fix src/ test/ examples/ *.[jt]s",
78
  "examples:browser:rollup:build": "cd examples/browser-rollup && npm run build",
79
  "examples:browser:webpack:build": "cd examples/browser-webpack && npm run build",
80
  "examples:node:esmodules:test": "cd examples/node-esmodules && npm test",
81
  "examples:node:jest:test": "cd examples/node-jest && npm test",
82
  "examples:node:typescript:test": "cd examples/typescript && npm test",
83
- "lint": "npm run eslint:check && npm run prettier:check",
 
 
84
  "md": "runmd --watch --output=README.md README_js.md",
85
  "prepack": "npm run build -- --no-pack",
86
- "prepare": "husky",
87
  "prepublishOnly": "npm run build",
88
  "pretest:benchmark": "npm run build",
89
  "pretest:browser": "./scripts/iodd && npm run build && npm-run-all --parallel examples:browser:**",
90
  "pretest:node": "npm run build",
91
  "pretest": "npm run build",
92
- "prettier:check": "prettier --check .",
93
- "prettier:fix": "prettier --write .",
94
  "release": "standard-version --no-verify",
95
  "test:benchmark": "cd examples/benchmark && npm test",
96
  "test:browser": "wdio run ./wdio.conf.js",
@@ -104,16 +103,13 @@
104
  },
105
  "lint-staged": {
106
  "*": [
107
- "prettier --no-error-on-unmatched-pattern --write"
108
- ],
109
- "*.{js,jsx}": [
110
- "eslint --no-error-on-unmatched-pattern --fix"
111
  ]
112
  },
113
  "standard-version": {
114
  "scripts": {
115
- "postchangelog": "prettier --write CHANGELOG.md"
116
  }
117
  },
118
- "packageManager": "npm@11.3.0"
119
  }
 
1
  {
2
  "name": "uuid",
3
+ "version": "14.0.2",
4
  "description": "RFC9562 UUIDs",
5
  "type": "module",
6
  "funding": [
 
26
  "types": "./dist/index.d.ts",
27
  "exports": {
28
  ".": {
29
+ "node": {
30
+ "types": "./dist/index.d.ts",
31
+ "default": "./dist-node/index.js"
32
+ },
33
  "default": "./dist/index.js"
34
  },
35
  "./package.json": "./package.json"
 
40
  "!**/test"
41
  ],
42
  "devDependencies": {
43
+ "@biomejs/biome": "2.4.10",
44
+ "@commitlint/cli": "20.5.0",
45
+ "@commitlint/config-conventional": "20.5.0",
 
46
  "bundlewatch": "0.4.1",
47
+ "commander": "14.0.3",
48
+ "globals": "17.4.0",
49
+ "jest": "30.3.0",
50
+ "lefthook": "1.11.13",
51
+ "lint-staged": "16.4.0",
52
+ "neostandard": "0.13.0",
53
+ "npm-run-all2": "8.0.4",
54
+ "prettier": "3.8.3",
55
+ "publint": "0.3.21",
56
+ "release-please": "17.3.0",
57
+ "runmd": "2.1.1",
 
 
58
  "standard-version": "9.5.0",
59
+ "typescript": "5.4.3"
 
60
  },
61
  "optionalDevDependencies": {
62
+ "@wdio/browserstack-service": "9.27.0",
63
+ "@wdio/cli": "9.27.0",
64
+ "@wdio/jasmine-framework": "9.27.0",
65
+ "@wdio/local-runner": "9.27.0",
66
+ "@wdio/spec-reporter": "9.27.0",
67
+ "@wdio/static-server-service": "9.27.0"
68
  },
69
  "scripts": {
70
  "build": "./scripts/build.sh",
71
  "build:watch": "tsc --watch -p tsconfig.json",
72
  "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json",
73
+ "docs:diff": "npm run docs && git diff README.md",
74
  "docs": "npm run build && npx runmd --output=README.md README_js.md",
75
+ "biome:check": "biome check .",
76
+ "biome:fix": "biome check --write .",
77
  "examples:browser:rollup:build": "cd examples/browser-rollup && npm run build",
78
  "examples:browser:webpack:build": "cd examples/browser-webpack && npm run build",
79
  "examples:node:esmodules:test": "cd examples/node-esmodules && npm test",
80
  "examples:node:jest:test": "cd examples/node-jest && npm test",
81
  "examples:node:typescript:test": "cd examples/typescript && npm test",
82
+ "format": "biome format --write .",
83
+ "format:check": "biome format --check .",
84
+ "lint": "npm run biome:check",
85
  "md": "runmd --watch --output=README.md README_js.md",
86
  "prepack": "npm run build -- --no-pack",
87
+ "prepare": "lefthook install",
88
  "prepublishOnly": "npm run build",
89
  "pretest:benchmark": "npm run build",
90
  "pretest:browser": "./scripts/iodd && npm run build && npm-run-all --parallel examples:browser:**",
91
  "pretest:node": "npm run build",
92
  "pretest": "npm run build",
 
 
93
  "release": "standard-version --no-verify",
94
  "test:benchmark": "cd examples/benchmark && npm test",
95
  "test:browser": "wdio run ./wdio.conf.js",
 
103
  },
104
  "lint-staged": {
105
  "*": [
106
+ "biome check --write --no-errors-on-unmatched"
 
 
 
107
  ]
108
  },
109
  "standard-version": {
110
  "scripts": {
111
+ "postchangelog": "biome format --write CHANGELOG.md"
112
  }
113
  },
114
+ "packageManager": "npm@11.12.1"
115
  }