mycontext-cli 3.0.2 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -5
- package/dist/cli.js +28 -15
- package/dist/cli.js.map +1 -1
- package/dist/commands/help.d.ts.map +1 -1
- package/dist/commands/help.js +94 -25
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/init.d.ts +12 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +135 -32
- package/dist/commands/init.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/templates/instantdb/auth.ts +89 -0
- package/dist/templates/instantdb/instant-admin.ts +9 -0
- package/dist/templates/instantdb/instant-client.ts +36 -0
- package/dist/templates/instantdb/instantdb-storage.ts +236 -0
- package/dist/utils/fileSystem.d.ts +9 -0
- package/dist/utils/fileSystem.d.ts.map +1 -1
- package/dist/utils/fileSystem.js +36 -0
- package/dist/utils/fileSystem.js.map +1 -1
- package/package.json +1 -1
- package/dist/templates/instantdb/db.template.ts +0 -14
- package/dist/templates/instantdb/home-client.template.tsx +0 -127
- package/dist/templates/instantdb/page.template.tsx +0 -5
- package/dist/templates/instantdb/perms.template.ts +0 -9
- package/dist/templates/instantdb/schema.template.ts +0 -28
package/dist/utils/fileSystem.js
CHANGED
|
@@ -227,6 +227,42 @@ class FileSystemManager {
|
|
|
227
227
|
async restoreFile(backupPath, targetPath) {
|
|
228
228
|
await fs.copy(backupPath, targetPath);
|
|
229
229
|
}
|
|
230
|
+
/**
|
|
231
|
+
* Detect the lib directory in the project
|
|
232
|
+
* Returns src/lib/ if src directory exists, otherwise lib/
|
|
233
|
+
*/
|
|
234
|
+
async detectLibDirectory(projectPath) {
|
|
235
|
+
const srcDir = path.join(projectPath, "src");
|
|
236
|
+
const hasSrc = await fs.pathExists(srcDir);
|
|
237
|
+
if (hasSrc) {
|
|
238
|
+
return path.join(projectPath, "src", "lib");
|
|
239
|
+
}
|
|
240
|
+
return path.join(projectPath, "lib");
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Copy InstantDB template files to the project's lib directory
|
|
244
|
+
*/
|
|
245
|
+
async copyInstantDBTemplates(projectPath) {
|
|
246
|
+
const libDir = await this.detectLibDirectory(projectPath);
|
|
247
|
+
await fs.ensureDir(libDir);
|
|
248
|
+
// Get the templates directory relative to this file
|
|
249
|
+
const templatesDir = path.join(__dirname, "..", "templates", "instantdb");
|
|
250
|
+
// Template files to copy
|
|
251
|
+
const templateFiles = [
|
|
252
|
+
"auth.ts",
|
|
253
|
+
"instant-admin.ts",
|
|
254
|
+
"instant-client.ts",
|
|
255
|
+
"instantdb-storage.ts",
|
|
256
|
+
];
|
|
257
|
+
// Copy each template file
|
|
258
|
+
for (const file of templateFiles) {
|
|
259
|
+
const sourcePath = path.join(templatesDir, file);
|
|
260
|
+
const destPath = path.join(libDir, file);
|
|
261
|
+
if (await fs.pathExists(sourcePath)) {
|
|
262
|
+
await fs.copy(sourcePath, destPath, { overwrite: true });
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
230
266
|
}
|
|
231
267
|
exports.FileSystemManager = FileSystemManager;
|
|
232
268
|
//# sourceMappingURL=fileSystem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileSystem.js","sourceRoot":"","sources":["../../src/utils/fileSystem.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,2CAA6B;AAC7B,+BAAoC;AAGpC,MAAa,iBAAiB;IAA9B;QACmB,iBAAY,GAAG,YAAY,CAAC;QAC5B,eAAU,GAAG,YAAY,CAAC,CAAC,2CAA2C;
|
|
1
|
+
{"version":3,"file":"fileSystem.js","sourceRoot":"","sources":["../../src/utils/fileSystem.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,2CAA6B;AAC7B,+BAAoC;AAGpC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
|
2
|
-
import schema from '../instant.schema';
|
|
3
|
-
|
|
4
|
-
const APP_ID = process.env.NEXT_PUBLIC_INSTANT_APP_ID!;
|
|
5
|
-
|
|
6
|
-
if (!APP_ID) {
|
|
7
|
-
throw new Error(
|
|
8
|
-
'NEXT_PUBLIC_INSTANT_APP_ID is not set. Run: mycontext init . --framework instantdb'
|
|
9
|
-
);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const db = init({ appId: APP_ID, schema });
|
|
13
|
-
|
|
14
|
-
export default db;
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { id } from "@instantdb/react";
|
|
4
|
-
import db from "@/lib/db";
|
|
5
|
-
import { Button } from "@/components/ui/button";
|
|
6
|
-
import { Input } from "@/components/ui/input";
|
|
7
|
-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
8
|
-
import { Checkbox } from "@/components/ui/checkbox";
|
|
9
|
-
import { useState } from "react";
|
|
10
|
-
|
|
11
|
-
export default function HomeClient() {
|
|
12
|
-
const [newTodo, setNewTodo] = useState("");
|
|
13
|
-
const { isLoading, error, data } = db.useQuery({ todos: {} });
|
|
14
|
-
|
|
15
|
-
const addTodo = () => {
|
|
16
|
-
if (!newTodo.trim()) return;
|
|
17
|
-
|
|
18
|
-
db.transact(
|
|
19
|
-
db.tx.todos[id()].update({
|
|
20
|
-
text: newTodo,
|
|
21
|
-
done: false,
|
|
22
|
-
createdAt: Date.now(),
|
|
23
|
-
})
|
|
24
|
-
);
|
|
25
|
-
setNewTodo("");
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const toggleTodo = (todo: any) => {
|
|
29
|
-
db.transact(db.tx.todos[todo.id].update({ done: !todo.done }));
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const deleteTodo = (todo: any) => {
|
|
33
|
-
db.transact(db.tx.todos[todo.id].delete());
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
if (isLoading) {
|
|
37
|
-
return (
|
|
38
|
-
<div className="max-w-2xl mx-auto p-8">
|
|
39
|
-
<div className="text-center">Loading...</div>
|
|
40
|
-
</div>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (error) {
|
|
45
|
-
return (
|
|
46
|
-
<div className="max-w-2xl mx-auto p-8">
|
|
47
|
-
<Card className="border-red-500">
|
|
48
|
-
<CardHeader>
|
|
49
|
-
<CardTitle className="text-red-500">Error</CardTitle>
|
|
50
|
-
</CardHeader>
|
|
51
|
-
<CardContent>
|
|
52
|
-
<p className="text-sm text-muted-foreground">{error.message}</p>
|
|
53
|
-
<p className="text-xs text-muted-foreground mt-4">
|
|
54
|
-
Make sure NEXT_PUBLIC_INSTANT_APP_ID is set in your .env file
|
|
55
|
-
</p>
|
|
56
|
-
</CardContent>
|
|
57
|
-
</Card>
|
|
58
|
-
</div>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const { todos } = data;
|
|
63
|
-
|
|
64
|
-
return (
|
|
65
|
-
<div className="max-w-2xl mx-auto p-8">
|
|
66
|
-
<Card>
|
|
67
|
-
<CardHeader>
|
|
68
|
-
<CardTitle className="text-4xl font-bold">My Todos</CardTitle>
|
|
69
|
-
<p className="text-sm text-muted-foreground">
|
|
70
|
-
Real-time todos powered by InstantDB
|
|
71
|
-
</p>
|
|
72
|
-
</CardHeader>
|
|
73
|
-
<CardContent className="space-y-4">
|
|
74
|
-
<div className="flex gap-2">
|
|
75
|
-
<Input
|
|
76
|
-
value={newTodo}
|
|
77
|
-
onChange={(e) => setNewTodo(e.target.value)}
|
|
78
|
-
placeholder="What needs to be done?"
|
|
79
|
-
onKeyPress={(e) => e.key === "Enter" && addTodo()}
|
|
80
|
-
className="flex-1"
|
|
81
|
-
/>
|
|
82
|
-
<Button onClick={addTodo}>Add</Button>
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
<div className="space-y-2">
|
|
86
|
-
{todos.length === 0 ? (
|
|
87
|
-
<div className="text-center py-8 text-muted-foreground">
|
|
88
|
-
No todos yet. Add one above!
|
|
89
|
-
</div>
|
|
90
|
-
) : (
|
|
91
|
-
todos.map((todo: any) => (
|
|
92
|
-
<Card key={todo.id} className="p-4">
|
|
93
|
-
<div className="flex items-center gap-4">
|
|
94
|
-
<Checkbox
|
|
95
|
-
checked={todo.done}
|
|
96
|
-
onCheckedChange={() => toggleTodo(todo)}
|
|
97
|
-
/>
|
|
98
|
-
<span
|
|
99
|
-
className={`flex-1 ${
|
|
100
|
-
todo.done ? "line-through text-muted-foreground" : ""
|
|
101
|
-
}`}
|
|
102
|
-
>
|
|
103
|
-
{todo.text}
|
|
104
|
-
</span>
|
|
105
|
-
<Button
|
|
106
|
-
variant="destructive"
|
|
107
|
-
size="sm"
|
|
108
|
-
onClick={() => deleteTodo(todo)}
|
|
109
|
-
>
|
|
110
|
-
Delete
|
|
111
|
-
</Button>
|
|
112
|
-
</div>
|
|
113
|
-
</Card>
|
|
114
|
-
))
|
|
115
|
-
)}
|
|
116
|
-
</div>
|
|
117
|
-
|
|
118
|
-
<div className="text-xs text-muted-foreground pt-4 border-t">
|
|
119
|
-
<p>
|
|
120
|
-
✨ Try opening this in multiple tabs - changes sync in real-time!
|
|
121
|
-
</p>
|
|
122
|
-
</div>
|
|
123
|
-
</CardContent>
|
|
124
|
-
</Card>
|
|
125
|
-
</div>
|
|
126
|
-
);
|
|
127
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { i } from "@instantdb/react";
|
|
2
|
-
|
|
3
|
-
const _schema = i.schema({
|
|
4
|
-
entities: {
|
|
5
|
-
$files: i.entity({
|
|
6
|
-
path: i.string().unique().indexed(),
|
|
7
|
-
url: i.string(),
|
|
8
|
-
}),
|
|
9
|
-
$users: i.entity({
|
|
10
|
-
email: i.string().unique().indexed().optional(),
|
|
11
|
-
type: i.string().optional(),
|
|
12
|
-
}),
|
|
13
|
-
todos: i.entity({
|
|
14
|
-
text: i.string(),
|
|
15
|
-
done: i.boolean(),
|
|
16
|
-
createdAt: i.number(),
|
|
17
|
-
}),
|
|
18
|
-
},
|
|
19
|
-
links: {},
|
|
20
|
-
rooms: {},
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
type _AppSchema = typeof _schema;
|
|
24
|
-
interface AppSchema extends _AppSchema {}
|
|
25
|
-
const schema: AppSchema = _schema;
|
|
26
|
-
|
|
27
|
-
export type { AppSchema };
|
|
28
|
-
export default schema;
|