gitship-shared 0.0.2 → 0.0.3

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,268 @@
1
+ import { z } from "zod";
2
+ export declare const RepositorySchema: z.ZodObject<{
3
+ owner: z.ZodString;
4
+ repo: z.ZodString;
5
+ branch: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ owner: string;
8
+ repo: string;
9
+ branch: string;
10
+ }, {
11
+ owner: string;
12
+ repo: string;
13
+ branch: string;
14
+ }>;
15
+ export declare const TargetSchema: z.ZodObject<{
16
+ type: z.ZodEnum<["ssh", "local"]>;
17
+ host: z.ZodOptional<z.ZodString>;
18
+ port: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
19
+ username: z.ZodOptional<z.ZodString>;
20
+ path: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ path: string;
23
+ type: "ssh" | "local";
24
+ port: number;
25
+ host?: string | undefined;
26
+ username?: string | undefined;
27
+ }, {
28
+ path: string;
29
+ type: "ssh" | "local";
30
+ host?: string | undefined;
31
+ port?: number | undefined;
32
+ username?: string | undefined;
33
+ }>;
34
+ export declare const HealthCheckSchema: z.ZodObject<{
35
+ path: z.ZodDefault<z.ZodString>;
36
+ port: z.ZodOptional<z.ZodNumber>;
37
+ retries: z.ZodDefault<z.ZodNumber>;
38
+ interval_ms: z.ZodDefault<z.ZodNumber>;
39
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ path: string;
42
+ retries: number;
43
+ interval_ms: number;
44
+ timeout_ms: number;
45
+ port?: number | undefined;
46
+ }, {
47
+ path?: string | undefined;
48
+ port?: number | undefined;
49
+ retries?: number | undefined;
50
+ interval_ms?: number | undefined;
51
+ timeout_ms?: number | undefined;
52
+ }>;
53
+ export declare const DeploySchema: z.ZodObject<{
54
+ install: z.ZodOptional<z.ZodString>;
55
+ build: z.ZodOptional<z.ZodString>;
56
+ restart: z.ZodOptional<z.ZodString>;
57
+ healthcheck: z.ZodOptional<z.ZodObject<{
58
+ path: z.ZodDefault<z.ZodString>;
59
+ port: z.ZodOptional<z.ZodNumber>;
60
+ retries: z.ZodDefault<z.ZodNumber>;
61
+ interval_ms: z.ZodDefault<z.ZodNumber>;
62
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ path: string;
65
+ retries: number;
66
+ interval_ms: number;
67
+ timeout_ms: number;
68
+ port?: number | undefined;
69
+ }, {
70
+ path?: string | undefined;
71
+ port?: number | undefined;
72
+ retries?: number | undefined;
73
+ interval_ms?: number | undefined;
74
+ timeout_ms?: number | undefined;
75
+ }>>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ install?: string | undefined;
78
+ build?: string | undefined;
79
+ restart?: string | undefined;
80
+ healthcheck?: {
81
+ path: string;
82
+ retries: number;
83
+ interval_ms: number;
84
+ timeout_ms: number;
85
+ port?: number | undefined;
86
+ } | undefined;
87
+ }, {
88
+ install?: string | undefined;
89
+ build?: string | undefined;
90
+ restart?: string | undefined;
91
+ healthcheck?: {
92
+ path?: string | undefined;
93
+ port?: number | undefined;
94
+ retries?: number | undefined;
95
+ interval_ms?: number | undefined;
96
+ timeout_ms?: number | undefined;
97
+ } | undefined;
98
+ }>;
99
+ export declare const LoggingSchema: z.ZodObject<{
100
+ enabled: z.ZodDefault<z.ZodBoolean>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ enabled: boolean;
103
+ }, {
104
+ enabled?: boolean | undefined;
105
+ }>;
106
+ export declare const ProjectConfigSchema: z.ZodObject<{
107
+ project: z.ZodString;
108
+ repository: z.ZodObject<{
109
+ owner: z.ZodString;
110
+ repo: z.ZodString;
111
+ branch: z.ZodString;
112
+ }, "strip", z.ZodTypeAny, {
113
+ owner: string;
114
+ repo: string;
115
+ branch: string;
116
+ }, {
117
+ owner: string;
118
+ repo: string;
119
+ branch: string;
120
+ }>;
121
+ target: z.ZodObject<{
122
+ type: z.ZodEnum<["ssh", "local"]>;
123
+ host: z.ZodOptional<z.ZodString>;
124
+ port: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
125
+ username: z.ZodOptional<z.ZodString>;
126
+ path: z.ZodString;
127
+ }, "strip", z.ZodTypeAny, {
128
+ path: string;
129
+ type: "ssh" | "local";
130
+ port: number;
131
+ host?: string | undefined;
132
+ username?: string | undefined;
133
+ }, {
134
+ path: string;
135
+ type: "ssh" | "local";
136
+ host?: string | undefined;
137
+ port?: number | undefined;
138
+ username?: string | undefined;
139
+ }>;
140
+ deploy: z.ZodObject<{
141
+ install: z.ZodOptional<z.ZodString>;
142
+ build: z.ZodOptional<z.ZodString>;
143
+ restart: z.ZodOptional<z.ZodString>;
144
+ healthcheck: z.ZodOptional<z.ZodObject<{
145
+ path: z.ZodDefault<z.ZodString>;
146
+ port: z.ZodOptional<z.ZodNumber>;
147
+ retries: z.ZodDefault<z.ZodNumber>;
148
+ interval_ms: z.ZodDefault<z.ZodNumber>;
149
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
150
+ }, "strip", z.ZodTypeAny, {
151
+ path: string;
152
+ retries: number;
153
+ interval_ms: number;
154
+ timeout_ms: number;
155
+ port?: number | undefined;
156
+ }, {
157
+ path?: string | undefined;
158
+ port?: number | undefined;
159
+ retries?: number | undefined;
160
+ interval_ms?: number | undefined;
161
+ timeout_ms?: number | undefined;
162
+ }>>;
163
+ }, "strip", z.ZodTypeAny, {
164
+ install?: string | undefined;
165
+ build?: string | undefined;
166
+ restart?: string | undefined;
167
+ healthcheck?: {
168
+ path: string;
169
+ retries: number;
170
+ interval_ms: number;
171
+ timeout_ms: number;
172
+ port?: number | undefined;
173
+ } | undefined;
174
+ }, {
175
+ install?: string | undefined;
176
+ build?: string | undefined;
177
+ restart?: string | undefined;
178
+ healthcheck?: {
179
+ path?: string | undefined;
180
+ port?: number | undefined;
181
+ retries?: number | undefined;
182
+ interval_ms?: number | undefined;
183
+ timeout_ms?: number | undefined;
184
+ } | undefined;
185
+ }>;
186
+ logging: z.ZodDefault<z.ZodOptional<z.ZodObject<{
187
+ enabled: z.ZodDefault<z.ZodBoolean>;
188
+ }, "strip", z.ZodTypeAny, {
189
+ enabled: boolean;
190
+ }, {
191
+ enabled?: boolean | undefined;
192
+ }>>>;
193
+ }, "strip", z.ZodTypeAny, {
194
+ project: string;
195
+ repository: {
196
+ owner: string;
197
+ repo: string;
198
+ branch: string;
199
+ };
200
+ target: {
201
+ path: string;
202
+ type: "ssh" | "local";
203
+ port: number;
204
+ host?: string | undefined;
205
+ username?: string | undefined;
206
+ };
207
+ deploy: {
208
+ install?: string | undefined;
209
+ build?: string | undefined;
210
+ restart?: string | undefined;
211
+ healthcheck?: {
212
+ path: string;
213
+ retries: number;
214
+ interval_ms: number;
215
+ timeout_ms: number;
216
+ port?: number | undefined;
217
+ } | undefined;
218
+ };
219
+ logging: {
220
+ enabled: boolean;
221
+ };
222
+ }, {
223
+ project: string;
224
+ repository: {
225
+ owner: string;
226
+ repo: string;
227
+ branch: string;
228
+ };
229
+ target: {
230
+ path: string;
231
+ type: "ssh" | "local";
232
+ host?: string | undefined;
233
+ port?: number | undefined;
234
+ username?: string | undefined;
235
+ };
236
+ deploy: {
237
+ install?: string | undefined;
238
+ build?: string | undefined;
239
+ restart?: string | undefined;
240
+ healthcheck?: {
241
+ path?: string | undefined;
242
+ port?: number | undefined;
243
+ retries?: number | undefined;
244
+ interval_ms?: number | undefined;
245
+ timeout_ms?: number | undefined;
246
+ } | undefined;
247
+ };
248
+ logging?: {
249
+ enabled?: boolean | undefined;
250
+ } | undefined;
251
+ }>;
252
+ export declare const AuthConfigSchema: z.ZodObject<{
253
+ github_token: z.ZodString;
254
+ github_username: z.ZodOptional<z.ZodString>;
255
+ }, "strip", z.ZodTypeAny, {
256
+ github_token: string;
257
+ github_username?: string | undefined;
258
+ }, {
259
+ github_token: string;
260
+ github_username?: string | undefined;
261
+ }>;
262
+ export type RepositoryConfig = z.infer<typeof RepositorySchema>;
263
+ export type TargetConfig = z.infer<typeof TargetSchema>;
264
+ export type DeployConfig = z.infer<typeof DeploySchema>;
265
+ export type ProjectConfig = z.infer<typeof ProjectConfigSchema>;
266
+ export type AuthConfig = z.infer<typeof AuthConfigSchema>;
267
+ export declare function parseProjectConfig(yamlStr: string): ProjectConfig;
268
+ export declare function stringifyProjectConfig(config: ProjectConfig): string;
@@ -0,0 +1,49 @@
1
+ import { z } from "zod";
2
+ import { parse, stringify } from "yaml";
3
+ export const RepositorySchema = z.object({
4
+ owner: z.string().min(1, "Repository owner is required"),
5
+ repo: z.string().min(1, "Repository name is required"),
6
+ branch: z.string().min(1, "Branch name is required"),
7
+ });
8
+ export const TargetSchema = z.object({
9
+ type: z.enum(["ssh", "local"]),
10
+ host: z.string().optional(),
11
+ port: z.number().optional().default(22),
12
+ username: z.string().optional(),
13
+ path: z.string().min(1, "Deployment target path is required"),
14
+ });
15
+ export const HealthCheckSchema = z.object({
16
+ path: z.string().default("/"),
17
+ port: z.number().optional(),
18
+ retries: z.number().default(5),
19
+ interval_ms: z.number().default(1000),
20
+ timeout_ms: z.number().default(2000),
21
+ });
22
+ export const DeploySchema = z.object({
23
+ install: z.string().optional(),
24
+ build: z.string().optional(),
25
+ restart: z.string().optional(),
26
+ healthcheck: HealthCheckSchema.optional(),
27
+ });
28
+ export const LoggingSchema = z.object({
29
+ enabled: z.boolean().default(true),
30
+ });
31
+ export const ProjectConfigSchema = z.object({
32
+ project: z.string().min(1, "Project name is required").regex(/^[a-zA-Z0-9_-]+$/, "Project name can only contain letters, numbers, underscores, and dashes"),
33
+ repository: RepositorySchema,
34
+ target: TargetSchema,
35
+ deploy: DeploySchema,
36
+ logging: LoggingSchema.optional().default({ enabled: true }),
37
+ });
38
+ export const AuthConfigSchema = z.object({
39
+ github_token: z.string().min(1, "GitHub token is required"),
40
+ github_username: z.string().optional(),
41
+ });
42
+ export function parseProjectConfig(yamlStr) {
43
+ const parsed = parse(yamlStr);
44
+ return ProjectConfigSchema.parse(parsed);
45
+ }
46
+ export function stringifyProjectConfig(config) {
47
+ return stringify(config);
48
+ }
49
+ //# sourceMappingURL=config.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.schema.js","sourceRoot":"","sources":["../src/config.schema.ts"],"names":[],"mappings":"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"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from "./config.schema.js";
2
+ export * from "./types.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,64 @@
1
+ export type DeploymentStatus = "QUEUED" | "RUNNING" | "SUCCESS" | "FAILED" | "CANCELLED";
2
+ export type StepStatus = "PENDING" | "RUNNING" | "SUCCESS" | "FAILED";
3
+ export interface Project {
4
+ id: string;
5
+ name: string;
6
+ owner: string;
7
+ repo: string;
8
+ branch: string;
9
+ target_type: "ssh" | "local";
10
+ target_host?: string;
11
+ target_path: string;
12
+ install_cmd?: string;
13
+ build_cmd?: string;
14
+ restart_cmd?: string;
15
+ healthcheck_path?: string;
16
+ healthcheck_port?: number;
17
+ healthcheck_retries?: number;
18
+ healthcheck_interval_ms?: number;
19
+ healthcheck_timeout_ms?: number;
20
+ webhook_secret: string;
21
+ created_at: number;
22
+ updated_at: number;
23
+ }
24
+ export interface Webhook {
25
+ id: string;
26
+ project_id: string;
27
+ github_webhook_id: number | null;
28
+ url: string;
29
+ secret: string;
30
+ active: boolean;
31
+ created_at: number;
32
+ }
33
+ export interface Deployment {
34
+ id: string;
35
+ project_id: string;
36
+ branch: string;
37
+ commit_sha: string | null;
38
+ commit_message: string | null;
39
+ author: string | null;
40
+ status: DeploymentStatus;
41
+ started_at: number | null;
42
+ finished_at: number | null;
43
+ total_duration_ms: number | null;
44
+ rollback_of_id: string | null;
45
+ created_at: number;
46
+ }
47
+ export interface DeploymentStep {
48
+ id: string;
49
+ deployment_id: string;
50
+ step_name: "clone" | "install" | "build" | "restart" | "healthcheck";
51
+ status: StepStatus;
52
+ started_at: number | null;
53
+ finished_at: number | null;
54
+ duration_ms: number | null;
55
+ }
56
+ export interface DeploymentLog {
57
+ deployment_id: string;
58
+ log_data: string;
59
+ }
60
+ export interface DeploymentProvider {
61
+ deploy(): Promise<void>;
62
+ rollback(): Promise<void>;
63
+ validate(): Promise<void>;
64
+ }
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "gitship-shared",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
7
10
  "scripts": {
8
11
  "build": "tsc",
9
12
  "test": "echo \"No tests for shared\""
@@ -1,64 +0,0 @@
1
- import { z } from "zod";
2
-
3
- import { parse, stringify } from "yaml";
4
-
5
- export const RepositorySchema = z.object({
6
- owner: z.string().min(1, "Repository owner is required"),
7
- repo: z.string().min(1, "Repository name is required"),
8
- branch: z.string().min(1, "Branch name is required"),
9
- });
10
-
11
- export const TargetSchema = z.object({
12
- type: z.enum(["ssh", "local"]),
13
- host: z.string().optional(),
14
- port: z.number().optional().default(22),
15
- username: z.string().optional(),
16
- path: z.string().min(1, "Deployment target path is required"),
17
- });
18
-
19
- export const HealthCheckSchema = z.object({
20
- path: z.string().default("/"),
21
- port: z.number().optional(),
22
- retries: z.number().default(5),
23
- interval_ms: z.number().default(1000),
24
- timeout_ms: z.number().default(2000),
25
- });
26
-
27
- export const DeploySchema = z.object({
28
- install: z.string().optional(),
29
- build: z.string().optional(),
30
- restart: z.string().optional(),
31
- healthcheck: HealthCheckSchema.optional(),
32
- });
33
-
34
- export const LoggingSchema = z.object({
35
- enabled: z.boolean().default(true),
36
- });
37
-
38
- export const ProjectConfigSchema = z.object({
39
- project: z.string().min(1, "Project name is required").regex(/^[a-zA-Z0-9_-]+$/, "Project name can only contain letters, numbers, underscores, and dashes"),
40
- repository: RepositorySchema,
41
- target: TargetSchema,
42
- deploy: DeploySchema,
43
- logging: LoggingSchema.optional().default({ enabled: true }),
44
- });
45
-
46
- export const AuthConfigSchema = z.object({
47
- github_token: z.string().min(1, "GitHub token is required"),
48
- github_username: z.string().optional(),
49
- });
50
-
51
- export type RepositoryConfig = z.infer<typeof RepositorySchema>;
52
- export type TargetConfig = z.infer<typeof TargetSchema>;
53
- export type DeployConfig = z.infer<typeof DeploySchema>;
54
- export type ProjectConfig = z.infer<typeof ProjectConfigSchema>;
55
- export type AuthConfig = z.infer<typeof AuthConfigSchema>;
56
-
57
- export function parseProjectConfig(yamlStr: string): ProjectConfig {
58
- const parsed = parse(yamlStr);
59
- return ProjectConfigSchema.parse(parsed);
60
- }
61
-
62
- export function stringifyProjectConfig(config: ProjectConfig): string {
63
- return stringify(config);
64
- }
package/src/types.ts DELETED
@@ -1,70 +0,0 @@
1
- export type DeploymentStatus = "QUEUED" | "RUNNING" | "SUCCESS" | "FAILED" | "CANCELLED";
2
- export type StepStatus = "PENDING" | "RUNNING" | "SUCCESS" | "FAILED";
3
-
4
- export interface Project {
5
- id: string;
6
- name: string;
7
- owner: string;
8
- repo: string;
9
- branch: string;
10
- target_type: "ssh" | "local";
11
- target_host?: string;
12
- target_path: string;
13
- install_cmd?: string;
14
- build_cmd?: string;
15
- restart_cmd?: string;
16
- healthcheck_path?: string;
17
- healthcheck_port?: number;
18
- healthcheck_retries?: number;
19
- healthcheck_interval_ms?: number;
20
- healthcheck_timeout_ms?: number;
21
- webhook_secret: string;
22
- created_at: number;
23
- updated_at: number;
24
- }
25
-
26
- export interface Webhook {
27
- id: string;
28
- project_id: string;
29
- github_webhook_id: number | null;
30
- url: string;
31
- secret: string;
32
- active: boolean;
33
- created_at: number;
34
- }
35
-
36
- export interface Deployment {
37
- id: string;
38
- project_id: string;
39
- branch: string;
40
- commit_sha: string | null;
41
- commit_message: string | null;
42
- author: string | null;
43
- status: DeploymentStatus;
44
- started_at: number | null;
45
- finished_at: number | null;
46
- total_duration_ms: number | null;
47
- rollback_of_id: string | null;
48
- created_at: number;
49
- }
50
-
51
- export interface DeploymentStep {
52
- id: string;
53
- deployment_id: string;
54
- step_name: "clone" | "install" | "build" | "restart" | "healthcheck";
55
- status: StepStatus;
56
- started_at: number | null;
57
- finished_at: number | null;
58
- duration_ms: number | null;
59
- }
60
-
61
- export interface DeploymentLog {
62
- deployment_id: string;
63
- log_data: string;
64
- }
65
-
66
- export interface DeploymentProvider {
67
- deploy(): Promise<void>;
68
- rollback(): Promise<void>;
69
- validate(): Promise<void>;
70
- }
package/tsconfig.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "rootDir": "./src"
6
- },
7
- "include": ["src/**/*"]
8
- }
File without changes