fix(build): 🐛 Fix builds for JSR support

This commit is contained in:
Jesse Wierzbinski 2024-05-13 22:35:25 -10:00
parent 0d53c450f8
commit f5fd4c0a04
No known key found for this signature in database
6 changed files with 13 additions and 16 deletions

View file

@ -26,7 +26,7 @@ import {
User, User,
VanityExtension, VanityExtension,
Visibility, Visibility,
} from "~/federation/schemas/base"; } from "./schemas/base";
export type InferType<T extends z.AnyZodObject> = z.infer<T>; export type InferType<T extends z.AnyZodObject> = z.infer<T>;

8
federation/jsr.jsonc Normal file
View 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"
}
}

View file

@ -5,7 +5,7 @@
* @see https://lysand.org/extensions/vanity * @see https://lysand.org/extensions/vanity
*/ */
import { z } from "zod"; import { type AnyZodObject, ZodObject, z } from "zod";
import { ContentFormat } from "../content_format"; import { ContentFormat } from "../content_format";
/** /**

View file

@ -18,7 +18,7 @@ import {
/** /**
* Regular expression for matching emojis. * Regular expression for matching emojis.
*/ */
export const emojiRegex = createRegExp( export const emojiRegex: RegExp = createRegExp(
// A-Z a-z 0-9 _ - // A-Z a-z 0-9 _ -
oneOrMore(letter.or(digit).or(exactly("_")).or(exactly("-"))), oneOrMore(letter.or(digit).or(exactly("_")).or(exactly("-"))),
[caseInsensitive, global], [caseInsensitive, global],
@ -28,7 +28,7 @@ export const emojiRegex = createRegExp(
* Regular expression for matching an extension_type * Regular expression for matching an extension_type
* @example org.lysand:custom_emojis/Emoji * @example org.lysand:custom_emojis/Emoji
*/ */
export const extensionTypeRegex = createRegExp( export const extensionTypeRegex: RegExp = createRegExp(
// org namespace, then colon, then alphanumeric/_/-, then extension name // org namespace, then colon, then alphanumeric/_/-, then extension name
exactly( exactly(
oneOrMore(exactly(letter.lowercase.or(digit).or(charIn("_-.")))), oneOrMore(exactly(letter.lowercase.or(digit).or(charIn("_-.")))),

View file

@ -1,8 +0,0 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"paths": {
"~/*": ["./*"]
}
}
}

View file

@ -23,10 +23,7 @@
"verbatimModuleSyntax": true, "verbatimModuleSyntax": true,
"types": [ "types": [
"bun-types" // add Bun global "bun-types" // add Bun global
], ]
"paths": {
"~/*": ["./*"]
}
}, },
"include": ["*.ts", "*.d.ts", "**/*.ts", "**/*.d.ts"] "include": ["*.ts", "*.d.ts", "**/*.ts", "**/*.d.ts"]
} }