@easy-web/cms-adapters 1.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/README.md +27 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/scaffold/generate-config.d.ts +20 -0
- package/dist/scaffold/generate-config.d.ts.map +1 -0
- package/dist/scaffold/generate-config.js +83 -0
- package/dist/scaffold/generate-config.js.map +1 -0
- package/dist/scaffold/index.d.ts +3 -0
- package/dist/scaffold/index.d.ts.map +1 -0
- package/dist/scaffold/index.js +2 -0
- package/dist/scaffold/index.js.map +1 -0
- package/dist/types/blog.d.ts +10 -0
- package/dist/types/blog.d.ts.map +1 -0
- package/dist/types/blog.js +2 -0
- package/dist/types/blog.js.map +1 -0
- package/dist/types/event.d.ts +12 -0
- package/dist/types/event.d.ts.map +1 -0
- package/dist/types/event.js +2 -0
- package/dist/types/event.js.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +8 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/link.d.ts +11 -0
- package/dist/types/link.d.ts.map +1 -0
- package/dist/types/link.js +2 -0
- package/dist/types/link.js.map +1 -0
- package/dist/types/navigation.d.ts +12 -0
- package/dist/types/navigation.d.ts.map +1 -0
- package/dist/types/navigation.js +2 -0
- package/dist/types/navigation.js.map +1 -0
- package/dist/types/page.d.ts +9 -0
- package/dist/types/page.d.ts.map +1 -0
- package/dist/types/page.js +2 -0
- package/dist/types/page.js.map +1 -0
- package/dist/types/person.d.ts +11 -0
- package/dist/types/person.d.ts.map +1 -0
- package/dist/types/person.js +2 -0
- package/dist/types/person.js.map +1 -0
- package/dist/types/site-config.d.ts +24 -0
- package/dist/types/site-config.d.ts.map +1 -0
- package/dist/types/site-config.js +2 -0
- package/dist/types/site-config.js.map +1 -0
- package/package.json +44 -0
- package/src/components/AdminPage.astro +16 -0
- package/src/components/index.ts +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# @easy-web/cms-adapters
|
|
2
|
+
|
|
3
|
+
Decap CMS integration package for the [easy-web](https://github.com/achimismaili/easy-web) ecosystem.
|
|
4
|
+
|
|
5
|
+
## What's included
|
|
6
|
+
|
|
7
|
+
- **`AdminPage` Astro component** — standalone HTML page loading Decap CMS from CDN (`unpkg.com/decap-cms@3.14.0`). No site layout, no MSAL.
|
|
8
|
+
- **Frontmatter TypeScript types** — `BlogFrontmatter`, `PageFrontmatter`, `SiteConfig` for type-safe Astro content collections.
|
|
9
|
+
- **Config scaffold utility** — `generateDecapConfigString()` and `generateDecapConfig()` to generate Decap `config.yml` for any instance.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
See `docs/entra-cms-setup.md` in your instance repo for Entra ID app registration guidance.
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import AdminPage from '@easy-web/cms-adapters/components/AdminPage.astro';
|
|
17
|
+
import type { BlogFrontmatter } from '@easy-web/cms-adapters';
|
|
18
|
+
import { generateDecapConfig } from '@easy-web/cms-adapters';
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Consumed by
|
|
22
|
+
|
|
23
|
+
- `dev.ismaili.de` — pilot instance
|
|
24
|
+
|
|
25
|
+
## Architecture
|
|
26
|
+
|
|
27
|
+
Part of the `@easy-web/*` package family. See [ADR 0006](https://github.com/achimismaili/websites/blob/main/docs/decisions/0006-cms-agnostic-adapter-pattern.md) for the design rationale.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface DecapConfigOptions {
|
|
2
|
+
tenantId: string;
|
|
3
|
+
appId: string;
|
|
4
|
+
adoOrg: string;
|
|
5
|
+
adoProject: string;
|
|
6
|
+
adoRepo: string;
|
|
7
|
+
branch?: string;
|
|
8
|
+
locales?: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface DecapConfigWriteOptions extends DecapConfigOptions {
|
|
11
|
+
outputPath: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DecapConfigWriteResult {
|
|
14
|
+
success: boolean;
|
|
15
|
+
content: string;
|
|
16
|
+
error?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function generateDecapConfigString(options: DecapConfigOptions): string;
|
|
19
|
+
export declare function generateDecapConfig(options: DecapConfigWriteOptions): Promise<DecapConfigWriteResult>;
|
|
20
|
+
//# sourceMappingURL=generate-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-config.d.ts","sourceRoot":"","sources":["../../src/scaffold/generate-config.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAoBD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAmD7E;AAWD,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,sBAAsB,CAAC,CAejC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { writeFile, access } from 'node:fs/promises';
|
|
2
|
+
function buildBlogCollection(locale) {
|
|
3
|
+
return (` - label: "Blog (${locale})"\n` +
|
|
4
|
+
` name: blog_${locale}\n` +
|
|
5
|
+
` folder: "src/content/blog/${locale}"\n` +
|
|
6
|
+
` create: true\n` +
|
|
7
|
+
` format: frontmatter\n` +
|
|
8
|
+
` fields:\n` +
|
|
9
|
+
` - { name: title, label: Title, widget: string }\n` +
|
|
10
|
+
` - { name: description, label: Description, widget: text }\n` +
|
|
11
|
+
` - { name: pubDate, label: "Publish Date", widget: datetime }\n` +
|
|
12
|
+
` - { name: draft, label: Draft, widget: boolean, default: false }\n` +
|
|
13
|
+
` - { name: locale, label: Locale, widget: hidden, default: "${locale}" }\n` +
|
|
14
|
+
` - { name: translationKey, label: "Translation Key", widget: string }\n` +
|
|
15
|
+
` - { name: heroImage, label: "Hero Image", widget: image, required: false }`);
|
|
16
|
+
}
|
|
17
|
+
export function generateDecapConfigString(options) {
|
|
18
|
+
const { tenantId, appId, adoOrg, adoProject, adoRepo, branch = 'main', locales = ['de', 'en'], } = options;
|
|
19
|
+
const blogCollections = locales.map(buildBlogCollection).join('\n\n');
|
|
20
|
+
const localeOptions = locales.map((l) => `"${l}"`).join(', ');
|
|
21
|
+
return [
|
|
22
|
+
`backend:`,
|
|
23
|
+
` name: azure`,
|
|
24
|
+
` repo: ${adoOrg}/${adoProject}/${adoRepo}`,
|
|
25
|
+
` tenant_id: ${tenantId}`,
|
|
26
|
+
` app_id: ${appId}`,
|
|
27
|
+
` branch: ${branch}`,
|
|
28
|
+
``,
|
|
29
|
+
`media_folder: "src/assets/images"`,
|
|
30
|
+
`public_folder: "../../assets/images"`,
|
|
31
|
+
``,
|
|
32
|
+
`collections:`,
|
|
33
|
+
blogCollections,
|
|
34
|
+
``,
|
|
35
|
+
` - label: Pages`,
|
|
36
|
+
` name: pages`,
|
|
37
|
+
` folder: "src/content/pages"`,
|
|
38
|
+
` create: true`,
|
|
39
|
+
` format: frontmatter`,
|
|
40
|
+
` fields:`,
|
|
41
|
+
` - { name: title, label: Title, widget: string }`,
|
|
42
|
+
` - { name: description, label: Description, widget: text }`,
|
|
43
|
+
` - { name: locale, label: Locale, widget: select, options: [${localeOptions}] }`,
|
|
44
|
+
` - { name: translationKey, label: "Translation Key", widget: string }`,
|
|
45
|
+
``,
|
|
46
|
+
` - label: "Site Config"`,
|
|
47
|
+
` name: site_config`,
|
|
48
|
+
` files:`,
|
|
49
|
+
` - label: Company`,
|
|
50
|
+
` name: company`,
|
|
51
|
+
` file: "src/content/data/company.json"`,
|
|
52
|
+
` fields:`,
|
|
53
|
+
` - { name: companyName, label: "Company Name", widget: string }`,
|
|
54
|
+
` - { name: defaultTitle, label: "Default Title", widget: string }`,
|
|
55
|
+
` - { name: url, label: URL, widget: string }`,
|
|
56
|
+
``,
|
|
57
|
+
].join('\n');
|
|
58
|
+
}
|
|
59
|
+
async function fileExists(path) {
|
|
60
|
+
try {
|
|
61
|
+
await access(path);
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export async function generateDecapConfig(options) {
|
|
69
|
+
const { outputPath, ...configOptions } = options;
|
|
70
|
+
const content = generateDecapConfigString(configOptions);
|
|
71
|
+
if (await fileExists(outputPath)) {
|
|
72
|
+
return { success: false, content, error: `File already exists at ${outputPath}` };
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
await writeFile(outputPath, content, 'utf-8');
|
|
76
|
+
return { success: true, content };
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
80
|
+
return { success: false, content, error: `Failed to write file: ${message}` };
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=generate-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-config.js","sourceRoot":"","sources":["../../src/scaffold/generate-config.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scaffold/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAChH,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scaffold/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog.d.ts","sourceRoot":"","sources":["../../src/types/blog.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog.js","sourceRoot":"","sources":["../../src/types/blog.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface EventFrontmatter {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
date: Date;
|
|
5
|
+
endDate?: Date;
|
|
6
|
+
location?: string;
|
|
7
|
+
locale: 'de' | 'en';
|
|
8
|
+
translationKey: string;
|
|
9
|
+
image?: string;
|
|
10
|
+
featured?: boolean;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/types/event.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../src/types/event.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/types/link.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/types/link.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/types/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE;QACJ,EAAE,EAAE,OAAO,EAAE,CAAC;QACd,EAAE,EAAE,OAAO,EAAE,CAAC;KACf,CAAC;IACF,KAAK,EAAE;QACL,EAAE,EAAE,OAAO,EAAE,CAAC;QACd,EAAE,EAAE,OAAO,EAAE,CAAC;KACf,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../src/types/navigation.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../src/types/page.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../src/types/page.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"person.d.ts","sourceRoot":"","sources":["../../src/types/person.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"person.js","sourceRoot":"","sources":["../../src/types/person.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface NavItem {
|
|
2
|
+
label: string;
|
|
3
|
+
href: string;
|
|
4
|
+
external?: boolean;
|
|
5
|
+
children?: NavItem[];
|
|
6
|
+
}
|
|
7
|
+
export interface FooterColumn {
|
|
8
|
+
title: string;
|
|
9
|
+
links: NavItem[];
|
|
10
|
+
}
|
|
11
|
+
export interface SocialLink {
|
|
12
|
+
label: string;
|
|
13
|
+
href: string;
|
|
14
|
+
icon?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface SiteConfig {
|
|
17
|
+
companyName: string;
|
|
18
|
+
defaultTitle: string;
|
|
19
|
+
url: string;
|
|
20
|
+
navigation?: NavItem[];
|
|
21
|
+
footer?: FooterColumn[];
|
|
22
|
+
socialLinks?: SocialLink[];
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=site-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site-config.d.ts","sourceRoot":"","sources":["../../src/types/site-config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site-config.js","sourceRoot":"","sources":["../../src/types/site-config.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@easy-web/cms-adapters",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"packageManager": "pnpm@10.34.4",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": false,
|
|
7
|
+
"description": "Decap CMS integration for the easy-web ecosystem — AdminPage component, frontmatter types, and config scaffold.",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./components/*": "./src/components/*.astro",
|
|
14
|
+
"./src/components/*.astro": "./src/components/*.astro"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"src/components",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc",
|
|
25
|
+
"typecheck": "tsc --noEmit"
|
|
26
|
+
},
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"astro": ">=6.0.0 <8.0.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"astro": "^6.4.0",
|
|
33
|
+
"typescript": "^5.5.0"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public",
|
|
37
|
+
"provenance": true
|
|
38
|
+
},
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "https://github.com/achimismaili/easy-web.git",
|
|
42
|
+
"directory": "packages/easy-web-cms-adapters"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Standalone Decap CMS admin page — no site layout, no MSAL
|
|
3
|
+
---
|
|
4
|
+
<!DOCTYPE html>
|
|
5
|
+
<html lang="en">
|
|
6
|
+
<head>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
9
|
+
<meta name="robots" content="noindex" />
|
|
10
|
+
<title>Content Manager</title>
|
|
11
|
+
<link rel="cms-config-url" href="/admin/config.yml" type="text/yaml" />
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<script src="https://unpkg.com/decap-cms@3.14.0/dist/decap-cms.js" is:inline></script>
|
|
15
|
+
</body>
|
|
16
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AdminPage } from './AdminPage.astro';
|