@aixyz/config 0.7.0 → 0.9.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.
Files changed (2) hide show
  1. package/index.ts +28 -2
  2. package/package.json +2 -2
package/index.ts CHANGED
@@ -43,6 +43,16 @@ export type AixyzConfig = {
43
43
  * Overrides the `VERCEL=1` environment variable, but is overridden by the `--output` CLI flag.
44
44
  */
45
45
  output?: "standalone" | "vercel";
46
+ /**
47
+ * Glob pattern(s) for files to include in the build from the `app/` directory.
48
+ * @default ["**\/*.{js,jsx,ts,tsx}"]
49
+ */
50
+ includes?: string | string[];
51
+ /**
52
+ * Glob pattern(s) for files to exclude from the build.
53
+ * @default ["**\/{_*,*.{test,spec,e2e}}.{js,jsx,ts,tsx}"]
54
+ */
55
+ excludes?: string | string[];
46
56
  };
47
57
  skills?: InferredAixyzConfig["skills"];
48
58
  };
@@ -51,6 +61,14 @@ const NetworkSchema = z.custom<Network>((val) => {
51
61
  return typeof val === "string" && val.includes(":");
52
62
  });
53
63
 
64
+ const defaultConfig = {
65
+ build: {
66
+ includes: ["**/*.{js,jsx,ts,tsx}"],
67
+ excludes: ["**/{_*,*.{test,spec,e2e}}.{js,jsx,ts,tsx}"],
68
+ },
69
+ skills: [],
70
+ };
71
+
54
72
  const AixyzConfigSchema = z.object({
55
73
  name: z.string().nonempty(),
56
74
  description: z.string().nonempty(),
@@ -80,8 +98,16 @@ const AixyzConfigSchema = z.object({
80
98
  build: z
81
99
  .object({
82
100
  output: z.enum(["standalone", "vercel"]).optional(),
101
+ includes: z
102
+ .union([z.string(), z.array(z.string())])
103
+ .default(["**/*.{js,jsx,ts,tsx}"])
104
+ .transform((v) => (Array.isArray(v) ? v : [v])),
105
+ excludes: z
106
+ .union([z.string(), z.array(z.string())])
107
+ .default(["**/{_*,*.{test,spec,e2e}}.{js,jsx,ts,tsx}"])
108
+ .transform((v) => (Array.isArray(v) ? v : [v])),
83
109
  })
84
- .optional(),
110
+ .default(defaultConfig.build),
85
111
  skills: z
86
112
  .array(
87
113
  z.object({
@@ -95,7 +121,7 @@ const AixyzConfigSchema = z.object({
95
121
  security: z.array(z.record(z.string(), z.array(z.string()))).optional(),
96
122
  }),
97
123
  )
98
- .default([]),
124
+ .default(defaultConfig.skills),
99
125
  });
100
126
 
101
127
  type InferredAixyzConfig = z.infer<typeof AixyzConfigSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aixyz/config",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Payment-native SDK for AI Agent",
5
5
  "keywords": [
6
6
  "ai",
@@ -8,7 +8,7 @@
8
8
  "agent",
9
9
  "aixyz"
10
10
  ],
11
- "homepage": "https://ai-xyz.dev",
11
+ "homepage": "https://aixyz.sh",
12
12
  "bugs": "https://github.com/AgentlyHQ/aixyz/issues",
13
13
  "repository": {
14
14
  "type": "git",