admindb 2.1.0 → 2.1.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 (178) hide show
  1. package/README.md +1 -1
  2. package/dist/app.d.ts +1 -69
  3. package/dist/app.js +1 -257
  4. package/dist/auth/config.d.ts +1 -19
  5. package/dist/auth/config.js +1 -147
  6. package/dist/auth/crypto.d.ts +1 -27
  7. package/dist/auth/crypto.js +1 -133
  8. package/dist/auth/index.d.ts +1 -5
  9. package/dist/auth/index.js +1 -22
  10. package/dist/auth/middleware.d.ts +1 -14
  11. package/dist/auth/middleware.js +1 -100
  12. package/dist/auth/routes.d.ts +1 -7
  13. package/dist/auth/routes.js +1 -78
  14. package/dist/auth/types.d.ts +1 -35
  15. package/dist/auth/types.js +1 -11
  16. package/dist/cli/args.d.ts +1 -45
  17. package/dist/cli/args.js +1 -328
  18. package/dist/cli/config.d.ts +1 -56
  19. package/dist/cli/config.js +1 -133
  20. package/dist/cli/index.d.ts +1 -4
  21. package/dist/cli/index.js +1 -21
  22. package/dist/cli/runner.d.ts +1 -1
  23. package/dist/cli/runner.js +1 -222
  24. package/dist/cli.d.ts +1 -2
  25. package/dist/cli.js +1 -5
  26. package/dist/data/datasets.d.ts +1 -17
  27. package/dist/data/datasets.js +1 -133
  28. package/dist/data/detector.d.ts +1 -30
  29. package/dist/data/detector.js +1 -472
  30. package/dist/data/engine.d.ts +1 -10
  31. package/dist/data/engine.js +1 -211
  32. package/dist/data/index.d.ts +1 -5
  33. package/dist/data/index.js +1 -22
  34. package/dist/data/strategies.d.ts +1 -30
  35. package/dist/data/strategies.js +1 -343
  36. package/dist/data/types.d.ts +1 -73
  37. package/dist/data/types.js +1 -8
  38. package/dist/db/database.d.ts +1 -119
  39. package/dist/db/database.js +1 -471
  40. package/dist/db/export.d.ts +1 -12
  41. package/dist/db/export.js +1 -42
  42. package/dist/db/filters.d.ts +1 -22
  43. package/dist/db/filters.js +1 -158
  44. package/dist/db/index.d.ts +1 -8
  45. package/dist/db/index.js +1 -25
  46. package/dist/db/introspection.d.ts +1 -6
  47. package/dist/db/introspection.js +1 -172
  48. package/dist/db/manager.d.ts +1 -81
  49. package/dist/db/manager.js +1 -397
  50. package/dist/db/migrations.d.ts +1 -5
  51. package/dist/db/migrations.js +1 -110
  52. package/dist/db/postgres.d.ts +1 -85
  53. package/dist/db/postgres.js +1 -745
  54. package/dist/db/types.d.ts +1 -206
  55. package/dist/db/types.js +1 -7
  56. package/dist/index.d.ts +1 -23
  57. package/dist/index.js +1 -66
  58. package/dist/public/js/api.js +1 -47
  59. package/dist/public/js/app.js +1 -262
  60. package/dist/public/js/browse.js +1 -1371
  61. package/dist/public/js/databases.js +1 -235
  62. package/dist/public/js/designer.js +1 -258
  63. package/dist/public/js/forms.js +1 -826
  64. package/dist/public/js/icons.js +1 -51
  65. package/dist/public/js/inspector.js +1 -638
  66. package/dist/public/js/query.js +1 -322
  67. package/dist/public/js/schema.js +1 -447
  68. package/dist/public/js/seed.js +1 -1090
  69. package/dist/routes/api/helpers.d.ts +1 -42
  70. package/dist/routes/api/helpers.js +1 -133
  71. package/dist/routes/api/import-export.d.ts +1 -3
  72. package/dist/routes/api/import-export.js +1 -85
  73. package/dist/routes/api/index.d.ts +1 -4
  74. package/dist/routes/api/index.js +1 -37
  75. package/dist/routes/api/query.d.ts +1 -3
  76. package/dist/routes/api/query.js +1 -76
  77. package/dist/routes/api/rows.d.ts +1 -3
  78. package/dist/routes/api/rows.js +1 -373
  79. package/dist/routes/api/seed.d.ts +1 -3
  80. package/dist/routes/api/seed.js +1 -82
  81. package/dist/routes/api/tables.d.ts +1 -3
  82. package/dist/routes/api/tables.js +1 -160
  83. package/dist/routes/databases.d.ts +1 -26
  84. package/dist/routes/databases.js +1 -230
  85. package/dist/routes/index.d.ts +1 -3
  86. package/dist/routes/index.js +1 -20
  87. package/dist/routes/pages.d.ts +1 -9
  88. package/dist/routes/pages.js +1 -390
  89. package/dist/serverless.d.ts +1 -40
  90. package/dist/serverless.js +1 -210
  91. package/dist/sql/classifier.d.ts +1 -19
  92. package/dist/sql/classifier.js +1 -37
  93. package/dist/sql/generator.d.ts +1 -81
  94. package/dist/sql/generator.js +1 -348
  95. package/dist/sql/index.d.ts +1 -2
  96. package/dist/sql/index.js +1 -19
  97. package/dist/types/api.d.ts +1 -412
  98. package/dist/types/api.js +1 -9
  99. package/dist/utils/colors.d.ts +1 -40
  100. package/dist/utils/colors.js +1 -64
  101. package/dist/utils/common.d.ts +1 -50
  102. package/dist/utils/common.js +1 -229
  103. package/dist/utils/csv.d.ts +1 -15
  104. package/dist/utils/csv.js +1 -80
  105. package/dist/utils/datatype.d.ts +1 -49
  106. package/dist/utils/datatype.js +1 -222
  107. package/dist/utils/icons.d.ts +1 -11
  108. package/dist/utils/icons.js +1 -72
  109. package/dist/utils/index.d.ts +1 -4
  110. package/dist/utils/index.js +1 -21
  111. package/dist/utils/logger.d.ts +1 -10
  112. package/dist/utils/logger.js +1 -40
  113. package/dist/views/layouts/main.hbs +0 -4
  114. package/dist/views/pages/databases.hbs +0 -18
  115. package/dist/views/pages/designer.hbs +0 -10
  116. package/dist/views/pages/error.hbs +0 -2
  117. package/dist/views/pages/form.hbs +0 -5
  118. package/dist/views/pages/home.hbs +0 -8
  119. package/dist/views/pages/login.hbs +0 -13
  120. package/dist/views/pages/query.hbs +0 -9
  121. package/dist/views/pages/schema.hbs +0 -20
  122. package/dist/views/pages/seed.hbs +0 -31
  123. package/dist/views/pages/table.hbs +0 -14
  124. package/dist/views/partials/icon.hbs +0 -1
  125. package/dist/views/partials/navbar.hbs +0 -6
  126. package/dist/views/partials/sidebar.hbs +0 -8
  127. package/package.json +3 -2
  128. package/dist/app.js.map +0 -1
  129. package/dist/auth/config.js.map +0 -1
  130. package/dist/auth/crypto.js.map +0 -1
  131. package/dist/auth/index.js.map +0 -1
  132. package/dist/auth/middleware.js.map +0 -1
  133. package/dist/auth/routes.js.map +0 -1
  134. package/dist/auth/types.js.map +0 -1
  135. package/dist/cli/args.js.map +0 -1
  136. package/dist/cli/config.js.map +0 -1
  137. package/dist/cli/index.js.map +0 -1
  138. package/dist/cli/runner.js.map +0 -1
  139. package/dist/cli.js.map +0 -1
  140. package/dist/data/datasets.js.map +0 -1
  141. package/dist/data/detector.js.map +0 -1
  142. package/dist/data/engine.js.map +0 -1
  143. package/dist/data/index.js.map +0 -1
  144. package/dist/data/strategies.js.map +0 -1
  145. package/dist/data/types.js.map +0 -1
  146. package/dist/db/database.js.map +0 -1
  147. package/dist/db/export.js.map +0 -1
  148. package/dist/db/filters.js.map +0 -1
  149. package/dist/db/index.js.map +0 -1
  150. package/dist/db/introspection.js.map +0 -1
  151. package/dist/db/manager.js.map +0 -1
  152. package/dist/db/migrations.js.map +0 -1
  153. package/dist/db/postgres.js.map +0 -1
  154. package/dist/db/types.js.map +0 -1
  155. package/dist/index.js.map +0 -1
  156. package/dist/public/css/input.css +0 -302
  157. package/dist/routes/api/helpers.js.map +0 -1
  158. package/dist/routes/api/import-export.js.map +0 -1
  159. package/dist/routes/api/index.js.map +0 -1
  160. package/dist/routes/api/query.js.map +0 -1
  161. package/dist/routes/api/rows.js.map +0 -1
  162. package/dist/routes/api/seed.js.map +0 -1
  163. package/dist/routes/api/tables.js.map +0 -1
  164. package/dist/routes/databases.js.map +0 -1
  165. package/dist/routes/index.js.map +0 -1
  166. package/dist/routes/pages.js.map +0 -1
  167. package/dist/serverless.js.map +0 -1
  168. package/dist/sql/classifier.js.map +0 -1
  169. package/dist/sql/generator.js.map +0 -1
  170. package/dist/sql/index.js.map +0 -1
  171. package/dist/types/api.js.map +0 -1
  172. package/dist/utils/colors.js.map +0 -1
  173. package/dist/utils/common.js.map +0 -1
  174. package/dist/utils/csv.js.map +0 -1
  175. package/dist/utils/datatype.js.map +0 -1
  176. package/dist/utils/icons.js.map +0 -1
  177. package/dist/utils/index.js.map +0 -1
  178. package/dist/utils/logger.js.map +0 -1
@@ -1,72 +1 @@
1
- "use strict";
2
- /**
3
- * SVG Icons registry for AdminDB.
4
- *
5
- * Centralizes all SVG icons in a single module, providing consistent
6
- * styling, clean templates, and zero inline SVG duplication.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.ICONS = void 0;
10
- exports.renderIcon = renderIcon;
11
- exports.ICONS = {
12
- // Navigation & Core
13
- menu: '<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16" /></svg>',
14
- home: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" /></svg>',
15
- database: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M4 7v10c0 1.1.9 2 2 2h12a2 2 0 002-2V7M4 7c0-1.1.9-2 2-2h12a2 2 0 012 2M4 7c0 1.1.9 2 2 2h12a2 2 0 002-2" /></svg>',
16
- table: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 10h18M3 14h18m-9-4v8m-7 0h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z" /></svg>',
17
- query: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M13 10V3L4 14h7v7l9-11h-7z" /></svg>',
18
- designer: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4v16m8-8H4" /></svg>',
19
- plus: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4v16m8-8H4" /></svg>',
20
- book: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" /></svg>',
21
- schema: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" /><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /></svg>',
22
- // Actions
23
- search: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /></svg>',
24
- filter: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414A1 1 0 0014 15.414V20a1 1 0 01-1 1h-2a1 1 0 01-1-1v-4.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z" /></svg>',
25
- export: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" /></svg>',
26
- import: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" /></svg>',
27
- seed: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z" /></svg>',
28
- edit: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>',
29
- trash: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /></svg>',
30
- copy: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" /></svg>',
31
- duplicate: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M8 7v8a2 2 0 002 2h6M8 7V5a2 2 0 012-2h4.586a1 1 0 01.707.293l4.414 4.414a1 1 0 01.293.707V15a2 2 0 01-2 2h-2M8 7H6a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2v-2" /></svg>',
32
- save: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4" /></svg>',
33
- run: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z" /><path stroke-linecap="round" stroke-linejoin="round" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>',
34
- inspect: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/><path stroke-linecap="round" stroke-linejoin="round" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/></svg>',
35
- sql: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" /></svg>',
36
- // Arrows & Direction
37
- chevronDown: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7" /></svg>',
38
- chevronUp: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M5 15l7-7 7 7" /></svg>',
39
- chevronLeft: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" /></svg>',
40
- chevronRight: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" /></svg>',
41
- arrowLeft: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M10 19l-7-7m0 0l7-7m-7 7h18" /></svg>',
42
- arrowRight: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M13 7l5 5m0 0l-5 5m5-5H6" /></svg>',
43
- arrowUp: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 10h13M3 10l4-4m-4 4l4 4" /></svg>',
44
- // Indicators & Status
45
- check: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" /></svg>',
46
- x: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" /></svg>',
47
- warning: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /></svg>',
48
- stats: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>',
49
- key: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z" /></svg>',
50
- dotsHorizontal: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z" /></svg>',
51
- dotsVertical: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z" /></svg>',
52
- // Auth & Account
53
- user: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" /></svg>',
54
- logout: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" /></svg>',
55
- lock: '<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" /></svg>',
56
- };
57
- /**
58
- * Renders an SVG icon by name with optional custom CSS classes.
59
- */
60
- function renderIcon(name, customClass) {
61
- const svg = exports.ICONS[name];
62
- if (!svg)
63
- return '';
64
- if (!customClass)
65
- return svg;
66
- // Replace existing class attribute or inject new one
67
- if (svg.includes('class="')) {
68
- return svg.replace(/class="[^"]*"/, `class="${customClass}"`);
69
- }
70
- return svg.replace('<svg', `<svg class="${customClass}"`);
71
- }
72
- //# sourceMappingURL=icons.js.map
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.ICONS=void 0,exports.renderIcon=function(name,customClass){const svg=exports.ICONS[name];if(!svg)return"";if(!customClass)return svg;if(svg.includes('class="'))return svg.replace(/class="[^"]*"/,`class="${customClass}"`);return svg.replace("<svg",`<svg class="${customClass}"`)},exports.ICONS={menu:'<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16" /></svg>',home:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" /></svg>',database:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M4 7v10c0 1.1.9 2 2 2h12a2 2 0 002-2V7M4 7c0-1.1.9-2 2-2h12a2 2 0 012 2M4 7c0 1.1.9 2 2 2h12a2 2 0 002-2" /></svg>',table:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 10h18M3 14h18m-9-4v8m-7 0h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z" /></svg>',query:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M13 10V3L4 14h7v7l9-11h-7z" /></svg>',designer:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4v16m8-8H4" /></svg>',plus:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4v16m8-8H4" /></svg>',book:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" /></svg>',schema:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" /><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /></svg>',search:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /></svg>',filter:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414A1 1 0 0014 15.414V20a1 1 0 01-1 1h-2a1 1 0 01-1-1v-4.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z" /></svg>',export:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" /></svg>',import:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" /></svg>',seed:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z" /></svg>',edit:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>',trash:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /></svg>',copy:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" /></svg>',duplicate:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M8 7v8a2 2 0 002 2h6M8 7V5a2 2 0 012-2h4.586a1 1 0 01.707.293l4.414 4.414a1 1 0 01.293.707V15a2 2 0 01-2 2h-2M8 7H6a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2v-2" /></svg>',save:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4" /></svg>',run:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z" /><path stroke-linecap="round" stroke-linejoin="round" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>',inspect:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/><path stroke-linecap="round" stroke-linejoin="round" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/></svg>',sql:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" /></svg>',chevronDown:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7" /></svg>',chevronUp:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M5 15l7-7 7 7" /></svg>',chevronLeft:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" /></svg>',chevronRight:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" /></svg>',arrowLeft:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M10 19l-7-7m0 0l7-7m-7 7h18" /></svg>',arrowRight:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M13 7l5 5m0 0l-5 5m5-5H6" /></svg>',arrowUp:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 10h13M3 10l4-4m-4 4l4 4" /></svg>',check:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" /></svg>',x:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" /></svg>',warning:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /></svg>',stats:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>',key:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z" /></svg>',dotsHorizontal:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z" /></svg>',dotsVertical:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z" /></svg>',user:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" /></svg>',logout:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" /></svg>',lock:'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" /></svg>'};
@@ -1,4 +1 @@
1
- export * from './common';
2
- export * from './csv';
3
- export * from './logger';
4
- export * from './colors';
1
+ export * from './common';export * from './csv';export * from './logger';export * from './colors';
@@ -1,21 +1 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./common"), exports);
18
- __exportStar(require("./csv"), exports);
19
- __exportStar(require("./logger"), exports);
20
- __exportStar(require("./colors"), exports);
21
- //# sourceMappingURL=index.js.map
1
+ var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./common"),exports),__exportStar(require("./csv"),exports),__exportStar(require("./logger"),exports),__exportStar(require("./colors"),exports);
@@ -1,10 +1 @@
1
- export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
2
- export interface Logger {
3
- debug(...args: unknown[]): void;
4
- info(...args: unknown[]): void;
5
- warn(...args: unknown[]): void;
6
- error(...args: unknown[]): void;
7
- child(scope: string): Logger;
8
- }
9
- /** Minimal, color-enhanced console logger with level filtering and scoped children. */
10
- export declare function createLogger(level?: LogLevel, scope?: string): Logger;
1
+ export type LogLevel='debug'|'info'|'warn'|'error';export interface Logger{debug(...args:unknown[]):void;info(...args:unknown[]):void;warn(...args:unknown[]):void;error(...args:unknown[]):void;child(scope:string):Logger;}export declare function createLogger(level?:LogLevel,scope?:string):Logger;
@@ -1,40 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createLogger = createLogger;
4
- const colors_1 = require("./colors");
5
- const LEVELS = { debug: 10, info: 20, warn: 30, error: 40 };
6
- function formatTime() {
7
- const d = new Date();
8
- const pad = (n) => String(n).padStart(2, '0');
9
- return `${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`;
10
- }
11
- const BADGES = {
12
- debug: colors_1.c.magenta('[debug]'),
13
- info: colors_1.c.cyan('[info]'),
14
- warn: colors_1.c.yellow('[warn]'),
15
- error: colors_1.c.red(colors_1.c.bold('[error]')),
16
- };
17
- /** Minimal, color-enhanced console logger with level filtering and scoped children. */
18
- function createLogger(level = 'info', scope = 'admindb') {
19
- const threshold = LEVELS[level] ?? LEVELS.info;
20
- // Clean scope name (e.g. "admindb:db:users.db" -> "db:users.db")
21
- const cleanScope = scope === 'admindb' || scope === 'app' ? '' : scope.replace(/^admindb:/, '');
22
- const scopeTag = cleanScope ? colors_1.c.dim(colors_1.c.cyan(`[${cleanScope}]`)) : '';
23
- const write = (lv, args) => {
24
- if (LEVELS[lv] < threshold)
25
- return;
26
- const time = colors_1.c.gray(formatTime());
27
- const badge = BADGES[lv];
28
- const prefix = [time, badge, scopeTag].filter(Boolean).join(' ');
29
- // eslint-disable-next-line no-console
30
- console.log(prefix, ...args);
31
- };
32
- return {
33
- debug: (...args) => write('debug', args),
34
- info: (...args) => write('info', args),
35
- warn: (...args) => write('warn', args),
36
- error: (...args) => write('error', args),
37
- child: (s) => createLogger(level, cleanScope ? `${cleanScope}:${s}` : s),
38
- };
39
- }
40
- //# sourceMappingURL=logger.js.map
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.createLogger=function createLogger(level="info",scope="admindb"){const threshold=LEVELS[level]??LEVELS.info,cleanScope="admindb"===scope||"app"===scope?"":scope.replace(/^admindb:/,""),scopeTag=cleanScope?colors_1.c.dim(colors_1.c.cyan(`[${cleanScope}]`)):"",write=(lv,args)=>{if(LEVELS[lv]<threshold)return;const prefix=[colors_1.c.gray(function(){const d=new Date,pad=n=>String(n).padStart(2,"0");return`${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`}()),BADGES[lv],scopeTag].filter(Boolean).join(" ");console.log(prefix,...args)};return{debug:(...args)=>write("debug",args),info:(...args)=>write("info",args),warn:(...args)=>write("warn",args),error:(...args)=>write("error",args),child:s=>createLogger(level,cleanScope?`${cleanScope}:${s}`:s)}};const colors_1=require("./colors"),LEVELS={debug:10,info:20,warn:30,error:40};const BADGES={debug:colors_1.c.magenta("[debug]"),info:colors_1.c.cyan("[info]"),warn:colors_1.c.yellow("[warn]"),error:colors_1.c.red(colors_1.c.bold("[error]"))};
@@ -1,7 +1,5 @@
1
- {{!-- Layout: Main Application Wrapper (renders all pages via {{{body}}}) --}}
2
1
  <!DOCTYPE html>
3
2
  <html lang="en" data-theme="admindb">
4
-
5
3
  <head>
6
4
  <meta charset="utf-8" />
7
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
@@ -31,7 +29,6 @@
31
29
  <script src="{{basePath}}/js/api.js" defer></script>
32
30
  <script src="{{basePath}}/js/app.js" defer></script>
33
31
  <script src="{{basePath}}/js/inspector.js" defer></script>
34
-
35
32
  </head>
36
33
  <body class="min-h-screen bg-base-200 text-base-content">
37
34
  {{#if readonly}}
@@ -66,7 +63,6 @@
66
63
  AdminDB{{#if version}} v{{version}}{{/if}} · SQLite & PostgreSQL database administration
67
64
  </footer>
68
65
  </div>
69
-
70
66
  <div class="drawer-side z-40">
71
67
  <label for="sidebar-toggle" aria-label="close sidebar" class="drawer-overlay"></label>
72
68
  {{> sidebar}}
@@ -1,16 +1,10 @@
1
- {{!-- Page: Multi-Database Manager Landing · URL: /databases (or / in manager mode) --}}
2
1
  <div class="space-y-6">
3
-
4
- <!-- Header -->
5
2
  <div>
6
3
  <p class="text-sm font-semibold uppercase tracking-wider text-primary">Manager</p>
7
4
  <h1 class="mt-1 text-3xl font-extrabold tracking-tight">Databases</h1>
8
5
  <p class="mt-1.5 text-sm text-base-content/55">Connect to PostgreSQL databases, create SQLite files, or open existing local databases with configurable read/write access.</p>
9
6
  </div>
10
-
11
- <!-- Connect & Create Actions Grid -->
12
7
  <div class="grid grid-cols-1 gap-5 lg:grid-cols-2">
13
- <!-- Connect PostgreSQL Database -->
14
8
  <div class="app-card p-5 border border-info/30 bg-info/[0.02]">
15
9
  <div class="mb-3 flex items-center justify-between">
16
10
  <h2 class="flex items-center gap-2 text-sm font-bold uppercase tracking-wide text-info">
@@ -49,8 +43,6 @@
49
43
  Credentials are encrypted in-memory and sanitized in the UI. Passwords are never sent to the client.
50
44
  </p>
51
45
  </div>
52
-
53
- <!-- Create SQLite Database -->
54
46
  <div class="app-card p-5 border border-emerald-500/30 bg-emerald-500/[0.02]">
55
47
  <div class="mb-3 flex items-center justify-between">
56
48
  <h2 class="flex items-center gap-2 text-sm font-bold uppercase tracking-wide text-emerald-600 dark:text-emerald-400">
@@ -80,14 +72,11 @@
80
72
  </p>
81
73
  </div>
82
74
  </div>
83
-
84
- <!-- List -->
85
75
  <div>
86
76
  <div class="mb-3 flex items-center justify-between">
87
77
  <h2 class="text-lg font-bold">Available databases</h2>
88
78
  <span class="text-sm text-base-content/45">{{databases.length}} total</span>
89
79
  </div>
90
-
91
80
  {{#if databases.length}}
92
81
  <div class="app-card overflow-hidden">
93
82
  <div class="overflow-x-auto">
@@ -194,8 +183,6 @@
194
183
  </div>
195
184
  {{/if}}
196
185
  </div>
197
-
198
- <!-- Open an existing database file -->
199
186
  {{#if allowBrowse}}
200
187
  <div class="app-card p-5">
201
188
  <div class="mb-3 flex flex-wrap items-center justify-between gap-2">
@@ -231,8 +218,6 @@
231
218
  </p>
232
219
  </div>
233
220
  {{/if}}
234
-
235
- <!-- Security Responsibility Notice -->
236
221
  <div class="rounded-xl border border-warning/30 bg-warning/[0.04] p-4 text-xs text-base-content/75 leading-relaxed">
237
222
  <div class="flex items-start gap-2.5">
238
223
  <span class="text-warning shrink-0 mt-0.5">
@@ -244,8 +229,5 @@
244
229
  </div>
245
230
  </div>
246
231
  </div>
247
-
248
232
  </div>
249
233
  <script src="{{basePath}}/js/databases.js" defer></script>
250
-
251
-
@@ -1,15 +1,10 @@
1
- {{!-- Page: Visual Table Designer & Creator · URL: /designer --}}
2
1
  <div class="space-y-6">
3
-
4
- <!-- Header -->
5
2
  <div>
6
3
  <p class="text-sm font-semibold uppercase tracking-wider text-primary">Designer</p>
7
4
  <h1 class="mt-1 text-3xl font-extrabold tracking-tight">Create table</h1>
8
5
  <p class="mt-1.5 text-sm text-base-content/55">Define columns visually — the SQL preview updates live as you type.</p>
9
6
  </div>
10
-
11
7
  <div class="grid gap-6 lg:grid-cols-[1fr_380px]">
12
- <!-- Left: editor -->
13
8
  <div class="space-y-5">
14
9
  <div class="app-card p-5">
15
10
  <label class="field-label">
@@ -18,7 +13,6 @@
18
13
  </label>
19
14
  <input id="table-name" type="text" class="field-input font-mono" placeholder="e.g. users" autocomplete="off" spellcheck="false" />
20
15
  </div>
21
-
22
16
  <div class="app-card">
23
17
  <div class="flex flex-wrap items-center justify-between gap-2 border-b border-base-200 px-5 py-4">
24
18
  <h2 class="text-sm font-semibold uppercase tracking-wide text-base-content/45">Columns</h2>
@@ -38,7 +32,6 @@
38
32
  {{else}}
39
33
  <span class="text-sm font-medium text-warning">Read-only — table creation is disabled.</span>
40
34
  {{/unless}}
41
-
42
35
  <button id="copy-sql" type="button" class="btn btn-outline gap-1.5" title="Copy the preview SQL">
43
36
  {{{icon "copy" class="h-4 w-4"}}}
44
37
  Copy SQL
@@ -46,8 +39,6 @@
46
39
  </div>
47
40
  </div>
48
41
  </div>
49
-
50
- <!-- Right: live preview + tips -->
51
42
  <aside class="space-y-4 self-start lg:sticky lg:top-24">
52
43
  <div class="app-card overflow-hidden">
53
44
  <div class="flex items-center justify-between border-b border-base-200 bg-base-200/40 px-4 py-3">
@@ -66,7 +57,6 @@
66
57
  </div>
67
58
  </div>
68
59
  </div>
69
-
70
60
  <div class="rounded-2xl border border-base-300/70 bg-base-100 p-4">
71
61
  <h3 class="mb-2 text-[11px] font-semibold uppercase tracking-wider text-base-content/45">
72
62
  {{#if isPostgres}}PostgreSQL Type Guide{{else}}SQLite Type Guide{{/if}}
@@ -1,6 +1,4 @@
1
- {{!-- Page: Error Display · URL: HTTP 404 / 500 Error Handlers --}}
2
1
  <div class="mx-auto mt-16 max-w-md space-y-6 text-center">
3
-
4
2
  <div class="mx-auto grid h-20 w-20 place-items-center rounded-3xl bg-error/10 text-error">
5
3
  {{{icon "warning" class="h-10 w-10"}}}
6
4
  </div>
@@ -1,7 +1,4 @@
1
- {{!-- Page: Row Editor & Inserter · URL: /tables/:table/rows/new or /tables/:table/rows/:id/edit --}}
2
1
  <div class="mx-auto max-w-3xl space-y-5">
3
-
4
- <!-- Header -->
5
2
  <div class="flex items-center gap-3">
6
3
  <a href="{{basePath}}/tables/{{table}}" class="btn btn-circle btn-ghost btn-sm" aria-label="Back to table">
7
4
  {{{icon "arrowLeft" class="h-5 w-5"}}}
@@ -14,7 +11,6 @@
14
11
  <p class="text-sm text-base-content/55">{{infoSummary}}</p>
15
12
  </div>
16
13
  </div>
17
-
18
14
  <div class="app-card">
19
15
  <div class="border-b border-base-200 px-6 py-4">
20
16
  <h2 class="text-sm font-semibold uppercase tracking-wide text-base-content/45">Row fields</h2>
@@ -42,7 +38,6 @@
42
38
  </p>
43
39
  </div>
44
40
  </div>
45
-
46
41
  <div id="generated-sql" class="hidden">
47
42
  <div class="app-card">
48
43
  <div class="flex items-center justify-between border-b border-base-200 px-6 py-4">
@@ -1,7 +1,4 @@
1
- {{!-- Page: Database Overview Dashboard · URL: / (or /{basePath}/) --}}
2
1
  <div class="space-y-8">
3
-
4
- <!-- Header -->
5
2
  <div class="flex flex-wrap items-end justify-between gap-4">
6
3
  <div>
7
4
  <p class="text-sm font-semibold uppercase tracking-wider text-primary">Overview</p>
@@ -21,8 +18,6 @@
21
18
  {{/unless}}
22
19
  </div>
23
20
  </div>
24
-
25
- <!-- Stat cards -->
26
21
  <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4">
27
22
  <div class="stat-card">
28
23
  <span class="stat-icon bg-primary/10 text-primary">
@@ -68,14 +63,11 @@
68
63
  </div>
69
64
  </div>
70
65
  </div>
71
-
72
- <!-- Tables -->
73
66
  <div>
74
67
  <div class="mb-3 flex items-center justify-between">
75
68
  <h2 class="text-lg font-bold">Tables</h2>
76
69
  <span class="text-sm text-base-content/45">{{tables.length}} total</span>
77
70
  </div>
78
-
79
71
  {{#if tables.length}}
80
72
  <div class="app-card overflow-hidden">
81
73
  <div class="overflow-x-auto">
@@ -1,8 +1,5 @@
1
- {{!-- Page: Authentication & Login · URL: /login --}}
2
1
  <div class="flex min-h-[75vh] items-center justify-center py-6 px-4">
3
-
4
2
  <div class="w-full max-w-md">
5
- <!-- Brand Header -->
6
3
  <div class="mb-8 text-center">
7
4
  <div class="mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-primary/10 text-primary shadow-soft">
8
5
  {{{icon "database" class="h-8 w-8"}}}
@@ -14,8 +11,6 @@
14
11
  Sign in to access your database administration console
15
12
  </p>
16
13
  </div>
17
-
18
- <!-- Login Card -->
19
14
  <div class="app-card border border-base-300/80 bg-base-100 p-6 sm:p-8 shadow-soft">
20
15
  {{#if error}}
21
16
  <div class="mb-6 flex items-start gap-3 rounded-xl bg-error/10 p-4 text-sm text-error border border-error/20" role="alert">
@@ -25,7 +20,6 @@
25
20
  <div class="font-medium">{{error}}</div>
26
21
  </div>
27
22
  {{/if}}
28
-
29
23
  {{#if isDefaultPassword}}
30
24
  <div class="mb-6 rounded-xl bg-info/10 p-3.5 text-xs text-info border border-info/20">
31
25
  <div class="font-semibold flex items-center gap-1.5 mb-1">
@@ -40,12 +34,10 @@
40
34
  </p>
41
35
  </div>
42
36
  {{/if}}
43
-
44
37
  <form method="POST" action="{{basePath}}/login" class="space-y-4">
45
38
  {{#if next}}
46
39
  <input type="hidden" name="next" value="{{next}}" />
47
40
  {{/if}}
48
-
49
41
  <div>
50
42
  <label class="field-label" for="login-username">
51
43
  <span>Username</span>
@@ -67,7 +59,6 @@
67
59
  </div>
68
60
  </div>
69
61
  </div>
70
-
71
62
  <div>
72
63
  <label class="field-label" for="login-password">
73
64
  <span>Password</span>
@@ -87,7 +78,6 @@
87
78
  </div>
88
79
  </div>
89
80
  </div>
90
-
91
81
  <div class="pt-2">
92
82
  <button type="submit" class="btn btn-primary w-full gap-2 font-semibold shadow-soft">
93
83
  {{{icon "logout" class="h-4 w-4 rotate-180"}}}
@@ -96,8 +86,6 @@
96
86
  </div>
97
87
  </form>
98
88
  </div>
99
-
100
- <!-- Security & Auth Control Note -->
101
89
  <div class="mt-6 space-y-2 text-center text-xs text-base-content/55">
102
90
  <p class="leading-relaxed">
103
91
  <span class="font-semibold text-base-content/80">Security Notice:</span> Built-in auth provides basic access control. For production, protect your admin routes using your own application authentication, VPN, or reverse proxy.
@@ -108,4 +96,3 @@
108
96
  </div>
109
97
  </div>
110
98
  </div>
111
-
@@ -1,7 +1,4 @@
1
- {{!-- Page: SQL Query Console & Workbench · URL: /query --}}
2
1
  <div class="space-y-6">
3
-
4
- <!-- Header -->
5
2
  <div class="flex flex-wrap items-center justify-between gap-3">
6
3
  <div>
7
4
  <p class="text-sm font-semibold uppercase tracking-wider text-primary">Workspace</p>
@@ -21,8 +18,6 @@
21
18
  </button>
22
19
  </div>
23
20
  </div>
24
-
25
- <!-- Saved queries row -->
26
21
  <div class="flex flex-wrap items-end gap-3">
27
22
  <div class="form-control w-full max-w-xs">
28
23
  <label class="field-label" for="saved-query-select">Saved queries</label>
@@ -44,8 +39,6 @@
44
39
  </div>
45
40
  {{/unless}}
46
41
  </div>
47
-
48
- <!-- Editor -->
49
42
  <div class="app-card overflow-hidden">
50
43
  <div class="flex items-center justify-between border-b border-base-200 bg-base-200/40 px-4 py-2.5">
51
44
  <span class="flex items-center gap-2 text-sm font-semibold text-base-content/60">
@@ -64,8 +57,6 @@
64
57
  <div id="query-message"></div>
65
58
  </div>
66
59
  </div>
67
-
68
- <!-- Results -->
69
60
  <div id="query-result" class="hidden">
70
61
  <div class="app-card overflow-hidden">
71
62
  <div class="flex items-center gap-2 border-b border-base-200 px-4 py-3">
@@ -1,7 +1,4 @@
1
- {{!-- Page: Table Schema & Structure Inspector · URL: /tables/:table/schema --}}
2
1
  <div class="space-y-6">
3
-
4
- <!-- Header -->
5
2
  <div class="flex flex-wrap items-center justify-between gap-3">
6
3
  <div class="flex items-center gap-3.5">
7
4
  <a href="{{basePath}}/tables/{{table}}" class="btn btn-circle btn-ghost btn-sm" aria-label="Back to table">
@@ -23,8 +20,6 @@
23
20
  </a>
24
21
  </div>
25
22
  </div>
26
-
27
- <!-- Rename table -->
28
23
  <div class="app-card p-5">
29
24
  <div class="flex flex-wrap items-end gap-3">
30
25
  <div class="w-full max-w-sm">
@@ -38,8 +33,6 @@
38
33
  {{#if isInternal}}<span class="mb-1 text-xs text-base-content/45">Internal tables cannot be renamed.</span>{{/if}}
39
34
  </div>
40
35
  </div>
41
-
42
- <!-- Columns -->
43
36
  <div class="app-card overflow-hidden">
44
37
  <div class="flex flex-wrap items-center justify-between gap-2 border-b border-base-200 px-5 py-4">
45
38
  <h2 class="text-sm font-semibold uppercase tracking-wide text-base-content/45">
@@ -51,7 +44,6 @@
51
44
  Add column
52
45
  </button>
53
46
  </div>
54
-
55
47
  <div id="add-column-panel" class="hidden border-b border-base-200 p-4">
56
48
  <div class="mb-2 text-xs font-bold uppercase tracking-wider text-primary">Add New Column</div>
57
49
  <div id="add-column-form" class="grid grid-cols-2 items-end gap-2.5 sm:grid-cols-12"></div>
@@ -61,7 +53,6 @@
61
53
  <button id="add-column-cancel" type="button" class="btn btn-ghost btn-sm">Cancel</button>
62
54
  </div>
63
55
  </div>
64
-
65
56
  <div id="edit-column-panel" class="hidden border-b border-base-200 bg-base-200/30 p-4">
66
57
  <div class="mb-2.5 flex items-center justify-between">
67
58
  <div class="flex items-center gap-2">
@@ -77,7 +68,6 @@
77
68
  <button id="edit-column-cancel" type="button" class="btn btn-ghost btn-sm">Cancel</button>
78
69
  </div>
79
70
  </div>
80
-
81
71
  <div class="overflow-x-auto">
82
72
  <table class="table table-sm">
83
73
  <thead>
@@ -136,8 +126,6 @@
136
126
  </table>
137
127
  </div>
138
128
  </div>
139
-
140
- <!-- Foreign keys -->
141
129
  {{#if schema.foreignKeys.length}}
142
130
  <div class="app-card overflow-hidden">
143
131
  <div class="border-b border-base-200 px-5 py-4">
@@ -167,8 +155,6 @@
167
155
  </div>
168
156
  </div>
169
157
  {{/if}}
170
-
171
- <!-- Indexes -->
172
158
  <div class="app-card overflow-hidden">
173
159
  <div class="flex flex-wrap items-center justify-between gap-2 border-b border-base-200 px-5 py-4">
174
160
  <h2 class="text-sm font-semibold uppercase tracking-wide text-base-content/45">
@@ -180,7 +166,6 @@
180
166
  Add index
181
167
  </button>
182
168
  </div>
183
-
184
169
  <div id="add-index-panel" class="hidden border-b border-base-200 p-4">
185
170
  <div class="grid grid-cols-1 gap-3 sm:grid-cols-3">
186
171
  <div>
@@ -216,7 +201,6 @@
216
201
  <button id="add-index-cancel" type="button" class="btn btn-ghost btn-sm">Cancel</button>
217
202
  </div>
218
203
  </div>
219
-
220
204
  <div class="overflow-x-auto">
221
205
  {{#if schema.indexes.length}}
222
206
  <table class="table table-sm">
@@ -266,8 +250,6 @@
266
250
  {{/if}}
267
251
  </div>
268
252
  </div>
269
-
270
- <!-- Referenced by -->
271
253
  {{#if schema.references.length}}
272
254
  <div class="app-card overflow-hidden">
273
255
  <div class="border-b border-base-200 px-5 py-4">
@@ -293,8 +275,6 @@
293
275
  </div>
294
276
  </div>
295
277
  {{/if}}
296
-
297
- <!-- Danger zone -->
298
278
  {{#unless isInternal}}
299
279
  <div class="rounded-2xl border border-error/25 bg-error/[0.03] p-5">
300
280
  <h2 class="flex items-center gap-2 text-sm font-semibold uppercase tracking-wide text-error">