@powerlines/nx 0.13.38 → 0.13.42
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/dist/src/base/base-executor.d.mts.map +1 -1
- package/dist/src/base/base-executor.d.ts.map +1 -1
- package/dist/src/base/base-executor.js +32 -18
- package/dist/src/base/base-executor.mjs +32 -18
- package/dist/src/base/base-executor.mjs.map +1 -1
- package/dist/src/base/base-executor.untyped.js +5 -1
- package/dist/src/base/base-executor.untyped.mjs +5 -1
- package/dist/src/base/base-executor.untyped.mjs.map +1 -1
- package/dist/src/{base-executor-dweAIT3X.mjs → base-executor-86GBuriJ.mjs} +33 -19
- package/dist/src/base-executor-86GBuriJ.mjs.map +1 -0
- package/dist/src/{base-executor-CQ18-J8D.js → base-executor-D_JSA5Nd.js} +32 -18
- package/dist/src/{base-executor.untyped-C_GfrIWa.js → base-executor.untyped-4feXjo6S.js} +5 -1
- package/dist/src/{base-executor.untyped-Kz2OUE_8.mjs → base-executor.untyped-BD9-7XGx.mjs} +6 -2
- package/dist/src/base-executor.untyped-BD9-7XGx.mjs.map +1 -0
- package/dist/src/executors/build/executor.d.mts +1 -5
- package/dist/src/executors/build/executor.d.mts.map +1 -1
- package/dist/src/executors/build/executor.d.ts +1 -6
- package/dist/src/executors/build/executor.d.ts.map +1 -1
- package/dist/src/executors/build/executor.js +3 -12
- package/dist/src/executors/build/executor.mjs +3 -8
- package/dist/src/executors/build/executor.mjs.map +1 -1
- package/dist/src/executors/clean/executor.d.mts +1 -5
- package/dist/src/executors/clean/executor.d.mts.map +1 -1
- package/dist/src/executors/clean/executor.d.ts +1 -6
- package/dist/src/executors/clean/executor.d.ts.map +1 -1
- package/dist/src/executors/clean/executor.js +2 -4
- package/dist/src/executors/clean/executor.mjs +2 -2
- package/dist/src/executors/clean/executor.mjs.map +1 -1
- package/dist/src/executors/clean/untyped.js +1 -1
- package/dist/src/executors/clean/untyped.mjs +1 -1
- package/dist/src/executors/docs/executor.d.mts +1 -5
- package/dist/src/executors/docs/executor.d.mts.map +1 -1
- package/dist/src/executors/docs/executor.d.ts +1 -6
- package/dist/src/executors/docs/executor.d.ts.map +1 -1
- package/dist/src/executors/docs/executor.js +2 -4
- package/dist/src/executors/docs/executor.mjs +2 -2
- package/dist/src/executors/docs/executor.mjs.map +1 -1
- package/dist/src/executors/lint/executor.d.mts +1 -5
- package/dist/src/executors/lint/executor.d.mts.map +1 -1
- package/dist/src/executors/lint/executor.d.ts +1 -6
- package/dist/src/executors/lint/executor.d.ts.map +1 -1
- package/dist/src/executors/lint/executor.js +2 -4
- package/dist/src/executors/lint/executor.mjs +2 -2
- package/dist/src/executors/lint/executor.mjs.map +1 -1
- package/dist/src/executors/prepare/executor.d.mts +1 -5
- package/dist/src/executors/prepare/executor.d.mts.map +1 -1
- package/dist/src/executors/prepare/executor.d.ts +1 -6
- package/dist/src/executors/prepare/executor.d.ts.map +1 -1
- package/dist/src/executors/prepare/executor.js +3 -12
- package/dist/src/executors/prepare/executor.mjs +3 -8
- package/dist/src/executors/prepare/executor.mjs.map +1 -1
- package/dist/src/executors/prepare/untyped.js +1 -1
- package/dist/src/executors/prepare/untyped.mjs +1 -1
- package/dist/src/helpers/plugin-utilities.d.mts.map +1 -1
- package/dist/src/helpers/plugin-utilities.d.ts.map +1 -1
- package/dist/src/helpers/plugin-utilities.js +2 -2
- package/dist/src/helpers/plugin-utilities.mjs +2 -2
- package/dist/src/helpers/plugin-utilities.mjs.map +1 -1
- package/dist/src/plugin/index.js +1 -1
- package/dist/src/plugin/index.mjs +1 -1
- package/dist/src/plugin/index.mjs.map +1 -1
- package/package.json +20 -19
- package/dist/src/base-executor-CuS2Y2T4.d.ts +0 -173
- package/dist/src/base-executor-CuS2Y2T4.d.ts.map +0 -1
- package/dist/src/base-executor-TyizQv09.d.mts +0 -173
- package/dist/src/base-executor-TyizQv09.d.mts.map +0 -1
- package/dist/src/base-executor-dweAIT3X.mjs.map +0 -1
- package/dist/src/base-executor.untyped-Kz2OUE_8.mjs.map +0 -1
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
|
|
2
|
-
import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
|
|
3
|
-
import { InlineConfig, PowerlinesCommand, PowerlinesEngine } from "powerlines";
|
|
4
|
-
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
5
|
-
|
|
6
|
-
//#region src/base/base-executor.schema.d.ts
|
|
7
|
-
// Generated by @storm-software/untyped
|
|
8
|
-
// Do not edit this file directly
|
|
9
|
-
interface BaseExecutorSchema {
|
|
10
|
-
/**
|
|
11
|
-
* Powerlines Configuration File
|
|
12
|
-
*
|
|
13
|
-
* The path to the Powerlines configuration file. Alias for `configFile`.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* @format path
|
|
17
|
-
*/
|
|
18
|
-
config?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Powerlines Configuration File
|
|
21
|
-
*
|
|
22
|
-
* The path to the Powerlines configuration file. Alias for `config`.
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* @format path
|
|
26
|
-
*/
|
|
27
|
-
configFile?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Input Entry File(s)
|
|
30
|
-
*
|
|
31
|
-
* The entry file(s) that serve as the input for the project
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* @format path
|
|
35
|
-
*/
|
|
36
|
-
input?: Array<string>;
|
|
37
|
-
/**
|
|
38
|
-
* TSConfig Path
|
|
39
|
-
*
|
|
40
|
-
* The path to the tsconfig file
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* @format path
|
|
44
|
-
*/
|
|
45
|
-
tsconfig?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Output Path
|
|
48
|
-
*
|
|
49
|
-
* The path to the output directory for the build artifacts
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* @format path
|
|
53
|
-
*/
|
|
54
|
-
outputPath?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Copy Path
|
|
57
|
-
*
|
|
58
|
-
* A directory path to copy the build artifacts into
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* @oneOf [object Object],[object Object]
|
|
62
|
-
*/
|
|
63
|
-
copyPath?: any;
|
|
64
|
-
/**
|
|
65
|
-
* Sourcemap
|
|
66
|
-
*
|
|
67
|
-
* Generate a sourcemap
|
|
68
|
-
*
|
|
69
|
-
*/
|
|
70
|
-
sourceMap?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Minify
|
|
73
|
-
*
|
|
74
|
-
* Minify the output
|
|
75
|
-
*
|
|
76
|
-
*/
|
|
77
|
-
minify?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Format
|
|
80
|
-
*
|
|
81
|
-
* The format to build
|
|
82
|
-
*
|
|
83
|
-
* @default ["cjs","esm"]
|
|
84
|
-
*/
|
|
85
|
-
format?: Array<string>;
|
|
86
|
-
/**
|
|
87
|
-
* Platform
|
|
88
|
-
*
|
|
89
|
-
* The platform to build
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* @enum neutral,node,browser
|
|
93
|
-
*/
|
|
94
|
-
platform?: string;
|
|
95
|
-
/**
|
|
96
|
-
* External
|
|
97
|
-
*
|
|
98
|
-
* The external dependencies
|
|
99
|
-
*
|
|
100
|
-
*/
|
|
101
|
-
external?: Array<any>;
|
|
102
|
-
/**
|
|
103
|
-
* No External
|
|
104
|
-
*
|
|
105
|
-
* The dependencies that should not be treated as external
|
|
106
|
-
*
|
|
107
|
-
*/
|
|
108
|
-
noExternal?: Array<any>;
|
|
109
|
-
/**
|
|
110
|
-
* Skip Node Modules Bundle
|
|
111
|
-
*
|
|
112
|
-
* Skip bundling node_modules during the build process (if required)
|
|
113
|
-
*
|
|
114
|
-
*/
|
|
115
|
-
skipNodeModulesBundle?: boolean;
|
|
116
|
-
/**
|
|
117
|
-
* Mode
|
|
118
|
-
*
|
|
119
|
-
* The build mode
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* @enum development,test,production
|
|
123
|
-
*/
|
|
124
|
-
mode?: string;
|
|
125
|
-
/**
|
|
126
|
-
* Log Level
|
|
127
|
-
*
|
|
128
|
-
* The log level to use for the build process
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* @enum fatal,error,warn,success,info,debug,trace,silent
|
|
132
|
-
*/
|
|
133
|
-
logLevel?: string;
|
|
134
|
-
/**
|
|
135
|
-
* Define
|
|
136
|
-
*
|
|
137
|
-
* The `define` values
|
|
138
|
-
*
|
|
139
|
-
*/
|
|
140
|
-
define?: Record<string, string>;
|
|
141
|
-
/**
|
|
142
|
-
* Assets
|
|
143
|
-
*
|
|
144
|
-
* The `assets` values
|
|
145
|
-
*
|
|
146
|
-
*/
|
|
147
|
-
assets?: Array<{
|
|
148
|
-
input?: string;
|
|
149
|
-
output?: string;
|
|
150
|
-
glob: string;
|
|
151
|
-
ignore?: string[];
|
|
152
|
-
dot?: boolean;
|
|
153
|
-
}>;
|
|
154
|
-
/**
|
|
155
|
-
* Additional Arguments
|
|
156
|
-
*
|
|
157
|
-
* The additional arguments provided during execution of the command
|
|
158
|
-
*
|
|
159
|
-
*/
|
|
160
|
-
additionalArgs?: Record<string, string>;
|
|
161
|
-
}
|
|
162
|
-
//#endregion
|
|
163
|
-
//#region src/base/base-executor.d.ts
|
|
164
|
-
type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
|
|
165
|
-
projectName: string;
|
|
166
|
-
command: TCommand;
|
|
167
|
-
options: TExecutorSchema;
|
|
168
|
-
inlineConfig: InlineConfig;
|
|
169
|
-
workspaceConfig: StormWorkspaceConfig;
|
|
170
|
-
};
|
|
171
|
-
//#endregion
|
|
172
|
-
export { PowerlinesExecutorContext as t };
|
|
173
|
-
//# sourceMappingURL=base-executor-CuS2Y2T4.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-executor-CuS2Y2T4.d.ts","names":["BaseExecutorSchema","Array","Record","config","configFile","input","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot","additionalArgs"],"sources":["../../src/base/base-executor.schema.d.ts","../../src/base/base-executor.ts"],"mappings":";;;;;;;;UAIiBA,kBAAAA;;AAAjB;;;;;;;EASCG,MAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;EAURK,QAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;EAQAC,MAAAA;;;;;;;;EASAC,MAAAA,GAASV,KAAAA;;;;;;;;;EAUTW,QAAAA;;;;;;;EAQAC,QAAAA,GAAWZ,KAAAA;;;;;;;EAQXa,UAAAA,GAAab,KAAAA;;;;;;;EAQbc,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAAShB,MAAAA;;;;;;;EAQTiB,MAAAA,GAASlB,KAAAA;IAAQI,KAAAA;IAAgBe,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;;;;;;;EAQnFC,cAAAA,GAAiBtB,MAAAA;AAAAA;;;KCnIN,yBAAA,kBACO,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA"}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
|
|
2
|
-
import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
|
|
3
|
-
import { InlineConfig, PowerlinesCommand, PowerlinesEngine } from "powerlines";
|
|
4
|
-
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
5
|
-
|
|
6
|
-
//#region src/base/base-executor.schema.d.ts
|
|
7
|
-
// Generated by @storm-software/untyped
|
|
8
|
-
// Do not edit this file directly
|
|
9
|
-
interface BaseExecutorSchema {
|
|
10
|
-
/**
|
|
11
|
-
* Powerlines Configuration File
|
|
12
|
-
*
|
|
13
|
-
* The path to the Powerlines configuration file. Alias for `configFile`.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* @format path
|
|
17
|
-
*/
|
|
18
|
-
config?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Powerlines Configuration File
|
|
21
|
-
*
|
|
22
|
-
* The path to the Powerlines configuration file. Alias for `config`.
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* @format path
|
|
26
|
-
*/
|
|
27
|
-
configFile?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Input Entry File(s)
|
|
30
|
-
*
|
|
31
|
-
* The entry file(s) that serve as the input for the project
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* @format path
|
|
35
|
-
*/
|
|
36
|
-
input?: Array<string>;
|
|
37
|
-
/**
|
|
38
|
-
* TSConfig Path
|
|
39
|
-
*
|
|
40
|
-
* The path to the tsconfig file
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* @format path
|
|
44
|
-
*/
|
|
45
|
-
tsconfig?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Output Path
|
|
48
|
-
*
|
|
49
|
-
* The path to the output directory for the build artifacts
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* @format path
|
|
53
|
-
*/
|
|
54
|
-
outputPath?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Copy Path
|
|
57
|
-
*
|
|
58
|
-
* A directory path to copy the build artifacts into
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* @oneOf [object Object],[object Object]
|
|
62
|
-
*/
|
|
63
|
-
copyPath?: any;
|
|
64
|
-
/**
|
|
65
|
-
* Sourcemap
|
|
66
|
-
*
|
|
67
|
-
* Generate a sourcemap
|
|
68
|
-
*
|
|
69
|
-
*/
|
|
70
|
-
sourceMap?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Minify
|
|
73
|
-
*
|
|
74
|
-
* Minify the output
|
|
75
|
-
*
|
|
76
|
-
*/
|
|
77
|
-
minify?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Format
|
|
80
|
-
*
|
|
81
|
-
* The format to build
|
|
82
|
-
*
|
|
83
|
-
* @default ["cjs","esm"]
|
|
84
|
-
*/
|
|
85
|
-
format?: Array<string>;
|
|
86
|
-
/**
|
|
87
|
-
* Platform
|
|
88
|
-
*
|
|
89
|
-
* The platform to build
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* @enum neutral,node,browser
|
|
93
|
-
*/
|
|
94
|
-
platform?: string;
|
|
95
|
-
/**
|
|
96
|
-
* External
|
|
97
|
-
*
|
|
98
|
-
* The external dependencies
|
|
99
|
-
*
|
|
100
|
-
*/
|
|
101
|
-
external?: Array<any>;
|
|
102
|
-
/**
|
|
103
|
-
* No External
|
|
104
|
-
*
|
|
105
|
-
* The dependencies that should not be treated as external
|
|
106
|
-
*
|
|
107
|
-
*/
|
|
108
|
-
noExternal?: Array<any>;
|
|
109
|
-
/**
|
|
110
|
-
* Skip Node Modules Bundle
|
|
111
|
-
*
|
|
112
|
-
* Skip bundling node_modules during the build process (if required)
|
|
113
|
-
*
|
|
114
|
-
*/
|
|
115
|
-
skipNodeModulesBundle?: boolean;
|
|
116
|
-
/**
|
|
117
|
-
* Mode
|
|
118
|
-
*
|
|
119
|
-
* The build mode
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* @enum development,test,production
|
|
123
|
-
*/
|
|
124
|
-
mode?: string;
|
|
125
|
-
/**
|
|
126
|
-
* Log Level
|
|
127
|
-
*
|
|
128
|
-
* The log level to use for the build process
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* @enum fatal,error,warn,success,info,debug,trace,silent
|
|
132
|
-
*/
|
|
133
|
-
logLevel?: string;
|
|
134
|
-
/**
|
|
135
|
-
* Define
|
|
136
|
-
*
|
|
137
|
-
* The `define` values
|
|
138
|
-
*
|
|
139
|
-
*/
|
|
140
|
-
define?: Record<string, string>;
|
|
141
|
-
/**
|
|
142
|
-
* Assets
|
|
143
|
-
*
|
|
144
|
-
* The `assets` values
|
|
145
|
-
*
|
|
146
|
-
*/
|
|
147
|
-
assets?: Array<{
|
|
148
|
-
input?: string;
|
|
149
|
-
output?: string;
|
|
150
|
-
glob: string;
|
|
151
|
-
ignore?: string[];
|
|
152
|
-
dot?: boolean;
|
|
153
|
-
}>;
|
|
154
|
-
/**
|
|
155
|
-
* Additional Arguments
|
|
156
|
-
*
|
|
157
|
-
* The additional arguments provided during execution of the command
|
|
158
|
-
*
|
|
159
|
-
*/
|
|
160
|
-
additionalArgs?: Record<string, string>;
|
|
161
|
-
}
|
|
162
|
-
//#endregion
|
|
163
|
-
//#region src/base/base-executor.d.ts
|
|
164
|
-
type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
|
|
165
|
-
projectName: string;
|
|
166
|
-
command: TCommand;
|
|
167
|
-
options: TExecutorSchema;
|
|
168
|
-
inlineConfig: InlineConfig;
|
|
169
|
-
workspaceConfig: StormWorkspaceConfig;
|
|
170
|
-
};
|
|
171
|
-
//#endregion
|
|
172
|
-
export { PowerlinesExecutorContext as t };
|
|
173
|
-
//# sourceMappingURL=base-executor-TyizQv09.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-executor-TyizQv09.d.mts","names":["BaseExecutorSchema","Array","Record","config","configFile","input","tsconfig","outputPath","copyPath","sourceMap","minify","format","platform","external","noExternal","skipNodeModulesBundle","mode","logLevel","define","assets","output","glob","ignore","dot","additionalArgs"],"sources":["../../src/base/base-executor.schema.d.ts","../../src/base/base-executor.ts"],"mappings":";;;;;;;;UAIiBA,kBAAAA;;AAAjB;;;;;;;EASCG,MAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,KAAAA,GAAQJ,KAAAA;;;;;;;;;EAURK,QAAAA;;;;;;;;;EAUAC,UAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,SAAAA;;;;;;;EAQAC,MAAAA;;;;;;;;EASAC,MAAAA,GAASV,KAAAA;;;;;;;;;EAUTW,QAAAA;;;;;;;EAQAC,QAAAA,GAAWZ,KAAAA;;;;;;;EAQXa,UAAAA,GAAab,KAAAA;;;;;;;EAQbc,qBAAAA;;;;;;;;;EAUAC,IAAAA;;;;;;;;;EAUAC,QAAAA;;;;;;;EAQAC,MAAAA,GAAShB,MAAAA;;;;;;;EAQTiB,MAAAA,GAASlB,KAAAA;IAAQI,KAAAA;IAAgBe,MAAAA;IAAiBC,IAAAA;IAAcC,MAAAA;IAAmBC,GAAAA;EAAAA;;;;;;;EAQnFC,cAAAA,GAAiBtB,MAAAA;AAAAA;;;KCnIN,yBAAA,kBACO,iBAAA,GAAoB,iBAAA,0BACb,kBAAA,GAAqB,kBAAA,IAC3C,eAAA;EACF,WAAA;EACA,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,eAAA;EACT,YAAA,EAAc,YAAA;EACd,eAAA,EAAiB,oBAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-executor-dweAIT3X.mjs","names":[],"sources":["../../src/base/base-executor.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ExecutorContext, PromiseExecutor } from \"@nx/devkit\";\nimport { writeError } from \"@storm-software/config-tools/logger\";\nimport { StormWorkspaceConfig } from \"@storm-software/config/types\";\nimport { withRunExecutor } from \"@storm-software/workspace-tools/base/base-executor\";\nimport { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport type {\n InlineConfig,\n Mode,\n OutputConfig,\n PowerlinesCommand,\n PowerlinesEngine\n} from \"powerlines\";\nimport { BaseExecutorSchema } from \"./base-executor.schema\";\n\nexport type PowerlinesExecutorContext<\n TCommand extends PowerlinesCommand = PowerlinesCommand,\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n> = ExecutorContext & {\n projectName: string;\n command: TCommand;\n options: TExecutorSchema;\n inlineConfig: InlineConfig;\n workspaceConfig: StormWorkspaceConfig;\n};\n\n/**\n * A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.\n *\n * @remarks\n * This function is designed to simplify the creation of Powerlines executors by providing a consistent interface and error handling.\n *\n * @param command - The command that the executor will handle (e.g., \"new\", \"prepare\", \"build\", etc.).\n * @param executorFn - The function that will be executed when the command is run.\n * @returns A Promise that resolves to the result of the executor function.\n */\nexport function withExecutor<\n TCommand extends PowerlinesCommand = PowerlinesCommand,\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n>(\n command: TCommand,\n executorFn: (\n context: PowerlinesExecutorContext<TCommand, TExecutorSchema>,\n api: PowerlinesEngine\n ) =>\n | Promise<BaseExecutorResult | null | undefined>\n | BaseExecutorResult\n | null\n | undefined\n): PromiseExecutor<TExecutorSchema> {\n return withRunExecutor(\n `Powerlines ${command} command executor`,\n async (\n options: TExecutorSchema,\n context: ExecutorContext,\n workspaceConfig: StormWorkspaceConfig\n ): Promise<BaseExecutorResult | null | undefined> => {\n if (!context.projectName) {\n throw new Error(\n \"The executor requires `projectName` on the context object.\"\n );\n }\n\n if (\n !context.projectName ||\n !context.projectsConfigurations?.projects ||\n !context.projectsConfigurations.projects[context.projectName] ||\n !context.projectsConfigurations.projects[context.projectName]?.root\n ) {\n throw new Error(\n \"The executor requires `projectsConfigurations` on the context object.\"\n );\n }\n\n const projectConfig =\n context.projectsConfigurations.projects[context.projectName]!;\n\n const jiti = createJiti(context.root, { cache: false });\n const { createEngine } = await jiti.import<{\n createEngine: typeof import(\"powerlines\").createEngine;\n }>(jiti.esmResolve(\"powerlines\"));\n\n const api = await createEngine({\n name: context.projectName,\n cwd: context.root,\n root: projectConfig.root,\n configFile: options.configFile || options.config,\n mode: options.mode as Mode\n });\n\n try {\n return await Promise.resolve(\n executorFn(\n defu(\n {\n projectName: context.projectName,\n options,\n workspaceConfig,\n command,\n inlineConfig: defu(\n {\n command,\n description: projectConfig.metadata?.description,\n projectType: projectConfig.projectType,\n additionalArgs: options.additionalArgs,\n output: {\n path: options.outputPath,\n copy:\n options.copyPath === false\n ? false\n : {\n path: options.copyPath,\n assets: options.assets\n },\n minify: options.minify,\n sourceMap: options.sourceMap\n } as OutputConfig,\n resolve: {\n external: options.external,\n noExternal: options.noExternal,\n skipNodeModulesBundle: options.skipNodeModulesBundle\n }\n },\n options\n )\n },\n context\n ),\n api\n )\n );\n } catch (error) {\n writeError(\n `An error occurred while executing the Powerlines ${\n command\n } command executor: ${\n isError(error)\n ? `${error.message}\n\n${error.stack}`\n : \"Unknown error\"\n }`\n );\n\n return { success: false };\n } finally {\n await api.finalize();\n }\n },\n {\n skipReadingConfig: false,\n hooks: {\n applyDefaultOptions: (options: Partial<TExecutorSchema>) => {\n options.copyPath ??= \"dist/{projectRoot}\";\n\n return options as TExecutorSchema;\n }\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAwDA,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,UAAU;;IAGxB;EACE,mBAAmB;EACnB,OAAO,EACL,sBAAsB,YAAsC;AAC1D,WAAQ,aAAa;AAErB,UAAO;KAEV;EACF,CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-executor.untyped-Kz2OUE_8.mjs","names":[],"sources":["../../src/base/base-executor.untyped.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { defineUntypedSchema } from \"untyped\";\n\nexport default defineUntypedSchema({\n $schema: {\n id: \"BaseExecutorSchema\",\n title: \"Base Executor\",\n description:\n \"A shared/base schema type definition for Powerlines executors\",\n required: []\n },\n config: {\n $schema: {\n title: \"Powerlines Configuration File\",\n type: \"string\",\n format: \"path\",\n description:\n \"The path to the Powerlines configuration file. Alias for `configFile`.\"\n }\n },\n configFile: {\n $schema: {\n title: \"Powerlines Configuration File\",\n type: \"string\",\n format: \"path\",\n description:\n \"The path to the Powerlines configuration file. Alias for `config`.\"\n }\n },\n input: {\n $schema: {\n title: \"Input Entry File(s)\",\n format: \"path\",\n type: \"array\",\n description: \"The entry file(s) that serve as the input for the project\",\n items: { type: \"string\" }\n }\n },\n tsconfig: {\n $schema: {\n title: \"TSConfig Path\",\n type: \"string\",\n format: \"path\",\n description: \"The path to the tsconfig file\"\n }\n },\n outputPath: {\n $schema: {\n title: \"Output Path\",\n type: \"string\",\n format: \"path\",\n description: \"The path to the output directory for the build artifacts\"\n }\n },\n copyPath: {\n $schema: {\n title: \"Copy Path\",\n description: \"A directory path to copy the build artifacts into\",\n oneOf: [\n { type: \"string\", format: \"path\" },\n { type: \"boolean\", enum: [false] }\n ]\n }\n },\n sourceMap: {\n $schema: {\n title: \"Sourcemap\",\n type: \"boolean\",\n description: \"Generate a sourcemap\"\n }\n },\n minify: {\n $schema: {\n title: \"Minify\",\n type: \"boolean\",\n description: \"Minify the output\"\n }\n },\n format: {\n $schema: {\n title: \"Format\",\n type: \"array\",\n description: \"The format to build\",\n items: {\n type: \"string\",\n enum: [\"cjs\", \"esm\", \"iife\"]\n }\n },\n $resolve: (val: string[] = [\"cjs\", \"esm\"]) => ([] as string[]).concat(val)\n },\n platform: {\n $schema: {\n title: \"Platform\",\n type: \"string\",\n description: \"The platform to build\",\n enum: [\"neutral\", \"node\", \"browser\"]\n }\n },\n external: {\n $schema: {\n title: \"External\",\n type: \"array\",\n description: \"The external dependencies\"\n },\n $resolve: (val: string[] = []) => ([] as string[]).concat(val)\n },\n noExternal: {\n $schema: {\n title: \"No External\",\n type: \"array\",\n description: \"The dependencies that should not be treated as external\"\n },\n $resolve: (val: string[] = []) => ([] as string[]).concat(val)\n },\n skipNodeModulesBundle: {\n $schema: {\n title: \"Skip Node Modules Bundle\",\n type: \"boolean\",\n description:\n \"Skip bundling node_modules during the build process (if required)\"\n }\n },\n mode: {\n $schema: {\n title: \"Mode\",\n type: \"string\",\n description: \"The build mode\",\n enum: [\"development\", \"test\", \"production\"]\n }\n },\n logLevel: {\n $schema: {\n title: \"Log Level\",\n type: \"string\",\n description: \"The log level to use for the build process\",\n enum: [\n \"fatal\",\n \"error\",\n \"warn\",\n \"success\",\n \"info\",\n \"debug\",\n \"trace\",\n \"silent\"\n ]\n }\n },\n define: {\n $schema: {\n title: \"Define\",\n type: \"object\",\n tsType: \"Record<string, string>\",\n description: \"The `define` values\"\n },\n $resolve: (val: Record<string, string> = {}) => val,\n $default: {}\n },\n assets: {\n $schema: {\n title: \"Assets\",\n type: \"any\",\n tsType:\n \"Array<{ input?: string; output?: string; glob: string; ignore?: string[]; dot?: boolean; }>\",\n description: \"The `assets` values\"\n }\n },\n additionalArgs: {\n $schema: {\n title: \"Additional Arguments\",\n type: \"object\",\n tsType: \"Record<string, string>\",\n description:\n \"The additional arguments provided during execution of the command\"\n },\n $resolve: (val: Record<string, string> = {}) => val,\n $default: {}\n }\n});\n"],"mappings":";;;AAoBA,oCAAe,oBAAoB;CACjC,SAAS;EACP,IAAI;EACJ,OAAO;EACP,aACE;EACF,UAAU,EAAE;EACb;CACD,QAAQ,EACN,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aACE;EACH,EACF;CACD,YAAY,EACV,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aACE;EACH,EACF;CACD,OAAO,EACL,SAAS;EACP,OAAO;EACP,QAAQ;EACR,MAAM;EACN,aAAa;EACb,OAAO,EAAE,MAAM,UAAU;EAC1B,EACF;CACD,UAAU,EACR,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aAAa;EACd,EACF;CACD,YAAY,EACV,SAAS;EACP,OAAO;EACP,MAAM;EACN,QAAQ;EACR,aAAa;EACd,EACF;CACD,UAAU,EACR,SAAS;EACP,OAAO;EACP,aAAa;EACb,OAAO,CACL;GAAE,MAAM;GAAU,QAAQ;GAAQ,EAClC;GAAE,MAAM;GAAW,MAAM,CAAC,MAAM;GAAE,CACnC;EACF,EACF;CACD,WAAW,EACT,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;EACd,EACF;CACD,QAAQ,EACN,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa;EACd,EACF;CACD,QAAQ;EACN,SAAS;GACP,OAAO;GACP,MAAM;GACN,aAAa;GACb,OAAO;IACL,MAAM;IACN,MAAM;KAAC;KAAO;KAAO;KAAO;IAC7B;GACF;EACD,WAAW,MAAgB,CAAC,OAAO,MAAM,KAAM,EAAE,CAAc,OAAO,IAAI;EAC3E;CACD,UAAU,EACR,SAAS;EACP,OAAO;EACP,MAAM;EACN,aAAa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