uncial-cms 5.0.0 → 5.1.0

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/README.md CHANGED
@@ -149,7 +149,7 @@ leaving it unrouted.
149
149
  `createLocalVitePlugin` from `uncial-cms/local` is the same endpoint on its own,
150
150
  for a site that is not using `defineSite`; it takes the repository `root` and the
151
151
  repo-root-relative `permittedRoots` writes are confined to. It is serve-only and
152
- forces Vite to bind to `127.0.0.1`. Every path it takes is repo-root-relative,
152
+ binds Vite to `127.0.0.1` unless given a `host`. Every path it takes is repo-root-relative,
153
153
  exactly as the GitHub adapter addresses one. The adapter calls it at the fixed,
154
154
  development-only JSON endpoint `/__uncial-cms/local`:
155
155
 
@@ -4,5 +4,7 @@ export interface LocalVitePluginOptions {
4
4
  root: string;
5
5
  /** Repo-root-relative directories a request may address, as the site declares them. */
6
6
  permittedRoots: string[];
7
+ /** Vite `server.host`; defaults to loopback because the endpoint has no auth. */
8
+ host?: string | boolean;
7
9
  }
8
10
  export declare function createLocalVitePlugin(options: LocalVitePluginOptions): Plugin;
@@ -190,7 +190,7 @@ export function createLocalVitePlugin(options) {
190
190
  const watched = roots.permitted.map((permitted) => permitted.absolute);
191
191
  return {
192
192
  server: {
193
- host: '127.0.0.1',
193
+ host: options.host ?? '127.0.0.1',
194
194
  // Every write under a permitted root arrives through this plugin's
195
195
  // own endpoint, so a watcher event for one is the author's own
196
196
  // autosave landing. Watched, it makes Vite full-reload the page
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uncial-cms",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",