@infosupport/huddle-cli 0.0.0-experiment-66.38.1 → 0.0.0-experiment-66.39.1

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.
@@ -33,9 +33,14 @@ function parseIssueNumber(raw) {
33
33
  * itself (install + restart) is done by self-update.ts. On a switch this
34
34
  * function does not return (process.exit with the exit code of the new process).
35
35
  */
36
- function ensureCliForChannel(relaunchArgs) {
36
+ function ensureCliForChannel(relaunchArgs, opts = {}) {
37
37
  const wanted = (0, config_1.activeExperiment)();
38
- if (wanted === cliExperiment())
38
+ // Normally we only switch when the experiment NUMBER differs — otherwise every
39
+ // command would reinstall. But `huddle experiment use <n>` must pick up a newer
40
+ // build of the SAME experiment (the CLI version is baked in, so the number
41
+ // alone can't tell 66.34 from 66.35): force a reinstall of the channel tag,
42
+ // which npm resolves to the latest build for that experiment.
43
+ if (!opts.force && wanted === cliExperiment())
39
44
  return;
40
45
  const spec = wanted !== undefined ? `${self_update_1.CLI_PACKAGE}@experiment-${wanted}` : `${self_update_1.CLI_PACKAGE}@latest`;
41
46
  try {
@@ -56,7 +61,9 @@ async function runExperimentUse(issue, initOpts = {}) {
56
61
  console.log((0, utils_1.green)(`Experiment ${issue} activated`) + (0, utils_1.dim)(` (${(0, config_1.configPath)()})`));
57
62
  const relaunchArgs = ['init', ...(initOpts.runtime ? ['--runtime', initOpts.runtime] : [])];
58
63
  try {
59
- ensureCliForChannel(relaunchArgs);
64
+ // Force: `use` always (re)installs the latest build of the target experiment,
65
+ // even when already on that experiment number, so a republished build lands.
66
+ ensureCliForChannel(relaunchArgs, { force: true });
60
67
  }
61
68
  catch (err) {
62
69
  // Activation failed → roll back the config so a subsequent `huddle init`
package/dist/init.js CHANGED
@@ -145,15 +145,10 @@ async function runInit(opts, images) {
145
145
  // network (moby/moby#36174). Which source IP the gateway sees for forwarded
146
146
  // traffic no longer matters — the control plane authenticates with the
147
147
  // operator token instead of source-IP filtering.
148
- // Team-managed firewall-rules folder (#69): the gateway can only read folders
149
- // the CLI binds into its container, so mount the configured host folder at the
150
- // same path (so the path stored in the DB setting resolves identically inside
151
- // the gateway). Read-only — Huddle never writes back to the team's Git folder.
152
- // Bind the CLI config dir (~/.huddle) read-write so the gateway/portal can
153
- // read and write the team-folder paths there (config.json is the single
154
- // source of truth). Then bind each configured team folder to a FIXED path so
155
- // the gateway reads it without ever knowing the host path. Read-only — Huddle
156
- // never writes back to the team's Git folders.
148
+ // Team-managed folders (#69). Bind the CLI config dir (~/.huddle) read-write so
149
+ // the gateway/portal read and write the folder paths there (config.json is the
150
+ // single source of truth), then bind each configured team folder to a FIXED
151
+ // path so the gateway reads it without knowing the host path. Read-only.
157
152
  const fwFolder = cfg.firewallRulesFolder?.trim();
158
153
  const extFolder = cfg.extensionsFolder?.trim();
159
154
  const homeMountFlag = ` -v "${config_1.CONFIG_DIR}:/huddle-home:rw" -e HUDDLE_HOME_DIR=/huddle-home`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infosupport/huddle-cli",
3
- "version": "0.0.0-experiment-66.38.1",
3
+ "version": "0.0.0-experiment-66.39.1",
4
4
  "description": "Huddle CLI — start devcontainers and manage firewall rules",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "author": "Info Support B.V.",