@objectql/cli 1.9.0 → 3.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/dist/index.js CHANGED
@@ -1,309 +1,23 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  const commander_1 = require("commander");
7
- const chalk_1 = __importDefault(require("chalk"));
8
- const generate_1 = require("./commands/generate");
9
- const repl_1 = require("./commands/repl");
10
- const dev_1 = require("./commands/dev");
11
- const start_1 = require("./commands/start");
12
- const build_1 = require("./commands/build");
13
- const test_1 = require("./commands/test");
14
- const lint_1 = require("./commands/lint");
15
- const format_1 = require("./commands/format");
16
- const init_1 = require("./commands/init");
17
- const new_1 = require("./commands/new");
18
- const i18n_1 = require("./commands/i18n");
19
- const migrate_1 = require("./commands/migrate");
20
- const ai_1 = require("./commands/ai");
21
- const sync_1 = require("./commands/sync");
22
- const doctor_1 = require("./commands/doctor");
23
- const database_push_1 = require("./commands/database-push");
4
+ const lifecycle_1 = require("./register/lifecycle");
5
+ const scaffold_1 = require("./register/scaffold");
6
+ const database_1 = require("./register/database");
7
+ const ai_1 = require("./register/ai");
8
+ const tools_1 = require("./register/tools");
9
+ const i18n_1 = require("./register/i18n");
24
10
  const program = new commander_1.Command();
25
11
  program
26
12
  .name('objectql')
27
13
  .description('ObjectQL CLI tool - The ObjectStack AI Protocol Interface')
28
14
  .version('1.5.0');
29
- // ==========================================
30
- // 1. Lifecycle Commands
31
- // ==========================================
32
- program
33
- .command('init')
34
- .description('Create a new ObjectQL project')
35
- .option('-t, --template <template>', 'Template to use (basic, express-api, enterprise)', 'basic')
36
- .option('-n, --name <name>', 'Project name')
37
- .option('-d, --dir <path>', 'Target directory')
38
- .option('--skip-install', 'Skip dependency installation')
39
- .option('--skip-git', 'Skip git initialization')
40
- .action(async (options) => {
41
- try {
42
- await (0, init_1.initProject)(options);
43
- }
44
- catch (error) {
45
- console.error(error);
46
- process.exit(1);
47
- }
48
- });
49
- program
50
- .command('dev')
51
- .description('Start development server with hot reload and type generation')
52
- .option('-p, --port <number>', 'Port to listen on', '3000')
53
- .option('-d, --dir <path>', 'Directory containing schema', '.')
54
- .option('-c, --config <path>', 'Path to objectql.config.ts/js')
55
- .option('--modules <items>', 'Comma-separated list of modules to load')
56
- .option('--no-watch', 'Disable file watching')
57
- .action(async (options) => {
58
- await (0, dev_1.dev)({
59
- port: parseInt(options.port),
60
- dir: options.dir,
61
- config: options.config,
62
- modules: options.modules,
63
- watch: options.watch
64
- });
65
- });
66
- program
67
- .command('build')
68
- .description('Build project for production')
69
- .option('-d, --dir <path>', 'Source directory', '.')
70
- .option('-o, --output <path>', 'Output directory', './dist')
71
- .option('--no-types', 'Skip TypeScript type generation')
72
- .option('--no-validate', 'Skip metadata validation')
73
- .action(async (options) => {
74
- await (0, build_1.build)({
75
- dir: options.dir,
76
- output: options.output,
77
- types: options.types,
78
- validate: options.validate
79
- });
80
- });
81
- program
82
- .command('start')
83
- .description('Start production server')
84
- .option('-p, --port <number>', 'Port to listen on', '3000')
85
- .option('-d, --dir <path>', 'Directory containing schema', '.')
86
- .option('-c, --config <path>', 'Path to objectql.config.ts/js')
87
- .action(async (options) => {
88
- await (0, start_1.start)({
89
- port: parseInt(options.port),
90
- dir: options.dir,
91
- config: options.config
92
- });
93
- });
94
- // ==========================================
95
- // 2. Scaffolding & Generators
96
- // ==========================================
97
- program
98
- .command('generate <schematic> <name>')
99
- .alias('g')
100
- .description('Generate a new metadata element (object, action, etc.)')
101
- .option('-d, --dir <path>', 'Output directory', '.')
102
- .action(async (schematic, name, options) => {
103
- try {
104
- // Maps to existing newMetadata which accepts (type, name, dir)
105
- await (0, new_1.newMetadata)({ type: schematic, name, dir: options.dir });
106
- }
107
- catch (error) {
108
- console.error(error);
109
- process.exit(1);
110
- }
111
- });
112
- program
113
- .command('types')
114
- .description('Force regenerate TypeScript definitions')
115
- .option('-s, --source <path>', 'Source directory', '.')
116
- .option('-o, --output <path>', 'Output directory', './src/generated')
117
- .action(async (options) => {
118
- try {
119
- await (0, generate_1.generateTypes)(options.source, options.output);
120
- }
121
- catch (error) {
122
- console.error(error);
123
- process.exit(1);
124
- }
125
- });
126
- // ==========================================
127
- // 3. Database Operations
128
- // ==========================================
129
- const dbCmd = program.command('db').description('Database operations');
130
- dbCmd
131
- .command('push')
132
- .description('Push metadata schema changes to the database')
133
- .option('--force', 'Bypass safety checks')
134
- .action(async (options) => {
135
- try {
136
- await (0, database_push_1.dbPushCommand)(options);
137
- }
138
- catch (error) {
139
- console.error(error);
140
- process.exit(1);
141
- }
142
- });
143
- dbCmd
144
- .command('pull')
145
- .description('Introspect database and generate metadata (Reverse Engineering)')
146
- .option('-c, --config <path>', 'Path to objectql.config.ts/js')
147
- .option('-o, --output <path>', 'Output directory', './src/objects')
148
- .option('-t, --tables <tables...>', 'Specific tables to sync')
149
- .option('-f, --force', 'Overwrite existing files')
150
- .action(async (options) => {
151
- try {
152
- // Maps to existing syncDatabase
153
- await (0, sync_1.syncDatabase)(options);
154
- }
155
- catch (error) {
156
- console.error(error);
157
- process.exit(1);
158
- }
159
- });
160
- // Migration commands - kept as top level or move to db:migrate?
161
- // Staying top level or db:migrate is fine. Let's keep `migrate` top level for familiarity with typeorm/prisma users or move to db?
162
- // User request: "Declarative > Imperative".
163
- // Let's alias db:migrate to migrate for now, or just keep migrate.
164
- // Standard in many tools is `migrate` or `db migrate`.
165
- // Let's keep `migrate` as top level group for explicit control.
166
- const migrateCmd = program
167
- .command('migrate')
168
- .description('Manage database migrations');
169
- migrateCmd
170
- .command('up') // Changed from default action to explicit 'up'
171
- .description('Run pending migrations')
172
- .option('-c, --config <path>', 'Path to objectql.config.ts/js')
173
- .option('-d, --dir <path>', 'Migrations directory', './migrations')
174
- .action(async (options) => {
175
- await (0, migrate_1.migrate)(options);
176
- });
177
- migrateCmd
178
- .command('create <name>')
179
- .description('Create a new migration file')
180
- .option('-d, --dir <path>', 'Migrations directory', './migrations')
181
- .action(async (name, options) => {
182
- await (0, migrate_1.migrateCreate)({ name, dir: options.dir });
183
- });
184
- migrateCmd
185
- .command('status')
186
- .description('Show migration status')
187
- .action(async (options) => {
188
- await (0, migrate_1.migrateStatus)(options);
189
- });
190
- // ==========================================
191
- // 4. AI Architect
192
- // ==========================================
193
- const aiCmd = program
194
- .command('ai')
195
- .description('AI Architect capabilities');
196
- aiCmd
197
- .command('chat')
198
- .description('Interactive architecture chat')
199
- .option('-p, --prompt <text>', 'Initial prompt')
200
- .action(async (options) => {
201
- await (0, ai_1.aiChat)({ initialPrompt: options.prompt });
202
- });
203
- aiCmd
204
- .command('run <prompt>') // Changed from generate to run/exec for simple "Do this"
205
- .description('Execute an AI modification on the project (e.g. "Add a blog module")')
206
- .option('-o, --output <path>', 'Output directory', './src')
207
- .action(async (prompt, options) => {
208
- // Maps to simple conversational or generate
209
- // Let's map to aiGenerate but pass description
210
- await (0, ai_1.aiGenerate)({ description: prompt, output: options.output, type: 'custom' });
211
- });
212
- // ==========================================
213
- // 5. Diagnostics & Tools
214
- // ==========================================
215
- program
216
- .command('doctor')
217
- .description('Check environment and configuration health')
218
- .action(async () => {
219
- await (0, doctor_1.doctorCommand)();
220
- });
221
- program
222
- .command('validate')
223
- .description('Validate all metadata files')
224
- .option('-d, --dir <path>', 'Directory to validate', '.')
225
- .action(async (options) => {
226
- await (0, doctor_1.validateCommand)(options);
227
- });
228
- program
229
- .command('repl')
230
- .description('Start interactive REPL')
231
- .option('-c, --config <path>', 'Path to objectql.config.ts')
232
- .action(async (options) => {
233
- await (0, repl_1.startRepl)(options.config);
234
- });
235
- program
236
- .command('test')
237
- .description('Run tests')
238
- .action(async (options) => {
239
- await (0, test_1.test)(options);
240
- });
241
- program
242
- .command('lint')
243
- .description('Lint metadata files')
244
- .action(async (options) => {
245
- await (0, lint_1.lint)(options);
246
- });
247
- program
248
- .command('format')
249
- .description('Format metadata files')
250
- .action(async (options) => {
251
- await (0, format_1.format)(options);
252
- });
253
- // ==========================================
254
- // 6. I18n
255
- // ==========================================
256
- const i18nCmd = program
257
- .command('i18n')
258
- .description('Internationalization commands');
259
- i18nCmd
260
- .command('extract')
261
- .description('Extract translatable strings from metadata files')
262
- .option('-s, --source <path>', 'Source directory', '.')
263
- .option('-o, --output <path>', 'Output directory', './src/i18n')
264
- .option('-l, --lang <lang>', 'Language code', 'en')
265
- .action(async (options) => {
266
- try {
267
- await (0, i18n_1.i18nExtract)(options);
268
- }
269
- catch (error) {
270
- console.error(error);
271
- process.exit(1);
272
- }
273
- });
274
- i18nCmd
275
- .command('init <lang>')
276
- .description('Initialize i18n for a new language')
277
- .option('-b, --base-dir <path>', 'Base i18n directory', './src/i18n')
278
- .action(async (lang, options) => {
279
- try {
280
- await (0, i18n_1.i18nInit)({ lang, baseDir: options.baseDir });
281
- }
282
- catch (error) {
283
- console.error(error);
284
- process.exit(1);
285
- }
286
- });
287
- i18nCmd
288
- .command('validate <lang>')
289
- .description('Validate translation completeness')
290
- .option('-b, --base-dir <path>', 'Base i18n directory', './src/i18n')
291
- .option('--base-lang <lang>', 'Base language to compare against', 'en')
292
- .action(async (lang, options) => {
293
- try {
294
- await (0, i18n_1.i18nValidate)({ lang, baseDir: options.baseDir, baseLang: options.baseLang });
295
- }
296
- catch (error) {
297
- console.error(error);
298
- process.exit(1);
299
- }
300
- });
301
- // Backward compatibility (Hidden or Deprecated)
302
- program
303
- .command('new <type> <name>', { hidden: true })
304
- .action(async (type, name, options) => {
305
- console.warn(chalk_1.default.yellow('Deprecated: Use "objectql generate" instead.'));
306
- await (0, new_1.newMetadata)({ type, name, dir: options.dir });
307
- });
15
+ // Register all command groups
16
+ (0, lifecycle_1.registerLifecycleCommands)(program);
17
+ (0, scaffold_1.registerScaffoldCommands)(program);
18
+ (0, database_1.registerDatabaseCommands)(program);
19
+ (0, ai_1.registerAiCommands)(program);
20
+ (0, tools_1.registerToolsCommands)(program);
21
+ (0, i18n_1.registerI18nCommands)(program);
308
22
  program.parse(process.argv);
309
23
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,yCAAoC;AACpC,kDAA0B;AAC1B,kDAAoD;AACpD,0CAA4C;AAE5C,wCAAqC;AACrC,4CAAyC;AACzC,4CAAyC;AACzC,0CAAuC;AACvC,0CAAuC;AACvC,8CAA2C;AAC3C,0CAA8C;AAC9C,wCAA6C;AAC7C,0CAAsE;AACtE,gDAA2E;AAC3E,sCAAiF;AACjF,0CAA+C;AAC/C,8CAAmE;AACnE,4DAAyD;AAEzD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CAAC,2DAA2D,CAAC;KACxE,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,6CAA6C;AAC7C,wBAAwB;AACxB,6CAA6C;AAE7C,OAAO;KACF,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,+BAA+B,CAAC;KAC5C,MAAM,CAAC,2BAA2B,EAAE,kDAAkD,EAAE,OAAO,CAAC;KAChG,MAAM,CAAC,mBAAmB,EAAE,cAAc,CAAC;KAC3C,MAAM,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;KAC9C,MAAM,CAAC,gBAAgB,EAAE,8BAA8B,CAAC;KACxD,MAAM,CAAC,YAAY,EAAE,yBAAyB,CAAC;KAC/C,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACtB,IAAI,CAAC;QACD,MAAM,IAAA,kBAAW,EAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC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,OAAO,CAAC,CAAC;AAC/B,IAAA,2BAAoB,EAAC,OAAO,CAAC,CAAC;AAE9B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerAiCommands(program: Command): void;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerAiCommands = registerAiCommands;
4
+ const ai_1 = require("../commands/ai");
5
+ function registerAiCommands(program) {
6
+ const aiCmd = program
7
+ .command('ai')
8
+ .description('AI Architect capabilities');
9
+ aiCmd
10
+ .command('chat')
11
+ .description('Interactive architecture chat')
12
+ .option('-p, --prompt <text>', 'Initial prompt')
13
+ .action(async (options) => {
14
+ await (0, ai_1.aiChat)({ initialPrompt: options.prompt });
15
+ });
16
+ aiCmd
17
+ .command('run <prompt>')
18
+ .description('Execute an AI modification on the project (e.g. "Add a blog module")')
19
+ .option('-o, --output <path>', 'Output directory', './src')
20
+ .action(async (prompt, options) => {
21
+ await (0, ai_1.aiGenerate)({ description: prompt, output: options.output, type: 'custom' });
22
+ });
23
+ }
24
+ //# sourceMappingURL=ai.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai.js","sourceRoot":"","sources":["../../src/register/ai.ts"],"names":[],"mappings":";;AAGA,gDAoBC;AAtBD,uCAAoD;AAEpD,SAAgB,kBAAkB,CAAC,OAAgB;IAC/C,MAAM,KAAK,GAAG,OAAO;SAChB,OAAO,CAAC,IAAI,CAAC;SACb,WAAW,CAAC,2BAA2B,CAAC,CAAC;IAE9C,KAAK;SACA,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,+BAA+B,CAAC;SAC5C,MAAM,CAAC,qBAAqB,EAAE,gBAAgB,CAAC;SAC/C,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACtB,MAAM,IAAA,WAAM,EAAC,EAAE,aAAa,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEP,KAAK;SACA,OAAO,CAAC,cAAc,CAAC;SACvB,WAAW,CAAC,sEAAsE,CAAC;SACnF,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,EAAE,OAAO,CAAC;SAC1D,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;QAC9B,MAAM,IAAA,eAAU,EAAC,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IACtF,CAAC,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerDatabaseCommands(program: Command): void;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerDatabaseCommands = registerDatabaseCommands;
4
+ const sync_1 = require("../commands/sync");
5
+ const database_push_1 = require("../commands/database-push");
6
+ const migrate_1 = require("../commands/migrate");
7
+ function registerDatabaseCommands(program) {
8
+ const dbCmd = program.command('db').description('Database operations');
9
+ dbCmd
10
+ .command('push')
11
+ .description('Push metadata schema changes to the database')
12
+ .option('--force', 'Bypass safety checks')
13
+ .action(async (options) => {
14
+ try {
15
+ await (0, database_push_1.dbPushCommand)(options);
16
+ }
17
+ catch (error) {
18
+ console.error(error);
19
+ process.exit(1);
20
+ }
21
+ });
22
+ dbCmd
23
+ .command('pull')
24
+ .description('Introspect database and generate metadata (Reverse Engineering)')
25
+ .option('-c, --config <path>', 'Path to objectql.config.ts/js')
26
+ .option('-o, --output <path>', 'Output directory', './src/objects')
27
+ .option('-t, --tables <tables...>', 'Specific tables to sync')
28
+ .option('-f, --force', 'Overwrite existing files')
29
+ .action(async (options) => {
30
+ try {
31
+ // Maps to existing syncDatabase
32
+ await (0, sync_1.syncDatabase)(options);
33
+ }
34
+ catch (error) {
35
+ console.error(error);
36
+ process.exit(1);
37
+ }
38
+ });
39
+ const migrateCmd = program
40
+ .command('migrate')
41
+ .description('Manage database migrations');
42
+ migrateCmd
43
+ .command('up')
44
+ .description('Run pending migrations')
45
+ .option('-c, --config <path>', 'Path to objectql.config.ts/js')
46
+ .option('-d, --dir <path>', 'Migrations directory', './migrations')
47
+ .action(async (options) => {
48
+ await (0, migrate_1.migrate)(options);
49
+ });
50
+ migrateCmd
51
+ .command('create <name>')
52
+ .description('Create a new migration file')
53
+ .option('-d, --dir <path>', 'Migrations directory', './migrations')
54
+ .action(async (name, options) => {
55
+ await (0, migrate_1.migrateCreate)({ name, dir: options.dir });
56
+ });
57
+ migrateCmd
58
+ .command('status')
59
+ .description('Show migration status')
60
+ .action(async (options) => {
61
+ await (0, migrate_1.migrateStatus)(options);
62
+ });
63
+ }
64
+ //# sourceMappingURL=database.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/register/database.ts"],"names":[],"mappings":";;AAKA,4DA4DC;AAhED,2CAAgD;AAChD,6DAA0D;AAC1D,iDAA4E;AAE5E,SAAgB,wBAAwB,CAAC,OAAgB;IACrD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;IAEvE,KAAK;SACA,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,8CAA8C,CAAC;SAC3D,MAAM,CAAC,SAAS,EAAE,sBAAsB,CAAC;SACzC,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACtB,IAAI,CAAC;YACD,MAAM,IAAA,6BAAa,EAAC,OAAO,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;IACL,CAAC,CAAC,CAAC;IAEP,KAAK;SACA,OA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AAE,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEP,UAAU;SACL,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,uBAAuB,CAAC;SACpC,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACtB,MAAM,IAAA,uBAAa,EAAC,OAAO,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerI18nCommands(program: Command): void;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerI18nCommands = registerI18nCommands;
4
+ const i18n_1 = require("../commands/i18n");
5
+ function registerI18nCommands(program) {
6
+ const i18nCmd = program
7
+ .command('i18n')
8
+ .description('Internationalization commands');
9
+ i18nCmd
10
+ .command('extract')
11
+ .description('Extract translatable strings from metadata files')
12
+ .option('-s, --source <path>', 'Source directory', '.')
13
+ .option('-o, --output <path>', 'Output directory', './src/i18n')
14
+ .option('-l, --lang <lang>', 'Language code', 'en')
15
+ .action(async (options) => {
16
+ try {
17
+ await (0, i18n_1.i18nExtract)(options);
18
+ }
19
+ catch (error) {
20
+ console.error(error);
21
+ process.exit(1);
22
+ }
23
+ });
24
+ i18nCmd
25
+ .command('init <lang>')
26
+ .description('Initialize i18n for a new language')
27
+ .option('-b, --base-dir <path>', 'Base i18n directory', './src/i18n')
28
+ .action(async (lang, options) => {
29
+ try {
30
+ await (0, i18n_1.i18nInit)({ lang, baseDir: options.baseDir });
31
+ }
32
+ catch (error) {
33
+ console.error(error);
34
+ process.exit(1);
35
+ }
36
+ });
37
+ i18nCmd
38
+ .command('validate <lang>')
39
+ .description('Validate translation completeness')
40
+ .option('-b, --base-dir <path>', 'Base i18n directory', './src/i18n')
41
+ .option('--base-lang <lang>', 'Base language to compare against', 'en')
42
+ .action(async (lang, options) => {
43
+ try {
44
+ await (0, i18n_1.i18nValidate)({ lang, baseDir: options.baseDir, baseLang: options.baseLang });
45
+ }
46
+ catch (error) {
47
+ console.error(error);
48
+ process.exit(1);
49
+ }
50
+ });
51
+ }
52
+ //# sourceMappingURL=i18n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/register/i18n.ts"],"names":[],"mappings":";;AAGA,oDA8CC;AAhDD,2CAAuE;AAEvE,SAAgB,oBAAoB,CAAC,OAAgB;IACjD,MAAM,OAAO,GAAG,OAAO;SAClB,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,+BAA+B,CAAC,CAAC;IAElD,OAAO;SACF,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,kDAAkD,CAAC;SAC/D,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,CAAC;SACtD,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,EAAE,YAAY,CAAC;SAC/D,MAAM,CAAC,mBAAmB,EAAE,eAAe,EAAE,IAAI,CAAC;SAClD,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACtB,IAAI,CAAC;YACD,MAAM,IAAA,kBAAW,EAAC,OAAO,CAAC,CAAC;QAC/B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;IACL,CAAC,CAAC,CAAC;IAEP,OAAO;SACF,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CAAC,oCAAoC,CAAC;SACjD,MAAM,CAAC,uBAAuB,EAAE,qBAAqB,EAAE,YAAY,CAAC;SACpE,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC5B,IAAI,CAAC;YACD,MAAM,IAAA,eAAQ,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QACvD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;IACL,CAAC,CAAC,CAAC;IAEP,OAAO;SACF,OAAO,CAAC,iBAAiB,CAAC;SAC1B,WAAW,CAAC,mCAAmC,CAAC;SAChD,MAAM,CAAC,uBAAuB,EAAE,qBAAqB,EAAE,YAAY,CAAC;SACpE,MAAM,CAAC,oBAAoB,EAAE,kCAAkC,EAAE,IAAI,CAAC;SACtE,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC5B,IAAI,CAAC;YACD,MAAM,IAAA,mBAAY,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QACvF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;IACL,CAAC,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerLifecycleCommands(program: Command): void;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.registerLifecycleCommands = registerLifecycleCommands;
7
+ const chalk_1 = __importDefault(require("chalk"));
8
+ const dev_1 = require("../commands/dev");
9
+ const start_1 = require("../commands/start");
10
+ const build_1 = require("../commands/build");
11
+ function registerLifecycleCommands(program) {
12
+ program
13
+ .command('init')
14
+ .description('Create a new ObjectQL project (Deprecated)')
15
+ .action(async () => {
16
+ console.log(chalk_1.default.red('\n⚠️ DEPRECATED: The "objectql init" command has been removed.'));
17
+ console.log(chalk_1.default.white('Please use the standard initializer instead:\n'));
18
+ console.log(chalk_1.default.cyan(' npm create @objectql@latest <my-app>'));
19
+ console.log('');
20
+ process.exit(1);
21
+ });
22
+ program
23
+ .command('dev')
24
+ .description('Start development server with hot reload and type generation')
25
+ .option('-p, --port <number>', 'Port to listen on', '3000')
26
+ .option('-d, --dir <path>', 'Directory containing schema', '.')
27
+ .option('-c, --config <path>', 'Path to objectql.config.ts/js')
28
+ .option('--modules <items>', 'Comma-separated list of modules to load')
29
+ .option('--no-watch', 'Disable file watching')
30
+ .action(async (options) => {
31
+ await (0, dev_1.dev)({
32
+ port: parseInt(options.port),
33
+ dir: options.dir,
34
+ config: options.config,
35
+ modules: options.modules,
36
+ watch: options.watch
37
+ });
38
+ });
39
+ program
40
+ .command('build')
41
+ .description('Build project for production')
42
+ .option('-d, --dir <path>', 'Source directory', '.')
43
+ .option('-o, --output <path>', 'Output directory', './dist')
44
+ .option('--no-types', 'Skip TypeScript type generation')
45
+ .option('--no-validate', 'Skip metadata validation')
46
+ .action(async (options) => {
47
+ await (0, build_1.build)({
48
+ dir: options.dir,
49
+ output: options.output,
50
+ types: options.types,
51
+ validate: options.validate
52
+ });
53
+ });
54
+ program
55
+ .command('start')
56
+ .description('Start production server')
57
+ .option('-p, --port <number>', 'Port to listen on', '3000')
58
+ .option('-d, --dir <path>', 'Directory containing schema', '.')
59
+ .option('-c, --config <path>', 'Path to objectql.config.ts/js')
60
+ .action(async (options) => {
61
+ await (0, start_1.start)({
62
+ port: parseInt(options.port),
63
+ dir: options.dir,
64
+ config: options.config
65
+ });
66
+ });
67
+ }
68
+ //# sourceMappingURL=lifecycle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../src/register/lifecycle.ts"],"names":[],"mappings":";;;;;AAMA,8DA2DC;AAhED,kDAA0B;AAC1B,yCAAsC;AACtC,6CAA0C;AAC1C,6CAA0C;AAE1C,S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,MAAM,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,GAAG,CAAC;SACnD,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,EAAE,QAAQ,CAAC;SAC3D,MAAM,CAAC,YAAY,EAAE,iCAAiC,CAAC;SACvD,MAAM,CAAC,eAAe,EAAE,0BAA0B,CAAC;SACnD,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACtB,MAAM,IAAA,aAAK,EAAC;YACR,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC7B,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEP,OAAO;SACF,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,yBAAyB,CAAC;SACtC,MAAM,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,CAAC;SAC1D,MAAM,CAAC,kBAAkB,EAAE,6BAA6B,EAAE,GAAG,CAAC;SAC9D,MAAM,CAAC,qBAAqB,EAAE,+BAA+B,CAAC;SAC9D,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACtB,MAAM,IAAA,aAAK,EAAC;YACR,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;YAC5B,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,MAAM,EAAE,OAAO,CAAC,MAAM;SACzB,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerScaffoldCommands(program: Command): void;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.registerScaffoldCommands = registerScaffoldCommands;
7
+ const chalk_1 = __importDefault(require("chalk"));
8
+ const generate_1 = require("../commands/generate");
9
+ const new_1 = require("../commands/new");
10
+ function registerScaffoldCommands(program) {
11
+ program
12
+ .command('generate <schematic> <name>')
13
+ .alias('g')
14
+ .description('Generate a new metadata element (object, action, etc.)')
15
+ .option('-d, --dir <path>', 'Output directory', '.')
16
+ .action(async (schematic, name, options) => {
17
+ try {
18
+ // Maps to existing newMetadata which accepts (type, name, dir)
19
+ await (0, new_1.newMetadata)({ type: schematic, name, dir: options.dir });
20
+ }
21
+ catch (error) {
22
+ console.error(error);
23
+ process.exit(1);
24
+ }
25
+ });
26
+ program
27
+ .command('types')
28
+ .description('Force regenerate TypeScript definitions')
29
+ .option('-s, --source <path>', 'Source directory', '.')
30
+ .option('-o, --output <path>', 'Output directory', './src/generated')
31
+ .action(async (options) => {
32
+ try {
33
+ await (0, generate_1.generateTypes)(options.source, options.output);
34
+ }
35
+ catch (error) {
36
+ console.error(error);
37
+ process.exit(1);
38
+ }
39
+ });
40
+ // Backward compatibility (Hidden or Deprecated)
41
+ program
42
+ .command('new <type> <name>', { hidden: true })
43
+ .action(async (type, name, options) => {
44
+ console.warn(chalk_1.default.yellow('Deprecated: Use "objectql generate" instead.'));
45
+ await (0, new_1.newMetadata)({ type, name, dir: options.dir });
46
+ });
47
+ }
48
+ //# sourceMappingURL=scaffold.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scaffold.js","sourceRoot":"","sources":["../../src/register/scaffold.ts"],"names":[],"mappings":";;;;;AAKA,4DAqCC;AAzCD,kDAA0B;AAC1B,mDAAqD;AACrD,yCAA8C;AAE9C,SAAgB,wBAAwB,CAAC,OAAgB;IACrD,OAAO;SACF,OAAO,CAAC,6BAA6B,CAAC;SACtC,KAAK,CAAC,GAAG,CAAC;SACV,WAAW,CAAC,wDAAwD,CAAC;SACrE,MAAM,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,GAAG,CAAC;SACnD,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE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IACzD,CAAC,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerToolsCommands(program: Command): void;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerToolsCommands = registerToolsCommands;
4
+ const doctor_1 = require("../commands/doctor");
5
+ const repl_1 = require("../commands/repl");
6
+ const test_1 = require("../commands/test");
7
+ const lint_1 = require("../commands/lint");
8
+ const format_1 = require("../commands/format");
9
+ function registerToolsCommands(program) {
10
+ program
11
+ .command('doctor')
12
+ .description('Check environment and configuration health')
13
+ .action(async () => {
14
+ await (0, doctor_1.doctorCommand)();
15
+ });
16
+ program
17
+ .command('validate')
18
+ .description('Validate all metadata files')
19
+ .option('-d, --dir <path>', 'Directory to validate', '.')
20
+ .action(async (options) => {
21
+ await (0, doctor_1.validateCommand)(options);
22
+ });
23
+ program
24
+ .command('repl')
25
+ .description('Start interactive REPL')
26
+ .option('-c, --config <path>', 'Path to objectql.config.ts')
27
+ .action(async (options) => {
28
+ await (0, repl_1.startRepl)(options.config);
29
+ });
30
+ program
31
+ .command('test')
32
+ .description('Run tests')
33
+ .action(async (options) => {
34
+ await (0, test_1.test)(options);
35
+ });
36
+ program
37
+ .command('lint')
38
+ .description('Lint metadata files')
39
+ .action(async (options) => {
40
+ await (0, lint_1.lint)(options);
41
+ });
42
+ program
43
+ .command('format')
44
+ .description('Format metadata files')
45
+ .action(async (options) => {
46
+ await (0, format_1.format)(options);
47
+ });
48
+ }
49
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/register/tools.ts"],"names":[],"mappings":";;AAOA,sDA4CC;AAlDD,+CAAoE;AACpE,2CAA6C;AAC7C,2CAAwC;AACxC,2CAAwC;AACxC,+CAA4C;AAE5C,SAAgB,qBAAqB,CAAC,OAAgB;IAClD,OAAO;SACF,OAAO,CAAC,QAAQ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AC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@objectql/cli",
3
- "version": "1.9.0",
3
+ "version": "3.0.0",
4
4
  "description": "Command-line interface for ObjectQL - Code generation, migrations, REPL, and AI-powered development tools",
5
5
  "keywords": [
6
6
  "objectql",
@@ -34,11 +34,11 @@
34
34
  "ts-node": "^10.9.1",
35
35
  "openai": "^4.28.0",
36
36
  "dotenv": "^16.4.5",
37
- "@objectql/types": "1.9.0",
38
- "@objectql/server": "1.9.0",
39
- "@objectql/driver-sql": "1.9.0",
40
- "@objectql/core": "1.9.0",
41
- "@objectql/platform-node": "1.9.0"
37
+ "@objectql/types": "3.0.0",
38
+ "@objectql/core": "3.0.0",
39
+ "@objectql/server": "3.0.0",
40
+ "@objectql/driver-sql": "3.0.0",
41
+ "@objectql/platform-node": "3.0.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "typescript": "^5.0.0",
@@ -1,5 +1,21 @@
1
1
  # @example/hello-world
2
2
 
3
+ ## 1.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [38b01f4]
8
+ - @objectql/core@3.0.0
9
+ - @objectql/driver-sql@3.0.0
10
+
11
+ ## 1.0.6
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+ - @objectql/core@1.9.1
17
+ - @objectql/driver-sql@1.9.1
18
+
3
19
  ## 1.0.5
4
20
 
5
21
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@objectql/example-hello-world",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "private": true,
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,5 +1,25 @@
1
1
  # @objectql/starter-basic
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [38b01f4]
8
+ - @objectql/core@3.0.0
9
+ - @objectql/driver-sql@3.0.0
10
+ - @objectql/platform-node@3.0.0
11
+ - @objectql/types@3.0.0
12
+
13
+ ## 2.0.1
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+ - @objectql/types@1.9.1
19
+ - @objectql/core@1.9.1
20
+ - @objectql/platform-node@1.9.1
21
+ - @objectql/driver-sql@1.9.1
22
+
3
23
  ## 2.0.0
4
24
 
5
25
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@objectql/example-project-tracker",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "ObjectQL Basic Example Project",
5
5
  "private": true,
6
6
  "keywords": [
@@ -24,7 +24,8 @@
24
24
  "dist"
25
25
  ],
26
26
  "scripts": {
27
- "start": "objectql serve --dir src",
27
+ "dev": "objectql dev --dir src",
28
+ "start": "objectql start --dir src",
28
29
  "seed": "ts-node src/seed.ts",
29
30
  "codegen": "objectql types -s src -o src/types",
30
31
  "build": "npm run codegen && tsc && rsync -a --include '*/' --include '*.yml' --exclude '*' src/ dist/",