qarpeo 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/auth-schema.mjs +23 -5
- package/dist/chunks/wrangler.mjs +108 -20
- package/dist/cli/index.mjs +1182 -43
- package/dist/fate/index.d.ts +76 -0
- package/dist/fate/index.mjs +53 -0
- package/dist/module.mjs +395 -25
- package/dist/runtime/ai.d.ts +2 -2
- package/dist/runtime/ai.mjs +1 -1
- package/dist/runtime/app/components/BlobImage.vue +7 -0
- package/dist/runtime/app/composables/ai.d.ts +67 -4
- package/dist/runtime/app/composables/ai.mjs +144 -7
- package/dist/runtime/app/composables/auth.d.ts +1 -0
- package/dist/runtime/app/composables/auth.mjs +1 -0
- package/dist/runtime/app/composables/chat.d.ts +26 -8
- package/dist/runtime/app/composables/chat.mjs +108 -50
- package/dist/runtime/app/composables/realtime.d.ts +5 -5
- package/dist/runtime/app/composables/resumable-upload.d.ts +23 -0
- package/dist/runtime/app/composables/resumable-upload.mjs +218 -0
- package/dist/runtime/app/composables/storage.d.ts +1 -0
- package/dist/runtime/app/composables/storage.mjs +1 -0
- package/dist/runtime/app/pages/devtools/realtime.vue +482 -0
- package/dist/runtime/app/pages/devtools/security.vue +515 -0
- package/dist/runtime/app/pages/devtools/tasks.vue +260 -0
- package/dist/runtime/app/pages/devtools.vue +21 -0
- package/dist/runtime/app/plugins/fate.d.ts +6 -0
- package/dist/runtime/app/plugins/fate.mjs +27 -0
- package/dist/runtime/app/plugins/seo.mjs +1 -4
- package/dist/runtime/browser.d.ts +2 -0
- package/dist/runtime/browser.mjs +1 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.mjs +2 -0
- package/dist/runtime/providers/qarpeo.d.ts +23 -0
- package/dist/runtime/providers/qarpeo.mjs +46 -0
- package/dist/runtime/queue.d.ts +2 -0
- package/dist/runtime/queue.mjs +1 -0
- package/dist/runtime/realtime.d.ts +2 -2
- package/dist/runtime/realtime.mjs +2 -1
- package/dist/runtime/server/durable-objects/agent.mjs +7 -0
- package/dist/runtime/server/durable-objects/room.d.ts +2 -0
- package/dist/runtime/server/durable-objects/room.mjs +17 -1
- package/dist/runtime/server/middleware/devtools.mjs +1 -1
- package/dist/runtime/server/plugins/cms.mjs +6 -5
- package/dist/runtime/server/plugins/queue.mjs +9 -2
- package/dist/runtime/server/routes/__qarpeo/auth/revoke-session.post.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/auth/sessions.get.d.ts +1 -1
- package/dist/runtime/server/routes/__qarpeo/auth/sessions.get.mjs +5 -5
- package/dist/runtime/server/routes/__qarpeo/auth/users.get.d.ts +1 -1
- package/dist/runtime/server/routes/__qarpeo/auth/users.get.mjs +2 -2
- package/dist/runtime/server/routes/__qarpeo/db/query.post.d.ts +6 -7
- package/dist/runtime/server/routes/__qarpeo/db/query.post.mjs +9 -9
- package/dist/runtime/server/routes/__qarpeo/db/tables.get.d.ts +1 -1
- package/dist/runtime/server/routes/__qarpeo/db/tables.get.mjs +6 -3
- package/dist/runtime/server/routes/__qarpeo/realtime/broadcast.post.d.ts +9 -0
- package/dist/runtime/server/routes/__qarpeo/realtime/broadcast.post.mjs +33 -0
- package/dist/runtime/server/routes/__qarpeo/realtime/clear.post.d.ts +9 -0
- package/dist/runtime/server/routes/__qarpeo/realtime/clear.post.mjs +21 -0
- package/dist/runtime/server/routes/__qarpeo/realtime/disconnect.post.d.ts +9 -0
- package/dist/runtime/server/routes/__qarpeo/realtime/disconnect.post.mjs +24 -0
- package/dist/runtime/server/routes/__qarpeo/realtime/room.get.d.ts +17 -0
- package/dist/runtime/server/routes/__qarpeo/realtime/room.get.mjs +44 -0
- package/dist/runtime/server/routes/__qarpeo/realtime/rooms.get.d.ts +16 -0
- package/dist/runtime/server/routes/__qarpeo/realtime/rooms.get.mjs +15 -0
- package/dist/runtime/server/routes/__qarpeo/security/analytics.get.d.ts +25 -0
- package/dist/runtime/server/routes/__qarpeo/security/analytics.get.mjs +22 -0
- package/dist/runtime/server/routes/__qarpeo/security/ban.post.d.ts +10 -0
- package/dist/runtime/server/routes/__qarpeo/security/ban.post.mjs +20 -0
- package/dist/runtime/server/routes/__qarpeo/security/clear.post.d.ts +9 -0
- package/dist/runtime/server/routes/__qarpeo/security/clear.post.mjs +7 -0
- package/dist/runtime/server/routes/__qarpeo/security/unban.post.d.ts +10 -0
- package/dist/runtime/server/routes/__qarpeo/security/unban.post.mjs +20 -0
- package/dist/runtime/server/routes/__qarpeo/tasks/list.get.d.ts +10 -0
- package/dist/runtime/server/routes/__qarpeo/tasks/list.get.mjs +26 -0
- package/dist/runtime/server/routes/__qarpeo/tasks/run.post.d.ts +7 -0
- package/dist/runtime/server/routes/__qarpeo/tasks/run.post.mjs +22 -0
- package/dist/runtime/server/routes/agents/[agent]/chat.post.mjs +2 -1
- package/dist/runtime/server/routes/agents/[agent]/history.get.d.ts +1 -1
- package/dist/runtime/server/routes/ai/embed.post.d.ts +12 -0
- package/dist/runtime/server/routes/ai/embed.post.mjs +26 -0
- package/dist/runtime/server/routes/ai/search.post.d.ts +12 -0
- package/dist/runtime/server/routes/ai/search.post.mjs +48 -0
- package/dist/runtime/server/routes/auth/2fa/disable.post.mjs +2 -2
- package/dist/runtime/server/routes/auth/2fa/verify.post.mjs +2 -2
- package/dist/runtime/server/routes/auth/handler.d.ts +1 -1
- package/dist/runtime/server/routes/auth/magic-link/verify.get.mjs +4 -4
- package/dist/runtime/server/routes/auth/organization/mfa.post.mjs +2 -2
- package/dist/runtime/server/routes/auth/organization/sso/[id].delete.mjs +1 -1
- package/dist/runtime/server/routes/auth/organization/sso/index.post.mjs +1 -1
- package/dist/runtime/server/routes/auth/otp/verify.post.mjs +4 -4
- package/dist/runtime/server/routes/auth/sso/login.get.mjs +1 -1
- package/dist/runtime/server/routes/auth/sso/oidc/callback.get.mjs +5 -5
- package/dist/runtime/server/routes/auth/sso/saml/acs.post.mjs +47 -9
- package/dist/runtime/server/routes/auth/webauthn/login/verify.post.mjs +2 -2
- package/dist/runtime/server/routes/browser/crawl.post.d.ts +8 -0
- package/dist/runtime/server/routes/browser/crawl.post.mjs +20 -0
- package/dist/runtime/server/routes/browser/invoice.post.d.ts +8 -0
- package/dist/runtime/server/routes/browser/invoice.post.mjs +28 -0
- package/dist/runtime/server/routes/browser/og-image.post.d.ts +8 -0
- package/dist/runtime/server/routes/browser/og-image.post.mjs +29 -0
- package/dist/runtime/server/routes/browser/pdf.post.d.ts +8 -0
- package/dist/runtime/server/routes/browser/pdf.post.mjs +29 -0
- package/dist/runtime/server/routes/browser/screenshot.post.d.ts +8 -0
- package/dist/runtime/server/routes/browser/screenshot.post.mjs +29 -0
- package/dist/runtime/server/routes/cms/webhooks/[provider].post.mjs +2 -2
- package/dist/runtime/server/routes/fate.d.ts +2 -0
- package/dist/runtime/server/routes/fate.mjs +35 -0
- package/dist/runtime/server/routes/realtime/history.delete.mjs +10 -1
- package/dist/runtime/server/routes/realtime/history.get.mjs +10 -1
- package/dist/runtime/server/routes/realtime/ws.get.mjs +8 -7
- package/dist/runtime/server/routes/storage/file/[...key].delete.mjs +2 -1
- package/dist/runtime/server/routes/storage/file/[...key].get.mjs +2 -1
- package/dist/runtime/server/routes/storage/multipart/abort.post.d.ts +9 -0
- package/dist/runtime/server/routes/storage/multipart/abort.post.mjs +32 -0
- package/dist/runtime/server/routes/storage/multipart/complete.post.d.ts +16 -0
- package/dist/runtime/server/routes/storage/multipart/complete.post.mjs +83 -0
- package/dist/runtime/server/routes/storage/multipart/create.post.d.ts +17 -0
- package/dist/runtime/server/routes/storage/multipart/create.post.mjs +78 -0
- package/dist/runtime/server/routes/storage/multipart/part.put.d.ts +11 -0
- package/dist/runtime/server/routes/storage/multipart/part.put.mjs +71 -0
- package/dist/runtime/server/routes/storage/upload.post.mjs +6 -4
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.mjs +1 -1
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.mjs +1 -1
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.post.mjs +1 -1
- package/dist/runtime/server/utils/ai.d.ts +10 -4
- package/dist/runtime/server/utils/ai.mjs +49 -13
- package/dist/runtime/server/utils/auth.d.ts +12 -59
- package/dist/runtime/server/utils/auth.mjs +223 -169
- package/dist/runtime/server/utils/bots.d.ts +2 -1
- package/dist/runtime/server/utils/browser-utils.d.ts +228 -0
- package/dist/runtime/server/utils/browser-utils.mjs +561 -0
- package/dist/runtime/server/utils/cache.d.ts +22 -7
- package/dist/runtime/server/utils/cache.mjs +81 -13
- package/dist/runtime/server/utils/cms.d.ts +39 -38
- package/dist/runtime/server/utils/cms.mjs +123 -100
- package/dist/runtime/server/utils/config.d.ts +3 -2
- package/dist/runtime/server/utils/context.d.ts +4 -3
- package/dist/runtime/server/utils/crypto.d.ts +3 -2
- package/dist/runtime/server/utils/crypto.mjs +4 -1
- package/dist/runtime/server/utils/impersonation.d.ts +8 -7
- package/dist/runtime/server/utils/impersonation.mjs +2 -2
- package/dist/runtime/server/utils/jobs.d.ts +2 -0
- package/dist/runtime/server/utils/jobs.mjs +1 -1
- package/dist/runtime/server/utils/mail-suppression.d.ts +6 -5
- package/dist/runtime/server/utils/mail.d.ts +4 -3
- package/dist/runtime/server/utils/multipart-store.d.ts +30 -0
- package/dist/runtime/server/utils/multipart-store.mjs +24 -0
- package/dist/runtime/server/utils/notifications.d.ts +9 -8
- package/dist/runtime/server/utils/organization.d.ts +8 -7
- package/dist/runtime/server/utils/organization.mjs +23 -23
- package/dist/runtime/server/utils/passwordless.d.ts +5 -4
- package/dist/runtime/server/utils/payments.d.ts +15 -14
- package/dist/runtime/server/utils/payments.mjs +36 -30
- package/dist/runtime/server/utils/queue.d.ts +96 -4
- package/dist/runtime/server/utils/queue.mjs +141 -2
- package/dist/runtime/server/utils/ratelimit.d.ts +5 -4
- package/dist/runtime/server/utils/realtime-store.d.ts +21 -0
- package/dist/runtime/server/utils/realtime-store.mjs +127 -0
- package/dist/runtime/server/utils/realtime.d.ts +18 -2
- package/dist/runtime/server/utils/realtime.mjs +18 -0
- package/dist/runtime/server/utils/scheduled-task.d.ts +29 -0
- package/dist/runtime/server/utils/scheduled-task.mjs +3 -0
- package/dist/runtime/server/utils/schema-fallback.d.ts +17 -0
- package/dist/runtime/server/utils/schema-fallback.mjs +17 -0
- package/dist/runtime/server/utils/security-store.d.ts +38 -0
- package/dist/runtime/server/utils/security-store.mjs +78 -0
- package/dist/runtime/server/utils/session.d.ts +12 -12
- package/dist/runtime/server/utils/session.mjs +12 -12
- package/dist/runtime/server/utils/sso.d.ts +11 -0
- package/dist/runtime/server/utils/sso.mjs +66 -0
- package/dist/runtime/server/utils/storage.d.ts +15 -14
- package/dist/runtime/server/utils/storage.mjs +10 -4
- package/dist/runtime/server/utils/tenant.mjs +16 -12
- package/dist/runtime/server/utils/turnstile.d.ts +3 -2
- package/dist/runtime/service.d.ts +37 -0
- package/dist/runtime/service.mjs +128 -0
- package/dist/runtime/test-utils.d.ts +190 -0
- package/dist/runtime/test-utils.mjs +490 -0
- package/dist/runtime/types/auth.d.ts +1 -1
- package/dist/runtime/types/imports.d.ts +0 -35
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.mjs +1 -0
- package/dist/runtime/types/service.d.ts +70 -0
- package/dist/runtime/types/service.mjs +0 -0
- package/dist/types.d.ts +139 -0
- package/dist/utils/auth-schema.d.ts +2 -2
- package/dist/utils/queue.d.ts +3 -2
- package/dist/utils/tasks.d.ts +13 -0
- package/package.json +35 -11
- package/dist/runtime/app/composables/void-client.d.ts +0 -3
- package/dist/runtime/app/composables/void-client.mjs +0 -4
- package/dist/runtime/server/utils/void-ai.d.ts +0 -7
- package/dist/runtime/server/utils/void-ai.mjs +0 -47
- package/dist/runtime/server/utils/void-auth.d.ts +0 -2
- package/dist/runtime/server/utils/void-auth.mjs +0 -9
- package/dist/runtime/server/utils/void-db.d.ts +0 -8
- package/dist/runtime/server/utils/void-db.mjs +0 -38
- package/dist/runtime/server/utils/void-seed.d.ts +0 -11
- package/dist/runtime/server/utils/void-seed.mjs +0 -3
|
@@ -7,10 +7,7 @@ const ALL_AUTH_TABLE_NAMES = [
|
|
|
7
7
|
"passkey",
|
|
8
8
|
"organization",
|
|
9
9
|
"member",
|
|
10
|
-
"invitation"
|
|
11
|
-
"_qarpeo_users",
|
|
12
|
-
"_qarpeo_accounts",
|
|
13
|
-
"_qarpeo_sessions"
|
|
10
|
+
"invitation"
|
|
14
11
|
];
|
|
15
12
|
function getActiveAuthTableNames(auth) {
|
|
16
13
|
if (!auth) return [];
|
|
@@ -50,7 +47,7 @@ function generateAuthSchema(auth) {
|
|
|
50
47
|
const opts = typeof auth === "object" ? auth : {};
|
|
51
48
|
const extendsFields = opts.fields?.extends || {};
|
|
52
49
|
const lines = [
|
|
53
|
-
`// Auto-generated by Qarpeo for Better Auth
|
|
50
|
+
`// Auto-generated by Qarpeo for Better Auth on Cloudflare D1`,
|
|
54
51
|
`import { sql } from "drizzle-orm";
|
|
55
52
|
import { sqliteTable, text, integer, blob, index } from "drizzle-orm/sqlite-core";`,
|
|
56
53
|
``,
|
|
@@ -180,6 +177,27 @@ import { sqliteTable, text, integer, blob, index } from "drizzle-orm/sqlite-core
|
|
|
180
177
|
`});`
|
|
181
178
|
);
|
|
182
179
|
}
|
|
180
|
+
if (!opts.twoFactor) {
|
|
181
|
+
lines.push(`export const twoFactor = undefined;`);
|
|
182
|
+
}
|
|
183
|
+
if (!opts.webauthn && !opts.webAuthn) {
|
|
184
|
+
lines.push(`export const passkey = undefined;`);
|
|
185
|
+
lines.push(`export const authenticators = undefined;`);
|
|
186
|
+
} else {
|
|
187
|
+
lines.push(`export { passkey as authenticators };`);
|
|
188
|
+
}
|
|
189
|
+
if (!opts.organizations) {
|
|
190
|
+
lines.push(
|
|
191
|
+
`export const organization = undefined;`,
|
|
192
|
+
`export const member = undefined;`,
|
|
193
|
+
`export const invitation = undefined;`,
|
|
194
|
+
`export const organizations = undefined;`,
|
|
195
|
+
`export const members = undefined;`,
|
|
196
|
+
`export const invitations = undefined;`
|
|
197
|
+
);
|
|
198
|
+
} else {
|
|
199
|
+
lines.push(`export { organization as organizations, member as members, invitation as invitations };`);
|
|
200
|
+
}
|
|
183
201
|
lines.push(
|
|
184
202
|
``,
|
|
185
203
|
`// Backwards compatibility aliases`,
|
package/dist/chunks/wrangler.mjs
CHANGED
|
@@ -417,33 +417,113 @@ function findQueueFiles(layers) {
|
|
|
417
417
|
if (existsSync(queueIndexFile)) {
|
|
418
418
|
queueFiles.add(queueIndexFile);
|
|
419
419
|
}
|
|
420
|
+
const queuesDir = resolve(baseDir, "server/queues");
|
|
421
|
+
if (existsSync(queuesDir)) {
|
|
422
|
+
try {
|
|
423
|
+
const files = readdirSync(queuesDir);
|
|
424
|
+
for (const file of files) {
|
|
425
|
+
if ((file.endsWith(".ts") || file.endsWith(".js") || file.endsWith(".mjs")) && !file.endsWith(".d.ts")) {
|
|
426
|
+
queueFiles.add(resolve(queuesDir, file));
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
} catch {
|
|
430
|
+
}
|
|
431
|
+
}
|
|
420
432
|
}
|
|
421
433
|
}
|
|
422
434
|
return Array.from(queueFiles);
|
|
423
435
|
}
|
|
424
436
|
|
|
437
|
+
function findScheduledTasks(layers, dirNames = ["server/tasks", "server/cron"]) {
|
|
438
|
+
const tasksMap = /* @__PURE__ */ new Map();
|
|
439
|
+
for (const layer of layers) {
|
|
440
|
+
const baseDirs = /* @__PURE__ */ new Set();
|
|
441
|
+
if (layer.config?.srcDir) baseDirs.add(layer.config.srcDir);
|
|
442
|
+
if (layer.config?.rootDir) baseDirs.add(layer.config.rootDir);
|
|
443
|
+
if (layer.cwd) baseDirs.add(layer.cwd);
|
|
444
|
+
for (const baseDir of baseDirs) {
|
|
445
|
+
for (const dirName of dirNames) {
|
|
446
|
+
const tasksDir = resolve(baseDir, dirName);
|
|
447
|
+
if (!existsSync(tasksDir)) continue;
|
|
448
|
+
try {
|
|
449
|
+
scanDirectory(tasksDir, tasksDir, tasksMap);
|
|
450
|
+
} catch {
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
return Array.from(tasksMap.values());
|
|
456
|
+
}
|
|
457
|
+
function scanDirectory(currentDir, rootDir, map) {
|
|
458
|
+
const entries = readdirSync(currentDir);
|
|
459
|
+
for (const entry of entries) {
|
|
460
|
+
const fullPath = join(currentDir, entry);
|
|
461
|
+
const stat = statSync(fullPath);
|
|
462
|
+
if (stat.isDirectory()) {
|
|
463
|
+
scanDirectory(fullPath, rootDir, map);
|
|
464
|
+
continue;
|
|
465
|
+
}
|
|
466
|
+
if (stat.isFile() && (entry.endsWith(".ts") || entry.endsWith(".js") || entry.endsWith(".mjs"))) {
|
|
467
|
+
if (entry.endsWith(".d.ts")) continue;
|
|
468
|
+
const relPath = fullPath.slice(rootDir.length + 1).replace(/\\/g, "/");
|
|
469
|
+
const ext = extname(relPath);
|
|
470
|
+
const taskName = relPath.slice(0, -ext.length).replace(/\//g, ":");
|
|
471
|
+
let cron;
|
|
472
|
+
let description;
|
|
473
|
+
try {
|
|
474
|
+
const content = readFileSync(fullPath, "utf8");
|
|
475
|
+
const cronMatch = content.match(/cron:\s*["']([^"']+)["']/);
|
|
476
|
+
if (cronMatch) {
|
|
477
|
+
cron = cronMatch[1];
|
|
478
|
+
}
|
|
479
|
+
const descMatch = content.match(/description:\s*["']([^"']+)["']/);
|
|
480
|
+
if (descMatch) {
|
|
481
|
+
description = descMatch[1];
|
|
482
|
+
}
|
|
483
|
+
} catch {
|
|
484
|
+
}
|
|
485
|
+
const importPath = fullPath.replace(/\\/g, "/").replace(/\.(ts|js|mjs)$/, "");
|
|
486
|
+
map.set(taskName, {
|
|
487
|
+
name: taskName,
|
|
488
|
+
file: fullPath,
|
|
489
|
+
importPath,
|
|
490
|
+
cron,
|
|
491
|
+
description
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
425
497
|
function resolveProjectName(nuxt, options) {
|
|
426
|
-
|
|
427
|
-
if (options?.name)
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
498
|
+
let rawName = "";
|
|
499
|
+
if (options?.site?.name) rawName = options.site.name;
|
|
500
|
+
else if (options?.name) rawName = options.name;
|
|
501
|
+
else {
|
|
502
|
+
const qarpeoConfig = nuxt.options.qarpeo || {};
|
|
503
|
+
if (qarpeoConfig.site?.name) rawName = qarpeoConfig.site.name;
|
|
504
|
+
else if (qarpeoConfig.name) rawName = qarpeoConfig.name;
|
|
505
|
+
else {
|
|
506
|
+
const siteConfig = nuxt.options.site || {};
|
|
507
|
+
if (siteConfig.name) rawName = siteConfig.name;
|
|
508
|
+
else if (process.env.CLOUDFLARE_PROJECT_NAME) rawName = process.env.CLOUDFLARE_PROJECT_NAME;
|
|
509
|
+
else if (process.env.WRANGLER_NAME) rawName = process.env.WRANGLER_NAME;
|
|
510
|
+
else if (process.env.QARPEO_WORKER_NAME) rawName = process.env.QARPEO_WORKER_NAME;
|
|
511
|
+
else if (process.env.WORKER_NAME) rawName = process.env.WORKER_NAME;
|
|
512
|
+
else if (process.env.CF_WORKER_NAME) rawName = process.env.CF_WORKER_NAME;
|
|
513
|
+
else {
|
|
514
|
+
try {
|
|
515
|
+
const pkgPath = resolve(nuxt.options.rootDir, "package.json");
|
|
516
|
+
if (existsSync(pkgPath)) {
|
|
517
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
518
|
+
if (pkg.name) rawName = pkg.name;
|
|
519
|
+
}
|
|
520
|
+
} catch {
|
|
521
|
+
}
|
|
522
|
+
}
|
|
443
523
|
}
|
|
444
|
-
} catch {
|
|
445
524
|
}
|
|
446
|
-
|
|
525
|
+
const sanitized = (rawName || "").toLowerCase().replace(/^@/, "").replace(/[^a-z0-9-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
526
|
+
return sanitized || "qarpeo-app";
|
|
447
527
|
}
|
|
448
528
|
async function createWranglerConfig(nuxt, options) {
|
|
449
529
|
let rootConfig = {};
|
|
@@ -648,6 +728,14 @@ async function createWranglerConfig(nuxt, options) {
|
|
|
648
728
|
const nitroCrons = nitroScheduled ? Object.keys(nitroScheduled) : [];
|
|
649
729
|
crons = nuxt.options.nitro?.cloudflare?.wrangler?.triggers?.crons || nitroCrons;
|
|
650
730
|
}
|
|
731
|
+
const discoveredTasks = findScheduledTasks(
|
|
732
|
+
nuxt.options._layers || [{ cwd: nuxt.options.rootDir, config: nuxt.options }]
|
|
733
|
+
);
|
|
734
|
+
for (const task of discoveredTasks) {
|
|
735
|
+
if (task.cron && !crons.includes(task.cron)) {
|
|
736
|
+
crons.push(task.cron);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
651
739
|
const cmsScheduled = typeof options.cms === "object" && options.cms?.scheduledPublish;
|
|
652
740
|
if (cmsScheduled && !crons.includes("*/5 * * * *")) {
|
|
653
741
|
crons.push("*/5 * * * *");
|
|
@@ -784,4 +872,4 @@ const wrangler = {
|
|
|
784
872
|
resolveProjectName: resolveProjectName
|
|
785
873
|
};
|
|
786
874
|
|
|
787
|
-
export { checkDrizzleVersion as a, resolveProjectName as b, createWranglerConfig as c,
|
|
875
|
+
export { checkDrizzleVersion as a, resolveProjectName as b, createWranglerConfig as c, findQueueFiles as d, ensurePackage as e, findScheduledTasks as f, findJobFiles as g, generateDevWranglerConfig as h, applyD1Migrations as i, findSchemaFiles as j, resolveBinaryPath as k, getLocalDatabaseContext as l, getJiti as m, findLocalD1Database as n, localDb as o, resolveBindingName as r, scanSchemaExports as s, wrangler as w };
|