@storm-software/workspace-tools 1.156.0 → 1.158.0
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 +178 -128
- package/README.md +2 -1
- package/config/nx.json +4 -4
- package/declarations.d.ts +4 -13
- package/index.js +2394 -2290
- package/meta.json +1 -1
- package/package.json +7 -7
- package/src/base/index.js +3558 -3512
- package/src/executors/clean-package/executor.js +68061 -68048
- package/src/executors/npm-publish/executor.js +1 -1
- package/src/executors/rolldown/executor.js +5482 -5465
- package/src/executors/size-limit/executor.js +5482 -5465
- package/src/executors/tsup/executor.js +5482 -5465
- package/src/executors/tsup-browser/executor.js +5482 -5465
- package/src/executors/tsup-browser/schema.d.ts +4 -1
- package/src/executors/tsup-neutral/executor.js +5482 -5465
- package/src/executors/tsup-neutral/schema.d.ts +4 -1
- package/src/executors/tsup-node/executor.js +5482 -5465
- package/src/executors/tsup-node/schema.d.ts +4 -1
- package/src/executors/typia/executor.js +5482 -5465
- package/src/executors/unbuild/executor.js +5482 -5465
- package/src/generators/browser-library/generator.js +3550 -3507
- package/src/generators/config-schema/generator.js +302 -287
- package/src/generators/init/init.js +3 -3
- package/src/generators/neutral-library/generator.js +3550 -3507
- package/src/generators/node-library/generator.js +3550 -3507
- package/src/generators/preset/generator.js +5484 -5469
- package/{packages/workspace-tools/src → src}/generators/release-version/generator.d.ts +3 -8
- package/src/generators/release-version/generator.js +6050 -6076
- package/src/generators/release-version/schema.d.ts +2 -1
- package/src/generators/release-version/schema.json +4 -15
- package/src/plugins/rust/index.js +4 -5
- package/src/plugins/typescript/index.js +7 -1
- package/src/utils/index.js +4522 -4499
- package/{packages/workspace-tools/src → src}/utils/lock-file.d.ts +1 -1
- package/src/utils/lock-file.js +9 -5
- package/{packages/workspace-tools/src → src}/utils/toml.d.ts +1 -36
- package/packages/build-tools/src/build/index.d.ts +0 -3
- package/packages/build-tools/src/build/rolldown.d.ts +0 -20
- package/packages/build-tools/src/build/ts-build.d.ts +0 -20
- package/packages/build-tools/src/build/unbuild.d.ts +0 -20
- package/packages/build-tools/src/cli/index.d.ts +0 -2
- package/packages/build-tools/src/config/browser-config.d.ts +0 -2
- package/packages/build-tools/src/config/default-config.d.ts +0 -2
- package/packages/build-tools/src/config/get-config.d.ts +0 -2
- package/packages/build-tools/src/config/get-rolldown-config.d.ts +0 -6
- package/packages/build-tools/src/config/get-unbuild-config.d.ts +0 -6
- package/packages/build-tools/src/config/index.d.ts +0 -7
- package/packages/build-tools/src/config/neutral-config.d.ts +0 -2
- package/packages/build-tools/src/config/node-config.d.ts +0 -3
- package/packages/build-tools/src/index.d.ts +0 -6
- package/packages/build-tools/src/plugins/analyze-plugin.d.ts +0 -4
- package/packages/build-tools/src/plugins/index.d.ts +0 -4
- package/packages/build-tools/src/plugins/swc-plugin.d.ts +0 -2
- package/packages/build-tools/src/plugins/ts-resolve.d.ts +0 -6
- package/packages/build-tools/src/plugins/type-definitions.d.ts +0 -7
- package/packages/build-tools/src/types.d.ts +0 -213
- package/packages/build-tools/src/utils/apply-default-options.d.ts +0 -6
- package/packages/build-tools/src/utils/generate-package-json.d.ts +0 -7
- package/packages/build-tools/src/utils/get-entry-points.d.ts +0 -3
- package/packages/build-tools/src/utils/get-file-banner.d.ts +0 -8
- package/packages/build-tools/src/utils/get-project-deps.d.ts +0 -5
- package/packages/build-tools/src/utils/index.d.ts +0 -7
- package/packages/build-tools/src/utils/out-extension.d.ts +0 -8
- package/packages/build-tools/src/utils/run-tsup-build.d.ts +0 -3
- package/packages/build-tools/src/utils/task-graph.d.ts +0 -6
- package/packages/config/src/constants.d.ts +0 -3
- package/packages/config/src/define-config.d.ts +0 -174
- package/packages/config/src/index.d.ts +0 -12
- package/packages/config/src/schema.d.ts +0 -1915
- package/packages/config/src/types.d.ts +0 -23
- package/packages/config-tools/src/config-file/get-config-file.d.ts +0 -16
- package/packages/config-tools/src/config-file/index.d.ts +0 -1
- package/packages/config-tools/src/create-storm-config.d.ts +0 -26
- package/packages/config-tools/src/env/get-env.d.ts +0 -15
- package/packages/config-tools/src/env/index.d.ts +0 -2
- package/packages/config-tools/src/env/set-env.d.ts +0 -14
- package/packages/config-tools/src/index.d.ts +0 -13
- package/packages/config-tools/src/types.d.ts +0 -33
- package/packages/config-tools/src/utilities/apply-workspace-tokens.d.ts +0 -4
- package/packages/config-tools/src/utilities/chalk.d.ts +0 -23
- package/packages/config-tools/src/utilities/correct-paths.d.ts +0 -1
- package/packages/config-tools/src/utilities/file-path-utils.d.ts +0 -2
- package/packages/config-tools/src/utilities/find-up.d.ts +0 -4
- package/packages/config-tools/src/utilities/find-workspace-root.d.ts +0 -14
- package/packages/config-tools/src/utilities/get-default-config.d.ts +0 -15
- package/packages/config-tools/src/utilities/get-log-level.d.ts +0 -15
- package/packages/config-tools/src/utilities/index.d.ts +0 -10
- package/packages/config-tools/src/utilities/logger.d.ts +0 -74
- package/packages/config-tools/src/utilities/process-handler.d.ts +0 -4
- package/packages/config-tools/src/utilities/run.d.ts +0 -18
- package/{packages/workspace-tools/index.d.ts → index.d.ts} +0 -0
- package/{packages/workspace-tools/src → src}/base/base-executor.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/base/base-generator.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/base/index.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/base/typescript-library-generator.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/executors/cargo-publish/executor.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/executors/clean-package/constants.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/executors/clean-package/executor.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/executors/clean-package/types.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/executors/clean-package/utils.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/executors/npm-publish/executor.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/executors/rolldown/executor.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/executors/size-limit/executor.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/executors/tsup/executor.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/executors/tsup-browser/executor.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/executors/tsup-neutral/executor.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/executors/tsup-node/executor.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/executors/typia/executor.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/executors/unbuild/executor.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/generators/browser-library/generator.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/generators/config-schema/generator.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/generators/init/init.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/generators/neutral-library/generator.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/generators/node-library/generator.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/generators/preset/generator.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/plugins/rust/cargo-toml.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/plugins/rust/index.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/plugins/typescript/index.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/plugins/typescript/project-config.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/utils/apply-workspace-tokens.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/utils/cargo.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/utils/create-cli-options.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/utils/get-project-configurations.d.ts +0 -0
- package/{packages/workspace-tools/src → src}/utils/index.d.ts +5 -5
- /package/{packages/workspace-tools/src → src}/utils/project-tags.d.ts +0 -0
- /package/{packages/workspace-tools/src → src}/utils/run-tsup-build.d.ts +0 -0
- /package/{packages/workspace-tools/src → src}/utils/typia-transform.d.ts +0 -0
- /package/{packages/workspace-tools/src → src}/utils/versions.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type CreateDependenciesContext, type CreateNodesContext, type PackageManager, type ProjectGraphExternalNode, type RawProjectGraphDependency } from "nx/src/devkit-exports";
|
|
2
2
|
export declare const YARN_LOCK_FILE = "yarn.lock";
|
|
3
3
|
export declare const NPM_LOCK_FILE = "package-lock.json";
|
|
4
4
|
export declare const PNPM_LOCK_FILE = "pnpm-lock.yaml";
|
package/src/utils/lock-file.js
CHANGED
|
@@ -33,11 +33,11 @@ __export(lock_file_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(lock_file_exports);
|
|
35
35
|
var import_node_fs = require("node:fs");
|
|
36
|
-
var import_devkit_exports = require("nx/src/devkit-exports");
|
|
37
36
|
var import_node_path = require("node:path");
|
|
38
|
-
var
|
|
39
|
-
var import_pnpm_parser = require("nx/src/plugins/js/lock-file/pnpm-parser");
|
|
37
|
+
var import_devkit_exports = require("nx/src/devkit-exports");
|
|
40
38
|
var import_npm_parser = require("nx/src/plugins/js/lock-file/npm-parser");
|
|
39
|
+
var import_pnpm_parser = require("nx/src/plugins/js/lock-file/pnpm-parser");
|
|
40
|
+
var import_yarn_parser = require("nx/src/plugins/js/lock-file/yarn-parser");
|
|
41
41
|
var YARN_LOCK_FILE = "yarn.lock";
|
|
42
42
|
var NPM_LOCK_FILE = "package-lock.json";
|
|
43
43
|
var PNPM_LOCK_FILE = "pnpm-lock.yaml";
|
|
@@ -48,7 +48,9 @@ var PNPM_LOCK_PATH = (0, import_node_path.join)(import_devkit_exports.workspaceR
|
|
|
48
48
|
function getLockFileNodes(packageManager, contents, lockFileHash, context) {
|
|
49
49
|
try {
|
|
50
50
|
if (packageManager === "yarn") {
|
|
51
|
-
const packageJson = (0, import_devkit_exports.readJsonFile)(
|
|
51
|
+
const packageJson = (0, import_devkit_exports.readJsonFile)(
|
|
52
|
+
(0, import_node_path.join)(context.workspaceRoot, "package.json")
|
|
53
|
+
);
|
|
52
54
|
return (0, import_yarn_parser.getYarnLockfileNodes)(contents, lockFileHash, packageJson);
|
|
53
55
|
}
|
|
54
56
|
if (packageManager === "pnpm") {
|
|
@@ -100,7 +102,9 @@ function lockFileExists(packageManager) {
|
|
|
100
102
|
if (packageManager === "npm") {
|
|
101
103
|
return (0, import_node_fs.existsSync)(NPM_LOCK_PATH);
|
|
102
104
|
}
|
|
103
|
-
throw new Error(
|
|
105
|
+
throw new Error(
|
|
106
|
+
`Unknown package manager ${packageManager} or lock file missing`
|
|
107
|
+
);
|
|
104
108
|
}
|
|
105
109
|
function getLockFileName(packageManager) {
|
|
106
110
|
if (packageManager === "yarn") {
|
|
@@ -46,7 +46,7 @@ export interface Package {
|
|
|
46
46
|
* false can be used by the end user but it will be converted to an empty
|
|
47
47
|
* array in the cargo metadata output.
|
|
48
48
|
*/
|
|
49
|
-
publish
|
|
49
|
+
publish?: string[] | boolean | null;
|
|
50
50
|
authors: string[];
|
|
51
51
|
categories: string[];
|
|
52
52
|
default_run: any;
|
|
@@ -125,41 +125,6 @@ export interface Docs2 {
|
|
|
125
125
|
export interface Rs2 {
|
|
126
126
|
"all-features": boolean;
|
|
127
127
|
}
|
|
128
|
-
export interface Package {
|
|
129
|
-
name: string;
|
|
130
|
-
version: string;
|
|
131
|
-
id: string;
|
|
132
|
-
license: string;
|
|
133
|
-
license_file: string;
|
|
134
|
-
description: string;
|
|
135
|
-
source: any;
|
|
136
|
-
dependencies: Dependency[];
|
|
137
|
-
targets: Target[];
|
|
138
|
-
features: Features;
|
|
139
|
-
manifest_path: string;
|
|
140
|
-
metadata: Metadata;
|
|
141
|
-
/**
|
|
142
|
-
* From the docs:
|
|
143
|
-
* "List of registries to which this package may be published.
|
|
144
|
-
* Publishing is unrestricted if null, and forbidden if an empty array."
|
|
145
|
-
*
|
|
146
|
-
* Additional observation:
|
|
147
|
-
* false can be used by the end user but it will be converted to an empty
|
|
148
|
-
* array in the cargo metadata output.
|
|
149
|
-
*/
|
|
150
|
-
publish: string[] | null;
|
|
151
|
-
authors: string[];
|
|
152
|
-
categories: string[];
|
|
153
|
-
default_run: any;
|
|
154
|
-
rust_version: string;
|
|
155
|
-
keywords: string[];
|
|
156
|
-
readme: string;
|
|
157
|
-
repository: string;
|
|
158
|
-
homepage: string;
|
|
159
|
-
documentation: string;
|
|
160
|
-
edition: string;
|
|
161
|
-
links: any;
|
|
162
|
-
}
|
|
163
128
|
export declare function parseCargoTomlWithTree(tree: Tree, projectRoot: string, projectName: string): CargoToml;
|
|
164
129
|
export declare function parseCargoToml(cargoString?: string): CargoToml;
|
|
165
130
|
export declare function stringifyCargoToml(cargoToml: CargoToml): string;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { StormConfig } from "@storm-software/config";
|
|
2
|
-
import type { RolldownOptions } from "../types";
|
|
3
|
-
/**
|
|
4
|
-
* Build and bundle a TypeScript project using the tsup build tools.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* This function is a wrapper around the `buildWithOptions` function that provides a default set of options.
|
|
8
|
-
*
|
|
9
|
-
* @param config - The storm configuration.
|
|
10
|
-
* @param options - A build options partial. The minimum required options are `projectRoot` or `projectName`.
|
|
11
|
-
*/
|
|
12
|
-
export declare function rolldown(config: StormConfig, options?: Partial<RolldownOptions>): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Build and bundle a TypeScript project using the tsup build tools.
|
|
15
|
-
*
|
|
16
|
-
* @param config - The storm configuration.
|
|
17
|
-
* @param options - The build options.
|
|
18
|
-
*/
|
|
19
|
-
export declare function rolldownWithOptions(config: StormConfig, options: RolldownOptions): Promise<void>;
|
|
20
|
-
export default rolldown;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { StormConfig } from "@storm-software/config";
|
|
2
|
-
import type { TypeScriptBuildOptions } from "../../declarations";
|
|
3
|
-
/**
|
|
4
|
-
* Build and bundle a TypeScript project using the tsup build tools.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* This function is a wrapper around the `buildWithOptions` function that provides a default set of options.
|
|
8
|
-
*
|
|
9
|
-
* @param config - The storm configuration.
|
|
10
|
-
* @param options - A build options partial. The minimum required options are `projectRoot` or `projectName`.
|
|
11
|
-
*/
|
|
12
|
-
export declare function build(config: StormConfig, options?: Partial<TypeScriptBuildOptions>): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Build and bundle a TypeScript project using the tsup build tools.
|
|
15
|
-
*
|
|
16
|
-
* @param config - The storm configuration.
|
|
17
|
-
* @param options - The build options.
|
|
18
|
-
*/
|
|
19
|
-
export declare function buildWithOptions(config: StormConfig, options: TypeScriptBuildOptions): Promise<void>;
|
|
20
|
-
export default build;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { StormConfig } from "@storm-software/config";
|
|
2
|
-
import type { UnbuildBuildOptions } from "../types";
|
|
3
|
-
/**
|
|
4
|
-
* Build and bundle a TypeScript project using the tsup build tools.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* This function is a wrapper around the `buildWithOptions` function that provides a default set of options.
|
|
8
|
-
*
|
|
9
|
-
* @param config - The storm configuration.
|
|
10
|
-
* @param options - A build options partial. The minimum required options are `projectRoot` or `projectName`.
|
|
11
|
-
*/
|
|
12
|
-
export declare function unbuild(config: StormConfig, options?: Partial<UnbuildBuildOptions>): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Build and bundle a TypeScript project using the tsup build tools.
|
|
15
|
-
*
|
|
16
|
-
* @param config - The storm configuration.
|
|
17
|
-
* @param options - The build options.
|
|
18
|
-
*/
|
|
19
|
-
export declare function unbuildWithOptions(config: StormConfig, options: UnbuildBuildOptions): Promise<void>;
|
|
20
|
-
export default unbuild;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { BuildOptions, GetConfigParams } from "../../declarations";
|
|
2
|
-
export declare const browserConfig: ({ entry, outDir, projectRoot, workspaceRoot, tsconfig, splitting, treeshake, debug, shims, external, banner, platform, verbose, metafile, skipNativeModulesPlugin, define, env, plugins, generatePackageJson, dtsTsConfig, minify, getTransform }: GetConfigParams) => BuildOptions;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { BuildOptions, GetConfigParams } from "../../declarations";
|
|
2
|
-
export declare function defaultConfig({ entry, outDir, projectRoot, workspaceRoot, tsconfig, splitting, treeshake, format, debug, shims, external, banner, platform, verbose, apiReport, docModel, tsdocMetadata, metafile, skipNativeModulesPlugin, define, env, plugins, generatePackageJson, dtsTsConfig, minify, getTransform }: GetConfigParams): BuildOptions;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { BuildOptions, GetConfigParams, TsupGetConfigOptions } from "../types";
|
|
2
|
-
export declare const getConfig: (workspaceRoot: string, projectRoot: string, getConfigFn: (options: GetConfigParams) => BuildOptions, { outputPath, tsConfig, platform, ...rest }: TsupGetConfigOptions) => import("tsup").Options;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type DependentBuildableProjectNode } from "@nx/js/src/utils/buildable-libs-utils.js";
|
|
2
|
-
import type { StormConfig } from "@storm-software/config";
|
|
3
|
-
import type { PackageJson } from "nx/src/utils/package-json.js";
|
|
4
|
-
import type { RolldownBuildOptions, RolldownOptions } from "../types";
|
|
5
|
-
export declare const DEFAULT_CONFIG: RolldownBuildOptions;
|
|
6
|
-
export declare function getRolldownBuildOptions(config: StormConfig, options: RolldownOptions, dependencies: DependentBuildableProjectNode[], packageJson: PackageJson, npmDeps: string[]): Promise<RolldownBuildOptions[]>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ProjectGraph } from "@nx/devkit";
|
|
2
|
-
import type { StormConfig } from "@storm-software/config";
|
|
3
|
-
import type { PackageJson } from "nx/src/utils/package-json.js";
|
|
4
|
-
import { type BuildConfig } from "unbuild";
|
|
5
|
-
import type { UnbuildBuildOptions } from "../types";
|
|
6
|
-
export declare function getUnbuildBuildOptions(config: StormConfig, options: UnbuildBuildOptions, packageJson: PackageJson, projectGraph: ProjectGraph): Promise<BuildConfig[]>;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { BuildOptions, GetConfigParams } from "../../declarations";
|
|
2
|
-
export declare const neutralConfig: ({ entry, outDir, projectRoot, workspaceRoot, tsconfig, splitting, treeshake, debug, shims, external, banner, platform, verbose, metafile, skipNativeModulesPlugin, define, env, apiReport, docModel, tsdocMetadata, plugins, generatePackageJson, dtsTsConfig, minify, getTransform }: GetConfigParams) => BuildOptions;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { BuildOptions, GetConfigParams } from "../../declarations";
|
|
2
|
-
export declare function nodeConfig({ entry, outDir, projectRoot, workspaceRoot, tsconfig, splitting, treeshake, debug, shims, external, banner, platform, verbose, apiReport, docModel, tsdocMetadata, metafile, skipNativeModulesPlugin, define, env, plugins, generatePackageJson, dtsTsConfig, minify, getTransform }: GetConfigParams): BuildOptions;
|
|
3
|
-
export declare function workerConfig({ entry, outDir, projectRoot, workspaceRoot, tsconfig, splitting, treeshake, debug, external, banner, verbose, apiReport, docModel, tsdocMetadata, shims, metafile, skipNativeModulesPlugin, define, env, plugins, generatePackageJson, dtsTsConfig, getTransform }: GetConfigParams): BuildOptions;
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import type Rolldown from "rolldown";
|
|
2
|
-
import type { Plugin } from "rolldown";
|
|
3
|
-
import type { Options } from "tsup";
|
|
4
|
-
import type { Diagnostic, ParsedCommandLine, Program, SourceFile, TransformerFactory } from "typescript";
|
|
5
|
-
import type { BuildOptions as UnbuildOptions, RollupBuildOptions as UnbuildRollupBuildOptions } from "unbuild";
|
|
6
|
-
export interface TsupContext {
|
|
7
|
-
projectRoot: string;
|
|
8
|
-
sourceRoot: string;
|
|
9
|
-
projectName: string;
|
|
10
|
-
main: string;
|
|
11
|
-
}
|
|
12
|
-
export type BuildOptions = Options;
|
|
13
|
-
export type Entry = string | string[] | Record<string, string>;
|
|
14
|
-
export type GetConfigParams = Omit<TsupGetConfigOptions, "entry" | "assets" | "clean" | "outputPath" | "tsConfig" | "main"> & {
|
|
15
|
-
entry: Entry;
|
|
16
|
-
outDir: string;
|
|
17
|
-
projectRoot: string;
|
|
18
|
-
workspaceRoot: string;
|
|
19
|
-
tsconfig: string;
|
|
20
|
-
shims?: boolean;
|
|
21
|
-
apiReport?: boolean;
|
|
22
|
-
docModel?: boolean;
|
|
23
|
-
tsdocMetadata?: boolean;
|
|
24
|
-
dtsTsConfig: ParsedCommandLine;
|
|
25
|
-
getTransform?: (program: Program, diagnostics: Diagnostic[]) => TransformerFactory<SourceFile>;
|
|
26
|
-
};
|
|
27
|
-
export type TsupGetConfigOptions = Omit<TypeScriptBuildOptions, "banner" | "entry"> & {
|
|
28
|
-
banner?: {
|
|
29
|
-
js?: string;
|
|
30
|
-
css?: string;
|
|
31
|
-
};
|
|
32
|
-
dtsTsConfig: ParsedCommandLine;
|
|
33
|
-
entry: Entry;
|
|
34
|
-
};
|
|
35
|
-
export type Platform = "browser" | "node" | "neutral";
|
|
36
|
-
export type FileInputOutput = {
|
|
37
|
-
input: string;
|
|
38
|
-
output: string;
|
|
39
|
-
};
|
|
40
|
-
export type AssetGlob = FileInputOutput & {
|
|
41
|
-
glob: string;
|
|
42
|
-
ignore?: string[];
|
|
43
|
-
dot?: boolean;
|
|
44
|
-
};
|
|
45
|
-
export interface AdditionalCLIOptions {
|
|
46
|
-
projectRoot: string;
|
|
47
|
-
sourceRoot: string;
|
|
48
|
-
projectName: string;
|
|
49
|
-
}
|
|
50
|
-
export interface TypeScriptBuildOptions extends AdditionalCLIOptions {
|
|
51
|
-
additionalEntryPoints?: string[];
|
|
52
|
-
assets: (AssetGlob | string)[];
|
|
53
|
-
bundle?: boolean;
|
|
54
|
-
deleteOutputPath?: boolean;
|
|
55
|
-
esbuildOptions?: Record<string, any>;
|
|
56
|
-
esbuildConfig?: string;
|
|
57
|
-
external?: string[];
|
|
58
|
-
outputFileName?: string;
|
|
59
|
-
outputHashing?: "none" | "all";
|
|
60
|
-
outputPath: string;
|
|
61
|
-
platform?: "node" | "browser" | "neutral" | "worker";
|
|
62
|
-
sourcemap?: boolean | "linked" | "inline" | "external" | "both";
|
|
63
|
-
target?: string;
|
|
64
|
-
tsConfig: string;
|
|
65
|
-
watch?: boolean;
|
|
66
|
-
entry: string;
|
|
67
|
-
options?: Options;
|
|
68
|
-
clean?: boolean;
|
|
69
|
-
debug?: boolean;
|
|
70
|
-
banner?: string;
|
|
71
|
-
verbose?: boolean;
|
|
72
|
-
define?: Record<string, string | undefined | null>;
|
|
73
|
-
env?: Record<string, string | undefined | null>;
|
|
74
|
-
apiReport?: boolean;
|
|
75
|
-
docModel?: boolean;
|
|
76
|
-
tsdocMetadata?: boolean;
|
|
77
|
-
includeSrc?: boolean;
|
|
78
|
-
plugins?: any[];
|
|
79
|
-
shims?: boolean;
|
|
80
|
-
splitting?: boolean;
|
|
81
|
-
treeshake?: boolean;
|
|
82
|
-
generatePackageJson?: boolean;
|
|
83
|
-
emitOnAll?: boolean;
|
|
84
|
-
getConfig: (params: GetConfigParams) => Options;
|
|
85
|
-
format?: string[];
|
|
86
|
-
metafile?: boolean;
|
|
87
|
-
minify?: boolean;
|
|
88
|
-
skipNativeModulesPlugin?: boolean;
|
|
89
|
-
useJsxModule?: boolean;
|
|
90
|
-
}
|
|
91
|
-
export type RolldownFormat = "cjs" | "es";
|
|
92
|
-
export declare const RolldownFormat: {
|
|
93
|
-
COMMONJS: RolldownFormat;
|
|
94
|
-
ES_MODULE: RolldownFormat;
|
|
95
|
-
};
|
|
96
|
-
export type IsExternal = (source: string, importer: string | undefined, isResolved: boolean) => boolean;
|
|
97
|
-
export type RolldownResolveOptions = Omit<BindingResolveOptions, "alias"> & {
|
|
98
|
-
alias?: Record<string, string>;
|
|
99
|
-
};
|
|
100
|
-
export interface BindingResolveOptions {
|
|
101
|
-
alias?: Record<string, string[]>;
|
|
102
|
-
aliasFields?: string[][];
|
|
103
|
-
conditionNames?: string[];
|
|
104
|
-
exportsFields?: string[][];
|
|
105
|
-
extensions?: string[];
|
|
106
|
-
mainFields?: string[];
|
|
107
|
-
mainFiles?: string[];
|
|
108
|
-
modules?: string[];
|
|
109
|
-
symlinks?: boolean;
|
|
110
|
-
tsconfigFilename?: string;
|
|
111
|
-
}
|
|
112
|
-
export interface RenderedModule {
|
|
113
|
-
readonly code: string | null;
|
|
114
|
-
originalLength: number;
|
|
115
|
-
removedExports: string[];
|
|
116
|
-
renderedExports: string[];
|
|
117
|
-
renderedLength: number;
|
|
118
|
-
}
|
|
119
|
-
export interface PreRenderedChunk {
|
|
120
|
-
exports: string[];
|
|
121
|
-
facadeModuleId: string | null;
|
|
122
|
-
isDynamicEntry: boolean;
|
|
123
|
-
isEntry: boolean;
|
|
124
|
-
isImplicitEntry: boolean;
|
|
125
|
-
moduleIds: string[];
|
|
126
|
-
name: string;
|
|
127
|
-
type: "chunk";
|
|
128
|
-
}
|
|
129
|
-
export interface RenderedChunk extends PreRenderedChunk {
|
|
130
|
-
dynamicImports: string[];
|
|
131
|
-
fileName: string;
|
|
132
|
-
implicitlyLoadedBefore: string[];
|
|
133
|
-
importedBindings: {
|
|
134
|
-
[imported: string]: string[];
|
|
135
|
-
};
|
|
136
|
-
imports: string[];
|
|
137
|
-
modules: {
|
|
138
|
-
[id: string]: RenderedModule;
|
|
139
|
-
};
|
|
140
|
-
referencedFiles: string[];
|
|
141
|
-
}
|
|
142
|
-
type InputOption = string | string[] | {
|
|
143
|
-
[entryAlias: string]: string;
|
|
144
|
-
};
|
|
145
|
-
export interface InputOptions {
|
|
146
|
-
input?: InputOption;
|
|
147
|
-
plugins?: Plugin[];
|
|
148
|
-
external?: IsExternal;
|
|
149
|
-
resolve?: RolldownResolveOptions;
|
|
150
|
-
cwd: string;
|
|
151
|
-
platform: Platform;
|
|
152
|
-
treeshake: boolean;
|
|
153
|
-
}
|
|
154
|
-
export interface OutputOptions extends Rolldown.OutputOptions {
|
|
155
|
-
dir?: string;
|
|
156
|
-
format?: "es";
|
|
157
|
-
exports?: "default" | "named" | "none" | "auto";
|
|
158
|
-
sourcemap?: boolean | "inline" | "hidden";
|
|
159
|
-
banner?: string | ((chunk: RenderedChunk) => string | Promise<string>);
|
|
160
|
-
footer?: string | ((chunk: RenderedChunk) => string | Promise<string>);
|
|
161
|
-
}
|
|
162
|
-
export interface RolldownBuildOptions extends InputOptions {
|
|
163
|
-
output?: OutputOptions;
|
|
164
|
-
}
|
|
165
|
-
export type RolldownUserDefinedConfig = string | RolldownBuildOptions | ((config: RolldownBuildOptions) => RolldownBuildOptions | Promise<RolldownBuildOptions>);
|
|
166
|
-
export type RolldownOptions = AdditionalCLIOptions & {
|
|
167
|
-
clean: boolean;
|
|
168
|
-
watch: boolean;
|
|
169
|
-
entry: string;
|
|
170
|
-
additionalEntryPoints?: string[];
|
|
171
|
-
assets: (AssetGlob | string)[];
|
|
172
|
-
generatePackageJson: boolean;
|
|
173
|
-
includeSrc: boolean;
|
|
174
|
-
banner?: OutputOptions["banner"];
|
|
175
|
-
footer?: OutputOptions["footer"];
|
|
176
|
-
outputPath: string;
|
|
177
|
-
skipTypeCheck: boolean;
|
|
178
|
-
verbose: boolean;
|
|
179
|
-
tsConfig: string;
|
|
180
|
-
minify: boolean;
|
|
181
|
-
treeshake: boolean;
|
|
182
|
-
extractCss: boolean;
|
|
183
|
-
sourcemap?: OutputOptions["sourcemap"];
|
|
184
|
-
exports?: OutputOptions["exports"];
|
|
185
|
-
platform: InputOptions["platform"];
|
|
186
|
-
resolve: InputOptions["resolve"];
|
|
187
|
-
external: InputOptions["external"];
|
|
188
|
-
plugins: Plugin[];
|
|
189
|
-
rolldownConfig?: RolldownUserDefinedConfig | RolldownUserDefinedConfig[];
|
|
190
|
-
};
|
|
191
|
-
export type DeepPartial<T> = T extends object ? {
|
|
192
|
-
[P in keyof T]?: DeepPartial<T[P]>;
|
|
193
|
-
} : T;
|
|
194
|
-
export type UnbuildBuildOptions = AdditionalCLIOptions & Omit<UnbuildOptions, "name" | "rootDir" | "entries" | "externals" | "outDir"> & {
|
|
195
|
-
clean: boolean;
|
|
196
|
-
watch: boolean;
|
|
197
|
-
verbose: boolean;
|
|
198
|
-
minify: boolean;
|
|
199
|
-
tsLibs: string[];
|
|
200
|
-
includeSrc: boolean;
|
|
201
|
-
generatePackageJson: boolean;
|
|
202
|
-
tsConfig: string;
|
|
203
|
-
outputPath: string;
|
|
204
|
-
entry?: string;
|
|
205
|
-
additionalEntryPoints?: string[];
|
|
206
|
-
external?: (string | RegExp)[];
|
|
207
|
-
assets: (AssetGlob | string)[];
|
|
208
|
-
banner?: OutputOptions["banner"];
|
|
209
|
-
footer?: OutputOptions["footer"];
|
|
210
|
-
rollupConfig?: DeepPartial<UnbuildRollupBuildOptions> | string;
|
|
211
|
-
configPath?: string;
|
|
212
|
-
};
|
|
213
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { StormConfig } from "@storm-software/config";
|
|
2
|
-
import type { TypeScriptBuildOptions } from "../../declarations";
|
|
3
|
-
import type { RolldownOptions, UnbuildBuildOptions } from "../types";
|
|
4
|
-
export declare const applyDefaultOptions: (options: Partial<any>, config?: StormConfig) => TypeScriptBuildOptions;
|
|
5
|
-
export declare const applyDefaultRolldownOptions: (options: Partial<RolldownOptions>, config?: StormConfig) => RolldownOptions;
|
|
6
|
-
export declare const applyDefaultUnbuildOptions: (options: Partial<UnbuildBuildOptions>, config?: StormConfig) => UnbuildBuildOptions;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ProjectConfiguration, ProjectGraph } from "@nx/devkit";
|
|
2
|
-
import type { StormConfig } from "@storm-software/config";
|
|
3
|
-
import type { TypeScriptBuildOptions } from "../../declarations";
|
|
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>>;
|
|
6
|
-
export declare const addWorkspacePackageJsonFields: (config: StormConfig, projectRoot: string, sourceRoot: string, projectName: string, includeSrc: boolean | undefined, packageJson: Record<string, any>) => Record<string, any>;
|
|
7
|
-
export declare const addPackageJsonExports: (sourceRoot: string, packageJson: Record<string, any>) => Promise<Record<string, any>>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get a banner header to display at the top of a file
|
|
3
|
-
*
|
|
4
|
-
* @param name - The name to use in the display
|
|
5
|
-
* @param commentStart - The comment starting token
|
|
6
|
-
* @returns The banner header
|
|
7
|
-
*/
|
|
8
|
-
export declare const getFileBanner: (name: string, commentStart?: string) => string;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ProjectGraph, ProjectGraphExternalNode, ProjectGraphProjectNode } from "@nx/devkit";
|
|
2
|
-
import type { DependentBuildableProjectNode } from "@nx/js/src/utils/buildable-libs-utils.js";
|
|
3
|
-
export declare function getExtraDependencies(projectName: string, graph: ProjectGraph): DependentBuildableProjectNode[];
|
|
4
|
-
export declare function getInternalDependencies(projectName: string, graph: ProjectGraph): ProjectGraphProjectNode[];
|
|
5
|
-
export declare function getExternalDependencies(projectName: string, graph: ProjectGraph): ProjectGraphExternalNode[];
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { NxJsonConfiguration, TaskGraph, ProjectGraph } from "@nx/devkit";
|
|
2
|
-
export declare function getAllWorkspaceTaskGraphs(nxJson: NxJsonConfiguration, projectGraph: ProjectGraph): {
|
|
3
|
-
taskGraphs: Record<string, TaskGraph>;
|
|
4
|
-
errors: Record<string, string>;
|
|
5
|
-
};
|
|
6
|
-
export declare function createTaskId(projectId: string, targetId: string, configurationId?: string): string;
|