@skmtc/core 0.0.273 → 0.0.274
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/esm/context/CoreContext.d.ts +32 -3
- package/esm/context/CoreContext.d.ts.map +1 -1
- package/esm/context/CoreContext.js +131 -26
- package/esm/context/GenerateContext.d.ts +4 -0
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +13 -1
- package/esm/context/RenderContext.d.ts +4 -2
- package/esm/context/RenderContext.d.ts.map +1 -1
- package/esm/context/RenderContext.js +17 -1
- package/esm/deps/jsr.io/@std/fmt/1.0.1/colors.d.ts +700 -0
- package/esm/deps/jsr.io/@std/fmt/1.0.1/colors.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fmt/1.0.1/colors.js +903 -0
- package/esm/deps/jsr.io/@std/fs/1.0.2/exists.d.ts +198 -0
- package/esm/deps/jsr.io/@std/fs/1.0.2/exists.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.2/exists.js +251 -0
- package/esm/deps/jsr.io/@std/io/0.224.6/types.d.ts +95 -0
- package/esm/deps/jsr.io/@std/io/0.224.6/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/io/0.224.6/types.js +3 -0
- package/esm/deps/jsr.io/@std/io/0.224.6/write_all.d.ts +51 -0
- package/esm/deps/jsr.io/@std/io/0.224.6/write_all.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/io/0.224.6/write_all.js +61 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/_config.d.ts +4 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/_config.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/_config.js +14 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/_file_handler_symbols.d.ts +8 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/_file_handler_symbols.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/_file_handler_symbols.js +8 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/_state.d.ts +8 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/_state.js +7 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/base_handler.d.ts +22 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/base_handler.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/base_handler.js +60 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/console_handler.d.ts +18 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/console_handler.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/console_handler.js +58 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/critical.d.ts +5 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/critical.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/critical.js +10 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/debug.d.ts +5 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/debug.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/debug.js +10 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/error.d.ts +5 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/error.js +10 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/file_handler.d.ts +51 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/file_handler.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/file_handler.js +135 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/formatters.d.ts +6 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/formatters.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/formatters.js +19 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/get_logger.d.ts +4 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/get_logger.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/get_logger.js +21 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/info.d.ts +5 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/info.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/info.js +10 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/levels.d.ts +26 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/levels.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/levels.js +43 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/logger.d.ts +62 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/logger.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/logger.js +179 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/mod.d.ts +390 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/mod.js +390 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/rotating_file_handler.d.ts +53 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/rotating_file_handler.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/rotating_file_handler.js +125 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/setup.d.ts +4 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/setup.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/setup.js +41 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/warn.d.ts +5 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/warn.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/log/0.224.6/warn.js +10 -0
- package/esm/dsl/OasBase.d.ts.map +1 -0
- package/esm/{oas-elements → dsl}/OasBase.js +5 -4
- package/esm/generate/generate.d.ts +3 -1
- package/esm/generate/generate.d.ts.map +1 -1
- package/esm/generate/generate.js +5 -2
- package/esm/generate/generateModels.d.ts.map +1 -1
- package/esm/generate/generateModels.js +18 -5
- package/esm/generate/generateOperations.d.ts.map +1 -1
- package/esm/generate/generateOperations.js +20 -6
- package/esm/helpers/isImported.d.ts +2 -0
- package/esm/helpers/isImported.d.ts.map +1 -0
- package/esm/helpers/isImported.js +4 -0
- package/esm/helpers/refFns.d.ts +0 -1
- package/esm/helpers/refFns.d.ts.map +1 -1
- package/esm/helpers/refFns.js +0 -5
- package/esm/mod.d.ts +1 -2
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +1 -2
- package/esm/oas/array/Array.d.ts +1 -1
- package/esm/oas/array/Array.d.ts.map +1 -1
- package/esm/oas/array/Array.js +1 -1
- package/esm/oas/boolean/Boolean.d.ts +1 -1
- package/esm/oas/boolean/Boolean.d.ts.map +1 -1
- package/esm/oas/boolean/Boolean.js +1 -1
- package/esm/oas/components/Components.d.ts +1 -1
- package/esm/oas/components/Components.d.ts.map +1 -1
- package/esm/oas/components/Components.js +1 -1
- package/esm/oas/discriminator/Discriminator.d.ts +1 -1
- package/esm/oas/discriminator/Discriminator.d.ts.map +1 -1
- package/esm/oas/discriminator/Discriminator.js +1 -1
- package/esm/oas/document/Document.d.ts +1 -1
- package/esm/oas/document/Document.d.ts.map +1 -1
- package/esm/oas/document/Document.js +1 -1
- package/esm/oas/example/Example.d.ts +1 -1
- package/esm/oas/example/Example.d.ts.map +1 -1
- package/esm/oas/example/Example.js +1 -1
- package/esm/oas/example/toExamplesV3.js +1 -1
- package/esm/oas/header/Header.d.ts +1 -1
- package/esm/oas/header/Header.d.ts.map +1 -1
- package/esm/oas/header/Header.js +1 -1
- package/esm/oas/info/Info.d.ts +1 -1
- package/esm/oas/info/Info.d.ts.map +1 -1
- package/esm/oas/info/Info.js +1 -1
- package/esm/oas/integer/Integer.d.ts +1 -1
- package/esm/oas/integer/Integer.d.ts.map +1 -1
- package/esm/oas/integer/Integer.js +1 -1
- package/esm/oas/intersection/Intersection.d.ts +1 -1
- package/esm/oas/intersection/Intersection.d.ts.map +1 -1
- package/esm/oas/intersection/Intersection.js +1 -1
- package/esm/oas/mediaType/MediaType.d.ts +1 -1
- package/esm/oas/mediaType/MediaType.d.ts.map +1 -1
- package/esm/oas/mediaType/MediaType.js +1 -1
- package/esm/oas/number/Number.d.ts +1 -1
- package/esm/oas/number/Number.d.ts.map +1 -1
- package/esm/oas/number/Number.js +1 -1
- package/esm/oas/object/Object.d.ts +1 -1
- package/esm/oas/object/Object.d.ts.map +1 -1
- package/esm/oas/object/Object.js +1 -1
- package/esm/oas/operation/Operation.d.ts +1 -1
- package/esm/oas/operation/Operation.d.ts.map +1 -1
- package/esm/oas/operation/Operation.js +1 -1
- package/esm/oas/parameter/Parameter.d.ts +1 -1
- package/esm/oas/parameter/Parameter.d.ts.map +1 -1
- package/esm/oas/parameter/Parameter.js +1 -1
- package/esm/oas/pathItem/PathItem.d.ts +1 -1
- package/esm/oas/pathItem/PathItem.d.ts.map +1 -1
- package/esm/oas/pathItem/PathItem.js +1 -1
- package/esm/oas/ref/Ref.d.ts +1 -1
- package/esm/oas/ref/Ref.d.ts.map +1 -1
- package/esm/oas/ref/Ref.js +1 -1
- package/esm/oas/requestBody/RequestBody.d.ts +1 -1
- package/esm/oas/requestBody/RequestBody.d.ts.map +1 -1
- package/esm/oas/requestBody/RequestBody.js +1 -1
- package/esm/oas/response/Response.d.ts +1 -1
- package/esm/oas/response/Response.d.ts.map +1 -1
- package/esm/oas/response/Response.js +1 -1
- package/esm/oas/string/String.d.ts +1 -1
- package/esm/oas/string/String.d.ts.map +1 -1
- package/esm/oas/string/String.js +1 -1
- package/esm/oas/tag/Tag.d.ts +1 -1
- package/esm/oas/tag/Tag.d.ts.map +1 -1
- package/esm/oas/tag/Tag.js +1 -1
- package/esm/oas/union/Union.d.ts +1 -1
- package/esm/oas/union/Union.d.ts.map +1 -1
- package/esm/oas/union/Union.js +1 -1
- package/esm/oas/unknown/Unknown.d.ts +1 -1
- package/esm/oas/unknown/Unknown.d.ts.map +1 -1
- package/esm/oas/unknown/Unknown.js +1 -1
- package/esm/oas/void/Void.d.ts +1 -1
- package/esm/oas/void/Void.d.ts.map +1 -1
- package/esm/oas/void/Void.js +1 -1
- package/esm/server/createServer.d.ts.map +1 -1
- package/esm/server/createServer.js +8 -4
- package/esm/types/Manifest.d.ts +25 -1
- package/esm/types/Manifest.d.ts.map +1 -1
- package/esm/types/Manifest.js +7 -0
- package/package.json +1 -1
- package/script/context/CoreContext.d.ts +32 -3
- package/script/context/CoreContext.d.ts.map +1 -1
- package/script/context/CoreContext.js +132 -26
- package/script/context/GenerateContext.d.ts +4 -0
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +12 -0
- package/script/context/RenderContext.d.ts +4 -2
- package/script/context/RenderContext.d.ts.map +1 -1
- package/script/context/RenderContext.js +17 -1
- package/script/deps/jsr.io/@std/fmt/1.0.1/colors.d.ts +700 -0
- package/script/deps/jsr.io/@std/fmt/1.0.1/colors.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fmt/1.0.1/colors.js +976 -0
- package/script/deps/jsr.io/@std/fs/1.0.2/exists.d.ts +198 -0
- package/script/deps/jsr.io/@std/fs/1.0.2/exists.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.2/exists.js +278 -0
- package/script/deps/jsr.io/@std/io/0.224.6/types.d.ts +95 -0
- package/script/deps/jsr.io/@std/io/0.224.6/types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/io/0.224.6/types.js +4 -0
- package/script/deps/jsr.io/@std/io/0.224.6/write_all.d.ts +51 -0
- package/script/deps/jsr.io/@std/io/0.224.6/write_all.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/io/0.224.6/write_all.js +65 -0
- package/script/deps/jsr.io/@std/log/0.224.6/_config.d.ts +4 -0
- package/script/deps/jsr.io/@std/log/0.224.6/_config.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/_config.js +17 -0
- package/script/deps/jsr.io/@std/log/0.224.6/_file_handler_symbols.d.ts +8 -0
- package/script/deps/jsr.io/@std/log/0.224.6/_file_handler_symbols.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/_file_handler_symbols.js +11 -0
- package/script/deps/jsr.io/@std/log/0.224.6/_state.d.ts +8 -0
- package/script/deps/jsr.io/@std/log/0.224.6/_state.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/_state.js +10 -0
- package/script/deps/jsr.io/@std/log/0.224.6/base_handler.d.ts +22 -0
- package/script/deps/jsr.io/@std/log/0.224.6/base_handler.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/base_handler.js +64 -0
- package/script/deps/jsr.io/@std/log/0.224.6/console_handler.d.ts +18 -0
- package/script/deps/jsr.io/@std/log/0.224.6/console_handler.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/console_handler.js +62 -0
- package/script/deps/jsr.io/@std/log/0.224.6/critical.d.ts +5 -0
- package/script/deps/jsr.io/@std/log/0.224.6/critical.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/critical.js +13 -0
- package/script/deps/jsr.io/@std/log/0.224.6/debug.d.ts +5 -0
- package/script/deps/jsr.io/@std/log/0.224.6/debug.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/debug.js +13 -0
- package/script/deps/jsr.io/@std/log/0.224.6/error.d.ts +5 -0
- package/script/deps/jsr.io/@std/log/0.224.6/error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/error.js +13 -0
- package/script/deps/jsr.io/@std/log/0.224.6/file_handler.d.ts +51 -0
- package/script/deps/jsr.io/@std/log/0.224.6/file_handler.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/file_handler.js +162 -0
- package/script/deps/jsr.io/@std/log/0.224.6/formatters.d.ts +6 -0
- package/script/deps/jsr.io/@std/log/0.224.6/formatters.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/formatters.js +23 -0
- package/script/deps/jsr.io/@std/log/0.224.6/get_logger.d.ts +4 -0
- package/script/deps/jsr.io/@std/log/0.224.6/get_logger.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/get_logger.js +24 -0
- package/script/deps/jsr.io/@std/log/0.224.6/info.d.ts +5 -0
- package/script/deps/jsr.io/@std/log/0.224.6/info.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/info.js +13 -0
- package/script/deps/jsr.io/@std/log/0.224.6/levels.d.ts +26 -0
- package/script/deps/jsr.io/@std/log/0.224.6/levels.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/levels.js +48 -0
- package/script/deps/jsr.io/@std/log/0.224.6/logger.d.ts +62 -0
- package/script/deps/jsr.io/@std/log/0.224.6/logger.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/logger.js +185 -0
- package/script/deps/jsr.io/@std/log/0.224.6/mod.d.ts +390 -0
- package/script/deps/jsr.io/@std/log/0.224.6/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/mod.js +406 -0
- package/script/deps/jsr.io/@std/log/0.224.6/rotating_file_handler.d.ts +53 -0
- package/script/deps/jsr.io/@std/log/0.224.6/rotating_file_handler.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/rotating_file_handler.js +152 -0
- package/script/deps/jsr.io/@std/log/0.224.6/setup.d.ts +4 -0
- package/script/deps/jsr.io/@std/log/0.224.6/setup.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/setup.js +44 -0
- package/script/deps/jsr.io/@std/log/0.224.6/warn.d.ts +5 -0
- package/script/deps/jsr.io/@std/log/0.224.6/warn.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/log/0.224.6/warn.js +13 -0
- package/script/dsl/OasBase.d.ts.map +1 -0
- package/script/{oas-elements → dsl}/OasBase.js +5 -4
- package/script/generate/generate.d.ts +3 -1
- package/script/generate/generate.d.ts.map +1 -1
- package/script/generate/generate.js +5 -2
- package/script/generate/generateModels.d.ts.map +1 -1
- package/script/generate/generateModels.js +18 -5
- package/script/generate/generateOperations.d.ts.map +1 -1
- package/script/generate/generateOperations.js +20 -6
- package/script/helpers/isImported.d.ts +2 -0
- package/script/helpers/isImported.d.ts.map +1 -0
- package/script/helpers/isImported.js +8 -0
- package/script/helpers/refFns.d.ts +0 -1
- package/script/helpers/refFns.d.ts.map +1 -1
- package/script/helpers/refFns.js +1 -7
- package/script/mod.d.ts +1 -2
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +1 -2
- package/script/oas/array/Array.d.ts +1 -1
- package/script/oas/array/Array.d.ts.map +1 -1
- package/script/oas/array/Array.js +1 -1
- package/script/oas/boolean/Boolean.d.ts +1 -1
- package/script/oas/boolean/Boolean.d.ts.map +1 -1
- package/script/oas/boolean/Boolean.js +1 -1
- package/script/oas/components/Components.d.ts +1 -1
- package/script/oas/components/Components.d.ts.map +1 -1
- package/script/oas/components/Components.js +1 -1
- package/script/oas/discriminator/Discriminator.d.ts +1 -1
- package/script/oas/discriminator/Discriminator.d.ts.map +1 -1
- package/script/oas/discriminator/Discriminator.js +1 -1
- package/script/oas/document/Document.d.ts +1 -1
- package/script/oas/document/Document.d.ts.map +1 -1
- package/script/oas/document/Document.js +1 -1
- package/script/oas/example/Example.d.ts +1 -1
- package/script/oas/example/Example.d.ts.map +1 -1
- package/script/oas/example/Example.js +1 -1
- package/script/oas/example/toExamplesV3.js +1 -1
- package/script/oas/header/Header.d.ts +1 -1
- package/script/oas/header/Header.d.ts.map +1 -1
- package/script/oas/header/Header.js +1 -1
- package/script/oas/info/Info.d.ts +1 -1
- package/script/oas/info/Info.d.ts.map +1 -1
- package/script/oas/info/Info.js +1 -1
- package/script/oas/integer/Integer.d.ts +1 -1
- package/script/oas/integer/Integer.d.ts.map +1 -1
- package/script/oas/integer/Integer.js +1 -1
- package/script/oas/intersection/Intersection.d.ts +1 -1
- package/script/oas/intersection/Intersection.d.ts.map +1 -1
- package/script/oas/intersection/Intersection.js +1 -1
- package/script/oas/mediaType/MediaType.d.ts +1 -1
- package/script/oas/mediaType/MediaType.d.ts.map +1 -1
- package/script/oas/mediaType/MediaType.js +1 -1
- package/script/oas/number/Number.d.ts +1 -1
- package/script/oas/number/Number.d.ts.map +1 -1
- package/script/oas/number/Number.js +1 -1
- package/script/oas/object/Object.d.ts +1 -1
- package/script/oas/object/Object.d.ts.map +1 -1
- package/script/oas/object/Object.js +1 -1
- package/script/oas/operation/Operation.d.ts +1 -1
- package/script/oas/operation/Operation.d.ts.map +1 -1
- package/script/oas/operation/Operation.js +1 -1
- package/script/oas/parameter/Parameter.d.ts +1 -1
- package/script/oas/parameter/Parameter.d.ts.map +1 -1
- package/script/oas/parameter/Parameter.js +1 -1
- package/script/oas/pathItem/PathItem.d.ts +1 -1
- package/script/oas/pathItem/PathItem.d.ts.map +1 -1
- package/script/oas/pathItem/PathItem.js +1 -1
- package/script/oas/ref/Ref.d.ts +1 -1
- package/script/oas/ref/Ref.d.ts.map +1 -1
- package/script/oas/ref/Ref.js +1 -1
- package/script/oas/requestBody/RequestBody.d.ts +1 -1
- package/script/oas/requestBody/RequestBody.d.ts.map +1 -1
- package/script/oas/requestBody/RequestBody.js +1 -1
- package/script/oas/response/Response.d.ts +1 -1
- package/script/oas/response/Response.d.ts.map +1 -1
- package/script/oas/response/Response.js +1 -1
- package/script/oas/string/String.d.ts +1 -1
- package/script/oas/string/String.d.ts.map +1 -1
- package/script/oas/string/String.js +1 -1
- package/script/oas/tag/Tag.d.ts +1 -1
- package/script/oas/tag/Tag.d.ts.map +1 -1
- package/script/oas/tag/Tag.js +1 -1
- package/script/oas/union/Union.d.ts +1 -1
- package/script/oas/union/Union.d.ts.map +1 -1
- package/script/oas/union/Union.js +1 -1
- package/script/oas/unknown/Unknown.d.ts +1 -1
- package/script/oas/unknown/Unknown.d.ts.map +1 -1
- package/script/oas/unknown/Unknown.js +1 -1
- package/script/oas/void/Void.d.ts +1 -1
- package/script/oas/void/Void.d.ts.map +1 -1
- package/script/oas/void/Void.js +1 -1
- package/script/server/createServer.d.ts.map +1 -1
- package/script/server/createServer.js +8 -4
- package/script/types/Manifest.d.ts +25 -1
- package/script/types/Manifest.d.ts.map +1 -1
- package/script/types/Manifest.js +8 -1
- package/esm/context/LogStore.d.ts +0 -25
- package/esm/context/LogStore.d.ts.map +0 -1
- package/esm/context/LogStore.js +0 -53
- package/esm/helpers/logStatus.d.ts +0 -19
- package/esm/helpers/logStatus.d.ts.map +0 -1
- package/esm/helpers/logStatus.js +0 -16
- package/esm/oas-elements/OasBase.d.ts.map +0 -1
- package/script/context/LogStore.d.ts +0 -25
- package/script/context/LogStore.d.ts.map +0 -1
- package/script/context/LogStore.js +0 -57
- package/script/helpers/logStatus.d.ts +0 -19
- package/script/helpers/logStatus.d.ts.map +0 -1
- package/script/helpers/logStatus.js +0 -21
- package/script/oas-elements/OasBase.d.ts.map +0 -1
- /package/esm/{oas-elements → dsl}/OasBase.d.ts +0 -0
- /package/script/{oas-elements → dsl}/OasBase.d.ts +0 -0
|
@@ -1,18 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var _CoreContext_phase, _CoreContext_results;
|
|
2
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
15
|
exports.CoreContext = void 0;
|
|
16
|
+
exports.jsonFormatter = jsonFormatter;
|
|
4
17
|
const GenerateContext_js_1 = require("./GenerateContext.js");
|
|
5
18
|
const ts_pattern_1 = require("ts-pattern");
|
|
6
19
|
const RenderContext_js_1 = require("./RenderContext.js");
|
|
20
|
+
const mod_js_1 = require("../deps/jsr.io/@std/log/0.224.6/mod.js");
|
|
7
21
|
class CoreContext {
|
|
8
|
-
constructor({ phase }) {
|
|
9
|
-
Object.defineProperty(this, "
|
|
22
|
+
constructor({ phase, traceId, spanId }) {
|
|
23
|
+
Object.defineProperty(this, "traceId", {
|
|
10
24
|
enumerable: true,
|
|
11
25
|
configurable: true,
|
|
12
26
|
writable: true,
|
|
13
27
|
value: void 0
|
|
14
28
|
});
|
|
15
|
-
this
|
|
29
|
+
Object.defineProperty(this, "spanId", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true,
|
|
33
|
+
value: void 0
|
|
34
|
+
});
|
|
35
|
+
_CoreContext_phase.set(this, void 0);
|
|
36
|
+
_CoreContext_results.set(this, void 0);
|
|
37
|
+
__classPrivateFieldSet(this, _CoreContext_results, {
|
|
38
|
+
parse: 'success',
|
|
39
|
+
generate: {},
|
|
40
|
+
render: 'success'
|
|
41
|
+
}, "f");
|
|
42
|
+
__classPrivateFieldSet(this, _CoreContext_phase, phase, "f");
|
|
43
|
+
this.traceId = traceId;
|
|
44
|
+
this.spanId = spanId;
|
|
45
|
+
(0, mod_js_1.setup)({
|
|
46
|
+
handlers: {
|
|
47
|
+
[spanId]: new mod_js_1.ConsoleHandler('DEBUG', {
|
|
48
|
+
formatter: logRecord => jsonFormatter({ logRecord, context: this }),
|
|
49
|
+
useColors: false
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
get logger() {
|
|
55
|
+
return (0, mod_js_1.getLogger)(this.spanId);
|
|
16
56
|
}
|
|
17
57
|
setupGeneratePhase({ schemaModel, settings, generatorsMap }) {
|
|
18
58
|
const generateContext = new GenerateContext_js_1.GenerateContext({
|
|
@@ -20,11 +60,33 @@ class CoreContext {
|
|
|
20
60
|
settings,
|
|
21
61
|
generatorsMap
|
|
22
62
|
});
|
|
23
|
-
this
|
|
63
|
+
__classPrivateFieldSet(this, _CoreContext_phase, { type: 'generate', context: generateContext }, "f");
|
|
64
|
+
}
|
|
65
|
+
captureResult(args) {
|
|
66
|
+
(0, ts_pattern_1.match)(args)
|
|
67
|
+
.with({ phase: 'parse' }, ({ result }) => {
|
|
68
|
+
if (applyResult({ current: __classPrivateFieldGet(this, _CoreContext_results, "f").parse, incoming: result })) {
|
|
69
|
+
__classPrivateFieldGet(this, _CoreContext_results, "f").parse = result;
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
.with({ phase: 'generate' }, ({ generatorKey, result }) => {
|
|
73
|
+
if (applyResult({
|
|
74
|
+
current: __classPrivateFieldGet(this, _CoreContext_results, "f").generate[generatorKey],
|
|
75
|
+
incoming: result
|
|
76
|
+
})) {
|
|
77
|
+
__classPrivateFieldGet(this, _CoreContext_results, "f").generate[generatorKey] = result;
|
|
78
|
+
}
|
|
79
|
+
})
|
|
80
|
+
.with({ phase: 'render' }, ({ result }) => {
|
|
81
|
+
if (applyResult({ current: __classPrivateFieldGet(this, _CoreContext_results, "f").render, incoming: result })) {
|
|
82
|
+
__classPrivateFieldGet(this, _CoreContext_results, "f").render = result;
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
.exhaustive();
|
|
24
86
|
}
|
|
25
|
-
setupRenderPhase({ files, prettier, packageDependencies, settings, renderDependencies, pinnableGenerators }) {
|
|
26
|
-
console.log('Render dependencies: ', renderDependencies);
|
|
87
|
+
setupRenderPhase({ results, files, prettier, packageDependencies, settings, renderDependencies, pinnableGenerators }) {
|
|
27
88
|
const renderContext = new RenderContext_js_1.RenderContext({
|
|
89
|
+
results,
|
|
28
90
|
files,
|
|
29
91
|
renderDependencies,
|
|
30
92
|
packageDependencies,
|
|
@@ -32,10 +94,28 @@ class CoreContext {
|
|
|
32
94
|
settings,
|
|
33
95
|
pinnableGenerators
|
|
34
96
|
});
|
|
35
|
-
this
|
|
97
|
+
__classPrivateFieldSet(this, _CoreContext_phase, { type: 'render', context: renderContext }, "f");
|
|
98
|
+
}
|
|
99
|
+
get phaseType() {
|
|
100
|
+
return __classPrivateFieldGet(this, _CoreContext_phase, "f").type;
|
|
101
|
+
}
|
|
102
|
+
getLogFields() {
|
|
103
|
+
const logFields = {
|
|
104
|
+
phase: __classPrivateFieldGet(this, _CoreContext_phase, "f").type,
|
|
105
|
+
traceId: this.traceId,
|
|
106
|
+
spanId: this.spanId
|
|
107
|
+
};
|
|
108
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
109
|
+
.with({ type: 'generate' }, ({ context }) => ({
|
|
110
|
+
...logFields,
|
|
111
|
+
...context.getLogFields()
|
|
112
|
+
}))
|
|
113
|
+
.with({ type: 'parse' }, () => logFields)
|
|
114
|
+
.with({ type: 'render' }, () => logFields)
|
|
115
|
+
.exhaustive();
|
|
36
116
|
}
|
|
37
117
|
register({ destinationPath, ...args }) {
|
|
38
|
-
return (0, ts_pattern_1.match)(this
|
|
118
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
39
119
|
.with({ type: 'generate' }, ({ context }) => {
|
|
40
120
|
return context.register({ destinationPath, ...args });
|
|
41
121
|
})
|
|
@@ -48,9 +128,9 @@ class CoreContext {
|
|
|
48
128
|
.exhaustive();
|
|
49
129
|
}
|
|
50
130
|
addGeneratorKey({ generatorKey }) {
|
|
51
|
-
return (0, ts_pattern_1.match)(this
|
|
131
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
52
132
|
.with({ type: 'generate' }, () => {
|
|
53
|
-
|
|
133
|
+
this.logger.info('trying to add generator key during generate phase');
|
|
54
134
|
})
|
|
55
135
|
.with({ type: 'parse' }, () => {
|
|
56
136
|
throw new Error(`Cannot add generator key during parse phase`);
|
|
@@ -61,7 +141,7 @@ class CoreContext {
|
|
|
61
141
|
.exhaustive();
|
|
62
142
|
}
|
|
63
143
|
resolveSchemaRefOnce(refName) {
|
|
64
|
-
return (0, ts_pattern_1.match)(this
|
|
144
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
65
145
|
.with({ type: 'generate' }, ({ context }) => {
|
|
66
146
|
return context.resolveSchemaRefOnce(refName);
|
|
67
147
|
})
|
|
@@ -74,7 +154,7 @@ class CoreContext {
|
|
|
74
154
|
.exhaustive();
|
|
75
155
|
}
|
|
76
156
|
addRenderDependency(args) {
|
|
77
|
-
return (0, ts_pattern_1.match)(this
|
|
157
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
78
158
|
.with({ type: 'generate' }, ({ context }) => {
|
|
79
159
|
return context.addRenderDependency(args);
|
|
80
160
|
})
|
|
@@ -87,7 +167,7 @@ class CoreContext {
|
|
|
87
167
|
.exhaustive();
|
|
88
168
|
}
|
|
89
169
|
getFile(filePath) {
|
|
90
|
-
return (0, ts_pattern_1.match)(this
|
|
170
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
91
171
|
.with({ type: 'generate' }, ({ context }) => {
|
|
92
172
|
return context.getFile(filePath);
|
|
93
173
|
})
|
|
@@ -100,7 +180,7 @@ class CoreContext {
|
|
|
100
180
|
.exhaustive();
|
|
101
181
|
}
|
|
102
182
|
findDefinition(args) {
|
|
103
|
-
return (0, ts_pattern_1.match)(this
|
|
183
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
104
184
|
.with({ type: 'generate' }, ({ context }) => context.findDefinition(args))
|
|
105
185
|
.with({ type: 'parse' }, () => {
|
|
106
186
|
throw new Error(`Cannot pick during parse phase`);
|
|
@@ -109,7 +189,7 @@ class CoreContext {
|
|
|
109
189
|
.exhaustive();
|
|
110
190
|
}
|
|
111
191
|
render(options) {
|
|
112
|
-
return (0, ts_pattern_1.match)(this
|
|
192
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
113
193
|
.with({ type: 'generate' }, () => {
|
|
114
194
|
throw new Error(`Cannot render during generate phase`);
|
|
115
195
|
})
|
|
@@ -120,7 +200,7 @@ class CoreContext {
|
|
|
120
200
|
.exhaustive();
|
|
121
201
|
}
|
|
122
202
|
addFile(normalisedPath) {
|
|
123
|
-
return (0, ts_pattern_1.match)(this
|
|
203
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
124
204
|
.with({ type: 'generate' }, ({ context }) => {
|
|
125
205
|
return context.addFile(normalisedPath);
|
|
126
206
|
})
|
|
@@ -133,7 +213,7 @@ class CoreContext {
|
|
|
133
213
|
.exhaustive();
|
|
134
214
|
}
|
|
135
215
|
getOperationBaseSettings(args) {
|
|
136
|
-
return (0, ts_pattern_1.match)(this
|
|
216
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
137
217
|
.with({ type: 'generate' }, ({ context }) => {
|
|
138
218
|
return context.getOperationBaseSettings(args);
|
|
139
219
|
})
|
|
@@ -146,7 +226,7 @@ class CoreContext {
|
|
|
146
226
|
.exhaustive();
|
|
147
227
|
}
|
|
148
228
|
insert(args) {
|
|
149
|
-
return (0, ts_pattern_1.match)(this
|
|
229
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
150
230
|
.with({ type: 'generate' }, ({ context }) => {
|
|
151
231
|
return context.insert({ ...args, coreContext: this });
|
|
152
232
|
})
|
|
@@ -159,7 +239,7 @@ class CoreContext {
|
|
|
159
239
|
.exhaustive();
|
|
160
240
|
}
|
|
161
241
|
getModelBaseSettings(args) {
|
|
162
|
-
return (0, ts_pattern_1.match)(this
|
|
242
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
163
243
|
.with({ type: 'generate' }, ({ context }) => {
|
|
164
244
|
return context.getModelBaseSettings(args);
|
|
165
245
|
})
|
|
@@ -171,8 +251,11 @@ class CoreContext {
|
|
|
171
251
|
})
|
|
172
252
|
.exhaustive();
|
|
173
253
|
}
|
|
254
|
+
get results() {
|
|
255
|
+
return __classPrivateFieldGet(this, _CoreContext_results, "f");
|
|
256
|
+
}
|
|
174
257
|
get files() {
|
|
175
|
-
return (0, ts_pattern_1.match)(this
|
|
258
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
176
259
|
.with({ type: 'generate' }, ({ context }) => context.files)
|
|
177
260
|
.with({ type: 'parse' }, () => {
|
|
178
261
|
throw new Error(`Cannot access files during parse phase`);
|
|
@@ -181,7 +264,7 @@ class CoreContext {
|
|
|
181
264
|
.exhaustive();
|
|
182
265
|
}
|
|
183
266
|
get renderDependencies() {
|
|
184
|
-
return (0, ts_pattern_1.match)(this
|
|
267
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
185
268
|
.with({ type: 'generate' }, ({ context }) => context.renderDependencies)
|
|
186
269
|
.with({ type: 'parse' }, () => {
|
|
187
270
|
throw new Error(`Cannot access files during parse phase`);
|
|
@@ -190,7 +273,7 @@ class CoreContext {
|
|
|
190
273
|
.exhaustive();
|
|
191
274
|
}
|
|
192
275
|
get packageDependencies() {
|
|
193
|
-
return (0, ts_pattern_1.match)(this
|
|
276
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
194
277
|
.with({ type: 'generate' }, ({ context }) => context.packageDependencies)
|
|
195
278
|
.with({ type: 'parse' }, () => {
|
|
196
279
|
throw new Error(`Cannot access package dependencies during parse phase`);
|
|
@@ -199,7 +282,7 @@ class CoreContext {
|
|
|
199
282
|
.exhaustive();
|
|
200
283
|
}
|
|
201
284
|
get schemaModel() {
|
|
202
|
-
return (0, ts_pattern_1.match)(this
|
|
285
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
203
286
|
.with({ type: 'generate' }, ({ context }) => context.schemaModel)
|
|
204
287
|
.with({ type: 'parse' }, () => {
|
|
205
288
|
throw new Error(`Cannot access schema model during parse phase`);
|
|
@@ -210,7 +293,7 @@ class CoreContext {
|
|
|
210
293
|
.exhaustive();
|
|
211
294
|
}
|
|
212
295
|
get generatorsMap() {
|
|
213
|
-
return (0, ts_pattern_1.match)(this
|
|
296
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
214
297
|
.with({ type: 'generate' }, ({ context }) => context.generatorsMap)
|
|
215
298
|
.with({ type: 'parse' }, () => {
|
|
216
299
|
throw new Error(`Cannot access schema model during parse phase`);
|
|
@@ -221,7 +304,7 @@ class CoreContext {
|
|
|
221
304
|
.exhaustive();
|
|
222
305
|
}
|
|
223
306
|
get parsedDocument() {
|
|
224
|
-
return (0, ts_pattern_1.match)(this
|
|
307
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
225
308
|
.with({ type: 'parse' }, ({ context }) => context.parsedDocument)
|
|
226
309
|
.with({ type: 'generate' }, () => {
|
|
227
310
|
throw new Error(`Cannot access parsed document during generate phase`);
|
|
@@ -232,7 +315,7 @@ class CoreContext {
|
|
|
232
315
|
.exhaustive();
|
|
233
316
|
}
|
|
234
317
|
get settings() {
|
|
235
|
-
return (0, ts_pattern_1.match)(this
|
|
318
|
+
return (0, ts_pattern_1.match)(__classPrivateFieldGet(this, _CoreContext_phase, "f"))
|
|
236
319
|
.with({ type: 'generate' }, ({ context }) => context.settings)
|
|
237
320
|
.with({ type: 'parse' }, () => {
|
|
238
321
|
throw new Error(`Cannot access settings during parse phase`);
|
|
@@ -244,3 +327,26 @@ class CoreContext {
|
|
|
244
327
|
}
|
|
245
328
|
}
|
|
246
329
|
exports.CoreContext = CoreContext;
|
|
330
|
+
_CoreContext_phase = new WeakMap(), _CoreContext_results = new WeakMap();
|
|
331
|
+
const applyResult = ({ current, incoming }) => {
|
|
332
|
+
return (current === undefined ||
|
|
333
|
+
(current === 'success' && incoming !== 'success') ||
|
|
334
|
+
(current === 'warn' && incoming === 'error'));
|
|
335
|
+
};
|
|
336
|
+
function jsonFormatter({ logRecord, context }) {
|
|
337
|
+
return JSON.stringify({
|
|
338
|
+
...context.getLogFields(),
|
|
339
|
+
level: logRecord.levelName,
|
|
340
|
+
datetime: logRecord.datetime.getTime(),
|
|
341
|
+
message: logRecord.msg,
|
|
342
|
+
args: flattenArgs(logRecord.args)
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
function flattenArgs(args) {
|
|
346
|
+
if (args.length === 1) {
|
|
347
|
+
return args[0];
|
|
348
|
+
}
|
|
349
|
+
else if (args.length > 1) {
|
|
350
|
+
return args;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
@@ -8,6 +8,7 @@ import type { BaseSettings, ClientSettings } from '../types/Settings.js';
|
|
|
8
8
|
import type { Method } from '../types/Method.js';
|
|
9
9
|
import type { OperationInsertable, OperationGenerator } from '../dsl/OperationInsertable.js';
|
|
10
10
|
import type { OasOperation } from '../oas/operation/Operation.js';
|
|
11
|
+
import type { ModelGeneratorKey, OperationGeneratorKey } from '../types/GeneratorKeys.js';
|
|
11
12
|
import type { CoreContext } from './CoreContext.js';
|
|
12
13
|
import type { ModelInsertable, ModelGenerator } from '../dsl/ModelInsertable.js';
|
|
13
14
|
import type { GenerationType, GeneratedDefintion, GeneratedValue } from '../types/GeneratedValue.js';
|
|
@@ -64,7 +65,10 @@ export declare class GenerateContext {
|
|
|
64
65
|
schemaModel: OasDocument;
|
|
65
66
|
settings: ClientSettings | undefined;
|
|
66
67
|
generatorsMap: Record<string, OperationGenerator | ModelGenerator>;
|
|
68
|
+
currentLocation: OperationGeneratorKey | ModelGeneratorKey | undefined;
|
|
67
69
|
constructor({ schemaModel, generatorsMap, settings }: ConstructorArgs);
|
|
70
|
+
setCurrentLocation(location: OperationGeneratorKey | ModelGeneratorKey): void;
|
|
71
|
+
getLogFields(): Record<string, string>;
|
|
68
72
|
getFile(filePath: string, { throwIfNotFound }?: GetFileOptions): FileContents;
|
|
69
73
|
register({ imports, packageDependencies, definitions, destinationPath }: RegisterArgs): void;
|
|
70
74
|
insert<V extends GeneratedValue, T extends GenerationType>({ coreContext, generation, destinationPath, ...rest }: InsertArgs<V, T> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenerateContext.d.ts","sourceRoot":"","sources":["../../src/context/GenerateContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,kBAAkB,EACnB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACxE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,+BA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,EACvB,WAAW,EACX,IAAI,EACJ,MAAM,EACP,EAAE,wBAAwB;IAwB3B,oBAAoB,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,oBAAoB;IAwBnE,OAAO,CAAC,cAAc,EAAE,MAAM,GAAG,YAAY;IAgB7C,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;IAWpE,mBAAmB,CAAC,EAClB,WAAW,EACX,YAAY,EACZ,SAAS,EACV,EAAE,uBAAuB;IAc1B,oDAAoD;IACpD,cAAc,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS;CAGvE"}
|
|
@@ -44,6 +44,12 @@ class GenerateContext {
|
|
|
44
44
|
writable: true,
|
|
45
45
|
value: void 0
|
|
46
46
|
});
|
|
47
|
+
Object.defineProperty(this, "currentLocation", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
configurable: true,
|
|
50
|
+
writable: true,
|
|
51
|
+
value: void 0
|
|
52
|
+
});
|
|
47
53
|
this.generatorsMap = generatorsMap;
|
|
48
54
|
this.files = new Map();
|
|
49
55
|
this.renderDependencies = new Map();
|
|
@@ -51,6 +57,12 @@ class GenerateContext {
|
|
|
51
57
|
this.schemaModel = schemaModel;
|
|
52
58
|
this.settings = settings;
|
|
53
59
|
}
|
|
60
|
+
setCurrentLocation(location) {
|
|
61
|
+
this.currentLocation = location;
|
|
62
|
+
}
|
|
63
|
+
getLogFields() {
|
|
64
|
+
return this.currentLocation ? (0, GeneratorKeys_js_1.fromGeneratorKey)(this.currentLocation) : {};
|
|
65
|
+
}
|
|
54
66
|
getFile(filePath, { throwIfNotFound = false } = {}) {
|
|
55
67
|
const normalisedPath = (0, mod_js_1.normalize)(filePath);
|
|
56
68
|
const currentFile = this.files.get(normalisedPath);
|
|
@@ -3,8 +3,9 @@ import type { AddGeneratorKeyArgs, FileContents, RenderDependencies, RenderOptio
|
|
|
3
3
|
import type { ClientSettings } from '../types/Settings.js';
|
|
4
4
|
import type { Definition } from '../dsl/Definition.js';
|
|
5
5
|
import type { PickArgs } from './GenerateContext.js';
|
|
6
|
-
import type { ManifestContent } from '../types/Manifest.js';
|
|
6
|
+
import type { ManifestContent, Results } from '../types/Manifest.js';
|
|
7
7
|
type ConstructorArgs = {
|
|
8
|
+
results: Results;
|
|
8
9
|
files: Map<string, FileContents>;
|
|
9
10
|
packageDependencies: Map<string, string>;
|
|
10
11
|
prettier?: PrettierConfigType;
|
|
@@ -20,6 +21,7 @@ export type RenderResult = FilesRenderResult & {
|
|
|
20
21
|
renderDependencies: Record<string, string[]>;
|
|
21
22
|
};
|
|
22
23
|
export declare class RenderContext {
|
|
24
|
+
#private;
|
|
23
25
|
files: Map<string, FileContents>;
|
|
24
26
|
renderDependencies: RenderDependencies;
|
|
25
27
|
packageDependencies: Map<string, string>;
|
|
@@ -27,7 +29,7 @@ export declare class RenderContext {
|
|
|
27
29
|
settings: ClientSettings | undefined;
|
|
28
30
|
currentDestinationPath: string | 'PRE_RENDER' | 'POST_RENDER';
|
|
29
31
|
pinnableGenerators: string[];
|
|
30
|
-
constructor({ files, packageDependencies, prettier, settings, renderDependencies, pinnableGenerators }: ConstructorArgs);
|
|
32
|
+
constructor({ results, files, packageDependencies, prettier, settings, renderDependencies, pinnableGenerators }: ConstructorArgs);
|
|
31
33
|
toPackageJson(): string;
|
|
32
34
|
render({ packageJson, startTime }: RenderOptions): RenderResult;
|
|
33
35
|
private collate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderContext.d.ts","sourceRoot":"","sources":["../../src/context/RenderContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAGpE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACd,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,cAAc,EAAE,M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AC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;CAC7C,CAAA;AAED,qBAAa,aAAa;;IAExB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IAChC,kBAAkB,EAAE,kBAAkB,CAAA;IACtC,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxC,OAAO,CAAC,QAAQ,CAAC,CAAoB;IACrC,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,sBAAsB,EAAE,MAAM,GAAG,YAAY,GAAG,aAAa,CAAA;IAC7D,kBAAkB,EAAE,MAAM,EAAE,CAAA;gBAChB,EACV,OAAO,EACP,KAAK,EACL,mBAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EACnB,EAAE,eAAe;IAWlB,aAAa,IAAI,MAAM;IAQvB,MAAM,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,aAAa,GAAG,YAAY;IAoC/D,OAAO,CAAC,OAAO;IA4Df,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY;IAavC,eAAe,CAAC,EAAE,YAAY,EAAE,EAAE,mBAAmB;IAarD,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS;CAG7D"}
|
|
@@ -22,9 +22,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
26
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
27
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
28
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
29
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
30
|
+
};
|
|
31
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
32
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
33
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
34
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
35
|
+
};
|
|
25
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
38
|
};
|
|
39
|
+
var _RenderContext_results;
|
|
28
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
41
|
exports.RenderContext = void 0;
|
|
30
42
|
const Sentry = __importStar(require("@sentry/deno"));
|
|
@@ -33,7 +45,8 @@ const tiny_invariant_1 = __importDefault(require("tiny-invariant"));
|
|
|
33
45
|
const mod_js_1 = require("../deps/jsr.io/@std/path/1.0.0/mod.js");
|
|
34
46
|
const toResolvedArtifactPath_js_1 = require("../helpers/toResolvedArtifactPath.js");
|
|
35
47
|
class RenderContext {
|
|
36
|
-
constructor({ files, packageDependencies, prettier, settings, renderDependencies, pinnableGenerators }) {
|
|
48
|
+
constructor({ results, files, packageDependencies, prettier, settings, renderDependencies, pinnableGenerators }) {
|
|
49
|
+
_RenderContext_results.set(this, void 0);
|
|
37
50
|
Object.defineProperty(this, "files", {
|
|
38
51
|
enumerable: true,
|
|
39
52
|
configurable: true,
|
|
@@ -76,6 +89,7 @@ class RenderContext {
|
|
|
76
89
|
writable: true,
|
|
77
90
|
value: void 0
|
|
78
91
|
});
|
|
92
|
+
__classPrivateFieldSet(this, _RenderContext_results, results, "f");
|
|
79
93
|
this.currentDestinationPath = 'PRE_RENDER';
|
|
80
94
|
this.renderDependencies = renderDependencies;
|
|
81
95
|
this.files = files;
|
|
@@ -165,6 +179,7 @@ class RenderContext {
|
|
|
165
179
|
manifest: {
|
|
166
180
|
createdAt: new Date().toISOString(),
|
|
167
181
|
files: {},
|
|
182
|
+
results: __classPrivateFieldGet(this, _RenderContext_results, "f"),
|
|
168
183
|
pinnable: {}
|
|
169
184
|
}
|
|
170
185
|
});
|
|
@@ -186,6 +201,7 @@ class RenderContext {
|
|
|
186
201
|
}
|
|
187
202
|
}
|
|
188
203
|
exports.RenderContext = RenderContext;
|
|
204
|
+
_RenderContext_results = new WeakMap();
|
|
189
205
|
const renderFile = ({ file, destinationPath, basePath }) => {
|
|
190
206
|
const imports = Array.from(file.imports.entries()).map(([module, importItems]) => new Import_js_1.Import({ module, importNames: Array.from(importItems) }));
|
|
191
207
|
const definitions = Array.from(file.definitions.values());
|