@serve.zone/appstore 0.2.2 → 0.3.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/apps/ghost/versions/1.0.0/config.json +1 -1
- package/apps/grafana/versions/1.0.0/config.json +1 -1
- package/apps/nextcloud/versions/1.0.0/config.json +1 -1
- package/apps/valkey/app.json +10 -0
- package/apps/valkey/versions/1.0.0/config.json +4 -0
- package/appstore.json +4 -9
- package/changelog.md +20 -1
- package/dist_ts_client/classes.appstoreresolver.d.ts +9 -1
- package/dist_ts_client/classes.appstoreresolver.js +43 -2
- package/dist_ts_client/data.generated.d.ts +2 -0
- package/dist_ts_client/data.generated.js +985 -0
- package/dist_ts_client/index.js +1 -1
- package/dist_ts_client/types.d.ts +13 -0
- package/dist_ts_client/types.js +1 -1
- package/package.json +5 -5
- package/readme.md +13 -7
- package/ts_client/classes.appstoreresolver.ts +50 -1
- package/ts_client/data.generated.ts +987 -0
- package/ts_client/readme.md +66 -0
- package/ts_client/types.ts +15 -0
- package/apps/redis/app.json +0 -10
- package/apps/redis/versions/1.0.0/config.json +0 -4
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# @serve.zone/appstore Client
|
|
2
|
+
|
|
3
|
+
This module exports the TypeScript resolver client for the serve.zone App Store. It reads the App Store data bundled into the published `@serve.zone/appstore` package by default and can use an explicit remote source for tests or controlled runtime integrations.
|
|
4
|
+
|
|
5
|
+
## Issue Reporting and Security
|
|
6
|
+
|
|
7
|
+
For reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm add @serve.zone/appstore
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { AppStoreResolver } from '@serve.zone/appstore';
|
|
19
|
+
|
|
20
|
+
const resolver = new AppStoreResolver();
|
|
21
|
+
const appStore = await resolver.getAppStoreIndex();
|
|
22
|
+
const apps = await resolver.getApps();
|
|
23
|
+
const cloudlyMeta = await resolver.getAppMeta('cloudly');
|
|
24
|
+
const cloudlyConfig = await resolver.getAppVersionConfig('cloudly', cloudlyMeta.latestVersion);
|
|
25
|
+
const sourceInfo = resolver.getSourceInfo();
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Remote Source
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
const resolver = new AppStoreResolver({
|
|
32
|
+
source: 'remote',
|
|
33
|
+
baseUrl: 'https://example.com/appstore',
|
|
34
|
+
fetch,
|
|
35
|
+
});
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Providing `baseUrl` or `fetch` without an explicit `source` also selects remote mode. The default remote base URL is exported as `appStoreDefaultRemoteBaseUrl`.
|
|
39
|
+
|
|
40
|
+
## Exports
|
|
41
|
+
|
|
42
|
+
- `AppStoreResolver` resolves App Store indexes, app metadata, version configs, repo manifests, and Docker digest-tracked sources.
|
|
43
|
+
- `appStorePackageMetadata` exposes the package name and version embedded into the generated package data.
|
|
44
|
+
- `appStoreDefaultRemoteBaseUrl` exposes the default remote base URL for explicit remote consumers.
|
|
45
|
+
- `IAppStoreResolverOptions`, `IAppStoreSourceInfo`, and the `TAppStore*` types describe resolver inputs and returned App Store data shapes.
|
|
46
|
+
|
|
47
|
+
## License and Legal Information
|
|
48
|
+
|
|
49
|
+
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the repository license file.
|
|
50
|
+
|
|
51
|
+
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
|
52
|
+
|
|
53
|
+
### Trademarks
|
|
54
|
+
|
|
55
|
+
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.
|
|
56
|
+
|
|
57
|
+
Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.
|
|
58
|
+
|
|
59
|
+
### Company Information
|
|
60
|
+
|
|
61
|
+
Task Venture Capital GmbH<br>
|
|
62
|
+
Registered at District Court Bremen HRB 35230 HB, Germany
|
|
63
|
+
|
|
64
|
+
For any legal inquiries or further information, please contact us via email at hello@task.vc.
|
|
65
|
+
|
|
66
|
+
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
package/ts_client/types.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as interfaces from '@serve.zone/interfaces';
|
|
2
2
|
|
|
3
3
|
export type TAppStoreFetch = typeof fetch;
|
|
4
|
+
export type TAppStoreSourceMode = 'package' | 'remote';
|
|
4
5
|
export type TAppStoreIndex = interfaces.appstore.IAppStoreIndex;
|
|
5
6
|
export type TAppStoreApp = interfaces.appstore.IAppStoreApp;
|
|
6
7
|
export type TAppStoreAppMeta = interfaces.appstore.IAppStoreAppMeta;
|
|
@@ -11,12 +12,26 @@ export type TAppStoreResolvedSource = interfaces.appstore.IAppStoreResolvedSourc
|
|
|
11
12
|
export type TServezoneAppStoreManifest = interfaces.appstore.IServezoneAppStoreManifest;
|
|
12
13
|
|
|
13
14
|
export interface IAppStoreResolverOptions {
|
|
15
|
+
source?: TAppStoreSourceMode;
|
|
14
16
|
baseUrl?: string;
|
|
15
17
|
fetch?: TAppStoreFetch;
|
|
16
18
|
resolveDockerDigests?: boolean;
|
|
17
19
|
now?: () => Date;
|
|
18
20
|
}
|
|
19
21
|
|
|
22
|
+
export interface IAppStorePackageData {
|
|
23
|
+
generatedAt: string;
|
|
24
|
+
jsonFiles: Record<string, unknown>;
|
|
25
|
+
textFiles: Record<string, string>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface IAppStoreSourceInfo {
|
|
29
|
+
source: TAppStoreSourceMode;
|
|
30
|
+
packageName: string;
|
|
31
|
+
packageVersion: string;
|
|
32
|
+
baseUrl?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
20
35
|
export interface IResolvedAppStoreApp {
|
|
21
36
|
appStoreApp: TAppStoreApp;
|
|
22
37
|
appMeta: TAppStoreAppMeta;
|
package/apps/redis/app.json
DELETED