@edgible-team/cli 1.2.15 → 1.2.19
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/README.md +5 -3
- package/dist/client/api-client.d.ts +26 -1
- package/dist/client/api-client.d.ts.map +1 -1
- package/dist/client/api-client.js +31 -0
- package/dist/commands/agent/install.d.ts +2 -1
- package/dist/commands/agent/install.d.ts.map +1 -1
- package/dist/commands/agent/install.js +24 -7
- package/dist/commands/agent/start.d.ts +5 -1
- package/dist/commands/agent/start.d.ts.map +1 -1
- package/dist/commands/agent/start.js +19 -280
- package/dist/commands/agent/uninstall.d.ts.map +1 -1
- package/dist/commands/agent/uninstall.js +14 -7
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +3 -2
- package/dist/commands/ai/setup.d.ts +1 -1
- package/dist/commands/ai/setup.d.ts.map +1 -1
- package/dist/commands/ai.js +1 -1
- package/dist/commands/application/create-docker-compose.d.ts +3 -1
- package/dist/commands/application/create-docker-compose.d.ts.map +1 -1
- package/dist/commands/application/create-docker-compose.js +25 -69
- package/dist/commands/application/create-existing.d.ts +2 -2
- package/dist/commands/application/create-existing.d.ts.map +1 -1
- package/dist/commands/application/create-existing.js +27 -132
- package/dist/commands/application/create-managed-process.d.ts +3 -1
- package/dist/commands/application/create-managed-process.d.ts.map +1 -1
- package/dist/commands/application/create-managed-process.js +31 -75
- package/dist/commands/application/create-stubs.d.ts +0 -1
- package/dist/commands/application/create-stubs.d.ts.map +1 -1
- package/dist/commands/application/create-stubs.js +0 -4
- package/dist/commands/application/create-vm.d.ts +19 -0
- package/dist/commands/application/create-vm.d.ts.map +1 -0
- package/dist/commands/application/create-vm.js +390 -0
- package/dist/commands/application/delete.d.ts +2 -1
- package/dist/commands/application/delete.d.ts.map +1 -1
- package/dist/commands/application/delete.js +19 -5
- package/dist/commands/application/get.d.ts.map +1 -1
- package/dist/commands/application/get.js +29 -1
- package/dist/commands/application/ssh.d.ts +7 -0
- package/dist/commands/application/ssh.d.ts.map +1 -0
- package/dist/commands/application/ssh.js +146 -0
- package/dist/commands/application/update.d.ts +3 -0
- package/dist/commands/application/update.d.ts.map +1 -1
- package/dist/commands/application/update.js +45 -1
- package/dist/commands/application.d.ts.map +1 -1
- package/dist/commands/application.js +81 -26
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +44 -0
- package/dist/commands/debug.js +1 -1
- package/dist/commands/device/application-health.d.ts +7 -0
- package/dist/commands/device/application-health.d.ts.map +1 -0
- package/dist/commands/device/application-health.js +103 -0
- package/dist/commands/device/delete.d.ts +7 -0
- package/dist/commands/device/delete.d.ts.map +1 -0
- package/dist/commands/device/delete.js +69 -0
- package/dist/commands/device/health.d.ts +7 -0
- package/dist/commands/device/health.d.ts.map +1 -0
- package/dist/commands/device/health.js +78 -0
- package/dist/commands/device/list.d.ts +5 -0
- package/dist/commands/device/list.d.ts.map +1 -0
- package/dist/commands/device/list.js +46 -0
- package/dist/commands/device/telemetry.d.ts +8 -0
- package/dist/commands/device/telemetry.d.ts.map +1 -0
- package/dist/commands/device/telemetry.js +59 -0
- package/dist/commands/device.d.ts +6 -0
- package/dist/commands/device.d.ts.map +1 -0
- package/dist/commands/device.js +86 -0
- package/dist/commands/stack/deploy.d.ts +3 -1
- package/dist/commands/stack/deploy.d.ts.map +1 -1
- package/dist/commands/stack/deploy.js +5 -2
- package/dist/commands/stack/diff.d.ts +1 -1
- package/dist/commands/stack/diff.d.ts.map +1 -1
- package/dist/commands/stack/diff.js +4 -2
- package/dist/commands/stack/status.d.ts +1 -1
- package/dist/commands/stack/status.d.ts.map +1 -1
- package/dist/commands/stack/status.js +4 -2
- package/dist/commands/stack/teardown.d.ts +3 -1
- package/dist/commands/stack/teardown.d.ts.map +1 -1
- package/dist/commands/stack/teardown.js +5 -2
- package/dist/commands/stack/validate.d.ts +1 -1
- package/dist/commands/stack/validate.d.ts.map +1 -1
- package/dist/commands/stack/validate.js +4 -2
- package/dist/commands/stack.d.ts.map +1 -1
- package/dist/commands/stack.js +10 -5
- package/dist/commands/utils/auth-prompt.d.ts +25 -0
- package/dist/commands/utils/auth-prompt.d.ts.map +1 -0
- package/dist/commands/utils/auth-prompt.js +115 -0
- package/dist/commands/utils/device-prompt.d.ts +18 -0
- package/dist/commands/utils/device-prompt.d.ts.map +1 -0
- package/dist/commands/utils/device-prompt.js +58 -0
- package/dist/commands/utils/output-formatter.d.ts +13 -0
- package/dist/commands/utils/output-formatter.d.ts.map +1 -1
- package/dist/commands/utils/output-formatter.js +21 -0
- package/dist/index.js +2 -0
- package/dist/services/LocalAgentManager.d.ts +2 -1
- package/dist/services/LocalAgentManager.d.ts.map +1 -1
- package/dist/services/LocalAgentManager.js +6 -4
- package/dist/services/application/ApplicationService.d.ts +41 -2
- package/dist/services/application/ApplicationService.d.ts.map +1 -1
- package/dist/services/application/ApplicationService.js +49 -1
- package/dist/services/device/DeviceService.d.ts +62 -0
- package/dist/services/device/DeviceService.d.ts.map +1 -0
- package/dist/services/device/DeviceService.js +235 -0
- package/dist/services/edgible.d.ts +3 -1
- package/dist/services/edgible.d.ts.map +1 -1
- package/dist/services/edgible.js +5 -4
- package/dist/services/instances.d.ts +4 -1
- package/dist/services/instances.d.ts.map +1 -1
- package/dist/services/instances.js +8 -4
- package/dist/types/AgentConfig.d.ts +26 -0
- package/dist/types/AgentConfig.d.ts.map +1 -1
- package/dist/types/ApiRequests.d.ts +5 -1
- package/dist/types/ApiRequests.d.ts.map +1 -1
- package/dist/types/ApiResponses.d.ts +9 -0
- package/dist/types/ApiResponses.d.ts.map +1 -1
- package/dist/types/JobTypes.d.ts +103 -0
- package/dist/types/JobTypes.d.ts.map +1 -0
- package/dist/types/JobTypes.js +80 -0
- package/dist/types/WebSocketMessages.d.ts +89 -0
- package/dist/types/WebSocketMessages.d.ts.map +1 -0
- package/dist/types/WebSocketMessages.js +5 -0
- package/dist/types/Workload.d.ts +1 -1
- package/dist/types/Workload.d.ts.map +1 -1
- package/dist/types/backendJobs.d.ts +102 -0
- package/dist/types/backendJobs.d.ts.map +1 -0
- package/dist/types/backendJobs.js +5 -0
- package/dist/types/models/ApplicationData.d.ts +1 -1
- package/dist/types/models/ApplicationData.d.ts.map +1 -1
- package/dist/types/models/DeviceData.d.ts +4 -0
- package/dist/types/models/DeviceData.d.ts.map +1 -1
- package/dist/types/stack.d.ts +9 -1
- package/dist/types/stack.d.ts.map +1 -1
- package/dist/types/validation/schemas.d.ts +5 -5
- package/dist/types/validation/schemas.js +1 -1
- package/dist/utils/stack-file.d.ts +11 -0
- package/dist/utils/stack-file.d.ts.map +1 -0
- package/dist/utils/stack-file.js +66 -0
- package/dist/validation/stack-schemas.d.ts +319 -27
- package/dist/validation/stack-schemas.d.ts.map +1 -1
- package/dist/validation/stack-schemas.js +20 -5
- package/package.json +1 -1
- package/dist/commands/agent/agent-handlers.d.ts +0 -45
- package/dist/commands/agent/agent-handlers.d.ts.map +0 -1
- package/dist/commands/agent/agent-handlers.js +0 -1159
- package/dist/commands/application/api-keys.d.ts +0 -3
- package/dist/commands/application/api-keys.d.ts.map +0 -1
- package/dist/commands/application/api-keys.js +0 -227
- package/dist/commands/application/create-compose.d.ts +0 -3
- package/dist/commands/application/create-compose.d.ts.map +0 -1
- package/dist/commands/application/create-compose.js +0 -381
- package/dist/commands/application/create-interactive.d.ts +0 -3
- package/dist/commands/application/create-interactive.d.ts.map +0 -1
- package/dist/commands/application/create-interactive.js +0 -326
- package/dist/commands/application/create-workload.d.ts +0 -5
- package/dist/commands/application/create-workload.d.ts.map +0 -1
- package/dist/commands/application/create-workload.js +0 -48
- package/dist/commands/application/short-codes.d.ts +0 -3
- package/dist/commands/application/short-codes.d.ts.map +0 -1
- package/dist/commands/application/short-codes.js +0 -226
- package/dist/commands/application/toggle.d.ts +0 -2
- package/dist/commands/application/toggle.d.ts.map +0 -1
- package/dist/commands/application/toggle.js +0 -78
- package/dist/commands/examples/migrated-command-example.d.ts +0 -31
- package/dist/commands/examples/migrated-command-example.d.ts.map +0 -1
- package/dist/commands/examples/migrated-command-example.js +0 -180
- package/dist/commands/managedGateway/create.d.ts +0 -6
- package/dist/commands/managedGateway/create.d.ts.map +0 -1
- package/dist/commands/managedGateway/create.js +0 -50
- package/dist/commands/managedGateway/delete.d.ts +0 -5
- package/dist/commands/managedGateway/delete.d.ts.map +0 -1
- package/dist/commands/managedGateway/delete.js +0 -57
- package/dist/commands/managedGateway/get.d.ts +0 -4
- package/dist/commands/managedGateway/get.d.ts.map +0 -1
- package/dist/commands/managedGateway/get.js +0 -71
- package/dist/commands/managedGateway/haproxy-stats.d.ts +0 -6
- package/dist/commands/managedGateway/haproxy-stats.d.ts.map +0 -1
- package/dist/commands/managedGateway/haproxy-stats.js +0 -131
- package/dist/commands/managedGateway/list.d.ts +0 -4
- package/dist/commands/managedGateway/list.d.ts.map +0 -1
- package/dist/commands/managedGateway/list.js +0 -50
- package/dist/commands/managedGateway/logs.d.ts +0 -10
- package/dist/commands/managedGateway/logs.d.ts.map +0 -1
- package/dist/commands/managedGateway/logs.js +0 -100
- package/dist/commands/managedGateway/reboot.d.ts +0 -5
- package/dist/commands/managedGateway/reboot.d.ts.map +0 -1
- package/dist/commands/managedGateway/reboot.js +0 -95
- package/dist/commands/managedGateway/resync.d.ts +0 -10
- package/dist/commands/managedGateway/resync.d.ts.map +0 -1
- package/dist/commands/managedGateway/resync.js +0 -69
- package/dist/commands/managedGateway/ssh.d.ts +0 -4
- package/dist/commands/managedGateway/ssh.d.ts.map +0 -1
- package/dist/commands/managedGateway/ssh.js +0 -130
- package/dist/commands/managedGateway/wipe-logs.d.ts +0 -4
- package/dist/commands/managedGateway/wipe-logs.d.ts.map +0 -1
- package/dist/commands/managedGateway/wipe-logs.js +0 -67
- package/dist/commands/managedGateway/wireguard.d.ts +0 -4
- package/dist/commands/managedGateway/wireguard.d.ts.map +0 -1
- package/dist/commands/managedGateway/wireguard.js +0 -68
- package/dist/di/bindings.d.ts +0 -15
- package/dist/di/bindings.d.ts.map +0 -1
- package/dist/di/bindings.js +0 -99
- package/dist/di/container.d.ts +0 -44
- package/dist/di/container.d.ts.map +0 -1
- package/dist/di/container.js +0 -88
- package/dist/di/types.d.ts +0 -23
- package/dist/di/types.d.ts.map +0 -1
- package/dist/di/types.js +0 -32
- package/dist/repositories/config-repository.d.ts +0 -46
- package/dist/repositories/config-repository.d.ts.map +0 -1
- package/dist/repositories/config-repository.js +0 -62
- package/dist/repositories/gateway-repository.d.ts +0 -37
- package/dist/repositories/gateway-repository.d.ts.map +0 -1
- package/dist/repositories/gateway-repository.js +0 -35
|
@@ -120,7 +120,7 @@ export declare const CreateApplicationSchema: z.ZodObject<{
|
|
|
120
120
|
deviceIds: z.ZodArray<z.ZodString, "many">;
|
|
121
121
|
gatewayIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
122
122
|
useManagedGateway: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
-
subtype: z.ZodEnum<["local-preexisting", "managed-docker", "systemd", "docker-compose", "managed-process"]>;
|
|
123
|
+
subtype: z.ZodEnum<["local-preexisting", "managed-docker", "systemd", "docker-compose", "managed-process", "telemetry", "vm"]>;
|
|
124
124
|
authModes: z.ZodOptional<z.ZodArray<z.ZodEnum<["none", "org", "api-key"]>, "many">>;
|
|
125
125
|
requireOrgAuth: z.ZodOptional<z.ZodBoolean>;
|
|
126
126
|
allowedOrganizations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -130,6 +130,7 @@ export declare const CreateApplicationSchema: z.ZodObject<{
|
|
|
130
130
|
}, "strip", z.ZodTypeAny, {
|
|
131
131
|
organizationId: string;
|
|
132
132
|
name: string;
|
|
133
|
+
subtype: "systemd" | "local-preexisting" | "managed-docker" | "docker-compose" | "managed-process" | "telemetry" | "vm";
|
|
133
134
|
configuration: {
|
|
134
135
|
port: number;
|
|
135
136
|
protocol: "http" | "https" | "tcp" | "udp";
|
|
@@ -142,7 +143,6 @@ export declare const CreateApplicationSchema: z.ZodObject<{
|
|
|
142
143
|
healthCheckPath?: string | undefined;
|
|
143
144
|
systemdService?: string | undefined;
|
|
144
145
|
};
|
|
145
|
-
subtype: "systemd" | "local-preexisting" | "managed-docker" | "docker-compose" | "managed-process";
|
|
146
146
|
environment: "development" | "staging" | "prod";
|
|
147
147
|
deviceIds: string[];
|
|
148
148
|
targetState: "running" | "suspended";
|
|
@@ -158,6 +158,7 @@ export declare const CreateApplicationSchema: z.ZodObject<{
|
|
|
158
158
|
}, {
|
|
159
159
|
organizationId: string;
|
|
160
160
|
name: string;
|
|
161
|
+
subtype: "systemd" | "local-preexisting" | "managed-docker" | "docker-compose" | "managed-process" | "telemetry" | "vm";
|
|
161
162
|
configuration: {
|
|
162
163
|
port: number;
|
|
163
164
|
protocol: "http" | "https" | "tcp" | "udp";
|
|
@@ -170,7 +171,6 @@ export declare const CreateApplicationSchema: z.ZodObject<{
|
|
|
170
171
|
healthCheckPath?: string | undefined;
|
|
171
172
|
systemdService?: string | undefined;
|
|
172
173
|
};
|
|
173
|
-
subtype: "systemd" | "local-preexisting" | "managed-docker" | "docker-compose" | "managed-process";
|
|
174
174
|
deviceIds: string[];
|
|
175
175
|
description?: string | undefined;
|
|
176
176
|
hostnames?: string[] | undefined;
|
|
@@ -518,9 +518,9 @@ export declare const CreateResourceSchema: z.ZodObject<{
|
|
|
518
518
|
status?: "running" | "pending" | "stopped" | "error" | undefined;
|
|
519
519
|
type?: string | undefined;
|
|
520
520
|
description?: string | undefined;
|
|
521
|
+
configuration?: Record<string, unknown> | undefined;
|
|
521
522
|
region?: string | undefined;
|
|
522
523
|
tags?: string[] | undefined;
|
|
523
|
-
configuration?: Record<string, unknown> | undefined;
|
|
524
524
|
cost?: number | undefined;
|
|
525
525
|
parentResourceId?: string | undefined;
|
|
526
526
|
}, {
|
|
@@ -530,9 +530,9 @@ export declare const CreateResourceSchema: z.ZodObject<{
|
|
|
530
530
|
status?: "running" | "pending" | "stopped" | "error" | undefined;
|
|
531
531
|
type?: string | undefined;
|
|
532
532
|
description?: string | undefined;
|
|
533
|
+
configuration?: Record<string, unknown> | undefined;
|
|
533
534
|
region?: string | undefined;
|
|
534
535
|
tags?: string[] | undefined;
|
|
535
|
-
configuration?: Record<string, unknown> | undefined;
|
|
536
536
|
cost?: number | undefined;
|
|
537
537
|
parentResourceId?: string | undefined;
|
|
538
538
|
}>;
|
|
@@ -85,7 +85,7 @@ exports.CreateApplicationSchema = zod_1.z.object({
|
|
|
85
85
|
deviceIds: zod_1.z.array(zod_1.z.string().min(1)).min(1, 'At least one device ID is required'),
|
|
86
86
|
gatewayIds: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
87
87
|
useManagedGateway: zod_1.z.boolean().optional(),
|
|
88
|
-
subtype: zod_1.z.enum(['local-preexisting', 'managed-docker', 'systemd', 'docker-compose', 'managed-process']),
|
|
88
|
+
subtype: zod_1.z.enum(['local-preexisting', 'managed-docker', 'systemd', 'docker-compose', 'managed-process', 'telemetry', 'vm']),
|
|
89
89
|
authModes: zod_1.z.array(zod_1.z.enum(['none', 'org', 'api-key'])).optional(),
|
|
90
90
|
requireOrgAuth: zod_1.z.boolean().optional(), // deprecated, use authModes
|
|
91
91
|
allowedOrganizations: zod_1.z.array(zod_1.z.string()).optional(),
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve stack file path: use provided path or look for edgible.yml in current directory.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Find stack file from optional path or current directory.
|
|
6
|
+
* @param providedPath Optional path provided by user (e.g. -f production.yml)
|
|
7
|
+
* @returns Resolved absolute path to the stack file
|
|
8
|
+
* @throws If provided path does not exist, or no file found when none provided
|
|
9
|
+
*/
|
|
10
|
+
export declare function findStackFile(providedPath?: string): string;
|
|
11
|
+
//# sourceMappingURL=stack-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack-file.d.ts","sourceRoot":"","sources":["../../src/utils/stack-file.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAoB3D"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Resolve stack file path: use provided path or look for edgible.yml in current directory.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.findStackFile = findStackFile;
|
|
40
|
+
const fs = __importStar(require("fs"));
|
|
41
|
+
const path = __importStar(require("path"));
|
|
42
|
+
const DEFAULT_FILENAMES = ['edgible.yml', 'edgible.yaml'];
|
|
43
|
+
/**
|
|
44
|
+
* Find stack file from optional path or current directory.
|
|
45
|
+
* @param providedPath Optional path provided by user (e.g. -f production.yml)
|
|
46
|
+
* @returns Resolved absolute path to the stack file
|
|
47
|
+
* @throws If provided path does not exist, or no file found when none provided
|
|
48
|
+
*/
|
|
49
|
+
function findStackFile(providedPath) {
|
|
50
|
+
if (providedPath) {
|
|
51
|
+
if (fs.existsSync(providedPath)) {
|
|
52
|
+
return path.resolve(providedPath);
|
|
53
|
+
}
|
|
54
|
+
throw new Error(`Stack file not found at: ${providedPath}`);
|
|
55
|
+
}
|
|
56
|
+
const currentDir = process.cwd();
|
|
57
|
+
for (const name of DEFAULT_FILENAMES) {
|
|
58
|
+
const filePath = path.join(currentDir, name);
|
|
59
|
+
if (fs.existsSync(filePath)) {
|
|
60
|
+
return path.resolve(filePath);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
throw new Error(`No stack file specified and no ${DEFAULT_FILENAMES.join(' or ')} found in the current directory (${currentDir}). ` +
|
|
64
|
+
'Use -f <path> to specify a stack file.');
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=stack-file.js.map
|