powerlines 0.41.6 → 0.41.8
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/README.md +14 -16
- package/dist/{api-CY668wMZ.mjs → api-BYLuEyjx.mjs} +142 -333
- package/dist/api-BYLuEyjx.mjs.map +1 -0
- package/dist/{api-GPlMYw0d.cjs → api-Zx_hzL3g.cjs} +505 -722
- package/dist/astro.cjs +8 -18
- package/dist/astro.d.cts +1 -2
- package/dist/astro.d.cts.map +1 -1
- package/dist/astro.d.mts +1 -6
- package/dist/astro.d.mts.map +1 -1
- package/dist/astro.mjs +6 -16
- package/dist/astro.mjs.map +1 -1
- package/dist/{chunk-CbDLau6x.cjs → chunk-AIJqnxB6.cjs} +27 -1
- package/dist/chunk-CtajNgzt.mjs +36 -0
- package/dist/config.cjs +20 -4
- package/dist/config.d.cts +1 -2
- package/dist/config.d.mts +1 -3
- package/dist/config.mjs +11 -2
- package/dist/config.mjs.map +1 -0
- package/dist/constants.cjs +20 -20
- package/dist/constants.d.cts +1 -24
- package/dist/constants.d.mts +1 -24
- package/dist/constants.mjs +11 -3
- package/dist/constants.mjs.map +1 -0
- package/dist/context/index.cjs +4 -9
- package/dist/context/index.d.cts +56 -132
- package/dist/context/index.d.cts.map +1 -1
- package/dist/context/index.d.mts +55 -135
- package/dist/context/index.d.mts.map +1 -1
- package/dist/context/index.mjs +3 -9
- package/dist/esbuild.cjs +60 -17
- package/dist/esbuild.d.cts +5 -29
- package/dist/esbuild.d.cts.map +1 -1
- package/dist/esbuild.d.mts +5 -33
- package/dist/esbuild.d.mts.map +1 -1
- package/dist/esbuild.mjs +44 -12
- package/dist/esbuild.mjs.map +1 -0
- package/dist/farm.cjs +6 -13
- package/dist/farm.d.cts +2 -3
- package/dist/farm.d.cts.map +1 -1
- package/dist/farm.d.mts +2 -6
- package/dist/farm.d.mts.map +1 -1
- package/dist/farm.mjs +4 -11
- package/dist/farm.mjs.map +1 -1
- package/dist/index.cjs +7 -13
- package/dist/index.d.cts +263 -6
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +263 -7
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +3 -9
- package/dist/index.mjs.map +1 -1
- package/dist/next.cjs +7 -14
- package/dist/next.d.cts +0 -1
- package/dist/next.d.cts.map +1 -1
- package/dist/next.d.mts +0 -1
- package/dist/next.d.mts.map +1 -1
- package/dist/next.mjs +6 -13
- package/dist/next.mjs.map +1 -1
- package/dist/nuxt.cjs +12 -22
- package/dist/nuxt.d.cts +2 -3
- package/dist/nuxt.d.cts.map +1 -1
- package/dist/nuxt.d.mts +2 -7
- package/dist/nuxt.d.mts.map +1 -1
- package/dist/nuxt.mjs +8 -18
- package/dist/nuxt.mjs.map +1 -1
- package/dist/plugin-utils.cjs +20 -28
- package/dist/plugin-utils.d.cts +1 -267
- package/dist/plugin-utils.d.mts +1 -272
- package/dist/plugin-utils.mjs +11 -4
- package/dist/plugin-utils.mjs.map +1 -0
- package/dist/rolldown.cjs +52 -18
- package/dist/rolldown.d.cts +5 -29
- package/dist/rolldown.d.cts.map +1 -1
- package/dist/rolldown.d.mts +5 -32
- package/dist/rolldown.d.mts.map +1 -1
- package/dist/rolldown.mjs +36 -13
- package/dist/rolldown.mjs.map +1 -0
- package/dist/rollup.cjs +20 -48
- package/dist/rollup.d.cts +5 -29
- package/dist/rollup.d.cts.map +1 -1
- package/dist/rollup.d.mts +5 -32
- package/dist/rollup.d.mts.map +1 -1
- package/dist/rollup.mjs +6 -44
- package/dist/rollup.mjs.map +1 -1
- package/dist/rspack.cjs +20 -82
- package/dist/rspack.d.cts +4 -24
- package/dist/rspack.d.cts.map +1 -1
- package/dist/rspack.d.mts +4 -27
- package/dist/rspack.d.mts.map +1 -1
- package/dist/rspack.mjs +5 -77
- package/dist/rspack.mjs.map +1 -1
- package/dist/storage/index.cjs +2 -3
- package/dist/storage/index.d.cts +7 -7
- package/dist/storage/index.d.cts.map +1 -1
- package/dist/storage/index.d.mts +7 -11
- package/dist/storage/index.d.mts.map +1 -1
- package/dist/storage/index.mjs +1 -3
- package/dist/{tsconfig-C8M8X6U0.cjs → tsconfig-BJrUrPC_.cjs} +13 -13
- package/dist/{tsconfig-B92heKit.mjs → tsconfig-D9GCB2I9.mjs} +5 -5
- package/dist/tsconfig-D9GCB2I9.mjs.map +1 -0
- package/dist/tsdown.cjs +38 -187
- package/dist/tsdown.d.cts +2 -24
- package/dist/tsdown.d.cts.map +1 -1
- package/dist/tsdown.d.mts +4 -30
- package/dist/tsdown.d.mts.map +1 -1
- package/dist/tsdown.mjs +8 -167
- package/dist/tsdown.mjs.map +1 -1
- package/dist/tsup.cjs +29 -134
- package/dist/tsup.d.cts +2 -24
- package/dist/tsup.d.cts.map +1 -1
- package/dist/tsup.d.mts +2 -28
- package/dist/tsup.d.mts.map +1 -1
- package/dist/tsup.mjs +7 -122
- package/dist/tsup.mjs.map +1 -1
- package/dist/types-DerAvFjs.d.cts +4 -0
- package/dist/types-DerAvFjs.d.cts.map +1 -0
- package/dist/types-ro7jWCtL.d.mts +4 -0
- package/dist/types-ro7jWCtL.d.mts.map +1 -0
- package/dist/typescript/index.cjs +2 -1
- package/dist/typescript/index.d.cts +2 -2
- package/dist/typescript/index.d.cts.map +1 -1
- package/dist/typescript/index.d.mts +1 -4
- package/dist/typescript/index.d.mts.map +1 -1
- package/dist/typescript/index.mjs +1 -1
- package/dist/unloader.cjs +6 -13
- package/dist/unloader.d.cts +2 -4
- package/dist/unloader.d.cts.map +1 -1
- package/dist/unloader.d.mts +2 -7
- package/dist/unloader.d.mts.map +1 -1
- package/dist/unloader.mjs +4 -11
- package/dist/unloader.mjs.map +1 -1
- package/dist/unplugin.cjs +11 -14
- package/dist/unplugin.d.cts +5 -6
- package/dist/unplugin.d.cts.map +1 -1
- package/dist/unplugin.d.mts +3 -6
- package/dist/unplugin.d.mts.map +1 -1
- package/dist/unplugin.mjs +6 -10
- package/dist/utils.cjs +38 -22
- package/dist/utils.d.cts +3 -2
- package/dist/utils.d.mts +3 -3
- package/dist/utils.mjs +19 -3
- package/dist/utils.mjs.map +1 -0
- package/dist/{virtual-B1MLgqnQ.cjs → virtual-Cbvj12lU.cjs} +33 -33
- package/dist/{virtual-B9imjOqe.mjs → virtual-DvkJm7gK.mjs} +7 -7
- package/dist/virtual-DvkJm7gK.mjs.map +1 -0
- package/dist/vite.cjs +84 -19
- package/dist/vite.d.cts +5 -16
- package/dist/vite.d.cts.map +1 -1
- package/dist/vite.d.mts +5 -19
- package/dist/vite.d.mts.map +1 -1
- package/dist/vite.mjs +67 -14
- package/dist/vite.mjs.map +1 -0
- package/dist/webpack.cjs +42 -16
- package/dist/webpack.d.cts +5 -29
- package/dist/webpack.d.cts.map +1 -1
- package/dist/webpack.d.mts +5 -32
- package/dist/webpack.d.mts.map +1 -1
- package/dist/webpack.mjs +26 -11
- package/dist/webpack.mjs.map +1 -0
- package/package.json +17 -17
- package/dist/api-CY668wMZ.mjs.map +0 -1
- package/dist/commands-7TWNqTU1.d.cts +0 -12
- package/dist/commands-7TWNqTU1.d.cts.map +0 -1
- package/dist/commands-yacLkOi0.d.mts +0 -12
- package/dist/commands-yacLkOi0.d.mts.map +0 -1
- package/dist/config-CK756s0L.d.mts +0 -2232
- package/dist/config-CK756s0L.d.mts.map +0 -1
- package/dist/config-CiPXgwzt.d.mts +0 -39
- package/dist/config-CiPXgwzt.d.mts.map +0 -1
- package/dist/config-D4Fh2gQL.mjs +0 -87
- package/dist/config-D4Fh2gQL.mjs.map +0 -1
- package/dist/config-D86Vw7SC.cjs +0 -105
- package/dist/config-J74ORCFY.d.cts +0 -39
- package/dist/config-J74ORCFY.d.cts.map +0 -1
- package/dist/config-vnrrSxEB.d.cts +0 -2232
- package/dist/config-vnrrSxEB.d.cts.map +0 -1
- package/dist/constants-CZh5rsgh.cjs +0 -103
- package/dist/constants-cXxSHhNp.mjs +0 -32
- package/dist/constants-cXxSHhNp.mjs.map +0 -1
- package/dist/constants.d.cts.map +0 -1
- package/dist/constants.d.mts.map +0 -1
- package/dist/esbuild-B3NuCco0.cjs +0 -100
- package/dist/esbuild-DWiE0pYc.mjs +0 -82
- package/dist/esbuild-DWiE0pYc.mjs.map +0 -1
- package/dist/index-2JXW-b2-.d.mts +0 -82
- package/dist/index-2JXW-b2-.d.mts.map +0 -1
- package/dist/index-6BLROVtJ.d.mts +0 -261
- package/dist/index-6BLROVtJ.d.mts.map +0 -1
- package/dist/index-C7W0kmm7.d.mts +0 -171
- package/dist/index-C7W0kmm7.d.mts.map +0 -1
- package/dist/index-DJ-k0GOX.d.cts +0 -261
- package/dist/index-DJ-k0GOX.d.cts.map +0 -1
- package/dist/paths-CS8ecCnW.mjs +0 -81
- package/dist/paths-CS8ecCnW.mjs.map +0 -1
- package/dist/paths-YmyIGEVo.cjs +0 -98
- package/dist/plugin-B9TQt-p0.d.cts +0 -82
- package/dist/plugin-B9TQt-p0.d.cts.map +0 -1
- package/dist/plugin-BE3wmhoU.d.cts +0 -26
- package/dist/plugin-BE3wmhoU.d.cts.map +0 -1
- package/dist/plugin-CZ_PJPpQ.cjs +0 -96
- package/dist/plugin-C_8RhG5V.d.mts +0 -26
- package/dist/plugin-C_8RhG5V.d.mts.map +0 -1
- package/dist/plugin-E5foRD0k.mjs +0 -61
- package/dist/plugin-E5foRD0k.mjs.map +0 -1
- package/dist/plugin-utils-C3HnZJl1.mjs +0 -387
- package/dist/plugin-utils-C3HnZJl1.mjs.map +0 -1
- package/dist/plugin-utils-Ck3cx3w6.cjs +0 -531
- package/dist/plugin-utils.d.cts.map +0 -1
- package/dist/plugin-utils.d.mts.map +0 -1
- package/dist/resolve-options-6sXFqzEA.mjs +0 -116
- package/dist/resolve-options-6sXFqzEA.mjs.map +0 -1
- package/dist/resolve-options-BQnTgg3V.cjs +0 -105
- package/dist/resolve-options-D-RGs8j8.mjs +0 -117
- package/dist/resolve-options-D-RGs8j8.mjs.map +0 -1
- package/dist/resolve-options-DHL3RM8F.mjs +0 -87
- package/dist/resolve-options-DHL3RM8F.mjs.map +0 -1
- package/dist/resolve-options-lxQ2pm0W.cjs +0 -127
- package/dist/resolve-options-vyFhhkLp.cjs +0 -133
- package/dist/rolldown-CQI8ps6f.cjs +0 -83
- package/dist/rolldown-DsXEFXyP.mjs +0 -65
- package/dist/rolldown-DsXEFXyP.mjs.map +0 -1
- package/dist/tsconfig-B92heKit.mjs.map +0 -1
- package/dist/types-Bh_vLuQ0.d.mts +0 -1
- package/dist/utils-BbDma_5Y.cjs +0 -449
- package/dist/utils-DoQcX7Sk.mjs +0 -339
- package/dist/utils-DoQcX7Sk.mjs.map +0 -1
- package/dist/virtual-B9imjOqe.mjs.map +0 -1
- package/dist/vite-Bx1gbbj3.mjs +0 -171
- package/dist/vite-Bx1gbbj3.mjs.map +0 -1
- package/dist/vite-XV170zx6.cjs +0 -189
- package/dist/webpack-9G4xJBfz.cjs +0 -107
- package/dist/webpack-BkTkELre.mjs +0 -88
- package/dist/webpack-BkTkELre.mjs.map +0 -1
- package/dist/write-file-CpNWY8SV.d.cts +0 -171
- package/dist/write-file-CpNWY8SV.d.cts.map +0 -1
package/dist/context/index.d.mts
CHANGED
|
@@ -1,95 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../config-CiPXgwzt.mjs";
|
|
3
|
-
import "../index-C7W0kmm7.mjs";
|
|
4
|
-
import "../index-2JXW-b2-.mjs";
|
|
5
|
-
import "../types-Bh_vLuQ0.mjs";
|
|
1
|
+
import { t as types_d_exports } from "../types-ro7jWCtL.mjs";
|
|
6
2
|
import { EnvPaths } from "@stryke/env/get-env-paths";
|
|
7
3
|
import { FlatCache } from "flat-cache";
|
|
8
4
|
import { ParseResult } from "oxc-parser";
|
|
9
5
|
import { RequestInfo, Response } from "undici";
|
|
10
6
|
import { UnpluginMessage } from "unplugin";
|
|
7
|
+
import { UNSAFE_ContextInternal, UNSAFE_EnvironmentContext, UNSAFE_PluginContext } from "@powerlines/core/types/_internal";
|
|
11
8
|
import { PackageJson } from "@stryke/types/package-json";
|
|
12
9
|
import { Range } from "semver";
|
|
13
10
|
|
|
14
|
-
//#region ../core/src/types/_internal.d.ts
|
|
15
|
-
/**
|
|
16
|
-
* Internal fields and methods for internal contexts
|
|
17
|
-
*
|
|
18
|
-
* @internal
|
|
19
|
-
*/
|
|
20
|
-
interface UNSAFE_ContextInternal<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
21
|
-
/**
|
|
22
|
-
* The API instance for interacting with Powerlines
|
|
23
|
-
*
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
|
-
api: API<TResolvedConfig>;
|
|
27
|
-
/**
|
|
28
|
-
* Add a Powerlines plugin used in the build process
|
|
29
|
-
*
|
|
30
|
-
* @internal
|
|
31
|
-
*
|
|
32
|
-
* @param config - The import path of the plugin to add
|
|
33
|
-
*/
|
|
34
|
-
addPlugin: (config: PluginConfig<PluginContext<TResolvedConfig>>) => Promise<void>;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* An internal representation of the environment context, used for managing hooks and environment data.
|
|
38
|
-
*
|
|
39
|
-
* @internal
|
|
40
|
-
*/
|
|
41
|
-
interface UNSAFE_EnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends EnvironmentContext<TResolvedConfig> {
|
|
42
|
-
$$internal: UNSAFE_ContextInternal<TResolvedConfig>;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Internal fields and methods for the internal plugin context
|
|
46
|
-
*
|
|
47
|
-
* @internal
|
|
48
|
-
*/
|
|
49
|
-
interface UNSAFE_PluginContextInternal<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends UNSAFE_ContextInternal<TResolvedConfig> {
|
|
50
|
-
/**
|
|
51
|
-
* The API instance for interacting with Powerlines
|
|
52
|
-
*
|
|
53
|
-
* @internal
|
|
54
|
-
*/
|
|
55
|
-
api: API<TResolvedConfig>;
|
|
56
|
-
/**
|
|
57
|
-
* The environment context associated with this plugin context
|
|
58
|
-
*
|
|
59
|
-
* @internal
|
|
60
|
-
*/
|
|
61
|
-
environment: UNSAFE_EnvironmentContext<TResolvedConfig>;
|
|
62
|
-
/**
|
|
63
|
-
* Call a hook within the Powerlines system
|
|
64
|
-
*
|
|
65
|
-
* @internal
|
|
66
|
-
*
|
|
67
|
-
* @param hook - The name of the hook to call
|
|
68
|
-
* @param options - Options for calling the hook
|
|
69
|
-
* @param args - Arguments to pass to the hook
|
|
70
|
-
* @returns The result of the hook call
|
|
71
|
-
*/
|
|
72
|
-
callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
|
|
73
|
-
environment?: string | EnvironmentContext<TResolvedConfig>;
|
|
74
|
-
}, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
|
|
75
|
-
/**
|
|
76
|
-
* A place to store internal data for the plugin context
|
|
77
|
-
*
|
|
78
|
-
* @internal
|
|
79
|
-
*/
|
|
80
|
-
meta: Record<string, any>;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* An internal representation of the plugin context, used for managing hooks and environment data.
|
|
84
|
-
*
|
|
85
|
-
* @internal
|
|
86
|
-
*/
|
|
87
|
-
interface UNSAFE_PluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends PluginContext<TResolvedConfig> {
|
|
88
|
-
$$internal: UNSAFE_PluginContextInternal<TResolvedConfig>;
|
|
89
|
-
}
|
|
90
|
-
//#endregion
|
|
91
11
|
//#region src/context/context.d.ts
|
|
92
|
-
declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> implements Context<TResolvedConfig> {
|
|
12
|
+
declare class PowerlinesContext<TResolvedConfig extends types_d_exports.ResolvedConfig = types_d_exports.ResolvedConfig> implements types_d_exports.Context<TResolvedConfig> {
|
|
93
13
|
#private;
|
|
94
14
|
/**
|
|
95
15
|
* Create a new Storm context from the workspace root and user config.
|
|
@@ -98,7 +18,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
98
18
|
* @param config - The user configuration options.
|
|
99
19
|
* @returns A promise that resolves to the new context.
|
|
100
20
|
*/
|
|
101
|
-
static from<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(workspaceRoot: string, config: InitialUserConfig<TResolvedConfig["userConfig"]>): Promise<Context>;
|
|
21
|
+
static from<TResolvedConfig extends types_d_exports.ResolvedConfig = types_d_exports.ResolvedConfig>(workspaceRoot: string, config: types_d_exports.InitialUserConfig<TResolvedConfig["userConfig"]>): Promise<types_d_exports.Context>;
|
|
102
22
|
/**
|
|
103
23
|
* An object containing the dependencies that should be installed for the project
|
|
104
24
|
*/
|
|
@@ -110,7 +30,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
110
30
|
/**
|
|
111
31
|
* The persisted meta information about the current build
|
|
112
32
|
*/
|
|
113
|
-
persistedMeta: MetaInfo | undefined;
|
|
33
|
+
persistedMeta: types_d_exports.MetaInfo | undefined;
|
|
114
34
|
/**
|
|
115
35
|
* The path to the Powerlines package
|
|
116
36
|
*/
|
|
@@ -126,7 +46,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
126
46
|
/**
|
|
127
47
|
* The module resolver for the project
|
|
128
48
|
*/
|
|
129
|
-
resolver: Resolver;
|
|
49
|
+
resolver: types_d_exports.Resolver;
|
|
130
50
|
/**
|
|
131
51
|
* The resolved configuration options
|
|
132
52
|
*/
|
|
@@ -152,19 +72,19 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
152
72
|
/**
|
|
153
73
|
* The resolved entry type definitions for the project
|
|
154
74
|
*/
|
|
155
|
-
get entry(): ResolvedEntryTypeDefinition[];
|
|
75
|
+
get entry(): types_d_exports.ResolvedEntryTypeDefinition[];
|
|
156
76
|
/**
|
|
157
77
|
* The TypeScript configuration parsed from the tsconfig file
|
|
158
78
|
*/
|
|
159
|
-
get tsconfig(): ParsedTypeScriptConfig;
|
|
79
|
+
get tsconfig(): types_d_exports.ParsedTypeScriptConfig;
|
|
160
80
|
/**
|
|
161
81
|
* Sets the TypeScript configuration parsed from the tsconfig file
|
|
162
82
|
*/
|
|
163
|
-
set tsconfig(value: ParsedTypeScriptConfig);
|
|
83
|
+
set tsconfig(value: types_d_exports.ParsedTypeScriptConfig);
|
|
164
84
|
/**
|
|
165
85
|
* The virtual file system interface for the project
|
|
166
86
|
*/
|
|
167
|
-
get fs(): VirtualFileSystemInterface;
|
|
87
|
+
get fs(): types_d_exports.VirtualFileSystemInterface;
|
|
168
88
|
/**
|
|
169
89
|
* Get the checksum of the project's current state
|
|
170
90
|
*/
|
|
@@ -172,7 +92,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
172
92
|
/**
|
|
173
93
|
* The meta information about the current build
|
|
174
94
|
*/
|
|
175
|
-
get meta(): MetaInfo;
|
|
95
|
+
get meta(): types_d_exports.MetaInfo;
|
|
176
96
|
/**
|
|
177
97
|
* The resolved configuration options
|
|
178
98
|
*/
|
|
@@ -180,11 +100,11 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
180
100
|
/**
|
|
181
101
|
* The logger function
|
|
182
102
|
*/
|
|
183
|
-
get log(): LogFn;
|
|
103
|
+
get log(): types_d_exports.LogFn;
|
|
184
104
|
/**
|
|
185
105
|
* The workspace configuration
|
|
186
106
|
*/
|
|
187
|
-
get workspaceConfig(): WorkspaceConfig;
|
|
107
|
+
get workspaceConfig(): types_d_exports.WorkspaceConfig;
|
|
188
108
|
/**
|
|
189
109
|
* The environment paths for the project
|
|
190
110
|
*/
|
|
@@ -243,7 +163,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
243
163
|
/**
|
|
244
164
|
* The entry points that exist in the Powerlines virtual file system
|
|
245
165
|
*/
|
|
246
|
-
protected get resolvedEntry(): ResolvedEntryTypeDefinition[];
|
|
166
|
+
protected get resolvedEntry(): types_d_exports.ResolvedEntryTypeDefinition[];
|
|
247
167
|
/**
|
|
248
168
|
* A function to perform HTTP fetch requests
|
|
249
169
|
*
|
|
@@ -262,7 +182,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
262
182
|
* @param options - The fetch request options.
|
|
263
183
|
* @returns A promise that resolves to a response returned by the fetch.
|
|
264
184
|
*/
|
|
265
|
-
fetch(input: RequestInfo, options?: FetchOptions): Promise<Response>;
|
|
185
|
+
fetch(input: RequestInfo, options?: types_d_exports.FetchOptions): Promise<Response>;
|
|
266
186
|
/**
|
|
267
187
|
* Parse code using [Oxc-Parser](https://github.com/oxc/oxc) into an (ESTree-compatible)[https://github.com/estree/estree] AST object.
|
|
268
188
|
*
|
|
@@ -281,7 +201,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
281
201
|
* @param options - The options to pass to the parser.
|
|
282
202
|
* @returns An (ESTree-compatible)[https://github.com/estree/estree] AST object.
|
|
283
203
|
*/
|
|
284
|
-
parse(code: string, options?: ParseOptions): Promise<ParseResult>;
|
|
204
|
+
parse(code: string, options?: types_d_exports.ParseOptions): Promise<ParseResult>;
|
|
285
205
|
/**
|
|
286
206
|
* A helper function to resolve modules in the Virtual File System
|
|
287
207
|
*
|
|
@@ -298,7 +218,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
298
218
|
* @param options - Additional resolution options.
|
|
299
219
|
* @returns A promise that resolves to the resolved module path.
|
|
300
220
|
*/
|
|
301
|
-
resolve(id: string, importer?: string, options?: ResolveOptions): Promise<ResolveResult | undefined>;
|
|
221
|
+
resolve(id: string, importer?: string, options?: types_d_exports.ResolveOptions): Promise<types_d_exports.ResolveResult | undefined>;
|
|
302
222
|
/**
|
|
303
223
|
* A helper function to load modules from the Virtual File System
|
|
304
224
|
*
|
|
@@ -313,11 +233,11 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
313
233
|
* @param id - The module to load.
|
|
314
234
|
* @returns A promise that resolves to the loaded module.
|
|
315
235
|
*/
|
|
316
|
-
load(id: string): Promise<TransformResult
|
|
236
|
+
load(id: string): Promise<types_d_exports.TransformResult | undefined>;
|
|
317
237
|
/**
|
|
318
238
|
* Get the builtin virtual files that exist in the Powerlines virtual file system
|
|
319
239
|
*/
|
|
320
|
-
getBuiltins(): Promise<VirtualFile[]>;
|
|
240
|
+
getBuiltins(): Promise<types_d_exports.VirtualFile[]>;
|
|
321
241
|
/**
|
|
322
242
|
* Resolves a file and writes it to the VFS if it does not already exist
|
|
323
243
|
*
|
|
@@ -325,7 +245,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
325
245
|
* @param path - The path to write the file to
|
|
326
246
|
* @param options - Additional options for writing the file
|
|
327
247
|
*/
|
|
328
|
-
emit(code: string, path: string, options?: EmitOptions): Promise<void>;
|
|
248
|
+
emit(code: string, path: string, options?: types_d_exports.EmitOptions): Promise<void>;
|
|
329
249
|
/**
|
|
330
250
|
* Synchronously resolves a file and writes it to the VFS if it does not already exist
|
|
331
251
|
*
|
|
@@ -333,7 +253,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
333
253
|
* @param path - The path to write the file to
|
|
334
254
|
* @param options - Additional options for writing the file
|
|
335
255
|
*/
|
|
336
|
-
emitSync(code: string, path: string, options?: EmitOptions): void;
|
|
256
|
+
emitSync(code: string, path: string, options?: types_d_exports.EmitOptions): void;
|
|
337
257
|
/**
|
|
338
258
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
339
259
|
*
|
|
@@ -341,7 +261,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
341
261
|
* @param path - A path to write the entry file to
|
|
342
262
|
* @param options - Optional write file options
|
|
343
263
|
*/
|
|
344
|
-
emitEntry(code: string, path: string, options?: EmitEntryOptions): Promise<void>;
|
|
264
|
+
emitEntry(code: string, path: string, options?: types_d_exports.EmitEntryOptions): Promise<void>;
|
|
345
265
|
/**
|
|
346
266
|
* Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
347
267
|
*
|
|
@@ -349,7 +269,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
349
269
|
* @param path - A path to write the entry file to
|
|
350
270
|
* @param options - Optional write file options
|
|
351
271
|
*/
|
|
352
|
-
emitEntrySync(code: string, path: string, options?: EmitEntryOptions): void;
|
|
272
|
+
emitEntrySync(code: string, path: string, options?: types_d_exports.EmitEntryOptions): void;
|
|
353
273
|
/**
|
|
354
274
|
* Resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
355
275
|
*
|
|
@@ -357,7 +277,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
357
277
|
* @param id - The unique identifier of the builtin file
|
|
358
278
|
* @param options - Optional write file options
|
|
359
279
|
*/
|
|
360
|
-
emitBuiltin(code: string, id: string, options?: EmitOptions): Promise<void>;
|
|
280
|
+
emitBuiltin(code: string, id: string, options?: types_d_exports.EmitOptions): Promise<void>;
|
|
361
281
|
/**
|
|
362
282
|
* Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
363
283
|
*
|
|
@@ -365,7 +285,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
365
285
|
* @param id - The unique identifier of the builtin file
|
|
366
286
|
* @param options - Optional write file options
|
|
367
287
|
*/
|
|
368
|
-
emitBuiltinSync(code: string, id: string, options?: EmitOptions): void;
|
|
288
|
+
emitBuiltinSync(code: string, id: string, options?: types_d_exports.EmitOptions): void;
|
|
369
289
|
/**
|
|
370
290
|
* Resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
371
291
|
*
|
|
@@ -373,7 +293,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
373
293
|
* @param id - The unique identifier of the builtin file
|
|
374
294
|
* @param options - Optional write file options
|
|
375
295
|
*/
|
|
376
|
-
emitInfrastructure(code: string, id: string, options?: EmitOptions): Promise<void>;
|
|
296
|
+
emitInfrastructure(code: string, id: string, options?: types_d_exports.EmitOptions): Promise<void>;
|
|
377
297
|
/**
|
|
378
298
|
* Synchronously resolves an infrastructure virtual file and writes it to the VFS if it does not already exist
|
|
379
299
|
*
|
|
@@ -381,19 +301,19 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
381
301
|
* @param id - The unique identifier of the infrastructure file
|
|
382
302
|
* @param options - Optional write file options
|
|
383
303
|
*/
|
|
384
|
-
emitInfrastructureSync(code: string, id: string, options?: EmitOptions): void;
|
|
304
|
+
emitInfrastructureSync(code: string, id: string, options?: types_d_exports.EmitOptions): void;
|
|
385
305
|
/**
|
|
386
306
|
* Update the context using a new user configuration options
|
|
387
307
|
*
|
|
388
308
|
* @param userConfig - The new user configuration options.
|
|
389
309
|
*/
|
|
390
|
-
withUserConfig(userConfig: InitialUserConfig<TResolvedConfig["userConfig"]>, options?: InitContextOptions): Promise<void>;
|
|
310
|
+
withUserConfig(userConfig: types_d_exports.InitialUserConfig<TResolvedConfig["userConfig"]>, options?: types_d_exports.InitContextOptions): Promise<void>;
|
|
391
311
|
/**
|
|
392
312
|
* Update the context using a new inline configuration options
|
|
393
313
|
*
|
|
394
314
|
* @param inlineConfig - The new inline configuration options.
|
|
395
315
|
*/
|
|
396
|
-
withInlineConfig(inlineConfig: TResolvedConfig["inlineConfig"], options?: InitContextOptions): Promise<void>;
|
|
316
|
+
withInlineConfig(inlineConfig: TResolvedConfig["inlineConfig"], options?: types_d_exports.InitContextOptions): Promise<void>;
|
|
397
317
|
/**
|
|
398
318
|
* A logging function for fatal messages
|
|
399
319
|
*
|
|
@@ -436,14 +356,14 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
436
356
|
* @param name - The name to use for the logger instance
|
|
437
357
|
* @returns A logger function
|
|
438
358
|
*/
|
|
439
|
-
createLog(name?: string | null): LogFn;
|
|
359
|
+
createLog(name?: string | null): types_d_exports.LogFn;
|
|
440
360
|
/**
|
|
441
361
|
* Extend the current logger instance with a new name
|
|
442
362
|
*
|
|
443
363
|
* @param name - The name to use for the extended logger instance
|
|
444
364
|
* @returns A logger function
|
|
445
365
|
*/
|
|
446
|
-
extendLog(name: string): LogFn;
|
|
366
|
+
extendLog(name: string): types_d_exports.LogFn;
|
|
447
367
|
/**
|
|
448
368
|
* Generates a checksum representing the current context state
|
|
449
369
|
*
|
|
@@ -456,7 +376,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
456
376
|
*
|
|
457
377
|
* @param workspaceConfig - The workspace configuration.
|
|
458
378
|
*/
|
|
459
|
-
protected constructor(workspaceConfig: WorkspaceConfig);
|
|
379
|
+
protected constructor(workspaceConfig: types_d_exports.WorkspaceConfig);
|
|
460
380
|
/**
|
|
461
381
|
* The resolved configuration for this context
|
|
462
382
|
*/
|
|
@@ -464,18 +384,18 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
464
384
|
/**
|
|
465
385
|
* A logger function specific to this context
|
|
466
386
|
*/
|
|
467
|
-
protected logFn: LogFn;
|
|
387
|
+
protected logFn: types_d_exports.LogFn;
|
|
468
388
|
/**
|
|
469
389
|
* Initialize the context with the provided configuration options
|
|
470
390
|
*
|
|
471
391
|
* @param config - The partial user configuration to use for initialization.
|
|
472
392
|
*/
|
|
473
|
-
protected init(config?: Partial<TResolvedConfig["userConfig"]>, options?: InitContextOptions): Promise<void>;
|
|
393
|
+
protected init(config?: Partial<TResolvedConfig["userConfig"]>, options?: types_d_exports.InitContextOptions): Promise<void>;
|
|
474
394
|
protected mergeUserConfig(from?: Partial<TResolvedConfig["userConfig"]>, into?: Partial<TResolvedConfig["userConfig"]>): void;
|
|
475
395
|
}
|
|
476
396
|
//#endregion
|
|
477
397
|
//#region src/context/api-context.d.ts
|
|
478
|
-
declare class PowerlinesAPIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends PowerlinesContext<TResolvedConfig> implements APIContext<TResolvedConfig> {
|
|
398
|
+
declare class PowerlinesAPIContext<TResolvedConfig extends types_d_exports.ResolvedConfig = types_d_exports.ResolvedConfig> extends PowerlinesContext<TResolvedConfig> implements types_d_exports.APIContext<TResolvedConfig> {
|
|
479
399
|
#private;
|
|
480
400
|
/**
|
|
481
401
|
* Create a new Storm context from the workspace root and user config.
|
|
@@ -484,7 +404,7 @@ declare class PowerlinesAPIContext<TResolvedConfig extends ResolvedConfig = Reso
|
|
|
484
404
|
* @param config - The user configuration options.
|
|
485
405
|
* @returns A promise that resolves to the new context.
|
|
486
406
|
*/
|
|
487
|
-
static from<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(workspaceRoot: string, config: InitialUserConfig<TResolvedConfig["userConfig"]>): Promise<APIContext<TResolvedConfig>>;
|
|
407
|
+
static from<TResolvedConfig extends types_d_exports.ResolvedConfig = types_d_exports.ResolvedConfig>(workspaceRoot: string, config: types_d_exports.InitialUserConfig<TResolvedConfig["userConfig"]>): Promise<types_d_exports.APIContext<TResolvedConfig>>;
|
|
488
408
|
/**
|
|
489
409
|
* Internal context fields and methods
|
|
490
410
|
*
|
|
@@ -507,9 +427,9 @@ declare class PowerlinesAPIContext<TResolvedConfig extends ResolvedConfig = Reso
|
|
|
507
427
|
* A record of all environments by name
|
|
508
428
|
*/
|
|
509
429
|
get environments(): Record<string, UNSAFE_EnvironmentContext<TResolvedConfig>>;
|
|
510
|
-
get log(): LogFn;
|
|
511
|
-
get plugins(): Array<Plugin<PluginContext<TResolvedConfig>>>;
|
|
512
|
-
protected constructor(workspaceConfig: WorkspaceConfig);
|
|
430
|
+
get log(): types_d_exports.LogFn;
|
|
431
|
+
get plugins(): Array<types_d_exports.Plugin<types_d_exports.PluginContext<TResolvedConfig>>>;
|
|
432
|
+
protected constructor(workspaceConfig: types_d_exports.WorkspaceConfig);
|
|
513
433
|
/**
|
|
514
434
|
* Initialize the context with the provided configuration options
|
|
515
435
|
*
|
|
@@ -522,39 +442,39 @@ declare class PowerlinesAPIContext<TResolvedConfig extends ResolvedConfig = Reso
|
|
|
522
442
|
* @param environment - The environment configuration to use.
|
|
523
443
|
* @returns A new context instance with the updated environment.
|
|
524
444
|
*/
|
|
525
|
-
in(environment: EnvironmentResolvedConfig): Promise<UNSAFE_EnvironmentContext<TResolvedConfig>>;
|
|
445
|
+
in(environment: types_d_exports.EnvironmentResolvedConfig): Promise<UNSAFE_EnvironmentContext<TResolvedConfig>>;
|
|
526
446
|
/**
|
|
527
447
|
* Update the context using a new user configuration options
|
|
528
448
|
*
|
|
529
449
|
* @param userConfig - The new user configuration options.
|
|
530
450
|
*/
|
|
531
|
-
withUserConfig(userConfig: InitialUserConfig<TResolvedConfig["userConfig"]>, options?: InitContextOptions): Promise<void>;
|
|
451
|
+
withUserConfig(userConfig: types_d_exports.InitialUserConfig<TResolvedConfig["userConfig"]>, options?: types_d_exports.InitContextOptions): Promise<void>;
|
|
532
452
|
/**
|
|
533
453
|
* Update the context using a new inline configuration options
|
|
534
454
|
*
|
|
535
455
|
* @param inlineConfig - The new inline configuration options.
|
|
536
456
|
*/
|
|
537
|
-
withInlineConfig(inlineConfig: TResolvedConfig["inlineConfig"], options?: InitContextOptions): Promise<void>;
|
|
457
|
+
withInlineConfig(inlineConfig: TResolvedConfig["inlineConfig"], options?: types_d_exports.InitContextOptions): Promise<void>;
|
|
538
458
|
/**
|
|
539
459
|
* Add a plugin to the API context and all environments
|
|
540
460
|
*
|
|
541
461
|
* @param plugin - The plugin to add.
|
|
542
462
|
*/
|
|
543
|
-
addPlugin(plugin: Plugin<PluginContext<TResolvedConfig>>): Promise<void>;
|
|
463
|
+
addPlugin(plugin: types_d_exports.Plugin<types_d_exports.PluginContext<TResolvedConfig>>): Promise<void>;
|
|
544
464
|
/**
|
|
545
465
|
* Get an environment by name, or the default environment if no name is provided
|
|
546
466
|
*
|
|
547
467
|
* @param name - The name of the environment to retrieve.
|
|
548
468
|
* @returns The requested environment context.
|
|
549
469
|
*/
|
|
550
|
-
getEnvironment(name?: string): Promise<EnvironmentContext<TResolvedConfig>>;
|
|
470
|
+
getEnvironment(name?: string): Promise<types_d_exports.EnvironmentContext<TResolvedConfig>>;
|
|
551
471
|
/**
|
|
552
472
|
* A safe version of `getEnvironment` that returns `undefined` if the environment is not found
|
|
553
473
|
*
|
|
554
474
|
* @param name - The name of the environment to retrieve.
|
|
555
475
|
* @returns The requested environment context or `undefined` if not found.
|
|
556
476
|
*/
|
|
557
|
-
getEnvironmentSafe(name?: string): Promise<EnvironmentContext<TResolvedConfig> | undefined>;
|
|
477
|
+
getEnvironmentSafe(name?: string): Promise<types_d_exports.EnvironmentContext<TResolvedConfig> | undefined>;
|
|
558
478
|
/**
|
|
559
479
|
* A function to merge all configured environments into a single context.
|
|
560
480
|
*
|
|
@@ -563,11 +483,11 @@ declare class PowerlinesAPIContext<TResolvedConfig extends ResolvedConfig = Reso
|
|
|
563
483
|
*
|
|
564
484
|
* @returns A promise that resolves to a merged/global environment context.
|
|
565
485
|
*/
|
|
566
|
-
toEnvironment(): Promise<EnvironmentContext<TResolvedConfig>>;
|
|
486
|
+
toEnvironment(): Promise<types_d_exports.EnvironmentContext<TResolvedConfig>>;
|
|
567
487
|
}
|
|
568
488
|
//#endregion
|
|
569
489
|
//#region src/context/environment-context.d.ts
|
|
570
|
-
declare class PowerlinesEnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends PowerlinesContext<TResolvedConfig> implements EnvironmentContext<TResolvedConfig> {
|
|
490
|
+
declare class PowerlinesEnvironmentContext<TResolvedConfig extends types_d_exports.ResolvedConfig = types_d_exports.ResolvedConfig> extends PowerlinesContext<TResolvedConfig> implements types_d_exports.EnvironmentContext<TResolvedConfig> {
|
|
571
491
|
#private;
|
|
572
492
|
/**
|
|
573
493
|
* Create a new Storm context from the workspace root and user config.
|
|
@@ -576,26 +496,26 @@ declare class PowerlinesEnvironmentContext<TResolvedConfig extends ResolvedConfi
|
|
|
576
496
|
* @param config - The user configuration options.
|
|
577
497
|
* @returns A promise that resolves to the new context.
|
|
578
498
|
*/
|
|
579
|
-
static fromConfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(workspaceConfig: WorkspaceConfig, config: TResolvedConfig): Promise<PowerlinesEnvironmentContext<TResolvedConfig>>;
|
|
499
|
+
static fromConfig<TResolvedConfig extends types_d_exports.ResolvedConfig = types_d_exports.ResolvedConfig>(workspaceConfig: types_d_exports.WorkspaceConfig, config: TResolvedConfig): Promise<PowerlinesEnvironmentContext<TResolvedConfig>>;
|
|
580
500
|
/**
|
|
581
501
|
* The resolved environment configuration
|
|
582
502
|
*/
|
|
583
|
-
environment: EnvironmentResolvedConfig;
|
|
503
|
+
environment: types_d_exports.EnvironmentResolvedConfig;
|
|
584
504
|
/**
|
|
585
505
|
* The list of plugins applied to this environment
|
|
586
506
|
*/
|
|
587
|
-
plugins: EnvironmentContextPlugin<TResolvedConfig>[];
|
|
507
|
+
plugins: types_d_exports.EnvironmentContextPlugin<TResolvedConfig>[];
|
|
588
508
|
/**
|
|
589
509
|
* The resolved configuration options
|
|
590
510
|
*/
|
|
591
511
|
get config(): TResolvedConfig;
|
|
592
|
-
get hooks(): HooksList<PluginContext<TResolvedConfig>>;
|
|
593
|
-
addPlugin(plugin: Plugin<PluginContext<TResolvedConfig>>): Promise<void>;
|
|
512
|
+
get hooks(): types_d_exports.HooksList<types_d_exports.PluginContext<TResolvedConfig>>;
|
|
513
|
+
addPlugin(plugin: types_d_exports.Plugin<types_d_exports.PluginContext<TResolvedConfig>>): Promise<void>;
|
|
594
514
|
/**
|
|
595
515
|
* Retrieves the hook handlers for a specific hook name
|
|
596
516
|
*/
|
|
597
|
-
selectHooks<TKey extends string>(key: TKey, options?: SelectHooksOptions): SelectHookResult<PluginContext<TResolvedConfig>, TKey>;
|
|
598
|
-
protected constructor(config: TResolvedConfig, workspaceConfig: WorkspaceConfig);
|
|
517
|
+
selectHooks<TKey extends string>(key: TKey, options?: types_d_exports.SelectHooksOptions): types_d_exports.SelectHookResult<types_d_exports.PluginContext<TResolvedConfig>, TKey>;
|
|
518
|
+
protected constructor(config: TResolvedConfig, workspaceConfig: types_d_exports.WorkspaceConfig);
|
|
599
519
|
}
|
|
600
520
|
//#endregion
|
|
601
521
|
//#region src/context/plugin-context.d.ts
|
|
@@ -606,7 +526,7 @@ declare class PowerlinesEnvironmentContext<TResolvedConfig extends ResolvedConfi
|
|
|
606
526
|
* @param environment - The environment context
|
|
607
527
|
* @returns The proxied plugin context
|
|
608
528
|
*/
|
|
609
|
-
declare function createPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(plugin: Plugin<PluginContext<TResolvedConfig>>, environment: UNSAFE_EnvironmentContext<TResolvedConfig>): UNSAFE_PluginContext<TResolvedConfig>;
|
|
529
|
+
declare function createPluginContext<TResolvedConfig extends types_d_exports.ResolvedConfig = types_d_exports.ResolvedConfig>(plugin: types_d_exports.Plugin<types_d_exports.PluginContext<TResolvedConfig>>, environment: UNSAFE_EnvironmentContext<TResolvedConfig>): UNSAFE_PluginContext<TResolvedConfig>;
|
|
610
530
|
//#endregion
|
|
611
531
|
export { PowerlinesAPIContext, PowerlinesContext, PowerlinesEnvironmentContext, createPluginContext };
|
|
612
532
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/context/context.ts","../../src/context/api-context.ts","../../src/context/environment-context.ts","../../src/context/plugin-context.ts"],"mappings":";;;;;;;;;;;cA0Ja,iBAAA,yBACa,eAAA,CAAA,cAAA,GAAiB,eAAA,CAAA,cAAA,aAC9B,eAAA,CAAA,OAAA,CAAQ,eAAA;EAAA;EAFR;;;;;;;EAAA,OAgF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A,GAAU,eAAA;EAAA,IAInB,KAAA,CAAA,GAAS,eAAA,CAAA,SAAA,CAAU,eAAA,CAAA,aAAA,CAAc,eAAA;EAI/B,SAAA,CAAU,MAAA,EAAQ,eAAA,CAAA,MAAA,CAAO,eAAA,CAAA,aAAA,CAAc,eAAA,KAAiB,OAAA;EF2I7C;;;EE6BjB,WAAA,qBAAA,CACL,GAAA,EAAK,IAAA,EACL,OAAA,GAAU,eAAA,CAAA,kBAAA,GACT,eAAA,CAAA,gBAAA,CAAiB,eAAA,CAAA,aAAA,CAAc,eAAA,GAAkB,IAAA;EAAA,UAoH3C,WAAA,CACP,MAAA,EAAQ,eAAA,EACR,eAAA,EAAiB,eAAA,CAAA,eAAA;AAAA;;;;;;;;;;iBClXL,mBAAA,yBACU,eAAA,CAAA,cAAA,GAAiB,eAAA,CAAA,cAAA,CAAA,CAEzC,MAAA,EAAQ,eAAA,CAAA,MAAA,CAAO,eAAA,CAAA,aAAA,CAAc,eAAA,IAC7B,WAAA,EAAa,yBAAA,CAA0B,eAAA,IACtC,oBAAA,CAAqB,eAAA"}
|
package/dist/context/index.mjs
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../tsconfig-
|
|
3
|
-
import "../
|
|
4
|
-
import "../plugin-E5foRD0k.mjs";
|
|
5
|
-
import "../paths-CS8ecCnW.mjs";
|
|
6
|
-
import "../constants-cXxSHhNp.mjs";
|
|
7
|
-
import "../config-D4Fh2gQL.mjs";
|
|
8
|
-
import "../utils-DoQcX7Sk.mjs";
|
|
9
|
-
import "../virtual-B9imjOqe.mjs";
|
|
1
|
+
import { i as createPluginContext, n as PowerlinesAPIContext, o as PowerlinesContext, r as PowerlinesEnvironmentContext } from "../api-BYLuEyjx.mjs";
|
|
2
|
+
import "../tsconfig-D9GCB2I9.mjs";
|
|
3
|
+
import "../virtual-DvkJm7gK.mjs";
|
|
10
4
|
|
|
11
5
|
export { PowerlinesAPIContext, PowerlinesContext, PowerlinesEnvironmentContext, createPluginContext };
|
package/dist/esbuild.cjs
CHANGED
|
@@ -1,18 +1,61 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
require('./
|
|
3
|
-
require('./
|
|
4
|
-
require('./
|
|
5
|
-
require('./
|
|
6
|
-
require(
|
|
7
|
-
require(
|
|
8
|
-
require(
|
|
9
|
-
require(
|
|
10
|
-
|
|
11
|
-
require('./resolve-options-BQnTgg3V.cjs');
|
|
12
|
-
const require_esbuild = require('./esbuild-B3NuCco0.cjs');
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_chunk = require('./chunk-AIJqnxB6.cjs');
|
|
3
|
+
const require_api = require('./api-Zx_hzL3g.cjs');
|
|
4
|
+
require('./tsconfig-BJrUrPC_.cjs');
|
|
5
|
+
require('./virtual-Cbvj12lU.cjs');
|
|
6
|
+
let unplugin = require("unplugin");
|
|
7
|
+
let _powerlines_plugin_esbuild_helpers_resolve_options = require("@powerlines/plugin-esbuild/helpers/resolve-options");
|
|
8
|
+
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
9
|
+
let _powerlines_plugin_esbuild = require("@powerlines/plugin-esbuild");
|
|
10
|
+
_powerlines_plugin_esbuild = require_chunk.__toESM(_powerlines_plugin_esbuild);
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
//#region src/esbuild.ts
|
|
13
|
+
/**
|
|
14
|
+
* An ESBuild plugin that will invoke the Powerlines API hooks during the build process.
|
|
15
|
+
*
|
|
16
|
+
* @see https://esbuild.github.io/plugins/
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```js
|
|
20
|
+
* // esbuild.config.js
|
|
21
|
+
* import powerlines from "powerlines/esbuild";
|
|
22
|
+
*
|
|
23
|
+
* export default {
|
|
24
|
+
* plugins: [powerlines({ name: "example-app", ... })],
|
|
25
|
+
* };
|
|
26
|
+
*
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
const unplugin$1 = (0, unplugin.createEsbuildPlugin)(require_api.createUnpluginFactory("esbuild", (api, plugin) => {
|
|
30
|
+
return {
|
|
31
|
+
...plugin,
|
|
32
|
+
esbuild: {
|
|
33
|
+
config: (options) => {
|
|
34
|
+
options ??= {};
|
|
35
|
+
const result = (0, _powerlines_plugin_esbuild_helpers_resolve_options.resolveOptions)(api.context);
|
|
36
|
+
for (const key in result) if ((0, _stryke_type_checks_is_undefined.isUndefined)(options[key]) && !(0, _stryke_type_checks_is_undefined.isUndefined)(result[key])) options[key] = result[key];
|
|
37
|
+
},
|
|
38
|
+
setup: async (build) => {
|
|
39
|
+
const environment = await api.context.getEnvironment();
|
|
40
|
+
return api.callHook("esbuild:setup", { environment }, build);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}));
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
exports.default = unplugin$1;
|
|
48
|
+
exports["module.exports"] = unplugin$1;
|
|
49
|
+
exports.unplugin = unplugin$1;
|
|
50
|
+
Object.defineProperty(exports, 'esbuild', {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function () {
|
|
53
|
+
return _powerlines_plugin_esbuild.default;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, 'plugin', {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () {
|
|
59
|
+
return _powerlines_plugin_esbuild.default;
|
|
60
|
+
}
|
|
61
|
+
});
|