heximon 0.1.1 → 0.3.0
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 +4 -2
- package/dist/bin.mjs +3 -2
- package/dist/index.d.mts +14 -14
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ const main = defineCommand({
|
|
|
69
69
|
| Command | What it does |
|
|
70
70
|
| :-- | :-- |
|
|
71
71
|
| `heximon create` | Scaffolds a new app from a starter template. Also reachable as `pnpm create heximon`. |
|
|
72
|
-
| `heximon check` | Compiles the app, reports every diagnostic, and refreshes the editor's type hints. `--emit` also writes the generated wiring to `.heximon/`; `--verify-baseline` names every durable record the committed `heximon.upgrade.json` has not acknowledged. |
|
|
72
|
+
| `heximon check` | Compiles the app, reports every diagnostic, and refreshes the editor's type hints. `--emit` also writes the generated app wiring to `.heximon/`; `--verify-baseline` names every durable record the committed `heximon.upgrade.json` has not acknowledged. |
|
|
73
73
|
| `heximon routes` | Prints one table for every path the app answers — routes, SSE streams, and WebSocket upgrades — read from the compiler, with no boot required. |
|
|
74
74
|
| `heximon graph` | Prints the resolved module dependency graph: modules, providers, and dependencies. |
|
|
75
75
|
| `heximon doctor` | Reports a package installed twice, an untraced deploy target, and a stale published module. |
|
|
@@ -127,7 +127,9 @@ the fix instructions plus a non-zero exit code.
|
|
|
127
127
|
provider on its own. `heximon check` reports that error with the line that is wrong.
|
|
128
128
|
- **`heximon check` writes no wiring unless you ask.** Pass `--emit`, or set `debug: true` in
|
|
129
129
|
`heximon.config.ts`, and the generated files land in `.heximon/` — prettified in place, and the command
|
|
130
|
-
prints where.
|
|
130
|
+
prints where. This applies to an app. In a published module package, `--emit` and `debug: true` write
|
|
131
|
+
nothing, and the pretty output prints a notice (`--format json` omits the notice and `emittedTo`). `vp pack` regenerates the `create<Module>` factory in
|
|
132
|
+
`.heximon/library/`.
|
|
131
133
|
- **`heximon skills add` records only what it installed.** A source it could not fetch stays out of
|
|
132
134
|
`heximon.skills`, so `heximon skills sync` never retries a URL that never worked.
|
|
133
135
|
- **Adding a durable record is silent until you look for it.** A new queue channel, saga slot, workflow, or
|
package/dist/bin.mjs
CHANGED
|
@@ -431,7 +431,7 @@ var UpgradeBaseline = class UpgradeBaseline {
|
|
|
431
431
|
*
|
|
432
432
|
* Two opt-in passes ride the same compile. `--emit` (and the sidecar's own `debug: true`) writes the generated
|
|
433
433
|
* wiring to `.heximon/` and reformats it in place, so what the compiler produced can be read; a bare run writes
|
|
434
|
-
* only the verdict mirror. `--verify-baseline` makes every durable concept ALSO report the records the
|
|
434
|
+
* only the verdict mirror. Both apply to the app leg only: a library run writes no wiring and says so. `--verify-baseline` makes every durable concept ALSO report the records the
|
|
435
435
|
* committed `heximon.upgrade.json` never acknowledged — the direction the diff does not walk, since adding a
|
|
436
436
|
* record is safe to deploy. It writes nothing, and is refused alongside `--update`, which acknowledges exactly
|
|
437
437
|
* what it exists to show.
|
|
@@ -487,7 +487,7 @@ const checkCommand = defineCommand({
|
|
|
487
487
|
},
|
|
488
488
|
emit: {
|
|
489
489
|
type: "boolean",
|
|
490
|
-
description: "Write the generated wiring to `.heximon/` and prettify it, for inspection. The sidecar's `debug: true` turns this on for every run.",
|
|
490
|
+
description: "Write the generated app wiring to `.heximon/` and prettify it, for inspection. A library compile writes nothing: run `vp pack` to regenerate its factory. The sidecar's `debug: true` turns this on for every app-mode run.",
|
|
491
491
|
default: false
|
|
492
492
|
}
|
|
493
493
|
},
|
|
@@ -563,6 +563,7 @@ const checkCommand = defineCommand({
|
|
|
563
563
|
} else {
|
|
564
564
|
if (checked.emittedTo !== void 0) log.info(`Wrote the generated wiring to ${checked.emittedTo}`);
|
|
565
565
|
if (checked.prunedVerdicts !== void 0) log.info(`Removed the stale DI verdict mirror ${checked.prunedVerdicts} — it was written by an app-mode compile of this package, and a library compile emits none to replace it.`);
|
|
566
|
+
if (mode === CompileMode.Library && (args.emit === true || session.config?.debug === true)) log.warn(`${args.emit === true ? "`--emit`" : "`debug: true`"} writes app wiring only. A library's generated factory is written by \`vp pack\`.`);
|
|
566
567
|
if (mode === CompileMode.Library && verifyBaseline) log.warn(`${UpgradeBaselineFile.fileName} is an app-level artifact — a library's durable surface is verified by each app that composes it, so there is nothing here to verify.`);
|
|
567
568
|
if (mode === CompileMode.Library && args.update === true) log.warn(`${UpgradeBaselineFile.fileName} is an app-level artifact — a library's durable surface is baselined by each app that composes it, so there is nothing here to update.`);
|
|
568
569
|
else if (rebaselined !== void 0) log.success(rebaselined.changed ? `Updated ${UpgradeBaselineFile.fileName} — commit it to acknowledge the durable-surface changes.` : `${UpgradeBaselineFile.fileName} already up to date.`);
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CommandDef } from "citty";
|
|
2
2
|
//#region src/prompter.d.ts
|
|
3
3
|
/** Thrown when the operator cancels an interactive prompt (Ctrl-C). */
|
|
4
|
-
declare class PromptCancelledError extends Error {
|
|
4
|
+
export declare class PromptCancelledError extends Error {
|
|
5
5
|
constructor();
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
@@ -23,7 +23,7 @@ interface Prompter {
|
|
|
23
23
|
* prompt (clack's sentinel symbol) is normalized to a thrown {@link PromptCancelledError} so the credential
|
|
24
24
|
* resolver handles one cancel failure mode.
|
|
25
25
|
*/
|
|
26
|
-
declare class ClackPrompter implements Prompter {
|
|
26
|
+
export declare class ClackPrompter implements Prompter {
|
|
27
27
|
/** @throws PromptCancelledError when cancelled. */
|
|
28
28
|
secret(message: string): Promise<string>;
|
|
29
29
|
/** @throws PromptCancelledError when cancelled. */
|
|
@@ -32,7 +32,7 @@ declare class ClackPrompter implements Prompter {
|
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/cli-environment.d.ts
|
|
34
34
|
/** Detects how the CLI is being run, so the deploy credential ladder knows whether interactive prompting is safe. */
|
|
35
|
-
declare class CliEnvironment {
|
|
35
|
+
export declare class CliEnvironment {
|
|
36
36
|
/**
|
|
37
37
|
* Whether this is an interactive session a prompt may block on: a real TTY on stdin AND not a CI runner. In CI
|
|
38
38
|
* (or a piped/non-TTY invocation) the deploy credential ladder must fail fast on a missing value rather than
|
|
@@ -46,7 +46,7 @@ declare class CliEnvironment {
|
|
|
46
46
|
* A template fetch that failed — the giget ref could not be downloaded. Distinct from every local failure so a
|
|
47
47
|
* caller may retry another ref without also retrying (or cleaning up after) a validation or manifest error.
|
|
48
48
|
*/
|
|
49
|
-
declare class TemplateDownloadError extends Error {
|
|
49
|
+
export declare class TemplateDownloadError extends Error {
|
|
50
50
|
/** The giget source string that could not be fetched. */
|
|
51
51
|
readonly gigetSource: string;
|
|
52
52
|
constructor(gigetSource: string, cause: unknown);
|
|
@@ -102,7 +102,7 @@ interface ScaffoldResult {
|
|
|
102
102
|
* the `@heximon/*` dependency ranges onto the fetched `package.json`. Pure filesystem work — prompting,
|
|
103
103
|
* git, and dependency installation live with the CLI command.
|
|
104
104
|
*/
|
|
105
|
-
declare class ProjectScaffolder {
|
|
105
|
+
export declare class ProjectScaffolder {
|
|
106
106
|
/** A project/directory name: lowercase npm-safe segments (no scopes — the directory is the name). */
|
|
107
107
|
private static readonly projectNamePattern;
|
|
108
108
|
/**
|
|
@@ -177,12 +177,12 @@ interface StartersScaffoldRequest {
|
|
|
177
177
|
readonly templateName: string;
|
|
178
178
|
}
|
|
179
179
|
/** The `heximon create` verb: scaffold a new Heximon app from the starters templates. */
|
|
180
|
-
declare const createCommand: CommandDef;
|
|
180
|
+
export declare const createCommand: CommandDef;
|
|
181
181
|
/**
|
|
182
182
|
* The `create` command's defaults + environment glue: package-manager detection, the CLI's own lockstep
|
|
183
183
|
* version, the starters giget refs (version branch → main fallback), git init, and the install spawn.
|
|
184
184
|
*/
|
|
185
|
-
declare class CreateDefaults {
|
|
185
|
+
export declare class CreateDefaults {
|
|
186
186
|
/** The default project (directory + package) name when none is given. */
|
|
187
187
|
static readonly projectName: string;
|
|
188
188
|
/** The GitHub repository the published templates are fetched from. */
|
|
@@ -249,7 +249,7 @@ interface ProcessRunResult {
|
|
|
249
249
|
/** Spawns a command and resolves its captured result. Injected so a test never spawns a real process. */
|
|
250
250
|
type ProcessRunner = (command: string, commandArguments: readonly string[]) => Promise<ProcessRunResult>;
|
|
251
251
|
/** The verdict {@link RegistryAccess.probe} classifies an `npm view` attempt into. */
|
|
252
|
-
declare const RegistryAccessStatus: {
|
|
252
|
+
export declare const RegistryAccessStatus: {
|
|
253
253
|
/** The probe package resolved — the registry is reachable and authorized. */
|
|
254
254
|
readonly Ok: "ok";
|
|
255
255
|
/** The registry rejected the request for lacking (or holding invalid) credentials. */
|
|
@@ -260,7 +260,7 @@ declare const RegistryAccessStatus: {
|
|
|
260
260
|
readonly NotFound: "not-found";
|
|
261
261
|
};
|
|
262
262
|
/** One of {@link RegistryAccessStatus}. */
|
|
263
|
-
type RegistryAccessStatus = (typeof RegistryAccessStatus)[keyof typeof RegistryAccessStatus];
|
|
263
|
+
export type RegistryAccessStatus = (typeof RegistryAccessStatus)[keyof typeof RegistryAccessStatus];
|
|
264
264
|
/** What {@link RegistryAccess.probe} reports. */
|
|
265
265
|
interface RegistryAccessReport {
|
|
266
266
|
/** The classified verdict. */
|
|
@@ -274,7 +274,7 @@ interface RegistryAccessReport {
|
|
|
274
274
|
* `.npmrc` scope line plus a token in the user's `~/.npmrc`; this probe reuses npm's own config
|
|
275
275
|
* resolution — the same files npm itself reads — so the verdict matches what an install would do.
|
|
276
276
|
*/
|
|
277
|
-
declare class RegistryAccess {
|
|
277
|
+
export declare class RegistryAccess {
|
|
278
278
|
/** The private registry `@heximon/*` packages publish to. */
|
|
279
279
|
static readonly gitHubPackagesRegistry: string;
|
|
280
280
|
/** The package probed to decide reachability — small, always published, always current. */
|
|
@@ -316,7 +316,7 @@ interface InstalledSkill {
|
|
|
316
316
|
* directory there natively). Best-effort by contract: the caller treats a throw as a skippable step with
|
|
317
317
|
* a printed hint, never a scaffold failure.
|
|
318
318
|
*/
|
|
319
|
-
declare class SkillInstaller {
|
|
319
|
+
export declare class SkillInstaller {
|
|
320
320
|
private readonly sourceUrl;
|
|
321
321
|
/** The published docs site serving the skill. */
|
|
322
322
|
static readonly defaultSourceUrl = "https://heximon.dev";
|
|
@@ -357,7 +357,7 @@ declare class SkillInstaller {
|
|
|
357
357
|
* before an app exists to compile, and a tool reads the list without evaluating any TypeScript. Every entry
|
|
358
358
|
* is a base URL {@link SkillInstaller} can install from — the same value `npx skills add <url>` takes.
|
|
359
359
|
*/
|
|
360
|
-
declare abstract class SkillSources {
|
|
360
|
+
export declare abstract class SkillSources {
|
|
361
361
|
/** The `package.json` member holding the framework's own manifest block. */
|
|
362
362
|
private static readonly manifestKey;
|
|
363
363
|
/** The member of that block holding the source list. */
|
|
@@ -400,6 +400,6 @@ declare abstract class SkillSources {
|
|
|
400
400
|
* `heximon create` already installs the default source and records it, so an existing project's first use of
|
|
401
401
|
* this command is usually `sync` after a clone, or `add` for a second, private skill site.
|
|
402
402
|
*/
|
|
403
|
-
declare const skillsCommand: CommandDef;
|
|
403
|
+
export declare const skillsCommand: CommandDef;
|
|
404
404
|
//#endregion
|
|
405
|
-
export {
|
|
405
|
+
export type { InstalledSkill, PreparedTarget, ProcessRunResult, ProcessRunner, Prompter, RegistryAccessReport, ScaffoldRequest, ScaffoldResult, StartersScaffoldRequest, TemplateSelection, TemplateSource };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "heximon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "The Heximon CLI: create, develop, build, migrate, and deploy Heximon apps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -37,23 +37,23 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@bomb.sh/tab": "^0.0.22",
|
|
40
|
-
"@clack/prompts": "^1.8.
|
|
41
|
-
"@heximon/compiler": "0.
|
|
42
|
-
"@heximon/cqrs": "0.
|
|
43
|
-
"@heximon/deploy": "0.
|
|
44
|
-
"@heximon/http": "0.
|
|
45
|
-
"@heximon/node": "0.
|
|
46
|
-
"@heximon/testing": "0.
|
|
40
|
+
"@clack/prompts": "^1.8.1",
|
|
41
|
+
"@heximon/compiler": "0.3.0",
|
|
42
|
+
"@heximon/cqrs": "0.3.0",
|
|
43
|
+
"@heximon/deploy": "0.3.0",
|
|
44
|
+
"@heximon/http": "0.3.0",
|
|
45
|
+
"@heximon/node": "0.3.0",
|
|
46
|
+
"@heximon/testing": "0.3.0",
|
|
47
47
|
"citty": "^0.2.2",
|
|
48
48
|
"giget": "^3.3.1",
|
|
49
49
|
"pathe": "^2.0.3"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@types/node": "^24.
|
|
52
|
+
"@types/node": "^24.19.0",
|
|
53
53
|
"@typescript/native-preview": "^7.0.0-dev.20260707.2",
|
|
54
|
-
"@vitest/coverage-v8": "
|
|
54
|
+
"@vitest/coverage-v8": "5.0.1",
|
|
55
55
|
"typescript": "^6.0.3",
|
|
56
|
-
"vitest": "
|
|
56
|
+
"vitest": "5.0.1"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">=24"
|