@momentumcms/core 0.1.4 → 0.1.5

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 CHANGED
@@ -1,3 +1,14 @@
1
+ ## 0.1.5 (2026-02-16)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **create-app:** add landing page, fix setup flow, theme detection, type generator, Playwright E2E ([5e0f4ed](https://github.com/DonaldMurillo/momentum-cms/commit/5e0f4ed))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - Claude Opus 4.6
10
+ - Donald Murillo @DonaldMurillo
11
+
1
12
  ## 0.1.4 (2026-02-16)
2
13
 
3
14
  This was a version bump only for core to align it with other projects, there were no code changes.
@@ -0,0 +1,292 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // libs/core/src/generators/types/generator.ts
21
+ var generator_exports = {};
22
+ __export(generator_exports, {
23
+ default: () => runExecutor
24
+ });
25
+ module.exports = __toCommonJS(generator_exports);
26
+ var import_node_fs = require("node:fs");
27
+ var import_node_path = require("node:path");
28
+ var import_node_url = require("node:url");
29
+ function fieldTypeToTS(field) {
30
+ switch (field.type) {
31
+ case "text":
32
+ case "textarea":
33
+ case "richText":
34
+ case "email":
35
+ case "password":
36
+ case "slug":
37
+ return "string";
38
+ case "number":
39
+ return "number";
40
+ case "checkbox":
41
+ return "boolean";
42
+ case "date":
43
+ return "string";
44
+ case "select":
45
+ case "radio":
46
+ if (field.options && field.options.length > 0) {
47
+ return field.options.map((opt) => `'${opt.value}'`).join(" | ");
48
+ }
49
+ return "string";
50
+ case "relationship": {
51
+ const baseType = "string";
52
+ return field.hasMany ? `${baseType}[]` : baseType;
53
+ }
54
+ case "upload":
55
+ return field.hasMany ? "string[]" : "string";
56
+ case "array":
57
+ if (field.fields && field.fields.length > 0) {
58
+ const arrayItemType = generateFieldsInterface(field.fields, " ");
59
+ return `Array<{
60
+ ${arrayItemType}
61
+ }>`;
62
+ }
63
+ return "unknown[]";
64
+ case "group":
65
+ if (field.fields && field.fields.length > 0) {
66
+ const groupType = generateFieldsInterface(field.fields, " ");
67
+ return `{
68
+ ${groupType}
69
+ }`;
70
+ }
71
+ return "Record<string, unknown>";
72
+ case "blocks":
73
+ return "unknown[]";
74
+ case "json":
75
+ return "Record<string, unknown>";
76
+ case "point":
77
+ return "[number, number]";
78
+ default:
79
+ return "unknown";
80
+ }
81
+ }
82
+ function generateFieldsInterface(fields, indent = "") {
83
+ return fields.map((field) => {
84
+ const tsType = fieldTypeToTS(field);
85
+ const optional = field.required ? "" : "?";
86
+ return `${indent} ${field.name}${optional}: ${tsType};`;
87
+ }).join("\n");
88
+ }
89
+ function slugToPascalCase(slug) {
90
+ return slug.split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
91
+ }
92
+ function getFieldWhereType(field) {
93
+ switch (field.type) {
94
+ case "text":
95
+ case "textarea":
96
+ case "richText":
97
+ case "email":
98
+ case "slug":
99
+ return `string | { equals?: string; not?: string; contains?: string; in?: string[] }`;
100
+ case "number":
101
+ return `number | { equals?: number; not?: number; gt?: number; gte?: number; lt?: number; lte?: number; in?: number[] }`;
102
+ case "checkbox":
103
+ return `boolean | { equals?: boolean }`;
104
+ case "date":
105
+ return `string | { equals?: string; not?: string; gt?: string; gte?: string; lt?: string; lte?: string }`;
106
+ case "select":
107
+ case "radio":
108
+ if (field.options && field.options.length > 0) {
109
+ const options = field.options.map((opt) => `'${opt.value}'`).join(" | ");
110
+ return `${options} | { equals?: ${options}; not?: ${options}; in?: (${options})[] }`;
111
+ }
112
+ return `string | { equals?: string; in?: string[] }`;
113
+ case "relationship":
114
+ return `string | { equals?: string; not?: string; in?: string[] }`;
115
+ default:
116
+ return "unknown";
117
+ }
118
+ }
119
+ function generateWhereClauseInterface(collection) {
120
+ const interfaceName = slugToPascalCase(collection.slug);
121
+ const lines = [];
122
+ lines.push(`/**`);
123
+ lines.push(` * Where clause type for querying the "${collection.slug}" collection.`);
124
+ lines.push(` */`);
125
+ lines.push(`export interface ${interfaceName}WhereClause {`);
126
+ lines.push(` id?: string | { equals?: string; not?: string; in?: string[] };`);
127
+ for (const field of collection.fields) {
128
+ const whereType = getFieldWhereType(field);
129
+ lines.push(` ${field.name}?: ${whereType};`);
130
+ }
131
+ const hasTimestamps = collection.timestamps !== false;
132
+ if (hasTimestamps) {
133
+ lines.push(
134
+ ` createdAt?: string | { equals?: string; gt?: string; gte?: string; lt?: string; lte?: string };`
135
+ );
136
+ lines.push(
137
+ ` updatedAt?: string | { equals?: string; gt?: string; gte?: string; lt?: string; lte?: string };`
138
+ );
139
+ }
140
+ lines.push(`}`);
141
+ return lines.join("\n");
142
+ }
143
+ function generateTypes(config) {
144
+ const lines = [
145
+ "/**",
146
+ " * Auto-generated types from Momentum CMS collection definitions.",
147
+ " * DO NOT EDIT - This file is regenerated when collections change.",
148
+ ` * Generated at: ${(/* @__PURE__ */ new Date()).toISOString()}`,
149
+ " */",
150
+ ""
151
+ ];
152
+ for (const collection of config.collections) {
153
+ const interfaceName = slugToPascalCase(collection.slug);
154
+ lines.push(`/**`);
155
+ lines.push(` * Document type for the "${collection.slug}" collection.`);
156
+ lines.push(` */`);
157
+ lines.push(`export interface ${interfaceName} {`);
158
+ lines.push(` /** Unique document identifier */`);
159
+ lines.push(` id: string;`);
160
+ const fieldsCode = generateFieldsInterface(collection.fields);
161
+ if (fieldsCode) {
162
+ lines.push(fieldsCode);
163
+ }
164
+ const hasTimestamps = collection.timestamps !== false;
165
+ if (hasTimestamps) {
166
+ lines.push(` /** Document creation timestamp */`);
167
+ lines.push(` createdAt: string;`);
168
+ lines.push(` /** Document last update timestamp */`);
169
+ lines.push(` updatedAt: string;`);
170
+ }
171
+ lines.push(`}`);
172
+ lines.push("");
173
+ }
174
+ for (const collection of config.collections) {
175
+ lines.push(generateWhereClauseInterface(collection));
176
+ lines.push("");
177
+ }
178
+ lines.push(`/**`);
179
+ lines.push(` * All collection slugs in this Momentum CMS instance.`);
180
+ lines.push(` */`);
181
+ const slugs = config.collections.map((c) => `'${c.slug}'`).join(" | ");
182
+ lines.push(`export type CollectionSlug = ${slugs || "never"};`);
183
+ lines.push("");
184
+ lines.push(`/**`);
185
+ lines.push(` * Mapping from collection slug to document type.`);
186
+ lines.push(` */`);
187
+ lines.push(`export interface MomentumCollections {`);
188
+ for (const collection of config.collections) {
189
+ const interfaceName = slugToPascalCase(collection.slug);
190
+ lines.push(` '${collection.slug}': ${interfaceName};`);
191
+ }
192
+ lines.push(`}`);
193
+ lines.push("");
194
+ lines.push(`/**`);
195
+ lines.push(` * Type-safe collection mapping for use with injectTypedMomentumAPI().`);
196
+ lines.push(` * Includes both document types and where clause types.`);
197
+ lines.push(` *`);
198
+ lines.push(` * @example`);
199
+ lines.push(` * \`\`\`typescript`);
200
+ lines.push(` * import { injectTypedMomentumAPI } from '@momentumcms/admin';`);
201
+ lines.push(` * import type { TypedMomentumCollections } from './types/momentum.generated';`);
202
+ lines.push(` *`);
203
+ lines.push(` * const api = injectTypedMomentumAPI<TypedMomentumCollections>();`);
204
+ lines.push(` * const posts = await api.posts.find({ where: { status: 'published' } });`);
205
+ lines.push(` * \`\`\``);
206
+ lines.push(` */`);
207
+ lines.push(`export type TypedMomentumCollections = {`);
208
+ for (const collection of config.collections) {
209
+ const interfaceName = slugToPascalCase(collection.slug);
210
+ lines.push(
211
+ ` '${collection.slug}': { doc: ${interfaceName}; where: ${interfaceName}WhereClause };`
212
+ );
213
+ }
214
+ lines.push(`};`);
215
+ lines.push("");
216
+ lines.push(`/**`);
217
+ lines.push(` * Helper type for getting document type from collection slug.`);
218
+ lines.push(` */`);
219
+ lines.push(`export type DocumentType<S extends CollectionSlug> = MomentumCollections[S];`);
220
+ lines.push("");
221
+ lines.push(`/**`);
222
+ lines.push(` * Helper type for getting where clause type from collection slug.`);
223
+ lines.push(` */`);
224
+ lines.push(
225
+ `export type WhereClauseType<S extends CollectionSlug> = TypedMomentumCollections[S]['where'];`
226
+ );
227
+ lines.push("");
228
+ return lines.join("\n");
229
+ }
230
+ async function loadConfig(configPath) {
231
+ try {
232
+ const configUrl = (0, import_node_url.pathToFileURL)(configPath).href;
233
+ const configModule = await import(configUrl);
234
+ return configModule.default || configModule;
235
+ } catch (error) {
236
+ throw new Error(`Failed to load config from ${configPath}: ${error}`);
237
+ }
238
+ }
239
+ async function runExecutor(options, context) {
240
+ const projectRoot = context.projectsConfigurations?.projects[context.projectName ?? ""]?.root;
241
+ const root = projectRoot ? (0, import_node_path.join)(context.root, projectRoot) : context.root;
242
+ const configPath = (0, import_node_path.resolve)(root, options.configPath);
243
+ const outputPath = (0, import_node_path.resolve)(root, options.outputPath);
244
+ console.info(`Generating types from: ${configPath}`);
245
+ console.info(`Output to: ${outputPath}`);
246
+ async function generate() {
247
+ try {
248
+ const config = await loadConfig(configPath);
249
+ const types = generateTypes(config);
250
+ (0, import_node_fs.writeFileSync)(outputPath, types, "utf-8");
251
+ console.info(`Types generated successfully!`);
252
+ } catch (error) {
253
+ console.error(`Error generating types:`, error);
254
+ throw error;
255
+ }
256
+ }
257
+ await generate();
258
+ if (options.watch) {
259
+ console.info(`Watching for changes...`);
260
+ const configDir = (0, import_node_path.dirname)(configPath);
261
+ (0, import_node_fs.watch)(configDir, { recursive: true }, async (eventType, filename) => {
262
+ if (filename?.endsWith(".ts")) {
263
+ console.info(`Change detected: ${filename}`);
264
+ try {
265
+ await generate();
266
+ } catch {
267
+ }
268
+ }
269
+ });
270
+ return new Promise(() => {
271
+ });
272
+ }
273
+ return { success: true };
274
+ }
275
+ if (process.argv[1]?.endsWith("generator.ts") || process.argv[1]?.endsWith("generator.js") || process.argv[1]?.endsWith("generator.cjs")) {
276
+ const args = process.argv.slice(2);
277
+ const configPath = args[0];
278
+ const outputPath = args[1] || "src/types/momentum.generated.ts";
279
+ const watchMode = args.includes("--watch");
280
+ if (!configPath) {
281
+ console.error("Usage: npx ts-node generator.ts <config-path> [output-path] [--watch]");
282
+ process.exit(1);
283
+ }
284
+ runExecutor({ configPath, outputPath, watch: watchMode }, { root: process.cwd() }).then((result) => {
285
+ if (!result.success) {
286
+ process.exit(1);
287
+ }
288
+ }).catch((error) => {
289
+ console.error(error);
290
+ process.exit(1);
291
+ });
292
+ }
@@ -0,0 +1,271 @@
1
+ // libs/core/src/generators/types/generator.ts
2
+ import { writeFileSync, watch } from "node:fs";
3
+ import { dirname, resolve, join } from "node:path";
4
+ import { pathToFileURL } from "node:url";
5
+ function fieldTypeToTS(field) {
6
+ switch (field.type) {
7
+ case "text":
8
+ case "textarea":
9
+ case "richText":
10
+ case "email":
11
+ case "password":
12
+ case "slug":
13
+ return "string";
14
+ case "number":
15
+ return "number";
16
+ case "checkbox":
17
+ return "boolean";
18
+ case "date":
19
+ return "string";
20
+ case "select":
21
+ case "radio":
22
+ if (field.options && field.options.length > 0) {
23
+ return field.options.map((opt) => `'${opt.value}'`).join(" | ");
24
+ }
25
+ return "string";
26
+ case "relationship": {
27
+ const baseType = "string";
28
+ return field.hasMany ? `${baseType}[]` : baseType;
29
+ }
30
+ case "upload":
31
+ return field.hasMany ? "string[]" : "string";
32
+ case "array":
33
+ if (field.fields && field.fields.length > 0) {
34
+ const arrayItemType = generateFieldsInterface(field.fields, " ");
35
+ return `Array<{
36
+ ${arrayItemType}
37
+ }>`;
38
+ }
39
+ return "unknown[]";
40
+ case "group":
41
+ if (field.fields && field.fields.length > 0) {
42
+ const groupType = generateFieldsInterface(field.fields, " ");
43
+ return `{
44
+ ${groupType}
45
+ }`;
46
+ }
47
+ return "Record<string, unknown>";
48
+ case "blocks":
49
+ return "unknown[]";
50
+ case "json":
51
+ return "Record<string, unknown>";
52
+ case "point":
53
+ return "[number, number]";
54
+ default:
55
+ return "unknown";
56
+ }
57
+ }
58
+ function generateFieldsInterface(fields, indent = "") {
59
+ return fields.map((field) => {
60
+ const tsType = fieldTypeToTS(field);
61
+ const optional = field.required ? "" : "?";
62
+ return `${indent} ${field.name}${optional}: ${tsType};`;
63
+ }).join("\n");
64
+ }
65
+ function slugToPascalCase(slug) {
66
+ return slug.split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
67
+ }
68
+ function getFieldWhereType(field) {
69
+ switch (field.type) {
70
+ case "text":
71
+ case "textarea":
72
+ case "richText":
73
+ case "email":
74
+ case "slug":
75
+ return `string | { equals?: string; not?: string; contains?: string; in?: string[] }`;
76
+ case "number":
77
+ return `number | { equals?: number; not?: number; gt?: number; gte?: number; lt?: number; lte?: number; in?: number[] }`;
78
+ case "checkbox":
79
+ return `boolean | { equals?: boolean }`;
80
+ case "date":
81
+ return `string | { equals?: string; not?: string; gt?: string; gte?: string; lt?: string; lte?: string }`;
82
+ case "select":
83
+ case "radio":
84
+ if (field.options && field.options.length > 0) {
85
+ const options = field.options.map((opt) => `'${opt.value}'`).join(" | ");
86
+ return `${options} | { equals?: ${options}; not?: ${options}; in?: (${options})[] }`;
87
+ }
88
+ return `string | { equals?: string; in?: string[] }`;
89
+ case "relationship":
90
+ return `string | { equals?: string; not?: string; in?: string[] }`;
91
+ default:
92
+ return "unknown";
93
+ }
94
+ }
95
+ function generateWhereClauseInterface(collection) {
96
+ const interfaceName = slugToPascalCase(collection.slug);
97
+ const lines = [];
98
+ lines.push(`/**`);
99
+ lines.push(` * Where clause type for querying the "${collection.slug}" collection.`);
100
+ lines.push(` */`);
101
+ lines.push(`export interface ${interfaceName}WhereClause {`);
102
+ lines.push(` id?: string | { equals?: string; not?: string; in?: string[] };`);
103
+ for (const field of collection.fields) {
104
+ const whereType = getFieldWhereType(field);
105
+ lines.push(` ${field.name}?: ${whereType};`);
106
+ }
107
+ const hasTimestamps = collection.timestamps !== false;
108
+ if (hasTimestamps) {
109
+ lines.push(
110
+ ` createdAt?: string | { equals?: string; gt?: string; gte?: string; lt?: string; lte?: string };`
111
+ );
112
+ lines.push(
113
+ ` updatedAt?: string | { equals?: string; gt?: string; gte?: string; lt?: string; lte?: string };`
114
+ );
115
+ }
116
+ lines.push(`}`);
117
+ return lines.join("\n");
118
+ }
119
+ function generateTypes(config) {
120
+ const lines = [
121
+ "/**",
122
+ " * Auto-generated types from Momentum CMS collection definitions.",
123
+ " * DO NOT EDIT - This file is regenerated when collections change.",
124
+ ` * Generated at: ${(/* @__PURE__ */ new Date()).toISOString()}`,
125
+ " */",
126
+ ""
127
+ ];
128
+ for (const collection of config.collections) {
129
+ const interfaceName = slugToPascalCase(collection.slug);
130
+ lines.push(`/**`);
131
+ lines.push(` * Document type for the "${collection.slug}" collection.`);
132
+ lines.push(` */`);
133
+ lines.push(`export interface ${interfaceName} {`);
134
+ lines.push(` /** Unique document identifier */`);
135
+ lines.push(` id: string;`);
136
+ const fieldsCode = generateFieldsInterface(collection.fields);
137
+ if (fieldsCode) {
138
+ lines.push(fieldsCode);
139
+ }
140
+ const hasTimestamps = collection.timestamps !== false;
141
+ if (hasTimestamps) {
142
+ lines.push(` /** Document creation timestamp */`);
143
+ lines.push(` createdAt: string;`);
144
+ lines.push(` /** Document last update timestamp */`);
145
+ lines.push(` updatedAt: string;`);
146
+ }
147
+ lines.push(`}`);
148
+ lines.push("");
149
+ }
150
+ for (const collection of config.collections) {
151
+ lines.push(generateWhereClauseInterface(collection));
152
+ lines.push("");
153
+ }
154
+ lines.push(`/**`);
155
+ lines.push(` * All collection slugs in this Momentum CMS instance.`);
156
+ lines.push(` */`);
157
+ const slugs = config.collections.map((c) => `'${c.slug}'`).join(" | ");
158
+ lines.push(`export type CollectionSlug = ${slugs || "never"};`);
159
+ lines.push("");
160
+ lines.push(`/**`);
161
+ lines.push(` * Mapping from collection slug to document type.`);
162
+ lines.push(` */`);
163
+ lines.push(`export interface MomentumCollections {`);
164
+ for (const collection of config.collections) {
165
+ const interfaceName = slugToPascalCase(collection.slug);
166
+ lines.push(` '${collection.slug}': ${interfaceName};`);
167
+ }
168
+ lines.push(`}`);
169
+ lines.push("");
170
+ lines.push(`/**`);
171
+ lines.push(` * Type-safe collection mapping for use with injectTypedMomentumAPI().`);
172
+ lines.push(` * Includes both document types and where clause types.`);
173
+ lines.push(` *`);
174
+ lines.push(` * @example`);
175
+ lines.push(` * \`\`\`typescript`);
176
+ lines.push(` * import { injectTypedMomentumAPI } from '@momentumcms/admin';`);
177
+ lines.push(` * import type { TypedMomentumCollections } from './types/momentum.generated';`);
178
+ lines.push(` *`);
179
+ lines.push(` * const api = injectTypedMomentumAPI<TypedMomentumCollections>();`);
180
+ lines.push(` * const posts = await api.posts.find({ where: { status: 'published' } });`);
181
+ lines.push(` * \`\`\``);
182
+ lines.push(` */`);
183
+ lines.push(`export type TypedMomentumCollections = {`);
184
+ for (const collection of config.collections) {
185
+ const interfaceName = slugToPascalCase(collection.slug);
186
+ lines.push(
187
+ ` '${collection.slug}': { doc: ${interfaceName}; where: ${interfaceName}WhereClause };`
188
+ );
189
+ }
190
+ lines.push(`};`);
191
+ lines.push("");
192
+ lines.push(`/**`);
193
+ lines.push(` * Helper type for getting document type from collection slug.`);
194
+ lines.push(` */`);
195
+ lines.push(`export type DocumentType<S extends CollectionSlug> = MomentumCollections[S];`);
196
+ lines.push("");
197
+ lines.push(`/**`);
198
+ lines.push(` * Helper type for getting where clause type from collection slug.`);
199
+ lines.push(` */`);
200
+ lines.push(
201
+ `export type WhereClauseType<S extends CollectionSlug> = TypedMomentumCollections[S]['where'];`
202
+ );
203
+ lines.push("");
204
+ return lines.join("\n");
205
+ }
206
+ async function loadConfig(configPath) {
207
+ try {
208
+ const configUrl = pathToFileURL(configPath).href;
209
+ const configModule = await import(configUrl);
210
+ return configModule.default || configModule;
211
+ } catch (error) {
212
+ throw new Error(`Failed to load config from ${configPath}: ${error}`);
213
+ }
214
+ }
215
+ async function runExecutor(options, context) {
216
+ const projectRoot = context.projectsConfigurations?.projects[context.projectName ?? ""]?.root;
217
+ const root = projectRoot ? join(context.root, projectRoot) : context.root;
218
+ const configPath = resolve(root, options.configPath);
219
+ const outputPath = resolve(root, options.outputPath);
220
+ console.info(`Generating types from: ${configPath}`);
221
+ console.info(`Output to: ${outputPath}`);
222
+ async function generate() {
223
+ try {
224
+ const config = await loadConfig(configPath);
225
+ const types = generateTypes(config);
226
+ writeFileSync(outputPath, types, "utf-8");
227
+ console.info(`Types generated successfully!`);
228
+ } catch (error) {
229
+ console.error(`Error generating types:`, error);
230
+ throw error;
231
+ }
232
+ }
233
+ await generate();
234
+ if (options.watch) {
235
+ console.info(`Watching for changes...`);
236
+ const configDir = dirname(configPath);
237
+ watch(configDir, { recursive: true }, async (eventType, filename) => {
238
+ if (filename?.endsWith(".ts")) {
239
+ console.info(`Change detected: ${filename}`);
240
+ try {
241
+ await generate();
242
+ } catch {
243
+ }
244
+ }
245
+ });
246
+ return new Promise(() => {
247
+ });
248
+ }
249
+ return { success: true };
250
+ }
251
+ if (process.argv[1]?.endsWith("generator.ts") || process.argv[1]?.endsWith("generator.js") || process.argv[1]?.endsWith("generator.cjs")) {
252
+ const args = process.argv.slice(2);
253
+ const configPath = args[0];
254
+ const outputPath = args[1] || "src/types/momentum.generated.ts";
255
+ const watchMode = args.includes("--watch");
256
+ if (!configPath) {
257
+ console.error("Usage: npx ts-node generator.ts <config-path> [output-path] [--watch]");
258
+ process.exit(1);
259
+ }
260
+ runExecutor({ configPath, outputPath, watch: watchMode }, { root: process.cwd() }).then((result) => {
261
+ if (!result.success) {
262
+ process.exit(1);
263
+ }
264
+ }).catch((error) => {
265
+ console.error(error);
266
+ process.exit(1);
267
+ });
268
+ }
269
+ export {
270
+ runExecutor as default
271
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momentumcms/core",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Core collection config, fields, hooks, and access control for Momentum CMS",
5
5
  "license": "MIT",
6
6
  "author": "Momentum CMS Contributors",
@@ -27,6 +27,9 @@
27
27
  },
28
28
  "main": "./index.cjs",
29
29
  "types": "./src/index.d.ts",
30
+ "bin": {
31
+ "momentum-generate-types": "./generators/types/generator.cjs"
32
+ },
30
33
  "dependencies": {},
31
34
  "module": "./index.js"
32
35
  }