@containerbase/base 14.24.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/LICENSE +21 -0
- package/README.md +58 -0
- package/data/tools.json +81 -0
- package/data/tools.schema.json +38 -0
- package/dist/data.d.ts +165 -0
- package/dist/data.js +82 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +6 -0
- package/dist/schema.d.ts +40 -0
- package/dist/schema.js +36 -0
- package/dist/types.d.ts +25 -0
- package/dist/types.js +1 -0
- package/dist/zod.d.ts +85 -0
- package/dist/zod.js +8 -0
- package/package.json +49 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 WhiteSource Ltd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# `@containerbase/base`
|
|
2
|
+
|
|
3
|
+
Metadata about the tools that [Containerbase](https://github.com/containerbase/base) supports.
|
|
4
|
+
|
|
5
|
+
The data is generated from the Containerbase sources and released with the same version as Containerbase itself.
|
|
6
|
+
This allows a consumer of this library to determine which tools can be used with a given version of Containerbase (via `/usr/local/containerbase/version`): if the image has the same major version as this package and a version greater than or equal to the package version, every tool listed here can be installed in that image.
|
|
7
|
+
A new major version may remove tools, so compare against the package of the image's major version.
|
|
8
|
+
|
|
9
|
+
The package version to compare with is exported too:
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import pkg from '@containerbase/base/package.json' with { type: 'json' };
|
|
13
|
+
|
|
14
|
+
pkg.version; // eg. '14.2.0'
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { toolNames, tools, type ToolName } from '@containerbase/base';
|
|
21
|
+
|
|
22
|
+
tools.composer; // { parent: 'php' }
|
|
23
|
+
tools.kas; // { type: 'pip', parent: 'python' }
|
|
24
|
+
|
|
25
|
+
function install(tool: ToolName): void {
|
|
26
|
+
// `ToolName` is a union of all supported names
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The raw data and its json schema are also exported, for consumers which don't use TypeScript:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import tools from '@containerbase/base/tools.json' with { type: 'json' };
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The zod schemas live behind a separate entry point, so the default export stays dependency free:
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import { SupportedTools, ToolName } from '@containerbase/base/zod';
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Contents
|
|
43
|
+
|
|
44
|
+
Each entry may carry the following metadata:
|
|
45
|
+
|
|
46
|
+
| Field | Description |
|
|
47
|
+
| ------------ | --------------------------------------------------------------------------------------------------------------- |
|
|
48
|
+
| `type` | the installer used for the tool, one of `gem`, `npm` or `pip` |
|
|
49
|
+
| `parent` | the tool it depends on, eg. `composer` depends on `php`, which requires `php` to be installed before `composer` |
|
|
50
|
+
| `deprecated` | the tool should not be used any more |
|
|
51
|
+
| `root` | the tool can only be installed as root, so at image build time |
|
|
52
|
+
|
|
53
|
+
Only the names `install-tool` accepts are listed.
|
|
54
|
+
Packages installed with an arbitrary name via `install-gem`, `install-npm` or `install-pip` are not, as that list is unbounded.
|
|
55
|
+
|
|
56
|
+
## Development
|
|
57
|
+
|
|
58
|
+
The files in `data/` and `src/data.ts` are generated, run `pnpm tools` in the repository root to update them.
|
package/data/tools.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tools": {
|
|
3
|
+
"android-sdk-cmdline-tools": { "parent": "java" },
|
|
4
|
+
"apko": {},
|
|
5
|
+
"apm": {},
|
|
6
|
+
"bazelisk": {},
|
|
7
|
+
"bower": { "type": "npm", "parent": "node", "deprecated": true },
|
|
8
|
+
"buf": {},
|
|
9
|
+
"buildx": { "parent": "docker" },
|
|
10
|
+
"bun": {},
|
|
11
|
+
"bundler": { "type": "gem", "parent": "ruby" },
|
|
12
|
+
"cabal": {},
|
|
13
|
+
"checkov": { "type": "pip", "parent": "python" },
|
|
14
|
+
"cocoapods": { "parent": "ruby" },
|
|
15
|
+
"composer": { "parent": "php" },
|
|
16
|
+
"conan": { "parent": "python" },
|
|
17
|
+
"copier": { "type": "pip", "parent": "python" },
|
|
18
|
+
"corepack": { "type": "npm", "parent": "node" },
|
|
19
|
+
"dart": {},
|
|
20
|
+
"deno": {},
|
|
21
|
+
"devbox": {},
|
|
22
|
+
"docker": {},
|
|
23
|
+
"docker-compose": { "parent": "docker" },
|
|
24
|
+
"dotnet": {},
|
|
25
|
+
"elixir": { "parent": "erlang" },
|
|
26
|
+
"erlang": {},
|
|
27
|
+
"flutter": {},
|
|
28
|
+
"flux": {},
|
|
29
|
+
"gh": {},
|
|
30
|
+
"ghc": {},
|
|
31
|
+
"git": { "root": true },
|
|
32
|
+
"git-lfs": { "parent": "git" },
|
|
33
|
+
"gleam": {},
|
|
34
|
+
"golang": {},
|
|
35
|
+
"gradle": { "parent": "java" },
|
|
36
|
+
"hashin": { "type": "pip", "parent": "python" },
|
|
37
|
+
"helm": {},
|
|
38
|
+
"helmfile": {},
|
|
39
|
+
"java": {},
|
|
40
|
+
"java-jdk": {},
|
|
41
|
+
"java-jre": {},
|
|
42
|
+
"jb": {},
|
|
43
|
+
"kas": { "type": "pip", "parent": "python" },
|
|
44
|
+
"kubectl": {},
|
|
45
|
+
"kustomize": {},
|
|
46
|
+
"lerna": { "type": "npm", "parent": "node", "deprecated": true },
|
|
47
|
+
"maven": { "parent": "java" },
|
|
48
|
+
"mise": {},
|
|
49
|
+
"mono": {},
|
|
50
|
+
"nix": {},
|
|
51
|
+
"node": {},
|
|
52
|
+
"npm": { "type": "npm", "parent": "node" },
|
|
53
|
+
"nuget": { "parent": "mono" },
|
|
54
|
+
"paket": { "parent": "dotnet" },
|
|
55
|
+
"pdm": { "type": "pip", "parent": "python" },
|
|
56
|
+
"php": {},
|
|
57
|
+
"pip-tools": { "type": "pip", "parent": "python" },
|
|
58
|
+
"pipenv": { "type": "pip", "parent": "python" },
|
|
59
|
+
"pixi": {},
|
|
60
|
+
"pnpm": { "type": "npm", "parent": "node" },
|
|
61
|
+
"poetry": { "type": "pip", "parent": "python" },
|
|
62
|
+
"powershell": {},
|
|
63
|
+
"protoc": {},
|
|
64
|
+
"python": {},
|
|
65
|
+
"renovate": { "parent": "node" },
|
|
66
|
+
"ruby": {},
|
|
67
|
+
"rust": {},
|
|
68
|
+
"sbt": { "parent": "java" },
|
|
69
|
+
"scala": { "parent": "java" },
|
|
70
|
+
"skopeo": {},
|
|
71
|
+
"sops": {},
|
|
72
|
+
"swift": {},
|
|
73
|
+
"terraform": {},
|
|
74
|
+
"tofu": {},
|
|
75
|
+
"uv": { "type": "pip", "parent": "python" },
|
|
76
|
+
"vendir": {},
|
|
77
|
+
"wally": {},
|
|
78
|
+
"yarn": { "parent": "node" },
|
|
79
|
+
"yarn-slim": { "parent": "node" }
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"tools": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"propertyNames": { "type": "string" },
|
|
8
|
+
"additionalProperties": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"type": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": ["gem", "npm", "pip"],
|
|
14
|
+
"description": "the installer used for this tool, only set for dynamically installed tools"
|
|
15
|
+
},
|
|
16
|
+
"parent": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "the tool this tool depends on, eg. composer depends on php"
|
|
19
|
+
},
|
|
20
|
+
"deprecated": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"const": true,
|
|
23
|
+
"description": "deprecated tools should not be used any more"
|
|
24
|
+
},
|
|
25
|
+
"root": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"const": true,
|
|
28
|
+
"description": "the tool can only be installed as root, so only at image build time"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"additionalProperties": false
|
|
32
|
+
},
|
|
33
|
+
"description": "all supported tools, keyed by tool name"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"required": ["tools"],
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
}
|
package/dist/data.d.ts
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All tools `install-tool` supports, sorted by name.
|
|
3
|
+
*/
|
|
4
|
+
export declare const tools: {
|
|
5
|
+
readonly 'android-sdk-cmdline-tools': {
|
|
6
|
+
readonly parent: "java";
|
|
7
|
+
};
|
|
8
|
+
readonly apko: {};
|
|
9
|
+
readonly apm: {};
|
|
10
|
+
readonly bazelisk: {};
|
|
11
|
+
readonly bower: {
|
|
12
|
+
readonly type: "npm";
|
|
13
|
+
readonly parent: "node";
|
|
14
|
+
readonly deprecated: true;
|
|
15
|
+
};
|
|
16
|
+
readonly buf: {};
|
|
17
|
+
readonly buildx: {
|
|
18
|
+
readonly parent: "docker";
|
|
19
|
+
};
|
|
20
|
+
readonly bun: {};
|
|
21
|
+
readonly bundler: {
|
|
22
|
+
readonly type: "gem";
|
|
23
|
+
readonly parent: "ruby";
|
|
24
|
+
};
|
|
25
|
+
readonly cabal: {};
|
|
26
|
+
readonly checkov: {
|
|
27
|
+
readonly type: "pip";
|
|
28
|
+
readonly parent: "python";
|
|
29
|
+
};
|
|
30
|
+
readonly cocoapods: {
|
|
31
|
+
readonly parent: "ruby";
|
|
32
|
+
};
|
|
33
|
+
readonly composer: {
|
|
34
|
+
readonly parent: "php";
|
|
35
|
+
};
|
|
36
|
+
readonly conan: {
|
|
37
|
+
readonly parent: "python";
|
|
38
|
+
};
|
|
39
|
+
readonly copier: {
|
|
40
|
+
readonly type: "pip";
|
|
41
|
+
readonly parent: "python";
|
|
42
|
+
};
|
|
43
|
+
readonly corepack: {
|
|
44
|
+
readonly type: "npm";
|
|
45
|
+
readonly parent: "node";
|
|
46
|
+
};
|
|
47
|
+
readonly dart: {};
|
|
48
|
+
readonly deno: {};
|
|
49
|
+
readonly devbox: {};
|
|
50
|
+
readonly docker: {};
|
|
51
|
+
readonly 'docker-compose': {
|
|
52
|
+
readonly parent: "docker";
|
|
53
|
+
};
|
|
54
|
+
readonly dotnet: {};
|
|
55
|
+
readonly elixir: {
|
|
56
|
+
readonly parent: "erlang";
|
|
57
|
+
};
|
|
58
|
+
readonly erlang: {};
|
|
59
|
+
readonly flutter: {};
|
|
60
|
+
readonly flux: {};
|
|
61
|
+
readonly gh: {};
|
|
62
|
+
readonly ghc: {};
|
|
63
|
+
readonly git: {
|
|
64
|
+
readonly root: true;
|
|
65
|
+
};
|
|
66
|
+
readonly 'git-lfs': {
|
|
67
|
+
readonly parent: "git";
|
|
68
|
+
};
|
|
69
|
+
readonly gleam: {};
|
|
70
|
+
readonly golang: {};
|
|
71
|
+
readonly gradle: {
|
|
72
|
+
readonly parent: "java";
|
|
73
|
+
};
|
|
74
|
+
readonly hashin: {
|
|
75
|
+
readonly type: "pip";
|
|
76
|
+
readonly parent: "python";
|
|
77
|
+
};
|
|
78
|
+
readonly helm: {};
|
|
79
|
+
readonly helmfile: {};
|
|
80
|
+
readonly java: {};
|
|
81
|
+
readonly 'java-jdk': {};
|
|
82
|
+
readonly 'java-jre': {};
|
|
83
|
+
readonly jb: {};
|
|
84
|
+
readonly kas: {
|
|
85
|
+
readonly type: "pip";
|
|
86
|
+
readonly parent: "python";
|
|
87
|
+
};
|
|
88
|
+
readonly kubectl: {};
|
|
89
|
+
readonly kustomize: {};
|
|
90
|
+
readonly lerna: {
|
|
91
|
+
readonly type: "npm";
|
|
92
|
+
readonly parent: "node";
|
|
93
|
+
readonly deprecated: true;
|
|
94
|
+
};
|
|
95
|
+
readonly maven: {
|
|
96
|
+
readonly parent: "java";
|
|
97
|
+
};
|
|
98
|
+
readonly mise: {};
|
|
99
|
+
readonly mono: {};
|
|
100
|
+
readonly nix: {};
|
|
101
|
+
readonly node: {};
|
|
102
|
+
readonly npm: {
|
|
103
|
+
readonly type: "npm";
|
|
104
|
+
readonly parent: "node";
|
|
105
|
+
};
|
|
106
|
+
readonly nuget: {
|
|
107
|
+
readonly parent: "mono";
|
|
108
|
+
};
|
|
109
|
+
readonly paket: {
|
|
110
|
+
readonly parent: "dotnet";
|
|
111
|
+
};
|
|
112
|
+
readonly pdm: {
|
|
113
|
+
readonly type: "pip";
|
|
114
|
+
readonly parent: "python";
|
|
115
|
+
};
|
|
116
|
+
readonly php: {};
|
|
117
|
+
readonly 'pip-tools': {
|
|
118
|
+
readonly type: "pip";
|
|
119
|
+
readonly parent: "python";
|
|
120
|
+
};
|
|
121
|
+
readonly pipenv: {
|
|
122
|
+
readonly type: "pip";
|
|
123
|
+
readonly parent: "python";
|
|
124
|
+
};
|
|
125
|
+
readonly pixi: {};
|
|
126
|
+
readonly pnpm: {
|
|
127
|
+
readonly type: "npm";
|
|
128
|
+
readonly parent: "node";
|
|
129
|
+
};
|
|
130
|
+
readonly poetry: {
|
|
131
|
+
readonly type: "pip";
|
|
132
|
+
readonly parent: "python";
|
|
133
|
+
};
|
|
134
|
+
readonly powershell: {};
|
|
135
|
+
readonly protoc: {};
|
|
136
|
+
readonly python: {};
|
|
137
|
+
readonly renovate: {
|
|
138
|
+
readonly parent: "node";
|
|
139
|
+
};
|
|
140
|
+
readonly ruby: {};
|
|
141
|
+
readonly rust: {};
|
|
142
|
+
readonly sbt: {
|
|
143
|
+
readonly parent: "java";
|
|
144
|
+
};
|
|
145
|
+
readonly scala: {
|
|
146
|
+
readonly parent: "java";
|
|
147
|
+
};
|
|
148
|
+
readonly skopeo: {};
|
|
149
|
+
readonly sops: {};
|
|
150
|
+
readonly swift: {};
|
|
151
|
+
readonly terraform: {};
|
|
152
|
+
readonly tofu: {};
|
|
153
|
+
readonly uv: {
|
|
154
|
+
readonly type: "pip";
|
|
155
|
+
readonly parent: "python";
|
|
156
|
+
};
|
|
157
|
+
readonly vendir: {};
|
|
158
|
+
readonly wally: {};
|
|
159
|
+
readonly yarn: {
|
|
160
|
+
readonly parent: "node";
|
|
161
|
+
};
|
|
162
|
+
readonly 'yarn-slim': {
|
|
163
|
+
readonly parent: "node";
|
|
164
|
+
};
|
|
165
|
+
};
|
package/dist/data.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All tools `install-tool` supports, sorted by name.
|
|
3
|
+
*/
|
|
4
|
+
export const tools = {
|
|
5
|
+
'android-sdk-cmdline-tools': { parent: 'java' },
|
|
6
|
+
apko: {},
|
|
7
|
+
apm: {},
|
|
8
|
+
bazelisk: {},
|
|
9
|
+
bower: { type: 'npm', parent: 'node', deprecated: true },
|
|
10
|
+
buf: {},
|
|
11
|
+
buildx: { parent: 'docker' },
|
|
12
|
+
bun: {},
|
|
13
|
+
bundler: { type: 'gem', parent: 'ruby' },
|
|
14
|
+
cabal: {},
|
|
15
|
+
checkov: { type: 'pip', parent: 'python' },
|
|
16
|
+
cocoapods: { parent: 'ruby' },
|
|
17
|
+
composer: { parent: 'php' },
|
|
18
|
+
conan: { parent: 'python' },
|
|
19
|
+
copier: { type: 'pip', parent: 'python' },
|
|
20
|
+
corepack: { type: 'npm', parent: 'node' },
|
|
21
|
+
dart: {},
|
|
22
|
+
deno: {},
|
|
23
|
+
devbox: {},
|
|
24
|
+
docker: {},
|
|
25
|
+
'docker-compose': { parent: 'docker' },
|
|
26
|
+
dotnet: {},
|
|
27
|
+
elixir: { parent: 'erlang' },
|
|
28
|
+
erlang: {},
|
|
29
|
+
flutter: {},
|
|
30
|
+
flux: {},
|
|
31
|
+
gh: {},
|
|
32
|
+
ghc: {},
|
|
33
|
+
git: { root: true },
|
|
34
|
+
'git-lfs': { parent: 'git' },
|
|
35
|
+
gleam: {},
|
|
36
|
+
golang: {},
|
|
37
|
+
gradle: { parent: 'java' },
|
|
38
|
+
hashin: { type: 'pip', parent: 'python' },
|
|
39
|
+
helm: {},
|
|
40
|
+
helmfile: {},
|
|
41
|
+
java: {},
|
|
42
|
+
'java-jdk': {},
|
|
43
|
+
'java-jre': {},
|
|
44
|
+
jb: {},
|
|
45
|
+
kas: { type: 'pip', parent: 'python' },
|
|
46
|
+
kubectl: {},
|
|
47
|
+
kustomize: {},
|
|
48
|
+
lerna: { type: 'npm', parent: 'node', deprecated: true },
|
|
49
|
+
maven: { parent: 'java' },
|
|
50
|
+
mise: {},
|
|
51
|
+
mono: {},
|
|
52
|
+
nix: {},
|
|
53
|
+
node: {},
|
|
54
|
+
npm: { type: 'npm', parent: 'node' },
|
|
55
|
+
nuget: { parent: 'mono' },
|
|
56
|
+
paket: { parent: 'dotnet' },
|
|
57
|
+
pdm: { type: 'pip', parent: 'python' },
|
|
58
|
+
php: {},
|
|
59
|
+
'pip-tools': { type: 'pip', parent: 'python' },
|
|
60
|
+
pipenv: { type: 'pip', parent: 'python' },
|
|
61
|
+
pixi: {},
|
|
62
|
+
pnpm: { type: 'npm', parent: 'node' },
|
|
63
|
+
poetry: { type: 'pip', parent: 'python' },
|
|
64
|
+
powershell: {},
|
|
65
|
+
protoc: {},
|
|
66
|
+
python: {},
|
|
67
|
+
renovate: { parent: 'node' },
|
|
68
|
+
ruby: {},
|
|
69
|
+
rust: {},
|
|
70
|
+
sbt: { parent: 'java' },
|
|
71
|
+
scala: { parent: 'java' },
|
|
72
|
+
skopeo: {},
|
|
73
|
+
sops: {},
|
|
74
|
+
swift: {},
|
|
75
|
+
terraform: {},
|
|
76
|
+
tofu: {},
|
|
77
|
+
uv: { type: 'pip', parent: 'python' },
|
|
78
|
+
vendir: {},
|
|
79
|
+
wally: {},
|
|
80
|
+
yarn: { parent: 'node' },
|
|
81
|
+
'yarn-slim': { parent: 'node' },
|
|
82
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { tools } from './data.ts';
|
|
2
|
+
export { tools } from './data.ts';
|
|
3
|
+
export type { InstallToolType, ToolMetadata } from './types.ts';
|
|
4
|
+
/**
|
|
5
|
+
* A tool name `install-tool` accepts.
|
|
6
|
+
*/
|
|
7
|
+
export type ToolName = keyof typeof tools;
|
|
8
|
+
/**
|
|
9
|
+
* All supported tool names, sorted alphabetically.
|
|
10
|
+
*/
|
|
11
|
+
export declare const toolNames: ToolName[];
|
package/dist/index.js
ADDED
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const InstallToolType: z.ZodEnum<{
|
|
3
|
+
gem: "gem";
|
|
4
|
+
npm: "npm";
|
|
5
|
+
pip: "pip";
|
|
6
|
+
}>;
|
|
7
|
+
/**
|
|
8
|
+
* Schema of a single entry of `tools.json`.
|
|
9
|
+
*
|
|
10
|
+
* Keep in sync with the `ToolMetadata` interface in `types.ts`, which is the
|
|
11
|
+
* zod free version used by the default export.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ToolMetadata: z.ZodObject<{
|
|
14
|
+
type: z.ZodExactOptional<z.ZodEnum<{
|
|
15
|
+
gem: "gem";
|
|
16
|
+
npm: "npm";
|
|
17
|
+
pip: "pip";
|
|
18
|
+
}>>;
|
|
19
|
+
parent: z.ZodExactOptional<z.ZodString>;
|
|
20
|
+
deprecated: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
21
|
+
root: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
22
|
+
}, z.core.$strict>;
|
|
23
|
+
/**
|
|
24
|
+
* Schema of `tools.json`.
|
|
25
|
+
*
|
|
26
|
+
* The generated json schema lives in `data/tools.schema.json`.
|
|
27
|
+
*/
|
|
28
|
+
export declare const SupportedTools: z.ZodObject<{
|
|
29
|
+
tools: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
30
|
+
type: z.ZodExactOptional<z.ZodEnum<{
|
|
31
|
+
gem: "gem";
|
|
32
|
+
npm: "npm";
|
|
33
|
+
pip: "pip";
|
|
34
|
+
}>>;
|
|
35
|
+
parent: z.ZodExactOptional<z.ZodString>;
|
|
36
|
+
deprecated: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
37
|
+
root: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
38
|
+
}, z.core.$strict>>;
|
|
39
|
+
}, z.core.$strict>;
|
|
40
|
+
export type SupportedTools = z.infer<typeof SupportedTools>;
|
package/dist/schema.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const InstallToolType = z
|
|
3
|
+
.enum(['gem', 'npm', 'pip'])
|
|
4
|
+
.describe('the installer a dynamically installed tool is installed with');
|
|
5
|
+
/**
|
|
6
|
+
* Schema of a single entry of `tools.json`.
|
|
7
|
+
*
|
|
8
|
+
* Keep in sync with the `ToolMetadata` interface in `types.ts`, which is the
|
|
9
|
+
* zod free version used by the default export.
|
|
10
|
+
*/
|
|
11
|
+
export const ToolMetadata = z.strictObject({
|
|
12
|
+
// exact optionals, so the inferred type matches the zod free interface
|
|
13
|
+
type: InstallToolType.describe('the installer used for this tool, only set for dynamically installed tools').exactOptional(),
|
|
14
|
+
parent: z
|
|
15
|
+
.string()
|
|
16
|
+
.describe('the tool this tool depends on, eg. composer depends on php')
|
|
17
|
+
.exactOptional(),
|
|
18
|
+
deprecated: z
|
|
19
|
+
.literal(true)
|
|
20
|
+
.describe('deprecated tools should not be used any more')
|
|
21
|
+
.exactOptional(),
|
|
22
|
+
root: z
|
|
23
|
+
.literal(true)
|
|
24
|
+
.describe('the tool can only be installed as root, so only at image build time')
|
|
25
|
+
.exactOptional(),
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Schema of `tools.json`.
|
|
29
|
+
*
|
|
30
|
+
* The generated json schema lives in `data/tools.schema.json`.
|
|
31
|
+
*/
|
|
32
|
+
export const SupportedTools = z.strictObject({
|
|
33
|
+
tools: z
|
|
34
|
+
.record(z.string(), ToolMetadata)
|
|
35
|
+
.describe('all supported tools, keyed by tool name'),
|
|
36
|
+
});
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The installer a dynamically installed tool is installed with.
|
|
3
|
+
*/
|
|
4
|
+
export type InstallToolType = 'gem' | 'npm' | 'pip';
|
|
5
|
+
/**
|
|
6
|
+
* What containerbase knows about a supported tool.
|
|
7
|
+
*/
|
|
8
|
+
export interface ToolMetadata {
|
|
9
|
+
/**
|
|
10
|
+
* The installer used for this tool, only set for dynamically installed tools.
|
|
11
|
+
*/
|
|
12
|
+
type?: InstallToolType;
|
|
13
|
+
/**
|
|
14
|
+
* The tool this tool depends on, eg. `composer` depends on `php`.
|
|
15
|
+
*/
|
|
16
|
+
parent?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Deprecated tools should not be used any more.
|
|
19
|
+
*/
|
|
20
|
+
deprecated?: true;
|
|
21
|
+
/**
|
|
22
|
+
* The tool can only be installed as root, so only at image build time.
|
|
23
|
+
*/
|
|
24
|
+
root?: true;
|
|
25
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/zod.d.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export * from './schema.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Enum of all tool names supported by the containerbase version this package
|
|
5
|
+
* was released with.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ToolName: z.ZodEnum<{
|
|
8
|
+
npm: "npm";
|
|
9
|
+
"android-sdk-cmdline-tools": "android-sdk-cmdline-tools";
|
|
10
|
+
java: "java";
|
|
11
|
+
apko: "apko";
|
|
12
|
+
apm: "apm";
|
|
13
|
+
bazelisk: "bazelisk";
|
|
14
|
+
bower: "bower";
|
|
15
|
+
node: "node";
|
|
16
|
+
buf: "buf";
|
|
17
|
+
buildx: "buildx";
|
|
18
|
+
docker: "docker";
|
|
19
|
+
bun: "bun";
|
|
20
|
+
bundler: "bundler";
|
|
21
|
+
ruby: "ruby";
|
|
22
|
+
cabal: "cabal";
|
|
23
|
+
checkov: "checkov";
|
|
24
|
+
python: "python";
|
|
25
|
+
cocoapods: "cocoapods";
|
|
26
|
+
composer: "composer";
|
|
27
|
+
php: "php";
|
|
28
|
+
conan: "conan";
|
|
29
|
+
copier: "copier";
|
|
30
|
+
corepack: "corepack";
|
|
31
|
+
dart: "dart";
|
|
32
|
+
deno: "deno";
|
|
33
|
+
devbox: "devbox";
|
|
34
|
+
"docker-compose": "docker-compose";
|
|
35
|
+
dotnet: "dotnet";
|
|
36
|
+
elixir: "elixir";
|
|
37
|
+
erlang: "erlang";
|
|
38
|
+
flutter: "flutter";
|
|
39
|
+
flux: "flux";
|
|
40
|
+
gh: "gh";
|
|
41
|
+
ghc: "ghc";
|
|
42
|
+
git: "git";
|
|
43
|
+
"git-lfs": "git-lfs";
|
|
44
|
+
gleam: "gleam";
|
|
45
|
+
golang: "golang";
|
|
46
|
+
gradle: "gradle";
|
|
47
|
+
hashin: "hashin";
|
|
48
|
+
helm: "helm";
|
|
49
|
+
helmfile: "helmfile";
|
|
50
|
+
"java-jdk": "java-jdk";
|
|
51
|
+
"java-jre": "java-jre";
|
|
52
|
+
jb: "jb";
|
|
53
|
+
kas: "kas";
|
|
54
|
+
kubectl: "kubectl";
|
|
55
|
+
kustomize: "kustomize";
|
|
56
|
+
lerna: "lerna";
|
|
57
|
+
maven: "maven";
|
|
58
|
+
mise: "mise";
|
|
59
|
+
mono: "mono";
|
|
60
|
+
nix: "nix";
|
|
61
|
+
nuget: "nuget";
|
|
62
|
+
paket: "paket";
|
|
63
|
+
pdm: "pdm";
|
|
64
|
+
"pip-tools": "pip-tools";
|
|
65
|
+
pipenv: "pipenv";
|
|
66
|
+
pixi: "pixi";
|
|
67
|
+
pnpm: "pnpm";
|
|
68
|
+
poetry: "poetry";
|
|
69
|
+
powershell: "powershell";
|
|
70
|
+
protoc: "protoc";
|
|
71
|
+
renovate: "renovate";
|
|
72
|
+
rust: "rust";
|
|
73
|
+
sbt: "sbt";
|
|
74
|
+
scala: "scala";
|
|
75
|
+
skopeo: "skopeo";
|
|
76
|
+
sops: "sops";
|
|
77
|
+
swift: "swift";
|
|
78
|
+
terraform: "terraform";
|
|
79
|
+
tofu: "tofu";
|
|
80
|
+
uv: "uv";
|
|
81
|
+
vendir: "vendir";
|
|
82
|
+
wally: "wally";
|
|
83
|
+
yarn: "yarn";
|
|
84
|
+
"yarn-slim": "yarn-slim";
|
|
85
|
+
}>;
|
package/dist/zod.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@containerbase/base",
|
|
3
|
+
"version": "14.24.0",
|
|
4
|
+
"description": "Metadata about the tools supported by containerbase",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"containerbase",
|
|
7
|
+
"tools"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://github.com/containerbase/base#readme",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/containerbase/base.git",
|
|
13
|
+
"directory": "packages/base"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"type": "module",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"default": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./zod": {
|
|
23
|
+
"types": "./dist/zod.d.ts",
|
|
24
|
+
"default": "./dist/zod.js"
|
|
25
|
+
},
|
|
26
|
+
"./package.json": "./package.json",
|
|
27
|
+
"./tools.json": "./data/tools.json",
|
|
28
|
+
"./tools.schema.json": "./data/tools.schema.json"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"data",
|
|
32
|
+
"dist"
|
|
33
|
+
],
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"zod": "4.6.5"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"zod": "^4.0.0"
|
|
39
|
+
},
|
|
40
|
+
"peerDependenciesMeta": {
|
|
41
|
+
"zod": {
|
|
42
|
+
"optional": true
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public",
|
|
47
|
+
"provenance": true
|
|
48
|
+
}
|
|
49
|
+
}
|