@vibecodeapp/cloud-studio 0.1.0 → 0.1.2
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/dist/server/index.js
CHANGED
|
@@ -8,6 +8,8 @@ var __export = (target, all) => {
|
|
|
8
8
|
|
|
9
9
|
// server/index.ts
|
|
10
10
|
import { parseArgs } from "node:util";
|
|
11
|
+
import { fileURLToPath } from "url";
|
|
12
|
+
import { dirname, join as join3 } from "path";
|
|
11
13
|
|
|
12
14
|
// node_modules/@hono/node-server/dist/index.mjs
|
|
13
15
|
import { createServer as createServerHTTP } from "http";
|
|
@@ -2354,6 +2356,8 @@ var cors = (options) => {
|
|
|
2354
2356
|
};
|
|
2355
2357
|
|
|
2356
2358
|
// server/db.ts
|
|
2359
|
+
import { pathToFileURL } from "url";
|
|
2360
|
+
import { join as join2 } from "path";
|
|
2357
2361
|
var prismaClient = null;
|
|
2358
2362
|
var cachedSchema = null;
|
|
2359
2363
|
var PrismaClientConstructor = null;
|
|
@@ -2362,7 +2366,8 @@ async function loadPrismaClient() {
|
|
|
2362
2366
|
return PrismaClientConstructor;
|
|
2363
2367
|
}
|
|
2364
2368
|
try {
|
|
2365
|
-
const
|
|
2369
|
+
const prismaPath = join2(process.cwd(), "generated", "prisma", "index.js");
|
|
2370
|
+
const prismaModule = await import(pathToFileURL(prismaPath).href);
|
|
2366
2371
|
PrismaClientConstructor = prismaModule.PrismaClient;
|
|
2367
2372
|
if (prismaModule.Prisma?.dmmf?.datamodel) {
|
|
2368
2373
|
cachedSchema = prismaModule.Prisma.dmmf.datamodel;
|
|
@@ -2370,7 +2375,7 @@ async function loadPrismaClient() {
|
|
|
2370
2375
|
return PrismaClientConstructor;
|
|
2371
2376
|
} catch (error) {
|
|
2372
2377
|
throw new Error(
|
|
2373
|
-
`Failed to load Prisma Client from
|
|
2378
|
+
`Failed to load Prisma Client from ${join2(process.cwd(), "generated", "prisma", "index.js")}: ${error instanceof Error ? error.message : String(error)}`
|
|
2374
2379
|
);
|
|
2375
2380
|
}
|
|
2376
2381
|
}
|
|
@@ -6737,6 +6742,9 @@ tableRoutes.delete("/:tableName/:id", async (c) => {
|
|
|
6737
6742
|
});
|
|
6738
6743
|
|
|
6739
6744
|
// server/index.ts
|
|
6745
|
+
var __filename = fileURLToPath(import.meta.url);
|
|
6746
|
+
var __dirname = dirname(__filename);
|
|
6747
|
+
var clientPath = join3(__dirname, "..", "client");
|
|
6740
6748
|
var { values } = parseArgs({
|
|
6741
6749
|
options: {
|
|
6742
6750
|
port: {
|
|
@@ -6767,7 +6775,7 @@ app.get("/health", (c) => {
|
|
|
6767
6775
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
6768
6776
|
});
|
|
6769
6777
|
});
|
|
6770
|
-
app.use("/*", serveStatic({ root:
|
|
6778
|
+
app.use("/*", serveStatic({ root: clientPath }));
|
|
6771
6779
|
console.log(`Cloud Studio starting on http://${HOSTNAME}:${PORT}`);
|
|
6772
6780
|
try {
|
|
6773
6781
|
await getPrismaClient();
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|