firefly-compiler 0.5.24 → 0.5.26
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/core/BuildSystem.ff
CHANGED
|
@@ -86,12 +86,12 @@ internalCallEsBuild(
|
|
|
86
86
|
target node async """
|
|
87
87
|
import * as esbuild from 'esbuild'
|
|
88
88
|
return await esbuild.build({
|
|
89
|
-
|
|
89
|
+
stdin: {contents: `import {$run$} from './${mainJsFile_}';`, resolveDir: '.'},
|
|
90
90
|
bundle: true,
|
|
91
91
|
minify: minify_,
|
|
92
92
|
sourcemap: sourceMap_,
|
|
93
93
|
platform: 'browser',
|
|
94
|
-
target: '
|
|
94
|
+
target: 'es2017',
|
|
95
95
|
external: ['../../../node_modules/*'], // TODO
|
|
96
96
|
outfile: outputPath_
|
|
97
97
|
})
|
package/core/Path.ff
CHANGED
|
@@ -181,6 +181,8 @@ extend self: Path {
|
|
|
181
181
|
self.entries().each {file =>
|
|
182
182
|
file.path().copyTo(path.slash(file.path().relativeTo(self)), retries, retryDelay)
|
|
183
183
|
}
|
|
184
|
+
} elseIf {self.isSymbolicLink()} {
|
|
185
|
+
path.createSymlinkTo(self.path(self.readSymbolicLink()), junction = True)
|
|
184
186
|
} else {
|
|
185
187
|
path.writeStream(self.readStream())
|
|
186
188
|
}
|
|
@@ -216,6 +218,12 @@ extend self: Path {
|
|
|
216
218
|
await fsPromises.rename(self_, path_)
|
|
217
219
|
"""
|
|
218
220
|
|
|
221
|
+
readSymbolicLink(): String
|
|
222
|
+
target node async """
|
|
223
|
+
import * as fsPromises from 'fs/promises'
|
|
224
|
+
return await fsPromises.readlink(self_)
|
|
225
|
+
"""
|
|
226
|
+
|
|
219
227
|
readText(): String
|
|
220
228
|
target node async """
|
|
221
229
|
import * as fsPromises from 'fs/promises'
|
|
@@ -148,12 +148,12 @@ export async function internalCallEsBuild_$(self_, mainJsFile_, outputPath_, min
|
|
|
148
148
|
|
|
149
149
|
const esbuild = import$0
|
|
150
150
|
return await esbuild.build({
|
|
151
|
-
|
|
151
|
+
stdin: {contents: `import {$run$} from './${mainJsFile_}';`, resolveDir: '.'},
|
|
152
152
|
bundle: true,
|
|
153
153
|
minify: minify_,
|
|
154
154
|
sourcemap: sourceMap_,
|
|
155
155
|
platform: 'browser',
|
|
156
|
-
target: '
|
|
156
|
+
target: 'es2017',
|
|
157
157
|
external: ['../../../node_modules/*'], // TODO
|
|
158
158
|
outfile: outputPath_
|
|
159
159
|
})
|
|
@@ -275,6 +275,8 @@ ff_core_Path.Path_createDirectory(path_, false);
|
|
|
275
275
|
ff_core_Stream.Stream_each(ff_core_Path.Path_entries(self_), ((file_) => {
|
|
276
276
|
ff_core_Path.Path_copyTo(ff_core_Path.PathEntry_path(file_), ff_core_Path.Path_slash(path_, ff_core_Path.Path_relativeTo(ff_core_Path.PathEntry_path(file_), self_)), retries_, retryDelay_)
|
|
277
277
|
}))
|
|
278
|
+
} else if(ff_core_Path.Path_isSymbolicLink(self_)) {
|
|
279
|
+
ff_core_Path.Path_createSymlinkTo(path_, ff_core_Path.Path_path(self_, ff_core_Path.Path_readSymbolicLink(self_)), true)
|
|
278
280
|
} else {
|
|
279
281
|
ff_core_Path.Path_writeStream(path_, ff_core_Path.Path_readStream(self_), false)
|
|
280
282
|
}
|
|
@@ -300,6 +302,10 @@ export function Path_renameTo(self_, path_) {
|
|
|
300
302
|
throw new Error('Function Path_renameTo is missing on this target in sync context.');
|
|
301
303
|
}
|
|
302
304
|
|
|
305
|
+
export function Path_readSymbolicLink(self_) {
|
|
306
|
+
throw new Error('Function Path_readSymbolicLink is missing on this target in sync context.');
|
|
307
|
+
}
|
|
308
|
+
|
|
303
309
|
export function Path_readText(self_) {
|
|
304
310
|
throw new Error('Function Path_readText is missing on this target in sync context.');
|
|
305
311
|
}
|
|
@@ -559,6 +565,8 @@ if((await ff_core_Path.Path_exists$(path_, false, false, false, $task))) {
|
|
|
559
565
|
(await ff_core_Stream.Stream_each$((await ff_core_Path.Path_entries$(self_, $task)), (async (file_, $task) => {
|
|
560
566
|
(await ff_core_Path.Path_copyTo$((await ff_core_Path.PathEntry_path$(file_, $task)), (await ff_core_Path.Path_slash$(path_, (await ff_core_Path.Path_relativeTo$((await ff_core_Path.PathEntry_path$(file_, $task)), self_, $task)), $task)), retries_, retryDelay_, $task))
|
|
561
567
|
}), $task))
|
|
568
|
+
} else if((await ff_core_Path.Path_isSymbolicLink$(self_, $task))) {
|
|
569
|
+
(await ff_core_Path.Path_createSymlinkTo$(path_, (await ff_core_Path.Path_path$(self_, (await ff_core_Path.Path_readSymbolicLink$(self_, $task)), $task)), true, $task))
|
|
562
570
|
} else {
|
|
563
571
|
(await ff_core_Path.Path_writeStream$(path_, (await ff_core_Path.Path_readStream$(self_, $task)), false, $task))
|
|
564
572
|
}
|
|
@@ -599,6 +607,13 @@ export async function Path_renameTo$(self_, path_, $task) {
|
|
|
599
607
|
|
|
600
608
|
}
|
|
601
609
|
|
|
610
|
+
export async function Path_readSymbolicLink$(self_, $task) {
|
|
611
|
+
|
|
612
|
+
const fsPromises = import$1
|
|
613
|
+
return await fsPromises.readlink(self_)
|
|
614
|
+
|
|
615
|
+
}
|
|
616
|
+
|
|
602
617
|
export async function Path_readText$(self_, $task) {
|
|
603
618
|
|
|
604
619
|
const fsPromises = import$1
|
package/package.json
CHANGED