mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-02 18:57:08 +00:00
refactor: unwrap Identifier namespace + self-reexport (#22932)
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import z from "zod"
|
import z from "zod"
|
||||||
import { randomBytes } from "crypto"
|
import { randomBytes } from "crypto"
|
||||||
|
|
||||||
export namespace Identifier {
|
|
||||||
const prefixes = {
|
const prefixes = {
|
||||||
event: "evt",
|
event: "evt",
|
||||||
session: "ses",
|
session: "ses",
|
||||||
@@ -83,4 +82,5 @@ export namespace Identifier {
|
|||||||
const encoded = BigInt("0x" + hex)
|
const encoded = BigInt("0x" + hex)
|
||||||
return Number(encoded / BigInt(0x1000))
|
return Number(encoded / BigInt(0x1000))
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
export * as Identifier from "./id"
|
||||||
|
|||||||
Reference in New Issue
Block a user