@ziyu_crate/release-line-example-circle-package-beacon 0.0.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.
Files changed (3) hide show
  1. package/README.md +3 -0
  2. package/package.json +24 -0
  3. package/src/index.mjs +13 -0
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Package Beacon
2
+
3
+ `@ziyu_crate/release-line-example-circle-package-beacon` is a deliberately small npm package used to verify the independent Package publication unit. Its version, archive digest, registry integrity and dist-tag are verified by Release Line without changing the existing Product (`app + web`) artifact.
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@ziyu_crate/release-line-example-circle-package-beacon",
3
+ "version": "0.0.0",
4
+ "description": "A tiny immutable package identity used to verify Release Line package publishing.",
5
+ "type": "module",
6
+ "exports": "./src/index.mjs",
7
+ "files": [
8
+ "src/",
9
+ "README.md"
10
+ ],
11
+ "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/ziyu/release-line-example-circle.git",
15
+ "directory": "packages/package-beacon"
16
+ },
17
+ "engines": {
18
+ "node": ">=22"
19
+ },
20
+ "publishConfig": {
21
+ "access": "public",
22
+ "provenance": false
23
+ }
24
+ }
package/src/index.mjs ADDED
@@ -0,0 +1,13 @@
1
+ export function packageBeacon(version, revision) {
2
+ if (typeof version !== "string" || !/^\d+\.\d+\.\d+$/.test(version)) {
3
+ throw new TypeError("version must be a stable SemVer");
4
+ }
5
+ if (typeof revision !== "string" || !/^[0-9a-f]{40}$/.test(revision)) {
6
+ throw new TypeError("revision must be a full Git SHA");
7
+ }
8
+ return Object.freeze({
9
+ component: "package-beacon",
10
+ version,
11
+ revision,
12
+ });
13
+ }