mirror of
https://github.com/versia-pub/api.git
synced 2025-12-06 08:28:19 +01:00
fix(build): 🐛 Fix builds for JSR support
This commit is contained in:
parent
0d53c450f8
commit
f5fd4c0a04
|
|
@ -26,7 +26,7 @@ import {
|
|||
User,
|
||||
VanityExtension,
|
||||
Visibility,
|
||||
} from "~/federation/schemas/base";
|
||||
} from "./schemas/base";
|
||||
|
||||
export type InferType<T extends z.AnyZodObject> = z.infer<T>;
|
||||
|
||||
|
|
|
|||
8
federation/jsr.jsonc
Normal file
8
federation/jsr.jsonc
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"$schema": "https://jsr.io/schema/config-file.v1.json",
|
||||
"name": "@lysand-org/federation",
|
||||
"version": "3.0.0",
|
||||
"exports": {
|
||||
".": "./index.ts"
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
* @see https://lysand.org/extensions/vanity
|
||||
*/
|
||||
|
||||
import { z } from "zod";
|
||||
import { type AnyZodObject, ZodObject, z } from "zod";
|
||||
import { ContentFormat } from "../content_format";
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import {
|
|||
/**
|
||||
* Regular expression for matching emojis.
|
||||
*/
|
||||
export const emojiRegex = createRegExp(
|
||||
export const emojiRegex: RegExp = createRegExp(
|
||||
// A-Z a-z 0-9 _ -
|
||||
oneOrMore(letter.or(digit).or(exactly("_")).or(exactly("-"))),
|
||||
[caseInsensitive, global],
|
||||
|
|
@ -28,7 +28,7 @@ export const emojiRegex = createRegExp(
|
|||
* Regular expression for matching an extension_type
|
||||
* @example org.lysand:custom_emojis/Emoji
|
||||
*/
|
||||
export const extensionTypeRegex = createRegExp(
|
||||
export const extensionTypeRegex: RegExp = createRegExp(
|
||||
// org namespace, then colon, then alphanumeric/_/-, then extension name
|
||||
exactly(
|
||||
oneOrMore(exactly(letter.lowercase.or(digit).or(charIn("_-.")))),
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"~/*": ["./*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -23,10 +23,7 @@
|
|||
"verbatimModuleSyntax": true,
|
||||
"types": [
|
||||
"bun-types" // add Bun global
|
||||
],
|
||||
"paths": {
|
||||
"~/*": ["./*"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": ["*.ts", "*.d.ts", "**/*.ts", "**/*.d.ts"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue