@ankhorage/devtools 2.3.20 → 2.3.22
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 +20 -29
- 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, and agent standards for Ankhorage TypeScript projects
|
|
9
9
|
|
|
@@ -390,6 +390,15 @@ jobs:
|
|
|
390
390
|
if (typeof appDir !== 'string' || typeof specifier !== 'string') {
|
|
391
391
|
throw new Error('The platform verification app and package specifier are required.');
|
|
392
392
|
}
|
|
393
|
+
writeFileSync(
|
|
394
|
+
join(appDir, 'package.json'),
|
|
395
|
+
`${JSON.stringify({
|
|
396
|
+
main: './App.tsx',
|
|
397
|
+
name: 'packed-platform-verification',
|
|
398
|
+
private: true,
|
|
399
|
+
version: '0.0.0',
|
|
400
|
+
})}\n`,
|
|
401
|
+
);
|
|
393
402
|
writeFileSync(join(appDir, 'App.tsx'), `export * from ${JSON.stringify(specifier)};\n`);
|
|
394
403
|
NODE
|
|
395
404
|
if (
|
|
@@ -519,6 +528,7 @@ jobs:
|
|
|
519
528
|
needs: release
|
|
520
529
|
if: needs.release.outputs.versioned == 'true'
|
|
521
530
|
runs-on: ubuntu-latest
|
|
531
|
+
timeout-minutes: 5
|
|
522
532
|
|
|
523
533
|
steps:
|
|
524
534
|
- name: Setup Node for npm verification
|
|
@@ -537,48 +547,29 @@ jobs:
|
|
|
537
547
|
run: |
|
|
538
548
|
set -euo pipefail
|
|
539
549
|
package_spec="${PUBLISHED_PACKAGE_NAME}@${PUBLISHED_PACKAGE_VERSION}"
|
|
540
|
-
registry_evidence="${RUNNER_TEMP}/npm-publish-verification.json"
|
|
541
|
-
artifact="${RUNNER_TEMP}/npm-publish-verification.tgz"
|
|
542
550
|
pack_dir="${RUNNER_TEMP}/npm-pack-verification"
|
|
543
|
-
|
|
544
|
-
|
|
551
|
+
pack_log="${RUNNER_TEMP}/npm-pack-verification.log"
|
|
552
|
+
max_attempts=5
|
|
553
|
+
retry_seconds=15
|
|
545
554
|
mkdir -p "$pack_dir"
|
|
546
555
|
|
|
547
|
-
last_stage="registry-metadata"
|
|
548
556
|
for attempt in $(seq 1 "$max_attempts"); do
|
|
549
557
|
echo "Verifying ${package_spec} on npm (attempt ${attempt}/${max_attempts})..."
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
tarball="$(node -e "const raw=require(process.argv[1]); const p=Array.isArray(raw)&&raw.length===1?raw[0]:raw; process.stdout.write(typeof p?.['dist.tarball']==='string'?p['dist.tarball']:'')" "$registry_evidence")"
|
|
555
|
-
integrity="$(node -e "const raw=require(process.argv[1]); const p=Array.isArray(raw)&&raw.length===1?raw[0]:raw; process.stdout.write(typeof p?.['dist.integrity']==='string'?p['dist.integrity']:'')" "$registry_evidence")"
|
|
556
|
-
|
|
557
|
-
if [ "$resolved_version" = "$PUBLISHED_PACKAGE_VERSION" ] && [ -n "$tarball" ] && [ -n "$integrity" ]; then
|
|
558
|
-
last_stage="tarball-download"
|
|
559
|
-
if curl --fail --location --silent --show-error --output "$artifact" "$tarball"; then
|
|
560
|
-
last_stage="integrity"
|
|
561
|
-
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
|
|
562
|
-
last_stage="npm-pack"
|
|
563
|
-
attempt_pack_dir="$pack_dir/attempt-${attempt}"
|
|
564
|
-
mkdir -p "$attempt_pack_dir"
|
|
565
|
-
if npm pack "$package_spec" --pack-destination "$attempt_pack_dir" >/dev/null; then
|
|
566
|
-
echo "Verified ${package_spec}: metadata, integrity, tarball download, and npm pack are available."
|
|
567
|
-
exit 0
|
|
568
|
-
fi
|
|
569
|
-
fi
|
|
570
|
-
fi
|
|
558
|
+
if npm pack "$package_spec" --ignore-scripts --prefer-online --pack-destination "$pack_dir" >"$pack_log" 2>&1; then
|
|
559
|
+
if find "$pack_dir" -maxdepth 1 -type f -name '*.tgz' -size +0c -print -quit | grep -q .; then
|
|
560
|
+
echo "Verified ${package_spec}: public npm package downloaded successfully."
|
|
561
|
+
exit 0
|
|
571
562
|
fi
|
|
563
|
+
echo "npm pack succeeded without producing a non-empty tarball."
|
|
572
564
|
fi
|
|
573
565
|
|
|
574
|
-
|
|
566
|
+
tail -n 20 "$pack_log" || true
|
|
575
567
|
if [ "$attempt" -lt "$max_attempts" ]; then
|
|
576
568
|
sleep "$retry_seconds"
|
|
577
569
|
fi
|
|
578
570
|
done
|
|
579
571
|
|
|
580
|
-
echo "
|
|
581
|
-
cat "$registry_evidence" 2>/dev/null || true
|
|
572
|
+
echo "::error title=npm publication not retrievable::${package_spec} could not be downloaded from public npm after ${max_attempts} attempts."
|
|
582
573
|
exit 1
|
|
583
574
|
|
|
584
575
|
finalize:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/devtools",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.22",
|
|
4
4
|
"description": "Shared tooling, repository automation, and agent standards for Ankhorage TypeScript projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/devtools#readme",
|