@biffo/cli 0.324.14 → 0.326.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 +16 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3465,14 +3465,29 @@ function findNewUndeclaredSeams(baseDir, theirsDir, oursDir, portalRelDir = "app
3465
3465
  // src/lib/instance-adoption.ts
3466
3466
  import { existsSync as existsSync10, readFileSync as readFileSync8 } from "fs";
3467
3467
  import { join as join11 } from "path";
3468
+ var NO_CORE_API_MODULE_SOURCE = String.raw`(?<![\s\S])(?![\s\S]*^[ \t]*module[ \t]+"core_api"[ \t]*\{)`;
3468
3469
  var REGISTERED_ADOPTION_PAIRS = [
3469
3470
  {
3470
3471
  id: "core-api-environment",
3471
3472
  description: '`infra/environments/dev/core-api-environment.core.tf` declares `local.core_api_environment` (BIFFO_PLUGIN_MEDIA_BUCKET, BIFFO_PR_SIGNER_FUNCTION_NAME, ...), but `module "core_api"` is a user-owned block Terraform cannot inject an argument into from another file \u2014 so the channel only takes effect once `main.tf` itself merges it in (#1538/#1540/#1579).',
3472
3473
  templateFile: "infra/environments/dev/core-api-environment.core.tf",
3473
3474
  userFile: "infra/environments/dev/main.tf",
3474
- adoptedPattern: /environment_variables\s*=\s*merge\(\s*local\.core_api_environment\s*,/,
3475
+ // Adopted either by merging the channel into the instance's own block, or
3476
+ // (#1538 option 2) by deleting that block because core-api.core.tf now
3477
+ // declares the whole module and merges the channel itself.
3478
+ adoptedPattern: new RegExp(
3479
+ String.raw`environment_variables\s*=\s*merge\(\s*local\.core_api_environment\s*,|` + NO_CORE_API_MODULE_SOURCE,
3480
+ "m"
3481
+ ),
3475
3482
  remedy: 'In `module "core_api"` (infra/environments/dev/main.tf), change `environment_variables = {` to `environment_variables = merge(local.core_api_environment, {` and close the extra paren on the block\u2019s closing `}` \u2014 then `terraform apply`.'
3483
+ },
3484
+ {
3485
+ id: "core-api-module",
3486
+ description: '`infra/environments/dev/core-api.core.tf` declares the whole `module "core_api"` (#1538 option 2), so every argument rides `biffo core upgrade`. An instance whose user-owned `main.tf` still declares its own `module "core_api"` now has a `Duplicate module call`. No `moved` block is needed: the resource address does not include the declaring file, so state and the live Lambda are untouched.',
3487
+ templateFile: "infra/environments/dev/core-api.core.tf",
3488
+ userFile: "infra/environments/dev/main.tf",
3489
+ adoptedPattern: new RegExp(NO_CORE_API_MODULE_SOURCE, "m"),
3490
+ remedy: 'Delete the `module "core_api" { ... }` block from infra/environments/dev/main.tf (first move any instance-only arguments into `core_api_environment`), then run `terraform plan` and confirm module.core_api shows no changes to destroy/create.'
3476
3491
  }
3477
3492
  ];
3478
3493
  function isAdopted(pair, userFileContent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.324.14",
3
+ "version": "0.326.0",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",