@storm-software/workspace-tools 1.175.4 → 1.175.6
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/CHANGELOG.md +14 -0
- package/index.js +25 -18
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/rollup/executor.d.ts +0 -3
- package/src/executors/rollup/executor.js +25 -18
package/package.json
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { type ExecutorContext, type PromiseExecutor } from "@nx/devkit";
|
|
2
2
|
import type { StormConfig } from "@storm-software/config";
|
|
3
|
-
import * as rollup from "rollup";
|
|
4
|
-
import { NormalizedRollupExecutorOptions } from "@nx/rollup/src/executors/rollup/lib/normalize";
|
|
5
3
|
import { RollupExecutorSchema } from "./schema";
|
|
6
4
|
export declare function rollupExecutorFn(options: RollupExecutorSchema, context: ExecutorContext, config?: StormConfig): AsyncGenerator<unknown, any, undefined>;
|
|
7
|
-
export declare function createRollupOptions(options: NormalizedRollupExecutorOptions, context: ExecutorContext): Promise<rollup.RollupOptions | rollup.RollupOptions[]>;
|
|
8
5
|
declare const _default: PromiseExecutor<RollupExecutorSchema>;
|
|
9
6
|
export default _default;
|
|
@@ -95182,7 +95182,6 @@ var init_src2 = __esm({
|
|
|
95182
95182
|
// packages/workspace-tools/src/executors/rollup/executor.ts
|
|
95183
95183
|
var executor_exports = {};
|
|
95184
95184
|
__export(executor_exports, {
|
|
95185
|
-
createRollupOptions: () => createRollupOptions,
|
|
95186
95185
|
default: () => executor_default,
|
|
95187
95186
|
rollupExecutorFn: () => rollupExecutorFn
|
|
95188
95187
|
});
|
|
@@ -101479,7 +101478,6 @@ var import_native4 = __toESM(require_native(), 1);
|
|
|
101479
101478
|
var import_async_iterable = require("@nx/devkit/src/utils/async-iterable");
|
|
101480
101479
|
var import_config_utils = require("@nx/devkit/src/utils/config-utils");
|
|
101481
101480
|
var import_buildable_libs_utils = require("@nx/js/src/utils/buildable-libs-utils");
|
|
101482
|
-
var import_normalize = require("@nx/rollup/src/executors/rollup/lib/normalize");
|
|
101483
101481
|
var import_generate_package_json = require("@nx/rollup/src/plugins/package-json/generate-package-json");
|
|
101484
101482
|
var import_with_nx = require("@nx/rollup/src/plugins/with-nx/with-nx");
|
|
101485
101483
|
|
|
@@ -101729,25 +101727,21 @@ async function* rollupExecutorFn(options, context, config) {
|
|
|
101729
101727
|
return formatted.startsWith("/") ? formatted.slice(1) : formatted;
|
|
101730
101728
|
});
|
|
101731
101729
|
}
|
|
101732
|
-
const executorOptions = {
|
|
101733
|
-
...options,
|
|
101734
|
-
main: options.entry
|
|
101735
|
-
};
|
|
101736
|
-
executorOptions.rollupConfig = options.rollupConfig ?? {};
|
|
101737
101730
|
writeDebug2(
|
|
101738
101731
|
`\u{1F4E6} Running Storm Rollup build process on the ${context?.projectName} project`,
|
|
101739
101732
|
config
|
|
101740
101733
|
);
|
|
101741
|
-
writeTrace2(
|
|
101742
|
-
|
|
101743
|
-
${formatLogMessage2(executorOptions)}`,
|
|
101744
|
-
config
|
|
101745
|
-
);
|
|
101734
|
+
writeTrace2(`Rollup schema options \u2699\uFE0F
|
|
101735
|
+
${formatLogMessage2(options)}`, config);
|
|
101746
101736
|
process.env.NODE_ENV ??= "production";
|
|
101747
|
-
const normalizedOptions =
|
|
101748
|
-
|
|
101749
|
-
|
|
101750
|
-
|
|
101737
|
+
const normalizedOptions = {
|
|
101738
|
+
...options,
|
|
101739
|
+
main: options.entry,
|
|
101740
|
+
rollupConfig: [],
|
|
101741
|
+
projectRoot: context.projectGraph?.nodes[context.projectName]?.data.root,
|
|
101742
|
+
skipTypeCheck: options.skipTypeCheck || false,
|
|
101743
|
+
logLevel: convertRollupLogLevel(config?.logLevel ?? "info")
|
|
101744
|
+
};
|
|
101751
101745
|
const rollupOptions = await createRollupOptions(normalizedOptions, context);
|
|
101752
101746
|
const outfile = resolveOutfile(context, normalizedOptions);
|
|
101753
101747
|
if (normalizedOptions.watch) {
|
|
@@ -101777,7 +101771,9 @@ ${formatLogMessage2(executorOptions)}`,
|
|
|
101777
101771
|
const start = process.hrtime.bigint();
|
|
101778
101772
|
const allRollupOptions = Array.isArray(rollupOptions) ? rollupOptions : [rollupOptions];
|
|
101779
101773
|
for (const opts of allRollupOptions) {
|
|
101780
|
-
const bundle = await rollup(
|
|
101774
|
+
const bundle = await rollup({
|
|
101775
|
+
...opts
|
|
101776
|
+
});
|
|
101781
101777
|
const output = Array.isArray(opts.output) ? opts.output : [opts.output];
|
|
101782
101778
|
for (const o of output) {
|
|
101783
101779
|
if (o) {
|
|
@@ -101841,6 +101837,18 @@ async function createRollupOptions(options, context) {
|
|
|
101841
101837
|
}
|
|
101842
101838
|
return finalConfig;
|
|
101843
101839
|
}
|
|
101840
|
+
function convertRollupLogLevel(logLevel) {
|
|
101841
|
+
switch (logLevel) {
|
|
101842
|
+
case "info":
|
|
101843
|
+
return "info";
|
|
101844
|
+
case "trace":
|
|
101845
|
+
case "all":
|
|
101846
|
+
case "debug":
|
|
101847
|
+
return "debug";
|
|
101848
|
+
default:
|
|
101849
|
+
return "warn";
|
|
101850
|
+
}
|
|
101851
|
+
}
|
|
101844
101852
|
function resolveOutfile(context, options) {
|
|
101845
101853
|
if (!options.format?.includes("cjs")) return void 0;
|
|
101846
101854
|
const { name } = (0, import_path3.parse)(options.outputFileName ?? options.main);
|
|
@@ -101876,7 +101884,6 @@ var executor_default = withRunExecutor(
|
|
|
101876
101884
|
);
|
|
101877
101885
|
// Annotate the CommonJS export names for ESM import in node:
|
|
101878
101886
|
0 && (module.exports = {
|
|
101879
|
-
createRollupOptions,
|
|
101880
101887
|
rollupExecutorFn
|
|
101881
101888
|
});
|
|
101882
101889
|
/*! Bundled license information:
|