@omer-x/buttler 0.1.4 → 0.2.2
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/bin/cli.js +54 -55
- package/drizzle/0000_illegal_mattie_franklin.sql +38 -0
- package/drizzle/meta/0000_snapshot.json +266 -0
- package/drizzle/meta/_journal.json +13 -0
- package/package.json +44 -13
- package/ui/.next/BUILD_ID +1 -0
- package/ui/.next/app-build-manifest.json +62 -0
- package/ui/.next/app-path-routes-manifest.json +1 -0
- package/ui/.next/build-manifest.json +32 -0
- package/ui/.next/package.json +1 -0
- package/ui/.next/prerender-manifest.js +1 -0
- package/ui/.next/prerender-manifest.json +1 -0
- package/ui/.next/react-loadable-manifest.json +1 -0
- package/ui/.next/required-server-files.json +1 -0
- package/ui/.next/routes-manifest.json +1 -0
- package/ui/.next/server/app/_not-found/page.js +1 -0
- package/ui/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/ui/.next/server/app/_not-found.html +1 -0
- package/ui/.next/server/app/_not-found.meta +6 -0
- package/ui/.next/server/app/_not-found.rsc +15 -0
- package/ui/.next/server/app/index.html +1 -0
- package/ui/.next/server/app/index.meta +5 -0
- package/ui/.next/server/app/index.rsc +11 -0
- package/ui/.next/server/app/page.js +1 -0
- package/ui/.next/server/app/page.js.nft.json +1 -0
- package/ui/.next/server/app/page_client-reference-manifest.js +1 -0
- package/ui/.next/server/app/services/[id]/edit/page.js +22 -0
- package/ui/.next/server/app/services/[id]/edit/page.js.nft.json +1 -0
- package/ui/.next/server/app/services/[id]/edit/page_client-reference-manifest.js +1 -0
- package/ui/.next/server/app/services/[id]/page.js +1 -0
- package/ui/.next/server/app/services/[id]/page.js.nft.json +1 -0
- package/ui/.next/server/app/services/[id]/page_client-reference-manifest.js +1 -0
- package/ui/.next/server/app/services/page.js +1 -0
- package/ui/.next/server/app/services/page.js.nft.json +1 -0
- package/ui/.next/server/app/services/page_client-reference-manifest.js +1 -0
- package/ui/.next/server/app/webhook/route.js +1 -0
- package/ui/.next/server/app/webhook/route.js.nft.json +1 -0
- package/ui/.next/server/app-paths-manifest.json +8 -0
- package/ui/.next/server/chunks/227.js +13 -0
- package/ui/.next/server/chunks/397.js +6 -0
- package/ui/.next/server/chunks/600.js +1 -0
- package/ui/.next/server/chunks/682.js +6 -0
- package/ui/.next/server/chunks/714.js +13 -0
- package/ui/.next/server/chunks/902.js +1 -0
- package/ui/.next/server/chunks/948.js +2 -0
- package/ui/.next/server/chunks/969.js +6 -0
- package/ui/.next/server/edge-instrumentation.js +2 -0
- package/ui/.next/server/font-manifest.json +1 -0
- package/ui/.next/server/instrumentation.js +1 -0
- package/ui/.next/server/middleware-build-manifest.js +1 -0
- package/ui/.next/server/middleware-manifest.json +6 -0
- package/ui/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/ui/.next/server/next-font-manifest.js +1 -0
- package/ui/.next/server/next-font-manifest.json +1 -0
- package/ui/.next/server/pages/404.html +1 -0
- package/ui/.next/server/pages/500.html +1 -0
- package/ui/.next/server/pages/_app.js +1 -0
- package/ui/.next/server/pages/_app.js.nft.json +1 -0
- package/ui/.next/server/pages/_document.js +1 -0
- package/ui/.next/server/pages/_document.js.nft.json +1 -0
- package/ui/.next/server/pages/_error.js +1 -0
- package/ui/.next/server/pages/_error.js.nft.json +1 -0
- package/ui/.next/server/pages-manifest.json +1 -0
- package/ui/.next/server/server-reference-manifest.js +1 -0
- package/ui/.next/server/server-reference-manifest.json +1 -0
- package/ui/.next/server/webpack-runtime.js +1 -0
- package/ui/.next/static/_0aIhakzXKJdPOF1ZU6FY/_buildManifest.js +1 -0
- package/ui/.next/static/_0aIhakzXKJdPOF1ZU6FY/_ssgManifest.js +1 -0
- package/ui/.next/static/chunks/23-bb15da2f9712f1ee.js +2 -0
- package/ui/.next/static/chunks/33-f121499ca3b0a7c3.js +1 -0
- package/ui/.next/static/chunks/655-691d4374f6143c5d.js +22 -0
- package/ui/.next/static/chunks/746-40fe8411fec84077.js +5 -0
- package/ui/.next/static/chunks/847-b131e825002abb54.js +1 -0
- package/ui/.next/static/chunks/app/_not-found/page-dea2b9568f6e4d73.js +1 -0
- package/ui/.next/static/chunks/app/layout-0091bc250c5e8149.js +1 -0
- package/ui/.next/static/chunks/app/page-ffc06cd4473239c6.js +1 -0
- package/ui/.next/static/chunks/app/services/[id]/edit/page-c5e8589cca2e6875.js +1 -0
- package/ui/.next/static/chunks/app/services/[id]/page-3fd0d76f332f1180.js +1 -0
- package/ui/.next/static/chunks/app/services/page-b3edace587d96b1b.js +1 -0
- package/ui/.next/static/chunks/fd9d1056-f761286b613acfb1.js +1 -0
- package/ui/.next/static/chunks/framework-f66176bb897dc684.js +33 -0
- package/ui/.next/static/chunks/main-7adbfc7fbfa35b2c.js +1 -0
- package/ui/.next/static/chunks/main-app-550ee52788cc088b.js +1 -0
- package/ui/.next/static/chunks/pages/_app-6a626577ffa902a4.js +1 -0
- package/ui/.next/static/chunks/pages/_error-1be831200e60c5c0.js +1 -0
- package/ui/.next/static/chunks/polyfills-78c92fac7aa8fdd8.js +1 -0
- package/ui/.next/static/chunks/webpack-58c0cac5b3b9bd72.js +1 -0
- package/ui/.next/static/css/001936a28cd34ad6.css +1 -0
- package/ui/.next/static/css/294dd07620d1a861.css +1 -0
- package/ui/.next/static/css/475865983e61b131.css +1 -0
- package/ui/.next/static/css/ce0509a911764719.css +1 -0
- package/ui/package.json +99 -0
- package/ui/server.js +44 -0
- package/bin/api.js +0 -36
- package/bin/database.js +0 -23
- package/bin/docker.js +0 -60
- package/bin/git.js +0 -13
- package/bin/github.js +0 -14
- package/bin/index.js +0 -37
- package/bin/object.js +0 -9
- package/bin/services.js +0 -67
package/bin/cli.js
CHANGED
|
@@ -1,74 +1,73 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/cli.ts
|
|
2
4
|
import { spawn } from "node:child_process";
|
|
3
5
|
import fs from "node:fs/promises";
|
|
4
6
|
import { dirname, resolve } from "node:path";
|
|
5
7
|
import { fileURLToPath } from "node:url";
|
|
6
8
|
import { Command } from "commander";
|
|
7
9
|
async function checkFile(filePath) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
10
|
+
try {
|
|
11
|
+
await fs.access(filePath);
|
|
12
|
+
return true;
|
|
13
|
+
} catch {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
15
16
|
}
|
|
16
17
|
function spawnChildProcess(detached) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
19
|
+
const __dirname = dirname(__filename);
|
|
20
|
+
const appPath = resolve(__dirname, "../ui/server.js");
|
|
21
|
+
const child = spawn("node", [appPath], {
|
|
22
|
+
detached,
|
|
23
|
+
stdio: detached ? "ignore" : "inherit",
|
|
24
|
+
env: {
|
|
25
|
+
...process.env,
|
|
26
|
+
PORT: "2083",
|
|
27
|
+
WEBHOOK_SECRET: "buttler",
|
|
28
|
+
CURRENT_WORKING_DIRECTORY: process.cwd(),
|
|
29
|
+
DRIZZLE_DIR: resolve(__dirname, "../drizzle")
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
if (detached) child.unref();
|
|
33
|
+
return child.pid;
|
|
32
34
|
}
|
|
33
35
|
async function start(development) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
if (development) {
|
|
37
|
+
await stop();
|
|
38
|
+
}
|
|
39
|
+
const pidFilePath = resolve(process.cwd(), "PID");
|
|
40
|
+
const exists = await checkFile(pidFilePath);
|
|
41
|
+
if (exists) {
|
|
42
|
+
return console.warn("the application is already running");
|
|
43
|
+
}
|
|
44
|
+
const pid = spawnChildProcess(!development);
|
|
45
|
+
await fs.writeFile(pidFilePath, `${pid}`, "utf8");
|
|
46
|
+
console.log("the application has started");
|
|
45
47
|
}
|
|
46
48
|
async function stop() {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
finally {
|
|
64
|
-
await fs.unlink(pidFilePath);
|
|
65
|
-
}
|
|
49
|
+
const pidFilePath = resolve(process.cwd(), "PID");
|
|
50
|
+
const exists = await checkFile(pidFilePath);
|
|
51
|
+
if (!exists) {
|
|
52
|
+
return console.warn("the application was not running");
|
|
53
|
+
}
|
|
54
|
+
const content = await fs.readFile(pidFilePath, "utf-8");
|
|
55
|
+
const pid = parseInt(content);
|
|
56
|
+
try {
|
|
57
|
+
if (isNaN(pid)) throw new Error("Invalid PID");
|
|
58
|
+
process.kill(pid);
|
|
59
|
+
console.log("the application is stopped");
|
|
60
|
+
} catch {
|
|
61
|
+
console.warn("the application was crashed");
|
|
62
|
+
} finally {
|
|
63
|
+
await fs.unlink(pidFilePath);
|
|
64
|
+
}
|
|
66
65
|
}
|
|
67
66
|
async function restart() {
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
await stop();
|
|
68
|
+
await start(false);
|
|
70
69
|
}
|
|
71
|
-
|
|
70
|
+
var program = new Command();
|
|
72
71
|
program.command("dev").description("starts the application").action(() => start(true));
|
|
73
72
|
program.command("start").description("starts the application").action(() => start(false));
|
|
74
73
|
program.command("stop").description("stops the application").action(stop);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
CREATE TABLE `build_images` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`service_id` text NOT NULL,
|
|
4
|
+
`status` text DEFAULT 'pending' NOT NULL,
|
|
5
|
+
`created_at` text DEFAULT (CURRENT_TIMESTAMP) NOT NULL,
|
|
6
|
+
`updated_at` text DEFAULT (CURRENT_TIMESTAMP) NOT NULL,
|
|
7
|
+
FOREIGN KEY (`service_id`) REFERENCES `services`(`id`) ON UPDATE restrict ON DELETE restrict
|
|
8
|
+
);
|
|
9
|
+
--> statement-breakpoint
|
|
10
|
+
CREATE TABLE `environment_variables` (
|
|
11
|
+
`service_id` text NOT NULL,
|
|
12
|
+
`key` text NOT NULL,
|
|
13
|
+
`value` text NOT NULL,
|
|
14
|
+
PRIMARY KEY(`service_id`, `key`),
|
|
15
|
+
FOREIGN KEY (`service_id`) REFERENCES `services`(`id`) ON UPDATE restrict ON DELETE cascade
|
|
16
|
+
);
|
|
17
|
+
--> statement-breakpoint
|
|
18
|
+
CREATE TABLE `services` (
|
|
19
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
20
|
+
`name` text NOT NULL,
|
|
21
|
+
`repo` text NOT NULL,
|
|
22
|
+
`status` text DEFAULT 'idle' NOT NULL,
|
|
23
|
+
`image_id` text,
|
|
24
|
+
`container_id` text,
|
|
25
|
+
`created_at` text DEFAULT (CURRENT_TIMESTAMP) NOT NULL,
|
|
26
|
+
`updated_at` text DEFAULT (CURRENT_TIMESTAMP) NOT NULL
|
|
27
|
+
);
|
|
28
|
+
--> statement-breakpoint
|
|
29
|
+
CREATE TABLE `ports` (
|
|
30
|
+
`service_id` text NOT NULL,
|
|
31
|
+
`key` integer NOT NULL,
|
|
32
|
+
`value` integer NOT NULL,
|
|
33
|
+
PRIMARY KEY(`service_id`, `key`),
|
|
34
|
+
FOREIGN KEY (`service_id`) REFERENCES `services`(`id`) ON UPDATE restrict ON DELETE cascade
|
|
35
|
+
);
|
|
36
|
+
--> statement-breakpoint
|
|
37
|
+
CREATE INDEX `build_image_created_at_index` ON `build_images` (`created_at`);--> statement-breakpoint
|
|
38
|
+
CREATE INDEX `service_created_at_index` ON `services` (`created_at`);
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "6",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"id": "d4978208-4104-43fe-b88e-49e2caa5fc6f",
|
|
5
|
+
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
6
|
+
"tables": {
|
|
7
|
+
"build_images": {
|
|
8
|
+
"name": "build_images",
|
|
9
|
+
"columns": {
|
|
10
|
+
"id": {
|
|
11
|
+
"name": "id",
|
|
12
|
+
"type": "text",
|
|
13
|
+
"primaryKey": true,
|
|
14
|
+
"notNull": true,
|
|
15
|
+
"autoincrement": false
|
|
16
|
+
},
|
|
17
|
+
"service_id": {
|
|
18
|
+
"name": "service_id",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true,
|
|
22
|
+
"autoincrement": false
|
|
23
|
+
},
|
|
24
|
+
"status": {
|
|
25
|
+
"name": "status",
|
|
26
|
+
"type": "text",
|
|
27
|
+
"primaryKey": false,
|
|
28
|
+
"notNull": true,
|
|
29
|
+
"autoincrement": false,
|
|
30
|
+
"default": "'pending'"
|
|
31
|
+
},
|
|
32
|
+
"created_at": {
|
|
33
|
+
"name": "created_at",
|
|
34
|
+
"type": "text",
|
|
35
|
+
"primaryKey": false,
|
|
36
|
+
"notNull": true,
|
|
37
|
+
"autoincrement": false,
|
|
38
|
+
"default": "(CURRENT_TIMESTAMP)"
|
|
39
|
+
},
|
|
40
|
+
"updated_at": {
|
|
41
|
+
"name": "updated_at",
|
|
42
|
+
"type": "text",
|
|
43
|
+
"primaryKey": false,
|
|
44
|
+
"notNull": true,
|
|
45
|
+
"autoincrement": false,
|
|
46
|
+
"default": "(CURRENT_TIMESTAMP)"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"indexes": {
|
|
50
|
+
"build_image_created_at_index": {
|
|
51
|
+
"name": "build_image_created_at_index",
|
|
52
|
+
"columns": [
|
|
53
|
+
"created_at"
|
|
54
|
+
],
|
|
55
|
+
"isUnique": false
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"foreignKeys": {
|
|
59
|
+
"build_images_service_id_services_id_fk": {
|
|
60
|
+
"name": "build_images_service_id_services_id_fk",
|
|
61
|
+
"tableFrom": "build_images",
|
|
62
|
+
"tableTo": "services",
|
|
63
|
+
"columnsFrom": [
|
|
64
|
+
"service_id"
|
|
65
|
+
],
|
|
66
|
+
"columnsTo": [
|
|
67
|
+
"id"
|
|
68
|
+
],
|
|
69
|
+
"onDelete": "restrict",
|
|
70
|
+
"onUpdate": "restrict"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"compositePrimaryKeys": {},
|
|
74
|
+
"uniqueConstraints": {}
|
|
75
|
+
},
|
|
76
|
+
"environment_variables": {
|
|
77
|
+
"name": "environment_variables",
|
|
78
|
+
"columns": {
|
|
79
|
+
"service_id": {
|
|
80
|
+
"name": "service_id",
|
|
81
|
+
"type": "text",
|
|
82
|
+
"primaryKey": false,
|
|
83
|
+
"notNull": true,
|
|
84
|
+
"autoincrement": false
|
|
85
|
+
},
|
|
86
|
+
"key": {
|
|
87
|
+
"name": "key",
|
|
88
|
+
"type": "text",
|
|
89
|
+
"primaryKey": false,
|
|
90
|
+
"notNull": true,
|
|
91
|
+
"autoincrement": false
|
|
92
|
+
},
|
|
93
|
+
"value": {
|
|
94
|
+
"name": "value",
|
|
95
|
+
"type": "text",
|
|
96
|
+
"primaryKey": false,
|
|
97
|
+
"notNull": true,
|
|
98
|
+
"autoincrement": false
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"indexes": {},
|
|
102
|
+
"foreignKeys": {
|
|
103
|
+
"environment_variables_service_id_services_id_fk": {
|
|
104
|
+
"name": "environment_variables_service_id_services_id_fk",
|
|
105
|
+
"tableFrom": "environment_variables",
|
|
106
|
+
"tableTo": "services",
|
|
107
|
+
"columnsFrom": [
|
|
108
|
+
"service_id"
|
|
109
|
+
],
|
|
110
|
+
"columnsTo": [
|
|
111
|
+
"id"
|
|
112
|
+
],
|
|
113
|
+
"onDelete": "cascade",
|
|
114
|
+
"onUpdate": "restrict"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"compositePrimaryKeys": {
|
|
118
|
+
"environment_variables_service_id_key_pk": {
|
|
119
|
+
"columns": [
|
|
120
|
+
"service_id",
|
|
121
|
+
"key"
|
|
122
|
+
],
|
|
123
|
+
"name": "environment_variables_service_id_key_pk"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"uniqueConstraints": {}
|
|
127
|
+
},
|
|
128
|
+
"services": {
|
|
129
|
+
"name": "services",
|
|
130
|
+
"columns": {
|
|
131
|
+
"id": {
|
|
132
|
+
"name": "id",
|
|
133
|
+
"type": "text",
|
|
134
|
+
"primaryKey": true,
|
|
135
|
+
"notNull": true,
|
|
136
|
+
"autoincrement": false
|
|
137
|
+
},
|
|
138
|
+
"name": {
|
|
139
|
+
"name": "name",
|
|
140
|
+
"type": "text",
|
|
141
|
+
"primaryKey": false,
|
|
142
|
+
"notNull": true,
|
|
143
|
+
"autoincrement": false
|
|
144
|
+
},
|
|
145
|
+
"repo": {
|
|
146
|
+
"name": "repo",
|
|
147
|
+
"type": "text",
|
|
148
|
+
"primaryKey": false,
|
|
149
|
+
"notNull": true,
|
|
150
|
+
"autoincrement": false
|
|
151
|
+
},
|
|
152
|
+
"status": {
|
|
153
|
+
"name": "status",
|
|
154
|
+
"type": "text",
|
|
155
|
+
"primaryKey": false,
|
|
156
|
+
"notNull": true,
|
|
157
|
+
"autoincrement": false,
|
|
158
|
+
"default": "'idle'"
|
|
159
|
+
},
|
|
160
|
+
"image_id": {
|
|
161
|
+
"name": "image_id",
|
|
162
|
+
"type": "text",
|
|
163
|
+
"primaryKey": false,
|
|
164
|
+
"notNull": false,
|
|
165
|
+
"autoincrement": false
|
|
166
|
+
},
|
|
167
|
+
"container_id": {
|
|
168
|
+
"name": "container_id",
|
|
169
|
+
"type": "text",
|
|
170
|
+
"primaryKey": false,
|
|
171
|
+
"notNull": false,
|
|
172
|
+
"autoincrement": false
|
|
173
|
+
},
|
|
174
|
+
"created_at": {
|
|
175
|
+
"name": "created_at",
|
|
176
|
+
"type": "text",
|
|
177
|
+
"primaryKey": false,
|
|
178
|
+
"notNull": true,
|
|
179
|
+
"autoincrement": false,
|
|
180
|
+
"default": "(CURRENT_TIMESTAMP)"
|
|
181
|
+
},
|
|
182
|
+
"updated_at": {
|
|
183
|
+
"name": "updated_at",
|
|
184
|
+
"type": "text",
|
|
185
|
+
"primaryKey": false,
|
|
186
|
+
"notNull": true,
|
|
187
|
+
"autoincrement": false,
|
|
188
|
+
"default": "(CURRENT_TIMESTAMP)"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"indexes": {
|
|
192
|
+
"service_created_at_index": {
|
|
193
|
+
"name": "service_created_at_index",
|
|
194
|
+
"columns": [
|
|
195
|
+
"created_at"
|
|
196
|
+
],
|
|
197
|
+
"isUnique": false
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"foreignKeys": {},
|
|
201
|
+
"compositePrimaryKeys": {},
|
|
202
|
+
"uniqueConstraints": {}
|
|
203
|
+
},
|
|
204
|
+
"ports": {
|
|
205
|
+
"name": "ports",
|
|
206
|
+
"columns": {
|
|
207
|
+
"service_id": {
|
|
208
|
+
"name": "service_id",
|
|
209
|
+
"type": "text",
|
|
210
|
+
"primaryKey": false,
|
|
211
|
+
"notNull": true,
|
|
212
|
+
"autoincrement": false
|
|
213
|
+
},
|
|
214
|
+
"key": {
|
|
215
|
+
"name": "key",
|
|
216
|
+
"type": "integer",
|
|
217
|
+
"primaryKey": false,
|
|
218
|
+
"notNull": true,
|
|
219
|
+
"autoincrement": false
|
|
220
|
+
},
|
|
221
|
+
"value": {
|
|
222
|
+
"name": "value",
|
|
223
|
+
"type": "integer",
|
|
224
|
+
"primaryKey": false,
|
|
225
|
+
"notNull": true,
|
|
226
|
+
"autoincrement": false
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"indexes": {},
|
|
230
|
+
"foreignKeys": {
|
|
231
|
+
"ports_service_id_services_id_fk": {
|
|
232
|
+
"name": "ports_service_id_services_id_fk",
|
|
233
|
+
"tableFrom": "ports",
|
|
234
|
+
"tableTo": "services",
|
|
235
|
+
"columnsFrom": [
|
|
236
|
+
"service_id"
|
|
237
|
+
],
|
|
238
|
+
"columnsTo": [
|
|
239
|
+
"id"
|
|
240
|
+
],
|
|
241
|
+
"onDelete": "cascade",
|
|
242
|
+
"onUpdate": "restrict"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"compositePrimaryKeys": {
|
|
246
|
+
"ports_service_id_key_pk": {
|
|
247
|
+
"columns": [
|
|
248
|
+
"service_id",
|
|
249
|
+
"key"
|
|
250
|
+
],
|
|
251
|
+
"name": "ports_service_id_key_pk"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"uniqueConstraints": {}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"enums": {},
|
|
258
|
+
"_meta": {
|
|
259
|
+
"schemas": {},
|
|
260
|
+
"tables": {},
|
|
261
|
+
"columns": {}
|
|
262
|
+
},
|
|
263
|
+
"internal": {
|
|
264
|
+
"indexes": {}
|
|
265
|
+
}
|
|
266
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omer-x/buttler",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "automates CI/CD workflows using Docker and GitHub webhooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -29,12 +29,13 @@
|
|
|
29
29
|
"url": "https://omermecitoglu.github.io"
|
|
30
30
|
},
|
|
31
31
|
"license": "MIT",
|
|
32
|
-
"main": "bin/index.js",
|
|
33
32
|
"bin": {
|
|
34
|
-
"buttler": "
|
|
33
|
+
"buttler": "bin/cli.js"
|
|
35
34
|
},
|
|
36
35
|
"files": [
|
|
37
|
-
"bin/"
|
|
36
|
+
"bin/",
|
|
37
|
+
"ui/",
|
|
38
|
+
"drizzle/"
|
|
38
39
|
],
|
|
39
40
|
"type": "module",
|
|
40
41
|
"engines": {
|
|
@@ -42,27 +43,57 @@
|
|
|
42
43
|
},
|
|
43
44
|
"scripts": {
|
|
44
45
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
46
|
+
"add:model": "generate-scaffold",
|
|
47
|
+
"migrate": "drizzle-kit generate",
|
|
48
|
+
"unmigrate": "drizzle-kit drop",
|
|
49
|
+
"prebuild": "ts-unused-exports tsconfig.json --excludePathsFromReport='app;.config;instrumentation'",
|
|
50
|
+
"build:cli": "tsup",
|
|
51
|
+
"lint": "next lint",
|
|
52
|
+
"lint:fix": "next lint --fix",
|
|
53
|
+
"dev": "next dev",
|
|
54
|
+
"build:ui": "next build",
|
|
55
|
+
"postbuild:ui": "rimraf ui && copyfiles -u 2 -a '.next/standalone/**/*' ui && copyfiles -a '.next/static/**/*' ui && copyfiles -a 'public/**/*' ui && rimraf ui/node_modules",
|
|
56
|
+
"build": "npm run build:cli && npm run build:ui"
|
|
48
57
|
},
|
|
49
58
|
"dependencies": {
|
|
59
|
+
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
|
60
|
+
"@fortawesome/free-brands-svg-icons": "^6.6.0",
|
|
61
|
+
"@fortawesome/free-solid-svg-icons": "^6.6.0",
|
|
62
|
+
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
63
|
+
"@omer-x/bs-ui-kit": "^0.14.1",
|
|
64
|
+
"better-sqlite3": "^11.2.1",
|
|
65
|
+
"bootstrap": "^5.3.3",
|
|
66
|
+
"change-case": "^5.4.4",
|
|
50
67
|
"commander": "^12.1.0",
|
|
51
68
|
"dockerode": "^4.0.2",
|
|
52
|
-
"
|
|
53
|
-
"
|
|
69
|
+
"drizzle-orm": "^0.33.0",
|
|
70
|
+
"drizzle-zod": "^0.5.1",
|
|
71
|
+
"next": "^14.2.7",
|
|
72
|
+
"react": "^18.3.1",
|
|
73
|
+
"react-bootstrap": "^2.10.4",
|
|
74
|
+
"react-dom": "^18.3.1",
|
|
54
75
|
"simple-git": "^3.25.0",
|
|
55
|
-
"tar-fs": "^3.0.6"
|
|
76
|
+
"tar-fs": "^3.0.6",
|
|
77
|
+
"uuid": "^10.0.0",
|
|
78
|
+
"zod": "^3.23.8"
|
|
56
79
|
},
|
|
57
80
|
"devDependencies": {
|
|
81
|
+
"@next/eslint-plugin-next": "^14.2.7",
|
|
58
82
|
"@omer-x/eslint-config": "^1.0.7",
|
|
83
|
+
"@omer-x/next-openapi-scaffold-generator": "^0.3.0",
|
|
84
|
+
"@types/better-sqlite3": "^7.6.11",
|
|
59
85
|
"@types/dockerode": "^3.3.31",
|
|
60
|
-
"@types/
|
|
61
|
-
"@types/
|
|
86
|
+
"@types/node": "^22.5.1",
|
|
87
|
+
"@types/react": "^18.3.5",
|
|
62
88
|
"@types/tar-fs": "^2.0.4",
|
|
89
|
+
"@types/uuid": "^10.0.0",
|
|
90
|
+
"copyfiles": "^2.4.1",
|
|
91
|
+
"drizzle-kit": "^0.24.2",
|
|
63
92
|
"eslint": "^8.57.0",
|
|
93
|
+
"sass": "^1.77.8",
|
|
64
94
|
"ts-unused-exports": "^10.1.0",
|
|
65
|
-
"
|
|
95
|
+
"tsup": "^8.2.4",
|
|
96
|
+
"tsx": "^4.19.0",
|
|
66
97
|
"typescript": "^5.5.4"
|
|
67
98
|
}
|
|
68
99
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_0aIhakzXKJdPOF1ZU6FY
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pages": {
|
|
3
|
+
"/_not-found/page": [
|
|
4
|
+
"static/chunks/webpack-58c0cac5b3b9bd72.js",
|
|
5
|
+
"static/chunks/fd9d1056-f761286b613acfb1.js",
|
|
6
|
+
"static/chunks/23-bb15da2f9712f1ee.js",
|
|
7
|
+
"static/chunks/main-app-550ee52788cc088b.js",
|
|
8
|
+
"static/chunks/app/_not-found/page-dea2b9568f6e4d73.js"
|
|
9
|
+
],
|
|
10
|
+
"/layout": [
|
|
11
|
+
"static/chunks/webpack-58c0cac5b3b9bd72.js",
|
|
12
|
+
"static/chunks/fd9d1056-f761286b613acfb1.js",
|
|
13
|
+
"static/chunks/23-bb15da2f9712f1ee.js",
|
|
14
|
+
"static/chunks/main-app-550ee52788cc088b.js",
|
|
15
|
+
"static/css/294dd07620d1a861.css",
|
|
16
|
+
"static/css/475865983e61b131.css",
|
|
17
|
+
"static/chunks/746-40fe8411fec84077.js",
|
|
18
|
+
"static/chunks/33-f121499ca3b0a7c3.js",
|
|
19
|
+
"static/chunks/app/layout-0091bc250c5e8149.js"
|
|
20
|
+
],
|
|
21
|
+
"/page": [
|
|
22
|
+
"static/chunks/webpack-58c0cac5b3b9bd72.js",
|
|
23
|
+
"static/chunks/fd9d1056-f761286b613acfb1.js",
|
|
24
|
+
"static/chunks/23-bb15da2f9712f1ee.js",
|
|
25
|
+
"static/chunks/main-app-550ee52788cc088b.js",
|
|
26
|
+
"static/chunks/app/page-ffc06cd4473239c6.js"
|
|
27
|
+
],
|
|
28
|
+
"/services/[id]/edit/page": [
|
|
29
|
+
"static/chunks/webpack-58c0cac5b3b9bd72.js",
|
|
30
|
+
"static/chunks/fd9d1056-f761286b613acfb1.js",
|
|
31
|
+
"static/chunks/23-bb15da2f9712f1ee.js",
|
|
32
|
+
"static/chunks/main-app-550ee52788cc088b.js",
|
|
33
|
+
"static/css/ce0509a911764719.css",
|
|
34
|
+
"static/css/001936a28cd34ad6.css",
|
|
35
|
+
"static/chunks/746-40fe8411fec84077.js",
|
|
36
|
+
"static/chunks/847-b131e825002abb54.js",
|
|
37
|
+
"static/chunks/33-f121499ca3b0a7c3.js",
|
|
38
|
+
"static/chunks/655-691d4374f6143c5d.js",
|
|
39
|
+
"static/chunks/app/services/[id]/edit/page-c5e8589cca2e6875.js"
|
|
40
|
+
],
|
|
41
|
+
"/services/[id]/page": [
|
|
42
|
+
"static/chunks/webpack-58c0cac5b3b9bd72.js",
|
|
43
|
+
"static/chunks/fd9d1056-f761286b613acfb1.js",
|
|
44
|
+
"static/chunks/23-bb15da2f9712f1ee.js",
|
|
45
|
+
"static/chunks/main-app-550ee52788cc088b.js",
|
|
46
|
+
"static/css/001936a28cd34ad6.css",
|
|
47
|
+
"static/chunks/746-40fe8411fec84077.js",
|
|
48
|
+
"static/chunks/847-b131e825002abb54.js",
|
|
49
|
+
"static/chunks/app/services/[id]/page-3fd0d76f332f1180.js"
|
|
50
|
+
],
|
|
51
|
+
"/services/page": [
|
|
52
|
+
"static/chunks/webpack-58c0cac5b3b9bd72.js",
|
|
53
|
+
"static/chunks/fd9d1056-f761286b613acfb1.js",
|
|
54
|
+
"static/chunks/23-bb15da2f9712f1ee.js",
|
|
55
|
+
"static/chunks/main-app-550ee52788cc088b.js",
|
|
56
|
+
"static/css/001936a28cd34ad6.css",
|
|
57
|
+
"static/chunks/746-40fe8411fec84077.js",
|
|
58
|
+
"static/chunks/847-b131e825002abb54.js",
|
|
59
|
+
"static/chunks/app/services/page-b3edace587d96b1b.js"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"/_not-found/page":"/_not-found","/page":"/","/services/[id]/edit/page":"/services/[id]/edit","/services/[id]/page":"/services/[id]","/webhook/route":"/webhook","/services/page":"/services"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"polyfillFiles": [
|
|
3
|
+
"static/chunks/polyfills-78c92fac7aa8fdd8.js"
|
|
4
|
+
],
|
|
5
|
+
"devFiles": [],
|
|
6
|
+
"ampDevFiles": [],
|
|
7
|
+
"lowPriorityFiles": [
|
|
8
|
+
"static/_0aIhakzXKJdPOF1ZU6FY/_buildManifest.js",
|
|
9
|
+
"static/_0aIhakzXKJdPOF1ZU6FY/_ssgManifest.js"
|
|
10
|
+
],
|
|
11
|
+
"rootMainFiles": [
|
|
12
|
+
"static/chunks/webpack-58c0cac5b3b9bd72.js",
|
|
13
|
+
"static/chunks/fd9d1056-f761286b613acfb1.js",
|
|
14
|
+
"static/chunks/23-bb15da2f9712f1ee.js",
|
|
15
|
+
"static/chunks/main-app-550ee52788cc088b.js"
|
|
16
|
+
],
|
|
17
|
+
"pages": {
|
|
18
|
+
"/_app": [
|
|
19
|
+
"static/chunks/webpack-58c0cac5b3b9bd72.js",
|
|
20
|
+
"static/chunks/framework-f66176bb897dc684.js",
|
|
21
|
+
"static/chunks/main-7adbfc7fbfa35b2c.js",
|
|
22
|
+
"static/chunks/pages/_app-6a626577ffa902a4.js"
|
|
23
|
+
],
|
|
24
|
+
"/_error": [
|
|
25
|
+
"static/chunks/webpack-58c0cac5b3b9bd72.js",
|
|
26
|
+
"static/chunks/framework-f66176bb897dc684.js",
|
|
27
|
+
"static/chunks/main-7adbfc7fbfa35b2c.js",
|
|
28
|
+
"static/chunks/pages/_error-1be831200e60c5c0.js"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"ampFirstPages": []
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type": "commonjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
self.__PRERENDER_MANIFEST="{\"version\":4,\"routes\":{\"/\":{\"experimentalBypassFor\":[{\"type\":\"header\",\"key\":\"Next-Action\"},{\"type\":\"header\",\"key\":\"content-type\",\"value\":\"multipart/form-data;.*\"}],\"initialRevalidateSeconds\":false,\"srcRoute\":\"/\",\"dataRoute\":\"/index.rsc\"}},\"dynamicRoutes\":{},\"notFoundRoutes\":[],\"preview\":{\"previewModeId\":\"process.env.__NEXT_PREVIEW_MODE_ID\",\"previewModeSigningKey\":\"process.env.__NEXT_PREVIEW_MODE_SIGNING_KEY\",\"previewModeEncryptionKey\":\"process.env.__NEXT_PREVIEW_MODE_ENCRYPTION_KEY\"}}"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":4,"routes":{"/":{"experimentalBypassFor":[{"type":"header","key":"Next-Action"},{"type":"header","key":"content-type","value":"multipart/form-data;.*"}],"initialRevalidateSeconds":false,"srcRoute":"/","dataRoute":"/index.rsc"}},"dynamicRoutes":{},"notFoundRoutes":[],"preview":{"previewModeId":"90cea3b4af648de2ae7c42e1ac908de8","previewModeSigningKey":"54cbde5407f6615781d71d2ba201aa8cf0eeeb06824bf25888c11646c5806ac1","previewModeEncryptionKey":"27a5081fb150749e4b47f99164f45b9198bf09a4c4a7f1acacb0ee87fcba1336"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|