@fnd-platform/cms 1.0.0-alpha.7 → 1.0.0-alpha.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"content-types-registry.d.ts","sourceRoot":"","sources":["../../src/templates/content-types-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,IAAI,MAAM,CA0ExD"}
1
+ {"version":3,"file":"content-types-registry.d.ts","sourceRoot":"","sources":["../../src/templates/content-types-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,IAAI,MAAM,CAuFxD"}
@@ -1,5 +1,5 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getContentTypesRegistryTemplate = getContentTypesRegistryTemplate;
4
4
  /**
5
5
  * Generates the content types registry template.
@@ -10,7 +10,7 @@ exports.getContentTypesRegistryTemplate = getContentTypesRegistryTemplate;
10
10
  * @returns Template string for app/content-types/index.ts
11
11
  */
12
12
  function getContentTypesRegistryTemplate() {
13
- return `/**
13
+ return `/**
14
14
  * Content Types Registry
15
15
  *
16
16
  * This module provides a central registry for all content types
@@ -76,6 +76,19 @@ export function getContentTypeNames(): string[] {
76
76
  registerContentType(blogPost);
77
77
  registerContentType(page);
78
78
 
79
+ // ============================================================================
80
+ // Content Types Object
81
+ // ============================================================================
82
+
83
+ /**
84
+ * Object containing all content types keyed by their name.
85
+ * Use this for direct access to content types in routes and components.
86
+ */
87
+ export const contentTypes: Record<string, ContentType> = {
88
+ 'blog-post': blogPost,
89
+ 'page': page,
90
+ };
91
+
79
92
  // ============================================================================
80
93
  // Exports
81
94
  // ============================================================================
@@ -84,4 +97,4 @@ export { blogPost } from './blog-post';
84
97
  export { page } from './page';
85
98
  `;
86
99
  }
87
- //# sourceMappingURL=content-types-registry.js.map
100
+ //# sourceMappingURL=content-types-registry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-types-registry.js","sourceRoot":"","sources":["../../src/templates/content-types-registry.ts"],"names":[],"mappings":";;AAQA,0EA0EC;AAlFD;;;;;;;GAOG;AACH,SAAgB,+BAA+B;IAC7C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwER,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"content-types-registry.js","sourceRoot":"","sources":["../../src/templates/content-types-registry.ts"],"names":[],"mappings":";;AAQA,0EAuFC;AA/FD;;;;;;;GAOG;AACH,SAAgB,+BAA+B;IAC7C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFR,CAAC;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fnd-platform/cms",
3
- "version": "1.0.0-alpha.7",
3
+ "version": "1.0.0-alpha.8",
4
4
  "description": "Projen project class for generating CMS admin packages in fnd-platform",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",