Skip to content

Commit c992228

Browse files
committed
refactor: Drop tsconfig paths in favor of relative imports
Match how seamapi/docs consumes @seamapi/smith: extend the base tsconfig with no compiler option overrides and use plain relative imports in codegen. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019iX1vWXfXKzUyRJTVm8D7s
1 parent fa32663 commit c992228

4 files changed

Lines changed: 7 additions & 15 deletions

File tree

codegen/lib/layouts/models.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44

55
import { pascalCase } from 'change-case'
66

7-
import type { ClassModel } from 'lib/class-model.js'
8-
import { convertCustomResourceName } from 'lib/custom-resource-name-conversions.js'
9-
import { mapPythonType } from 'lib/map-python-type.js'
10-
import { flattenObjSchema } from 'lib/openapi/flatten-obj-schema.js'
11-
import type { ObjSchema, OpenapiSchema } from 'lib/openapi/types.js'
12-
7+
import type { ClassModel } from '../class-model.js'
8+
import { convertCustomResourceName } from '../custom-resource-name-conversions.js'
9+
import { mapPythonType } from '../map-python-type.js'
10+
import { flattenObjSchema } from '../openapi/flatten-obj-schema.js'
11+
import type { ObjSchema, OpenapiSchema } from '../openapi/types.js'
1312
import { getMethodLayoutContext } from './route.js'
1413

1514
export interface ModelsLayoutContext {

codegen/lib/layouts/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
type ClassMethod,
66
type ClassModel,
77
sortClassMethodParameters,
8-
} from 'lib/class-model.js'
8+
} from '../class-model.js'
99

1010
export interface MethodLayoutContext {
1111
name: string

codegen/lib/openapi/map-parent-to-children-resource.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
// relationships once generated output is allowed to change, wiring deeply
1010
// nested namespaces to a property on their parent class at the same time.
1111

12-
import { ignoredEndpointPaths } from 'lib/endpoint-rules.js'
13-
12+
import { ignoredEndpointPaths } from '../endpoint-rules.js'
1413
import type { Route } from './types.js'
1514

1615
export const mapParentToChildResources = (

tsconfig.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
{
22
"$schema": "https://json.schemastore.org/tsconfig",
33
"extends": "./node_modules/@seamapi/smith/tsconfig.base.json",
4-
"compilerOptions": {
5-
"baseUrl": "./",
6-
"paths": {
7-
"lib/*": ["./codegen/lib/*"]
8-
}
9-
},
104
"files": ["codegen/index.ts"],
115
"include": ["codegen/**/*", "eslint.config.ts"]
126
}

0 commit comments

Comments
 (0)