@powerlines/plugin-graphql 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.
- package/dist/index-BgAdqTbb.d.mts +1 -0
- package/dist/index-CEgs-Dz2.d.cts +1 -0
- package/dist/index.cjs +111 -7
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -3
- package/dist/index.mjs +80 -2
- package/dist/plugin-BEE_1hxr.d.cts +1785 -0
- package/dist/plugin-C3MaN5jp.mjs +1 -0
- package/dist/plugin-DHXHjv16.cjs +0 -0
- package/dist/plugin-DOqYu9n5.d.mts +1785 -0
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.cts +2 -1
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.mjs +3 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +1 -40
- package/dist/types/plugin.d.mts +1 -40
- package/dist/types/plugin.mjs +2 -0
- package/dist/types-CTUnla4x.mjs +1 -0
- package/dist/types-DHkg7xmX.cjs +0 -0
- package/package.json +5 -5
- package/dist/_virtual/rolldown_runtime.cjs +0 -29
- package/dist/powerlines/src/plugin-utils/get-config-path.cjs +0 -49
- package/dist/powerlines/src/plugin-utils/get-config-path.mjs +0 -48
- package/dist/powerlines/src/plugin-utils/paths.cjs +0 -36
- package/dist/powerlines/src/plugin-utils/paths.mjs +0 -35
- package/dist/powerlines/src/types/babel.d.mts +0 -2
- package/dist/powerlines/src/types/build.d.cts +0 -145
- package/dist/powerlines/src/types/build.d.mts +0 -145
- package/dist/powerlines/src/types/commands.d.cts +0 -8
- package/dist/powerlines/src/types/commands.d.mts +0 -9
- package/dist/powerlines/src/types/config.d.cts +0 -369
- package/dist/powerlines/src/types/config.d.mts +0 -369
- package/dist/powerlines/src/types/context.d.cts +0 -403
- package/dist/powerlines/src/types/context.d.mts +0 -405
- package/dist/powerlines/src/types/fs.d.cts +0 -486
- package/dist/powerlines/src/types/fs.d.mts +0 -486
- package/dist/powerlines/src/types/hooks.d.mts +0 -2
- package/dist/powerlines/src/types/plugin.d.cts +0 -231
- package/dist/powerlines/src/types/plugin.d.mts +0 -231
- package/dist/powerlines/src/types/resolved.d.cts +0 -81
- package/dist/powerlines/src/types/resolved.d.mts +0 -81
- package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
- package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
package/dist/types/index.cjs
CHANGED
package/dist/types/index.d.cts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { GraphQLPluginContext,
|
|
1
|
+
import { a as __ΩGraphQLPluginContext, c as __ΩGraphQLPluginUserConfig, i as GraphQLPluginUserConfig, n as GraphQLPluginOptions, o as __ΩGraphQLPluginOptions, r as GraphQLPluginResolvedConfig, s as __ΩGraphQLPluginResolvedConfig, t as GraphQLPluginContext } from "../plugin-BEE_1hxr.cjs";
|
|
2
|
+
import "../index-CEgs-Dz2.cjs";
|
|
2
3
|
export { GraphQLPluginContext, GraphQLPluginOptions, GraphQLPluginResolvedConfig, GraphQLPluginUserConfig, __ΩGraphQLPluginContext, __ΩGraphQLPluginOptions, __ΩGraphQLPluginResolvedConfig, __ΩGraphQLPluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { GraphQLPluginContext,
|
|
1
|
+
import { a as __ΩGraphQLPluginContext, c as __ΩGraphQLPluginUserConfig, i as GraphQLPluginUserConfig, n as GraphQLPluginOptions, o as __ΩGraphQLPluginOptions, r as GraphQLPluginResolvedConfig, s as __ΩGraphQLPluginResolvedConfig, t as GraphQLPluginContext } from "../plugin-DOqYu9n5.mjs";
|
|
2
|
+
import "../index-BgAdqTbb.mjs";
|
|
2
3
|
export { GraphQLPluginContext, GraphQLPluginOptions, GraphQLPluginResolvedConfig, GraphQLPluginUserConfig, __ΩGraphQLPluginContext, __ΩGraphQLPluginOptions, __ΩGraphQLPluginResolvedConfig, __ΩGraphQLPluginUserConfig };
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.cjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('../plugin-DHXHjv16.cjs');
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,41 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ResolvedConfig } from "../powerlines/src/types/resolved.cjs";
|
|
3
|
-
import { PluginContext } from "../powerlines/src/types/context.cjs";
|
|
4
|
-
import { CodegenContext, YamlCliFlags } from "@graphql-codegen/cli";
|
|
5
|
-
|
|
6
|
-
//#region src/types/plugin.d.ts
|
|
7
|
-
type GraphQLPluginOptions = Partial<Omit<YamlCliFlags, "config" | "watch">> & {
|
|
8
|
-
/**
|
|
9
|
-
* The path to a custom GraphQL Codegen configuration file.
|
|
10
|
-
*
|
|
11
|
-
* @remarks
|
|
12
|
-
* If not provided, the plugin will attempt to locate a configuration file by searching for one of the following filenames in the project root (in order): "codegen.yml", "codegen.yaml", "codegen.json", "codegen.js", "codegen.cjs".
|
|
13
|
-
*/
|
|
14
|
-
configFile?: string;
|
|
15
|
-
/**
|
|
16
|
-
* The path to the output file generated by the plugin.
|
|
17
|
-
*
|
|
18
|
-
* @remarks
|
|
19
|
-
* If using the default value, the file can be imported from "powerlines:graphql/schema-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.
|
|
20
|
-
*
|
|
21
|
-
* @defaultValue "\{builtinPath\}/graphql"
|
|
22
|
-
*/
|
|
23
|
-
outputPath?: string;
|
|
24
|
-
};
|
|
25
|
-
type GraphQLPluginUserConfig = UserConfig & {
|
|
26
|
-
graphql?: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "outputPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "outputPath" | "configFile">>;
|
|
27
|
-
};
|
|
28
|
-
type GraphQLPluginResolvedConfig = ResolvedConfig & {
|
|
29
|
-
graphql: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "outputPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "outputPath" | "configFile">>;
|
|
30
|
-
};
|
|
31
|
-
type GraphQLPluginContext<TResolvedConfig extends GraphQLPluginResolvedConfig = GraphQLPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
32
|
-
graphql: {
|
|
33
|
-
codegen: CodegenContext;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
declare type __ΩGraphQLPluginOptions = any[];
|
|
37
|
-
declare type __ΩGraphQLPluginUserConfig = any[];
|
|
38
|
-
declare type __ΩGraphQLPluginResolvedConfig = any[];
|
|
39
|
-
declare type __ΩGraphQLPluginContext = any[];
|
|
40
|
-
//#endregion
|
|
1
|
+
import { a as __ΩGraphQLPluginContext, c as __ΩGraphQLPluginUserConfig, i as GraphQLPluginUserConfig, n as GraphQLPluginOptions, o as __ΩGraphQLPluginOptions, r as GraphQLPluginResolvedConfig, s as __ΩGraphQLPluginResolvedConfig, t as GraphQLPluginContext } from "../plugin-BEE_1hxr.cjs";
|
|
41
2
|
export { GraphQLPluginContext, GraphQLPluginOptions, GraphQLPluginResolvedConfig, GraphQLPluginUserConfig, __ΩGraphQLPluginContext, __ΩGraphQLPluginOptions, __ΩGraphQLPluginResolvedConfig, __ΩGraphQLPluginUserConfig };
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,41 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ResolvedConfig } from "../powerlines/src/types/resolved.mjs";
|
|
3
|
-
import { PluginContext } from "../powerlines/src/types/context.mjs";
|
|
4
|
-
import { CodegenContext, YamlCliFlags } from "@graphql-codegen/cli";
|
|
5
|
-
|
|
6
|
-
//#region src/types/plugin.d.ts
|
|
7
|
-
type GraphQLPluginOptions = Partial<Omit<YamlCliFlags, "config" | "watch">> & {
|
|
8
|
-
/**
|
|
9
|
-
* The path to a custom GraphQL Codegen configuration file.
|
|
10
|
-
*
|
|
11
|
-
* @remarks
|
|
12
|
-
* If not provided, the plugin will attempt to locate a configuration file by searching for one of the following filenames in the project root (in order): "codegen.yml", "codegen.yaml", "codegen.json", "codegen.js", "codegen.cjs".
|
|
13
|
-
*/
|
|
14
|
-
configFile?: string;
|
|
15
|
-
/**
|
|
16
|
-
* The path to the output file generated by the plugin.
|
|
17
|
-
*
|
|
18
|
-
* @remarks
|
|
19
|
-
* If using the default value, the file can be imported from "powerlines:graphql/schema-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.
|
|
20
|
-
*
|
|
21
|
-
* @defaultValue "\{builtinPath\}/graphql"
|
|
22
|
-
*/
|
|
23
|
-
outputPath?: string;
|
|
24
|
-
};
|
|
25
|
-
type GraphQLPluginUserConfig = UserConfig & {
|
|
26
|
-
graphql?: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "outputPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "outputPath" | "configFile">>;
|
|
27
|
-
};
|
|
28
|
-
type GraphQLPluginResolvedConfig = ResolvedConfig & {
|
|
29
|
-
graphql: Omit<YamlCliFlags, "config" | "watch" | "project" | "overwrite" | "require"> & Omit<GraphQLPluginOptions, "outputPath" | "configFile"> & Required<Pick<GraphQLPluginOptions, "outputPath" | "configFile">>;
|
|
30
|
-
};
|
|
31
|
-
type GraphQLPluginContext<TResolvedConfig extends GraphQLPluginResolvedConfig = GraphQLPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
32
|
-
graphql: {
|
|
33
|
-
codegen: CodegenContext;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
declare type __ΩGraphQLPluginOptions = any[];
|
|
37
|
-
declare type __ΩGraphQLPluginUserConfig = any[];
|
|
38
|
-
declare type __ΩGraphQLPluginResolvedConfig = any[];
|
|
39
|
-
declare type __ΩGraphQLPluginContext = any[];
|
|
40
|
-
//#endregion
|
|
1
|
+
import { a as __ΩGraphQLPluginContext, c as __ΩGraphQLPluginUserConfig, i as GraphQLPluginUserConfig, n as GraphQLPluginOptions, o as __ΩGraphQLPluginOptions, r as GraphQLPluginResolvedConfig, s as __ΩGraphQLPluginResolvedConfig, t as GraphQLPluginContext } from "../plugin-DOqYu9n5.mjs";
|
|
41
2
|
export { GraphQLPluginContext, GraphQLPluginOptions, GraphQLPluginResolvedConfig, GraphQLPluginUserConfig, __ΩGraphQLPluginContext, __ΩGraphQLPluginOptions, __ΩGraphQLPluginResolvedConfig, __ΩGraphQLPluginUserConfig };
|
package/dist/types/plugin.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-graphql",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.123",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to generate project code from GraphQL schemas.",
|
|
6
6
|
"repository": {
|
|
@@ -123,14 +123,14 @@
|
|
|
123
123
|
"@stryke/types": "^0.10.29",
|
|
124
124
|
"defu": "^6.1.4",
|
|
125
125
|
"jiti": "^2.6.1",
|
|
126
|
-
"powerlines": "^0.36.
|
|
126
|
+
"powerlines": "^0.36.26"
|
|
127
127
|
},
|
|
128
128
|
"devDependencies": {
|
|
129
129
|
"@graphql-codegen/plugin-helpers": "^6.1.0",
|
|
130
|
-
"@powerlines/nx": "^0.11.
|
|
131
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
130
|
+
"@powerlines/nx": "^0.11.52",
|
|
131
|
+
"@powerlines/plugin-plugin": "^0.12.74",
|
|
132
132
|
"@types/node": "^24.10.4"
|
|
133
133
|
},
|
|
134
134
|
"publishConfig": { "access": "public" },
|
|
135
|
-
"gitHead": "
|
|
135
|
+
"gitHead": "a703a2dd9be6175a67a9bf4847d0217be4e920af"
|
|
136
136
|
}
|
|
@@ -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,49 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let __stryke_path_join = require("@stryke/path/join");
|
|
3
|
-
let node_fs = require("node:fs");
|
|
4
|
-
|
|
5
|
-
//#region ../powerlines/src/plugin-utils/get-config-path.ts
|
|
6
|
-
/**
|
|
7
|
-
* Get the configuration file path for a given name.
|
|
8
|
-
*
|
|
9
|
-
* @param context - The Powerlines context.
|
|
10
|
-
* @param name - The name of the configuration file (without extension).
|
|
11
|
-
* @returns The absolute path to the configuration file, or undefined if not found.
|
|
12
|
-
*/
|
|
13
|
-
function getConfigPath(context, name) {
|
|
14
|
-
if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.yml`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.yml`);
|
|
15
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.yaml`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.yaml`);
|
|
16
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.json`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.json`);
|
|
17
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.jsonc`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.jsonc`);
|
|
18
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.ts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.ts`);
|
|
19
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.cts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.cts`);
|
|
20
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.mts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.mts`);
|
|
21
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.js`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.js`);
|
|
22
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.cjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.cjs`);
|
|
23
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.mjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.mjs`);
|
|
24
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.ts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.ts`);
|
|
25
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.cts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.cts`);
|
|
26
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.mts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.mts`);
|
|
27
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.js`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.js`);
|
|
28
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.cjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.cjs`);
|
|
29
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.mjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.mjs`);
|
|
30
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yml`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yml`);
|
|
31
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yaml`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.yaml`);
|
|
32
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.json`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.json`);
|
|
33
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.jsonc`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.jsonc`);
|
|
34
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.ts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.ts`);
|
|
35
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cts`);
|
|
36
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mts`);
|
|
37
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.js`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.js`);
|
|
38
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.cjs`);
|
|
39
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.mjs`);
|
|
40
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.ts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.ts`);
|
|
41
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cts`);
|
|
42
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mts`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mts`);
|
|
43
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.js`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.js`);
|
|
44
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.cjs`);
|
|
45
|
-
else if ((0, node_fs.existsSync)((0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mjs`))) return (0, __stryke_path_join.joinPaths)(context.workspaceConfig.workspaceRoot, `${name}.config.mjs`);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
//#endregion
|
|
49
|
-
exports.getConfigPath = getConfigPath;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { joinPaths } from "@stryke/path/join";
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
|
|
4
|
-
//#region ../powerlines/src/plugin-utils/get-config-path.ts
|
|
5
|
-
/**
|
|
6
|
-
* Get the configuration file path for a given name.
|
|
7
|
-
*
|
|
8
|
-
* @param context - The Powerlines context.
|
|
9
|
-
* @param name - The name of the configuration file (without extension).
|
|
10
|
-
* @returns The absolute path to the configuration file, or undefined if not found.
|
|
11
|
-
*/
|
|
12
|
-
function getConfigPath(context, name) {
|
|
13
|
-
if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.yml`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.yml`);
|
|
14
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.yaml`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.yaml`);
|
|
15
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.json`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.json`);
|
|
16
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.jsonc`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.jsonc`);
|
|
17
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.ts`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.ts`);
|
|
18
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.cts`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.cts`);
|
|
19
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.mts`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.mts`);
|
|
20
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.js`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.js`);
|
|
21
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.cjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.cjs`);
|
|
22
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.mjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.mjs`);
|
|
23
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.ts`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.ts`);
|
|
24
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.cts`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.cts`);
|
|
25
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.mts`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.mts`);
|
|
26
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.js`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.js`);
|
|
27
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.cjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.cjs`);
|
|
28
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.mjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, `${name}.config.mjs`);
|
|
29
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.yml`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.yml`);
|
|
30
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.yaml`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.yaml`);
|
|
31
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.json`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.json`);
|
|
32
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.jsonc`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.jsonc`);
|
|
33
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.ts`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.ts`);
|
|
34
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.cts`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.cts`);
|
|
35
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.mts`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.mts`);
|
|
36
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.js`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.js`);
|
|
37
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.cjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.cjs`);
|
|
38
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.mjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.mjs`);
|
|
39
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.ts`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.ts`);
|
|
40
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.cts`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.cts`);
|
|
41
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.mts`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.mts`);
|
|
42
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.js`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.js`);
|
|
43
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.cjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.cjs`);
|
|
44
|
-
else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.mjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.mjs`);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
//#endregion
|
|
48
|
-
export { getConfigPath };
|
|
@@ -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 };
|