refactor: migrate legacy wire namespace to wrn
Quality / quality (ubuntu-latest) (push) Failing after 9m49s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-12 18:51:15 +05:30
parent ec23dd4c93
commit 2c960fc1dc
488 changed files with 27306 additions and 19063 deletions
+5 -5
View File
@@ -30,7 +30,7 @@ const billing = defineService({
},
});
function wire(allowed: boolean) {
function wrn(allowed: boolean) {
const service = implement(
billing,
{
@@ -47,7 +47,7 @@ function wire(allowed: boolean) {
});
}
function httpWire(allowed: boolean) {
function createHttpTransport(allowed: boolean) {
const service = implement(
billing,
{
@@ -122,7 +122,7 @@ describe("RPC integration", () => {
const client = serviceClient(billing, {
app: "billing",
as: { user: { id: "u1" }, tenant: { id: "acme" }, locals: {} } as unknown as Context,
transport: wire(true),
transport: wrn(true),
});
expect(await client.createInvoice({ amountCents: 250 })).toEqual({
invoiceId: "inv_250",
@@ -136,7 +136,7 @@ describe("RPC integration", () => {
const client = serviceClient(billing, {
app: "billing",
as: { user: { id: "u1" }, locals: {} } as unknown as Context,
transport: wire(false),
transport: wrn(false),
});
await expect(client.createInvoice({ amountCents: 1 })).rejects.toMatchObject({
code: RPC_ERROR_CODES.denied,
@@ -149,7 +149,7 @@ describe("RPC integration", () => {
const client = serviceClient(billing, {
app: "billing",
as: { user: { id: "u1" }, locals: {} } as unknown as Context,
transport: httpWire(true),
transport: createHttpTransport(true),
});
expect(await client.createInvoice({ amountCents: 7 })).toEqual({
invoiceId: "inv_7",