firefly-compiler 0.5.31 → 0.5.32
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/bin/Release.ff
CHANGED
|
@@ -95,7 +95,7 @@ requireVsceLoggedIn(system: NodeSystem, directory: Path) {
|
|
|
95
95
|
run(system: NodeSystem, command: String, arguments: List[String], directory: Path): ProcessResult {
|
|
96
96
|
system.writeLine("")
|
|
97
97
|
system.writeLine(command + " " + arguments.join(" "))
|
|
98
|
-
system.execute(command, arguments, directory = Some(directory))
|
|
98
|
+
system.execute(command, arguments, directory = Some(directory), shell = True)
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
runSuccessful(system: NodeSystem, command: String, arguments: List[String], directory: Path): Buffer {
|
package/core/NodeSystem.ff
CHANGED
|
@@ -106,7 +106,6 @@ extend self: NodeSystem {
|
|
|
106
106
|
environment: Option[Map[String, String]] = None
|
|
107
107
|
maxBuffer: Int = 16777216
|
|
108
108
|
killSignal: Int = 9
|
|
109
|
-
windowsWhere: Bool = True
|
|
110
109
|
shell: Bool = False
|
|
111
110
|
): ProcessResult
|
|
112
111
|
target node async """
|
|
@@ -119,12 +118,6 @@ extend self: NodeSystem {
|
|
|
119
118
|
ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String
|
|
120
119
|
);
|
|
121
120
|
}
|
|
122
|
-
if(windowsWhere_ && process.platform === 'win32') {
|
|
123
|
-
const cmd = process.env.ComSpec || "cmd.exe";
|
|
124
|
-
command_ = (
|
|
125
|
-
await internalWindowsWhere_$(self_, cmd, command_, directory_, environment_, $task)
|
|
126
|
-
).value_ || command_;
|
|
127
|
-
}
|
|
128
121
|
const newProcess = childProcess.spawn(command_, arguments_, {
|
|
129
122
|
cwd: directory_.value_,
|
|
130
123
|
windowsHide: true,
|
|
@@ -196,24 +189,3 @@ internalProcessError(problem: String): Error {
|
|
|
196
189
|
error
|
|
197
190
|
}
|
|
198
191
|
}
|
|
199
|
-
|
|
200
|
-
internalWindowsWhere(
|
|
201
|
-
system: NodeSystem
|
|
202
|
-
cmd: String
|
|
203
|
-
command: String
|
|
204
|
-
directory: Option[Path] = None
|
|
205
|
-
environment: Option[Map[String, String]] = None
|
|
206
|
-
): Option[String] {
|
|
207
|
-
if(!command.all {c => c.isAsciiLetterOrDigit() || c == '_' || c == '-'}) {None} else:
|
|
208
|
-
let out = system.execute(
|
|
209
|
-
"where",
|
|
210
|
-
[command],
|
|
211
|
-
directory = directory
|
|
212
|
-
environment = environment
|
|
213
|
-
windowsWhere = False
|
|
214
|
-
shell = True
|
|
215
|
-
)
|
|
216
|
-
out.standardOut.toString().lines().filter {line =>
|
|
217
|
-
out.exitCode == 0 && line.split('\\').last().any {_.contains(".")}
|
|
218
|
-
}.first()
|
|
219
|
-
}
|
|
@@ -172,7 +172,7 @@ const nodeModules_ = ff_core_Path.Path_slash(includePath_, "node_modules");
|
|
|
172
172
|
const packageJson_ = ff_core_Path.Path_slash(includePath_, "package.json");
|
|
173
173
|
if(((!ff_core_Path.Path_exists(nodeModules_, false, false, false)) && ff_core_Path.Path_exists(packageJson_, false, false, false))) {
|
|
174
174
|
ff_core_NodeSystem.NodeSystem_writeErrorLine(system_, ("Running npm install --no-package-lock --no-bin-links in " + ff_core_Path.Path_absolute(includePath_)));
|
|
175
|
-
const result_ = ff_core_NodeSystem.NodeSystem_execute(system_, "npm", ["install", "--no-package-lock", "--no-bin-links"], ff_core_Buffer.new_(0, false), ff_core_Option.Some(includePath_), ff_core_Option.None(), 16777216, 9, true
|
|
175
|
+
const result_ = ff_core_NodeSystem.NodeSystem_execute(system_, "npm", ["install", "--no-package-lock", "--no-bin-links"], ff_core_Buffer.new_(0, false), ff_core_Option.Some(includePath_), ff_core_Option.None(), 16777216, 9, true);
|
|
176
176
|
if((result_.exitCode_ !== 0)) {
|
|
177
177
|
ff_core_NodeSystem.NodeSystem_writeErrorLine(system_, (("Running npm failed with exit code " + result_.exitCode_) + ":"));
|
|
178
178
|
ff_core_NodeSystem.NodeSystem_writeErrorBuffer(system_, result_.standardOut_);
|
|
@@ -391,7 +391,7 @@ const nodeModules_ = (await ff_core_Path.Path_slash$(includePath_, "node_modules
|
|
|
391
391
|
const packageJson_ = (await ff_core_Path.Path_slash$(includePath_, "package.json", $task));
|
|
392
392
|
if(((!(await ff_core_Path.Path_exists$(nodeModules_, false, false, false, $task))) && (await ff_core_Path.Path_exists$(packageJson_, false, false, false, $task)))) {
|
|
393
393
|
(await ff_core_NodeSystem.NodeSystem_writeErrorLine$(system_, ("Running npm install --no-package-lock --no-bin-links in " + (await ff_core_Path.Path_absolute$(includePath_, $task))), $task));
|
|
394
|
-
const result_ = (await ff_core_NodeSystem.NodeSystem_execute$(system_, "npm", ["install", "--no-package-lock", "--no-bin-links"], ff_core_Buffer.new_(0, false), ff_core_Option.Some(includePath_), ff_core_Option.None(), 16777216, 9, true,
|
|
394
|
+
const result_ = (await ff_core_NodeSystem.NodeSystem_execute$(system_, "npm", ["install", "--no-package-lock", "--no-bin-links"], ff_core_Buffer.new_(0, false), ff_core_Option.Some(includePath_), ff_core_Option.None(), 16777216, 9, true, $task));
|
|
395
395
|
if((result_.exitCode_ !== 0)) {
|
|
396
396
|
(await ff_core_NodeSystem.NodeSystem_writeErrorLine$(system_, (("Running npm failed with exit code " + result_.exitCode_) + ":"), $task));
|
|
397
397
|
(await ff_core_NodeSystem.NodeSystem_writeErrorBuffer$(system_, result_.standardOut_, $task));
|
|
@@ -129,21 +129,6 @@ return error_
|
|
|
129
129
|
}))
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
export function internalWindowsWhere_(system_, cmd_, command_, directory_ = ff_core_Option.None(), environment_ = ff_core_Option.None()) {
|
|
133
|
-
if((!ff_core_String.String_all(command_, ((c_) => {
|
|
134
|
-
return ((ff_core_Char.Char_isAsciiLetterOrDigit(c_) || (c_ === 95)) || (c_ === 45))
|
|
135
|
-
})))) {
|
|
136
|
-
return ff_core_Option.None()
|
|
137
|
-
} else {
|
|
138
|
-
const out_ = ff_core_NodeSystem.NodeSystem_execute(system_, "where", [command_], ff_core_Buffer.new_(0, false), directory_, environment_, 16777216, 9, false, true);
|
|
139
|
-
return ff_core_List.List_first(ff_core_List.List_filter(ff_core_String.String_lines(ff_core_Buffer.Buffer_toString(out_.standardOut_, "utf8")), ((line_) => {
|
|
140
|
-
return ((out_.exitCode_ === 0) && ff_core_Option.Option_any(ff_core_List.List_last(ff_core_String.String_split(line_, 92)), ((_w1) => {
|
|
141
|
-
return ff_core_String.String_contains(_w1, ".")
|
|
142
|
-
})))
|
|
143
|
-
})))
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
132
|
export async function internalAssets_$(system_, $task) {
|
|
148
133
|
return system_.assets_
|
|
149
134
|
}
|
|
@@ -165,21 +150,6 @@ return error_
|
|
|
165
150
|
}))
|
|
166
151
|
}
|
|
167
152
|
|
|
168
|
-
export async function internalWindowsWhere_$(system_, cmd_, command_, directory_ = ff_core_Option.None(), environment_ = ff_core_Option.None(), $task) {
|
|
169
|
-
if((!ff_core_String.String_all(command_, ((c_) => {
|
|
170
|
-
return ((ff_core_Char.Char_isAsciiLetterOrDigit(c_) || (c_ === 95)) || (c_ === 45))
|
|
171
|
-
})))) {
|
|
172
|
-
return ff_core_Option.None()
|
|
173
|
-
} else {
|
|
174
|
-
const out_ = (await ff_core_NodeSystem.NodeSystem_execute$(system_, "where", [command_], ff_core_Buffer.new_(0, false), directory_, environment_, 16777216, 9, false, true, $task));
|
|
175
|
-
return ff_core_List.List_first(ff_core_List.List_filter(ff_core_String.String_lines(ff_core_Buffer.Buffer_toString(out_.standardOut_, "utf8")), ((line_) => {
|
|
176
|
-
return ((out_.exitCode_ === 0) && ff_core_Option.Option_any(ff_core_List.List_last(ff_core_String.String_split(line_, 92)), ((_w1) => {
|
|
177
|
-
return ff_core_String.String_contains(_w1, ".")
|
|
178
|
-
})))
|
|
179
|
-
})))
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
153
|
export function NodeSystem_arguments(self_) {
|
|
184
154
|
throw new Error('Function NodeSystem_arguments is missing on this target in sync context.');
|
|
185
155
|
}
|
|
@@ -276,7 +246,7 @@ export function NodeSystem_environment(self_) {
|
|
|
276
246
|
throw new Error('Function NodeSystem_environment is missing on this target in sync context.');
|
|
277
247
|
}
|
|
278
248
|
|
|
279
|
-
export function NodeSystem_execute(self_, command_, arguments_, standardIn_ = ff_core_Buffer.new_(0), directory_ = ff_core_Option.None(), environment_ = ff_core_Option.None(), maxBuffer_ = 16777216, killSignal_ = 9,
|
|
249
|
+
export function NodeSystem_execute(self_, command_, arguments_, standardIn_ = ff_core_Buffer.new_(0), directory_ = ff_core_Option.None(), environment_ = ff_core_Option.None(), maxBuffer_ = 16777216, killSignal_ = 9, shell_ = false) {
|
|
280
250
|
throw new Error('Function NodeSystem_execute is missing on this target in sync context.');
|
|
281
251
|
}
|
|
282
252
|
|
|
@@ -390,7 +360,7 @@ export async function NodeSystem_environment$(self_, $task) {
|
|
|
390
360
|
|
|
391
361
|
}
|
|
392
362
|
|
|
393
|
-
export async function NodeSystem_execute$(self_, command_, arguments_, standardIn_ = ff_core_Buffer.new_(0), directory_ = ff_core_Option.None(), environment_ = ff_core_Option.None(), maxBuffer_ = 16777216, killSignal_ = 9,
|
|
363
|
+
export async function NodeSystem_execute$(self_, command_, arguments_, standardIn_ = ff_core_Buffer.new_(0), directory_ = ff_core_Option.None(), environment_ = ff_core_Option.None(), maxBuffer_ = 16777216, killSignal_ = 9, shell_ = false, $task) {
|
|
394
364
|
|
|
395
365
|
const childProcess = import$3;
|
|
396
366
|
const environment = environment_.value_ !== void 0 ? {} : process.env;
|
|
@@ -401,12 +371,6 @@ export async function NodeSystem_execute$(self_, command_, arguments_, standardI
|
|
|
401
371
|
ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String
|
|
402
372
|
);
|
|
403
373
|
}
|
|
404
|
-
if(windowsWhere_ && process.platform === 'win32') {
|
|
405
|
-
const cmd = process.env.ComSpec || "cmd.exe";
|
|
406
|
-
command_ = (
|
|
407
|
-
await internalWindowsWhere_$(self_, cmd, command_, directory_, environment_, $task)
|
|
408
|
-
).value_ || command_;
|
|
409
|
-
}
|
|
410
374
|
const newProcess = childProcess.spawn(command_, arguments_, {
|
|
411
375
|
cwd: directory_.value_,
|
|
412
376
|
windowsHide: true,
|
package/package.json
CHANGED