@powerlines/plugin-env 0.15.4 → 0.15.6
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 +29 -0
- package/dist/babel/index.cjs +1 -0
- package/dist/babel/index.d.cts +1 -0
- package/dist/babel/index.d.mts +1 -0
- package/dist/babel/index.mjs +3 -0
- package/dist/babel/plugin.cjs +200 -0
- package/dist/babel/plugin.d.cts +8 -0
- package/dist/babel/plugin.d.mts +9 -0
- package/dist/babel/plugin.mjs +198 -0
- package/dist/components/docs.cjs +70 -3
- package/dist/components/docs.d.cts +8 -1
- package/dist/components/docs.d.mts +8 -1
- package/dist/components/docs.mjs +68 -2
- package/dist/components/env.cjs +574 -4
- package/dist/components/env.d.cts +19 -2
- package/dist/components/env.d.mts +19 -3
- package/dist/components/env.mjs +570 -2
- package/dist/components/index.cjs +5 -7
- package/dist/components/index.d.cts +2 -4
- package/dist/components/index.d.mts +2 -5
- package/dist/components/index.mjs +2 -4
- package/dist/deepkit/schemas/reflection.cjs +5368 -0
- package/dist/{plugin-BwuEBScL.d.cts → deepkit/schemas/reflection.d.cts} +1 -268
- package/dist/{plugin-BaInAuAh.d.mts → deepkit/schemas/reflection.d.mts} +59 -326
- package/dist/deepkit/schemas/reflection.mjs +5365 -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.d.cts +10 -0
- package/dist/deepkit/src/types.d.mts +10 -0
- package/dist/deepkit/src/types.mjs +21 -0
- package/dist/deepkit/src/utilities.cjs +182 -0
- package/dist/deepkit/src/utilities.mjs +181 -0
- package/dist/helpers/automd-generator.cjs +32 -0
- package/dist/helpers/automd-generator.mjs +31 -0
- package/dist/helpers/create-reflection-resource.cjs +98 -0
- package/dist/helpers/create-reflection-resource.d.cts +15 -0
- package/dist/helpers/create-reflection-resource.d.mts +15 -0
- package/dist/helpers/create-reflection-resource.mjs +97 -0
- package/dist/helpers/index.cjs +6 -0
- package/dist/helpers/index.d.cts +6 -0
- package/dist/helpers/index.d.mts +6 -0
- package/dist/helpers/index.mjs +8 -0
- package/dist/helpers/load.cjs +134 -0
- package/dist/helpers/load.d.cts +35 -0
- package/dist/helpers/load.d.mts +36 -0
- package/dist/helpers/load.mjs +131 -0
- package/dist/helpers/persistence.cjs +320 -0
- package/dist/helpers/persistence.d.cts +84 -0
- package/dist/helpers/persistence.d.mts +84 -0
- package/dist/helpers/persistence.mjs +308 -0
- package/dist/helpers/reflect.cjs +263 -0
- package/dist/helpers/reflect.d.cts +46 -0
- package/dist/helpers/reflect.d.mts +46 -0
- package/dist/helpers/reflect.mjs +254 -0
- package/dist/helpers/source-file-env.cjs +58 -0
- package/dist/helpers/source-file-env.d.cts +8 -0
- package/dist/helpers/source-file-env.d.mts +8 -0
- package/dist/helpers/source-file-env.mjs +56 -0
- package/dist/helpers/template-helpers.cjs +70 -0
- package/dist/helpers/template-helpers.d.cts +15 -0
- package/dist/helpers/template-helpers.d.mts +15 -0
- package/dist/helpers/template-helpers.mjs +69 -0
- package/dist/index.cjs +82 -696
- package/dist/index.d.cts +16 -185
- package/dist/index.d.mts +17 -190
- package/dist/index.mjs +31 -648
- package/dist/plugin-alloy/src/core/components/output.cjs +45 -0
- package/dist/plugin-alloy/src/core/components/output.mjs +44 -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.d.cts +23 -0
- package/dist/plugin-alloy/src/core/components/source-file.d.mts +23 -0
- package/dist/plugin-alloy/src/core/components/source-file.mjs +62 -0
- package/dist/plugin-alloy/src/core/contexts/context.cjs +136 -0
- package/dist/plugin-alloy/src/core/contexts/context.mjs +128 -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 +93 -0
- package/dist/plugin-alloy/src/index.mjs +91 -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/plugin-alloy/src/types/components.d.cts +22 -0
- package/dist/{components-8W0Zgj0y.d.mts → plugin-alloy/src/types/components.d.mts} +2 -1
- package/dist/plugin-alloy/src/types/components.mjs +21 -0
- package/dist/plugin-alloy/src/types/index.d.mts +2 -0
- package/dist/plugin-alloy/src/types/plugin.cjs +55 -0
- package/dist/plugin-alloy/src/types/plugin.d.cts +37 -0
- package/dist/plugin-alloy/src/types/plugin.d.mts +37 -0
- package/dist/plugin-alloy/src/types/plugin.mjs +52 -0
- package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +57 -0
- package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +25 -0
- package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +26 -0
- package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +56 -0
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +126 -0
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +124 -0
- package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +442 -0
- package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +27 -0
- package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +28 -0
- package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +433 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +194 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +14 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +15 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +191 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +68 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.cts +11 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.mts +12 -0
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +67 -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.d.cts +38 -0
- package/dist/plugin-automd/src/types/plugin.d.mts +40 -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.d.cts +33 -0
- package/dist/plugin-automd/src/types/toc.d.mts +33 -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 +74 -0
- package/dist/plugin-babel/src/helpers/options.mjs +71 -0
- package/dist/plugin-babel/src/index.cjs +134 -0
- package/dist/plugin-babel/src/index.mjs +132 -0
- package/dist/plugin-babel/src/types/index.d.mts +1 -0
- package/dist/plugin-babel/src/types/plugin.cjs +42 -0
- package/dist/plugin-babel/src/types/plugin.d.cts +15 -0
- package/dist/plugin-babel/src/types/plugin.d.mts +15 -0
- package/dist/plugin-babel/src/types/plugin.mjs +39 -0
- package/dist/powerlines/schemas/fs.d.mts +1 -0
- package/dist/powerlines/src/api.d.mts +7 -0
- package/dist/powerlines/src/index.d.mts +12 -0
- package/dist/powerlines/src/internal/helpers/hooks.cjs +119 -0
- package/dist/powerlines/src/internal/helpers/hooks.d.mts +5 -0
- package/dist/powerlines/src/internal/helpers/hooks.mjs +118 -0
- package/dist/powerlines/src/lib/build/esbuild.cjs +161 -0
- package/dist/powerlines/src/lib/build/esbuild.mjs +159 -0
- package/dist/powerlines/src/lib/entry.cjs +203 -0
- package/dist/powerlines/src/lib/entry.mjs +201 -0
- package/dist/powerlines/src/lib/logger.cjs +108 -0
- package/dist/powerlines/src/lib/logger.mjs +106 -0
- package/dist/powerlines/src/lib/utilities/bundle.cjs +67 -0
- package/dist/powerlines/src/lib/utilities/bundle.mjs +66 -0
- package/dist/powerlines/src/lib/utilities/resolve.cjs +49 -0
- package/dist/powerlines/src/lib/utilities/resolve.mjs +48 -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 +1 -0
- package/dist/powerlines/src/types/api.d.mts +5 -0
- package/dist/powerlines/src/types/api.mjs +3 -0
- package/dist/powerlines/src/types/babel.cjs +156 -0
- package/dist/powerlines/src/types/babel.d.cts +23 -0
- package/dist/powerlines/src/types/babel.d.mts +23 -0
- package/dist/powerlines/src/types/babel.mjs +147 -0
- package/dist/powerlines/src/types/build.cjs +105 -0
- package/dist/powerlines/src/types/build.d.cts +145 -0
- package/dist/powerlines/src/types/build.d.mts +147 -0
- package/dist/powerlines/src/types/build.mjs +101 -0
- package/dist/powerlines/src/types/commands.cjs +16 -0
- package/dist/powerlines/src/types/commands.d.cts +8 -0
- package/dist/powerlines/src/types/commands.d.mts +9 -0
- package/dist/powerlines/src/types/commands.mjs +15 -0
- package/dist/powerlines/src/types/config.cjs +306 -0
- package/dist/powerlines/src/types/config.d.cts +387 -0
- package/dist/powerlines/src/types/config.d.mts +388 -0
- package/dist/powerlines/src/types/config.mjs +293 -0
- package/dist/powerlines/src/types/context.cjs +324 -0
- package/dist/powerlines/src/types/context.d.cts +414 -0
- package/dist/powerlines/src/types/context.d.mts +416 -0
- package/dist/powerlines/src/types/context.mjs +311 -0
- package/dist/powerlines/src/types/fs.cjs +78 -0
- package/dist/powerlines/src/types/fs.d.cts +486 -0
- package/dist/powerlines/src/types/fs.d.mts +486 -0
- package/dist/powerlines/src/types/fs.mjs +75 -0
- package/dist/powerlines/src/types/hooks.cjs +52 -0
- package/dist/powerlines/src/types/hooks.d.mts +2 -0
- package/dist/powerlines/src/types/hooks.mjs +48 -0
- package/dist/powerlines/src/types/index.cjs +11 -0
- package/dist/powerlines/src/types/index.d.mts +12 -0
- package/dist/powerlines/src/types/index.mjs +13 -0
- package/dist/powerlines/src/types/plugin.cjs +249 -0
- package/dist/powerlines/src/types/plugin.d.cts +231 -0
- package/dist/powerlines/src/types/plugin.d.mts +231 -0
- package/dist/powerlines/src/types/plugin.mjs +240 -0
- package/dist/powerlines/src/types/resolved.cjs +153 -0
- package/dist/powerlines/src/types/resolved.d.cts +82 -0
- package/dist/powerlines/src/types/resolved.d.mts +83 -0
- package/dist/powerlines/src/types/resolved.mjs +148 -0
- package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
- package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
- package/dist/powerlines/src/types/unplugin.cjs +1 -0
- package/dist/powerlines/src/types/unplugin.d.mts +7 -0
- package/dist/powerlines/src/types/unplugin.mjs +3 -0
- package/dist/types/index.cjs +10 -3
- package/dist/types/index.d.cts +2 -4
- package/dist/types/index.d.mts +2 -5
- package/dist/types/index.mjs +3 -4
- package/dist/types/plugin.cjs +133 -1
- package/dist/types/plugin.d.cts +156 -3
- package/dist/types/plugin.d.mts +158 -4
- package/dist/types/plugin.mjs +128 -2
- package/dist/types/runtime.cjs +242 -1
- package/dist/types/runtime.d.cts +793 -2
- package/dist/types/runtime.d.mts +793 -2
- package/dist/types/runtime.mjs +240 -2
- package/package.json +13 -9
- package/dist/components-C9bYrQVK.cjs +0 -0
- package/dist/components-CNIQFfeK.mjs +0 -1
- package/dist/create-reflection-resource-BNYxBgW2.mjs +0 -9846
- package/dist/create-reflection-resource-BWYhmX7O.cjs +0 -10085
- package/dist/docs-5r844zC1.d.mts +0 -9
- package/dist/docs-B66b9li3.mjs +0 -219
- package/dist/docs-_MmTNBQX.d.cts +0 -9
- package/dist/docs-hBlKCRWK.cjs +0 -224
- package/dist/env-BPodCdD1.d.cts +0 -116
- package/dist/env-IQvgnabX.mjs +0 -1578
- package/dist/env-cO4BUDn1.cjs +0 -1596
- package/dist/env-zhzvpUI5.d.mts +0 -98
- package/dist/index-BXxhKmeA.d.mts +0 -1
- package/dist/index-Cc7fCJU9.d.mts +0 -1
- package/dist/index-CqdNToYT.d.cts +0 -1
- package/dist/index-DWPDThxu.d.cts +0 -1
- package/dist/plugin-D3B5E_Hg.mjs +0 -1
- package/dist/plugin-D5qyQPqC.cjs +0 -0
- package/dist/resolved-BZG2cwRG.d.cts +0 -1789
- package/dist/resolved-V5COsfDu.d.mts +0 -1791
- package/dist/runtime-Bisl_1Ja.cjs +0 -0
- package/dist/runtime-Q8Ni8SeN.d.cts +0 -794
- package/dist/runtime-azNoeKr-.mjs +0 -1
- package/dist/runtime-qZ0Z2kEd.d.mts +0 -794
- package/dist/types-DwElXV6q.mjs +0 -1
- package/dist/types-MYBaygjr.cjs +0 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { UnpluginBuildVariant } from "./build.mjs";
|
|
2
|
+
import { CommandType } from "./commands.mjs";
|
|
3
|
+
import { BuildPluginContext, PluginContext, UnresolvedContext } from "./context.mjs";
|
|
4
|
+
import { EnvironmentConfig, PluginConfig } from "./config.mjs";
|
|
5
|
+
import { EnvironmentResolvedConfig, ResolvedConfig } from "./resolved.mjs";
|
|
6
|
+
import { FunctionLike, MaybePromise } from "@stryke/types/base";
|
|
7
|
+
import { ExternalIdResult, HookFilter, TransformResult, UnpluginOptions } from "unplugin";
|
|
8
|
+
import { ArrayValues } from "@stryke/types/array";
|
|
9
|
+
|
|
10
|
+
//#region ../powerlines/src/types/plugin.d.ts
|
|
11
|
+
interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> {
|
|
12
|
+
/**
|
|
13
|
+
* The order in which the plugin should be applied.
|
|
14
|
+
*/
|
|
15
|
+
order?: "pre" | "post" | null | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* A filter to determine when the hook should be called.
|
|
18
|
+
*/
|
|
19
|
+
filter?: Pick<HookFilter, TFilter>;
|
|
20
|
+
/**
|
|
21
|
+
* The hook function to be called.
|
|
22
|
+
*/
|
|
23
|
+
handler: THookFunction;
|
|
24
|
+
}
|
|
25
|
+
type PluginHook<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> = THookFunction | PluginHookObject<THookFunction, TFilter>;
|
|
26
|
+
/**
|
|
27
|
+
* A result returned by the plugin from the `types` hook that describes the declaration types output file.
|
|
28
|
+
*/
|
|
29
|
+
interface TypesResult {
|
|
30
|
+
directives?: string[];
|
|
31
|
+
code: string;
|
|
32
|
+
}
|
|
33
|
+
type DeepPartial<T> = { [K in keyof T]?: DeepPartial<T[K]> };
|
|
34
|
+
type ConfigResult<TContext extends PluginContext = PluginContext> = DeepPartial<TContext["config"]> & Record<string, any>;
|
|
35
|
+
interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext> extends Record<CommandType, (this: TContext) => MaybePromise<void>> {
|
|
36
|
+
/**
|
|
37
|
+
* A function that returns configuration options to be merged with the build context's options.
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.
|
|
41
|
+
*
|
|
42
|
+
* @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect.
|
|
43
|
+
*
|
|
44
|
+
* @see https://vitejs.dev/guide/api-plugin#config
|
|
45
|
+
*
|
|
46
|
+
* @param this - The build context.
|
|
47
|
+
* @param config - The partial configuration object to be modified.
|
|
48
|
+
* @returns A promise that resolves to a partial configuration object.
|
|
49
|
+
*/
|
|
50
|
+
config: (this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>;
|
|
51
|
+
/**
|
|
52
|
+
* Modify environment configs before it's resolved. The hook can either mutate the passed-in environment config directly, or return a partial config object that will be deeply merged into existing config.
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* This hook is called for each environment with a partially resolved environment config that already accounts for the default environment config values set at the root level. If plugins need to modify the config of a given environment, they should do it in this hook instead of the config hook. Leaving the config hook only for modifying the root default environment config.
|
|
56
|
+
*
|
|
57
|
+
* @see https://vitejs.dev/guide/api-plugin#configenvironment
|
|
58
|
+
*
|
|
59
|
+
* @param this - The build context.
|
|
60
|
+
* @param name - The name of the environment being configured.
|
|
61
|
+
* @param environment - The Vite-like environment object containing information about the current build environment.
|
|
62
|
+
* @returns A promise that resolves when the hook is complete.
|
|
63
|
+
*/
|
|
64
|
+
configEnvironment: (this: TContext, name: string, environment: EnvironmentConfig) => MaybePromise<Partial<EnvironmentResolvedConfig> | undefined | null>;
|
|
65
|
+
/**
|
|
66
|
+
* A hook that is called when the plugin is resolved.
|
|
67
|
+
*
|
|
68
|
+
* @see https://vitejs.dev/guide/api-plugin#configresolved
|
|
69
|
+
*
|
|
70
|
+
* @param this - The build context.
|
|
71
|
+
* @returns A promise that resolves when the hook is complete.
|
|
72
|
+
*/
|
|
73
|
+
configResolved: (this: TContext) => MaybePromise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* A hook that is called to overwrite the generated declaration types file (.d.ts). The generated type definitions should describe the built-in modules/logic added during the `prepare` task.
|
|
76
|
+
*
|
|
77
|
+
* @param this - The build context.
|
|
78
|
+
* @param code - The source code to generate types for.
|
|
79
|
+
* @returns A promise that resolves when the hook is complete.
|
|
80
|
+
*/
|
|
81
|
+
types: (this: TContext, code: string) => MaybePromise<TypesResult | string | undefined | null>;
|
|
82
|
+
/**
|
|
83
|
+
* A hook that is called at the start of the build process.
|
|
84
|
+
*
|
|
85
|
+
* @param this - The build context and unplugin build context.
|
|
86
|
+
* @returns A promise that resolves when the hook is complete.
|
|
87
|
+
*/
|
|
88
|
+
buildStart: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* A hook that is called at the end of the build process.
|
|
91
|
+
*
|
|
92
|
+
* @param this - The build context and unplugin build context.
|
|
93
|
+
* @returns A promise that resolves when the hook is complete.
|
|
94
|
+
*/
|
|
95
|
+
buildEnd: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* A hook that is called to transform the source code.
|
|
98
|
+
*
|
|
99
|
+
* @param this - The build context, unplugin build context, and unplugin context.
|
|
100
|
+
* @param code - The source code to transform.
|
|
101
|
+
* @param id - The identifier of the source code.
|
|
102
|
+
* @returns A promise that resolves when the hook is complete.
|
|
103
|
+
*/
|
|
104
|
+
transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>;
|
|
105
|
+
/**
|
|
106
|
+
* A hook that is called to load the source code.
|
|
107
|
+
*
|
|
108
|
+
* @param this - The build context, unplugin build context, and unplugin context.
|
|
109
|
+
* @param id - The identifier of the source code.
|
|
110
|
+
* @returns A promise that resolves when the hook is complete.
|
|
111
|
+
*/
|
|
112
|
+
load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>;
|
|
113
|
+
/**
|
|
114
|
+
* A hook that is called to resolve the identifier of the source code.
|
|
115
|
+
*
|
|
116
|
+
* @param this - The build context, unplugin build context, and unplugin context.
|
|
117
|
+
* @param id - The identifier of the source code.
|
|
118
|
+
* @param importer - The importer of the source code.
|
|
119
|
+
* @param options - The options for resolving the identifier.
|
|
120
|
+
* @returns A promise that resolves when the hook is complete.
|
|
121
|
+
*/
|
|
122
|
+
resolveId: (this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
|
|
123
|
+
isEntry: boolean;
|
|
124
|
+
}) => MaybePromise<string | ExternalIdResult | null | undefined>;
|
|
125
|
+
/**
|
|
126
|
+
* A hook that is called to write the bundle to disk.
|
|
127
|
+
*
|
|
128
|
+
* @param this - The build context.
|
|
129
|
+
* @returns A promise that resolves when the hook is complete.
|
|
130
|
+
*/
|
|
131
|
+
writeBundle: (this: TContext) => MaybePromise<void>;
|
|
132
|
+
}
|
|
133
|
+
type BuildPlugin<TContext extends PluginContext = PluginContext, TBuildVariant$1 extends UnpluginBuildVariant = UnpluginBuildVariant, TOptions extends Required<UnpluginOptions>[TBuildVariant$1] = Required<UnpluginOptions>[TBuildVariant$1]> = { [TKey in keyof TOptions]: TOptions[TKey] extends FunctionLike ? (this: ThisParameterType<TOptions[TKey]> & TContext, ...args: Parameters<TOptions[TKey]>) => ReturnType<TOptions[TKey]> | MaybePromise<ReturnType<TOptions[TKey]>> : TOptions[TKey] };
|
|
134
|
+
type PluginHooks<TContext extends PluginContext = PluginContext> = { [TKey in keyof BasePluginHookFunctions<TContext>]: PluginHook<BasePluginHookFunctions<TContext>[TKey]> } & {
|
|
135
|
+
/**
|
|
136
|
+
* A function that returns configuration options to be merged with the build context's options.
|
|
137
|
+
*
|
|
138
|
+
* @remarks
|
|
139
|
+
* Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.
|
|
140
|
+
*
|
|
141
|
+
* @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect. If you want to add plugins, consider doing so in the {@link Plugin.dependsOn} property instead.
|
|
142
|
+
*
|
|
143
|
+
* @see https://vitejs.dev/guide/api-plugin#config
|
|
144
|
+
*
|
|
145
|
+
* @param this - The build context.
|
|
146
|
+
* @param config - The partial configuration object to be modified.
|
|
147
|
+
* @returns A promise that resolves to a partial configuration object.
|
|
148
|
+
*/
|
|
149
|
+
config: PluginHook<(this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>> | ConfigResult<TContext>;
|
|
150
|
+
/**
|
|
151
|
+
* A hook that is called to transform the source code.
|
|
152
|
+
*
|
|
153
|
+
* @param this - The build context, unplugin build context, and unplugin context.
|
|
154
|
+
* @param code - The source code to transform.
|
|
155
|
+
* @param id - The identifier of the source code.
|
|
156
|
+
* @returns A promise that resolves when the hook is complete.
|
|
157
|
+
*/
|
|
158
|
+
transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>, "code" | "id">;
|
|
159
|
+
/**
|
|
160
|
+
* A hook that is called to load the source code.
|
|
161
|
+
*
|
|
162
|
+
* @param this - The build context, unplugin build context, and unplugin context.
|
|
163
|
+
* @param id - The identifier of the source code.
|
|
164
|
+
* @returns A promise that resolves when the hook is complete.
|
|
165
|
+
*/
|
|
166
|
+
load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>, "id">;
|
|
167
|
+
/**
|
|
168
|
+
* A hook that is called to resolve the identifier of the source code.
|
|
169
|
+
*
|
|
170
|
+
* @param this - The build context, unplugin build context, and unplugin context.
|
|
171
|
+
* @param id - The identifier of the source code.
|
|
172
|
+
* @param importer - The importer of the source code.
|
|
173
|
+
* @param options - The options for resolving the identifier.
|
|
174
|
+
* @returns A promise that resolves when the hook is complete.
|
|
175
|
+
*/
|
|
176
|
+
resolveId: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
|
|
177
|
+
isEntry: boolean;
|
|
178
|
+
}) => MaybePromise<string | ExternalIdResult | null | undefined>, "id">;
|
|
179
|
+
};
|
|
180
|
+
type PluginBuildPlugins<TContext extends PluginContext = PluginContext> = { [TBuildVariant in UnpluginBuildVariant]?: BuildPlugin<TContext, TBuildVariant> };
|
|
181
|
+
interface Plugin<TContext extends PluginContext<ResolvedConfig> = PluginContext<ResolvedConfig>> extends Partial<PluginHooks<TContext>>, PluginBuildPlugins<TContext> {
|
|
182
|
+
/**
|
|
183
|
+
* The name of the plugin, for use in deduplication, error messages and logs.
|
|
184
|
+
*/
|
|
185
|
+
name: string;
|
|
186
|
+
/**
|
|
187
|
+
* An API object that can be used for inter-plugin communication.
|
|
188
|
+
*
|
|
189
|
+
* @see https://rollupjs.org/plugin-development/#direct-plugin-communication
|
|
190
|
+
*/
|
|
191
|
+
api?: Record<string, any>;
|
|
192
|
+
/**
|
|
193
|
+
* Enforce plugin invocation tier similar to webpack loaders. Hooks ordering is still subject to the `order` property in the hook object.
|
|
194
|
+
*
|
|
195
|
+
* @remarks
|
|
196
|
+
* The Plugin invocation order is as follows:
|
|
197
|
+
* - `enforce: 'pre'` plugins
|
|
198
|
+
* - `order: 'pre'` plugin hooks
|
|
199
|
+
* - any other plugins (normal)
|
|
200
|
+
* - `order: 'post'` plugin hooks
|
|
201
|
+
* - `enforce: 'post'` plugins
|
|
202
|
+
*
|
|
203
|
+
* @see https://vitejs.dev/guide/api-plugin.html#plugin-ordering
|
|
204
|
+
* @see https://rollupjs.org/plugin-development/#build-hooks
|
|
205
|
+
* @see https://webpack.js.org/concepts/loaders/#enforce---pre-and-post
|
|
206
|
+
* @see https://esbuild.github.io/plugins/#concepts
|
|
207
|
+
*/
|
|
208
|
+
enforce?: "pre" | "post";
|
|
209
|
+
/**
|
|
210
|
+
* A function to determine if two plugins are the same and can be de-duplicated.
|
|
211
|
+
*
|
|
212
|
+
* @remarks
|
|
213
|
+
* If this is not provided, plugins are de-duplicated by comparing their names.
|
|
214
|
+
*
|
|
215
|
+
* @param other - The other plugin to compare against.
|
|
216
|
+
* @returns `true` if the two plugins are the same, `false` otherwise.
|
|
217
|
+
*/
|
|
218
|
+
dedupe?: false | ((other: Plugin<any>) => boolean);
|
|
219
|
+
/**
|
|
220
|
+
* A list of pre-requisite plugins that must be loaded before this plugin can be used.
|
|
221
|
+
*/
|
|
222
|
+
/**
|
|
223
|
+
* Define environments where this plugin should be active. By default, the plugin is active in all environments.
|
|
224
|
+
*
|
|
225
|
+
* @param environment - The environment to check.
|
|
226
|
+
* @returns `true` if the plugin should be active in the specified environment, `false` otherwise.
|
|
227
|
+
*/
|
|
228
|
+
applyToEnvironment?: (environment: EnvironmentResolvedConfig) => boolean | PluginConfig<TContext>;
|
|
229
|
+
}
|
|
230
|
+
//#endregion
|
|
231
|
+
export { BasePluginHookFunctions, BuildPlugin, ConfigResult, Plugin, PluginBuildPlugins, PluginHook, PluginHookObject, PluginHooks, TypesResult };
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { UNPLUGIN_BUILD_VARIANTS } from "./build.mjs";
|
|
2
|
+
import { SUPPORTED_COMMANDS } from "./commands.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../powerlines/src/types/plugin.ts
|
|
5
|
+
const __ΩPick = [
|
|
6
|
+
"T",
|
|
7
|
+
"K",
|
|
8
|
+
"Pick",
|
|
9
|
+
"l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
|
|
10
|
+
];
|
|
11
|
+
const __ΩRecord = [
|
|
12
|
+
"K",
|
|
13
|
+
"T",
|
|
14
|
+
"Record",
|
|
15
|
+
"l'e#\"Rb!b\"Pde\"!N#!w#y"
|
|
16
|
+
];
|
|
17
|
+
const __ΩRequired = [
|
|
18
|
+
"T",
|
|
19
|
+
"Required",
|
|
20
|
+
"l+e#!e\"!fRb!Pde\"!gN##w\"y"
|
|
21
|
+
];
|
|
22
|
+
const __ΩThisParameterType = [
|
|
23
|
+
"T",
|
|
24
|
+
"this",
|
|
25
|
+
"args",
|
|
26
|
+
"",
|
|
27
|
+
"ThisParameterType",
|
|
28
|
+
"lAe\"!R#RPde#!Ph\"!2\"!@2#\"/$qk#'QRb!Pde\"!p)w%y"
|
|
29
|
+
];
|
|
30
|
+
const __ΩParameters = [
|
|
31
|
+
"T",
|
|
32
|
+
"args",
|
|
33
|
+
"",
|
|
34
|
+
"Parameters",
|
|
35
|
+
"l>e\"!R!RPde#!Ph\"!@2\"\"/#qk#'QRb!Pde\"!p)w$y"
|
|
36
|
+
];
|
|
37
|
+
const __ΩReturnType = [
|
|
38
|
+
"T",
|
|
39
|
+
"args",
|
|
40
|
+
"",
|
|
41
|
+
"ReturnType",
|
|
42
|
+
"l>e\"!R\"RPde#!P\"@2\"h\"!/#qk#'QRb!Pde\"!p)w$y"
|
|
43
|
+
];
|
|
44
|
+
const __ΩPartial = [
|
|
45
|
+
"T",
|
|
46
|
+
"Partial",
|
|
47
|
+
"l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
|
|
48
|
+
];
|
|
49
|
+
const __ΩPluginHookObject = [
|
|
50
|
+
"THookFunction",
|
|
51
|
+
"TFilter",
|
|
52
|
+
"pre",
|
|
53
|
+
"post",
|
|
54
|
+
"order",
|
|
55
|
+
"The order in which the plugin should be applied.",
|
|
56
|
+
() => __ΩPick,
|
|
57
|
+
"filter",
|
|
58
|
+
"A filter to determine when the hook should be called.",
|
|
59
|
+
"handler",
|
|
60
|
+
"The hook function to be called.",
|
|
61
|
+
"PluginHookObject",
|
|
62
|
+
"b!!c\"PP.#.$,-J4%8?&!e\"\"o'#4(8?)e\"!4*?+Mw,y"
|
|
63
|
+
];
|
|
64
|
+
const __ΩPluginHook = [
|
|
65
|
+
"THookFunction",
|
|
66
|
+
"TFilter",
|
|
67
|
+
() => __ΩPluginHookObject,
|
|
68
|
+
"PluginHook",
|
|
69
|
+
"b!!c\"Pe\"!e\"!e\"\"o##Jw$y"
|
|
70
|
+
];
|
|
71
|
+
const __ΩDeepPartial = [
|
|
72
|
+
"T",
|
|
73
|
+
0,
|
|
74
|
+
"DeepPartial",
|
|
75
|
+
"l.e#!e\"!fo\"\"Rb!Pde\"!gN#\"w#y"
|
|
76
|
+
];
|
|
77
|
+
const __ΩConfigResult = [
|
|
78
|
+
"PluginContext",
|
|
79
|
+
"TContext",
|
|
80
|
+
() => __ΩDeepPartial,
|
|
81
|
+
"config",
|
|
82
|
+
() => __ΩRecord,
|
|
83
|
+
"ConfigResult",
|
|
84
|
+
"\"w!c\"Pe\"!.$fo#\"&\"o%#Kw&y"
|
|
85
|
+
];
|
|
86
|
+
const __ΩBasePluginHookFunctions = [
|
|
87
|
+
"PluginContext",
|
|
88
|
+
"TContext",
|
|
89
|
+
() => __ΩRecord,
|
|
90
|
+
"CommandType",
|
|
91
|
+
"this",
|
|
92
|
+
"",
|
|
93
|
+
"UnresolvedContext",
|
|
94
|
+
"config",
|
|
95
|
+
"A function that returns configuration options to be merged with the build context's options.",
|
|
96
|
+
"name",
|
|
97
|
+
"EnvironmentConfig",
|
|
98
|
+
"environment",
|
|
99
|
+
"configEnvironment",
|
|
100
|
+
"Modify environment configs before it's resolved. The hook can either mutate the passed-in environment config directly, or return a partial config object that will be deeply merged into existing config.",
|
|
101
|
+
"configResolved",
|
|
102
|
+
"A hook that is called when the plugin is resolved.",
|
|
103
|
+
"code",
|
|
104
|
+
"types",
|
|
105
|
+
"A hook that is called to overwrite the generated declaration types file (.d.ts). The generated type definitions should describe the built-in modules/logic added during the `prepare` task.",
|
|
106
|
+
"BuildPluginContext",
|
|
107
|
+
"buildStart",
|
|
108
|
+
"A hook that is called at the start of the build process.",
|
|
109
|
+
"buildEnd",
|
|
110
|
+
"A hook that is called at the end of the build process.",
|
|
111
|
+
"id",
|
|
112
|
+
"transform",
|
|
113
|
+
"A hook that is called to transform the source code.",
|
|
114
|
+
"load",
|
|
115
|
+
"A hook that is called to load the source code.",
|
|
116
|
+
"importer",
|
|
117
|
+
"isEntry",
|
|
118
|
+
"options",
|
|
119
|
+
"resolveId",
|
|
120
|
+
"A hook that is called to resolve the identifier of the source code.",
|
|
121
|
+
"writeBundle",
|
|
122
|
+
"A hook that is called to write the bundle to disk.",
|
|
123
|
+
"BasePluginHookFunctions",
|
|
124
|
+
"\"w!c\"P\"w$Pe#!2%!/&o##P\"w'2%!/&4(?)Pe#!2%&2*\"w+2,!/&4-?.Pe#!2%!/&4/?0Pe#!2%&21!/&42?3PP\"w4e$!K2%!/&45?6PP\"w4e$!K2%!/&47?8PP\"w4e$!K2%&21&29!/&4:?;PP\"w4e$!K2%&29!/&4<?=PP\"w4e$!K2%&29P&-J2>P)4?M2@!/&4A?BPe#!2%!/&4C?DMwEy"
|
|
125
|
+
];
|
|
126
|
+
const __ΩBuildPlugin = [
|
|
127
|
+
"PluginContext",
|
|
128
|
+
"TContext",
|
|
129
|
+
"UnpluginBuildVariant",
|
|
130
|
+
"TBuildVariant",
|
|
131
|
+
() => __ΩRequired,
|
|
132
|
+
"TOptions",
|
|
133
|
+
() => __ΩThisParameterType,
|
|
134
|
+
"this",
|
|
135
|
+
() => __ΩParameters,
|
|
136
|
+
"args",
|
|
137
|
+
() => __ΩReturnType,
|
|
138
|
+
"",
|
|
139
|
+
"BuildPlugin",
|
|
140
|
+
"liPPe'#e&!fo'\"e'!K2(e&#e%!fo)\"@2*Pe'#e&!fo+\"!J/,Re%#e$!fRPe$#e#!f!qk#RQR\"w!c\"\"w#c$!o%\"e!\"fc&Pde\"#gNZ!w-y"
|
|
141
|
+
];
|
|
142
|
+
const __ΩPluginHooks = [
|
|
143
|
+
"PluginContext",
|
|
144
|
+
"TContext",
|
|
145
|
+
() => __ΩBasePluginHookFunctions,
|
|
146
|
+
() => __ΩPluginHook,
|
|
147
|
+
() => __ΩBasePluginHookFunctions,
|
|
148
|
+
() => __ΩPluginHook,
|
|
149
|
+
"UnresolvedContext",
|
|
150
|
+
"this",
|
|
151
|
+
"",
|
|
152
|
+
() => __ΩConfigResult,
|
|
153
|
+
"config",
|
|
154
|
+
"A function that returns configuration options to be merged with the build context's options.",
|
|
155
|
+
() => __ΩPluginHook,
|
|
156
|
+
"BuildPluginContext",
|
|
157
|
+
"code",
|
|
158
|
+
"id",
|
|
159
|
+
"code",
|
|
160
|
+
"id",
|
|
161
|
+
"transform",
|
|
162
|
+
"A hook that is called to transform the source code.",
|
|
163
|
+
() => __ΩPluginHook,
|
|
164
|
+
"id",
|
|
165
|
+
"load",
|
|
166
|
+
"A hook that is called to load the source code.",
|
|
167
|
+
() => __ΩPluginHook,
|
|
168
|
+
"importer",
|
|
169
|
+
"isEntry",
|
|
170
|
+
"options",
|
|
171
|
+
"id",
|
|
172
|
+
"resolveId",
|
|
173
|
+
"A hook that is called to resolve the identifier of the source code.",
|
|
174
|
+
"PluginHooks",
|
|
175
|
+
"l1e$!o%\"e\"!fo$\"R\"w!c\"PPde#!o#\"gN#!PPP\"w'2(!/)o&\"e$!o*\"J4+?,PP\"w.e%!K2(&2/&20!/)P.1.2Jo-#43?4PP\"w.e%!K2(&20!/).6o5#47?8PP\"w.e%!K2(&20P&-J2:P)4;M2<!/).=o9#4>??MKw@y"
|
|
176
|
+
];
|
|
177
|
+
const __ΩPluginBuildPlugins = [
|
|
178
|
+
"PluginContext",
|
|
179
|
+
"TContext",
|
|
180
|
+
"UnpluginBuildVariant",
|
|
181
|
+
() => __ΩBuildPlugin,
|
|
182
|
+
"PluginBuildPlugins",
|
|
183
|
+
"l-e#!e\"!o$#R\"w!c\"Pd\"w#N#\"w%y"
|
|
184
|
+
];
|
|
185
|
+
const __ΩPlugin = [
|
|
186
|
+
"PluginContext",
|
|
187
|
+
"TContext",
|
|
188
|
+
() => __ΩPartial,
|
|
189
|
+
() => __ΩPluginHooks,
|
|
190
|
+
() => __ΩPluginBuildPlugins,
|
|
191
|
+
"name",
|
|
192
|
+
"The name of the plugin, for use in deduplication, error messages and logs.",
|
|
193
|
+
() => __ΩRecord,
|
|
194
|
+
"api",
|
|
195
|
+
"An API object that can be used for inter-plugin communication.",
|
|
196
|
+
"pre",
|
|
197
|
+
"post",
|
|
198
|
+
"enforce",
|
|
199
|
+
"Enforce plugin invocation tier similar to webpack loaders. Hooks ordering is still subject to the `order` property in the hook object.",
|
|
200
|
+
false,
|
|
201
|
+
0,
|
|
202
|
+
"other",
|
|
203
|
+
"",
|
|
204
|
+
"dedupe",
|
|
205
|
+
"A function to determine if two plugins are the same and can be de-duplicated.",
|
|
206
|
+
"EnvironmentResolvedConfig",
|
|
207
|
+
"environment",
|
|
208
|
+
"PluginConfig",
|
|
209
|
+
"applyToEnvironment",
|
|
210
|
+
"Define environments where this plugin should be active. By default, the plugin is active in all environments.",
|
|
211
|
+
"Plugin",
|
|
212
|
+
"\"w!c\"Pe\"!o$\"o#\"e\"!o%\"&4&?'&\"o(#4)8?*P.+.,J4-8?.P./P\"o0\"21)/2J438?4P\"w526P)\"w7J/2488?9Mw:y"
|
|
213
|
+
];
|
|
214
|
+
const PLUGIN_NON_HOOK_FIELDS = [
|
|
215
|
+
"name",
|
|
216
|
+
"api",
|
|
217
|
+
"enforce",
|
|
218
|
+
"dedupe",
|
|
219
|
+
"applyToEnvironment"
|
|
220
|
+
];
|
|
221
|
+
const KNOWN_HOOKS = [
|
|
222
|
+
...SUPPORTED_COMMANDS,
|
|
223
|
+
"config",
|
|
224
|
+
"configEnvironment",
|
|
225
|
+
"configResolved",
|
|
226
|
+
"buildStart",
|
|
227
|
+
"buildEnd",
|
|
228
|
+
"transform",
|
|
229
|
+
"load",
|
|
230
|
+
"resolveId",
|
|
231
|
+
"writeBundle"
|
|
232
|
+
];
|
|
233
|
+
const KNOWN_PLUGIN_FIELDS = [
|
|
234
|
+
...PLUGIN_NON_HOOK_FIELDS,
|
|
235
|
+
...KNOWN_HOOKS,
|
|
236
|
+
...UNPLUGIN_BUILD_VARIANTS
|
|
237
|
+
];
|
|
238
|
+
|
|
239
|
+
//#endregion
|
|
240
|
+
export { KNOWN_HOOKS, PLUGIN_NON_HOOK_FIELDS, __ΩBasePluginHookFunctions, __ΩBuildPlugin, __ΩConfigResult, __ΩPlugin, __ΩPluginBuildPlugins, __ΩPluginHook, __ΩPluginHookObject, __ΩPluginHooks };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../powerlines/src/types/resolved.ts
|
|
3
|
+
const __ΩOmit = [
|
|
4
|
+
"T",
|
|
5
|
+
"K",
|
|
6
|
+
() => __ΩPick,
|
|
7
|
+
() => __ΩExclude,
|
|
8
|
+
"Omit",
|
|
9
|
+
"b!b\"e!!e!!ge!\"o$#o##w%y"
|
|
10
|
+
];
|
|
11
|
+
const __ΩRequired = [
|
|
12
|
+
"T",
|
|
13
|
+
"Required",
|
|
14
|
+
"l+e#!e\"!fRb!Pde\"!gN##w\"y"
|
|
15
|
+
];
|
|
16
|
+
const __ΩPick = [
|
|
17
|
+
"T",
|
|
18
|
+
"K",
|
|
19
|
+
"Pick",
|
|
20
|
+
"l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
|
|
21
|
+
];
|
|
22
|
+
const __ΩExclude = [
|
|
23
|
+
"T",
|
|
24
|
+
"U",
|
|
25
|
+
"Exclude",
|
|
26
|
+
"l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
|
|
27
|
+
];
|
|
28
|
+
const __ΩResolvedEntryTypeDefinition = [
|
|
29
|
+
"input",
|
|
30
|
+
"The user provided entry point in the source code",
|
|
31
|
+
"output",
|
|
32
|
+
"An optional name to use in the package export during the build process",
|
|
33
|
+
"ResolvedEntryTypeDefinition",
|
|
34
|
+
"P!!4!8?\"&4#8?$Mw%y"
|
|
35
|
+
];
|
|
36
|
+
const __ΩBabelResolvedConfig = [
|
|
37
|
+
() => __ΩOmit,
|
|
38
|
+
"BabelUserConfig",
|
|
39
|
+
"plugins",
|
|
40
|
+
"presets",
|
|
41
|
+
() => __ΩRequired,
|
|
42
|
+
() => __ΩPick,
|
|
43
|
+
"plugins",
|
|
44
|
+
"presets",
|
|
45
|
+
"BabelResolvedConfig",
|
|
46
|
+
"P\"w\"P.#.$Jo!#\"w\"P.'.(Jo&#o%\"Kw)y"
|
|
47
|
+
];
|
|
48
|
+
const __ΩResolvedAssetGlob = [
|
|
49
|
+
() => __ΩRequired,
|
|
50
|
+
() => __ΩPick,
|
|
51
|
+
"input",
|
|
52
|
+
"ResolvedAssetGlob",
|
|
53
|
+
"P!!.#o\"#o!\"Kw$y"
|
|
54
|
+
];
|
|
55
|
+
const __ΩOutputResolvedConfig = [
|
|
56
|
+
() => __ΩRequired,
|
|
57
|
+
() => __ΩOmit,
|
|
58
|
+
"OutputConfig",
|
|
59
|
+
"assets",
|
|
60
|
+
"storage",
|
|
61
|
+
() => __ΩResolvedAssetGlob,
|
|
62
|
+
"assets",
|
|
63
|
+
() => __ΩPick,
|
|
64
|
+
"storage",
|
|
65
|
+
"OutputResolvedConfig",
|
|
66
|
+
"PP\"w#P.$.%Jo\"#Pn&F4'MKo!\"\"w#.)o(#Kw*y"
|
|
67
|
+
];
|
|
68
|
+
const __ΩResolvedConfig = [
|
|
69
|
+
"UserConfig",
|
|
70
|
+
"TUserConfig",
|
|
71
|
+
() => __ΩOmit,
|
|
72
|
+
"name",
|
|
73
|
+
"title",
|
|
74
|
+
"organization",
|
|
75
|
+
"compatibilityDate",
|
|
76
|
+
"plugins",
|
|
77
|
+
"mode",
|
|
78
|
+
"environments",
|
|
79
|
+
"platform",
|
|
80
|
+
"tsconfig",
|
|
81
|
+
"lint",
|
|
82
|
+
"test",
|
|
83
|
+
"build",
|
|
84
|
+
"transform",
|
|
85
|
+
"deploy",
|
|
86
|
+
"variant",
|
|
87
|
+
"type",
|
|
88
|
+
"output",
|
|
89
|
+
"logLevel",
|
|
90
|
+
"framework",
|
|
91
|
+
"sourceRoot",
|
|
92
|
+
() => __ΩRequired,
|
|
93
|
+
() => __ΩPick,
|
|
94
|
+
"name",
|
|
95
|
+
"title",
|
|
96
|
+
"organization",
|
|
97
|
+
"compatibilityDate",
|
|
98
|
+
"plugins",
|
|
99
|
+
"mode",
|
|
100
|
+
"environments",
|
|
101
|
+
"tsconfig",
|
|
102
|
+
"lint",
|
|
103
|
+
"test",
|
|
104
|
+
"build",
|
|
105
|
+
"transform",
|
|
106
|
+
"deploy",
|
|
107
|
+
"framework",
|
|
108
|
+
"sourceRoot",
|
|
109
|
+
"InlineConfig",
|
|
110
|
+
"inlineConfig",
|
|
111
|
+
"The configuration options that were provided inline to the Powerlines CLI.",
|
|
112
|
+
"userConfig",
|
|
113
|
+
"The original configuration options that were provided by the user to the Powerlines process.",
|
|
114
|
+
"command",
|
|
115
|
+
"A string identifier for the Powerlines command being executed.",
|
|
116
|
+
"sourceRoot",
|
|
117
|
+
"\\{projectRoot\\}/src",
|
|
118
|
+
"The root directory of the project's source code",
|
|
119
|
+
"projectRoot",
|
|
120
|
+
"The root directory of the project.",
|
|
121
|
+
"projectType",
|
|
122
|
+
"The type of project being built.",
|
|
123
|
+
() => __ΩOutputResolvedConfig,
|
|
124
|
+
"output",
|
|
125
|
+
"The output configuration options to use for the build process",
|
|
126
|
+
() => __ΩOmit,
|
|
127
|
+
"build",
|
|
128
|
+
"override",
|
|
129
|
+
() => __ΩRequired,
|
|
130
|
+
() => __ΩPick,
|
|
131
|
+
() => __ΩRequired,
|
|
132
|
+
"build",
|
|
133
|
+
"override",
|
|
134
|
+
"build",
|
|
135
|
+
"Configuration provided to build processes",
|
|
136
|
+
"error",
|
|
137
|
+
"warn",
|
|
138
|
+
"info",
|
|
139
|
+
"debug",
|
|
140
|
+
"trace",
|
|
141
|
+
"logLevel",
|
|
142
|
+
"info",
|
|
143
|
+
"The log level to use for the Powerlines processes.",
|
|
144
|
+
"ResolvedConfig",
|
|
145
|
+
"\"w!c\"Pe\"!P.$.%.&.'.(.).*.+.,.-.../.0.1.2.3.4.5.6.7Jo##e\"!P.:.;.<.=.>.?.@.A.B.C.D.E.F.G.HJo9#o8\"P\"wI4J?Ke#!4L?M!4N?O!4P>Q?R!4S?T!4U?VnW4X?YPe$!.[f.\\oZ#e$!.`fo_\".ao^#o]\"K4b?cP.d.e.f.g.h,J4i>j?kMKwly"
|
|
146
|
+
];
|
|
147
|
+
|
|
148
|
+
//#endregion
|
|
149
|
+
exports.__ΩBabelResolvedConfig = __ΩBabelResolvedConfig;
|
|
150
|
+
exports.__ΩOutputResolvedConfig = __ΩOutputResolvedConfig;
|
|
151
|
+
exports.__ΩResolvedAssetGlob = __ΩResolvedAssetGlob;
|
|
152
|
+
exports.__ΩResolvedConfig = __ΩResolvedConfig;
|
|
153
|
+
exports.__ΩResolvedEntryTypeDefinition = __ΩResolvedEntryTypeDefinition;
|