adorn-api 1.0.22 → 1.0.24
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.
- package/.eslintignore +3 -0
- package/.eslintrc.cjs +30 -0
- package/README.md +375 -531
- package/dist/core/express-adapter.d.ts +27 -0
- package/dist/core/express-adapter.d.ts.map +1 -0
- package/dist/core/express-adapter.js +146 -0
- package/dist/core/express-adapter.js.map +1 -0
- package/dist/core/http-error.d.ts +7 -0
- package/dist/core/http-error.d.ts.map +1 -0
- package/dist/core/http-error.js +14 -0
- package/dist/core/http-error.js.map +1 -0
- package/dist/decorators/controller.decorator.d.ts +2 -0
- package/dist/decorators/controller.decorator.d.ts.map +1 -0
- package/dist/decorators/controller.decorator.js +26 -0
- package/dist/decorators/controller.decorator.js.map +1 -0
- package/dist/decorators/create.decorator.d.ts +8 -0
- package/dist/decorators/create.decorator.d.ts.map +1 -0
- package/dist/decorators/create.decorator.js +67 -0
- package/dist/decorators/create.decorator.js.map +1 -0
- package/dist/decorators/http-method.decorator.d.ts +16 -0
- package/dist/decorators/http-method.decorator.d.ts.map +1 -0
- package/dist/decorators/http-method.decorator.js +117 -0
- package/dist/decorators/http-method.decorator.js.map +1 -0
- package/dist/decorators/http-params.d.ts +17 -0
- package/dist/decorators/http-params.d.ts.map +1 -0
- package/dist/decorators/http-params.js +26 -0
- package/dist/decorators/http-params.js.map +1 -0
- package/dist/decorators/index.d.ts +10 -5
- package/dist/decorators/index.d.ts.map +1 -1
- package/dist/decorators/index.js +14 -0
- package/dist/decorators/index.js.map +1 -0
- package/dist/decorators/list.decorator.d.ts +18 -0
- package/dist/decorators/list.decorator.d.ts.map +1 -0
- package/dist/decorators/list.decorator.js +99 -0
- package/dist/decorators/list.decorator.js.map +1 -0
- package/dist/decorators/middleware.decorator.d.ts +4 -0
- package/dist/decorators/middleware.decorator.d.ts.map +1 -0
- package/dist/decorators/middleware.decorator.js +34 -0
- package/dist/decorators/middleware.decorator.js.map +1 -0
- package/dist/decorators/response.decorator.d.ts +8 -0
- package/dist/decorators/response.decorator.d.ts.map +1 -0
- package/dist/decorators/response.decorator.js +44 -0
- package/dist/decorators/response.decorator.js.map +1 -0
- package/dist/decorators/route-options.d.ts +14 -0
- package/dist/decorators/route-options.d.ts.map +1 -0
- package/dist/decorators/route-options.js +22 -0
- package/dist/decorators/route-options.js.map +1 -0
- package/dist/decorators/schema.decorator.d.ts +82 -0
- package/dist/decorators/schema.decorator.d.ts.map +1 -0
- package/dist/decorators/schema.decorator.js +123 -0
- package/dist/decorators/schema.decorator.js.map +1 -0
- package/dist/decorators/update.decorator.d.ts +8 -0
- package/dist/decorators/update.decorator.d.ts.map +1 -0
- package/dist/decorators/update.decorator.js +63 -0
- package/dist/decorators/update.decorator.js.map +1 -0
- package/dist/index.d.ts +11 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -637
- package/dist/index.js.map +1 -1
- package/dist/metadata/metadata-storage.d.ts +38 -0
- package/dist/metadata/metadata-storage.d.ts.map +1 -0
- package/dist/metadata/metadata-storage.js +102 -0
- package/dist/metadata/metadata-storage.js.map +1 -0
- package/dist/metal-orm-integration/dto-helper.d.ts +5 -0
- package/dist/metal-orm-integration/dto-helper.d.ts.map +1 -0
- package/dist/metal-orm-integration/dto-helper.js +48 -0
- package/dist/metal-orm-integration/dto-helper.js.map +1 -0
- package/dist/metal-orm-integration/dto-response.decorator.d.ts +4 -0
- package/dist/metal-orm-integration/dto-response.decorator.d.ts.map +1 -0
- package/dist/metal-orm-integration/dto-response.decorator.js +69 -0
- package/dist/metal-orm-integration/dto-response.decorator.js.map +1 -0
- package/dist/metal-orm-integration/entity-schema-builder.d.ts +20 -0
- package/dist/metal-orm-integration/entity-schema-builder.d.ts.map +1 -0
- package/dist/metal-orm-integration/entity-schema-builder.js +356 -0
- package/dist/metal-orm-integration/entity-schema-builder.js.map +1 -0
- package/dist/metal-orm-integration/index.d.ts +5 -0
- package/dist/metal-orm-integration/index.d.ts.map +1 -0
- package/dist/metal-orm-integration/index.js +5 -0
- package/dist/metal-orm-integration/index.js.map +1 -0
- package/dist/metal-orm-integration/schema-modifier.d.ts +11 -0
- package/dist/metal-orm-integration/schema-modifier.d.ts.map +1 -0
- package/dist/metal-orm-integration/schema-modifier.js +62 -0
- package/dist/metal-orm-integration/schema-modifier.js.map +1 -0
- package/dist/openapi/index.d.ts +4 -0
- package/dist/openapi/index.d.ts.map +1 -0
- package/dist/openapi/index.js +4 -0
- package/dist/openapi/index.js.map +1 -0
- package/dist/openapi/openapi-generator.d.ts +22 -0
- package/dist/openapi/openapi-generator.d.ts.map +1 -0
- package/dist/openapi/openapi-generator.js +428 -0
- package/dist/openapi/openapi-generator.js.map +1 -0
- package/dist/openapi/swagger-ui.d.ts +11 -0
- package/dist/openapi/swagger-ui.d.ts.map +1 -0
- package/dist/openapi/swagger-ui.js +20 -0
- package/dist/openapi/swagger-ui.js.map +1 -0
- package/dist/openapi/zod-to-openapi.d.ts +4 -0
- package/dist/openapi/zod-to-openapi.d.ts.map +1 -0
- package/dist/openapi/zod-to-openapi.js +184 -0
- package/dist/openapi/zod-to-openapi.js.map +1 -0
- package/dist/types/common.d.ts +4 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js +2 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/controller.d.ts +14 -0
- package/dist/types/controller.d.ts.map +1 -0
- package/dist/types/controller.js +2 -0
- package/dist/types/controller.js.map +1 -0
- package/dist/types/metadata.d.ts +48 -0
- package/dist/types/metadata.d.ts.map +1 -0
- package/dist/types/metadata.js +2 -0
- package/dist/types/metadata.js.map +1 -0
- package/dist/types/openapi.d.ts +30 -0
- package/dist/types/openapi.d.ts.map +1 -0
- package/dist/types/openapi.js +2 -0
- package/dist/types/openapi.js.map +1 -0
- package/dist/validation/zod-adapter.d.ts +15 -0
- package/dist/validation/zod-adapter.d.ts.map +1 -0
- package/dist/validation/zod-adapter.js +61 -0
- package/dist/validation/zod-adapter.js.map +1 -0
- package/examples/basic/app.ts +15 -0
- package/examples/basic/index.ts +6 -0
- package/examples/basic/user.controller.ts +35 -0
- package/examples/basic/user.dtos.ts +23 -0
- package/examples/metal-orm-sqlite/app.ts +18 -0
- package/examples/metal-orm-sqlite/db.ts +90 -0
- package/examples/metal-orm-sqlite/index.ts +6 -0
- package/examples/metal-orm-sqlite/post.controller.ts +209 -0
- package/examples/metal-orm-sqlite/post.dtos.ts +78 -0
- package/examples/metal-orm-sqlite/post.entity.ts +24 -0
- package/examples/metal-orm-sqlite/user.controller.helpers.ts +305 -0
- package/examples/metal-orm-sqlite/user.controller.ts +231 -0
- package/examples/metal-orm-sqlite/user.dtos.ts +88 -0
- package/examples/metal-orm-sqlite/user.entity.ts +21 -0
- package/examples/metal-orm-sqlite-music/album.controller.ts +278 -0
- package/examples/metal-orm-sqlite-music/album.dtos.ts +85 -0
- package/examples/metal-orm-sqlite-music/album.entity.ts +28 -0
- package/examples/metal-orm-sqlite-music/app.ts +19 -0
- package/examples/metal-orm-sqlite-music/artist.controller.ts +272 -0
- package/examples/metal-orm-sqlite-music/artist.dtos.ts +68 -0
- package/examples/metal-orm-sqlite-music/artist.entity.ts +27 -0
- package/examples/metal-orm-sqlite-music/db.ts +148 -0
- package/examples/metal-orm-sqlite-music/index.ts +6 -0
- package/examples/metal-orm-sqlite-music/track.controller.ts +221 -0
- package/examples/metal-orm-sqlite-music/track.dtos.ts +82 -0
- package/examples/metal-orm-sqlite-music/track.entity.ts +27 -0
- package/examples/openapi/health.controller.ts +11 -0
- package/examples/openapi/health.dto.ts +7 -0
- package/examples/openapi/index.ts +12 -0
- package/examples/restful/app.ts +15 -0
- package/examples/restful/index.ts +9 -0
- package/examples/restful/task.controller.ts +118 -0
- package/examples/restful/task.dtos.ts +66 -0
- package/examples/restful/task.store.ts +95 -0
- package/examples/tsconfig.json +8 -0
- package/examples/utils/start-server.ts +56 -0
- package/package.json +33 -97
- package/scripts/run-example.js +29 -0
- package/src/adapter/express.ts +589 -0
- package/src/adapter/metal-orm/convention-overrides.ts +115 -0
- package/src/adapter/metal-orm/crud-dtos.ts +141 -0
- package/src/adapter/metal-orm/dto.ts +20 -0
- package/src/adapter/metal-orm/error-dtos.ts +51 -0
- package/src/adapter/metal-orm/field-builder.ts +185 -0
- package/src/adapter/metal-orm/filters.ts +52 -0
- package/src/adapter/metal-orm/index.ts +66 -0
- package/src/adapter/metal-orm/paged-dtos.ts +94 -0
- package/src/adapter/metal-orm/pagination.ts +28 -0
- package/src/adapter/metal-orm/types.ts +250 -0
- package/src/adapter/metal-orm/utils.ts +36 -0
- package/src/adapter/metal-orm.test.ts +439 -0
- package/src/core/__tests__/coerce.test.ts +39 -0
- package/src/core/__tests__/dto-compose.test.ts +68 -0
- package/src/core/__tests__/schema-builder.test.ts +82 -0
- package/src/core/coerce.ts +190 -0
- package/src/core/decorators.ts +645 -0
- package/src/core/errors.ts +55 -0
- package/src/core/metadata.ts +110 -0
- package/src/core/openapi.ts +282 -0
- package/src/core/schema-builder.ts +287 -0
- package/src/core/schema.ts +400 -0
- package/src/core/types.ts +14 -0
- package/src/e2e/http-error.e2e.test.ts +52 -0
- package/src/e2e/sqlite-metal-orm.e2e.test.ts +174 -0
- package/src/e2e/sqlite.e2e.test.ts +126 -0
- package/src/index.ts +8 -0
- package/tsconfig.eslint.json +7 -0
- package/tsconfig.json +18 -0
- package/vitest.config.ts +8 -0
- package/dist/adapter/express/auth.d.ts +0 -13
- package/dist/adapter/express/auth.d.ts.map +0 -1
- package/dist/adapter/express/bootstrap.d.ts +0 -40
- package/dist/adapter/express/bootstrap.d.ts.map +0 -1
- package/dist/adapter/express/coercion.d.ts +0 -102
- package/dist/adapter/express/coercion.d.ts.map +0 -1
- package/dist/adapter/express/index.d.ts +0 -6
- package/dist/adapter/express/index.d.ts.map +0 -1
- package/dist/adapter/express/merge.d.ts +0 -45
- package/dist/adapter/express/merge.d.ts.map +0 -1
- package/dist/adapter/express/openapi.d.ts +0 -66
- package/dist/adapter/express/openapi.d.ts.map +0 -1
- package/dist/adapter/express/router.d.ts +0 -10
- package/dist/adapter/express/router.d.ts.map +0 -1
- package/dist/adapter/express/swagger.d.ts +0 -18
- package/dist/adapter/express/swagger.d.ts.map +0 -1
- package/dist/adapter/express/types.d.ts +0 -110
- package/dist/adapter/express/types.d.ts.map +0 -1
- package/dist/adapter/express/validation.d.ts +0 -27
- package/dist/adapter/express/validation.d.ts.map +0 -1
- package/dist/cli/progress.d.ts +0 -122
- package/dist/cli/progress.d.ts.map +0 -1
- package/dist/cli.cjs +0 -4390
- package/dist/cli.cjs.map +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -4371
- package/dist/cli.js.map +0 -1
- package/dist/compiler/analyze/index.d.ts +0 -5
- package/dist/compiler/analyze/index.d.ts.map +0 -1
- package/dist/compiler/analyze/scanControllers.d.ts +0 -88
- package/dist/compiler/analyze/scanControllers.d.ts.map +0 -1
- package/dist/compiler/cache/isStale.d.ts +0 -46
- package/dist/compiler/cache/isStale.d.ts.map +0 -1
- package/dist/compiler/cache/loadArtifacts.d.ts +0 -149
- package/dist/compiler/cache/loadArtifacts.d.ts.map +0 -1
- package/dist/compiler/cache/schema.d.ts +0 -32
- package/dist/compiler/cache/schema.d.ts.map +0 -1
- package/dist/compiler/cache/writeCache.d.ts +0 -14
- package/dist/compiler/cache/writeCache.d.ts.map +0 -1
- package/dist/compiler/gems.d.ts +0 -75
- package/dist/compiler/gems.d.ts.map +0 -1
- package/dist/compiler/generator/index.d.ts +0 -7
- package/dist/compiler/generator/index.d.ts.map +0 -1
- package/dist/compiler/generator/manifest.d.ts +0 -23
- package/dist/compiler/generator/manifest.d.ts.map +0 -1
- package/dist/compiler/generator/openapi.d.ts +0 -118
- package/dist/compiler/generator/openapi.d.ts.map +0 -1
- package/dist/compiler/graph/builder.d.ts +0 -24
- package/dist/compiler/graph/builder.d.ts.map +0 -1
- package/dist/compiler/graph/index.d.ts +0 -7
- package/dist/compiler/graph/index.d.ts.map +0 -1
- package/dist/compiler/graph/schemaGraph.d.ts +0 -67
- package/dist/compiler/graph/schemaGraph.d.ts.map +0 -1
- package/dist/compiler/graph/types.d.ts +0 -203
- package/dist/compiler/graph/types.d.ts.map +0 -1
- package/dist/compiler/index.d.ts +0 -12
- package/dist/compiler/index.d.ts.map +0 -1
- package/dist/compiler/ir/index.d.ts +0 -7
- package/dist/compiler/ir/index.d.ts.map +0 -1
- package/dist/compiler/ir/pipeline.d.ts +0 -82
- package/dist/compiler/ir/pipeline.d.ts.map +0 -1
- package/dist/compiler/ir/stages.d.ts +0 -40
- package/dist/compiler/ir/stages.d.ts.map +0 -1
- package/dist/compiler/ir/visitor.d.ts +0 -98
- package/dist/compiler/ir/visitor.d.ts.map +0 -1
- package/dist/compiler/manifest/emit.d.ts +0 -21
- package/dist/compiler/manifest/emit.d.ts.map +0 -1
- package/dist/compiler/manifest/format.d.ts +0 -119
- package/dist/compiler/manifest/format.d.ts.map +0 -1
- package/dist/compiler/manifest/index.d.ts +0 -6
- package/dist/compiler/manifest/index.d.ts.map +0 -1
- package/dist/compiler/runner/createProgram.d.ts +0 -24
- package/dist/compiler/runner/createProgram.d.ts.map +0 -1
- package/dist/compiler/runner/index.d.ts +0 -5
- package/dist/compiler/runner/index.d.ts.map +0 -1
- package/dist/compiler/schema/extractAnnotations.d.ts +0 -57
- package/dist/compiler/schema/extractAnnotations.d.ts.map +0 -1
- package/dist/compiler/schema/index.d.ts +0 -8
- package/dist/compiler/schema/index.d.ts.map +0 -1
- package/dist/compiler/schema/intersectionHandler.d.ts +0 -44
- package/dist/compiler/schema/intersectionHandler.d.ts.map +0 -1
- package/dist/compiler/schema/objectHandler.d.ts +0 -146
- package/dist/compiler/schema/objectHandler.d.ts.map +0 -1
- package/dist/compiler/schema/openapi.d.ts +0 -71
- package/dist/compiler/schema/openapi.d.ts.map +0 -1
- package/dist/compiler/schema/parameters.d.ts +0 -90
- package/dist/compiler/schema/parameters.d.ts.map +0 -1
- package/dist/compiler/schema/partitioner.d.ts +0 -85
- package/dist/compiler/schema/partitioner.d.ts.map +0 -1
- package/dist/compiler/schema/primitives.d.ts +0 -68
- package/dist/compiler/schema/primitives.d.ts.map +0 -1
- package/dist/compiler/schema/queryBuilderAnalyzer.d.ts +0 -76
- package/dist/compiler/schema/queryBuilderAnalyzer.d.ts.map +0 -1
- package/dist/compiler/schema/queryBuilderSchemaBuilder.d.ts +0 -13
- package/dist/compiler/schema/queryBuilderSchemaBuilder.d.ts.map +0 -1
- package/dist/compiler/schema/splitOpenapi.d.ts +0 -46
- package/dist/compiler/schema/splitOpenapi.d.ts.map +0 -1
- package/dist/compiler/schema/typeToJsonSchema.d.ts +0 -26
- package/dist/compiler/schema/typeToJsonSchema.d.ts.map +0 -1
- package/dist/compiler/schema/types.d.ts +0 -70
- package/dist/compiler/schema/types.d.ts.map +0 -1
- package/dist/compiler/schema/unionHandler.d.ts +0 -70
- package/dist/compiler/schema/unionHandler.d.ts.map +0 -1
- package/dist/compiler/transform/dedup.d.ts +0 -35
- package/dist/compiler/transform/dedup.d.ts.map +0 -1
- package/dist/compiler/transform/flatten.d.ts +0 -50
- package/dist/compiler/transform/flatten.d.ts.map +0 -1
- package/dist/compiler/transform/index.d.ts +0 -7
- package/dist/compiler/transform/index.d.ts.map +0 -1
- package/dist/compiler/transform/inline.d.ts +0 -46
- package/dist/compiler/transform/inline.d.ts.map +0 -1
- package/dist/compiler/validation/emitPrecompiledValidators.d.ts +0 -62
- package/dist/compiler/validation/emitPrecompiledValidators.d.ts.map +0 -1
- package/dist/compiler/validation/index.d.ts +0 -5
- package/dist/compiler/validation/index.d.ts.map +0 -1
- package/dist/decorators/Auth.d.ts +0 -22
- package/dist/decorators/Auth.d.ts.map +0 -1
- package/dist/decorators/Controller.d.ts +0 -17
- package/dist/decorators/Controller.d.ts.map +0 -1
- package/dist/decorators/Public.d.ts +0 -15
- package/dist/decorators/Public.d.ts.map +0 -1
- package/dist/decorators/Use.d.ts +0 -23
- package/dist/decorators/Use.d.ts.map +0 -1
- package/dist/decorators/methods.d.ts +0 -26
- package/dist/decorators/methods.d.ts.map +0 -1
- package/dist/express.cjs +0 -1186
- package/dist/express.cjs.map +0 -1
- package/dist/express.d.ts +0 -8
- package/dist/express.d.ts.map +0 -1
- package/dist/express.js +0 -1150
- package/dist/express.js.map +0 -1
- package/dist/http.d.ts +0 -33
- package/dist/http.d.ts.map +0 -1
- package/dist/index.cjs +0 -724
- package/dist/index.cjs.map +0 -1
- package/dist/metal/applyListQuery.d.ts +0 -100
- package/dist/metal/applyListQuery.d.ts.map +0 -1
- package/dist/metal/index.cjs +0 -278
- package/dist/metal/index.cjs.map +0 -1
- package/dist/metal/index.d.ts +0 -15
- package/dist/metal/index.d.ts.map +0 -1
- package/dist/metal/index.js +0 -243
- package/dist/metal/index.js.map +0 -1
- package/dist/metal/listQuery.d.ts +0 -26
- package/dist/metal/listQuery.d.ts.map +0 -1
- package/dist/metal/queryOptions.d.ts +0 -16
- package/dist/metal/queryOptions.d.ts.map +0 -1
- package/dist/metal/readMetalBag.d.ts +0 -69
- package/dist/metal/readMetalBag.d.ts.map +0 -1
- package/dist/metal/registerMetalEntities.d.ts +0 -26
- package/dist/metal/registerMetalEntities.d.ts.map +0 -1
- package/dist/metal/schemaFromEntity.d.ts +0 -41
- package/dist/metal/schemaFromEntity.d.ts.map +0 -1
- package/dist/metal/searchWhere.d.ts +0 -97
- package/dist/metal/searchWhere.d.ts.map +0 -1
- package/dist/metal/symbolMetadata.d.ts +0 -8
- package/dist/metal/symbolMetadata.d.ts.map +0 -1
- package/dist/runtime/auth/runtime.d.ts +0 -183
- package/dist/runtime/auth/runtime.d.ts.map +0 -1
- package/dist/runtime/metadata/bucket.d.ts +0 -2
- package/dist/runtime/metadata/bucket.d.ts.map +0 -1
- package/dist/runtime/metadata/key.d.ts +0 -2
- package/dist/runtime/metadata/key.d.ts.map +0 -1
- package/dist/runtime/metadata/read.d.ts +0 -2
- package/dist/runtime/metadata/read.d.ts.map +0 -1
- package/dist/runtime/metadata/types.d.ts +0 -95
- package/dist/runtime/metadata/types.d.ts.map +0 -1
- package/dist/runtime/polyfill.d.ts +0 -2
- package/dist/runtime/polyfill.d.ts.map +0 -1
- package/dist/runtime/upload.d.ts +0 -44
- package/dist/runtime/upload.d.ts.map +0 -1
- package/dist/runtime/validation/ajv.d.ts +0 -120
- package/dist/runtime/validation/ajv.d.ts.map +0 -1
- package/dist/runtime/validation/index.d.ts +0 -11
- package/dist/runtime/validation/index.d.ts.map +0 -1
- package/dist/schema/decorators.d.ts +0 -37
- package/dist/schema/decorators.d.ts.map +0 -1
- package/dist/schema/index.cjs +0 -214
- package/dist/schema/index.cjs.map +0 -1
- package/dist/schema/index.d.ts +0 -2
- package/dist/schema/index.d.ts.map +0 -1
- package/dist/schema/index.js +0 -163
- package/dist/schema/index.js.map +0 -1
- package/dist/scripts/adorn-example.cjs +0 -404
- package/dist/scripts/adorn-example.cjs.map +0 -1
- package/dist/utils/operationId.d.ts +0 -2
- package/dist/utils/operationId.d.ts.map +0 -1
- package/dist/utils/path.d.ts +0 -2
- package/dist/utils/path.d.ts.map +0 -1
- package/dist/utils/port.d.ts +0 -9
- package/dist/utils/port.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/compiler/analyze/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,eAAe,EACf,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Scans TypeScript source files for controller classes decorated with @Controller and extracts their operations.
|
|
3
|
-
* This module provides the foundation for API compilation by identifying all HTTP endpoints defined in the codebase.
|
|
4
|
-
*/
|
|
5
|
-
import ts from "typescript";
|
|
6
|
-
/**
|
|
7
|
-
* Represents a scanned controller class with its metadata and operations.
|
|
8
|
-
* Contains information about the controller class, base path, and all HTTP operations it defines.
|
|
9
|
-
*/
|
|
10
|
-
export interface ScannedController {
|
|
11
|
-
/** The name of the controller class */
|
|
12
|
-
className: string;
|
|
13
|
-
/** The base path prefix for all operations in this controller */
|
|
14
|
-
basePath: string;
|
|
15
|
-
/** The TypeScript source file containing this controller */
|
|
16
|
-
sourceFile: ts.SourceFile;
|
|
17
|
-
/** The class declaration node from the TypeScript AST */
|
|
18
|
-
classDeclaration: ts.ClassDeclaration;
|
|
19
|
-
/** Array of scanned operations (endpoints) in this controller */
|
|
20
|
-
operations: ScannedOperation[];
|
|
21
|
-
/** Optional list of content types this controller consumes */
|
|
22
|
-
consumes?: string[];
|
|
23
|
-
/** Optional list of content types this controller produces */
|
|
24
|
-
produces?: string[];
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Represents a scanned HTTP operation (endpoint) within a controller.
|
|
28
|
-
* Contains all metadata needed to generate API documentation and client code.
|
|
29
|
-
*/
|
|
30
|
-
export interface ScannedOperation {
|
|
31
|
-
/** The name of the method implementing this operation */
|
|
32
|
-
methodName: string;
|
|
33
|
-
/** The HTTP method (GET, POST, PUT, PATCH, DELETE) */
|
|
34
|
-
httpMethod: string;
|
|
35
|
-
/** The URL path for this operation, relative to controller base path */
|
|
36
|
-
path: string;
|
|
37
|
-
/** Unique identifier for this operation, used in OpenAPI specs and client generation */
|
|
38
|
-
operationId: string;
|
|
39
|
-
/** The method declaration node from the TypeScript AST */
|
|
40
|
-
methodDeclaration: ts.MethodDeclaration;
|
|
41
|
-
/** The TypeScript return type of this operation */
|
|
42
|
-
returnType: ts.Type;
|
|
43
|
-
/** Optional TypeScript type node for the return type */
|
|
44
|
-
returnTypeNode?: ts.TypeNode;
|
|
45
|
-
/** Array of scanned parameters for this operation */
|
|
46
|
-
parameters: ScannedParameter[];
|
|
47
|
-
/** Indices of parameters that are path parameters */
|
|
48
|
-
pathParamIndices: number[];
|
|
49
|
-
/** Index of the parameter that is the request body, or null if none */
|
|
50
|
-
bodyParamIndex: number | null;
|
|
51
|
-
/** Indices of parameters that are query parameters */
|
|
52
|
-
queryParamIndices: number[];
|
|
53
|
-
/** Index of the parameter that is a query object (all query params as properties), or null if none */
|
|
54
|
-
queryObjectParamIndex: number | null;
|
|
55
|
-
/** Index of the parameter that is a headers object, or null if none */
|
|
56
|
-
headerObjectParamIndex: number | null;
|
|
57
|
-
/** Index of the parameter that is a cookies object, or null if none */
|
|
58
|
-
cookieObjectParamIndex: number | null;
|
|
59
|
-
/** The content type of the request body, if applicable */
|
|
60
|
-
bodyContentType?: string;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Represents a scanned parameter of an operation.
|
|
64
|
-
* Contains metadata about the parameter's name, type, and position.
|
|
65
|
-
*/
|
|
66
|
-
export interface ScannedParameter {
|
|
67
|
-
/** The name of the parameter */
|
|
68
|
-
name: string;
|
|
69
|
-
/** The zero-based index of the parameter in the function signature */
|
|
70
|
-
index: number;
|
|
71
|
-
/** The TypeScript type of this parameter */
|
|
72
|
-
type: ts.Type;
|
|
73
|
-
/** Whether this parameter is optional */
|
|
74
|
-
isOptional: boolean;
|
|
75
|
-
/** Optional parameter declaration node from the TypeScript AST */
|
|
76
|
-
paramNode?: ts.ParameterDeclaration;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Scans an array of TypeScript source files for controller classes and extracts their operations.
|
|
80
|
-
* Only classes decorated with @Controller are considered, and only methods with HTTP method decorators
|
|
81
|
-
* (e.g., @Get, @Post) are treated as operations.
|
|
82
|
-
*
|
|
83
|
-
* @param sourceFiles - Array of TypeScript source files to scan
|
|
84
|
-
* @param checker - TypeScript type checker for analyzing types
|
|
85
|
-
* @returns Array of scanned controllers with their operations
|
|
86
|
-
*/
|
|
87
|
-
export declare function scanControllers(sourceFiles: ts.SourceFile[], checker: ts.TypeChecker): ScannedController[];
|
|
88
|
-
//# sourceMappingURL=scanControllers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scanControllers.d.ts","sourceRoot":"","sources":["../../../src/compiler/analyze/scanControllers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC;IAC1B,yDAAyD;IACzD,gBAAgB,EAAE,EAAE,CAAC,gBAAgB,CAAC;IACtC,iEAAiE;IACjE,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,wFAAwF;IACxF,WAAW,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,CAAC;IACxC,mDAAmD;IACnD,UAAU,EAAE,EAAE,CAAC,IAAI,CAAC;IACpB,wDAAwD;IACxD,cAAc,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC;IAC7B,qDAAqD;IACrD,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,qDAAqD;IACrD,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,uEAAuE;IACvE,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,sGAAsG;IACtG,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,uEAAuE;IACvE,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,uEAAuE;IACvE,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,0DAA0D;IAC1D,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC;IACd,yCAAyC;IACzC,UAAU,EAAE,OAAO,CAAC;IACpB,kEAAkE;IAClE,SAAS,CAAC,EAAE,EAAE,CAAC,oBAAoB,CAAC;CACrC;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,EAAE,CAAC,UAAU,EAAE,EAC5B,OAAO,EAAE,EAAE,CAAC,WAAW,GACtB,iBAAiB,EAAE,CAerB"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Result of a cache staleness check.
|
|
3
|
-
* - stale: false means cache is valid and artifacts can be used as-is
|
|
4
|
-
* - stale: true means cache is invalid and artifacts need to be regenerated
|
|
5
|
-
*/
|
|
6
|
-
export type StaleResult = {
|
|
7
|
-
stale: false;
|
|
8
|
-
reason: "up-to-date";
|
|
9
|
-
} | {
|
|
10
|
-
stale: true;
|
|
11
|
-
reason: string;
|
|
12
|
-
detail?: string;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Collects all TypeScript config files in the inheritance chain.
|
|
16
|
-
* Follows the "extends" property recursively to build a complete list of config files.
|
|
17
|
-
*
|
|
18
|
-
* @param tsconfigPathAbs - Absolute path to the root tsconfig.json
|
|
19
|
-
* @returns Array of absolute paths to all config files in the chain, in order from root to leaf
|
|
20
|
-
*/
|
|
21
|
-
export declare function collectTsconfigChain(tsconfigPathAbs: string): string[];
|
|
22
|
-
/**
|
|
23
|
-
* Searches for a package lockfile (pnpm-lock.yaml, package-lock.json, or yarn.lock)
|
|
24
|
-
* starting from the given directory and moving up the directory tree.
|
|
25
|
-
*
|
|
26
|
-
* @param startDir - The directory to start searching from
|
|
27
|
-
* @returns Object with path and modification time of the found lockfile, or null if not found
|
|
28
|
-
*/
|
|
29
|
-
export declare function findLockfile(startDir: string): {
|
|
30
|
-
path: string;
|
|
31
|
-
mtimeMs: number;
|
|
32
|
-
} | null;
|
|
33
|
-
/**
|
|
34
|
-
* Determines whether the compiled artifacts are stale and need to be regenerated.
|
|
35
|
-
* Checks the manifest, cache file, TypeScript config files, lockfile, and input files.
|
|
36
|
-
*
|
|
37
|
-
* @param params - Object containing outDir, project path, adorn version, and TypeScript version
|
|
38
|
-
* @returns Promise resolving to a StaleResult indicating whether regeneration is needed
|
|
39
|
-
*/
|
|
40
|
-
export declare function isStale(params: {
|
|
41
|
-
outDir: string;
|
|
42
|
-
project: string;
|
|
43
|
-
adornVersion: string;
|
|
44
|
-
typescriptVersion: string;
|
|
45
|
-
}): Promise<StaleResult>;
|
|
46
|
-
//# sourceMappingURL=isStale.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isStale.d.ts","sourceRoot":"","sources":["../../../src/compiler/cache/isStale.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,MAAM,MAAM,WAAW,GACnB;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,GACtC;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAsBrD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,EAAE,CAqCtE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAevF;AAED;;;;;;GAMG;AACH,wBAAsB,OAAO,CAAC,MAAM,EAAE;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,GAAG,OAAO,CAAC,WAAW,CAAC,CA+CvB"}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OpenAPI specification interface as loaded from openapi.json
|
|
3
|
-
*/
|
|
4
|
-
interface OpenApi {
|
|
5
|
-
openapi: string;
|
|
6
|
-
components?: {
|
|
7
|
-
schemas?: Record<string, unknown>;
|
|
8
|
-
};
|
|
9
|
-
paths?: Record<string, unknown>;
|
|
10
|
-
info?: Record<string, unknown>;
|
|
11
|
-
security?: Array<Record<string, string[]>>;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Manifest interface describing the compiled API structure.
|
|
15
|
-
* Contains metadata about the generation process and all controllers/operations.
|
|
16
|
-
*/
|
|
17
|
-
interface Manifest {
|
|
18
|
-
manifestVersion: number;
|
|
19
|
-
generatedAt: string;
|
|
20
|
-
generator: {
|
|
21
|
-
name: string;
|
|
22
|
-
version: string;
|
|
23
|
-
typescript: string;
|
|
24
|
-
};
|
|
25
|
-
schemas: {
|
|
26
|
-
kind: string;
|
|
27
|
-
file: string;
|
|
28
|
-
componentsSchemasPointer: string;
|
|
29
|
-
};
|
|
30
|
-
validation: {
|
|
31
|
-
mode: "none" | "ajv-runtime" | "precompiled";
|
|
32
|
-
precompiledModule: string | null;
|
|
33
|
-
};
|
|
34
|
-
controllers: Array<{
|
|
35
|
-
controllerId: string;
|
|
36
|
-
basePath: string;
|
|
37
|
-
operations: Array<{
|
|
38
|
-
operationId: string;
|
|
39
|
-
http: {
|
|
40
|
-
method: string;
|
|
41
|
-
path: string;
|
|
42
|
-
};
|
|
43
|
-
handler: {
|
|
44
|
-
methodName: string;
|
|
45
|
-
};
|
|
46
|
-
args: {
|
|
47
|
-
body: {
|
|
48
|
-
index: number;
|
|
49
|
-
required: boolean;
|
|
50
|
-
contentType: string;
|
|
51
|
-
schemaRef: string;
|
|
52
|
-
} | null;
|
|
53
|
-
path: Array<{
|
|
54
|
-
name: string;
|
|
55
|
-
index: number;
|
|
56
|
-
required: boolean;
|
|
57
|
-
schemaRef: string;
|
|
58
|
-
schemaType?: string | string[];
|
|
59
|
-
}>;
|
|
60
|
-
query: Array<{
|
|
61
|
-
name: string;
|
|
62
|
-
index: number;
|
|
63
|
-
required: boolean;
|
|
64
|
-
schemaRef: string;
|
|
65
|
-
schemaType?: string | string[];
|
|
66
|
-
}>;
|
|
67
|
-
headers: Array<{
|
|
68
|
-
name: string;
|
|
69
|
-
index: number;
|
|
70
|
-
required: boolean;
|
|
71
|
-
schemaRef: string;
|
|
72
|
-
schemaType?: string | string[];
|
|
73
|
-
}>;
|
|
74
|
-
cookies: Array<{
|
|
75
|
-
name: string;
|
|
76
|
-
index: number;
|
|
77
|
-
required: boolean;
|
|
78
|
-
schemaRef: string;
|
|
79
|
-
schemaType?: string | string[];
|
|
80
|
-
}>;
|
|
81
|
-
};
|
|
82
|
-
responses: Array<{
|
|
83
|
-
status: number;
|
|
84
|
-
contentType: string;
|
|
85
|
-
schemaRef: string;
|
|
86
|
-
isArray?: boolean;
|
|
87
|
-
}>;
|
|
88
|
-
}>;
|
|
89
|
-
}>;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Validator module interface for precompiled validation logic.
|
|
93
|
-
*/
|
|
94
|
-
interface ValidatorModule {
|
|
95
|
-
validators: Record<string, {
|
|
96
|
-
body?: (data: unknown) => boolean;
|
|
97
|
-
response: Record<string, (data: unknown) => boolean>;
|
|
98
|
-
}>;
|
|
99
|
-
validateBody: (operationId: string, data: unknown) => {
|
|
100
|
-
ok: boolean;
|
|
101
|
-
errors: unknown[] | null;
|
|
102
|
-
};
|
|
103
|
-
validateResponse: (operationId: string, status: number, contentType: string, data: unknown) => {
|
|
104
|
-
ok: boolean;
|
|
105
|
-
errors: unknown[] | null;
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Options for loading artifacts from the output directory.
|
|
110
|
-
*/
|
|
111
|
-
export interface LoadArtifactsOptions {
|
|
112
|
-
outDir: string;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Result of loading artifacts from the output directory.
|
|
116
|
-
*/
|
|
117
|
-
export interface LoadedArtifacts {
|
|
118
|
-
openapi: OpenApi;
|
|
119
|
-
manifest: Manifest;
|
|
120
|
-
validators: ValidatorModule | null;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Loads OpenAPI spec, manifest, and validators from the output directory.
|
|
124
|
-
* Results are cached in memory to avoid repeated file I/O.
|
|
125
|
-
*
|
|
126
|
-
* @param options - Object containing the output directory path
|
|
127
|
-
* @returns Promise resolving to loaded artifacts including OpenAPI spec, manifest, and validators
|
|
128
|
-
*/
|
|
129
|
-
export declare function loadArtifacts(options: LoadArtifactsOptions): Promise<LoadedArtifacts>;
|
|
130
|
-
/**
|
|
131
|
-
* Clears the in-memory artifact cache.
|
|
132
|
-
* If an output directory is specified, only that entry is removed.
|
|
133
|
-
* Otherwise, the entire cache is cleared.
|
|
134
|
-
*
|
|
135
|
-
* @param outDir - Optional specific output directory to clear from cache
|
|
136
|
-
*/
|
|
137
|
-
export declare function clearArtifactCache(outDir?: string): void;
|
|
138
|
-
/**
|
|
139
|
-
* Returns statistics about the current artifact cache state.
|
|
140
|
-
* Useful for debugging and monitoring cache behavior.
|
|
141
|
-
*
|
|
142
|
-
* @returns Object containing cache size and array of cached keys
|
|
143
|
-
*/
|
|
144
|
-
export declare function getArtifactCacheStats(): {
|
|
145
|
-
size: number;
|
|
146
|
-
keys: string[];
|
|
147
|
-
};
|
|
148
|
-
export {};
|
|
149
|
-
//# sourceMappingURL=loadArtifacts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loadArtifacts.d.ts","sourceRoot":"","sources":["../../../src/compiler/cache/loadArtifacts.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,UAAU,OAAO;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE;QACX,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;CAC5C;AAED;;;GAGG;AACH,UAAU,QAAQ;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,wBAAwB,EAAE,MAAM,CAAC;KAClC,CAAC;IACF,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,aAAa,CAAC;QAC7C,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;KAClC,CAAC;IACF,WAAW,EAAE,KAAK,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,KAAK,CAAC;YAChB,WAAW,EAAE,MAAM,CAAC;YACpB,IAAI,EAAE;gBACJ,MAAM,EAAE,MAAM,CAAC;gBACf,IAAI,E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KG;AACH,wBAAgB,qBAAqB,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAKxE"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cache schema definition for version 1 of the adorn-api cache format.
|
|
3
|
-
* Stores information about the compilation environment and input files for cache invalidation.
|
|
4
|
-
*/
|
|
5
|
-
export interface AdornCacheV1 {
|
|
6
|
-
/** Cache format version, always 1 */
|
|
7
|
-
cacheVersion: 1;
|
|
8
|
-
/** Information about the generator that created this cache */
|
|
9
|
-
generator: {
|
|
10
|
-
/** Generator name, always "adorn-api" */
|
|
11
|
-
name: "adorn-api";
|
|
12
|
-
/** Version of the adorn-api package */
|
|
13
|
-
version: string;
|
|
14
|
-
/** Version of TypeScript used during compilation */
|
|
15
|
-
typescript: string;
|
|
16
|
-
};
|
|
17
|
-
/** Information about the TypeScript project configuration */
|
|
18
|
-
project: {
|
|
19
|
-
/** Absolute path to the TypeScript config file */
|
|
20
|
-
tsconfigPath: string;
|
|
21
|
-
/** Map of config file paths to their modification times */
|
|
22
|
-
configFiles: Record<string, number>;
|
|
23
|
-
/** Optional package lockfile information for dependency change detection */
|
|
24
|
-
lockfile?: {
|
|
25
|
-
path: string;
|
|
26
|
-
mtimeMs: number;
|
|
27
|
-
} | null;
|
|
28
|
-
};
|
|
29
|
-
/** Map of input file paths to their modification times */
|
|
30
|
-
inputs: Record<string, number>;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/compiler/cache/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,qCAAqC;IACrC,YAAY,EAAE,CAAC,CAAC;IAChB,8DAA8D;IAC9D,SAAS,EAAE;QACT,yCAAyC;QACzC,IAAI,EAAE,WAAW,CAAC;QAClB,uCAAuC;QACvC,OAAO,EAAE,MAAM,CAAC;QAChB,oDAAoD;QACpD,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,6DAA6D;IAC7D,OAAO,EAAE;QACP,kDAAkD;QAClD,YAAY,EAAE,MAAM,CAAC;QACrB,2DAA2D;QAC3D,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACpC,4EAA4E;QAC5E,QAAQ,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAAC;KACrD,CAAC;IACF,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
/**
|
|
3
|
-
* Writes cache information to the output directory.
|
|
4
|
-
* Captures the current state of the compilation environment for future staleness checks.
|
|
5
|
-
*
|
|
6
|
-
* @param params - Object containing output directory, tsconfig path, TypeScript program, and adorn version
|
|
7
|
-
*/
|
|
8
|
-
export declare function writeCache(params: {
|
|
9
|
-
outDir: string;
|
|
10
|
-
tsconfigAbs: string;
|
|
11
|
-
program: ts.Program;
|
|
12
|
-
adornVersion: string;
|
|
13
|
-
}): void;
|
|
14
|
-
//# sourceMappingURL=writeCache.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"writeCache.d.ts","sourceRoot":"","sources":["../../../src/compiler/cache/writeCache.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,YAAY,CAAC;AAkB5B;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAqCP"}
|
package/dist/compiler/gems.d.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { SchemaGraph } from "./graph/schemaGraph.js";
|
|
2
|
-
import type { Graph } from "./graph/types.js";
|
|
3
|
-
/**
|
|
4
|
-
* GEMS Compiler configuration
|
|
5
|
-
*/
|
|
6
|
-
export interface GEMSConfig {
|
|
7
|
-
tsconfigPath: string;
|
|
8
|
-
deduplicate: boolean;
|
|
9
|
-
inline: boolean;
|
|
10
|
-
flatten: boolean;
|
|
11
|
-
verbose: boolean;
|
|
12
|
-
generateOpenAPI: boolean;
|
|
13
|
-
generateManifest: boolean;
|
|
14
|
-
outputPath?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* GEMS Compiler result
|
|
18
|
-
*/
|
|
19
|
-
export interface GEMSResult {
|
|
20
|
-
graph: Graph;
|
|
21
|
-
schemaGraph: SchemaGraph;
|
|
22
|
-
openapi?: any;
|
|
23
|
-
manifest?: any;
|
|
24
|
-
stages: string[];
|
|
25
|
-
duration: number;
|
|
26
|
-
statistics: {
|
|
27
|
-
totalNodes: number;
|
|
28
|
-
totalEdges: number;
|
|
29
|
-
cyclesDetected: number;
|
|
30
|
-
stronglyConnectedComponents: number;
|
|
31
|
-
duplicatesRemoved: number;
|
|
32
|
-
nodesInlined: number;
|
|
33
|
-
nodesFlattened: number;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Create default GEMS compiler configuration
|
|
38
|
-
*/
|
|
39
|
-
export declare function createGEMSConfig(tsconfigPath: string, partial?: Partial<GEMSConfig>): GEMSConfig;
|
|
40
|
-
/**
|
|
41
|
-
* Compile TypeScript sources using GEMS compiler
|
|
42
|
-
*/
|
|
43
|
-
export declare function compileWithGEMS(config: GEMSConfig): Promise<GEMSResult>;
|
|
44
|
-
/**
|
|
45
|
-
* Quick compile with default configuration
|
|
46
|
-
*/
|
|
47
|
-
export declare function quickCompile(tsconfigPath: string): Promise<GEMSResult>;
|
|
48
|
-
/**
|
|
49
|
-
* Analyze a TypeScript project without full compilation
|
|
50
|
-
*/
|
|
51
|
-
export declare function analyzeProject(tsconfigPath: string): Promise<{
|
|
52
|
-
graph: Graph;
|
|
53
|
-
schemaGraph: SchemaGraph;
|
|
54
|
-
analysis: {
|
|
55
|
-
typeCount: number;
|
|
56
|
-
controllerCount: number;
|
|
57
|
-
operationCount: number;
|
|
58
|
-
avgComplexity: number;
|
|
59
|
-
potentialOptimizations: {
|
|
60
|
-
duplicateTypes: number;
|
|
61
|
-
inlineCandidates: number;
|
|
62
|
-
flattenCandidates: number;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
}>;
|
|
66
|
-
/**
|
|
67
|
-
* Export GEMS compiler
|
|
68
|
-
*/
|
|
69
|
-
export declare const GEMS: {
|
|
70
|
-
compile: typeof compileWithGEMS;
|
|
71
|
-
quickCompile: typeof quickCompile;
|
|
72
|
-
analyze: typeof analyzeProject;
|
|
73
|
-
createConfig: typeof createGEMSConfig;
|
|
74
|
-
};
|
|
75
|
-
//# sourceMappingURL=gems.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gems.d.ts","sourceRoot":"","sources":["../../src/compiler/gems.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAMrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB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|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generator module exports
|
|
3
|
-
*/
|
|
4
|
-
export { generateOpenAPI, generateOpenAPIFromGraph, type OpenAPI31, type JsonSchema, type OpenAPIGeneratorOptions, DEFAULT_GENERATOR_OPTIONS } from './openapi.js';
|
|
5
|
-
export { generateManifest, generateManifestFromGraph } from './manifest.js';
|
|
6
|
-
export type { OperationObject, ParameterObject, RequestBodyObject, ResponseObject, MediaTypeObject } from './openapi.js';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/compiler/generator/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACnK,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC5E,YAAY,EACV,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,eAAe,EAChB,MAAM,cAAc,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Manifest generator using GEMS graph-based IR.
|
|
3
|
-
* Generates runtime binding metadata from graph structure.
|
|
4
|
-
*/
|
|
5
|
-
import type { Graph } from "../graph/types.js";
|
|
6
|
-
import type { ManifestV1 } from "../manifest/format.js";
|
|
7
|
-
/**
|
|
8
|
-
* Manifest generation options
|
|
9
|
-
*/
|
|
10
|
-
export interface ManifestGeneratorOptions {
|
|
11
|
-
validationMode: "none" | "ajv-runtime" | "precompiled";
|
|
12
|
-
version: string;
|
|
13
|
-
typescriptVersion: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Generate manifest from GEMS graph
|
|
17
|
-
*/
|
|
18
|
-
export declare function generateManifestFromGraph(graph: Graph, options: ManifestGeneratorOptions): ManifestV1;
|
|
19
|
-
/**
|
|
20
|
-
* Generate manifest from GEMS compilation result
|
|
21
|
-
*/
|
|
22
|
-
export declare function generateManifest(graph: Graph, validationMode?: "none" | "ajv-runtime" | "precompiled", version?: string, typescriptVersion?: string): ManifestV1;
|
|
23
|
-
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/compiler/generator/manifest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EACV,KAAK,EAKN,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EACV,UAAU,EAQX,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,cAAc,EAAE,MAAM,GAAG,aAAa,GAAG,aAAa,CAAC;IACvD,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,wBAAwB,GAChC,UAAU,CA0BZ;AAsRD;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,KAAK,EACZ,cAAc,GAAE,MAAM,GAAG,aAAa,GAAG,aAA6B,EACtE,OAAO,GAAE,MAAgB,EACzB,iBAAiB,GAAE,MAAgB,GAClC,UAAU,CAMZ"}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OpenAPI 3.1 generator using GEMS graph-based IR.
|
|
3
|
-
* Generates optimized schemas from the graph structure.
|
|
4
|
-
*/
|
|
5
|
-
import type { Graph } from "../graph/types.js";
|
|
6
|
-
import type { SchemaGraph } from "../graph/schemaGraph.js";
|
|
7
|
-
/**
|
|
8
|
-
* OpenAPI 3.1 specification
|
|
9
|
-
*/
|
|
10
|
-
export interface OpenAPI31 {
|
|
11
|
-
openapi: "3.1.0";
|
|
12
|
-
info: {
|
|
13
|
-
title: string;
|
|
14
|
-
version: string;
|
|
15
|
-
description?: string;
|
|
16
|
-
};
|
|
17
|
-
servers?: Array<{
|
|
18
|
-
url: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
}>;
|
|
21
|
-
components: {
|
|
22
|
-
schemas: Record<string, JsonSchema>;
|
|
23
|
-
};
|
|
24
|
-
paths: Record<string, Record<string, OperationObject>>;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* OpenAPI operation object
|
|
28
|
-
*/
|
|
29
|
-
export interface OperationObject {
|
|
30
|
-
operationId: string;
|
|
31
|
-
summary?: string;
|
|
32
|
-
description?: string;
|
|
33
|
-
parameters?: ParameterObject[];
|
|
34
|
-
requestBody?: RequestBodyObject;
|
|
35
|
-
responses: Record<string, ResponseObject>;
|
|
36
|
-
tags?: string[];
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* OpenAPI parameter object
|
|
40
|
-
*/
|
|
41
|
-
export interface ParameterObject {
|
|
42
|
-
name: string;
|
|
43
|
-
in: "path" | "query" | "header" | "cookie";
|
|
44
|
-
required: boolean;
|
|
45
|
-
schema: JsonSchema;
|
|
46
|
-
description?: string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* OpenAPI request body object
|
|
50
|
-
*/
|
|
51
|
-
export interface RequestBodyObject {
|
|
52
|
-
description?: string;
|
|
53
|
-
required: boolean;
|
|
54
|
-
content: Record<string, MediaTypeObject>;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* OpenAPI response object
|
|
58
|
-
*/
|
|
59
|
-
export interface ResponseObject {
|
|
60
|
-
description: string;
|
|
61
|
-
content?: Record<string, MediaTypeObject>;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* OpenAPI media type object
|
|
65
|
-
*/
|
|
66
|
-
export interface MediaTypeObject {
|
|
67
|
-
schema: JsonSchema;
|
|
68
|
-
examples?: Record<string, unknown>;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* JSON Schema (subset for OpenAPI 3.1)
|
|
72
|
-
*/
|
|
73
|
-
export interface JsonSchema {
|
|
74
|
-
type?: string | string[];
|
|
75
|
-
properties?: Record<string, JsonSchema>;
|
|
76
|
-
required?: string[];
|
|
77
|
-
items?: JsonSchema;
|
|
78
|
-
$ref?: string;
|
|
79
|
-
description?: string;
|
|
80
|
-
enum?: (string | number | boolean)[];
|
|
81
|
-
nullable?: boolean;
|
|
82
|
-
default?: unknown;
|
|
83
|
-
anyOf?: JsonSchema[];
|
|
84
|
-
oneOf?: JsonSchema[];
|
|
85
|
-
allOf?: JsonSchema[];
|
|
86
|
-
additionalProperties?: boolean | JsonSchema;
|
|
87
|
-
format?: string;
|
|
88
|
-
minimum?: number;
|
|
89
|
-
maximum?: number;
|
|
90
|
-
minLength?: number;
|
|
91
|
-
maxLength?: number;
|
|
92
|
-
minItems?: number;
|
|
93
|
-
maxItems?: number;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* OpenAPI generator options
|
|
97
|
-
*/
|
|
98
|
-
export interface OpenAPIGeneratorOptions {
|
|
99
|
-
title?: string;
|
|
100
|
-
version?: string;
|
|
101
|
-
description?: string;
|
|
102
|
-
servers?: string[];
|
|
103
|
-
inlineAll?: boolean;
|
|
104
|
-
excludeUnusedSchemas?: boolean;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Default generator options
|
|
108
|
-
*/
|
|
109
|
-
export declare const DEFAULT_GENERATOR_OPTIONS: OpenAPIGeneratorOptions;
|
|
110
|
-
/**
|
|
111
|
-
* Generate OpenAPI 3.1 specification from GEMS graph
|
|
112
|
-
*/
|
|
113
|
-
export declare function generateOpenAPIFromGraph(graph: Graph, schemaGraph: SchemaGraph, options?: Partial<OpenAPIGeneratorOptions>): OpenAPI31;
|
|
114
|
-
/**
|
|
115
|
-
* Generate OpenAPI spec from GEMS compilation result
|
|
116
|
-
*/
|
|
117
|
-
export declare function generateOpenAPI(graph: Graph, schemaGraph: SchemaGraph, options?: Partial<OpenAPIGeneratorOptions>): OpenAPI31;
|
|
118
|
-
//# sourceMappingURL=openapi.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../../src/compiler/generator/openapi.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EACV,KAAK,EAON,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG3D;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC,CAAC;IACH,UAAU,EAAE;QACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;KACrC,CAAC;IACF,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;CACxD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC1C,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,MAA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E,UAAU,EAAE,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,uBAMvC,CAAC;AAEF;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,OAAO,GAAE,OAAO,CAAC,uBAAuB,CAAM,GAC7C,SAAS,CAsCX;AAyZD;;GAEG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,OAAO,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,GACzC,SAAS,CAEX"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Graph builder that converts CST/AST to graph-based IR.
|
|
3
|
-
* Creates typed nodes and establishes relationships between them.
|
|
4
|
-
*/
|
|
5
|
-
import ts from "typescript";
|
|
6
|
-
import type { Graph } from "./types.js";
|
|
7
|
-
/**
|
|
8
|
-
* Builder context for constructing the graph
|
|
9
|
-
*/
|
|
10
|
-
export interface GraphBuilderContext {
|
|
11
|
-
graph: Graph;
|
|
12
|
-
checker: ts.TypeChecker;
|
|
13
|
-
sourceFiles: ts.SourceFile[];
|
|
14
|
-
nodeMap: Map<ts.Node, string>;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Create a new graph builder context
|
|
18
|
-
*/
|
|
19
|
-
export declare function createGraphBuilderContext(checker: ts.TypeChecker, sourceFiles: ts.SourceFile[], tsVersion?: string): GraphBuilderContext;
|
|
20
|
-
/**
|
|
21
|
-
* Build the graph from source files
|
|
22
|
-
*/
|
|
23
|
-
export declare function buildGraph(context: GraphBuilderContext): Graph;
|
|
24
|
-
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../src/compiler/graph/builder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,KAAK,EACV,KAAK,EAON,MAAM,YAAY,CAAC;AASpB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC;IACxB,WAAW,EAAE,EAAE,CAAC,UAAU,EAAE,CAAC;IAC7B,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,WAAW,EAAE,EAAE,CAAC,UAAU,EAAE,EAC5B,SAAS,CAAC,EAAE,MAAM,GACjB,mBAAmB,CAOrB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,mBAAmB,GAAG,KAAK,CAoB9D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/compiler/graph/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC"}
|