@@ -100,6 +100,23 @@ Install a package using apt
100100
101101** returns:** Promise<InstallationInfo >
102102
103+ ``` ts
104+ await installAptPack ([{ name: " ca-certificates" }, { name: " gnupg" }])
105+ ```
106+
107+ ``` ts
108+ await installAptPack ([
109+ {
110+ name: " gcc" ,
111+ version ,
112+ repositories: [" ppa:ubuntu-toolchain-r/test" ],
113+ addAptKey: [
114+ { keys: [" 1E9377A2BA9EF27F" ], fileName: " ubuntu-toolchain-r-test.gpg" },
115+ ],
116+ },
117+ ])
118+ ```
119+
103120### ` hasNala ` (function)
104121
105122Check if nala is installed
@@ -123,26 +140,58 @@ Get the environment variables to use for the apt command
123140
124141** returns:** ProcessEnv
125142
143+ ### ` AddAptKeyOptions ` (type)
144+
145+ ### ` addAptKey ` (function)
146+
147+ Add an apt key
148+
149+ ** Parameters:**
150+
151+ - options (` AddAptKeyOptions ` ) - The options for adding the key
152+
153+ ** returns:** Promise<string >
154+
155+ ``` ts
156+ await addAptKey ({
157+ keys: [" 3B4FE6ACC0B21F32" , " 40976EAF437D05B5" ],
158+ fileName: " bazel-archive-keyring.gpg" ,
159+ })
160+ ```
161+
162+ ``` ts
163+ await addAptKey ({
164+ keyUrl: " https://bazel.build/bazel-release.pub.gpg" ,
165+ fileName: " bazel-archive-keyring.gpg" ,
166+ })
167+ ```
168+
169+ ### ` defaultKeyStorePath ` (variable)
170+
171+ ### ` KeyServerOptions ` (type)
172+
173+ ### ` defaultKeyServer ` (variable)
174+
126175### ` addAptKeyViaServer ` (function)
127176
128177Add an apt key via a keyserver
129178
130179** Parameters:**
131180
132- - keys (` string[] ` ) - The keys to add
133- - name (` string ` ) - The name of the key
134- - server (` string ` ) - The keyserver to use (Defaults to ` keyserver.ubuntu.com ` )
181+ - { keys, keyServer = defaultKeyServer, fileName, keyStorePath = defaultKeyServer } (` KeyServerOptions ` )
135182
136183** returns:** Promise<string >
137184
185+ ### ` KeyUrl ` (type)
186+
138187### ` addAptKeyViaURL ` (function)
139188
140189Add an apt key via a download
141190
142191** Parameters:**
143192
144- - name ( ` string ` ) - The name of the key
145- - url ( ` string ` ) - The URL of the key
193+ - options - The options for adding the key
194+ - { keyUrl, fileName, keyStorePath = defaultKeyStorePath } ( ` KeyUrl ` )
146195
147196** returns:** Promise<string >
148197
0 commit comments