diff options
| author | Dax Raad <[email protected]> | 2025-05-28 12:53:22 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-05-28 12:53:22 -0400 |
| commit | 55a6fcdd3f5b3c55712e5cfc9dd4d994da38d4c8 (patch) | |
| tree | aef660f4e7b0fae135dc1f90cf6920b53238ed5b /js/src/global | |
| parent | 4132fcc1b286af5e61bf5eaa89f789988362f995 (diff) | |
| download | opencode-55a6fcdd3f5b3c55712e5cfc9dd4d994da38d4c8.tar.gz opencode-55a6fcdd3f5b3c55712e5cfc9dd4d994da38d4c8.zip | |
add provider_list
Diffstat (limited to 'js/src/global')
| -rw-r--r-- | js/src/global/index.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/js/src/global/index.ts b/js/src/global/index.ts new file mode 100644 index 000000000..1e097f38c --- /dev/null +++ b/js/src/global/index.ts @@ -0,0 +1,20 @@ +import envpaths from "env-paths"; +import fs from "fs/promises"; +const paths = envpaths("opencode", { + suffix: "", +}); + +await Promise.all([ + fs.mkdir(paths.config, { recursive: true }), + fs.mkdir(paths.cache, { recursive: true }), +]); + +export namespace Global { + export function config() { + return paths.config; + } + + export function cache() { + return paths.cache; + } +} |
