@powerlines/plugin-nodejs 0.1.117 → 0.1.119
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/components/env.cjs +14 -14
- package/dist/components/env.d.cts +1 -1
- package/dist/components/env.d.mts +1 -1
- package/dist/components/env.mjs +6 -6
- package/dist/index.cjs +8 -6
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +5 -5
- package/dist/types/plugin.d.cts +2 -2
- package/dist/types/plugin.d.mts +2 -2
- package/package.json +6 -6
- package/dist/deepkit/schemas/reflection.cjs +0 -3998
- package/dist/deepkit/schemas/reflection.d.cts +0 -1560
- package/dist/deepkit/schemas/reflection.d.mts +0 -1560
- package/dist/deepkit/schemas/reflection.mjs +0 -3996
- package/dist/deepkit/schemas/reflection2.cjs +0 -4112
- package/dist/deepkit/schemas/reflection2.mjs +0 -4110
- package/dist/deepkit/src/capnp.cjs +0 -913
- package/dist/deepkit/src/capnp.mjs +0 -911
- package/dist/deepkit/src/esbuild-plugin.cjs +0 -47
- package/dist/deepkit/src/esbuild-plugin.mjs +0 -46
- package/dist/deepkit/src/reflect-type.cjs +0 -22
- package/dist/deepkit/src/reflect-type.mjs +0 -20
- package/dist/deepkit/src/resolve-reflections.cjs +0 -16
- package/dist/deepkit/src/resolve-reflections.mjs +0 -15
- package/dist/deepkit/src/transformer.cjs +0 -52
- package/dist/deepkit/src/transformer.mjs +0 -49
- package/dist/deepkit/src/transpile.cjs +0 -29
- package/dist/deepkit/src/transpile.mjs +0 -27
- package/dist/deepkit/src/types.d.cts +0 -10
- package/dist/deepkit/src/types.d.mts +0 -10
- package/dist/deepkit/src/utilities.cjs +0 -67
- package/dist/deepkit/src/utilities.mjs +0 -66
- package/dist/plugin-alloy/src/core/components/output.cjs +0 -43
- package/dist/plugin-alloy/src/core/components/output.mjs +0 -42
- package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -22
- package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -21
- package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -64
- package/dist/plugin-alloy/src/core/components/source-file.d.cts +0 -23
- package/dist/plugin-alloy/src/core/components/source-file.d.mts +0 -23
- package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -62
- package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -49
- package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -44
- package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
- package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
- package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -46
- package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -42
- package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -16
- package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -15
- package/dist/plugin-alloy/src/index.cjs +0 -105
- package/dist/plugin-alloy/src/index.mjs +0 -103
- package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -115
- package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -114
- package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -39
- package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -38
- package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -18
- package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -17
- package/dist/plugin-alloy/src/types/components.d.cts +0 -20
- package/dist/plugin-alloy/src/types/components.d.mts +0 -21
- package/dist/plugin-alloy/src/types/index.d.cts +0 -2
- package/dist/plugin-alloy/src/types/index.d.mts +0 -2
- package/dist/plugin-alloy/src/types/plugin.d.cts +0 -36
- package/dist/plugin-alloy/src/types/plugin.d.mts +0 -36
- package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -62
- package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +0 -26
- package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +0 -26
- package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -61
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -131
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -129
- package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -451
- package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +0 -37
- package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +0 -37
- package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -442
- package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -216
- package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +0 -16
- package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +0 -16
- package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -213
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -72
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.cts +0 -4
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.mts +0 -4
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -71
- package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -124
- package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -123
- package/dist/plugin-automd/src/index.cjs +0 -101
- package/dist/plugin-automd/src/index.mjs +0 -98
- package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
- package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
- package/dist/plugin-automd/src/types/toc.d.cts +0 -33
- package/dist/plugin-automd/src/types/toc.d.mts +0 -33
- package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -10
- package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -9
- package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -41
- package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -39
- package/dist/plugin-babel/src/helpers/filters.cjs +0 -23
- package/dist/plugin-babel/src/helpers/filters.mjs +0 -21
- package/dist/plugin-babel/src/helpers/index.cjs +0 -5
- package/dist/plugin-babel/src/helpers/index.mjs +0 -7
- package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -38
- package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -35
- package/dist/plugin-babel/src/helpers/options.cjs +0 -49
- package/dist/plugin-babel/src/helpers/options.mjs +0 -46
- package/dist/plugin-babel/src/index.cjs +0 -85
- package/dist/plugin-babel/src/index.mjs +0 -83
- package/dist/plugin-babel/src/types/index.d.mts +0 -1
- package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
- package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
- package/dist/plugin-env/src/babel/index.cjs +0 -1
- package/dist/plugin-env/src/babel/index.mjs +0 -3
- package/dist/plugin-env/src/babel/plugin.cjs +0 -70
- package/dist/plugin-env/src/babel/plugin.mjs +0 -69
- package/dist/plugin-env/src/components/docs.cjs +0 -70
- package/dist/plugin-env/src/components/docs.mjs +0 -69
- package/dist/plugin-env/src/components/env.cjs +0 -589
- package/dist/plugin-env/src/components/env.d.cts +0 -11
- package/dist/plugin-env/src/components/env.d.mts +0 -11
- package/dist/plugin-env/src/components/env.mjs +0 -586
- package/dist/plugin-env/src/components/index.cjs +0 -2
- package/dist/plugin-env/src/components/index.mjs +0 -4
- package/dist/plugin-env/src/helpers/automd-generator.cjs +0 -22
- package/dist/plugin-env/src/helpers/automd-generator.mjs +0 -21
- package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +0 -55
- package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +0 -54
- package/dist/plugin-env/src/helpers/docs-helper.cjs +0 -16
- package/dist/plugin-env/src/helpers/docs-helper.mjs +0 -15
- package/dist/plugin-env/src/helpers/index.cjs +0 -6
- package/dist/plugin-env/src/helpers/index.mjs +0 -8
- package/dist/plugin-env/src/helpers/load.cjs +0 -84
- package/dist/plugin-env/src/helpers/load.mjs +0 -81
- package/dist/plugin-env/src/helpers/persistence.cjs +0 -201
- package/dist/plugin-env/src/helpers/persistence.mjs +0 -190
- package/dist/plugin-env/src/helpers/reflect.cjs +0 -125
- package/dist/plugin-env/src/helpers/reflect.mjs +0 -117
- package/dist/plugin-env/src/helpers/source-file-env.cjs +0 -24
- package/dist/plugin-env/src/helpers/source-file-env.mjs +0 -23
- package/dist/plugin-env/src/helpers/template-helpers.cjs +0 -2
- package/dist/plugin-env/src/helpers/template-helpers.mjs +0 -4
- package/dist/plugin-env/src/index.cjs +0 -177
- package/dist/plugin-env/src/index.mjs +0 -175
- package/dist/plugin-env/src/types/plugin.d.cts +0 -149
- package/dist/plugin-env/src/types/plugin.d.mts +0 -150
- package/dist/plugin-env/src/types/runtime.d.cts +0 -789
- package/dist/plugin-env/src/types/runtime.d.mts +0 -789
- package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
- package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -49
- package/dist/powerlines/src/lib/build/esbuild.cjs +0 -93
- package/dist/powerlines/src/lib/build/esbuild.mjs +0 -91
- package/dist/powerlines/src/lib/constants/environments.cjs +0 -6
- package/dist/powerlines/src/lib/constants/environments.mjs +0 -5
- package/dist/powerlines/src/lib/entry.cjs +0 -11
- package/dist/powerlines/src/lib/entry.mjs +0 -13
- package/dist/powerlines/src/lib/logger.cjs +0 -41
- package/dist/powerlines/src/lib/logger.mjs +0 -39
- package/dist/powerlines/src/lib/typescript/tsconfig.cjs +0 -38
- package/dist/powerlines/src/lib/typescript/tsconfig.mjs +0 -35
- package/dist/powerlines/src/lib/unplugin/helpers.cjs +0 -3
- package/dist/powerlines/src/lib/unplugin/helpers.mjs +0 -5
- package/dist/powerlines/src/lib/unplugin/module-resolution.cjs +0 -66
- package/dist/powerlines/src/lib/unplugin/module-resolution.mjs +0 -65
- package/dist/powerlines/src/lib/unplugin/plugin.cjs +0 -46
- package/dist/powerlines/src/lib/unplugin/plugin.mjs +0 -45
- package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -42
- package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -40
- package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -50
- package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -49
- package/dist/powerlines/src/lib/utilities/source-file.cjs +0 -5
- package/dist/powerlines/src/lib/utilities/source-file.mjs +0 -5
- package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
- package/dist/powerlines/src/plugin-utils/paths.mjs +0 -3
- package/dist/powerlines/src/types/api.d.cts +0 -104
- package/dist/powerlines/src/types/api.d.mts +0 -104
- package/dist/powerlines/src/types/babel.d.cts +0 -22
- package/dist/powerlines/src/types/babel.d.mts +0 -22
- package/dist/powerlines/src/types/build.cjs +0 -21
- package/dist/powerlines/src/types/build.d.cts +0 -185
- package/dist/powerlines/src/types/build.d.mts +0 -185
- package/dist/powerlines/src/types/build.mjs +0 -21
- 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 -435
- package/dist/powerlines/src/types/config.d.mts +0 -436
- package/dist/powerlines/src/types/context.d.cts +0 -514
- package/dist/powerlines/src/types/context.d.mts +0 -514
- 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.cts +0 -32
- package/dist/powerlines/src/types/hooks.d.mts +0 -32
- package/dist/powerlines/src/types/plugin.d.cts +0 -205
- package/dist/powerlines/src/types/plugin.d.mts +0 -205
- package/dist/powerlines/src/types/resolved.d.cts +0 -94
- package/dist/powerlines/src/types/resolved.d.mts +0 -94
- package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
- package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
- package/dist/powerlines/src/types/unplugin.d.cts +0 -22
- package/dist/powerlines/src/types/unplugin.d.mts +0 -23
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_logger = require('../logger.cjs');
|
|
3
|
-
require('../utilities/source-file.cjs');
|
|
4
|
-
require('./helpers.cjs');
|
|
5
|
-
const require_module_resolution = require('./module-resolution.cjs');
|
|
6
|
-
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
7
|
-
let __stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
|
|
8
|
-
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
9
|
-
let unplugin = require("unplugin");
|
|
10
|
-
|
|
11
|
-
//#region ../powerlines/src/lib/unplugin/plugin.ts
|
|
12
|
-
/**
|
|
13
|
-
* Creates a Powerlines unplugin instance.
|
|
14
|
-
*
|
|
15
|
-
* @param context - The plugin context.
|
|
16
|
-
* @returns The unplugin instance.
|
|
17
|
-
*/
|
|
18
|
-
function createUnpluginResolver(context, name = "unplugin") {
|
|
19
|
-
const ctx = context;
|
|
20
|
-
(0, unplugin.setParseImpl)(ctx.parse);
|
|
21
|
-
return () => {
|
|
22
|
-
const log = require_logger.extendLog(ctx.log, name);
|
|
23
|
-
log(__storm_software_config_tools_types.LogLevelLabel.DEBUG, `Initializing ${name.toLowerCase() === "unplugin" ? "Unplugin" : `${(0, __stryke_string_format_title_case.titleCase)(name)} - Unplugin`} plugin`);
|
|
24
|
-
try {
|
|
25
|
-
const { resolveId, load } = require_module_resolution.createUnpluginModuleResolutionFunctions(context);
|
|
26
|
-
return {
|
|
27
|
-
name: name.toLowerCase() === "unplugin" ? "powerlines" : `powerlines:${(0, __stryke_string_format_kebab_case.kebabCase)(name)}`,
|
|
28
|
-
api: ctx.$$internal.api,
|
|
29
|
-
resolveId: {
|
|
30
|
-
filter: { id: { include: [/.*/] } },
|
|
31
|
-
handler: resolveId
|
|
32
|
-
},
|
|
33
|
-
load: {
|
|
34
|
-
filter: { id: { include: [/.*/] } },
|
|
35
|
-
handler: load
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
} catch (error) {
|
|
39
|
-
log(__storm_software_config_tools_types.LogLevelLabel.FATAL, error?.message);
|
|
40
|
-
throw error;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
//#endregion
|
|
46
|
-
exports.createUnpluginResolver = createUnpluginResolver;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { extendLog } from "../logger.mjs";
|
|
2
|
-
import "../utilities/source-file.mjs";
|
|
3
|
-
import "./helpers.mjs";
|
|
4
|
-
import { createUnpluginModuleResolutionFunctions } from "./module-resolution.mjs";
|
|
5
|
-
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
6
|
-
import { kebabCase } from "@stryke/string-format/kebab-case";
|
|
7
|
-
import { titleCase } from "@stryke/string-format/title-case";
|
|
8
|
-
import { setParseImpl } from "unplugin";
|
|
9
|
-
|
|
10
|
-
//#region ../powerlines/src/lib/unplugin/plugin.ts
|
|
11
|
-
/**
|
|
12
|
-
* Creates a Powerlines unplugin instance.
|
|
13
|
-
*
|
|
14
|
-
* @param context - The plugin context.
|
|
15
|
-
* @returns The unplugin instance.
|
|
16
|
-
*/
|
|
17
|
-
function createUnpluginResolver(context, name = "unplugin") {
|
|
18
|
-
const ctx = context;
|
|
19
|
-
setParseImpl(ctx.parse);
|
|
20
|
-
return () => {
|
|
21
|
-
const log = extendLog(ctx.log, name);
|
|
22
|
-
log(LogLevelLabel.DEBUG, `Initializing ${name.toLowerCase() === "unplugin" ? "Unplugin" : `${titleCase(name)} - Unplugin`} plugin`);
|
|
23
|
-
try {
|
|
24
|
-
const { resolveId, load } = createUnpluginModuleResolutionFunctions(context);
|
|
25
|
-
return {
|
|
26
|
-
name: name.toLowerCase() === "unplugin" ? "powerlines" : `powerlines:${kebabCase(name)}`,
|
|
27
|
-
api: ctx.$$internal.api,
|
|
28
|
-
resolveId: {
|
|
29
|
-
filter: { id: { include: [/.*/] } },
|
|
30
|
-
handler: resolveId
|
|
31
|
-
},
|
|
32
|
-
load: {
|
|
33
|
-
filter: { id: { include: [/.*/] } },
|
|
34
|
-
handler: load
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
} catch (error) {
|
|
38
|
-
log(LogLevelLabel.FATAL, error?.message);
|
|
39
|
-
throw error;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
//#endregion
|
|
45
|
-
export { createUnpluginResolver };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_esbuild = require('../build/esbuild.cjs');
|
|
3
|
-
const require_plugin = require('../unplugin/plugin.cjs');
|
|
4
|
-
let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
5
|
-
let defu = require("defu");
|
|
6
|
-
defu = require_rolldown_runtime.__toESM(defu);
|
|
7
|
-
let esbuild = require("esbuild");
|
|
8
|
-
let unplugin = require("unplugin");
|
|
9
|
-
|
|
10
|
-
//#region ../powerlines/src/lib/utilities/bundle.ts
|
|
11
|
-
/**
|
|
12
|
-
* Bundle a type definition to a module.
|
|
13
|
-
*
|
|
14
|
-
* @param context - The context object containing the environment paths.
|
|
15
|
-
* @param file - The file path to bundle.
|
|
16
|
-
* @param overrides - Optional overrides for the ESBuild configuration.
|
|
17
|
-
* @returns A promise that resolves to the bundled module.
|
|
18
|
-
*/
|
|
19
|
-
async function bundle(context, file, overrides = {}) {
|
|
20
|
-
const path = await context.fs.resolve(file);
|
|
21
|
-
if (!path || !context.fs.existsSync(path)) throw new Error(`Module not found: "${file}". Please check the path and try again.`);
|
|
22
|
-
const result = await (0, esbuild.build)((0, defu.default)({
|
|
23
|
-
...require_esbuild.extractESBuildConfig(context),
|
|
24
|
-
entryPoints: [path],
|
|
25
|
-
write: false,
|
|
26
|
-
sourcemap: false,
|
|
27
|
-
splitting: false,
|
|
28
|
-
treeShaking: false,
|
|
29
|
-
bundle: true,
|
|
30
|
-
packages: "bundle",
|
|
31
|
-
platform: "node",
|
|
32
|
-
logLevel: "silent",
|
|
33
|
-
...overrides
|
|
34
|
-
}, { plugins: [(0, unplugin.createEsbuildPlugin)(require_plugin.createUnpluginResolver(context, `${(0, __stryke_path_file_path_fns.findFileName)(file)} Bundler`))({})] }));
|
|
35
|
-
if (result.errors.length > 0) throw new Error(`Failed to bundle ${file}: ${result.errors.map((error) => error.text).join(", ")}`);
|
|
36
|
-
if (result.warnings.length > 0) context.warn(`Warnings while bundling ${file}: ${result.warnings.map((warning) => warning.text).join(", ")}`);
|
|
37
|
-
if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) throw new Error(`No output files generated for ${file}. Please check the configuration and try again.`);
|
|
38
|
-
return result.outputFiles.filter(Boolean)[0];
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
//#endregion
|
|
42
|
-
exports.bundle = bundle;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { extractESBuildConfig } from "../build/esbuild.mjs";
|
|
2
|
-
import { createUnpluginResolver } from "../unplugin/plugin.mjs";
|
|
3
|
-
import { findFileName } from "@stryke/path/file-path-fns";
|
|
4
|
-
import defu from "defu";
|
|
5
|
-
import { build } from "esbuild";
|
|
6
|
-
import { createEsbuildPlugin } from "unplugin";
|
|
7
|
-
|
|
8
|
-
//#region ../powerlines/src/lib/utilities/bundle.ts
|
|
9
|
-
/**
|
|
10
|
-
* Bundle a type definition to a module.
|
|
11
|
-
*
|
|
12
|
-
* @param context - The context object containing the environment paths.
|
|
13
|
-
* @param file - The file path to bundle.
|
|
14
|
-
* @param overrides - Optional overrides for the ESBuild configuration.
|
|
15
|
-
* @returns A promise that resolves to the bundled module.
|
|
16
|
-
*/
|
|
17
|
-
async function bundle(context, file, overrides = {}) {
|
|
18
|
-
const path = await context.fs.resolve(file);
|
|
19
|
-
if (!path || !context.fs.existsSync(path)) throw new Error(`Module not found: "${file}". Please check the path and try again.`);
|
|
20
|
-
const result = await build(defu({
|
|
21
|
-
...extractESBuildConfig(context),
|
|
22
|
-
entryPoints: [path],
|
|
23
|
-
write: false,
|
|
24
|
-
sourcemap: false,
|
|
25
|
-
splitting: false,
|
|
26
|
-
treeShaking: false,
|
|
27
|
-
bundle: true,
|
|
28
|
-
packages: "bundle",
|
|
29
|
-
platform: "node",
|
|
30
|
-
logLevel: "silent",
|
|
31
|
-
...overrides
|
|
32
|
-
}, { plugins: [createEsbuildPlugin(createUnpluginResolver(context, `${findFileName(file)} Bundler`))({})] }));
|
|
33
|
-
if (result.errors.length > 0) throw new Error(`Failed to bundle ${file}: ${result.errors.map((error) => error.text).join(", ")}`);
|
|
34
|
-
if (result.warnings.length > 0) context.warn(`Warnings while bundling ${file}: ${result.warnings.map((warning) => warning.text).join(", ")}`);
|
|
35
|
-
if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) throw new Error(`No output files generated for ${file}. Please check the configuration and try again.`);
|
|
36
|
-
return result.outputFiles.filter(Boolean)[0];
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
//#endregion
|
|
40
|
-
export { bundle };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_bundle = require('./bundle.cjs');
|
|
3
|
-
let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
4
|
-
let __stryke_convert_parse_type_definition = require("@stryke/convert/parse-type-definition");
|
|
5
|
-
|
|
6
|
-
//#region ../powerlines/src/lib/utilities/resolve.ts
|
|
7
|
-
/**
|
|
8
|
-
* Compiles a type definition to a module.
|
|
9
|
-
*
|
|
10
|
-
* @param context - The context object containing the environment paths.
|
|
11
|
-
* @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.
|
|
12
|
-
* @param overrides - Optional overrides for the ESBuild configuration.
|
|
13
|
-
* @returns A promise that resolves to the compiled module.
|
|
14
|
-
*/
|
|
15
|
-
async function resolve(context, type, overrides = {}) {
|
|
16
|
-
let typeDefinition;
|
|
17
|
-
if ((0, __stryke_type_checks_is_set_string.isSetString)(type)) typeDefinition = (0, __stryke_convert_parse_type_definition.parseTypeDefinition)(type);
|
|
18
|
-
else typeDefinition = type;
|
|
19
|
-
const result = await require_bundle.bundle(context, typeDefinition.file, overrides);
|
|
20
|
-
let resolved;
|
|
21
|
-
try {
|
|
22
|
-
resolved = await context.resolver.evalModule(result.text, {
|
|
23
|
-
filename: result.path,
|
|
24
|
-
forceTranspile: true
|
|
25
|
-
});
|
|
26
|
-
} catch (error) {
|
|
27
|
-
if ((0, __stryke_type_checks_is_set_string.isSetString)(error.message) && (/* @__PURE__ */ new RegExp(`Cannot find module '${context.config.framework || "powerlines"}:.*'`)).test(error.message)) {
|
|
28
|
-
const moduleName = error.message.match(/* @__PURE__ */ new RegExp(`Cannot find module '(${context.config.framework || "powerlines"}:.*)'`))?.[1];
|
|
29
|
-
throw new Error(`The module "${moduleName}" could not be resolved while evaluating "${typeDefinition.file}". It is possible the required built-in modules have not yet been generated. Please check the order of your plugins. ${context.config.logLevel === "debug" || context.config.logLevel === "trace" ? `
|
|
30
|
-
|
|
31
|
-
Bundle output for module:
|
|
32
|
-
${result.text}` : ""}`);
|
|
33
|
-
}
|
|
34
|
-
throw new Error(`Failed to evaluate the bundled module for "${typeDefinition.file}". Error: ${error.message}${context.config.logLevel === "debug" || context.config.logLevel === "trace" ? `
|
|
35
|
-
|
|
36
|
-
Bundle output for module:
|
|
37
|
-
${result.text}` : ""}`);
|
|
38
|
-
}
|
|
39
|
-
let exportName = typeDefinition.name;
|
|
40
|
-
if (!exportName) exportName = "default";
|
|
41
|
-
const resolvedExport = resolved[exportName] ?? resolved[`__Ω${exportName}`];
|
|
42
|
-
if (resolvedExport === void 0) throw new Error(`The export "${exportName}" could not be resolved in the "${typeDefinition.file}" module. ${Object.keys(resolved).length === 0 ? `After bundling, no exports were found in the module. Please ensure that the "${typeDefinition.file}" module has a "${exportName}" export with the desired value.` : `After bundling, the available exports were: ${Object.keys(resolved).join(", ")}. Please ensure that the export exists and is correctly named.`}${context.config.logLevel === "debug" ? `
|
|
43
|
-
|
|
44
|
-
Bundle output for module:
|
|
45
|
-
${result.text}` : ""}`);
|
|
46
|
-
return resolvedExport;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
//#endregion
|
|
50
|
-
exports.resolve = resolve;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { bundle } from "./bundle.mjs";
|
|
2
|
-
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
3
|
-
import { parseTypeDefinition } from "@stryke/convert/parse-type-definition";
|
|
4
|
-
|
|
5
|
-
//#region ../powerlines/src/lib/utilities/resolve.ts
|
|
6
|
-
/**
|
|
7
|
-
* Compiles a type definition to a module.
|
|
8
|
-
*
|
|
9
|
-
* @param context - The context object containing the environment paths.
|
|
10
|
-
* @param type - The type definition to compile. This can be either a string or a {@link TypeDefinition} object.
|
|
11
|
-
* @param overrides - Optional overrides for the ESBuild configuration.
|
|
12
|
-
* @returns A promise that resolves to the compiled module.
|
|
13
|
-
*/
|
|
14
|
-
async function resolve(context, type, overrides = {}) {
|
|
15
|
-
let typeDefinition;
|
|
16
|
-
if (isSetString(type)) typeDefinition = parseTypeDefinition(type);
|
|
17
|
-
else typeDefinition = type;
|
|
18
|
-
const result = await bundle(context, typeDefinition.file, overrides);
|
|
19
|
-
let resolved;
|
|
20
|
-
try {
|
|
21
|
-
resolved = await context.resolver.evalModule(result.text, {
|
|
22
|
-
filename: result.path,
|
|
23
|
-
forceTranspile: true
|
|
24
|
-
});
|
|
25
|
-
} catch (error) {
|
|
26
|
-
if (isSetString(error.message) && (/* @__PURE__ */ new RegExp(`Cannot find module '${context.config.framework || "powerlines"}:.*'`)).test(error.message)) {
|
|
27
|
-
const moduleName = error.message.match(/* @__PURE__ */ new RegExp(`Cannot find module '(${context.config.framework || "powerlines"}:.*)'`))?.[1];
|
|
28
|
-
throw new Error(`The module "${moduleName}" could not be resolved while evaluating "${typeDefinition.file}". It is possible the required built-in modules have not yet been generated. Please check the order of your plugins. ${context.config.logLevel === "debug" || context.config.logLevel === "trace" ? `
|
|
29
|
-
|
|
30
|
-
Bundle output for module:
|
|
31
|
-
${result.text}` : ""}`);
|
|
32
|
-
}
|
|
33
|
-
throw new Error(`Failed to evaluate the bundled module for "${typeDefinition.file}". Error: ${error.message}${context.config.logLevel === "debug" || context.config.logLevel === "trace" ? `
|
|
34
|
-
|
|
35
|
-
Bundle output for module:
|
|
36
|
-
${result.text}` : ""}`);
|
|
37
|
-
}
|
|
38
|
-
let exportName = typeDefinition.name;
|
|
39
|
-
if (!exportName) exportName = "default";
|
|
40
|
-
const resolvedExport = resolved[exportName] ?? resolved[`__Ω${exportName}`];
|
|
41
|
-
if (resolvedExport === void 0) throw new Error(`The export "${exportName}" could not be resolved in the "${typeDefinition.file}" module. ${Object.keys(resolved).length === 0 ? `After bundling, no exports were found in the module. Please ensure that the "${typeDefinition.file}" module has a "${exportName}" export with the desired value.` : `After bundling, the available exports were: ${Object.keys(resolved).join(", ")}. Please ensure that the export exists and is correctly named.`}${context.config.logLevel === "debug" ? `
|
|
42
|
-
|
|
43
|
-
Bundle output for module:
|
|
44
|
-
${result.text}` : ""}`);
|
|
45
|
-
return resolvedExport;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
//#endregion
|
|
49
|
-
export { resolve };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
3
|
-
let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
4
|
-
require("@stryke/fs/read-file");
|
|
5
|
-
require("magic-string");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let __stryke_path_replace = require("@stryke/path/replace");
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { CallHookOptions } from "../internal/helpers/hooks.cjs";
|
|
2
|
-
import { InferHookParameters, InferHookReturnType } from "./hooks.cjs";
|
|
3
|
-
import { APIContext, EnvironmentContext, PluginContext } from "./context.cjs";
|
|
4
|
-
import { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, LintInlineConfig, NewInlineConfig, PrepareInlineConfig } from "./config.cjs";
|
|
5
|
-
import { ResolvedConfig } from "./resolved.cjs";
|
|
6
|
-
|
|
7
|
-
//#region ../powerlines/src/types/api.d.ts
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Powerlines API Interface
|
|
11
|
-
*/
|
|
12
|
-
interface API<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
13
|
-
/**
|
|
14
|
-
* The Powerlines shared API context
|
|
15
|
-
*/
|
|
16
|
-
context: APIContext<TResolvedConfig>;
|
|
17
|
-
/**
|
|
18
|
-
* Prepare the Powerlines API
|
|
19
|
-
*
|
|
20
|
-
* @remarks
|
|
21
|
-
* This method will prepare the Powerlines API for use, initializing any necessary resources.
|
|
22
|
-
*
|
|
23
|
-
* @param inlineConfig - The inline configuration for the prepare command
|
|
24
|
-
*/
|
|
25
|
-
prepare: (inlineConfig: PrepareInlineConfig | NewInlineConfig | CleanInlineConfig | BuildInlineConfig | LintInlineConfig | DocsInlineConfig | DeployInlineConfig) => Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* Create a new Powerlines project
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* This method will create a new Powerlines project in the current directory.
|
|
31
|
-
*
|
|
32
|
-
* @param inlineConfig - The inline configuration for the new command
|
|
33
|
-
* @returns A promise that resolves when the project has been created
|
|
34
|
-
*/
|
|
35
|
-
new: (inlineConfig: NewInlineConfig) => Promise<void>;
|
|
36
|
-
/**
|
|
37
|
-
* Clean any previously prepared artifacts
|
|
38
|
-
*
|
|
39
|
-
* @remarks
|
|
40
|
-
* This method will remove the previous Powerlines artifacts from the project.
|
|
41
|
-
*
|
|
42
|
-
* @param inlineConfig - The inline configuration for the clean command
|
|
43
|
-
* @returns A promise that resolves when the clean command has completed
|
|
44
|
-
*/
|
|
45
|
-
clean: (inlineConfig: CleanInlineConfig | PrepareInlineConfig) => Promise<void>;
|
|
46
|
-
/**
|
|
47
|
-
* Lint the project source code
|
|
48
|
-
*
|
|
49
|
-
* @param inlineConfig - The inline configuration for the lint command
|
|
50
|
-
* @returns A promise that resolves when the lint command has completed
|
|
51
|
-
*/
|
|
52
|
-
lint: (inlineConfig: LintInlineConfig) => Promise<void>;
|
|
53
|
-
/**
|
|
54
|
-
* Build the project
|
|
55
|
-
*
|
|
56
|
-
* @remarks
|
|
57
|
-
* This method will build the Powerlines project, generating the necessary artifacts.
|
|
58
|
-
*
|
|
59
|
-
* @param inlineConfig - The inline configuration for the build command
|
|
60
|
-
* @returns A promise that resolves when the build command has completed
|
|
61
|
-
*/
|
|
62
|
-
build: (inlineConfig: BuildInlineConfig) => Promise<void>;
|
|
63
|
-
/**
|
|
64
|
-
* Prepare the documentation for the project
|
|
65
|
-
*
|
|
66
|
-
* @param inlineConfig - The inline configuration for the docs command
|
|
67
|
-
* @returns A promise that resolves when the documentation generation has completed
|
|
68
|
-
*/
|
|
69
|
-
docs: (inlineConfig: DocsInlineConfig) => Promise<void>;
|
|
70
|
-
/**
|
|
71
|
-
* Deploy the project source code
|
|
72
|
-
*
|
|
73
|
-
* @remarks
|
|
74
|
-
* This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
|
|
75
|
-
*
|
|
76
|
-
* @param inlineConfig - The inline configuration for the deploy command
|
|
77
|
-
*/
|
|
78
|
-
deploy: (inlineConfig: DeployInlineConfig) => Promise<void>;
|
|
79
|
-
/**
|
|
80
|
-
* Finalization process
|
|
81
|
-
*
|
|
82
|
-
* @remarks
|
|
83
|
-
* This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
|
|
84
|
-
*
|
|
85
|
-
* @returns A promise that resolves when the finalization process has completed
|
|
86
|
-
*/
|
|
87
|
-
finalize: () => Promise<void>;
|
|
88
|
-
/**
|
|
89
|
-
* Invokes the configured plugin hooks
|
|
90
|
-
*
|
|
91
|
-
* @remarks
|
|
92
|
-
* By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
|
|
93
|
-
*
|
|
94
|
-
* @param hook - The hook to call
|
|
95
|
-
* @param options - The options to provide to the hook
|
|
96
|
-
* @param args - The arguments to pass to the hook
|
|
97
|
-
* @returns The result of the hook call
|
|
98
|
-
*/
|
|
99
|
-
callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
|
|
100
|
-
environment?: string | EnvironmentContext<TResolvedConfig>;
|
|
101
|
-
}, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
|
|
102
|
-
}
|
|
103
|
-
//#endregion
|
|
104
|
-
export { API };
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { CallHookOptions } from "../internal/helpers/hooks.mjs";
|
|
2
|
-
import { InferHookParameters, InferHookReturnType } from "./hooks.mjs";
|
|
3
|
-
import { APIContext, EnvironmentContext, PluginContext } from "./context.mjs";
|
|
4
|
-
import { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, LintInlineConfig, NewInlineConfig, PrepareInlineConfig } from "./config.mjs";
|
|
5
|
-
import { ResolvedConfig } from "./resolved.mjs";
|
|
6
|
-
|
|
7
|
-
//#region ../powerlines/src/types/api.d.ts
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Powerlines API Interface
|
|
11
|
-
*/
|
|
12
|
-
interface API<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
13
|
-
/**
|
|
14
|
-
* The Powerlines shared API context
|
|
15
|
-
*/
|
|
16
|
-
context: APIContext<TResolvedConfig>;
|
|
17
|
-
/**
|
|
18
|
-
* Prepare the Powerlines API
|
|
19
|
-
*
|
|
20
|
-
* @remarks
|
|
21
|
-
* This method will prepare the Powerlines API for use, initializing any necessary resources.
|
|
22
|
-
*
|
|
23
|
-
* @param inlineConfig - The inline configuration for the prepare command
|
|
24
|
-
*/
|
|
25
|
-
prepare: (inlineConfig: PrepareInlineConfig | NewInlineConfig | CleanInlineConfig | BuildInlineConfig | LintInlineConfig | DocsInlineConfig | DeployInlineConfig) => Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* Create a new Powerlines project
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* This method will create a new Powerlines project in the current directory.
|
|
31
|
-
*
|
|
32
|
-
* @param inlineConfig - The inline configuration for the new command
|
|
33
|
-
* @returns A promise that resolves when the project has been created
|
|
34
|
-
*/
|
|
35
|
-
new: (inlineConfig: NewInlineConfig) => Promise<void>;
|
|
36
|
-
/**
|
|
37
|
-
* Clean any previously prepared artifacts
|
|
38
|
-
*
|
|
39
|
-
* @remarks
|
|
40
|
-
* This method will remove the previous Powerlines artifacts from the project.
|
|
41
|
-
*
|
|
42
|
-
* @param inlineConfig - The inline configuration for the clean command
|
|
43
|
-
* @returns A promise that resolves when the clean command has completed
|
|
44
|
-
*/
|
|
45
|
-
clean: (inlineConfig: CleanInlineConfig | PrepareInlineConfig) => Promise<void>;
|
|
46
|
-
/**
|
|
47
|
-
* Lint the project source code
|
|
48
|
-
*
|
|
49
|
-
* @param inlineConfig - The inline configuration for the lint command
|
|
50
|
-
* @returns A promise that resolves when the lint command has completed
|
|
51
|
-
*/
|
|
52
|
-
lint: (inlineConfig: LintInlineConfig) => Promise<void>;
|
|
53
|
-
/**
|
|
54
|
-
* Build the project
|
|
55
|
-
*
|
|
56
|
-
* @remarks
|
|
57
|
-
* This method will build the Powerlines project, generating the necessary artifacts.
|
|
58
|
-
*
|
|
59
|
-
* @param inlineConfig - The inline configuration for the build command
|
|
60
|
-
* @returns A promise that resolves when the build command has completed
|
|
61
|
-
*/
|
|
62
|
-
build: (inlineConfig: BuildInlineConfig) => Promise<void>;
|
|
63
|
-
/**
|
|
64
|
-
* Prepare the documentation for the project
|
|
65
|
-
*
|
|
66
|
-
* @param inlineConfig - The inline configuration for the docs command
|
|
67
|
-
* @returns A promise that resolves when the documentation generation has completed
|
|
68
|
-
*/
|
|
69
|
-
docs: (inlineConfig: DocsInlineConfig) => Promise<void>;
|
|
70
|
-
/**
|
|
71
|
-
* Deploy the project source code
|
|
72
|
-
*
|
|
73
|
-
* @remarks
|
|
74
|
-
* This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
|
|
75
|
-
*
|
|
76
|
-
* @param inlineConfig - The inline configuration for the deploy command
|
|
77
|
-
*/
|
|
78
|
-
deploy: (inlineConfig: DeployInlineConfig) => Promise<void>;
|
|
79
|
-
/**
|
|
80
|
-
* Finalization process
|
|
81
|
-
*
|
|
82
|
-
* @remarks
|
|
83
|
-
* This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
|
|
84
|
-
*
|
|
85
|
-
* @returns A promise that resolves when the finalization process has completed
|
|
86
|
-
*/
|
|
87
|
-
finalize: () => Promise<void>;
|
|
88
|
-
/**
|
|
89
|
-
* Invokes the configured plugin hooks
|
|
90
|
-
*
|
|
91
|
-
* @remarks
|
|
92
|
-
* By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
|
|
93
|
-
*
|
|
94
|
-
* @param hook - The hook to call
|
|
95
|
-
* @param options - The options to provide to the hook
|
|
96
|
-
* @param args - The arguments to pass to the hook
|
|
97
|
-
* @returns The result of the hook call
|
|
98
|
-
*/
|
|
99
|
-
callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
|
|
100
|
-
environment?: string | EnvironmentContext<TResolvedConfig>;
|
|
101
|
-
}, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
|
|
102
|
-
}
|
|
103
|
-
//#endregion
|
|
104
|
-
export { API };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Context } from "./context.cjs";
|
|
2
|
-
import { LogFn } from "./config.cjs";
|
|
3
|
-
import { PluginItem, PluginObj, PluginPass } from "@babel/core";
|
|
4
|
-
import { BabelAPI } from "@babel/helper-plugin-utils";
|
|
5
|
-
|
|
6
|
-
//#region ../powerlines/src/types/babel.d.ts
|
|
7
|
-
|
|
8
|
-
type BabelPluginPass<TState = unknown> = PluginPass & TState;
|
|
9
|
-
type BabelTransformPluginFilter = (code: string, id: string) => boolean;
|
|
10
|
-
type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
|
|
11
|
-
name: string;
|
|
12
|
-
log: LogFn;
|
|
13
|
-
api: BabelAPI;
|
|
14
|
-
options: TOptions;
|
|
15
|
-
context: TContext;
|
|
16
|
-
dirname: string;
|
|
17
|
-
}) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
|
|
18
|
-
$$name: string;
|
|
19
|
-
};
|
|
20
|
-
type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | BabelTransformPlugin<TContext, TOptions, TState> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter];
|
|
21
|
-
//#endregion
|
|
22
|
-
export { BabelTransformPluginOptions };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Context } from "./context.mjs";
|
|
2
|
-
import { LogFn } from "./config.mjs";
|
|
3
|
-
import { PluginItem, PluginObj, PluginPass } from "@babel/core";
|
|
4
|
-
import { BabelAPI } from "@babel/helper-plugin-utils";
|
|
5
|
-
|
|
6
|
-
//#region ../powerlines/src/types/babel.d.ts
|
|
7
|
-
|
|
8
|
-
type BabelPluginPass<TState = unknown> = PluginPass & TState;
|
|
9
|
-
type BabelTransformPluginFilter = (code: string, id: string) => boolean;
|
|
10
|
-
type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
|
|
11
|
-
name: string;
|
|
12
|
-
log: LogFn;
|
|
13
|
-
api: BabelAPI;
|
|
14
|
-
options: TOptions;
|
|
15
|
-
context: TContext;
|
|
16
|
-
dirname: string;
|
|
17
|
-
}) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
|
|
18
|
-
$$name: string;
|
|
19
|
-
};
|
|
20
|
-
type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | BabelTransformPlugin<TContext, TOptions, TState> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter];
|
|
21
|
-
//#endregion
|
|
22
|
-
export { BabelTransformPluginOptions };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region ../powerlines/src/types/build.ts
|
|
3
|
-
const UNPLUGIN_BUILDER_VARIANTS = [
|
|
4
|
-
"rollup",
|
|
5
|
-
"webpack",
|
|
6
|
-
"rspack",
|
|
7
|
-
"vite",
|
|
8
|
-
"esbuild",
|
|
9
|
-
"farm",
|
|
10
|
-
"unloader",
|
|
11
|
-
"rolldown",
|
|
12
|
-
"bun"
|
|
13
|
-
];
|
|
14
|
-
const BUILDER_VARIANTS = [
|
|
15
|
-
...UNPLUGIN_BUILDER_VARIANTS,
|
|
16
|
-
"tsup",
|
|
17
|
-
"tsdown",
|
|
18
|
-
"unbuild"
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
//#endregion
|