summaryrefslogtreecommitdiffhomepage
path: root/packages/core/src/installation
diff options
context:
space:
mode:
Diffstat (limited to 'packages/core/src/installation')
-rw-r--r--packages/core/src/installation/version.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/core/src/installation/version.ts b/packages/core/src/installation/version.ts
new file mode 100644
index 000000000..25d9cd99a
--- /dev/null
+++ b/packages/core/src/installation/version.ts
@@ -0,0 +1,8 @@
+declare global {
+ const OPENCODE_VERSION: string
+ const OPENCODE_CHANNEL: string
+}
+
+export const InstallationVersion = typeof OPENCODE_VERSION === "string" ? OPENCODE_VERSION : "local"
+export const InstallationChannel = typeof OPENCODE_CHANNEL === "string" ? OPENCODE_CHANNEL : "local"
+export const InstallationLocal = InstallationChannel === "local"