Skip to content

Commit ea4edc0

Browse files
committed
fix(cli,create-objectstack): singular notice text; the docs name os login before os package export (WIP)
Claude-Session: https://claude.ai/code/session_01Utp6CbrroXG7sXSzmQs4uj Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4e4d98a commit ea4edc0

4 files changed

Lines changed: 12 additions & 5 deletions

File tree

‎packages/cli/src/utils/local-customizations.sqlite.test.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import fs from 'node:fs';
1010
import os from 'node:os';
1111
import path from 'node:path';
1212
import Database from 'better-sqlite3';
13+
// Loaded here, at module top, so no clocked test pays the runtime graph's first
14+
// load inside its window: `readLocalCustomizations` imports it lazily.
15+
import '@objectstack/runtime';
1316
import { readCustomizationsFromSqlite, readLocalCustomizations } from './local-customizations.js';
1417

1518
const dirs: string[] = [];
@@ -44,8 +47,8 @@ describe('reading the stored `.custom` items of the dev database', () => {
4447
['view', 'packageless', null],
4548
// A package whose id merely contains the suffix is not a pair.
4649
['view', 'decoy', 'com.custom.tools'],
47-
// LIKE's `_` must not stand in for the suffix's dot.
48-
['view', 'decoy2', 'com.example_custom'],
50+
// The suffix ends the id; `.customs` is another package.
51+
['view', 'decoy2', 'com.example.customs'],
4952
]);
5053

5154
const reading = await readLocalCustomizations({ projectRoot: root, env: {} });

‎packages/cli/src/utils/local-customizations.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ export function localCustomizationNotice(reading: LocalCustomizationReading): st
176176
const list = reading.packages.map((p) => `${p.id} (${p.items})`).join(', ');
177177
return [
178178
`This build does not carry ${total} Studio customization${total === 1 ? '' : 's'} stored in your dev database: ${list}.`,
179-
`They live in ${reading.filename}, not in src/, so a deployment of this artifact (or the Dockerfile) does not have them.`,
179+
total === 1
180+
? `It lives in ${reading.filename}, not in src/, so a deployment of this artifact (or the Dockerfile) does not have it.`
181+
: `They live in ${reading.filename}, not in src/, so a deployment of this artifact (or the Dockerfile) does not have them.`,
180182
'Make the change in src/ to ship it with the app, or take it out as a package while `os dev` runs: `os package export`.',
181183
];
182184
}

‎packages/create-objectstack/src/templates/AGENTS.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ deployment.
9595
deployed. When a person tried something in Studio and wants it in the app,
9696
make the same change in `src/`.
9797
- **A customization that should stay one moves as a package.** With the dev
98-
server running, `npx os package export` writes every package the database
98+
server running, `npx os login --url http://localhost:3000` once, then
99+
`npx os package export --url http://localhost:3000`, writes every package the database
99100
holds that `src/` does not register, the `.custom` package among them, to
100101
`objectstack-export/NN-ID/objectstack.json`. Commit that directory. After
101102
the deployment is up, install each file into it, in the numbered order:

‎packages/create-objectstack/src/templates/blank/README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ database (locally, `.objectstack/data/`) as an item of the package
165165
validated, reviewed and deployed. Ask your coding agent to do it in code, not
166166
in Studio.
167167
- To keep it as a customization, take it out as a package while `pnpm dev`
168-
runs: `npx os package export` writes every package the database holds that
168+
runs: `npx os login --url http://localhost:3000` once, then
169+
`npx os package export --url http://localhost:3000`, writes every package the database holds that
169170
`src/` does not register, the `.custom` package among them, to
170171
`objectstack-export/NN-ID/objectstack.json`. Commit that directory, and once
171172
the deployment is up install each file into it in the numbered order with

0 commit comments

Comments
 (0)