vyft 0.2.0-alpha → 0.4.0-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.
Files changed (56) hide show
  1. package/README.md +5 -16
  2. package/dist/build.d.ts +1 -0
  3. package/dist/build.js +9 -4
  4. package/dist/cli.js +648 -43
  5. package/dist/context.d.ts +39 -0
  6. package/dist/context.js +101 -0
  7. package/dist/docker.d.ts +24 -12
  8. package/dist/docker.js +299 -389
  9. package/dist/exec.d.ts +1 -1
  10. package/dist/exec.js +2 -2
  11. package/dist/index.d.ts +4 -1
  12. package/dist/index.js +5 -1
  13. package/dist/init.js +19 -2
  14. package/dist/interpolate.d.ts +11 -0
  15. package/dist/interpolate.js +11 -0
  16. package/dist/local/dev.d.ts +31 -0
  17. package/dist/local/dev.js +109 -0
  18. package/dist/local/index.d.ts +2 -0
  19. package/dist/local/index.js +2 -0
  20. package/dist/local/runtime.d.ts +61 -0
  21. package/dist/local/runtime.js +391 -0
  22. package/dist/proxy.d.ts +16 -0
  23. package/dist/proxy.js +0 -0
  24. package/dist/resource.d.ts +104 -1
  25. package/dist/resource.js +11 -1
  26. package/dist/runtime.d.ts +11 -1
  27. package/dist/services/index.d.ts +26 -0
  28. package/dist/services/index.js +35 -0
  29. package/dist/services/minio.d.ts +36 -0
  30. package/dist/services/minio.js +53 -0
  31. package/dist/services/mongo.d.ts +28 -0
  32. package/dist/services/mongo.js +45 -0
  33. package/dist/services/mysql.d.ts +28 -0
  34. package/dist/services/mysql.js +44 -0
  35. package/dist/services/nats.d.ts +26 -0
  36. package/dist/services/nats.js +38 -0
  37. package/dist/services/postgres.d.ts +28 -0
  38. package/dist/services/postgres.js +45 -0
  39. package/dist/services/rabbitmq.d.ts +28 -0
  40. package/dist/services/rabbitmq.js +44 -0
  41. package/dist/services/redis.d.ts +28 -0
  42. package/dist/services/redis.js +49 -0
  43. package/dist/services/storage.d.ts +39 -0
  44. package/dist/services/storage.js +94 -0
  45. package/dist/swarm/factories.d.ts +9 -2
  46. package/dist/swarm/factories.js +9 -32
  47. package/dist/swarm/index.d.ts +11 -2
  48. package/dist/swarm/proxy.d.ts +24 -0
  49. package/dist/swarm/proxy.js +339 -0
  50. package/dist/swarm/types.d.ts +11 -21
  51. package/dist/symbols.d.ts +7 -0
  52. package/dist/symbols.js +3 -0
  53. package/package.json +4 -5
  54. package/templates/fullstack/package.json +2 -6
  55. package/templates/fullstack/vyft.config.ts +13 -28
  56. package/templates/fullstack/compose.yaml +0 -14
@@ -1,37 +1,22 @@
1
- import { interpolate } from 'vyft';
2
- import { swarm } from 'vyft/swarm';
1
+ import { service, secret, postgres, site } from "vyft";
3
2
 
4
- const { service, secret, volume, site } = swarm();
3
+ export const authSecret = secret("auth-secret", { length: 64 });
4
+ export const db = postgres("db");
5
5
 
6
- export const dbPassword = secret('db-password', { length: 32 });
7
- export const authSecret = secret('auth-secret', { length: 64 });
8
- export const dbData = volume('db-data', { size: '10GB' });
9
-
10
- export const db = service('db', {
11
- image: 'postgres:17',
12
- volumes: [
13
- { volume: dbData, mount: '/var/lib/postgresql/data' }
14
- ],
15
- env: {
16
- POSTGRES_PASSWORD: dbPassword,
17
- POSTGRES_DB: '{{name}}',
18
- }
19
- });
20
-
21
- export const api = service('api', {
22
- route: '{{domain}}/api/*',
23
- image: { dockerfile: './apps/api/Dockerfile' },
6
+ export const api = service("api", {
7
+ route: "{{domain}}/api/*",
8
+ image: { dockerfile: "./apps/api/Dockerfile" },
24
9
  env: {
25
- DATABASE_URL: interpolate`postgres://postgres:${dbPassword}@${db.host}:5432/{{name}}`,
10
+ DATABASE_URL: db.url,
26
11
  AUTH_SECRET: authSecret,
27
- BETTER_AUTH_URL: 'https://{{domain}}/api',
28
- }
12
+ BETTER_AUTH_URL: "https://{{domain}}",
13
+ },
29
14
  });
30
15
 
31
- export const web = site('web', {
32
- route: '{{domain}}',
16
+ export const web = site("web", {
17
+ route: "{{domain}}",
33
18
  spa: true,
34
19
  build: {
35
- cwd: './apps/web',
36
- }
20
+ cwd: "./apps/web",
21
+ },
37
22
  });
@@ -1,14 +0,0 @@
1
- services:
2
- db:
3
- image: postgres:17
4
- restart: unless-stopped
5
- ports:
6
- - "5432:5432"
7
- environment:
8
- POSTGRES_DB: {{name}}
9
- POSTGRES_PASSWORD: postgres
10
- volumes:
11
- - db-data:/var/lib/postgresql/data
12
-
13
- volumes:
14
- db-data: