@mp-lb/arcnet 0.7.21 → 0.7.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/dist/desktop/createDesktopCommands.d.ts.map +1 -1
- package/dist/desktop/createDesktopCommands.js +2 -1
- package/dist/desktop/createDesktopCommands.js.map +1 -1
- package/dist/desktop/verifyDesktopRelease.d.ts +2 -1
- package/dist/desktop/verifyDesktopRelease.d.ts.map +1 -1
- package/dist/desktop/verifyDesktopRelease.js +5 -2
- package/dist/desktop/verifyDesktopRelease.js.map +1 -1
- package/docs/public/commands.md +2 -1
- package/docs/public/llms-full.txt +2 -1
- package/package.json +1 -1
- package/src/desktop/createDesktopCommands.ts +5 -3
- package/src/desktop/verifyDesktopRelease.ts +10 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDesktopCommands.d.ts","sourceRoot":"","sources":["../../src/desktop/createDesktopCommands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,qBAAqB,GAChC,KAAK,OAAO,EACZ,QAAQ,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"createDesktopCommands.d.ts","sourceRoot":"","sources":["../../src/desktop/createDesktopCommands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,qBAAqB,GAChC,KAAK,OAAO,EACZ,QAAQ,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,SAmClC,CAAC"}
|
|
@@ -6,8 +6,9 @@ export const createDesktopCommands = (cli, output) => {
|
|
|
6
6
|
.description("Prepare and verify desktop releases.");
|
|
7
7
|
desktop
|
|
8
8
|
.command("verify")
|
|
9
|
-
.description("Verify
|
|
9
|
+
.description("Verify desktop release assets are publicly downloadable.")
|
|
10
10
|
.requiredOption("--repository <owner/repo>", "Public releases repository")
|
|
11
|
+
.option("--tag <tag>", "Verify this release tag instead of the repository latest")
|
|
11
12
|
.option("--linux", "Require DEB, RPM, and a Linux update manifest")
|
|
12
13
|
.option("--windows", "Require a Windows installer")
|
|
13
14
|
.action(async (options) => output(await verifyDesktopRelease(options.repository, options)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDesktopCommands.js","sourceRoot":"","sources":["../../src/desktop/createDesktopCommands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,GAAY,EACZ,MAAiC,EACjC,EAAE;IACF,MAAM,OAAO,GAAG,GAAG;SAChB,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,sCAAsC,CAAC,CAAC;IAEvD,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,
|
|
1
|
+
{"version":3,"file":"createDesktopCommands.js","sourceRoot":"","sources":["../../src/desktop/createDesktopCommands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,GAAY,EACZ,MAAiC,EACjC,EAAE;IACF,MAAM,OAAO,GAAG,GAAG;SAChB,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,sCAAsC,CAAC,CAAC;IAEvD,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,0DAA0D,CAAC;SACvE,cAAc,CAAC,2BAA2B,EAAE,4BAA4B,CAAC;SACzE,MAAM,CACL,aAAa,EACb,0DAA0D,CAC3D;SACA,MAAM,CAAC,SAAS,EAAE,+CAA+C,CAAC;SAClE,MAAM,CAAC,WAAW,EAAE,6BAA6B,CAAC;SAClD,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CACxB,MAAM,CAAC,MAAM,oBAAoB,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAChE,CAAC;IAEJ,OAAO;SACJ,OAAO,CAAC,gBAAgB,CAAC;SACzB,WAAW,CACV,0EAA0E,CAC3E;SACA,cAAc,CACb,cAAc,EACd,8CAA8C,CAC/C;SACA,cAAc,CACb,cAAc,EACd,8CAA8C,CAC/C;SACA,cAAc,CAAC,iBAAiB,EAAE,mCAAmC,CAAC;SACtE,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAChF,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export declare const verifyDesktopRelease: (repository: string, { linux, windows }?: {
|
|
1
|
+
export declare const verifyDesktopRelease: (repository: string, { linux, windows, tag, }?: {
|
|
2
2
|
linux?: boolean | undefined;
|
|
3
3
|
windows?: boolean | undefined;
|
|
4
|
+
tag?: string | undefined;
|
|
4
5
|
}) => Promise<{
|
|
5
6
|
operation: string;
|
|
6
7
|
tag: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyDesktopRelease.d.ts","sourceRoot":"","sources":["../../src/desktop/verifyDesktopRelease.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,GAC/B,YAAY,MAAM,EAClB
|
|
1
|
+
{"version":3,"file":"verifyDesktopRelease.d.ts","sourceRoot":"","sources":["../../src/desktop/verifyDesktopRelease.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,GAC/B,YAAY,MAAM,EAClB;;;;CAIM;;;;;EAyEP,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export const verifyDesktopRelease = async (repository, { linux = false, windows = false } = {}) => {
|
|
2
|
+
export const verifyDesktopRelease = async (repository, { linux = false, windows = false, tag = undefined, } = {}) => {
|
|
3
3
|
z.string()
|
|
4
4
|
.regex(/^[\w.-]+\/[\w.-]+$/)
|
|
5
5
|
.parse(repository);
|
|
6
|
-
const
|
|
6
|
+
const endpoint = tag ? `tags/${encodeURIComponent(tag)}` : "latest";
|
|
7
|
+
const response = await fetch(`https://api.github.com/repos/${repository}/releases/${endpoint}`, { headers: { Accept: "application/vnd.github+json" } });
|
|
7
8
|
if (!response.ok)
|
|
8
9
|
throw new Error(`Public release is unavailable: HTTP ${response.status}.`);
|
|
9
10
|
const release = z
|
|
@@ -16,6 +17,8 @@ export const verifyDesktopRelease = async (repository, { linux = false, windows
|
|
|
16
17
|
})),
|
|
17
18
|
})
|
|
18
19
|
.parse(await response.json());
|
|
20
|
+
if (tag && release.tag_name !== tag)
|
|
21
|
+
throw new Error("GitHub returned an unexpected release tag.");
|
|
19
22
|
const required = [".dmg", ".zip", "latest-mac.yml"];
|
|
20
23
|
if (linux)
|
|
21
24
|
required.push(".deb", ".rpm", "latest-linux.yml");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyDesktopRelease.js","sourceRoot":"","sources":["../../src/desktop/verifyDesktopRelease.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EACvC,UAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"verifyDesktopRelease.js","sourceRoot":"","sources":["../../src/desktop/verifyDesktopRelease.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EACvC,UAAkB,EAClB,EACE,KAAK,GAAG,KAAK,EACb,OAAO,GAAG,KAAK,EACf,GAAG,GAAG,SAA+B,MACnC,EAAE,EACN,EAAE;IACF,CAAC,CAAC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+97,12 @@ Prepare and verify desktop releases.
|
|
|
97
97
|
|
|
98
98
|
### `arcnet desktop verify`
|
|
99
99
|
|
|
100
|
-
Verify
|
|
100
|
+
Verify desktop release assets are publicly downloadable.
|
|
101
101
|
|
|
102
102
|
| Option | Description |
|
|
103
103
|
| --- | --- |
|
|
104
104
|
| `--repository <owner/repo>` | Public releases repository |
|
|
105
|
+
| `--tag <tag>` | Verify this release tag instead of the repository latest |
|
|
105
106
|
| `--linux` | Require DEB, RPM, and a Linux update manifest |
|
|
106
107
|
| `--windows` | Require a Windows installer |
|
|
107
108
|
|
|
@@ -153,11 +153,12 @@ Prepare and verify desktop releases.
|
|
|
153
153
|
|
|
154
154
|
### `arcnet desktop verify`
|
|
155
155
|
|
|
156
|
-
Verify
|
|
156
|
+
Verify desktop release assets are publicly downloadable.
|
|
157
157
|
|
|
158
158
|
| Option | Description |
|
|
159
159
|
| --- | --- |
|
|
160
160
|
| `--repository <owner/repo>` | Public releases repository |
|
|
161
|
+
| `--tag <tag>` | Verify this release tag instead of the repository latest |
|
|
161
162
|
| `--linux` | Require DEB, RPM, and a Linux update manifest |
|
|
162
163
|
| `--windows` | Require a Windows installer |
|
|
163
164
|
|
package/package.json
CHANGED
|
@@ -13,10 +13,12 @@ export const createDesktopCommands = (
|
|
|
13
13
|
|
|
14
14
|
desktop
|
|
15
15
|
.command("verify")
|
|
16
|
-
.description(
|
|
17
|
-
"Verify the latest desktop release assets are publicly downloadable.",
|
|
18
|
-
)
|
|
16
|
+
.description("Verify desktop release assets are publicly downloadable.")
|
|
19
17
|
.requiredOption("--repository <owner/repo>", "Public releases repository")
|
|
18
|
+
.option(
|
|
19
|
+
"--tag <tag>",
|
|
20
|
+
"Verify this release tag instead of the repository latest",
|
|
21
|
+
)
|
|
20
22
|
.option("--linux", "Require DEB, RPM, and a Linux update manifest")
|
|
21
23
|
.option("--windows", "Require a Windows installer")
|
|
22
24
|
.action(async (options) =>
|
|
@@ -2,14 +2,19 @@ import { z } from "zod";
|
|
|
2
2
|
|
|
3
3
|
export const verifyDesktopRelease = async (
|
|
4
4
|
repository: string,
|
|
5
|
-
{
|
|
5
|
+
{
|
|
6
|
+
linux = false,
|
|
7
|
+
windows = false,
|
|
8
|
+
tag = undefined as string | undefined,
|
|
9
|
+
} = {},
|
|
6
10
|
) => {
|
|
7
11
|
z.string()
|
|
8
12
|
.regex(/^[\w.-]+\/[\w.-]+$/)
|
|
9
13
|
.parse(repository);
|
|
10
14
|
|
|
15
|
+
const endpoint = tag ? `tags/${encodeURIComponent(tag)}` : "latest";
|
|
11
16
|
const response = await fetch(
|
|
12
|
-
`https://api.github.com/repos/${repository}/releases
|
|
17
|
+
`https://api.github.com/repos/${repository}/releases/${endpoint}`,
|
|
13
18
|
{ headers: { Accept: "application/vnd.github+json" } },
|
|
14
19
|
);
|
|
15
20
|
|
|
@@ -29,6 +34,9 @@ export const verifyDesktopRelease = async (
|
|
|
29
34
|
})
|
|
30
35
|
.parse(await response.json());
|
|
31
36
|
|
|
37
|
+
if (tag && release.tag_name !== tag)
|
|
38
|
+
throw new Error("GitHub returned an unexpected release tag.");
|
|
39
|
+
|
|
32
40
|
const required = [".dmg", ".zip", "latest-mac.yml"];
|
|
33
41
|
if (linux) required.push(".deb", ".rpm", "latest-linux.yml");
|
|
34
42
|
if (windows) required.push(".exe");
|