frakment 4.0.0 → 5.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.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frakment",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "MIT-licensed CLI and design system for the Frakment component registry",
5
5
  "keywords": [
6
6
  "components",
@@ -12,6 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { createHash } from "node:crypto";
13
13
  import { existsSync } from "node:fs";
14
14
  import { readFile } from "node:fs/promises";
15
+ import { createRequire } from "node:module";
15
16
  import path from "node:path";
16
17
  import chalk from "chalk";
17
18
  import { execa } from "execa";
@@ -26,8 +27,16 @@ const dependencyPattern = /^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*(?:@
26
27
  const maxRegistryPayloadBytes = 10 * 1024 * 1024;
27
28
  const maxRegistryManifestBytes = 1024 * 1024;
28
29
  const defaultWebRegistry = "https://www.arrafi.dev/frakment/r";
29
- const registryManifestUrl = "https://github.com/frakment/ui/releases/download/registry/manifest.json";
30
- const registrySignatureUrl = "https://github.com/frakment/ui/releases/download/registry/manifest.sigstore.json";
30
+ const cliPackage = createRequire(import.meta.url)("../../package.json");
31
+ if (typeof cliPackage !== "object" ||
32
+ cliPackage === null ||
33
+ !("version" in cliPackage) ||
34
+ typeof cliPackage.version !== "string") {
35
+ throw new Error("CLI package version is unavailable");
36
+ }
37
+ const registryReleaseUrl = `https://github.com/frakment/ui/releases/download/${encodeURIComponent(`frakment@${cliPackage.version}`)}`;
38
+ const registryManifestUrl = `${registryReleaseUrl}/manifest.json`;
39
+ const registrySignatureUrl = `${registryReleaseUrl}/manifest.sigstore.json`;
31
40
  const registrySignerIdentity = "^https://github\\.com/frakment/ui/\\.github/workflows/registry-sign\\.yml@refs/heads/main$";
32
41
  const sigstoreIssuer = "https://token.actions.githubusercontent.com";
33
42
  const defaultAliases = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frakment",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "MIT-licensed CLI and design system for the Frakment component registry",
5
5
  "keywords": [
6
6
  "components",