Skip to content

Commit 802ea3b

Browse files
Update SDK pages
1 parent 49c759b commit 802ea3b

4 files changed

Lines changed: 70 additions & 11 deletions

File tree

docs/sdk/cli-reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ Commands for setting up project infrastructure.
320320
| [setup branch](cli/setup.md#setup-branch) | Generate a branch-target deploy workflow (push to branch triggers deploy). |
321321
| [setup check](cli/setup.md#setup-check) | Audit generated workflows for drift against the current config/repo (read-only). |
322322
| [setup coordinate](cli/setup.md#setup-coordinate) | Generate a coordinator workflow that orchestrates multiple --action-generated composite actions. |
323+
| [setup delete](cli/setup.md#setup-delete) | Delete managed workflow/action file(s) and their .github/tailor-sdk.lock entries. |
323324
| [setup preview](cli/setup.md#setup-preview) | Generate a preview workflow (PR open/sync triggers deploy to a per-PR workspace). |
324325
| [setup tag](cli/setup.md#setup-tag) | Generate a tag-target deploy workflow (tag push triggers deploy). |
325326

docs/sdk/cli/application.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,33 @@ tailor-sdk deploy [options]
5959

6060
**Options**
6161

62-
| Option | Alias | Description | Required | Default | Env |
63-
| ------------------------------- | ----- | ----------------------------------------------------------------- | -------- | -------------------- | --------------------------------- |
64-
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
65-
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
66-
| `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` |
67-
| `--yes` | `-y` | Skip confirmation prompts | No | `false` | - |
68-
| `--dry-run` | `-d` | Run the command without making any changes | No | - | - |
69-
| `--no-schema-check` | - | Skip schema diff check against migration snapshots | No | - | - |
70-
| `--no-validate` | - | Skip client-side validation against platform resource constraints | No | - | - |
71-
| `--no-cache` | - | Disable bundle caching for this run | No | - | - |
72-
| `--clean-cache` | - | Clean the bundle cache before building | No | - | - |
62+
| Option | Alias | Description | Required | Default | Env |
63+
| ------------------------------- | ----- | ------------------------------------------------------------------------------------ | -------- | -------------------- | --------------------------------- |
64+
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
65+
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
66+
| `--config <CONFIG>` | `-c` | Path to SDK config file. Use comma-separated paths to deploy multiple apps together. | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` |
67+
| `--yes` | `-y` | Skip confirmation prompts | No | `false` | - |
68+
| `--dry-run` | `-d` | Run the command without making any changes | No | - | - |
69+
| `--no-schema-check` | - | Skip schema diff check against migration snapshots | No | - | - |
70+
| `--no-validate` | - | Skip client-side validation against platform resource constraints | No | - | - |
71+
| `--no-cache` | - | Disable bundle caching for this run | No | - | - |
72+
| `--clean-cache` | - | Clean the bundle cache before building | No | - | - |
7373

7474
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
7575
**Config File Modification:**
7676

7777
On first run, `deploy` automatically injects a stable `id: "<uuid>"` field into your `defineConfig({...})` call in `tailor.config.ts`. This UUID is used to track your application across renames so the SDK can recognize ownership across renames. Commit the generated id to version control. See [Configuration](../configuration.md#application-settings) for details.
7878

79+
**Multiple Config Deploys:**
80+
81+
To deploy interdependent applications to the same workspace in one run, pass comma-separated config paths:
82+
83+
```bash
84+
tailor-sdk deploy --config apps/buyer/tailor.config.ts,apps/supplier/tailor.config.ts
85+
```
86+
87+
When multiple configs are provided, `deploy` creates or updates all configured services first, then updates the applications. This lets one application reference resources owned by another config with `external: true` during the same deploy.
88+
7989
**Migration Handling:**
8090

8191
When migrations are configured (`db.tailordb.migration` in config), the `deploy` command automatically:

docs/sdk/cli/setup.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ See [Global Options](../cli-reference.md#global-options) for options available t
2424
| [`setup action`](#setup-action) | Generate a per-app composite action for use with setup coordinate (monorepo multi-app deploys). |
2525
| [`setup coordinate`](#setup-coordinate) | Generate a coordinator workflow that orchestrates multiple --action-generated composite actions. |
2626
| [`setup check`](#setup-check) | Audit generated workflows for drift against the current config/repo (read-only). |
27+
| [`setup delete`](#setup-delete) | Delete managed workflow/action file(s) and their .github/tailor-sdk.lock entries. |
2728

2829
### setup action
2930

@@ -110,6 +111,30 @@ tailor-sdk setup coordinate [options]
110111

111112
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
112113

114+
### setup delete
115+
116+
Delete managed workflow/action file(s) and their .github/tailor-sdk.lock entries.
117+
118+
**Usage**
119+
120+
```
121+
tailor-sdk setup delete [options] <files>
122+
```
123+
124+
**Arguments**
125+
126+
| Argument | Description | Required |
127+
| -------- | ------------------------------------------------------------------------------------------ | -------- |
128+
| `files` | Workflow/action file(s) to delete, as generated under .github/workflows or .github/actions | Yes |
129+
130+
**Options**
131+
132+
| Option | Alias | Description | Required | Default |
133+
| ------- | ----- | ------------------------- | -------- | ------- |
134+
| `--yes` | `-y` | Skip confirmation prompts | No | `false` |
135+
136+
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
137+
113138
### setup preview
114139

115140
Generate a preview workflow (PR open/sync triggers deploy to a per-PR workspace).

docs/sdk/services/tailordb.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,29 @@ type User {
254254
- `toward.as` - Customizes the field name for accessing the related type from this type
255255
- `backward` - Customizes the field name for accessing this type from the related type
256256

257+
Relation names share the same GraphQL field namespace as fields, files, and other relations on
258+
the type. The SDK rejects duplicate or empty relation names. Use `toward.as` when multiple fields
259+
on the same type point to the same target type, because their default forward names are derived
260+
from the target type name:
261+
262+
```typescript
263+
const post = db.type("Post", {
264+
authorID: db.uuid().relation({
265+
type: "n-1",
266+
toward: { type: user, as: "author" },
267+
backward: "authoredPosts",
268+
}),
269+
reviewerID: db.uuid().relation({
270+
type: "n-1",
271+
toward: { type: user, as: "reviewer" },
272+
backward: "reviewedPosts",
273+
}),
274+
});
275+
```
276+
277+
Use `toward.as` or `backward` when a generated relation name would conflict with an existing
278+
field, files entry, or relation on the same type.
279+
257280
### Hooks
258281

259282
Add hooks to execute functions during data creation or update. Hooks receive three arguments:

0 commit comments

Comments
 (0)