mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
fix typecheck
This commit is contained in:
parent
0d2b3b974e
commit
ef8f74e62b
@ -12,6 +12,9 @@ const nodeBuiltins = builtinModules.flatMap((m) => [m, `node:${m}`]);
|
||||
|
||||
// tsup config to build the self-hosting migration script so it can be
|
||||
// run in the Docker container with no extra dependencies.
|
||||
type EsbuildPlugin = NonNullable<Options["esbuildPlugins"]>[number];
|
||||
const basePlugin = createBasePlugin({}) as unknown as EsbuildPlugin;
|
||||
|
||||
export default defineConfig({
|
||||
entry: ['scripts/db-migrations.ts'],
|
||||
format: ['esm'],
|
||||
@ -32,7 +35,6 @@ const __filename = __fileURLToPath(import.meta.url);
|
||||
const __dirname = __dirname_fn(__filename);
|
||||
const require = __createRequire(import.meta.url);`,
|
||||
},
|
||||
esbuildPlugins: [
|
||||
createBasePlugin({}),
|
||||
],
|
||||
// Cast to tsup's esbuild plugin type to avoid esbuild version mismatch in typecheck.
|
||||
esbuildPlugins: [basePlugin],
|
||||
} satisfies Options);
|
||||
|
||||
@ -3,8 +3,8 @@ import { StackAssertionError } from "@stackframe/stack-shared/dist/utils/errors"
|
||||
import { runAsynchronously, wait } from "@stackframe/stack-shared/dist/utils/promises";
|
||||
|
||||
const endpoints = [
|
||||
"/api/latest/internal/external-db-sync/sequencer",
|
||||
"/api/latest/internal/external-db-sync/poller",
|
||||
"/api/latest/internal/external-db-sync/sequencer",
|
||||
"/api/latest/internal/external-db-sync/poller",
|
||||
];
|
||||
|
||||
async function main() {
|
||||
@ -29,7 +29,7 @@ async function main() {
|
||||
// Vercel only guarantees minute-granularity for cron jobs, so we randomize the interval
|
||||
await wait(Math.random() * 120_000);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { upstash } from "@/lib/upstash";
|
||||
import { globalPrismaClient, retryTransaction } from "@/prisma-client";
|
||||
import { createSmartRouteHandler } from "@/route-handlers/smart-route-handler";
|
||||
import { OutgoingRequest } from "@prisma/client";
|
||||
import type { OutgoingRequest } from "@/generated/prisma/client";
|
||||
import {
|
||||
yupBoolean,
|
||||
yupNumber,
|
||||
@ -13,6 +13,7 @@ import { getEnvVariable, getNodeEnvironment } from "@stackframe/stack-shared/dis
|
||||
import { captureError, StatusError } from "@stackframe/stack-shared/dist/utils/errors";
|
||||
import { wait } from "@stackframe/stack-shared/dist/utils/promises";
|
||||
|
||||
|
||||
export const GET = createSmartRouteHandler({
|
||||
metadata: {
|
||||
summary: "Poll outgoing requests and push to QStash",
|
||||
@ -71,6 +72,7 @@ export const GET = createSmartRouteHandler({
|
||||
|
||||
for (const request of requests) {
|
||||
try {
|
||||
// Prisma JsonValue doesn't carry a precise shape for this JSON blob.
|
||||
const options = request.qstashOptions as any;
|
||||
const baseUrl = getEnvVariable("NEXT_PUBLIC_STACK_API_URL");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user