@stacksjs/desktop 0.2.118 → 0.2.120

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.
@@ -0,0 +1,41 @@
1
+ import { AutoUpdater, generateUpdateManifest } from 'craft-native';
2
+ import type { UpdateManifest, UpdaterConfig } from 'craft-native';
3
+ export type { PlatformUpdate, UpdateManifest, UpdaterConfig, UpdaterEvent, UpdateProgress } from 'craft-native';
4
+ /**
5
+ * URL of an asset on the repository's newest release.
6
+ *
7
+ * GitHub resolves `releases/latest/download/<asset>` to whichever release is
8
+ * currently latest, so this stays correct without the app knowing any version.
9
+ */
10
+ export declare function githubLatestAssetUrl(repository: string, asset: string): string;
11
+ /**
12
+ * URL of an asset on a specific release tag. Used when building a manifest,
13
+ * where the download has to point at the version being released rather than
14
+ * at whatever is latest.
15
+ */
16
+ export declare function githubReleaseAssetUrl(repository: string, tag: string, asset: string): string;
17
+ /** Point Craft's updater at a repository's latest GitHub release. */
18
+ export declare function createGitHubUpdater(options: GitHubUpdaterOptions): AutoUpdater;
19
+ /**
20
+ * Build the manifest for a GitHub release, hashing each artifact and pointing
21
+ * its URL at the release's own tag.
22
+ */
23
+ export declare function createGitHubUpdateManifest(options: GitHubManifestOptions): UpdateManifest;
24
+ /** Manifest asset name an app publishes alongside its release artifacts. */
25
+ export declare const UPDATE_MANIFEST_ASSET: 'update.json';
26
+ export declare interface GitHubUpdaterOptions extends Omit<UpdaterConfig, 'updateUrl'> {
27
+ repository: string
28
+ manifestAsset?: string
29
+ }
30
+ export declare interface GitHubManifestOptions {
31
+ repository: string
32
+ version: string
33
+ tag?: string
34
+ releaseNotes?: string
35
+ artifacts: {
36
+ darwin?: string
37
+ win32?: string
38
+ linux?: string
39
+ }
40
+ }
41
+ export { AutoUpdater, generateUpdateManifest };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/desktop",
3
3
  "type": "module",
4
- "version": "0.2.118",
4
+ "version": "0.2.120",
5
5
  "description": "Native desktop application framework for stx (powered by Craft)",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -55,6 +55,6 @@
55
55
  "typecheck": "bun tsc --noEmit"
56
56
  },
57
57
  "dependencies": {
58
- "craft-native": ">=0.0.50"
58
+ "craft-native": ">=0.0.55"
59
59
  }
60
60
  }