@playcraft/cli 0.1.47-beta → 0.1.49-beta
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/dist/commands/tools-batch.js +12 -2
- package/dist/workspace-runtime/batch/control.js +6 -0
- package/dist/workspace-runtime/batch/deliver.js +105 -87
- package/dist/workspace-runtime/batch/generate.js +26 -3
- package/dist/workspace-runtime/batch/prepare.js +169 -56
- package/dist/workspace-runtime/batch/source-capture.js +7 -20
- package/dist/workspace-runtime/batch/source-publish.js +2 -4
- package/dist/workspace-runtime/codex/app-server.js +29 -4
- package/dist/workspace-runtime/codex/delivery-tools.js +144 -0
- package/dist/workspace-runtime/codex/tool-response.js +10 -0
- package/dist/workspace-runtime/codex/ui-tools.js +22 -5
- package/dist/workspace-runtime/previews/diagnostics.js +44 -0
- package/dist/workspace-runtime/previews/publish.js +16 -4
- package/dist/workspace-runtime/serve.js +60 -0
- package/dist/workspace-runtime/server/accept-operation.js +61 -0
- package/dist/workspace-runtime/server/dispatch.js +47 -2
- package/dist/workspace-runtime/server/http.js +163 -130
- package/dist/workspace-runtime/server/operation-record.js +33 -0
- package/dist/workspace-runtime/server/submit-operation.js +41 -0
- package/dist/workspace-runtime/workspaces/append-only-log.js +62 -0
- package/dist/workspace-runtime/workspaces/delivery-build.js +331 -0
- package/dist/workspace-runtime/workspaces/delivery-store.js +168 -0
- package/dist/workspace-runtime/workspaces/delivery.js +64 -0
- package/dist/workspace-runtime/workspaces/dependencies.js +15 -0
- package/dist/workspace-runtime/workspaces/developer-command.js +35 -1
- package/dist/workspace-runtime/workspaces/directories.js +9 -4
- package/dist/workspace-runtime/workspaces/operation-log.js +23 -0
- package/package.json +3 -3
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { AppendOnlyLog } from './append-only-log.js';
|
|
3
|
+
export const OPERATION_LOG_MAX_BYTES = 2 * 1024 * 1024;
|
|
4
|
+
const TRUNCATED = '[playcraft] log truncated; showing the tail\n';
|
|
5
|
+
const OPERATION_ID = /^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i;
|
|
6
|
+
/** Full build output for one operation, kept outside the checkout and capped at 2 MiB. */
|
|
7
|
+
export class OperationLogStore {
|
|
8
|
+
stateDir;
|
|
9
|
+
constructor(stateDir) {
|
|
10
|
+
this.stateDir = stateDir;
|
|
11
|
+
}
|
|
12
|
+
log(operationId) {
|
|
13
|
+
if (!OPERATION_ID.test(operationId))
|
|
14
|
+
throw new Error('invalid_operation_id');
|
|
15
|
+
return new AppendOnlyLog(join(this.stateDir, 'operation-logs', `${operationId}.log`), OPERATION_LOG_MAX_BYTES, TRUNCATED);
|
|
16
|
+
}
|
|
17
|
+
async append(operationId, text) {
|
|
18
|
+
await this.log(operationId).append(text);
|
|
19
|
+
}
|
|
20
|
+
async read(operationId, offset = 0) {
|
|
21
|
+
return this.log(operationId).read(offset);
|
|
22
|
+
}
|
|
23
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playcraft/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.49-beta",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"@gltf-transform/core": "^4.3.0",
|
|
52
52
|
"@gltf-transform/extensions": "^4.3.0",
|
|
53
53
|
"@gltf-transform/functions": "^4.3.0",
|
|
54
|
-
"@playcraft/build": "0.1.
|
|
55
|
-
"@playcraft/common": "0.1.
|
|
54
|
+
"@playcraft/build": "0.1.49-beta",
|
|
55
|
+
"@playcraft/common": "0.1.49-beta",
|
|
56
56
|
"better-sqlite3-pinned": "npm:better-sqlite3@13.0.3",
|
|
57
57
|
"chokidar": "^4.0.3",
|
|
58
58
|
"commander": "^13.1.0",
|