@uic-coe-connect/cli 0.1.0

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.
@@ -0,0 +1,75 @@
1
+ /**
2
+ * The subset of the COEConnect API shapes the CLI touches. Kept as a local
3
+ * mirror rather than imported from apps/api: the CLI is meant to be installable
4
+ * on its own against a deployed server, so it must not depend on the API's
5
+ * build output.
6
+ */
7
+ export type DeployStep = {
8
+ type: "pull";
9
+ } | {
10
+ type: "scan";
11
+ } | {
12
+ type: "npm";
13
+ script: string;
14
+ subdir?: string;
15
+ } | {
16
+ type: "migrate";
17
+ subdir?: string;
18
+ } | {
19
+ type: "chown";
20
+ } | {
21
+ type: "pm2";
22
+ action: string;
23
+ process?: string;
24
+ };
25
+ export interface DeployConfig {
26
+ steps: DeployStep[];
27
+ }
28
+ export interface NamedPipeline {
29
+ id: string;
30
+ name: string;
31
+ config: DeployConfig;
32
+ }
33
+ export interface RoleCondition {
34
+ attribute: string;
35
+ operator: "equals" | "contains" | "startsWith" | "regex";
36
+ value: string;
37
+ }
38
+ export interface RoleRule {
39
+ conditions: RoleCondition[];
40
+ }
41
+ export interface StaffAccess {
42
+ everyone: boolean;
43
+ members: string[];
44
+ rules: RoleRule[];
45
+ exceptions: string[];
46
+ }
47
+ export interface AppAccess {
48
+ devTeam: string[];
49
+ staff: StaffAccess;
50
+ }
51
+ export interface RegisteredApp {
52
+ id: string;
53
+ name: string;
54
+ url: string;
55
+ repo?: string;
56
+ branch?: string;
57
+ env: Record<string, string>;
58
+ pipelines?: NamedPipeline[];
59
+ access?: AppAccess;
60
+ createdAt: string;
61
+ updatedAt: string;
62
+ }
63
+ export interface Build {
64
+ id: string;
65
+ appId: string;
66
+ version?: string;
67
+ pipelineName?: string;
68
+ source: string;
69
+ by?: string;
70
+ status: "running" | "ok" | "failed";
71
+ startedAt: string;
72
+ finishedAt?: string;
73
+ commit?: string;
74
+ commitSubject?: string;
75
+ }
package/dist/types.js ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The subset of the COEConnect API shapes the CLI touches. Kept as a local
3
+ * mirror rather than imported from apps/api: the CLI is meant to be installable
4
+ * on its own against a deployed server, so it must not depend on the API's
5
+ * build output.
6
+ */
7
+ export {};
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@uic-coe-connect/cli",
3
+ "version": "0.1.0",
4
+ "description": "The coe CLI \u2014 manage COEConnect apps (pipelines, deploys, access, env) from a terminal, with browser-approved auth. Designed to be driven by an AI agent.",
5
+ "type": "module",
6
+ "bin": {
7
+ "coe": "./dist/index.js"
8
+ },
9
+ "main": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "scripts": {
15
+ "build": "tsc -p tsconfig.json && npm run bundle",
16
+ "lint": "oxlint",
17
+ "typecheck": "tsc --noEmit -p tsconfig.json",
18
+ "bundle": "esbuild src/index.ts --bundle --platform=node --target=node18 --format=cjs --outfile=../../apps/web/public/cli/coe",
19
+ "prepublishOnly": "npm run build"
20
+ },
21
+ "engines": {
22
+ "node": ">=18.18.0"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^22.10.2",
26
+ "oxlint": "^1.71.0",
27
+ "typescript": "~6.0.2",
28
+ "esbuild": "^0.28.1"
29
+ },
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/uiccoe/COEConnect.git",
36
+ "directory": "packages/cli"
37
+ }
38
+ }