opacacms 0.3.17 → 0.3.19

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 (42) hide show
  1. package/dist/admin/webcomponent.js +14 -14
  2. package/dist/admin.css +1 -1
  3. package/dist/{chunk-1bd7fz7n.js → chunk-8mqs2q7j.js} +1 -1
  4. package/dist/{chunk-2abqb0h6.js → chunk-9dsw6x4x.js} +23 -16
  5. package/dist/{chunk-b1g8jmth.js → chunk-mvz5hmdb.js} +263 -8
  6. package/dist/cli/core/seeding/auto-seed.d.ts +1 -1
  7. package/dist/cli/index.js +3 -2
  8. package/dist/config.d.ts +2 -6
  9. package/dist/db/adapter.d.ts +1 -1
  10. package/dist/db/better-sqlite.d.ts +1 -1
  11. package/dist/db/better-sqlite.js +1633 -39
  12. package/dist/db/bun-sqlite.js +1627 -37
  13. package/dist/db/d1.d.ts +1 -1
  14. package/dist/db/d1.js +2326 -31
  15. package/dist/db/index.js +29 -4
  16. package/dist/db/kysely/plugins/draft-swapper.d.ts +2 -2
  17. package/dist/db/kysely/plugins/i18n-fallback.d.ts +2 -2
  18. package/dist/db/kysely/plugins/json-flattener.d.ts +2 -2
  19. package/dist/db/kysely/plugins/virtual-field-resolver.d.ts +2 -2
  20. package/dist/db/kysely/schema-builder.d.ts +1 -1
  21. package/dist/db/kysely/snapshot/snapshot-manager.d.ts +1 -1
  22. package/dist/db/postgres.js +1623 -32
  23. package/dist/db/sqlite.d.ts +1 -1
  24. package/dist/db/sqlite.js +1632 -38
  25. package/dist/index.js +7 -9
  26. package/dist/runtimes/bun.js +3 -7
  27. package/dist/runtimes/cloudflare-workers.js +3068 -13
  28. package/dist/runtimes/next.js +3 -7
  29. package/dist/runtimes/node.js +3 -7
  30. package/dist/server.js +18 -13
  31. package/dist/storage/index.js +6 -3
  32. package/dist/types.d.ts +3 -3
  33. package/package.json +1 -1
  34. package/dist/chunk-40tky6qh.js +0 -10
  35. package/dist/chunk-5xpf5jxd.js +0 -114
  36. package/dist/chunk-gzbz5jwy.js +0 -700
  37. package/dist/chunk-h8v093av.js +0 -185
  38. package/dist/chunk-jq1drsen.js +0 -82
  39. package/dist/chunk-q5sb5dcr.js +0 -15
  40. package/dist/chunk-re459gm9.js +0 -429
  41. package/dist/chunk-s8mqwnm1.js +0 -14
  42. package/dist/chunk-z9ek88xr.js +0 -15
package/dist/db/index.js CHANGED
@@ -1,7 +1,32 @@
1
- import {
2
- BaseDatabaseAdapter
3
- } from "../chunk-s8mqwnm1.js";
4
- import"../chunk-8sqjbsgt.js";
1
+ import { createRequire } from "node:module";
2
+ var __defProp = Object.defineProperty;
3
+ var __returnValue = (v) => v;
4
+ function __exportSetter(name, newValue) {
5
+ this[name] = __returnValue.bind(null, newValue);
6
+ }
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true,
12
+ configurable: true,
13
+ set: __exportSetter.bind(all, name)
14
+ });
15
+ };
16
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
17
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
18
+ // src/db/adapter.ts
19
+ class BaseDatabaseAdapter {
20
+ get raw() {
21
+ return;
22
+ }
23
+ get db() {
24
+ return;
25
+ }
26
+ push;
27
+ pushDestructive;
28
+ migrationDir;
29
+ }
5
30
  export {
6
31
  sql,
7
32
  BaseDatabaseAdapter
@@ -15,8 +15,8 @@ export interface DraftSwapperPluginConfig {
15
15
  /**
16
16
  * Full collection registry to help with query rewriting.
17
17
  */
18
- collections?: Collection[];
19
- globals?: Global[];
18
+ collections?: Collection[] | readonly Collection[];
19
+ globals?: Global[] | readonly Global[];
20
20
  }
21
21
  /**
22
22
  * Kysely plugin that redirects queries to the centralized `_doc_versions` table when in draft mode.
@@ -5,9 +5,9 @@ import type { Collection, Global } from "../../../types";
5
5
  */
6
6
  export interface AutoTranslationFallbackPluginConfig {
7
7
  /** The list of CMS collections. */
8
- collections: Collection[];
8
+ collections: Collection[] | readonly Collection[];
9
9
  /** The list of CMS globals. */
10
- globals?: Global[];
10
+ globals?: Global[] | readonly Global[];
11
11
  /** The default locale to fallback to (e.g. 'en'). */
12
12
  defaultLocale: string;
13
13
  /** The currently requested locale (e.g. 'pt'). */
@@ -5,9 +5,9 @@ import type { Collection, Global } from "../../../types";
5
5
  */
6
6
  export interface JsonFlattenerPluginConfig {
7
7
  /** The list of CMS collections. */
8
- collections: Collection[];
8
+ collections: Collection[] | readonly Collection[];
9
9
  /** The list of CMS globals. */
10
- globals?: Global[];
10
+ globals?: Global[] | readonly Global[];
11
11
  }
12
12
  /**
13
13
  * Kysely plugin that automatically handles JSON serialization and deserialization
@@ -5,9 +5,9 @@ import type { ApiKey, Collection, Global, Session, User } from "../../../types";
5
5
  */
6
6
  export interface VirtualFieldResolverPluginConfig {
7
7
  /** The list of CMS collections. */
8
- collections: Collection[];
8
+ collections: Collection[] | readonly Collection[];
9
9
  /** The list of CMS globals. */
10
- globals?: Global[];
10
+ globals?: Global[] | readonly Global[];
11
11
  /** The current request context (Hono context or similar). */
12
12
  req?: any;
13
13
  /** The current authenticated user. */
@@ -10,6 +10,6 @@ export type DialectType = "postgres" | "sqlite" | "d1";
10
10
  * @param globals The user globals
11
11
  * @param options Push options
12
12
  */
13
- export declare function pushSchema(db: Kysely<any>, dialect: DialectType, collections: Collection[], globals?: Global[], options?: {
13
+ export declare function pushSchema(db: Kysely<any>, dialect: DialectType, collections: Collection[] | readonly Collection[], globals?: Global[] | readonly Global[], options?: {
14
14
  pushDestructive?: boolean;
15
15
  }): Promise<void>;
@@ -13,6 +13,6 @@ export interface TableSnapshot {
13
13
  export interface SchemaSnapshot {
14
14
  tables: Record<string, TableSnapshot>;
15
15
  }
16
- export declare function createSchemaSnapshot(collections: Collection[], globals: Global[], dialect: "postgres" | "sqlite" | "d1"): SchemaSnapshot;
16
+ export declare function createSchemaSnapshot(collections: Collection[] | readonly Collection[], globals: Global[] | readonly Global[], dialect: "postgres" | "sqlite" | "d1"): SchemaSnapshot;
17
17
  export declare function saveSnapshot(migrationDir: string, snapshotName: string, snapshot: SchemaSnapshot): void;
18
18
  export declare function loadLastSnapshot(migrationDir: string): SchemaSnapshot | null;