@imfusion/web-ui 0.5.1-dev.6.gec5b9f17 → 0.5.1-dev.7.ga571658e

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/README.md CHANGED
@@ -48,7 +48,8 @@ To install the skills, run this command after the package is installed:
48
48
  npx web-ui-install-skills
49
49
  ```
50
50
 
51
- The binary will ask you which LLM client you want to use and install everything it needs.
51
+ The binary asks which LLM client you use and installs everything it needs. Run it again after a version bump and it refreshes
52
+ the directories it already installed into, without asking again — `--reconfigure` re-opens that choice.
52
53
 
53
54
  **Available consumer skills - `/imf-web-ui-*`**
54
55
 
@@ -11,6 +11,9 @@
11
11
  // When both targets are selected, .agents/skills/ holds the real copy and
12
12
  // .claude/skills/ symlinks it (this repo's own convention) so the two
13
13
  // can't drift apart.
14
+ //
15
+ // Flags: --target claude|agents (repeatable) for scripted installs,
16
+ // --reconfigure to re-open the target prompt on an existing install.
14
17
 
15
18
  import {
16
19
  cpSync,
@@ -86,6 +89,16 @@ function writeSymlink(linkPath, targetPath) {
86
89
  symlinkSync(relative(dirname(linkPath), targetPath), linkPath);
87
90
  }
88
91
 
92
+ // A prior install is recoverable from the filesystem, so a re-run doesn't
93
+ // re-ask: a target counts as chosen when any bundled skill is present under
94
+ // it. Symlinks count — they're how the both-targets layout represents
95
+ // .claude/, and lstat avoids following them into the real copy.
96
+ function detectInstalledTargets(skills) {
97
+ return Object.keys(TARGETS).filter(key =>
98
+ skills.some(name => lstatSync(resolve(TARGETS[key].root, name), { throwIfNoEntry: false }))
99
+ );
100
+ }
101
+
89
102
  // --target claude|agents (repeatable) selects targets without the
90
103
  // interactive prompt — for CI and scripted installs.
91
104
  function parseTargetFlags(argv) {
@@ -105,7 +118,9 @@ function parseTargetFlags(argv) {
105
118
 
106
119
  async function main() {
107
120
  const skills = discoverSkills();
108
- const flagTargets = parseTargetFlags(process.argv.slice(2));
121
+ const argv = process.argv.slice(2);
122
+ const flagTargets = parseTargetFlags(argv);
123
+ const reconfigure = argv.includes("--reconfigure");
109
124
 
110
125
  p.intro(`@imfusion/web-ui — install the ${SKILL_PREFIX} skills (${skills.length})`);
111
126
 
@@ -116,6 +131,8 @@ async function main() {
116
131
  return;
117
132
  }
118
133
 
134
+ const installedTargets = detectInstalledTargets(skills);
135
+
119
136
  const existingVersions = Object.values(TARGETS)
120
137
  .flatMap(({ root }) => skills.map(name => readInstalledVersion(resolve(root, name))))
121
138
  .filter(Boolean);
@@ -132,6 +149,12 @@ async function main() {
132
149
  if (flagTargets.length > 0) {
133
150
  selected = flagTargets;
134
151
  p.log.info(`Targets from --target flags: ${selected.join(", ")}`);
152
+ } else if (installedTargets.length > 0 && !reconfigure) {
153
+ selected = installedTargets;
154
+ p.log.info(
155
+ `Refreshing the existing install: ${selected.map(key => displayPath(TARGETS[key].root)).join(", ")}` +
156
+ ` — pass --reconfigure to choose different targets.`
157
+ );
135
158
  } else {
136
159
  selected = await p.multiselect({
137
160
  message: "Install into which skill directory (or directories)?",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imfusion/web-ui",
3
- "version": "0.5.1-dev.6.gec5b9f17",
3
+ "version": "0.5.1-dev.7.ga571658e",
4
4
  "description": "The official Web UI component library for ImFusion web apps",
5
5
  "author": "ImFusion GmbH",
6
6
  "license": "UNLICENSED",