@hexagen-monaco/sync 0.4.0 → 0.4.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 CHANGED
@@ -1,4 +1,4 @@
1
- # @hexagen/sync
1
+ # @hexagen-monaco/sync
2
2
 
3
3
  > The HexaGen Monaco sync engine — a CLI that generates and maintains modular, Hexagonal-architecture monorepos from a single `manifest.yaml`.
4
4
 
@@ -7,14 +7,14 @@
7
7
  ## Installation
8
8
 
9
9
  ```bash
10
- npm install @hexagen/sync
10
+ npm install @hexagen-monaco/sync
11
11
  # or
12
- yarn add @hexagen/sync
12
+ yarn add @hexagen-monaco/sync
13
13
  # or
14
- pnpm add @hexagen/sync
14
+ pnpm add @hexagen-monaco/sync
15
15
  ```
16
16
 
17
- `@hexagen/sync` ships as a self-contained ESM package with only two runtime
17
+ `@hexagen-monaco/sync` ships as a self-contained ESM package with only two runtime
18
18
  dependencies (`commander`, `js-yaml`). All internal HexaGen packages
19
19
  (`@hexagen/governance`, `@hexagen/project-configuration`,
20
20
  `@hexagen/shared`, `@hexagen/visualization`) are bundled into the published
@@ -60,7 +60,7 @@ The default export exposes the sync-engine surface used by the CLI. Types
60
60
  ship alongside the bundle.
61
61
 
62
62
  ```ts
63
- import { runSync } from "@hexagen/sync";
63
+ import { runSync } from "@hexagen-monaco/sync";
64
64
 
65
65
  await runSync({ mode: "external", workspaceRoot: process.cwd() });
66
66
  ```
@@ -100,7 +100,7 @@ How the engine locates the workspace root depends on `mode`:
100
100
 
101
101
  ## What's Bundled
102
102
 
103
- When `@hexagen/sync` is published, the tarball contains the sync engine
103
+ When `@hexagen-monaco/sync` is published, the tarball contains the sync engine
104
104
  plus four inlined workspace packages:
105
105
 
106
106
  | Bundled package | Purpose |
@@ -121,7 +121,7 @@ is codified in [`.architecture/decisions/ADR-0009-published-cli-bundling.md`](..
121
121
  | `js-yaml` | `^4.1.0` | Manifest parsing; widely-consumed peer |
122
122
 
123
123
  Both are pulled in transitively through standard `npm install` resolution
124
- when `@hexagen/sync` is installed.
124
+ when `@hexagen-monaco/sync` is installed.
125
125
 
126
126
  ---
127
127
 
@@ -178,4 +178,4 @@ The source `packages/sync/package.json` is never mutated by this process.
178
178
 
179
179
  ## License
180
180
 
181
- MIT
181
+ Source-Available Evaluation License — proprietary to Krakowski Cloud Solutions, LLC. Free to read, run locally, and evaluate for internal/non-commercial use; **not** licensed for commercial production deployment. See [LICENSE](./LICENSE).
package/dist/cli.js CHANGED
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
- import { Command } from 'commander';
3
- import * as path28 from 'path';
4
- import path28__default, { dirname, join } from 'path';
5
2
  import * as fs19 from 'fs';
6
3
  import fs19__default, { mkdirSync, writeFileSync, renameSync, unlinkSync, existsSync, readFileSync, realpathSync, lstatSync, createWriteStream } from 'fs';
4
+ import { fileURLToPath } from 'url';
5
+ import * as path28 from 'path';
6
+ import path28__default, { dirname, join } from 'path';
7
+ import { Command } from 'commander';
7
8
  import fs22, { readFile } from 'fs/promises';
8
9
  import { promisify } from 'util';
9
10
  import { exec, execSync, spawn } from 'child_process';
10
11
  import yaml9 from 'js-yaml';
11
12
  import crypto from 'crypto';
12
13
  import { Project, SyntaxKind, MethodSignature } from 'ts-morph';
13
- import { fileURLToPath } from 'url';
14
14
  import * as readline from 'readline';
15
15
  import { tmpdir } from 'os';
16
16
 
@@ -12081,9 +12081,21 @@ function createLogger() {
12081
12081
  };
12082
12082
  }
12083
12083
  var logger = createLogger();
12084
+ function readVersion() {
12085
+ try {
12086
+ const pkgPath = join(
12087
+ dirname(fileURLToPath(import.meta.url)),
12088
+ "..",
12089
+ "package.json"
12090
+ );
12091
+ return JSON.parse(readFileSync(pkgPath, "utf8")).version ?? "0.0.0";
12092
+ } catch {
12093
+ return "0.0.0";
12094
+ }
12095
+ }
12084
12096
  function buildProgram() {
12085
12097
  const program2 = new Command();
12086
- program2.name("hexagen").description("HexaGen Monaco — Generate and sync modular monorepos").version("0.1.0");
12098
+ program2.name("hexagen").description("HexaGen Monaco — Generate and sync modular monorepos").version(readVersion());
12087
12099
  program2.command("sync").description("Run the HexaGen sync engine to generate artifacts").option("--dry-run", "Preview changes without writing files").option("--force", "Overwrite non-generated files in packages").option(
12088
12100
  "--force-root",
12089
12101
  "Overwrite protected root files (turbo.json, .gitignore)"