Skip to content

Commit c69a48d

Browse files
authored
refactor: no layers and co-locate doc builder (#1251)
1 parent 9e35b51 commit c69a48d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+161
-163
lines changed

src/ClientPreset/ClientPreset.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
import type { CamelCase } from 'type-fest'
2+
import type { UseExtensionDo } from '../client/builderExtensions/use.js'
3+
import { type Client, createWithContext } from '../client/client.js'
4+
import { type Context, createContext, type TypeHooksEmpty } from '../client/context.js'
5+
import type { InputBase } from '../client/Settings/Input.js'
6+
import type { NormalizeInput } from '../client/Settings/InputToConfig.js'
27
import type {
38
Extension,
49
ExtensionConstructor,
@@ -7,11 +12,6 @@ import type {
712
ExtensionInputParametersRequired,
813
InferExtensionFromConstructor,
914
} from '../extension/extension.js'
10-
import type { UseExtensionDo } from '../layers/6_client/builderExtensions/use.js'
11-
import { type Client, createWithContext } from '../layers/6_client/client.js'
12-
import { type Context, createContext, type TypeHooksEmpty } from '../layers/6_client/context.js'
13-
import type { InputBase } from '../layers/6_client/Settings/Input.js'
14-
import type { NormalizeInput } from '../layers/6_client/Settings/InputToConfig.js'
1515
import type { Builder } from '../lib/builder/__.js'
1616
import type { ConfigManager } from '../lib/config-manager/__.js'
1717
import { type mergeArrayOfObjects, type ToParametersExact } from '../lib/prelude.js'

src/ClientPreset/__.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { IntrospectionQuery } from 'graphql'
2+
import { create } from '../client/client.js'
23
import { Introspection } from '../extensions/Introspection/Introspection.js'
3-
import { create } from '../layers/6_client/client.js'
44
import { assertEqual, assertExtends } from '../lib/assert-equal.js'
55
import { ClientPreset } from './__.js'
66

src/layers/6_client/Settings/Config.ts renamed to src/client/Settings/Config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { GraphQLSchema } from 'graphql'
2-
import type { RequireProperties } from '../../../lib/prelude.js'
3-
import type { TransportHttp, TransportMemory } from '../../../requestPipeline/Transport.js'
2+
import type { RequireProperties } from '../../lib/prelude.js'
3+
import type { TransportHttp, TransportMemory } from '../../requestPipeline/Transport.js'
44
import type { TransportHttpInput } from '../transportHttp/request.js'
55

66
export type OutputChannel = 'throw' | 'return'

src/layers/6_client/Settings/Input.ts renamed to src/client/Settings/Input.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { GraphQLSchema } from 'graphql'
2-
import type { GlobalRegistry } from '../../../types/GlobalRegistry/GlobalRegistry.js'
3-
import type { SchemaDrivenDataMap } from '../../../types/SchemaDrivenDataMap/__.js'
2+
import type { GlobalRegistry } from '../../types/GlobalRegistry/GlobalRegistry.js'
3+
import type { SchemaDrivenDataMap } from '../../types/SchemaDrivenDataMap/__.js'
44
import type { WithInput } from './inputIncrementable/inputIncrementable.js'
55

66
export type URLInput = URL | string

src/layers/6_client/Settings/InputToConfig.ts renamed to src/client/Settings/InputToConfig.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { IsUnknown } from 'type-fest'
2-
import type { ConfigManager } from '../../../lib/config-manager/__.js'
3-
import { Transport } from '../../../requestPipeline/Transport.js'
4-
import type { GlobalRegistry } from '../../../types/GlobalRegistry/GlobalRegistry.js'
2+
import type { ConfigManager } from '../../lib/config-manager/__.js'
3+
import { Transport } from '../../requestPipeline/Transport.js'
4+
import type { GlobalRegistry } from '../../types/GlobalRegistry/GlobalRegistry.js'
55
import { defaultMethodMode } from '../transportHttp/request.js'
66
import { outputConfigDefault, type TransportConfigHttp, type TransportConfigMemory } from './Config.js'
77
import type { InputOutputEnvelopeLonghand, InputStatic, URLInput } from './Input.js'

src/layers/6_client/Settings/client.create.config.output.test-d.ts renamed to src/client/Settings/client.create.config.output.test-d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
import { type ExecutionResult } from 'graphql'
33
import { describe } from 'node:test'
44
import { expectTypeOf, test } from 'vitest'
5-
import { Graffle } from '../../../../tests/_/schemas/kitchen-sink/graffle/__.js'
6-
import { schema } from '../../../../tests/_/schemas/kitchen-sink/schema.js'
7-
import { assertEqual } from '../../../lib/assert-equal.js'
8-
import { type GraphQLExecutionResultError } from '../../../lib/grafaid/graphql.js'
5+
import { Graffle } from '../../../tests/_/schemas/kitchen-sink/graffle/__.js'
6+
import { schema } from '../../../tests/_/schemas/kitchen-sink/schema.js'
7+
import { assertEqual } from '../../lib/assert-equal.js'
8+
import { type GraphQLExecutionResultError } from '../../lib/grafaid/graphql.js'
99
import type { ErrorsOther } from '../handleOutput.js'
1010

1111
const G = Graffle.create

src/layers/6_client/Settings/client.input.test-d.ts renamed to src/client/Settings/client.input.test-d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { test } from 'vitest'
2-
import { Graffle } from '../../../../tests/_/schemas/kitchen-sink/graffle/__.js'
3-
import { schema } from '../../../../tests/_/schemas/kitchen-sink/schema.js'
4-
import { QueryOnly } from '../../../../tests/_/schemas/query-only/graffle/__.js'
2+
import { Graffle } from '../../../tests/_/schemas/kitchen-sink/graffle/__.js'
3+
import { schema } from '../../../tests/_/schemas/kitchen-sink/schema.js'
4+
import { QueryOnly } from '../../../tests/_/schemas/query-only/graffle/__.js'
55

66
test(`works`, () => {
77
Graffle.create({ schema, output: { errors: { execution: `throw` } } })

src/layers/6_client/Settings/inputIncrementable/inputIncrementable.ts renamed to src/client/Settings/inputIncrementable/inputIncrementable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Transport, TransportMemory } from '../../../../requestPipeline/Transport.js'
1+
import type { Transport, TransportMemory } from '../../../requestPipeline/Transport.js'
22
import type { TransportHttpInput } from '../../transportHttp/request.js'
33
import type { OutputInput } from './output.js'
44

src/layers/6_client/builderExtensions/anyware.ts renamed to src/client/builderExtensions/anyware.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { createExtension } from '../../../extension/extension.js'
2-
import type { Anyware, Anyware as AnywareLib } from '../../../lib/anyware/__.js'
3-
import { Builder } from '../../../lib/builder/__.js'
4-
import type { RequestPipeline } from '../../../requestPipeline/__.js'
1+
import { createExtension } from '../../extension/extension.js'
2+
import type { Anyware, Anyware as AnywareLib } from '../../lib/anyware/__.js'
3+
import { Builder } from '../../lib/builder/__.js'
4+
import type { RequestPipeline } from '../../requestPipeline/__.js'
55
import { type Context } from '../context.js'
66

77
export interface BuilderExtensionAnyware extends Builder.Extension {

0 commit comments

Comments
 (0)