database-devtools 0.1.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.
Files changed (94) hide show
  1. package/LICENSE +5 -0
  2. package/dist/adapter/index.cjs +314 -0
  3. package/dist/adapter/index.cjs.map +1 -0
  4. package/dist/adapter/index.d.cts +34 -0
  5. package/dist/adapter/index.d.ts +34 -0
  6. package/dist/adapter/index.js +6 -0
  7. package/dist/adapter/index.js.map +1 -0
  8. package/dist/adapter-BjJm71wW.d.cts +30 -0
  9. package/dist/adapter-DJSjDewg.d.ts +30 -0
  10. package/dist/adapters/sqlite/index.cjs +251 -0
  11. package/dist/adapters/sqlite/index.cjs.map +1 -0
  12. package/dist/adapters/sqlite/index.d.cts +21 -0
  13. package/dist/adapters/sqlite/index.d.ts +21 -0
  14. package/dist/adapters/sqlite/index.js +6 -0
  15. package/dist/adapters/sqlite/index.js.map +1 -0
  16. package/dist/chunk-2JGL2JVD.js +52 -0
  17. package/dist/chunk-2JGL2JVD.js.map +1 -0
  18. package/dist/chunk-AZECU6D7.js +27 -0
  19. package/dist/chunk-AZECU6D7.js.map +1 -0
  20. package/dist/chunk-BLOSGEQV.js +71 -0
  21. package/dist/chunk-BLOSGEQV.js.map +1 -0
  22. package/dist/chunk-CPVVIH5G.js +258 -0
  23. package/dist/chunk-CPVVIH5G.js.map +1 -0
  24. package/dist/chunk-DGUM43GV.js +10 -0
  25. package/dist/chunk-DGUM43GV.js.map +1 -0
  26. package/dist/chunk-HIDZTOJ3.js +9 -0
  27. package/dist/chunk-HIDZTOJ3.js.map +1 -0
  28. package/dist/chunk-I65IM47D.js +243 -0
  29. package/dist/chunk-I65IM47D.js.map +1 -0
  30. package/dist/chunk-MXVIGMVT.js +3 -0
  31. package/dist/chunk-MXVIGMVT.js.map +1 -0
  32. package/dist/chunk-O6AO7KHA.js +3 -0
  33. package/dist/chunk-O6AO7KHA.js.map +1 -0
  34. package/dist/chunk-TNDOAHT5.js +1784 -0
  35. package/dist/chunk-TNDOAHT5.js.map +1 -0
  36. package/dist/chunk-ZS5MZR75.js +655 -0
  37. package/dist/chunk-ZS5MZR75.js.map +1 -0
  38. package/dist/cli.cjs +2053 -0
  39. package/dist/cli.cjs.map +1 -0
  40. package/dist/client/index.cjs +947 -0
  41. package/dist/client/index.cjs.map +1 -0
  42. package/dist/client/index.d.cts +75 -0
  43. package/dist/client/index.d.ts +75 -0
  44. package/dist/client/index.js +98 -0
  45. package/dist/client/index.js.map +1 -0
  46. package/dist/createDevToolsServer-B7NQ_5H4.d.cts +292 -0
  47. package/dist/createDevToolsServer-DlNMoCJR.d.ts +292 -0
  48. package/dist/handleDeviceSnapshot-CR-4QMdk.d.ts +116 -0
  49. package/dist/handleDeviceSnapshot-cYGuitSc.d.cts +116 -0
  50. package/dist/index.cjs +5877 -0
  51. package/dist/index.cjs.map +1 -0
  52. package/dist/index.d.cts +61 -0
  53. package/dist/index.d.ts +61 -0
  54. package/dist/index.js +2748 -0
  55. package/dist/index.js.map +1 -0
  56. package/dist/inspector/index.cjs +57 -0
  57. package/dist/inspector/index.cjs.map +1 -0
  58. package/dist/inspector/index.d.cts +26 -0
  59. package/dist/inspector/index.d.ts +26 -0
  60. package/dist/inspector/index.js +5 -0
  61. package/dist/inspector/index.js.map +1 -0
  62. package/dist/inspectors/sqlite/index.cjs +306 -0
  63. package/dist/inspectors/sqlite/index.cjs.map +1 -0
  64. package/dist/inspectors/sqlite/index.d.cts +53 -0
  65. package/dist/inspectors/sqlite/index.d.ts +53 -0
  66. package/dist/inspectors/sqlite/index.js +260 -0
  67. package/dist/inspectors/sqlite/index.js.map +1 -0
  68. package/dist/register-BuicFu9L.d.cts +32 -0
  69. package/dist/register-aITLN9Q9.d.ts +32 -0
  70. package/dist/server/index.cjs +1948 -0
  71. package/dist/server/index.cjs.map +1 -0
  72. package/dist/server/index.d.cts +15 -0
  73. package/dist/server/index.d.ts +15 -0
  74. package/dist/server/index.js +7 -0
  75. package/dist/server/index.js.map +1 -0
  76. package/dist/snapshot-Dhyecgo2.d.cts +33 -0
  77. package/dist/snapshot-Dhyecgo2.d.ts +33 -0
  78. package/dist/types/protocol.cjs +309 -0
  79. package/dist/types/protocol.cjs.map +1 -0
  80. package/dist/types/protocol.d.cts +291 -0
  81. package/dist/types/protocol.d.ts +291 -0
  82. package/dist/types/protocol.js +4 -0
  83. package/dist/types/protocol.js.map +1 -0
  84. package/dist/types-BRLJdBRY.d.cts +16 -0
  85. package/dist/types-CF6qEU-_.d.ts +16 -0
  86. package/dist/types-CIA11diJ.d.cts +62 -0
  87. package/dist/types-CKVRCX-e.d.ts +62 -0
  88. package/dist/web/assets/index-CLEaIsUd.css +1 -0
  89. package/dist/web/assets/index-DQrPRTOy.js +100 -0
  90. package/dist/web/assets/sql-wasm-UFUCzYNW.wasm +0 -0
  91. package/dist/web/index.html +26 -0
  92. package/dist/write-C3toEIMs.d.cts +21 -0
  93. package/dist/write-C3toEIMs.d.ts +21 -0
  94. package/package.json +137 -0
@@ -0,0 +1,26 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Database DevTools</title>
7
+ <script>
8
+ (function () {
9
+ var key = 'database-devtools-theme';
10
+ var stored = localStorage.getItem(key);
11
+ var theme =
12
+ stored === 'light' || stored === 'dark'
13
+ ? stored
14
+ : window.matchMedia('(prefers-color-scheme: light)').matches
15
+ ? 'light'
16
+ : 'dark';
17
+ document.documentElement.setAttribute('data-theme', theme);
18
+ })();
19
+ </script>
20
+ <script type="module" crossorigin src="/assets/index-DQrPRTOy.js"></script>
21
+ <link rel="stylesheet" crossorigin href="/assets/index-CLEaIsUd.css">
22
+ </head>
23
+ <body>
24
+ <div id="root"></div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,21 @@
1
+ /** Cell value accepted for write operations. */
2
+ type WriteCellValue = string | number | null;
3
+ type InsertOperation = {
4
+ kind: 'insert';
5
+ table: string;
6
+ values: Record<string, WriteCellValue>;
7
+ };
8
+ type UpdateOperation = {
9
+ kind: 'update';
10
+ table: string;
11
+ primaryKey: Record<string, WriteCellValue>;
12
+ values: Record<string, WriteCellValue>;
13
+ };
14
+ type DeleteOperation = {
15
+ kind: 'delete';
16
+ table: string;
17
+ primaryKey: Record<string, WriteCellValue>;
18
+ };
19
+ type WriteOperation = InsertOperation | UpdateOperation | DeleteOperation;
20
+
21
+ export type { DeleteOperation as D, InsertOperation as I, UpdateOperation as U, WriteCellValue as W, WriteOperation as a };
@@ -0,0 +1,21 @@
1
+ /** Cell value accepted for write operations. */
2
+ type WriteCellValue = string | number | null;
3
+ type InsertOperation = {
4
+ kind: 'insert';
5
+ table: string;
6
+ values: Record<string, WriteCellValue>;
7
+ };
8
+ type UpdateOperation = {
9
+ kind: 'update';
10
+ table: string;
11
+ primaryKey: Record<string, WriteCellValue>;
12
+ values: Record<string, WriteCellValue>;
13
+ };
14
+ type DeleteOperation = {
15
+ kind: 'delete';
16
+ table: string;
17
+ primaryKey: Record<string, WriteCellValue>;
18
+ };
19
+ type WriteOperation = InsertOperation | UpdateOperation | DeleteOperation;
20
+
21
+ export type { DeleteOperation as D, InsertOperation as I, UpdateOperation as U, WriteCellValue as W, WriteOperation as a };
package/package.json ADDED
@@ -0,0 +1,137 @@
1
+ {
2
+ "name": "database-devtools",
3
+ "version": "0.1.0",
4
+ "description": "Chrome DevTools-like experience for databases in React Native applications",
5
+ "license": "MIT",
6
+ "author": "Database DevTools contributors",
7
+ "homepage": "https://github.com/yellowbooking/database-devtools#readme",
8
+ "bugs": "https://github.com/yellowbooking/database-devtools/issues",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/yellowbooking/database-devtools.git",
12
+ "directory": "packages/database-devtools"
13
+ },
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "type": "module",
18
+ "main": "./dist/index.js",
19
+ "types": "./dist/index.d.ts",
20
+ "react-native": "./src/native.ts",
21
+ "exports": {
22
+ ".": {
23
+ "react-native": "./src/native.ts",
24
+ "types": "./dist/index.d.ts",
25
+ "import": "./dist/index.js",
26
+ "require": "./dist/index.cjs",
27
+ "default": "./dist/index.js"
28
+ },
29
+ "./client": {
30
+ "types": "./dist/client/index.d.ts",
31
+ "import": "./dist/client/index.js",
32
+ "default": "./dist/client/index.js"
33
+ },
34
+ "./server": {
35
+ "types": "./dist/server/index.d.ts",
36
+ "import": "./dist/server/index.js",
37
+ "default": "./dist/server/index.js"
38
+ },
39
+ "./protocol": {
40
+ "types": "./dist/types/protocol.d.ts",
41
+ "import": "./dist/types/protocol.js",
42
+ "default": "./dist/types/protocol.js"
43
+ },
44
+ "./adapter": {
45
+ "react-native": "./src/adapter/index.ts",
46
+ "types": "./dist/adapter/index.d.ts",
47
+ "import": "./dist/adapter/index.js",
48
+ "require": "./dist/adapter/index.cjs",
49
+ "default": "./dist/adapter/index.js"
50
+ },
51
+ "./inspector": {
52
+ "types": "./dist/inspector/index.d.ts",
53
+ "import": "./dist/inspector/index.js",
54
+ "default": "./dist/inspector/index.js"
55
+ },
56
+ "./inspector-sqlite": {
57
+ "types": "./dist/inspectors/sqlite/index.d.ts",
58
+ "import": "./dist/inspectors/sqlite/index.js",
59
+ "default": "./dist/inspectors/sqlite/index.js"
60
+ },
61
+ "./adapters/sqlite": {
62
+ "react-native": "./src/adapters/sqlite/index.ts",
63
+ "types": "./dist/adapters/sqlite/index.d.ts",
64
+ "import": "./dist/adapters/sqlite/index.js",
65
+ "require": "./dist/adapters/sqlite/index.cjs",
66
+ "default": "./dist/adapters/sqlite/index.js"
67
+ }
68
+ },
69
+ "bin": {
70
+ "database-devtools": "./dist/cli.cjs"
71
+ },
72
+ "files": [
73
+ "dist",
74
+ "LICENSE"
75
+ ],
76
+ "peerDependencies": {
77
+ "react": ">=18",
78
+ "react-native": ">=0.73",
79
+ "@react-native-async-storage/async-storage": ">=1.23",
80
+ "@expo/vector-icons": ">=14",
81
+ "expo-sqlite": ">=15",
82
+ "expo-clipboard": ">=7",
83
+ "sql.js": ">=1.13"
84
+ },
85
+ "peerDependenciesMeta": {
86
+ "react-native": {
87
+ "optional": true
88
+ },
89
+ "@react-native-async-storage/async-storage": {
90
+ "optional": true
91
+ },
92
+ "@expo/vector-icons": {
93
+ "optional": true
94
+ },
95
+ "expo-sqlite": {
96
+ "optional": true
97
+ },
98
+ "expo-clipboard": {
99
+ "optional": true
100
+ },
101
+ "sql.js": {
102
+ "optional": true
103
+ }
104
+ },
105
+ "dependencies": {
106
+ "express": "^4.21.2",
107
+ "ws": "^8.18.0"
108
+ },
109
+ "devDependencies": {
110
+ "@types/express": "^4.17.21",
111
+ "@types/node": "^22.10.2",
112
+ "@types/react": "~19.1.0",
113
+ "@types/sql.js": "^1.4.9",
114
+ "@types/ws": "^8.5.13",
115
+ "expo-sqlite": "~16.0.10",
116
+ "expo-clipboard": "~8.0.8",
117
+ "react": "19.1.0",
118
+ "sql.js": "^1.13.0",
119
+ "tsup": "^8.3.5",
120
+ "tsx": "^4.19.2",
121
+ "typescript": "^5.7.2",
122
+ "vitest": "^3.0.5"
123
+ },
124
+ "keywords": [
125
+ "react-native",
126
+ "sqlite",
127
+ "database",
128
+ "devtools",
129
+ "debugging"
130
+ ],
131
+ "scripts": {
132
+ "build": "tsup",
133
+ "dev": "tsx watch src/cli/index.ts",
134
+ "typecheck": "tsc --noEmit",
135
+ "test": "vitest run"
136
+ }
137
+ }