@aixyz/config 0.1.1 → 0.2.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 +15 -16
  2. package/package.json +2 -3
package/index.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { resolve } from "path";
2
- import { loadEnvConfig } from "@next/env";
3
2
 
4
3
  import { z } from "zod";
5
4
 
@@ -25,7 +24,7 @@ export type AixyzConfig = {
25
24
  */
26
25
  network: string;
27
26
  };
28
- skills: GetAixyzConfig["skills"];
27
+ skills?: GetAixyzConfig["skills"];
29
28
  };
30
29
 
31
30
  const NetworkSchema = z.custom<Network>((val) => {
@@ -58,18 +57,20 @@ const AixyzConfigSchema = z.object({
58
57
  payTo: z.string(),
59
58
  network: NetworkSchema,
60
59
  }),
61
- skills: z.array(
62
- z.object({
63
- id: z.string().nonempty(),
64
- name: z.string().nonempty(),
65
- description: z.string().nonempty(),
66
- tags: z.array(z.string()),
67
- examples: z.array(z.string()).optional(),
68
- inputModes: z.array(z.string()).optional(),
69
- outputModes: z.array(z.string()).optional(),
70
- security: z.array(z.record(z.string(), z.array(z.string()))).optional(),
71
- }),
72
- ),
60
+ skills: z
61
+ .array(
62
+ z.object({
63
+ id: z.string().nonempty(),
64
+ name: z.string().nonempty(),
65
+ description: z.string().nonempty(),
66
+ tags: z.array(z.string()),
67
+ examples: z.array(z.string()).optional(),
68
+ inputModes: z.array(z.string()).optional(),
69
+ outputModes: z.array(z.string()).optional(),
70
+ security: z.array(z.record(z.string(), z.array(z.string()))).optional(),
71
+ }),
72
+ )
73
+ .default([]),
73
74
  });
74
75
 
75
76
  /**
@@ -95,8 +96,6 @@ export type GetAixyzConfig = z.infer<typeof AixyzConfigSchema>;
95
96
  */
96
97
  export function getAixyzConfig(): GetAixyzConfig {
97
98
  const cwd = process.cwd();
98
- loadEnvConfig(cwd);
99
-
100
99
  const configPath = resolve(cwd, "aixyz.config.ts");
101
100
  const mod = require(configPath);
102
101
  const config = mod.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aixyz/config",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "ai",
@@ -26,7 +26,6 @@
26
26
  "**/*.ts"
27
27
  ],
28
28
  "dependencies": {
29
- "@next/env": "^16.1.6",
30
- "zod": "^4.3.6"
29
+ "zod": "^4"
31
30
  }
32
31
  }