@objectql/cli 1.8.4 → 1.9.1

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 (98) hide show
  1. package/README.md +2 -2
  2. package/dist/commands/database-push.d.ts +5 -0
  3. package/dist/commands/database-push.js +15 -0
  4. package/dist/commands/database-push.js.map +1 -0
  5. package/dist/commands/dev.d.ts +2 -0
  6. package/dist/commands/dev.js +94 -6
  7. package/dist/commands/dev.js.map +1 -1
  8. package/dist/commands/doctor.d.ts +4 -0
  9. package/dist/commands/doctor.js +37 -0
  10. package/dist/commands/doctor.js.map +1 -0
  11. package/dist/commands/init.js +31 -30
  12. package/dist/commands/init.js.map +1 -1
  13. package/dist/commands/serve.d.ts +2 -0
  14. package/dist/commands/serve.js +122 -46
  15. package/dist/commands/serve.js.map +1 -1
  16. package/dist/commands/start.d.ts +1 -0
  17. package/dist/commands/start.js +15 -0
  18. package/dist/commands/start.js.map +1 -1
  19. package/dist/index.js +15 -338
  20. package/dist/index.js.map +1 -1
  21. package/dist/register/ai.d.ts +2 -0
  22. package/dist/register/ai.js +24 -0
  23. package/dist/register/ai.js.map +1 -0
  24. package/dist/register/database.d.ts +2 -0
  25. package/dist/register/database.js +64 -0
  26. package/dist/register/database.js.map +1 -0
  27. package/dist/register/i18n.d.ts +2 -0
  28. package/dist/register/i18n.js +52 -0
  29. package/dist/register/i18n.js.map +1 -0
  30. package/dist/register/lifecycle.d.ts +2 -0
  31. package/dist/register/lifecycle.js +68 -0
  32. package/dist/register/lifecycle.js.map +1 -0
  33. package/dist/register/scaffold.d.ts +2 -0
  34. package/dist/register/scaffold.js +48 -0
  35. package/dist/register/scaffold.js.map +1 -0
  36. package/dist/register/tools.d.ts +2 -0
  37. package/dist/register/tools.js +49 -0
  38. package/dist/register/tools.js.map +1 -0
  39. package/package.json +13 -7
  40. package/templates/hello-world/.vscode/extensions.json +7 -0
  41. package/templates/hello-world/CHANGELOG.md +49 -0
  42. package/templates/hello-world/README.md +29 -0
  43. package/templates/hello-world/package.json +24 -0
  44. package/templates/hello-world/src/index.ts +58 -0
  45. package/templates/hello-world/tsconfig.json +10 -0
  46. package/templates/starter/.vscode/extensions.json +7 -0
  47. package/{CHANGELOG.md → templates/starter/CHANGELOG.md} +46 -42
  48. package/templates/starter/README.md +17 -0
  49. package/templates/starter/__tests__/projects-hooks-actions.test.ts +490 -0
  50. package/templates/starter/jest.config.js +16 -0
  51. package/templates/starter/package.json +52 -0
  52. package/templates/starter/src/README.pages.md +110 -0
  53. package/templates/starter/src/demo.app.yml +4 -0
  54. package/templates/starter/src/i18n/zh-CN/projects.json +22 -0
  55. package/templates/starter/src/modules/kitchen-sink/kitchen_sink.data.yml +18 -0
  56. package/templates/starter/src/modules/kitchen-sink/kitchen_sink.object.yml +156 -0
  57. package/templates/starter/src/modules/projects/project_approval.workflow.yml +51 -0
  58. package/templates/starter/src/modules/projects/projects.action.ts +472 -0
  59. package/templates/starter/src/modules/projects/projects.data.yml +13 -0
  60. package/templates/starter/src/modules/projects/projects.hook.ts +339 -0
  61. package/templates/starter/src/modules/projects/projects.object.yml +148 -0
  62. package/templates/starter/src/modules/projects/projects.permission.yml +141 -0
  63. package/templates/starter/src/modules/projects/projects.validation.yml +37 -0
  64. package/templates/starter/src/modules/tasks/tasks.data.yml +23 -0
  65. package/templates/starter/src/modules/tasks/tasks.object.yml +34 -0
  66. package/templates/starter/src/modules/tasks/tasks.permission.yml +167 -0
  67. package/templates/starter/src/seed.ts +55 -0
  68. package/templates/starter/src/types/index.ts +3 -0
  69. package/templates/starter/src/types/kitchen_sink.ts +101 -0
  70. package/templates/starter/src/types/projects.ts +49 -0
  71. package/templates/starter/src/types/tasks.ts +33 -0
  72. package/templates/starter/tsconfig.json +11 -0
  73. package/templates/starter/tsconfig.tsbuildinfo +1 -0
  74. package/AI_EXAMPLES.md +0 -154
  75. package/AI_IMPLEMENTATION_SUMMARY.md +0 -509
  76. package/AI_TUTORIAL.md +0 -144
  77. package/IMPLEMENTATION_SUMMARY.md +0 -437
  78. package/USAGE_EXAMPLES.md +0 -951
  79. package/__tests__/commands.test.ts +0 -426
  80. package/jest.config.js +0 -19
  81. package/src/commands/ai.ts +0 -509
  82. package/src/commands/build.ts +0 -98
  83. package/src/commands/dev.ts +0 -23
  84. package/src/commands/format.ts +0 -110
  85. package/src/commands/generate.ts +0 -135
  86. package/src/commands/i18n.ts +0 -303
  87. package/src/commands/init.ts +0 -191
  88. package/src/commands/lint.ts +0 -98
  89. package/src/commands/migrate.ts +0 -314
  90. package/src/commands/new.ts +0 -221
  91. package/src/commands/repl.ts +0 -120
  92. package/src/commands/serve.ts +0 -96
  93. package/src/commands/start.ts +0 -100
  94. package/src/commands/sync.ts +0 -328
  95. package/src/commands/test.ts +0 -98
  96. package/src/index.ts +0 -356
  97. package/tsconfig.json +0 -15
  98. package/tsconfig.tsbuildinfo +0 -1
@@ -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,SAAgB,yBAAyB,CAAC,OAAgB;IACtD,OAAO;SACF,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,4CAA4C,CAAC;SACzD,MAAM,CAAC,KAAK,IAAI,EAAE;QACf,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,iEAAiE,CAAC,CAAC,CAAC;QAC1F,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC,CAAC;QAC3E,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC,CAAC;QAClE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;IAEP,OAAO;SACF,OAAO,CAAC,KAAK,CAAC;SACd,WAAW,CAAC,8DAA8D,CAAC;SAC3E,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,mBAAmB,EAAE,yCAAyC,CAAC;SACtE,MAAM,CAAC,YAAY,EAAE,uBAAuB,CAAC;SAC7C,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACtB,MAAM,IAAA,SAAG,EAAC;YACN,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;YAC5B,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,KAAK,EAAE,OAAO,CAAC,KAAK;SACvB,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEP,OAAO;SACF,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,8BAA8B,CAAC;SAC3C,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,IAAI,EAAE,OAAO,EAAE,EAAE;QACvC,IAAI,CAAC;YACD,+DAA+D;YAC/D,MAAM,IAAA,iBAAW,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QACnE,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,OAAO,CAAC;SAChB,WAAW,CAAC,yCAAyC,CAAC;SACtD,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,CAAC;SACtD,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,EAAE,iBAAiB,CAAC;SACpE,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACtB,IAAI,CAAC;YACD,MAAM,IAAA,wBAAa,EAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QACxD,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,gDAAgD;IAChD,OAAO;SACF,OAAO,CAAC,mBAAmB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;SAC9C,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QACjC,OAAO,CAAC,IAAI,CAAC,eAAK,CAAC,MAAM,CAAC,8CAA8C,CAAC,CAAC,CAAC;QAC3E,MAAM,IAAA,iBAAW,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;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,CAAC;SACjB,WAAW,CAAC,4CAA4C,CAAC;SACzD,MAAM,CAAC,KAAK,IAAI,EAAE;QACf,MAAM,IAAA,sBAAa,GAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEP,OAAO;SACF,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,6BAA6B,CAAC;SAC1C,MAAM,CAAC,kBAAkB,EAAE,uBAAuB,EAAE,GAAG,CAAC;SACxD,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACtB,MAAM,IAAA,wBAAe,EAAC,OAAO,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEP,OAAO;SACF,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,wBAAwB,CAAC;SACrC,MAAM,CAAC,qBAAqB,EAAE,4BAA4B,CAAC;SAC3D,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACtB,MAAM,IAAA,gBAAS,EAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAEP,OAAO;SACF,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,WAAW,CAAC;SACxB,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACtB,MAAM,IAAA,WAAI,EAAC,OAAO,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;IAEP,OAAO;SACF,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,qBAAqB,CAAC;SAClC,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACtB,MAAM,IAAA,WAAI,EAAC,OAAO,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;IAEP,OAAO;SACF,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,uBAAuB,CAAC;SACpC,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACtB,MAAM,IAAA,eAAM,EAAC,OAAO,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACX,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@objectql/cli",
3
- "version": "1.8.4",
3
+ "version": "1.9.1",
4
4
  "description": "Command-line interface for ObjectQL - Code generation, migrations, REPL, and AI-powered development tools",
5
5
  "keywords": [
6
6
  "objectql",
@@ -16,6 +16,11 @@
16
16
  ],
17
17
  "license": "MIT",
18
18
  "main": "dist/index.js",
19
+ "files": [
20
+ "dist",
21
+ "bin",
22
+ "templates"
23
+ ],
19
24
  "bin": {
20
25
  "objectql": "./bin/objectql"
21
26
  },
@@ -29,11 +34,11 @@
29
34
  "ts-node": "^10.9.1",
30
35
  "openai": "^4.28.0",
31
36
  "dotenv": "^16.4.5",
32
- "@objectql/types": "1.8.4",
33
- "@objectql/server": "1.8.4",
34
- "@objectql/core": "1.8.4",
35
- "@objectql/driver-sql": "1.8.4",
36
- "@objectql/platform-node": "1.8.4"
37
+ "@objectql/types": "1.9.1",
38
+ "@objectql/core": "1.9.1",
39
+ "@objectql/server": "1.9.1",
40
+ "@objectql/driver-sql": "1.9.1",
41
+ "@objectql/platform-node": "1.9.1"
37
42
  },
38
43
  "devDependencies": {
39
44
  "typescript": "^5.0.0",
@@ -41,7 +46,8 @@
41
46
  "@types/js-yaml": "^4.0.5"
42
47
  },
43
48
  "scripts": {
44
- "build": "tsc",
49
+ "build": "tsc && pnpm run copy-templates",
50
+ "copy-templates": "rm -rf templates && mkdir -p templates && cp -r ../../../examples/quickstart/hello-world templates/ && cp -r ../../../examples/showcase/project-tracker templates/starter && rm -rf templates/*/node_modules templates/*/dist",
45
51
  "watch": "tsc -w",
46
52
  "test": "jest"
47
53
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "recommendations": [
3
+ "objectstack-ai.vscode-objectql",
4
+ "redhat.vscode-yaml",
5
+ "dbaeumer.vscode-eslint"
6
+ ]
7
+ }
@@ -0,0 +1,49 @@
1
+ # @example/hello-world
2
+
3
+ ## 1.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @objectql/core@1.9.1
9
+ - @objectql/driver-sql@1.9.1
10
+
11
+ ## 1.0.5
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+ - @objectql/core@1.9.0
17
+ - @objectql/driver-sql@1.9.0
18
+
19
+ ## 1.0.4
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+ - @objectql/core@1.8.4
25
+ - @objectql/driver-sql@1.8.4
26
+
27
+ ## 1.0.3
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies
32
+ - @objectql/core@1.8.3
33
+ - @objectql/driver-sql@1.8.3
34
+
35
+ ## 1.0.2
36
+
37
+ ### Patch Changes
38
+
39
+ - Updated dependencies
40
+ - @objectql/core@1.8.2
41
+ - @objectql/driver-sql@1.8.2
42
+
43
+ ## 1.0.1
44
+
45
+ ### Patch Changes
46
+
47
+ - Updated dependencies
48
+ - @objectql/core@1.8.1
49
+ - @objectql/driver-sql@1.8.1
@@ -0,0 +1,29 @@
1
+ # Hello ObjectQL
2
+
3
+ This is the simplest possible example of **ObjectQL**.
4
+
5
+ It demonstrates:
6
+ 1. **Zero Config:** No YAML files or server setup required.
7
+ 2. **In-Memory SQL:** Uses SQLite in memory, so no database installation is needed.
8
+ 3. **Inline Schema:** Defines the data model directly in code.
9
+
10
+ ## How to Run
11
+
12
+ Since you are in the monorepo, simply run:
13
+
14
+ ```bash
15
+ # Install dependencies (if not already done at root)
16
+ pnpm install
17
+
18
+ # Run the script
19
+ cd examples/starters/hello-world
20
+ pnpm start
21
+ ```
22
+
23
+ ## What you see
24
+
25
+ The script will:
26
+ 1. Initialize the ObjectQL engine.
27
+ 2. Create a `deal` object definition on the fly.
28
+ 3. Insert a record into the in-memory SQLite database.
29
+ 4. Query it back and print the result.
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@objectql/example-hello-world",
3
+ "version": "1.0.6",
4
+ "private": true,
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/objectql/objectql.git",
8
+ "directory": "examples/quickstart/hello-world"
9
+ },
10
+ "description": "Zero-config ObjectQL starter",
11
+ "scripts": {
12
+ "start": "ts-node src/index.ts"
13
+ },
14
+ "dependencies": {
15
+ "@objectql/core": "workspace:*",
16
+ "@objectql/driver-sql": "workspace:*",
17
+ "sqlite3": "^5.1.7"
18
+ },
19
+ "devDependencies": {
20
+ "ts-node": "^10.9.2",
21
+ "typescript": "^5.3.3",
22
+ "@types/node": "^20.11.24"
23
+ }
24
+ }
@@ -0,0 +1,58 @@
1
+ import { ObjectQL } from '@objectql/core';
2
+ import { SqlDriver } from '@objectql/driver-sql';
3
+
4
+ async function main() {
5
+ console.log("🚀 Starting ObjectQL Hello World...");
6
+
7
+ // 1. Initialize Driver
8
+ const driver = new SqlDriver({
9
+ client: 'sqlite3',
10
+ connection: { filename: ':memory:' },
11
+ useNullAsDefault: true
12
+ });
13
+
14
+ // 2. Initialize Engine (Pass driver in config)
15
+ const app = new ObjectQL({
16
+ datasources: {
17
+ default: driver
18
+ }
19
+ });
20
+
21
+ // 3. Define Metadata Inline
22
+ app.registerObject({
23
+ name: 'deal',
24
+ fields: {
25
+ title: { type: 'text', required: true },
26
+ amount: { type: 'currency' },
27
+ stage: {
28
+ type: 'select',
29
+ options: [
30
+ { label: 'New', value: 'new' },
31
+ { label: 'Negotiation', value: 'negotiation' },
32
+ { label: 'Closed', value: 'closed' }
33
+ ],
34
+ defaultValue: 'new'
35
+ }
36
+ }
37
+ });
38
+
39
+ await app.init(); // Boot the engine
40
+
41
+ // 4. Run Business Logic
42
+ const ctx = app.createContext({ isSystem: true });
43
+ const repo = ctx.object('deal');
44
+
45
+ console.log("Creating a new Deal...");
46
+ await repo.create({
47
+ title: 'Enterprise Contract',
48
+ amount: 50000,
49
+ stage: 'new'
50
+ });
51
+
52
+ const results = await repo.find({});
53
+ console.log('✅ Deals found in database:', results);
54
+ }
55
+
56
+ if (require.main === module) {
57
+ main().catch(console.error);
58
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "../../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "rootDir": "./src",
6
+ "module": "CommonJS",
7
+ "moduleResolution": "node"
8
+ },
9
+ "include": ["src/**/*"]
10
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "recommendations": [
3
+ "objectstack-ai.vscode-objectql",
4
+ "redhat.vscode-yaml",
5
+ "dbaeumer.vscode-eslint"
6
+ ]
7
+ }
@@ -1,4 +1,24 @@
1
- # @objectql/cli
1
+ # @objectql/starter-basic
2
+
3
+ ## 2.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @objectql/types@1.9.1
9
+ - @objectql/core@1.9.1
10
+ - @objectql/platform-node@1.9.1
11
+ - @objectql/driver-sql@1.9.1
12
+
13
+ ## 2.0.0
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+ - @objectql/core@1.9.0
19
+ - @objectql/driver-sql@1.9.0
20
+ - @objectql/types@1.9.0
21
+ - @objectql/platform-node@1.9.0
2
22
 
3
23
  ## 1.8.4
4
24
 
@@ -10,7 +30,6 @@
10
30
  - @objectql/core@1.8.4
11
31
  - @objectql/platform-node@1.8.4
12
32
  - @objectql/driver-sql@1.8.4
13
- - @objectql/server@1.8.4
14
33
 
15
34
  ## 1.8.3
16
35
 
@@ -23,7 +42,6 @@
23
42
  - Updated dependencies
24
43
  - @objectql/core@1.8.3
25
44
  - @objectql/driver-sql@1.8.3
26
- - @objectql/server@1.8.3
27
45
  - @objectql/types@1.8.3
28
46
  - @objectql/platform-node@1.8.3
29
47
 
@@ -35,7 +53,6 @@
35
53
  - Updated dependencies
36
54
  - @objectql/core@1.8.2
37
55
  - @objectql/driver-sql@1.8.2
38
- - @objectql/server@1.8.2
39
56
  - @objectql/types@1.8.2
40
57
  - @objectql/platform-node@1.8.2
41
58
 
@@ -47,7 +64,6 @@
47
64
  - Updated dependencies
48
65
  - @objectql/core@1.8.1
49
66
  - @objectql/driver-sql@1.8.1
50
- - @objectql/server@1.8.1
51
67
  - @objectql/types@1.8.1
52
68
  - @objectql/platform-node@1.8.1
53
69
 
@@ -62,9 +78,8 @@
62
78
  - Updated dependencies
63
79
  - @objectql/core@1.8.0
64
80
  - @objectql/driver-sql@2.0.0
65
- - @objectql/server@2.0.0
66
81
  - @objectql/types@1.8.0
67
- - @objectql/platform-node@1.8.0
82
+ - @objectql/platform-node@2.0.0
68
83
 
69
84
  ## 1.7.3
70
85
 
@@ -74,7 +89,6 @@
74
89
  - Updated dependencies
75
90
  - @objectql/core@1.7.3
76
91
  - @objectql/driver-sql@1.7.3
77
- - @objectql/server@1.7.3
78
92
  - @objectql/types@1.7.3
79
93
  - @objectql/platform-node@1.7.3
80
94
 
@@ -88,7 +102,6 @@
88
102
  - @objectql/core@1.7.2
89
103
  - @objectql/platform-node@1.7.2
90
104
  - @objectql/types@1.7.2
91
- - @objectql/server@1.7.2
92
105
 
93
106
  ## 1.7.1
94
107
 
@@ -98,7 +111,6 @@
98
111
  - Updated dependencies
99
112
  - @objectql/core@1.7.1
100
113
  - @objectql/driver-sql@1.7.1
101
- - @objectql/server@1.7.1
102
114
  - @objectql/types@1.7.1
103
115
  - @objectql/platform-node@1.7.1
104
116
 
@@ -118,81 +130,56 @@
118
130
  - Updated dependencies
119
131
  - @objectql/core@1.6.1
120
132
  - @objectql/platform-node@1.6.1
121
- - @objectql/server@1.6.1
122
133
  - @objectql/driver-sql@1.6.1
123
134
  - @objectql/types@1.6.1
124
135
 
125
- ## 1.6.0
126
-
127
- ### Minor Changes
128
-
129
- - Minor version release - 1.6.0
136
+ ## 7.0.0
130
137
 
131
138
  ### Patch Changes
132
139
 
133
140
  - Updated dependencies
134
141
  - @objectql/core@1.6.0
135
142
  - @objectql/driver-sql@1.6.0
136
- - @objectql/server@1.6.0
137
143
  - @objectql/types@1.6.0
138
144
  - @objectql/platform-node@1.6.0
139
145
 
140
- ## 1.5.0
141
-
142
- ### Minor Changes
143
-
144
- - Minor version release - 1.5.0
146
+ ## 6.0.0
145
147
 
146
148
  ### Patch Changes
147
149
 
148
150
  - Updated dependencies
149
151
  - @objectql/core@1.5.0
150
152
  - @objectql/driver-sql@1.5.0
151
- - @objectql/server@1.5.0
152
153
  - @objectql/types@1.5.0
153
154
 
154
- ## 1.4.0
155
-
156
- ### Minor Changes
157
-
158
- - Release version 1.4.0 with new features and enhancements:
159
- - Added complete REST API implementation with CRUD operations
160
- - Enhanced error handling with standardized error codes and HTTP status mapping
161
- - Added AI context support for tracking intent and use cases
162
- - Enhanced metadata API with detailed field information and action listing
163
- - Improved JSON-RPC API with better error categorization
164
- - Added hooks and actions validation and implementation
165
- - Updated documentation and examples
155
+ ## 5.0.0
166
156
 
167
157
  ### Patch Changes
168
158
 
169
159
  - Updated dependencies
170
160
  - @objectql/core@1.4.0
171
161
  - @objectql/driver-sql@1.4.0
172
- - @objectql/server@1.4.0
173
162
  - @objectql/types@1.4.0
174
163
 
175
- ## 1.3.1
164
+ ## 4.0.1
176
165
 
177
166
  ### Patch Changes
178
167
 
179
168
  - Updated dependencies
180
169
  - @objectql/core@1.3.1
181
- - @objectql/server@1.3.1
182
170
  - @objectql/driver-sql@1.3.1
183
171
  - @objectql/types@1.3.1
184
172
 
185
- ## 0.2.1
173
+ ## 4.0.0
186
174
 
187
175
  ### Patch Changes
188
176
 
189
177
  - Updated dependencies
190
178
  - @objectql/core@1.3.0
191
179
  - @objectql/types@1.3.0
192
- - @objectql/server@0.2.1
193
180
  - @objectql/driver-sql@1.2.1
194
181
 
195
- ## 0.2.0
182
+ ## 3.0.0
196
183
 
197
184
  ### Minor Changes
198
185
 
@@ -203,5 +190,22 @@
203
190
  - Updated dependencies [7df2977]
204
191
  - @objectql/core@1.2.0
205
192
  - @objectql/driver-sql@1.2.0
206
- - @objectql/server@0.2.0
207
193
  - @objectql/types@1.2.0
194
+
195
+ ## 1.8.0
196
+
197
+ ### Minor Changes
198
+
199
+ - add metadata loader
200
+
201
+ ### Patch Changes
202
+
203
+ - Updated dependencies
204
+ - @objectql/core@1.1.0
205
+
206
+ ## 1.0.0
207
+
208
+ ### Patch Changes
209
+
210
+ - Updated dependencies
211
+ - @objectql/core@1.0.0
@@ -0,0 +1,17 @@
1
+ # Basic Script Example
2
+
3
+ This is a minimal example demonstrating how to use ObjectQL as a library in a simple Node.js/TypeScript script.
4
+
5
+ It demonstrates:
6
+ 1. How to initialize ObjectQL (`new ObjectQL(...)`)
7
+ 2. How to connect to a SQLite database
8
+ 3. How to define objects (`projects.object.yml`)
9
+ 4. How to perform CRUD operations in a script
10
+
11
+ ## Run
12
+
13
+ ```bash
14
+ pnpm install
15
+ pnpm run build
16
+ node dist/index.js
17
+ ```