mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
@@ -477,6 +477,7 @@ const createTemplateVersionTar = async (
|
||||
env: {},
|
||||
id: randomUUID(),
|
||||
metadata: [],
|
||||
extraEnvs: [],
|
||||
scripts: [],
|
||||
motdFile: "",
|
||||
name: "dev",
|
||||
|
||||
@@ -122,6 +122,7 @@ export interface Agent {
|
||||
/** Field 19 was startup_script_behavior, now removed. */
|
||||
displayApps: DisplayApps | undefined;
|
||||
scripts: Script[];
|
||||
extraEnvs: Env[];
|
||||
}
|
||||
|
||||
export interface Agent_Metadata {
|
||||
@@ -145,6 +146,11 @@ export interface DisplayApps {
|
||||
portForwardingHelper: boolean;
|
||||
}
|
||||
|
||||
export interface Env {
|
||||
name: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
/** Script represents a script to be run on the workspace. */
|
||||
export interface Script {
|
||||
displayName: string;
|
||||
@@ -523,6 +529,9 @@ export const Agent = {
|
||||
for (const v of message.scripts) {
|
||||
Script.encode(v!, writer.uint32(170).fork()).ldelim();
|
||||
}
|
||||
for (const v of message.extraEnvs) {
|
||||
Env.encode(v!, writer.uint32(178).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
};
|
||||
@@ -590,6 +599,18 @@ export const DisplayApps = {
|
||||
},
|
||||
};
|
||||
|
||||
export const Env = {
|
||||
encode(message: Env, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.name !== "") {
|
||||
writer.uint32(10).string(message.name);
|
||||
}
|
||||
if (message.value !== "") {
|
||||
writer.uint32(18).string(message.value);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
};
|
||||
|
||||
export const Script = {
|
||||
encode(
|
||||
message: Script,
|
||||
|
||||
Reference in New Issue
Block a user