@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.
- package/dist/admin/404/index.html +1 -1
- package/dist/admin/404.html +1 -1
- package/dist/admin/__next.__PAGE__.txt +2 -2
- package/dist/admin/__next._full.txt +3 -3
- package/dist/admin/__next._head.txt +1 -1
- package/dist/admin/__next._index.txt +2 -2
- package/dist/admin/__next._tree.txt +2 -2
- package/dist/admin/_next/static/chunks/1da818a0086b4acf.css +3 -0
- package/dist/admin/_next/static/chunks/cba5c081fc9dc612.js +2 -0
- package/dist/admin/_not-found/__next._full.txt +2 -2
- package/dist/admin/_not-found/__next._head.txt +1 -1
- package/dist/admin/_not-found/__next._index.txt +2 -2
- package/dist/admin/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/admin/_not-found/__next._not-found.txt +1 -1
- package/dist/admin/_not-found/__next._tree.txt +2 -2
- package/dist/admin/_not-found/index.html +1 -1
- package/dist/admin/_not-found/index.txt +2 -2
- package/dist/admin/databases/__next._full.txt +2 -2
- package/dist/admin/databases/__next._head.txt +1 -1
- package/dist/admin/databases/__next._index.txt +2 -2
- package/dist/admin/databases/__next._tree.txt +2 -2
- package/dist/admin/databases/__next.databases.__PAGE__.txt +1 -1
- package/dist/admin/databases/__next.databases.txt +1 -1
- package/dist/admin/databases/index.html +1 -1
- package/dist/admin/databases/index.txt +2 -2
- package/dist/admin/index.html +1 -1
- package/dist/admin/index.txt +3 -3
- package/dist/cli.js +1391 -1038
- package/dist/docs/index.md +1 -0
- package/dist/docs/integrations/temporal.md +89 -0
- package/dist/docs/services.md +4 -2
- package/package.json +1 -1
- package/dist/admin/_next/static/chunks/237926899f121e8a.js +0 -2
- package/dist/admin/_next/static/chunks/2ca8ab35893ba132.css +0 -3
- /package/dist/admin/_next/static/{w-7TGbUFVs5LhUxmBNTTr → 3dGrdrrH7RVk5ixe6lgRQ}/_buildManifest.js +0 -0
- /package/dist/admin/_next/static/{w-7TGbUFVs5LhUxmBNTTr → 3dGrdrrH7RVk5ixe6lgRQ}/_clientMiddlewareManifest.json +0 -0
- /package/dist/admin/_next/static/{w-7TGbUFVs5LhUxmBNTTr → 3dGrdrrH7RVk5ixe6lgRQ}/_ssgManifest.js +0 -0
package/dist/docs/index.md
CHANGED
|
@@ -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
|
package/dist/docs/services.md
CHANGED
|
@@ -116,14 +116,14 @@ service "worker" {
|
|
|
116
116
|
command = "./worker"
|
|
117
117
|
|
|
118
118
|
env = {
|
|
119
|
-
API_URL = service.api.url #
|
|
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., `
|
|
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
|