@storm-software/workspace-tools 1.53.1 → 1.54.1

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 CHANGED
@@ -1,3 +1,27 @@
1
+ ## 1.54.1 (2024-02-06)
2
+
3
+
4
+ ### 🩹 Fixes
5
+
6
+ - **workspace-tools:** Fixed `project.json` issue with `assets` parameter excluding declarations file ([0a91e9d1](https://github.com/storm-software/storm-ops/commit/0a91e9d1))
7
+
8
+
9
+ ### ❤️ Thank You
10
+
11
+ - Patrick Sullivan
12
+
13
+ ## 1.54.0 (2024-02-06)
14
+
15
+
16
+ ### 🚀 Features
17
+
18
+ - **workspace-tools:** Added the base storm nx-plugin helper's type declarations ([d0c5f7a3](https://github.com/storm-software/storm-ops/commit/d0c5f7a3))
19
+
20
+
21
+ ### ❤️ Thank You
22
+
23
+ - Patrick Sullivan
24
+
1
25
 
2
26
 
3
27
 
@@ -0,0 +1,89 @@
1
+ import type { StormConfig } from "@storm-software/config-tools";
2
+ import type { TsupExecutorSchema } from "./src/executors/tsup/schema";
3
+ import type { ExecutorContext } from "@nx/devkit";
4
+ import type { Tree } from "@nx/devkit";
5
+
6
+ export interface TsupContext {
7
+ projectRoot: string;
8
+ sourceRoot: string;
9
+ projectName: string;
10
+ main: string;
11
+ }
12
+
13
+ declare function applyDefaultOptions(options: TsupExecutorSchema): TsupExecutorSchema;
14
+ export { applyDefaultOptions };
15
+
16
+ declare function runTsupBuild(
17
+ context: TsupContext,
18
+ config: Partial<StormConfig>,
19
+ options: TsupExecutorSchema
20
+ ): Promise<void>;
21
+ export { runTsupBuild };
22
+
23
+ export interface BaseExecutorSchema extends Record<string, any> {
24
+ main?: string;
25
+ outputPath?: string;
26
+ tsConfig?: string;
27
+ }
28
+
29
+ export interface WorkspaceToolHooks<TSchema = any> {
30
+ applyDefaultOptions?: (
31
+ options: Partial<TSchema>,
32
+ config?: StormConfig
33
+ ) => Promise<TSchema> | TSchema;
34
+ preProcess?: (options: TSchema, config?: StormConfig) => Promise<void> | void;
35
+ postProcess?: (config?: StormConfig) => Promise<void> | void;
36
+ }
37
+
38
+ export interface BaseWorkspaceToolOptions<TSchema = any> {
39
+ skipReadingConfig?: boolean;
40
+ hooks?: WorkspaceToolHooks<TSchema>;
41
+ }
42
+
43
+ export interface BaseExecutorOptions<
44
+ TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema
45
+ > extends BaseWorkspaceToolOptions<TExecutorSchema> {}
46
+
47
+ export interface BaseExecutorResult {
48
+ error?: Error;
49
+ success?: boolean;
50
+ }
51
+
52
+ declare function withRunExecutor<TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema>(
53
+ name: string,
54
+ executorFn: (
55
+ options: TExecutorSchema,
56
+ context: ExecutorContext,
57
+ config?: StormConfig
58
+ ) => Promise<BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined,
59
+ executorOptions: BaseExecutorOptions<TExecutorSchema>
60
+ ): (_options: TExecutorSchema, context: ExecutorContext) => Promise<{ success: boolean }>;
61
+ export { withRunExecutor };
62
+
63
+ export interface BaseGeneratorSchema extends Record<string, any> {
64
+ main?: string;
65
+ outputPath?: string;
66
+ tsConfig?: string;
67
+ }
68
+
69
+ export interface BaseGeneratorOptions<
70
+ TGeneratorSchema extends BaseGeneratorSchema = BaseGeneratorSchema
71
+ > extends BaseWorkspaceToolOptions<TGeneratorSchema> {}
72
+
73
+ export interface BaseGeneratorResult {
74
+ error?: Error;
75
+ success?: boolean;
76
+ }
77
+
78
+ declare function withRunGenerator<TGeneratorSchema = any>(
79
+ name: string,
80
+ generatorFn: (
81
+ tree: Tree,
82
+ options: TGeneratorSchema,
83
+ config?: StormConfig
84
+ ) => Promise<BaseGeneratorResult | null | undefined> | BaseGeneratorResult | null | undefined,
85
+ generatorOptions: BaseGeneratorOptions<TGeneratorSchema> = {
86
+ skipReadingConfig: false
87
+ }
88
+ ): (tree: Tree, _options: TGeneratorSchema) => Promise<{ success: boolean }>;
89
+ export { withRunGenerator };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/workspace-tools",
3
- "version": "1.53.1",
3
+ "version": "1.54.1",
4
4
  "private": false,
5
5
  "description": "⚡ A Nx plugin package that contains various executors and generators used in a Storm workspaces.",
6
6
  "keywords": [