@specific.dev/cli 0.1.42 → 0.1.43

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 (37) hide show
  1. package/dist/admin/404/index.html +1 -1
  2. package/dist/admin/404.html +1 -1
  3. package/dist/admin/__next.__PAGE__.txt +2 -2
  4. package/dist/admin/__next._full.txt +3 -3
  5. package/dist/admin/__next._head.txt +1 -1
  6. package/dist/admin/__next._index.txt +2 -2
  7. package/dist/admin/__next._tree.txt +2 -2
  8. package/dist/admin/_next/static/chunks/1da818a0086b4acf.css +3 -0
  9. package/dist/admin/_next/static/chunks/cba5c081fc9dc612.js +2 -0
  10. package/dist/admin/_not-found/__next._full.txt +2 -2
  11. package/dist/admin/_not-found/__next._head.txt +1 -1
  12. package/dist/admin/_not-found/__next._index.txt +2 -2
  13. package/dist/admin/_not-found/__next._not-found.__PAGE__.txt +1 -1
  14. package/dist/admin/_not-found/__next._not-found.txt +1 -1
  15. package/dist/admin/_not-found/__next._tree.txt +2 -2
  16. package/dist/admin/_not-found/index.html +1 -1
  17. package/dist/admin/_not-found/index.txt +2 -2
  18. package/dist/admin/databases/__next._full.txt +2 -2
  19. package/dist/admin/databases/__next._head.txt +1 -1
  20. package/dist/admin/databases/__next._index.txt +2 -2
  21. package/dist/admin/databases/__next._tree.txt +2 -2
  22. package/dist/admin/databases/__next.databases.__PAGE__.txt +1 -1
  23. package/dist/admin/databases/__next.databases.txt +1 -1
  24. package/dist/admin/databases/index.html +1 -1
  25. package/dist/admin/databases/index.txt +2 -2
  26. package/dist/admin/index.html +1 -1
  27. package/dist/admin/index.txt +3 -3
  28. package/dist/cli.js +1391 -1038
  29. package/dist/docs/index.md +1 -0
  30. package/dist/docs/integrations/temporal.md +89 -0
  31. package/dist/docs/services.md +4 -2
  32. package/package.json +1 -1
  33. package/dist/admin/_next/static/chunks/237926899f121e8a.js +0 -2
  34. package/dist/admin/_next/static/chunks/2ca8ab35893ba132.css +0 -3
  35. /package/dist/admin/_next/static/{w-7TGbUFVs5LhUxmBNTTr → 3dGrdrrH7RVk5ixe6lgRQ}/_buildManifest.js +0 -0
  36. /package/dist/admin/_next/static/{w-7TGbUFVs5LhUxmBNTTr → 3dGrdrrH7RVk5ixe6lgRQ}/_clientMiddlewareManifest.json +0 -0
  37. /package/dist/admin/_next/static/{w-7TGbUFVs5LhUxmBNTTr → 3dGrdrrH7RVk5ixe6lgRQ}/_ssgManifest.js +0 -0
@@ -28,6 +28,7 @@ The following is a list of common frameworks and libraries with guidance on how
28
28
  - [Next.js](/integrations/nextjs): full-stack React framework
29
29
  - [Drizzle ORM](/integrations/drizzle): TypeScript ORM with type safety
30
30
  - [Prisma](/integrations/prisma): TypeScript ORM with auto-generated client
31
+ - [Temporal](/integrations/temporal): durable workflow engine for background tasks, AI agents, cron jobs, batch jobs and more
31
32
 
32
33
  ## Adding Specific to existing projects / migrating to Specific
33
34
 
@@ -0,0 +1,89 @@
1
+ # Temporal
2
+
3
+ Temporal is a durable workflow engine. This guide covers running Temporal locally during development and connecting to Temporal Cloud in production.
4
+
5
+ Temporal has extensive SDK support across many languages including TypeScript, Python, Go, Java, .NET, and PHP. See the [Temporal documentation](https://docs.temporal.io/) for language-specific guides on implementing workers, workflows, and activities. This document only covers integration with Specific.
6
+
7
+ ## Configuration
8
+
9
+ Define a dev-only Temporal service that runs locally, along with configs and secrets for production Temporal Cloud.
10
+
11
+ ```hcl
12
+ build "app" {
13
+ base = "node"
14
+ }
15
+
16
+ # Dev-only service: runs local Temporal server during development
17
+ # No top-level command means it's excluded from production deployment
18
+ #
19
+ service "temporal" {
20
+ endpoint "grpc" {}
21
+ endpoint "ui" { public = true }
22
+
23
+ dev {
24
+ command = "temporal server start-dev --port $GRPC_PORT --ui-port $UI_PORT --db-filename /tmp/temporal.db"
25
+ env = {
26
+ GRPC_PORT = endpoint.grpc.port
27
+ UI_PORT = endpoint.ui.port
28
+ }
29
+ }
30
+ }
31
+
32
+ # Temporal Cloud address (e.g., your-namespace.tmprl.cloud:7233)
33
+ config "temporal_address" {}
34
+
35
+ # Namespace - uses "default" in dev, must be set for production
36
+ config "temporal_namespace" {
37
+ dev {
38
+ default = "default"
39
+ }
40
+ }
41
+
42
+ # API key for Temporal Cloud - not required in dev
43
+ secret "temporal_api_key" {
44
+ dev {
45
+ required = false
46
+ }
47
+ }
48
+
49
+ service "app" {
50
+ build = build.app
51
+ command = "node index.js"
52
+ expose {}
53
+
54
+ env = {
55
+ PORT = port
56
+ TEMPORAL_ADDRESS = config.temporal_address
57
+ TEMPORAL_NAMESPACE = config.temporal_namespace
58
+ TEMPORAL_API_KEY = secret.temporal_api_key
59
+ }
60
+
61
+ dev {
62
+ command = "node --watch index.js"
63
+ env = {
64
+ # Override to use local Temporal service instead
65
+ TEMPORAL_ADDRESS = ""
66
+ TEMPORAL_HOST = service.temporal.endpoint.grpc.host
67
+ TEMPORAL_PORT = service.temporal.endpoint.grpc.port
68
+ }
69
+ }
70
+ }
71
+ ```
72
+
73
+ ## Development
74
+
75
+ Running `specific dev` automatically starts a local Temporal server. The user must install the Temporal CLI for this: https://temporal.io/setup/install-temporal-cli. The Temporal Web UI is available at the public endpoint URL shown in the output.
76
+
77
+ Your app connects to the local Temporal server using the service endpoint environment variables (`TEMPORAL_HOST` and `TEMPORAL_PORT`).
78
+
79
+ ## Production
80
+
81
+ In production, the dev-only `temporal` service is excluded from deployment. Your app connects to Temporal Cloud using:
82
+
83
+ 1. `temporal_address` - Your Temporal Cloud address (e.g., `your-namespace.tmprl.cloud:7233`)
84
+ 2. `temporal_namespace` - Your Temporal Cloud namespace
85
+ 3. `temporal_api_key` - API key for authentication
86
+
87
+ Set these with `specific secrets set` before deploying.
88
+
89
+ ## SDK support
@@ -116,14 +116,14 @@ service "worker" {
116
116
  command = "./worker"
117
117
 
118
118
  env = {
119
- API_URL = service.api.url # http://localhost:PORT in dev, http://api:80 in prod
119
+ API_URL = service.api.url # localhost:PORT in dev, api:80 in prod
120
120
  }
121
121
  }
122
122
  ```
123
123
 
124
124
  Available service reference attributes:
125
125
 
126
- - `service.<name>.url` - Full URL (e.g., `http://localhost:3000`)
126
+ - `service.<name>.url` - Full URL without scheme (e.g., `localhost:3000`)
127
127
  - `service.<name>.host` - Host only (e.g., `localhost`)
128
128
  - `service.<name>.port` - Port only (e.g., `3000`)
129
129
 
@@ -233,6 +233,7 @@ secret "temporal_url" {}
233
233
  ```
234
234
 
235
235
  Dev-only services:
236
+
236
237
  - Cannot have a `build` reference (they run arbitrary commands)
237
238
  - Are automatically excluded from production deployment
238
239
  - Can define endpoints that other services reference during development
@@ -320,6 +321,7 @@ service "frontend" {
320
321
  ---
321
322
 
322
323
  Related topics:
324
+
323
325
  - Run `specific docs builds` for build configuration
324
326
  - Run `specific docs exec` for running one-off commands during development
325
327
  - Run `specific docs postgres` for database configuration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@specific.dev/cli",
3
- "version": "0.1.42",
3
+ "version": "0.1.43",
4
4
  "description": "CLI for Specific infrastructure-as-code",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",