@powerlines/plugin-content-collections 0.1.121 → 0.1.123

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 (66) hide show
  1. package/dist/create-emitter-Bk1iruR0.d.cts +29 -0
  2. package/dist/create-emitter-Ccqc-tkP.d.mts +29 -0
  3. package/dist/create-emitter-CdX9SXDY.mjs +32 -0
  4. package/dist/create-emitter-D5ApNfU0.cjs +38 -0
  5. package/dist/create-writer-C24rz3d5.d.cts +13 -0
  6. package/dist/create-writer-CiaQl13h.d.mts +13 -0
  7. package/dist/create-writer-Du15htg7.mjs +48 -0
  8. package/dist/create-writer-gvbqS_Gu.cjs +87 -0
  9. package/dist/helpers/create-emitter.cjs +2 -32
  10. package/dist/helpers/create-emitter.d.cts +1 -28
  11. package/dist/helpers/create-emitter.d.mts +1 -28
  12. package/dist/helpers/create-emitter.mjs +1 -30
  13. package/dist/helpers/create-writer.cjs +2 -40
  14. package/dist/helpers/create-writer.d.cts +2 -12
  15. package/dist/helpers/create-writer.d.mts +2 -12
  16. package/dist/helpers/create-writer.mjs +1 -37
  17. package/dist/helpers/index.cjs +5 -4
  18. package/dist/helpers/index.d.cts +4 -2
  19. package/dist/helpers/index.d.mts +4 -2
  20. package/dist/helpers/index.mjs +3 -2
  21. package/dist/helpers-y2jvHwgF.mjs +1 -0
  22. package/dist/helpers-yB1XkvQI.cjs +0 -0
  23. package/dist/index-BL32-cvv.d.cts +1 -0
  24. package/dist/index-BR1oNnaF.d.cts +1 -0
  25. package/dist/index-Bk0eNZmQ.d.mts +1 -0
  26. package/dist/index-DNLi60D-.d.mts +1 -0
  27. package/dist/index.cjs +45 -12
  28. package/dist/index.d.cts +5 -4
  29. package/dist/index.d.mts +5 -6
  30. package/dist/index.mjs +38 -4
  31. package/dist/plugin-B0q2kj8i.mjs +1 -0
  32. package/dist/plugin-BQjCVJPf.d.cts +1800 -0
  33. package/dist/plugin-Ckx8qAq8.cjs +0 -0
  34. package/dist/plugin-VnXa5UaX.d.mts +1800 -0
  35. package/dist/types/index.cjs +2 -0
  36. package/dist/types/index.d.cts +2 -1
  37. package/dist/types/index.d.mts +2 -1
  38. package/dist/types/index.mjs +3 -0
  39. package/dist/types/plugin.cjs +1 -0
  40. package/dist/types/plugin.d.cts +1 -48
  41. package/dist/types/plugin.d.mts +1 -48
  42. package/dist/types/plugin.mjs +2 -0
  43. package/dist/types--fVOUYBq.mjs +1 -0
  44. package/dist/types-a8gm_IaQ.cjs +0 -0
  45. package/package.json +5 -5
  46. package/dist/_virtual/rolldown_runtime.cjs +0 -29
  47. package/dist/powerlines/src/lib/utilities/file-header.cjs +0 -13
  48. package/dist/powerlines/src/lib/utilities/file-header.mjs +0 -12
  49. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -36
  50. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -35
  51. package/dist/powerlines/src/types/build.d.cts +0 -145
  52. package/dist/powerlines/src/types/build.d.mts +0 -145
  53. package/dist/powerlines/src/types/commands.d.cts +0 -8
  54. package/dist/powerlines/src/types/commands.d.mts +0 -8
  55. package/dist/powerlines/src/types/config.d.cts +0 -369
  56. package/dist/powerlines/src/types/config.d.mts +0 -369
  57. package/dist/powerlines/src/types/context.d.cts +0 -403
  58. package/dist/powerlines/src/types/context.d.mts +0 -403
  59. package/dist/powerlines/src/types/fs.d.cts +0 -486
  60. package/dist/powerlines/src/types/fs.d.mts +0 -486
  61. package/dist/powerlines/src/types/plugin.d.cts +0 -231
  62. package/dist/powerlines/src/types/plugin.d.mts +0 -231
  63. package/dist/powerlines/src/types/resolved.d.cts +0 -81
  64. package/dist/powerlines/src/types/resolved.d.mts +0 -81
  65. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  66. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
@@ -0,0 +1,2 @@
1
+ require('../plugin-Ckx8qAq8.cjs');
2
+ require('../types-a8gm_IaQ.cjs');
@@ -1,2 +1,3 @@
1
- import { ContentCollectionsContext, ContentCollectionsPluginContext, ContentCollectionsPluginOptions, ContentCollectionsPluginResolvedConfig, ContentCollectionsPluginUserConfig, __ΩContentCollectionsContext, __ΩContentCollectionsPluginContext, __ΩContentCollectionsPluginOptions, __ΩContentCollectionsPluginResolvedConfig, __ΩContentCollectionsPluginUserConfig } from "./plugin.cjs";
1
+ import { a as ContentCollectionsPluginUserConfig, c as __ΩContentCollectionsPluginOptions, i as ContentCollectionsPluginResolvedConfig, l as __ΩContentCollectionsPluginResolvedConfig, n as ContentCollectionsPluginContext, o as __ΩContentCollectionsContext, r as ContentCollectionsPluginOptions, s as __ΩContentCollectionsPluginContext, t as ContentCollectionsContext, u as __ΩContentCollectionsPluginUserConfig } from "../plugin-BQjCVJPf.cjs";
2
+ import "../index-BL32-cvv.cjs";
2
3
  export { ContentCollectionsContext, ContentCollectionsPluginContext, ContentCollectionsPluginOptions, ContentCollectionsPluginResolvedConfig, ContentCollectionsPluginUserConfig, __ΩContentCollectionsContext, __ΩContentCollectionsPluginContext, __ΩContentCollectionsPluginOptions, __ΩContentCollectionsPluginResolvedConfig, __ΩContentCollectionsPluginUserConfig };
@@ -1,2 +1,3 @@
1
- import { ContentCollectionsContext, ContentCollectionsPluginContext, ContentCollectionsPluginOptions, ContentCollectionsPluginResolvedConfig, ContentCollectionsPluginUserConfig, __ΩContentCollectionsContext, __ΩContentCollectionsPluginContext, __ΩContentCollectionsPluginOptions, __ΩContentCollectionsPluginResolvedConfig, __ΩContentCollectionsPluginUserConfig } from "./plugin.mjs";
1
+ import { a as ContentCollectionsPluginUserConfig, c as __ΩContentCollectionsPluginOptions, i as ContentCollectionsPluginResolvedConfig, l as __ΩContentCollectionsPluginResolvedConfig, n as ContentCollectionsPluginContext, o as __ΩContentCollectionsContext, r as ContentCollectionsPluginOptions, s as __ΩContentCollectionsPluginContext, t as ContentCollectionsContext, u as __ΩContentCollectionsPluginUserConfig } from "../plugin-VnXa5UaX.mjs";
2
+ import "../index-Bk0eNZmQ.mjs";
2
3
  export { ContentCollectionsContext, ContentCollectionsPluginContext, ContentCollectionsPluginOptions, ContentCollectionsPluginResolvedConfig, ContentCollectionsPluginUserConfig, __ΩContentCollectionsContext, __ΩContentCollectionsPluginContext, __ΩContentCollectionsPluginOptions, __ΩContentCollectionsPluginResolvedConfig, __ΩContentCollectionsPluginUserConfig };
@@ -1 +1,4 @@
1
+ import "../plugin-B0q2kj8i.mjs";
2
+ import "../types--fVOUYBq.mjs";
3
+
1
4
  export { };
@@ -0,0 +1 @@
1
+ require('../plugin-Ckx8qAq8.cjs');
@@ -1,49 +1,2 @@
1
- import { ResolvedConfig } from "../powerlines/src/types/resolved.cjs";
2
- import { PluginContext } from "../powerlines/src/types/context.cjs";
3
- import { UserConfig } from "../powerlines/src/types/config.cjs";
4
- import { AnyCollection, BuildContext, createInternalBuilder } from "@content-collections/core";
5
-
6
- //#region src/types/plugin.d.ts
7
- type ContentCollectionsContext = Pick<Awaited<ReturnType<typeof createInternalBuilder>>, "build" | "on"> & {
8
- context: BuildContext;
9
- };
10
- interface ContentCollectionsPluginOptions {
11
- /**
12
- * The path to a custom Prisma configuration file.
13
- *
14
- * @remarks
15
- * This field allows the use of the "\{projectRoot\}" token to refer to the project's root directory - the value will be replaced with the correct file path by the plugin.
16
- *
17
- * @defaultValue "\{projectRoot\}/content-collections.ts"
18
- */
19
- configFile?: string;
20
- /**
21
- * The list of content collections to include.
22
- */
23
- collections?: AnyCollection[];
24
- /**
25
- * The path to the content collection output files generated by the plugin.
26
- *
27
- * @remarks
28
- * If using the default value, the file can be imported from "powerlines:content/collection-name". This field allows the use of the "\{builtinPath\}" token to refer to the built-in Powerlines plugins directory - the value will be replaced with the correct file path by the plugin.
29
- *
30
- * @defaultValue "\{builtinPath\}/content"
31
- */
32
- outputPath?: string;
33
- }
34
- type ContentCollectionsPluginUserConfig = UserConfig & {
35
- contentCollections?: ContentCollectionsPluginOptions;
36
- };
37
- type ContentCollectionsPluginResolvedConfig = ResolvedConfig & {
38
- contentCollections: Required<Omit<ContentCollectionsPluginOptions, "outputPath">> & Pick<ContentCollectionsPluginOptions, "outputPath">;
39
- };
40
- type ContentCollectionsPluginContext<TResolvedConfig extends ContentCollectionsPluginResolvedConfig = ContentCollectionsPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
41
- contentCollections: ContentCollectionsContext;
42
- };
43
- declare type __ΩContentCollectionsContext = any[];
44
- declare type __ΩContentCollectionsPluginOptions = any[];
45
- declare type __ΩContentCollectionsPluginUserConfig = any[];
46
- declare type __ΩContentCollectionsPluginResolvedConfig = any[];
47
- declare type __ΩContentCollectionsPluginContext = any[];
48
- //#endregion
1
+ import { a as ContentCollectionsPluginUserConfig, c as __ΩContentCollectionsPluginOptions, i as ContentCollectionsPluginResolvedConfig, l as __ΩContentCollectionsPluginResolvedConfig, n as ContentCollectionsPluginContext, o as __ΩContentCollectionsContext, r as ContentCollectionsPluginOptions, s as __ΩContentCollectionsPluginContext, t as ContentCollectionsContext, u as __ΩContentCollectionsPluginUserConfig } from "../plugin-BQjCVJPf.cjs";
49
2
  export { ContentCollectionsContext, ContentCollectionsPluginContext, ContentCollectionsPluginOptions, ContentCollectionsPluginResolvedConfig, ContentCollectionsPluginUserConfig, __ΩContentCollectionsContext, __ΩContentCollectionsPluginContext, __ΩContentCollectionsPluginOptions, __ΩContentCollectionsPluginResolvedConfig, __ΩContentCollectionsPluginUserConfig };
@@ -1,49 +1,2 @@
1
- import { ResolvedConfig } from "../powerlines/src/types/resolved.mjs";
2
- import { PluginContext } from "../powerlines/src/types/context.mjs";
3
- import { UserConfig } from "../powerlines/src/types/config.mjs";
4
- import { AnyCollection, BuildContext, createInternalBuilder } from "@content-collections/core";
5
-
6
- //#region src/types/plugin.d.ts
7
- type ContentCollectionsContext = Pick<Awaited<ReturnType<typeof createInternalBuilder>>, "build" | "on"> & {
8
- context: BuildContext;
9
- };
10
- interface ContentCollectionsPluginOptions {
11
- /**
12
- * The path to a custom Prisma configuration file.
13
- *
14
- * @remarks
15
- * This field allows the use of the "\{projectRoot\}" token to refer to the project's root directory - the value will be replaced with the correct file path by the plugin.
16
- *
17
- * @defaultValue "\{projectRoot\}/content-collections.ts"
18
- */
19
- configFile?: string;
20
- /**
21
- * The list of content collections to include.
22
- */
23
- collections?: AnyCollection[];
24
- /**
25
- * The path to the content collection output files generated by the plugin.
26
- *
27
- * @remarks
28
- * If using the default value, the file can be imported from "powerlines:content/collection-name". This field allows the use of the "\{builtinPath\}" token to refer to the built-in Powerlines plugins directory - the value will be replaced with the correct file path by the plugin.
29
- *
30
- * @defaultValue "\{builtinPath\}/content"
31
- */
32
- outputPath?: string;
33
- }
34
- type ContentCollectionsPluginUserConfig = UserConfig & {
35
- contentCollections?: ContentCollectionsPluginOptions;
36
- };
37
- type ContentCollectionsPluginResolvedConfig = ResolvedConfig & {
38
- contentCollections: Required<Omit<ContentCollectionsPluginOptions, "outputPath">> & Pick<ContentCollectionsPluginOptions, "outputPath">;
39
- };
40
- type ContentCollectionsPluginContext<TResolvedConfig extends ContentCollectionsPluginResolvedConfig = ContentCollectionsPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
41
- contentCollections: ContentCollectionsContext;
42
- };
43
- declare type __ΩContentCollectionsContext = any[];
44
- declare type __ΩContentCollectionsPluginOptions = any[];
45
- declare type __ΩContentCollectionsPluginUserConfig = any[];
46
- declare type __ΩContentCollectionsPluginResolvedConfig = any[];
47
- declare type __ΩContentCollectionsPluginContext = any[];
48
- //#endregion
1
+ import { a as ContentCollectionsPluginUserConfig, c as __ΩContentCollectionsPluginOptions, i as ContentCollectionsPluginResolvedConfig, l as __ΩContentCollectionsPluginResolvedConfig, n as ContentCollectionsPluginContext, o as __ΩContentCollectionsContext, r as ContentCollectionsPluginOptions, s as __ΩContentCollectionsPluginContext, t as ContentCollectionsContext, u as __ΩContentCollectionsPluginUserConfig } from "../plugin-VnXa5UaX.mjs";
49
2
  export { ContentCollectionsContext, ContentCollectionsPluginContext, ContentCollectionsPluginOptions, ContentCollectionsPluginResolvedConfig, ContentCollectionsPluginUserConfig, __ΩContentCollectionsContext, __ΩContentCollectionsPluginContext, __ΩContentCollectionsPluginOptions, __ΩContentCollectionsPluginResolvedConfig, __ΩContentCollectionsPluginUserConfig };
@@ -1 +1,3 @@
1
+ import "../plugin-B0q2kj8i.mjs";
2
+
1
3
  export { };
@@ -0,0 +1 @@
1
+ export { };
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-content-collections",
3
- "version": "0.1.121",
3
+ "version": "0.1.123",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to generate project code using Content Collections.",
6
6
  "repository": {
@@ -130,15 +130,15 @@
130
130
  "@stryke/types": "^0.10.29",
131
131
  "defu": "^6.1.4",
132
132
  "pluralize": "^8.0.0",
133
- "powerlines": "^0.36.26"
133
+ "powerlines": "^0.36.27"
134
134
  },
135
135
  "devDependencies": {
136
- "@powerlines/nx": "^0.11.52",
137
- "@powerlines/plugin-plugin": "^0.12.73",
136
+ "@powerlines/nx": "^0.11.53",
137
+ "@powerlines/plugin-plugin": "^0.12.75",
138
138
  "@standard-schema/spec": "^1.1.0",
139
139
  "@types/node": "^24.10.4",
140
140
  "@types/pluralize": "^0.0.33"
141
141
  },
142
142
  "publishConfig": { "access": "public" },
143
- "gitHead": "f27028746c0657470a2c93af2e3224565ae7fd61"
143
+ "gitHead": "fbc59ce584fd0f78d90d2dbaa18f9c9267bd3b61"
144
144
  }
@@ -1,29 +0,0 @@
1
- //#region rolldown:runtime
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") {
10
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
- key = keys[i];
12
- if (!__hasOwnProp.call(to, key) && key !== except) {
13
- __defProp(to, key, {
14
- get: ((k) => from[k]).bind(null, key),
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- }
19
- }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
- value: mod,
24
- enumerable: true
25
- }) : target, mod));
26
-
27
- //#endregion
28
-
29
- exports.__toESM = __toESM;
@@ -1,13 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
3
-
4
- //#region ../powerlines/src/lib/utilities/file-header.ts
5
- function getBaseFileHeader(context) {
6
- return `
7
- // Generated with ${(0, __stryke_string_format_title_case.titleCase)(context.config.framework)}
8
- // Note: Do not edit this file manually - it will be overwritten automatically
9
- `;
10
- }
11
-
12
- //#endregion
13
- exports.getBaseFileHeader = getBaseFileHeader;
@@ -1,12 +0,0 @@
1
- import { titleCase } from "@stryke/string-format/title-case";
2
-
3
- //#region ../powerlines/src/lib/utilities/file-header.ts
4
- function getBaseFileHeader(context) {
5
- return `
6
- // Generated with ${titleCase(context.config.framework)}
7
- // Note: Do not edit this file manually - it will be overwritten automatically
8
- `;
9
- }
10
-
11
- //#endregion
12
- export { getBaseFileHeader };
@@ -1,36 +0,0 @@
1
- const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
- let __stryke_path_replace = require("@stryke/path/replace");
3
-
4
- //#region ../powerlines/src/plugin-utils/paths.ts
5
- /**
6
- * Replaces tokens in the given path string with their corresponding values from the context.
7
- *
8
- * @remarks
9
- * The following tokens are supported:
10
- * - `{workspaceRoot}` - The root directory of the workspace.
11
- * - `{root}` - The root directory of the project (same as `{projectRoot}`).
12
- * - `{projectRoot}` - The root directory of the project (same as `{root}`).
13
- * - `{sourceRoot}` - The source root directory of the project (usually `./src`).
14
- * - `{powerlinesPath}` - The directory where Powerlines is installed.
15
- * - `{cachePath}` - The environment's directory for cached files.
16
- * - `{dataPath}` - The environment's directory for data files.
17
- * - `{logPath}` - The environment's directory for log files.
18
- * - `{tempPath}` - The environment's directory for temporary files.
19
- * - `{configPath}` - The environment's directory for configuration files.
20
- * - `{outputPath}` - The configured output directory for the project.
21
- * - `{buildPath}` - The configured distribution directory for the project.
22
- * - `{artifactsPath}` - The configured directory for build artifacts.
23
- * - `{builtinPath}` - The configured directory for generated built-in plugins.
24
- * - `{entryPath}` - The configured directory for generated entry files.
25
- *
26
- * @param context - The context containing the values for the path tokens.
27
- * @param path - The path string with tokens to replace.
28
- * @returns The path string with tokens replaced by their corresponding values from the context.
29
- */
30
- function replacePathTokens(context, path) {
31
- if (!path) return path;
32
- return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{sourceRoot}", context.config.sourceRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", (0, __stryke_path_replace.replacePath)(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", (0, __stryke_path_replace.replacePath)(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", (0, __stryke_path_replace.replacePath)(context.entryPath, context.workspaceConfig.workspaceRoot));
33
- }
34
-
35
- //#endregion
36
- exports.replacePathTokens = replacePathTokens;
@@ -1,35 +0,0 @@
1
- import { replacePath } from "@stryke/path/replace";
2
-
3
- //#region ../powerlines/src/plugin-utils/paths.ts
4
- /**
5
- * Replaces tokens in the given path string with their corresponding values from the context.
6
- *
7
- * @remarks
8
- * The following tokens are supported:
9
- * - `{workspaceRoot}` - The root directory of the workspace.
10
- * - `{root}` - The root directory of the project (same as `{projectRoot}`).
11
- * - `{projectRoot}` - The root directory of the project (same as `{root}`).
12
- * - `{sourceRoot}` - The source root directory of the project (usually `./src`).
13
- * - `{powerlinesPath}` - The directory where Powerlines is installed.
14
- * - `{cachePath}` - The environment's directory for cached files.
15
- * - `{dataPath}` - The environment's directory for data files.
16
- * - `{logPath}` - The environment's directory for log files.
17
- * - `{tempPath}` - The environment's directory for temporary files.
18
- * - `{configPath}` - The environment's directory for configuration files.
19
- * - `{outputPath}` - The configured output directory for the project.
20
- * - `{buildPath}` - The configured distribution directory for the project.
21
- * - `{artifactsPath}` - The configured directory for build artifacts.
22
- * - `{builtinPath}` - The configured directory for generated built-in plugins.
23
- * - `{entryPath}` - The configured directory for generated entry files.
24
- *
25
- * @param context - The context containing the values for the path tokens.
26
- * @param path - The path string with tokens to replace.
27
- * @returns The path string with tokens replaced by their corresponding values from the context.
28
- */
29
- function replacePathTokens(context, path) {
30
- if (!path) return path;
31
- return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{sourceRoot}", context.config.sourceRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
32
- }
33
-
34
- //#endregion
35
- export { replacePathTokens };
@@ -1,145 +0,0 @@
1
- //#region ../powerlines/src/types/build.d.ts
2
-
3
- type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
4
- interface BuildConfig {
5
- /**
6
- * The platform to build the project for
7
- *
8
- * @defaultValue "neutral"
9
- */
10
- platform?: "node" | "browser" | "neutral";
11
- /**
12
- * Array of strings indicating the polyfills to include for the build.
13
- *
14
- * @remarks
15
- * This option allows you to specify which polyfills should be included in the build process to ensure compatibility with the target environment. The paths for the polyfills can use placeholder tokens (the `replacePathTokens` helper function will be used to resolve the actual values).
16
- *
17
- * @example
18
- * ```ts
19
- * {
20
- * polyfill: ['{projectRoot}/custom-polyfill.ts']
21
- * }
22
- * ```
23
- */
24
- polyfill?: string[];
25
- /**
26
- * Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
27
- *
28
- * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
29
- */
30
- mainFields?: string[];
31
- /**
32
- * Array of strings indicating what conditions should be used for module resolution.
33
- */
34
- conditions?: string[];
35
- /**
36
- * Array of strings indicating what file extensions should be used for module resolution.
37
- *
38
- * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
39
- */
40
- extensions?: string[];
41
- /**
42
- * Array of strings indicating what modules should be deduplicated to a single version in the build.
43
- *
44
- * @remarks
45
- * This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
46
- */
47
- dedupe?: string[];
48
- /**
49
- * Array of strings or regular expressions that indicate what modules are builtin for the environment.
50
- */
51
- builtins?: (string | RegExp)[];
52
- /**
53
- * Define global variable replacements.
54
- *
55
- * @remarks
56
- * This option allows you to specify global constants that will be replaced in the code during the build process. It is similar to the `define` option in esbuild and Vite, enabling you to replace specific identifiers with constant expressions at build time.
57
- *
58
- * @example
59
- * ```ts
60
- * {
61
- * define: {
62
- * __VERSION__: '"1.0.0"',
63
- * __DEV__: 'process.env.NODE_ENV !== "production"'
64
- * }
65
- * }
66
- * ```
67
- *
68
- * @see https://esbuild.github.io/api/#define
69
- * @see https://vitejs.dev/config/build-options.html#define
70
- * @see https://github.com/rollup/plugins/tree/master/packages/replace
71
- */
72
- define?: Record<string, any>;
73
- /**
74
- * Global variables that will have import statements injected where necessary
75
- *
76
- * @remarks
77
- * This option allows you to specify global variables that should be automatically imported from specified modules whenever they are used in the code. This is particularly useful for polyfilling Node.js globals in a browser environment.
78
- *
79
- * @example
80
- * ```ts
81
- * {
82
- * inject: {
83
- * process: 'process/browser',
84
- * Buffer: ['buffer', 'Buffer'],
85
- * }
86
- * }
87
- * ```
88
- *
89
- * @see https://github.com/rollup/plugins/tree/master/packages/inject
90
- */
91
- inject?: Record<string, string | string[]>;
92
- /**
93
- * The alias mappings to use for module resolution during the build process.
94
- *
95
- * @remarks
96
- * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
97
- *
98
- * @example
99
- * ```ts
100
- * {
101
- * alias: {
102
- * "@utils": "./src/utils",
103
- * "@components": "./src/components"
104
- * }
105
- * }
106
- * ```
107
- *
108
- * @see https://github.com/rollup/plugins/tree/master/packages/alias
109
- */
110
- alias?: Record<string, string> | Array<{
111
- find: string | RegExp;
112
- replacement: string;
113
- }>;
114
- /**
115
- * A list of modules that should not be bundled, even if they are external dependencies.
116
- *
117
- * @remarks
118
- * This option is useful for excluding specific modules from the bundle, such as Node.js built-in modules or other libraries that should not be bundled.
119
- */
120
- external?: (string | RegExp)[];
121
- /**
122
- * A list of modules that should always be bundled, even if they are external dependencies.
123
- */
124
- noExternal?: (string | RegExp)[];
125
- /**
126
- * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
127
- */
128
- skipNodeModulesBundle?: boolean;
129
- /**
130
- * If true, `process.env` referenced in code will be preserved as-is and evaluated in runtime. Otherwise, it is statically replaced as an empty object.
131
- *
132
- * @defaultValue false
133
- */
134
- keepProcessEnv?: boolean;
135
- /**
136
- * An optional set of override options to apply to the selected build variant.
137
- *
138
- * @remarks
139
- * 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.
140
- */
141
- override?: Record<string, any>;
142
- }
143
- type BuildResolvedConfig = Omit<BuildConfig, "override">;
144
- //#endregion
145
- export { BuildConfig, BuildResolvedConfig, UnpluginBuildVariant };
@@ -1,145 +0,0 @@
1
- //#region ../powerlines/src/types/build.d.ts
2
-
3
- type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
4
- interface BuildConfig {
5
- /**
6
- * The platform to build the project for
7
- *
8
- * @defaultValue "neutral"
9
- */
10
- platform?: "node" | "browser" | "neutral";
11
- /**
12
- * Array of strings indicating the polyfills to include for the build.
13
- *
14
- * @remarks
15
- * This option allows you to specify which polyfills should be included in the build process to ensure compatibility with the target environment. The paths for the polyfills can use placeholder tokens (the `replacePathTokens` helper function will be used to resolve the actual values).
16
- *
17
- * @example
18
- * ```ts
19
- * {
20
- * polyfill: ['{projectRoot}/custom-polyfill.ts']
21
- * }
22
- * ```
23
- */
24
- polyfill?: string[];
25
- /**
26
- * Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
27
- *
28
- * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
29
- */
30
- mainFields?: string[];
31
- /**
32
- * Array of strings indicating what conditions should be used for module resolution.
33
- */
34
- conditions?: string[];
35
- /**
36
- * Array of strings indicating what file extensions should be used for module resolution.
37
- *
38
- * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
39
- */
40
- extensions?: string[];
41
- /**
42
- * Array of strings indicating what modules should be deduplicated to a single version in the build.
43
- *
44
- * @remarks
45
- * This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
46
- */
47
- dedupe?: string[];
48
- /**
49
- * Array of strings or regular expressions that indicate what modules are builtin for the environment.
50
- */
51
- builtins?: (string | RegExp)[];
52
- /**
53
- * Define global variable replacements.
54
- *
55
- * @remarks
56
- * This option allows you to specify global constants that will be replaced in the code during the build process. It is similar to the `define` option in esbuild and Vite, enabling you to replace specific identifiers with constant expressions at build time.
57
- *
58
- * @example
59
- * ```ts
60
- * {
61
- * define: {
62
- * __VERSION__: '"1.0.0"',
63
- * __DEV__: 'process.env.NODE_ENV !== "production"'
64
- * }
65
- * }
66
- * ```
67
- *
68
- * @see https://esbuild.github.io/api/#define
69
- * @see https://vitejs.dev/config/build-options.html#define
70
- * @see https://github.com/rollup/plugins/tree/master/packages/replace
71
- */
72
- define?: Record<string, any>;
73
- /**
74
- * Global variables that will have import statements injected where necessary
75
- *
76
- * @remarks
77
- * This option allows you to specify global variables that should be automatically imported from specified modules whenever they are used in the code. This is particularly useful for polyfilling Node.js globals in a browser environment.
78
- *
79
- * @example
80
- * ```ts
81
- * {
82
- * inject: {
83
- * process: 'process/browser',
84
- * Buffer: ['buffer', 'Buffer'],
85
- * }
86
- * }
87
- * ```
88
- *
89
- * @see https://github.com/rollup/plugins/tree/master/packages/inject
90
- */
91
- inject?: Record<string, string | string[]>;
92
- /**
93
- * The alias mappings to use for module resolution during the build process.
94
- *
95
- * @remarks
96
- * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
97
- *
98
- * @example
99
- * ```ts
100
- * {
101
- * alias: {
102
- * "@utils": "./src/utils",
103
- * "@components": "./src/components"
104
- * }
105
- * }
106
- * ```
107
- *
108
- * @see https://github.com/rollup/plugins/tree/master/packages/alias
109
- */
110
- alias?: Record<string, string> | Array<{
111
- find: string | RegExp;
112
- replacement: string;
113
- }>;
114
- /**
115
- * A list of modules that should not be bundled, even if they are external dependencies.
116
- *
117
- * @remarks
118
- * This option is useful for excluding specific modules from the bundle, such as Node.js built-in modules or other libraries that should not be bundled.
119
- */
120
- external?: (string | RegExp)[];
121
- /**
122
- * A list of modules that should always be bundled, even if they are external dependencies.
123
- */
124
- noExternal?: (string | RegExp)[];
125
- /**
126
- * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
127
- */
128
- skipNodeModulesBundle?: boolean;
129
- /**
130
- * If true, `process.env` referenced in code will be preserved as-is and evaluated in runtime. Otherwise, it is statically replaced as an empty object.
131
- *
132
- * @defaultValue false
133
- */
134
- keepProcessEnv?: boolean;
135
- /**
136
- * An optional set of override options to apply to the selected build variant.
137
- *
138
- * @remarks
139
- * 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.
140
- */
141
- override?: Record<string, any>;
142
- }
143
- type BuildResolvedConfig = Omit<BuildConfig, "override">;
144
- //#endregion
145
- export { BuildConfig, BuildResolvedConfig, UnpluginBuildVariant };
@@ -1,8 +0,0 @@
1
- import { MaybePromise } from "@stryke/types/base";
2
- import { ArrayValues } from "@stryke/types/array";
3
-
4
- //#region ../powerlines/src/types/commands.d.ts
5
- declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
6
- type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
7
- //#endregion
8
- export { CommandType };
@@ -1,8 +0,0 @@
1
- import { MaybePromise } from "@stryke/types/base";
2
- import { ArrayValues } from "@stryke/types/array";
3
-
4
- //#region ../powerlines/src/types/commands.d.ts
5
- declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
6
- type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
7
- //#endregion
8
- export { CommandType };