@pmate/cli 0.30.1 → 0.31.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 +29 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +655 -497
- package/dist/templates/electron/main.cjs +61 -0
- package/dist/templates/electron/resources.cjs +32 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -246,3 +246,32 @@ pmate service log pmate:developers-api --app pmate:developers --search http.acce
|
|
|
246
246
|
Pages are zero-based. `--search` searches the last 24 hours; the ordinary list follows the Indexer's retention window (currently seven days). `--since-ms` is an epoch-millisecond lower bound. This mode does not accept `--env`, `--follow`, `--history`, or `--base-url`: environment filtering and follow are not implemented by the shared API and are never silently ignored. Without `--app`, the existing operational service-log command is unchanged.
|
|
247
247
|
|
|
248
248
|
A current CLI session is exchanged in memory for `pmate:developers`; the active App and session file are not changed. If login is required, run `pmate login --app pmate:developers`. Access denial never falls back to anonymous log reads. Neither source nor exchanged tokens are printed.
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
### Package a desktop app
|
|
252
|
+
|
|
253
|
+
`pmate app build <ns:app> --target electron --config <file>` builds the configured web app, embeds its static output in an Electron ASAR, and produces a macOS DMG and ZIP. It does not require registry login. The first build downloads pinned Electron and electron-builder versions. Current targets: macOS `arm64` and `x64`, built on macOS.
|
|
254
|
+
|
|
255
|
+
```sh
|
|
256
|
+
pmate app build pmate:hello --target electron --config apps/hello/desktop.config.json --platform mac --arch arm64 --out-dir release/desktop
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Config (paths relative to the config file, `web.dist` relative to `web.cwd`):
|
|
260
|
+
|
|
261
|
+
```json
|
|
262
|
+
{
|
|
263
|
+
"schemaVersion": 1,
|
|
264
|
+
"app": "pmate:hello",
|
|
265
|
+
"productName": "Going Merry",
|
|
266
|
+
"bundleId": "chat.pmate.goingmerry",
|
|
267
|
+
"version": "0.1.0",
|
|
268
|
+
"origin": "https://hello.pmate.chat",
|
|
269
|
+
"authOrigins": ["https://auth.pmate.chat"],
|
|
270
|
+
"icon": "desktop/icon.png",
|
|
271
|
+
"web": { "cwd": ".", "build": ["pnpm", "run", "build"], "dist": "dist" }
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Use `--dry-run` to inspect the plan, `--dir` for an unpacked `.app`, or `--signed` to require a configured macOS signing identity. Default builds are ad-hoc signed for local use; they are not notarized distribution releases. Signed builds use electron-builder's standard signing/notarization environment variables; verify notarization separately before distributing.
|
|
276
|
+
|
|
277
|
+
The shell serves the bundled renderer under its existing exact HTTPS origin, preserving authentication callbacks and API CORS. Other origins remain normal network requests. Static resources are hashed and checked at launch; missing assets return 404. The renderer is sandboxed with Node disabled and no privileged preload bridge. Sign-in, chat and inference still require internet. Updates require a new package. Each build prints its artifact directory and a resource/signing report; no build uploads or auto-updates occur.
|
package/dist/index.d.ts
CHANGED
|
@@ -815,6 +815,19 @@ type StoreCommandArgs = ({
|
|
|
815
815
|
filePath?: string;
|
|
816
816
|
} & StoreSharedArgs);
|
|
817
817
|
type AppCommandArgs = {
|
|
818
|
+
type: Command.App;
|
|
819
|
+
action: "build";
|
|
820
|
+
id: string;
|
|
821
|
+
target: "electron";
|
|
822
|
+
config: string;
|
|
823
|
+
platform: string;
|
|
824
|
+
arch: string;
|
|
825
|
+
outDir: string;
|
|
826
|
+
dryRun: boolean;
|
|
827
|
+
signed: boolean;
|
|
828
|
+
dir: boolean;
|
|
829
|
+
json: boolean;
|
|
830
|
+
} | {
|
|
818
831
|
type: Command.App;
|
|
819
832
|
action: "list";
|
|
820
833
|
namespace?: string;
|