vyft 0.4.0-alpha → 0.4.2-alpha
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/LICENSE +191 -21
- package/README.md +3 -49
- package/dist/commands/context/add.d.ts +4 -0
- package/dist/commands/context/add.d.ts.map +1 -0
- package/dist/commands/context/add.js +98 -0
- package/dist/commands/context/add.js.map +1 -0
- package/dist/commands/context/index.d.ts +4 -0
- package/dist/commands/context/index.d.ts.map +1 -0
- package/dist/commands/context/index.js +12 -0
- package/dist/commands/context/index.js.map +1 -0
- package/dist/commands/context/list.d.ts +4 -0
- package/dist/commands/context/list.d.ts.map +1 -0
- package/dist/commands/context/list.js +25 -0
- package/dist/commands/context/list.js.map +1 -0
- package/dist/commands/context/remove.d.ts +4 -0
- package/dist/commands/context/remove.d.ts.map +1 -0
- package/dist/commands/context/remove.js +36 -0
- package/dist/commands/context/remove.js.map +1 -0
- package/dist/commands/context/use.d.ts +4 -0
- package/dist/commands/context/use.d.ts.map +1 -0
- package/dist/commands/context/use.js +32 -0
- package/dist/commands/context/use.js.map +1 -0
- package/dist/commands/deploy.d.ts +4 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +55 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/destroy.d.ts +4 -0
- package/dist/commands/destroy.d.ts.map +1 -0
- package/dist/commands/destroy.js +70 -0
- package/dist/commands/destroy.js.map +1 -0
- package/dist/commands/diff.d.ts +4 -0
- package/dist/commands/diff.d.ts.map +1 -0
- package/dist/commands/diff.js +52 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/init.d.ts +4 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +92 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/local/detect.d.ts +7 -0
- package/dist/commands/local/detect.d.ts.map +1 -0
- package/dist/commands/local/detect.js +146 -0
- package/dist/commands/local/detect.js.map +1 -0
- package/dist/commands/local/dev.d.ts +4 -0
- package/dist/commands/local/dev.d.ts.map +1 -0
- package/dist/commands/local/dev.js +387 -0
- package/dist/commands/local/dev.js.map +1 -0
- package/dist/commands/local/down.d.ts +4 -0
- package/dist/commands/local/down.d.ts.map +1 -0
- package/dist/commands/local/down.js +61 -0
- package/dist/commands/local/down.js.map +1 -0
- package/dist/commands/local/index.d.ts +4 -0
- package/dist/commands/local/index.d.ts.map +1 -0
- package/dist/commands/local/index.js +12 -0
- package/dist/commands/local/index.js.map +1 -0
- package/dist/commands/local/reset.d.ts +4 -0
- package/dist/commands/local/reset.d.ts.map +1 -0
- package/dist/commands/local/reset.js +67 -0
- package/dist/commands/local/reset.js.map +1 -0
- package/dist/commands/local/up.d.ts +4 -0
- package/dist/commands/local/up.d.ts.map +1 -0
- package/dist/commands/local/up.js +58 -0
- package/dist/commands/local/up.js.map +1 -0
- package/dist/commands/refresh.d.ts +4 -0
- package/dist/commands/refresh.d.ts.map +1 -0
- package/dist/commands/refresh.js +39 -0
- package/dist/commands/refresh.js.map +1 -0
- package/dist/config.d.ts +8 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +65 -0
- package/dist/config.js.map +1 -0
- package/dist/contexts.d.ts +21 -0
- package/dist/contexts.d.ts.map +1 -0
- package/dist/contexts.js +72 -0
- package/dist/contexts.js.map +1 -0
- package/dist/index.d.ts +2 -9
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -7
- package/dist/index.js.map +1 -0
- package/dist/lib.d.ts +7 -0
- package/dist/lib.d.ts.map +1 -0
- package/dist/lib.js +6 -0
- package/dist/lib.js.map +1 -0
- package/dist/providers.d.ts +9 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +41 -0
- package/dist/providers.js.map +1 -0
- package/dist/runtime.d.ts +18 -15
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +154 -0
- package/dist/runtime.js.map +1 -0
- package/dist/runtime.test.d.ts +2 -0
- package/dist/runtime.test.d.ts.map +1 -0
- package/dist/runtime.test.js +119 -0
- package/dist/runtime.test.js.map +1 -0
- package/dist/utils/fs.d.ts +4 -0
- package/dist/utils/fs.d.ts.map +1 -0
- package/dist/utils/fs.js +33 -0
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/pm.d.ts +3 -0
- package/dist/utils/pm.d.ts.map +1 -0
- package/dist/utils/pm.js +17 -0
- package/dist/utils/pm.js.map +1 -0
- package/dist/utils/prompts.d.ts +2 -0
- package/dist/utils/prompts.d.ts.map +1 -0
- package/dist/utils/prompts.js +6 -0
- package/dist/utils/prompts.js.map +1 -0
- package/dist/utils/templates.d.ts +3 -0
- package/dist/utils/templates.d.ts.map +1 -0
- package/dist/utils/templates.js +48 -0
- package/dist/utils/templates.js.map +1 -0
- package/package.json +31 -48
- package/templates/bun/index.ts +8 -0
- package/templates/bun/package.json +15 -0
- package/templates/bun/tsconfig.json +15 -0
- package/templates/bun/vyft.config.ts +3 -0
- package/dist/build.d.ts +0 -12
- package/dist/build.js +0 -44
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -842
- package/dist/context.d.ts +0 -39
- package/dist/context.js +0 -101
- package/dist/docker.d.ts +0 -69
- package/dist/docker.js +0 -958
- package/dist/exec.d.ts +0 -2
- package/dist/exec.js +0 -28
- package/dist/init.d.ts +0 -1
- package/dist/init.js +0 -117
- package/dist/interpolate.d.ts +0 -13
- package/dist/interpolate.js +0 -19
- package/dist/local/dev.d.ts +0 -31
- package/dist/local/dev.js +0 -109
- package/dist/local/index.d.ts +0 -2
- package/dist/local/index.js +0 -2
- package/dist/local/runtime.d.ts +0 -61
- package/dist/local/runtime.js +0 -391
- package/dist/logger.d.ts +0 -2
- package/dist/logger.js +0 -10
- package/dist/proxy.d.ts +0 -16
- package/dist/proxy.js +0 -0
- package/dist/resource.d.ts +0 -181
- package/dist/resource.js +0 -45
- package/dist/services/index.d.ts +0 -26
- package/dist/services/index.js +0 -35
- package/dist/services/minio.d.ts +0 -36
- package/dist/services/minio.js +0 -53
- package/dist/services/mongo.d.ts +0 -28
- package/dist/services/mongo.js +0 -45
- package/dist/services/mysql.d.ts +0 -28
- package/dist/services/mysql.js +0 -44
- package/dist/services/nats.d.ts +0 -26
- package/dist/services/nats.js +0 -38
- package/dist/services/postgres.d.ts +0 -28
- package/dist/services/postgres.js +0 -45
- package/dist/services/rabbitmq.d.ts +0 -28
- package/dist/services/rabbitmq.js +0 -44
- package/dist/services/redis.d.ts +0 -28
- package/dist/services/redis.js +0 -49
- package/dist/services/storage.d.ts +0 -39
- package/dist/services/storage.js +0 -94
- package/dist/swarm/factories.d.ts +0 -16
- package/dist/swarm/factories.js +0 -63
- package/dist/swarm/index.d.ts +0 -20
- package/dist/swarm/index.js +0 -5
- package/dist/swarm/proxy.d.ts +0 -24
- package/dist/swarm/proxy.js +0 -339
- package/dist/swarm/types.d.ts +0 -26
- package/dist/swarm/types.js +0 -0
- package/dist/symbols.d.ts +0 -15
- package/dist/symbols.js +0 -4
- package/templates/fullstack/apps/api/Dockerfile +0 -22
- package/templates/fullstack/apps/api/package.json +0 -26
- package/templates/fullstack/apps/api/src/auth.ts +0 -21
- package/templates/fullstack/apps/api/src/db.ts +0 -16
- package/templates/fullstack/apps/api/src/index.ts +0 -17
- package/templates/fullstack/apps/api/src/router.ts +0 -11
- package/templates/fullstack/apps/api/src/schema.ts +0 -11
- package/templates/fullstack/apps/api/tsconfig.json +0 -8
- package/templates/fullstack/apps/web/index.html +0 -12
- package/templates/fullstack/apps/web/package.json +0 -21
- package/templates/fullstack/apps/web/src/app.tsx +0 -8
- package/templates/fullstack/apps/web/src/main.tsx +0 -9
- package/templates/fullstack/apps/web/tsconfig.json +0 -7
- package/templates/fullstack/apps/web/vite.config.ts +0 -14
- package/templates/fullstack/dockerignore +0 -7
- package/templates/fullstack/gitignore +0 -3
- package/templates/fullstack/package.json +0 -14
- package/templates/fullstack/pnpm-workspace.yaml +0 -2
- package/templates/fullstack/tsconfig.json +0 -11
- package/templates/fullstack/vyft.config.ts +0 -22
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs';
|
|
2
|
-
import { betterAuth } from 'better-auth';
|
|
3
|
-
import { drizzleAdapter } from 'better-auth/adapters/drizzle';
|
|
4
|
-
import { db } from './db.js';
|
|
5
|
-
|
|
6
|
-
function env(key: string): string {
|
|
7
|
-
const fileKey = `${key}_FILE`;
|
|
8
|
-
const filePath = process.env[fileKey];
|
|
9
|
-
if (filePath) return readFileSync(filePath, 'utf-8').trim();
|
|
10
|
-
const value = process.env[key];
|
|
11
|
-
if (value) return value;
|
|
12
|
-
throw new Error(`Missing env var: ${key} or ${fileKey}`);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const auth = betterAuth({
|
|
16
|
-
database: drizzleAdapter(db, { provider: 'pg' }),
|
|
17
|
-
secret: env('AUTH_SECRET'),
|
|
18
|
-
basePath: '/api/auth',
|
|
19
|
-
baseURL: process.env.BETTER_AUTH_URL || 'http://localhost:3000',
|
|
20
|
-
emailAndPassword: { enabled: true },
|
|
21
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs';
|
|
2
|
-
import { drizzle } from 'drizzle-orm/postgres-js';
|
|
3
|
-
import postgres from 'postgres';
|
|
4
|
-
import * as schema from './schema.js';
|
|
5
|
-
|
|
6
|
-
function env(key: string): string {
|
|
7
|
-
const fileKey = `${key}_FILE`;
|
|
8
|
-
const filePath = process.env[fileKey];
|
|
9
|
-
if (filePath) return readFileSync(filePath, 'utf-8').trim();
|
|
10
|
-
const value = process.env[key];
|
|
11
|
-
if (value) return value;
|
|
12
|
-
throw new Error(`Missing env var: ${key} or ${fileKey}`);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const client = postgres(env('DATABASE_URL'));
|
|
16
|
-
export const db = drizzle(client, { schema });
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { serve } from '@hono/node-server';
|
|
2
|
-
import { trpcServer } from '@hono/trpc-server';
|
|
3
|
-
import { Hono } from 'hono';
|
|
4
|
-
import { auth } from './auth.js';
|
|
5
|
-
import { appRouter } from './router.js';
|
|
6
|
-
|
|
7
|
-
const app = new Hono().basePath('/api');
|
|
8
|
-
|
|
9
|
-
app.on(['GET', 'POST'], '/auth/**', (c) => auth.handler(c.req.raw));
|
|
10
|
-
|
|
11
|
-
app.use('/trpc/*', trpcServer({ router: appRouter }));
|
|
12
|
-
|
|
13
|
-
app.get('/health', (c) => c.json({ ok: true }));
|
|
14
|
-
|
|
15
|
-
serve({ fetch: app.fetch, port: 3000 }, (info) => {
|
|
16
|
-
console.log(`Server running on http://localhost:${info.port}`);
|
|
17
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { pgTable, text, timestamp } from 'drizzle-orm/pg-core';
|
|
2
|
-
|
|
3
|
-
export const users = pgTable('users', {
|
|
4
|
-
id: text('id').primaryKey(),
|
|
5
|
-
name: text('name').notNull(),
|
|
6
|
-
email: text('email').notNull().unique(),
|
|
7
|
-
emailVerified: timestamp('email_verified'),
|
|
8
|
-
image: text('image'),
|
|
9
|
-
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
10
|
-
updatedAt: timestamp('updated_at').defaultNow().notNull(),
|
|
11
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
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>{{name}}</title>
|
|
7
|
-
</head>
|
|
8
|
-
<body>
|
|
9
|
-
<div id="root"></div>
|
|
10
|
-
<script type="module" src="/src/main.tsx"></script>
|
|
11
|
-
</body>
|
|
12
|
-
</html>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{name}}-web",
|
|
3
|
-
"private": true,
|
|
4
|
-
"type": "module",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"dev": "vite",
|
|
7
|
-
"build": "vite build",
|
|
8
|
-
"preview": "vite preview"
|
|
9
|
-
},
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"react": "^19.1.0",
|
|
12
|
-
"react-dom": "^19.1.0"
|
|
13
|
-
},
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"@types/react": "^19.1.6",
|
|
16
|
-
"@types/react-dom": "^19.1.6",
|
|
17
|
-
"@vitejs/plugin-react": "^4.5.2",
|
|
18
|
-
"typescript": "^5.8.3",
|
|
19
|
-
"vite": "^6.3.5"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import react from '@vitejs/plugin-react';
|
|
2
|
-
import { defineConfig } from 'vite';
|
|
3
|
-
|
|
4
|
-
export default defineConfig({
|
|
5
|
-
plugins: [react()],
|
|
6
|
-
server: {
|
|
7
|
-
proxy: {
|
|
8
|
-
'/api': {
|
|
9
|
-
target: 'http://localhost:3000',
|
|
10
|
-
changeOrigin: true,
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{name}}",
|
|
3
|
-
"private": true,
|
|
4
|
-
"type": "module",
|
|
5
|
-
"packageManager": "pnpm@9.15.9",
|
|
6
|
-
"devDependencies": {
|
|
7
|
-
"vyft": "latest"
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"dev": "vyft dev",
|
|
11
|
-
"build": "pnpm --parallel -r build",
|
|
12
|
-
"deploy": "vyft deploy"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { service, secret, postgres, site } from "vyft";
|
|
2
|
-
|
|
3
|
-
export const authSecret = secret("auth-secret", { length: 64 });
|
|
4
|
-
export const db = postgres("db");
|
|
5
|
-
|
|
6
|
-
export const api = service("api", {
|
|
7
|
-
route: "{{domain}}/api/*",
|
|
8
|
-
image: { dockerfile: "./apps/api/Dockerfile" },
|
|
9
|
-
env: {
|
|
10
|
-
DATABASE_URL: db.url,
|
|
11
|
-
AUTH_SECRET: authSecret,
|
|
12
|
-
BETTER_AUTH_URL: "https://{{domain}}",
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
export const web = site("web", {
|
|
17
|
-
route: "{{domain}}",
|
|
18
|
-
spa: true,
|
|
19
|
-
build: {
|
|
20
|
-
cwd: "./apps/web",
|
|
21
|
-
},
|
|
22
|
-
});
|