qarpeo 0.1.14 → 0.1.15
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/wrangler.mjs +1 -1
- package/dist/cli/index.mjs +2 -2
- package/dist/module.mjs +2 -47
- package/dist/utils/auth-schema.d.ts +1 -1
- package/package.json +1 -1
package/dist/chunks/wrangler.mjs
CHANGED
|
@@ -784,4 +784,4 @@ const wrangler = {
|
|
|
784
784
|
resolveProjectName: resolveProjectName
|
|
785
785
|
};
|
|
786
786
|
|
|
787
|
-
export {
|
|
787
|
+
export { checkDrizzleVersion as a, resolveProjectName as b, createWranglerConfig as c, findJobFiles as d, applyD1Migrations as e, findQueueFiles as f, generateDevWranglerConfig as g, findSchemaFiles as h, resolveBinaryPath as i, ensurePackage as j, getLocalDatabaseContext as k, getJiti as l, findLocalD1Database as m, localDb as n, resolveBindingName as r, scanSchemaExports as s, wrangler as w };
|
package/dist/cli/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { spawnSync } from 'node:child_process';
|
|
|
4
4
|
import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, statSync } from 'node:fs';
|
|
5
5
|
import { loadNuxtConfig } from '@nuxt/kit';
|
|
6
6
|
import { resolve, join } from 'pathe';
|
|
7
|
-
import { h as findSchemaFiles, i as resolveBinaryPath, j as ensurePackage, k as getLocalDatabaseContext, l as getJiti,
|
|
7
|
+
import { h as findSchemaFiles, i as resolveBinaryPath, j as ensurePackage, k as getLocalDatabaseContext, l as getJiti, b as resolveProjectName, a as checkDrizzleVersion, m as findLocalD1Database } from '../chunks/wrangler.mjs';
|
|
8
8
|
import { reset, seed } from 'drizzle-seed';
|
|
9
9
|
import { stdin, stdout } from 'node:process';
|
|
10
10
|
import readline from 'node:readline/promises';
|
|
@@ -2209,7 +2209,7 @@ const whoami = defineCommand({
|
|
|
2209
2209
|
const main = defineCommand({
|
|
2210
2210
|
meta: {
|
|
2211
2211
|
name: "qp",
|
|
2212
|
-
version: "0.1.
|
|
2212
|
+
version: "0.1.15",
|
|
2213
2213
|
description: "Cloudflare-native powerhouse module for Nuxt"
|
|
2214
2214
|
},
|
|
2215
2215
|
subCommands: {
|
package/dist/module.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
4
4
|
import { defineNuxtModule, useLogger, createResolver, addTemplate, addComponent, hasNuxtModule, installModule, addNitroPlugin, addImports, addServerImports, addTypeTemplate, updateTemplates, addServerImportsDir, addServerHandler, addRouteMiddleware, addPlugin, extendPages } from '@nuxt/kit';
|
|
5
5
|
import { defu } from 'defu';
|
|
6
6
|
import { join, resolve, extname, basename, dirname, normalize, relative } from 'pathe';
|
|
7
|
-
import { c as createWranglerConfig, r as
|
|
7
|
+
import { c as createWranglerConfig, r as resolveBindingName, a as checkDrizzleVersion, s as scanSchemaExports, b as resolveProjectName, f as findQueueFiles, d as findJobFiles, g as generateDevWranglerConfig, e as applyD1Migrations, h as findSchemaFiles } from './chunks/wrangler.mjs';
|
|
8
8
|
import { generateAuthSchema } from './chunks/auth-schema.mjs';
|
|
9
9
|
export { getActiveAuthTableNames } from './chunks/auth-schema.mjs';
|
|
10
10
|
import { createHash } from 'node:crypto';
|
|
@@ -19,7 +19,7 @@ import 'drizzle-orm/node-sqlite';
|
|
|
19
19
|
import 'node:process';
|
|
20
20
|
import 'node:readline/promises';
|
|
21
21
|
|
|
22
|
-
const version = "0.1.
|
|
22
|
+
const version = "0.1.15";
|
|
23
23
|
|
|
24
24
|
function ensureDevEnv(rootDir) {
|
|
25
25
|
const envPath = join(rootDir, ".env");
|
|
@@ -1488,51 +1488,6 @@ ${extraSources}
|
|
|
1488
1488
|
const configPath = resolve(nuxt.options.buildDir, "wrangler.json");
|
|
1489
1489
|
process.env.QARPEO_WRANGLER_CONFIG = configPath;
|
|
1490
1490
|
process.env.QARPEO_PERSIST_PATH = resolve(nuxt.options.rootDir, ".wrangler/state/v3");
|
|
1491
|
-
nuxt.hook("ready", async () => {
|
|
1492
|
-
try {
|
|
1493
|
-
const { existsSync: existsSync2, mkdirSync, writeFileSync } = await import('node:fs');
|
|
1494
|
-
const voidDir = resolve(nuxt.options.rootDir, ".void");
|
|
1495
|
-
if (!existsSync2(voidDir)) {
|
|
1496
|
-
mkdirSync(voidDir, { recursive: true });
|
|
1497
|
-
}
|
|
1498
|
-
const inferenceImports = [
|
|
1499
|
-
"// Auto-generated by Qarpeo for Void Resource Inference",
|
|
1500
|
-
"// Triggers Void (void.cloud) to provision Cloudflare bindings automatically"
|
|
1501
|
-
];
|
|
1502
|
-
if (options.db) inferenceImports.push('import { db } from "void/db"');
|
|
1503
|
-
if (options.kv) inferenceImports.push('import { kv } from "void/kv"');
|
|
1504
|
-
if (options.blob) inferenceImports.push('import { storage } from "void/storage"');
|
|
1505
|
-
if (options.ai) inferenceImports.push('import { ai } from "void/ai"');
|
|
1506
|
-
if (options.realtime) inferenceImports.push('import { defineLiveStream } from "void/live"');
|
|
1507
|
-
if (options.queue) inferenceImports.push('import { queues } from "void/queues"');
|
|
1508
|
-
writeFileSync(resolve(voidDir, "inference.ts"), inferenceImports.join("\n") + "\n", "utf-8");
|
|
1509
|
-
if (options.auth) {
|
|
1510
|
-
writeFileSync(
|
|
1511
|
-
resolve(voidDir, "better-auth-schema.ts"),
|
|
1512
|
-
generateAuthSchema(options.auth),
|
|
1513
|
-
"utf-8"
|
|
1514
|
-
);
|
|
1515
|
-
}
|
|
1516
|
-
const voidConfigPath = resolve(nuxt.options.rootDir, "void.config.ts");
|
|
1517
|
-
if (!existsSync2(voidConfigPath)) {
|
|
1518
|
-
const projectName = resolveProjectName(nuxt, options);
|
|
1519
|
-
const voidConfigContent = [
|
|
1520
|
-
'import { defineConfig } from "void/config"',
|
|
1521
|
-
"",
|
|
1522
|
-
"export default defineConfig({",
|
|
1523
|
-
" cloudflare: {",
|
|
1524
|
-
` name: "${projectName}",`,
|
|
1525
|
-
' compatibility_date: "2026-02-24",',
|
|
1526
|
-
' compatibility_flags: ["nodejs_compat", "nodejs_als"],',
|
|
1527
|
-
" },",
|
|
1528
|
-
"})",
|
|
1529
|
-
""
|
|
1530
|
-
].join("\n");
|
|
1531
|
-
writeFileSync(voidConfigPath, voidConfigContent, "utf-8");
|
|
1532
|
-
}
|
|
1533
|
-
} catch {
|
|
1534
|
-
}
|
|
1535
|
-
});
|
|
1536
1491
|
if (options.remote) {
|
|
1537
1492
|
process.env.QARPEO_CF_REMOTE = "1";
|
|
1538
1493
|
const hasAccountId = process.env.CLOUDFLARE_ACCOUNT_ID || process.env.CF_ACCOUNT_ID;
|
|
@@ -4,6 +4,6 @@ export declare const ALL_AUTH_TABLE_NAMES: readonly ["user", "account", "session
|
|
|
4
4
|
export declare function getActiveAuthTableNames(auth?: boolean | AuthOptions): string[];
|
|
5
5
|
/**
|
|
6
6
|
* Composes Drizzle SQLite schema conforming to the official Better Auth / void/auth specifications.
|
|
7
|
-
* Merged at build time into `#qarpeo/auth/schema` and
|
|
7
|
+
* Merged at build time into `#qarpeo/auth/schema` and virtual `@schema`.
|
|
8
8
|
*/
|
|
9
9
|
export declare function generateAuthSchema(auth?: boolean | AuthOptions): string;
|