@lunarisdigitalsolutions/lunapack 1.2.0 → 1.4.0

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 (2) hide show
  1. package/CHANGELOG.md +275 -0
  2. package/package.json +8 -7
package/CHANGELOG.md ADDED
@@ -0,0 +1,275 @@
1
+ # Changelog
2
+
3
+ This file records externally observable changes for Luna CLI consumers. Exclude
4
+ pack-package, documentation, CI, build, test, and release-process changes.
5
+
6
+ ## Unreleased
7
+
8
+ Update this section before creating a release tag.
9
+
10
+ ## Version 1.4.0 - 2026-09-01
11
+
12
+ ### Conditional Hooks
13
+
14
+ - Managed-file selectors and lifecycle hooks now support
15
+ `isDefault(parameterName)` conditions. Conditional hooks are omitted before
16
+ instruction loading or script authorization, and `luna pack add hook`
17
+ accepts `--condition` or `-c`.
18
+
19
+ ## Version 1.3.0 - 2026-08-31
20
+
21
+ ### Completions
22
+
23
+ - `luna completions script` now generates native Bash, Fish, Nushell,
24
+ PowerShell, and Zsh Tab-completion registration without an external tool.
25
+ Pass `--install` to preview and append registration to the shell's user
26
+ configuration after an explicit confirmation that defaults to No.
27
+ Completion includes commands, options, valid finite values, available and
28
+ installed pack or link IDs, and configured source, link, and variable IDs.
29
+ - Shell completion now handles cursor positions beyond a shell's rendered
30
+ command line when trailing whitespace was stripped. Argument-taking commands
31
+ return value candidates, while command containers return no candidates.
32
+ - Nushell completion installation now uses `XDG_DATA_HOME` when configured and
33
+ the native macOS application data directory by default.
34
+
35
+ ### Changed
36
+
37
+ - `luna install --save-remap` now stores mappings on the installed pack's
38
+ `lunapack.yml` entry. Locked effective targets override pack remapping; pack
39
+ remapping overrides top-level project remapping.
40
+ - Install, update, and their dry runs now identify whether each reported
41
+ managed-target remapping came from command-line input, pack configuration,
42
+ top-level project configuration, or `lunapack-lock.yml`.
43
+
44
+ - Install and update dry runs now group source, managed-file, and lifecycle
45
+ actions under labeled sections with colored action prefixes. Successful
46
+ installs and updates list managed-file changes by default; use
47
+ `--no-file-change-output` to suppress that list.
48
+ - Install and update dry runs no longer list locked source identities under
49
+ lifecycle actions.
50
+ - CLI status and dry-run actions now use distinct ASCII markers for consistent
51
+ terminal rendering without relying on color to identify file operations.
52
+ Lifecycle dry runs group hook details by phase and report whether policy,
53
+ command arguments, persisted trust, or confirmation controls script consent.
54
+
55
+ ## Version 1.2.0 - 2026-08-29
56
+
57
+ ### Added
58
+
59
+ - Added persistent blanket lifecycle-script denial for portable project,
60
+ project-local user, and global-user scopes. Denial overrides `--scripts run`
61
+ and retained source or pack grants, reports every denying scope before
62
+ lifecycle work, and appears as `policy-denied` in dry runs. Trust commands can
63
+ list, set, and confirm reset of denial without deleting grants.
64
+ - `luna init` and `luna pack init` now generate minimal schema-valid YAML with
65
+ only required properties and values.
66
+ - `luna mv` now moves managed directories as atomic batches while preserving
67
+ descendant paths. `--save-remap` records file or directory moves as reusable
68
+ project mappings for future installs.
69
+ - `luna install --save-remap` now persists command-line file and directory
70
+ remappings after a successful pack or link installation.
71
+ - Managed-target remappings now accept `@ignore` to omit matching pack or link
72
+ files from installation, updates, and lock ownership. Newly ignored existing
73
+ files remain unchanged, and removing the mapping allows omitted files to be
74
+ installed later.
75
+
76
+ ### Fixed
77
+
78
+ - External-source identifier conflicts can now be canceled by submitting the
79
+ empty value offered by the interactive prompt.
80
+ - Managed files expanded from pack directory and glob selectors now honor exact
81
+ file remappings from project configuration and install command options.
82
+ - Project remappings with trailing `/` or `\\` separators now match declared
83
+ targets and persist effective targets without trailing separators.
84
+
85
+ ### Parameters
86
+
87
+ - Enum parameters can set `multiple: true` and resolve ordered, unique
88
+ selections from repeated CLI input, prompts, array defaults, project
89
+ variables, and composite bindings.
90
+ - Managed-file conditions support `"docker" in features`; Scriban templates,
91
+ lifecycle instructions, and script arguments support `features contains
92
+ "docker"`. Invalid, duplicate, or incompatible selections fail before
93
+ project mutation.
94
+
95
+ ### Pack Templates
96
+
97
+ - Managed-file Scriban templates can use `files.path` to resolve a declared
98
+ managed target after consumer remapping and `files.relative_path` to render a
99
+ path relative to the current effective target. Paths use `/` on every platform.
100
+ - Missing, conditionally excluded, or ambiguous managed-file references warn and
101
+ preserve the supplied declared target during install, update, and dry-run.
102
+
103
+ ## Version 1.1.0 - 2026-08-27
104
+
105
+ ### Luna Links
106
+
107
+ - Luna `1.1.0` adds project-owned links that select exact files, directories,
108
+ and globs from configured local or Git sources without requiring `pack.yml`.
109
+ - `luna search <query>` now includes matching configured links with their
110
+ source, target, and installation status.
111
+ - `luna links add`, `list`, `show`, and `rm` manage link definitions. Install,
112
+ update, outdated, audit, uninstall, and forced removal use lock-backed
113
+ ownership, content digests, conflict checks, and transaction rollback.
114
+ - Link installation now honors `--remap-directory` and `--remap-file`, recording
115
+ declared and effective target paths in lock ownership.
116
+ - Git links resolve immutable commits, materialize only selected blobs, and use
117
+ a verified user cache. Project and lock files containing links require Luna
118
+ `1.1.0` or later; version-1 files without links remain compatible.
119
+
120
+ ### Pack Authoring
121
+
122
+ - New `luna pack` commands initialize, inspect, validate, and incrementally
123
+ maintain managed content, composite references, ordered lifecycle hooks,
124
+ parameters, tags, and metadata in local `pack.yml`.
125
+ - `luna pack add hook`, `luna pack hooks`, and positioned `luna pack rm hook`
126
+ replace the former script-specific authoring commands. Hook lists and resolved
127
+ pack inspection now show ordered script and instruction details.
128
+ - Pack manifests require ID, semantic version, non-empty author, and non-empty
129
+ license. `luna pack init` accepts `--author` and `--license`, prompting for
130
+ missing values interactively. Discovery and search exclude manifests missing
131
+ either attribution value.
132
+ - Pack manifests support optional non-empty `name` and absolute HTTP or HTTPS
133
+ `homepage` metadata.
134
+
135
+ ### CLI Workflow
136
+
137
+ - Packs can declare external Git source aliases and select files, directories,
138
+ or globs from immutable commits. Install and update reuse equivalent workspace
139
+ sources, request graph-wide consent for missing sources, support
140
+ `--accept-sources`, and commit source configuration, managed files, and lock
141
+ provenance transactionally. Dry runs, outdated checks, audit, update, and
142
+ uninstall now report or preserve external-source mappings and ownership.
143
+ - `luna sources rm <name>` is the canonical, concise configuration-removal
144
+ command, with `remove` retained as a compatibility alias; it now refuses to
145
+ remove a source still used by an installed pack or its external content,
146
+ and otherwise clears source configuration and bound project trust while
147
+ retaining installed pack state, provenance, and managed files.
148
+ - `luna sources add git` and `luna sources add github` resolve a supplied
149
+ short branch or tag name to its complete ref through `git ls-remote`,
150
+ reject an ambiguous short name, and reject a repository that canonicalizes
151
+ to an already-configured source under a different name, URL form, or
152
+ casing.
153
+ - `luna sources add github` now requires `--ref`.
154
+ - `luna sources rename <current-id> <new-id>` renames a configured source and
155
+ atomically updates its bound trust and lock-file references.
156
+ - Running `luna` without a subcommand displays command help, summarizes
157
+ workspace maturity, and recommends the next setup, catalog, or lifecycle
158
+ commands.
159
+ - Successful core commands and recoverable missing-prerequisite or pack lookup
160
+ failures now include up to three contextual command recommendations.
161
+ - `luna --suppress-next-steps` suppresses contextual next-step recommendations for any
162
+ command.
163
+ - Successful actions, guidance, and lifecycle instructions now use semantic
164
+ terminal styling. Catalog and pack lifecycle summaries include duration, and
165
+ install and update success output includes selected versions.
166
+ - Pack parameters support typed defaults. Required prompts offer the default for
167
+ Enter acceptance; optional parameters bind it when no higher-precedence value exists.
168
+
169
+ ### Lifecycle Hooks
170
+
171
+ - **Breaking:** Pack manifests replace the top-level `scripts` map with ordered
172
+ event arrays under `hooks`. Every declaration requires `type: script` or
173
+ `type: instruction`; legacy `scripts` manifests are rejected.
174
+ - Lifecycle events can interleave multiple scripts and Markdown instructions in
175
+ declaration order. Script trust remains executable-only, while instructions
176
+ display one H2/H3 step at a time interactively or print completely in
177
+ noninteractive sessions.
178
+ - `luna install` and every `luna update` form accept `--skip-instructions`
179
+ independently of `--scripts`. Dry runs validate instructions and report their
180
+ file, templating state, and step count without guided display.
181
+ - Declining an untrusted lifecycle hook now warns and skips the hook instead of
182
+ failing the pack operation.
183
+ - Windows lifecycle commands such as `npm` now resolve through `PATHEXT`,
184
+ avoiding invalid extensionless command shims.
185
+ - Interactive lifecycle hooks now inherit terminal input and output, allowing
186
+ commands such as `npm init` to display and handle their prompts.
187
+ - Untrusted script consent now shows a concise command summary and defaults to no.
188
+ - Packs can declare ordered `preUninstall` and `postUninstall` hooks. Uninstall
189
+ retrieves them from exact installed releases and warns but continues when the
190
+ source is unavailable.
191
+ - Install, update, and uninstall checkpoint managed ownership before post hooks,
192
+ preventing hard interruption from leaving applied files under stale lock state.
193
+ Handled post-hook failures still restore prior files and state.
194
+ Instructions display automatically with a preface, omit H1 titles, and format
195
+ headings, emphasis, code, and links.
196
+
197
+ ## Version 1.0.0 - 2026-08-25
198
+
199
+ LunaPack 1.0.0 is the first public release for managing reusable, versioned
200
+ engineering packs in a consumer workspace.
201
+
202
+ ### CLI And Catalog
203
+
204
+ - `luna init` creates version-1 `lunapack.yml` and `lunapack-lock.yml` files.
205
+ - `luna sources add local`, `luna sources add git`, and `luna sources list`
206
+ configure and inspect local or Git pack catalogs. Git sources support a ref
207
+ and a repository-relative pack path.
208
+ - `luna discover` and `luna search` show the latest release by default in
209
+ separate Pack and Version columns. Both accept `--versions` (`-v`) from one
210
+ through 10 to display recent distinct releases per pack.
211
+ - `luna validate <id>[@<version>]` reports manifest and selected-source-file
212
+ issues. `luna inspect <id>[@<version>]` shows selected pack metadata,
213
+ parameters, and references. Discovery and search isolate invalid candidates
214
+ in otherwise usable sources.
215
+ - `luna variables list`, `set <name> <value>`, and `rm <name>` manage project
216
+ variables. `luna remap list`, `set`, and `rm` manage target remapping.
217
+ - Every command supports `--workspace`; command options provide documented
218
+ shorthand aliases and completion.
219
+ - `--log-level` (`-ll`) selects lower-case Spectre.Console output levels.
220
+ Diagnostics use distinct prefixes, long operations show progress, and
221
+ interactive decisions use console prompts.
222
+
223
+ ### Pack Lifecycle
224
+
225
+ - `luna install` resolves latest or exact pack releases. It supports multiple
226
+ ordered references, dry runs, project-relative destinations, parameters,
227
+ variables, conditions, templates, matching-file adoption, and composite
228
+ dependencies.
229
+ - Install warns and skips already-installed roots while continuing remaining
230
+ references. Missing explicit versions suggest the latest available version.
231
+ - `luna outdated` identifies roots with available updates. `luna update`
232
+ updates one root or all roots, supports dry runs, and can prompt for roots
233
+ during an all-pack update.
234
+ - `luna uninstall` conservatively removes unchanged, unshared managed content.
235
+ Missing targets warn without blocking ownership cleanup; line and JSON merge
236
+ targets remain in place.
237
+ - `luna mv` relocates one uniquely owned managed file and can rebind ownership
238
+ after a matching manual move. `luna audit` reports resolved packs, source
239
+ provenance, dependencies, and managed-file ownership.
240
+ - Pack manifests can declare `preInstall`, `postInstall`, `preUpdate`, and
241
+ `postUpdate` hooks. Install and update accept `--scripts prompt|run|skip`;
242
+ prompt mode requires source-specific trust or interactive consent, while run
243
+ mode explicitly authorizes hooks for that invocation.
244
+ - Lifecycle script arguments are strict Scriban templates over resolved pack
245
+ parameters. Luna renders each argument before dry-run output, authorization,
246
+ and execution while preserving one manifest item as one process argument.
247
+ - Lifecycle writes and Luna-managed project state are transactional. SHA-256
248
+ ownership checks protect consumer edits and immutable operation snapshots
249
+ protect approved script inputs.
250
+
251
+ ### Pack Authoring And Formats
252
+
253
+ - Version-1 schemas define project configuration, complete resolved lock state,
254
+ and pack manifests. Paths accept either separator at input boundaries and
255
+ persist with forward slashes.
256
+ - Lock files record exact dependency graphs, configured source identities,
257
+ immutable source provenance, declared and effective targets, parameters,
258
+ strategies, and installed-content digests.
259
+ - Packs support exact-version dependencies, composites, referenced-parameter
260
+ bindings, source files, directories, globs, conditions, UTF-8 Scriban
261
+ templates, and string, Boolean, or enum parameters.
262
+ - Managed files support copy, line merge, section merge, and JSON merge
263
+ strategies. Shared targets require compatible merge strategies.
264
+ - Pack manifests require non-empty license and author attribution, accept up to
265
+ 15 searchable tags, and require `template: true` before Scriban rendering.
266
+
267
+ ### Distribution
268
+
269
+ - Luna ships self-contained Native AOT archives for Windows x64, Linux x64,
270
+ Linux Arm64, macOS x64, and macOS Arm64; the
271
+ `@lunarisdigitalsolutions/lunapack` npm launcher with matching platform
272
+ packages; the `Lunaris.Lunapack.Luna` .NET tool package; and a Linux x64 OCI
273
+ image.
274
+ - Distribution packages expose the `luna` executable. Archive checksums and
275
+ package provenance support artifact verification.
package/package.json CHANGED
@@ -1,20 +1,21 @@
1
1
  {
2
2
  "name": "@lunarisdigitalsolutions/lunapack",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "Luna CLI.",
5
5
  "bin": {
6
6
  "luna": "run-luna.mjs"
7
7
  },
8
8
  "optionalDependencies": {
9
- "@lunarisdigitalsolutions/lunapack-win64": "1.2.0",
10
- "@lunarisdigitalsolutions/lunapack-linux-x64": "1.2.0",
11
- "@lunarisdigitalsolutions/lunapack-linux-arm64": "1.2.0",
12
- "@lunarisdigitalsolutions/lunapack-macos-x64": "1.2.0",
13
- "@lunarisdigitalsolutions/lunapack-macos-arm64": "1.2.0"
9
+ "@lunarisdigitalsolutions/lunapack-win64": "1.4.0",
10
+ "@lunarisdigitalsolutions/lunapack-linux-x64": "1.4.0",
11
+ "@lunarisdigitalsolutions/lunapack-linux-arm64": "1.4.0",
12
+ "@lunarisdigitalsolutions/lunapack-macos-x64": "1.4.0",
13
+ "@lunarisdigitalsolutions/lunapack-macos-arm64": "1.4.0"
14
14
  },
15
15
  "files": [
16
16
  "run-luna.mjs",
17
- "README.md"
17
+ "README.md",
18
+ "CHANGELOG.md"
18
19
  ],
19
20
  "license": "MIT",
20
21
  "repository": "github:lunarisdigitalsolutions/lunapack"