firefly-compiler 0.4.4 → 0.4.6
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/.hintrc +5 -0
- package/README.md +42 -61
- package/compiler/Compiler.ff +6 -2
- package/compiler/Deriver.ff +10 -0
- package/compiler/Environment.ff +2 -1
- package/compiler/JsEmitter.ff +29 -17
- package/compiler/Resolver.ff +1 -1
- package/core/.firefly/package.ff +1 -2
- package/core/Box.ff +7 -0
- package/core/BuildSystem.ff +5 -4
- package/core/Core.ff +4 -0
- package/core/HttpClient.ff +1 -1
- package/core/JsValue.ff +22 -1
- package/core/Lock.ff +4 -4
- package/core/NodeSystem.ff +12 -3
- package/core/Path.ff +1 -1
- package/core/SourceLocation.ff +41 -0
- package/core/Stack.ff +6 -6
- package/core/StringMap.ff +3 -3
- package/lsp/LanguageServer.ff +32 -7
- package/lsp/stderr.txt +1 -0
- package/lsp/stdin.txt +11 -0
- package/lsp/stdout.txt +41 -0
- package/lux/.firefly/package.ff +2 -0
- package/lux/Lux.ff +473 -0
- package/lux/LuxEvent.ff +116 -0
- package/lux/Main.ff +126 -0
- package/lux/Main2.ff +144 -0
- package/meetup/AutoCompletion.ff +6 -0
- package/output/js/ff/compiler/Builder.mjs +444 -440
- package/output/js/ff/compiler/Compiler.mjs +416 -410
- package/output/js/ff/compiler/Dependencies.mjs +389 -385
- package/output/js/ff/compiler/Deriver.mjs +1170 -1166
- package/output/js/ff/compiler/Dictionaries.mjs +1309 -1305
- package/output/js/ff/compiler/Environment.mjs +1015 -1005
- package/output/js/ff/compiler/Inference.mjs +4268 -4264
- package/output/js/ff/compiler/JsEmitter.mjs +5391 -5353
- package/output/js/ff/compiler/JsImporter.mjs +266 -262
- package/output/js/ff/compiler/LspHook.mjs +793 -789
- package/output/js/ff/compiler/Main.mjs +1699 -1695
- package/output/js/ff/compiler/Parser.mjs +4008 -4004
- package/output/js/ff/compiler/Patterns.mjs +927 -923
- package/output/js/ff/compiler/Resolver.mjs +2307 -2303
- package/output/js/ff/compiler/Substitution.mjs +1150 -1146
- package/output/js/ff/compiler/Syntax.mjs +12434 -12430
- package/output/js/ff/compiler/Token.mjs +3096 -3092
- package/output/js/ff/compiler/Tokenizer.mjs +593 -589
- package/output/js/ff/compiler/Unification.mjs +1752 -1748
- package/output/js/ff/compiler/Wildcards.mjs +608 -604
- package/output/js/ff/compiler/Workspace.mjs +687 -683
- package/output/js/ff/core/Any.mjs +143 -139
- package/output/js/ff/core/Array.mjs +547 -543
- package/output/js/ff/core/AssetSystem.mjs +274 -270
- package/output/js/ff/core/Atomic.mjs +154 -150
- package/output/js/ff/core/Bool.mjs +152 -141
- package/output/js/ff/core/Box.mjs +112 -0
- package/output/js/ff/core/BrowserSystem.mjs +126 -122
- package/output/js/ff/core/Buffer.mjs +395 -391
- package/output/js/ff/core/BuildSystem.mjs +296 -290
- package/output/js/ff/core/Channel.mjs +189 -185
- package/output/js/ff/core/Char.mjs +149 -145
- package/output/js/ff/core/Core.mjs +300 -288
- package/output/js/ff/core/Duration.mjs +116 -112
- package/output/js/ff/core/Equal.mjs +179 -175
- package/output/js/ff/core/Error.mjs +142 -138
- package/output/js/ff/core/FileHandle.mjs +150 -146
- package/output/js/ff/core/Float.mjs +225 -214
- package/output/js/ff/core/HttpClient.mjs +190 -186
- package/output/js/ff/core/Instant.mjs +109 -105
- package/output/js/ff/core/Int.mjs +265 -254
- package/output/js/ff/core/IntMap.mjs +280 -276
- package/output/js/ff/core/JsSystem.mjs +238 -234
- package/output/js/ff/core/JsValue.mjs +714 -664
- package/output/js/ff/core/List.mjs +2334 -2321
- package/output/js/ff/core/Lock.mjs +230 -226
- package/output/js/ff/core/Log.mjs +163 -159
- package/output/js/ff/core/Map.mjs +362 -358
- package/output/js/ff/core/NodeSystem.mjs +302 -283
- package/output/js/ff/core/Nothing.mjs +104 -100
- package/output/js/ff/core/Option.mjs +1015 -1002
- package/output/js/ff/core/Ordering.mjs +730 -726
- package/output/js/ff/core/Pair.mjs +331 -318
- package/output/js/ff/core/Path.mjs +546 -542
- package/output/js/ff/core/RbMap.mjs +1940 -1936
- package/output/js/ff/core/Serializable.mjs +428 -424
- package/output/js/ff/core/Set.mjs +254 -250
- package/output/js/ff/core/Show.mjs +205 -201
- package/output/js/ff/core/SourceLocation.mjs +229 -0
- package/output/js/ff/core/Stack.mjs +541 -537
- package/output/js/ff/core/Stream.mjs +1304 -1300
- package/output/js/ff/core/String.mjs +365 -354
- package/output/js/ff/core/StringMap.mjs +280 -276
- package/output/js/ff/core/Task.mjs +320 -316
- package/output/js/ff/core/Try.mjs +507 -503
- package/output/js/ff/core/Unit.mjs +151 -103
- package/package.json +29 -29
- package/vscode/package-lock.json +5 -5
- package/vscode/package.json +1 -1
|
@@ -1,142 +1,146 @@
|
|
|
1
|
-
import * as import$0 from 'esbuild';
|
|
2
|
-
|
|
3
|
-
import * as ff_core_Any from "../../ff/core/Any.mjs"
|
|
4
|
-
|
|
5
|
-
import * as ff_core_Array from "../../ff/core/Array.mjs"
|
|
6
|
-
|
|
7
|
-
import * as ff_core_AssetSystem from "../../ff/core/AssetSystem.mjs"
|
|
8
|
-
|
|
9
|
-
import * as ff_core_Atomic from "../../ff/core/Atomic.mjs"
|
|
10
|
-
|
|
11
|
-
import * as ff_core_Bool from "../../ff/core/Bool.mjs"
|
|
12
|
-
|
|
13
|
-
import * as
|
|
14
|
-
|
|
15
|
-
import * as
|
|
16
|
-
|
|
17
|
-
import * as
|
|
18
|
-
|
|
19
|
-
import * as
|
|
20
|
-
|
|
21
|
-
import * as
|
|
22
|
-
|
|
23
|
-
import * as
|
|
24
|
-
|
|
25
|
-
import * as
|
|
26
|
-
|
|
27
|
-
import * as
|
|
28
|
-
|
|
29
|
-
import * as
|
|
30
|
-
|
|
31
|
-
import * as
|
|
32
|
-
|
|
33
|
-
import * as
|
|
34
|
-
|
|
35
|
-
import * as
|
|
36
|
-
|
|
37
|
-
import * as
|
|
38
|
-
|
|
39
|
-
import * as
|
|
40
|
-
|
|
41
|
-
import * as
|
|
42
|
-
|
|
43
|
-
import * as
|
|
44
|
-
|
|
45
|
-
import * as
|
|
46
|
-
|
|
47
|
-
import * as
|
|
48
|
-
|
|
49
|
-
import * as
|
|
50
|
-
|
|
51
|
-
import * as
|
|
52
|
-
|
|
53
|
-
import * as
|
|
54
|
-
|
|
55
|
-
import * as
|
|
56
|
-
|
|
57
|
-
import * as
|
|
58
|
-
|
|
59
|
-
import * as
|
|
60
|
-
|
|
61
|
-
import * as
|
|
62
|
-
|
|
63
|
-
import * as
|
|
64
|
-
|
|
65
|
-
import * as
|
|
66
|
-
|
|
67
|
-
import * as
|
|
68
|
-
|
|
69
|
-
import * as
|
|
70
|
-
|
|
71
|
-
import * as
|
|
72
|
-
|
|
73
|
-
import * as
|
|
74
|
-
|
|
75
|
-
import * as
|
|
76
|
-
|
|
77
|
-
import * as
|
|
78
|
-
|
|
79
|
-
import * as
|
|
80
|
-
|
|
81
|
-
import * as
|
|
82
|
-
|
|
83
|
-
import * as
|
|
84
|
-
|
|
85
|
-
import * as
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
export function
|
|
107
|
-
throw new Error('Function
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export function
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
return
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
return
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export function
|
|
132
|
-
throw new Error('Function
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export function
|
|
136
|
-
throw new Error('Function
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export
|
|
1
|
+
import * as import$0 from 'esbuild';
|
|
2
|
+
|
|
3
|
+
import * as ff_core_Any from "../../ff/core/Any.mjs"
|
|
4
|
+
|
|
5
|
+
import * as ff_core_Array from "../../ff/core/Array.mjs"
|
|
6
|
+
|
|
7
|
+
import * as ff_core_AssetSystem from "../../ff/core/AssetSystem.mjs"
|
|
8
|
+
|
|
9
|
+
import * as ff_core_Atomic from "../../ff/core/Atomic.mjs"
|
|
10
|
+
|
|
11
|
+
import * as ff_core_Bool from "../../ff/core/Bool.mjs"
|
|
12
|
+
|
|
13
|
+
import * as ff_core_Box from "../../ff/core/Box.mjs"
|
|
14
|
+
|
|
15
|
+
import * as ff_core_BrowserSystem from "../../ff/core/BrowserSystem.mjs"
|
|
16
|
+
|
|
17
|
+
import * as ff_core_Buffer from "../../ff/core/Buffer.mjs"
|
|
18
|
+
|
|
19
|
+
import * as ff_core_BuildSystem from "../../ff/core/BuildSystem.mjs"
|
|
20
|
+
|
|
21
|
+
import * as ff_core_Channel from "../../ff/core/Channel.mjs"
|
|
22
|
+
|
|
23
|
+
import * as ff_core_Char from "../../ff/core/Char.mjs"
|
|
24
|
+
|
|
25
|
+
import * as ff_core_Core from "../../ff/core/Core.mjs"
|
|
26
|
+
|
|
27
|
+
import * as ff_core_Duration from "../../ff/core/Duration.mjs"
|
|
28
|
+
|
|
29
|
+
import * as ff_core_Equal from "../../ff/core/Equal.mjs"
|
|
30
|
+
|
|
31
|
+
import * as ff_core_Error from "../../ff/core/Error.mjs"
|
|
32
|
+
|
|
33
|
+
import * as ff_core_FileHandle from "../../ff/core/FileHandle.mjs"
|
|
34
|
+
|
|
35
|
+
import * as ff_core_Float from "../../ff/core/Float.mjs"
|
|
36
|
+
|
|
37
|
+
import * as ff_core_HttpClient from "../../ff/core/HttpClient.mjs"
|
|
38
|
+
|
|
39
|
+
import * as ff_core_Instant from "../../ff/core/Instant.mjs"
|
|
40
|
+
|
|
41
|
+
import * as ff_core_Int from "../../ff/core/Int.mjs"
|
|
42
|
+
|
|
43
|
+
import * as ff_core_IntMap from "../../ff/core/IntMap.mjs"
|
|
44
|
+
|
|
45
|
+
import * as ff_core_JsSystem from "../../ff/core/JsSystem.mjs"
|
|
46
|
+
|
|
47
|
+
import * as ff_core_JsValue from "../../ff/core/JsValue.mjs"
|
|
48
|
+
|
|
49
|
+
import * as ff_core_List from "../../ff/core/List.mjs"
|
|
50
|
+
|
|
51
|
+
import * as ff_core_Lock from "../../ff/core/Lock.mjs"
|
|
52
|
+
|
|
53
|
+
import * as ff_core_Log from "../../ff/core/Log.mjs"
|
|
54
|
+
|
|
55
|
+
import * as ff_core_Map from "../../ff/core/Map.mjs"
|
|
56
|
+
|
|
57
|
+
import * as ff_core_NodeSystem from "../../ff/core/NodeSystem.mjs"
|
|
58
|
+
|
|
59
|
+
import * as ff_core_Nothing from "../../ff/core/Nothing.mjs"
|
|
60
|
+
|
|
61
|
+
import * as ff_core_Option from "../../ff/core/Option.mjs"
|
|
62
|
+
|
|
63
|
+
import * as ff_core_Ordering from "../../ff/core/Ordering.mjs"
|
|
64
|
+
|
|
65
|
+
import * as ff_core_Pair from "../../ff/core/Pair.mjs"
|
|
66
|
+
|
|
67
|
+
import * as ff_core_Path from "../../ff/core/Path.mjs"
|
|
68
|
+
|
|
69
|
+
import * as ff_core_Serializable from "../../ff/core/Serializable.mjs"
|
|
70
|
+
|
|
71
|
+
import * as ff_core_Set from "../../ff/core/Set.mjs"
|
|
72
|
+
|
|
73
|
+
import * as ff_core_Show from "../../ff/core/Show.mjs"
|
|
74
|
+
|
|
75
|
+
import * as ff_core_SourceLocation from "../../ff/core/SourceLocation.mjs"
|
|
76
|
+
|
|
77
|
+
import * as ff_core_Stack from "../../ff/core/Stack.mjs"
|
|
78
|
+
|
|
79
|
+
import * as ff_core_Stream from "../../ff/core/Stream.mjs"
|
|
80
|
+
|
|
81
|
+
import * as ff_core_String from "../../ff/core/String.mjs"
|
|
82
|
+
|
|
83
|
+
import * as ff_core_StringMap from "../../ff/core/StringMap.mjs"
|
|
84
|
+
|
|
85
|
+
import * as ff_core_Task from "../../ff/core/Task.mjs"
|
|
86
|
+
|
|
87
|
+
import * as ff_core_Try from "../../ff/core/Try.mjs"
|
|
88
|
+
|
|
89
|
+
import * as ff_core_Unit from "../../ff/core/Unit.mjs"
|
|
90
|
+
|
|
91
|
+
// type BuildSystem
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
// type BrowserCode
|
|
95
|
+
export function BrowserCode(packageGroup_, packageName_, mainFile_, assetSystem_) {
|
|
96
|
+
return {packageGroup_, packageName_, mainFile_, assetSystem_};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// type BrowserBundle
|
|
100
|
+
export function BrowserBundle(assetSystem_) {
|
|
101
|
+
return {assetSystem_};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
export function internalCallEsBuild_(self_, mainJsFile_, outputPath_, minify_, sourceMap_) {
|
|
107
|
+
throw new Error('Function internalCallEsBuild is missing on this target in sync context.');
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function internalNodeCallEsBuild_(self_, mainJsFile_, outputPath_, minify_) {
|
|
111
|
+
throw new Error('Function internalNodeCallEsBuild is missing on this target in sync context.');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function internalListDirectory_(path_) {
|
|
115
|
+
function go_(currentPath_) {
|
|
116
|
+
return ff_core_Stream.Stream_flatMap(ff_core_Path.Path_entries(currentPath_), ((file_) => {
|
|
117
|
+
if(ff_core_Path.PathEntry_isDirectory(file_)) {
|
|
118
|
+
return go_(ff_core_Path.PathEntry_path(file_))
|
|
119
|
+
} else {
|
|
120
|
+
return ff_core_List.List_toStream(ff_core_List.Link(ff_core_Path.PathEntry_path(file_), ff_core_List.Empty()), false)
|
|
121
|
+
}
|
|
122
|
+
}))
|
|
123
|
+
}
|
|
124
|
+
return ff_core_Stream.Stream_toList(ff_core_Stream.Stream_map(go_(path_), ((file_) => {
|
|
125
|
+
return ff_core_Pair.Pair(("/" + ff_core_String.String_replace(ff_core_Path.Path_relativeTo(file_, path_), "\\", "/")), (() => {
|
|
126
|
+
return ff_core_Path.Path_readStream(file_)
|
|
127
|
+
}))
|
|
128
|
+
})))
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function internalPath_(buildSystem_, absoluteOrRelative_) {
|
|
132
|
+
throw new Error('Function internalPath is missing on this target in sync context.');
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function internalCompile_(buildSystem_, mainFile_, target_) {
|
|
136
|
+
throw new Error('Function internalCompile is missing on this target in sync context.');
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function internalMainPackagePair_(buildSystem_) {
|
|
140
|
+
throw new Error('Function internalMainPackagePair is missing on this target in sync context.');
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export async function internalCallEsBuild_$(self_, mainJsFile_, outputPath_, minify_, sourceMap_, $task) {
|
|
140
144
|
|
|
141
145
|
const esbuild = import$0
|
|
142
146
|
return await esbuild.build({
|
|
@@ -149,10 +153,10 @@ export async function internalCallEsBuild_$(self_, mainJsFile_, outputPath_, min
|
|
|
149
153
|
external: ['../../../node_modules/*'], // TODO
|
|
150
154
|
outfile: outputPath_
|
|
151
155
|
})
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export async function internalNodeCallEsBuild_$(self_, mainJsFile_, outputPath_, minify_, $task) {
|
|
156
|
+
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export async function internalNodeCallEsBuild_$(self_, mainJsFile_, outputPath_, minify_, $task) {
|
|
156
160
|
|
|
157
161
|
const esbuild = import$0
|
|
158
162
|
return await esbuild.build({
|
|
@@ -165,156 +169,158 @@ export async function internalNodeCallEsBuild_$(self_, mainJsFile_, outputPath_,
|
|
|
165
169
|
external: ['../../../node_modules/*'], // TODO
|
|
166
170
|
outfile: outputPath_
|
|
167
171
|
})
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export async function internalListDirectory_$(path_, $task) {
|
|
172
|
-
async function go_$(currentPath_, $task) {
|
|
173
|
-
return (await ff_core_Stream.Stream_flatMap$((await ff_core_Path.Path_entries$(currentPath_, $task)), (async (file_, $task) => {
|
|
174
|
-
if((await ff_core_Path.PathEntry_isDirectory$(file_, $task))) {
|
|
175
|
-
return (await go_$((await ff_core_Path.PathEntry_path$(file_, $task)), $task))
|
|
176
|
-
} else {
|
|
177
|
-
return (await ff_core_List.List_toStream$(ff_core_List.Link((await ff_core_Path.PathEntry_path$(file_, $task)), ff_core_List.Empty()), false, $task))
|
|
178
|
-
}
|
|
179
|
-
}), $task))
|
|
180
|
-
}
|
|
181
|
-
return (await ff_core_Stream.Stream_toList$((await ff_core_Stream.Stream_map$((await go_$(path_, $task)), (async (file_, $task) => {
|
|
182
|
-
return ff_core_Pair.Pair(("/" + (await ff_core_Path.Path_relativeTo$(file_, path_, $task))), (async ($task) => {
|
|
183
|
-
return (await ff_core_Path.Path_readStream$(file_, $task))
|
|
184
|
-
}))
|
|
185
|
-
}), $task)), $task))
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export async function internalPath_$(buildSystem_, absoluteOrRelative_, $task) {
|
|
172
|
+
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export async function internalListDirectory_$(path_, $task) {
|
|
176
|
+
async function go_$(currentPath_, $task) {
|
|
177
|
+
return (await ff_core_Stream.Stream_flatMap$((await ff_core_Path.Path_entries$(currentPath_, $task)), (async (file_, $task) => {
|
|
178
|
+
if((await ff_core_Path.PathEntry_isDirectory$(file_, $task))) {
|
|
179
|
+
return (await go_$((await ff_core_Path.PathEntry_path$(file_, $task)), $task))
|
|
180
|
+
} else {
|
|
181
|
+
return (await ff_core_List.List_toStream$(ff_core_List.Link((await ff_core_Path.PathEntry_path$(file_, $task)), ff_core_List.Empty()), false, $task))
|
|
182
|
+
}
|
|
183
|
+
}), $task))
|
|
184
|
+
}
|
|
185
|
+
return (await ff_core_Stream.Stream_toList$((await ff_core_Stream.Stream_map$((await go_$(path_, $task)), (async (file_, $task) => {
|
|
186
|
+
return ff_core_Pair.Pair(("/" + ff_core_String.String_replace((await ff_core_Path.Path_relativeTo$(file_, path_, $task)), "\\", "/")), (async ($task) => {
|
|
187
|
+
return (await ff_core_Path.Path_readStream$(file_, $task))
|
|
188
|
+
}))
|
|
189
|
+
}), $task)), $task))
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export async function internalPath_$(buildSystem_, absoluteOrRelative_, $task) {
|
|
189
193
|
|
|
190
194
|
return absoluteOrRelative_
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
export async function internalCompile_$(buildSystem_, mainFile_, target_, $task) {
|
|
195
|
+
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export async function internalCompile_$(buildSystem_, mainFile_, target_, $task) {
|
|
195
199
|
|
|
196
200
|
return await $firefly_compiler.buildViaBuildSystem_$(buildSystem_, buildSystem_.fireflyPath_, mainFile_, target_, $task)
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
export async function internalMainPackagePair_$(buildSystem_, $task) {
|
|
201
|
+
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export async function internalMainPackagePair_$(buildSystem_, $task) {
|
|
201
205
|
|
|
202
206
|
return {first_: buildSystem_.mainPackagePair_.group_, second_: buildSystem_.mainPackagePair_.name_}
|
|
203
|
-
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
export function BuildSystem_compileForBrowser(self_, mainFile_) {
|
|
207
|
-
ff_core_BuildSystem.internalCompile_(self_, ff_core_BuildSystem.internalPath_(self_, mainFile_), "browser");
|
|
208
|
-
const streams_ = ff_core_BuildSystem.internalListDirectory_(ff_core_BuildSystem.internalPath_(self_, ".firefly/output/browser"));
|
|
209
|
-
const mainPackagePair_ = ff_core_BuildSystem.internalMainPackagePair_(self_);
|
|
210
|
-
return ff_core_BuildSystem.BrowserCode(mainPackagePair_.first_, mainPackagePair_.second_, ff_core_BuildSystem.internalPath_(self_, mainFile_), ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap(streams_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)))
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export function BuildSystem_buildMode(self_) {
|
|
214
|
-
throw new Error('Function BuildSystem_buildMode is missing on this target in sync context.');
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
export function BuildSystem_setAssets(self_, assetSystem_) {
|
|
218
|
-
throw new Error('Function BuildSystem_setAssets is missing on this target in sync context.');
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export function BuildSystem_packageAssets(self_) {
|
|
222
|
-
const streams_ = ff_core_BuildSystem.internalListDirectory_(ff_core_BuildSystem.internalPath_(self_, "."));
|
|
223
|
-
return ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap(streams_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String))
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
export function BuildSystem_dependencyAssets(self_, user_, package_) {
|
|
227
|
-
return ff_core_Core.panic_("dependencyAssets not yet implemented")
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
export function BuildSystem_arguments(self_) {
|
|
231
|
-
throw new Error('Function BuildSystem_arguments is missing on this target in sync context.');
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
export function BuildSystem_mainTask(self_) {
|
|
235
|
-
throw new Error('Function BuildSystem_mainTask is missing on this target in sync context.');
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
export async function BuildSystem_compileForBrowser$(self_, mainFile_, $task) {
|
|
239
|
-
(await ff_core_BuildSystem.internalCompile_$(self_, (await ff_core_BuildSystem.internalPath_$(self_, mainFile_, $task)), "browser", $task));
|
|
240
|
-
const streams_ = (await ff_core_BuildSystem.internalListDirectory_$((await ff_core_BuildSystem.internalPath_$(self_, ".firefly/output/browser", $task)), $task));
|
|
241
|
-
const mainPackagePair_ = (await ff_core_BuildSystem.internalMainPackagePair_$(self_, $task));
|
|
242
|
-
return ff_core_BuildSystem.BrowserCode(mainPackagePair_.first_, mainPackagePair_.second_, (await ff_core_BuildSystem.internalPath_$(self_, mainFile_, $task)), ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap(streams_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)))
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
export async function BuildSystem_buildMode$(self_, $task) {
|
|
246
|
-
return !!self_.buildMode_
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
export async function BuildSystem_setAssets$(self_, assetSystem_, $task) {
|
|
250
|
-
self_.assets_ = assetSystem_
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
export async function BuildSystem_packageAssets$(self_, $task) {
|
|
254
|
-
const streams_ = (await ff_core_BuildSystem.internalListDirectory_$((await ff_core_BuildSystem.internalPath_$(self_, ".", $task)), $task));
|
|
255
|
-
return ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap(streams_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String))
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
export async function BuildSystem_dependencyAssets$(self_, user_, package_, $task) {
|
|
259
|
-
return ff_core_Core.panic_("dependencyAssets not yet implemented")
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
export async function BuildSystem_arguments$(self_, $task) {
|
|
263
|
-
return self_.array_
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
export async function BuildSystem_mainTask$(self_, $task) {
|
|
267
|
-
return self_.task_
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
export function BrowserCode_assets(self_) {
|
|
271
|
-
return self_.assetSystem_
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
export function BrowserCode_bundle(self_, minify_ = true, sourceMap_ = false) {
|
|
275
|
-
const prefix_ = ".firefly/output/browser";
|
|
276
|
-
const mainJsBaseFile_ = (ff_core_Option.Option_grab(ff_core_String.String_removeLast(ff_core_Path.
|
|
277
|
-
const mainJsFile_ = ((((((prefix_ + "/") + self_.packageGroup_) + "/") + self_.packageName_) + "/") + mainJsBaseFile_);
|
|
278
|
-
const
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
const
|
|
297
|
-
const
|
|
298
|
-
const
|
|
299
|
-
(await
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
207
|
+
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function BuildSystem_compileForBrowser(self_, mainFile_) {
|
|
211
|
+
ff_core_BuildSystem.internalCompile_(self_, ff_core_BuildSystem.internalPath_(self_, mainFile_), "browser");
|
|
212
|
+
const streams_ = ff_core_BuildSystem.internalListDirectory_(ff_core_BuildSystem.internalPath_(self_, ".firefly/output/browser"));
|
|
213
|
+
const mainPackagePair_ = ff_core_BuildSystem.internalMainPackagePair_(self_);
|
|
214
|
+
return ff_core_BuildSystem.BrowserCode(mainPackagePair_.first_, mainPackagePair_.second_, ff_core_BuildSystem.internalPath_(self_, mainFile_), ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap(streams_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)))
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export function BuildSystem_buildMode(self_) {
|
|
218
|
+
throw new Error('Function BuildSystem_buildMode is missing on this target in sync context.');
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export function BuildSystem_setAssets(self_, assetSystem_) {
|
|
222
|
+
throw new Error('Function BuildSystem_setAssets is missing on this target in sync context.');
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export function BuildSystem_packageAssets(self_) {
|
|
226
|
+
const streams_ = ff_core_BuildSystem.internalListDirectory_(ff_core_BuildSystem.internalPath_(self_, "."));
|
|
227
|
+
return ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap(streams_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String))
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export function BuildSystem_dependencyAssets(self_, user_, package_) {
|
|
231
|
+
return ff_core_Core.panic_("dependencyAssets not yet implemented")
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export function BuildSystem_arguments(self_) {
|
|
235
|
+
throw new Error('Function BuildSystem_arguments is missing on this target in sync context.');
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export function BuildSystem_mainTask(self_) {
|
|
239
|
+
throw new Error('Function BuildSystem_mainTask is missing on this target in sync context.');
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export async function BuildSystem_compileForBrowser$(self_, mainFile_, $task) {
|
|
243
|
+
(await ff_core_BuildSystem.internalCompile_$(self_, (await ff_core_BuildSystem.internalPath_$(self_, mainFile_, $task)), "browser", $task));
|
|
244
|
+
const streams_ = (await ff_core_BuildSystem.internalListDirectory_$((await ff_core_BuildSystem.internalPath_$(self_, ".firefly/output/browser", $task)), $task));
|
|
245
|
+
const mainPackagePair_ = (await ff_core_BuildSystem.internalMainPackagePair_$(self_, $task));
|
|
246
|
+
return ff_core_BuildSystem.BrowserCode(mainPackagePair_.first_, mainPackagePair_.second_, (await ff_core_BuildSystem.internalPath_$(self_, mainFile_, $task)), ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap(streams_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String)))
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export async function BuildSystem_buildMode$(self_, $task) {
|
|
250
|
+
return !!self_.buildMode_
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export async function BuildSystem_setAssets$(self_, assetSystem_, $task) {
|
|
254
|
+
self_.assets_ = assetSystem_
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export async function BuildSystem_packageAssets$(self_, $task) {
|
|
258
|
+
const streams_ = (await ff_core_BuildSystem.internalListDirectory_$((await ff_core_BuildSystem.internalPath_$(self_, ".", $task)), $task));
|
|
259
|
+
return ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap(streams_, ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String))
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export async function BuildSystem_dependencyAssets$(self_, user_, package_, $task) {
|
|
263
|
+
return ff_core_Core.panic_("dependencyAssets not yet implemented")
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export async function BuildSystem_arguments$(self_, $task) {
|
|
267
|
+
return self_.array_
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export async function BuildSystem_mainTask$(self_, $task) {
|
|
271
|
+
return self_.task_
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export function BrowserCode_assets(self_) {
|
|
275
|
+
return self_.assetSystem_
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export function BrowserCode_bundle(self_, minify_ = true, sourceMap_ = false) {
|
|
279
|
+
const prefix_ = ".firefly/output/browser";
|
|
280
|
+
const mainJsBaseFile_ = (ff_core_Option.Option_grab(ff_core_String.String_removeLast(ff_core_Path.Path_base(self_.mainFile_), ".ff")) + ".mjs");
|
|
281
|
+
const mainJsFile_ = ((((((prefix_ + "/") + self_.packageGroup_) + "/") + self_.packageName_) + "/") + mainJsBaseFile_);
|
|
282
|
+
const mainDirectory_ = ff_core_Option.Option_grab(ff_core_Path.Path_parent(self_.mainFile_));
|
|
283
|
+
const file_ = (prefix_ + "/Main.bundle.js");
|
|
284
|
+
ff_core_BuildSystem.internalCallEsBuild_(self_, mainJsFile_, file_, minify_, sourceMap_);
|
|
285
|
+
const assets_ = ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap(ff_core_List.Link(ff_core_Pair.Pair(ff_core_String.String_dropFirst(file_, ff_core_String.String_size(prefix_)), (() => {
|
|
286
|
+
return ff_core_Path.Path_readStream(ff_core_Path.Path_path(mainDirectory_, file_))
|
|
287
|
+
})), (sourceMap_
|
|
288
|
+
? ff_core_List.Link(ff_core_Pair.Pair((ff_core_String.String_dropFirst(file_, ff_core_String.String_size(prefix_)) + ".map"), (() => {
|
|
289
|
+
return ff_core_Path.Path_readStream(ff_core_Path.Path_path(mainDirectory_, (file_ + ".map")))
|
|
290
|
+
})), ff_core_List.Empty())
|
|
291
|
+
: ff_core_List.Empty())), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String));
|
|
292
|
+
return ff_core_BuildSystem.BrowserBundle(assets_)
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export async function BrowserCode_assets$(self_, $task) {
|
|
296
|
+
return self_.assetSystem_
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export async function BrowserCode_bundle$(self_, minify_ = true, sourceMap_ = false, $task) {
|
|
300
|
+
const prefix_ = ".firefly/output/browser";
|
|
301
|
+
const mainJsBaseFile_ = (ff_core_Option.Option_grab(ff_core_String.String_removeLast((await ff_core_Path.Path_base$(self_.mainFile_, $task)), ".ff")) + ".mjs");
|
|
302
|
+
const mainJsFile_ = ((((((prefix_ + "/") + self_.packageGroup_) + "/") + self_.packageName_) + "/") + mainJsBaseFile_);
|
|
303
|
+
const mainDirectory_ = ff_core_Option.Option_grab((await ff_core_Path.Path_parent$(self_.mainFile_, $task)));
|
|
304
|
+
const file_ = (prefix_ + "/Main.bundle.js");
|
|
305
|
+
(await ff_core_BuildSystem.internalCallEsBuild_$(self_, mainJsFile_, file_, minify_, sourceMap_, $task));
|
|
306
|
+
const assets_ = ff_core_AssetSystem.AssetSystem(ff_core_List.List_toMap(ff_core_List.Link(ff_core_Pair.Pair(ff_core_String.String_dropFirst(file_, ff_core_String.String_size(prefix_)), (async ($task) => {
|
|
307
|
+
return (await ff_core_Path.Path_readStream$((await ff_core_Path.Path_path$(mainDirectory_, file_, $task)), $task))
|
|
308
|
+
})), (sourceMap_
|
|
309
|
+
? ff_core_List.Link(ff_core_Pair.Pair((ff_core_String.String_dropFirst(file_, ff_core_String.String_size(prefix_)) + ".map"), (async ($task) => {
|
|
310
|
+
return (await ff_core_Path.Path_readStream$((await ff_core_Path.Path_path$(mainDirectory_, (file_ + ".map"), $task)), $task))
|
|
311
|
+
})), ff_core_List.Empty())
|
|
312
|
+
: ff_core_List.Empty())), ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String));
|
|
313
|
+
return ff_core_BuildSystem.BrowserBundle(assets_)
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export function BrowserBundle_assets(self_) {
|
|
317
|
+
return self_.assetSystem_
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export async function BrowserBundle_assets$(self_, $task) {
|
|
321
|
+
return self_.assetSystem_
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|