Skip to content

Commit 056df2c

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-21470-save-door-every-type
2 parents 181408e + c98a72d commit 056df2c

23 files changed

Lines changed: 454 additions & 96 deletions
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/metadata-core': patch
3+
---
4+
5+
Provenance comments in `@objectstack/metadata-core` cite the commits that decided them, not tracker numbers that no longer resolve
6+
7+
Clause-②: no
8+
9+
Docblocks and comments across the package cited issue-tracker numbers that now answer 404 on GitHub.
10+
Each now cites the commit in this repository's history that made the decision it describes, with two
11+
exceptions: two comments on `retiredFromLoadPath`'s jurisdiction (in `artifact-forward-conversion.ts`
12+
and its test) cite ADR-0087, which records that determination, and five comments that meant an
13+
objectui issue now spell it `objectui#6111`, as they already spelled `objectui#6110` beside it. One
14+
commit citation sits inside a maintainer ruling quoted in `record-organization.ts`: the number there
15+
became the bracketed editorial substitution `[commit 7901b2dd2]`, the commit that landed the ruling it
16+
names, and the rest of the quotation is unchanged. Some of these docblocks sit on exported members, so
17+
the reworded text appears in the published declaration files (`index.d.ts` / `index.d.cts`,
18+
`testing.d.ts` and a shared declaration chunk); the JavaScript output and its sourcemaps do not change.
19+
20+
Comment only: no export, type, error code, status, message text or runtime behaviour changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
fix(cli): `os package install`, `os package publish` and `os plugin sign` print one error line per refusal (#21496)
6+
7+
Clause-②: no
8+
9+
`os package install ./does-not-exist.json` printed `✗ Cannot read artifact: ENOENT …` and then a second line, `✗ EEXIT: 1`. The exit status, 1, was right. The extra line came from the command's own `catch`: the `this.exit(1)` inside its `try` throws oclif's exit signal, and the `catch` reported the signal as an error.
10+
11+
The same `catch` sat in two more commands:
12+
13+
- **`os package publish`.** Every refusal it makes printed the extra `✗ EEXIT: 1` line. Examples are an unreadable artifact, an invalid manifest id, no cloud login, a failed package registration and a failed version publish. An `--icon-file` whose image type it cannot infer printed three error lines: the refusal, then `✗ Cannot read --icon-file '…': EEXIT: 1`, then `✗ EEXIT: 1`.
14+
- **`os plugin sign`.** A signature that failed its self-verification printed `✗ Self-verification error: EEXIT: 1` under the refusal.
15+
16+
Each refusal is now one error line, and every exit status is unchanged. A script that filtered out the `EEXIT` line can drop that filter.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"@objectstack/verify": patch
3+
---
4+
5+
`os verify` writes each derived sample in the shape the engine stores it: a `select` declared `multiple: true` is written as a list and compared as a set
6+
7+
Clause-②: no
8+
9+
- The CRUD round-trip derivation now asks `@objectstack/spec`'s `isMultiValueField` whether a field is multi-valued, the same predicate the engine stores by. Before, the `select` / `radio` sample was one scalar option code compared `equal` whatever the field declared, so a multi-valued `select` read back as a one-element list and was reported as a fidelity gap the engine does not have. The shipped `examples/app-todo` (`todo_task.tags`) failed `os verify` with exit 1 on exactly that, and now passes.
10+
- A single-valued `select` or `radio` keeps its scalar sample and its `equal` comparison. `multiselect` and `checkboxes` are unchanged.
11+
- A relational field's `multiple` is answered by the same predicate. A `lookup` declared `multiple: true` still receives a list of ids. A `master_detail` or `tree` field carrying `multiple: true` now receives one id, which is how the engine stores those types. The spec already refuses `multiple` on those types at parse, so only an unparsed config could reach this.
12+
- No export, type or accept-set change.

‎packages/cli/src/commands/package/install.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { readFile } from 'node:fs/promises';
2626
import { existsSync } from 'node:fs';
2727
import { resolve as resolvePath } from 'node:path';
2828
import { Args, Command, Flags } from '@oclif/core';
29-
import { printHeader, printKV, printSuccess, printError, printStep } from '../../utils/format.js';
29+
import { printHeader, printKV, printSuccess, printError, printStep, isExitSignal } from '../../utils/format.js';
3030

3131
export default class PackageInstall extends Command {
3232
static override description =
@@ -246,6 +246,7 @@ export default class PackageInstall extends Command {
246246
console.log(` ${storageDir}`);
247247
}
248248
} catch (error) {
249+
if (isExitSignal(error)) throw error;
249250
printError((error as Error).message);
250251
this.exit(1);
251252
}

‎packages/cli/src/commands/package/publish.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { readFile } from 'node:fs/promises';
3232
import { resolve as resolvePath, basename, dirname, isAbsolute } from 'node:path';
3333
import { Args, Command, Flags } from '@oclif/core';
3434
import { PackageSchema } from '@objectstack/spec/marketplace';
35-
import { printHeader, printKV, printSuccess, printError, printStep } from '../../utils/format.js';
35+
import { printHeader, printKV, printSuccess, printError, printStep, isExitSignal } from '../../utils/format.js';
3636
import { DEFAULT_CLOUD_URL, tryReadCloudConfig } from '../../utils/cloud-config.js';
3737
import { resolveCloudActiveEnvironmentId } from '../../utils/active-environment.js';
3838
import { readErrorMessage } from '../../utils/response-envelope.js';
@@ -665,6 +665,7 @@ export default class PackagePublish extends Command {
665665
const iconUrl = iconRes.body?.data?.icon_url ?? iconRes.body?.icon_url;
666666
if (iconUrl) printKV(' Icon URL', String(iconUrl));
667667
} catch (err: any) {
668+
if (isExitSignal(err)) throw err;
668669
printError(`Cannot read --icon-file '${iconPath}': ${err.message}`);
669670
this.exit(1);
670671
return;
@@ -794,6 +795,7 @@ export default class PackagePublish extends Command {
794795
for (const v of violations) console.log(` • ${v}`);
795796
}
796797
} catch (error) {
798+
if (isExitSignal(error)) throw error;
797799
printError((error as Error).message);
798800
this.exit(1);
799801
}

‎packages/cli/src/commands/plugin/sign.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { createPublicKey } from 'node:crypto';
1919
import { resolve as resolvePath } from 'node:path';
2020
import { Args, Command, Flags } from '@oclif/core';
2121
import { parseSignature, signPayload, verifyPayload } from '@objectstack/core';
22-
import { printError, printHeader, printKV, printStep, printSuccess } from '../../utils/format.js';
22+
import { isExitSignal, printError, printHeader, printKV, printStep, printSuccess } from '../../utils/format.js';
2323
import { OSPLUGIN_EXT } from '../../utils/osplugin.js';
2424

2525
export default class PluginSign extends Command {
@@ -99,6 +99,7 @@ export default class PluginSign extends Command {
9999
return;
100100
}
101101
} catch (err) {
102+
if (isExitSignal(err)) throw err;
102103
printError(`Self-verification error: ${(err as Error).message}`);
103104
this.exit(1);
104105
return;

0 commit comments

Comments
 (0)