glooit 0.5.0 → 0.5.1

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.
@@ -1,138 +1,57 @@
1
- import { z } from 'zod';
2
- export declare const AgentSchema: z.ZodEnum<{
3
- claude: "claude";
4
- cursor: "cursor";
5
- codex: "codex";
6
- roocode: "roocode";
7
- }>;
8
- export type Agent = z.infer<typeof AgentSchema>;
9
- export declare const HookFunctionSchema: z.ZodAny;
10
- export declare const RuleSchema: z.ZodObject<{
11
- file: z.ZodString;
12
- to: z.ZodString;
13
- globs: z.ZodOptional<z.ZodString>;
14
- targets: z.ZodArray<z.ZodEnum<{
15
- claude: "claude";
16
- cursor: "cursor";
17
- codex: "codex";
18
- roocode: "roocode";
19
- }>>;
20
- hooks: z.ZodOptional<z.ZodArray<z.ZodString>>;
21
- }, z.core.$strip>;
22
- export declare const CommandSchema: z.ZodObject<{
23
- command: z.ZodString;
24
- file: z.ZodString;
25
- targets: z.ZodArray<z.ZodEnum<{
26
- claude: "claude";
27
- cursor: "cursor";
28
- codex: "codex";
29
- roocode: "roocode";
30
- }>>;
31
- }, z.core.$strip>;
32
- export declare const McpConfigSchema: z.ZodObject<{
33
- command: z.ZodOptional<z.ZodString>;
34
- args: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
36
- type: z.ZodOptional<z.ZodString>;
37
- url: z.ZodOptional<z.ZodString>;
38
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
39
- alwaysAllow: z.ZodOptional<z.ZodArray<z.ZodString>>;
40
- disabled: z.ZodOptional<z.ZodBoolean>;
41
- }, z.core.$strip>;
42
- export declare const McpSchema: z.ZodObject<{
43
- name: z.ZodString;
44
- config: z.ZodObject<{
45
- command: z.ZodOptional<z.ZodString>;
46
- args: z.ZodOptional<z.ZodArray<z.ZodString>>;
47
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
48
- type: z.ZodOptional<z.ZodString>;
49
- url: z.ZodOptional<z.ZodString>;
50
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
51
- alwaysAllow: z.ZodOptional<z.ZodArray<z.ZodString>>;
52
- disabled: z.ZodOptional<z.ZodBoolean>;
53
- }, z.core.$strip>;
54
- targets: z.ZodDefault<z.ZodArray<z.ZodEnum<{
55
- claude: "claude";
56
- cursor: "cursor";
57
- codex: "codex";
58
- roocode: "roocode";
59
- }>>>;
60
- outputPath: z.ZodOptional<z.ZodString>;
61
- }, z.core.$strip>;
62
- export declare const BackupConfigSchema: z.ZodObject<{
63
- enabled: z.ZodDefault<z.ZodBoolean>;
64
- retention: z.ZodDefault<z.ZodNumber>;
65
- }, z.core.$strip>;
66
- export declare const HooksSchema: z.ZodObject<{
67
- before: z.ZodOptional<z.ZodArray<z.ZodAny>>;
68
- after: z.ZodOptional<z.ZodArray<z.ZodAny>>;
69
- error: z.ZodOptional<z.ZodArray<z.ZodAny>>;
70
- }, z.core.$strip>;
71
- export declare const ConfigSchema: z.ZodObject<{
72
- configDir: z.ZodDefault<z.ZodString>;
73
- rules: z.ZodArray<z.ZodObject<{
74
- file: z.ZodString;
75
- to: z.ZodString;
76
- globs: z.ZodOptional<z.ZodString>;
77
- targets: z.ZodArray<z.ZodEnum<{
78
- claude: "claude";
79
- cursor: "cursor";
80
- codex: "codex";
81
- roocode: "roocode";
82
- }>>;
83
- hooks: z.ZodOptional<z.ZodArray<z.ZodString>>;
84
- }, z.core.$strip>>;
85
- commands: z.ZodOptional<z.ZodArray<z.ZodObject<{
86
- command: z.ZodString;
87
- file: z.ZodString;
88
- targets: z.ZodArray<z.ZodEnum<{
89
- claude: "claude";
90
- cursor: "cursor";
91
- codex: "codex";
92
- roocode: "roocode";
93
- }>>;
94
- }, z.core.$strip>>>;
95
- mcps: z.ZodOptional<z.ZodArray<z.ZodObject<{
96
- name: z.ZodString;
97
- config: z.ZodObject<{
98
- command: z.ZodOptional<z.ZodString>;
99
- args: z.ZodOptional<z.ZodArray<z.ZodString>>;
100
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
101
- type: z.ZodOptional<z.ZodString>;
102
- url: z.ZodOptional<z.ZodString>;
103
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
104
- alwaysAllow: z.ZodOptional<z.ZodArray<z.ZodString>>;
105
- disabled: z.ZodOptional<z.ZodBoolean>;
106
- }, z.core.$strip>;
107
- targets: z.ZodDefault<z.ZodArray<z.ZodEnum<{
108
- claude: "claude";
109
- cursor: "cursor";
110
- codex: "codex";
111
- roocode: "roocode";
112
- }>>>;
113
- outputPath: z.ZodOptional<z.ZodString>;
114
- }, z.core.$strip>>>;
115
- mergeMcps: z.ZodDefault<z.ZodBoolean>;
116
- hooks: z.ZodOptional<z.ZodObject<{
117
- before: z.ZodOptional<z.ZodArray<z.ZodAny>>;
118
- after: z.ZodOptional<z.ZodArray<z.ZodAny>>;
119
- error: z.ZodOptional<z.ZodArray<z.ZodAny>>;
120
- }, z.core.$strip>>;
121
- backup: z.ZodOptional<z.ZodObject<{
122
- enabled: z.ZodDefault<z.ZodBoolean>;
123
- retention: z.ZodDefault<z.ZodNumber>;
124
- }, z.core.$strip>>;
125
- }, z.core.$strip>;
126
- export type Rule = z.infer<typeof RuleSchema>;
127
- export type Command = z.infer<typeof CommandSchema>;
128
- export type McpConfig = z.infer<typeof McpConfigSchema>;
129
- export type Mcp = z.infer<typeof McpSchema>;
1
+ export type Agent = 'claude' | 'cursor' | 'codex' | 'roocode';
2
+ export interface Rule {
3
+ name?: string;
4
+ file: string;
5
+ to: string;
6
+ globs?: string;
7
+ targets: Agent[];
8
+ hooks?: string[];
9
+ }
10
+ export interface Command {
11
+ command: string;
12
+ file: string;
13
+ targets: Agent[];
14
+ }
15
+ export interface McpConfig {
16
+ command?: string;
17
+ args?: string[];
18
+ env?: Record<string, string>;
19
+ type?: string;
20
+ url?: string;
21
+ headers?: Record<string, string>;
22
+ alwaysAllow?: string[];
23
+ disabled?: boolean;
24
+ }
25
+ export interface Mcp {
26
+ name: string;
27
+ config: McpConfig;
28
+ targets?: Agent[];
29
+ outputPath?: string;
30
+ }
130
31
  export interface ResolvedMcp extends Omit<Mcp, 'outputPath'> {
131
32
  outputPath: string;
132
33
  }
133
- export type BackupConfig = z.infer<typeof BackupConfigSchema>;
134
- export type Hooks = z.infer<typeof HooksSchema>;
135
- export type Config = z.infer<typeof ConfigSchema>;
34
+ export interface BackupConfig {
35
+ enabled?: boolean;
36
+ retention?: number;
37
+ }
38
+ export interface Hooks {
39
+ before?: ((context: {
40
+ config: Config;
41
+ }) => Promise<void> | void)[];
42
+ after?: ((context: SyncContext) => Promise<string | void> | string | void)[];
43
+ error?: ((error: unknown) => Promise<void> | void)[];
44
+ }
45
+ export interface Config {
46
+ configDir?: string;
47
+ targets?: Agent[];
48
+ rules: Rule[];
49
+ commands?: Command[];
50
+ mcps?: Mcp[];
51
+ mergeMcps?: boolean;
52
+ hooks?: Hooks;
53
+ backup?: BackupConfig;
54
+ }
136
55
  export interface AgentMapping {
137
56
  path: string;
138
57
  format: 'markdown' | 'frontmatter';
package/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "glooit",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "🧴 Sync your AI agent configurations and rules across platforms with ease",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
7
  "type": "module",
9
8
  "bin": {
10
9
  "glooit": "dist/cli/index.js"
@@ -17,14 +16,13 @@
17
16
  "build:binary:macos": "bun build src/cli/index.ts --compile --target=bun-darwin-arm64 --outfile bin/glooit-macos",
18
17
  "build:binary:windows": "bun build src/cli/index.ts --compile --target=bun-windows-x64 --outfile bin/glooit-windows.exe",
19
18
  "dev": "bun run src/cli/index.ts",
20
- "test": "vitest",
21
- "test:run": "vitest run",
19
+ "test": "vitest --run",
22
20
  "test:coverage": "vitest run --coverage",
23
21
  "typecheck": "tsc --noEmit",
24
22
  "lint": "oxlint src tests",
25
23
  "lint:fix": "oxlint src tests --fix",
26
24
  "format": "oxlint src tests --fix",
27
- "check": "bun run typecheck && bun run lint && bun run test:run",
25
+ "check": "bun run typecheck && bun run lint && bun run test",
28
26
  "taze": "bunx taze",
29
27
  "prepublishOnly": "bun run check && bun run build && bun run build:cli",
30
28
  "install:local": "bun run build:binary && sudo mv bin/glooit /usr/local/bin/"
@@ -71,7 +69,6 @@
71
69
  },
72
70
  "dependencies": {
73
71
  "commander": "^14.0.1",
74
- "package-manager-detector": "^1.3.0",
75
- "zod": "^4.1.11"
72
+ "package-manager-detector": "^1.3.0"
76
73
  }
77
74
  }