@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.
Files changed (52) hide show
  1. package/README.md +27 -0
  2. package/dist/components/index.d.ts +2 -0
  3. package/dist/components/index.d.ts.map +1 -0
  4. package/dist/components/index.js +2 -0
  5. package/dist/components/index.js.map +1 -0
  6. package/dist/index.d.ts +4 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +4 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/scaffold/generate-config.d.ts +20 -0
  11. package/dist/scaffold/generate-config.d.ts.map +1 -0
  12. package/dist/scaffold/generate-config.js +83 -0
  13. package/dist/scaffold/generate-config.js.map +1 -0
  14. package/dist/scaffold/index.d.ts +3 -0
  15. package/dist/scaffold/index.d.ts.map +1 -0
  16. package/dist/scaffold/index.js +2 -0
  17. package/dist/scaffold/index.js.map +1 -0
  18. package/dist/types/blog.d.ts +10 -0
  19. package/dist/types/blog.d.ts.map +1 -0
  20. package/dist/types/blog.js +2 -0
  21. package/dist/types/blog.js.map +1 -0
  22. package/dist/types/event.d.ts +12 -0
  23. package/dist/types/event.d.ts.map +1 -0
  24. package/dist/types/event.js +2 -0
  25. package/dist/types/event.js.map +1 -0
  26. package/dist/types/index.d.ts +8 -0
  27. package/dist/types/index.d.ts.map +1 -0
  28. package/dist/types/index.js +8 -0
  29. package/dist/types/index.js.map +1 -0
  30. package/dist/types/link.d.ts +11 -0
  31. package/dist/types/link.d.ts.map +1 -0
  32. package/dist/types/link.js +2 -0
  33. package/dist/types/link.js.map +1 -0
  34. package/dist/types/navigation.d.ts +12 -0
  35. package/dist/types/navigation.d.ts.map +1 -0
  36. package/dist/types/navigation.js +2 -0
  37. package/dist/types/navigation.js.map +1 -0
  38. package/dist/types/page.d.ts +9 -0
  39. package/dist/types/page.d.ts.map +1 -0
  40. package/dist/types/page.js +2 -0
  41. package/dist/types/page.js.map +1 -0
  42. package/dist/types/person.d.ts +11 -0
  43. package/dist/types/person.d.ts.map +1 -0
  44. package/dist/types/person.js +2 -0
  45. package/dist/types/person.js.map +1 -0
  46. package/dist/types/site-config.d.ts +24 -0
  47. package/dist/types/site-config.d.ts.map +1 -0
  48. package/dist/types/site-config.js +2 -0
  49. package/dist/types/site-config.js.map +1 -0
  50. package/package.json +44 -0
  51. package/src/components/AdminPage.astro +16 -0
  52. 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,2 @@
1
+ export { default as AdminPage } from './AdminPage.astro';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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,2 @@
1
+ export { default as AdminPage } from './AdminPage.astro';
2
+ //# sourceMappingURL=index.js.map
@@ -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"}
@@ -0,0 +1,4 @@
1
+ export * from './types/index.js';
2
+ export * from './components/index.js';
3
+ export * from './scaffold/index.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -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,4 @@
1
+ export * from './types/index.js';
2
+ export * from './components/index.js';
3
+ export * from './scaffold/index.js';
4
+ //# sourceMappingURL=index.js.map
@@ -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,3 @@
1
+ export type { DecapConfigOptions, DecapConfigWriteOptions, DecapConfigWriteResult } from './generate-config.js';
2
+ export { generateDecapConfigString, generateDecapConfig } from './generate-config.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -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,2 @@
1
+ export { generateDecapConfigString, generateDecapConfig } from './generate-config.js';
2
+ //# sourceMappingURL=index.js.map
@@ -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,10 @@
1
+ export interface BlogFrontmatter {
2
+ title: string;
3
+ description: string;
4
+ pubDate: Date;
5
+ draft: boolean;
6
+ locale: 'de' | 'en';
7
+ translationKey: string;
8
+ heroImage?: string;
9
+ }
10
+ //# sourceMappingURL=blog.d.ts.map
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=blog.js.map
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.js","sourceRoot":"","sources":["../../src/types/event.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export * from './blog.js';
2
+ export * from './page.js';
3
+ export * from './site-config.js';
4
+ export * from './event.js';
5
+ export * from './person.js';
6
+ export * from './link.js';
7
+ export * from './navigation.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -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,8 @@
1
+ export * from './blog.js';
2
+ export * from './page.js';
3
+ export * from './site-config.js';
4
+ export * from './event.js';
5
+ export * from './person.js';
6
+ export * from './link.js';
7
+ export * from './navigation.js';
8
+ //# sourceMappingURL=index.js.map
@@ -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,11 @@
1
+ export interface LinkFrontmatter {
2
+ title: string;
3
+ url: string;
4
+ description?: string;
5
+ category?: string;
6
+ locale: 'de' | 'en';
7
+ translationKey: string;
8
+ image?: string;
9
+ featured?: boolean;
10
+ }
11
+ //# sourceMappingURL=link.d.ts.map
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/types/link.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import type { NavItem } from './site-config.js';
2
+ export interface NavigationConfig {
3
+ main: {
4
+ de: NavItem[];
5
+ en: NavItem[];
6
+ };
7
+ legal: {
8
+ de: NavItem[];
9
+ en: NavItem[];
10
+ };
11
+ }
12
+ //# sourceMappingURL=navigation.d.ts.map
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../src/types/navigation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export interface PageFrontmatter {
2
+ title: string;
3
+ description: string;
4
+ image?: string;
5
+ locale: 'de' | 'en';
6
+ translationKey: string;
7
+ layout?: string;
8
+ }
9
+ //# sourceMappingURL=page.d.ts.map
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page.js","sourceRoot":"","sources":["../../src/types/page.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export interface PersonFrontmatter {
2
+ name: string;
3
+ role: string;
4
+ locale: 'de' | 'en';
5
+ translationKey: string;
6
+ image?: string;
7
+ email?: string;
8
+ featured?: boolean;
9
+ order?: number;
10
+ }
11
+ //# sourceMappingURL=person.d.ts.map
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=person.js.map
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=site-config.js.map
@@ -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';