@specific.dev/cli 0.1.50 → 0.1.51
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 +1 -1
- package/dist/admin/__next._full.txt +1 -1
- package/dist/admin/__next._head.txt +1 -1
- package/dist/admin/__next._index.txt +1 -1
- package/dist/admin/__next._tree.txt +1 -1
- package/dist/admin/_not-found/__next._full.txt +1 -1
- package/dist/admin/_not-found/__next._head.txt +1 -1
- package/dist/admin/_not-found/__next._index.txt +1 -1
- 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 +1 -1
- package/dist/admin/_not-found/index.html +1 -1
- package/dist/admin/_not-found/index.txt +1 -1
- package/dist/admin/databases/__next._full.txt +1 -1
- package/dist/admin/databases/__next._head.txt +1 -1
- package/dist/admin/databases/__next._index.txt +1 -1
- package/dist/admin/databases/__next._tree.txt +1 -1
- 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 +1 -1
- package/dist/admin/index.html +1 -1
- package/dist/admin/index.txt +1 -1
- package/dist/cli.js +124 -95
- package/dist/docs/builds.md +42 -0
- package/dist/docs/services.md +34 -0
- package/dist/postinstall.js +1 -1
- package/package.json +2 -2
- /package/dist/admin/_next/static/{o2Qo92jA0gWbtB1ZWKQFF → h5UEt0QGdPmIwztzVl3eF}/_buildManifest.js +0 -0
- /package/dist/admin/_next/static/{o2Qo92jA0gWbtB1ZWKQFF → h5UEt0QGdPmIwztzVl3eF}/_clientMiddlewareManifest.json +0 -0
- /package/dist/admin/_next/static/{o2Qo92jA0gWbtB1ZWKQFF → h5UEt0QGdPmIwztzVl3eF}/_ssgManifest.js +0 -0
package/dist/docs/builds.md
CHANGED
|
@@ -16,6 +16,8 @@ build "api" {
|
|
|
16
16
|
## Optional fields
|
|
17
17
|
|
|
18
18
|
- `command` - Build command to run after dependencies are installed (e.g., `npm run build`, `go build -o api`).
|
|
19
|
+
- `root` - Working directory for build commands, relative to `specific.hcl`. Defaults to `"."`. Sets the `WORKDIR` in the generated Dockerfile. Services that reference this build inherit its root. Dependency detection (e.g., `package.json`) also looks in this directory.
|
|
20
|
+
- `context` - Docker build context scope, relative to `specific.hcl`. Defaults to `"."`. Controls what files are available to `COPY` in the Dockerfile and what's included in the deployment tarball. Use this when you need to include files outside of `root` (e.g., shared libraries in a monorepo).
|
|
19
21
|
- `env` - Environment variables available during the build. Supports string literals and `service.<name>.public_url` references. These are passed as Docker build args.
|
|
20
22
|
|
|
21
23
|
## Automatic dependency installation
|
|
@@ -73,6 +75,46 @@ Supported reference types:
|
|
|
73
75
|
- String literals (e.g., `"production"`)
|
|
74
76
|
- `service.<name>.public_url` - The public domain of another service
|
|
75
77
|
|
|
78
|
+
## Monorepo support
|
|
79
|
+
|
|
80
|
+
Use `root` to specify where build commands run in a monorepo. This sets the working directory for both the build command and dependency installation.
|
|
81
|
+
|
|
82
|
+
```hcl
|
|
83
|
+
build "backend" {
|
|
84
|
+
base = "node"
|
|
85
|
+
root = "packages/backend"
|
|
86
|
+
command = "npm run build"
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
build "frontend" {
|
|
90
|
+
base = "node"
|
|
91
|
+
root = "packages/frontend"
|
|
92
|
+
command = "npm run build"
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Without `root`, you would need to prefix commands with `cd packages/backend &&`, and dependency detection would look for `package.json` in the wrong directory.
|
|
97
|
+
|
|
98
|
+
Services that reference a build inherit its `root` automatically, so service commands also run from the correct directory.
|
|
99
|
+
|
|
100
|
+
### `root` vs `context`
|
|
101
|
+
|
|
102
|
+
`root` and `context` are orthogonal:
|
|
103
|
+
|
|
104
|
+
- `root` = where commands run (working directory)
|
|
105
|
+
- `context` = what files are available (Docker build context / tarball scope)
|
|
106
|
+
|
|
107
|
+
By default, `context` is `"."` (the `specific.hcl` directory), which includes all files in the project. You only need to set `context` when you want to widen the scope beyond the default, for example to include a parent directory:
|
|
108
|
+
|
|
109
|
+
```hcl
|
|
110
|
+
# specific.hcl is in apps/myapp/, but shared libs are in libs/
|
|
111
|
+
build "api" {
|
|
112
|
+
base = "node"
|
|
113
|
+
root = "packages/api"
|
|
114
|
+
context = "../" # Include parent dir so shared libs are available
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
76
118
|
## Dev configuration
|
|
77
119
|
|
|
78
120
|
Override the build command for local development. If no `dev` block is defined, the build is skipped in development.
|
package/dist/docs/services.md
CHANGED
|
@@ -46,6 +46,7 @@ service "api" {
|
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
- `command` - Command to start the server
|
|
49
|
+
- `root` - Working directory for service commands, relative to `specific.hcl`. Defaults to the referenced build's `root`, or `"."` if no build. In development, this sets the working directory for the spawned process. In production, the working directory is set by the build's `root` in the Dockerfile.
|
|
49
50
|
- `endpoint` - Defines a network endpoint (see Endpoints below)
|
|
50
51
|
- `port` - Reference to the auto-assigned port (pass this to your server)
|
|
51
52
|
|
|
@@ -190,6 +191,39 @@ service "api" {
|
|
|
190
191
|
}
|
|
191
192
|
```
|
|
192
193
|
|
|
194
|
+
## Monorepo support
|
|
195
|
+
|
|
196
|
+
For monorepos, use `root` on builds to set the working directory. Services inherit the build's root, so commands like `npm start` run from the correct directory:
|
|
197
|
+
|
|
198
|
+
```hcl
|
|
199
|
+
build "backend" {
|
|
200
|
+
base = "node"
|
|
201
|
+
root = "packages/backend"
|
|
202
|
+
command = "npm run build"
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
service "backend" {
|
|
206
|
+
build = build.backend
|
|
207
|
+
command = "node dist/index.js"
|
|
208
|
+
|
|
209
|
+
dev {
|
|
210
|
+
command = "npm run dev"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Dev-only services can set their own root:
|
|
216
|
+
|
|
217
|
+
```hcl
|
|
218
|
+
service "docs" {
|
|
219
|
+
root = "packages/docs"
|
|
220
|
+
|
|
221
|
+
dev {
|
|
222
|
+
command = "npm run dev"
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
|
|
193
227
|
## Workers
|
|
194
228
|
|
|
195
229
|
Background processes that don't expose HTTP endpoints.
|
package/dist/postinstall.js
CHANGED
package/package.json
CHANGED
/package/dist/admin/_next/static/{o2Qo92jA0gWbtB1ZWKQFF → h5UEt0QGdPmIwztzVl3eF}/_buildManifest.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/admin/_next/static/{o2Qo92jA0gWbtB1ZWKQFF → h5UEt0QGdPmIwztzVl3eF}/_ssgManifest.js
RENAMED
|
File without changes
|