pockethost 1.3.0 → 1.3.2
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/CHANGELOG.md +18 -0
- package/core.ts +0 -1
- package/package.json +4 -4
- package/readme.md +18 -6
- package/src/cli/index.ts +2 -3
- package/src/constants.ts +2 -8
- package/src/server.ts +2 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# pockethost
|
|
2
2
|
|
|
3
|
+
## 1.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b0a78d8: Updated plugin authoring guide
|
|
8
|
+
- ac63ea7: Updated plugin documentation
|
|
9
|
+
- Updated dependencies [eb0d011]
|
|
10
|
+
- Updated dependencies [38d2c93]
|
|
11
|
+
- @pockethost/plugin-launcher-spawn@0.2.0
|
|
12
|
+
- @pockethost/plugin-console-logger@0.2.0
|
|
13
|
+
- @pockethost/plugin-auto-admin@0.1.0
|
|
14
|
+
|
|
15
|
+
## 1.3.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 8288197: Added plugin authoring guide
|
|
20
|
+
|
|
3
21
|
## 1.3.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
package/core.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pockethost",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Ben Allfree",
|
|
6
6
|
"url": "https://github.com/benallfree"
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"typescript": "^5.4.5",
|
|
40
40
|
"update-notifier": "^7.0.0",
|
|
41
41
|
"url-pattern": "^1.0.3",
|
|
42
|
-
"@pockethost/plugin-
|
|
43
|
-
"@pockethost/plugin-
|
|
44
|
-
"@pockethost/plugin-
|
|
42
|
+
"@pockethost/plugin-launcher-spawn": "^0.2.0",
|
|
43
|
+
"@pockethost/plugin-auto-admin": "^0.1.0",
|
|
44
|
+
"@pockethost/plugin-console-logger": "^0.2.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/express": "^4.17.21",
|
package/readme.md
CHANGED
|
@@ -40,18 +40,30 @@ Use `pockethost config` to set global defaults stored in `<PH_HOME>/.env`.
|
|
|
40
40
|
|
|
41
41
|
- `@pockethost/plugin-console-logger`
|
|
42
42
|
- `@pockethost/plugin-launcher-spawn`
|
|
43
|
+
- `@pockethost/plugin-auto-admin`
|
|
43
44
|
|
|
44
45
|
## Plugins
|
|
45
46
|
|
|
46
|
-
PocketHost uses a hook architecture and features
|
|
47
|
+
PocketHost uses a hook architecture and features a growing list plugins. Some plugins have a CLI component, whereas others add purely programmatic support to alter how PocketHost works:
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
Current plugins:
|
|
50
|
+
|
|
51
|
+
| name | description |
|
|
52
|
+
| --------------------- | ------------------------------------------------------------------------------------------------- |
|
|
53
|
+
| plugin-console-logger | Routes log messages to the console |
|
|
54
|
+
| plugin-auto-admin | Auto-creates a default admin account on instance launch |
|
|
55
|
+
| plugin-launcher-spawn | Launches PocketBase instances via `spawn()` on the local machine. PocketHost uses this by default |
|
|
56
|
+
|
|
57
|
+
Coming soon:
|
|
58
|
+
| name | description |
|
|
49
59
|
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
50
|
-
| plugin-ftp-server
|
|
60
|
+
| plugin-ftp-server | Used to provide secure FTPS access to PocketBase instance data. This FTP server can run along-side a PocketHost server. |
|
|
51
61
|
| plugin-launcher-docker | Launches PocketBase instances via Docker. This is useful for running untrusted PocketBase code and instances. pockethost.io uses this. |
|
|
52
|
-
| plugin-
|
|
53
|
-
| plugin-waf
|
|
54
|
-
|
|
62
|
+
| plugin-waf | A Web Application Firewall |
|
|
63
|
+
| plugin-waf-enforce-ssl | Enforce SSL at the
|
|
64
|
+
WAF
|
|
65
|
+
|
|
66
|
+
See the [./plugin-guide.md](Plugin Authoring Guide) for details about what hooks and filters are available.
|
|
55
67
|
|
|
56
68
|
## Support
|
|
57
69
|
|
package/src/cli/index.ts
CHANGED
|
@@ -4,15 +4,14 @@ import { uniq } from '@s-libs/micro-dash'
|
|
|
4
4
|
import { program } from 'commander'
|
|
5
5
|
import { readFileSync } from 'fs'
|
|
6
6
|
import updateNotifier from 'update-notifier'
|
|
7
|
+
import { PH_PLUGINS, PH_PROJECT_DIR } from '../../core'
|
|
7
8
|
import {
|
|
8
9
|
DEBUG,
|
|
9
10
|
LogLevelName,
|
|
10
11
|
LoggerService,
|
|
11
|
-
PH_PLUGINS,
|
|
12
|
-
PH_PROJECT_DIR,
|
|
13
12
|
doCliCommandsFilter,
|
|
14
13
|
loadPlugins,
|
|
15
|
-
} from '
|
|
14
|
+
} from '../common'
|
|
16
15
|
import { ConfigCommand } from './commands/ConfigCommand'
|
|
17
16
|
import { PluginCommand } from './commands/PluginCommand'
|
|
18
17
|
import { ServeCommand } from './commands/ServeCommand'
|
package/src/constants.ts
CHANGED
|
@@ -4,14 +4,8 @@ import envPaths from 'env-paths'
|
|
|
4
4
|
import { dirname, join } from 'path'
|
|
5
5
|
import { cwd } from 'process'
|
|
6
6
|
import { fileURLToPath } from 'url'
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
mkBoolean,
|
|
10
|
-
mkCsvString,
|
|
11
|
-
mkNumber,
|
|
12
|
-
mkPath,
|
|
13
|
-
mkString,
|
|
14
|
-
} from '../core'
|
|
7
|
+
import { mkBoolean, mkCsvString, mkNumber, mkPath, mkString } from '../core'
|
|
8
|
+
import { InstanceId } from './common'
|
|
15
9
|
import { DEBUG, IS_DEV } from './common/debug'
|
|
16
10
|
import { Settings } from './core/Settings'
|
|
17
11
|
|
package/src/server.ts
CHANGED
|
@@ -2,10 +2,7 @@ import express, { ErrorRequestHandler } from 'express'
|
|
|
2
2
|
import 'express-async-errors'
|
|
3
3
|
import { default as httpProxy } from 'http-proxy'
|
|
4
4
|
import {
|
|
5
|
-
APEX_DOMAIN,
|
|
6
5
|
LoggerService,
|
|
7
|
-
PORT,
|
|
8
|
-
asyncExitHook,
|
|
9
6
|
doAfterInstanceFoundAction,
|
|
10
7
|
doAfterServerStartAction,
|
|
11
8
|
doAppMountedAction,
|
|
@@ -15,7 +12,8 @@ import {
|
|
|
15
12
|
doRequestErrorAction,
|
|
16
13
|
doRequestErrorMessageFilter,
|
|
17
14
|
onInstanceLogAction,
|
|
18
|
-
} from '../
|
|
15
|
+
} from '../common'
|
|
16
|
+
import { APEX_DOMAIN, PORT, asyncExitHook } from '../core'
|
|
19
17
|
|
|
20
18
|
export const serve = async () => {
|
|
21
19
|
const _proxyLogger = LoggerService().create('ProxyService')
|