icore 1.0.13 → 1.0.14
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/CHANGELOG.md +107 -25
- package/dist/cli.d.ts +1 -1
- package/dist/commands.d.ts +5 -5
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
intentionally conservative.
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
Historical entries before this file was introduced were reconstructed from npm
|
|
9
|
+
publish metadata and local git history. Older entries are intentionally
|
|
10
|
+
conservative.
|
|
11
|
+
|
|
12
|
+
## [Unreleased]
|
|
10
13
|
|
|
11
14
|
### Added
|
|
12
15
|
|
|
@@ -14,22 +17,33 @@ intentionally conservative.
|
|
|
14
17
|
- Added opt-in `strict: true` command resolution for rejecting options before command paths.
|
|
15
18
|
- Added `strict: true` support to direct `runCommand` execution.
|
|
16
19
|
- Added typed prepared command `payload` returned from `prepare` and passed to `handle`.
|
|
20
|
+
- Added public `CommandPayload`, `CommandContext`, and `CommandResult` helper types.
|
|
17
21
|
- Added this changelog.
|
|
18
22
|
|
|
19
23
|
### Changed
|
|
20
24
|
|
|
21
|
-
-
|
|
25
|
+
- Changed `PreparedCommand` typing to preserve payload correlation when narrowing registry unions by command name.
|
|
26
|
+
|
|
27
|
+
### Removed
|
|
28
|
+
|
|
29
|
+
- Removed explicit boolean values such as `--flag=true` and `--flag=false`; use `--flag` and `--no-flag`.
|
|
30
|
+
|
|
31
|
+
## [1.0.12] - 2026-07-02
|
|
22
32
|
|
|
23
|
-
|
|
33
|
+
### Changed
|
|
24
34
|
|
|
25
35
|
- Replaced the preliminary flag-only boolean option naming with `syntax: 'flag'`.
|
|
26
36
|
- Documented flag-only boolean option behavior.
|
|
27
37
|
|
|
28
|
-
## 1.0.11 - 2026-07-02
|
|
38
|
+
## [1.0.11] - 2026-07-02
|
|
39
|
+
|
|
40
|
+
### Added
|
|
29
41
|
|
|
30
42
|
- Added preliminary flag-only boolean option support.
|
|
31
43
|
|
|
32
|
-
## 1.0.10 - 2026-07-02
|
|
44
|
+
## [1.0.10] - 2026-07-02
|
|
45
|
+
|
|
46
|
+
### Added
|
|
33
47
|
|
|
34
48
|
- Added two-phase command execution.
|
|
35
49
|
- Added `PreparedCommandInput`.
|
|
@@ -38,26 +52,37 @@ intentionally conservative.
|
|
|
38
52
|
- Added `runPreparedCommand`.
|
|
39
53
|
- Added command `metadata`.
|
|
40
54
|
- Added command `prepare` hook.
|
|
41
|
-
- Changed `runCommand` and `runCommandFromRegistry` to use the prepare-and-run flow internally.
|
|
42
55
|
- Added focused tests for prepare-time validation and handler safety.
|
|
43
56
|
|
|
44
|
-
|
|
57
|
+
### Changed
|
|
58
|
+
|
|
59
|
+
- Changed `runCommand` and `runCommandFromRegistry` to use the prepare-and-run flow internally.
|
|
60
|
+
|
|
61
|
+
## [1.0.9] - 2026-07-02
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
45
64
|
|
|
46
65
|
- Refined npm package metadata.
|
|
47
66
|
- Updated repository metadata for npm.
|
|
48
67
|
- Simplified published package contents.
|
|
49
68
|
|
|
50
|
-
## 1.0.8 - 2026-07-02
|
|
69
|
+
## [1.0.8] - 2026-07-02
|
|
70
|
+
|
|
71
|
+
### Changed
|
|
51
72
|
|
|
52
73
|
- Updated package author metadata.
|
|
53
74
|
- Normalized README heading structure.
|
|
54
75
|
|
|
55
|
-
## 1.0.7 - 2026-07-02
|
|
76
|
+
## [1.0.7] - 2026-07-02
|
|
77
|
+
|
|
78
|
+
### Changed
|
|
56
79
|
|
|
57
80
|
- Renamed README examples from `upper` to `uppercase`.
|
|
58
81
|
- Cleaned duplicated command test coverage without changing public behavior.
|
|
59
82
|
|
|
60
|
-
## 1.0.6 - 2026-07-02
|
|
83
|
+
## [1.0.6] - 2026-07-02
|
|
84
|
+
|
|
85
|
+
### Added
|
|
61
86
|
|
|
62
87
|
- Added explicit long boolean values such as `--flag=true` and `--flag=false`.
|
|
63
88
|
- Added schema-known boolean negation such as `--no-flag`.
|
|
@@ -65,32 +90,53 @@ intentionally conservative.
|
|
|
65
90
|
- Added alias validation and duplicate detection between short and long option forms.
|
|
66
91
|
- Documented supported option syntax.
|
|
67
92
|
|
|
68
|
-
## 1.0.5 - 2026-07-01
|
|
93
|
+
## [1.0.5] - 2026-07-01
|
|
94
|
+
|
|
95
|
+
### Changed
|
|
69
96
|
|
|
70
97
|
- Rebuilt README as the main public documentation entry point.
|
|
98
|
+
|
|
99
|
+
### Removed
|
|
100
|
+
|
|
71
101
|
- Removed separate generated reference docs from the published documentation flow.
|
|
72
102
|
|
|
73
|
-
## 1.0.4 - 2026-07-01
|
|
103
|
+
## [1.0.4] - 2026-07-01
|
|
104
|
+
|
|
105
|
+
### Changed
|
|
74
106
|
|
|
75
107
|
- Reorganized README and documentation references.
|
|
76
108
|
|
|
77
|
-
## 1.0.3 - 2026-07-01
|
|
109
|
+
## [1.0.3] - 2026-07-01
|
|
110
|
+
|
|
111
|
+
### Added
|
|
78
112
|
|
|
79
113
|
- Added README table of contents.
|
|
114
|
+
|
|
115
|
+
### Changed
|
|
116
|
+
|
|
80
117
|
- Polished README formatting and emphasis.
|
|
81
118
|
|
|
82
|
-
## 1.0.2 - 2026-06-30
|
|
119
|
+
## [1.0.2] - 2026-06-30
|
|
120
|
+
|
|
121
|
+
### Added
|
|
83
122
|
|
|
84
|
-
- Clarified CLI scope and supported syntax in README.
|
|
85
123
|
- Added module boundary comments to production source files.
|
|
124
|
+
|
|
125
|
+
### Changed
|
|
126
|
+
|
|
127
|
+
- Clarified CLI scope and supported syntax in README.
|
|
86
128
|
- Updated package description and keywords.
|
|
87
129
|
|
|
88
|
-
## 1.0.1 - 2026-06-30
|
|
130
|
+
## [1.0.1] - 2026-06-30
|
|
131
|
+
|
|
132
|
+
### Changed
|
|
89
133
|
|
|
90
134
|
- Published documentation updates after the first stable release.
|
|
91
135
|
- No dedicated version commit is present in local git history for this patch.
|
|
92
136
|
|
|
93
|
-
## 1.0.0 - 2026-06-30
|
|
137
|
+
## [1.0.0] - 2026-06-30
|
|
138
|
+
|
|
139
|
+
### Added
|
|
94
140
|
|
|
95
141
|
- First stable release of the new `icore` CLI mechanics package.
|
|
96
142
|
- Added declarative option parsing and validation.
|
|
@@ -100,22 +146,58 @@ intentionally conservative.
|
|
|
100
146
|
- Added command registry routing.
|
|
101
147
|
- Added typed command handler input.
|
|
102
148
|
- Added CommonJS package entry points and TypeScript declarations.
|
|
149
|
+
|
|
150
|
+
### Changed
|
|
151
|
+
|
|
103
152
|
- Lowered the runtime Node.js engine to `>=16.9.0`.
|
|
104
153
|
|
|
105
|
-
## 1.0.0-alpha - 2026-06-28
|
|
154
|
+
## [1.0.0-alpha] - 2026-06-28
|
|
155
|
+
|
|
156
|
+
### Added
|
|
106
157
|
|
|
107
158
|
- Started the new CLI mechanics codebase after pruning the legacy package code.
|
|
108
159
|
- Added the initial TypeScript build, test, and lint setup for the new package.
|
|
109
160
|
|
|
110
|
-
## 0.1.38 - 2019-06-12
|
|
161
|
+
## [0.1.38] - 2019-06-12
|
|
162
|
+
|
|
163
|
+
### Added
|
|
111
164
|
|
|
112
|
-
- Final legacy web-framework line release.
|
|
113
165
|
- Added legacy tests and documentation.
|
|
166
|
+
|
|
167
|
+
### Changed
|
|
168
|
+
|
|
169
|
+
- Final legacy web-framework line release.
|
|
114
170
|
- Updated the legacy package description.
|
|
171
|
+
|
|
172
|
+
### Removed
|
|
173
|
+
|
|
115
174
|
- Trimmed legacy runtime dependencies.
|
|
116
175
|
|
|
117
|
-
## 0.0.37 and earlier
|
|
176
|
+
## [0.0.37 and earlier]
|
|
177
|
+
|
|
178
|
+
### Added
|
|
118
179
|
|
|
119
180
|
- Original legacy npm package line published between 2017 and 2019.
|
|
120
181
|
- Legacy history is preserved for package provenance.
|
|
182
|
+
|
|
183
|
+
### Changed
|
|
184
|
+
|
|
121
185
|
- Detailed changelog entries were not maintained for these releases.
|
|
186
|
+
|
|
187
|
+
[Unreleased]: https://github.com/woodger/icore/commits/develop
|
|
188
|
+
[1.0.12]: https://www.npmjs.com/package/icore/v/1.0.12
|
|
189
|
+
[1.0.11]: https://www.npmjs.com/package/icore/v/1.0.11
|
|
190
|
+
[1.0.10]: https://www.npmjs.com/package/icore/v/1.0.10
|
|
191
|
+
[1.0.9]: https://www.npmjs.com/package/icore/v/1.0.9
|
|
192
|
+
[1.0.8]: https://www.npmjs.com/package/icore/v/1.0.8
|
|
193
|
+
[1.0.7]: https://www.npmjs.com/package/icore/v/1.0.7
|
|
194
|
+
[1.0.6]: https://www.npmjs.com/package/icore/v/1.0.6
|
|
195
|
+
[1.0.5]: https://www.npmjs.com/package/icore/v/1.0.5
|
|
196
|
+
[1.0.4]: https://www.npmjs.com/package/icore/v/1.0.4
|
|
197
|
+
[1.0.3]: https://www.npmjs.com/package/icore/v/1.0.3
|
|
198
|
+
[1.0.2]: https://www.npmjs.com/package/icore/v/1.0.2
|
|
199
|
+
[1.0.1]: https://www.npmjs.com/package/icore/v/1.0.1
|
|
200
|
+
[1.0.0]: https://www.npmjs.com/package/icore/v/1.0.0
|
|
201
|
+
[1.0.0-alpha]: https://www.npmjs.com/package/icore/v/1.0.0-alpha
|
|
202
|
+
[0.1.38]: https://www.npmjs.com/package/icore/v/0.1.38
|
|
203
|
+
[0.0.37 and earlier]: https://www.npmjs.com/package/icore?activeTab=versions
|
package/dist/cli.d.ts
CHANGED
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
* This file must not contain parser, validator, or command runtime logic.
|
|
10
10
|
*/
|
|
11
11
|
export { parseArgv, type ParsedArgv } from './argv';
|
|
12
|
-
export { defineCommand, defineCommandRegistry, isCommandName, prepareCommandFromArgs, resolveCommand, resolveCommandFromArgs, runCommand, runPreparedCommand, runCommandFromRegistry, type CommandDefinition, type CommandInput, type CommandName, type CommandRegistry, type CommandResolutionOptions, type PreparedCommand, type PreparedCommandInput, type ResolvedCommand } from './commands';
|
|
12
|
+
export { defineCommand, defineCommandRegistry, isCommandName, prepareCommandFromArgs, resolveCommand, resolveCommandFromArgs, runCommand, runPreparedCommand, runCommandFromRegistry, type CommandDefinition, type CommandContext, type CommandInput, type CommandName, type CommandPayload, type CommandRegistry, type CommandResolutionOptions, type CommandResult, type PreparedCommand, type PreparedCommandInput, type ResolvedCommand } from './commands';
|
|
13
13
|
export { IcoreError, type IcoreErrorCode, type IcoreErrorDetails } from './errors';
|
|
14
14
|
export { mergeOptionsSchema, parseOptions, parseOptionsDetailed, type BooleanOption, type InferOptions, type InferProvidedOptions, type MergeOptionsSchemas, type NumberOption, type OptionDefinition, type OptionsSchema, type ParseOptionsResult, type RawOptionValue, type StringOption } from './options';
|
package/dist/commands.d.ts
CHANGED
|
@@ -78,10 +78,10 @@ type CommandDefinitionParts<TCommand extends AnyCommandDefinition> = TCommand ex
|
|
|
78
78
|
metadata: TCommand['metadata'];
|
|
79
79
|
payload: unknown;
|
|
80
80
|
};
|
|
81
|
-
type CommandContext<TCommand extends AnyCommandDefinition> = CommandDefinitionParts<TCommand>['context'];
|
|
82
|
-
type CommandResult<TCommand extends AnyCommandDefinition> = Awaited<CommandDefinitionParts<TCommand>['result']>;
|
|
81
|
+
export type CommandContext<TCommand extends AnyCommandDefinition> = CommandDefinitionParts<TCommand>['context'];
|
|
82
|
+
export type CommandResult<TCommand extends AnyCommandDefinition> = Awaited<CommandDefinitionParts<TCommand>['result']>;
|
|
83
83
|
type CommandSchema<TCommand extends AnyCommandDefinition> = CommandDefinitionParts<TCommand>['schema'];
|
|
84
|
-
type CommandPayload<TCommand extends AnyCommandDefinition> = CommandDefinitionParts<TCommand>['payload'];
|
|
84
|
+
export type CommandPayload<TCommand extends AnyCommandDefinition> = CommandDefinitionParts<TCommand>['payload'];
|
|
85
85
|
/**
|
|
86
86
|
* Infers the public command name from a command path.
|
|
87
87
|
*/
|
|
@@ -116,7 +116,7 @@ export type ResolvedCommand<TCommand extends AnyCommandDefinition> = {
|
|
|
116
116
|
/**
|
|
117
117
|
* Command resolved and validated without runtime context.
|
|
118
118
|
*/
|
|
119
|
-
export type PreparedCommand<TCommand extends AnyCommandDefinition> = {
|
|
119
|
+
export type PreparedCommand<TCommand extends AnyCommandDefinition> = TCommand extends AnyCommandDefinition ? {
|
|
120
120
|
name: CommandName<TCommand>;
|
|
121
121
|
path: TCommand['path'];
|
|
122
122
|
command: TCommand;
|
|
@@ -124,7 +124,7 @@ export type PreparedCommand<TCommand extends AnyCommandDefinition> = {
|
|
|
124
124
|
provided: InferProvidedOptions<CommandSchema<TCommand>>;
|
|
125
125
|
positionals: string[];
|
|
126
126
|
payload: CommandPayload<TCommand>;
|
|
127
|
-
};
|
|
127
|
+
} : never;
|
|
128
128
|
/**
|
|
129
129
|
* Defines a command while preserving literal option schema types.
|
|
130
130
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { defineCommand, defineCommandRegistry, IcoreError, isCommandName, mergeOptionsSchema, parseArgv, parseOptions, parseOptionsDetailed, prepareCommandFromArgs, resolveCommand, resolveCommandFromArgs, runCommand, runPreparedCommand, runCommandFromRegistry, type BooleanOption, type CommandDefinition, type CommandInput, type CommandName, type CommandRegistry, type CommandResolutionOptions, type InferOptions, type InferProvidedOptions, type IcoreErrorCode, type IcoreErrorDetails, type MergeOptionsSchemas, type NumberOption, type OptionDefinition, type OptionsSchema, type ParseOptionsResult, type ParsedArgv, type PreparedCommand, type PreparedCommandInput, type RawOptionValue, type ResolvedCommand, type StringOption } from './cli';
|
|
1
|
+
export { defineCommand, defineCommandRegistry, IcoreError, isCommandName, mergeOptionsSchema, parseArgv, parseOptions, parseOptionsDetailed, prepareCommandFromArgs, resolveCommand, resolveCommandFromArgs, runCommand, runPreparedCommand, runCommandFromRegistry, type BooleanOption, type CommandDefinition, type CommandContext, type CommandInput, type CommandName, type CommandPayload, type CommandRegistry, type CommandResolutionOptions, type CommandResult, type InferOptions, type InferProvidedOptions, type IcoreErrorCode, type IcoreErrorDetails, type MergeOptionsSchemas, type NumberOption, type OptionDefinition, type OptionsSchema, type ParseOptionsResult, type ParsedArgv, type PreparedCommand, type PreparedCommandInput, type RawOptionValue, type ResolvedCommand, type StringOption } from './cli';
|