ts-procedures 8.1.0 → 8.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +14 -0
  2. package/build/client/call.test.js +1 -1
  3. package/build/client/call.test.js.map +1 -1
  4. package/build/client/errors.js +0 -1
  5. package/build/client/errors.js.map +1 -1
  6. package/build/client/hooks.test.js +1 -1
  7. package/build/client/hooks.test.js.map +1 -1
  8. package/build/client/index.js +1 -1
  9. package/build/client/index.js.map +1 -1
  10. package/build/client/typed-error-dispatch.test.js +6 -3
  11. package/build/client/typed-error-dispatch.test.js.map +1 -1
  12. package/build/codegen/bundle-size.test.js +0 -1
  13. package/build/codegen/bundle-size.test.js.map +1 -1
  14. package/build/codegen/emit-client-types.test.js +1 -0
  15. package/build/codegen/emit-client-types.test.js.map +1 -1
  16. package/build/codegen/emit-scope.js +1 -1
  17. package/build/codegen/emit-scope.js.map +1 -1
  18. package/build/codegen/test-helpers/golden.js +0 -1
  19. package/build/codegen/test-helpers/golden.js.map +1 -1
  20. package/build/create-http-stream.d.ts +2 -2
  21. package/build/create-http.d.ts +3 -3
  22. package/build/create-http.js.map +1 -1
  23. package/build/create-http.test.js +1 -1
  24. package/build/create-http.test.js.map +1 -1
  25. package/build/create-stream.d.ts +2 -2
  26. package/build/create-stream.test.js +1 -2
  27. package/build/create-stream.test.js.map +1 -1
  28. package/build/create.d.ts +2 -2
  29. package/build/create.test.js +1 -2
  30. package/build/create.test.js.map +1 -1
  31. package/build/errors.d.ts +2 -2
  32. package/build/errors.js.map +1 -1
  33. package/build/implementations/http/hono/index.d.ts +2 -1
  34. package/build/implementations/http/hono/index.js.map +1 -1
  35. package/build/implementations/types.d.ts +1 -1
  36. package/build/index.d.ts +9 -9
  37. package/build/index.js +1 -0
  38. package/build/index.js.map +1 -1
  39. package/build/index.test.js +0 -1
  40. package/build/index.test.js.map +1 -1
  41. package/build/schema/compute-schema.d.ts +3 -3
  42. package/build/schema/compute-schema.js.map +1 -1
  43. package/build/schema/extract-json-schema.d.ts +1 -1
  44. package/build/schema/parser.d.ts +1 -1
  45. package/build/schema/resolve-schema-lib.d.ts +2 -2
  46. package/build/schema/types.d.ts +2 -2
  47. package/build/stack-utils.test.js.map +1 -1
  48. package/build/types.d.ts +2 -2
  49. package/docs/decisions/2026-06-02-monorepo-split-evaluation.md +80 -0
  50. package/docs/npm-workspaces-migration-plan.md +611 -0
  51. package/package.json +2 -1
  52. package/src/client/errors.ts +1 -1
  53. package/src/client/typed-error-dispatch.test.ts +1 -2
  54. package/src/codegen/bundle-size.test.ts +1 -1
  55. package/src/codegen/test-helpers/golden.ts +1 -1
  56. package/src/create-http-stream.ts +2 -2
  57. package/src/create-http.ts +2 -3
  58. package/src/create-stream.test.ts +1 -1
  59. package/src/create-stream.ts +2 -2
  60. package/src/create.test.ts +1 -1
  61. package/src/create.ts +2 -2
  62. package/src/errors.test.ts +1 -1
  63. package/src/errors.ts +3 -2
  64. package/src/implementations/http/hono/index.ts +2 -1
  65. package/src/implementations/http/on-request-error.test.ts +1 -1
  66. package/src/implementations/http/route-errors.test.ts +1 -1
  67. package/src/implementations/types.ts +1 -1
  68. package/src/index.test.ts +1 -1
  69. package/src/index.ts +2 -2
  70. package/src/schema/compute-schema.ts +4 -3
  71. package/src/schema/extract-json-schema.ts +1 -1
  72. package/src/schema/parser.ts +1 -1
  73. package/src/schema/resolve-schema-lib.ts +2 -2
  74. package/src/schema/types.ts +2 -2
  75. package/src/stack-utils.test.ts +2 -1
  76. package/src/types.ts +2 -2
@@ -1,8 +1,8 @@
1
1
  import { ProcedureError, ProcedureRegistrationError, ProcedureValidationError, ProcedureYieldValidationError } from './errors.js'
2
2
  import { computeSchema } from './schema/compute-schema.js'
3
- import { Prettify, TSchemaLib } from './schema/types.js'
3
+ import type { Prettify, TSchemaLib } from './schema/types.js'
4
4
  import { captureDefinitionInfo } from './stack-utils.js'
5
- import {
5
+ import type {
6
6
  HttpMethod, TBuilderConfig, TStreamContext,
7
7
  THttpStreamProcedureRegistration, TProcedureRegistration, TStreamProcedureRegistration, THttpProcedureRegistration,
8
8
  } from './types.js'
@@ -1,9 +1,8 @@
1
1
  import { ProcedureError, ProcedureRegistrationError, ProcedureValidationError } from './errors.js'
2
2
  import { computeSchema } from './schema/compute-schema.js'
3
- import { Prettify, TSchemaLib } from './schema/types.js'
3
+ import type { Prettify, TSchemaLib } from './schema/types.js'
4
4
  import { captureDefinitionInfo } from './stack-utils.js'
5
- import {
6
- HttpMethod,
5
+ import type {
7
6
  TBuilderConfig,
8
7
  TCreateHttpConfig,
9
8
  TLocalContext,
@@ -1,4 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
1
+
2
2
  import { describe, expect, it, test } from 'vitest'
3
3
  import { Procedures } from './index.js'
4
4
  import { v } from 'suretype'
@@ -1,8 +1,8 @@
1
1
  import { ProcedureError, ProcedureRegistrationError, ProcedureValidationError, ProcedureYieldValidationError } from './errors.js'
2
2
  import { computeSchema } from './schema/compute-schema.js'
3
- import { Prettify, TSchemaLib } from './schema/types.js'
3
+ import type { Prettify, TSchemaLib } from './schema/types.js'
4
4
  import { captureDefinitionInfo } from './stack-utils.js'
5
- import {
5
+ import type {
6
6
  TBuilderConfig,
7
7
  THttpProcedureRegistration,
8
8
  THttpStreamProcedureRegistration,
@@ -1,4 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
1
+
2
2
  import { describe, expect, it, test } from 'vitest'
3
3
  import { Procedures } from './index.js'
4
4
  import { v } from 'suretype'
package/src/create.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { ProcedureError, ProcedureRegistrationError, ProcedureValidationError } from './errors.js'
2
2
  import { computeSchema } from './schema/compute-schema.js'
3
- import { Prettify, TSchemaLib } from './schema/types.js'
3
+ import type { Prettify, TSchemaLib } from './schema/types.js'
4
4
  import { captureDefinitionInfo } from './stack-utils.js'
5
- import {
5
+ import type {
6
6
  TBuilderConfig,
7
7
  THttpProcedureRegistration,
8
8
  THttpStreamProcedureRegistration,
@@ -4,7 +4,7 @@ import {
4
4
  ProcedureValidationError,
5
5
  ProcedureRegistrationError,
6
6
  } from './errors.js'
7
- import { DefinitionInfo } from './stack-utils.js'
7
+ import type { DefinitionInfo } from './stack-utils.js'
8
8
 
9
9
  describe('Error Classes', () => {
10
10
  test('ProcedureError has correct properties', () => {
package/src/errors.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { TSchemaValidationError } from './schema/parser.js'
2
- import { DefinitionInfo, DefinitionLocation, formatDefinitionInfo } from './stack-utils.js'
1
+ import type { TSchemaValidationError } from './schema/parser.js'
2
+ import type { DefinitionInfo, DefinitionLocation} from './stack-utils.js';
3
+ import { formatDefinitionInfo } from './stack-utils.js'
3
4
  import { kebabCase } from 'es-toolkit/string'
4
5
 
5
6
  export class ProcedureError extends Error {
@@ -1,4 +1,5 @@
1
- import { Context, Hono } from 'hono'
1
+ import type { Context} from 'hono';
2
+ import { Hono } from 'hono'
2
3
  import type {
3
4
  AnyHttpRouteDoc,
4
5
  ProceduresFactory,
@@ -14,7 +14,7 @@
14
14
  import { describe, expect, test, vi } from 'vitest'
15
15
  import { Type } from 'typebox'
16
16
  import { Procedures } from '../../index.js'
17
- import { RPCConfig } from '../types.js'
17
+ import type { RPCConfig } from '../types.js'
18
18
  import { HonoAppBuilder } from './hono/index.js'
19
19
 
20
20
  describe('onRequestError — HonoAppBuilder (rpc kind)', () => {
@@ -2,7 +2,7 @@
2
2
  import { describe, expect, test } from 'vitest'
3
3
  import { Type } from 'typebox'
4
4
  import { Procedures } from '../../index.js'
5
- import { APIConfig, RPCConfig } from '../types.js'
5
+ import type { APIConfig, RPCConfig } from '../types.js'
6
6
  import { HonoAppBuilder } from './hono/index.js'
7
7
  import { DocRegistry } from './doc-registry.js'
8
8
  import { defineErrorTaxonomy } from './error-taxonomy.js'
@@ -1,4 +1,4 @@
1
- import { Procedures } from '../index.js'
1
+ import type { Procedures } from '../index.js'
2
2
  import type { ErrorTaxonomy } from './http/error-taxonomy.js'
3
3
 
4
4
  /**
package/src/index.test.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
1
+
2
2
  import { describe, expect, it, test } from 'vitest'
3
3
  import { Procedures } from './index.js'
4
4
  import { v } from 'suretype'
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Prettify, TJSONSchema } from './schema/types.js'
1
+ import type { Prettify } from './schema/types.js'
2
2
  import { makeCreate } from './create.js'
3
3
  import { makeCreateStream } from './create-stream.js'
4
4
  import { makeCreateHttp } from './create-http.js'
@@ -16,7 +16,7 @@ export {
16
16
  type TBuilderConfig,
17
17
  } from './types.js'
18
18
 
19
- import {
19
+ import type {
20
20
  TNoContextProvided,
21
21
  TBuilderConfig,
22
22
  TProcedureRegistration,
@@ -1,7 +1,8 @@
1
- import { schemaParser, TSchemaValidationError } from './parser.js'
1
+ import type { TSchemaValidationError } from './parser.js';
2
+ import { schemaParser } from './parser.js'
2
3
  import { ProcedureRegistrationError } from '../errors.js'
3
- import { TJSONSchema } from './types.js'
4
- import { DefinitionInfo } from '../stack-utils.js'
4
+ import type { TJSONSchema } from './types.js'
5
+ import type { DefinitionInfo } from '../stack-utils.js'
5
6
 
6
7
  /**
7
8
  * This function is used to compute the JSON schema and validation functions
@@ -1,6 +1,6 @@
1
1
  import { extractSingleJsonSchema } from 'suretype'
2
2
  import { isSuretypeSchema, isTypeboxSchema } from './resolve-schema-lib.js'
3
- import { TJSONSchema } from './types.js'
3
+ import type { TJSONSchema } from './types.js'
4
4
 
5
5
  export function extractJsonSchema(libSchema: unknown): TJSONSchema | undefined {
6
6
  if (isTypeboxSchema(libSchema)) {
@@ -1,7 +1,7 @@
1
1
  import { default as addFormats } from 'ajv-formats'
2
2
  import * as AJV from 'ajv'
3
3
  import { extractJsonSchema } from './extract-json-schema.js'
4
- import { TJSONSchema } from './types.js'
4
+ import type { TJSONSchema } from './types.js'
5
5
 
6
6
  export type TSchemaParsed = {
7
7
  jsonSchema: {
@@ -1,5 +1,5 @@
1
- import { CoreValidator } from 'suretype'
2
- import { Type } from 'typebox'
1
+ import type { CoreValidator } from 'suretype'
2
+ import type { Type } from 'typebox'
3
3
 
4
4
  export type IsTypeboxSchema<TSchema> = TSchema extends {
5
5
  static: unknown
@@ -1,5 +1,5 @@
1
- import { CoreValidator, TypeOf } from 'suretype'
2
- import { Static, TSchema } from 'typebox'
1
+ import type { CoreValidator, TypeOf } from 'suretype'
2
+ import type { Static, TSchema } from 'typebox'
3
3
 
4
4
  // Determine if the generic "SchemaLibType" is Suretype's CoreValidator or Typebox's TSchema
5
5
  export type TSchemaLib<SchemaLibType> =
@@ -1,5 +1,6 @@
1
1
  import { describe, expect, test } from 'vitest'
2
- import { captureDefinitionInfo, formatDefinitionInfo, DefinitionInfo } from './stack-utils.js'
2
+ import type { DefinitionInfo } from './stack-utils.js';
3
+ import { captureDefinitionInfo, formatDefinitionInfo } from './stack-utils.js'
3
4
 
4
5
  describe('Stack Utils', () => {
5
6
  describe('captureDefinitionInfo', () => {
package/src/types.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ProcedureError } from './errors.js'
2
- import { TJSONSchema } from './schema/types.js'
1
+ import type { ProcedureError } from './errors.js'
2
+ import type { TJSONSchema } from './schema/types.js'
3
3
 
4
4
  export type TNoContextProvided = unknown
5
5