@powerlines/plugin-openapi 0.2.237 → 0.2.239

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 (33) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.cts +2 -1
  3. package/dist/index.d.mts +1 -1
  4. package/dist/index.mjs +1 -1
  5. package/dist/types/plugin.d.cts +3 -3
  6. package/dist/types/plugin.d.mts +3 -3
  7. package/package.json +59 -12
  8. package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
  9. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -47
  10. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -36
  11. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -35
  12. package/dist/powerlines/src/types/api.d.cts +0 -104
  13. package/dist/powerlines/src/types/api.d.mts +0 -104
  14. package/dist/powerlines/src/types/build.d.cts +0 -185
  15. package/dist/powerlines/src/types/build.d.mts +0 -185
  16. package/dist/powerlines/src/types/commands.d.cts +0 -8
  17. package/dist/powerlines/src/types/commands.d.mts +0 -8
  18. package/dist/powerlines/src/types/config.d.cts +0 -424
  19. package/dist/powerlines/src/types/config.d.mts +0 -424
  20. package/dist/powerlines/src/types/context.d.cts +0 -514
  21. package/dist/powerlines/src/types/context.d.mts +0 -514
  22. package/dist/powerlines/src/types/fs.d.cts +0 -486
  23. package/dist/powerlines/src/types/fs.d.mts +0 -486
  24. package/dist/powerlines/src/types/hooks.d.cts +0 -32
  25. package/dist/powerlines/src/types/hooks.d.mts +0 -32
  26. package/dist/powerlines/src/types/plugin.d.cts +0 -205
  27. package/dist/powerlines/src/types/plugin.d.mts +0 -205
  28. package/dist/powerlines/src/types/resolved.d.cts +0 -93
  29. package/dist/powerlines/src/types/resolved.d.mts +0 -93
  30. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  31. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  32. package/dist/powerlines/src/types/unplugin.d.cts +0 -22
  33. package/dist/powerlines/src/types/unplugin.d.mts +0 -22
@@ -1,424 +0,0 @@
1
- import { BuildConfig, BuildResolvedConfig, ESBuildBuildConfig, ESBuildResolvedBuildConfig, FarmBuildConfig, FarmResolvedBuildConfig, RolldownBuildConfig, RolldownResolvedBuildConfig, RollupBuildConfig, RollupResolvedBuildConfig, RspackBuildConfig, RspackResolvedBuildConfig, TsdownBuildConfig, TsdownResolvedBuildConfig, TsupBuildConfig, TsupResolvedBuildConfig, UnbuildBuildConfig, UnbuildResolvedBuildConfig, ViteBuildConfig, ViteResolvedBuildConfig, WebpackBuildConfig, WebpackResolvedBuildConfig } from "./build.cjs";
2
- import { StoragePort, StoragePreset } from "./fs.cjs";
3
- import { TSConfig } from "./tsconfig.cjs";
4
- import { PluginContext } from "./context.cjs";
5
- import { Plugin } from "./plugin.cjs";
6
- import { MaybePromise } from "@stryke/types/base";
7
- import { PreviewOptions } from "vite";
8
- import { Format } from "@storm-software/build-tools/types";
9
- import { LogLevelLabel } from "@storm-software/config-tools/types";
10
- import { StormWorkspaceConfig } from "@storm-software/config/types";
11
- import { TypeDefinitionParameter } from "@stryke/types/configuration";
12
- import { AssetGlob } from "@stryke/types/file";
13
- import { DateString } from "compatx";
14
-
15
- //#region ../powerlines/src/types/config.d.ts
16
-
17
- type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
18
- type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
19
- /**
20
- * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
21
- */
22
- type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
23
- type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext> | Plugin<TContext>[]>;
24
- /**
25
- * A configuration tuple for a Powerlines plugin.
26
- */
27
- type PluginConfigTuple<TContext extends PluginContext = PluginContext, TOptions = any> = [string | PluginFactory<TContext, TOptions>, TOptions] | [Plugin<TContext>];
28
- /**
29
- * A configuration object for a Powerlines plugin.
30
- */
31
- type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions = any> = {
32
- plugin: string | PluginFactory<TContext, TOptions>;
33
- options: TOptions;
34
- } | {
35
- plugin: Plugin<TContext>;
36
- options?: never;
37
- };
38
- /**
39
- * A configuration tuple for a Powerlines plugin.
40
- */
41
- type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | PluginConfigTuple<TContext> | PluginConfigObject<TContext> | Promise<PluginConfig<TContext>> | PluginConfig<TContext>[];
42
- type ProjectType = "application" | "library";
43
- interface DeployConfig {
44
- /**
45
- * The deployment variant being used by the Powerlines engine.
46
- *
47
- * @example
48
- * ```ts
49
- * export default defineConfig({
50
- * deploy: {
51
- * variant: "cloudflare"
52
- * }
53
- * });
54
- *
55
- * ```
56
- */
57
- variant?: string;
58
- }
59
- interface OutputConfig {
60
- /**
61
- * The path to output the final compiled files to
62
- *
63
- * @remarks
64
- * If a value is not provided, Powerlines will attempt to:
65
- * 1. Use the `outDir` value in the `tsconfig.json` file.
66
- * 2. Use the `dist` directory in the project root directory.
67
- *
68
- * @defaultValue "dist/\{projectRoot\}"
69
- */
70
- outputPath?: string;
71
- /**
72
- * The output directory path for the project build.
73
- *
74
- * @remarks
75
- * This path is used to determine where the built files will be placed after the build process completes. This will be used in scenarios where the monorepo uses TSConfig paths to link packages together.
76
- *
77
- * @defaultValue "\{projectRoot\}/dist"
78
- */
79
- buildPath?: string;
80
- /**
81
- * The folder where the generated runtime artifacts will be located
82
- *
83
- * @remarks
84
- * This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
85
- *
86
- * @defaultValue "\{projectRoot\}/.powerlines"
87
- */
88
- artifactsPath?: string;
89
- /**
90
- * The path of the generated runtime declaration file relative to the workspace root.
91
- *
92
- * @defaultValue "\{projectRoot\}/powerlines.d.ts"
93
- */
94
- dts?: string | false;
95
- /**
96
- * The module format of the output files
97
- *
98
- * @remarks
99
- * This option can be a single format or an array of formats. If an array is provided, multiple builds will be generated for each format.
100
- *
101
- * @defaultValue "esm"
102
- */
103
- format?: Format | Format[];
104
- /**
105
- * A list of assets to copy to the output directory
106
- *
107
- * @remarks
108
- * The assets can be specified as a string (path to the asset) or as an object with a `glob` property (to match multiple files). The paths are relative to the project root directory.
109
- */
110
- assets?: Array<string | AssetGlob>;
111
- /**
112
- * A string preset or a custom {@link StoragePort} to provide fine-grained control over generated/output file storage.
113
- *
114
- * @remarks
115
- * If a string preset is provided, it must be one of the following values:
116
- * - `"virtual"`: Uses the local file system for storage.
117
- * - `"fs"`: Uses an in-memory virtual file system for storage.
118
- *
119
- * If a custom {@link StoragePort} is provided, it will be used for all file storage operations during the build process.
120
- *
121
- * @defaultValue "virtual"
122
- */
123
- storage?: StoragePort | StoragePreset;
124
- }
125
- interface BaseConfig {
126
- /**
127
- * The entry point(s) for the application
128
- */
129
- entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
130
- /**
131
- * Configuration for the output of the build process
132
- */
133
- output?: OutputConfig;
134
- /**
135
- * Configuration for cleaning the build artifacts
136
- *
137
- * @remarks
138
- * If set to `false`, the cleaning process will be disabled.
139
- */
140
- clean?: Record<string, any> | false;
141
- /**
142
- * Configuration for linting the source code
143
- *
144
- * @remarks
145
- * If set to `false`, linting will be disabled.
146
- */
147
- lint?: Record<string, any> | false;
148
- /**
149
- * Configuration for testing the source code
150
- *
151
- * @remarks
152
- * If set to `false`, testing will be disabled.
153
- */
154
- test?: Record<string, any> | false;
155
- /**
156
- * Configuration for the transformation of the source code
157
- */
158
- transform?: Record<string, any>;
159
- /**
160
- * Configuration provided to build processes
161
- *
162
- * @remarks
163
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
164
- */
165
- build?: BuildConfig;
166
- /**
167
- * Configuration for documentation generation
168
- *
169
- * @remarks
170
- * This configuration will be used by the documentation generation plugins during the `docs` command.
171
- */
172
- docs?: Record<string, any>;
173
- /**
174
- * Configuration for deploying the source code
175
- *
176
- * @remarks
177
- * If set to `false`, the deployment will be disabled.
178
- */
179
- deploy?: DeployConfig | false;
180
- /**
181
- * The path to the tsconfig file to be used by the compiler
182
- *
183
- * @remarks
184
- * If a value is not provided, the plugin will attempt to find the `tsconfig.json` file in the project root directory. The parsed tsconfig compiler options will be merged with the {@link Options.tsconfigRaw} value (if provided).
185
- *
186
- * @defaultValue "\{projectRoot\}/tsconfig.json"
187
- */
188
- tsconfig?: string;
189
- /**
190
- * The raw {@link TSConfig} object to be used by the compiler. This object will be merged with the `tsconfig.json` file.
191
- *
192
- * @see https://www.typescriptlang.org/tsconfig
193
- *
194
- * @remarks
195
- * If populated, this option takes higher priority than `tsconfig`
196
- */
197
- tsconfigRaw?: TSConfig;
198
- }
199
- interface EnvironmentConfig extends BaseConfig {
200
- /**
201
- * Configuration options for the preview server
202
- */
203
- preview?: PreviewOptions;
204
- /**
205
- * A flag indicating whether the build is for a Server-Side Rendering environment.
206
- */
207
- ssr?: boolean;
208
- /**
209
- * Define if this environment is used for Server-Side Rendering
210
- *
211
- * @defaultValue "server" (if it isn't the client environment)
212
- */
213
- consumer?: "client" | "server";
214
- }
215
- interface CommonUserConfig extends BaseConfig {
216
- /**
217
- * The name of the project
218
- */
219
- name?: string;
220
- /**
221
- * The project display title
222
- *
223
- * @remarks
224
- * This option is used in documentation generation and other places where a human-readable title is needed.
225
- */
226
- title?: string;
227
- /**
228
- * A description of the project
229
- *
230
- * @remarks
231
- * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
232
- */
233
- description?: string;
234
- /**
235
- * The organization or author of the project
236
- *
237
- * @remarks
238
- * If this option is not provided, the build process will try to use the \`author\` value from the \`package.json\` file. If the \`author\` value cannot be determined, the {@link name | name configuration} will be used.
239
- */
240
- organization?: string;
241
- /**
242
- * The date to use for compatibility checks
243
- *
244
- * @remarks
245
- * This date can be used by plugins and build processes to determine compatibility with certain features or APIs. It is recommended to set this date to the date when the project was last known to be compatible with the desired features or APIs.
246
- *
247
- * @see https://developers.cloudflare.com/pages/platform/compatibility-dates/
248
- * @see https://docs.netlify.com/configure-builds/get-started/#set-a-compatibility-date
249
- * @see https://github.com/unjs/compatx
250
- */
251
- compatibilityDate?: DateString;
252
- /**
253
- * The log level to use for the Powerlines processes.
254
- *
255
- * @defaultValue "info"
256
- */
257
- logLevel?: LogLevel | null;
258
- /**
259
- * A custom logger function to use for logging messages
260
- */
261
- customLogger?: LogFn;
262
- /**
263
- * Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
264
- *
265
- * @defaultValue "production"
266
- */
267
- mode?: "development" | "test" | "production";
268
- /**
269
- * The type of project being built
270
- *
271
- * @defaultValue "application"
272
- */
273
- type?: ProjectType;
274
- /**
275
- * The root directory of the project
276
- */
277
- root: string;
278
- /**
279
- * The root directory of the project's source code
280
- *
281
- * @defaultValue "\{root\}/src"
282
- */
283
- sourceRoot?: string;
284
- /**
285
- * A path to a custom configuration file to be used instead of the default `storm.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
286
- *
287
- * @remarks
288
- * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
289
- */
290
- configFile?: string;
291
- /**
292
- * Should the Powerlines processes automatically install missing package dependencies?
293
- *
294
- * @remarks
295
- * When set to `true`, Powerlines will attempt to install any missing dependencies using the package manager detected in the project (e.g., npm, yarn, pnpm). This can be useful for ensuring that all required packages are available during the build and preparation phases.
296
- *
297
- * @defaultValue false
298
- */
299
- autoInstall?: boolean;
300
- /**
301
- * Should the compiler processes skip any improvements that make use of cache?
302
- *
303
- * @defaultValue false
304
- */
305
- skipCache?: boolean;
306
- /**
307
- * A list of resolvable paths to plugins used during the build process
308
- */
309
- plugins?: PluginConfig<any>[];
310
- /**
311
- * Environment-specific configurations
312
- */
313
- environments?: Record<string, EnvironmentConfig>;
314
- /**
315
- * Should a single `build` process be ran for each environment?
316
- *
317
- * @remarks
318
- * This option determines how environments are managed during the `build` process. The available options are:
319
- *
320
- * - `false`: A separate build is ran for each environment.
321
- * - `true`: A single build is ran for all environments.
322
- *
323
- * @defaultValue false
324
- */
325
- singleBuild?: boolean;
326
- /**
327
- * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
328
- *
329
- * @remarks
330
- * If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
331
- *
332
- * @defaultValue "powerlines"
333
- */
334
- framework?: string;
335
- }
336
- interface UserConfig$1<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> extends Omit<CommonUserConfig, "build"> {
337
- /**
338
- * Configuration provided to build processes
339
- *
340
- * @remarks
341
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
342
- */
343
- build: Omit<TBuildConfig, "override"> & {
344
- /**
345
- * The build variant being used by the Powerlines engine.
346
- */
347
- variant?: TBuildVariant;
348
- /**
349
- * An optional set of override options to apply to the selected build variant.
350
- *
351
- * @remarks
352
- * This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
353
- */
354
- override?: Partial<TBuildResolvedConfig>;
355
- };
356
- }
357
- type WebpackUserConfig = UserConfig$1<WebpackBuildConfig, WebpackResolvedBuildConfig, "webpack">;
358
- type RspackUserConfig = UserConfig$1<RspackBuildConfig, RspackResolvedBuildConfig, "rspack">;
359
- type RollupUserConfig = UserConfig$1<RollupBuildConfig, RollupResolvedBuildConfig, "rollup">;
360
- type RolldownUserConfig = UserConfig$1<RolldownBuildConfig, RolldownResolvedBuildConfig, "rolldown">;
361
- type ViteUserConfig = UserConfig$1<ViteBuildConfig, ViteResolvedBuildConfig, "vite">;
362
- type ESBuildUserConfig = UserConfig$1<ESBuildBuildConfig, ESBuildResolvedBuildConfig, "esbuild">;
363
- type UnbuildUserConfig = UserConfig$1<UnbuildBuildConfig, UnbuildResolvedBuildConfig, "unbuild">;
364
- type TsupUserConfig = UserConfig$1<TsupBuildConfig, TsupResolvedBuildConfig, "tsup">;
365
- type TsdownUserConfig = UserConfig$1<TsdownBuildConfig, TsdownResolvedBuildConfig, "tsdown">;
366
- type FarmUserConfig = UserConfig$1<FarmBuildConfig, FarmResolvedBuildConfig, "farm">;
367
- type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
368
- /**
369
- * The configuration provided while executing Powerlines commands.
370
- */
371
- type InlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Partial<TUserConfig> & {
372
- /**
373
- * A string identifier for the Powerlines command being executed
374
- */
375
- command: PowerlinesCommand;
376
- };
377
- type NewInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & Required<Pick<InlineConfig<TUserConfig>, "root">> & {
378
- /**
379
- * A string identifier for the Powerlines command being executed
380
- */
381
- command: "new";
382
- /**
383
- * The package name (from the \`package.json\`) for the project that will be used in the \`new\` command to create a new project based on this configuration
384
- */
385
- packageName?: string;
386
- };
387
- type CleanInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
388
- /**
389
- * A string identifier for the Powerlines command being executed
390
- */
391
- command: "clean";
392
- };
393
- type PrepareInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
394
- /**
395
- * A string identifier for the Powerlines command being executed
396
- */
397
- command: "prepare";
398
- };
399
- type BuildInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
400
- /**
401
- * A string identifier for the Powerlines command being executed
402
- */
403
- command: "build";
404
- };
405
- type LintInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
406
- /**
407
- * A string identifier for the Powerlines command being executed
408
- */
409
- command: "lint";
410
- };
411
- type DocsInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
412
- /**
413
- * A string identifier for the Powerlines command being executed
414
- */
415
- command: "docs";
416
- };
417
- type DeployInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
418
- /**
419
- * A string identifier for the Powerlines command being executed
420
- */
421
- command: "deploy";
422
- };
423
- //#endregion
424
- export { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, LogLevel, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };