@storm-software/workspace-tools 1.76.3 → 1.78.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 +23 -9
- package/README.md +1 -1
- package/index.js +48455 -60362
- package/meta.json +1 -1
- package/package.json +1 -1
- package/packages/build-tools/src/build/index.d.ts +3 -0
- package/packages/build-tools/src/build/rolldown.d.ts +20 -0
- package/packages/build-tools/src/build/ts-build.d.ts +20 -0
- package/packages/build-tools/src/build/unbuild.d.ts +20 -0
- package/packages/build-tools/src/cli/index.d.ts +2 -0
- package/packages/build-tools/src/config/browser-config.d.ts +2 -0
- package/packages/build-tools/src/config/default-config.d.ts +2 -0
- package/packages/build-tools/src/config/get-config.d.ts +2 -0
- package/packages/build-tools/src/config/get-rolldown-config.d.ts +6 -0
- package/packages/build-tools/src/config/get-unbuild-config.d.ts +6 -0
- package/packages/build-tools/src/config/index.d.ts +7 -0
- package/packages/build-tools/src/config/neutral-config.d.ts +2 -0
- package/packages/build-tools/src/config/node-config.d.ts +3 -0
- package/packages/build-tools/src/index.d.ts +6 -0
- package/packages/build-tools/src/plugins/analyze-plugin.d.ts +4 -0
- package/packages/build-tools/src/plugins/index.d.ts +2 -0
- package/packages/build-tools/src/plugins/swc-plugin.d.ts +2 -0
- package/packages/build-tools/src/types.d.ts +211 -0
- package/packages/build-tools/src/utils/apply-default-options.d.ts +6 -0
- package/packages/build-tools/src/utils/generate-package-json.d.ts +3 -0
- package/packages/build-tools/src/utils/get-entry-points.d.ts +3 -0
- package/packages/build-tools/src/utils/get-file-banner.d.ts +8 -0
- package/packages/build-tools/src/utils/get-project-deps.d.ts +5 -0
- package/packages/build-tools/src/utils/index.d.ts +7 -0
- package/packages/build-tools/src/utils/out-extension.d.ts +6 -0
- package/packages/build-tools/src/utils/run-tsup-build.d.ts +3 -0
- package/packages/build-tools/src/utils/task-graph.d.ts +6 -0
- package/packages/config/src/define-config.d.ts +148 -0
- package/packages/config/src/index.d.ts +11 -0
- package/packages/config/src/schema.d.ts +1610 -0
- package/packages/config/src/types.d.ts +23 -0
- package/packages/config-tools/src/config-file/get-config-file.d.ts +16 -0
- package/packages/config-tools/src/config-file/index.d.ts +1 -0
- package/packages/config-tools/src/create-storm-config.d.ts +26 -0
- package/packages/config-tools/src/env/get-env.d.ts +15 -0
- package/packages/config-tools/src/env/index.d.ts +2 -0
- package/packages/config-tools/src/env/set-env.d.ts +14 -0
- package/packages/config-tools/src/index.d.ts +13 -0
- package/packages/config-tools/src/types.d.ts +33 -0
- package/packages/config-tools/src/utilities/apply-workspace-tokens.d.ts +4 -0
- package/packages/config-tools/src/utilities/chalk.d.ts +23 -0
- package/packages/config-tools/src/utilities/correct-paths.d.ts +1 -0
- package/packages/config-tools/src/utilities/file-path-utils.d.ts +2 -0
- package/packages/config-tools/src/utilities/find-up.d.ts +4 -0
- package/packages/config-tools/src/utilities/find-workspace-root.d.ts +14 -0
- package/packages/config-tools/src/utilities/get-default-config.d.ts +15 -0
- package/packages/config-tools/src/utilities/get-log-level.d.ts +15 -0
- package/packages/config-tools/src/utilities/index.d.ts +10 -0
- package/packages/config-tools/src/utilities/logger.d.ts +74 -0
- package/packages/config-tools/src/utilities/process-handler.d.ts +4 -0
- package/packages/config-tools/src/utilities/run.d.ts +17 -0
- package/packages/workspace-tools/index.d.ts +28 -0
- package/packages/workspace-tools/src/base/base-executor.d.ts +6 -0
- package/packages/workspace-tools/src/base/base-generator.d.ts +4 -0
- package/packages/workspace-tools/src/base/index.d.ts +3 -0
- package/packages/workspace-tools/src/base/typescript-library-generator.d.ts +20 -0
- package/packages/workspace-tools/src/executors/cargo-publish/executor.d.ts +6 -0
- package/packages/workspace-tools/src/executors/npm-publish/executor.d.ts +3 -0
- package/packages/workspace-tools/src/executors/rolldown/executor.d.ts +11 -0
- package/packages/workspace-tools/src/executors/tsup/executor.d.ts +10 -0
- package/packages/workspace-tools/src/executors/tsup-browser/executor.d.ts +9 -0
- package/packages/workspace-tools/src/executors/tsup-neutral/executor.d.ts +10 -0
- package/packages/workspace-tools/src/executors/tsup-node/executor.d.ts +9 -0
- package/packages/workspace-tools/src/executors/typia/executor.d.ts +10 -0
- package/packages/workspace-tools/src/executors/unbuild/executor.d.ts +11 -0
- package/packages/workspace-tools/src/generators/browser-library/generator.d.ts +5 -0
- package/packages/workspace-tools/src/generators/config-schema/generator.d.ts +13 -0
- package/packages/workspace-tools/src/generators/init/init.d.ts +4 -0
- package/packages/workspace-tools/src/generators/neutral-library/generator.d.ts +5 -0
- package/packages/workspace-tools/src/generators/node-library/generator.d.ts +5 -0
- package/packages/workspace-tools/src/generators/preset/generator.d.ts +5 -0
- package/packages/workspace-tools/src/generators/release-version/generator.d.ts +14 -0
- package/packages/workspace-tools/src/plugins/rust/cargo-toml.d.ts +4 -0
- package/packages/workspace-tools/src/plugins/rust/index.d.ts +1 -0
- package/packages/workspace-tools/src/plugins/typescript/index.d.ts +1 -0
- package/packages/workspace-tools/src/plugins/typescript/project-config.d.ts +33 -0
- package/packages/workspace-tools/src/utils/apply-workspace-tokens.d.ts +8 -0
- package/packages/workspace-tools/src/utils/cargo.d.ts +27 -0
- package/packages/workspace-tools/src/utils/create-cli-options.d.ts +1 -0
- package/packages/workspace-tools/src/utils/get-project-configurations.d.ts +13 -0
- package/packages/workspace-tools/src/utils/index.d.ts +8 -0
- package/packages/workspace-tools/src/utils/lock-file.d.ts +23 -0
- package/packages/workspace-tools/src/utils/run-tsup-build.d.ts +1 -0
- package/packages/workspace-tools/src/utils/toml.d.ts +167 -0
- package/packages/workspace-tools/src/utils/typia-transform.d.ts +2 -0
- package/packages/workspace-tools/src/utils/versions.d.ts +18 -0
- package/src/base/index.js +47869 -59778
- package/src/executors/rolldown/executor.js +7 -0
- package/src/executors/tsup/executor.js +7 -0
- package/src/executors/tsup-browser/executor.js +7 -0
- package/src/executors/tsup-neutral/executor.js +7 -0
- package/src/executors/tsup-node/executor.js +7 -0
- package/src/executors/typia/executor.js +7 -0
- package/src/executors/unbuild/executor.js +7 -0
- package/src/generators/browser-library/generator.js +47869 -59778
- package/src/generators/config-schema/generator.js +7 -0
- package/src/generators/neutral-library/generator.js +47869 -59778
- package/src/generators/node-library/generator.js +47869 -59778
- package/src/generators/preset/generator.js +7 -0
- package/src/generators/release-version/generator.js +17 -8
- package/src/utils/index.js +7 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const name = "storm-software/typescript/project-config";
|
|
2
|
+
export declare const createNodes: (string | ((file: any, _: any, ctx: any) => {
|
|
3
|
+
projects?: undefined;
|
|
4
|
+
} | {
|
|
5
|
+
projects: {
|
|
6
|
+
[x: string]: {
|
|
7
|
+
targets: {
|
|
8
|
+
[targetName: string]: import("nx/src/config/workspace-json-project-json").TargetConfiguration<any>;
|
|
9
|
+
};
|
|
10
|
+
release: {
|
|
11
|
+
version: {
|
|
12
|
+
generator: string;
|
|
13
|
+
generatorOptions?: Record<string, unknown> | undefined;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
name?: string | undefined;
|
|
17
|
+
root: string;
|
|
18
|
+
sourceRoot?: string | undefined;
|
|
19
|
+
projectType?: import("nx/src/config/workspace-json-project-json").ProjectType | undefined;
|
|
20
|
+
generators?: {
|
|
21
|
+
[collectionName: string]: {
|
|
22
|
+
[generatorName: string]: any;
|
|
23
|
+
};
|
|
24
|
+
} | undefined;
|
|
25
|
+
implicitDependencies?: string[] | undefined;
|
|
26
|
+
namedInputs?: {
|
|
27
|
+
[inputName: string]: (string | import("nx/src/config/workspace-json-project-json").InputDefinition)[];
|
|
28
|
+
} | undefined;
|
|
29
|
+
tags: string[];
|
|
30
|
+
metadata?: import("nx/src/config/workspace-json-project-json").ProjectMetadata | undefined;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
}))[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ProjectConfiguration } from "@nx/devkit";
|
|
2
|
+
import type { BaseTokenizerOptions } from "@storm-software/config-tools";
|
|
3
|
+
export type ExecutorTokenizerOptions = BaseTokenizerOptions & ProjectConfiguration & {
|
|
4
|
+
projectName: string;
|
|
5
|
+
projectRoot: string;
|
|
6
|
+
sourceRoot: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const applyWorkspaceExecutorTokens: (option: string, tokenizerOptions: ExecutorTokenizerOptions) => Promise<string>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { type ChildProcess, type StdioOptions } from "node:child_process";
|
|
3
|
+
import type { CargoMetadata, Dependency, Package } from "./toml";
|
|
4
|
+
interface CargoRun {
|
|
5
|
+
success: boolean;
|
|
6
|
+
output: string;
|
|
7
|
+
}
|
|
8
|
+
interface RunCargoOptions {
|
|
9
|
+
stdio: StdioOptions;
|
|
10
|
+
env: NodeJS.ProcessEnv | undefined;
|
|
11
|
+
}
|
|
12
|
+
export declare let childProcess: ChildProcess | null;
|
|
13
|
+
export declare function cargoCommand(...args: string[]): Promise<{
|
|
14
|
+
success: boolean;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function cargoRunCommand(...args: string[]): Promise<{
|
|
17
|
+
success: boolean;
|
|
18
|
+
}>;
|
|
19
|
+
export declare function cargoCommandSync(args?: string, options?: Partial<RunCargoOptions>): CargoRun;
|
|
20
|
+
export declare function cargoMetadata(): CargoMetadata | null;
|
|
21
|
+
export declare function isExternal(packageOrDep: Package | Dependency, workspaceRoot: string): any;
|
|
22
|
+
export declare function runProcess(processCmd: string, ...args: string[]): {
|
|
23
|
+
success: boolean;
|
|
24
|
+
} | PromiseLike<{
|
|
25
|
+
success: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createCliOptions<T extends Record<string, string | number | boolean | string[]>>(obj: T): string[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ProjectConfiguration } from "@nx/devkit";
|
|
2
|
+
/**
|
|
3
|
+
* Retrieve the project configurations from the workspace.
|
|
4
|
+
*
|
|
5
|
+
* @returns The project configurations.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getProjectConfigurations: <TConfig extends ProjectConfiguration = ProjectConfiguration>() => Promise<Record<string, TConfig>>;
|
|
8
|
+
/**
|
|
9
|
+
* Retrieve the project configurations from the workspace.
|
|
10
|
+
*
|
|
11
|
+
* @returns The project configurations.
|
|
12
|
+
*/
|
|
13
|
+
export declare const getProjectConfiguration: <TConfig extends ProjectConfiguration = ProjectConfiguration>(projectName: string) => TConfig | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./apply-workspace-tokens";
|
|
2
|
+
export * from "./get-project-configurations";
|
|
3
|
+
export * from "./typia-transform";
|
|
4
|
+
export * from "./versions";
|
|
5
|
+
export * from "./toml";
|
|
6
|
+
export * from "./cargo";
|
|
7
|
+
export * from "./lock-file";
|
|
8
|
+
export * from "./create-cli-options";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type RawProjectGraphDependency, type CreateDependenciesContext, type CreateNodesContext, type PackageManager, type ProjectGraphExternalNode } from "nx/src/devkit-exports";
|
|
2
|
+
export declare const YARN_LOCK_FILE = "yarn.lock";
|
|
3
|
+
export declare const NPM_LOCK_FILE = "package-lock.json";
|
|
4
|
+
export declare const PNPM_LOCK_FILE = "pnpm-lock.yaml";
|
|
5
|
+
export declare const LOCK_FILES: string[];
|
|
6
|
+
export declare const YARN_LOCK_PATH: string;
|
|
7
|
+
export declare const NPM_LOCK_PATH: string;
|
|
8
|
+
export declare const PNPM_LOCK_PATH: string;
|
|
9
|
+
/**
|
|
10
|
+
* Parses lock file and maps dependencies and metadata to {@link LockFileGraph}
|
|
11
|
+
*/
|
|
12
|
+
export declare function getLockFileNodes(packageManager: PackageManager, contents: string, lockFileHash: string, context: CreateNodesContext): Record<string, ProjectGraphExternalNode>;
|
|
13
|
+
/**
|
|
14
|
+
* Parses lock file and maps dependencies and metadata to {@link LockFileGraph}
|
|
15
|
+
*/
|
|
16
|
+
export declare function getLockFileDependencies(packageManager: PackageManager, contents: string, lockFileHash: string, context: CreateDependenciesContext): RawProjectGraphDependency[];
|
|
17
|
+
export declare function lockFileExists(packageManager: PackageManager): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Returns lock file name based on the detected package manager in the root
|
|
20
|
+
* @param packageManager
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
export declare function getLockFileName(packageManager: PackageManager): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { type Tree } from "@nx/devkit";
|
|
2
|
+
export interface CargoToml {
|
|
3
|
+
workspace?: {
|
|
4
|
+
members: string[];
|
|
5
|
+
};
|
|
6
|
+
package: any;
|
|
7
|
+
dependencies?: Record<string, string | {
|
|
8
|
+
version: string;
|
|
9
|
+
features?: string[];
|
|
10
|
+
optional?: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
"dev-dependencies"?: Record<string, string | {
|
|
13
|
+
version: string;
|
|
14
|
+
features: string[];
|
|
15
|
+
}>;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
export interface CargoMetadata {
|
|
19
|
+
packages: Package[];
|
|
20
|
+
workspace_members: string[];
|
|
21
|
+
resolve: Resolve;
|
|
22
|
+
target_directory: string;
|
|
23
|
+
version: number;
|
|
24
|
+
workspace_root: string;
|
|
25
|
+
metadata: Metadata2;
|
|
26
|
+
}
|
|
27
|
+
export interface Package {
|
|
28
|
+
name: string;
|
|
29
|
+
version: string;
|
|
30
|
+
id: string;
|
|
31
|
+
license: string;
|
|
32
|
+
license_file: string;
|
|
33
|
+
description: string;
|
|
34
|
+
source: any;
|
|
35
|
+
dependencies: Dependency[];
|
|
36
|
+
targets: Target[];
|
|
37
|
+
features: Features;
|
|
38
|
+
manifest_path: string;
|
|
39
|
+
metadata: Metadata;
|
|
40
|
+
/**
|
|
41
|
+
* From the docs:
|
|
42
|
+
* "List of registries to which this package may be published.
|
|
43
|
+
* Publishing is unrestricted if null, and forbidden if an empty array."
|
|
44
|
+
*
|
|
45
|
+
* Additional observation:
|
|
46
|
+
* false can be used by the end user but it will be converted to an empty
|
|
47
|
+
* array in the cargo metadata output.
|
|
48
|
+
*/
|
|
49
|
+
publish: string[] | null;
|
|
50
|
+
authors: string[];
|
|
51
|
+
categories: string[];
|
|
52
|
+
default_run: any;
|
|
53
|
+
rust_version: string;
|
|
54
|
+
keywords: string[];
|
|
55
|
+
readme: string;
|
|
56
|
+
repository: string;
|
|
57
|
+
homepage: string;
|
|
58
|
+
documentation: string;
|
|
59
|
+
edition: string;
|
|
60
|
+
links: any;
|
|
61
|
+
}
|
|
62
|
+
export interface Dependency {
|
|
63
|
+
name: string;
|
|
64
|
+
source: string;
|
|
65
|
+
req: string;
|
|
66
|
+
kind: any;
|
|
67
|
+
rename: any;
|
|
68
|
+
optional: boolean;
|
|
69
|
+
uses_default_features: boolean;
|
|
70
|
+
features: any[];
|
|
71
|
+
target: string;
|
|
72
|
+
path: string;
|
|
73
|
+
registry: any;
|
|
74
|
+
}
|
|
75
|
+
export interface Target {
|
|
76
|
+
kind: string[];
|
|
77
|
+
crate_types: string[];
|
|
78
|
+
name: string;
|
|
79
|
+
src_path: string;
|
|
80
|
+
edition: string;
|
|
81
|
+
"required-features": string[];
|
|
82
|
+
doc: boolean;
|
|
83
|
+
doctest: boolean;
|
|
84
|
+
test: boolean;
|
|
85
|
+
}
|
|
86
|
+
export interface Features {
|
|
87
|
+
default: string[];
|
|
88
|
+
feat1: any[];
|
|
89
|
+
feat2: any[];
|
|
90
|
+
}
|
|
91
|
+
export interface Metadata {
|
|
92
|
+
docs: Docs;
|
|
93
|
+
}
|
|
94
|
+
export interface Docs {
|
|
95
|
+
rs: Rs;
|
|
96
|
+
}
|
|
97
|
+
export interface Rs {
|
|
98
|
+
"all-features": boolean;
|
|
99
|
+
}
|
|
100
|
+
export interface Resolve {
|
|
101
|
+
nodes: Node[];
|
|
102
|
+
root: string;
|
|
103
|
+
}
|
|
104
|
+
export interface Node {
|
|
105
|
+
id: string;
|
|
106
|
+
dependencies: string[];
|
|
107
|
+
deps: Dep[];
|
|
108
|
+
features: string[];
|
|
109
|
+
}
|
|
110
|
+
export interface Dep {
|
|
111
|
+
name: string;
|
|
112
|
+
pkg: string;
|
|
113
|
+
dep_kinds: DepKind[];
|
|
114
|
+
}
|
|
115
|
+
export interface DepKind {
|
|
116
|
+
kind: any;
|
|
117
|
+
target: string;
|
|
118
|
+
}
|
|
119
|
+
export interface Metadata2 {
|
|
120
|
+
docs: Docs2;
|
|
121
|
+
}
|
|
122
|
+
export interface Docs2 {
|
|
123
|
+
rs: Rs2;
|
|
124
|
+
}
|
|
125
|
+
export interface Rs2 {
|
|
126
|
+
"all-features": boolean;
|
|
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
|
+
export declare function parseCargoTomlWithTree(tree: Tree, projectRoot: string, projectName: string): CargoToml;
|
|
164
|
+
export declare function parseCargoToml(cargoString?: string): CargoToml;
|
|
165
|
+
export declare function stringifyCargoToml(cargoToml: CargoToml): string;
|
|
166
|
+
export declare function modifyCargoTable(toml: CargoToml, section: string, key: string, value: string | object | any[] | (() => any)): void;
|
|
167
|
+
export declare function modifyCargoNestedTable(toml: CargoToml, section: string, key: string, value: object): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const tsupVersion = "^7.2.0";
|
|
2
|
+
export declare const prettierPackageJsonVersion = "2.4.6";
|
|
3
|
+
export declare const prettierPrismaVersion = "5.0.0";
|
|
4
|
+
export declare const prettierVersion = "^3.0.3";
|
|
5
|
+
export declare const swcCliVersion = "~0.1.62";
|
|
6
|
+
export declare const swcCoreVersion = "~1.3.95";
|
|
7
|
+
export declare const swcHelpersVersion = "~0.5.3";
|
|
8
|
+
export declare const swcNodeVersion = "1.6.8";
|
|
9
|
+
export declare const tsLibVersion = "2.6.2";
|
|
10
|
+
export declare const typesNodeVersion = "20.9.0";
|
|
11
|
+
export declare const verdaccioVersion = "5.27.0";
|
|
12
|
+
export declare const typescriptVersion = "~5.2.2";
|
|
13
|
+
export declare const eslintVersion = "~8.53.0";
|
|
14
|
+
export declare const lintStagedVersion = "15.0.2";
|
|
15
|
+
export declare const semanticReleaseVersion = "22.0.7";
|
|
16
|
+
export declare const nxVersion = "^18.0.4";
|
|
17
|
+
export declare const nodeVersion = "20.11.0";
|
|
18
|
+
export declare const pnpmVersion = "8.10.2";
|