@powerlines/plugin-env 0.15.121 → 0.15.122
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/dist/_virtual/rolldown_runtime.cjs +0 -4
- package/dist/babel/plugin.cjs +11 -11
- package/dist/babel/plugin.d.mts +2 -2
- package/dist/babel/plugin.mjs +5 -5
- package/dist/components/docs.cjs +8 -8
- package/dist/components/docs.d.mts +1 -1
- package/dist/components/docs.mjs +4 -4
- package/dist/components/env.cjs +43 -42
- package/dist/components/env.d.mts +2 -2
- package/dist/components/env.mjs +11 -11
- package/dist/deepkit/schemas/reflection.cjs +5426 -0
- package/dist/deepkit/schemas/reflection.mjs +5423 -0
- package/dist/deepkit/schemas/reflection2.cjs +4112 -0
- package/dist/deepkit/schemas/reflection2.mjs +4110 -0
- package/dist/deepkit/src/capnp.cjs +1692 -0
- package/dist/deepkit/src/capnp.mjs +1690 -0
- package/dist/deepkit/src/esbuild-plugin.cjs +99 -0
- package/dist/deepkit/src/esbuild-plugin.mjs +98 -0
- package/dist/deepkit/src/reflect-type.cjs +40 -0
- package/dist/deepkit/src/reflect-type.mjs +38 -0
- package/dist/deepkit/src/resolve-reflections.cjs +23 -0
- package/dist/deepkit/src/resolve-reflections.mjs +22 -0
- package/dist/deepkit/src/transformer.cjs +92 -0
- package/dist/deepkit/src/transformer.mjs +89 -0
- package/dist/deepkit/src/transpile.cjs +39 -0
- package/dist/deepkit/src/transpile.mjs +37 -0
- package/dist/deepkit/src/types.cjs +22 -0
- package/dist/deepkit/src/types.mjs +21 -0
- package/dist/deepkit/src/utilities.cjs +184 -0
- package/dist/deepkit/src/utilities.mjs +183 -0
- package/dist/helpers/automd-generator.cjs +4 -4
- package/dist/helpers/automd-generator.d.mts +1 -1
- package/dist/helpers/automd-generator.mjs +2 -2
- package/dist/helpers/docs-helper.cjs +3 -2
- package/dist/helpers/docs-helper.mjs +1 -1
- package/dist/helpers/load.cjs +15 -14
- package/dist/helpers/load.mjs +10 -10
- package/dist/helpers/persistence.cjs +23 -23
- package/dist/helpers/persistence.d.mts +1 -1
- package/dist/helpers/persistence.mjs +5 -5
- package/dist/helpers/reflect.cjs +9 -9
- package/dist/helpers/reflect.mjs +3 -3
- package/dist/helpers/source-file-env.cjs +1 -1
- package/dist/helpers/source-file-env.mjs +1 -1
- package/dist/index.cjs +24 -26
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +14 -14
- package/dist/plugin-alloy/src/core/components/output.cjs +43 -0
- package/dist/plugin-alloy/src/core/components/output.mjs +42 -0
- package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +22 -0
- package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +21 -0
- package/dist/plugin-alloy/src/core/components/source-file.cjs +64 -0
- package/dist/plugin-alloy/src/core/components/source-file.mjs +62 -0
- package/dist/plugin-alloy/src/core/contexts/context.cjs +134 -0
- package/dist/plugin-alloy/src/core/contexts/context.mjs +126 -0
- package/dist/plugin-alloy/src/core/contexts/index.cjs +2 -0
- package/dist/plugin-alloy/src/core/contexts/index.mjs +4 -0
- package/dist/plugin-alloy/src/core/contexts/reflection.cjs +110 -0
- package/dist/plugin-alloy/src/core/contexts/reflection.mjs +101 -0
- package/dist/plugin-alloy/src/helpers/refkey.cjs +23 -0
- package/dist/plugin-alloy/src/helpers/refkey.mjs +22 -0
- package/dist/plugin-alloy/src/index.cjs +105 -0
- package/dist/plugin-alloy/src/index.mjs +103 -0
- package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +115 -0
- package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +114 -0
- package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +39 -0
- package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +38 -0
- package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +72 -0
- package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +71 -0
- package/dist/plugin-alloy/src/types/components.cjs +22 -0
- package/dist/{packages/plugin-alloy → plugin-alloy}/src/types/components.d.mts +1 -1
- package/dist/plugin-alloy/src/types/components.mjs +21 -0
- package/dist/plugin-alloy/src/types/plugin.cjs +53 -0
- package/dist/plugin-alloy/src/types/plugin.mjs +50 -0
- package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +62 -0
- package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +61 -0
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +131 -0
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +129 -0
- package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +451 -0
- package/dist/{packages/plugin-alloy → plugin-alloy}/src/typescript/components/tsdoc.d.mts +1 -1
- package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +442 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +216 -0
- package/dist/{packages/plugin-alloy → plugin-alloy}/src/typescript/components/typescript-file.d.mts +1 -1
- package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +213 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +72 -0
- package/dist/{packages/plugin-alloy → plugin-alloy}/src/typescript/components/typescript-interface.d.mts +1 -1
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +71 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +124 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +123 -0
- package/dist/plugin-automd/src/index.cjs +127 -0
- package/dist/plugin-automd/src/index.mjs +124 -0
- package/dist/plugin-automd/src/types/plugin.cjs +47 -0
- package/dist/plugin-automd/src/types/plugin.mjs +47 -0
- package/dist/plugin-automd/src/types/toc.cjs +26 -0
- package/dist/plugin-automd/src/types/toc.mjs +25 -0
- package/dist/plugin-babel/src/helpers/ast-utils.cjs +74 -0
- package/dist/plugin-babel/src/helpers/ast-utils.mjs +70 -0
- package/dist/plugin-babel/src/helpers/create-plugin.cjs +71 -0
- package/dist/plugin-babel/src/helpers/create-plugin.mjs +69 -0
- package/dist/plugin-babel/src/helpers/filters.cjs +158 -0
- package/dist/plugin-babel/src/helpers/filters.mjs +154 -0
- package/dist/plugin-babel/src/helpers/index.cjs +5 -0
- package/dist/plugin-babel/src/helpers/index.mjs +7 -0
- package/dist/plugin-babel/src/helpers/module-helpers.cjs +200 -0
- package/dist/plugin-babel/src/helpers/module-helpers.mjs +192 -0
- package/dist/plugin-babel/src/helpers/options.cjs +73 -0
- package/dist/plugin-babel/src/helpers/options.mjs +70 -0
- package/dist/plugin-babel/src/index.cjs +125 -0
- package/dist/plugin-babel/src/index.mjs +123 -0
- package/dist/plugin-babel/src/types/plugin.cjs +42 -0
- package/dist/plugin-babel/src/types/plugin.mjs +39 -0
- package/dist/powerlines/src/internal/helpers/hooks.cjs +136 -0
- package/dist/powerlines/src/internal/helpers/hooks.mjs +134 -0
- package/dist/powerlines/src/lib/build/esbuild.cjs +142 -0
- package/dist/powerlines/src/lib/build/esbuild.mjs +140 -0
- package/dist/powerlines/src/lib/constants/environments.cjs +6 -0
- package/dist/powerlines/src/lib/constants/environments.mjs +5 -0
- package/dist/powerlines/src/lib/entry.cjs +195 -0
- package/dist/powerlines/src/lib/entry.mjs +194 -0
- package/dist/powerlines/src/lib/logger.cjs +108 -0
- package/dist/powerlines/src/lib/logger.mjs +106 -0
- package/dist/powerlines/src/lib/unplugin/helpers.cjs +41 -0
- package/dist/powerlines/src/lib/unplugin/helpers.mjs +40 -0
- package/dist/powerlines/src/lib/unplugin/module-resolution.cjs +98 -0
- package/dist/powerlines/src/lib/unplugin/module-resolution.mjs +97 -0
- package/dist/powerlines/src/lib/unplugin/plugin.cjs +139 -0
- package/dist/powerlines/src/lib/unplugin/plugin.mjs +138 -0
- package/dist/powerlines/src/lib/utilities/bundle.cjs +74 -0
- package/dist/powerlines/src/lib/utilities/bundle.mjs +72 -0
- package/dist/powerlines/src/lib/utilities/resolve.cjs +69 -0
- package/dist/powerlines/src/lib/utilities/resolve.mjs +68 -0
- package/dist/powerlines/src/lib/utilities/source-file.cjs +68 -0
- package/dist/powerlines/src/lib/utilities/source-file.mjs +66 -0
- package/dist/powerlines/src/plugin-utils/paths.cjs +46 -0
- package/dist/powerlines/src/plugin-utils/paths.mjs +45 -0
- package/dist/powerlines/src/types/api.cjs +62 -0
- package/dist/powerlines/src/types/api.mjs +62 -0
- package/dist/powerlines/src/types/babel.cjs +156 -0
- package/dist/powerlines/src/types/babel.mjs +147 -0
- package/dist/powerlines/src/types/build.cjs +127 -0
- package/dist/{packages/powerlines → powerlines}/src/types/build.d.mts +6 -6
- package/dist/powerlines/src/types/build.mjs +121 -0
- package/dist/powerlines/src/types/commands.cjs +16 -0
- package/dist/powerlines/src/types/commands.mjs +15 -0
- package/dist/powerlines/src/types/config.cjs +420 -0
- package/dist/{packages/powerlines → powerlines}/src/types/config.d.mts +2 -1
- package/dist/powerlines/src/types/config.mjs +397 -0
- package/dist/powerlines/src/types/context.cjs +388 -0
- package/dist/{packages/powerlines → powerlines}/src/types/context.d.mts +2 -2
- package/dist/powerlines/src/types/context.mjs +371 -0
- package/dist/powerlines/src/types/fs.cjs +78 -0
- package/dist/powerlines/src/types/fs.mjs +75 -0
- package/dist/powerlines/src/types/hooks.cjs +71 -0
- package/dist/powerlines/src/types/hooks.mjs +68 -0
- package/dist/powerlines/src/types/index.cjs +11 -0
- package/dist/powerlines/src/types/index.mjs +13 -0
- package/dist/powerlines/src/types/plugin.cjs +184 -0
- package/dist/{packages/powerlines → powerlines}/src/types/plugin.d.mts +1 -1
- package/dist/powerlines/src/types/plugin.mjs +178 -0
- package/dist/powerlines/src/types/resolved.cjs +149 -0
- package/dist/powerlines/src/types/resolved.mjs +144 -0
- package/dist/{packages/powerlines → powerlines}/src/types/tsconfig.d.mts +1 -1
- package/dist/powerlines/src/types/unplugin.cjs +64 -0
- package/dist/{packages/powerlines → powerlines}/src/types/unplugin.d.mts +1 -1
- package/dist/powerlines/src/types/unplugin.mjs +62 -0
- package/dist/types/plugin.cjs +18 -19
- package/dist/types/plugin.d.mts +6 -6
- package/dist/types/plugin.mjs +4 -4
- package/package.json +7 -7
- package/dist/_virtual/rolldown_runtime.mjs +0 -33
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/parse-type-definition.cjs +0 -37
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/parse-type-definition.mjs +0 -37
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/to-array.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/to-array.mjs +0 -14
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +0 -14
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +0 -3
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +0 -5
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +0 -6
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +0 -6
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +0 -3
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +0 -19
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +0 -19
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +0 -63
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +0 -63
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +0 -11
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +0 -16
- package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/is-parent-path.cjs +0 -32
- package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/is-parent-path.mjs +0 -32
- package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/is-type.cjs +0 -28
- package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/is-type.mjs +0 -28
- package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/join-paths.cjs +0 -106
- package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/join-paths.mjs +0 -106
- package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/regex.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/regex.mjs +0 -8
- package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/slash.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/slash.mjs +0 -14
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.cjs +0 -346
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.mjs +0 -346
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.cjs +0 -786
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.mjs +0 -786
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/jsonc.cjs +0 -3
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/jsonc.mjs +0 -3
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.cjs +0 -23
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.mjs +0 -22
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.cjs +0 -405
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.mjs +0 -404
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.cjs +0 -657
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.mjs +0 -657
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.cjs +0 -1054
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.mjs +0 -1054
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs +0 -43
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs +0 -42
- package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.cjs +0 -46
- package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs +0 -45
- package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.cjs +0 -288
- package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.mjs +0 -285
- package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.cjs +0 -71
- package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.mjs +0 -68
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +0 -1013
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +0 -1007
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.cjs +0 -23
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs +0 -13
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs +0 -2698
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +0 -2685
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs +0 -4457
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs +0 -4454
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.cjs +0 -29
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs +0 -29
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +0 -181
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +0 -176
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +0 -22
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +0 -17
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs +0 -3967
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs +0 -3962
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.cjs +0 -11768
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs +0 -11763
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +0 -25
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs +0 -20
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.cjs +0 -20
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs +0 -17
- package/dist/node_modules/.pnpm/nypm@0.6.4/node_modules/nypm/dist/index.cjs +0 -194
- package/dist/node_modules/.pnpm/nypm@0.6.4/node_modules/nypm/dist/index.mjs +0 -191
- package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.cjs +0 -13
- package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs +0 -12
- package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.cjs +0 -3
- package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs +0 -3
- package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs +0 -145
- package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +0 -138
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +0 -127
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +0 -125
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.cjs +0 -138
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +0 -136
- package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.cjs +0 -629
- package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs +0 -627
- /package/dist/{packages/deepkit → deepkit}/schemas/reflection.d.mts +0 -0
- /package/dist/{packages/deepkit → deepkit}/src/types.d.mts +0 -0
- /package/dist/{packages/plugin-alloy → plugin-alloy}/src/core/components/source-file.d.mts +0 -0
- /package/dist/{packages/plugin-alloy → plugin-alloy}/src/markdown/components/markdown-file.d.mts +0 -0
- /package/dist/{packages/plugin-alloy → plugin-alloy}/src/types/index.d.mts +0 -0
- /package/dist/{packages/plugin-alloy → plugin-alloy}/src/types/plugin.d.mts +0 -0
- /package/dist/{packages/plugin-alloy → plugin-alloy}/src/typescript/components/builtin-file.d.mts +0 -0
- /package/dist/{packages/plugin-automd → plugin-automd}/src/types/plugin.d.mts +0 -0
- /package/dist/{packages/plugin-automd → plugin-automd}/src/types/toc.d.mts +0 -0
- /package/dist/{packages/plugin-babel → plugin-babel}/src/types/index.d.mts +0 -0
- /package/dist/{packages/plugin-babel → plugin-babel}/src/types/plugin.d.mts +0 -0
- /package/dist/{packages/powerlines → powerlines}/src/internal/helpers/hooks.d.mts +0 -0
- /package/dist/{packages/powerlines → powerlines}/src/types/api.d.mts +0 -0
- /package/dist/{packages/powerlines → powerlines}/src/types/babel.d.mts +0 -0
- /package/dist/{packages/powerlines → powerlines}/src/types/commands.d.mts +0 -0
- /package/dist/{packages/powerlines → powerlines}/src/types/fs.d.mts +0 -0
- /package/dist/{packages/powerlines → powerlines}/src/types/hooks.d.mts +0 -0
- /package/dist/{packages/powerlines → powerlines}/src/types/index.d.mts +0 -0
- /package/dist/{packages/powerlines → powerlines}/src/types/resolved.d.mts +0 -0
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
import { usePowerlinesSafe } from "../../core/contexts/context.mjs";
|
|
2
|
+
import { stringifyDefaultValue } from "../../../../deepkit/src/utilities.mjs";
|
|
3
|
+
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
4
|
+
import { For, List, Prose, Show, childrenArray, splitProps } from "@alloy-js/core";
|
|
5
|
+
import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
6
|
+
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
7
|
+
|
|
8
|
+
//#region ../plugin-alloy/src/typescript/components/tsdoc.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Generates a TypeScript interface for the given reflection class.
|
|
11
|
+
*/
|
|
12
|
+
function TSDoc(props) {
|
|
13
|
+
const [{ children, heading }] = splitProps(props, ["children", "heading"]);
|
|
14
|
+
return [
|
|
15
|
+
"/**",
|
|
16
|
+
createIntrinsic("align", {
|
|
17
|
+
string: " * ",
|
|
18
|
+
get children() {
|
|
19
|
+
return [
|
|
20
|
+
createIntrinsic("hbr", {}),
|
|
21
|
+
createComponent(Show, {
|
|
22
|
+
get when() {
|
|
23
|
+
return !isUndefined(heading);
|
|
24
|
+
},
|
|
25
|
+
get children() {
|
|
26
|
+
return [
|
|
27
|
+
heading,
|
|
28
|
+
createIntrinsic("hbr", {}),
|
|
29
|
+
createComponent(Show, {
|
|
30
|
+
get when() {
|
|
31
|
+
return memo(() => !!!isUndefined(children))() && childrenArray(() => children).length > 0;
|
|
32
|
+
},
|
|
33
|
+
get children() {
|
|
34
|
+
return createIntrinsic("hbr", {});
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
}),
|
|
40
|
+
createComponent(Show, {
|
|
41
|
+
get when() {
|
|
42
|
+
return memo(() => !!!isUndefined(children))() && childrenArray(() => children).length > 0;
|
|
43
|
+
},
|
|
44
|
+
get children() {
|
|
45
|
+
return createComponent(List, { get children() {
|
|
46
|
+
return childrenArray(() => children);
|
|
47
|
+
} });
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
53
|
+
createIntrinsic("hbr", {}),
|
|
54
|
+
` */`,
|
|
55
|
+
createIntrinsic("hbr", {})
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create a TSDoc `@<props.tag>` tag.
|
|
60
|
+
*/
|
|
61
|
+
function TSDocTag(props) {
|
|
62
|
+
const [{ children, tag }] = splitProps(props, ["children", "tag"]);
|
|
63
|
+
return [
|
|
64
|
+
`@${tag} `,
|
|
65
|
+
createComponent(Show, {
|
|
66
|
+
get when() {
|
|
67
|
+
return Boolean(children);
|
|
68
|
+
},
|
|
69
|
+
get children() {
|
|
70
|
+
return createIntrinsic("align", {
|
|
71
|
+
width: 2,
|
|
72
|
+
get children() {
|
|
73
|
+
return createComponent(Prose, { children });
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}),
|
|
78
|
+
createIntrinsic("hbr", {})
|
|
79
|
+
];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Create a TSDoc `@title` tag.
|
|
83
|
+
*/
|
|
84
|
+
function TSDocTitle(props) {
|
|
85
|
+
const [{ children }, rest] = splitProps(props, ["children"]);
|
|
86
|
+
return createComponent(TSDocTag, mergeProps(rest, {
|
|
87
|
+
tag: "title",
|
|
88
|
+
children
|
|
89
|
+
}));
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Create a TSDoc `@domain` tag.
|
|
93
|
+
*/
|
|
94
|
+
function TSDocDomain(props) {
|
|
95
|
+
const [{ children }, rest] = splitProps(props, ["children"]);
|
|
96
|
+
return createComponent(TSDocTag, mergeProps(rest, {
|
|
97
|
+
tag: "domain",
|
|
98
|
+
children
|
|
99
|
+
}));
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Create a TSDoc `@alias` tag.
|
|
103
|
+
*/
|
|
104
|
+
function TSDocAlias(props) {
|
|
105
|
+
const [{ children }, rest] = splitProps(props, ["children"]);
|
|
106
|
+
return createComponent(TSDocTag, mergeProps(rest, {
|
|
107
|
+
tag: "alias",
|
|
108
|
+
children
|
|
109
|
+
}));
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Create a TSDoc `@permission` tag.
|
|
113
|
+
*/
|
|
114
|
+
function TSDocPermission(props) {
|
|
115
|
+
const [{ children }, rest] = splitProps(props, ["children"]);
|
|
116
|
+
return createComponent(TSDocTag, mergeProps(rest, {
|
|
117
|
+
tag: "permission",
|
|
118
|
+
children
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Create a TSDoc `@defaultValue` tag.
|
|
123
|
+
*/
|
|
124
|
+
function TSDocDefaultValue(props) {
|
|
125
|
+
const [{ type, defaultValue }] = splitProps(props, ["type", "defaultValue"]);
|
|
126
|
+
return [
|
|
127
|
+
"@defaultValue ",
|
|
128
|
+
createComponent(Show, {
|
|
129
|
+
get when() {
|
|
130
|
+
return !isUndefined(defaultValue);
|
|
131
|
+
},
|
|
132
|
+
get children() {
|
|
133
|
+
return createIntrinsic("align", {
|
|
134
|
+
width: 2,
|
|
135
|
+
get children() {
|
|
136
|
+
return createComponent(Prose, { get children() {
|
|
137
|
+
return stringifyDefaultValue(type, defaultValue);
|
|
138
|
+
} });
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}),
|
|
143
|
+
createIntrinsic("hbr", {})
|
|
144
|
+
];
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Create a TSDoc `@remarks` tag.
|
|
148
|
+
*/
|
|
149
|
+
function TSDocRemarks(props) {
|
|
150
|
+
return [
|
|
151
|
+
"@remarks ",
|
|
152
|
+
createIntrinsic("hbr", {}),
|
|
153
|
+
createComponent(List, {
|
|
154
|
+
hardline: true,
|
|
155
|
+
get children() {
|
|
156
|
+
return childrenArray(() => props.children);
|
|
157
|
+
}
|
|
158
|
+
})
|
|
159
|
+
];
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Create a TSDoc `@see` tag.
|
|
163
|
+
*/
|
|
164
|
+
function TSDocLink(props) {
|
|
165
|
+
return createComponent(TSDocTag, mergeProps(props, { tag: "see" }));
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Create a TSDoc `@example` tag.
|
|
169
|
+
*/
|
|
170
|
+
function TSDocExample(props) {
|
|
171
|
+
const [{ tsx, fenced = true, language, children }] = splitProps(props, [
|
|
172
|
+
"tsx",
|
|
173
|
+
"fenced",
|
|
174
|
+
"language",
|
|
175
|
+
"children"
|
|
176
|
+
]);
|
|
177
|
+
return [
|
|
178
|
+
"@example ",
|
|
179
|
+
createIntrinsic("hbr", {}),
|
|
180
|
+
createComponent(Show, {
|
|
181
|
+
when: fenced,
|
|
182
|
+
get children() {
|
|
183
|
+
return [
|
|
184
|
+
"```",
|
|
185
|
+
language || (tsx ? "tsx" : "ts"),
|
|
186
|
+
createIntrinsic("hbr", {})
|
|
187
|
+
];
|
|
188
|
+
}
|
|
189
|
+
}),
|
|
190
|
+
children,
|
|
191
|
+
createComponent(Show, {
|
|
192
|
+
when: fenced,
|
|
193
|
+
get children() {
|
|
194
|
+
return [createIntrinsic("hbr", {}), "```"];
|
|
195
|
+
}
|
|
196
|
+
})
|
|
197
|
+
];
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Create a TSDoc `@readonly` tag.
|
|
201
|
+
*/
|
|
202
|
+
function TSDocReadonly() {
|
|
203
|
+
return createComponent(TSDocTag, { tag: "readonly" });
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Create a TSDoc `@internal` tag.
|
|
207
|
+
*/
|
|
208
|
+
function TSDocInternal() {
|
|
209
|
+
return createComponent(TSDocTag, { tag: "internal" });
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Create a TSDoc `@ignore` tag.
|
|
213
|
+
*/
|
|
214
|
+
function TSDocIgnore() {
|
|
215
|
+
return createComponent(TSDocTag, { tag: "ignore" });
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Create a TSDoc `@hidden` tag.
|
|
219
|
+
*/
|
|
220
|
+
function TSDocHidden() {
|
|
221
|
+
return createComponent(TSDocTag, { tag: "hidden" });
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Generates a TypeScript interface property for the given reflection class.
|
|
225
|
+
*/
|
|
226
|
+
function TSDocAttributesTags(props) {
|
|
227
|
+
const [{ type, title, alias, permission, domain, readonly, internal, ignore, hidden, defaultValue }] = splitProps(props, [
|
|
228
|
+
"type",
|
|
229
|
+
"title",
|
|
230
|
+
"alias",
|
|
231
|
+
"permission",
|
|
232
|
+
"domain",
|
|
233
|
+
"readonly",
|
|
234
|
+
"internal",
|
|
235
|
+
"ignore",
|
|
236
|
+
"hidden",
|
|
237
|
+
"defaultValue"
|
|
238
|
+
]);
|
|
239
|
+
return [
|
|
240
|
+
createComponent(Show, {
|
|
241
|
+
get when() {
|
|
242
|
+
return isSetString(title?.trim());
|
|
243
|
+
},
|
|
244
|
+
get children() {
|
|
245
|
+
return createComponent(TSDocTitle, { children: title });
|
|
246
|
+
}
|
|
247
|
+
}),
|
|
248
|
+
createComponent(Show, {
|
|
249
|
+
get when() {
|
|
250
|
+
return memo(() => !!(!isUndefined(alias) && alias.length > 0))() && alias.some((a) => isSetString(a?.trim()));
|
|
251
|
+
},
|
|
252
|
+
get children() {
|
|
253
|
+
return createComponent(For, {
|
|
254
|
+
get each() {
|
|
255
|
+
return alias?.filter((a) => isSetString(a?.trim())) ?? [];
|
|
256
|
+
},
|
|
257
|
+
children: (alias$1) => createComponent(TSDocAlias, { children: alias$1 })
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
}),
|
|
261
|
+
createComponent(Show, {
|
|
262
|
+
get when() {
|
|
263
|
+
return isSetString(domain?.trim());
|
|
264
|
+
},
|
|
265
|
+
get children() {
|
|
266
|
+
return createComponent(TSDocDomain, { children: domain });
|
|
267
|
+
}
|
|
268
|
+
}),
|
|
269
|
+
createComponent(Show, {
|
|
270
|
+
get when() {
|
|
271
|
+
return memo(() => !!(!isUndefined(permission) && permission.length > 0))() && permission.some((p) => isSetString(p?.trim()));
|
|
272
|
+
},
|
|
273
|
+
get children() {
|
|
274
|
+
return createComponent(For, {
|
|
275
|
+
get each() {
|
|
276
|
+
return permission?.filter((p) => isSetString(p?.trim())) ?? [];
|
|
277
|
+
},
|
|
278
|
+
children: (permission$1) => createComponent(TSDocPermission, { children: permission$1 })
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
}),
|
|
282
|
+
createComponent(Show, {
|
|
283
|
+
when: readonly === true,
|
|
284
|
+
get children() {
|
|
285
|
+
return createComponent(TSDocReadonly, {});
|
|
286
|
+
}
|
|
287
|
+
}),
|
|
288
|
+
createComponent(Show, {
|
|
289
|
+
when: internal === true,
|
|
290
|
+
get children() {
|
|
291
|
+
return createComponent(TSDocInternal, {});
|
|
292
|
+
}
|
|
293
|
+
}),
|
|
294
|
+
createComponent(Show, {
|
|
295
|
+
when: ignore === true,
|
|
296
|
+
get children() {
|
|
297
|
+
return createComponent(TSDocIgnore, {});
|
|
298
|
+
}
|
|
299
|
+
}),
|
|
300
|
+
createComponent(Show, {
|
|
301
|
+
when: hidden === true,
|
|
302
|
+
get children() {
|
|
303
|
+
return createComponent(TSDocHidden, {});
|
|
304
|
+
}
|
|
305
|
+
}),
|
|
306
|
+
createComponent(Show, {
|
|
307
|
+
get when() {
|
|
308
|
+
return memo(() => !!!isUndefined(type))() && !isUndefined(defaultValue);
|
|
309
|
+
},
|
|
310
|
+
get children() {
|
|
311
|
+
return createComponent(TSDocDefaultValue, {
|
|
312
|
+
type,
|
|
313
|
+
defaultValue
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
})
|
|
317
|
+
];
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Create a TSDoc parameter set off with `@param`.
|
|
321
|
+
*/
|
|
322
|
+
function TSDocParam(props) {
|
|
323
|
+
return [
|
|
324
|
+
"@param ",
|
|
325
|
+
createComponent(TSDocParamName, {
|
|
326
|
+
get name() {
|
|
327
|
+
return props.name;
|
|
328
|
+
},
|
|
329
|
+
get optional() {
|
|
330
|
+
return props.optional;
|
|
331
|
+
},
|
|
332
|
+
get defaultValue() {
|
|
333
|
+
return props.defaultValue;
|
|
334
|
+
}
|
|
335
|
+
}),
|
|
336
|
+
createComponent(TSDocParamDescription, { get children() {
|
|
337
|
+
return props.children;
|
|
338
|
+
} })
|
|
339
|
+
];
|
|
340
|
+
}
|
|
341
|
+
function TSDocParamName(props) {
|
|
342
|
+
return [
|
|
343
|
+
createComponent(Show, {
|
|
344
|
+
get when() {
|
|
345
|
+
return props.optional;
|
|
346
|
+
},
|
|
347
|
+
children: "["
|
|
348
|
+
}),
|
|
349
|
+
memo(() => props.name),
|
|
350
|
+
createComponent(Show, {
|
|
351
|
+
get when() {
|
|
352
|
+
return Boolean(props.defaultValue);
|
|
353
|
+
},
|
|
354
|
+
get children() {
|
|
355
|
+
return ["=", memo(() => props.defaultValue)];
|
|
356
|
+
}
|
|
357
|
+
}),
|
|
358
|
+
createComponent(Show, {
|
|
359
|
+
get when() {
|
|
360
|
+
return props.optional;
|
|
361
|
+
},
|
|
362
|
+
children: "]"
|
|
363
|
+
})
|
|
364
|
+
];
|
|
365
|
+
}
|
|
366
|
+
function TSDocParamDescription(props) {
|
|
367
|
+
return createComponent(Show, {
|
|
368
|
+
get when() {
|
|
369
|
+
return Boolean(props.children);
|
|
370
|
+
},
|
|
371
|
+
get children() {
|
|
372
|
+
return [" - ", createIntrinsic("align", {
|
|
373
|
+
width: 2,
|
|
374
|
+
get children() {
|
|
375
|
+
return createComponent(Prose, { get children() {
|
|
376
|
+
return props.children;
|
|
377
|
+
} });
|
|
378
|
+
}
|
|
379
|
+
})];
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Create a TSDoc `@returns` tag.
|
|
385
|
+
*/
|
|
386
|
+
function TSDocReturns(props) {
|
|
387
|
+
return createComponent(TSDocTag, mergeProps(props, { tag: "returns" }));
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Create a TSDoc `@throws` tag.
|
|
391
|
+
*/
|
|
392
|
+
function TSDocThrows(props) {
|
|
393
|
+
return createComponent(TSDocTag, mergeProps(props, { tag: "throws" }));
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Generates a TSDoc `@module` tag for the given module name.
|
|
397
|
+
*/
|
|
398
|
+
function TSDocModule(props) {
|
|
399
|
+
const [{ children, name, prefix }] = splitProps(props, [
|
|
400
|
+
"children",
|
|
401
|
+
"name",
|
|
402
|
+
"prefix"
|
|
403
|
+
]);
|
|
404
|
+
const context = usePowerlinesSafe();
|
|
405
|
+
return [
|
|
406
|
+
"/**",
|
|
407
|
+
createIntrinsic("align", {
|
|
408
|
+
string: " * ",
|
|
409
|
+
get children() {
|
|
410
|
+
return [
|
|
411
|
+
createIntrinsic("hbr", {}),
|
|
412
|
+
createComponent(Show, {
|
|
413
|
+
get when() {
|
|
414
|
+
return Boolean(children);
|
|
415
|
+
},
|
|
416
|
+
get children() {
|
|
417
|
+
return [
|
|
418
|
+
createComponent(List, {
|
|
419
|
+
hardline: true,
|
|
420
|
+
get children() {
|
|
421
|
+
return childrenArray(() => children);
|
|
422
|
+
}
|
|
423
|
+
}),
|
|
424
|
+
createIntrinsic("hbr", {}),
|
|
425
|
+
createIntrinsic("hbr", {})
|
|
426
|
+
];
|
|
427
|
+
}
|
|
428
|
+
}),
|
|
429
|
+
"@module ",
|
|
430
|
+
memo(() => prefix || context?.config?.framework || "powerlines"),
|
|
431
|
+
":",
|
|
432
|
+
name
|
|
433
|
+
];
|
|
434
|
+
}
|
|
435
|
+
}),
|
|
436
|
+
createIntrinsic("hbr", {}),
|
|
437
|
+
` */`
|
|
438
|
+
];
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
//#endregion
|
|
442
|
+
export { TSDoc, TSDocAttributesTags, TSDocExample, TSDocLink, TSDocModule, TSDocParam, TSDocRemarks, TSDocReturns, TSDocThrows };
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_context = require('../../core/contexts/context.cjs');
|
|
3
|
+
const require_single_line_comment = require('../../core/components/single-line-comment.cjs');
|
|
4
|
+
const require_source_file = require('../../core/components/source-file.cjs');
|
|
5
|
+
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
6
|
+
let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
7
|
+
let __stryke_path_append = require("@stryke/path/append");
|
|
8
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
9
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
10
|
+
let __alloy_js_typescript = require("@alloy-js/typescript");
|
|
11
|
+
let __stryke_type_checks_is_boolean = require("@stryke/type-checks/is-boolean");
|
|
12
|
+
|
|
13
|
+
//#region ../plugin-alloy/src/typescript/components/typescript-file.tsx
|
|
14
|
+
/**
|
|
15
|
+
* A base component representing a Powerlines generated Typescript source file.
|
|
16
|
+
*
|
|
17
|
+
* @param props - The properties for the source file.
|
|
18
|
+
* @returns The rendered source file component.
|
|
19
|
+
*/
|
|
20
|
+
function TypescriptFile(props) {
|
|
21
|
+
const [{ children, path, imports, builtinImports, tsx, header, hashbang }, rest] = (0, __alloy_js_core.splitProps)(props, [
|
|
22
|
+
"children",
|
|
23
|
+
"path",
|
|
24
|
+
"imports",
|
|
25
|
+
"builtinImports",
|
|
26
|
+
"tsx",
|
|
27
|
+
"header",
|
|
28
|
+
"hashbang"
|
|
29
|
+
]);
|
|
30
|
+
const directoryContext = (0, __alloy_js_core.useContext)(__alloy_js_core.SourceDirectoryContext);
|
|
31
|
+
const sdData = (0, __alloy_js_typescript.getSourceDirectoryData)(directoryContext);
|
|
32
|
+
const modulePath = (0, __stryke_path_append.appendPath)(path, directoryContext.path);
|
|
33
|
+
const scope = new __alloy_js_typescript.TSModuleScope(modulePath, (0, __alloy_js_core.useScope)());
|
|
34
|
+
sdData.modules.add(scope);
|
|
35
|
+
const pkg = (0, __alloy_js_core.useContext)(__alloy_js_typescript.PackageContext);
|
|
36
|
+
if (pkg) pkg.scope.addModule(scope);
|
|
37
|
+
if (props.export) {
|
|
38
|
+
if (pkg) if ((0, __stryke_type_checks_is_boolean.isBoolean)(props.export)) pkg.scope.addExport(modulePath, scope);
|
|
39
|
+
else pkg.scope.addExport(props.export, scope);
|
|
40
|
+
}
|
|
41
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.SourceFileContext.Provider, {
|
|
42
|
+
value: { scope },
|
|
43
|
+
get children() {
|
|
44
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Scope, {
|
|
45
|
+
value: scope,
|
|
46
|
+
get children() {
|
|
47
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(require_source_file.SourceFile, (0, __alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
48
|
+
path: modulePath,
|
|
49
|
+
get header() {
|
|
50
|
+
return header ?? (0, __alloy_js_core_jsx_runtime.createComponent)(TypescriptFileHeader, {
|
|
51
|
+
hashbang,
|
|
52
|
+
get children() {
|
|
53
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(TypescriptFileHeaderImports, {
|
|
54
|
+
imports,
|
|
55
|
+
builtinImports,
|
|
56
|
+
scope
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
filetype: tsx ? "tsx" : "typescript",
|
|
62
|
+
children
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Renders the header for a Powerlines Typescript source file.
|
|
71
|
+
*
|
|
72
|
+
* @param props - The properties for the source file header.
|
|
73
|
+
* @returns The rendered source file header.
|
|
74
|
+
*/
|
|
75
|
+
function TypescriptFileHeader(props) {
|
|
76
|
+
const { header, hashbang, disableEslint = true, disableBiome = true, disablePrettier = false, children } = props;
|
|
77
|
+
const context = require_context.usePowerlinesSafe();
|
|
78
|
+
return [
|
|
79
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
80
|
+
get when() {
|
|
81
|
+
return Boolean(hashbang);
|
|
82
|
+
},
|
|
83
|
+
get children() {
|
|
84
|
+
return [(0, __alloy_js_core_jsx_runtime.memo)(() => hashbang === true ? __alloy_js_core.code`#!/usr/bin/env ${context?.config.mode === "development" ? "-S NODE_OPTIONS=--enable-source-maps" : ""} node` : hashbang), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
85
|
+
}
|
|
86
|
+
}),
|
|
87
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
88
|
+
get when() {
|
|
89
|
+
return Boolean(header);
|
|
90
|
+
},
|
|
91
|
+
get children() {
|
|
92
|
+
return [header, (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
93
|
+
}
|
|
94
|
+
}),
|
|
95
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
96
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
97
|
+
get when() {
|
|
98
|
+
return Boolean(disableEslint);
|
|
99
|
+
},
|
|
100
|
+
get children() {
|
|
101
|
+
return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, {
|
|
102
|
+
variant: "slash-star",
|
|
103
|
+
children: "eslint-disable"
|
|
104
|
+
}), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
105
|
+
}
|
|
106
|
+
}),
|
|
107
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
108
|
+
get when() {
|
|
109
|
+
return Boolean(disablePrettier);
|
|
110
|
+
},
|
|
111
|
+
get children() {
|
|
112
|
+
return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, {
|
|
113
|
+
variant: "slash-star",
|
|
114
|
+
children: "prettier-ignore"
|
|
115
|
+
}), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
116
|
+
}
|
|
117
|
+
}),
|
|
118
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
119
|
+
get when() {
|
|
120
|
+
return Boolean(disableBiome);
|
|
121
|
+
},
|
|
122
|
+
get children() {
|
|
123
|
+
return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, { children: "biome-ignore lint: disable" }), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
124
|
+
}
|
|
125
|
+
}),
|
|
126
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
127
|
+
get when() {
|
|
128
|
+
return Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome);
|
|
129
|
+
},
|
|
130
|
+
get children() {
|
|
131
|
+
return (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
|
|
132
|
+
}
|
|
133
|
+
}),
|
|
134
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
135
|
+
get when() {
|
|
136
|
+
return Boolean(children);
|
|
137
|
+
},
|
|
138
|
+
get children() {
|
|
139
|
+
return [children, (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
140
|
+
}
|
|
141
|
+
}),
|
|
142
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, { get children() {
|
|
143
|
+
return `Generated by ${(0, __stryke_string_format_title_case.titleCase)(context?.config?.framework) || "Powerlines"}`;
|
|
144
|
+
} }),
|
|
145
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
146
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, { children: __alloy_js_core.code`NOTE: Do not edit this file manually - it will be overwritten automatically` }),
|
|
147
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
148
|
+
];
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Renders the header for a Powerlines Typescript source file.
|
|
152
|
+
*
|
|
153
|
+
* @param props - The properties for the source file header.
|
|
154
|
+
* @returns The rendered source file header.
|
|
155
|
+
*/
|
|
156
|
+
function TypescriptFileHeaderImports(props) {
|
|
157
|
+
const { imports, builtinImports } = props;
|
|
158
|
+
const context = require_context.usePowerlinesSafe();
|
|
159
|
+
const sourceFile = (0, __alloy_js_typescript.useSourceFile)();
|
|
160
|
+
const scope = props.scope ?? sourceFile.scope;
|
|
161
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
162
|
+
get when() {
|
|
163
|
+
return scope.importedModules.size > 0 || !!imports && Object.keys(imports).length > 0 || !!builtinImports && Object.keys(builtinImports).length > 0;
|
|
164
|
+
},
|
|
165
|
+
get children() {
|
|
166
|
+
return [
|
|
167
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
168
|
+
get when() {
|
|
169
|
+
return !!imports && Object.keys(imports).length > 0;
|
|
170
|
+
},
|
|
171
|
+
get children() {
|
|
172
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
|
|
173
|
+
get each() {
|
|
174
|
+
return Object.entries(imports ?? {});
|
|
175
|
+
},
|
|
176
|
+
hardline: true,
|
|
177
|
+
children: ([module$1, importItem]) => {
|
|
178
|
+
return [(0, __alloy_js_core_jsx_runtime.memo)(() => __alloy_js_core.code`import ${importItem === null ? "" : (0, __stryke_type_checks_is_string.isString)(importItem) ? importItem : ` ${importItem.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.map((i) => (0, __stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} from "${module$1}";`)];
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}),
|
|
183
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
184
|
+
get when() {
|
|
185
|
+
return builtinImports && Object.keys(builtinImports).length > 0;
|
|
186
|
+
},
|
|
187
|
+
get children() {
|
|
188
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
|
|
189
|
+
get each() {
|
|
190
|
+
return Object.entries(builtinImports ?? {});
|
|
191
|
+
},
|
|
192
|
+
hardline: true,
|
|
193
|
+
children: ([module$1, importItem]) => __alloy_js_core.code`import ${importItem === null ? "" : (0, __stryke_type_checks_is_string.isString)(importItem) ? importItem : ` ${importItem.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.map((i) => (0, __stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} from "${module$1.includes(":") ? module$1 : `${context?.config?.framework || "powerlines"}:${module$1}`}";`
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
}),
|
|
197
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
198
|
+
get when() {
|
|
199
|
+
return scope.importedModules.size > 0;
|
|
200
|
+
},
|
|
201
|
+
get children() {
|
|
202
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ImportStatements, { get records() {
|
|
203
|
+
return scope.importedModules;
|
|
204
|
+
} });
|
|
205
|
+
}
|
|
206
|
+
}),
|
|
207
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
208
|
+
];
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
//#endregion
|
|
214
|
+
exports.TypescriptFile = TypescriptFile;
|
|
215
|
+
exports.TypescriptFileHeader = TypescriptFileHeader;
|
|
216
|
+
exports.TypescriptFileHeaderImports = TypescriptFileHeaderImports;
|
package/dist/{packages/plugin-alloy → plugin-alloy}/src/typescript/components/typescript-file.d.mts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentProps, TypescriptFileImports } from "../../types/components.mjs";
|
|
2
2
|
import { SourceFileProps as SourceFileProps$1 } from "../../core/components/source-file.mjs";
|
|
3
3
|
import { Children } from "@alloy-js/core";
|
|
4
|
-
import "@alloy-js/typescript";
|
|
4
|
+
import { TSModuleScope } from "@alloy-js/typescript";
|
|
5
5
|
|
|
6
6
|
//#region ../plugin-alloy/src/typescript/components/typescript-file.d.ts
|
|
7
7
|
type TypescriptFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps & {
|