Skip to content

Commit 5756051

Browse files
authored
Fix: Finally eliminate ajv error & Log url to user on deploy (#76)
We move the ajv dependencies out of dev deps. This actually resolves the issue. running make-agent deploy without the [optional] url argument results in the following: ``` ➜ wraptor git:(upgrade) ✗ npx make-agent deploy Retrying... Retrying... Retrying... Unexpected error: fetch failed OpenAPI specification validation failed. ``` Digging into the code it seems that the env vars are not loaded. There is also no documentation about what env vars should be set if the URL is not supplied in the runtime argument. Closes #77
1 parent 2df1bad commit 5756051

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Currently, the CLI supports the following command:
5454
- `-u, --url <url>`: The URL where your agent is hosted (optional)
5555

5656
If no URL is provided, the command will attempt to determine the URL automatically through environment variables.
57+
In particular, see [deployed-url.ts](src/utils/deployed-url.ts) for various deployment configurations.
5758

5859
1. ### **`contract`**: Scaffold a basic agent from a NEAR contract that has an ABI
5960
Usage:

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
"license": "MIT",
3838
"dependencies": {
3939
"@apidevtools/swagger-parser": "^10.1.0",
40+
"ajv": "^8.17.1",
41+
"ajv-draft-04": "^1.0.0",
4042
"borsh": "^2.0.0",
4143
"commander": "^12.1.0",
4244
"dotenv": "^16.4.5",
@@ -57,8 +59,6 @@
5759
"@typescript-eslint/eslint-plugin": "^8.15.0",
5860
"@typescript-eslint/parser": "^8.23.0",
5961
"@vitest/coverage-v8": "^3.0.5",
60-
"ajv": "^8.17.1",
61-
"ajv-draft-04": "^1.0.0",
6262
"eslint": "^9.15.0",
6363
"eslint-plugin-import": "^2.31.0",
6464
"prettier": "^3.4.2",

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/commands/deploy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export const deployCommand = new Command()
1717
if (!url) {
1818
console.error("Deployed URL could not be determined.");
1919
return;
20+
} else {
21+
console.log("Using deployment URL:", url);
2022
}
2123

2224
const id = getHostname(url);

0 commit comments

Comments
 (0)