@ankhorage/devtools 1.15.3 → 1.15.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.
- package/README.md +1 -1
- package/dist/tools/workflows/files/release.yml +42 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# @ankhorage/devtools
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Shared tooling, repository automation, runtime policies, and agent standards for Ankhorage TypeScript projects
|
|
9
9
|
|
|
@@ -136,6 +136,48 @@ jobs:
|
|
|
136
136
|
git tag "v${package_version}"
|
|
137
137
|
fi
|
|
138
138
|
|
|
139
|
+
- name: Verify published npm artifact
|
|
140
|
+
if: steps.release.outputs.versioned == 'true'
|
|
141
|
+
env:
|
|
142
|
+
PUBLISHED_PACKAGE_NAME: ${{ steps.release.outputs.package_name }}
|
|
143
|
+
PUBLISHED_PACKAGE_VERSION: ${{ steps.release.outputs.package_version }}
|
|
144
|
+
run: |
|
|
145
|
+
set -euo pipefail
|
|
146
|
+
package_spec="${PUBLISHED_PACKAGE_NAME}@${PUBLISHED_PACKAGE_VERSION}"
|
|
147
|
+
registry_evidence="${RUNNER_TEMP}/npm-publish-verification.json"
|
|
148
|
+
artifact="${RUNNER_TEMP}/npm-publish-verification.tgz"
|
|
149
|
+
pack_dir="${RUNNER_TEMP}/npm-pack-verification"
|
|
150
|
+
max_attempts=30
|
|
151
|
+
retry_seconds=30
|
|
152
|
+
mkdir -p "$pack_dir"
|
|
153
|
+
|
|
154
|
+
for attempt in $(seq 1 "$max_attempts"); do
|
|
155
|
+
echo "Verifying ${package_spec} on npm (attempt ${attempt}/${max_attempts})..."
|
|
156
|
+
if npm view "$package_spec" version dist.tarball dist.integrity --json > "$registry_evidence"; then
|
|
157
|
+
resolved_version="$(node -e "const p=require(process.argv[1]); process.stdout.write(p.version ?? '')" "$registry_evidence")"
|
|
158
|
+
tarball="$(node -e "const p=require(process.argv[1]); process.stdout.write(p['dist.tarball'] ?? '')" "$registry_evidence")"
|
|
159
|
+
integrity="$(node -e "const p=require(process.argv[1]); process.stdout.write(p['dist.integrity'] ?? '')" "$registry_evidence")"
|
|
160
|
+
|
|
161
|
+
if [ "$resolved_version" = "$PUBLISHED_PACKAGE_VERSION" ] && [ -n "$tarball" ] && [ -n "$integrity" ]; then
|
|
162
|
+
if curl --fail --location --silent --show-error --output "$artifact" "$tarball"; then
|
|
163
|
+
if EXPECTED_INTEGRITY="$integrity" ARTIFACT="$artifact" node -e "const { createHash }=require('node:crypto'); const { readFileSync }=require('node:fs'); const actual='sha512-'+createHash('sha512').update(readFileSync(process.env.ARTIFACT)).digest('base64'); if(actual!==process.env.EXPECTED_INTEGRITY){console.error('Downloaded npm tarball integrity mismatch.'); process.exit(1)}"; then
|
|
164
|
+
npm pack "$package_spec" --pack-destination "$pack_dir" >/dev/null
|
|
165
|
+
echo "Verified ${package_spec}: metadata, integrity, tarball download, and npm pack are available."
|
|
166
|
+
exit 0
|
|
167
|
+
fi
|
|
168
|
+
fi
|
|
169
|
+
fi
|
|
170
|
+
fi
|
|
171
|
+
|
|
172
|
+
if [ "$attempt" -lt "$max_attempts" ]; then
|
|
173
|
+
sleep "$retry_seconds"
|
|
174
|
+
fi
|
|
175
|
+
done
|
|
176
|
+
|
|
177
|
+
echo "Published npm artifact did not become retrievable after ${max_attempts} attempts."
|
|
178
|
+
cat "$registry_evidence" 2>/dev/null || true
|
|
179
|
+
exit 1
|
|
180
|
+
|
|
139
181
|
- name: Finalize Changesets v3 tags and GitHub releases
|
|
140
182
|
if: hashFiles('.changeset/config.json') != ''
|
|
141
183
|
env:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/devtools",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.4",
|
|
4
4
|
"description": "Shared tooling, repository automation, runtime policies, and agent standards for Ankhorage TypeScript projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/devtools#readme",
|