studiocms 0.4.1 → 0.4.2
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/CHANGELOG.md +10 -0
- package/dist/client/apiClient.d.ts +621 -621
- package/dist/consts.js +8 -0
- package/dist/handlers/storage-manager/core/api-core.d.ts +3 -3
- package/dist/handlers/storage-manager/core/astro-context.d.ts +1 -1
- package/dist/handlers/storage-manager/core/database.d.ts +1 -1
- package/dist/handlers/storage-manager/core/effectify-astro-context.d.ts +1 -1
- package/dist/handlers/storage-manager/core/url-mapping.d.ts +1 -1
- package/frontend/pages/studiocms_api/_handlers/sdk.ts +14 -1
- package/package.json +5 -5
package/dist/consts.js
CHANGED
|
@@ -100,6 +100,14 @@ const AstroConfigViteSettings = {
|
|
|
100
100
|
// Users will need to install these peer dependencies themselves
|
|
101
101
|
external: ["@libsql/client", "kysely-turso", "pg", "mysql2"]
|
|
102
102
|
}
|
|
103
|
+
},
|
|
104
|
+
optimizeDeps: {
|
|
105
|
+
include: ["effect", "@effect/platform", "@effect/platform-node"]
|
|
106
|
+
},
|
|
107
|
+
ssr: {
|
|
108
|
+
optimizeDeps: {
|
|
109
|
+
include: ["effect", "@effect/platform", "@effect/platform-node"]
|
|
110
|
+
}
|
|
103
111
|
}
|
|
104
112
|
};
|
|
105
113
|
const StudioCMSDefaultRobotsConfig = ({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { APICoreDefinition, AuthorizationType, ContextDriverDefinition, StorageApiBuilderDefinition, UrlMappingServiceDefinition } from '../definitions';
|
|
1
|
+
import type { APICoreDefinition, AuthorizationType, ContextDriverDefinition, StorageApiBuilderDefinition, UrlMappingServiceDefinition } from '../definitions.js';
|
|
2
2
|
/**
|
|
3
3
|
* API Core implementation.
|
|
4
4
|
*
|
|
@@ -20,6 +20,6 @@ export default class APICore<C, R> implements APICoreDefinition<C, R> {
|
|
|
20
20
|
getDriver(): ContextDriverDefinition<C, R>;
|
|
21
21
|
getUrlMappingService(): UrlMappingServiceDefinition;
|
|
22
22
|
getStorageDriver(): StorageApiBuilderDefinition<C, R>;
|
|
23
|
-
getPOST(type?: AuthorizationType): import("../definitions").StorageAPIEndpointFn<C, R>;
|
|
24
|
-
getPUT(type?: AuthorizationType): import("../definitions").StorageAPIEndpointFn<C, R>;
|
|
23
|
+
getPOST(type?: AuthorizationType): import("../definitions.js").StorageAPIEndpointFn<C, R>;
|
|
24
|
+
getPUT(type?: AuthorizationType): import("../definitions.js").StorageAPIEndpointFn<C, R>;
|
|
25
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { APIContext } from 'astro';
|
|
2
|
-
import type { ContextDriverDefinition, ContextHandler, ContextHandlerFn, ParsedContext } from '../definitions';
|
|
2
|
+
import type { ContextDriverDefinition, ContextHandler, ContextHandlerFn, ParsedContext } from '../definitions.js';
|
|
3
3
|
/**
|
|
4
4
|
* Astro Context Driver implementation.
|
|
5
5
|
*
|
|
@@ -2,7 +2,7 @@ import { HttpServerResponse } from '@effect/platform';
|
|
|
2
2
|
import type { HttpBodyError } from '@effect/platform/HttpBody';
|
|
3
3
|
import type { APIContext } from 'astro';
|
|
4
4
|
import type { Effect } from 'effect';
|
|
5
|
-
import type { ContextDriverDefinition, ContextHandler, ContextHandlerFn, ParsedContext } from '../definitions';
|
|
5
|
+
import type { ContextDriverDefinition, ContextHandler, ContextHandlerFn, ParsedContext } from '../definitions.js';
|
|
6
6
|
/**
|
|
7
7
|
* Astro Context Driver implementation.
|
|
8
8
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UrlMapping, UrlMappingDatabaseDefinition, UrlMappingServiceDefinition, UrlMetadata } from '../definitions';
|
|
1
|
+
import type { UrlMapping, UrlMappingDatabaseDefinition, UrlMappingServiceDefinition, UrlMetadata } from '../definitions.js';
|
|
2
2
|
/**
|
|
3
3
|
* URL Mapping Service implementation.
|
|
4
4
|
*
|
|
@@ -4,12 +4,25 @@ import { StudioCMSSDKApiSpec } from '@withstudiocms/api-spec';
|
|
|
4
4
|
import { SDKAPIError } from '@withstudiocms/api-spec/sdk';
|
|
5
5
|
import { experimental_AstroContainer as AstroContainer } from 'astro/container';
|
|
6
6
|
import { Effect, Layer } from 'effect';
|
|
7
|
-
import {
|
|
7
|
+
import { micromark } from 'micromark';
|
|
8
|
+
import { gfm, gfmHtml } from 'micromark-extension-gfm';
|
|
8
9
|
// biome-ignore lint/suspicious/noTsIgnore: Typechecker override for Astro component imports
|
|
9
10
|
// @ts-ignore - This is an Astro component, so we ignore TypeScript errors for this import
|
|
10
11
|
import UserListItems from '../../../components/dashboard/user-mgmt/UserListItems.astro';
|
|
11
12
|
import { ProcessChangelog } from './_utils/changelog.js';
|
|
12
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Parses a Markdown string and returns the rendered output to HTML.
|
|
16
|
+
*
|
|
17
|
+
* @param str - The Markdown string to parse.
|
|
18
|
+
* @returns The rendered output as a string.
|
|
19
|
+
*/
|
|
20
|
+
export const parseMarkdown = (str: string) =>
|
|
21
|
+
micromark(str, {
|
|
22
|
+
extensions: [gfm()],
|
|
23
|
+
htmlExtensions: [gfmHtml()],
|
|
24
|
+
});
|
|
25
|
+
|
|
13
26
|
/**
|
|
14
27
|
* Utility function to catch errors in the Effect chain and convert them into SDKAPIError instances with a provided message.
|
|
15
28
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "studiocms",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "A Community-Driven Astro native CMS. Built from the ground up by the Astro community.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "withstudiocms",
|
|
@@ -253,17 +253,17 @@
|
|
|
253
253
|
"tinyglobby": "^0.2.15",
|
|
254
254
|
"ultrahtml": "^1.6.0",
|
|
255
255
|
"web-vitals": "^5.1.0",
|
|
256
|
-
"@withstudiocms/api-spec": "^0.3.
|
|
257
|
-
"@withstudiocms/auth-kit": "^0.1.4",
|
|
256
|
+
"@withstudiocms/api-spec": "^0.3.1",
|
|
258
257
|
"@withstudiocms/internal_helpers": "^0.2.0",
|
|
259
|
-
"@withstudiocms/
|
|
258
|
+
"@withstudiocms/auth-kit": "^0.1.4",
|
|
260
259
|
"@withstudiocms/cli-kit": "^0.2.1",
|
|
260
|
+
"@withstudiocms/component-registry": "^0.1.4",
|
|
261
261
|
"@withstudiocms/config-utils": "^0.2.0",
|
|
262
262
|
"@withstudiocms/effect": "^0.4.0",
|
|
263
263
|
"@withstudiocms/template-lang": "^0.1.0",
|
|
264
264
|
"@withstudiocms/kysely": "^0.2.1",
|
|
265
265
|
"@withstudiocms/sdk": "^0.3.0",
|
|
266
|
-
"effectify": "^0.1.
|
|
266
|
+
"effectify": "^0.1.1"
|
|
267
267
|
},
|
|
268
268
|
"devDependencies": {
|
|
269
269
|
"@types/mdast": "^4.0.4",
|