-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 [plaoc] fix relative import path "zod" error
- Loading branch information
Showing
3 changed files
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,6 @@ | |
"node-forge": "https://esm.sh/v124/[email protected]", | ||
"source-map-support": "https://esm.sh/v124/[email protected]", | ||
"source-map-support/register": "https://esm.sh/v124/[email protected]/register.js", | ||
"zod": "https://esm.sh/v124/[email protected]", | ||
"tar": "https://esm.sh/v124/[email protected]" | ||
}, | ||
"scopes": {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import { RefinementCtx, z } from "zod"; | ||
//! use zod error: Relative import path "zod" not prefixed with / or ./ or ../ only remote | ||
//! https://github.com/denoland/deno/issues/17598 | ||
import { RefinementCtx, z } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import { $MMID } from "../core/types.ts"; | ||
// const z_mmid = z.string().endsWith(".dweb"); | ||
export const mmidType = z.custom<$MMID>((val) => { | ||
return typeof val === "string" && val.endsWith(".dweb"); | ||
}); | ||
export * from "zod"; | ||
export * from "https://deno.land/x/zod@v3.21.4/mod.ts"; | ||
export { mmidType as mmid }; | ||
|
||
import type { | ||
|
@@ -13,7 +15,7 @@ import type { | |
ZodObject, | ||
ZodRawShape, | ||
ZodTypeAny, | ||
} from "zod"; | ||
} from "https://deno.land/x/zod@v3.21.4/mod.ts"; | ||
|
||
/// 以下代码来自 https://github.com/rileytomasek/zodix (MIT license) | ||
/// 因为源码有点问题,并且引入了一些不该引入的包,所以这里只提取了部分有需要的,并修复了一些问题 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters