@edgible-team/cli 1.2.9 → 1.2.13
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/commands/agent/install.d.ts +4 -0
- package/dist/commands/agent/install.d.ts.map +1 -1
- package/dist/commands/agent/install.js +155 -129
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +4 -0
- package/dist/commands/ai/helpers.d.ts.map +1 -1
- package/dist/commands/ai/helpers.js +12 -6
- package/dist/commands/debug.d.ts.map +1 -1
- package/dist/commands/debug.js +184 -49
- package/dist/generated/compose-constants.d.ts +1 -1
- package/dist/generated/compose-constants.d.ts.map +1 -1
- package/dist/generated/compose-constants.js +1 -1
- package/dist/services/DependencyInstaller.d.ts +2 -9
- package/dist/services/DependencyInstaller.d.ts.map +1 -1
- package/dist/services/DependencyInstaller.js +5 -30
- package/dist/services/application/ApplicationService.d.ts +3 -0
- package/dist/services/application/ApplicationService.d.ts.map +1 -1
- package/dist/services/application/ApplicationService.js +3 -0
- package/dist/types/AgentConfig.d.ts +0 -13
- package/dist/types/AgentConfig.d.ts.map +1 -1
- package/dist/types/ApiRequests.d.ts +8 -0
- package/dist/types/ApiRequests.d.ts.map +1 -1
- package/dist/types/models/ApplicationData.d.ts +22 -0
- package/dist/types/models/ApplicationData.d.ts.map +1 -1
- package/dist/types/models/OrganizationData.d.ts +2 -0
- package/dist/types/models/OrganizationData.d.ts.map +1 -1
- package/dist/types/validation/schemas.d.ts +29 -6
- package/dist/types/validation/schemas.d.ts.map +1 -1
- package/dist/types/validation/schemas.js +24 -0
- package/dist/utils/run-as-user.d.ts +24 -0
- package/dist/utils/run-as-user.d.ts.map +1 -0
- package/dist/utils/run-as-user.js +42 -0
- package/package.json +1 -1
- package/recipes/compose/open-webui/docker-compose.yml +1 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationData.d.ts","sourceRoot":"","sources":["../../../src/types/models/OrganizationData.ts"],"names":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,EAAE,CAAC;IAChC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,YAAY,CAAC,EAAE,aAAa,CAAC;IAE7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC9C,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -4,26 +4,32 @@ export declare const CreateOrganizationSchema: z.ZodObject<{
|
|
|
4
4
|
rootUserEmail: z.ZodString;
|
|
5
5
|
description: z.ZodOptional<z.ZodString>;
|
|
6
6
|
billingOrganizationId: z.ZodOptional<z.ZodString>;
|
|
7
|
+
urlAlias: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
7
8
|
}, "strip", z.ZodTypeAny, {
|
|
8
9
|
name: string;
|
|
9
10
|
rootUserEmail: string;
|
|
10
11
|
description?: string | undefined;
|
|
11
12
|
billingOrganizationId?: string | undefined;
|
|
13
|
+
urlAlias?: string | undefined;
|
|
12
14
|
}, {
|
|
13
15
|
name: string;
|
|
14
16
|
rootUserEmail: string;
|
|
15
17
|
description?: string | undefined;
|
|
16
18
|
billingOrganizationId?: string | undefined;
|
|
19
|
+
urlAlias?: string | undefined;
|
|
17
20
|
}>;
|
|
18
21
|
export declare const UpdateOrganizationSchema: z.ZodObject<{
|
|
19
22
|
name: z.ZodOptional<z.ZodString>;
|
|
20
23
|
description: z.ZodOptional<z.ZodString>;
|
|
24
|
+
urlAlias: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
21
25
|
}, "strip", z.ZodTypeAny, {
|
|
22
26
|
name?: string | undefined;
|
|
23
27
|
description?: string | undefined;
|
|
28
|
+
urlAlias?: string | undefined;
|
|
24
29
|
}, {
|
|
25
30
|
name?: string | undefined;
|
|
26
31
|
description?: string | undefined;
|
|
32
|
+
urlAlias?: string | undefined;
|
|
27
33
|
}>;
|
|
28
34
|
export declare const GetOrganizationSchema: z.ZodObject<{
|
|
29
35
|
organizationId: z.ZodString;
|
|
@@ -86,9 +92,11 @@ export declare const CreateApplicationSchema: z.ZodObject<{
|
|
|
86
92
|
healthCheckPath: z.ZodOptional<z.ZodString>;
|
|
87
93
|
dockerComposePath: z.ZodOptional<z.ZodString>;
|
|
88
94
|
systemdService: z.ZodOptional<z.ZodString>;
|
|
95
|
+
deleteVolumesOnDeletion: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
89
96
|
}, "strip", z.ZodTypeAny, {
|
|
90
97
|
port: number;
|
|
91
98
|
protocol: "http" | "https" | "tcp" | "udp";
|
|
99
|
+
deleteVolumesOnDeletion: boolean;
|
|
92
100
|
command?: string | undefined;
|
|
93
101
|
logFile?: string | undefined;
|
|
94
102
|
workingDirectory?: string | undefined;
|
|
@@ -104,6 +112,7 @@ export declare const CreateApplicationSchema: z.ZodObject<{
|
|
|
104
112
|
workingDirectory?: string | undefined;
|
|
105
113
|
env?: Record<string, string> | undefined;
|
|
106
114
|
dockerComposePath?: string | undefined;
|
|
115
|
+
deleteVolumesOnDeletion?: boolean | undefined;
|
|
107
116
|
healthCheckPath?: string | undefined;
|
|
108
117
|
systemdService?: string | undefined;
|
|
109
118
|
}>;
|
|
@@ -116,12 +125,15 @@ export declare const CreateApplicationSchema: z.ZodObject<{
|
|
|
116
125
|
requireOrgAuth: z.ZodOptional<z.ZodBoolean>;
|
|
117
126
|
allowedOrganizations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
118
127
|
customHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
128
|
+
targetState: z.ZodDefault<z.ZodEnum<["running", "suspended"]>>;
|
|
129
|
+
dependsOnApplicationIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
119
130
|
}, "strip", z.ZodTypeAny, {
|
|
120
131
|
organizationId: string;
|
|
121
132
|
name: string;
|
|
122
133
|
configuration: {
|
|
123
134
|
port: number;
|
|
124
135
|
protocol: "http" | "https" | "tcp" | "udp";
|
|
136
|
+
deleteVolumesOnDeletion: boolean;
|
|
125
137
|
command?: string | undefined;
|
|
126
138
|
logFile?: string | undefined;
|
|
127
139
|
workingDirectory?: string | undefined;
|
|
@@ -133,6 +145,7 @@ export declare const CreateApplicationSchema: z.ZodObject<{
|
|
|
133
145
|
subtype: "systemd" | "local-preexisting" | "managed-docker" | "docker-compose" | "managed-process";
|
|
134
146
|
environment: "development" | "staging" | "prod";
|
|
135
147
|
deviceIds: string[];
|
|
148
|
+
targetState: "running" | "suspended";
|
|
136
149
|
description?: string | undefined;
|
|
137
150
|
gatewayIds?: string[] | undefined;
|
|
138
151
|
hostnames?: string[] | undefined;
|
|
@@ -141,6 +154,7 @@ export declare const CreateApplicationSchema: z.ZodObject<{
|
|
|
141
154
|
requireOrgAuth?: boolean | undefined;
|
|
142
155
|
allowedOrganizations?: string[] | undefined;
|
|
143
156
|
customHeaders?: Record<string, string> | undefined;
|
|
157
|
+
dependsOnApplicationIds?: string[] | undefined;
|
|
144
158
|
}, {
|
|
145
159
|
organizationId: string;
|
|
146
160
|
name: string;
|
|
@@ -152,6 +166,7 @@ export declare const CreateApplicationSchema: z.ZodObject<{
|
|
|
152
166
|
workingDirectory?: string | undefined;
|
|
153
167
|
env?: Record<string, string> | undefined;
|
|
154
168
|
dockerComposePath?: string | undefined;
|
|
169
|
+
deleteVolumesOnDeletion?: boolean | undefined;
|
|
155
170
|
healthCheckPath?: string | undefined;
|
|
156
171
|
systemdService?: string | undefined;
|
|
157
172
|
};
|
|
@@ -166,6 +181,8 @@ export declare const CreateApplicationSchema: z.ZodObject<{
|
|
|
166
181
|
requireOrgAuth?: boolean | undefined;
|
|
167
182
|
allowedOrganizations?: string[] | undefined;
|
|
168
183
|
customHeaders?: Record<string, string> | undefined;
|
|
184
|
+
targetState?: "running" | "suspended" | undefined;
|
|
185
|
+
dependsOnApplicationIds?: string[] | undefined;
|
|
169
186
|
}>;
|
|
170
187
|
export declare const UpdateApplicationSchema: z.ZodObject<{
|
|
171
188
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -175,6 +192,8 @@ export declare const UpdateApplicationSchema: z.ZodObject<{
|
|
|
175
192
|
authModes: z.ZodOptional<z.ZodArray<z.ZodEnum<["none", "org", "api-key"]>, "many">>;
|
|
176
193
|
allowedOrganizations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
177
194
|
customHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
195
|
+
targetState: z.ZodOptional<z.ZodEnum<["running", "suspended"]>>;
|
|
196
|
+
dependsOnApplicationIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
178
197
|
}, "strip", z.ZodTypeAny, {
|
|
179
198
|
name?: string | undefined;
|
|
180
199
|
description?: string | undefined;
|
|
@@ -182,6 +201,8 @@ export declare const UpdateApplicationSchema: z.ZodObject<{
|
|
|
182
201
|
authModes?: ("none" | "org" | "api-key")[] | undefined;
|
|
183
202
|
allowedOrganizations?: string[] | undefined;
|
|
184
203
|
customHeaders?: Record<string, string> | undefined;
|
|
204
|
+
targetState?: "running" | "suspended" | undefined;
|
|
205
|
+
dependsOnApplicationIds?: string[] | undefined;
|
|
185
206
|
allowedSourceIPs?: string[] | undefined;
|
|
186
207
|
}, {
|
|
187
208
|
name?: string | undefined;
|
|
@@ -190,6 +211,8 @@ export declare const UpdateApplicationSchema: z.ZodObject<{
|
|
|
190
211
|
authModes?: ("none" | "org" | "api-key")[] | undefined;
|
|
191
212
|
allowedOrganizations?: string[] | undefined;
|
|
192
213
|
customHeaders?: Record<string, string> | undefined;
|
|
214
|
+
targetState?: "running" | "suspended" | undefined;
|
|
215
|
+
dependsOnApplicationIds?: string[] | undefined;
|
|
193
216
|
allowedSourceIPs?: string[] | undefined;
|
|
194
217
|
}>;
|
|
195
218
|
export declare const GetApplicationSchema: z.ZodObject<{
|
|
@@ -281,7 +304,7 @@ export declare const UpdateDeviceSchema: z.ZodObject<{
|
|
|
281
304
|
ipAddress: z.ZodOptional<z.ZodString>;
|
|
282
305
|
}, "strip", z.ZodTypeAny, {
|
|
283
306
|
name?: string | undefined;
|
|
284
|
-
status?: "
|
|
307
|
+
status?: "suspended" | "active" | "inactive" | "pending" | undefined;
|
|
285
308
|
type?: "gateway" | "laptop" | "desktop" | "mobile" | "tablet" | "server" | undefined;
|
|
286
309
|
description?: string | undefined;
|
|
287
310
|
os?: string | undefined;
|
|
@@ -291,7 +314,7 @@ export declare const UpdateDeviceSchema: z.ZodObject<{
|
|
|
291
314
|
isTrusted?: boolean | undefined;
|
|
292
315
|
}, {
|
|
293
316
|
name?: string | undefined;
|
|
294
|
-
status?: "
|
|
317
|
+
status?: "suspended" | "active" | "inactive" | "pending" | undefined;
|
|
295
318
|
type?: "gateway" | "laptop" | "desktop" | "mobile" | "tablet" | "server" | undefined;
|
|
296
319
|
description?: string | undefined;
|
|
297
320
|
os?: string | undefined;
|
|
@@ -492,7 +515,7 @@ export declare const CreateResourceSchema: z.ZodObject<{
|
|
|
492
515
|
name: string;
|
|
493
516
|
resourceType: string;
|
|
494
517
|
organizationId?: string | undefined;
|
|
495
|
-
status?: "
|
|
518
|
+
status?: "running" | "pending" | "stopped" | "error" | undefined;
|
|
496
519
|
type?: string | undefined;
|
|
497
520
|
description?: string | undefined;
|
|
498
521
|
region?: string | undefined;
|
|
@@ -504,7 +527,7 @@ export declare const CreateResourceSchema: z.ZodObject<{
|
|
|
504
527
|
name: string;
|
|
505
528
|
resourceType: string;
|
|
506
529
|
organizationId?: string | undefined;
|
|
507
|
-
status?: "
|
|
530
|
+
status?: "running" | "pending" | "stopped" | "error" | undefined;
|
|
508
531
|
type?: string | undefined;
|
|
509
532
|
description?: string | undefined;
|
|
510
533
|
region?: string | undefined;
|
|
@@ -522,14 +545,14 @@ export declare const UpdateResourceSchema: z.ZodObject<{
|
|
|
522
545
|
region: z.ZodOptional<z.ZodString>;
|
|
523
546
|
}, "strip", z.ZodTypeAny, {
|
|
524
547
|
name?: string | undefined;
|
|
525
|
-
status?: "
|
|
548
|
+
status?: "running" | "pending" | "stopped" | "error" | undefined;
|
|
526
549
|
description?: string | undefined;
|
|
527
550
|
region?: string | undefined;
|
|
528
551
|
tags?: string[] | undefined;
|
|
529
552
|
cost?: number | undefined;
|
|
530
553
|
}, {
|
|
531
554
|
name?: string | undefined;
|
|
532
|
-
status?: "
|
|
555
|
+
status?: "running" | "pending" | "stopped" | "error" | undefined;
|
|
533
556
|
description?: string | undefined;
|
|
534
557
|
region?: string | undefined;
|
|
535
558
|
tags?: string[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/types/validation/schemas.ts"],"names":[],"mappings":"AAGE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/types/validation/schemas.ts"],"names":[],"mappings":"AAGE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuB1B,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;EAMnC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;EAInC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;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;AACnE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACnE,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAC3F,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACnE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACnE,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AACjF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AACjF,MAAM,MAAM,yCAAyC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0CAA0C,CAAC,CAAC"}
|
|
@@ -4,16 +4,32 @@
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.CreateLifecycleEventSchema = exports.PostDevicePoolTrafficSchema = exports.CheckApplicationReachabilitySchema = exports.GetResourceSchema = exports.UpdateResourceSchema = exports.CreateResourceSchema = exports.CreateDeviceWithOrphanedOrganizationSchema = exports.GetChallengeSessionSchema = exports.ForceChangePasswordSchema = exports.RefreshTokenSchema = exports.AuthenticateSchema = exports.LinkOrganizationSchema = exports.UpdateResourceLimitsSchema = exports.CreateBillingOrganizationSchema = exports.AdoptOrganizationSchema = exports.CancelInviteSchema = exports.DeclineInviteSchema = exports.AcceptInviteSchema = exports.CreateOrganizationInviteSchema = exports.GetDeviceSchema = exports.UpdateDeviceSchema = exports.CreateDeviceSchema = exports.RefreshCertificatePathSchema = exports.GetCertificatePathSchema = exports.GetCertificatesPathSchema = exports.GetApplicationSchema = exports.UpdateApplicationSchema = exports.CreateApplicationSchema = exports.GetUserSchema = exports.UpdateUserSchema = exports.CreateUserSchema = exports.GetOrganizationSchema = exports.UpdateOrganizationSchema = exports.CreateOrganizationSchema = void 0;
|
|
6
6
|
const zod_1 = require("zod");
|
|
7
|
+
// Reserved URL aliases that cannot be used
|
|
8
|
+
const RESERVED_ALIASES = [
|
|
9
|
+
'api', 'www', 'admin', 'app', 'apps', 'gateway', 'gateways',
|
|
10
|
+
'device', 'devices', 'user', 'users', 'auth', 'login', 'signup',
|
|
11
|
+
'dashboard', 'console', 'portal', 'system', 'internal', 'staging',
|
|
12
|
+
'prod', 'production', 'dev', 'development', 'test', 'testing',
|
|
13
|
+
'v1', 'v2', 'v3', 'static', 'cdn', 'assets', 'public'
|
|
14
|
+
];
|
|
15
|
+
// URL alias validation: lowercase alphanumeric + hyphens, 3-30 chars
|
|
16
|
+
const UrlAliasSchema = zod_1.z.string()
|
|
17
|
+
.min(3, 'URL alias must be at least 3 characters')
|
|
18
|
+
.max(30, 'URL alias must be 30 characters or less')
|
|
19
|
+
.regex(/^[a-z0-9][a-z0-9-]{1,28}[a-z0-9]$/, 'URL alias must be lowercase alphanumeric with hyphens, cannot start/end with hyphen')
|
|
20
|
+
.refine((val) => !RESERVED_ALIASES.includes(val), 'This alias is reserved and cannot be used');
|
|
7
21
|
// Organization validation schemas
|
|
8
22
|
exports.CreateOrganizationSchema = zod_1.z.object({
|
|
9
23
|
name: zod_1.z.string().min(1, 'Name is required').max(100, 'Name must be 100 characters or less'),
|
|
10
24
|
rootUserEmail: zod_1.z.string().email('Invalid email format'),
|
|
11
25
|
description: zod_1.z.string().max(500, 'Description must be 500 characters or less').optional(),
|
|
12
26
|
billingOrganizationId: zod_1.z.string().min(1, 'Billing organization ID must be provided if specified').optional(),
|
|
27
|
+
urlAlias: UrlAliasSchema.optional(),
|
|
13
28
|
});
|
|
14
29
|
exports.UpdateOrganizationSchema = zod_1.z.object({
|
|
15
30
|
name: zod_1.z.string().min(1).max(100).optional(),
|
|
16
31
|
description: zod_1.z.string().max(500).optional(),
|
|
32
|
+
urlAlias: UrlAliasSchema.optional(),
|
|
17
33
|
});
|
|
18
34
|
exports.GetOrganizationSchema = zod_1.z.object({
|
|
19
35
|
organizationId: zod_1.z.string().min(1, 'Organization ID is required'),
|
|
@@ -56,6 +72,10 @@ exports.CreateApplicationSchema = zod_1.z.object({
|
|
|
56
72
|
.optional()
|
|
57
73
|
.describe('Path to docker-compose file OR base64-encoded content prefixed with "base64:"'),
|
|
58
74
|
systemdService: zod_1.z.string().optional(),
|
|
75
|
+
deleteVolumesOnDeletion: zod_1.z.boolean()
|
|
76
|
+
.optional()
|
|
77
|
+
.default(false)
|
|
78
|
+
.describe('Delete docker volumes when application is permanently deleted'),
|
|
59
79
|
}),
|
|
60
80
|
hostnames: zod_1.z
|
|
61
81
|
.array(zod_1.z
|
|
@@ -70,6 +90,8 @@ exports.CreateApplicationSchema = zod_1.z.object({
|
|
|
70
90
|
requireOrgAuth: zod_1.z.boolean().optional(), // deprecated, use authModes
|
|
71
91
|
allowedOrganizations: zod_1.z.array(zod_1.z.string()).optional(),
|
|
72
92
|
customHeaders: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
93
|
+
targetState: zod_1.z.enum(['running', 'suspended']).default('running'),
|
|
94
|
+
dependsOnApplicationIds: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
73
95
|
});
|
|
74
96
|
// IP address or CIDR block validation
|
|
75
97
|
const IPOrCIDRSchema = zod_1.z.string().regex(/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\/(?:[0-9]|[1-2][0-9]|3[0-2]))?$/, 'Invalid IP address or CIDR block (e.g., 192.168.1.0/24 or 10.0.0.1)');
|
|
@@ -81,6 +103,8 @@ exports.UpdateApplicationSchema = zod_1.z.object({
|
|
|
81
103
|
authModes: zod_1.z.array(zod_1.z.enum(['none', 'org', 'api-key'])).optional(),
|
|
82
104
|
allowedOrganizations: zod_1.z.array(zod_1.z.string()).optional(),
|
|
83
105
|
customHeaders: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
106
|
+
targetState: zod_1.z.enum(['running', 'suspended']).optional(),
|
|
107
|
+
dependsOnApplicationIds: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
84
108
|
});
|
|
85
109
|
exports.GetApplicationSchema = zod_1.z.object({
|
|
86
110
|
applicationId: zod_1.z.string().min(1, 'Application ID is required'),
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ExecSyncOptions } from 'child_process';
|
|
2
|
+
/**
|
|
3
|
+
* Utilities to run commands as the real (non-root) user when the process was
|
|
4
|
+
* started with sudo. Ensures tools like Homebrew install under the user's
|
|
5
|
+
* account rather than root.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Get the original user when running under sudo.
|
|
9
|
+
* @returns SUDO_USER if process is root via sudo, otherwise undefined
|
|
10
|
+
*/
|
|
11
|
+
export declare function getSudoUser(): string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Execute a command as the original user when executed via sudo.
|
|
14
|
+
* Uses: sudo -u ${SUDO_USER} HOME=$(eval echo ~${SUDO_USER}) <command>
|
|
15
|
+
*
|
|
16
|
+
* Important for Homebrew on macOS: brew refuses to run as root and installs
|
|
17
|
+
* should go to the user's prefix (e.g. /opt/homebrew or ~/.local) not root's.
|
|
18
|
+
*
|
|
19
|
+
* @param command The command to execute
|
|
20
|
+
* @param options Optional execSync options (e.g. stdio: 'inherit' for interactive)
|
|
21
|
+
* @returns Result of execSync
|
|
22
|
+
*/
|
|
23
|
+
export declare function execAsRealUser(command: string, options?: ExecSyncOptions): Buffer | string;
|
|
24
|
+
//# sourceMappingURL=run-as-user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-as-user.d.ts","sourceRoot":"","sources":["../../src/utils/run-as-user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,eAAe,EAAE,MAAM,eAAe,CAAC;AAE1D;;;;GAIG;AAEH;;;GAGG;AACH,wBAAgB,WAAW,IAAI,MAAM,GAAG,SAAS,CAShD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,MAAM,GAAG,MAAM,CAS1F"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSudoUser = getSudoUser;
|
|
4
|
+
exports.execAsRealUser = execAsRealUser;
|
|
5
|
+
const child_process_1 = require("child_process");
|
|
6
|
+
/**
|
|
7
|
+
* Utilities to run commands as the real (non-root) user when the process was
|
|
8
|
+
* started with sudo. Ensures tools like Homebrew install under the user's
|
|
9
|
+
* account rather than root.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Get the original user when running under sudo.
|
|
13
|
+
* @returns SUDO_USER if process is root via sudo, otherwise undefined
|
|
14
|
+
*/
|
|
15
|
+
function getSudoUser() {
|
|
16
|
+
const uid = process.getuid ? process.getuid() : undefined;
|
|
17
|
+
const sudoUser = process.env['SUDO_USER'];
|
|
18
|
+
if (uid === 0 && sudoUser) {
|
|
19
|
+
return sudoUser;
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Execute a command as the original user when executed via sudo.
|
|
25
|
+
* Uses: sudo -u ${SUDO_USER} HOME=$(eval echo ~${SUDO_USER}) <command>
|
|
26
|
+
*
|
|
27
|
+
* Important for Homebrew on macOS: brew refuses to run as root and installs
|
|
28
|
+
* should go to the user's prefix (e.g. /opt/homebrew or ~/.local) not root's.
|
|
29
|
+
*
|
|
30
|
+
* @param command The command to execute
|
|
31
|
+
* @param options Optional execSync options (e.g. stdio: 'inherit' for interactive)
|
|
32
|
+
* @returns Result of execSync
|
|
33
|
+
*/
|
|
34
|
+
function execAsRealUser(command, options) {
|
|
35
|
+
const sudoUser = getSudoUser();
|
|
36
|
+
if (sudoUser) {
|
|
37
|
+
const wrappedCommand = `sudo -u ${sudoUser} HOME=$(eval echo ~${sudoUser}) ${command}`;
|
|
38
|
+
return (0, child_process_1.execSync)(wrappedCommand, options);
|
|
39
|
+
}
|
|
40
|
+
return (0, child_process_1.execSync)(command, options);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=run-as-user.js.map
|
package/package.json
CHANGED
|
@@ -22,15 +22,7 @@ services:
|
|
|
22
22
|
# - 'WEBUI_AUTH_COOKIE_SECURE=false' # Set to false if using HTTP
|
|
23
23
|
extra_hosts:
|
|
24
24
|
- host.docker.internal:host-gateway
|
|
25
|
-
|
|
26
|
-
networks:
|
|
27
|
-
- edgible-dns-network
|
|
28
|
-
# Use Edgible DNS server for application hostname resolution
|
|
29
|
-
# The DNS server runs at 172.20.0.2 within the edgible-dns-network
|
|
30
|
-
# and resolves application hostnames to the host gateway (172.20.0.1)
|
|
31
|
-
dns:
|
|
32
|
-
- 172.20.0.2 # Edgible DNS server (resolves app hostnames)
|
|
33
|
-
- 8.8.8.8 # Fallback public DNS
|
|
25
|
+
|
|
34
26
|
restart: unless-stopped
|
|
35
27
|
|
|
36
28
|
volumes:
|