@biffo/cli 0.109.2 → 0.109.4

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.
@@ -13,9 +13,11 @@ repo; only its product differs.
13
13
  ## 1. One integration branch: `dev`
14
14
 
15
15
  - **`dev` is the integration branch** — you branch from it and open every PR back
16
- into it. There is one environment and no production, so there is one branch.
17
- `gh repo view --json defaultBranchRef` confirms it; if it reports anything other
18
- than `dev`, flag it rather than working around it.
16
+ into it; `gh repo view --json defaultBranchRef` confirms it. If it reports
17
+ anything other than `dev`, flag it rather than working around it. (A sibling app
18
+ also carries `staging` and a reserved `main`/production branch as promotion
19
+ targets — production not built yet; a plugin repo has `dev` only. Either way you
20
+ work off `dev`.)
19
21
  - **All changes land via PR.** No direct commits to `dev`, no force-pushes to it.
20
22
  Branch protection stays on.
21
23
  - Never leave the primary checkout parked on a feature branch or let it fall
@@ -12,9 +12,9 @@ name: CI
12
12
 
13
13
  on:
14
14
  push:
15
- branches: [dev, staging]
15
+ branches: [dev, staging, main]
16
16
  pull_request:
17
- branches: [dev, staging]
17
+ branches: [dev, staging, main]
18
18
  # Manual re-run, matching the core project's CI. Without this there is no way
19
19
  # to trigger CI on a protected branch without pushing to it — and a sibling
20
20
  # repo has the same branch protection, so the same recovery gap. See #293.
@@ -2,9 +2,9 @@ name: 'CodeQL'
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [dev, staging]
5
+ branches: [dev, staging, main]
6
6
  pull_request:
7
- branches: [dev, staging]
7
+ branches: [dev, staging, main]
8
8
  schedule:
9
9
  # Weekly catch-up scan (Tuesday 05:17 UTC) for issues that land outside
10
10
  # PR review (e.g. direct merges onto a branch).
@@ -10,7 +10,7 @@ name: Deploy
10
10
 
11
11
  on:
12
12
  push:
13
- branches: [dev, staging]
13
+ branches: [dev, staging, main]
14
14
  workflow_dispatch:
15
15
  inputs:
16
16
  environment:
@@ -13,9 +13,11 @@ repo; only its product differs.
13
13
  ## 1. One integration branch: `dev`
14
14
 
15
15
  - **`dev` is the integration branch** — you branch from it and open every PR back
16
- into it. There is one environment and no production, so there is one branch.
17
- `gh repo view --json defaultBranchRef` confirms it; if it reports anything other
18
- than `dev`, flag it rather than working around it.
16
+ into it; `gh repo view --json defaultBranchRef` confirms it. If it reports
17
+ anything other than `dev`, flag it rather than working around it. (A sibling app
18
+ also carries `staging` and a reserved `main`/production branch as promotion
19
+ targets — production not built yet; a plugin repo has `dev` only. Either way you
20
+ work off `dev`.)
19
21
  - **All changes land via PR.** No direct commits to `dev`, no force-pushes to it.
20
22
  Branch protection stays on.
21
23
  - Never leave the primary checkout parked on a feature branch or let it fall
package/dist/index.js CHANGED
@@ -1004,7 +1004,7 @@ var GitHubAdapter = class {
1004
1004
  }
1005
1005
  async configureBranchProtection(config, protectionIntervalMs = 3e3, statusChecks = DEFAULT_STATUS_CHECKS) {
1006
1006
  const { org, repo } = config.source_control.config;
1007
- const branches = ["dev", "staging"];
1007
+ const branches = ["dev", "staging", "main"];
1008
1008
  for (const branch of branches) {
1009
1009
  log.info(`Waiting for ${branch} branch to be ready...`);
1010
1010
  await this.waitForBranch(org, repo, branch);
@@ -1044,7 +1044,7 @@ var GitHubAdapter = class {
1044
1044
  }
1045
1045
  }
1046
1046
  }
1047
- log.success("Branch protection configured on dev and staging");
1047
+ log.success("Branch protection configured on dev, staging, and main");
1048
1048
  }
1049
1049
  async createEnvironments(config) {
1050
1050
  const { org, repo } = config.source_control.config;
@@ -5347,6 +5347,7 @@ function writeSiblingTemplate(templateRoot, targetDir, config, context) {
5347
5347
  async function configureSiblingGithub(github, config, coreConfig, session, coreIdentity) {
5348
5348
  const { org, repo } = githubRepo(config);
5349
5349
  await github.createBranch(org, repo, "staging", "dev");
5350
+ await github.createBranch(org, repo, "main", "dev");
5350
5351
  await github.setDefaultBranch(org, repo, "dev");
5351
5352
  await github.configureBranchProtection(config);
5352
5353
  await github.createEnvironments(config);
@@ -5694,8 +5695,9 @@ async function runInit(github, aws, config, session, appSibling) {
5694
5695
  }
5695
5696
  const { org, repo } = config.source_control.config;
5696
5697
  if (!hasCompleted(session, "github_branches")) {
5697
- log.step(5, totalSteps, "Creating the staging branch...");
5698
+ log.step(5, totalSteps, "Creating the staging and main branches...");
5698
5699
  await github.createBranch(org, repo, "staging", "dev");
5700
+ await github.createBranch(org, repo, "main", "dev");
5699
5701
  markStepComplete(session, "github_branches");
5700
5702
  } else {
5701
5703
  log.step(5, totalSteps, "Branches already created \u2014 skipping");
@@ -5833,7 +5835,7 @@ function appSiblingRegistryFiles(config) {
5833
5835
  }
5834
5836
  var INSTANCE_CONFIG_FILE = "biffo.config.json";
5835
5837
  var INSTANCE_FILE_BASE_BRANCH = "dev";
5836
- var INSTANCE_FILE_FOLLOWER_BRANCHES = ["staging"];
5838
+ var INSTANCE_FILE_FOLLOWER_BRANCHES = ["staging", "main"];
5837
5839
  var INSTANCE_FILE_BRANCHES = [
5838
5840
  INSTANCE_FILE_BASE_BRANCH,
5839
5841
  ...INSTANCE_FILE_FOLLOWER_BRANCHES
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.109.2",
3
+ "version": "0.109.4",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",