robodev 0.28.0 → 0.29.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.
- package/package.json +1 -1
- package/src/collect-files.test.ts +6 -0
- package/src/collect-files.ts +13 -3
- package/templates/auth-chat/package.json +2 -2
- package/templates/backend/package.json +2 -2
- package/templates/empty/package.json +2 -2
- package/templates/marketplace/package.json +2 -2
- package/templates/space/package.json +2 -2
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ test("collectFiles includes hosted sources and skips denied paths", async () =>
|
|
|
11
11
|
try {
|
|
12
12
|
await mkdir(join(root, "robodev/api/invoices"), { recursive: true });
|
|
13
13
|
await mkdir(join(root, "robodev/jobs"), { recursive: true });
|
|
14
|
+
await mkdir(join(root, "robodev/sockets"), { recursive: true });
|
|
14
15
|
await mkdir(join(root, "robodev/hooks"), { recursive: true });
|
|
15
16
|
await writeFile(join(root, "robodev/database.ts"), "export default {}");
|
|
16
17
|
await writeFile(join(root, "robodev/package.json"), '{"private":true,"dependencies":{}}');
|
|
@@ -21,6 +22,7 @@ test("collectFiles includes hosted sources and skips denied paths", async () =>
|
|
|
21
22
|
await writeFile(join(root, "robodev/api/x.ts"), "export {}");
|
|
22
23
|
await writeFile(join(root, "robodev/api/invoices/[id].ts"), "export {}");
|
|
23
24
|
await writeFile(join(root, "robodev/jobs/x.ts"), "export {}");
|
|
25
|
+
await writeFile(join(root, "robodev/sockets/chat.ts"), "export {}");
|
|
24
26
|
await writeFile(join(root, "robodev/hooks/auth.ts"), "export {}");
|
|
25
27
|
await writeFile(join(root, "robodev/hooks/lib.ts"), "export {}");
|
|
26
28
|
await writeFile(join(root, "package.json"), "{}");
|
|
@@ -41,6 +43,7 @@ test("collectFiles includes hosted sources and skips denied paths", async () =>
|
|
|
41
43
|
assert.ok(paths.has("robodev/api/x.ts"));
|
|
42
44
|
assert.ok(paths.has("robodev/api/invoices/[id].ts"));
|
|
43
45
|
assert.ok(paths.has("robodev/jobs/x.ts"));
|
|
46
|
+
assert.ok(paths.has("robodev/sockets/chat.ts"));
|
|
44
47
|
assert.ok(paths.has("robodev/hooks/auth.ts"));
|
|
45
48
|
assert.ok(paths.has("robodev/hooks/lib.ts"));
|
|
46
49
|
assert.ok(paths.has("package.json"));
|
|
@@ -67,6 +70,8 @@ test("collectFiles still accepts a legacy root database.ts tree", async () => {
|
|
|
67
70
|
await writeFile(join(root, "api/invoices/[id].ts"), "export {}");
|
|
68
71
|
await mkdir(join(root, "jobs"), { recursive: true });
|
|
69
72
|
await writeFile(join(root, "jobs/x.ts"), "export {}");
|
|
73
|
+
await mkdir(join(root, "sockets"), { recursive: true });
|
|
74
|
+
await writeFile(join(root, "sockets/chat.ts"), "export {}");
|
|
70
75
|
await mkdir(join(root, "hooks"), { recursive: true });
|
|
71
76
|
await writeFile(join(root, "hooks/auth.ts"), "export {}");
|
|
72
77
|
await writeFile(join(root, "hooks/lib.ts"), "export {}");
|
|
@@ -87,6 +92,7 @@ test("collectFiles still accepts a legacy root database.ts tree", async () => {
|
|
|
87
92
|
assert.ok(paths.has("api/x.ts"));
|
|
88
93
|
assert.ok(paths.has("api/invoices/[id].ts"));
|
|
89
94
|
assert.ok(paths.has("jobs/x.ts"));
|
|
95
|
+
assert.ok(paths.has("sockets/chat.ts"));
|
|
90
96
|
assert.ok(paths.has("hooks/auth.ts"));
|
|
91
97
|
assert.ok(paths.has("hooks/lib.ts"));
|
|
92
98
|
assert.ok(paths.has("package.json"));
|
package/src/collect-files.ts
CHANGED
|
@@ -111,7 +111,12 @@ function isBackendPath(path: string): boolean {
|
|
|
111
111
|
if (inner === "database.ts" && (path === "database.ts" || path === "robodev/database.ts")) {
|
|
112
112
|
return true;
|
|
113
113
|
}
|
|
114
|
-
if (
|
|
114
|
+
if (
|
|
115
|
+
inner.startsWith("api/") ||
|
|
116
|
+
inner.startsWith("jobs/") ||
|
|
117
|
+
inner.startsWith("hooks/") ||
|
|
118
|
+
inner.startsWith("sockets/")
|
|
119
|
+
) {
|
|
115
120
|
return inner.endsWith(".ts");
|
|
116
121
|
}
|
|
117
122
|
return path === "robodev/package.json";
|
|
@@ -133,9 +138,14 @@ export function mixedBackendLayoutError(paths: Iterable<string>): string | null
|
|
|
133
138
|
const list = [...paths].map(normalize);
|
|
134
139
|
const hasNewDb = list.includes("robodev/database.ts");
|
|
135
140
|
const hasLegacyDb = list.includes("database.ts");
|
|
136
|
-
const hasLegacyApiJobs = list.some(
|
|
141
|
+
const hasLegacyApiJobs = list.some(
|
|
142
|
+
(path) => path.startsWith("api/") || path.startsWith("jobs/") || path.startsWith("sockets/"),
|
|
143
|
+
);
|
|
137
144
|
const hasNewApiJobs = list.some(
|
|
138
|
-
(path) =>
|
|
145
|
+
(path) =>
|
|
146
|
+
path.startsWith("robodev/api/") ||
|
|
147
|
+
path.startsWith("robodev/jobs/") ||
|
|
148
|
+
path.startsWith("robodev/sockets/"),
|
|
139
149
|
);
|
|
140
150
|
if (hasNewDb && (hasLegacyDb || hasLegacyApiJobs)) {
|
|
141
151
|
return "Do not mix robodev/ backend files with root database.ts, api/, or jobs/";
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"rules:gen": "rulesync generate"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@robodev-ai/sdk": "^0.
|
|
11
|
+
"@robodev-ai/sdk": "^0.8.0"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"robodev": "^0.
|
|
14
|
+
"robodev": "^0.29.0",
|
|
15
15
|
"rulesync": "^8.18.0",
|
|
16
16
|
"typescript": "^5.9.2"
|
|
17
17
|
}
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"rules:gen": "rulesync generate"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@robodev-ai/sdk": "^0.
|
|
11
|
+
"@robodev-ai/sdk": "^0.8.0"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"robodev": "^0.
|
|
14
|
+
"robodev": "^0.29.0",
|
|
15
15
|
"rulesync": "^8.18.0",
|
|
16
16
|
"typescript": "^5.9.2"
|
|
17
17
|
}
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"rules:gen": "rulesync generate"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@robodev-ai/sdk": "^0.
|
|
11
|
+
"@robodev-ai/sdk": "^0.8.0"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"robodev": "^0.
|
|
14
|
+
"robodev": "^0.29.0",
|
|
15
15
|
"rulesync": "^8.18.0",
|
|
16
16
|
"typescript": "^5.9.2"
|
|
17
17
|
}
|