feat(server)!: improve context #390
Annotations
9 errors and 3 warnings
packages/server/src/procedure-client.test.ts > createProcedureClient - case without lazy > just a client:
packages/server/src/procedure-client.test.ts#L69
AssertionError: expected "spy" to be called with arguments: [ { input: { val: 123 }, …(4) } ]
Received:
1st spy call:
Array [
Object {
- "context": undefined,
+ "context": Object {},
"errors": "__constructors__",
"input": Object {
"val": 123,
},
"path": Array [],
"procedure": Procedure {
"~orpc": Object {
"contract": ContractProcedure {
"~orpc": Object {
"InputSchema": ZodObject {
"_cached": Object {
"keys": Array [
"val",
],
"shape": Object {
"val": ZodEffects {
"_def": Object {
"description": undefined,
"effect": Object {
"transform": [Function anonymous],
"type": "transform",
},
"errorMap": [Function customMap],
"schema": ZodString {
"_def": Object {
"checks": Array [],
"coerce": false,
"typeName": "ZodString",
},
"and": [Function bound and],
"array": [Function bound array],
"brand": [Function bound brand],
"catch": [Function bound catch],
"default": [Function bound default],
"describe": [Function bound describe],
"isNullable": [Function bound isNullable],
"isOptional": [Function bound isOptional],
"nullable": [Function bound nullable],
"nullish": [Function bound nullish],
"optional": [Function bound optional],
"or": [Function bound or],
"parse": [Function bound parse],
"parseAsync": [Function bound parseAsync],
"pipe": [Function bound pipe],
"promise": [Function bound promise],
"readonly": [Function bound readonly],
"refine": [Function bound refine],
"refinement": [Function bound refinement],
"safeParse": [Function bound safeParse],
"safeParseAsync": [Function bound safeParseAsync],
"spa": [Function bound safeParseAsync],
"superRefine": [Function bound superRefine],
"transform": [Function bound transform],
"~standard": Object {
"validate": [Function validate],
"vendor": "zod",
"version": 1,
},
},
"typeName": "ZodEffects",
},
"and": [Function bound and],
"array": [Function bound array],
"brand": [Function bound brand],
"catch": [Function bound catch],
"default": [Function bound default],
"describe": [Function bound describe],
"isNullable": [Function bound isNullable],
"isOptional": [Function bound isOptional],
"nullable": [Function bound nullable],
"nullish": [Function bound nullish],
"optional": [Function bound optional],
"or": [Function bound or],
"parse": [Function bound parse],
"parseAsync": [Function bound parseAsync],
"pipe": [Function bound pipe],
"promise": [Function bound promise],
"readonly": [Fu
|
packages/server/src/procedure-client.test.ts > createProcedureClient - case without lazy > middleware can add extra context:
packages/server/src/procedure-client.test.ts#L211
AssertionError: expected "spy" to be called with arguments: [ ObjectContaining{…}, …(2) ]
Received:
1st spy call:
Array [
- ObjectContaining {
- "context": undefined,
+ Object {
+ "context": Object {},
+ "errors": undefined,
+ "input": Object {
+ "val": "123",
+ },
+ "next": [Function next],
+ "path": Array [],
+ "procedure": Procedure {
+ "~orpc": Object {
+ "contract": ContractProcedure {
+ "~orpc": Object {
+ "InputSchema": ZodObject {
+ "_cached": Object {
+ "keys": Array [
+ "val",
+ ],
+ "shape": Object {
+ "val": ZodEffects {
+ "_def": Object {
+ "description": undefined,
+ "effect": Object {
+ "transform": [Function anonymous],
+ "type": "transform",
+ },
+ "errorMap": [Function customMap],
+ "schema": ZodString {
+ "_def": Object {
+ "checks": Array [],
+ "coerce": false,
+ "typeName": "ZodString",
+ },
+ "and": [Function bound and],
+ "array": [Function bound array],
+ "brand": [Function bound brand],
+ "catch": [Function bound catch],
+ "default": [Function bound default],
+ "describe": [Function bound describe],
+ "isNullable": [Function bound isNullable],
+ "isOptional": [Function bound isOptional],
+ "nullable": [Function bound nullable],
+ "nullish": [Function bound nullish],
+ "optional": [Function bound optional],
+ "or": [Function bound or],
+ "parse": [Function bound parse],
+ "parseAsync": [Function bound parseAsync],
+ "pipe": [Function bound pipe],
+ "promise": [Function bound promise],
+ "readonly": [Function bound readonly],
+ "refine": [Function bound refine],
+ "refinement": [Function bound refinement],
+ "safeParse": [Function bound safeParse],
+ "safeParseAsync": [Function bound safeParseAsync],
+ "spa": [Function bound safeParseAsync],
+ "superRefine": [Function bound superRefine],
+ "transform": [Function bound transform],
+ "~standard": Object {
+ "validate": [Function validate],
+ "vendor": "zod",
+ "version": 1,
+ },
+ },
+ "typeName": "ZodEffects",
+ },
+ "and": [Function bound and],
+ "array": [Function bound array],
+ "brand": [Function bound brand],
+ "catch": [Function bound catch],
+ "default": [Function bound default],
+ "describe": [Function bound describe],
+ "isNullable": [Function bound isNullable],
+ "isOptional": [Function bound isOptional],
+ "nullable": [Function bound nullable],
+ "nullish": [Function bound nullish],
+ "optional": [Function bound optional],
+ "or": [Function bound or],
+ "parse": [Function bound parse],
+ "parseAsync": [Function bound parseAsync],
+ "pipe": [Function bound pipe],
+ "promise": [Function bound prom
|
packages/server/src/procedure-client.test.ts > createProcedureClient - case without lazy > accept paths:
packages/server/src/procedure-client.test.ts#L420
AssertionError: expected "spy" to be called with arguments: [ Any<Object>, undefined, …(1) ]
Received:
1st spy call:
Array [
- Any<Object>,
- undefined,
- ObjectContaining {
+ Object {
+ "error": undefined,
+ "input": Object {
+ "val": "123",
+ },
+ "output": Object {
+ "val": 123,
+ },
+ "status": "success",
+ },
+ Object {},
+ Object {
+ "context": Object {},
+ "errors": undefined,
+ "input": Object {
+ "val": "123",
+ },
"path": Array [
"users",
],
+ "procedure": Procedure {
+ "~orpc": Object {
+ "contract": ContractProcedure {
+ "~orpc": Object {
+ "InputSchema": ZodObject {
+ "_cached": Object {
+ "keys": Array [
+ "val",
+ ],
+ "shape": Object {
+ "val": ZodEffects {
+ "_def": Object {
+ "description": undefined,
+ "effect": Object {
+ "transform": [Function anonymous],
+ "type": "transform",
+ },
+ "errorMap": [Function customMap],
+ "schema": ZodString {
+ "_def": Object {
+ "checks": Array [],
+ "coerce": false,
+ "typeName": "ZodString",
+ },
+ "and": [Function bound and],
+ "array": [Function bound array],
+ "brand": [Function bound brand],
+ "catch": [Function bound catch],
+ "default": [Function bound default],
+ "describe": [Function bound describe],
+ "isNullable": [Function bound isNullable],
+ "isOptional": [Function bound isOptional],
+ "nullable": [Function bound nullable],
+ "nullish": [Function bound nullish],
+ "optional": [Function bound optional],
+ "or": [Function bound or],
+ "parse": [Function bound parse],
+ "parseAsync": [Function bound parseAsync],
+ "pipe": [Function bound pipe],
+ "promise": [Function bound promise],
+ "readonly": [Function bound readonly],
+ "refine": [Function bound refine],
+ "refinement": [Function bound refinement],
+ "safeParse": [Function bound safeParse],
+ "safeParseAsync": [Function bound safeParseAsync],
+ "spa": [Function bound safeParseAsync],
+ "superRefine": [Function bound superRefine],
+ "transform": [Function bound transform],
+ "~standard": Object {
+ "validate": [Function validate],
+ "vendor": "zod",
+ "version": 1,
+ },
+ },
+ "typeName": "ZodEffects",
+ },
+ "and": [Function bound and],
+ "array": [Function bound array],
+ "brand": [Function bound brand],
+ "catch": [Function bound catch],
+ "default": [Function bound default],
+ "describe": [Function bound describe],
+ "isNullable": [Function bound isNullable],
+ "isOptional": [Function bound isOptional],
+ "nullable": [Function bound nullable],
+ "nullish": [Function bound nullish],
+ "optional": [Function bound optional],
+ "or": [Function bound or],
+ "parse"
|
packages/server/src/procedure-client.test.ts > createProcedureClient - case with lazy > just a client:
packages/server/src/procedure-client.test.ts#L69
AssertionError: expected "spy" to be called with arguments: [ { input: { val: 123 }, …(4) } ]
Received:
1st spy call:
Array [
Object {
- "context": undefined,
+ "context": Object {},
"errors": "__constructors__",
"input": Object {
"val": 123,
},
"path": Array [],
"procedure": Procedure {
"~orpc": Object {
"contract": ContractProcedure {
"~orpc": Object {
"InputSchema": ZodObject {
"_cached": Object {
"keys": Array [
"val",
],
"shape": Object {
"val": ZodEffects {
"_def": Object {
"description": undefined,
"effect": Object {
"transform": [Function anonymous],
"type": "transform",
},
"errorMap": [Function customMap],
"schema": ZodString {
"_def": Object {
"checks": Array [],
"coerce": false,
"typeName": "ZodString",
},
"and": [Function bound and],
"array": [Function bound array],
"brand": [Function bound brand],
"catch": [Function bound catch],
"default": [Function bound default],
"describe": [Function bound describe],
"isNullable": [Function bound isNullable],
"isOptional": [Function bound isOptional],
"nullable": [Function bound nullable],
"nullish": [Function bound nullish],
"optional": [Function bound optional],
"or": [Function bound or],
"parse": [Function bound parse],
"parseAsync": [Function bound parseAsync],
"pipe": [Function bound pipe],
"promise": [Function bound promise],
"readonly": [Function bound readonly],
"refine": [Function bound refine],
"refinement": [Function bound refinement],
"safeParse": [Function bound safeParse],
"safeParseAsync": [Function bound safeParseAsync],
"spa": [Function bound safeParseAsync],
"superRefine": [Function bound superRefine],
"transform": [Function bound transform],
"~standard": Object {
"validate": [Function validate],
"vendor": "zod",
"version": 1,
},
},
"typeName": "ZodEffects",
},
"and": [Function bound and],
"array": [Function bound array],
"brand": [Function bound brand],
"catch": [Function bound catch],
"default": [Function bound default],
"describe": [Function bound describe],
"isNullable": [Function bound isNullable],
"isOptional": [Function bound isOptional],
"nullable": [Function bound nullable],
"nullish": [Function bound nullish],
"optional": [Function bound optional],
"or": [Function bound or],
"parse": [Function bound parse],
"parseAsync": [Function bound parseAsync],
"pipe": [Function bound pipe],
"promise": [Function bound promise],
"readonly": [Fu
|
packages/server/src/procedure-client.test.ts > createProcedureClient - case with lazy > middleware can add extra context:
packages/server/src/procedure-client.test.ts#L211
AssertionError: expected "spy" to be called with arguments: [ ObjectContaining{…}, …(2) ]
Received:
1st spy call:
Array [
- ObjectContaining {
- "context": undefined,
+ Object {
+ "context": Object {},
+ "errors": undefined,
+ "input": Object {
+ "val": "123",
+ },
+ "next": [Function next],
+ "path": Array [],
+ "procedure": Procedure {
+ "~orpc": Object {
+ "contract": ContractProcedure {
+ "~orpc": Object {
+ "InputSchema": ZodObject {
+ "_cached": Object {
+ "keys": Array [
+ "val",
+ ],
+ "shape": Object {
+ "val": ZodEffects {
+ "_def": Object {
+ "description": undefined,
+ "effect": Object {
+ "transform": [Function anonymous],
+ "type": "transform",
+ },
+ "errorMap": [Function customMap],
+ "schema": ZodString {
+ "_def": Object {
+ "checks": Array [],
+ "coerce": false,
+ "typeName": "ZodString",
+ },
+ "and": [Function bound and],
+ "array": [Function bound array],
+ "brand": [Function bound brand],
+ "catch": [Function bound catch],
+ "default": [Function bound default],
+ "describe": [Function bound describe],
+ "isNullable": [Function bound isNullable],
+ "isOptional": [Function bound isOptional],
+ "nullable": [Function bound nullable],
+ "nullish": [Function bound nullish],
+ "optional": [Function bound optional],
+ "or": [Function bound or],
+ "parse": [Function bound parse],
+ "parseAsync": [Function bound parseAsync],
+ "pipe": [Function bound pipe],
+ "promise": [Function bound promise],
+ "readonly": [Function bound readonly],
+ "refine": [Function bound refine],
+ "refinement": [Function bound refinement],
+ "safeParse": [Function bound safeParse],
+ "safeParseAsync": [Function bound safeParseAsync],
+ "spa": [Function bound safeParseAsync],
+ "superRefine": [Function bound superRefine],
+ "transform": [Function bound transform],
+ "~standard": Object {
+ "validate": [Function validate],
+ "vendor": "zod",
+ "version": 1,
+ },
+ },
+ "typeName": "ZodEffects",
+ },
+ "and": [Function bound and],
+ "array": [Function bound array],
+ "brand": [Function bound brand],
+ "catch": [Function bound catch],
+ "default": [Function bound default],
+ "describe": [Function bound describe],
+ "isNullable": [Function bound isNullable],
+ "isOptional": [Function bound isOptional],
+ "nullable": [Function bound nullable],
+ "nullish": [Function bound nullish],
+ "optional": [Function bound optional],
+ "or": [Function bound or],
+ "parse": [Function bound parse],
+ "parseAsync": [Function bound parseAsync],
+ "pipe": [Function bound pipe],
+ "promise": [Function bound prom
|
packages/server/src/procedure-client.test.ts > createProcedureClient - case with lazy > accept paths:
packages/server/src/procedure-client.test.ts#L420
AssertionError: expected "spy" to be called with arguments: [ Any<Object>, undefined, …(1) ]
Received:
1st spy call:
Array [
- Any<Object>,
- undefined,
- ObjectContaining {
+ Object {
+ "error": undefined,
+ "input": Object {
+ "val": "123",
+ },
+ "output": Object {
+ "val": 123,
+ },
+ "status": "success",
+ },
+ Object {},
+ Object {
+ "context": Object {},
+ "errors": undefined,
+ "input": Object {
+ "val": "123",
+ },
"path": Array [
"users",
],
+ "procedure": Procedure {
+ "~orpc": Object {
+ "contract": ContractProcedure {
+ "~orpc": Object {
+ "InputSchema": ZodObject {
+ "_cached": Object {
+ "keys": Array [
+ "val",
+ ],
+ "shape": Object {
+ "val": ZodEffects {
+ "_def": Object {
+ "description": undefined,
+ "effect": Object {
+ "transform": [Function anonymous],
+ "type": "transform",
+ },
+ "errorMap": [Function customMap],
+ "schema": ZodString {
+ "_def": Object {
+ "checks": Array [],
+ "coerce": false,
+ "typeName": "ZodString",
+ },
+ "and": [Function bound and],
+ "array": [Function bound array],
+ "brand": [Function bound brand],
+ "catch": [Function bound catch],
+ "default": [Function bound default],
+ "describe": [Function bound describe],
+ "isNullable": [Function bound isNullable],
+ "isOptional": [Function bound isOptional],
+ "nullable": [Function bound nullable],
+ "nullish": [Function bound nullish],
+ "optional": [Function bound optional],
+ "or": [Function bound or],
+ "parse": [Function bound parse],
+ "parseAsync": [Function bound parseAsync],
+ "pipe": [Function bound pipe],
+ "promise": [Function bound promise],
+ "readonly": [Function bound readonly],
+ "refine": [Function bound refine],
+ "refinement": [Function bound refinement],
+ "safeParse": [Function bound safeParse],
+ "safeParseAsync": [Function bound safeParseAsync],
+ "spa": [Function bound safeParseAsync],
+ "superRefine": [Function bound superRefine],
+ "transform": [Function bound transform],
+ "~standard": Object {
+ "validate": [Function validate],
+ "vendor": "zod",
+ "version": 1,
+ },
+ },
+ "typeName": "ZodEffects",
+ },
+ "and": [Function bound and],
+ "array": [Function bound array],
+ "brand": [Function bound brand],
+ "catch": [Function bound catch],
+ "default": [Function bound default],
+ "describe": [Function bound describe],
+ "isNullable": [Function bound isNullable],
+ "isOptional": [Function bound isOptional],
+ "nullable": [Function bound nullable],
+ "nullish": [Function bound nullish],
+ "optional": [Function bound optional],
+ "or": [Function bound or],
+ "parse"
|
packages/server/src/procedure-client.test.ts > still work without InputSchema:
packages/server/src/procedure-client.test.ts#L519
AssertionError: expected "spy" to be called with arguments: [ { input: 'anything', …(3) } ]
Received:
1st spy call:
Array [
Object {
- "context": undefined,
+ "context": Object {},
+ "errors": undefined,
"input": "anything",
"path": Array [],
"procedure": Procedure {
"~orpc": Object {
"contract": ContractProcedure {
"~orpc": Object {
"InputSchema": undefined,
"OutputSchema": ZodObject {
"_cached": Object {
"keys": Array [
"val",
],
"shape": Object {
"val": ZodEffects {
"_def": Object {
"description": undefined,
"effect": Object {
"transform": [Function anonymous],
"type": "transform",
},
"errorMap": [Function customMap],
"schema": ZodString {
"_def": Object {
"checks": Array [],
"coerce": false,
"typeName": "ZodString",
},
"and": [Function bound and],
"array": [Function bound array],
"brand": [Function bound brand],
"catch": [Function bound catch],
"default": [Function bound default],
"describe": [Function bound describe],
"isNullable": [Function bound isNullable],
"isOptional": [Function bound isOptional],
"nullable": [Function bound nullable],
"nullish": [Function bound nullish],
"optional": [Function bound optional],
"or": [Function bound or],
"parse": [Function bound parse],
"parseAsync": [Function bound parseAsync],
"pipe": [Function bound pipe],
"promise": [Function bound promise],
"readonly": [Function bound readonly],
"refine": [Function bound refine],
"refinement": [Function bound refinement],
"safeParse": [Function bound safeParse],
"safeParseAsync": [Function bound safeParseAsync],
"spa": [Function bound safeParseAsync],
"superRefine": [Function bound superRefine],
"transform": [Function bound transform],
"~standard": Object {
"validate": [Function validate],
"vendor": "zod",
"version": 1,
},
},
"typeName": "ZodEffects",
},
"and": [Function bound and],
"array": [Function bound array],
"brand": [Function bound brand],
"catch": [Function bound catch],
"default": [Function bound default],
"describe": [Function bound describe],
"isNullable": [Function bound isNullable],
"isOptional": [Function bound isOptional],
"nullable": [Function bound nullable],
"nullish": [Function bound nullish],
"optional": [Function bound optional],
"or": [Function bound or],
"parse": [Function bound parse],
"parseAsync": [Function bound parseAsync],
"pipe": [Function bound pipe],
"promise": [Function bound promise],
"readonly":
|
packages/server/src/procedure-client.test.ts > still work without OutputSchema:
packages/server/src/procedure-client.test.ts#L543
AssertionError: expected "spy" to be called with arguments: [ { input: { val: 123 }, …(3) } ]
Received:
1st spy call:
Array [
Object {
- "context": undefined,
+ "context": Object {},
+ "errors": undefined,
"input": Object {
"val": 123,
},
"path": Array [],
"procedure": Procedure {
"~orpc": Object {
"contract": ContractProcedure {
"~orpc": Object {
"InputSchema": ZodObject {
"_cached": Object {
"keys": Array [
"val",
],
"shape": Object {
"val": ZodEffects {
"_def": Object {
"description": undefined,
"effect": Object {
"transform": [Function anonymous],
"type": "transform",
},
"errorMap": [Function customMap],
"schema": ZodString {
"_def": Object {
"checks": Array [],
"coerce": false,
"typeName": "ZodString",
},
"and": [Function bound and],
"array": [Function bound array],
"brand": [Function bound brand],
"catch": [Function bound catch],
"default": [Function bound default],
"describe": [Function bound describe],
"isNullable": [Function bound isNullable],
"isOptional": [Function bound isOptional],
"nullable": [Function bound nullable],
"nullish": [Function bound nullish],
"optional": [Function bound optional],
"or": [Function bound or],
"parse": [Function bound parse],
"parseAsync": [Function bound parseAsync],
"pipe": [Function bound pipe],
"promise": [Function bound promise],
"readonly": [Function bound readonly],
"refine": [Function bound refine],
"refinement": [Function bound refinement],
"safeParse": [Function bound safeParse],
"safeParseAsync": [Function bound safeParseAsync],
"spa": [Function bound safeParseAsync],
"superRefine": [Function bound superRefine],
"transform": [Function bound transform],
"~standard": Object {
"validate": [Function validate],
"vendor": "zod",
"version": 1,
},
},
"typeName": "ZodEffects",
},
"and": [Function bound and],
"array": [Function bound array],
"brand": [Function bound brand],
"catch": [Function bound catch],
"default": [Function bound default],
"describe": [Function bound describe],
"isNullable": [Function bound isNullable],
"isOptional": [Function bound isOptional],
"nullable": [Function bound nullable],
"nullish": [Function bound nullish],
"optional": [Function bound optional],
"or": [Function bound or],
"parse": [Function bound parse],
"parseAsync": [Function bound parseAsync],
"pipe": [Function bound pipe],
"promise": [Function bound promise],
"readonly": [Function bo
|
test
Process completed with exit code 1.
|
test
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
publish-commit
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
lint
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|