@okfit/cli 0.6.8 → 0.6.9
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/commands/context.js +1 -1
- package/commands/graph.js +1 -1
- package/commands/init.js +1 -1
- package/commands/lint.js +1 -1
- package/commands/root.js +1 -1
- package/commands/stale.js +1 -1
- package/commands/sync.js +3 -3
- package/commands/validate.js +1 -1
- package/commands/verify.js +1 -1
- package/index.d.ts +2 -2
- package/internal/versionFormatter.js +1 -1
- package/main.js +1 -1
- package/package.json +17 -16
- package/version.js +1 -1
package/commands/context.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setExitCode } from "../internal/exit.js";
|
|
2
2
|
import { humanContext } from "../render/context.js";
|
|
3
3
|
import { CLI_VERSION } from "../version.js";
|
|
4
|
-
import { Argument, Command, Flag } from "effect/
|
|
4
|
+
import { Argument, Command, Flag } from "effect/cli";
|
|
5
5
|
import { CurrentDistribution } from "@effected/engine";
|
|
6
6
|
import { ContextEnvelope, contextEnvelope, jsonError, provideConfig, resolveProjectConfig, runContext } from "@okfit/engine";
|
|
7
7
|
import { Console, Effect, Option, Schema } from "effect";
|
package/commands/graph.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { setExitCode } from "../internal/exit.js";
|
|
2
2
|
import { CLI_VERSION } from "../version.js";
|
|
3
|
-
import { Argument, Command, Flag } from "effect/
|
|
3
|
+
import { Argument, Command, Flag } from "effect/cli";
|
|
4
4
|
import { CurrentDistribution } from "@effected/engine";
|
|
5
5
|
import { GraphEnvelope, graphEnvelope, jsonError, provideConfig, resolveProjectConfig, runGraph } from "@okfit/engine";
|
|
6
6
|
import { Console, Effect, Option, Schema } from "effect";
|
package/commands/init.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { setExitCode } from "../internal/exit.js";
|
|
2
2
|
import { displayRoot, human, summary } from "../render/human.js";
|
|
3
|
-
import { Argument, Command, Flag } from "effect/
|
|
3
|
+
import { Argument, Command, Flag } from "effect/cli";
|
|
4
4
|
import { CONFIG_RELATIVE_PATH, InitOverwriteError, Now, collect, configValue, files, forDiagnostics, provideConfig, resolveBundleRoot, resolveProjectRoot, run, targetPaths } from "@okfit/engine";
|
|
5
5
|
import { Console, DateTime, Effect, FileSystem, Layer, Option, Path } from "effect";
|
|
6
6
|
import { OKF_SPEC_VERSION, OkfitConfig, OkfitConfigFile, SCHEMA_DIRECTIVE } from "@okfit/core";
|
package/commands/lint.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setExitCode } from "../internal/exit.js";
|
|
2
2
|
import { CLI_VERSION } from "../version.js";
|
|
3
3
|
import { displayRoot, human, summary } from "../render/human.js";
|
|
4
|
-
import { Argument, Command, Flag } from "effect/
|
|
4
|
+
import { Argument, Command, Flag } from "effect/cli";
|
|
5
5
|
import { CurrentDistribution } from "@effected/engine";
|
|
6
6
|
import { JsonEnvelope, Now, collect, forDiagnostics, json, jsonError, provideConfig, resolveProjectConfig, run } from "@okfit/engine";
|
|
7
7
|
import { Console, Effect, Layer, Option, Path, Schema } from "effect";
|
package/commands/root.js
CHANGED
|
@@ -6,7 +6,7 @@ import { staleCommand } from "./stale.js";
|
|
|
6
6
|
import { syncCommand } from "./sync.js";
|
|
7
7
|
import { validateCommand } from "./validate.js";
|
|
8
8
|
import { verifyCommand } from "./verify.js";
|
|
9
|
-
import { Command } from "effect/
|
|
9
|
+
import { Command } from "effect/cli";
|
|
10
10
|
|
|
11
11
|
//#region src/commands/root.ts
|
|
12
12
|
/**
|
package/commands/stale.js
CHANGED
|
@@ -2,7 +2,7 @@ import { setExitCode } from "../internal/exit.js";
|
|
|
2
2
|
import { CLI_VERSION } from "../version.js";
|
|
3
3
|
import { displayRoot } from "../render/human.js";
|
|
4
4
|
import { humanStale, staleSummary } from "../render/stale.js";
|
|
5
|
-
import { Argument, Command, Flag } from "effect/
|
|
5
|
+
import { Argument, Command, Flag } from "effect/cli";
|
|
6
6
|
import { CurrentDistribution } from "@effected/engine";
|
|
7
7
|
import { Now, StaleEnvelope, jsonError, provideConfig, resolveProjectConfig, runStale, staleEnvelope } from "@okfit/engine";
|
|
8
8
|
import { Console, Effect, Option, Path, Schema } from "effect";
|
package/commands/sync.js
CHANGED
|
@@ -2,7 +2,7 @@ import { setExitCode } from "../internal/exit.js";
|
|
|
2
2
|
import { CLI_VERSION } from "../version.js";
|
|
3
3
|
import { displayRoot } from "../render/human.js";
|
|
4
4
|
import { humanSync } from "../render/sync.js";
|
|
5
|
-
import { Argument, Command, Flag } from "effect/
|
|
5
|
+
import { Argument, Command, Flag } from "effect/cli";
|
|
6
6
|
import { CurrentDistribution } from "@effected/engine";
|
|
7
7
|
import { Now, SyncEnvelope, jsonError, provideConfig, resolveProjectConfig, runSync, syncEnvelope } from "@okfit/engine";
|
|
8
8
|
import { Console, DateTime, Effect, Layer, Option, Path, Schema } from "effect";
|
|
@@ -23,7 +23,7 @@ const configFlag = Flag.File("config").pipe(Flag.optional, Flag.withDescription(
|
|
|
23
23
|
* existing 64 remap — no new error class, no hand-built `ShowHelp`
|
|
24
24
|
* (contract §11, S-13, judge note 9).
|
|
25
25
|
*
|
|
26
|
-
* Note: `Flag.Literals`'s installed signature (`effect/
|
|
26
|
+
* Note: `Flag.Literals`'s installed signature (`effect/cli/Flag.ts:178-181`)
|
|
27
27
|
* takes `(name: string, literals: ReadonlyArray<string>)`, matching
|
|
28
28
|
* `formatFlag` below — not the `[value, label]` tuple-pair form
|
|
29
29
|
* `Flag.ChoiceWithValue` takes. The contract's own `onlyFlag` sketch
|
|
@@ -40,7 +40,7 @@ const onlyFlag = Flag.Literals("only", [
|
|
|
40
40
|
const dryRunFlag = Flag.Boolean("dry-run").pipe(Flag.withDefault(false), Flag.withDescription("compute every result and write nothing"));
|
|
41
41
|
const formatFlag = Flag.Literals("format", ["human", "json"]).pipe(Flag.withDefault("human"), Flag.withDescription("output format: human (default) or json"));
|
|
42
42
|
/** #18: log mode's inclusive floor; a malformed value fails at parse time (`ShowHelp` -> exit `64`). */
|
|
43
|
-
const ISO_DATE = Schema.String.pipe(Schema.check(Schema.isPattern(/^\d{4}-\d{2}-\d{2}
|
|
43
|
+
const ISO_DATE = Schema.String.pipe(Schema.check(Schema.isPattern(/^\d{4}-\d{2}-\d{2}$/u, { message: "Expected a YYYY-MM-DD date" })));
|
|
44
44
|
const sinceFlag = Flag.String("since").pipe(Flag.withSchema(ISO_DATE), Flag.optional, Flag.withDescription("log mode's inclusive floor (YYYY-MM-DD): consider every committed concept dated on or after it; default: the newest date already in log.md"));
|
|
45
45
|
const stagedFlag = Flag.Boolean("staged").pipe(Flag.withDefault(false), Flag.withDescription("pre-commit mode: stamp only the concepts in the git index, with now as generated.at, and re-add what was written; log mode is excluded (default modes: generated, index)"));
|
|
46
46
|
/**
|
package/commands/validate.js
CHANGED
|
@@ -2,7 +2,7 @@ import { setExitCode } from "../internal/exit.js";
|
|
|
2
2
|
import { CLI_VERSION } from "../version.js";
|
|
3
3
|
import { displayRoot, human, summary } from "../render/human.js";
|
|
4
4
|
import { readDocumentText } from "../internal/stdin.js";
|
|
5
|
-
import { Argument, Command, Flag } from "effect/
|
|
5
|
+
import { Argument, Command, Flag } from "effect/cli";
|
|
6
6
|
import { CurrentDistribution } from "@effected/engine";
|
|
7
7
|
import { JsonEnvelope, Now, collect, forDiagnostics, json, jsonError, provideConfig, provideDocuments, resolveProjectConfig, run } from "@okfit/engine";
|
|
8
8
|
import { Console, Effect, Layer, Option, Path, Schema } from "effect";
|
package/commands/verify.js
CHANGED
|
@@ -2,7 +2,7 @@ import { setExitCode } from "../internal/exit.js";
|
|
|
2
2
|
import { CLI_VERSION } from "../version.js";
|
|
3
3
|
import { displayRoot } from "../render/human.js";
|
|
4
4
|
import { humanVerify, humanVerifyBatch } from "../render/verify.js";
|
|
5
|
-
import { Argument, Command, Flag } from "effect/
|
|
5
|
+
import { Argument, Command, Flag } from "effect/cli";
|
|
6
6
|
import { CurrentDistribution } from "@effected/engine";
|
|
7
7
|
import { Now, VerifyBatchEnvelope, VerifyEnvelope, VerifySelectionError, jsonError, provideConfig, resolveProjectConfig, runVerify, runVerifyBatch, verifyBatchEnvelope, verifyEnvelope } from "@okfit/engine";
|
|
8
8
|
import { Console, DateTime, Effect, Option, Path, Schema } from "effect";
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Command } from "effect/
|
|
1
|
+
import { Command } from "effect/cli";
|
|
2
2
|
import { Runtime, Schema } from "effect";
|
|
3
3
|
import { ContextEnvelope, RenderedDiagnostic } from "@okfit/engine";
|
|
4
4
|
//#region src/commands/root.d.ts
|
|
@@ -20,7 +20,7 @@ import { ContextEnvelope, RenderedDiagnostic } from "@okfit/engine";
|
|
|
20
20
|
*
|
|
21
21
|
* @public
|
|
22
22
|
*/
|
|
23
|
-
export declare const rootCommand: Command.Command<"okfit", {} | {}, {}, import("@okfit/profiles").AgentActorUnconfiguredError | import("@okfit/core").BundleDepthExceededError | import("@okfit/core").BundleReadError | import("@okfit/core").BundleRootNotFoundError | import("@effected/config-file").ConfigCodecError | import("@effected/config-file").ConfigFileReadError | import("@effected/config-file").ConfigFileWriteError | import("@okfit/engine").ConfigMalformedError | import("@okfit/engine").ConfigPathNotFoundError | import("@effected/config-file").ConfigValidationError | import("@okfit/engine").DocumentPathError | DocumentStdinIsTerminalError | import("@effected/markdown").FrontmatterEncodeError | import("@effected/markdown").FrontmatterFormatMismatchError | import("@effected/markdown").FrontmatterValidationError | import("@effected/git").GitCommandError | import("@okfit/profiles").GitHistoryError | import("@okfit/profiles").HumanActorUnresolvedError | import("@okfit/engine").InitOverwriteError | import("@effected/markdown").MarkdownParseError | import("@effected/git").NotARepositoryError | import("effect/PlatformError").PlatformError | import("effect/Schema").SchemaError | import("@okfit/engine").SyncStagedLogError | import("@effected/git").UnknownRefError | import("@okfit/engine").VerifyConceptNotFoundError | import("@okfit/engine").VerifySelectionError | import("@okfit/engine").VerifyUnsupportedFrontmatterError | import("@effected/yaml").YamlParseError, import("@effected/xdg").AppDirs | import("effect/
|
|
23
|
+
export declare const rootCommand: Command.Command<"okfit", {} | {}, {}, import("@okfit/profiles").AgentActorUnconfiguredError | import("@okfit/core").BundleDepthExceededError | import("@okfit/core").BundleReadError | import("@okfit/core").BundleRootNotFoundError | import("@effected/config-file").ConfigCodecError | import("@effected/config-file").ConfigFileReadError | import("@effected/config-file").ConfigFileWriteError | import("@okfit/engine").ConfigMalformedError | import("@okfit/engine").ConfigPathNotFoundError | import("@effected/config-file").ConfigValidationError | import("@okfit/engine").DocumentPathError | DocumentStdinIsTerminalError | import("@effected/markdown").FrontmatterEncodeError | import("@effected/markdown").FrontmatterFormatMismatchError | import("@effected/markdown").FrontmatterValidationError | import("@effected/git").GitCommandError | import("@okfit/profiles").GitHistoryError | import("@okfit/profiles").HumanActorUnresolvedError | import("@okfit/engine").InitOverwriteError | import("@effected/markdown").MarkdownParseError | import("@effected/git").NotARepositoryError | import("effect/PlatformError").PlatformError | import("effect/Schema").SchemaError | import("@okfit/engine").SyncStagedLogError | import("@effected/git").UnknownRefError | import("@okfit/engine").VerifyConceptNotFoundError | import("@okfit/engine").VerifySelectionError | import("@okfit/engine").VerifyUnsupportedFrontmatterError | import("@effected/yaml").YamlParseError, import("@effected/xdg").AppDirs | import("effect/process/ChildProcessSpawner").ChildProcessSpawner | import("effect/Crypto").Crypto | import("effect/FileSystem").FileSystem | import("@okfit/engine").Now | import("effect/Path").Path | import("effect/Stdio").Stdio | import("@effected/xdg").Xdg>;
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/errors.d.ts
|
|
26
26
|
/**
|
|
@@ -10,7 +10,7 @@ import { CliColor } from "@effected/cli";
|
|
|
10
10
|
* `<name> <version>[ via <distName> <distVersion>] (engine <ENGINE_VERSION>, okf <OKF_SPEC_VERSION>, config-schema <CONFIG_SCHEMA_VERSION>)`.
|
|
11
11
|
* `GlobalFlag.Version`'s built-in `run` calls `formatter.formatVersion(command.name,
|
|
12
12
|
* version)` (`command.name` is always `"okfit"`, `version` is `CLI_VERSION` --
|
|
13
|
-
* `
|
|
13
|
+
* `cli/GlobalFlag.ts:189-199`), so those two arguments alone are
|
|
14
14
|
* exactly `okfit <CLI_VERSION>`; this appends the engine, okf, and
|
|
15
15
|
* distribution parts.
|
|
16
16
|
*
|
package/main.js
CHANGED
|
@@ -2,7 +2,7 @@ import { CLI_VERSION } from "./version.js";
|
|
|
2
2
|
import { rootCommand } from "./commands/root.js";
|
|
3
3
|
import { renderFailure } from "./errors.js";
|
|
4
4
|
import { versionFormatterLayer } from "./internal/versionFormatter.js";
|
|
5
|
-
import { Command } from "effect/
|
|
5
|
+
import { Command } from "effect/cli";
|
|
6
6
|
import { CurrentDistribution } from "@effected/engine";
|
|
7
7
|
import { Now, OkfitPlatform } from "@okfit/engine";
|
|
8
8
|
import { DateTime, Effect, Option } from "effect";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@okfit/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The okfit command line: validate, lint, index, and inspect Open Knowledge Format (OKF) bundles.",
|
|
6
6
|
"keywords": [
|
|
@@ -42,21 +42,22 @@
|
|
|
42
42
|
"okfit": "bin/okfit.js"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@effect/platform-node": "4.0.0-rc.
|
|
46
|
-
"@effected/cli": "^0.
|
|
47
|
-
"@effected/config-file": "^0.
|
|
48
|
-
"@effected/engine": "^0.
|
|
49
|
-
"@effected/git": "^0.
|
|
50
|
-
"@effected/glob": "^0.
|
|
51
|
-
"@effected/jsonc": "^0.
|
|
52
|
-
"@effected/markdown": "^0.
|
|
53
|
-
"@effected/
|
|
54
|
-
"@effected/
|
|
55
|
-
"@effected/
|
|
56
|
-
"@
|
|
57
|
-
"@okfit/
|
|
58
|
-
"@okfit/
|
|
59
|
-
"
|
|
45
|
+
"@effect/platform-node": "4.0.0-rc.118",
|
|
46
|
+
"@effected/cli": "^0.10.0",
|
|
47
|
+
"@effected/config-file": "^0.13.0",
|
|
48
|
+
"@effected/engine": "^0.2.0",
|
|
49
|
+
"@effected/git": "^0.18.1",
|
|
50
|
+
"@effected/glob": "^0.9.0",
|
|
51
|
+
"@effected/jsonc": "^0.14.0",
|
|
52
|
+
"@effected/markdown": "^0.14.0",
|
|
53
|
+
"@effected/schemastore": "^0.16.0",
|
|
54
|
+
"@effected/toml": "^0.10.0",
|
|
55
|
+
"@effected/walker": "^0.13.0",
|
|
56
|
+
"@effected/yaml": "^0.18.0",
|
|
57
|
+
"@okfit/core": "0.8.1",
|
|
58
|
+
"@okfit/engine": "0.9.1",
|
|
59
|
+
"@okfit/profiles": "0.8.1",
|
|
60
|
+
"effect": "4.0.0-rc.118"
|
|
60
61
|
},
|
|
61
62
|
"engines": {
|
|
62
63
|
"node": ">=24.11.0"
|