also looking at this
feat: prepare maintained SDK source releases
#3
12 files
+173
-88
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | #!/usr/bin/env node |
| 2 | 2 | const fs = require('fs') |
| 3 | 3 | const path = require('path') |
| 4 | const { Updater } = require('tuf-js') | |
| 4 | const { Updater } = require('@stacksjs/tuf-js') | |
| 5 | 5 | const yargs = require('yargs/yargs') |
| 6 | 6 | const { hideBin } = require('yargs/helpers') |
| 7 | 7 | |
| @@ -1,38 +1,80 @@ | ||
| 1 | name: Release | |
| 1 | name: SDK source release | |
| 2 | 2 | |
| 3 | 3 | on: |
| 4 | 4 | push: |
| 5 | branches: | |
| 6 | - main | |
| 5 | tags: ['sdk-v*'] | |
| 7 | 6 | |
| 8 | 7 | permissions: |
| 9 | 8 | contents: read |
| 10 | 9 | |
| 11 | 10 | jobs: |
| 12 | 11 | release: |
| 13 | name: Release packages | |
| 12 | name: Qualify and publish maintained client archive | |
| 14 | 13 | runs-on: ubuntu-latest |
| 15 | 14 | permissions: |
| 16 | 15 | contents: write |
| 17 | pull-requests: write | |
| 18 | id-token: write | |
| 19 | 16 | steps: |
| 20 | - name: Checkout source | |
| 21 | uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v3 | |
| 17 | - name: Checkout exact release source | |
| 18 | uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| 19 | with: | |
| 20 | fetch-depth: 0 | |
| 22 | 21 | |
| 23 | - name: Setup node | |
| 24 | uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v3 | |
| 22 | - name: Setup Node | |
| 23 | uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e | |
| 25 | 24 | with: |
| 26 | node-version: 24.x | |
| 27 | registry-url: 'https://registry.npmjs.org' | |
| 25 | node-version: 22 | |
| 28 | 26 | cache: npm |
| 29 | 27 | |
| 30 | - name: Install dependencies | |
| 31 | run: npm ci | |
| 28 | - name: Install frozen dependencies | |
| 29 | run: npm ci --ignore-scripts | |
| 32 | 30 | |
| 33 | - name: Create Release Pull Request | |
| 34 | uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b # v1.8.0 | |
| 35 | with: | |
| 36 | publish: npm run release | |
| 31 | - name: Build and pack maintained client | |
| 32 | run: npm run release | |
| 33 | ||
| 34 | - name: Test exact source | |
| 35 | run: npm run test:ci | |
| 36 | ||
| 37 | - name: Lint source | |
| 38 | run: npm run lint:check | |
| 39 | ||
| 40 | - name: Check formatting | |
| 41 | run: npm run prettier:check | |
| 42 | ||
| 43 | - name: Verify release identity and record archive integrity | |
| 44 | env: | |
| 45 | RELEASE_TAG: ${{ github.ref_name }} | |
| 46 | run: | | |
| 47 | node --input-type=module <<'NODE' | |
| 48 | import assert from 'node:assert/strict'; | |
| 49 | import { createHash } from 'node:crypto'; | |
| 50 | import { readFileSync, writeFileSync, readdirSync } from 'node:fs'; | |
| 51 | import { execFileSync } from 'node:child_process'; | |
| 52 | const pkg = JSON.parse(readFileSync('packages/client/package.json', 'utf8')); | |
| 53 | assert.equal(pkg.name, '@stacksjs/tuf-js'); | |
| 54 | assert.equal(process.env.RELEASE_TAG, `sdk-v${pkg.version}`); | |
| 55 | execFileSync('git', ['diff', '--exit-code']); | |
| 56 | execFileSync('git', ['diff', '--cached', '--exit-code']); | |
| 57 | const commit = execFileSync('git', ['rev-parse', 'HEAD'], { encoding: 'utf8' }).trim(); | |
| 58 | execFileSync('git', ['merge-base', '--is-ancestor', commit, 'origin/main']); | |
| 59 | const archive = `stacksjs-tuf-js-${pkg.version}.tgz`; | |
| 60 | assert.deepEqual(readdirSync('.release').filter(name => name.endsWith('.tgz')), [archive]); | |
| 61 | const bytes = readFileSync(`.release/${archive}`); | |
| 62 | const sha512 = createHash('sha512').update(bytes).digest('hex'); | |
| 63 | const sha256 = createHash('sha256').update(bytes).digest('hex'); | |
| 64 | writeFileSync('.release/SHA512SUMS', `${sha512} ${archive}\n`); | |
| 65 | writeFileSync('.release/source.json', JSON.stringify({ | |
| 66 | package: pkg.name, version: pkg.version, | |
| 67 | repository: 'https://github.com/stacksjs/tuf-js', | |
| 68 | commit, tag: process.env.RELEASE_TAG, archive, sha512, sha256, | |
| 69 | distribution: 'GitHub release archive; not an upstream npm publication', | |
| 70 | }, null, 2) + '\n'); | |
| 71 | writeFileSync('.release/notes.md', `Maintained source client ${pkg.name}@${pkg.version}.\n\nSource commit: ${commit}.\n\nThe archive includes the upstream MIT license. Verify SHA512SUMS and retain the frozen application lockfile. This is a maintained fork, not an upstream npm release.\n`); | |
| 72 | NODE | |
| 73 | ||
| 74 | - name: Publish source release assets | |
| 37 | 75 | env: |
| 38 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| 76 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| 77 | RELEASE_TAG: ${{ github.ref_name }} | |
| 78 | run: | | |
| 79 | gh release create "$RELEASE_TAG" .release/*.tgz .release/SHA512SUMS .release/source.json \ | |
| 80 | --verify-tag --title "@stacksjs/tuf-js $RELEASE_TAG" --notes-file .release/notes.md | |
| @@ -1,3 +1,16 @@ | ||
| 1 | # Stacks-maintained TUF client | |
| 2 | ||
| 3 | This repository maintains the `@stacksjs/tuf-js` source client and its verified | |
| 4 | metadata observation extensions. The source is forked from | |
| 5 | [theupdateframework/tuf-js](https://github.com/theupdateframework/tuf-js), with | |
| 6 | its original MIT attribution retained. See the [client documentation](packages/client/README.md) | |
| 7 | for the extension contract and versioned GitHub release distribution. | |
| 8 | ||
| 9 | The remaining workspace packages support source development and conformance | |
| 10 | checks. They are not published by this fork's SDK release workflow. The original | |
| 11 | upstream project overview follows for context; its maintainers do not maintain | |
| 12 | or endorse these fork-specific extensions. | |
| 13 | ||
| 1 | 14 | # <img src="https://cdn.rawgit.com/theupdateframework/artwork/3a649fa6/tuf-logo.svg" height="100" valign="middle" alt="TUF"/> A Framework for Securing Software Update Systems |
| 2 | 15 | |
| 3 | 16 | [](https://www.npmjs.com/package/tuf-js) [](https://github.com/theupdateframework/tuf-js/actions/workflows/ci.yml) [](https://github.com/theupdateframework/tuf-js/actions/workflows/smoke-test.yml) [](https://github.com/theupdateframework/tuf-js/actions/workflows/conformance.yml) |
| @@ -43,12 +56,12 @@ Please see [TUF's website](https://theupdateframework.com/) for more information | ||
| 43 | 56 | |
| 44 | 57 | ## License |
| 45 | 58 | |
| 46 | This project is licensed under the terms of the MIT open source license. Please refer to [MIT](./LICENSE.md) for the full terms. | |
| 59 | This project is licensed under the terms of the MIT open source license. Please refer to [MIT](./LICENSE) for the full terms. | |
| 47 | 60 | |
| 48 | 61 | ## Code of Conduct |
| 49 | 62 | |
| 50 | 63 | Please note that this project is released with a [Contributor Code of Conduct](./CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. |
| 51 | 64 | |
| 52 | ## Maintainers | |
| 65 | ## Upstream maintainers | |
| 53 | 66 | |
| 54 | 67 | `tuf-js` is maintained by [@ejahnGithub](https://github.com/ejahnGithub) and [@bdehamer](https://github.com/bdehamer) on the Package Security team at GitHub. |
| @@ -4531,6 +4531,10 @@ | ||
| 4531 | 4531 | "node": ">=18.0.0" |
| 4532 | 4532 | } |
| 4533 | 4533 | }, |
| 4534 | "node_modules/@stacksjs/tuf-js": { | |
| 4535 | "resolved": "packages/client", | |
| 4536 | "link": true | |
| 4537 | }, | |
| 4534 | 4538 | "node_modules/@szmarczak/http-timer": { |
| 4535 | 4539 | "version": "5.0.1", |
| 4536 | 4540 | "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", |
| @@ -9970,10 +9974,6 @@ | ||
| 9970 | 9974 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", |
| 9971 | 9975 | "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" |
| 9972 | 9976 | }, |
| 9973 | "node_modules/tuf-js": { | |
| 9974 | "resolved": "packages/client", | |
| 9975 | "link": true | |
| 9976 | }, | |
| 9977 | 9977 | "node_modules/tunnel-agent": { |
| 9978 | 9978 | "version": "0.6.0", |
| 9979 | 9979 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", |
| @@ -10402,13 +10402,13 @@ | ||
| 10402 | 10402 | }, |
| 10403 | 10403 | "packages/cli": { |
| 10404 | 10404 | "name": "@tufjs/cli", |
| 10405 | "version": "0.6.0", | |
| 10405 | "version": "0.6.1", | |
| 10406 | 10406 | "license": "MIT", |
| 10407 | 10407 | "dependencies": { |
| 10408 | 10408 | "@oclif/color": "^1.0.13", |
| 10409 | 10409 | "@oclif/core": "^4", |
| 10410 | 10410 | "@oclif/plugin-help": "^6", |
| 10411 | "tuf-js": "6.0.0" | |
| 10411 | "@stacksjs/tuf-js": "6.0.1" | |
| 10412 | 10412 | }, |
| 10413 | 10413 | "bin": { |
| 10414 | 10414 | "tuf": "bin/run" |
| @@ -10423,8 +10423,8 @@ | ||
| 10423 | 10423 | } |
| 10424 | 10424 | }, |
| 10425 | 10425 | "packages/client": { |
| 10426 | "name": "tuf-js", | |
| 10427 | "version": "6.0.0", | |
| 10426 | "name": "@stacksjs/tuf-js", | |
| 10427 | "version": "6.0.1", | |
| 10428 | 10428 | "license": "MIT", |
| 10429 | 10429 | "dependencies": { |
| 10430 | 10430 | "@gar/promise-retry": "^1.0.3", |
| @@ -11864,8 +11864,7 @@ | ||
| 11864 | 11864 | "version": "10.0.1", |
| 11865 | 11865 | "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", |
| 11866 | 11866 | "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", |
| 11867 | "dev": true, | |
| 11868 | "requires": {} | |
| 11867 | "dev": true | |
| 11869 | 11868 | }, |
| 11870 | 11869 | "@eslint/object-schema": { |
| 11871 | 11870 | "version": "3.0.5", |
| @@ -11961,8 +11960,7 @@ | ||
| 11961 | 11960 | "version": "3.0.10", |
| 11962 | 11961 | "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz", |
| 11963 | 11962 | "integrity": "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==", |
| 11964 | "dev": true, | |
| 11965 | "requires": {} | |
| 11963 | "dev": true | |
| 11966 | 11964 | }, |
| 11967 | 11965 | "mute-stream": { |
| 11968 | 11966 | "version": "2.0.0", |
| @@ -12093,8 +12091,7 @@ | ||
| 12093 | 12091 | "version": "3.0.10", |
| 12094 | 12092 | "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz", |
| 12095 | 12093 | "integrity": "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==", |
| 12096 | "dev": true, | |
| 12097 | "requires": {} | |
| 12094 | "dev": true | |
| 12098 | 12095 | }, |
| 12099 | 12096 | "mute-stream": { |
| 12100 | 12097 | "version": "2.0.0", |
| @@ -12152,8 +12149,7 @@ | ||
| 12152 | 12149 | "version": "3.0.10", |
| 12153 | 12150 | "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz", |
| 12154 | 12151 | "integrity": "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==", |
| 12155 | "dev": true, | |
| 12156 | "requires": {} | |
| 12152 | "dev": true | |
| 12157 | 12153 | }, |
| 12158 | 12154 | "mute-stream": { |
| 12159 | 12155 | "version": "2.0.0", |
| @@ -12247,8 +12243,7 @@ | ||
| 12247 | 12243 | "version": "3.0.10", |
| 12248 | 12244 | "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz", |
| 12249 | 12245 | "integrity": "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==", |
| 12250 | "dev": true, | |
| 12251 | "requires": {} | |
| 12246 | "dev": true | |
| 12252 | 12247 | }, |
| 12253 | 12248 | "mute-stream": { |
| 12254 | 12249 | "version": "2.0.0", |
| @@ -12306,8 +12301,7 @@ | ||
| 12306 | 12301 | "version": "3.0.10", |
| 12307 | 12302 | "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz", |
| 12308 | 12303 | "integrity": "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==", |
| 12309 | "dev": true, | |
| 12310 | "requires": {} | |
| 12304 | "dev": true | |
| 12311 | 12305 | }, |
| 12312 | 12306 | "mute-stream": { |
| 12313 | 12307 | "version": "2.0.0", |
| @@ -12405,8 +12399,7 @@ | ||
| 12405 | 12399 | "version": "3.0.10", |
| 12406 | 12400 | "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz", |
| 12407 | 12401 | "integrity": "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==", |
| 12408 | "dev": true, | |
| 12409 | "requires": {} | |
| 12402 | "dev": true | |
| 12410 | 12403 | }, |
| 12411 | 12404 | "mute-stream": { |
| 12412 | 12405 | "version": "2.0.0", |
| @@ -12464,8 +12457,7 @@ | ||
| 12464 | 12457 | "version": "3.0.10", |
| 12465 | 12458 | "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz", |
| 12466 | 12459 | "integrity": "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==", |
| 12467 | "dev": true, | |
| 12468 | "requires": {} | |
| 12460 | "dev": true | |
| 12469 | 12461 | }, |
| 12470 | 12462 | "mute-stream": { |
| 12471 | 12463 | "version": "2.0.0", |
| @@ -12524,8 +12516,7 @@ | ||
| 12524 | 12516 | "version": "3.0.10", |
| 12525 | 12517 | "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz", |
| 12526 | 12518 | "integrity": "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==", |
| 12527 | "dev": true, | |
| 12528 | "requires": {} | |
| 12519 | "dev": true | |
| 12529 | 12520 | }, |
| 12530 | 12521 | "mute-stream": { |
| 12531 | 12522 | "version": "2.0.0", |
| @@ -13815,6 +13806,17 @@ | ||
| 13815 | 13806 | "tslib": "^2.6.2" |
| 13816 | 13807 | } |
| 13817 | 13808 | }, |
| 13809 | "@stacksjs/tuf-js": { | |
| 13810 | "version": "file:packages/client", | |
| 13811 | "requires": { | |
| 13812 | "@gar/promise-retry": "^1.0.3", | |
| 13813 | "@tufjs/models": "5.0.0", | |
| 13814 | "@tufjs/repo-mock": "5.0.0", | |
| 13815 | "@types/debug": "^4.1.13", | |
| 13816 | "@types/retry": "^0.12.5", | |
| 13817 | "debug": "^4.4.3" | |
| 13818 | } | |
| 13819 | }, | |
| 13818 | 13820 | "@szmarczak/http-timer": { |
| 13819 | 13821 | "version": "5.0.1", |
| 13820 | 13822 | "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", |
| @@ -13839,10 +13841,10 @@ | ||
| 13839 | 13841 | "@oclif/color": "^1.0.13", |
| 13840 | 13842 | "@oclif/core": "^4", |
| 13841 | 13843 | "@oclif/plugin-help": "^6", |
| 13844 | "@stacksjs/tuf-js": "6.0.1", | |
| 13842 | 13845 | "oclif": "^4.23.10", |
| 13843 | 13846 | "shx": "^0.4.0", |
| 13844 | "tslib": "^2.8.1", | |
| 13845 | "tuf-js": "6.0.0" | |
| 13847 | "tslib": "^2.8.1" | |
| 13846 | 13848 | } |
| 13847 | 13849 | }, |
| 13848 | 13850 | "@tufjs/models": { |
| @@ -14096,8 +14098,7 @@ | ||
| 14096 | 14098 | "version": "8.60.1", |
| 14097 | 14099 | "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.60.1.tgz", |
| 14098 | 14100 | "integrity": "sha512-nh8w4qAteiKuZu3pSSzG/yGKpw0OlkrKnzFmbVRenKaD4qc+7i1GrmZaLVkr8rk4uipiPGMOW4YsM6WmKZ5CvA==", |
| 14099 | "dev": true, | |
| 14100 | "requires": {} | |
| 14101 | "dev": true | |
| 14101 | 14102 | }, |
| 14102 | 14103 | "@typescript-eslint/type-utils": { |
| 14103 | 14104 | "version": "8.60.1", |
| @@ -14348,8 +14349,7 @@ | ||
| 14348 | 14349 | "version": "5.3.2", |
| 14349 | 14350 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", |
| 14350 | 14351 | "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", |
| 14351 | "dev": true, | |
| 14352 | "requires": {} | |
| 14352 | "dev": true | |
| 14353 | 14353 | }, |
| 14354 | 14354 | "ajv": { |
| 14355 | 14355 | "version": "6.14.0", |
| @@ -14825,8 +14825,7 @@ | ||
| 14825 | 14825 | "version": "1.7.2", |
| 14826 | 14826 | "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz", |
| 14827 | 14827 | "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==", |
| 14828 | "dev": true, | |
| 14829 | "requires": {} | |
| 14828 | "dev": true | |
| 14830 | 14829 | }, |
| 14831 | 14830 | "deep-is": { |
| 14832 | 14831 | "version": "0.1.4", |
| @@ -16010,8 +16009,7 @@ | ||
| 16010 | 16009 | "version": "1.2.3", |
| 16011 | 16010 | "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", |
| 16012 | 16011 | "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", |
| 16013 | "dev": true, | |
| 16014 | "requires": {} | |
| 16012 | "dev": true | |
| 16015 | 16013 | }, |
| 16016 | 16014 | "jest-regex-util": { |
| 16017 | 16015 | "version": "30.4.0", |
| @@ -17578,8 +17576,7 @@ | ||
| 17578 | 17576 | "fdir": { |
| 17579 | 17577 | "version": "6.5.0", |
| 17580 | 17578 | "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", |
| 17581 | "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", | |
| 17582 | "requires": {} | |
| 17579 | "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==" | |
| 17583 | 17580 | }, |
| 17584 | 17581 | "picomatch": { |
| 17585 | 17582 | "version": "4.0.4", |
| @@ -17607,8 +17604,7 @@ | ||
| 17607 | 17604 | "version": "2.5.0", |
| 17608 | 17605 | "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", |
| 17609 | 17606 | "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", |
| 17610 | "dev": true, | |
| 17611 | "requires": {} | |
| 17607 | "dev": true | |
| 17612 | 17608 | }, |
| 17613 | 17609 | "ts-jest": { |
| 17614 | 17610 | "version": "29.4.11", |
| @@ -17640,17 +17636,6 @@ | ||
| 17640 | 17636 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", |
| 17641 | 17637 | "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" |
| 17642 | 17638 | }, |
| 17643 | "tuf-js": { | |
| 17644 | "version": "file:packages/client", | |
| 17645 | "requires": { | |
| 17646 | "@gar/promise-retry": "^1.0.3", | |
| 17647 | "@tufjs/models": "5.0.0", | |
| 17648 | "@tufjs/repo-mock": "5.0.0", | |
| 17649 | "@types/debug": "^4.1.13", | |
| 17650 | "@types/retry": "^0.12.5", | |
| 17651 | "debug": "^4.4.3" | |
| 17652 | } | |
| 17653 | }, | |
| 17654 | 17639 | "tunnel-agent": { |
| 17655 | 17640 | "version": "0.6.0", |
| 17656 | 17641 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", |
| @@ -13,7 +13,9 @@ | ||
| 13 | 13 | "prettier:check": "prettier --check packages/**/*.ts", |
| 14 | 14 | "lint": "eslint --fix", |
| 15 | 15 | "lint:check": "eslint --max-warnings 0", |
| 16 | "release": "npm run build && changeset publish" | |
| 16 | "release": "npm run build && npm pack --workspace @stacksjs/tuf-js --pack-destination .release", | |
| 17 | "prerelease": "node -e \"require('node:fs').mkdirSync('.release', { recursive: true })\"", | |
| 18 | "release:patch": "changeset version && npm install --package-lock-only --ignore-scripts --lockfile-version=2 && npm run release" | |
| 17 | 19 | }, |
| 18 | 20 | "devDependencies": { |
| 19 | 21 | "@changesets/cli": "^2.31.0", |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | { |
| 2 | 2 | "name": "@tufjs/cli", |
| 3 | "version": "0.6.0", | |
| 3 | "version": "0.6.1", | |
| 4 | 4 | "description": "CLI for interacting with TUF repositories", |
| 5 | 5 | "author": "bdehamer@github.com", |
| 6 | 6 | "license": "MIT", |
| @@ -43,7 +43,7 @@ | ||
| 43 | 43 | "@oclif/color": "^1.0.13", |
| 44 | 44 | "@oclif/core": "^4", |
| 45 | 45 | "@oclif/plugin-help": "^6", |
| 46 | "tuf-js": "6.0.0" | |
| 46 | "@stacksjs/tuf-js": "6.0.1" | |
| 47 | 47 | }, |
| 48 | 48 | "devDependencies": { |
| 49 | 49 | "oclif": "^4.23.10", |
| @@ -2,7 +2,7 @@ import { Command, Flags } from '@oclif/core'; | ||
| 2 | 2 | import * as fs from 'fs'; |
| 3 | 3 | import * as os from 'os'; |
| 4 | 4 | import * as path from 'path'; |
| 5 | import { Updater } from 'tuf-js'; | |
| 5 | import { Updater } from '@stacksjs/tuf-js'; | |
| 6 | 6 | |
| 7 | 7 | export default class DownloadTarget extends Command { |
| 8 | 8 | static override aliases = ['download']; |
| @@ -1,4 +1,13 @@ | ||
| 1 | # tuf-js | |
| 1 | # @stacksjs/tuf-js | |
| 2 | ||
| 3 | ## 6.0.1 | |
| 4 | ||
| 5 | ### Patch Changes | |
| 6 | ||
| 7 | - Publish the maintained source client with awaited verified-metadata observation, | |
| 8 | owned reference time and metadata bytes, and typed persistence/verification | |
| 9 | failures. Preserve upstream MIT attribution and distribute the qualified package | |
| 10 | through versioned GitHub release archives. | |
| 2 | 11 | |
| 3 | 12 | ## 6.0.0 |
| 4 | 13 | |
| @@ -1,10 +1,10 @@ | ||
| 1 | # tuf-js | |
| 1 | # @stacksjs/tuf-js | |
| 2 | 2 | |
| 3 | 3 | JavaScript TUF client implementation. |
| 4 | 4 | |
| 5 | 5 | ## Verified metadata observation |
| 6 | 6 | |
| 7 | This source branch adds optional `UpdaterOptions.onVerifiedMetadata(role, bytes)`. | |
| 7 | This maintained source adds optional `UpdaterOptions.onVerifiedMetadata(role, bytes)`. | |
| 8 | 8 | The updater awaits the observer after metadata verification and before its cache |
| 9 | 9 | write or the next metadata request. Each call receives an owned byte copy. A |
| 10 | 10 | rejection becomes `PersistError` with its exact original cause and aborts the |
| @@ -27,5 +27,29 @@ its in-memory trust set, make cache writes transactional, or provide a protected | ||
| 27 | 27 | trust store. Applications must implement those boundaries independently. |
| 28 | 28 | |
| 29 | 29 | These extensions are maintained source changes, not options present in the |
| 30 | unmodified upstream 6.0.0 package. Release and qualify this source before removing | |
| 31 | an application's legacy distribution patch. | |
| 30 | unmodified upstream 6.0.0 package. Consume a qualified, versioned source release before removing an application's | |
| 31 | legacy distribution patch. | |
| 32 | ||
| 33 | ## Maintained distribution | |
| 34 | ||
| 35 | This client is maintained in [stacksjs/tuf-js](https://github.com/stacksjs/tuf-js), | |
| 36 | a fork of [theupdateframework/tuf-js](https://github.com/theupdateframework/tuf-js). | |
| 37 | The original MIT attribution is retained in `LICENSE`. This package is distinct | |
| 38 | from the upstream npm package named `tuf-js`. | |
| 39 | ||
| 40 | Versioned SDK releases use tags of the form `sdk-v6.0.1` and publish the package | |
| 41 | archive, `SHA512SUMS` and `source.json` on GitHub. The release workflow rebuilds | |
| 42 | and packs the exact tagged source, then tests it before publication. No npm registry | |
| 43 | publication or upstream endorsement is implied. | |
| 44 | ||
| 45 | Applications may retain the import name `tuf-js` by using that dependency key | |
| 46 | with the exact GitHub release archive URL. Commit the package manager's frozen | |
| 47 | lockfile and verify its archive integrity. Do not depend on a moving branch, | |
| 48 | edit installed package files, or apply distribution patches. | |
| 49 | ||
| 50 | To prepare a patch release, commit a Changeset naming only the maintained | |
| 51 | client with a `patch` bump, then run `bun run release:patch`. Review the generated | |
| 52 | client/CLI versions, changelogs, lockfile and package archive. Commit as the | |
| 53 | maintainer, qualify that exact commit, fast-forward main and push the matching | |
| 54 | `sdk-v<client-version>` tag. The tag workflow publishes only the maintained | |
| 55 | client, not the other upstream workspace packages. | |
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | { |
| 2 | "name": "tuf-js", | |
| 3 | "version": "6.0.0", | |
| 4 | "description": "JavaScript implementation of The Update Framework (TUF)", | |
| 2 | "name": "@stacksjs/tuf-js", | |
| 3 | "version": "6.0.1", | |
| 4 | "description": "Stacks-maintained TUF client with verified metadata observation", | |
| 5 | 5 | "main": "dist/index.js", |
| 6 | 6 | "types": "dist/index.d.ts", |
| 7 | 7 | "scripts": { |
| @@ -11,7 +11,8 @@ | ||
| 11 | 11 | }, |
| 12 | 12 | "repository": { |
| 13 | 13 | "type": "git", |
| 14 | "url": "git+https://github.com/theupdateframework/tuf-js.git" | |
| 14 | "url": "git+https://github.com/stacksjs/tuf-js.git", | |
| 15 | "directory": "packages/client" | |
| 15 | 16 | }, |
| 16 | 17 | "files": [ |
| 17 | 18 | "dist" |
| @@ -24,9 +25,9 @@ renamed throughout | ||
| 24 | 25 | "author": "bdehamer@github.com", |
| 25 | 26 | "license": "MIT", |
| 26 | 27 | "bugs": { |
| 27 | "url": "https://github.com/theupdateframework/tuf-js/issues" | |
| 28 | "url": "https://github.com/stacksjs/tuf-js/issues" | |
| 28 | 29 | }, |
| 29 | "homepage": "https://github.com/theupdateframework/tuf-js/tree/main/packages/client#readme", | |
| 30 | "homepage": "https://github.com/stacksjs/tuf-js/tree/main/packages/client#readme", | |
| 30 | 31 | "devDependencies": { |
| 31 | 32 | "@tufjs/repo-mock": "5.0.0", |
| 32 | 33 | "@types/debug": "^4.1.13", |