@aphexcms/cms-core 2.1.2 → 4.0.0
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/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +43 -4
- package/dist/lib/index.d.ts +9 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +43 -4
- package/dist/lib/index.js.map +1 -1
- package/package.json +1 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './types/index.js';
|
|
2
|
+
export type { SidebarUser, SidebarNavItem, SidebarBranding, SidebarData } from './types/sidebar.js';
|
|
3
|
+
export * from './field-validation/rule.js';
|
|
4
|
+
export * from './field-validation/utils.js';
|
|
5
|
+
export { createContentHash, hasUnpublishedChanges } from './utils/content-hash.js';
|
|
6
|
+
export * from './schema-utils/index.js';
|
|
7
|
+
export * from './utils/index.js';
|
|
8
|
+
export * from './api/index.js';
|
|
9
|
+
export type { ApiResponse } from './api/index.js';
|
|
2
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAkBA,cAAc,eAAe,CAAC;AAC9B,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGjG,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AAGzC,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAGhF,cAAc,sBAAsB,CAAC;AAGrC,cAAc,eAAe,CAAC;AAG9B,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,43 @@
|
|
|
1
|
-
// Aphex CMS Core - Main exports
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
1
|
+
// Aphex CMS Core - Main exports
|
|
2
|
+
//
|
|
3
|
+
// This barrel is the "universal" entry point: every export here is safe to
|
|
4
|
+
// resolve from Node ESM as well as Vite/SvelteKit — i.e. no `.svelte`
|
|
5
|
+
// component files. That matters because ES-module `export *` eagerly links
|
|
6
|
+
// every re-export, and if any server-side import path hits a raw `.svelte`
|
|
7
|
+
// re-export, Node's native loader throws `ERR_UNKNOWN_FILE_EXTENSION` for
|
|
8
|
+
// anything it happens to resolve through native ESM (SSR edge cases,
|
|
9
|
+
// loader-hook workers, etc).
|
|
10
|
+
//
|
|
11
|
+
// If you need the Svelte admin components (`DocumentEditor`, `AdminApp`,
|
|
12
|
+
// `Sidebar`, field components, `ConfirmDialogHost`, `PermissionsDebug`…)
|
|
13
|
+
// import them from `@aphexcms/cms-core/client` instead.
|
|
14
|
+
//
|
|
15
|
+
// For server-only functionality (adapters, hooks, engine, routes), import
|
|
16
|
+
// from `@aphexcms/cms-core/server`.
|
|
17
|
+
// Core types (shared between client and server)
|
|
18
|
+
export * from './types/index.js';
|
|
19
|
+
// Field validation
|
|
20
|
+
export * from './field-validation/rule.js';
|
|
21
|
+
export * from './field-validation/utils.js';
|
|
22
|
+
// Content hashing utilities
|
|
23
|
+
export { createContentHash, hasUnpublishedChanges } from './utils/content-hash.js';
|
|
24
|
+
// Schema utilities
|
|
25
|
+
export * from './schema-utils/index.js';
|
|
26
|
+
// General utility functions (logger, image URL builder, etc)
|
|
27
|
+
export * from './utils/index.js';
|
|
28
|
+
// Unified API client
|
|
29
|
+
export * from './api/index.js';
|
|
30
|
+
// NOTE: The following are intentionally NOT re-exported from this root
|
|
31
|
+
// barrel. They're all Svelte runtime constructs — rune modules that use
|
|
32
|
+
// `$state` or real `.svelte` components — and re-exporting them here would
|
|
33
|
+
// transitively pull Svelte-only code through every import of
|
|
34
|
+
// `@aphexcms/cms-core`, breaking Node-side usage (SSR module evaluation,
|
|
35
|
+
// loader hooks, etc). Import from their dedicated subpaths instead:
|
|
36
|
+
//
|
|
37
|
+
// import { setSchemaContext, getSchemaContext } from '@aphexcms/cms-core/client';
|
|
38
|
+
// import { setPermissionsContext, usePermissions } from '@aphexcms/cms-core/client';
|
|
39
|
+
// import { confirmDialog } from '@aphexcms/cms-core/client';
|
|
40
|
+
// import { toast } from 'svelte-sonner';
|
|
41
|
+
//
|
|
42
|
+
// Only use the root barrel (`@aphexcms/cms-core`) for server-safe utilities,
|
|
43
|
+
// types, and pure JS helpers.
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './types/index.js';
|
|
2
|
+
export type { SidebarUser, SidebarNavItem, SidebarBranding, SidebarData } from './types/sidebar.js';
|
|
3
|
+
export * from './field-validation/rule.js';
|
|
4
|
+
export * from './field-validation/utils.js';
|
|
5
|
+
export { createContentHash, hasUnpublishedChanges } from './utils/content-hash.js';
|
|
6
|
+
export * from './schema-utils/index.js';
|
|
7
|
+
export * from './utils/index.js';
|
|
8
|
+
export * from './api/index.js';
|
|
9
|
+
export type { ApiResponse } from './api/index.js';
|
|
2
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAkBA,cAAc,eAAe,CAAC;AAC9B,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGjG,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AAGzC,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAGhF,cAAc,sBAAsB,CAAC;AAGrC,cAAc,eAAe,CAAC;AAG9B,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/lib/index.js
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
|
-
// Aphex CMS Core - Main exports
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
1
|
+
// Aphex CMS Core - Main exports
|
|
2
|
+
//
|
|
3
|
+
// This barrel is the "universal" entry point: every export here is safe to
|
|
4
|
+
// resolve from Node ESM as well as Vite/SvelteKit — i.e. no `.svelte`
|
|
5
|
+
// component files. That matters because ES-module `export *` eagerly links
|
|
6
|
+
// every re-export, and if any server-side import path hits a raw `.svelte`
|
|
7
|
+
// re-export, Node's native loader throws `ERR_UNKNOWN_FILE_EXTENSION` for
|
|
8
|
+
// anything it happens to resolve through native ESM (SSR edge cases,
|
|
9
|
+
// loader-hook workers, etc).
|
|
10
|
+
//
|
|
11
|
+
// If you need the Svelte admin components (`DocumentEditor`, `AdminApp`,
|
|
12
|
+
// `Sidebar`, field components, `ConfirmDialogHost`, `PermissionsDebug`…)
|
|
13
|
+
// import them from `@aphexcms/cms-core/client` instead.
|
|
14
|
+
//
|
|
15
|
+
// For server-only functionality (adapters, hooks, engine, routes), import
|
|
16
|
+
// from `@aphexcms/cms-core/server`.
|
|
17
|
+
// Core types (shared between client and server)
|
|
18
|
+
export * from './types/index.js';
|
|
19
|
+
// Field validation
|
|
20
|
+
export * from './field-validation/rule.js';
|
|
21
|
+
export * from './field-validation/utils.js';
|
|
22
|
+
// Content hashing utilities
|
|
23
|
+
export { createContentHash, hasUnpublishedChanges } from './utils/content-hash.js';
|
|
24
|
+
// Schema utilities
|
|
25
|
+
export * from './schema-utils/index.js';
|
|
26
|
+
// General utility functions (logger, image URL builder, etc)
|
|
27
|
+
export * from './utils/index.js';
|
|
28
|
+
// Unified API client
|
|
29
|
+
export * from './api/index.js';
|
|
30
|
+
// NOTE: The following are intentionally NOT re-exported from this root
|
|
31
|
+
// barrel. They're all Svelte runtime constructs — rune modules that use
|
|
32
|
+
// `$state` or real `.svelte` components — and re-exporting them here would
|
|
33
|
+
// transitively pull Svelte-only code through every import of
|
|
34
|
+
// `@aphexcms/cms-core`, breaking Node-side usage (SSR module evaluation,
|
|
35
|
+
// loader hooks, etc). Import from their dedicated subpaths instead:
|
|
36
|
+
//
|
|
37
|
+
// import { setSchemaContext, getSchemaContext } from '@aphexcms/cms-core/client';
|
|
38
|
+
// import { setPermissionsContext, usePermissions } from '@aphexcms/cms-core/client';
|
|
39
|
+
// import { confirmDialog } from '@aphexcms/cms-core/client';
|
|
40
|
+
// import { toast } from 'svelte-sonner';
|
|
41
|
+
//
|
|
42
|
+
// Only use the root barrel (`@aphexcms/cms-core`) for server-safe utilities,
|
|
43
|
+
// types, and pure JS helpers.
|
|
5
44
|
//# sourceMappingURL=index.js.map
|
package/dist/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,EAAE;AACF,2EAA2E;AAC3E,sEAAsE;AACtE,2EAA2E;AAC3E,2EAA2E;AAC3E,0EAA0E;AAC1E,qEAAqE;AACrE,6BAA6B;AAC7B,EAAE;AACF,yEAAyE;AACzE,yEAAyE;AACzE,wDAAwD;AACxD,EAAE;AACF,0EAA0E;AAC1E,oCAAoC;AAEpC,gDAAgD;AAChD,cAAc,eAAe,CAAC;AAG9B,mBAAmB;AACnB,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AAEzC,4BAA4B;AAC5B,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAEhF,mBAAmB;AACnB,cAAc,sBAAsB,CAAC;AAErC,6DAA6D;AAC7D,cAAc,eAAe,CAAC;AAE9B,qBAAqB;AACrB,cAAc,aAAa,CAAC;AAG5B,uEAAuE;AACvE,wEAAwE;AACxE,2EAA2E;AAC3E,6DAA6D;AAC7D,yEAAyE;AACzE,oEAAoE;AACpE,EAAE;AACF,oFAAoF;AACpF,uFAAuF;AACvF,+DAA+D;AAC/D,2CAA2C;AAC3C,EAAE;AACF,6EAA6E;AAC7E,8BAA8B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aphexcms/cms-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Aphex CMS Core - A Sanity-style CMS with ports and adapters architecture",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -26,32 +26,26 @@
|
|
|
26
26
|
},
|
|
27
27
|
"./server": {
|
|
28
28
|
"types": "./dist/server/index.d.ts",
|
|
29
|
-
"svelte": "./dist/server/index.js",
|
|
30
29
|
"default": "./dist/server/index.js"
|
|
31
30
|
},
|
|
32
31
|
"./client": {
|
|
33
32
|
"types": "./dist/client/index.d.ts",
|
|
34
|
-
"svelte": "./dist/client/index.js",
|
|
35
33
|
"default": "./dist/client/index.js"
|
|
36
34
|
},
|
|
37
35
|
"./schema": {
|
|
38
36
|
"types": "./dist/schema/index.d.ts",
|
|
39
|
-
"svelte": "./dist/schema/index.js",
|
|
40
37
|
"default": "./dist/schema/index.js"
|
|
41
38
|
},
|
|
42
39
|
"./app-augment": {
|
|
43
40
|
"types": "./dist/app-augment.d.ts",
|
|
44
|
-
"svelte": "./dist/app-augment.js",
|
|
45
41
|
"default": "./dist/app-augment.js"
|
|
46
42
|
},
|
|
47
43
|
"./routes/*": {
|
|
48
44
|
"types": "./dist/routes/*.d.ts",
|
|
49
|
-
"svelte": "./dist/routes/*.js",
|
|
50
45
|
"default": "./dist/routes/*.js"
|
|
51
46
|
},
|
|
52
47
|
"./*": {
|
|
53
48
|
"types": "./dist/*.d.ts",
|
|
54
|
-
"svelte": "./dist/*.js",
|
|
55
49
|
"default": "./dist/*.js"
|
|
56
50
|
}
|
|
57
51
|
},
|