@biffo/cli 0.278.3 → 0.279.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/dist/index.js +39 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3012,6 +3012,35 @@ function standardArguments(pluginName, handler) {
3012
3012
  // `terraform plan` for a whole environment. Filtered by declaration below,
3013
3013
  // so a Lambda-backed legacy module that does not declare it is unaffected.
3014
3014
  ["cdn_distribution_arn", "module.cdn.distribution_arn"],
3015
+ // biffo-template#1456: an installed plugin has no channel for
3016
+ // instance-specific configuration at all, and the first thing that needs
3017
+ // one is the deployment's own public origin — a plugin minting a
3018
+ // user-visible URL (e.g. a tracked link) cannot derive that from
3019
+ // BIFFO_CORE_API_URL, which is the execute-api gateway host, not the
3020
+ // branded domain.
3021
+ //
3022
+ // Routed through the module's existing `environment_variables` map
3023
+ // (declared in modules/plugins/_template/variables.tf, merged over
3024
+ // BIFFO_CORE_API_URL/BIFFO_PLUGIN_NAME in that module's main.tf) rather
3025
+ // than a new bespoke module variable — that hook already exists, already
3026
+ // reaches the Lambda, and plugins.core.tf already uses the identical
3027
+ // shape for orchestrator's email_branding_env. Adding a dedicated
3028
+ // `public_base_url` variable would be a second channel doing the same
3029
+ // job.
3030
+ //
3031
+ // `local.portal_url` is defined once in the *user-owned* main.tf
3032
+ // (custom_domain when set, else the CloudFront distribution domain) and
3033
+ // is reachable here because Terraform loads every *.tf file in a
3034
+ // directory as one module — no argument is being added to a module block
3035
+ // declared in another file (the #1538 trap), only a local referenced
3036
+ // across files in the same directory, which Terraform has always allowed.
3037
+ // It is safe to assume present in every environment this generator writes
3038
+ // into: `listEnvironments` already requires `enabled_plugins` to be
3039
+ // declared, and `portal_url` was extracted as a local two days before
3040
+ // `enabled_plugins` existed at all (8dd54065, predating 64677295) — so
3041
+ // any environment old enough to lack it predates the plugin system
3042
+ // entirely and is already excluded by that check.
3043
+ ["environment_variables", "{ BIFFO_PUBLIC_BASE_URL = local.portal_url }"],
3015
3044
  ["tags", "local.tags"]
3016
3045
  ];
3017
3046
  }
@@ -13257,6 +13286,10 @@ async function runDoctor(options, deps = { git: new GitAdapter() }) {
13257
13286
  behind,
13258
13287
  hasUpstream,
13259
13288
  isDirty,
13289
+ // localCoreVersion and remoteCoreVersion are deliberately decoded through
13290
+ // DIFFERENT code (#1544) — see readLocalCoreVersion's doc comment for why
13291
+ // a shared decode step here would make checkCoreVersionCurrency blind to
13292
+ // a fault in it.
13260
13293
  localCoreVersion: readLocalCoreVersion(options.cwd),
13261
13294
  remoteCoreVersion: parseCoreRecord(
13262
13295
  await git.showFileAtRef(options.cwd, `origin/${INTEGRATION_BRANCH}`, INSTANCE_CORE_FILE)
@@ -13271,7 +13304,7 @@ function readLocalCoreVersion(cwd) {
13271
13304
  const path = join54(cwd, INSTANCE_CORE_FILE);
13272
13305
  if (!existsSync44(path)) return null;
13273
13306
  try {
13274
- return parseCoreRecord(readFileSync38(path, "utf8"));
13307
+ return extractVersionField(readFileSync38(path, "utf8"));
13275
13308
  } catch {
13276
13309
  return null;
13277
13310
  }
@@ -13285,6 +13318,11 @@ function parseCoreRecord(contents) {
13285
13318
  return null;
13286
13319
  }
13287
13320
  }
13321
+ function extractVersionField(contents) {
13322
+ if (contents === null) return null;
13323
+ const match = /"version"\s*:\s*"(\d+\.\d+\.\d+)"/.exec(contents);
13324
+ return match?.[1] ?? null;
13325
+ }
13288
13326
  function readFossil(cwd) {
13289
13327
  const path = join54(cwd, CORE_VERSION_FILE);
13290
13328
  if (!existsSync44(path)) return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.278.3",
3
+ "version": "0.279.0",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",