qarpeo 0.1.31 → 0.1.32
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/README.md +9 -0
- package/dist/chunks/auth-schema.mjs +28 -16
- package/dist/chunks/wrangler.mjs +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.mjs +405 -20
- package/dist/runtime/app/components/AuthRegister.vue +306 -0
- package/dist/runtime/app/components/AuthSessionsList.vue +137 -0
- package/dist/runtime/app/components/AuthSignIn.vue +298 -0
- package/dist/runtime/app/components/AuthState.vue +10 -0
- package/dist/runtime/app/components/CMSBookmarkButton.vue +59 -0
- package/dist/runtime/app/components/CMSComments.vue +202 -0
- package/dist/runtime/app/components/CMSNewsletter.vue +81 -0
- package/dist/runtime/app/components/CMSTableOfContents.vue +84 -0
- package/dist/runtime/app/components/NotificationBell.vue +263 -0
- package/dist/runtime/app/components/NotificationList.vue +205 -0
- package/dist/runtime/app/components/NotificationPrompt.vue +133 -0
- package/dist/runtime/app/components/PricingGated.vue +81 -0
- package/dist/runtime/app/components/PricingTable.vue +274 -0
- package/dist/runtime/app/components/RealtimeChat.vue +164 -0
- package/dist/runtime/app/components/RealtimeCursors.vue +139 -0
- package/dist/runtime/app/components/RealtimePresence.vue +129 -0
- package/dist/runtime/app/components/RealtimeStatus.vue +79 -0
- package/dist/runtime/app/components/SubscriptionCard.vue +207 -0
- package/dist/runtime/app/components/UserProfile.vue +558 -0
- package/dist/runtime/app/composables/cms-preview.mjs +14 -2
- package/dist/runtime/app/composables/cms.d.ts +107 -14
- package/dist/runtime/app/composables/cms.mjs +306 -9
- package/dist/runtime/app/composables/payments.d.ts +2 -0
- package/dist/runtime/app/composables/payments.mjs +22 -0
- package/dist/runtime/app/composables/realtime.d.ts +2 -0
- package/dist/runtime/app/composables/realtime.mjs +11 -0
- package/dist/runtime/app/composables/site.mjs +1 -1
- package/dist/runtime/app/pages/devtools/notifications.vue +355 -0
- package/dist/runtime/blob.mjs +22 -6
- package/dist/runtime/email.mjs +4 -4
- package/dist/runtime/kv.mjs +38 -0
- package/dist/runtime/server/db/cms-schema.d.ts +820 -1
- package/dist/runtime/server/db/cms-schema.mjs +109 -3
- package/dist/runtime/server/durable-objects/agent.mjs +4 -4
- package/dist/runtime/server/middleware/auth.mjs +9 -2
- package/dist/runtime/server/middleware/devtools.mjs +14 -1
- package/dist/runtime/server/middleware/ratelimit.mjs +9 -2
- package/dist/runtime/server/middleware/tracker.mjs +3 -1
- package/dist/runtime/server/routes/agents/[agent]/chat.post.mjs +3 -5
- package/dist/runtime/server/routes/analytics/events.get.mjs +10 -1
- package/dist/runtime/server/routes/analytics/pageviews.get.mjs +10 -1
- package/dist/runtime/server/routes/analytics/summary.get.mjs +10 -1
- package/dist/runtime/server/routes/auth/audit-logs.get.d.ts +5 -0
- package/dist/runtime/server/routes/auth/audit-logs.get.mjs +19 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/revisions/[revId]/restore.post.d.ts +4 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/revisions/[revId]/restore.post.mjs +21 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/revisions/index.get.d.ts +4 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/revisions/index.get.mjs +13 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/view.post.d.ts +12 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/view.post.mjs +20 -0
- package/dist/runtime/server/routes/cms/[collection]/[slug].get.mjs +3 -1
- package/dist/runtime/server/routes/cms/[collection]/by-path.get.mjs +2 -2
- package/dist/runtime/server/routes/cms/[collection]/index.get.mjs +19 -1
- package/dist/runtime/server/routes/cms/bookmarks/[id].delete.d.ts +5 -0
- package/dist/runtime/server/routes/cms/bookmarks/[id].delete.mjs +23 -0
- package/dist/runtime/server/routes/cms/bookmarks/check.post.d.ts +4 -0
- package/dist/runtime/server/routes/cms/bookmarks/check.post.mjs +20 -0
- package/dist/runtime/server/routes/cms/bookmarks/index.get.d.ts +4 -0
- package/dist/runtime/server/routes/cms/bookmarks/index.get.mjs +16 -0
- package/dist/runtime/server/routes/cms/bookmarks/index.post.d.ts +5 -0
- package/dist/runtime/server/routes/cms/bookmarks/index.post.mjs +20 -0
- package/dist/runtime/server/routes/cms/categories/[id].delete.d.ts +5 -0
- package/dist/runtime/server/routes/cms/categories/[id].delete.mjs +13 -0
- package/dist/runtime/server/routes/cms/categories/[id].put.d.ts +5 -0
- package/dist/runtime/server/routes/cms/categories/[id].put.mjs +14 -0
- package/dist/runtime/server/routes/cms/categories.get.d.ts +5 -0
- package/dist/runtime/server/routes/cms/categories.get.mjs +6 -0
- package/dist/runtime/server/routes/cms/categories.post.d.ts +15 -0
- package/dist/runtime/server/routes/cms/categories.post.mjs +20 -0
- package/dist/runtime/server/routes/cms/comments/[id].delete.d.ts +5 -0
- package/dist/runtime/server/routes/cms/comments/[id].delete.mjs +12 -0
- package/dist/runtime/server/routes/cms/comments/[id].get.d.ts +4 -0
- package/dist/runtime/server/routes/cms/comments/[id].get.mjs +13 -0
- package/dist/runtime/server/routes/cms/comments/[id].patch.d.ts +6 -0
- package/dist/runtime/server/routes/cms/comments/[id].patch.mjs +17 -0
- package/dist/runtime/server/routes/cms/comments.get.d.ts +5 -0
- package/dist/runtime/server/routes/cms/comments.get.mjs +43 -0
- package/dist/runtime/server/routes/cms/comments.post.d.ts +17 -0
- package/dist/runtime/server/routes/cms/comments.post.mjs +46 -0
- package/dist/runtime/server/routes/cms/newsletter.post.d.ts +12 -0
- package/dist/runtime/server/routes/cms/newsletter.post.mjs +31 -0
- package/dist/runtime/server/routes/cms/preview/disable.get.mjs +3 -0
- package/dist/runtime/server/routes/cms/preview/enable.get.mjs +8 -1
- package/dist/runtime/server/routes/cms/subscribers/[id].delete.d.ts +5 -0
- package/dist/runtime/server/routes/cms/subscribers/[id].delete.mjs +12 -0
- package/dist/runtime/server/routes/cms/subscribers/[id].patch.d.ts +6 -0
- package/dist/runtime/server/routes/cms/subscribers/[id].patch.mjs +15 -0
- package/dist/runtime/server/routes/cms/subscribers.get.d.ts +5 -0
- package/dist/runtime/server/routes/cms/subscribers.get.mjs +11 -0
- package/dist/runtime/server/routes/cms/tags/[id].delete.d.ts +5 -0
- package/dist/runtime/server/routes/cms/tags/[id].delete.mjs +13 -0
- package/dist/runtime/server/routes/cms/tags.get.d.ts +4 -0
- package/dist/runtime/server/routes/cms/tags.get.mjs +6 -0
- package/dist/runtime/server/routes/cms/tags.post.d.ts +9 -0
- package/dist/runtime/server/routes/cms/tags.post.mjs +17 -0
- package/dist/runtime/server/routes/mail/bounce.post.mjs +10 -1
- package/dist/runtime/server/routes/mail/inbox/[id].get.mjs +3 -0
- package/dist/runtime/server/routes/mail/inbox.get.mjs +4 -1
- package/dist/runtime/server/routes/mail/suppressions/[email].delete.d.ts +1 -1
- package/dist/runtime/server/routes/mail/suppressions/[email].delete.mjs +17 -0
- package/dist/runtime/server/routes/mail/suppressions/index.get.d.ts +2 -1
- package/dist/runtime/server/routes/mail/suppressions/index.get.mjs +18 -1
- package/dist/runtime/server/routes/mail/suppressions/index.post.d.ts +2 -1
- package/dist/runtime/server/routes/mail/suppressions/index.post.mjs +17 -0
- package/dist/runtime/server/routes/mail/webhooks.post.mjs +10 -1
- package/dist/runtime/server/routes/notifications/send.post.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/send.post.mjs +45 -0
- package/dist/runtime/server/routes/realtime/broadcast.post.mjs +8 -0
- package/dist/runtime/server/routes/realtime/history.delete.mjs +8 -0
- package/dist/runtime/server/routes/realtime/ws.get.mjs +3 -0
- package/dist/runtime/server/routes/storage/file/[...key].delete.mjs +30 -1
- package/dist/runtime/server/routes/storage/files.get.mjs +12 -2
- package/dist/runtime/server/routes/storage/multipart/part.put.mjs +2 -2
- package/dist/runtime/server/tasks/cms/publish.d.ts +1 -3
- package/dist/runtime/server/tasks/cms/publish.mjs +0 -1
- package/dist/runtime/server/utils/audit.d.ts +32 -0
- package/dist/runtime/server/utils/audit.mjs +197 -0
- package/dist/runtime/server/utils/auth.d.ts +4 -4
- package/dist/runtime/server/utils/auth.mjs +53 -7
- package/dist/runtime/server/utils/cache.mjs +5 -1
- package/dist/runtime/server/utils/cms/common.d.ts +2 -1
- package/dist/runtime/server/utils/cms/common.mjs +1 -0
- package/dist/runtime/server/utils/cms/markdown.d.ts +5 -0
- package/dist/runtime/server/utils/cms/markdown.mjs +18 -3
- package/dist/runtime/server/utils/cms-events.mjs +6 -1
- package/dist/runtime/server/utils/cms.d.ts +151 -0
- package/dist/runtime/server/utils/cms.mjs +815 -103
- package/dist/runtime/server/utils/impersonation.mjs +4 -5
- package/dist/runtime/server/utils/mail-suppression.mjs +10 -2
- package/dist/runtime/server/utils/mail.mjs +2 -2
- package/dist/runtime/server/utils/notifications.mjs +1 -1
- package/dist/runtime/server/utils/oauth.d.ts +31 -0
- package/dist/runtime/server/utils/oauth.mjs +82 -0
- package/dist/runtime/server/utils/organization.mjs +4 -5
- package/dist/runtime/server/utils/passwordless.mjs +4 -5
- package/dist/runtime/server/utils/payments.mjs +2 -3
- package/dist/runtime/server/utils/schema-fallback.d.ts +5 -0
- package/dist/runtime/server/utils/schema-fallback.mjs +3 -0
- package/dist/runtime/server/utils/session.d.ts +4 -4
- package/dist/runtime/server/utils/storage.mjs +1 -1
- package/dist/runtime/server/utils/tenant.mjs +11 -9
- package/dist/runtime/server.d.ts +1 -0
- package/dist/runtime/server.mjs +1 -0
- package/dist/runtime/types/imports.d.ts +5 -0
- package/dist/runtime/types/index.d.ts +10 -0
- package/dist/runtime/types/r2.d.ts +22 -4
- package/dist/types.d.ts +104 -1
- package/dist/utils/auth-schema.d.ts +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -43,11 +43,20 @@ export default defineNuxtConfig({
|
|
|
43
43
|
modules: ["qarpeo"],
|
|
44
44
|
|
|
45
45
|
qarpeo: {
|
|
46
|
+
// Edge Primitives
|
|
46
47
|
db: true,
|
|
47
48
|
blob: true,
|
|
48
49
|
kv: true,
|
|
49
50
|
ai: true,
|
|
50
51
|
browser: true,
|
|
52
|
+
|
|
53
|
+
// Domain Kits
|
|
54
|
+
kits: {
|
|
55
|
+
auth: true,
|
|
56
|
+
cms: true,
|
|
57
|
+
payments: true,
|
|
58
|
+
notifications: true,
|
|
59
|
+
},
|
|
51
60
|
},
|
|
52
61
|
})
|
|
53
62
|
```
|
|
@@ -7,12 +7,13 @@ const ALL_AUTH_TABLE_NAMES = [
|
|
|
7
7
|
"passkey",
|
|
8
8
|
"organization",
|
|
9
9
|
"member",
|
|
10
|
-
"invitation"
|
|
10
|
+
"invitation",
|
|
11
|
+
"auditLogs"
|
|
11
12
|
];
|
|
12
13
|
function getActiveAuthTableNames(auth) {
|
|
13
14
|
if (!auth) return [];
|
|
14
15
|
const opts = typeof auth === "object" ? auth : {};
|
|
15
|
-
const tables = ["user", "account", "session", "verification"];
|
|
16
|
+
const tables = ["user", "account", "session", "verification", "auditLogs"];
|
|
16
17
|
if (opts.twoFactor) tables.push("twoFactor");
|
|
17
18
|
if (opts.webauthn || opts.webAuthn) tables.push("passkey");
|
|
18
19
|
if (opts.organizations) tables.push("organization", "member", "invitation");
|
|
@@ -112,7 +113,30 @@ import { sqliteTable, text, integer, blob, index } from "drizzle-orm/sqlite-core
|
|
|
112
113
|
` expiresAt: integer("expires_at", { mode: "timestamp_ms" }).notNull(),`,
|
|
113
114
|
` createdAt: integer("created_at", { mode: "timestamp_ms" }),`,
|
|
114
115
|
` updatedAt: integer("updated_at", { mode: "timestamp_ms" }),`,
|
|
115
|
-
`})
|
|
116
|
+
`});`,
|
|
117
|
+
``,
|
|
118
|
+
`// \u2500\u2500\u2500 5. Audit Logs Table \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500`,
|
|
119
|
+
`export const auditLogs = sqliteTable("audit_logs", {`,
|
|
120
|
+
` id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),`,
|
|
121
|
+
` userId: text("user_id").references(() => user.id, { onDelete: "set null" }),`,
|
|
122
|
+
` action: text("action").notNull(),`,
|
|
123
|
+
` targetType: text("target_type"),`,
|
|
124
|
+
` targetId: text("target_id"),`,
|
|
125
|
+
` details: text("details", { mode: "json" }),`,
|
|
126
|
+
` ipAddress: text("ip_address"),`,
|
|
127
|
+
` userAgent: text("user_agent"),`,
|
|
128
|
+
` createdAt: text("created_at").default(sql\`(STRFTIME('%Y-%m-%dT%H:%M:%fZ', 'NOW'))\`),`,
|
|
129
|
+
` updatedAt: text("updated_at")`,
|
|
130
|
+
` .default(sql\`(STRFTIME('%Y-%m-%dT%H:%M:%fZ', 'NOW'))\`)`,
|
|
131
|
+
` .$onUpdate(() => sql\`(STRFTIME('%Y-%m-%dT%H:%M:%fZ', 'NOW'))\`),`,
|
|
132
|
+
`}, (table) => [`,
|
|
133
|
+
` index("audit_logs_user_id_idx").on(table.userId),`,
|
|
134
|
+
` index("audit_logs_action_idx").on(table.action),`,
|
|
135
|
+
` index("audit_logs_target_idx").on(table.targetType, table.targetId),`,
|
|
136
|
+
` index("audit_logs_created_at_idx").on(table.createdAt),`,
|
|
137
|
+
`]);`,
|
|
138
|
+
`export const _qarpeo_audit_logs = auditLogs;`,
|
|
139
|
+
`export { auditLogs as audit_logs };`
|
|
116
140
|
);
|
|
117
141
|
if (opts.twoFactor) {
|
|
118
142
|
lines.push(
|
|
@@ -190,21 +214,9 @@ import { sqliteTable, text, integer, blob, index } from "drizzle-orm/sqlite-core
|
|
|
190
214
|
lines.push(
|
|
191
215
|
`export const organization = undefined;`,
|
|
192
216
|
`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(
|
|
200
|
-
`export { organization as organizations, member as members, invitation as invitations };`
|
|
217
|
+
`export const invitation = undefined;`
|
|
201
218
|
);
|
|
202
219
|
}
|
|
203
|
-
lines.push(
|
|
204
|
-
``,
|
|
205
|
-
`// Backwards compatibility aliases`,
|
|
206
|
-
`export { user as users, session as sessions, account as accounts, verification as verifications };`
|
|
207
|
-
);
|
|
208
220
|
return lines.join("\n") + "\n";
|
|
209
221
|
}
|
|
210
222
|
|
package/dist/chunks/wrangler.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
9
9
|
import { mkdir, writeFile, readFile } from 'node:fs/promises';
|
|
10
10
|
import { defu } from 'defu';
|
|
11
11
|
|
|
12
|
-
const version = "0.1.
|
|
12
|
+
const version = "0.1.32";
|
|
13
13
|
|
|
14
14
|
function scanSchemaExports(schemaFiles) {
|
|
15
15
|
const types = [];
|
package/dist/module.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { findQueueFiles } from "./utils/queue";
|
|
|
7
7
|
export { findJobFiles } from "./utils/jobs";
|
|
8
8
|
export { findAgentFiles } from "./utils/agents";
|
|
9
9
|
export { generateAuthSchema, getActiveAuthTableNames } from "./utils/auth-schema";
|
|
10
|
-
export { cmsCollections, cmsEntries, cmsRevisions, ALL_CMS_TABLE_NAMES, getActiveCmsTableNames, } from "./utils/cms-schema";
|
|
10
|
+
export { cmsCollections, cmsEntries, cmsRevisions, cmsCategories, cmsTags, cmsComments, cmsBookmarks, cmsSubscribers, ALL_CMS_TABLE_NAMES, getActiveCmsTableNames, } from "./utils/cms-schema";
|
|
11
11
|
export { generatePaymentsSchema, getActivePaymentsTableNames } from "./utils/payments-schema";
|
|
12
12
|
export { generateNotificationsSchema, getActiveNotificationsTableNames, } from "./utils/notifications-schema";
|
|
13
13
|
export { scanContentEntries } from "./utils/cms-scan";
|