fix: make apiProxy injection optional

Resolves the optional apiProxy injection, keeps HTML as the compatibility default, synchronizes generated entrypoints, and adds a regression test.
This commit is contained in:
徐跃恒
2026-09-15 21:36:14 +08:00
committed by GitHub
parent 93f3bec975
commit 72e1d399a7
7 changed files with 22 additions and 13 deletions
+5 -1
View File
@@ -1,6 +1,10 @@
import assert from 'node:assert/strict'
import test from 'node:test'
import { apply } from '../src/index.ts'
import { apply, inject } from '../src/index.ts'
test('apiProxy is optional and is not a hard Cordis dependency', () => {
assert.deepEqual(inject, ['agents'])
})
test('apply without token does not throw and does not start effect', () => {
const effects: string[] = []