@peac/audit 0.15.1 → 0.15.3
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/dispute-bundle.d.ts.map +1 -1
- package/dist/index.cjs +1 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { createHash } from 'crypto';
|
|
1
|
+
import { createHash, randomBytes } from 'crypto';
|
|
2
2
|
import { posix } from 'path';
|
|
3
3
|
import { canonicalize, verify, CryptoError } from '@peac/crypto';
|
|
4
4
|
import { BUNDLE_ERRORS } from '@peac/kernel';
|
|
5
5
|
import * as yazl from 'yazl';
|
|
6
6
|
import * as yauzl from 'yauzl';
|
|
7
7
|
|
|
8
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
-
}) : x)(function(x) {
|
|
11
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
-
});
|
|
14
|
-
|
|
15
8
|
// src/entry.ts
|
|
16
9
|
var AUDIT_VERSION = "peac.audit/0.9";
|
|
17
10
|
var AUDIT_EVENT_TYPES = [
|
|
@@ -396,8 +389,7 @@ function generateBundleId() {
|
|
|
396
389
|
timestampChars[i] = ULID_ALPHABET[ts % 32];
|
|
397
390
|
ts = Math.floor(ts / 32);
|
|
398
391
|
}
|
|
399
|
-
const
|
|
400
|
-
const randBytes = cryptoRandomBytes(10);
|
|
392
|
+
const randBytes = randomBytes(10);
|
|
401
393
|
const randomChars = [];
|
|
402
394
|
let randomValue = BigInt(0);
|
|
403
395
|
for (let i = 0; i < 10; i++) {
|