-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
274 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export 'src/deno.dart'; | ||
export 'src/env.dart' show Env; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import 'interop/deno_interop.dart' as interop; | ||
|
||
class Env { | ||
final interop.Env _delegate; | ||
|
||
Env._(this._delegate); | ||
|
||
/// Retrieve the value of an environment variable. | ||
/// | ||
/// Returns `null` if the supplied environment variable is not defined. | ||
String? get(String key) => _delegate.get(key); | ||
|
||
/// Set the value of an environment variable. | ||
void set(String key, String value) => _delegate.set(key, value); | ||
|
||
/// Delete the value of an environment variable. | ||
void delete(String key) => _delegate.delete(key); | ||
|
||
/// Check whether an environment variable is present or not. | ||
bool has(String key) => _delegate.has(key); | ||
|
||
/// Returns a snapshot of the environment variables at invocation as a simple Map of keys and values. | ||
Map<String, String> toJson() => _delegate.toObject(); | ||
} | ||
|
||
Env envFromJsObject(interop.Env env) { | ||
return Env._(env); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import 'interop/deno_interop.dart' as interop; | ||
|
||
/// Information about a directory entry. | ||
/// | ||
/// See https://deno.land/api@v1.30.3?s=Deno.DirEntry | ||
class DirEntry { | ||
final interop.DirEntry _delegate; | ||
|
||
DirEntry._(this._delegate); | ||
|
||
/// The file name of the entry. It is just the entity name and does not | ||
/// include the full path. | ||
String get name => _delegate.name; | ||
|
||
/// True if this is info for a regular file. Mutually exclusive to | ||
/// DirEntry.isDirectory and DirEntry.isSymlink. | ||
bool get isFile => _delegate.isFile; | ||
|
||
/// True if this is info for a regular directory. Mutually exclusive to | ||
/// DirEntry.isFile and DirEntry.isSymlink. | ||
bool get isDirectory => _delegate.isDirectory; | ||
|
||
/// True if this is info for a symlink. Mutually exclusive to DirEntry.isFile | ||
/// and DirEntry.isDirectory. | ||
bool get isSymlink => _delegate.isSymlink; | ||
} | ||
|
||
DirEntry dirEntryFromJsObject(interop.DirEntry jsObject) => | ||
DirEntry._(jsObject); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ environment: | |
dependencies: | ||
js: ^0.6.5 | ||
js_bindings: ^0.1.0 | ||
edge_runtime: ^0.0.1+3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# melos_managed_dependency_overrides: edge_runtime | ||
dependency_overrides: | ||
edge_runtime: | ||
path: ../edge_runtime |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.