refactor: clean up code formatting and update package dependencies

- Removed unnecessary blank lines and improved formatting for better readability in index.ts and converters.ts.
- Updated package-lock.json to downgrade several dependencies for compatibility, including @protobufjs/eventemitter, @protobufjs/fetch, and others.
- Enhanced error message in core.ts to clarify configuration options for the Command Code API key.
- Added a test to ensure the correct handling of environment variable values in test-stream.ts.
This commit is contained in:
wh.huajieyu
2026-05-28 06:23:28 -04:00
parent c2497ed098
commit e78875f532
6 changed files with 67 additions and 37 deletions
+4 -4
View File
@@ -177,10 +177,10 @@ try {
assert.equal(print.code, 0, print.stderr)
assert.match(print.stdout, /mock-omp-ok/)
assert.equal(requestCount, 1)
assert.ok(
typeof lastRequestHeaders.authorization === "string" &&
lastRequestHeaders.authorization.startsWith("Bearer "),
"should send a bearer Authorization header",
assert.equal(
lastRequestHeaders.authorization,
"Bearer mock-key",
"should send the resolved env-var value, not the literal var name",
)
assert.equal(lastRequestBody?.params?.model, TEST_MODEL)
assert.equal(typeof lastRequestBody?.params?.system, "string")