firefly-compiler 0.5.24 → 0.5.25

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/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'
@@ -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
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly compiler",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.5.24",
7
+ "version": "0.5.25",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly language support",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.5.24",
7
+ "version": "0.5.25",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"