matchlock-sdk 0.2.7 → 0.2.9
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/dist/builder.d.ts +1 -0
- package/dist/builder.js +6 -0
- package/dist/client/create.js +5 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/builder.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare class Sandbox {
|
|
|
21
21
|
allowPrivateIPs(): Sandbox;
|
|
22
22
|
unsetBlockPrivateIPs(): Sandbox;
|
|
23
23
|
addSecret(name: string, value: string, ...hosts: string[]): Sandbox;
|
|
24
|
+
addSecretWithPlaceholder(name: string, value: string, placeholder: string, ...hosts: string[]): Sandbox;
|
|
24
25
|
withDNSServers(...servers: string[]): Sandbox;
|
|
25
26
|
withHostname(hostname: string): Sandbox;
|
|
26
27
|
withNetworkMTU(mtu: number): Sandbox;
|
package/dist/builder.js
CHANGED
|
@@ -150,6 +150,12 @@ class Sandbox {
|
|
|
150
150
|
this.opts.secrets.push(secret);
|
|
151
151
|
return this;
|
|
152
152
|
}
|
|
153
|
+
addSecretWithPlaceholder(name, value, placeholder, ...hosts) {
|
|
154
|
+
this.opts.secrets = this.opts.secrets ?? [];
|
|
155
|
+
const secret = { name, value, placeholder, hosts };
|
|
156
|
+
this.opts.secrets.push(secret);
|
|
157
|
+
return this;
|
|
158
|
+
}
|
|
153
159
|
withDNSServers(...servers) {
|
|
154
160
|
this.opts.dnsServers = this.opts.dnsServers ?? [];
|
|
155
161
|
this.opts.dnsServers.push(...servers);
|
package/dist/client/create.js
CHANGED
|
@@ -165,10 +165,14 @@ function buildCreateNetworkParams(opts, wireInterception) {
|
|
|
165
165
|
if (hasSecrets) {
|
|
166
166
|
const secrets = {};
|
|
167
167
|
for (const secret of opts.secrets ?? []) {
|
|
168
|
-
|
|
168
|
+
const wireSecret = {
|
|
169
169
|
value: secret.value,
|
|
170
170
|
hosts: secret.hosts ?? [],
|
|
171
171
|
};
|
|
172
|
+
if (secret.placeholder) {
|
|
173
|
+
wireSecret.placeholder = secret.placeholder;
|
|
174
|
+
}
|
|
175
|
+
secrets[secret.name] = wireSecret;
|
|
172
176
|
}
|
|
173
177
|
network.secrets = secrets;
|
|
174
178
|
}
|
package/dist/types.d.ts
CHANGED