infraweaver 0.1.0 → 0.3.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.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](LICENSE)
4
4
  [![CI](https://github.com/infraweaver-io/infraweaver-action/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/infraweaver-io/infraweaver-action/actions/workflows/test.yml)
5
- [![Version](https://img.shields.io/badge/version-0.1.0-blue.svg)](package.json)
5
+ [![Version](https://img.shields.io/badge/version-0.3.0)](package.json) <!-- x-release-please-version -->
6
6
 
7
7
  **Infraweaver brings your Terraform up to best practice — automatically, as reviewable pull requests.**
8
8
 
@@ -57,7 +57,7 @@ jobs:
57
57
  - run: pipx install checkov
58
58
 
59
59
  - name: Run Infraweaver
60
- uses: infraweaver-io/infraweaver-action@main
60
+ uses: infraweaver-io/infraweaver-action@v0.2
61
61
  with:
62
62
  mode: remediate
63
63
  severity_threshold: medium # only act on medium+ concerns
@@ -227,11 +227,40 @@ pnpm test
227
227
  ```
228
228
 
229
229
  All contributions are accepted under the [Contributor License Agreement](CLA.md) (enforced by the CLA
230
- Assistant on your first PR). There are no tagged releases — consumers reference the action at
231
- `@main`, and [Conventional Commits](https://www.conventionalcommits.org) prefixes keep the history
232
- readable. See
230
+ Assistant on your first PR). Releases are cut automatically from
231
+ [Conventional Commits](https://www.conventionalcommits.org) prefixes, so the prefix on your PR title
232
+ decides both the changelog section and the version bump. See
233
233
  [`CONTRIBUTING.md`](CONTRIBUTING.md) for the full development, commit, and action-pinning conventions.
234
234
 
235
+ ## Versioning and pinning
236
+
237
+ Reference the action at a **tag**, never at `@main`. `main` is the development branch: it moves with every merge, is not release-gated, and can contain changes that were never published.
238
+
239
+ ```yaml
240
+ - uses: infraweaver-io/infraweaver-action@v0.2 # recommended
241
+ ```
242
+
243
+ Three tags are published for every release, and which one you pick is a real trade-off:
244
+
245
+ | Pin | Example | Picks up | Use when |
246
+ | ---------- | ---------------------- | --------------------------------- | ----------------------------------------------- |
247
+ | Minor | `@v0.2` | patches only (0.2.0 → 0.2.1) | **Default.** Fixes without surprises. |
248
+ | Major | `@v0` | every 0.x release | After 1.0. See the pre-1.0 warning below. |
249
+ | Exact | `@v0.2.0` | nothing — frozen | You bump deliberately, without a bot. |
250
+ | Commit SHA | `@a1b2c3d… # v0.2.0` | nothing — frozen, tamper-evident | Strictest supply-chain policy. |
251
+
252
+ ```yaml
253
+ - uses: infraweaver-io/infraweaver-action@a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0 # v0.2.0
254
+ ```
255
+
256
+ Dependabot and Renovate both understand this form and will raise a PR that rewrites the SHA and the
257
+ comment together — so a SHA pin costs you nothing in upkeep but does mean you receive fixes only when
258
+ you merge that PR.
259
+
260
+ Every release is published to npm with [trusted publishing](https://docs.npmjs.com/trusted-publishers)
261
+ and ships a signed CycloneDX SBOM as a release asset. See [`SECURITY.md`](SECURITY.md) for verification
262
+ steps and the supported-version window.
263
+
235
264
  ## Security
236
265
 
237
266
  Infraweaver runs AI coding agents with write access to repositories and CI secrets, and is positioned for
package/dist/cli.mjs CHANGED
@@ -177523,7 +177523,7 @@ var import_semver2 = __toESM(require_semver2(), 1);
177523
177523
  // package.json
177524
177524
  var package_default = {
177525
177525
  name: "infraweaver",
177526
- version: "0.1.0",
177526
+ version: "0.3.0",
177527
177527
  description: "GitHub Action that remediates Terraform to best practices and opens one scoped pull request per concern.",
177528
177528
  keywords: [
177529
177529
  "ai-coding-agent",
@@ -247441,7 +247441,7 @@ function buildLocalTools(ctx) {
247441
247441
  ];
247442
247442
  }
247443
247443
  function cliVersion() {
247444
- const raw2 = "0.1.0";
247444
+ const raw2 = "0.3.0";
247445
247445
  if (raw2 !== void 0 && /^\d+\.\d+\.\d+$/.test(raw2)) {
247446
247446
  return raw2;
247447
247447
  }
@@ -247636,7 +247636,7 @@ async function runVerifyEvidenceCli(params) {
247636
247636
  }
247637
247637
 
247638
247638
  // src/cli.ts
247639
- var VERSION10 = "0.1.0";
247639
+ var VERSION10 = "0.3.0";
247640
247640
  var bin = basename4(process.argv[1] || "");
247641
247641
  var PROG = bin === "pf" || bin === PRODUCT_SLUG ? bin : PRODUCT_SLUG;
247642
247642
  var rawArgs = process.argv.slice(2);
package/dist/index.js CHANGED
@@ -177287,7 +177287,7 @@ var import_semver2 = __toESM(require_semver2(), 1);
177287
177287
  // package.json
177288
177288
  var package_default = {
177289
177289
  name: "infraweaver",
177290
- version: "0.1.0",
177290
+ version: "0.3.0",
177291
177291
  description: "GitHub Action that remediates Terraform to best practices and opens one scoped pull request per concern.",
177292
177292
  keywords: [
177293
177293
  "ai-coding-agent",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "infraweaver",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "GitHub Action that remediates Terraform to best practices and opens one scoped pull request per concern.",
5
5
  "keywords": [
6
6
  "ai-coding-agent",
@@ -21,11 +21,11 @@ diff --git a/src/format.ts b/src/format.ts
21
21
  | | 4 | + | currency,
22
22
  | | 5 | + | }).format(amount);
23
23
  | 3 | 6 | | }
24
- | 4 | 7 | |
24
+ | 4 | 7 | |
25
25
  | 5 | 8 | | export function formatPercent(value: number) {
26
26
  | 6 | 9 | | return \`\${(value * 100).toFixed(1)}%\`;
27
27
  | 7 | 10 | | }
28
- | | 11 | + |
28
+ | | 11 | + |
29
29
  | | 12 | + | export function formatNumber(value: number, decimals = 2) {
30
30
  | | 13 | + | return new Intl.NumberFormat("en-US", {
31
31
  | | 14 | + | minimumFractionDigits: decimals,
@@ -38,17 +38,17 @@ diff --git a/src/math.ts b/src/math.ts
38
38
  +++ b/src/math.ts
39
39
  @@ -3,13 +3,16 @@ export function add(a: number, b: number) {
40
40
  | 3 | 3 | | }
41
- | 4 | 4 | |
41
+ | 4 | 4 | |
42
42
  | 5 | 5 | | export function subtract(a: number, b: number) {
43
43
  | 6 | | - | return a + b; // bug: should be a - b
44
44
  | | 6 | + | return a - b;
45
45
  | 7 | 7 | | }
46
- | 8 | 8 | |
46
+ | 8 | 8 | |
47
47
  | 9 | 9 | | export function multiply(a: number, b: number) {
48
48
  | 10 | | - | return a * b + 1; // bug: off by one
49
49
  | | 10 | + | return a * b;
50
50
  | 11 | 11 | | }
51
- | 12 | 12 | |
51
+ | 12 | 12 | |
52
52
  | 13 | 13 | | export function divide(a: number, b: number) {
53
53
  | | 14 | + | if (b === 0) {
54
54
  | | 15 | + | throw new Error("division by zero");
@@ -72,11 +72,11 @@ diff --git a/src/validate.ts b/src/validate.ts
72
72
  | | 1 | + | export function isPositive(n: number) {
73
73
  | | 2 | + | return n > 0;
74
74
  | | 3 | + | }
75
- | | 4 | + |
75
+ | | 4 | + |
76
76
  | | 5 | + | export function isInRange(value: number, min: number, max: number) {
77
77
  | | 6 | + | return value >= min && value <= max;
78
78
  | | 7 | + | }
79
- | | 8 | + |
79
+ | | 8 | + |
80
80
  | | 9 | + | export function isInteger(n: number) {
81
81
  | | 10 | + | return Number.isInteger(n);
82
82
  | | 11 | + | }
@@ -88,7 +88,7 @@ diff --git a/test/math.test.ts b/test/math.test.ts
88
88
  | 17 | 17 | | it("divides", () => {
89
89
  | 18 | 18 | | expect(divide(10, 2)).toBe(5);
90
90
  | 19 | 19 | | });
91
- | | 20 | + |
91
+ | | 20 | + |
92
92
  | | 21 | + | it("throws on division by zero", () => {
93
93
  | | 22 | + | expect(() => divide(1, 0)).toThrow("division by zero");
94
94
  | | 23 | + | });
@@ -447,7 +447,7 @@ export async function ensureGitHubToken(): Promise<void> {
447
447
  // when OIDC is available, always mint a fresh token scoped to
448
448
  // GITHUB_REPOSITORY. the inherited GITHUB_TOKEN may be scoped to a
449
449
  // different repo (e.g., runner token for infraweaver/app when tests
450
- // target infraweaver/test-repo).
450
+ // target infraweaver-io/test-repo).
451
451
  if (isOIDCAvailable()) {
452
452
  const token = await acquireNewToken();
453
453
  process.env.GITHUB_TOKEN = token;