firefly-compiler 0.5.83 → 0.5.85
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/compiler/JsEmitter.ff +9 -8
- package/compiler/Main.ff +4 -4
- package/core/BuildSystem.ff +15 -0
- package/fireflysite/Dockerfile +6 -10
- package/fireflysite/Main.ff +0 -1
- package/output/js/ff/compiler/JsEmitter.mjs +12 -22
- package/output/js/ff/compiler/JsEmitter.mjs.map +4 -5
- package/output/js/ff/compiler/Main.mjs +6 -8
- package/output/js/ff/compiler/Main.mjs.map +3 -3
- package/output/js/ff/compiler/Main.run.mjs +1 -0
- package/output/js/ff/core/BuildSystem.mjs +34 -0
- package/output/js/ff/core/BuildSystem.mjs.map +19 -8
- package/package.json +1 -1
- package/vscode/package.json +1 -1
package/compiler/JsEmitter.ff
CHANGED
|
@@ -164,11 +164,11 @@ extend self: JsEmitter {
|
|
|
164
164
|
liner.writeLines()
|
|
165
165
|
self.emitInstanceDefinition(_)
|
|
166
166
|
}
|
|
167
|
-
let ignoreJsImports = if(self.emitTarget == EmitExecutable && self.moduleKey.packagePair.isCore()) {
|
|
167
|
+
let ignoreJsImports = [] /* if(self.emitTarget == EmitExecutable && self.moduleKey.packagePair.isCore()) {
|
|
168
168
|
["esbuild"]
|
|
169
169
|
} else {
|
|
170
170
|
[]
|
|
171
|
-
}
|
|
171
|
+
}*/
|
|
172
172
|
let jsImports = self.jsImporter.generateImports(ignoreJsImports.toSet())
|
|
173
173
|
if(!jsImports.isEmpty()) {
|
|
174
174
|
self.writeAnchorLines(anchor, jsImports)
|
|
@@ -195,7 +195,7 @@ extend self: JsEmitter {
|
|
|
195
195
|
|
|
196
196
|
makeRun(moduleName: String, functions: List[DFunction], mainPackagePair: PackagePair, bootstrapping: Bool): List[String] {
|
|
197
197
|
let buildMainFunction = functions.find {_.signature.name == "buildMain"}.filter {_ =>
|
|
198
|
-
self.emitTarget != EmitBrowser
|
|
198
|
+
self.emitTarget != EmitBrowser
|
|
199
199
|
}
|
|
200
200
|
let willRunOnNode = self.emitTarget != EmitBrowser
|
|
201
201
|
let targetMain = if(willRunOnNode) {"nodeMain"} else {"browserMain"}
|
|
@@ -207,6 +207,7 @@ extend self: JsEmitter {
|
|
|
207
207
|
}.toList()
|
|
208
208
|
"import {" + escapeKeyword(mainName) + "$} from './" + moduleName + ".mjs'"
|
|
209
209
|
self.emitImport(ModuleKey(PackagePair("ff", "core"), [], "Error"))
|
|
210
|
+
self.emitImport(ModuleKey(PackagePair("ff", "core"), [], "BuildSystem"))
|
|
210
211
|
"export async function $run$(fireflyPath_, arguments_) {"
|
|
211
212
|
"Error.stackTraceLimit = 50"
|
|
212
213
|
"const $task = {controller_: new AbortController(), subtasks_: new Set(), promise_: new Promise(() => {}), started_: performance.now() * 0.001}"
|
|
@@ -225,11 +226,11 @@ extend self: JsEmitter {
|
|
|
225
226
|
...if(!buildMainFunction.isEmpty()) {[
|
|
226
227
|
"await buildMain_$(system, $task)"]
|
|
227
228
|
} else {[]}
|
|
228
|
-
...if(self.emitTarget != EmitBuild) {[
|
|
229
|
+
...if(self.emitTarget != EmitBuild && self.emitTarget != EmitExecutable) {[
|
|
229
230
|
"await " + mainName + "_$(system, $task)"
|
|
230
231
|
]} else {[]}
|
|
231
|
-
...if(self.emitTarget ==
|
|
232
|
-
|
|
232
|
+
...if(self.emitTarget == EmitExecutable) {[
|
|
233
|
+
"if(system.assets_) await ff_core_BuildSystem.internalWriteAssets_$(system, system.assets_, $task)"
|
|
233
234
|
]} else {[]}
|
|
234
235
|
...if(!willRunOnNode) {[]} else {[
|
|
235
236
|
"} catch(error) {"
|
|
@@ -256,11 +257,11 @@ extend self: JsEmitter {
|
|
|
256
257
|
"await $run$(fireflyPath_, process.argv.slice(2))"
|
|
257
258
|
"})"
|
|
258
259
|
]
|
|
259
|
-
|
|
260
|
+
/*| EmitExecutable => [
|
|
260
261
|
"queueMicrotask(async () => {"
|
|
261
262
|
"await $run$(null, process.argv.slice(2))"
|
|
262
263
|
"})"
|
|
263
|
-
]
|
|
264
|
+
]*/
|
|
264
265
|
| _ => []
|
|
265
266
|
}
|
|
266
267
|
].join("\n")]}.else {[]}
|
package/compiler/Main.ff
CHANGED
|
@@ -67,10 +67,10 @@ main(system: NodeSystem): Unit {
|
|
|
67
67
|
)
|
|
68
68
|
prepareFireflyDirectory(system.path("."))
|
|
69
69
|
let mainPath = system.path(mainFile)
|
|
70
|
-
let moduleKey =
|
|
71
|
-
|
|
70
|
+
let moduleKey =
|
|
71
|
+
buildScript(system, mainPath, resolvedDependencies.mainPackagePair, EmitExecutable, resolvedDependencies)
|
|
72
72
|
bundleForExecutable(system, resolvedDependencies.mainPackagePair, moduleKey)
|
|
73
|
-
importAndRun(system, fireflyPath, "
|
|
73
|
+
importAndRun(system, fireflyPath, "executable", moduleKey, [])
|
|
74
74
|
|
|
75
75
|
| CheckCommand(filePath) =>
|
|
76
76
|
let errors = Builder.check(
|
|
@@ -176,7 +176,7 @@ buildScript(
|
|
|
176
176
|
} else {
|
|
177
177
|
resolvedDependencies.packagePaths.add(PackagePair("ff", "core"), fireflyPath.slash("core"))
|
|
178
178
|
}
|
|
179
|
-
let compilerModulePath = if(emitTarget != EmitBrowser
|
|
179
|
+
let compilerModulePath = if(emitTarget != EmitBrowser) {
|
|
180
180
|
fireflyPath.slash("output").slash("js").slash("ff").slash("compiler/Builder.mjs")
|
|
181
181
|
}
|
|
182
182
|
let targetName = emitTarget.{
|
package/core/BuildSystem.ff
CHANGED
|
@@ -209,3 +209,18 @@ internalCompile(buildSystem: BuildSystem, mainFiles: List[Path], target: String)
|
|
|
209
209
|
internalMainPackagePair(buildSystem: BuildSystem): Pair[String, String] {
|
|
210
210
|
Pair(buildSystem!->"mainPackagePair_"->"group_"?, buildSystem!->"mainPackagePair_"->"name_"?)
|
|
211
211
|
}
|
|
212
|
+
|
|
213
|
+
internalWriteAssets(system: NodeSystem, assetSystem: AssetSystem): Unit {
|
|
214
|
+
let path = system.path(".").slash(".firefly").path("output").slash("assets")
|
|
215
|
+
if(path.exists()) {path.delete()}
|
|
216
|
+
path.createDirectory()
|
|
217
|
+
Log.debug("Writing assets to " + path.absolute())
|
|
218
|
+
assetSystem.files.each {p, s =>
|
|
219
|
+
Log.debug(p)
|
|
220
|
+
if(!p.contains("..")) {
|
|
221
|
+
let assetPath = path.slash(p)
|
|
222
|
+
assetPath.parent().grab().createDirectory(createParentDirectories = True)
|
|
223
|
+
assetPath.writeStream(s())
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
package/fireflysite/Dockerfile
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
FROM node:22
|
|
2
|
-
|
|
3
|
-
RUN apt update
|
|
4
|
-
RUN apt install dumb-init
|
|
1
|
+
FROM node:22-slim
|
|
2
|
+
RUN apt update && apt install dumb-init
|
|
5
3
|
USER node
|
|
6
|
-
RUN mkdir /home/node/app
|
|
7
|
-
RUN mkdir /home/node/firefly
|
|
4
|
+
RUN mkdir /home/node/firefly && mkdir /home/node/app
|
|
8
5
|
WORKDIR /home/node/firefly
|
|
9
6
|
RUN npm install firefly-compiler
|
|
10
7
|
WORKDIR /home/node/app
|
|
11
|
-
|
|
12
|
-
COPY --chown=node:node .firefly/output/executable .firefly/output/executable
|
|
13
|
-
# This fetches Firefly packages but we should also do their npm install --no-bin-links
|
|
8
|
+
COPY --chown=node:node . .
|
|
14
9
|
RUN [ "/home/node/firefly/node_modules/.bin/firefly", "build", "Main.ff" ]
|
|
15
10
|
EXPOSE 8080
|
|
16
|
-
ENTRYPOINT [ "dumb-init", "node", ".firefly/output/executable/Main.
|
|
11
|
+
ENTRYPOINT [ "dumb-init", "node", "--harmony-temporal", ".firefly/output/executable/ff/fireflysite/Main.run.js", "0.0.0.0", "8080" ]
|
|
17
12
|
|
|
18
13
|
# Test it with
|
|
19
14
|
# podman build -t fireflysite .
|
|
20
15
|
# podman run -p 8080:8080 --rm -it fireflysite
|
|
16
|
+
# podman run --entrypoint /bin/bash --rm -it fireflysite
|
package/fireflysite/Main.ff
CHANGED
|
@@ -54,7 +54,6 @@ nodeMain(system: NodeSystem): Unit {
|
|
|
54
54
|
buildMain(system: BuildSystem) {
|
|
55
55
|
mutable assets = AssetSystem.create()
|
|
56
56
|
let browserAssets = system.bundleForBrowser(Router.modulesWithBrowserMain().map {_ + ".ff"}, sourceMaps = True)
|
|
57
|
-
//let browserAssets = system.compileForBrowser(Router.modulesWithBrowserMain().map {_ + ".ff"})
|
|
58
57
|
assets = assets.addAssets("/js/", browserAssets)
|
|
59
58
|
assets = assets.addAssets("/assets/", system.packageAssets().assets("/assets/"))
|
|
60
59
|
system.setAssets(assets)
|
|
@@ -763,9 +763,7 @@ const _w1 = for_a[for_i];
|
|
|
763
763
|
ff_compiler_JsEmitter.Liner_writeLines(liner_);
|
|
764
764
|
ff_compiler_JsEmitter.JsEmitter_emitInstanceDefinition(self_, _w1)
|
|
765
765
|
};
|
|
766
|
-
const ignoreJsImports_ =
|
|
767
|
-
? ["esbuild"]
|
|
768
|
-
: []);
|
|
766
|
+
const ignoreJsImports_ = [];
|
|
769
767
|
const jsImports_ = ff_compiler_JsImporter.JsImporter_generateImports(self_.jsImporter_, ff_core_List.List_toSet(ignoreJsImports_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String));
|
|
770
768
|
if((!ff_core_List.List_isEmpty(jsImports_))) {
|
|
771
769
|
ff_compiler_JsEmitter.JsEmitter_writeAnchorLines(self_, anchor_, jsImports_)
|
|
@@ -796,7 +794,7 @@ export function JsEmitter_makeRun(self_, moduleName_, functions_, mainPackagePai
|
|
|
796
794
|
const buildMainFunction_ = ff_core_Option.Option_filter(ff_core_List.List_find(functions_, ((_w1) => {
|
|
797
795
|
return (_w1.signature_.name_ === "buildMain")
|
|
798
796
|
})), ((_) => {
|
|
799
|
-
return
|
|
797
|
+
return ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget)
|
|
800
798
|
}));
|
|
801
799
|
const willRunOnNode_ = ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget);
|
|
802
800
|
const targetMain_ = (willRunOnNode_
|
|
@@ -814,7 +812,7 @@ return _w1.signature_.name_
|
|
|
814
812
|
})), ((mainName_) => {
|
|
815
813
|
return [ff_core_List.List_join([...ff_core_Option.Option_toList(ff_core_Option.Option_map(buildMainFunction_, ((buildMain_) => {
|
|
816
814
|
return (((("import {" + ff_compiler_JsEmitter.escapeKeyword_(buildMain_.signature_.name_)) + "$} from './") + moduleName_) + ".mjs'")
|
|
817
|
-
}))), (((("import {" + ff_compiler_JsEmitter.escapeKeyword_(mainName_)) + "$} from './") + moduleName_) + ".mjs'"), ff_compiler_JsEmitter.JsEmitter_emitImport(self_, ff_compiler_Syntax.ModuleKey(ff_compiler_Syntax.PackagePair("ff", "core"), [], "Error")), "export async function $run$(fireflyPath_, arguments_) {", "Error.stackTraceLimit = 50", "const $task = {controller_: new AbortController(), subtasks_: new Set(), promise_: new Promise(() => {}), started_: performance.now() * 0.001}", ...(ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget)
|
|
815
|
+
}))), (((("import {" + ff_compiler_JsEmitter.escapeKeyword_(mainName_)) + "$} from './") + moduleName_) + ".mjs'"), ff_compiler_JsEmitter.JsEmitter_emitImport(self_, ff_compiler_Syntax.ModuleKey(ff_compiler_Syntax.PackagePair("ff", "core"), [], "Error")), ff_compiler_JsEmitter.JsEmitter_emitImport(self_, ff_compiler_Syntax.ModuleKey(ff_compiler_Syntax.PackagePair("ff", "core"), [], "BuildSystem")), "export async function $run$(fireflyPath_, arguments_) {", "Error.stackTraceLimit = 50", "const $task = {controller_: new AbortController(), subtasks_: new Set(), promise_: new Promise(() => {}), started_: performance.now() * 0.001}", ...(ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget)
|
|
818
816
|
? ["let interval = setInterval(() => {}, 24 * 60 * 60 * 1000)"]
|
|
819
817
|
: []), "let system = {", "task_: $task,", "array_: arguments_,", "fireflyPath_: fireflyPath_,", (((("mainPackagePair_: {group_: \"" + mainPackagePair_.group_) + "\", name_: \"") + mainPackagePair_.name_) + "\"},"), (("executableMode_: " + (ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget.equals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitExecutable())
|
|
820
818
|
? "true"
|
|
@@ -822,10 +820,10 @@ return (((("import {" + ff_compiler_JsEmitter.escapeKeyword_(buildMain_.signatur
|
|
|
822
820
|
? "true"
|
|
823
821
|
: "false")), "}", "try {", ...((!ff_core_Option.Option_isEmpty(buildMainFunction_))
|
|
824
822
|
? ["await buildMain_$(system, $task)"]
|
|
825
|
-
: []), ...(ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBuild(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget)
|
|
823
|
+
: []), ...((ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBuild(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget) && ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitExecutable(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget))
|
|
826
824
|
? [(("await " + mainName_) + "_$(system, $task)")]
|
|
827
|
-
: []), ...(ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget.equals_(self_.emitTarget_, ff_compiler_JsEmitter.
|
|
828
|
-
? []
|
|
825
|
+
: []), ...(ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget.equals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitExecutable())
|
|
826
|
+
? ["if(system.assets_) await ff_core_BuildSystem.internalWriteAssets_$(system, system.assets_, $task)"]
|
|
829
827
|
: []), ...((!willRunOnNode_)
|
|
830
828
|
? []
|
|
831
829
|
: ["} catch(error) {", "console.error(ff_core_Error.Error_stack(error))", "process.exit(1)"]), "} finally {", ...(ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget)
|
|
@@ -837,9 +835,6 @@ return ["queueMicrotask(async () => {", "await $run$(null, [])", "})"]
|
|
|
837
835
|
if(_1.EmitNode && bootstrapping_) {
|
|
838
836
|
return ["import * as path from 'node:path'", "queueMicrotask(async () => {", "let fireflyPath_ = path.dirname(path.dirname(path.dirname(path.dirname(path.dirname(process.argv[1])))))", "await $run$(fireflyPath_, process.argv.slice(2))", "})"]
|
|
839
837
|
}
|
|
840
|
-
if(_1.EmitExecutable) {
|
|
841
|
-
return ["queueMicrotask(async () => {", "await $run$(null, process.argv.slice(2))", "})"]
|
|
842
|
-
}
|
|
843
838
|
{
|
|
844
839
|
return []
|
|
845
840
|
}
|
|
@@ -4377,9 +4372,7 @@ const _w1 = for_a[for_i];
|
|
|
4377
4372
|
ff_compiler_JsEmitter.Liner_writeLines(liner_);
|
|
4378
4373
|
ff_compiler_JsEmitter.JsEmitter_emitInstanceDefinition(self_, _w1)
|
|
4379
4374
|
};
|
|
4380
|
-
const ignoreJsImports_ =
|
|
4381
|
-
? ["esbuild"]
|
|
4382
|
-
: []);
|
|
4375
|
+
const ignoreJsImports_ = [];
|
|
4383
4376
|
const jsImports_ = ff_compiler_JsImporter.JsImporter_generateImports(self_.jsImporter_, ff_core_List.List_toSet(ignoreJsImports_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String));
|
|
4384
4377
|
if((!ff_core_List.List_isEmpty(jsImports_))) {
|
|
4385
4378
|
ff_compiler_JsEmitter.JsEmitter_writeAnchorLines(self_, anchor_, jsImports_)
|
|
@@ -4410,7 +4403,7 @@ export async function JsEmitter_makeRun$(self_, moduleName_, functions_, mainPac
|
|
|
4410
4403
|
const buildMainFunction_ = ff_core_Option.Option_filter(ff_core_List.List_find(functions_, ((_w1) => {
|
|
4411
4404
|
return (_w1.signature_.name_ === "buildMain")
|
|
4412
4405
|
})), ((_) => {
|
|
4413
|
-
return
|
|
4406
|
+
return ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget)
|
|
4414
4407
|
}));
|
|
4415
4408
|
const willRunOnNode_ = ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget);
|
|
4416
4409
|
const targetMain_ = (willRunOnNode_
|
|
@@ -4428,7 +4421,7 @@ return _w1.signature_.name_
|
|
|
4428
4421
|
})), ((mainName_) => {
|
|
4429
4422
|
return [ff_core_List.List_join([...ff_core_Option.Option_toList(ff_core_Option.Option_map(buildMainFunction_, ((buildMain_) => {
|
|
4430
4423
|
return (((("import {" + ff_compiler_JsEmitter.escapeKeyword_(buildMain_.signature_.name_)) + "$} from './") + moduleName_) + ".mjs'")
|
|
4431
|
-
}))), (((("import {" + ff_compiler_JsEmitter.escapeKeyword_(mainName_)) + "$} from './") + moduleName_) + ".mjs'"), ff_compiler_JsEmitter.JsEmitter_emitImport(self_, ff_compiler_Syntax.ModuleKey(ff_compiler_Syntax.PackagePair("ff", "core"), [], "Error")), "export async function $run$(fireflyPath_, arguments_) {", "Error.stackTraceLimit = 50", "const $task = {controller_: new AbortController(), subtasks_: new Set(), promise_: new Promise(() => {}), started_: performance.now() * 0.001}", ...(ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget)
|
|
4424
|
+
}))), (((("import {" + ff_compiler_JsEmitter.escapeKeyword_(mainName_)) + "$} from './") + moduleName_) + ".mjs'"), ff_compiler_JsEmitter.JsEmitter_emitImport(self_, ff_compiler_Syntax.ModuleKey(ff_compiler_Syntax.PackagePair("ff", "core"), [], "Error")), ff_compiler_JsEmitter.JsEmitter_emitImport(self_, ff_compiler_Syntax.ModuleKey(ff_compiler_Syntax.PackagePair("ff", "core"), [], "BuildSystem")), "export async function $run$(fireflyPath_, arguments_) {", "Error.stackTraceLimit = 50", "const $task = {controller_: new AbortController(), subtasks_: new Set(), promise_: new Promise(() => {}), started_: performance.now() * 0.001}", ...(ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget)
|
|
4432
4425
|
? ["let interval = setInterval(() => {}, 24 * 60 * 60 * 1000)"]
|
|
4433
4426
|
: []), "let system = {", "task_: $task,", "array_: arguments_,", "fireflyPath_: fireflyPath_,", (((("mainPackagePair_: {group_: \"" + mainPackagePair_.group_) + "\", name_: \"") + mainPackagePair_.name_) + "\"},"), (("executableMode_: " + (ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget.equals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitExecutable())
|
|
4434
4427
|
? "true"
|
|
@@ -4436,10 +4429,10 @@ return (((("import {" + ff_compiler_JsEmitter.escapeKeyword_(buildMain_.signatur
|
|
|
4436
4429
|
? "true"
|
|
4437
4430
|
: "false")), "}", "try {", ...((!ff_core_Option.Option_isEmpty(buildMainFunction_))
|
|
4438
4431
|
? ["await buildMain_$(system, $task)"]
|
|
4439
|
-
: []), ...(ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBuild(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget)
|
|
4432
|
+
: []), ...((ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBuild(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget) && ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitExecutable(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget))
|
|
4440
4433
|
? [(("await " + mainName_) + "_$(system, $task)")]
|
|
4441
|
-
: []), ...(ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget.equals_(self_.emitTarget_, ff_compiler_JsEmitter.
|
|
4442
|
-
? []
|
|
4434
|
+
: []), ...(ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget.equals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitExecutable())
|
|
4435
|
+
? ["if(system.assets_) await ff_core_BuildSystem.internalWriteAssets_$(system, system.assets_, $task)"]
|
|
4443
4436
|
: []), ...((!willRunOnNode_)
|
|
4444
4437
|
? []
|
|
4445
4438
|
: ["} catch(error) {", "console.error(ff_core_Error.Error_stack(error))", "process.exit(1)"]), "} finally {", ...(ff_core_Equal.notEquals_(self_.emitTarget_, ff_compiler_JsEmitter.EmitBrowser(), ff_compiler_JsEmitter.ff_core_Equal_Equal$ff_compiler_JsEmitter_EmitTarget)
|
|
@@ -4451,9 +4444,6 @@ return ["queueMicrotask(async () => {", "await $run$(null, [])", "})"]
|
|
|
4451
4444
|
if(_1.EmitNode && bootstrapping_) {
|
|
4452
4445
|
return ["import * as path from 'node:path'", "queueMicrotask(async () => {", "let fireflyPath_ = path.dirname(path.dirname(path.dirname(path.dirname(path.dirname(process.argv[1])))))", "await $run$(fireflyPath_, process.argv.slice(2))", "})"]
|
|
4453
4446
|
}
|
|
4454
|
-
if(_1.EmitExecutable) {
|
|
4455
|
-
return ["queueMicrotask(async () => {", "await $run$(null, process.argv.slice(2))", "})"]
|
|
4456
|
-
}
|
|
4457
4447
|
{
|
|
4458
4448
|
return []
|
|
4459
4449
|
}
|