mirror of
https://github.com/pockethost/pockethost.git
synced 2025-03-30 15:08:30 +00:00
chore(pockethost): add env-var support
This commit is contained in:
parent
292f0415e9
commit
4723f88aff
@ -20,7 +20,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@dotenvx/dotenvx": "^0.44.1",
|
||||
"pockethost": "workspace:../pockethost",
|
||||
"@pockethost/plugin-console-logger": "workspace:../plugin-console-logger",
|
||||
"@s-libs/micro-dash": "^16.1.0",
|
||||
"@types/node-os-utils": "^1.3.4",
|
||||
@ -28,6 +27,7 @@
|
||||
"ajv": "^8.12.0",
|
||||
"boolean": "^3.2.0",
|
||||
"bottleneck": "^2.19.5",
|
||||
"chalk": "^5.3.0",
|
||||
"commander": "^11.1.0",
|
||||
"cors": "^2.8.5",
|
||||
"decompress": "^4.2.1",
|
||||
@ -35,6 +35,7 @@
|
||||
"devcert": "^1.2.2",
|
||||
"dockerode": "^3.3.5",
|
||||
"env-paths": "^3.0.0",
|
||||
"env-var": "^7.5.0",
|
||||
"event-source-polyfill": "^1.0.31",
|
||||
"eventsource": "^2.0.2",
|
||||
"exit-hook": "^4.0.0",
|
||||
@ -49,10 +50,13 @@
|
||||
"http-proxy": "^1.18.1",
|
||||
"http-proxy-middleware": "^2.0.6",
|
||||
"ip-cidr": "^3.1.0",
|
||||
"json-stringify-safe": "^5.0.1",
|
||||
"knex": "^2.5.1",
|
||||
"memorystream": "^0.3.1",
|
||||
"nanoid": "^5.0.2",
|
||||
"node-fetch": "^3.3.2",
|
||||
"node-os-utils": "^1.3.7",
|
||||
"pocketbase": "^0.21.3",
|
||||
"rimraf": "^5.0.5",
|
||||
"semver": "^7.5.4",
|
||||
"sqlite3": "^5.1.6",
|
||||
@ -62,14 +66,9 @@
|
||||
"url-pattern": "^1.0.3",
|
||||
"vhost": "^3.0.2",
|
||||
"winston": "^3.11.0",
|
||||
"winston-syslog": "^2.7.0",
|
||||
"chalk": "^5.3.0",
|
||||
"json-stringify-safe": "^5.0.1",
|
||||
"nanoid": "^5.0.2",
|
||||
"pocketbase": "^0.21.3"
|
||||
"winston-syslog": "^2.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/json-stringify-safe": "^5.0.2",
|
||||
"@types/cors": "^2.8.17",
|
||||
"@types/d3-scale": "^4.0.6",
|
||||
"@types/d3-scale-chromatic": "^3.0.1",
|
||||
@ -82,6 +81,7 @@
|
||||
"@types/inquirer": "^9.0.7",
|
||||
"@types/js-cookie": "^3.0.5",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/json-stringify-safe": "^5.0.2",
|
||||
"@types/memorystream": "^0.3.3",
|
||||
"@types/ncp": "^2.0.8",
|
||||
"@types/node": "^20.8.10",
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { forEach } from '@s-libs/micro-dash'
|
||||
import devcert from 'devcert'
|
||||
import envPaths from 'env-paths'
|
||||
import * as env from 'env-var'
|
||||
import { mkdirSync, realpathSync, writeFileSync } from 'fs'
|
||||
import { dirname, join } from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
@ -26,7 +27,10 @@ const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
const realScriptPath = realpathSync(process.argv[1]!)
|
||||
|
||||
export const _PH_HOME = process.env.PH_HOME || envPaths(`pockethost`).data
|
||||
export const _PH_HOME = env
|
||||
.get('PH_HOME')
|
||||
.default(envPaths(`pockethost`).data)
|
||||
.asString()
|
||||
|
||||
export const _SSL_HOME = join(_PH_HOME, `ssl`)
|
||||
|
||||
|
23
pnpm-lock.yaml
generated
23
pnpm-lock.yaml
generated
@ -389,6 +389,9 @@ importers:
|
||||
env-paths:
|
||||
specifier: ^3.0.0
|
||||
version: 3.0.0
|
||||
env-var:
|
||||
specifier: ^7.5.0
|
||||
version: 7.5.0
|
||||
event-source-polyfill:
|
||||
specifier: ^1.0.31
|
||||
version: 1.0.31
|
||||
@ -452,9 +455,6 @@ importers:
|
||||
pocketbase:
|
||||
specifier: ^0.21.3
|
||||
version: 0.21.3
|
||||
pockethost:
|
||||
specifier: workspace:../pockethost
|
||||
version: 'link:'
|
||||
rimraf:
|
||||
specifier: ^5.0.5
|
||||
version: 5.0.5
|
||||
@ -1779,10 +1779,12 @@ packages:
|
||||
are-we-there-yet@2.0.0:
|
||||
resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==}
|
||||
engines: {node: '>=10'}
|
||||
deprecated: This package is no longer supported.
|
||||
|
||||
are-we-there-yet@3.0.1:
|
||||
resolution: {integrity: sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==}
|
||||
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
|
||||
deprecated: This package is no longer supported.
|
||||
|
||||
arg@5.0.2:
|
||||
resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==}
|
||||
@ -2775,6 +2777,10 @@ packages:
|
||||
resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
|
||||
env-var@7.5.0:
|
||||
resolution: {integrity: sha512-mKZOzLRN0ETzau2W2QXefbFjo5EF4yWq28OyKb9ICdeNhHJlOE/pHHnz4hdYJ9cNZXcJHo5xN4OT4pzuSHSNvA==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
eol@0.9.1:
|
||||
resolution: {integrity: sha512-Ds/TEoZjwggRoz/Q2O7SE3i4Jm66mqTDfmdHdq/7DKVk3bro9Q8h6WdXKdPqFLMoqxrDK5SVRzHVPOS6uuGtrg==}
|
||||
|
||||
@ -3191,10 +3197,12 @@ packages:
|
||||
gauge@3.0.2:
|
||||
resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==}
|
||||
engines: {node: '>=10'}
|
||||
deprecated: This package is no longer supported.
|
||||
|
||||
gauge@4.0.4:
|
||||
resolution: {integrity: sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==}
|
||||
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
|
||||
deprecated: This package is no longer supported.
|
||||
|
||||
get-caller-file@2.0.5:
|
||||
resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}
|
||||
@ -3284,6 +3292,7 @@ packages:
|
||||
|
||||
glob@7.2.3:
|
||||
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
|
||||
deprecated: Glob versions prior to v9 are no longer supported
|
||||
|
||||
global-directory@4.0.1:
|
||||
resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==}
|
||||
@ -3553,6 +3562,7 @@ packages:
|
||||
|
||||
inflight@1.0.6:
|
||||
resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
|
||||
deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
|
||||
|
||||
inherits@2.0.4:
|
||||
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
|
||||
@ -4587,10 +4597,12 @@ packages:
|
||||
|
||||
npmlog@5.0.1:
|
||||
resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==}
|
||||
deprecated: This package is no longer supported.
|
||||
|
||||
npmlog@6.0.2:
|
||||
resolution: {integrity: sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==}
|
||||
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
|
||||
deprecated: This package is no longer supported.
|
||||
|
||||
nunjucks@3.2.4:
|
||||
resolution: {integrity: sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ==}
|
||||
@ -5270,6 +5282,7 @@ packages:
|
||||
|
||||
rimraf@2.7.1:
|
||||
resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==}
|
||||
deprecated: Rimraf versions prior to v4 are no longer supported
|
||||
hasBin: true
|
||||
|
||||
rimraf@3.0.2:
|
||||
@ -8466,7 +8479,7 @@ snapshots:
|
||||
decompress-tar: 4.1.1
|
||||
decompress-tarbz2: 4.1.1
|
||||
decompress-targz: 4.1.1
|
||||
decompress-unzip: https://codeload.github.com/pockethost/decompress-unzip/tar.gz/6ef397b9a2df11d39c7b26ce779e123833844751
|
||||
decompress-unzip: 4.0.1
|
||||
graceful-fs: 4.2.11
|
||||
make-dir: 1.3.0
|
||||
pify: 2.3.0
|
||||
@ -8708,6 +8721,8 @@ snapshots:
|
||||
|
||||
env-paths@3.0.0: {}
|
||||
|
||||
env-var@7.5.0: {}
|
||||
|
||||
eol@0.9.1: {}
|
||||
|
||||
err-code@2.0.3:
|
||||
|
Loading…
x
Reference in New Issue
Block a user