Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/cli/src/commands/environments/bind.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,11 +10,11 @@ import { formatOutput } from '../../utils/output-formatter.js';

/**
* `os environments bind` — bind a locally-compiled artifact to an existing
* multi-environment server project.
* multi-environment server environment.
*
* Equivalent to `PATCH /api/v1/cloud/environments/<id>` with
* `metadata.artifact_path = <absolute-path>`. The server's
* AppBundleResolver picks up the path on the next per-project kernel
* AppBundleResolver picks up the path on the next per-environment kernel
* boot, registering the bundle's objects, views, and seed data.
*
* Use `--build` to compile `objectstack.config.ts` first so the artifact
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/commands/environments/create.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,10 +7,10 @@ import { formatOutput } from '../../utils/output-formatter.js';
import { readAuthConfig, writeAuthConfig } from '../../utils/auth-config.js';

/**
* `os environments create` — provision a new project.
* `os environments create` — provision a new environment.
*
* Delegates to `ProjectProvisioningService.provisionProject` on the server.
* On success, optionally activates the new project for the current session
* On success, optionally activates the new environment for the current session
* and persists `activeEnvironmentId` into `~/.objectstack/credentials.json`
* (unless `--no-activate` is passed).
*/
Expand DownExpand Up@@ -64,7 +64,7 @@ export default class EnvironmentsCreate extends Command {

// Resolve the artifact to an absolute path so the server can read it
// regardless of its CWD. Bail early if the file is missing — better
// to fail before provisioning than leave a half-bound project.
// to fail before provisioning than leave a half-bound environment.
let metadata: Record<string, unknown> | undefined;
if (flags.artifact) {
const path = await import('node:path');
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/environments/list.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ import { createApiClient, requireAuth } from '../../utils/api-client.js';
import { formatOutput } from '../../utils/output-formatter.js';

/**
* `os environments list` — list projects visible to the current session.
* `os environments list` — list environments visible to the current session.
*
* Filters by organization via `--org`. Output format is the same
* table/json/yaml shape used by other metadata commands, for a
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/environments/show.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,9 +6,9 @@ import { createApiClient, requireAuth } from '../../utils/api-client.js';
import { formatOutput } from '../../utils/output-formatter.js';

/**
* `os environments show <id>` — show detailed information for a single project.
* `os environments show <id>` — show detailed information for a single environment.
*
* Renders the project row plus its database, active credential, and
* Renders the environment row plus its database, active credential, and
* membership row (same shape as `client.projects.get(id)`).
*/
export default class EnvironmentsShow extends Command {
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/environments/switch.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,13 +6,13 @@ import { createApiClient, requireAuth } from '../../utils/api-client.js';
import { readAuthConfig, writeAuthConfig } from '../../utils/auth-config.js';

/**
* `os environments switch <id>` — set the active project for this CLI session.
* `os environments switch <id>` — set the active environment for this CLI session.
*
* Calls `POST /api/v1/cloud/environments/:id/activate` to update the
* server-side session, then persists `activeEnvironmentId` into
* `~/.objectstack/credentials.json` so subsequent CLI commands (and any
* client they create via `createApiClient`) automatically target this
* project.
* environment.
*/
export default class EnvironmentsSwitch extends Command {
static override description = 'Activate an environment for subsequent CLI calls';
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/utils/api-client.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@ export interface ApiClientOptions {
*/
token?: string;
/**
* Explicit project id. Overrides the stored `activeEnvironmentId` from
* Explicit environment id. Overrides the stored `activeEnvironmentId` from
* `~/.objectstack/credentials.json` (written by `os environments switch`).
*/
environmentId?: string;
Expand DownExpand Up@@ -52,7 +52,7 @@ export async function createApiClient(options: ApiClientOptions = {}): Promise<A
// Resolve authentication token
let token = options.token || process.env.OS_TOKEN;

// Resolve active project id (explicit > env > stored credentials)
// Resolve active environment id (explicit > env > stored credentials)
let environmentId = options.environmentId || process.env.OS_ENVIRONMENT_ID;

// If URL or token is missing, try to load from stored credentials
Expand Down
Loading