@casekit/orm-cli 0.0.1-release-candidate

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 (99) hide show
  1. package/build/cli.d.ts +1 -0
  2. package/build/cli.js +21 -0
  3. package/build/commands/db-drop/handler.d.ts +3 -0
  4. package/build/commands/db-drop/handler.js +15 -0
  5. package/build/commands/db-drop/options.d.ts +1 -0
  6. package/build/commands/db-drop/options.js +1 -0
  7. package/build/commands/db-drop.d.ts +6 -0
  8. package/build/commands/db-drop.js +8 -0
  9. package/build/commands/db-drop.test.d.ts +1 -0
  10. package/build/commands/db-drop.test.js +22 -0
  11. package/build/commands/db-pull/handler.d.ts +3 -0
  12. package/build/commands/db-pull/handler.js +32 -0
  13. package/build/commands/db-pull/options.d.ts +13 -0
  14. package/build/commands/db-pull/options.js +13 -0
  15. package/build/commands/db-pull/util/relationNames.d.ts +3 -0
  16. package/build/commands/db-pull/util/relationNames.js +14 -0
  17. package/build/commands/db-pull/util/relationNames.test.d.ts +1 -0
  18. package/build/commands/db-pull/util/relationNames.test.js +61 -0
  19. package/build/commands/db-pull/util/renderDefault.d.ts +3 -0
  20. package/build/commands/db-pull/util/renderDefault.js +46 -0
  21. package/build/commands/db-pull/util/renderDefault.test.d.ts +1 -0
  22. package/build/commands/db-pull/util/renderDefault.test.js +67 -0
  23. package/build/commands/db-pull/util/renderFieldDefinition.d.ts +2 -0
  24. package/build/commands/db-pull/util/renderFieldDefinition.js +50 -0
  25. package/build/commands/db-pull/util/renderFieldDefinition.test.d.ts +1 -0
  26. package/build/commands/db-pull/util/renderFieldDefinition.test.js +182 -0
  27. package/build/commands/db-pull/util/renderModel.basic.test.d.ts +1 -0
  28. package/build/commands/db-pull/util/renderModel.basic.test.js +169 -0
  29. package/build/commands/db-pull/util/renderModel.constraints.test.d.ts +1 -0
  30. package/build/commands/db-pull/util/renderModel.constraints.test.js +677 -0
  31. package/build/commands/db-pull/util/renderModel.d.ts +2 -0
  32. package/build/commands/db-pull/util/renderModel.defaultValues.test.d.ts +1 -0
  33. package/build/commands/db-pull/util/renderModel.defaultValues.test.js +518 -0
  34. package/build/commands/db-pull/util/renderModel.js +88 -0
  35. package/build/commands/db-pull/util/renderModel.relations.test.d.ts +1 -0
  36. package/build/commands/db-pull/util/renderModel.relations.test.js +880 -0
  37. package/build/commands/db-pull/util/renderModel.types.test.d.ts +1 -0
  38. package/build/commands/db-pull/util/renderModel.types.test.js +703 -0
  39. package/build/commands/db-pull/util/renderRelations.d.ts +2 -0
  40. package/build/commands/db-pull/util/renderRelations.js +55 -0
  41. package/build/commands/db-pull/util/renderRelations.test.d.ts +1 -0
  42. package/build/commands/db-pull/util/renderRelations.test.js +165 -0
  43. package/build/commands/db-pull/util/renderType.d.ts +6 -0
  44. package/build/commands/db-pull/util/renderType.js +55 -0
  45. package/build/commands/db-pull/util/renderType.test.d.ts +1 -0
  46. package/build/commands/db-pull/util/renderType.test.js +46 -0
  47. package/build/commands/db-pull.d.ts +30 -0
  48. package/build/commands/db-pull.js +8 -0
  49. package/build/commands/db-pull.test.d.ts +1 -0
  50. package/build/commands/db-pull.test.js +633 -0
  51. package/build/commands/db-push/handler.d.ts +3 -0
  52. package/build/commands/db-push/handler.js +14 -0
  53. package/build/commands/db-push/options.d.ts +2 -0
  54. package/build/commands/db-push/options.js +1 -0
  55. package/build/commands/db-push.d.ts +6 -0
  56. package/build/commands/db-push.js +8 -0
  57. package/build/commands/db-push.test.d.ts +1 -0
  58. package/build/commands/db-push.test.js +21 -0
  59. package/build/commands/generate-model/handler.d.ts +3 -0
  60. package/build/commands/generate-model/handler.js +18 -0
  61. package/build/commands/generate-model/options.d.ts +7 -0
  62. package/build/commands/generate-model/options.js +7 -0
  63. package/build/commands/generate-model.d.ts +18 -0
  64. package/build/commands/generate-model.js +8 -0
  65. package/build/commands/generate-model.test.d.ts +1 -0
  66. package/build/commands/generate-model.test.js +58 -0
  67. package/build/commands/init/handler.d.ts +3 -0
  68. package/build/commands/init/handler.js +22 -0
  69. package/build/commands/init/options.d.ts +12 -0
  70. package/build/commands/init/options.js +12 -0
  71. package/build/commands/init.d.ts +28 -0
  72. package/build/commands/init.js +8 -0
  73. package/build/commands/init.test.d.ts +1 -0
  74. package/build/commands/init.test.js +125 -0
  75. package/build/generators/generateConfigFile.d.ts +1 -0
  76. package/build/generators/generateConfigFile.js +16 -0
  77. package/build/generators/generateDbFile.d.ts +1 -0
  78. package/build/generators/generateDbFile.js +37 -0
  79. package/build/generators/generateModelFile.d.ts +1 -0
  80. package/build/generators/generateModelFile.js +11 -0
  81. package/build/generators/generateModelFile.test.d.ts +1 -0
  82. package/build/generators/generateModelFile.test.js +19 -0
  83. package/build/generators/generateModelsFile.d.ts +1 -0
  84. package/build/generators/generateModelsFile.js +8 -0
  85. package/build/index.d.ts +1 -0
  86. package/build/index.js +1 -0
  87. package/build/options.d.ts +12 -0
  88. package/build/options.js +12 -0
  89. package/build/test/setup.d.ts +1 -0
  90. package/build/test/setup.js +35 -0
  91. package/build/types.d.ts +14 -0
  92. package/build/types.js +1 -0
  93. package/build/util/createOrOverwriteFile.d.ts +1 -0
  94. package/build/util/createOrOverwriteFile.js +17 -0
  95. package/build/util/loadConfig.d.ts +3 -0
  96. package/build/util/loadConfig.js +21 -0
  97. package/build/util/prettify.d.ts +1 -0
  98. package/build/util/prettify.js +8 -0
  99. package/package.json +70 -0
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@casekit/orm-cli",
3
+ "description": "",
4
+ "version": "0.0.1-release-candidate",
5
+ "author": "",
6
+ "bin": {
7
+ "orm": "./build/cli.js"
8
+ },
9
+ "dependencies": {
10
+ "@casekit/unindent": "^1.0.5",
11
+ "@inquirer/prompts": "^7.5.3",
12
+ "@inquirer/testing": "^2.1.47",
13
+ "byline": "^5.0.0",
14
+ "camelcase": "^8.0.0",
15
+ "dotenv": "^16.5.0",
16
+ "es-toolkit": "^1.39.3",
17
+ "pluralize": "^8.0.0",
18
+ "tsx": "^4.20.3",
19
+ "yargs": "^18.0.0",
20
+ "@casekit/orm": "0.0.1-release-candidate",
21
+ "@casekit/orm-migrate": "0.0.1-release-candidate",
22
+ "@casekit/toolbox": "0.0.1-release-candidate",
23
+ "@casekit/sql": "0.0.1-release-candidate"
24
+ },
25
+ "devDependencies": {
26
+ "@trivago/prettier-plugin-sort-imports": "^5.2.2",
27
+ "@types/byline": "^4.2.36",
28
+ "@types/node": "^24.0.3",
29
+ "@types/pg": "^8.15.4",
30
+ "@types/pluralize": "^0.0.33",
31
+ "@types/yargs": "^17.0.33",
32
+ "@vitest/coverage-v8": "^3.2.4",
33
+ "memfs": "^4.17.2",
34
+ "prettier": "^3.5.3",
35
+ "prettier-plugin-svelte": "^3.4.0",
36
+ "typescript": "^5.8.3",
37
+ "vite-tsconfig-paths": "^5.1.4",
38
+ "vitest": "^3.2.4",
39
+ "zod": "^4.0.17",
40
+ "@casekit/orm-fixtures": "0.0.1-release-candidate",
41
+ "@casekit/prettier-config": "0.0.1-release-candidate",
42
+ "@casekit/tsconfig": "0.0.1-release-candidate"
43
+ },
44
+ "exports": {
45
+ ".": "./build/index.js"
46
+ },
47
+ "files": [
48
+ "/build"
49
+ ],
50
+ "imports": {
51
+ "#*": "./build/*"
52
+ },
53
+ "keywords": [],
54
+ "license": "ISC",
55
+ "peerDependencies": {
56
+ "pg": "^8.13.1"
57
+ },
58
+ "prettier": "@casekit/prettier-config",
59
+ "type": "module",
60
+ "scripts": {
61
+ "build": "rm -rf ./build && tsc",
62
+ "db:create": "tsx src/cli.ts db drop && tsx src/cli.ts db push",
63
+ "format:check": "prettier --check .",
64
+ "format": "prettier --write .",
65
+ "lint": "eslint src --max-warnings 0",
66
+ "test": "vitest --run --typecheck --coverage",
67
+ "test:watch": "vitest",
68
+ "typecheck": "tsc --noEmit"
69
+ }
70
+ }