forked from QOTEQ/Demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- `domain.runtime` with autoloader - `api.bos.listFlows()` - `api.bos.getFlow({ name })` - `api.bos.saveFlow({ name, source })`
- Loading branch information
1 parent
7991e58
commit 8df3558
Showing
9 changed files
with
52 additions
and
14 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
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 @@ | ||
({ | ||
access: 'public', | ||
|
||
async method({}) { | ||
const dirPath = `./application/flow/`; | ||
const files = await node.fsp.readdir(dirPath); | ||
const names = files.map((file) => node.path.basename(file, '.md')); | ||
return { names }; | ||
}, | ||
}); |
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 @@ | ||
({ | ||
access: 'public', | ||
|
||
async method({ name, source }) { | ||
const filePath = `./application/flow/${name}.md`; | ||
await node.fsp.writeFile(filePath, source); | ||
await domain.runtime.load({ name: filePath }); | ||
return { success: true }; | ||
}, | ||
}); |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
async ({ name }) => { | ||
const filePath = `./application/flow/${name}.md`; | ||
const src = await node.fsp.readFile(filePath, 'utf8'); | ||
const procedures = npm.lowscript.parseProcess(src); | ||
for (const proc of procedures) { | ||
domain.runtime.flows.set(proc.name, proc); | ||
} | ||
}; |
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,12 @@ | ||
async () => { | ||
domain.runtime.clients = new Map(); | ||
domain.runtime.processes = new Map(); | ||
domain.runtime.flows = new Map(); | ||
|
||
const dirPath = `./application/flow/`; | ||
const files = await node.fsp.readdir(dirPath); | ||
for (const file of files) { | ||
const name = node.path.basename(file, '.md'); | ||
await domain.runtime.load({ name }); | ||
} | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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