@storm-software/workspace-tools 1.129.0 → 1.129.2
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 +5 -49
- package/meta.json +1 -1
- package/package.json +1 -1
- package/packages/build-tools/src/config/get-rolldown-config.d.ts +1 -1
- package/packages/build-tools/src/types.d.ts +3 -2
- package/packages/build-tools/src/utils/generate-package-json.d.ts +2 -0
- package/packages/workspace-tools/src/executors/rolldown/executor.d.ts +1 -1
- package/packages/workspace-tools/src/executors/unbuild/executor.d.ts +2 -2
- package/src/executors/rolldown/executor.js +1 -23
- package/src/executors/unbuild/executor.js +1 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RolldownBuildOptions, RolldownOptions } from "../types";
|
|
2
2
|
import { type DependentBuildableProjectNode } from "@nx/js/src/utils/buildable-libs-utils.js";
|
|
3
|
-
import type { PackageJson } from "nx/src/utils/package-json.js";
|
|
4
3
|
import type { StormConfig } from "@storm-software/config";
|
|
4
|
+
import type { PackageJson } from "nx/src/utils/package-json.js";
|
|
5
5
|
export declare const DEFAULT_CONFIG: RolldownBuildOptions;
|
|
6
6
|
export declare function getRolldownBuildOptions(config: StormConfig, options: RolldownOptions, dependencies: DependentBuildableProjectNode[], packageJson: PackageJson, npmDeps: string[]): Promise<RolldownBuildOptions[]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Options } from "tsup";
|
|
2
1
|
import type Rolldown from "rolldown";
|
|
3
|
-
import type { Program, Diagnostic, TransformerFactory, SourceFile, ParsedCommandLine } from "typescript";
|
|
4
2
|
import type { Plugin } from "rolldown";
|
|
3
|
+
import type { Options } from "tsup";
|
|
4
|
+
import type { Diagnostic, ParsedCommandLine, Program, SourceFile, TransformerFactory } from "typescript";
|
|
5
5
|
import type { BuildOptions as UnbuildOptions, RollupBuildOptions as UnbuildRollupBuildOptions } from "unbuild";
|
|
6
6
|
export interface TsupContext {
|
|
7
7
|
projectRoot: string;
|
|
@@ -199,6 +199,7 @@ export type UnbuildBuildOptions = AdditionalCLIOptions & Omit<UnbuildOptions, "n
|
|
|
199
199
|
includeSrc: boolean;
|
|
200
200
|
tsConfig: string;
|
|
201
201
|
outputPath: string;
|
|
202
|
+
generatePackageJson?: boolean;
|
|
202
203
|
entry?: string;
|
|
203
204
|
additionalEntryPoints?: string[];
|
|
204
205
|
external?: (string | RegExp)[];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ProjectConfiguration, ProjectGraph } from "@nx/devkit";
|
|
1
2
|
import type { StormConfig } from "@storm-software/config";
|
|
2
3
|
import type { TypeScriptBuildOptions } from "../../declarations";
|
|
3
4
|
export declare const generatePackageJson: (config: StormConfig, projectRoot: string, sourceRoot: string, projectName: string, options: TypeScriptBuildOptions) => Promise<Record<string, any>>;
|
|
5
|
+
export declare const formatPackageJson: (config: StormConfig, projectRoot: string, sourceRoot: string, projectName: string, options: Pick<TypeScriptBuildOptions, "tsConfig" | "external" | "generatePackageJson" | "bundle" | "includeSrc">, packageJson: Record<string, any>, projectGraph: ProjectGraph, projectsConfigurations: Record<string, ProjectConfiguration>) => Promise<Record<string, any>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExecutorContext } from "@nx/devkit";
|
|
2
|
-
import type { StormConfig } from "@storm-software/config";
|
|
3
2
|
import type { RolldownOptions } from "@storm-software/build-tools";
|
|
3
|
+
import type { StormConfig } from "@storm-software/config";
|
|
4
4
|
import type { RolldownExecutorSchema } from "./schema.d";
|
|
5
5
|
export declare function rolldownExecutorFn(options: RolldownExecutorSchema, context: ExecutorContext, config?: StormConfig): Promise<{
|
|
6
6
|
success: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ExecutorContext } from "@nx/devkit";
|
|
2
|
-
import type { StormConfig } from "@storm-software/config";
|
|
3
2
|
import type { UnbuildBuildOptions } from "@storm-software/build-tools";
|
|
3
|
+
import type { StormConfig } from "@storm-software/config";
|
|
4
4
|
import type { UnbuildExecutorSchema } from "./schema.d";
|
|
5
|
-
export declare function unbuildExecutorFn(options: UnbuildExecutorSchema, context: ExecutorContext, config
|
|
5
|
+
export declare function unbuildExecutorFn(options: UnbuildExecutorSchema, context: ExecutorContext, config: StormConfig): Promise<{
|
|
6
6
|
success: boolean;
|
|
7
7
|
}>;
|
|
8
8
|
declare const _default: import("@nx/devkit").PromiseExecutor<UnbuildBuildOptions>;
|
|
@@ -68360,17 +68360,9 @@ var _isFunction2 = (value2) => {
|
|
|
68360
68360
|
|
|
68361
68361
|
// packages/workspace-tools/src/executors/rolldown/executor.ts
|
|
68362
68362
|
async function rolldownExecutorFn(options, context, config) {
|
|
68363
|
-
const {
|
|
68363
|
+
const { writeInfo: writeInfo2, writeSuccess: writeSuccess2 } = await Promise.resolve().then(() => (init_src2(), src_exports));
|
|
68364
68364
|
const { rolldown } = await import("@storm-software/build-tools");
|
|
68365
68365
|
writeInfo2("\u{1F4E6} Running Storm build executor on the workspace", config);
|
|
68366
|
-
writeDebug2(
|
|
68367
|
-
`\u2699\uFE0F Executor options:
|
|
68368
|
-
${Object.keys(options).map(
|
|
68369
|
-
(key) => `${key}: ${!options[key] || _isPrimitive(options[key]) ? options[key] : _isFunction3(options[key]) ? "<function>" : JSON.stringify(options[key])}`
|
|
68370
|
-
).join("\n")}
|
|
68371
|
-
`,
|
|
68372
|
-
config
|
|
68373
|
-
);
|
|
68374
68366
|
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
68375
68367
|
throw new Error(
|
|
68376
68368
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -68400,20 +68392,6 @@ var executor_default = withRunExecutor(
|
|
|
68400
68392
|
}
|
|
68401
68393
|
}
|
|
68402
68394
|
);
|
|
68403
|
-
var _isPrimitive = (value2) => {
|
|
68404
|
-
try {
|
|
68405
|
-
return value2 === void 0 || value2 === null || typeof value2 !== "object" && typeof value2 !== "function";
|
|
68406
|
-
} catch (e2) {
|
|
68407
|
-
return false;
|
|
68408
|
-
}
|
|
68409
|
-
};
|
|
68410
|
-
var _isFunction3 = (value2) => {
|
|
68411
|
-
try {
|
|
68412
|
-
return value2 instanceof Function || typeof value2 === "function" || !!(value2?.constructor && value2?.call && value2?.apply);
|
|
68413
|
-
} catch (e2) {
|
|
68414
|
-
return false;
|
|
68415
|
-
}
|
|
68416
|
-
};
|
|
68417
68395
|
// Annotate the CommonJS export names for ESM import in node:
|
|
68418
68396
|
0 && (module.exports = {
|
|
68419
68397
|
rolldownExecutorFn
|
|
@@ -68360,17 +68360,9 @@ var _isFunction2 = (value2) => {
|
|
|
68360
68360
|
|
|
68361
68361
|
// packages/workspace-tools/src/executors/unbuild/executor.ts
|
|
68362
68362
|
async function unbuildExecutorFn(options, context, config) {
|
|
68363
|
-
const {
|
|
68363
|
+
const { writeInfo: writeInfo2, writeSuccess: writeSuccess2 } = await Promise.resolve().then(() => (init_src2(), src_exports));
|
|
68364
68364
|
const { unbuild } = await import("@storm-software/build-tools");
|
|
68365
68365
|
writeInfo2("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
68366
|
-
writeDebug2(
|
|
68367
|
-
`\u2699\uFE0F Executor options:
|
|
68368
|
-
${Object.keys(options).map(
|
|
68369
|
-
(key) => `${key}: ${!options[key] || _isPrimitive(options[key]) ? options[key] : _isFunction3(options[key]) ? "<function>" : JSON.stringify(options[key])}`
|
|
68370
|
-
).join("\n")}
|
|
68371
|
-
`,
|
|
68372
|
-
config
|
|
68373
|
-
);
|
|
68374
68366
|
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
68375
68367
|
throw new Error(
|
|
68376
68368
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -68400,20 +68392,6 @@ var executor_default = withRunExecutor(
|
|
|
68400
68392
|
}
|
|
68401
68393
|
}
|
|
68402
68394
|
);
|
|
68403
|
-
var _isPrimitive = (value2) => {
|
|
68404
|
-
try {
|
|
68405
|
-
return value2 === void 0 || value2 === null || typeof value2 !== "object" && typeof value2 !== "function";
|
|
68406
|
-
} catch (e2) {
|
|
68407
|
-
return false;
|
|
68408
|
-
}
|
|
68409
|
-
};
|
|
68410
|
-
var _isFunction3 = (value2) => {
|
|
68411
|
-
try {
|
|
68412
|
-
return value2 instanceof Function || typeof value2 === "function" || !!(value2?.constructor && value2?.call && value2?.apply);
|
|
68413
|
-
} catch (e2) {
|
|
68414
|
-
return false;
|
|
68415
|
-
}
|
|
68416
|
-
};
|
|
68417
68395
|
// Annotate the CommonJS export names for ESM import in node:
|
|
68418
68396
|
0 && (module.exports = {
|
|
68419
68397
|
unbuildExecutorFn
|