@scrypted/server 0.123.41 → 0.123.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/plugin/plugin-console.js +17 -7
  2. package/dist/plugin/plugin-console.js.map +1 -1
  3. package/dist/plugin/plugin-host.js +21 -11
  4. package/dist/plugin/plugin-host.js.map +1 -1
  5. package/dist/plugin/plugin-remote-worker.js +6 -6
  6. package/dist/plugin/plugin-remote-worker.js.map +1 -1
  7. package/dist/plugin/runtime/node-thread-worker.js +4 -1
  8. package/dist/plugin/runtime/node-thread-worker.js.map +1 -1
  9. package/dist/rpc-buffer-serializer.d.ts +2 -2
  10. package/dist/rpc.js.map +1 -1
  11. package/dist/runtime.d.ts +2 -0
  12. package/dist/runtime.js +21 -7
  13. package/dist/runtime.js.map +1 -1
  14. package/dist/scrypted-cluster-main.js +6 -0
  15. package/dist/scrypted-cluster-main.js.map +1 -1
  16. package/dist/scrypted-main-exports.js +3 -4
  17. package/dist/scrypted-main-exports.js.map +1 -1
  18. package/dist/services/cluster-fork.d.ts +3 -0
  19. package/dist/services/cluster-fork.js +12 -0
  20. package/dist/services/cluster-fork.js.map +1 -1
  21. package/dist/services/env.d.ts +5 -0
  22. package/dist/services/env.js +23 -0
  23. package/dist/services/env.js.map +1 -0
  24. package/dist/services/info.d.ts +1 -0
  25. package/dist/services/info.js +2 -1
  26. package/dist/services/info.js.map +1 -1
  27. package/package.json +6 -6
  28. package/src/plugin/plugin-host.ts +1 -3
  29. package/src/plugin/plugin-remote-worker.ts +6 -6
  30. package/src/plugin/runtime/node-thread-worker.ts +4 -1
  31. package/src/rpc.ts +1 -1
  32. package/src/runtime.ts +5 -1
  33. package/src/scrypted-cluster-main.ts +9 -0
  34. package/src/scrypted-main-exports.ts +3 -4
  35. package/src/services/cluster-fork.ts +15 -0
  36. package/src/services/env.ts +17 -0
  37. package/src/services/info.ts +2 -0
@@ -0,0 +1,17 @@
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+ import { getScryptedVolume } from '../plugin/plugin-volume';
4
+
5
+ export function getDotEnvPath() {
6
+ return path.join(getScryptedVolume(), '.env')
7
+ }
8
+
9
+ export class EnvControl {
10
+ async setDotEnv(env: string) {
11
+ await fs.promises.writeFile(getDotEnvPath(), env, 'utf8');
12
+ }
13
+
14
+ getDotEnv() {
15
+ return fs.promises.readFile(getDotEnvPath(), 'utf8');
16
+ }
17
+ }
@@ -1,3 +1,5 @@
1
+ export const serverVersion = require('../../package.json').version;
2
+
1
3
  export class Info {
2
4
  async getVersion() {
3
5
  return require('../../package.json').version;