filegrc 0.6.0 → 0.6.1

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/src/cli.js +6 -1
package/README.md CHANGED
@@ -60,7 +60,7 @@ npx filegrc migrate --to-model 2 --preview --json
60
60
 
61
61
  Follow the [model v2 upgrade guide](https://github.com/Alignbase/filegrc/blob/main/docs/upgrading-to-model-v2.md), then run the model v3 and v4 previews in order.
62
62
 
63
- `filegrc serve --help` prints bind, port, environment, and safety options without starting the server. The editable server defaults to `127.0.0.1:8787`; set `FILEGRC_HOST`, `FILEGRC_PORT`, or the matching flags when needed. In trunk mode, browser saves synchronize, commit, and push from the authoritative branch. Use `--allow-non-authoritative-writes` for local development in a task checkout; the override never commits or pushes.
63
+ `filegrc serve --help` prints bind, port, environment, and safety options without starting the server. The editable server prefers `127.0.0.1:8787` and chooses another available port when that port is occupied. Set `FILEGRC_HOST`, `FILEGRC_PORT`, or the matching flags when needed. In trunk mode, browser saves synchronize, commit, and push from the authoritative branch. Use `--allow-non-authoritative-writes` for local development in a task checkout; the override never commits or pushes.
64
64
 
65
65
  `filegrc setup` provides the headless equivalent of browser onboarding. Run it without arguments for guided terminal setup, or pass all initial service-boundary fields and a management program goal as flags or a JSON payload. Add `--preview` to validate and inspect the planned System and Program writes without saving. Add `--summary --json` for compact agent output. Selecting Type 1 or Type 2 updates the Program goal and selected Systems. Setup does not select Framework records, link Controls, create Evidence Artifacts, or create an Audit record.
66
66
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "filegrc",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Zero-dependency Git-native GRC engine",
5
5
  "license": "MIT",
6
6
  "repository": {
package/src/cli.js CHANGED
@@ -96,6 +96,7 @@ export async function runCli(argv = process.argv.slice(2)) {
96
96
  const result = await serveWorkspace(positionals[0] ?? root, {
97
97
  host: flags.host ?? process.env.FILEGRC_HOST,
98
98
  port: flags.port ?? process.env.FILEGRC_PORT,
99
+ fallbackToAvailablePort: true,
99
100
  allowNonAuthoritativeWrites: flags["allow-non-authoritative-writes"] === true
100
101
  });
101
102
  const stopped = new Promise((resolvePromise) => {
@@ -107,6 +108,9 @@ export async function runCli(argv = process.argv.slice(2)) {
107
108
  process.once("SIGINT", stop);
108
109
  process.once("SIGTERM", stop);
109
110
  });
111
+ if (result.usedFallbackPort) {
112
+ console.log(`Port ${result.requestedPort} is already in use. Using ${result.address.port} instead.`);
113
+ }
110
114
  console.log(`filegrc workspace: ${result.url}`);
111
115
  console.log(`Data: ${result.root}/data`);
112
116
  printGithubStarMessage();
@@ -1048,7 +1052,8 @@ function printCommandHelp(command) {
1048
1052
 
1049
1053
  Options:
1050
1054
  --host <address> Bind address. Defaults to FILEGRC_HOST or 127.0.0.1.
1051
- --port <number> Port. Defaults to FILEGRC_PORT or 8787. Use 0 for an available port.
1055
+ --port <number> Preferred port. Defaults to FILEGRC_PORT or 8787. If occupied,
1056
+ the server uses an available port. Use 0 to choose one directly.
1052
1057
  --root <path> Workspace path when no positional root is given.
1053
1058
  --allow-non-authoritative-writes
1054
1059
  Allow local browser writes from a task checkout. This explicit