fireflyy 4.0.0-dev.988c93c → 4.0.0-dev.a8aacbe

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.
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "description": "Firefly CLI configuration.",
4
3
  "type": "object",
5
4
  "properties": {
6
5
  "cwd": {
@@ -20,7 +19,6 @@
20
19
  "type": "boolean"
21
20
  },
22
21
  "release": {
23
- "description": "Release command configuration.",
24
22
  "type": "object",
25
23
  "properties": {
26
24
  "name": {
@@ -31,9 +29,12 @@
31
29
  "description": "Org/user scope without '@'. Auto-detected from package.json.",
32
30
  "type": "string"
33
31
  },
32
+ "repository": {
33
+ "description": "GitHub repository in 'owner/repo' format.",
34
+ "type": "string"
35
+ },
34
36
  "base": {
35
37
  "description": "Relative path from repository root to project root.",
36
- "default": "",
37
38
  "type": "string"
38
39
  },
39
40
  "branch": {
@@ -41,13 +42,13 @@
41
42
  "type": "string"
42
43
  },
43
44
  "changelogPath": {
44
- "description": "Changelog file path, relative to project root.",
45
45
  "default": "CHANGELOG.md",
46
+ "description": "Changelog file path, relative to project root.",
46
47
  "type": "string"
47
48
  },
48
49
  "bumpStrategy": {
49
- "description": "\"auto\" (from commits) or \"manual\" (user-specified).",
50
50
  "default": "",
51
+ "description": "\"auto\" (from commits) or \"manual\" (user-specified).",
51
52
  "anyOf": [
52
53
  {
53
54
  "type": "string",
@@ -95,52 +96,51 @@
95
96
  },
96
97
  "releaseNotes": {
97
98
  "description": "Custom release notes for changelog.",
98
- "default": "",
99
99
  "type": "string"
100
100
  },
101
101
  "commitMessage": {
102
- "description": "Commit message template with placeholders.",
103
102
  "default": "chore(release): release {{name}}@{{version}}",
103
+ "description": "Commit message template with placeholders.",
104
104
  "type": "string"
105
105
  },
106
106
  "tagName": {
107
- "description": "Tag name template with placeholders.",
108
107
  "default": "{{name}}@{{version}}",
108
+ "description": "Tag name template with placeholders.",
109
109
  "type": "string"
110
110
  },
111
111
  "skipBump": {
112
- "description": "Skip version bump step.",
113
112
  "default": false,
113
+ "description": "Skip version bump step.",
114
114
  "type": "boolean"
115
115
  },
116
116
  "skipChangelog": {
117
- "description": "Skip changelog generation step.",
118
117
  "default": false,
118
+ "description": "Skip changelog generation step.",
119
119
  "type": "boolean"
120
120
  },
121
121
  "skipPush": {
122
- "description": "Skip push step.",
123
122
  "default": false,
123
+ "description": "Skip push step.",
124
124
  "type": "boolean"
125
125
  },
126
126
  "skipGitHubRelease": {
127
- "description": "Skip GitHub release step.",
128
127
  "default": false,
128
+ "description": "Skip GitHub release step.",
129
129
  "type": "boolean"
130
130
  },
131
131
  "skipGit": {
132
- "description": "Skip all git-related steps.",
133
132
  "default": false,
133
+ "description": "Skip all git-related steps.",
134
134
  "type": "boolean"
135
135
  },
136
136
  "skipPreflightCheck": {
137
- "description": "Skip preflight checks.",
138
137
  "default": false,
138
+ "description": "Skip preflight checks.",
139
139
  "type": "boolean"
140
140
  },
141
141
  "releaseTitle": {
142
- "description": "GitHub release title with placeholders.",
143
142
  "default": "{{name}}@{{version}}",
143
+ "description": "GitHub release title with placeholders.",
144
144
  "type": "string"
145
145
  },
146
146
  "releaseLatest": {
@@ -155,7 +155,9 @@
155
155
  "description": "Release as draft version.",
156
156
  "type": "boolean"
157
157
  }
158
- }
158
+ },
159
+ "description": "Release command configuration."
159
160
  }
160
- }
161
+ },
162
+ "description": "Firefly CLI configuration."
161
163
  }
@@ -1,6 +1,6 @@
1
- import { h as invalidError, i as FireflyOkAsync, r as FireflyOk, t as FireflyErr } from "./result.constructors-BMtOWD2-.js";
2
- import { t as logger } from "./logging-BuIkRrn1.js";
3
- import { TRANSITION_KEYWORDS } from "./version-strategy.service-CmfeZLYC.js";
1
+ import { g as invalidError, i as FireflyOkAsync, r as FireflyOk, t as FireflyErr } from "./result.constructors-DoAoYdfF.js";
2
+ import { t as logger } from "./logging-Bpk2RzGc.js";
3
+ import { TRANSITION_KEYWORDS } from "./version-strategy.service-Dln42gxC.js";
4
4
 
5
5
  //#region src/domain/commits/commit-types.ts
6
6
  /**
package/dist/config.d.ts CHANGED
@@ -1,7 +1,70 @@
1
1
  import z from "zod";
2
2
 
3
- //#region src/cli/config/config.schema.d.ts
3
+ //#region src/commands/release/release.config.d.ts
4
4
 
5
+ /**
6
+ * Release configuration schema with runtime validation refinements.
7
+ * Use this schema for parsing and validating user input.
8
+ */
9
+ declare const ReleaseConfigSchema: z.ZodObject<{
10
+ name: z.ZodOptional<z.ZodString>;
11
+ scope: z.ZodOptional<z.ZodString>;
12
+ repository: z.ZodOptional<z.ZodString>;
13
+ base: z.ZodOptional<z.ZodString>;
14
+ branch: z.ZodOptional<z.ZodString>;
15
+ changelogPath: z.ZodDefault<z.ZodString>;
16
+ bumpStrategy: z.ZodDefault<z.ZodUnion<[z.ZodEnum<{
17
+ auto: "auto";
18
+ manual: "manual";
19
+ }>, z.ZodLiteral<"">]>>;
20
+ releaseType: z.ZodOptional<z.ZodEnum<{
21
+ major: "major";
22
+ minor: "minor";
23
+ patch: "patch";
24
+ prerelease: "prerelease";
25
+ premajor: "premajor";
26
+ preminor: "preminor";
27
+ prepatch: "prepatch";
28
+ graduate: "graduate";
29
+ }>>;
30
+ preReleaseId: z.ZodOptional<z.ZodString>;
31
+ preReleaseBase: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"0">, z.ZodLiteral<"1">]>>;
32
+ releaseNotes: z.ZodOptional<z.ZodString>;
33
+ commitMessage: z.ZodDefault<z.ZodString>;
34
+ tagName: z.ZodDefault<z.ZodString>;
35
+ skipBump: z.ZodDefault<z.ZodCoercedBoolean<unknown>>;
36
+ skipChangelog: z.ZodDefault<z.ZodCoercedBoolean<unknown>>;
37
+ skipPush: z.ZodDefault<z.ZodCoercedBoolean<unknown>>;
38
+ skipGitHubRelease: z.ZodDefault<z.ZodCoercedBoolean<unknown>>;
39
+ skipGit: z.ZodDefault<z.ZodCoercedBoolean<unknown>>;
40
+ skipPreflightCheck: z.ZodDefault<z.ZodCoercedBoolean<unknown>>;
41
+ releaseTitle: z.ZodDefault<z.ZodString>;
42
+ releaseLatest: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
43
+ releasePreRelease: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
44
+ releaseDraft: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
45
+ }, z.core.$strip>;
46
+ type BaseRelease = z.infer<typeof ReleaseConfigSchema>;
47
+ type ReleaseFlagKeys = "releaseLatest" | "releasePreRelease" | "releaseDraft";
48
+ type ExclusiveReleaseFlags = {
49
+ releaseLatest: true;
50
+ releasePreRelease?: false | undefined;
51
+ releaseDraft?: false | undefined;
52
+ } | {
53
+ releasePreRelease: true;
54
+ releaseLatest?: false | undefined;
55
+ releaseDraft?: false | undefined;
56
+ } | {
57
+ releaseDraft: true;
58
+ releaseLatest?: false | undefined;
59
+ releasePreRelease?: false | undefined;
60
+ } | {
61
+ releaseLatest?: false | undefined;
62
+ releasePreRelease?: false | undefined;
63
+ releaseDraft?: false | undefined;
64
+ };
65
+ type ReleaseConfig = Omit<BaseRelease, ReleaseFlagKeys> & ExclusiveReleaseFlags;
66
+ //#endregion
67
+ //#region src/cli/config/config.schema.d.ts
5
68
  /**
6
69
  * Complete Firefly configuration schema.
7
70
  * Combines global options with command-specific configuration sections.
@@ -10,7 +73,8 @@ declare const FireflyConfigSchema: z.ZodObject<{
10
73
  release: z.ZodOptional<z.ZodObject<{
11
74
  name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
12
75
  scope: z.ZodOptional<z.ZodOptional<z.ZodString>>;
13
- base: z.ZodOptional<z.ZodDefault<z.ZodString>>;
76
+ repository: z.ZodOptional<z.ZodOptional<z.ZodString>>;
77
+ base: z.ZodOptional<z.ZodOptional<z.ZodString>>;
14
78
  branch: z.ZodOptional<z.ZodOptional<z.ZodString>>;
15
79
  changelogPath: z.ZodOptional<z.ZodDefault<z.ZodString>>;
16
80
  bumpStrategy: z.ZodOptional<z.ZodDefault<z.ZodUnion<[z.ZodEnum<{
@@ -29,7 +93,7 @@ declare const FireflyConfigSchema: z.ZodObject<{
29
93
  }>>>;
30
94
  preReleaseId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
31
95
  preReleaseBase: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"0">, z.ZodLiteral<"1">]>>>;
32
- releaseNotes: z.ZodOptional<z.ZodDefault<z.ZodString>>;
96
+ releaseNotes: z.ZodOptional<z.ZodOptional<z.ZodString>>;
33
97
  commitMessage: z.ZodOptional<z.ZodDefault<z.ZodString>>;
34
98
  tagName: z.ZodOptional<z.ZodDefault<z.ZodString>>;
35
99
  skipBump: z.ZodOptional<z.ZodDefault<z.ZodCoercedBoolean<unknown>>>;
@@ -52,7 +116,9 @@ declare const FireflyConfigSchema: z.ZodObject<{
52
116
  * TypeScript type for Firefly configuration.
53
117
  * Use this type when you need to reference the configuration shape without runtime validation.
54
118
  */
55
- type FireflyConfig = z.infer<typeof FireflyConfigSchema>;
119
+ type FireflyConfig = z.infer<typeof FireflyConfigSchema> & {
120
+ release?: Partial<Omit<ReleaseConfig, ReleaseFlagKeys>> & ExclusiveReleaseFlags;
121
+ };
56
122
  //#endregion
57
123
  //#region src/config/index.d.ts
58
124
  /**
@@ -0,0 +1,74 @@
1
+ //#region src/core/environment/debug-flags.ts
2
+ /**
3
+ * Debug flags are environment variables prefixed with `FIREFLY_DEBUG_` that
4
+ * enable diagnostic features during development and troubleshooting.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * if (DebugFlags.showRawError) {
9
+ * logger.error(parseResult.error);
10
+ * }
11
+ * ```
12
+ */
13
+ var DebugFlags = class {
14
+ constructor() {}
15
+ /**
16
+ * When enabled, displays raw Zod validation errors for configuration parsing.
17
+ *
18
+ * Useful for debugging configuration schema issues and understanding
19
+ * why validation failed at a granular level.
20
+ */
21
+ static get showRawError() {
22
+ return Boolean(process.env.FIREFLY_DEBUG_SHOW_RAW_ERROR);
23
+ }
24
+ /**
25
+ * When enabled, logs the loaded configuration file contents.
26
+ *
27
+ * Useful for debugging configuration loading and understanding
28
+ * what values are being read from config files.
29
+ */
30
+ static get showFileConfig() {
31
+ return Boolean(process.env.FIREFLY_DEBUG_SHOW_FILE_CONFIG);
32
+ }
33
+ /**
34
+ * When enabled, displays task graph statistics during release execution.
35
+ *
36
+ * Shows information about task dependencies, execution order,
37
+ * and graph structure for debugging workflow issues.
38
+ */
39
+ static get showTaskGraphStats() {
40
+ return Boolean(process.env.FIREFLY_DEBUG_SHOW_TASK_GRAPH_STATS);
41
+ }
42
+ /**
43
+ * When enabled, prevents truncation of release notes in GitHub CLI logs.
44
+ *
45
+ * By default, release notes are truncated in logs to avoid pollution.
46
+ * Enable this flag to see full release notes content during debugging.
47
+ */
48
+ static get dontTruncateReleaseNotes() {
49
+ return Boolean(process.env.FIREFLY_DEBUG_DONT_TRUNCATE_RELEASE_NOTES?.trim());
50
+ }
51
+ /**
52
+ * When enabled, prevents redaction of sensitive GitHub CLI arguments in logs.
53
+ *
54
+ * By default, sensitive values (tokens, passwords, etc.) are redacted.
55
+ * Enable this flag to see full argument values during debugging.
56
+ *
57
+ * WARNING: Use with caution as this may expose sensitive information.
58
+ */
59
+ static get dontRedactGithubCliArgs() {
60
+ return Boolean(process.env.FIREFLY_DEBUG_DONT_REDACT_GITHUB_CLI_ARGS?.trim());
61
+ }
62
+ /**
63
+ * When enabled, logs verbose details for git commit operations.
64
+ *
65
+ * By default, the verbose log of the git show command is disabled to reduce noise, if commits are many.
66
+ * Enable this flag to see detailed commit information during debugging.
67
+ */
68
+ static get showVerboseGitCommitDetails() {
69
+ return Boolean(process.env.FIREFLY_DEBUG_SHOW_VERBOSE_GIT_COMMIT_DETAILS?.trim());
70
+ }
71
+ };
72
+
73
+ //#endregion
74
+ export { DebugFlags as t };
@@ -1,5 +1,5 @@
1
- import { i as FireflyOkAsync } from "./result.constructors-BMtOWD2-.js";
2
- import { t as logger } from "./logging-BuIkRrn1.js";
1
+ import { i as FireflyOkAsync } from "./result.constructors-DoAoYdfF.js";
2
+ import { t as logger } from "./logging-Bpk2RzGc.js";
3
3
 
4
4
  //#region src/infrastructure/dry-run/index.ts
5
5
  /**
@@ -1,7 +1,7 @@
1
- import { c as notFoundErrAsync } from "./result.constructors-BMtOWD2-.js";
2
- import { n as wrapPromise } from "./result.utilities-BTVU-GsT.js";
3
- import { t as logger } from "./logging-BuIkRrn1.js";
4
- import { t as withDryRun } from "./dry-run-Cdg-c0EP.js";
1
+ import { l as notFoundErrAsync } from "./result.constructors-DoAoYdfF.js";
2
+ import { n as wrapPromise } from "./result.utilities-DXSJU70_.js";
3
+ import { t as logger } from "./logging-Bpk2RzGc.js";
4
+ import { t as withDryRun } from "./dry-run-C7RaPEq8.js";
5
5
 
6
6
  //#region src/services/implementations/filesystem.service.ts
7
7
  /**
@@ -1,6 +1,7 @@
1
- import { i as FireflyOkAsync, m as failedError, o as failedErrAsync } from "./result.constructors-BMtOWD2-.js";
2
- import { t as logger } from "./logging-BuIkRrn1.js";
3
- import { t as withDryRun } from "./dry-run-Cdg-c0EP.js";
1
+ import { t as DebugFlags } from "./debug-flags-K3yK5B6O.js";
2
+ import { h as failedError, i as FireflyOkAsync, o as failedErrAsync } from "./result.constructors-DoAoYdfF.js";
3
+ import { t as logger } from "./logging-Bpk2RzGc.js";
4
+ import { t as withDryRun } from "./dry-run-C7RaPEq8.js";
4
5
  import { ResultAsync } from "neverthrow";
5
6
  import { z } from "zod";
6
7
 
@@ -397,7 +398,7 @@ var DefaultGitService = class {
397
398
  "--no-patch",
398
399
  `--format=${format}`,
399
400
  hash
400
- ]);
401
+ ], { verbose: DebugFlags.showVerboseGitCommitDetails });
401
402
  }
402
403
  getUnpushedCommits() {
403
404
  return this.getCurrentBranch().andThen((branch) => {
package/dist/main.js CHANGED
@@ -52,16 +52,16 @@ var RuntimeEnv = class {
52
52
 
53
53
  //#endregion
54
54
  //#region package.json
55
- var version = "4.0.0-dev.988c93c";
55
+ var version = "4.0.0-dev.a8aacbe";
56
56
  var description = " CLI orchestrator for automatic semantic versioning, changelog generation, and creating releases. Built for my own use cases.";
57
57
  var dependencies = {
58
- "c12": "^3.3.2",
58
+ "c12": "^3.3.3",
59
59
  "commander": "^14.0.2",
60
60
  "consola": "^3.4.2",
61
- "git-cliff": "^2.10.1",
61
+ "git-cliff": "^2.11.0",
62
62
  "neverthrow": "^8.2.0",
63
63
  "semver": "^7.7.3",
64
- "zod": "^4.1.13"
64
+ "zod": "^4.3.4"
65
65
  };
66
66
 
67
67
  //#endregion
@@ -80,7 +80,7 @@ async function main() {
80
80
  description,
81
81
  gitCliffVersion: dependencies["git-cliff"]?.replace("^", "") || "unknown"
82
82
  });
83
- const { createFireflyCLI } = await import("./program-Dqo9sQjU.js");
83
+ const { createFireflyCLI } = await import("./program-BOk_0Q6Q.js");
84
84
  createFireflyCLI().parseAsync(process.argv).catch(() => process.exit(1));
85
85
  }
86
86
  main();
@@ -1,6 +1,6 @@
1
- import { _ as toFireflyError, d as validationErrAsync, i as FireflyOkAsync, u as validationErr } from "./result.constructors-BMtOWD2-.js";
2
- import { t as logger } from "./logging-BuIkRrn1.js";
3
- import { n as parseSchema } from "./schema.utilities-BxiRR-GI.js";
1
+ import { d as validationErr, f as validationErrAsync, i as FireflyOkAsync, v as toFireflyError } from "./result.constructors-DoAoYdfF.js";
2
+ import { t as logger } from "./logging-Bpk2RzGc.js";
3
+ import { n as parseSchema } from "./schema.utilities-C1yimTtB.js";
4
4
  import { Result } from "neverthrow";
5
5
  import z$1 from "zod";
6
6