@biffo/cli 0.278.4 → 0.279.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.
Files changed (2) hide show
  1. package/dist/index.js +38 -3
  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
  }
@@ -9248,7 +9277,7 @@ async function runPluginUpgrade(target, options, deps) {
9248
9277
  }
9249
9278
  if (manifest.tables.length > 0) {
9250
9279
  log.info(
9251
- `Generating migration for services/${entry.name}/'s ${manifest.tables.length} table(s)...`
9280
+ `Checking for a migration for services/${entry.name}/'s ${manifest.tables.length} table(s)...`
9252
9281
  );
9253
9282
  const generatedPaths = await deps.migrations.generate(options.cwd, [entry.name]);
9254
9283
  for (const absPath of generatedPaths) {
@@ -9256,6 +9285,10 @@ async function runPluginUpgrade(target, options, deps) {
9256
9285
  }
9257
9286
  if (generatedPaths.length > 0) {
9258
9287
  log.success(`Generated migration: ${relative5(options.cwd, generatedPaths[0])}`);
9288
+ } else {
9289
+ log.info(
9290
+ `${entry.name}'s tables and columns already match the manifest \u2014 no migration needed.`
9291
+ );
9259
9292
  }
9260
9293
  }
9261
9294
  const label = currentVersion ? `${entry.name} ${currentVersion} -> ${entry.version}` : `${entry.name} to ${entry.version}`;
@@ -9341,7 +9374,9 @@ async function runLocalPluginRefresh(localPath, options, deps) {
9341
9374
  if (generatedPaths.length > 0) {
9342
9375
  log.success(`Generated migration: ${relative5(options.cwd, generatedPaths[0])}`);
9343
9376
  } else {
9344
- log.info(`${source.name}'s table set is unchanged \u2014 no migration needed.`);
9377
+ log.info(
9378
+ `${source.name}'s tables and columns already match the manifest \u2014 no migration needed.`
9379
+ );
9345
9380
  }
9346
9381
  } else {
9347
9382
  log.info(`${source.name} declares no tables \u2014 nothing to migrate.`);
@@ -9419,7 +9454,7 @@ function printLocalDryRun(source, currentVersion, inTreeSource) {
9419
9454
  );
9420
9455
  if (source.manifest.tables.length > 0) {
9421
9456
  console.log(
9422
- ` Would check for a migration for ${source.manifest.tables.length} table(s) (only generated if the table set changed)`
9457
+ ` Would check for a migration for ${source.manifest.tables.length} table(s) (generated for a new table or an added column on an already-migrated table; a removed/retyped/nullability-changed column stops the refresh instead \u2014 #1539)`
9423
9458
  );
9424
9459
  }
9425
9460
  console.log(` Would commit: chore(plugins): refresh ${source.name} from local checkout
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.278.4",
3
+ "version": "0.279.1",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",