@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.
- package/dist/plugin/plugin-console.js +17 -7
- package/dist/plugin/plugin-console.js.map +1 -1
- package/dist/plugin/plugin-host.js +21 -11
- package/dist/plugin/plugin-host.js.map +1 -1
- package/dist/plugin/plugin-remote-worker.js +6 -6
- package/dist/plugin/plugin-remote-worker.js.map +1 -1
- package/dist/plugin/runtime/node-thread-worker.js +4 -1
- package/dist/plugin/runtime/node-thread-worker.js.map +1 -1
- package/dist/rpc-buffer-serializer.d.ts +2 -2
- package/dist/rpc.js.map +1 -1
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +21 -7
- package/dist/runtime.js.map +1 -1
- package/dist/scrypted-cluster-main.js +6 -0
- package/dist/scrypted-cluster-main.js.map +1 -1
- package/dist/scrypted-main-exports.js +3 -4
- package/dist/scrypted-main-exports.js.map +1 -1
- package/dist/services/cluster-fork.d.ts +3 -0
- package/dist/services/cluster-fork.js +12 -0
- package/dist/services/cluster-fork.js.map +1 -1
- package/dist/services/env.d.ts +5 -0
- package/dist/services/env.js +23 -0
- package/dist/services/env.js.map +1 -0
- package/dist/services/info.d.ts +1 -0
- package/dist/services/info.js +2 -1
- package/dist/services/info.js.map +1 -1
- package/package.json +6 -6
- package/src/plugin/plugin-host.ts +1 -3
- package/src/plugin/plugin-remote-worker.ts +6 -6
- package/src/plugin/runtime/node-thread-worker.ts +4 -1
- package/src/rpc.ts +1 -1
- package/src/runtime.ts +5 -1
- package/src/scrypted-cluster-main.ts +9 -0
- package/src/scrypted-main-exports.ts +3 -4
- package/src/services/cluster-fork.ts +15 -0
- package/src/services/env.ts +17 -0
- 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
|
+
}
|