@syncbridge/common 2.2.0 → 2.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/constants.d.ts +1 -1
- package/constants.js +1 -1
- package/host-link/host-packages.d.ts +44 -0
- package/host-link/host-packages.js +12 -0
- package/package.json +1 -1
package/constants.d.ts
CHANGED
package/constants.js
CHANGED
|
@@ -23,3 +23,47 @@ export interface HostPackagePlanItem {
|
|
|
23
23
|
export interface HostPackagesResolveResponse {
|
|
24
24
|
items: HostPackagePlanItem[];
|
|
25
25
|
}
|
|
26
|
+
/** Where, under Console's API, a host's packages' updates are asked */
|
|
27
|
+
export declare const HOST_PACKAGE_UPDATES_PATH = "host/packages/updates";
|
|
28
|
+
/** What a host asks of its packages' updates */
|
|
29
|
+
export interface HostPackageUpdatesRequest {
|
|
30
|
+
/**
|
|
31
|
+
* check: what is newer of the versions it has; download: grants to read
|
|
32
|
+
* the versions it installs
|
|
33
|
+
*/
|
|
34
|
+
mode: 'check' | 'download';
|
|
35
|
+
/** "@org/name" -> its newest version installed (check), or the one it installs (download) */
|
|
36
|
+
packages: Record<string, string>;
|
|
37
|
+
}
|
|
38
|
+
/** A version offered: what it needs of the registry's packages */
|
|
39
|
+
export interface HostPackageOffer {
|
|
40
|
+
version: string;
|
|
41
|
+
/** Registry packages it depends on: name -> range */
|
|
42
|
+
dependencies: Record<string, string>;
|
|
43
|
+
}
|
|
44
|
+
/** What is newer of a package, or why it was not told */
|
|
45
|
+
export interface HostPackageUpdate {
|
|
46
|
+
name: string;
|
|
47
|
+
/** The version sent */
|
|
48
|
+
version: string;
|
|
49
|
+
/**
|
|
50
|
+
* NOT_FOUND: not in the registry, or (download) no such version;
|
|
51
|
+
* NO_ACCESS: the host's workspace may not use it; SUSPENDED (download):
|
|
52
|
+
* the version is suspended
|
|
53
|
+
*/
|
|
54
|
+
problem?: 'NOT_FOUND' | 'NO_ACCESS' | 'SUSPENDED';
|
|
55
|
+
/** check: the newest of its minor, newer than the one sent (a fix) */
|
|
56
|
+
patch?: HostPackageOffer;
|
|
57
|
+
/** check: the newest of its major, newer than the one sent */
|
|
58
|
+
minor?: HostPackageOffer;
|
|
59
|
+
/** check: a newer major's newest - told, never installed without asking */
|
|
60
|
+
major?: string;
|
|
61
|
+
/** download: the version sent, its grant in its link; a few minutes good */
|
|
62
|
+
download?: HostPackagePlanItem & {
|
|
63
|
+
dependencies: Record<string, string>;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/** Each package sent, answered */
|
|
67
|
+
export interface HostPackageUpdatesResponse {
|
|
68
|
+
items: HostPackageUpdate[];
|
|
69
|
+
}
|
|
@@ -7,3 +7,15 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/** Where, under Console's API, a host's packages are planned */
|
|
9
9
|
export const HOST_PACKAGES_PATH = 'host/packages';
|
|
10
|
+
/*
|
|
11
|
+
* A host's packages' updates: what the registry has newer of each package
|
|
12
|
+
* it has, asked in one call. To check, its installed versions sent - each
|
|
13
|
+
* answered the newest of its minor (a fix), of its major (fixes and
|
|
14
|
+
* features) and a newer major, told apart; nothing signed. To install, the
|
|
15
|
+
* very versions it takes sent - each answered with a short-lived grant to
|
|
16
|
+
* read it: read by it without its access asked again, unless that version,
|
|
17
|
+
* its package or the host's workspace is suspended, or the access ended,
|
|
18
|
+
* since.
|
|
19
|
+
*/
|
|
20
|
+
/** Where, under Console's API, a host's packages' updates are asked */
|
|
21
|
+
export const HOST_PACKAGE_UPDATES_PATH = 'host/packages/updates';
|