@sequenceholdings/studio-cli 0.5.1 → 0.5.2
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/README.md +86 -36
- package/dist/agents/commands.js +7 -0
- package/dist/app/adapters.d.ts +2 -2
- package/dist/app/adapters.js +15 -14
- package/dist/app/commands.d.ts +1 -1
- package/dist/app/commands.js +57 -19
- package/dist/app/deploy.d.ts +2 -0
- package/dist/app/deploy.js +25 -13
- package/dist/app/kinds.d.ts +6 -0
- package/dist/app/kinds.js +6 -0
- package/dist/app/manifest.js +1 -1
- package/dist/app/official-source.d.ts +10 -0
- package/dist/app/official-source.js +23 -0
- package/dist/app/prepare.d.ts +27 -0
- package/dist/app/prepare.js +58 -0
- package/dist/app/primitive-ids.d.ts +6 -0
- package/dist/app/primitive-ids.js +16 -0
- package/dist/app/primitive-scaffold.d.ts +0 -4
- package/dist/app/primitive-scaffold.js +7 -18
- package/dist/app/readme.js +17 -14
- package/dist/app/repository-index.d.ts +19 -0
- package/dist/app/repository-index.js +86 -0
- package/dist/app/scaffold.d.ts +12 -1
- package/dist/app/scaffold.js +31 -18
- package/dist/app/workspace-compile.d.ts +9 -0
- package/dist/app/workspace-compile.js +13 -1
- package/dist/app/workspace-scaffold.js +5 -1
- package/dist/auth.d.ts +17 -0
- package/dist/auth.js +29 -0
- package/dist/config.d.ts +16 -0
- package/dist/config.js +38 -5
- package/dist/env-registry.d.ts +8 -0
- package/dist/env-registry.js +9 -1
- package/dist/envs/commands.js +14 -1
- package/dist/functions/manifest.d.ts +4 -1
- package/dist/functions/manifest.js +8 -2
- package/dist/main.js +1 -1
- package/dist/orm/delegate.js +5 -2
- package/dist/pipeline/clone-deploy.d.ts +1 -1
- package/dist/pipeline/clone-deploy.js +3 -2
- package/dist/pipeline/commands.js +3 -2
- package/dist/process/commands.d.ts +6 -3
- package/dist/process/commands.js +26 -10
- package/dist/repos/commands.js +1 -1
- package/dist/repos/pulls.d.ts +19 -1
- package/dist/repos/pulls.js +15 -2
- package/dist/templates/process/example-process/process.ts +2 -0
- package/dist/templates/process/package.json +1 -1
- package/package.json +8 -7
- package/templates/process/example-process/process.ts +2 -0
- package/templates/process/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ inspect `truncated` and pagination metadata where present.
|
|
|
54
54
|
# In a process or artifact repo (devDependency, using pnpm — see below):
|
|
55
55
|
pnpm add -D @sequenceholdings/studio-cli @sequenceholdings/lattice
|
|
56
56
|
|
|
57
|
-
# Or globally:
|
|
57
|
+
# Or globally (ORM commands need the in-repo install; see "ORM commands"):
|
|
58
58
|
pnpm add -g @sequenceholdings/studio-cli
|
|
59
59
|
```
|
|
60
60
|
|
|
@@ -142,6 +142,11 @@ seq-studio login --env <name> # sign in to it
|
|
|
142
142
|
seq-studio envs list # show configured environments (name, URL, source)
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
+
The reserved names `staging`, `production` and `banksouth` are for deployments
|
|
146
|
+
that sign in through the shared Sequence login: `envs add` saves one of them to
|
|
147
|
+
`~/.config/lattice/config.toml` only after the deployment confirms that login,
|
|
148
|
+
and `seq-studio login` signs you in.
|
|
149
|
+
|
|
145
150
|
You can also add or override environments yourself in
|
|
146
151
|
`~/.config/lattice/config.toml`.
|
|
147
152
|
Authenticated requests accept only HTTPS origins at `seqholdings.com` or its
|
|
@@ -182,13 +187,16 @@ locations, dependencies, and deployment selection.
|
|
|
182
187
|
|
|
183
188
|
| Command | What it does |
|
|
184
189
|
|---------|--------------|
|
|
185
|
-
| `seq-studio init <dir> --with <kinds
|
|
190
|
+
| `seq-studio init <dir> [--with <kinds>] [--skip-install]` | Scaffold a version 3 app, root pnpm workspace, shared package, README, and selected primitives; by default creates ORM, function, process, and artifact primitives, installs dependencies, and authors the first ORM migration |
|
|
186
191
|
| `seq-studio add <kind> <name> [--depends-on <ids>] [--template <t>]` | Add any primitive, including additional ORM namespaces and UIs |
|
|
187
192
|
| `seq-studio add package <name>` | Add a shared TypeScript package to the manifest and pnpm workspace |
|
|
188
193
|
| `seq-studio deploy -e <env> [--yes] [--only id1,id2] [--dry-run]` | Validate and deploy the selected app graph, including prerequisites |
|
|
189
194
|
|
|
190
195
|
`init` accepts `orm`, `workspace`, `function`, `agent`, `process`, `pipeline`, and `artifact` as
|
|
191
|
-
a comma-separated `--with` list or boolean flags (`--agent --process`).
|
|
196
|
+
a comma-separated `--with` list or boolean flags (`--agent --process`). With no
|
|
197
|
+
kind flags it scaffolds `orm,function,process,artifact`, the kinds repository
|
|
198
|
+
CI/CD creates and deploys on merge. `--skip-install` skips the install and
|
|
199
|
+
migration step (offline). The first
|
|
192
200
|
function defaults to `hello` (`--function-name` changes it). Agent, process, and
|
|
193
201
|
pipeline folders use the app name. Pipelines default to transformation stages;
|
|
194
202
|
`--pipeline-type ingestion|transformation|serving` selects another template.
|
|
@@ -200,12 +208,13 @@ dependencies; run `pnpm install` inside its directory. App deploys send its
|
|
|
200
208
|
directory (for example `artifacts/admin`) so Atlas builds it from the app repository.
|
|
201
209
|
|
|
202
210
|
```bash
|
|
203
|
-
seq-studio init loan-tools
|
|
211
|
+
seq-studio init loan-tools
|
|
204
212
|
cd loan-tools
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
#
|
|
213
|
+
# Init installs dependencies and authors the first migration; review and commit
|
|
214
|
+
# pnpm-lock.yaml and orm/loan_tools/migrations/ before opening the PR.
|
|
215
|
+
# In a git-service repo, push a branch and open a PR: checks run automatically
|
|
216
|
+
# and merging main creates and deploys the declared supported primitives.
|
|
217
|
+
# Outside one, deploy directly:
|
|
209
218
|
seq-studio login -e <env>
|
|
210
219
|
seq-studio deploy -e <env> --dry-run
|
|
211
220
|
seq-studio deploy -e <env> --yes
|
|
@@ -225,7 +234,9 @@ seq-studio deploy -e <env> --only approvals-process --yes
|
|
|
225
234
|
|
|
226
235
|
Creating a platform git-service repo without `--git-backend` (`seq-studio repos
|
|
227
236
|
create`, or the Repositories UI) seeds it with a Sequence app README on either
|
|
228
|
-
backend; only an explicit `--git-backend walgit` starts empty. A fresh clone with that seed README is a valid `init .` target.
|
|
237
|
+
backend; only an explicit `--git-backend walgit` starts empty. A fresh clone with that seed README is a valid `init .` target. Inside an
|
|
238
|
+
existing repository, `init <subdir>` also declares the app in
|
|
239
|
+
`.seq/repository.yml` so repository CI picks it up. Init
|
|
229
240
|
preserves its git remote and existing ignores, replaces the seed README, and
|
|
230
241
|
refuses ordinary non-empty repositories. The initial UI stays at `artifact/`;
|
|
231
242
|
additional UIs live under `artifacts/<name>/`.
|
|
@@ -243,8 +254,9 @@ packages, preserves the seven-day dependency age gate, and explicitly controls
|
|
|
243
254
|
build scripts. Generated nested install configuration is consolidated at the
|
|
244
255
|
root. CI should use `pnpm install --frozen-lockfile`.
|
|
245
256
|
|
|
246
|
-
Every new app includes `packages/shared`, named `@<app-id>/shared
|
|
247
|
-
`workspace:*` dependencies
|
|
257
|
+
Every new app includes `packages/shared`, named `@<app-id>/shared`. Artifacts and
|
|
258
|
+
processes receive ordinary `workspace:*` dependencies; functions do not, because
|
|
259
|
+
their deployed bundles cannot resolve workspace links. Export common types,
|
|
248
260
|
validation, and helpers from `src/index.ts`. Additional packages are registered
|
|
249
261
|
with `seq-studio add package <name>`; add them to consumers with:
|
|
250
262
|
|
|
@@ -349,11 +361,11 @@ to a workspace resolves that workspace by name in the selected environment. A
|
|
|
349
361
|
workspace UUID in source must be one that exists there; an ID from another
|
|
350
362
|
environment fails the deployment. `uses` needs schema version 2 or later.
|
|
351
363
|
|
|
352
|
-
|
|
364
|
+
After changing an ORM schema, run
|
|
353
365
|
`seq-studio orm generate <namespace-path>` followed by
|
|
354
366
|
`seq-studio orm diff <namespace-path>`. Review and commit the generated migration
|
|
355
|
-
ledger.
|
|
356
|
-
|
|
367
|
+
ledger. `init` authors the baseline for its initial namespace (unless
|
|
368
|
+
`--skip-install`); namespaces added later still need this workflow. A namespace without migrations fails deployment
|
|
357
369
|
preflight with instructions to run `orm diff`.
|
|
358
370
|
|
|
359
371
|
Before any deployment, versions 2 and 3 validate and compile the selected sources.
|
|
@@ -364,9 +376,11 @@ checks do not deploy resources. Official artifact deployments require the full a
|
|
|
364
376
|
checkout to be clean on `main`, including shared packages and the app manifest;
|
|
365
377
|
local deployments retain the local development path.
|
|
366
378
|
|
|
367
|
-
Pipeline entries require `repo:
|
|
368
|
-
|
|
369
|
-
|
|
379
|
+
Pipeline entries require `repo: <namespace>/<name>` and `ref`; they may specify
|
|
380
|
+
`target`. The repo is a dedicated Pipeline repo (`pipelines/<name>`), an app
|
|
381
|
+
monorepo (`apps/<name>`), or your own namespace's repo. For any repo outside
|
|
382
|
+
`pipelines`, `path` is both the local authoring directory and the contained
|
|
383
|
+
pipeline root in the remote repository. A
|
|
370
384
|
dedicated `pipelines/<name>` repository retains its historical repository-root
|
|
371
385
|
package. Commit and push pipeline source before deploying. The
|
|
372
386
|
app reuses the existing pipeline release workflow and waits for completion.
|
|
@@ -509,7 +523,8 @@ and inherits only other collaborator roles.
|
|
|
509
523
|
principal, so it has nothing to use and appears only in collaborator roles:
|
|
510
524
|
`viewer` sees its runs, `operator` runs its stages, `editor` deploys it.
|
|
511
525
|
- A pipeline member is its release unit, the same id deploy registers:
|
|
512
|
-
`pipelines/<name>`, or
|
|
526
|
+
`pipelines/<name>`, or `<namespace>/<name>@<path>` for one of an app's
|
|
527
|
+
pipelines (in `apps` or your own namespace).
|
|
513
528
|
- Secrets the app's functions and pipelines read are listed under a top-level
|
|
514
529
|
`secrets:` block by their name in each environment. Deploy doesn't create or
|
|
515
530
|
set them — use `seq-studio secrets` — it bundles them so a collaborator role
|
|
@@ -538,7 +553,7 @@ and inherits only other collaborator roles.
|
|
|
538
553
|
namespace, a process, an agent, an artifact or a pipeline — is included
|
|
539
554
|
without deploying it under a top-level `existing:` block, by the name Atlas
|
|
540
555
|
knows it by: a function's slug, a namespace, a process id, an agent id, an
|
|
541
|
-
artifact's slug, or a pipeline's release unit (`
|
|
556
|
+
artifact's slug, or a pipeline's release unit (`<namespace>/<name>[@<path>]`).
|
|
542
557
|
Roles, collaborator roles and `uses` reach it like any member.
|
|
543
558
|
|
|
544
559
|
```yaml
|
|
@@ -749,26 +764,27 @@ compiled to canonical SQL before registration.
|
|
|
749
764
|
| `seq-studio orm migrate-from-yaml <dir>` | Convert a legacy YAML namespace to TypeScript authoring while preserving its committed migrations. |
|
|
750
765
|
| `seq-studio orm import [dir] --spec <file>` | Plan a batched copy from an existing Postgres relation (a synced warehouse table) into an owned ORM table. Writes a SQL script; it does not connect or apply row policies. |
|
|
751
766
|
|
|
752
|
-
|
|
767
|
+
Run ORM commands with the CLI installed in the package that owns the
|
|
768
|
+
namespace. A new namespace package lists both `@sequenceholdings/studio-cli` and
|
|
769
|
+
`@sequenceholdings/orm`, so after `pnpm install` everything runs through
|
|
770
|
+
`pnpm exec`. Start one with a one-off CLI:
|
|
753
771
|
|
|
754
772
|
```bash
|
|
755
|
-
pnpm
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
The everyday loop is:
|
|
759
|
-
|
|
760
|
-
```bash
|
|
761
|
-
seq-studio orm init lending
|
|
773
|
+
pnpm dlx --package @sequenceholdings/studio-cli --package @sequenceholdings/orm \
|
|
774
|
+
seq-studio orm init lending
|
|
762
775
|
cd lending
|
|
763
776
|
pnpm install
|
|
764
777
|
|
|
765
778
|
# Edit sequence.config.ts, schema/*.ts, and graphql/**/*.ts.
|
|
766
|
-
seq-studio orm generate .
|
|
767
|
-
seq-studio orm plan . -e local
|
|
768
|
-
seq-studio orm apply . -e local
|
|
769
|
-
seq-studio orm validate .
|
|
779
|
+
pnpm exec seq-studio orm generate .
|
|
780
|
+
pnpm exec seq-studio orm plan . -e local
|
|
781
|
+
pnpm exec seq-studio orm apply . -e local
|
|
782
|
+
pnpm exec seq-studio orm validate .
|
|
770
783
|
```
|
|
771
784
|
|
|
785
|
+
A globally installed CLI can't run ORM commands under pnpm 11: pnpm 11 isolates
|
|
786
|
+
global packages, and `drizzle-kit` imports `drizzle-orm` without declaring it.
|
|
787
|
+
|
|
772
788
|
`apply --dry-run` rehearses a migration against a disposable branch copy of
|
|
773
789
|
the target environment's data. `apply --no-create` is the CI guard that refuses
|
|
774
790
|
to provision a missing namespace. Destructive DDL requires explicit
|
|
@@ -832,7 +848,7 @@ datasets before adopting this path for latency-sensitive reads.
|
|
|
832
848
|
| `seq-studio process lint [--dir <path>] [--offline]` | Static checks (graph, return contracts, agent schema, timeouts, and JSONata syntax); `--offline` skips live agent-schema lookup |
|
|
833
849
|
| `seq-studio process plan [--dir <path>] -e <env>` | Build bundle, diff against currently-active version |
|
|
834
850
|
| `seq-studio process apply [--dir <path>] -e <env> [--only <id1,id2>]` | Build → register bundle → promote each process. `--only` promotes just the named process ids (the bundle still contains the whole root — registration is inert) |
|
|
835
|
-
| `seq-studio process apply --repo
|
|
851
|
+
| `seq-studio process apply --repo <namespace>/<name> [--ref <r>] -e <env> [--only <id1,id2>]` | Same as above, but materializes the source from a platform git-service repo in `processes`, `apps`, or your own namespace. Pinned commit SHA is injected as bundle provenance. Uses your `seq-studio login` (or the target realm's M2M JSON source path for CI) |
|
|
836
852
|
| `seq-studio process test [--dir <path>] -e <env> [--offline]` | CI wrapper: lint + plan, non-zero exit on errors or BREAKING diffs; see the offline limitation below |
|
|
837
853
|
| `seq-studio process simulate <id> [--dir <path>]` | Isolated child-process walk with stubbed runners and hardened JSONata data-flow mapper evaluation (offline) |
|
|
838
854
|
| `seq-studio process bundle build [--dir <path>] [-o file.json]` | Build a bundle locally |
|
|
@@ -967,6 +983,30 @@ same repo share Git review and commit provenance, but keep separate manifests,
|
|
|
967
983
|
versions, runtime resources, secrets, and permissions. `--path` accepts only a
|
|
968
984
|
canonical relative directory inside a remote repo; use `--dir` for local source.
|
|
969
985
|
|
|
986
|
+
### Scoped group-member directory reads
|
|
987
|
+
|
|
988
|
+
A function may opt in to resolving selected members of existing Atlas groups:
|
|
989
|
+
|
|
990
|
+
```yaml
|
|
991
|
+
capabilities:
|
|
992
|
+
directory:
|
|
993
|
+
groups: ["<existing-group-id>"]
|
|
994
|
+
```
|
|
995
|
+
|
|
996
|
+
Use `createFunctionDirectoryClient` from
|
|
997
|
+
`@sequenceholdings/managed-functions` to resolve selected group row IDs or
|
|
998
|
+
exact canonical subjects (1–50 per request). This is a caller-delegated
|
|
999
|
+
read capability, not a group grant or global user search; service/system
|
|
1000
|
+
invocations do not receive it. Current function access, declared group reach,
|
|
1001
|
+
caller visibility, and active tenant membership are checked at read time.
|
|
1002
|
+
|
|
1003
|
+
Requires CLI 0.5.2+, SDK 0.4.1+, and a deployment advertising
|
|
1004
|
+
`directory_members` in `seq-studio functions limits --json -e <env>`.
|
|
1005
|
+
Deploy preflight rejects unsupported deployments or stale tooling. Release
|
|
1006
|
+
the supporting Atlas build and packages before adding the declaration to a
|
|
1007
|
+
consumer; declaring it does not create groups, grant access, or bypass action
|
|
1008
|
+
permissions. See the SDK README for client usage and security boundaries.
|
|
1009
|
+
|
|
970
1010
|
### Deploying to local Atlas
|
|
971
1011
|
|
|
972
1012
|
Start local Atlas, then use the same deployment workflow:
|
|
@@ -1187,6 +1227,13 @@ scope check. Keep the handler's accepted operation names explicit. The caller
|
|
|
1187
1227
|
must still satisfy namespace runtime access, operation requirements, and row
|
|
1188
1228
|
policies; declaring a table does not grant access to every row.
|
|
1189
1229
|
|
|
1230
|
+
Queries joining a built-in platform user (for example, an `author` relationship)
|
|
1231
|
+
also require the exact logical table name `platformUsers` in that namespace's
|
|
1232
|
+
`tables` list. Use `tables: [entries, platformUsers]` for an entries query that
|
|
1233
|
+
reads its author. Do not substitute a physical directory table name. This is
|
|
1234
|
+
an explicit read scope only; namespace access, operation requirements and row
|
|
1235
|
+
policies still apply. Ordinary namespace table names remain lowercase identifiers.
|
|
1236
|
+
|
|
1190
1237
|
A function that reaches a namespace must attach a top-level `service_account`
|
|
1191
1238
|
provided by its administrator. Caller-mode execution remains on behalf of the
|
|
1192
1239
|
invoking user; attaching the account does not select service mode.
|
|
@@ -1660,8 +1707,9 @@ check-runs and cannot satisfy required merge gates. The legacy `require` and
|
|
|
1660
1707
|
> for your environment with your administrator.
|
|
1661
1708
|
|
|
1662
1709
|
`seq-studio pipeline <sub>` authors and validates Data Pipelines **stage
|
|
1663
|
-
specs** — the typed contracts (`<name>.stage.yml`) in
|
|
1664
|
-
|
|
1710
|
+
specs** — the typed contracts (`<name>.stage.yml`) in a dedicated Pipeline
|
|
1711
|
+
repo (`pipelines/<domain>`), an app monorepo (`apps/<app>`), or a repo in your
|
|
1712
|
+
own namespace (`<namespace>/<repo>`).
|
|
1665
1713
|
Validation logic lives in
|
|
1666
1714
|
`@sequenceholdings/pipeline-spec` (an optional peer, like `@sequenceholdings/orm`);
|
|
1667
1715
|
install it alongside the CLI for local spec authoring and validation. The
|
|
@@ -1692,11 +1740,13 @@ first listed stage directory; without config it keeps using the package root.
|
|
|
1692
1740
|
| `seq-studio pipeline codegen tables [--from <authoring.ts>] [--dir <dir>] [--dry-run] [--force]` | Generate one ingestion stage spec per table from a `PerTableIngestionAuthoring` TypeScript module. `--from` defaults to `authoring.tables.ts`; `--dir` defaults to the current package root and writes into its first configured stage directory (or the root without config). `--dry-run` lists output files without writing; existing files are preserved unless `--force` is supplied |
|
|
1693
1741
|
| `seq-studio pipeline validate [dir] [--assets <file\|url>] [--orm-contracts <file\|url>] [--json]` | Run the full offline spec gate: envelope + body validation, `schema_ref` resolution, and repo-level graph validation (reference resolution, single-writer, cycles, column subsets, serving projection checks). Auto-loads `orm-contracts.json` from the pipeline dir when present. Exit 0/1 |
|
|
1694
1742
|
| `seq-studio pipeline repin-orm [dir] -e <env> [--target <id>] [--dry-run]` | Resolve the environment's pipeline target (or use `--target` when ambiguous), fetch its active ORM v2 contracts, verify those serving projections remain compatible, then update `orm-contracts.json` and their `satisfies.content_hash` pins. Refuses to write when compatibility fails |
|
|
1695
|
-
| `seq-studio pipeline plan --repo <namespace>/<slug> --ref <sha\|branch> [--root <directory>] -e <env> [--target <id>] [--json]` | Enqueue and poll a durable Pipeline plan (materialize → SDK/`validateSpecGraph` → compile → live-diff → provision findings). `<namespace>` is `pipelines` or
|
|
1696
|
-
| `seq-studio pipeline deploy --repo <namespace>/<slug> --ref <sha\|branch> [--root <directory>] -e <env> [--target <id>] [--approved-by <sub>] [--allow-destructive <resource-key> ...] [--run-now] [--wait-timeout <duration>] [--no-wait] [--json]` | Plan then enqueue deploy; Trigger runs `bundle validate` then `bundle deploy` against reviewed bytes. `<namespace>` is `pipelines` or
|
|
1743
|
+
| `seq-studio pipeline plan --repo <namespace>/<slug> --ref <sha\|branch> [--root <directory>] -e <env> [--target <id>] [--json]` | Enqueue and poll a durable Pipeline plan (materialize → SDK/`validateSpecGraph` → compile → live-diff → provision findings). `<namespace>` is `pipelines`, `apps`, or your own namespace. Fails closed listing **every** missing target binding (alert channels, workspace, Databricks `source.credential`) plus Data Sync edge-worker machine/operation/`credEnvFamilies` mismatches before registry writes. Does **not** run Databricks `bundle validate` (that is a Trigger deploy-path hard gate). Exit 1 on destructive findings (CI-safe). `--json` emits the completed stable plan envelope |
|
|
1744
|
+
| `seq-studio pipeline deploy --repo <namespace>/<slug> --ref <sha\|branch> [--root <directory>] -e <env> [--target <id>] [--approved-by <sub>] [--allow-destructive <resource-key> ...] [--run-now] [--wait-timeout <duration>] [--no-wait] [--json]` | Plan then enqueue deploy; Trigger runs `bundle validate` then `bundle deploy` against reviewed bytes. `<namespace>` is `pipelines`, `apps`, or your own namespace. Default is plant-only (jobs are created, not run). `--run-now` runs in-unit producer roots after bundle deploy; serving refresh provisioning completes before producer trigger.after tasks can run. If a producer fails, the terminal status includes the remote Databricks task/event error when available. `--allow-destructive` is repeatable and must exactly name every deletion/recreation finding in the immutable plan; only authenticated `@seqholdings.com` users may authorize it; permission, ownership, schedule-drift, and provisioning blockers cannot be overridden. Polls to terminal unless `--no-wait`. Targets that require approval need `--approved-by` naming the authenticated caller. |
|
|
1697
1745
|
|
|
1698
1746
|
`--root` selects a contained Pipeline package inside the repository. The directory becomes the package and Databricks bundle root, so its `*.stage.yml`, `src/`, manifests, contracts, schemas, and extra resources keep their normal root-relative layout. Each repository/root pair is an independent release unit; sibling pipelines and unrelated app files are not included in its bundle. Omitting `--root` preserves the historical whole-repository release unit.
|
|
1699
1747
|
|
|
1748
|
+
Creating a release unit requires both **Can create** on Pipelines and Git Service **Writer** on the named repository. Once the release unit exists, further changes require its Pipeline `editor` tier.
|
|
1749
|
+
|
|
1700
1750
|
`seq-studio pipeline deploy --dir <checkout> --repo <namespace>/<slug> -e <env>` publishes a clean local checkout into that environment's git service, then deploys the published commit through the same path. It is available on targets that do not require approval (`dev`, `staging`). BankSouth and production still deploy a commit that already exists in that environment's git service. Log in with `seq-studio login -e <env>` before publishing; the same user authenticates API and Git requests. Do not pass `--ref` with `--dir`. When the repository is created by this command, `main` is set to the published commit so a later clone without `--ref` resolves; an existing repository's default branch is left unchanged.
|
|
1701
1751
|
| `seq-studio pipeline status --deployment-id <id> -e <env> [--json]` | Fetch the current remote deployment status without changing it. Use this public command to continue monitoring after local polling stops |
|
|
1702
1752
|
| `seq-studio pipeline adopt --stage <slug> --ref <sha\|branch> [--root <directory>] -e <env> [--target <id>] --native-id <id> --approved-by <you> [--resource-key <key>] [--kind job\|dlt_pipeline] [--old-source-removal-pr <url>] [--repo <namespace>/<slug>]` | Bind a live Databricks job/pipeline into the stage without recreation (`bundle deployment bind` on Trigger). Always requires `--approved-by` naming the caller. When the key is still in the monorepo DAB, pass `--old-source-removal-pr` and follow the returned cutover checklist: unbind the old bundle state without deleting the remote, then remove its DAB declaration and add the target-specific adopted-resource entry in the same PR before redeploying. |
|
package/dist/agents/commands.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getJson, postJson } from '../atlas-client.js';
|
|
2
2
|
import { readConfig } from '../config.js';
|
|
3
|
+
import { wantsHelp } from '../command-input.js';
|
|
3
4
|
import { applyInChunks } from './apply-chunks.js';
|
|
4
5
|
import { confirmYes } from '../prompt.js';
|
|
5
6
|
import { buildContext, clientOptions, flagBool, printError, requestedEnvironment, } from '../functions/commands.js';
|
|
@@ -207,6 +208,12 @@ export const AGENTS_USAGE = `usage:
|
|
|
207
208
|
`;
|
|
208
209
|
export async function runAgentsCommand(sub, args) {
|
|
209
210
|
try {
|
|
211
|
+
// `agents <sub> --help` prints help instead of running the subcommand.
|
|
212
|
+
// Voice has its own help.
|
|
213
|
+
if (sub !== 'voice' && wantsHelp({ args })) {
|
|
214
|
+
console.log(AGENTS_USAGE);
|
|
215
|
+
return 0;
|
|
216
|
+
}
|
|
210
217
|
switch (sub) {
|
|
211
218
|
case 'voice': {
|
|
212
219
|
const { runVoiceCommand } = await import('./voice.js');
|
package/dist/app/adapters.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type { DeployPrimitiveArgs, PrimitiveDeployers } from './deploy.js';
|
|
|
2
2
|
import type { PrimitiveEntry } from './manifest.js';
|
|
3
3
|
/**
|
|
4
4
|
* The pipeline's release unit — its id in Atlas, the same one deploy
|
|
5
|
-
* registers: `pipelines/<name>`, or
|
|
6
|
-
* pipelines.
|
|
5
|
+
* registers: `pipelines/<name>`, or `<namespace>/<name>@<path>` for one of an
|
|
6
|
+
* app's pipelines.
|
|
7
7
|
*/
|
|
8
8
|
export declare function pipelineReleaseUnit(entry: PrimitiveEntry): string | undefined;
|
|
9
9
|
/**
|
package/dist/app/adapters.js
CHANGED
|
@@ -4,8 +4,8 @@ import { readFile, stat } from 'node:fs/promises';
|
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { load as loadYaml } from 'js-yaml';
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { resolveArtifactSource } from '@sequenceholdings/artifact-studio/source-resolver';
|
|
8
|
+
import { checkOfficialArtifactSource } from './official-source.js';
|
|
9
9
|
const functionIdentitySchema = z.object({ function: z.object({ id: z.string() }) });
|
|
10
10
|
const artifactIdentitySchema = z.object({ artifact: z.object({ project_id: z.string() }) });
|
|
11
11
|
function selectedFlags({ entry }) {
|
|
@@ -55,18 +55,23 @@ async function validatePrimitiveIdentity({ entry, path }) {
|
|
|
55
55
|
function requirePipelineSource({ entry }) {
|
|
56
56
|
if (!entry.repo || !entry.ref) {
|
|
57
57
|
throw new Error(`Pipeline "${entry.id}" requires repo and ref in sequence.app.yml. ` +
|
|
58
|
-
'Push its source to a pipelines/<name
|
|
58
|
+
'Push its source to a git-service repository (pipelines/<name>, apps/<name>, or your own namespace) and pin that repository/ref; ' +
|
|
59
59
|
'pipeline deployment reads committed source from the platform git service.');
|
|
60
60
|
}
|
|
61
61
|
return { repo: entry.repo, ref: entry.ref };
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* A `pipelines/*` repo is a dedicated Pipeline repo, deployed from its root.
|
|
65
|
+
* Any other repo (`apps/*` or a builder's own namespace) is the app's
|
|
66
|
+
* repository, holding this pipeline at its manifest path.
|
|
67
|
+
*/
|
|
63
68
|
function pipelineRoot(entry) {
|
|
64
|
-
return entry.repo
|
|
69
|
+
return entry.repo && !entry.repo.startsWith('pipelines/') ? entry.path : undefined;
|
|
65
70
|
}
|
|
66
71
|
/**
|
|
67
72
|
* The pipeline's release unit — its id in Atlas, the same one deploy
|
|
68
|
-
* registers: `pipelines/<name>`, or
|
|
69
|
-
* pipelines.
|
|
73
|
+
* registers: `pipelines/<name>`, or `<namespace>/<name>@<path>` for one of an
|
|
74
|
+
* app's pipelines.
|
|
70
75
|
*/
|
|
71
76
|
export function pipelineReleaseUnit(entry) {
|
|
72
77
|
if (!entry.repo)
|
|
@@ -80,8 +85,8 @@ async function validatePipelineSource(args) {
|
|
|
80
85
|
const { buildContext, clientOptions } = await import('../functions/commands.js');
|
|
81
86
|
const context = await buildContext({ positional: [], flags: { env: args.env } });
|
|
82
87
|
const [namespace, name] = repo.split('/');
|
|
83
|
-
if (
|
|
84
|
-
throw new Error(`Pipeline "${args.entry.id}" requires a
|
|
88
|
+
if (!namespace || !name || repo.split('/').length !== 2) {
|
|
89
|
+
throw new Error(`Pipeline "${args.entry.id}" requires a <namespace>/<name> repository.`);
|
|
85
90
|
}
|
|
86
91
|
const source = await resolveArtifactSource({ kind: 'git-service', namespace, name, ref }, { ...clientOptions(context), ...(context.authMode ? { authMode: context.authMode } : {}) });
|
|
87
92
|
try {
|
|
@@ -151,12 +156,8 @@ export async function validateAppPrimitive(args) {
|
|
|
151
156
|
break;
|
|
152
157
|
}
|
|
153
158
|
case 'artifact': {
|
|
154
|
-
if (env !== 'local')
|
|
155
|
-
|
|
156
|
-
...localGitMetadata(path),
|
|
157
|
-
environment: env,
|
|
158
|
-
});
|
|
159
|
-
}
|
|
159
|
+
if (env !== 'local')
|
|
160
|
+
checkOfficialArtifactSource({ dir: path, env, dryRun: args.dryRun });
|
|
160
161
|
const { runArtifactCommand } = await import('../artifact/delegate.js');
|
|
161
162
|
code = await runArtifactCommand('validate', [path]);
|
|
162
163
|
break;
|
package/dist/app/commands.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import type { ParsedArgs } from '../process/commands.js';
|
|
8
8
|
export declare const APP_INIT_USAGE: string;
|
|
9
9
|
export declare const APP_ADD_USAGE: string;
|
|
10
|
-
export declare const APP_DEPLOY_USAGE = "usage:\n seq-studio deploy -e <env> [options]\n\n Deploy the app declared in sequence.app.yml. Versions 2 and 3 use\n depends_on prerequisites; deploy.order optionally orders ready primitives.\n Runs each kind's existing command:\n orm \u2192 seq-studio orm apply <path> -e <env>\n function \u2192 seq-studio functions deploy --dir <path> -e <env> [--yes]\n agent \u2192 seq-studio agents apply --dir <path> -e <env> [--yes]\n process \u2192 seq-studio process apply --dir <path> -e <env>\n pipeline \u2192 seq-studio pipeline deploy --repo <repo> --ref <ref> -e <env>\n artifact \u2192 seq-studio artifact deploy <path> -e <env>\n\n Options:\n -e, --env <name> target environment (required)\n --dir <path> app root (default: cwd; must contain sequence.app.yml)\n --only <id1,id2> deploy these ids and their prerequisites (v2)\n --yes non-interactive (forwarded to primitive commands)\n --dry-run validate/compile selected sources without deploying (v2)\n --approved-by <sub> recorded caller approval for protected pipeline targets\n --wait-timeout <d> pipeline polling timeout, e.g. 10m or 2h\n\n Examples:\n seq-studio deploy -e staging --yes\n seq-studio deploy -e local --only get-pokemon --yes\n seq-studio deploy --dir ./pokedex -e staging --dry-run\n\n Run from the app root (directory with sequence.app.yml), or pass --dir.\n Version 1 manifests keep their existing ordering and exact --only behavior.\n Pipelines require repo and ref in their manifest entry.\n ORM namespaces require generated code and a reviewed migration ledger:\n seq-studio orm generate <path> && seq-studio orm diff <path>\n Commit generated migrations before the first deployment and schema changes.\n Pipeline preflight reads the remote source and pins its commit; dry-run\n therefore needs network/auth for pipelines. Version 1 dry-run only lists.\n Version 2 writes the result to .sequence/deployments/<environment>.json.\n";
|
|
10
|
+
export declare const APP_DEPLOY_USAGE = "usage:\n seq-studio deploy -e <env> [options]\n\n Deploy the app declared in sequence.app.yml. Versions 2 and 3 use\n depends_on prerequisites; deploy.order optionally orders ready primitives.\n Runs each kind's existing command:\n orm \u2192 seq-studio orm apply <path> -e <env>\n function \u2192 seq-studio functions deploy --dir <path> -e <env> [--yes]\n agent \u2192 seq-studio agents apply --dir <path> -e <env> [--yes]\n process \u2192 seq-studio process apply --dir <path> -e <env>\n pipeline \u2192 seq-studio pipeline deploy --repo <repo> --ref <ref> -e <env>\n artifact \u2192 seq-studio artifact deploy <path> -e <env>\n\n Options:\n -e, --env <name> target environment (required)\n --dir <path> app root (default: cwd; must contain sequence.app.yml)\n --only <id1,id2> deploy these ids and their prerequisites (v2)\n --yes non-interactive (forwarded to primitive commands)\n --dry-run validate/compile selected sources without deploying (v2)\n --approved-by <sub> recorded caller approval for protected pipeline targets\n --wait-timeout <d> pipeline polling timeout, e.g. 10m or 2h\n\n Examples:\n seq-studio deploy -e staging --yes\n seq-studio deploy -e local --only get-pokemon --yes\n seq-studio deploy --dir ./pokedex -e staging --dry-run\n\n Run from the app root (directory with sequence.app.yml), or pass --dir.\n Version 1 manifests keep their existing ordering and exact --only behavior.\n Pipelines require repo and ref in their manifest entry.\n ORM namespaces require generated code and a reviewed migration ledger:\n seq-studio orm generate <path> && seq-studio orm diff <path>\n Commit generated migrations before the first deployment and schema changes.\n Pipeline preflight reads the remote source and pins its commit; dry-run\n therefore needs network/auth for pipelines. Version 1 dry-run only lists.\n A dry-run never opens a browser login: without a session it skips the\n workspace-binding check and says so. It warns, rather than fails, when the\n artifact source is not committed and clean on main.\n Version 2 writes the result to .sequence/deployments/<environment>.json.\n";
|
|
11
11
|
export declare function runAppInitCommand(args: ParsedArgs): Promise<number>;
|
|
12
12
|
export declare function runAppAddCommand({ kindArg, args, }: {
|
|
13
13
|
kindArg: string | undefined;
|
package/dist/app/commands.js
CHANGED
|
@@ -8,41 +8,52 @@ import { basename, resolve } from 'node:path';
|
|
|
8
8
|
import { parseDurationMs } from '@sequenceholdings/lattice';
|
|
9
9
|
import { REQUIRE_EXPLICIT_ENV_MESSAGE } from '../env-flags.js';
|
|
10
10
|
import { deployApp } from './deploy.js';
|
|
11
|
-
import { resolveRequestedKinds } from './kinds.js';
|
|
11
|
+
import { DEFAULT_APP_KINDS, resolveRequestedKinds } from './kinds.js';
|
|
12
|
+
import { AppPreparationError, prepareScaffoldedApp } from './prepare.js';
|
|
13
|
+
import { planRepositoryDeclaration, REPOSITORY_INDEX_PATH, writeRepositoryDeclaration } from './repository-index.js';
|
|
12
14
|
import { addSharedPackageToApp } from './workspace-scaffold.js';
|
|
13
15
|
import { APP_MANIFEST_FILENAME, isPrimitiveKind, PRIMITIVE_KINDS, slugifyAppId, } from './manifest.js';
|
|
14
16
|
import { addPrimitiveToApp, defaultScaffoldNames, initAppMonorepo, printInitNextSteps, printOrmPreparation, } from './scaffold.js';
|
|
15
17
|
const LOG = '[seq-studio]';
|
|
16
18
|
export const APP_INIT_USAGE = `usage:
|
|
19
|
+
seq-studio init <dir> [options]
|
|
17
20
|
seq-studio init <dir> --with <kinds> [options]
|
|
18
|
-
seq-studio init <dir> --orm --function --artifact [options]
|
|
19
21
|
seq-studio init <dir> --template <name>@<version> -e <deployment>
|
|
20
22
|
|
|
21
23
|
Scaffold an app monorepo with ${APP_MANIFEST_FILENAME}, a Sequence app
|
|
22
24
|
README.md, AGENTS.md + CLAUDE.md guidance, and one subfolder per
|
|
23
|
-
selected primitive.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
selected primitive. With no kinds it scaffolds ${DEFAULT_APP_KINDS.join(', ')}:
|
|
26
|
+
the kinds repository CI/CD creates and deploys when a pull request merges.
|
|
27
|
+
Then it runs pnpm install and authors the first ORM migration, so the
|
|
28
|
+
first pull request passes checks with no edits.
|
|
29
|
+
|
|
30
|
+
A git-service clone whose README.md contains the seq-studio seed marker is
|
|
31
|
+
a valid target (\`init .\`); ordinary docs-only repositories are refused so
|
|
32
|
+
we do not overwrite them. Inside an existing repository, \`init <subdir>\`
|
|
33
|
+
also declares the app in ${REPOSITORY_INDEX_PATH} so CI picks it up.
|
|
28
34
|
|
|
29
35
|
Kinds: ${PRIMITIVE_KINDS.join(', ')}
|
|
30
36
|
|
|
31
37
|
Options:
|
|
32
|
-
--
|
|
33
|
-
-e, --env <name> registered deployment whose template catalog to read
|
|
34
|
-
--with <k1,k2,…> comma-separated kinds to scaffold
|
|
38
|
+
--with <k1,k2,…> comma-separated kinds to scaffold (default: ${DEFAULT_APP_KINDS.join(',')})
|
|
35
39
|
--orm --function … boolean aliases for --with
|
|
36
40
|
--function-name <n> name/slug for the first function (default: hello)
|
|
37
41
|
--pipeline-type <t> ingestion, transformation (default), or serving
|
|
38
|
-
--template <t>
|
|
42
|
+
--template <t> react-vite (default) or nextjs for the artifact, or
|
|
43
|
+
<name>@<version> to start from a published app
|
|
44
|
+
template in the -e deployment
|
|
45
|
+
-e, --env <name> registered deployment whose template catalog to read
|
|
39
46
|
--description <text> optional app.description in the manifest
|
|
47
|
+
--skip-install skip pnpm install and ORM migration authoring (offline)
|
|
40
48
|
|
|
41
49
|
Examples:
|
|
50
|
+
seq-studio init pokedex
|
|
51
|
+
seq-studio init . --template nextjs
|
|
52
|
+
seq-studio init uw362 # a new app inside an existing repository
|
|
42
53
|
seq-studio init pokedex --with orm,function,artifact
|
|
43
54
|
seq-studio init pokedex --with orm,function,artifact --function-name get-pokemon
|
|
44
55
|
seq-studio init loan-tools --with function --function-name get-loan
|
|
45
|
-
|
|
56
|
+
seq-studio init review-app --with orm,function,agent,process,pipeline,artifact
|
|
46
57
|
seq-studio init review-app --template full-stack@1.0.0 -e banksouth-mortgage
|
|
47
58
|
`;
|
|
48
59
|
export const APP_ADD_USAGE = `usage:
|
|
@@ -106,6 +117,9 @@ export const APP_DEPLOY_USAGE = `usage:
|
|
|
106
117
|
Commit generated migrations before the first deployment and schema changes.
|
|
107
118
|
Pipeline preflight reads the remote source and pins its commit; dry-run
|
|
108
119
|
therefore needs network/auth for pipelines. Version 1 dry-run only lists.
|
|
120
|
+
A dry-run never opens a browser login: without a session it skips the
|
|
121
|
+
workspace-binding check and says so. It warns, rather than fails, when the
|
|
122
|
+
artifact source is not committed and clean on main.
|
|
109
123
|
Version 2 writes the result to .sequence/deployments/<environment>.json.
|
|
110
124
|
`;
|
|
111
125
|
function pipelineTypeFlag(flags) {
|
|
@@ -150,7 +164,7 @@ export async function runAppInitCommand(args) {
|
|
|
150
164
|
return 1;
|
|
151
165
|
}
|
|
152
166
|
const artifactTemplate = args.flags.template === 'react-vite' || args.flags.template === 'nextjs';
|
|
153
|
-
if (args.flags.template !== undefined && !
|
|
167
|
+
if (args.flags.template !== undefined && !artifactTemplate) {
|
|
154
168
|
try {
|
|
155
169
|
if (args.flags.template === true)
|
|
156
170
|
throw new Error('--template requires <name>@<version>.');
|
|
@@ -168,9 +182,10 @@ export async function runAppInitCommand(args) {
|
|
|
168
182
|
return 1;
|
|
169
183
|
}
|
|
170
184
|
}
|
|
171
|
-
if (kinds.length === 0)
|
|
172
|
-
|
|
173
|
-
|
|
185
|
+
if (kinds.length === 0)
|
|
186
|
+
kinds = [...DEFAULT_APP_KINDS];
|
|
187
|
+
if (args.flags['skip-install'] !== undefined && args.flags['skip-install'] !== true) {
|
|
188
|
+
console.error(`${LOG} --skip-install is a boolean flag`);
|
|
174
189
|
return 1;
|
|
175
190
|
}
|
|
176
191
|
const appRoot = resolve(target);
|
|
@@ -192,8 +207,11 @@ export async function runAppInitCommand(args) {
|
|
|
192
207
|
console.error(`${LOG} --description requires a value`);
|
|
193
208
|
return 1;
|
|
194
209
|
}
|
|
210
|
+
let manifest;
|
|
195
211
|
try {
|
|
196
|
-
|
|
212
|
+
// Validate the repository index before writing anything, so a refusal leaves no scaffold behind.
|
|
213
|
+
const declaration = await planRepositoryDeclaration({ appRoot });
|
|
214
|
+
manifest = await initAppMonorepo({
|
|
197
215
|
rootDir: appRoot,
|
|
198
216
|
appId,
|
|
199
217
|
kinds,
|
|
@@ -202,13 +220,33 @@ export async function runAppInitCommand(args) {
|
|
|
202
220
|
pipelineType: pipelineTypeFlag(args.flags),
|
|
203
221
|
artifactTemplate: artifactTemplateFlag({ flags: args.flags, kinds }),
|
|
204
222
|
});
|
|
205
|
-
|
|
206
|
-
|
|
223
|
+
if (declaration) {
|
|
224
|
+
await writeRepositoryDeclaration({ declaration });
|
|
225
|
+
console.log(`${LOG} ${declaration.created ? 'created' : 'updated'} ${REPOSITORY_INDEX_PATH} to declare ${declaration.appPath}`);
|
|
226
|
+
}
|
|
207
227
|
}
|
|
208
228
|
catch (error) {
|
|
209
229
|
printError(error);
|
|
210
230
|
return 1;
|
|
211
231
|
}
|
|
232
|
+
const prepared = args.flags['skip-install'] === true ? false : await prepareApp({ appRoot, manifest });
|
|
233
|
+
printInitNextSteps({ appRoot, manifest, prepared });
|
|
234
|
+
return prepared === 'failed' ? 1 : 0;
|
|
235
|
+
}
|
|
236
|
+
async function prepareApp({ appRoot, manifest }) {
|
|
237
|
+
try {
|
|
238
|
+
await prepareScaffoldedApp({ appRoot, manifest });
|
|
239
|
+
return true;
|
|
240
|
+
}
|
|
241
|
+
catch (error) {
|
|
242
|
+
printError(error);
|
|
243
|
+
if (error instanceof AppPreparationError) {
|
|
244
|
+
console.error(`${LOG} the scaffold is in place; finish preparing it with:`);
|
|
245
|
+
for (const step of error.remaining)
|
|
246
|
+
console.error(` ${step}`);
|
|
247
|
+
}
|
|
248
|
+
return 'failed';
|
|
249
|
+
}
|
|
212
250
|
}
|
|
213
251
|
export async function runAppAddCommand({ kindArg, args, }) {
|
|
214
252
|
if (!kindArg || kindArg === 'help' || kindArg === '--help' || kindArg === '-h') {
|
package/dist/app/deploy.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export type DeployPrimitiveArgs = {
|
|
|
18
18
|
rootDir: string;
|
|
19
19
|
approvedBy?: string;
|
|
20
20
|
waitTimeout?: string;
|
|
21
|
+
/** A dry-run validates without deploying, so official-deploy rules only warn. */
|
|
22
|
+
dryRun?: boolean;
|
|
21
23
|
};
|
|
22
24
|
export type PrimitiveDeployers = {
|
|
23
25
|
[K in PrimitiveKind]: (args: DeployPrimitiveArgs) => Promise<number>;
|
package/dist/app/deploy.js
CHANGED
|
@@ -18,7 +18,8 @@ import { dependencyClosure, dependencyOrder } from './graph.js';
|
|
|
18
18
|
import { createDefaultDeployers, validateAppPrimitive } from './adapters.js';
|
|
19
19
|
import { prepareAppWorkspace } from './workspace.js';
|
|
20
20
|
import { localGitMetadata } from '@sequenceholdings/artifact-studio/source-resolver';
|
|
21
|
-
import {
|
|
21
|
+
import { checkOfficialArtifactSource } from './official-source.js';
|
|
22
|
+
import { NotLoggedInError, withoutAutoLogin } from '../auth.js';
|
|
22
23
|
export { createDefaultDeployers } from './adapters.js';
|
|
23
24
|
import { defaultDeployOrder, loadAppManifest, usesAppGraph, } from './manifest.js';
|
|
24
25
|
import { warnOnManifestRoles } from '../manifest-roles-notice.js';
|
|
@@ -89,16 +90,18 @@ function assertAppDeploymentSource({ manifest, options, rootDir, entries }) {
|
|
|
89
90
|
// Shared sources live outside the UI directory. Check the entire original
|
|
90
91
|
// app before packaging so ignored staging cannot conceal a dirty package.
|
|
91
92
|
if (usesAppGraph(manifest) && options.env !== 'local' && entries.some((entry) => entry.kind === 'artifact')) {
|
|
92
|
-
|
|
93
|
-
...localGitMetadata(rootDir),
|
|
94
|
-
environment: options.env,
|
|
95
|
-
});
|
|
93
|
+
checkOfficialArtifactSource({ dir: rootDir, env: options.env, dryRun: options.dryRun });
|
|
96
94
|
}
|
|
97
95
|
if (usesAppGraph(manifest) && manifest.packages?.length && options.env !== 'local' && !options.dryRun && !existsSync(join(rootDir, 'pnpm-lock.yaml'))) {
|
|
98
96
|
throw new Error('App workspace deployment requires a root pnpm-lock.yaml. Run pnpm install at the app root and commit the lockfile before deploying.');
|
|
99
97
|
}
|
|
100
98
|
}
|
|
101
99
|
export async function deployApp(options) {
|
|
100
|
+
// A dry-run never signs anyone in: it uses an existing session or skips
|
|
101
|
+
// the checks that need one.
|
|
102
|
+
return options.dryRun ? withoutAutoLogin(() => runDeployApp(options)) : runDeployApp(options);
|
|
103
|
+
}
|
|
104
|
+
async function runDeployApp(options) {
|
|
102
105
|
const rootDir = resolve(options.rootDir);
|
|
103
106
|
const manifest = await loadAppManifest(rootDir);
|
|
104
107
|
await warnOnManifestRoles({ dir: rootDir, file: 'sequence.app.yml', kind: 'application' });
|
|
@@ -119,14 +122,22 @@ export async function deployApp(options) {
|
|
|
119
122
|
console.log(`${LOG} - ${entry.kind.padEnd(9)} ${entry.id} (${entry.path})`);
|
|
120
123
|
}
|
|
121
124
|
assertAppDeploymentSource({ manifest, options, rootDir, entries });
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
125
|
+
try {
|
|
126
|
+
await assertAppEnvironmentBindings({
|
|
127
|
+
manifest,
|
|
128
|
+
entries,
|
|
129
|
+
paths: resolvedPaths,
|
|
130
|
+
rootDir,
|
|
131
|
+
deployEnvironment: options.env,
|
|
132
|
+
...(options.environmentBindings ? { loadContext: options.environmentBindings } : {}),
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
if (!options.dryRun || !(error instanceof NotLoggedInError))
|
|
137
|
+
throw error;
|
|
138
|
+
console.warn(`${LOG} dry-run: skipped checking workspace bindings against ${options.env} (not signed in). ` +
|
|
139
|
+
`Run \`seq-studio login -e ${options.env}\` to include them.`);
|
|
140
|
+
}
|
|
130
141
|
const provenance = localGitMetadata(rootDir);
|
|
131
142
|
const prepared = usesAppGraph(manifest)
|
|
132
143
|
? await prepareAppWorkspace({ rootDir, manifest, entries, paths: resolvedPaths })
|
|
@@ -136,6 +147,7 @@ export async function deployApp(options) {
|
|
|
136
147
|
const argsFor = (entry) => ({
|
|
137
148
|
entry: pinnedEntries.get(entry.id), path: prepared.paths.get(entry.id), rootDir, env: options.env,
|
|
138
149
|
yes: options.yes === true, approvedBy: options.approvedBy, waitTimeout: options.waitTimeout,
|
|
150
|
+
...(options.dryRun ? { dryRun: true } : {}),
|
|
139
151
|
});
|
|
140
152
|
if (usesAppGraph(manifest)) {
|
|
141
153
|
const validate = options.validatePrimitive ?? validateAppPrimitive;
|
package/dist/app/kinds.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { type PrimitiveKind } from './manifest.js';
|
|
2
|
+
/**
|
|
3
|
+
* What `seq-studio init` scaffolds when no kinds are requested: exactly the
|
|
4
|
+
* kinds repository CI/CD creates and deploys on merge, so a fresh app ships
|
|
5
|
+
* with no further setup. Other kinds stay available through --with.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_APP_KINDS: readonly PrimitiveKind[];
|
|
2
8
|
/**
|
|
3
9
|
* Resolve which primitive kinds to scaffold from CLI flags.
|
|
4
10
|
*
|
package/dist/app/kinds.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { isPrimitiveKind, PRIMITIVE_KINDS } from './manifest.js';
|
|
2
|
+
/**
|
|
3
|
+
* What `seq-studio init` scaffolds when no kinds are requested: exactly the
|
|
4
|
+
* kinds repository CI/CD creates and deploys on merge, so a fresh app ships
|
|
5
|
+
* with no further setup. Other kinds stay available through --with.
|
|
6
|
+
*/
|
|
7
|
+
export const DEFAULT_APP_KINDS = ['orm', 'function', 'process', 'artifact'];
|
|
2
8
|
/**
|
|
3
9
|
* Resolve which primitive kinds to scaffold from CLI flags.
|
|
4
10
|
*
|