qarpeo 0.1.33 → 0.1.34

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.
Files changed (53) hide show
  1. package/README.md +5 -7
  2. package/dist/chunks/auth-schema.mjs +12 -10
  3. package/dist/chunks/wrangler.mjs +1 -1
  4. package/dist/module.d.ts +1 -0
  5. package/dist/module.mjs +272 -100
  6. package/dist/runtime/app/components/Comments.vue +411 -0
  7. package/dist/runtime/app/composables/cms.d.ts +11 -7
  8. package/dist/runtime/app/composables/cms.mjs +36 -68
  9. package/dist/runtime/app/composables/comments.d.ts +45 -0
  10. package/dist/runtime/app/composables/comments.mjs +150 -0
  11. package/dist/runtime/server/db/cms-schema.d.ts +1 -1
  12. package/dist/runtime/server/db/cms-schema.mjs +1 -2
  13. package/dist/runtime/server/routes/cms/[collection]/index.get.mjs +2 -0
  14. package/dist/runtime/server/routes/cms/publish-scheduled.post.mjs +7 -4
  15. package/dist/runtime/server/routes/cms/subscribers/[id].patch.mjs +9 -2
  16. package/dist/runtime/server/routes/cms/webhooks/[provider].post.mjs +41 -28
  17. package/dist/runtime/server/routes/comments/[id]/react.post.d.ts +6 -0
  18. package/dist/runtime/server/routes/comments/[id]/react.post.mjs +35 -0
  19. package/dist/runtime/server/routes/{cms/comments/[id].patch.d.ts → comments/[id]/report.post.d.ts} +1 -2
  20. package/dist/runtime/server/routes/comments/[id]/report.post.mjs +50 -0
  21. package/dist/runtime/server/routes/{cms/comments → comments}/[id].delete.d.ts +0 -1
  22. package/dist/runtime/server/routes/comments/[id].delete.mjs +27 -0
  23. package/dist/runtime/server/routes/{cms/comments → comments}/[id].get.d.ts +1 -1
  24. package/dist/runtime/server/routes/comments/[id].get.mjs +14 -0
  25. package/dist/runtime/server/routes/comments/[id].patch.d.ts +4 -0
  26. package/dist/runtime/server/routes/comments/[id].patch.mjs +37 -0
  27. package/dist/runtime/server/routes/{cms/comments.get.d.ts → comments/index.get.d.ts} +1 -1
  28. package/dist/runtime/server/routes/comments/index.get.mjs +34 -0
  29. package/dist/runtime/server/routes/comments/index.post.d.ts +4 -0
  30. package/dist/runtime/server/routes/comments/index.post.mjs +36 -0
  31. package/dist/runtime/server/utils/audit.d.ts +3 -3
  32. package/dist/runtime/server/utils/audit.mjs +43 -17
  33. package/dist/runtime/server/utils/auth.mjs +14 -10
  34. package/dist/runtime/server/utils/cms/git.mjs +2 -6
  35. package/dist/runtime/server/utils/cms.d.ts +17 -22
  36. package/dist/runtime/server/utils/cms.mjs +144 -309
  37. package/dist/runtime/server/utils/comments.d.ts +112 -0
  38. package/dist/runtime/server/utils/comments.mjs +450 -0
  39. package/dist/runtime/server/utils/config.d.ts +2 -1
  40. package/dist/runtime/server/utils/config.mjs +1 -0
  41. package/dist/runtime/server/utils/urn.d.ts +15 -0
  42. package/dist/runtime/server/utils/urn.mjs +20 -0
  43. package/dist/runtime/server.d.ts +3 -0
  44. package/dist/types.d.ts +67 -27
  45. package/dist/utils/comments-schema.d.ts +13 -0
  46. package/package.json +4 -4
  47. package/dist/runtime/app/components/CMSComments.vue +0 -202
  48. package/dist/runtime/server/routes/cms/comments/[id].delete.mjs +0 -12
  49. package/dist/runtime/server/routes/cms/comments/[id].get.mjs +0 -13
  50. package/dist/runtime/server/routes/cms/comments/[id].patch.mjs +0 -17
  51. package/dist/runtime/server/routes/cms/comments.get.mjs +0 -43
  52. package/dist/runtime/server/routes/cms/comments.post.d.ts +0 -17
  53. package/dist/runtime/server/routes/cms/comments.post.mjs +0 -46
package/README.md CHANGED
@@ -50,13 +50,11 @@ export default defineNuxtConfig({
50
50
  ai: true,
51
51
  browser: true,
52
52
 
53
- // Domain Kits
54
- kits: {
55
- auth: true,
56
- cms: true,
57
- payments: true,
58
- notifications: true,
59
- },
53
+ // Full-Stack Modules
54
+ auth: true,
55
+ cms: true,
56
+ payments: true,
57
+ notifications: true,
60
58
  },
61
59
  })
62
60
  ```
@@ -116,24 +116,26 @@ import { sqliteTable, text, integer, blob, index } from "drizzle-orm/sqlite-core
116
116
  `});`,
117
117
  ``,
118
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", {`,
119
+ `export const auditLogs = sqliteTable("_qarpeo_audit_logs", {`,
120
120
  ` id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),`,
121
- ` userId: text("user_id").references(() => user.id, { onDelete: "set null" }),`,
121
+ ` userId: text("user_id"),`,
122
122
  ` action: text("action").notNull(),`,
123
123
  ` targetType: text("target_type"),`,
124
124
  ` targetId: text("target_id"),`,
125
125
  ` details: text("details", { mode: "json" }),`,
126
126
  ` ipAddress: text("ip_address"),`,
127
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'))\`),`,
128
+ ` createdAt: integer("created_at", { mode: "timestamp_ms" })`,
129
+ ` .notNull()`,
130
+ ` .$defaultFn(() => new Date()),`,
131
+ ` updatedAt: integer("updated_at", { mode: "timestamp_ms" })`,
132
+ ` .notNull()`,
133
+ ` .$defaultFn(() => new Date()),`,
132
134
  `}, (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),`,
135
+ ` index("_qarpeo_audit_logs_user_id_idx").on(table.userId),`,
136
+ ` index("_qarpeo_audit_logs_action_idx").on(table.action),`,
137
+ ` index("_qarpeo_audit_logs_target_idx").on(table.targetType, table.targetId),`,
138
+ ` index("_qarpeo_audit_logs_created_at_idx").on(table.createdAt),`,
137
139
  `]);`,
138
140
  `export const _qarpeo_audit_logs = auditLogs;`,
139
141
  `export { auditLogs as audit_logs };`
@@ -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.33";
12
+ const version = "0.1.34";
13
13
 
14
14
  function scanSchemaExports(schemaFiles) {
15
15
  const types = [];
package/dist/module.d.ts CHANGED
@@ -10,6 +10,7 @@ export { generateAuthSchema, getActiveAuthTableNames } from "./utils/auth-schema
10
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
+ export { generateCommentsSchema, getActiveCommentsTableNames, ALL_COMMENTS_TABLE_NAMES, } from "./utils/comments-schema";
13
14
  export { scanContentEntries } from "./utils/cms-scan";
14
15
  export { generateTenantsSchema, getActiveTenantsTableNames } from "./utils/tenants-schema";
15
16
  export { resolveAllCmsSources, discoverSources, resolveSourcePrefix, isRemoteSource, matchesSourceFilters, matchesGlobFilter, stripOrderPrefix, extractOrderPrefix, isGroupSegment, extractGroupTitle, matchPathPatterns, resolveCollectionForPath, } from "./utils/cms-sources";