@powerlines/plugin-vite 0.14.124 → 0.14.126

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.
Files changed (141) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +29 -0
  2. package/dist/helpers/index.cjs +2 -3
  3. package/dist/helpers/index.d.cts +1 -3
  4. package/dist/helpers/index.d.mts +1 -3
  5. package/dist/helpers/index.mjs +1 -2
  6. package/dist/helpers/unplugin.cjs +11 -2
  7. package/dist/helpers/unplugin.d.cts +6 -2
  8. package/dist/helpers/unplugin.d.mts +6 -2
  9. package/dist/helpers/unplugin.mjs +9 -1
  10. package/dist/index.cjs +9 -170
  11. package/dist/index.d.cts +3 -4
  12. package/dist/index.d.mts +5 -5
  13. package/dist/index.mjs +3 -165
  14. package/dist/powerlines/schemas/fs.cjs +226 -0
  15. package/dist/powerlines/schemas/fs.mjs +224 -0
  16. package/dist/powerlines/src/api.cjs +580 -0
  17. package/dist/powerlines/src/api.mjs +578 -0
  18. package/dist/powerlines/src/internal/babel/module-resolver-plugin.cjs +86 -0
  19. package/dist/powerlines/src/internal/babel/module-resolver-plugin.mjs +84 -0
  20. package/dist/powerlines/src/internal/helpers/environment.cjs +52 -0
  21. package/dist/powerlines/src/internal/helpers/environment.mjs +48 -0
  22. package/dist/powerlines/src/internal/helpers/generate-types.cjs +51 -0
  23. package/dist/powerlines/src/internal/helpers/generate-types.mjs +49 -0
  24. package/dist/powerlines/src/internal/helpers/hooks.cjs +63 -0
  25. package/dist/powerlines/src/internal/helpers/hooks.d.cts +48 -0
  26. package/dist/powerlines/src/internal/helpers/hooks.d.mts +50 -0
  27. package/dist/powerlines/src/internal/helpers/hooks.mjs +61 -0
  28. package/dist/powerlines/src/internal/helpers/install-dependencies.cjs +25 -0
  29. package/dist/powerlines/src/internal/helpers/install-dependencies.mjs +24 -0
  30. package/dist/powerlines/src/internal/helpers/install.cjs +37 -0
  31. package/dist/powerlines/src/internal/helpers/install.mjs +36 -0
  32. package/dist/powerlines/src/internal/helpers/resolve-tsconfig.cjs +98 -0
  33. package/dist/powerlines/src/internal/helpers/resolve-tsconfig.mjs +94 -0
  34. package/dist/powerlines/src/internal/helpers/resolver.cjs +43 -0
  35. package/dist/powerlines/src/internal/helpers/resolver.mjs +41 -0
  36. package/dist/powerlines/src/lib/build/esbuild.cjs +102 -0
  37. package/dist/powerlines/src/lib/build/esbuild.mjs +100 -0
  38. package/dist/powerlines/src/lib/build/vite.cjs +74 -0
  39. package/dist/powerlines/src/lib/build/vite.mjs +71 -0
  40. package/dist/powerlines/src/lib/config-file.cjs +79 -0
  41. package/dist/powerlines/src/lib/config-file.mjs +76 -0
  42. package/dist/powerlines/src/lib/contexts/api-context.cjs +184 -0
  43. package/dist/powerlines/src/lib/contexts/api-context.mjs +182 -0
  44. package/dist/powerlines/src/lib/contexts/context.cjs +933 -0
  45. package/dist/powerlines/src/lib/contexts/context.mjs +931 -0
  46. package/dist/powerlines/src/lib/contexts/environment-context.cjs +160 -0
  47. package/dist/powerlines/src/lib/contexts/environment-context.mjs +159 -0
  48. package/dist/powerlines/src/lib/contexts/plugin-context.cjs +75 -0
  49. package/dist/powerlines/src/lib/contexts/plugin-context.mjs +74 -0
  50. package/dist/powerlines/src/lib/entry.cjs +69 -0
  51. package/dist/powerlines/src/lib/entry.mjs +67 -0
  52. package/dist/powerlines/src/lib/fs/helpers.cjs +85 -0
  53. package/dist/powerlines/src/lib/fs/helpers.mjs +81 -0
  54. package/dist/powerlines/src/lib/fs/storage/base.cjs +196 -0
  55. package/dist/powerlines/src/lib/fs/storage/base.mjs +195 -0
  56. package/dist/powerlines/src/lib/fs/storage/file-system.cjs +170 -0
  57. package/dist/powerlines/src/lib/fs/storage/file-system.mjs +169 -0
  58. package/dist/powerlines/src/lib/fs/storage/virtual.cjs +88 -0
  59. package/dist/powerlines/src/lib/fs/storage/virtual.mjs +87 -0
  60. package/dist/powerlines/src/lib/fs/vfs.cjs +830 -0
  61. package/dist/powerlines/src/lib/fs/vfs.mjs +828 -0
  62. package/dist/powerlines/src/lib/logger.cjs +58 -0
  63. package/dist/powerlines/src/lib/logger.mjs +55 -0
  64. package/dist/powerlines/src/lib/typescript/ts-morph.cjs +104 -0
  65. package/dist/powerlines/src/lib/typescript/ts-morph.mjs +102 -0
  66. package/dist/powerlines/src/lib/typescript/tsconfig.cjs +149 -0
  67. package/dist/powerlines/src/lib/typescript/tsconfig.mjs +144 -0
  68. package/dist/powerlines/src/lib/unplugin/factory.cjs +6 -0
  69. package/dist/powerlines/src/lib/unplugin/factory.mjs +8 -0
  70. package/dist/powerlines/src/lib/unplugin/helpers.cjs +17 -0
  71. package/dist/powerlines/src/lib/unplugin/helpers.mjs +16 -0
  72. package/dist/powerlines/src/lib/unplugin/index.cjs +3 -0
  73. package/dist/powerlines/src/lib/unplugin/index.mjs +5 -0
  74. package/dist/powerlines/src/lib/unplugin/plugin.cjs +128 -0
  75. package/dist/powerlines/src/lib/unplugin/plugin.mjs +127 -0
  76. package/dist/powerlines/src/lib/utilities/file-header.cjs +22 -0
  77. package/dist/powerlines/src/lib/utilities/file-header.mjs +21 -0
  78. package/dist/powerlines/src/lib/utilities/meta.cjs +45 -0
  79. package/dist/powerlines/src/lib/utilities/meta.mjs +41 -0
  80. package/dist/powerlines/src/lib/utilities/source-file.cjs +22 -0
  81. package/dist/powerlines/src/lib/utilities/source-file.mjs +21 -0
  82. package/dist/powerlines/src/plugin-utils/helpers.cjs +148 -0
  83. package/dist/powerlines/src/plugin-utils/helpers.mjs +138 -0
  84. package/dist/powerlines/src/plugin-utils/paths.cjs +36 -0
  85. package/dist/powerlines/src/plugin-utils/paths.mjs +35 -0
  86. package/dist/powerlines/src/types/api.d.cts +104 -0
  87. package/dist/powerlines/src/types/api.d.mts +104 -0
  88. package/dist/powerlines/src/types/babel.d.mts +4 -0
  89. package/dist/powerlines/src/types/build.cjs +15 -0
  90. package/dist/powerlines/src/types/build.d.cts +154 -0
  91. package/dist/powerlines/src/types/build.d.mts +154 -0
  92. package/dist/powerlines/src/types/build.mjs +14 -0
  93. package/dist/powerlines/src/types/commands.cjs +16 -0
  94. package/dist/powerlines/src/types/commands.d.cts +8 -0
  95. package/dist/powerlines/src/types/commands.d.mts +9 -0
  96. package/dist/powerlines/src/types/commands.mjs +15 -0
  97. package/dist/powerlines/src/types/config.d.cts +423 -0
  98. package/dist/powerlines/src/types/config.d.mts +425 -0
  99. package/dist/powerlines/src/types/context.d.cts +514 -0
  100. package/dist/powerlines/src/types/context.d.mts +514 -0
  101. package/dist/powerlines/src/types/fs.d.cts +486 -0
  102. package/dist/powerlines/src/types/fs.d.mts +486 -0
  103. package/dist/powerlines/src/types/hooks.d.cts +30 -0
  104. package/dist/powerlines/src/types/hooks.d.mts +30 -0
  105. package/dist/powerlines/src/types/internal.d.cts +58 -0
  106. package/dist/powerlines/src/types/internal.d.mts +58 -0
  107. package/dist/powerlines/src/types/plugin.cjs +32 -0
  108. package/dist/powerlines/src/types/plugin.d.cts +234 -0
  109. package/dist/powerlines/src/types/plugin.d.mts +234 -0
  110. package/dist/powerlines/src/types/plugin.mjs +31 -0
  111. package/dist/powerlines/src/types/resolved.d.cts +82 -0
  112. package/dist/powerlines/src/types/resolved.d.mts +83 -0
  113. package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
  114. package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
  115. package/dist/types/index.cjs +0 -2
  116. package/dist/types/index.d.cts +1 -2
  117. package/dist/types/index.d.mts +1 -2
  118. package/dist/types/index.mjs +0 -3
  119. package/dist/types/internal.d.cts +3 -191
  120. package/dist/types/internal.d.mts +3 -191
  121. package/dist/types/plugin.cjs +0 -1
  122. package/dist/types/plugin.d.cts +12 -1
  123. package/dist/types/plugin.d.mts +12 -1
  124. package/dist/types/plugin.mjs +0 -2
  125. package/package.json +5 -5
  126. package/dist/helpers-CmEjzAn_.mjs +0 -1
  127. package/dist/helpers-LF26RHol.cjs +0 -0
  128. package/dist/index-BR1oNnaF.d.cts +0 -1
  129. package/dist/index-DEHBdV_z.d.mts +0 -1
  130. package/dist/index-_wQ5ClJU.d.cts +0 -1
  131. package/dist/index-vkGVyY9v.d.mts +0 -1
  132. package/dist/plugin-Dc12T6ZF.d.mts +0 -1960
  133. package/dist/plugin-jZ9N9Mz-.mjs +0 -1
  134. package/dist/plugin-pBKbb5K9.cjs +0 -0
  135. package/dist/plugin-vkCGh5de.d.cts +0 -1957
  136. package/dist/types-BtDR9wb1.mjs +0 -1
  137. package/dist/types-o3zWarRp.cjs +0 -0
  138. package/dist/unplugin-B3TcDD6I.mjs +0 -4617
  139. package/dist/unplugin-Bv2agFkI.cjs +0 -4661
  140. package/dist/unplugin-D_zrAqRh.d.mts +0 -7
  141. package/dist/unplugin-F1UAxbOS.d.cts +0 -7
@@ -0,0 +1,83 @@
1
+ import "./build.mjs";
2
+ import { EnvironmentConfig, InlineConfig, OutputConfig, UserConfig as UserConfig$1, ViteUserConfig } from "./config.mjs";
3
+ import { ResolvedPreviewOptions } from "vite";
4
+ import { NonUndefined } from "@stryke/types/base";
5
+ import { TypeDefinition } from "@stryke/types/configuration";
6
+ import { AssetGlob } from "@stryke/types/file";
7
+
8
+ //#region ../powerlines/src/types/resolved.d.ts
9
+ interface ResolvedEntryTypeDefinition extends TypeDefinition {
10
+ /**
11
+ * The user provided entry point in the source code
12
+ */
13
+ input?: TypeDefinition;
14
+ /**
15
+ * An optional name to use in the package export during the build process
16
+ */
17
+ output?: string;
18
+ }
19
+ type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "ssr">> & {
20
+ /**
21
+ * The name of the environment
22
+ */
23
+ name: string;
24
+ /**
25
+ * Configuration options for the preview server
26
+ */
27
+ preview?: ResolvedPreviewOptions;
28
+ };
29
+ type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
30
+ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> & {
31
+ assets: ResolvedAssetGlob[];
32
+ }> & Pick<OutputConfig, "storage">;
33
+ /**
34
+ * The resolved options for the Powerlines project configuration.
35
+ */
36
+ type ResolvedConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Omit<TUserConfig, "name" | "title" | "organization" | "compatibilityDate" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework" | "sourceRoot"> & Required<Pick<TUserConfig, "name" | "title" | "organization" | "compatibilityDate" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework" | "sourceRoot">> & {
37
+ /**
38
+ * The configuration options that were provided inline to the Powerlines CLI.
39
+ */
40
+ inlineConfig: InlineConfig<TUserConfig>;
41
+ /**
42
+ * The original configuration options that were provided by the user to the Powerlines process.
43
+ */
44
+ userConfig: TUserConfig;
45
+ /**
46
+ * A string identifier for the Powerlines command being executed.
47
+ */
48
+ command: NonUndefined<InlineConfig<TUserConfig>["command"]>;
49
+ /**
50
+ * The root directory of the project's source code
51
+ *
52
+ * @defaultValue "\{projectRoot\}/src"
53
+ */
54
+ sourceRoot: NonUndefined<TUserConfig["sourceRoot"]>;
55
+ /**
56
+ * The root directory of the project.
57
+ */
58
+ projectRoot: NonUndefined<TUserConfig["root"]>;
59
+ /**
60
+ * The type of project being built.
61
+ */
62
+ projectType: NonUndefined<TUserConfig["type"]>;
63
+ /**
64
+ * The output configuration options to use for the build process
65
+ */
66
+ output: OutputResolvedConfig;
67
+ /**
68
+ * Configuration provided to build processes
69
+ *
70
+ * @remarks
71
+ * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
72
+ */
73
+ build: Omit<TUserConfig["build"], "override"> & Required<Pick<Required<TUserConfig["build"]>, "override">>;
74
+ /**
75
+ * The log level to use for the Powerlines processes.
76
+ *
77
+ * @defaultValue "info"
78
+ */
79
+ logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
80
+ };
81
+ type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
82
+ //#endregion
83
+ export { EnvironmentResolvedConfig, ResolvedConfig, ResolvedEntryTypeDefinition, ViteResolvedConfig };
@@ -0,0 +1,69 @@
1
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
2
+ import ts from "typescript";
3
+
4
+ //#region ../powerlines/src/types/tsconfig.d.ts
5
+ type ReflectionMode = "default" | "explicit" | "never";
6
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
7
+ /**
8
+ * Defines the level of reflection to be used during the transpilation process.
9
+ *
10
+ * @remarks
11
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
12
+ * - `minimal` - Only the essential type information is captured.
13
+ * - `normal` - Additional type information is captured, including some contextual data.
14
+ * - `verbose` - All available type information is captured, including detailed contextual data.
15
+ */
16
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
17
+ interface DeepkitOptions {
18
+ /**
19
+ * Either true to activate reflection for all files compiled using this tsconfig,
20
+ * or a list of globs/file paths relative to this tsconfig.json.
21
+ * Globs/file paths can be prefixed with a ! to exclude them.
22
+ */
23
+ reflection?: RawReflectionMode;
24
+ /**
25
+ * Defines the level of reflection to be used during the transpilation process.
26
+ *
27
+ * @remarks
28
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
29
+ * - `minimal` - Only the essential type information is captured.
30
+ * - `normal` - Additional type information is captured, including some contextual data.
31
+ * - `verbose` - All available type information is captured, including detailed contextual data.
32
+ */
33
+ reflectionLevel?: ReflectionLevel;
34
+ }
35
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
36
+ /**
37
+ * The TypeScript compiler configuration.
38
+ *
39
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
40
+ */
41
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
42
+ /**
43
+ * Either true to activate reflection for all files compiled using this tsconfig,
44
+ * or a list of globs/file paths relative to this tsconfig.json.
45
+ * Globs/file paths can be prefixed with a ! to exclude them.
46
+ */
47
+ reflection?: RawReflectionMode;
48
+ /**
49
+ * Defines the level of reflection to be used during the transpilation process.
50
+ *
51
+ * @remarks
52
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
53
+ * - `minimal` - Only the essential type information is captured.
54
+ * - `normal` - Additional type information is captured, including some contextual data.
55
+ * - `verbose` - All available type information is captured, including detailed contextual data.
56
+ */
57
+ reflectionLevel?: ReflectionLevel;
58
+ /**
59
+ * Instructs the TypeScript compiler how to compile `.ts` files.
60
+ */
61
+ compilerOptions?: TSCompilerOptions;
62
+ }
63
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
64
+ originalTsconfigJson: TsConfigJson;
65
+ tsconfigJson: TSConfig;
66
+ tsconfigFilePath: string;
67
+ };
68
+ //#endregion
69
+ export { ParsedTypeScriptConfig, TSConfig };
@@ -0,0 +1,69 @@
1
+ import ts from "typescript";
2
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
3
+
4
+ //#region ../powerlines/src/types/tsconfig.d.ts
5
+ type ReflectionMode = "default" | "explicit" | "never";
6
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
7
+ /**
8
+ * Defines the level of reflection to be used during the transpilation process.
9
+ *
10
+ * @remarks
11
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
12
+ * - `minimal` - Only the essential type information is captured.
13
+ * - `normal` - Additional type information is captured, including some contextual data.
14
+ * - `verbose` - All available type information is captured, including detailed contextual data.
15
+ */
16
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
17
+ interface DeepkitOptions {
18
+ /**
19
+ * Either true to activate reflection for all files compiled using this tsconfig,
20
+ * or a list of globs/file paths relative to this tsconfig.json.
21
+ * Globs/file paths can be prefixed with a ! to exclude them.
22
+ */
23
+ reflection?: RawReflectionMode;
24
+ /**
25
+ * Defines the level of reflection to be used during the transpilation process.
26
+ *
27
+ * @remarks
28
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
29
+ * - `minimal` - Only the essential type information is captured.
30
+ * - `normal` - Additional type information is captured, including some contextual data.
31
+ * - `verbose` - All available type information is captured, including detailed contextual data.
32
+ */
33
+ reflectionLevel?: ReflectionLevel;
34
+ }
35
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
36
+ /**
37
+ * The TypeScript compiler configuration.
38
+ *
39
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
40
+ */
41
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
42
+ /**
43
+ * Either true to activate reflection for all files compiled using this tsconfig,
44
+ * or a list of globs/file paths relative to this tsconfig.json.
45
+ * Globs/file paths can be prefixed with a ! to exclude them.
46
+ */
47
+ reflection?: RawReflectionMode;
48
+ /**
49
+ * Defines the level of reflection to be used during the transpilation process.
50
+ *
51
+ * @remarks
52
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
53
+ * - `minimal` - Only the essential type information is captured.
54
+ * - `normal` - Additional type information is captured, including some contextual data.
55
+ * - `verbose` - All available type information is captured, including detailed contextual data.
56
+ */
57
+ reflectionLevel?: ReflectionLevel;
58
+ /**
59
+ * Instructs the TypeScript compiler how to compile `.ts` files.
60
+ */
61
+ compilerOptions?: TSCompilerOptions;
62
+ }
63
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
64
+ originalTsconfigJson: TsConfigJson;
65
+ tsconfigJson: TSConfig;
66
+ tsconfigFilePath: string;
67
+ };
68
+ //#endregion
69
+ export { ParsedTypeScriptConfig, TSConfig };
@@ -1,2 +0,0 @@
1
- require('../plugin-pBKbb5K9.cjs');
2
- require('../types-o3zWarRp.cjs');
@@ -1,3 +1,2 @@
1
- import { a as __ΩVitePluginOptions, i as __ΩVitePluginContext, n as VitePluginOptions, o as __ΩVitePluginResolvedConfig, r as VitePluginResolvedConfig, t as VitePluginContext } from "../plugin-vkCGh5de.cjs";
2
- import "../index-BR1oNnaF.cjs";
1
+ import { VitePluginContext, VitePluginOptions, VitePluginResolvedConfig, __ΩVitePluginContext, __ΩVitePluginOptions, __ΩVitePluginResolvedConfig } from "./plugin.cjs";
3
2
  export { VitePluginContext, VitePluginOptions, VitePluginResolvedConfig, __ΩVitePluginContext, __ΩVitePluginOptions, __ΩVitePluginResolvedConfig };
@@ -1,3 +1,2 @@
1
- import { a as __ΩVitePluginOptions, i as __ΩVitePluginContext, n as VitePluginOptions, o as __ΩVitePluginResolvedConfig, r as VitePluginResolvedConfig, t as VitePluginContext } from "../plugin-Dc12T6ZF.mjs";
2
- import "../index-DEHBdV_z.mjs";
1
+ import { VitePluginContext, VitePluginOptions, VitePluginResolvedConfig, __ΩVitePluginContext, __ΩVitePluginOptions, __ΩVitePluginResolvedConfig } from "./plugin.mjs";
3
2
  export { VitePluginContext, VitePluginOptions, VitePluginResolvedConfig, __ΩVitePluginContext, __ΩVitePluginOptions, __ΩVitePluginResolvedConfig };
@@ -1,4 +1 @@
1
- import "../plugin-jZ9N9Mz-.mjs";
2
- import "../types-BtDR9wb1.mjs";
3
-
4
1
  export { };
@@ -1,196 +1,8 @@
1
- import { C as ResolvedConfig, _ as DocsInlineConfig, b as PluginConfig, c as EnvironmentContext, d as HookKeys, f as InferHookParameters, g as DeployInlineConfig, h as CleanInlineConfig, l as PluginContext, m as BuildInlineConfig, p as InferHookReturnType, r as VitePluginResolvedConfig, s as APIContext, u as SelectHooksOptions, v as LintInlineConfig, x as PrepareInlineConfig, y as NewInlineConfig } from "../plugin-vkCGh5de.cjs";
2
- import { MaybePromise } from "@stryke/types/base";
3
- import { ArrayValues } from "@stryke/types/array";
1
+ import { VitePluginResolvedConfig } from "./plugin.cjs";
2
+ import { UNSAFE_PluginContext } from "../powerlines/src/types/internal.cjs";
4
3
 
5
- //#region ../powerlines/src/internal/helpers/hooks.d.ts
6
- type CallHookOptions = SelectHooksOptions & (({
7
- /**
8
- * Whether to call the hooks sequentially or in parallel.
9
- *
10
- * @defaultValue true
11
- */
12
- sequential?: true;
13
- } & ({
14
- /**
15
- * How to handle multiple return values from hooks.
16
- * - "merge": Merge all non-undefined return values (if they are objects).
17
- * - "first": Return the first non-undefined value.
18
- *
19
- * @remarks
20
- * Merging only works if the return values are objects.
21
- *
22
- * @defaultValue "merge"
23
- */
24
- result: "first";
25
- } | {
26
- /**
27
- * How to handle multiple return values from hooks.
28
- * - "merge": Merge all non-undefined return values (if they are objects).
29
- * - "first": Return the first non-undefined value.
30
- *
31
- * @remarks
32
- * Merging only works if the return values are objects.
33
- *
34
- * @defaultValue "merge"
35
- */
36
- result?: "merge" | "last";
37
- /**
38
- * An indicator specifying if the results of the previous hook should be provided as the **first** parameter of the next hook function, or a function to process the result of the previous hook function and pass the returned value as the next hook's **first** parameter
39
- */
40
- asNextParam?: false | ((previousResult: any) => MaybePromise<any>);
41
- })) | {
42
- /**
43
- * Whether to call the hooks sequentially or in parallel.
44
- */
45
- sequential: false;
46
- });
47
- //#endregion
48
- //#region ../powerlines/src/types/api.d.ts
49
- /**
50
- * Powerlines API Interface
51
- */
52
- interface API<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
53
- /**
54
- * The Powerlines shared API context
55
- */
56
- context: APIContext<TResolvedConfig>;
57
- /**
58
- * Prepare the Powerlines API
59
- *
60
- * @remarks
61
- * This method will prepare the Powerlines API for use, initializing any necessary resources.
62
- *
63
- * @param inlineConfig - The inline configuration for the prepare command
64
- */
65
- prepare: (inlineConfig: PrepareInlineConfig | NewInlineConfig | CleanInlineConfig | BuildInlineConfig | LintInlineConfig | DocsInlineConfig | DeployInlineConfig) => Promise<void>;
66
- /**
67
- * Create a new Powerlines project
68
- *
69
- * @remarks
70
- * This method will create a new Powerlines project in the current directory.
71
- *
72
- * @param inlineConfig - The inline configuration for the new command
73
- * @returns A promise that resolves when the project has been created
74
- */
75
- new: (inlineConfig: NewInlineConfig) => Promise<void>;
76
- /**
77
- * Clean any previously prepared artifacts
78
- *
79
- * @remarks
80
- * This method will remove the previous Powerlines artifacts from the project.
81
- *
82
- * @param inlineConfig - The inline configuration for the clean command
83
- * @returns A promise that resolves when the clean command has completed
84
- */
85
- clean: (inlineConfig: CleanInlineConfig | PrepareInlineConfig) => Promise<void>;
86
- /**
87
- * Lint the project source code
88
- *
89
- * @param inlineConfig - The inline configuration for the lint command
90
- * @returns A promise that resolves when the lint command has completed
91
- */
92
- lint: (inlineConfig: LintInlineConfig) => Promise<void>;
93
- /**
94
- * Build the project
95
- *
96
- * @remarks
97
- * This method will build the Powerlines project, generating the necessary artifacts.
98
- *
99
- * @param inlineConfig - The inline configuration for the build command
100
- * @returns A promise that resolves when the build command has completed
101
- */
102
- build: (inlineConfig: BuildInlineConfig) => Promise<void>;
103
- /**
104
- * Prepare the documentation for the project
105
- *
106
- * @param inlineConfig - The inline configuration for the docs command
107
- * @returns A promise that resolves when the documentation generation has completed
108
- */
109
- docs: (inlineConfig: DocsInlineConfig) => Promise<void>;
110
- /**
111
- * Deploy the project source code
112
- *
113
- * @remarks
114
- * This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
115
- *
116
- * @param inlineConfig - The inline configuration for the deploy command
117
- */
118
- deploy: (inlineConfig: DeployInlineConfig) => Promise<void>;
119
- /**
120
- * Finalization process
121
- *
122
- * @remarks
123
- * This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
124
- *
125
- * @returns A promise that resolves when the finalization process has completed
126
- */
127
- finalize: () => Promise<void>;
128
- /**
129
- * Invokes the configured plugin hooks
130
- *
131
- * @remarks
132
- * By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
133
- *
134
- * @param hook - The hook to call
135
- * @param options - The options to provide to the hook
136
- * @param args - The arguments to pass to the hook
137
- * @returns The result of the hook call
138
- */
139
- callHook: <TKey extends HookKeys<PluginContext<TResolvedConfig>>>(hook: TKey, options: CallHookOptions & {
140
- environment?: string | EnvironmentContext<TResolvedConfig>;
141
- }, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
142
- }
143
- //#endregion
144
- //#region ../powerlines/src/types/internal.d.ts
145
- /**
146
- * Internal fields and methods for internal contexts
147
- *
148
- * @internal
149
- */
150
- interface UNSAFE_ContextInternal<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
151
- /**
152
- * The API instance for interacting with Powerlines
153
- *
154
- * @internal
155
- */
156
- api: API<TResolvedConfig>;
157
- /**
158
- * Add a Powerlines plugin used in the build process
159
- *
160
- * @internal
161
- *
162
- * @param config - The import path of the plugin to add
163
- */
164
- addPlugin: (config: PluginConfig<PluginContext<TResolvedConfig>>) => Promise<void>;
165
- }
166
- /**
167
- * An internal representation of the environment context, used for managing hooks and environment data.
168
- *
169
- * @internal
170
- */
171
- interface UNSAFE_EnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends EnvironmentContext<TResolvedConfig> {
172
- $$internal: UNSAFE_ContextInternal<TResolvedConfig>;
173
- }
174
- /**
175
- * Internal fields and methods for the internal plugin context
176
- *
177
- * @internal
178
- */
179
- interface UNSAFE_PluginContextInternal<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends UNSAFE_ContextInternal<TResolvedConfig> {
180
- api: API<TResolvedConfig>;
181
- environment: UNSAFE_EnvironmentContext<TResolvedConfig>;
182
- callHook: <TKey extends HookKeys<PluginContext<TResolvedConfig>>>(hook: TKey, options: CallHookOptions, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
183
- }
184
- /**
185
- * An internal representation of the plugin context, used for managing hooks and environment data.
186
- *
187
- * @internal
188
- */
189
- interface UNSAFE_PluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends PluginContext<TResolvedConfig> {
190
- $$internal: UNSAFE_PluginContextInternal<TResolvedConfig>;
191
- }
192
- //#endregion
193
4
  //#region src/types/internal.d.ts
5
+
194
6
  /**
195
7
  * Internal fields and methods for internal Vite plugin contexts
196
8
  *
@@ -1,196 +1,8 @@
1
- import { C as ResolvedConfig, _ as DocsInlineConfig, b as PluginConfig, c as EnvironmentContext, d as HookKeys, f as InferHookParameters, g as DeployInlineConfig, h as CleanInlineConfig, l as PluginContext, m as BuildInlineConfig, p as InferHookReturnType, r as VitePluginResolvedConfig, s as APIContext, u as SelectHooksOptions, v as LintInlineConfig, x as PrepareInlineConfig, y as NewInlineConfig } from "../plugin-Dc12T6ZF.mjs";
2
- import { MaybePromise } from "@stryke/types/base";
3
- import { ArrayValues } from "@stryke/types/array";
1
+ import { VitePluginResolvedConfig } from "./plugin.mjs";
2
+ import { UNSAFE_PluginContext } from "../powerlines/src/types/internal.mjs";
4
3
 
5
- //#region ../powerlines/src/internal/helpers/hooks.d.ts
6
- type CallHookOptions = SelectHooksOptions & (({
7
- /**
8
- * Whether to call the hooks sequentially or in parallel.
9
- *
10
- * @defaultValue true
11
- */
12
- sequential?: true;
13
- } & ({
14
- /**
15
- * How to handle multiple return values from hooks.
16
- * - "merge": Merge all non-undefined return values (if they are objects).
17
- * - "first": Return the first non-undefined value.
18
- *
19
- * @remarks
20
- * Merging only works if the return values are objects.
21
- *
22
- * @defaultValue "merge"
23
- */
24
- result: "first";
25
- } | {
26
- /**
27
- * How to handle multiple return values from hooks.
28
- * - "merge": Merge all non-undefined return values (if they are objects).
29
- * - "first": Return the first non-undefined value.
30
- *
31
- * @remarks
32
- * Merging only works if the return values are objects.
33
- *
34
- * @defaultValue "merge"
35
- */
36
- result?: "merge" | "last";
37
- /**
38
- * An indicator specifying if the results of the previous hook should be provided as the **first** parameter of the next hook function, or a function to process the result of the previous hook function and pass the returned value as the next hook's **first** parameter
39
- */
40
- asNextParam?: false | ((previousResult: any) => MaybePromise<any>);
41
- })) | {
42
- /**
43
- * Whether to call the hooks sequentially or in parallel.
44
- */
45
- sequential: false;
46
- });
47
- //#endregion
48
- //#region ../powerlines/src/types/api.d.ts
49
- /**
50
- * Powerlines API Interface
51
- */
52
- interface API<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
53
- /**
54
- * The Powerlines shared API context
55
- */
56
- context: APIContext<TResolvedConfig>;
57
- /**
58
- * Prepare the Powerlines API
59
- *
60
- * @remarks
61
- * This method will prepare the Powerlines API for use, initializing any necessary resources.
62
- *
63
- * @param inlineConfig - The inline configuration for the prepare command
64
- */
65
- prepare: (inlineConfig: PrepareInlineConfig | NewInlineConfig | CleanInlineConfig | BuildInlineConfig | LintInlineConfig | DocsInlineConfig | DeployInlineConfig) => Promise<void>;
66
- /**
67
- * Create a new Powerlines project
68
- *
69
- * @remarks
70
- * This method will create a new Powerlines project in the current directory.
71
- *
72
- * @param inlineConfig - The inline configuration for the new command
73
- * @returns A promise that resolves when the project has been created
74
- */
75
- new: (inlineConfig: NewInlineConfig) => Promise<void>;
76
- /**
77
- * Clean any previously prepared artifacts
78
- *
79
- * @remarks
80
- * This method will remove the previous Powerlines artifacts from the project.
81
- *
82
- * @param inlineConfig - The inline configuration for the clean command
83
- * @returns A promise that resolves when the clean command has completed
84
- */
85
- clean: (inlineConfig: CleanInlineConfig | PrepareInlineConfig) => Promise<void>;
86
- /**
87
- * Lint the project source code
88
- *
89
- * @param inlineConfig - The inline configuration for the lint command
90
- * @returns A promise that resolves when the lint command has completed
91
- */
92
- lint: (inlineConfig: LintInlineConfig) => Promise<void>;
93
- /**
94
- * Build the project
95
- *
96
- * @remarks
97
- * This method will build the Powerlines project, generating the necessary artifacts.
98
- *
99
- * @param inlineConfig - The inline configuration for the build command
100
- * @returns A promise that resolves when the build command has completed
101
- */
102
- build: (inlineConfig: BuildInlineConfig) => Promise<void>;
103
- /**
104
- * Prepare the documentation for the project
105
- *
106
- * @param inlineConfig - The inline configuration for the docs command
107
- * @returns A promise that resolves when the documentation generation has completed
108
- */
109
- docs: (inlineConfig: DocsInlineConfig) => Promise<void>;
110
- /**
111
- * Deploy the project source code
112
- *
113
- * @remarks
114
- * This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
115
- *
116
- * @param inlineConfig - The inline configuration for the deploy command
117
- */
118
- deploy: (inlineConfig: DeployInlineConfig) => Promise<void>;
119
- /**
120
- * Finalization process
121
- *
122
- * @remarks
123
- * This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
124
- *
125
- * @returns A promise that resolves when the finalization process has completed
126
- */
127
- finalize: () => Promise<void>;
128
- /**
129
- * Invokes the configured plugin hooks
130
- *
131
- * @remarks
132
- * By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
133
- *
134
- * @param hook - The hook to call
135
- * @param options - The options to provide to the hook
136
- * @param args - The arguments to pass to the hook
137
- * @returns The result of the hook call
138
- */
139
- callHook: <TKey extends HookKeys<PluginContext<TResolvedConfig>>>(hook: TKey, options: CallHookOptions & {
140
- environment?: string | EnvironmentContext<TResolvedConfig>;
141
- }, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
142
- }
143
- //#endregion
144
- //#region ../powerlines/src/types/internal.d.ts
145
- /**
146
- * Internal fields and methods for internal contexts
147
- *
148
- * @internal
149
- */
150
- interface UNSAFE_ContextInternal<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
151
- /**
152
- * The API instance for interacting with Powerlines
153
- *
154
- * @internal
155
- */
156
- api: API<TResolvedConfig>;
157
- /**
158
- * Add a Powerlines plugin used in the build process
159
- *
160
- * @internal
161
- *
162
- * @param config - The import path of the plugin to add
163
- */
164
- addPlugin: (config: PluginConfig<PluginContext<TResolvedConfig>>) => Promise<void>;
165
- }
166
- /**
167
- * An internal representation of the environment context, used for managing hooks and environment data.
168
- *
169
- * @internal
170
- */
171
- interface UNSAFE_EnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends EnvironmentContext<TResolvedConfig> {
172
- $$internal: UNSAFE_ContextInternal<TResolvedConfig>;
173
- }
174
- /**
175
- * Internal fields and methods for the internal plugin context
176
- *
177
- * @internal
178
- */
179
- interface UNSAFE_PluginContextInternal<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends UNSAFE_ContextInternal<TResolvedConfig> {
180
- api: API<TResolvedConfig>;
181
- environment: UNSAFE_EnvironmentContext<TResolvedConfig>;
182
- callHook: <TKey extends HookKeys<PluginContext<TResolvedConfig>>>(hook: TKey, options: CallHookOptions, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
183
- }
184
- /**
185
- * An internal representation of the plugin context, used for managing hooks and environment data.
186
- *
187
- * @internal
188
- */
189
- interface UNSAFE_PluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends PluginContext<TResolvedConfig> {
190
- $$internal: UNSAFE_PluginContextInternal<TResolvedConfig>;
191
- }
192
- //#endregion
193
4
  //#region src/types/internal.d.ts
5
+
194
6
  /**
195
7
  * Internal fields and methods for internal Vite plugin contexts
196
8
  *
@@ -1 +0,0 @@
1
- require('../plugin-pBKbb5K9.cjs');
@@ -1,2 +1,13 @@
1
- import { a as __ΩVitePluginOptions, i as __ΩVitePluginContext, n as VitePluginOptions, o as __ΩVitePluginResolvedConfig, r as VitePluginResolvedConfig, t as VitePluginContext } from "../plugin-vkCGh5de.cjs";
1
+ import { ViteBuildConfig } from "../powerlines/src/types/build.cjs";
2
+ import { ViteResolvedConfig } from "../powerlines/src/types/resolved.cjs";
3
+ import { PluginContext } from "../powerlines/src/types/context.cjs";
4
+
5
+ //#region src/types/plugin.d.ts
6
+ type VitePluginOptions = Partial<ViteBuildConfig>;
7
+ type VitePluginResolvedConfig = ViteResolvedConfig;
8
+ type VitePluginContext<TResolvedConfig extends VitePluginResolvedConfig = VitePluginResolvedConfig> = PluginContext<TResolvedConfig>;
9
+ declare type __ΩVitePluginOptions = any[];
10
+ declare type __ΩVitePluginResolvedConfig = any[];
11
+ declare type __ΩVitePluginContext = any[];
12
+ //#endregion
2
13
  export { VitePluginContext, VitePluginOptions, VitePluginResolvedConfig, __ΩVitePluginContext, __ΩVitePluginOptions, __ΩVitePluginResolvedConfig };