@containerbase/base 14.41.1 → 14.42.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/README.md +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/tool-versions-schema.d.ts +123 -0
- package/dist/tool-versions-schema.js +144 -0
- package/dist/tool-versions-types.d.ts +180 -0
- package/dist/tool-versions-types.js +1 -0
- package/dist/zod.d.ts +1 -0
- package/dist/zod.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,6 +47,16 @@ import { defaultDistro } from '@containerbase/base';
|
|
|
47
47
|
defaultDistro; // 'noble'
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
+
The format of the published [tool-versions](https://github.com/containerbase/tool-versions/blob/main/docs/format.md) data is exported too, so its readers share one definition.
|
|
51
|
+
The zod schemas (`ToolVersions`, `VersionFiles`, `VersionIntegrity`, `ToolIndex`, `FormatIndex` and their parts) live behind the `zod` entry point, the zod free types behind the main one:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import { ToolVersions } from '@containerbase/base/zod';
|
|
55
|
+
import type { ToolVersions as ToolVersionsType } from '@containerbase/base';
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The schemas ignore unknown keys and accept any arch name, so additive changes of the format don't break a reader; readers ignore files of an arch they don't know.
|
|
59
|
+
|
|
50
60
|
## Contents
|
|
51
61
|
|
|
52
62
|
Each entry may carry the following metadata:
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { tools } from './data.ts';
|
|
2
2
|
import type { DistroCode } from './types.ts';
|
|
3
3
|
export type { DistroCode, InstallToolType, ToolMetadata, ToolType, } from './types.ts';
|
|
4
|
+
export type { FileIntegrity, FileReference, FormatIndex, ToolFile, ToolIndex, ToolVersion, ToolVersions, VersionFiles, VersionIntegrity, } from './tool-versions-types.ts';
|
|
4
5
|
export { tools };
|
|
5
6
|
/**
|
|
6
7
|
* The Ubuntu release the default containerbase image is built from, the
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** A file of a version: where to download it and how to verify it. */
|
|
3
|
+
export declare const ToolFile: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
url: z.ZodURL;
|
|
6
|
+
checksum: z.ZodString;
|
|
7
|
+
arch: z.ZodExactOptional<z.ZodString>;
|
|
8
|
+
distro: z.ZodExactOptional<z.ZodString>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
/**
|
|
11
|
+
* An SRI-style sha256 digest of a published file's bytes, like npm's
|
|
12
|
+
* `integrity`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const FileIntegrity: z.ZodString;
|
|
15
|
+
/**
|
|
16
|
+
* A version `install-tool` can install, the flags are only set when true and
|
|
17
|
+
* `files` and `releaseTimestamp` only when known.
|
|
18
|
+
*/
|
|
19
|
+
export declare const ToolVersion: z.ZodObject<{
|
|
20
|
+
version: z.ZodString;
|
|
21
|
+
prerelease: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
22
|
+
lts: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
23
|
+
releaseTimestamp: z.ZodExactOptional<z.ZodISODateTime>;
|
|
24
|
+
files: z.ZodExactOptional<z.ZodArray<z.ZodObject<{
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
url: z.ZodURL;
|
|
27
|
+
checksum: z.ZodString;
|
|
28
|
+
arch: z.ZodExactOptional<z.ZodString>;
|
|
29
|
+
distro: z.ZodExactOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>>>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
/** The content of a `<tool>.json` file. */
|
|
33
|
+
export declare const ToolVersions: z.ZodObject<{
|
|
34
|
+
$schema: z.ZodExactOptional<z.ZodURL>;
|
|
35
|
+
tool: z.ZodString;
|
|
36
|
+
type: z.ZodExactOptional<z.ZodEnum<{
|
|
37
|
+
gem: "gem";
|
|
38
|
+
npm: "npm";
|
|
39
|
+
pip: "pip";
|
|
40
|
+
dotnet: "dotnet";
|
|
41
|
+
}>>;
|
|
42
|
+
sourceUrl: z.ZodExactOptional<z.ZodURL>;
|
|
43
|
+
homepage: z.ZodExactOptional<z.ZodURL>;
|
|
44
|
+
minVersion: z.ZodExactOptional<z.ZodString>;
|
|
45
|
+
distroMinVersion: z.ZodExactOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
46
|
+
updatedAt: z.ZodISODateTime;
|
|
47
|
+
versions: z.ZodArray<z.ZodObject<{
|
|
48
|
+
version: z.ZodString;
|
|
49
|
+
prerelease: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
50
|
+
lts: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
51
|
+
releaseTimestamp: z.ZodExactOptional<z.ZodISODateTime>;
|
|
52
|
+
files: z.ZodExactOptional<z.ZodArray<z.ZodObject<{
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
url: z.ZodURL;
|
|
55
|
+
checksum: z.ZodString;
|
|
56
|
+
arch: z.ZodExactOptional<z.ZodString>;
|
|
57
|
+
distro: z.ZodExactOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>>>;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
/** The content of a `<tool>/<version>.json` file: the files of one version. */
|
|
62
|
+
export declare const VersionFiles: z.ZodObject<{
|
|
63
|
+
$schema: z.ZodExactOptional<z.ZodURL>;
|
|
64
|
+
tool: z.ZodString;
|
|
65
|
+
version: z.ZodString;
|
|
66
|
+
files: z.ZodArray<z.ZodObject<{
|
|
67
|
+
name: z.ZodString;
|
|
68
|
+
url: z.ZodURL;
|
|
69
|
+
checksum: z.ZodString;
|
|
70
|
+
arch: z.ZodExactOptional<z.ZodString>;
|
|
71
|
+
distro: z.ZodExactOptional<z.ZodString>;
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
/**
|
|
75
|
+
* The content of a `<tool>.integrity.json` file: the integrity of each
|
|
76
|
+
* `<tool>/<version>.json` file, by version.
|
|
77
|
+
*/
|
|
78
|
+
export declare const VersionIntegrity: z.ZodObject<{
|
|
79
|
+
$schema: z.ZodExactOptional<z.ZodURL>;
|
|
80
|
+
tool: z.ZodString;
|
|
81
|
+
versions: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
/** A published file and the integrity of its bytes. */
|
|
84
|
+
export declare const FileReference: z.ZodObject<{
|
|
85
|
+
file: z.ZodString;
|
|
86
|
+
integrity: z.ZodString;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
/** The content of the `v1/index.json` file. */
|
|
89
|
+
export declare const ToolIndex: z.ZodObject<{
|
|
90
|
+
$schema: z.ZodExactOptional<z.ZodURL>;
|
|
91
|
+
updatedAt: z.ZodISODateTime;
|
|
92
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
93
|
+
tool: z.ZodString;
|
|
94
|
+
versionCount: z.ZodNumber;
|
|
95
|
+
slim: z.ZodObject<{
|
|
96
|
+
file: z.ZodString;
|
|
97
|
+
integrity: z.ZodString;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
versionFiles: z.ZodExactOptional<z.ZodObject<{
|
|
100
|
+
file: z.ZodString;
|
|
101
|
+
integrity: z.ZodString;
|
|
102
|
+
}, z.core.$strip>>;
|
|
103
|
+
}, z.core.$strip>>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
/**
|
|
106
|
+
* The content of the root `index.json` file, which lists the published formats.
|
|
107
|
+
* It is minimal and stable: consumers pin a major version of the format and
|
|
108
|
+
* only read it to warn when their major is deprecated.
|
|
109
|
+
*/
|
|
110
|
+
export declare const FormatIndex: z.ZodObject<{
|
|
111
|
+
$schema: z.ZodExactOptional<z.ZodURL>;
|
|
112
|
+
defaultDistro: z.ZodString;
|
|
113
|
+
formats: z.ZodArray<z.ZodObject<{
|
|
114
|
+
version: z.ZodNumber;
|
|
115
|
+
path: z.ZodString;
|
|
116
|
+
status: z.ZodEnum<{
|
|
117
|
+
current: "current";
|
|
118
|
+
preview: "preview";
|
|
119
|
+
deprecated: "deprecated";
|
|
120
|
+
}>;
|
|
121
|
+
removalDate: z.ZodExactOptional<z.ZodISODate>;
|
|
122
|
+
}, z.core.$strip>>;
|
|
123
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ToolType } from "./schema.js";
|
|
3
|
+
// Reader schemas of the published tool-versions format, see
|
|
4
|
+
// https://github.com/containerbase/tool-versions/blob/main/docs/format.md
|
|
5
|
+
//
|
|
6
|
+
// Keep in sync with the interfaces in `tool-versions-types.ts`, which are the
|
|
7
|
+
// zod free version used by the default export. The objects are plain
|
|
8
|
+
// `z.object`s, so unknown keys are dropped and additive changes of the format
|
|
9
|
+
// don't break readers. Optionals are exact, so the inferred types match the
|
|
10
|
+
// interfaces.
|
|
11
|
+
/** A file of a version: where to download it and how to verify it. */
|
|
12
|
+
export const ToolFile = z.object({
|
|
13
|
+
/** the file name */
|
|
14
|
+
name: z.string().min(1),
|
|
15
|
+
/** the https download url */
|
|
16
|
+
url: z.url({ protocol: /^https$/ }),
|
|
17
|
+
/** `<algorithm>:<lowercase hex>` */
|
|
18
|
+
checksum: z
|
|
19
|
+
.string()
|
|
20
|
+
.regex(/^(sha1:[0-9a-f]{40}|sha256:[0-9a-f]{64}|sha512:[0-9a-f]{128})$/),
|
|
21
|
+
/**
|
|
22
|
+
* the containerbase arch, like `amd64`, omitted for arch-independent files;
|
|
23
|
+
* readers ignore files of an arch they don't know
|
|
24
|
+
*/
|
|
25
|
+
arch: z.string().min(1).exactOptional(),
|
|
26
|
+
/** the distro of a distro specific file, like `jammy` */
|
|
27
|
+
distro: z.string().min(1).exactOptional(),
|
|
28
|
+
});
|
|
29
|
+
/**
|
|
30
|
+
* An SRI-style sha256 digest of a published file's bytes, like npm's
|
|
31
|
+
* `integrity`.
|
|
32
|
+
*/
|
|
33
|
+
export const FileIntegrity = z.string().regex(/^sha256-[0-9A-Za-z+/]{43}=$/);
|
|
34
|
+
/**
|
|
35
|
+
* A version `install-tool` can install, the flags are only set when true and
|
|
36
|
+
* `files` and `releaseTimestamp` only when known.
|
|
37
|
+
*/
|
|
38
|
+
export const ToolVersion = z.object({
|
|
39
|
+
version: z.string().min(1),
|
|
40
|
+
prerelease: z.literal(true).exactOptional(),
|
|
41
|
+
lts: z.literal(true).exactOptional(),
|
|
42
|
+
/** when the version was released, in UTC */
|
|
43
|
+
releaseTimestamp: z.iso.datetime().exactOptional(),
|
|
44
|
+
/**
|
|
45
|
+
* sorted by name, not in the `<tool>.json` files, but in the
|
|
46
|
+
* `<tool>/<version>.json` ones
|
|
47
|
+
*/
|
|
48
|
+
files: z.array(ToolFile).min(1).exactOptional(),
|
|
49
|
+
});
|
|
50
|
+
/**
|
|
51
|
+
* The url of the json schema of a published file, which identifies its format.
|
|
52
|
+
* It is the first property, optional so files published before it was added
|
|
53
|
+
* still parse.
|
|
54
|
+
*/
|
|
55
|
+
const SchemaUrl = z.url({ protocol: /^https$/ }).exactOptional();
|
|
56
|
+
/** The content of a `<tool>.json` file. */
|
|
57
|
+
export const ToolVersions = z.object({
|
|
58
|
+
$schema: SchemaUrl,
|
|
59
|
+
tool: z.string(),
|
|
60
|
+
/** the package manager installing the tool, omitted for other tools */
|
|
61
|
+
type: ToolType.exactOptional(),
|
|
62
|
+
/** where the source code of the tool lives, omitted when unset */
|
|
63
|
+
sourceUrl: z.url({ protocol: /^https$/ }).exactOptional(),
|
|
64
|
+
/** the homepage of the tool, omitted when unset */
|
|
65
|
+
homepage: z.url({ protocol: /^https$/ }).exactOptional(),
|
|
66
|
+
/**
|
|
67
|
+
* the oldest version containerbase supports, on the `defaultDistro` of the
|
|
68
|
+
* root index, in the versioning of the tool. Older versions aren't listed.
|
|
69
|
+
* Omitted for tools without a limit.
|
|
70
|
+
*/
|
|
71
|
+
minVersion: z.string().min(1).exactOptional(),
|
|
72
|
+
/**
|
|
73
|
+
* the oldest version on a distro, by codename, only for the distros whose
|
|
74
|
+
* floor differs from `minVersion`. Any codename is allowed, so new distros
|
|
75
|
+
* don't break readers.
|
|
76
|
+
*/
|
|
77
|
+
distroMinVersion: z
|
|
78
|
+
.record(z.string().min(1), z.string().min(1))
|
|
79
|
+
.exactOptional(),
|
|
80
|
+
updatedAt: z.iso.datetime(),
|
|
81
|
+
/** newest first */
|
|
82
|
+
versions: z.array(ToolVersion),
|
|
83
|
+
});
|
|
84
|
+
/** The content of a `<tool>/<version>.json` file: the files of one version. */
|
|
85
|
+
export const VersionFiles = z.object({
|
|
86
|
+
$schema: SchemaUrl,
|
|
87
|
+
tool: z.string(),
|
|
88
|
+
version: z.string().min(1),
|
|
89
|
+
/** sorted by name */
|
|
90
|
+
files: z.array(ToolFile).min(1),
|
|
91
|
+
});
|
|
92
|
+
/**
|
|
93
|
+
* The content of a `<tool>.integrity.json` file: the integrity of each
|
|
94
|
+
* `<tool>/<version>.json` file, by version.
|
|
95
|
+
*/
|
|
96
|
+
export const VersionIntegrity = z.object({
|
|
97
|
+
$schema: SchemaUrl,
|
|
98
|
+
tool: z.string(),
|
|
99
|
+
versions: z.record(z.string(), FileIntegrity),
|
|
100
|
+
});
|
|
101
|
+
/** A published file and the integrity of its bytes. */
|
|
102
|
+
export const FileReference = z.object({
|
|
103
|
+
file: z.string(),
|
|
104
|
+
integrity: FileIntegrity,
|
|
105
|
+
});
|
|
106
|
+
/** The content of the `v1/index.json` file. */
|
|
107
|
+
export const ToolIndex = z.object({
|
|
108
|
+
$schema: SchemaUrl,
|
|
109
|
+
updatedAt: z.iso.datetime(),
|
|
110
|
+
tools: z.array(z.object({
|
|
111
|
+
tool: z.string(),
|
|
112
|
+
versionCount: z.number().int().nonnegative(),
|
|
113
|
+
/** the `<tool>.json` file, the versions without their files */
|
|
114
|
+
slim: FileReference,
|
|
115
|
+
/**
|
|
116
|
+
* the `<tool>.integrity.json` file, with the integrity of each
|
|
117
|
+
* `<tool>/<version>.json` file, only for tools with files
|
|
118
|
+
*/
|
|
119
|
+
versionFiles: FileReference.exactOptional(),
|
|
120
|
+
})),
|
|
121
|
+
});
|
|
122
|
+
/**
|
|
123
|
+
* The content of the root `index.json` file, which lists the published formats.
|
|
124
|
+
* It is minimal and stable: consumers pin a major version of the format and
|
|
125
|
+
* only read it to warn when their major is deprecated.
|
|
126
|
+
*/
|
|
127
|
+
export const FormatIndex = z.object({
|
|
128
|
+
$schema: SchemaUrl,
|
|
129
|
+
/**
|
|
130
|
+
* the codename of the Ubuntu release the default image is built from, which
|
|
131
|
+
* the `minVersion` of the tools refers to
|
|
132
|
+
*/
|
|
133
|
+
defaultDistro: z.string().min(1),
|
|
134
|
+
formats: z.array(z.object({
|
|
135
|
+
/** the major version of the format */
|
|
136
|
+
version: z.number().int().positive(),
|
|
137
|
+
/** the folder of the format, relative to the root */
|
|
138
|
+
path: z.string().min(1),
|
|
139
|
+
/** `current` is the format to use, `preview` is not stable yet */
|
|
140
|
+
status: z.enum(['current', 'preview', 'deprecated']),
|
|
141
|
+
/** the date a deprecated format is no longer published */
|
|
142
|
+
removalDate: z.iso.date().exactOptional(),
|
|
143
|
+
})),
|
|
144
|
+
});
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import type { ToolType } from './types.ts';
|
|
2
|
+
/**
|
|
3
|
+
* A file of a version: where to download it and how to verify it.
|
|
4
|
+
*/
|
|
5
|
+
export interface ToolFile {
|
|
6
|
+
/**
|
|
7
|
+
* The file name.
|
|
8
|
+
*/
|
|
9
|
+
name: string;
|
|
10
|
+
/**
|
|
11
|
+
* The https download url.
|
|
12
|
+
*/
|
|
13
|
+
url: string;
|
|
14
|
+
/**
|
|
15
|
+
* `<algorithm>:<lowercase hex>`
|
|
16
|
+
*/
|
|
17
|
+
checksum: string;
|
|
18
|
+
/**
|
|
19
|
+
* The containerbase arch, like `amd64`, omitted for arch-independent files;
|
|
20
|
+
* readers ignore files of an arch they don't know.
|
|
21
|
+
*/
|
|
22
|
+
arch?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The distro of a distro specific file, like `jammy`.
|
|
25
|
+
*/
|
|
26
|
+
distro?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* An SRI-style sha256 digest of a published file's bytes, like npm's
|
|
30
|
+
* `integrity`.
|
|
31
|
+
*/
|
|
32
|
+
export type FileIntegrity = string;
|
|
33
|
+
/**
|
|
34
|
+
* A version `install-tool` can install, the flags are only set when true and
|
|
35
|
+
* `files` and `releaseTimestamp` only when known.
|
|
36
|
+
*/
|
|
37
|
+
export interface ToolVersion {
|
|
38
|
+
version: string;
|
|
39
|
+
prerelease?: true;
|
|
40
|
+
lts?: true;
|
|
41
|
+
/**
|
|
42
|
+
* When the version was released, in UTC.
|
|
43
|
+
*/
|
|
44
|
+
releaseTimestamp?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Sorted by name, not in the `<tool>.json` files, but in the
|
|
47
|
+
* `<tool>/<version>.json` ones.
|
|
48
|
+
*/
|
|
49
|
+
files?: ToolFile[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The content of a `<tool>.json` file.
|
|
53
|
+
*/
|
|
54
|
+
export interface ToolVersions {
|
|
55
|
+
/**
|
|
56
|
+
* The url of the json schema of the file, which identifies its format.
|
|
57
|
+
*/
|
|
58
|
+
$schema?: string;
|
|
59
|
+
tool: string;
|
|
60
|
+
/**
|
|
61
|
+
* The package manager installing the tool, omitted for other tools.
|
|
62
|
+
*/
|
|
63
|
+
type?: ToolType;
|
|
64
|
+
/**
|
|
65
|
+
* Where the source code of the tool lives, omitted when unset.
|
|
66
|
+
*/
|
|
67
|
+
sourceUrl?: string;
|
|
68
|
+
/**
|
|
69
|
+
* The homepage of the tool, omitted when unset.
|
|
70
|
+
*/
|
|
71
|
+
homepage?: string;
|
|
72
|
+
/**
|
|
73
|
+
* The oldest version containerbase supports, on the `defaultDistro` of the
|
|
74
|
+
* root index, in the versioning of the tool. Older versions aren't listed.
|
|
75
|
+
* Omitted for tools without a limit.
|
|
76
|
+
*/
|
|
77
|
+
minVersion?: string;
|
|
78
|
+
/**
|
|
79
|
+
* The oldest version on a distro, by codename, only for the distros whose
|
|
80
|
+
* floor differs from `minVersion`. Any codename is allowed, so new distros
|
|
81
|
+
* don't break readers.
|
|
82
|
+
*/
|
|
83
|
+
distroMinVersion?: Record<string, string>;
|
|
84
|
+
updatedAt: string;
|
|
85
|
+
/**
|
|
86
|
+
* Newest first.
|
|
87
|
+
*/
|
|
88
|
+
versions: ToolVersion[];
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* The content of a `<tool>/<version>.json` file: the files of one version.
|
|
92
|
+
*/
|
|
93
|
+
export interface VersionFiles {
|
|
94
|
+
/**
|
|
95
|
+
* The url of the json schema of the file, which identifies its format.
|
|
96
|
+
*/
|
|
97
|
+
$schema?: string;
|
|
98
|
+
tool: string;
|
|
99
|
+
version: string;
|
|
100
|
+
/**
|
|
101
|
+
* Sorted by name.
|
|
102
|
+
*/
|
|
103
|
+
files: ToolFile[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The content of a `<tool>.integrity.json` file: the integrity of each
|
|
107
|
+
* `<tool>/<version>.json` file, by version.
|
|
108
|
+
*/
|
|
109
|
+
export interface VersionIntegrity {
|
|
110
|
+
/**
|
|
111
|
+
* The url of the json schema of the file, which identifies its format.
|
|
112
|
+
*/
|
|
113
|
+
$schema?: string;
|
|
114
|
+
tool: string;
|
|
115
|
+
versions: Record<string, FileIntegrity>;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* A published file and the integrity of its bytes.
|
|
119
|
+
*/
|
|
120
|
+
export interface FileReference {
|
|
121
|
+
file: string;
|
|
122
|
+
integrity: FileIntegrity;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The content of the `v1/index.json` file.
|
|
126
|
+
*/
|
|
127
|
+
export interface ToolIndex {
|
|
128
|
+
/**
|
|
129
|
+
* The url of the json schema of the file, which identifies its format.
|
|
130
|
+
*/
|
|
131
|
+
$schema?: string;
|
|
132
|
+
updatedAt: string;
|
|
133
|
+
tools: {
|
|
134
|
+
tool: string;
|
|
135
|
+
versionCount: number;
|
|
136
|
+
/**
|
|
137
|
+
* The `<tool>.json` file, the versions without their files.
|
|
138
|
+
*/
|
|
139
|
+
slim: FileReference;
|
|
140
|
+
/**
|
|
141
|
+
* The `<tool>.integrity.json` file, with the integrity of each
|
|
142
|
+
* `<tool>/<version>.json` file, only for tools with files.
|
|
143
|
+
*/
|
|
144
|
+
versionFiles?: FileReference;
|
|
145
|
+
}[];
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The content of the root `index.json` file, which lists the published formats.
|
|
149
|
+
* It is minimal and stable: consumers pin a major version of the format and
|
|
150
|
+
* only read it to warn when their major is deprecated.
|
|
151
|
+
*/
|
|
152
|
+
export interface FormatIndex {
|
|
153
|
+
/**
|
|
154
|
+
* The url of the json schema of the file, which identifies its format.
|
|
155
|
+
*/
|
|
156
|
+
$schema?: string;
|
|
157
|
+
/**
|
|
158
|
+
* The codename of the Ubuntu release the default image is built from, which
|
|
159
|
+
* the `minVersion` of the tools refers to.
|
|
160
|
+
*/
|
|
161
|
+
defaultDistro: string;
|
|
162
|
+
formats: {
|
|
163
|
+
/**
|
|
164
|
+
* The major version of the format.
|
|
165
|
+
*/
|
|
166
|
+
version: number;
|
|
167
|
+
/**
|
|
168
|
+
* The folder of the format, relative to the root.
|
|
169
|
+
*/
|
|
170
|
+
path: string;
|
|
171
|
+
/**
|
|
172
|
+
* `current` is the format to use, `preview` is not stable yet.
|
|
173
|
+
*/
|
|
174
|
+
status: 'current' | 'preview' | 'deprecated';
|
|
175
|
+
/**
|
|
176
|
+
* The date a deprecated format is no longer published.
|
|
177
|
+
*/
|
|
178
|
+
removalDate?: string;
|
|
179
|
+
}[];
|
|
180
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/zod.d.ts
CHANGED
package/dist/zod.js
CHANGED