diff --git a/.changes/2.0.3.md b/.changes/2.0.3.md
deleted file mode 100644
index 717d697..0000000
--- a/.changes/2.0.3.md
+++ /dev/null
@@ -1,169 +0,0 @@
-# [2.0.3] (2022-11-01)
-
-### NOTES
-
-* Reduced occurrences of GitHub Actions warnings for setting output [#247](https://github.com/hashicorp/setup-terraform/pull/247)
-
-# [2.0.2] (2022-10-12)
-
-### BUG FIXES
-
-* Update 2.0.1 release metadata by @jpogran in https://github.com/hashicorp/setup-terraform/pull/253
-* `README.md` updates - direct links to license and code of conduct, updated GitHub documents link by @magnetikonline in https://github.com/hashicorp/setup-terraform/pull/244
-
-### INTERNAL
-
-* Bump jest from 29.0.3 to 29.1.2 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/248
-
-# [2.0.1] (2022-10-12)
-
-### ENHANCEMENTS
-
-* Do not fail when theres an exit-code 2 by @dannyibishev in https://github.com/hashicorp/setup-terraform/pull/125
-* Updated README to reflect GitHub limitations by @rnsc in https://github.com/hashicorp/setup-terraform/pull/205
-
-### BUG FIXES
-
-* Fix terraform extract by @cpc-camarj in https://github.com/hashicorp/setup-terraform/pull/187
-* Add new-style readme build badges, bump `actions/checkout` in `README.md` examples by @magnetikonline in https://github.com/hashicorp/setup-terraform/pull/188
-* Fixed `master` to `main` workflow branch triggers by @magnetikonline in https://github.com/hashicorp/setup-terraform/pull/216
-* Fix the example of how to comment on pull request. by @acarmel in https://github.com/hashicorp/setup-terraform/pull/220
-
-### INTERNAL
-
-* Bump @actions/core from 1.6.0 to 1.7.0 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/185
-* Bump @vercel/ncc from 0.33.3 to 0.33.4 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/182
-* Bump jest from 27.5.1 to 28.0.0 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/184
-* Bump jest from 28.0.0 to 28.0.3 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/190
-* Bump husky from 7.0.4 to 8.0.1 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/193
-* Bump jest from 28.0.3 to 28.1.0 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/194
-* Bump @actions/github from 5.0.1 to 5.0.3 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/201
-* Bump @actions/core from 1.7.0 to 1.8.2 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/200
-* Bump @actions/tool-cache from 1.7.2 to 2.0.1 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/199
-* TF DevEx: repo adoption by @detro in https://github.com/hashicorp/setup-terraform/pull/204
-* Bump nock from 13.2.4 to 13.2.6 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/212
-* Bump @vercel/ncc from 0.33.4 to 0.34.0 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/210
-* Bump jest from 28.1.0 to 28.1.1 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/215
-* Bump nock from 13.2.6 to 13.2.7 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/217
-* Bump jest from 28.1.1 to 28.1.2 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/221
-* Bump jest from 28.1.2 to 28.1.3 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/224
-* Bump nock from 13.2.7 to 13.2.9 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/225
-* Bump leonsteinhaeuser/project-beta-automations from 1.2.1 to 1.3.0 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/233
-* Bump leonsteinhaeuser/project-beta-automations from 1.3.0 to 2.0.0 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/243
-* Bump jest from 28.1.3 to 29.0.3 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/242
-* Bump @hashicorp/js-releases from 1.5.1 to 1.6.1 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/226
-* Bump @actions/core from 1.8.2 to 1.9.1 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/235
-* Bump @actions/core from 1.6.0 to 1.9.1 in /wrapper by @dependabot in https://github.com/hashicorp/setup-terraform/pull/236
-* Bump @actions/github from 5.0.3 to 5.1.1 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/249
-* Bump leonsteinhaeuser/project-beta-automations from 2.0.0 to 2.0.1 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/250
-
-# [2.0.0] (2022-04-18)
-
-BREAKING CHANGES:
-
-* Support Actions Runners v2.285.0 or later by upgrading to Nodejs v16 runtime by @chenrui333 in https://github.com/hashicorp/setup-terraform/pull/170
-
-NOTES:
-
-* docs: Update existing PR comments example by @tobiasbueschel in https://github.com/hashicorp/setup-terraform/pull/178
-* Update Terraform versions and usage in README examples by @ksatirli in https://github.com/hashicorp/setup-terraform/pull/176
-* Update grammar in README.md by @dustindortch in https://github.com/hashicorp/setup-terraform/pull/180
-
-INTERNAL:
-
-* Bump @actions/github from 5.0.0 to 5.0.1 by @dependabot in https://github.com/hashicorp/setup-terraform/pull/177
-* dependabot: track github-actions dependency changes by @chenrui333 in https://github.com/hashicorp/setup-terraform/pull/179
-
-# [1.4.0] (2022-04-04)
-
-NOTES:
-
- - Update readme using github-script@v5 by @krrrr38 in ([#135](https://github.com/hashicorp/setup-terraform/pull/135))
- - Update actions/github-script to v6 in README by @shouichi in ([#148](https://github.com/hashicorp/setup-terraform/pull/148))
-
-ENHANCEMENTS:
-
- - Improve output for PR comment by @skpy in ([#129](https://github.com/hashicorp/setup-terraform/pull/129))
- - Allow proxy values to be set by @rabun788 in ([#147](https://github.com/hashicorp/setup-terraform/pull/147))
-
-INTERNAL:
-
- - Allow dependabot to check node modules by @jlosito in ([#87](https://github.com/hashicorp/setup-terraform/pull/87))
- - Update js-releases to v1.4.0 by @aeschright in ([#111](https://github.com/hashicorp/setup-terraform/pull/111))
- - Updates Readme by @ndrone-kr in ([#86](https://github.com/hashicorp/setup-terraform/pull/86))
- - Update husky to v6.0 by @aeschright in ([#113](https://github.com/hashicorp/setup-terraform/pull/113))
- - Bump development dependencies by @jpogran in ([#153](https://github.com/hashicorp/setup-terraform/pull/153))
- - Bump node-fetch from 2.6.1 to 2.6.7 by @dependabot in ([#154](https://github.com/hashicorp/setup-terraform/pull/154))
- - Bump @actions/github from 4.0.0 to 5.0.0 by @dependabot in ([#114](https://github.com/hashicorp/setup-terraform/pull/114))
- - Bump @actions/io from 1.1.0 to 1.1.1 by @dependabot in ([#156](https://github.com/hashicorp/setup-terraform/pull/156))
- - Bump @actions/core from 1.2.7 to 1.6.0 by @dependabot in ([#158](https://github.com/hashicorp/setup-terraform/pull/158))
- - Bump @actions/tool-cache from 1.6.1 to 1.7.1 by @dependabot in ([#159](https://github.com/hashicorp/setup-terraform/pull/159))
- - Bump @actions/core from 1.2.7 to 1.6.0 by @jpogran in ([#160](https://github.com/hashicorp/setup-terraform/pull/160))
- - Bump @actions/exec from 1.0.4 to 1.1.0 by @jpogran in ([#161](https://github.com/hashicorp/setup-terraform/pull/161))
- - Bump @actions/io from 1.1.0 to 1.1.1 by @jpogran in ([#162](https://github.com/hashicorp/setup-terraform/pull/162))
- - Bump @hashicorp/js-releases from 1.5.0 to 1.5.1 by @dependabot in ([#166](https://github.com/hashicorp/setup-terraform/pull/166))
- - Bump minimist from 1.2.5 to 1.2.6 by @dependabot in ([#168](https://github.com/hashicorp/setup-terraform/pull/168))
- - Bump @actions/tool-cache from 1.7.1 to 1.7.2 by @dependabot in ([#164](https://github.com/hashicorp/setup-terraform/pull/164))
- - Bump @actions/io from 1.1.1 to 1.1.2 by @dependabot in ([#165](https://github.com/hashicorp/setup-terraform/pull/165))
- - Bump minimist from 1.2.5 to 1.2.6 in /wrapper by @dependabot in ([#169](https://github.com/hashicorp/setup-terraform/pull/169))
- - Add GitHub automatic release by @jpogran in ([#173](https://github.com/hashicorp/setup-terraform/pull/173))
-
-# [1.3.2] (2020-12-09)
-
-ENHANCEMENTS:
-
- - Update js-releases to fix missing dep in bundle ([#78](https://github.com/hashicorp/setup-terraform/pull/78))
-
-# [1.3.1] (2020-12-08)
-
-BUG FIXES:
-
- - Fix build dependency ([#76](https://github.com/hashicorp/setup-terraform/pull/76))
-
-# [1.3.0] (2020-12-08)
-
-ENHANCEMENTS:
-
- - Use `@hashicorp/js-releases` package to identify and download the specified version of Terraform. This will ensure that our tooling is consistent in how it works with the releases API, especially when handling pre-releases. ([#70](https://github.com/hashicorp/setup-terraform/pull/70), [#73](https://github.com/hashicorp/setup-terraform/pull/73))
-
-# [1.2.1] (2020-10-30)
-
-INTERNAL:
-
- - Update dependencies to resolve CVE-2020-15228 ([#63](https://github.com/hashicorp/setup-terraform/pull/63))
-
-# [1.2.0]
-
-ENHANCEMENTS:
-
- - Allow `terraform_version` to take a version constraint. ([#38](https://github.com/hashicorp/setup-terraform/pull/38))
-
-# [1.1.0]
-
-ENHANCEMENTS:
-
- - Ignore pre-release versions when `terraform_version` is set to `latest`. ([#19](https://github.com/hashicorp/setup-terraform/pull/19))
-
-# [1.0.1]
-
-INTERNAL:
-
- - Bump @actions/http-client from 1.0.6 to 1.0.8. ([#1](https://github.com/hashicorp/setup-terraform/pull/1))
-
-# [1.0.0]
-
- - Initial release.
-
-
-[Unreleased]: https://github.com/hashicorp/setup-terraform/compare/v2.0.2...main
-[2.0.2]: https://github.com/hashicorp/setup-terraform/compare/v2.0.1...v2.0.2
-[2.0.1]: https://github.com/hashicorp/setup-terraform/compare/v2.0.0...v2.0.1
-[2.0.0]: https://github.com/hashicorp/setup-terraform/compare/v1.4.0...v2.0.0
-[1.4.0]: https://github.com/hashicorp/setup-terraform/compare/v1.3.2...v1.4.0
-[1.3.2]: https://github.com/hashicorp/setup-terraform/compare/v1.3.1...v1.3.2
-[1.3.1]: https://github.com/hashicorp/setup-terraform/compare/v1.3.0...v1.3.1
-[1.3.0]: https://github.com/hashicorp/setup-terraform/compare/v1.2.1...v1.3.0
-[1.2.1]: https://github.com/hashicorp/setup-terraform/compare/v1.2.0...v1.2.1
-[1.2.0]: https://github.com/hashicorp/setup-terraform/compare/v1.1.0...v1.2.0
-[1.1.0]: https://github.com/hashicorp/setup-terraform/compare/v1.0.1...v1.1.0
-[1.0.1]: https://github.com/hashicorp/setup-terraform/compare/v1.0.0...v1.0.1
diff --git a/.changes/3.0.0.md b/.changes/3.0.0.md
deleted file mode 100644
index cf7415e..0000000
--- a/.changes/3.0.0.md
+++ /dev/null
@@ -1,11 +0,0 @@
-## 3.0.0 (2023-10-30)
-
-NOTES:
-
-* Updated default runtime to node20 ([#346](https://github.com/hashicorp/setup-terraform/issues/346))
-* The wrapper around the installed Terraform binary has been fixed to return the exact STDOUT and STDERR from Terraform when executing commands. Previous versions of setup-terraform may have required workarounds to process the STDOUT in bash, such as filtering out the first line or selectively parsing STDOUT with jq. These workarounds may need to be adjusted with `v3.0.0`, which will now return just the STDOUT/STDERR from Terraform with no errant characters/statements. ([#367](https://github.com/hashicorp/setup-terraform/issues/367))
-
-BUG FIXES:
-
-* Fixed malformed stdout when wrapper is enabled ([#367](https://github.com/hashicorp/setup-terraform/issues/367))
-
diff --git a/.changes/3.1.0.md b/.changes/3.1.0.md
deleted file mode 100644
index 891e949..0000000
--- a/.changes/3.1.0.md
+++ /dev/null
@@ -1,6 +0,0 @@
-## 3.1.0 (2024-04-23)
-
-ENHANCEMENTS:
-
-* Automatically fallback to darwin/amd64 for Terraform versions before 1.0.2 as releases for darwin/arm64 are not available ([#409](https://github.com/hashicorp/setup-terraform/issues/409))
-
diff --git a/.changes/3.1.1.md b/.changes/3.1.1.md
deleted file mode 100644
index cf81a82..0000000
--- a/.changes/3.1.1.md
+++ /dev/null
@@ -1,6 +0,0 @@
-## 3.1.1 (2024-05-07)
-
-BUG FIXES:
-
-* wrapper: Fix wrapper to output to stdout and stderr immediately when data is received ([#395](https://github.com/hashicorp/setup-terraform/issues/395))
-
diff --git a/.changes/3.1.2.md b/.changes/3.1.2.md
deleted file mode 100644
index 7d64e70..0000000
--- a/.changes/3.1.2.md
+++ /dev/null
@@ -1,6 +0,0 @@
-## 3.1.2 (2024-08-19)
-
-NOTES:
-
-* This release introduces no functional changes. It does however include dependency updates which address upstream CVEs. ([#430](https://github.com/hashicorp/setup-terraform/issues/430))
-
diff --git a/.changes/unreleased/.gitkeep b/.changes/unreleased/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/.changie.yaml b/.changie.yaml
deleted file mode 100644
index 2bf6de8..0000000
--- a/.changie.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
-changesDir: .changes
-unreleasedDir: unreleased
-changelogPath: CHANGELOG.md
-versionExt: md
-versionFormat: '## {{.Version}} ({{.Time.Format "2006-01-02"}})'
-kindFormat: '{{.Kind}}:'
-changeFormat: '* {{.Body}} ([#{{.Custom.Issue}}](https://github.com/hashicorp/setup-terraform/issues/{{.Custom.Issue}}))'
-custom:
- - key: Issue
- label: Issue/PR Number
- type: int
- minInt: 1
-kinds:
- - label: BREAKING CHANGES
- - label: NOTES
- - label: FEATURES
- - label: ENHANCEMENTS
- - label: BUG FIXES
-newlines:
- afterKind: 1
- beforeKind: 1
- endOfVersion: 2
\ No newline at end of file
diff --git a/.copywrite.hcl b/.copywrite.hcl
deleted file mode 100644
index 60b3623..0000000
--- a/.copywrite.hcl
+++ /dev/null
@@ -1,33 +0,0 @@
-schema_version = 1
-
-project {
- license = "MPL-2.0"
- copyright_year = 2020
-
- header_ignore = [
- # internal catalog metadata (prose)
- "META.d/**/*.yaml",
-
- # changie tooling configuration and CHANGELOG entries (prose)
- ".changes/unreleased/*.yaml",
- ".changie.yaml",
-
- # GitHub issue template configuration
- ".github/ISSUE_TEMPLATE/*.yml",
-
- # GitHub Actions workflow-specific configurations
- ".github/labeler-*.yml",
-
- # Github Action linting configuration
- ".github/actionlint.yaml",
-
- # Release Engineering tooling configuration
- ".release/*.hcl",
-
- # Auto-generated /dist
- "dist/**",
-
- # GitHub Action metadata file
- "action.yml",
- ]
-}
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
deleted file mode 100644
index 6dec1b0..0000000
--- a/.github/CODEOWNERS
+++ /dev/null
@@ -1 +0,0 @@
-* @hashicorp/terraform-core-plugins
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index c4eb07d..0000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-version: 2
-updates:
- - package-ecosystem: "npm"
- directory: "/"
- schedule:
- interval: "weekly"
- - package-ecosystem: "github-actions"
- directory: "/"
- groups:
- "github-actions":
- patterns:
- - "*" # Group all GitHub Actions dependencies together
- schedule:
- interval: "weekly"
- day: "monday"
- time: "09:00"
- timezone: "Etc/UTC"
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
deleted file mode 100644
index 38e8ce7..0000000
--- a/.github/pull_request_template.md
+++ /dev/null
@@ -1,16 +0,0 @@
-## Related Issue
-
-Fixes #
-
-## Description
-
-In plain English, describe your approach to addressing the issue linked above. For example, if you made a particular design decision, let us know why you chose this path instead of another solution.
-
-
-## Rollback Plan
-
-- [ ] If a change needs to be reverted, we will roll out an update to the code within 7 days.
-
-## Changes to Security Controls
-
-Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
diff --git a/.github/workflows/ci-changie.yml b/.github/workflows/ci-changie.yml
deleted file mode 100644
index 89729a6..0000000
--- a/.github/workflows/ci-changie.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-# Continuous integration handling for changie
-name: ci-changie
-
-on:
- pull_request:
- paths:
- - .changes/unreleased/*.yaml
- - .changie.yaml
- - .github/workflows/ci-changie.yml
-
-permissions:
- contents: read
-
-jobs:
- check:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- - uses: miniscruff/changie-action@5036dffa79ffc007110dc7f75eca7ef72780e147 # v2.1.0
- with:
- version: latest
- args: batch patch --dry-run
-
diff --git a/.github/workflows/compliance.yml b/.github/workflows/compliance.yml
deleted file mode 100644
index 44df5e3..0000000
--- a/.github/workflows/compliance.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-name: compliance
-
-on:
- pull_request:
-
-permissions:
- contents: read
-
-jobs:
- # Reference: ENGSRV-059
- copywrite:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- - uses: hashicorp/setup-copywrite@32638da2d4e81d56a0764aa1547882fc4d209636 # v1.1.3
- - run: copywrite headers --plan
- - run: copywrite license --plan
\ No newline at end of file
diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml
index 8c2e4ab..0a61a78 100644
--- a/.github/workflows/continuous-integration.yml
+++ b/.github/workflows/continuous-integration.yml
@@ -3,20 +3,35 @@ name: 'Continuous Integration'
on:
push:
branches:
- - main
+ - master
pull_request:
jobs:
- check-dist:
- name: Check dist/ directory
- uses: actions/reusable-workflows/.github/workflows/check-dist.yml@95d9656793415e47f574f7967f3850ea3bf5a7ed
- with:
- node-version: 20.x
- node-caching: npm
-
test:
name: Test
- uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@95d9656793415e47f574f7967f3850ea3bf5a7ed
- with:
- node-version: 20.x
- node-caching: npm
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ubuntu-latest, windows-latest, macos-latest]
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Setup Node.js 12.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: '12.x'
+
+ - name: Install
+ run: npm clean-install
+
+ - name: Verify
+ if: runner.os == 'Linux'
+ run: |
+ npm run build
+ # Fail if "npm run build" generated new changes in dist
+ git update-index --refresh dist/* && git diff-index --quiet HEAD dist
+
+ - name: Test
+ run: npm test
diff --git a/.github/workflows/data/delay/main.tf b/.github/workflows/data/delay/main.tf
deleted file mode 100644
index cbf7efb..0000000
--- a/.github/workflows/data/delay/main.tf
+++ /dev/null
@@ -1,11 +0,0 @@
-resource "null_resource" "previous" {}
-
-resource "time_sleep" "wait_30_seconds" {
- depends_on = [null_resource.previous]
-
- create_duration = "30s"
-}
-
-resource "null_resource" "next" {
- depends_on = [time_sleep.wait_30_seconds]
-}
diff --git a/.github/workflows/data/local/main.tf b/.github/workflows/data/local/main.tf
index 81ea344..77ea07a 100644
--- a/.github/workflows/data/local/main.tf
+++ b/.github/workflows/data/local/main.tf
@@ -1,5 +1,5 @@
-resource "random_pet" "pet" {}
-
-output "pet" {
- value = random_pet.pet.id
+resource "null_resource" "null" {
+ triggers = {
+ value = timestamp()
+ }
}
diff --git a/.github/workflows/issue-comment-triage.yml b/.github/workflows/issue-comment-triage.yml
deleted file mode 100644
index 00017cd..0000000
--- a/.github/workflows/issue-comment-triage.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-# DO NOT EDIT - This GitHub Workflow is managed by automation
-# https://github.com/hashicorp/terraform-devex-repos
-name: Issue Comment Triage
-
-on:
- issue_comment:
- types: [created]
-
-jobs:
- issue_comment_triage:
- runs-on: ubuntu-latest
- env:
- # issue_comment events are triggered by comments on issues and pull requests. Checking the
- # value of github.event.issue.pull_request tells us whether the issue is an issue or is
- # actually a pull request, allowing us to dynamically set the gh subcommand:
- # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment-on-issues-only-or-pull-requests-only
- COMMAND: ${{ github.event.issue.pull_request && 'pr' || 'issue' }}
- GH_TOKEN: ${{ github.token }}
- steps:
- - name: 'Remove waiting-response on comment'
- run: gh ${{ env.COMMAND }} edit ${{ github.event.issue.html_url }} --remove-label waiting-response
diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml
deleted file mode 100644
index 71719c4..0000000
--- a/.github/workflows/lock.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-# DO NOT EDIT - This GitHub Workflow is managed by automation
-# https://github.com/hashicorp/terraform-devex-repos
-name: 'Lock Threads'
-
-on:
- schedule:
- - cron: '0 10 * * *'
-
-jobs:
- lock:
- runs-on: ubuntu-latest
- steps:
- # NOTE: When TSCCR updates the GitHub action version, update the template workflow file to avoid drift:
- # https://github.com/hashicorp/terraform-devex-repos/blob/main/modules/repo/workflows/lock.tftpl
- - uses: dessant/lock-threads@7266a7ce5c1df01b1c6db85bf8cd86c737dadbe7 # v6.0.0
- with:
- process-only: 'issues, prs'
- github-token: ${{ github.token }}
- issue-inactive-days: '30'
- issue-lock-reason: resolved
- pr-inactive-days: '30'
- pr-lock-reason: resolved
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index 5619c4e..0000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,134 +0,0 @@
-name: release
-
-on:
- workflow_dispatch:
- inputs:
- versionNumber:
- description: 'Release version number (v#.#.#)'
- type: string
- required: true
-
-permissions:
- contents: read # Changelog commit operations use service account PAT
-
-jobs:
- major-version:
- runs-on: ubuntu-latest
- outputs:
- version: ${{ steps.major-version.outputs.version }}
- steps:
- - id: major-version
- run: echo "version=$(echo "${{ inputs.versionNumber }}" | cut -d. -f1)" >> "$GITHUB_OUTPUT"
-
- changelog-version:
- runs-on: ubuntu-latest
- outputs:
- version: ${{ steps.changelog-version.outputs.version }}
- steps:
- - id: changelog-version
- run: echo "version=$(echo "${{ inputs.versionNumber }}" | cut -c 2-)" >> "$GITHUB_OUTPUT"
-
- changelog:
- needs: changelog-version
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- with:
- fetch-depth: 0
- # Avoid persisting GITHUB_TOKEN credentials as they take priority over our service account PAT for `git push` operations
- # More details: https://github.com/actions/checkout/blob/b4626ce19ce1106186ddf9bb20e706842f11a7c3/adrs/0153-checkout-v2.md#persist-credentials
- persist-credentials: false
- - name: Batch changes
- uses: miniscruff/changie-action@5036dffa79ffc007110dc7f75eca7ef72780e147 # v2.1.0
- with:
- version: latest
- args: batch ${{ needs.changelog-version.outputs.version }}
- - name: Merge changes
- uses: miniscruff/changie-action@5036dffa79ffc007110dc7f75eca7ef72780e147 # v2.1.0
- with:
- version: latest
- args: merge
- - name: Git push changelog
- run: |
- git config --global user.name "${{ vars.TF_DEVEX_CI_COMMIT_AUTHOR }}"
- git config --global user.email "${{ vars.TF_DEVEX_CI_COMMIT_EMAIL }}"
- git add .
- git commit -a -m "Update changelog"
- git push "https://${{ vars.TF_DEVEX_CI_COMMIT_AUTHOR }}:${{ secrets.TF_DEVEX_COMMIT_GITHUB_TOKEN }}@github.com/${{ github.repository }}.git"
-
- update-package-version:
- needs: changelog
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- with:
- fetch-depth: 0
- # Default input is the SHA that initially triggered the workflow. As we created a new commit in the previous job,
- # to ensure we get the latest commit we use the ref for checkout: 'refs/heads/
+ * Heap buffer layout by offset:
+ * Validation Output
-
- \`\`\`\n
- ${{ steps.validate.outputs.stdout }}
- \`\`\`
-
- Show Plan
-
- \`\`\`\n
- ${process.env.PLAN}
- \`\`\`
-
+
+ \`\`\`${process.env.PLAN}\`\`\`
+
Validation Output
-
- \`\`\`\n
- ${{ steps.validate.outputs.stdout }}
- \`\`\`
-
- Show Plan
-
- \`\`\`\n
- ${process.env.PLAN}
- \`\`\`
-
-
) to the summary buffer
- *
- * @returns {Summary} summary instance
- */
- addSeparator() {
- const element = this.wrap('hr', null);
- return this.addRaw(element).addEOL();
- }
- /**
- * Adds an HTML line break (
) to the summary buffer
- *
- * @returns {Summary} summary instance
- */
- addBreak() {
- const element = this.wrap('br', null);
- return this.addRaw(element).addEOL();
- }
- /**
- * Adds an HTML blockquote to the summary buffer
- *
- * @param {string} text quote text
- * @param {string} cite (optional) citation url
- *
- * @returns {Summary} summary instance
- */
- addQuote(text, cite) {
- const attrs = Object.assign({}, (cite && { cite }));
- const element = this.wrap('blockquote', text, attrs);
- return this.addRaw(element).addEOL();
- }
- /**
- * Adds an HTML anchor tag to the summary buffer
- *
- * @param {string} text link text/content
- * @param {string} href hyperlink
- *
- * @returns {Summary} summary instance
- */
- addLink(text, href) {
- const element = this.wrap('a', text, { href });
- return this.addRaw(element).addEOL();
- }
-}
-const _summary = new Summary();
-/**
- * @deprecated use `core.summary`
- */
-exports.markdownSummary = _summary;
-exports.summary = _summary;
-//# sourceMappingURL=summary.js.map
-
-/***/ }),
-
-/***/ 302:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-// We use any as a valid input type
-/* eslint-disable @typescript-eslint/no-explicit-any */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.toCommandProperties = exports.toCommandValue = void 0;
-/**
- * Sanitizes an input into a string so it can be passed into issueCommand safely
- * @param input input to sanitize into a string
- */
-function toCommandValue(input) {
- if (input === null || input === undefined) {
- return '';
- }
- else if (typeof input === 'string' || input instanceof String) {
- return input;
- }
- return JSON.stringify(input);
-}
-exports.toCommandValue = toCommandValue;
-/**
- *
- * @param annotationProperties
- * @returns The command properties to send with the actual annotation command
- * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646
- */
-function toCommandProperties(annotationProperties) {
- if (!Object.keys(annotationProperties).length) {
- return {};
- }
- return {
- title: annotationProperties.title,
- file: annotationProperties.file,
- line: annotationProperties.startLine,
- endLine: annotationProperties.endLine,
- col: annotationProperties.startColumn,
- endColumn: annotationProperties.endColumn
- };
-}
-exports.toCommandProperties = toCommandProperties;
-//# sourceMappingURL=utils.js.map
-
-/***/ }),
-
-/***/ 5236:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-"use strict";
-
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getExecOutput = exports.exec = void 0;
-const string_decoder_1 = __nccwpck_require__(3193);
-const tr = __importStar(__nccwpck_require__(6665));
-/**
- * Exec a command.
- * Output will be streamed to the live console.
- * Returns promise with return code
- *
- * @param commandLine command to execute (can include additional args). Must be correctly escaped.
- * @param args optional arguments for tool. Escaping is handled by the lib.
- * @param options optional exec options. See ExecOptions
- * @returns Promise
+ * 0x0000 encryption key schedule
+ * 0x0400 decryption key schedule
+ * 0x0800 sbox
+ * 0x0c00 inv sbox
+ * 0x1000 encryption tables
+ * 0x2000 decryption tables
+ * 0x3000 reserved (future GCM multiplication lookup table)
+ * 0x4000 data
+ *
+ * Don't touch anything before 0x400.
+ *
>3,r-=c,a-=c<<3,n&=(1<=1&&0===P[g];g--);if(m>g&&(m=g),0===g)return n[a++]=20971520,n[a++]=20971520,o.bits=1,0;for(b=1;b =0;i--){for(var u=t.words[i],h=c-1;h>=0;h--){var d=u>>h&1;a!==r[0]&&(a=this.sqr(a)),0!==d||0!==s?(s<<=1,s|=d,(4===++o||0===i&&0===h)&&(a=this.mul(a,r[s]),o=0,s=0)):o=0}c=26}return a},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},n.mont=function(e){return new A(e)},i(A,k),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new n(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(i).iushrn(this.shift),s=a;return a.cmp(this.m)>=0?s=a.isub(this.m):a.cmpn(0)<0&&(s=a.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,gt)})),Jp=/*#__PURE__*/Object.freeze({__proto__:null,default:Qp,__moduleExports:Qp});class ey{constructor(e){if(void 0===e)throw Error("Invalid BigInteger input");this.value=new Qp(e)}clone(){const e=new ey(null);return this.value.copy(e.value),e}iinc(){return this.value.iadd(new Qp(1)),this}inc(){return this.clone().iinc()}idec(){return this.value.isub(new Qp(1)),this}dec(){return this.clone().idec()}iadd(e){return this.value.iadd(e.value),this}add(e){return this.clone().iadd(e)}isub(e){return this.value.isub(e.value),this}sub(e){return this.clone().isub(e)}imul(e){return this.value.imul(e.value),this}mul(e){return this.clone().imul(e)}imod(e){return this.value=this.value.umod(e.value),this}mod(e){return this.clone().imod(e)}modExp(e,t){const r=t.isEven()?Qp.red(t.value):Qp.mont(t.value),i=this.clone();return i.value=i.value.toRed(r).redPow(e.value).fromRed(),i}modInv(e){if(!this.gcd(e).isOne())throw Error("Inverse does not exist");return new ey(this.value.invm(e.value))}gcd(e){return new ey(this.value.gcd(e.value))}ileftShift(e){return this.value.ishln(e.value.toNumber()),this}leftShift(e){return this.clone().ileftShift(e)}irightShift(e){return this.value.ishrn(e.value.toNumber()),this}rightShift(e){return this.clone().irightShift(e)}equal(e){return this.value.eq(e.value)}lt(e){return this.value.lt(e.value)}lte(e){return this.value.lte(e.value)}gt(e){return this.value.gt(e.value)}gte(e){return this.value.gte(e.value)}isZero(){return this.value.isZero()}isOne(){return this.value.eq(new Qp(1))}isNegative(){return this.value.isNeg()}isEven(){return this.value.isEven()}abs(){const e=this.clone();return e.value=e.value.abs(),e}toString(){return this.value.toString()}toNumber(){return this.value.toNumber()}getBit(e){return this.value.testn(e)?1:0}bitLength(){return this.value.bitLength()}byteLength(){return this.value.byteLength()}toUint8Array(e="be",t){return this.value.toArrayLike(Uint8Array,e,t)}}var ty,ry=/*#__PURE__*/Object.freeze({__proto__:null,default:ey}),iy=mt((function(e,t){var r=t;function i(e){return 1===e.length?"0"+e:e}function n(e){for(var t="",r=0;rn.bindingSignatures[t].created&&(n.bindingSignatures[t]=e),!1;try{return await e.verify(i,ue.signature.subkeyBinding,a,t,void 0,r),!0}catch(e){return!1}})),await lh(e,this,"revocationSignatures",t,(function(e){return ph(i,ue.signature.subkeyRevocation,a,[e],void 0,void 0,t,r)}))}async revoke(e,{flag:t=ue.reasonForRevocation.noReason,string:r=""}={},i=new Date,n=we){const a={key:e,bind:this.keyPacket},s=new kh(this.keyPacket,this.mainKey);return s.revocationSignatures.push(await fh(a,null,e,{signatureType:ue.signature.subkeyRevocation,reasonForRevocationFlag:ue.write(ue.reasonForRevocation,t),reasonForRevocationString:r},i,void 0,void 0,!1,n)),await s.update(this),s}hasSameFingerprintAs(e){return this.keyPacket.hasSameFingerprintAs(e.keyPacket||e)}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","isDecrypted"].forEach((e=>{kh.prototype[e]=function(){return this.keyPacket[e]()}}));const Ah=/*#__PURE__*/de.constructAllowedPackets([Eu]),Sh=new Set([ue.packet.publicKey,ue.packet.privateKey]),Eh=new Set([ue.packet.publicKey,ue.packet.privateKey,ue.packet.publicSubkey,ue.packet.privateSubkey]);class Ph{packetListToStructure(e,t=new Set){let r,i,n,a;for(const s of e){if(s instanceof Rn){Eh.has(s.tag)&&!a&&(a=Sh.has(s.tag)?Sh:Eh);continue}const e=s.constructor.tag;if(a){if(!a.has(e))continue;a=null}if(t.has(e))throw Error("Unexpected packet type: "+e);switch(e){case ue.packet.publicKey:case ue.packet.secretKey:if(this.keyPacket)throw Error("Key block contains multiple keys");if(this.keyPacket=s,i=this.getKeyID(),!i)throw Error("Missing Key ID");break;case ue.packet.userID:case ue.packet.userAttribute:r=new _h(s,this),this.users.push(r);break;case ue.packet.publicSubkey:case ue.packet.secretSubkey:r=null,n=new kh(s,this),this.subkeys.push(n);break;case ue.packet.signature:switch(s.signatureType){case ue.signature.certGeneric:case ue.signature.certPersona:case ue.signature.certCasual:case ue.signature.certPositive:if(!r){de.printDebug("Dropping certification signatures without preceding user packet");continue}s.issuerKeyID.equals(i)?r.selfCertifications.push(s):r.otherCertifications.push(s);break;case ue.signature.certRevocation:r?r.revocationSignatures.push(s):this.directSignatures.push(s);break;case ue.signature.key:this.directSignatures.push(s);break;case ue.signature.subkeyBinding:if(!n){de.printDebug("Dropping subkey binding signature without preceding subkey packet");continue}n.bindingSignatures.push(s);break;case ue.signature.keyRevocation:this.revocationSignatures.push(s);break;case ue.signature.subkeyRevocation:if(!n){de.printDebug("Dropping subkey revocation signature without preceding subkey packet");continue}n.revocationSignatures.push(s)}}}}toPacketList(){const e=new Ku;return e.push(this.keyPacket),e.push(...this.revocationSignatures),e.push(...this.directSignatures),this.users.map((t=>e.push(...t.toPacketList()))),this.subkeys.map((t=>e.push(...t.toPacketList()))),e}clone(e=!1){const t=new this.constructor(this.toPacketList());return e&&t.getKeys().forEach((e=>{if(e.keyPacket=Object.create(Object.getPrototypeOf(e.keyPacket),Object.getOwnPropertyDescriptors(e.keyPacket)),!e.keyPacket.isDecrypted())return;const t={};Object.keys(e.keyPacket.privateParams).forEach((r=>{t[r]=new Uint8Array(e.keyPacket.privateParams[r])})),e.keyPacket.privateParams=t})),t}getSubkeys(e=null){return this.subkeys.filter((t=>!e||t.getKeyID().equals(e,!0)))}getKeys(e=null){const t=[];return e&&!this.getKeyID().equals(e,!0)||t.push(this),t.concat(this.getSubkeys(e))}getKeyIDs(){return this.getKeys().map((e=>e.getKeyID()))}getUserIDs(){return this.users.map((e=>e.userID?e.userID.userID:null)).filter((e=>null!==e))}write(){return this.toPacketList().write()}async getSigningKey(e=null,t=new Date,r={},i=we){await this.verifyPrimaryKey(t,r,i);const n=this.keyPacket,a=this.subkeys.slice().sort(((e,t)=>t.keyPacket.created-e.keyPacket.created));let s;for(const r of a)if(!e||r.getKeyID().equals(e))try{await r.verify(t,i);const e={key:n,bind:r.keyPacket},a=await oh(r.bindingSignatures,n,ue.signature.subkeyBinding,e,t,i);if(!gh(r.keyPacket,a))continue;if(!a.embeddedSignature)throw Error("Missing embedded signature");return await oh([a.embeddedSignature],r.keyPacket,ue.signature.keyBinding,e,t,i),vh(r.keyPacket,i),r}catch(e){s=e}try{const a=await this.getPrimaryUser(t,r,i);if((!e||n.getKeyID().equals(e))&&gh(n,a.selfCertification))return vh(n,i),this}catch(e){s=e}throw de.wrapError("Could not find valid signing key packet in key "+this.getKeyID().toHex(),s)}async getEncryptionKey(e,t=new Date,r={},i=we){await this.verifyPrimaryKey(t,r,i);const n=this.keyPacket,a=this.subkeys.slice().sort(((e,t)=>t.keyPacket.created-e.keyPacket.created));let s;for(const r of a)if(!e||r.getKeyID().equals(e))try{await r.verify(t,i);const e={key:n,bind:r.keyPacket},a=await oh(r.bindingSignatures,n,ue.signature.subkeyBinding,e,t,i);if(mh(r.keyPacket,a))return vh(r.keyPacket,i),r}catch(e){s=e}try{const a=await this.getPrimaryUser(t,r,i);if((!e||n.getKeyID().equals(e))&&mh(n,a.selfCertification))return vh(n,i),this}catch(e){s=e}throw de.wrapError("Could not find valid encryption key packet in key "+this.getKeyID().toHex(),s)}async isRevoked(e,t,r=new Date,i=we){return ph(this.keyPacket,ue.signature.keyRevocation,{key:this.keyPacket},this.revocationSignatures,e,t,r,i)}async verifyPrimaryKey(e=new Date,t={},r=we){const i=this.keyPacket;if(await this.isRevoked(null,null,e,r))throw Error("Primary key is revoked");const{selfCertification:n}=await this.getPrimaryUser(e,t,r);if(ch(i,n,e))throw Error("Primary key is expired");const a=await oh(this.directSignatures,i,ue.signature.key,{key:i},e,r).catch((()=>{}));if(a&&ch(i,a,e))throw Error("Primary key is expired")}async getExpirationTime(e,t=we){let r;try{const{selfCertification:i}=await this.getPrimaryUser(null,e,t),n=yh(this.keyPacket,i),a=i.getExpirationTime(),s=await oh(this.directSignatures,this.keyPacket,ue.signature.key,{key:this.keyPacket},null,t).catch((()=>{}));if(s){const e=yh(this.keyPacket,s);r=Math.min(n,a,e)}else r=ne.subkeys.some((e=>t.hasSameFingerprintAs(e)))))))throw Error("Cannot update public key with private key if subkeys mismatch");return e.update(this,r)}const i=this.clone();return await lh(e,i,"revocationSignatures",t,(n=>ph(i.keyPacket,ue.signature.keyRevocation,i,[n],null,e.keyPacket,t,r))),await lh(e,i,"directSignatures",t),await Promise.all(e.users.map((async e=>{const n=i.users.filter((t=>e.userID&&e.userID.equals(t.userID)||e.userAttribute&&e.userAttribute.equals(t.userAttribute)));if(n.length>0)await Promise.all(n.map((i=>i.update(e,t,r))));else{const t=e.clone();t.mainKey=i,i.users.push(t)}}))),await Promise.all(e.subkeys.map((async e=>{const n=i.subkeys.filter((t=>t.hasSameFingerprintAs(e)));if(n.length>0)await Promise.all(n.map((i=>i.update(e,t,r))));else{const t=e.clone();t.mainKey=i,i.subkeys.push(t)}}))),i}async getRevocationCertificate(e=new Date,t=we){const r={key:this.keyPacket},i=await oh(this.revocationSignatures,this.keyPacket,ue.signature.keyRevocation,r,e,t),n=new Ku;return n.push(i),Me(ue.armor.publicKey,n.write(),null,null,"This is a revocation certificate")}async applyRevocationCertificate(e,t=new Date,r=we){const i=await xe(e,r),n=(await Ku.fromBinary(i.data,Ah,r)).findPacket(ue.packet.signature);if(!n||n.signatureType!==ue.signature.keyRevocation)throw Error("Could not find revocation signature packet");if(!n.issuerKeyID.equals(this.getKeyID()))throw Error("Revocation signature does not match key");try{await n.verify(this.keyPacket,ue.signature.keyRevocation,{key:this.keyPacket},t,void 0,r)}catch(e){throw de.wrapError("Could not verify revocation signature",e)}const a=this.clone();return a.revocationSignatures.push(n),a}async signPrimaryUser(e,t,r,i=we){const{index:n,user:a}=await this.getPrimaryUser(t,r,i),s=await a.certify(e,t,i),o=this.clone();return o.users[n]=s,o}async signAllUsers(e,t=new Date,r=we){const i=this.clone();return i.users=await Promise.all(this.users.map((function(i){return i.certify(e,t,r)}))),i}async verifyPrimaryUser(e,t=new Date,r,i=we){const n=this.keyPacket,{user:a}=await this.getPrimaryUser(t,r,i);return e?await a.verifyAllCertifications(e,t,i):[{keyID:n.getKeyID(),valid:await a.verify(t,i).catch((()=>!1))}]}async verifyAllUsers(e,t=new Date,r=we){const i=this.keyPacket,n=[];return await Promise.all(this.users.map((async a=>{const s=e?await a.verifyAllCertifications(e,t,r):[{keyID:i.getKeyID(),valid:await a.verify(t,r).catch((()=>!1))}];n.push(...s.map((e=>({userID:a.userID?a.userID.userID:null,userAttribute:a.userAttribute,keyID:e.keyID,valid:e.valid}))))}))),n}}["getKeyID","getFingerprint","getAlgorithmInfo","getCreationTime","hasSameFingerprintAs"].forEach((e=>{Ph.prototype[e]=kh.prototype[e]}));class xh extends Ph{constructor(e){if(super(),this.keyPacket=null,this.revocationSignatures=[],this.directSignatures=[],this.users=[],this.subkeys=[],e&&(this.packetListToStructure(e,new Set([ue.packet.secretKey,ue.packet.secretSubkey])),!this.keyPacket))throw Error("Invalid key: missing public-key packet")}isPrivate(){return!1}toPublic(){return this}armor(e=we){return Me(ue.armor.publicKey,this.toPacketList().write(),void 0,void 0,void 0,e)}}class Mh extends xh{constructor(e){if(super(),this.packetListToStructure(e,new Set([ue.packet.publicKey,ue.packet.publicSubkey])),!this.keyPacket)throw Error("Invalid key: missing private-key packet")}isPrivate(){return!0}toPublic(){const e=new Ku,t=this.toPacketList();for(const r of t)switch(r.constructor.tag){case ue.packet.secretKey:{const t=Vu.fromSecretKeyPacket(r);e.push(t);break}case ue.packet.secretSubkey:{const t=Xu.fromSecretSubkeyPacket(r);e.push(t);break}default:e.push(r)}return new xh(e)}armor(e=we){return Me(ue.armor.privateKey,this.toPacketList().write(),void 0,void 0,void 0,e)}async getDecryptionKeys(e,t=new Date,r={},i=we){const n=this.keyPacket,a=[];for(let r=0;r