-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli,daemon): Add
mkdir
command (#2288)
Adds `mkdir` command to the CLI. Updates the daemon's directory abstraction to accept pet name paths at `makeDirectory()`. ``` > endo mkdir dir > endo make counter.js -n dir.counter > endo eval 'E(counter).incr()' counter:dir.counter 1 ```
- Loading branch information
Showing
5 changed files
with
39 additions
and
17 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* global process */ | ||
import os from 'os'; | ||
import { E } from '@endo/far'; | ||
import { withEndoAgent } from '../context.js'; | ||
import { parsePetNamePath } from '../pet-name.js'; | ||
|
||
export const mkdir = async ({ agentNames, directoryPath }) => | ||
withEndoAgent(agentNames, { os, process }, async ({ agent }) => { | ||
await E(agent).makeDirectory(...parsePetNamePath(directoryPath)); | ||
}); |
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
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