mirror of
https://github.com/pockethost/pockethost.git
synced 2025-06-04 13:16:41 +00:00
chore(root): move pockethost to package
This commit is contained in:
parent
9bba281477
commit
48f25d2f0b
@ -9,6 +9,6 @@ build
|
||||
_site
|
||||
forks
|
||||
|
||||
src/mothership-app/migrations
|
||||
src/mothership-app/pb_hooks/types/types.d.ts
|
||||
src/instance-app/types/types.d.ts
|
||||
packages/pockethost/src/mothership-app/migrations
|
||||
packages/pockethost/src/mothership-app/pb_hooks/types/types.d.ts
|
||||
packages/pockethost/src/instance-app/types/types.d.ts
|
||||
|
57
package.json
57
package.json
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "pockethost",
|
||||
"name": "pockethost-root",
|
||||
"version": "0.11.0",
|
||||
"author": {
|
||||
"name": "Ben Allfree",
|
||||
@ -22,14 +22,14 @@
|
||||
"build:docker": "cd pockethost-instance && docker build . -t benallfree/pockethost-instance:${npm_package_version} -t benallfree/pockethost-instance:latest",
|
||||
"build:frontend:lander": "cd packages/lander && pnpm build",
|
||||
"build:frontend:superadmin": "cd packages/superadmin && pnpm build",
|
||||
"dev:cli": "NODE_ENV=development tsx src/cli/index.ts",
|
||||
"dev:cli": "NODE_ENV=development cd packages/pockethost && pnpm dev",
|
||||
"dev:lander": "cd packages/lander && pnpm start",
|
||||
"dev:dashboard": "cd packages/dashboard && pnpm dev",
|
||||
"dev:superadmin": "cd packages/superadmin && pnpm dev",
|
||||
"prod:cli": "tsx ./src/cli/index.ts",
|
||||
"prod:cli": "tsx ./packages/pockethost/src/cli/index.ts",
|
||||
"plop": "plop --no-progress",
|
||||
"nofile": "cat /proc/sys/fs/file-nr",
|
||||
"mail": "tsx ./src/cli/sendmail.ts",
|
||||
"mail": "tsx ./packages/pockethost/src/cli/sendmail.ts",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"prettier": {
|
||||
@ -44,57 +44,10 @@
|
||||
]
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"devDependencies": {
|
||||
"@changesets/cli": "^2.27.5",
|
||||
"@s-libs/micro-dash": "^16.1.0",
|
||||
"@types/node-os-utils": "^1.3.4",
|
||||
"@types/winston-syslog": "^2.4.3",
|
||||
"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",
|
||||
"decompress-unzip": "https://github.com/pockethost/decompress-unzip.git#6ef397b9a2df11d39c7b26ce779e123833844751",
|
||||
"devcert": "^1.2.2",
|
||||
"dockerode": "^3.3.5",
|
||||
"dotenv": "^16.3.1",
|
||||
"env-paths": "^3.0.0",
|
||||
"event-source-polyfill": "^1.0.31",
|
||||
"eventsource": "^2.0.2",
|
||||
"exit-hook": "^4.0.0",
|
||||
"express": "^4.18.2",
|
||||
"express-async-errors": "^3.1.1",
|
||||
"express-sslify": "^1.2.0",
|
||||
"find-up": "^6.3.0",
|
||||
"ftp-srv": "github:pockethost/ftp-srv#0fc708bae0d5d7a55ce948767f082d6fcfb2af59",
|
||||
"get-port": "^6.1.2",
|
||||
"glob": "^10.3.10",
|
||||
"gobot": "1.0.0-alpha.40",
|
||||
"gobot-pocketbase": "0.22.8-alpha.22",
|
||||
"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.20.1",
|
||||
"rimraf": "^5.0.5",
|
||||
"semver": "^7.5.4",
|
||||
"sqlite3": "^5.1.6",
|
||||
"syslog-parse": "^2.0.0",
|
||||
"tail": "^2.2.6",
|
||||
"tmp": "^0.2.1",
|
||||
"url-pattern": "^1.0.3",
|
||||
"vhost": "^3.0.2",
|
||||
"winston": "^3.11.0",
|
||||
"winston-syslog": "^2.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^19.3.0",
|
||||
"@commitlint/config-conventional": "^19.2.2",
|
||||
"@swc/cli": "^0.1.62",
|
||||
|
@ -30,7 +30,6 @@
|
||||
"daisyui": "^4.4.23",
|
||||
"date-fns": "^2.30.0",
|
||||
"highlight.js": "^11.8.0",
|
||||
"pocketbase": "^0.19.0",
|
||||
"sass": "^1.68.0",
|
||||
"svelte": "^4.2.1",
|
||||
"svelte-chartjs": "3.1.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!doctype html>
|
||||
<!--suppress ALL -->
|
||||
<html lang="en" data-theme="dark" class='h-full'>
|
||||
<html lang="en" data-theme="dark" class="h-full">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>PocketHost</title>
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
<body class='h-full'>
|
||||
<body class="h-full">
|
||||
<div>%sveltekit.body%</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -15,7 +15,7 @@ const config = {
|
||||
$components: './src/components',
|
||||
$util: './src/util',
|
||||
$src: './src',
|
||||
$shared: '../../src/shared',
|
||||
$shared: '../pockethost/src/shared',
|
||||
},
|
||||
},
|
||||
target: '#svelte',
|
||||
|
@ -11,7 +11,13 @@
|
||||
"resolveJsonModule": true,
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
"strict": true
|
||||
"strict": true,
|
||||
"paths": {
|
||||
"$util/*": ["./src/util/*"],
|
||||
"$src/*": ["./src/*"],
|
||||
"$shared": ["../pockethost/src/shared/"],
|
||||
"$components/*": ["./src/components/*"]
|
||||
}
|
||||
}
|
||||
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
|
||||
//
|
||||
|
105
packages/pockethost/package.json
Normal file
105
packages/pockethost/package.json
Normal file
@ -0,0 +1,105 @@
|
||||
{
|
||||
"name": "pockethost",
|
||||
"version": "0.11.0",
|
||||
"author": {
|
||||
"name": "Ben Allfree",
|
||||
"url": "https://github.com/benallfree"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "src/index.ts",
|
||||
"bin": {
|
||||
"pockethost": "src/cli/index.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "NODE_ENV=development tsx ./src/cli/index.ts",
|
||||
"start": "tsx ./src/cli/index.ts",
|
||||
"mail": "tsx ./src/cli/sendmail.ts"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@s-libs/micro-dash": "^16.1.0",
|
||||
"@types/node-os-utils": "^1.3.4",
|
||||
"@types/winston-syslog": "^2.4.3",
|
||||
"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",
|
||||
"decompress-unzip": "https://github.com/pockethost/decompress-unzip.git#6ef397b9a2df11d39c7b26ce779e123833844751",
|
||||
"devcert": "^1.2.2",
|
||||
"dockerode": "^3.3.5",
|
||||
"dotenv": "^16.3.1",
|
||||
"env-paths": "^3.0.0",
|
||||
"event-source-polyfill": "^1.0.31",
|
||||
"eventsource": "^2.0.2",
|
||||
"exit-hook": "^4.0.0",
|
||||
"express": "^4.18.2",
|
||||
"express-async-errors": "^3.1.1",
|
||||
"express-sslify": "^1.2.0",
|
||||
"ftp-srv": "github:pockethost/ftp-srv#0fc708bae0d5d7a55ce948767f082d6fcfb2af59",
|
||||
"get-port": "^6.1.2",
|
||||
"glob": "^10.3.10",
|
||||
"gobot": "1.0.0-alpha.40",
|
||||
"gobot-pocketbase": "0.22.8-alpha.22",
|
||||
"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.20.1",
|
||||
"rimraf": "^5.0.5",
|
||||
"semver": "^7.5.4",
|
||||
"sqlite3": "^5.1.6",
|
||||
"syslog-parse": "^2.0.0",
|
||||
"tail": "^2.2.6",
|
||||
"tmp": "^0.2.1",
|
||||
"url-pattern": "^1.0.3",
|
||||
"vhost": "^3.0.2",
|
||||
"winston": "^3.11.0",
|
||||
"winston-syslog": "^2.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/cors": "^2.8.17",
|
||||
"@types/d3-scale": "^4.0.6",
|
||||
"@types/d3-scale-chromatic": "^3.0.1",
|
||||
"@types/decompress": "^4.2.6",
|
||||
"@types/dockerode": "^3.3.21",
|
||||
"@types/eventsource": "^1.1.14",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/express-sslify": "^1.2.5",
|
||||
"@types/http-proxy": "^1.17.13",
|
||||
"@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",
|
||||
"@types/semver": "^7.5.4",
|
||||
"@types/tail": "^2.2.2",
|
||||
"@types/tmp": "^0.2.5",
|
||||
"@types/unzipper": "^0.10.8",
|
||||
"@types/vhost": "^3.0.9",
|
||||
"chokidar-cli": "^3.0.0",
|
||||
"concurrently": "^8.2.2",
|
||||
"copyfiles": "^2.4.1",
|
||||
"date-fns": "^2.30.0",
|
||||
"dotenv-cli": "^7.3.0",
|
||||
"express": "^4.18.2",
|
||||
"http-proxy-middleware": "^2.0.6",
|
||||
"inquirer": "^9.2.15",
|
||||
"ip-cidr": "^3.1.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"ncp": "^2.0.0",
|
||||
"nodemon": "^3.0.3",
|
||||
"ora": "^7.0.1",
|
||||
"postinstall-postinstall": "^2.1.0",
|
||||
"type-fest": "^4.6.0"
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@ import {
|
||||
SSL_CERT,
|
||||
SSL_KEY,
|
||||
} from '$constants'
|
||||
import { LoggerService } from '$src/shared'
|
||||
import { LoggerService } from '$shared'
|
||||
import { discordAlert } from '$util'
|
||||
import { forEach } from '@s-libs/micro-dash'
|
||||
import cors from 'cors'
|
@ -7,7 +7,7 @@ import {
|
||||
TEST_EMAIL,
|
||||
} from '$constants'
|
||||
import { SqliteService } from '$services'
|
||||
import { LoggerService, UserFields } from '$src/shared'
|
||||
import { LoggerService, UserFields } from '$shared'
|
||||
import { map } from '@s-libs/micro-dash'
|
||||
import Bottleneck from 'bottleneck'
|
||||
import { InvalidArgumentError, program } from 'commander'
|
@ -2,28 +2,30 @@ import {
|
||||
InstanceFields,
|
||||
InstanceId,
|
||||
IoCManager,
|
||||
mkSingleton,
|
||||
UserFields,
|
||||
mkSingleton,
|
||||
} from '$shared'
|
||||
import {
|
||||
HandlerFactory,
|
||||
SettingsService,
|
||||
mkBoolean,
|
||||
mkCsvString,
|
||||
mkNumber,
|
||||
mkPath,
|
||||
mkString,
|
||||
SettingsService,
|
||||
} from '$src/util/Settings'
|
||||
} from '$util'
|
||||
import { forEach } from '@s-libs/micro-dash'
|
||||
import devcert from 'devcert'
|
||||
import dotenv from 'dotenv'
|
||||
import envPaths from 'env-paths'
|
||||
import { findUpSync } from 'find-up'
|
||||
import { mkdirSync, realpathSync, writeFileSync } from 'fs'
|
||||
import { dirname, join, resolve } from 'path'
|
||||
import { dirname, join } from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
import { LogEntry } from 'winston'
|
||||
|
||||
dotenv.config({ path: `.env` })
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
dotenv.config()
|
||||
|
||||
const realScriptPath = realpathSync(process.argv[1]!)
|
||||
|
||||
@ -32,9 +34,7 @@ export const _PH_HOME = process.env.PH_HOME || envPaths(`pockethost`).data
|
||||
export const _SSL_HOME = join(_PH_HOME, `ssl`)
|
||||
|
||||
export const _IS_DEV = process.env.NODE_ENV === 'development'
|
||||
export const _PH_PROJECT_ROOT = dirname(
|
||||
findUpSync('package.json', { cwd: dirname(realScriptPath) })!,
|
||||
)
|
||||
export const _PH_PROJECT_ROOT = join(__dirname, '..')
|
||||
export const _APEX_DOMAIN = process.env.APEX_DOMAIN || 'pockethost.lvh.me'
|
||||
export const _HTTP_PROTOCOL = process.env.HTTP_PROTOCOL || `https:`
|
||||
export const _APP_NAME = process.env.APP_NAME || 'app'
|
||||
@ -43,15 +43,13 @@ export const _MOTHERSHIP_NAME =
|
||||
|
||||
export const _MOTHERSHIP_APP_ROOT = (...paths: string[]) =>
|
||||
join(
|
||||
process.env.PH_MOTHERSHIP_APP_ROOT ||
|
||||
join(_PH_PROJECT_ROOT, `src`, 'mothership-app'),
|
||||
process.env.PH_MOTHERSHIP_APP_ROOT || join(__dirname, 'mothership-app'),
|
||||
...paths,
|
||||
)
|
||||
|
||||
export const _INSTANCE_APP_ROOT = (...paths: string[]) =>
|
||||
join(
|
||||
process.env.PH_INSTANCE_APP_ROOT ||
|
||||
join(_PH_PROJECT_ROOT, `src`, 'instance-app'),
|
||||
process.env.PH_INSTANCE_APP_ROOT || join(__dirname, 'mothership-app'),
|
||||
...paths,
|
||||
)
|
||||
|
159
packages/pockethost/src/mothership-app/pb_hooks/src/versions.cjs
Normal file
159
packages/pockethost/src/mothership-app/pb_hooks/src/versions.cjs
Normal file
@ -0,0 +1,159 @@
|
||||
module.exports = [
|
||||
'0.22.*',
|
||||
'0.22.12',
|
||||
'0.22.11',
|
||||
'0.22.10',
|
||||
'0.22.9',
|
||||
'0.22.8',
|
||||
'0.22.7',
|
||||
'0.22.6',
|
||||
'0.22.5',
|
||||
'0.22.4',
|
||||
'0.22.3',
|
||||
'0.22.2',
|
||||
'0.22.1',
|
||||
'0.22.0',
|
||||
'0.21.*',
|
||||
'0.21.3',
|
||||
'0.21.2',
|
||||
'0.21.1',
|
||||
'0.21.0',
|
||||
'0.20.*',
|
||||
'0.20.7',
|
||||
'0.20.6',
|
||||
'0.20.5',
|
||||
'0.20.4',
|
||||
'0.20.3',
|
||||
'0.20.2',
|
||||
'0.20.1',
|
||||
'0.20.0',
|
||||
'0.20.0-rc3',
|
||||
'0.20.0-rc2',
|
||||
'0.20.0-rc',
|
||||
'0.19.*',
|
||||
'0.19.4',
|
||||
'0.19.3',
|
||||
'0.19.2',
|
||||
'0.19.1',
|
||||
'0.19.0',
|
||||
'0.18.*',
|
||||
'0.18.10',
|
||||
'0.18.9',
|
||||
'0.18.8',
|
||||
'0.18.7',
|
||||
'0.18.6',
|
||||
'0.18.5',
|
||||
'0.18.4',
|
||||
'0.18.3',
|
||||
'0.18.2',
|
||||
'0.18.1',
|
||||
'0.18.0',
|
||||
'0.17.*',
|
||||
'0.17.7',
|
||||
'0.17.6',
|
||||
'0.17.5',
|
||||
'0.17.4',
|
||||
'0.17.3',
|
||||
'0.17.2',
|
||||
'0.17.1',
|
||||
'0.17.0',
|
||||
'0.16.*',
|
||||
'0.16.10',
|
||||
'0.16.9',
|
||||
'0.16.8',
|
||||
'0.16.7',
|
||||
'0.16.6',
|
||||
'0.16.5',
|
||||
'0.16.4',
|
||||
'0.16.3',
|
||||
'0.16.2',
|
||||
'0.16.1',
|
||||
'0.16.0',
|
||||
'0.15.*',
|
||||
'0.15.3',
|
||||
'0.15.2',
|
||||
'0.15.1',
|
||||
'0.15.0',
|
||||
'0.14.*',
|
||||
'0.14.5',
|
||||
'0.14.4',
|
||||
'0.14.3',
|
||||
'0.14.2',
|
||||
'0.14.1',
|
||||
'0.14.0',
|
||||
'0.13.*',
|
||||
'0.13.4',
|
||||
'0.13.3',
|
||||
'0.13.2',
|
||||
'0.13.1',
|
||||
'0.13.0',
|
||||
'0.12.*',
|
||||
'0.12.3',
|
||||
'0.12.2',
|
||||
'0.12.1',
|
||||
'0.12.0',
|
||||
'0.11.*',
|
||||
'0.11.4',
|
||||
'0.11.3',
|
||||
'0.11.2',
|
||||
'0.11.1',
|
||||
'0.11.0',
|
||||
'0.10.*',
|
||||
'0.10.4',
|
||||
'0.10.3',
|
||||
'0.10.2',
|
||||
'0.10.1',
|
||||
'0.10.0',
|
||||
'0.9.*',
|
||||
'0.9.2',
|
||||
'0.9.1',
|
||||
'0.9.0',
|
||||
'0.8.*',
|
||||
'0.8.0',
|
||||
'0.8.0-rc4',
|
||||
'0.8.0-rc3',
|
||||
'0.8.0-rc2',
|
||||
'0.8.0-rc1',
|
||||
'0.7.*',
|
||||
'0.7.10',
|
||||
'0.7.9',
|
||||
'0.7.8',
|
||||
'0.7.7',
|
||||
'0.7.6',
|
||||
'0.7.5',
|
||||
'0.7.4',
|
||||
'0.7.3',
|
||||
'0.7.2',
|
||||
'0.7.1',
|
||||
'0.7.0',
|
||||
'0.6.*',
|
||||
'0.6.0',
|
||||
'0.5.*',
|
||||
'0.5.2',
|
||||
'0.5.1',
|
||||
'0.5.0',
|
||||
'0.4.*',
|
||||
'0.4.2',
|
||||
'0.4.1',
|
||||
'0.4.0',
|
||||
'0.3.*',
|
||||
'0.3.4',
|
||||
'0.3.3',
|
||||
'0.3.2',
|
||||
'0.3.1',
|
||||
'0.3.0',
|
||||
'0.2.*',
|
||||
'0.2.8',
|
||||
'0.2.7',
|
||||
'0.2.6',
|
||||
'0.2.5',
|
||||
'0.2.4',
|
||||
'0.2.3',
|
||||
'0.2.2',
|
||||
'0.2.1',
|
||||
'0.2.0',
|
||||
'0.1.*',
|
||||
'0.1.2',
|
||||
'0.1.1',
|
||||
'0.1.0',
|
||||
]
|
@ -5,30 +5,30 @@ import {
|
||||
EDGE_APEX_DOMAIN,
|
||||
INSTANCE_APP_HOOK_DIR,
|
||||
INSTANCE_APP_MIGRATIONS_DIR,
|
||||
UPGRADE_MODE,
|
||||
mkAppUrl,
|
||||
mkContainerHomePath,
|
||||
mkDocUrl,
|
||||
mkEdgeUrl,
|
||||
UPGRADE_MODE,
|
||||
} from '$constants'
|
||||
import {
|
||||
InstanceLogger,
|
||||
MothershipAdminClientService,
|
||||
PocketbaseService,
|
||||
PortService,
|
||||
proxyService,
|
||||
SpawnConfig,
|
||||
proxyService,
|
||||
} from '$services'
|
||||
import {
|
||||
CLEANUP_PRIORITY_LAST,
|
||||
createCleanupManager,
|
||||
createTimerManager,
|
||||
InstanceFields,
|
||||
InstanceId,
|
||||
InstanceStatus,
|
||||
LoggerService,
|
||||
mkSingleton,
|
||||
SingletonBaseConfig,
|
||||
createCleanupManager,
|
||||
createTimerManager,
|
||||
mkSingleton,
|
||||
} from '$shared'
|
||||
import { asyncExitHook, mkInternalUrl, now } from '$util'
|
||||
import { flatten, map, values } from '@s-libs/micro-dash'
|
@ -1,18 +1,18 @@
|
||||
import {
|
||||
APEX_DOMAIN,
|
||||
DOCKER_CONTAINER_HOST,
|
||||
SYSLOGD_PORT,
|
||||
mkContainerHomePath,
|
||||
mkInstanceDataPath,
|
||||
SYSLOGD_PORT,
|
||||
} from '$constants'
|
||||
import { PortService } from '$services'
|
||||
import {
|
||||
createCleanupManager,
|
||||
LoggerService,
|
||||
mkSingleton,
|
||||
SingletonBaseConfig,
|
||||
createCleanupManager,
|
||||
mkSingleton,
|
||||
} from '$shared'
|
||||
import { asyncExitHook, mkInternalUrl, SyslogLogger, tryFetch } from '$util'
|
||||
import { SyslogLogger, asyncExitHook, mkInternalUrl, tryFetch } from '$util'
|
||||
import { map } from '@s-libs/micro-dash'
|
||||
import Docker, { Container, ContainerCreateOptions } from 'dockerode'
|
||||
import { existsSync } from 'fs'
|
||||
@ -104,7 +104,7 @@ export const createPocketbaseService = async (
|
||||
if (!realVersion) {
|
||||
throw new Error(`No PocketBase version satisfying ${_version}`)
|
||||
}
|
||||
const binPath = await bot.getBinaryPath(realVersion)
|
||||
const binPath = await bot.getBinaryFilePath(realVersion)
|
||||
if (!existsSync(binPath)) {
|
||||
throw new Error(
|
||||
`PocketBase binary (${binPath}) not found. Contact pockethost.io.`,
|
@ -2,14 +2,14 @@ import { DAEMON_PORT } from '$constants'
|
||||
import {
|
||||
Logger,
|
||||
LoggerService,
|
||||
mkSingleton,
|
||||
SingletonBaseConfig,
|
||||
mkSingleton,
|
||||
} from '$shared'
|
||||
import { asyncExitHook } from '$util'
|
||||
import cors from 'cors'
|
||||
import express, { Request, Response } from 'express'
|
||||
import 'express-async-errors'
|
||||
import { default as httpProxy, default as Server } from 'http-proxy'
|
||||
import { default as Server, default as httpProxy } from 'http-proxy'
|
||||
import { AsyncReturnType } from 'type-fest'
|
||||
|
||||
export type ProxyServiceApi = AsyncReturnType<typeof proxyService>
|
@ -1,12 +1,12 @@
|
||||
import Ajv, { JSONSchemaType } from 'ajv'
|
||||
import type pocketbaseEs from 'pocketbase'
|
||||
import type PocketBase from 'pocketbase'
|
||||
import { ClientResponseError } from 'pocketbase'
|
||||
import type { JsonObject } from 'type-fest'
|
||||
import { LoggerService } from '../Logger'
|
||||
import { RestCommands, RestMethods } from '../schema'
|
||||
|
||||
export type RestHelperConfig = {
|
||||
client: pocketbaseEs
|
||||
client: PocketBase
|
||||
}
|
||||
|
||||
export type RestHelper = ReturnType<typeof createRestHelper>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user