@kurot/cli 3.7.0 → 3.8.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/CHANGELOG.md +56 -1
- package/README.md +17 -5
- package/dist/core/config-watcher.d.ts +8 -0
- package/dist/core/config-watcher.d.ts.map +1 -0
- package/dist/core/config-watcher.js +63 -0
- package/dist/core/config-watcher.js.map +1 -0
- package/dist/core/config.d.ts +6 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +23 -6
- package/dist/core/config.js.map +1 -1
- package/dist/core/dev-server.d.ts.map +1 -1
- package/dist/core/dev-server.js +2 -0
- package/dist/core/dev-server.js.map +1 -1
- package/dist/core/diagnostics/codes.d.ts +2 -0
- package/dist/core/diagnostics/codes.d.ts.map +1 -1
- package/dist/core/diagnostics/codes.js +2 -0
- package/dist/core/diagnostics/codes.js.map +1 -1
- package/dist/core/diagnostics/output.d.ts +1 -1
- package/dist/core/diagnostics/output.d.ts.map +1 -1
- package/dist/core/plugins/generate-html.d.ts +7 -1
- package/dist/core/plugins/generate-html.d.ts.map +1 -1
- package/dist/core/plugins/generate-html.js +20 -4
- package/dist/core/plugins/generate-html.js.map +1 -1
- package/docs/ai-context.md +6 -1
- package/docs/architecture.md +5 -1
- package/docs/dev-resource-watching.md +23 -3
- package/docs/game-template.md +10 -0
- package/package.json +1 -1
- package/templates/empty/README.md +4 -1
- package/templates/empty/src/Main.ts +5 -7
- package/templates/game/README.md +4 -1
- package/templates/game/src/Main.ts +1 -7
package/CHANGELOG.md
CHANGED
|
@@ -7,12 +7,67 @@ and CLI command/configuration APIs follow [Semantic Versioning](https://semver.o
|
|
|
7
7
|
The early KUI XML contract follows the pre-1.0 `ui-document` kernel; authored
|
|
8
8
|
format changes are documented explicitly in each release.
|
|
9
9
|
|
|
10
|
-
## 3.
|
|
10
|
+
## 3.8.0 — 2026-10-30
|
|
11
11
|
|
|
12
12
|
Prepared for publication; not yet published.
|
|
13
13
|
|
|
14
14
|
### Added
|
|
15
15
|
|
|
16
|
+
- Watch root ESM TS/JS configuration stage defaults in dev, including atomic
|
|
17
|
+
replacement saves. Re-evaluate the root module, validate values and atomically
|
|
18
|
+
publish HTML on the existing server; manual refresh applies the new defaults.
|
|
19
|
+
- Retain valid HTML after malformed edits and recover after correction; report
|
|
20
|
+
restart-required diagnostics for structural configuration changes. Add
|
|
21
|
+
`config-change` JSONL events and stage width/height/orientation validation.
|
|
22
|
+
- Update game/empty starters to canvas-only Player startup using Core >= 2.6.0
|
|
23
|
+
within 2.x. Keep explicit runtime options available as per-field overrides.
|
|
24
|
+
|
|
25
|
+
### Compatibility and adoption
|
|
26
|
+
|
|
27
|
+
- This minor release adds configuration watching to `kurot dev`. Stage defaults
|
|
28
|
+
apply after a successful HTML update and manual browser refresh; running
|
|
29
|
+
Players are not reconfigured. `build --watch` retains its existing behavior.
|
|
30
|
+
- Root ESM configuration is re-evaluated; imported helpers and structural
|
|
31
|
+
changes still require restarting dev. Shared configuration loading now rejects
|
|
32
|
+
invalid width/height/orientation values for build, dev and clean commands.
|
|
33
|
+
- Core 2.6.0 is published, providing the required canvas-attribute startup for
|
|
34
|
+
newly created game/empty projects. Template latest placeholders and registry
|
|
35
|
+
resolution remain; CLI does not acquire a Core runtime dependency.
|
|
36
|
+
- ui-document remains ^0.13.0, with development lock 0.13.2. Other SDK versions,
|
|
37
|
+
peer minima, installations and locks are unchanged. Existing CLI ^3.x ranges
|
|
38
|
+
accept optional adoption; exact pins require an explicit declaration update.
|
|
39
|
+
- JSONL clients receive the added `config-change` build reason and the
|
|
40
|
+
`KUROT_CONFIG_RELOAD_FAILED` / `KUROT_CONFIG_RESTART_REQUIRED` diagnostic codes.
|
|
41
|
+
|
|
42
|
+
### Verification — 2026-10-30
|
|
43
|
+
|
|
44
|
+
- Build and all 145 tests pass (27 files), including TS/JS root configuration
|
|
45
|
+
reloads, atomic replacement saves, invalid-value retention/recovery,
|
|
46
|
+
restart-required diagnostics and generated HTML.
|
|
47
|
+
- Integration with built Core 2.6.0 passes the real dev save/manual-refresh and
|
|
48
|
+
release startup checks on WebGL and Canvas 2D, including explicit overrides
|
|
49
|
+
and recovery on the same server process without browser errors.
|
|
50
|
+
- The 243-file local package includes the compiled configuration watcher,
|
|
51
|
+
diagnostics, watching guide and both canvas-only starters with their Core
|
|
52
|
+
2.6.0 requirement. ui-document remains ^0.13.0; no Core runtime dependency
|
|
53
|
+
is added. npm registry checks confirm 3.8.0 is not published.
|
|
54
|
+
|
|
55
|
+
## 3.7.0 — 2026-10-27
|
|
56
|
+
|
|
57
|
+
Published on npm; registry version, downloaded archive and integrity verified on 2026-10-28.
|
|
58
|
+
|
|
59
|
+
### Registry adoption — 2026-10-28
|
|
60
|
+
|
|
61
|
+
- Verify the published 239-file archive and its SHA-512 integrity. Adopt
|
|
62
|
+
ui-document 0.13.2 in the development lock without changing the ^0.13.0
|
|
63
|
+
compatibility range; build and all 132 tests pass.
|
|
64
|
+
- Selected SDK/application/example installations adopt registry CLI 3.7.0.
|
|
65
|
+
MilfMaster no longer applies its earlier 3.6.0 patch; the published feature
|
|
66
|
+
passes its existing same-name-resource/cache verification. Electron Editor
|
|
67
|
+
retains its current installation at the user's explicit request.
|
|
68
|
+
|
|
69
|
+
### Added
|
|
70
|
+
|
|
16
71
|
- Optional `output.versionedAssets` release packaging: place runtime files in
|
|
17
72
|
`assets/<content-hash>/` and emit an HTML base URL, covering same-name resource
|
|
18
73
|
updates, generated themes, atlas/font pages and page-shell assets. Identical
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @kurot/cli
|
|
2
2
|
|
|
3
3
|
Build-time KUI XML → ESM Skin compilation, game scaffolding and development
|
|
4
|
-
resource watching. Package version: **3.
|
|
4
|
+
resource watching. Package version: **3.8.0** (prepared; publication pending).
|
|
5
5
|
Requires Node.js >= 20 and
|
|
6
6
|
ui-document **^0.13.0**; games supply their own Core/UI runtime packages.
|
|
7
7
|
|
|
@@ -11,11 +11,12 @@ the separate CLI 1.3.x line. KUI configuration and resource files are project-ow
|
|
|
11
11
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
|
-
The CLI does not require a global install. Install
|
|
15
|
-
|
|
14
|
+
The CLI does not require a global install. Install it as a project development
|
|
15
|
+
dependency. Both new scaffolds need Core ^2.6.0 for canvas stage-attribute
|
|
16
|
+
startup. Existing projects keep their own installed SDKs and resources.
|
|
16
17
|
|
|
17
18
|
```bash
|
|
18
|
-
npx @kurot/cli@3.
|
|
19
|
+
npx @kurot/cli@3.8.0 create my-game
|
|
19
20
|
cd my-game
|
|
20
21
|
pnpm install
|
|
21
22
|
pnpm dev
|
|
@@ -23,7 +24,7 @@ pnpm dev
|
|
|
23
24
|
|
|
24
25
|
Scaffolded projects expose `build`, `dev`, and `clean` scripts. For an
|
|
25
26
|
Editor-managed KUI XML project, install the package with
|
|
26
|
-
`pnpm add -D @kurot/cli@^3.
|
|
27
|
+
`pnpm add -D @kurot/cli@^3.8.0`. Existing EXML projects should keep their current
|
|
27
28
|
1.3.x dependency.
|
|
28
29
|
|
|
29
30
|
## Commands
|
|
@@ -86,6 +87,13 @@ The development server rebuilds TypeScript, KUI XML, custom namespaces, and
|
|
|
86
87
|
the component catalog as their sources change. Browser refresh is currently
|
|
87
88
|
manual. JSONL mode reserves stdout for incremental build and server events.
|
|
88
89
|
|
|
90
|
+
Root `kurot.config.ts` / `.js` stage edits are reloaded and published to HTML
|
|
91
|
+
without restarting dev. Wait for the successful update, then refresh manually.
|
|
92
|
+
Invalid edits retain the last valid page; structural build configuration and
|
|
93
|
+
imported configuration helper changes still require restarting dev. Configuration
|
|
94
|
+
watching requires CLI >= 3.8.0 within 3.x and applies to `kurot dev`;
|
|
95
|
+
`kurot build --watch` keeps its existing source-watch behavior.
|
|
96
|
+
|
|
89
97
|
Dev also synchronizes the complete `resource/` tree,
|
|
90
98
|
including locale JSON, atlas PNG/JSON, fonts and translation files, with deletion
|
|
91
99
|
and rename handling. Runtime-only edits do not recompile skins; style and resource
|
|
@@ -129,6 +137,10 @@ export default {
|
|
|
129
137
|
runtime theme manifest at `resource/default.thm.json`; it is not an authored
|
|
130
138
|
input. `ui.namespaces` can map additional XML prefixes to project barrel files.
|
|
131
139
|
|
|
140
|
+
`stage` supplies the generated canvas defaults. With Core >= 2.6.0 within 2.x,
|
|
141
|
+
entry code can use `createPlayer({ canvas })`. Explicit options override the corresponding defaults;
|
|
142
|
+
see [Core stage configuration](../core/docs/stage-configuration.md).
|
|
143
|
+
|
|
132
144
|
The HTML template must contain these placeholders:
|
|
133
145
|
|
|
134
146
|
- `{{KUROT_IMPORT_MAP}}`
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DevEvent } from './diagnostics/index.js';
|
|
2
|
+
import type { BuildContext } from './pipeline.js';
|
|
3
|
+
/**
|
|
4
|
+
* Watch the parent directory so atomic editor saves do not detach the watcher.
|
|
5
|
+
* Only stage defaults can change without rebuilding the project's paths/watchers.
|
|
6
|
+
*/
|
|
7
|
+
export declare function watchStageConfiguration(ctx: BuildContext, enqueue: (action: () => Promise<void>) => void, onEvent?: (event: DevEvent) => void): void;
|
|
8
|
+
//# sourceMappingURL=config-watcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-watcher.d.ts","sourceRoot":"","sources":["../../src/core/config-watcher.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD;;;GAGG;AACH,wBAAgB,uBAAuB,CACtC,GAAG,EAAE,YAAY,EACjB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,EAC9C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GACjC,IAAI,CAgDN"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
3
|
+
import { loadConfig } from './config.js';
|
|
4
|
+
import { DIAGNOSTIC_CODES } from './diagnostics/codes.js';
|
|
5
|
+
import { writeStageHtml } from './plugins/generate-html.js';
|
|
6
|
+
import { logger } from '../utils/logger.js';
|
|
7
|
+
/**
|
|
8
|
+
* Watch the parent directory so atomic editor saves do not detach the watcher.
|
|
9
|
+
* Only stage defaults can change without rebuilding the project's paths/watchers.
|
|
10
|
+
*/
|
|
11
|
+
export function watchStageConfiguration(ctx, enqueue, onEvent) {
|
|
12
|
+
let active = ctx.project.config;
|
|
13
|
+
let debounce;
|
|
14
|
+
const watcher = fs.watch(ctx.project.root, (_event, filename) => {
|
|
15
|
+
if (filename !== null && filename !== 'kurot.config.ts' && filename !== 'kurot.config.js') {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
clearTimeout(debounce);
|
|
19
|
+
debounce = setTimeout(() => enqueue(refresh), 100);
|
|
20
|
+
});
|
|
21
|
+
watcher.on('error', error => {
|
|
22
|
+
logger.error(`Configuration watcher failed: ${error.message}. Restart kurot dev.`);
|
|
23
|
+
});
|
|
24
|
+
ctx.disposers.push(() => {
|
|
25
|
+
clearTimeout(debounce);
|
|
26
|
+
watcher.close();
|
|
27
|
+
});
|
|
28
|
+
async function refresh() {
|
|
29
|
+
const startedAt = Date.now();
|
|
30
|
+
onEvent?.({ type: 'build-start', reason: 'config-change' });
|
|
31
|
+
let restartRequired = false;
|
|
32
|
+
try {
|
|
33
|
+
const next = await loadConfig({ root: ctx.project.root, fresh: true });
|
|
34
|
+
if (!isDeepStrictEqual(structure(active), structure(next))) {
|
|
35
|
+
restartRequired = true;
|
|
36
|
+
throw new Error('Build configuration outside stage changed. Restart kurot dev to apply it.');
|
|
37
|
+
}
|
|
38
|
+
if (!isDeepStrictEqual(active.stage, next.stage)) {
|
|
39
|
+
await writeStageHtml(ctx, next.stage);
|
|
40
|
+
}
|
|
41
|
+
active = next;
|
|
42
|
+
logger.success('Stage configuration updated. Refresh the browser to apply it.');
|
|
43
|
+
onEvent?.({ type: 'build-complete', success: true, durationMs: Date.now() - startedAt });
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
47
|
+
logger.error(`Configuration update failed: ${message}`);
|
|
48
|
+
onEvent?.({
|
|
49
|
+
type: 'diagnostic',
|
|
50
|
+
diagnostic: {
|
|
51
|
+
code: restartRequired ? DIAGNOSTIC_CODES.CONFIG_RESTART_REQUIRED : DIAGNOSTIC_CODES.CONFIG_RELOAD_FAILED,
|
|
52
|
+
severity: 'error',
|
|
53
|
+
message,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
onEvent?.({ type: 'build-complete', success: false, durationMs: Date.now() - startedAt });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function structure({ stage: _stage, ...config }) {
|
|
61
|
+
return config;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=config-watcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-watcher.js","sourceRoot":"","sources":["../../src/core/config-watcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CACtC,GAAiB,EACjB,OAA8C,EAC9C,OAAmC;IAEnC,IAAI,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC;IAChC,IAAI,Q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ANGED
|
@@ -112,8 +112,13 @@ export interface ProjectConfig {
|
|
|
112
112
|
* directory, merging it over `DEFAULTS`. Falls back to `DEFAULTS` entirely
|
|
113
113
|
* when no config file is present.
|
|
114
114
|
*
|
|
115
|
+
* @param options - Optional project root and fresh root-module evaluation. Imported
|
|
116
|
+
* helpers retain Node module caching; changes to them require restarting dev.
|
|
115
117
|
* @returns The validated project configuration.
|
|
116
118
|
* @throws {ConfigError} If the project configuration is invalid.
|
|
117
119
|
*/
|
|
118
|
-
export declare function loadConfig(
|
|
120
|
+
export declare function loadConfig(options?: {
|
|
121
|
+
root?: string;
|
|
122
|
+
fresh?: boolean;
|
|
123
|
+
}): Promise<ProjectConfig>;
|
|
119
124
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC;AAElC,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACvD;;;;;;;OAOG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC;CACvC;AAED,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,UAAU;IAC1B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC;CACxB;AA4BD;;;;;;;;;GASG;AACH,wBAAsB,UAAU,CAAC,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CA6DzG"}
|
package/dist/core/config.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as path from 'node:path';
|
|
2
|
+
import { pathToFileURL } from 'node:url';
|
|
2
3
|
import { exists } from '../utils/fs.js';
|
|
3
4
|
import { ConfigError } from './errors.js';
|
|
4
5
|
const DEFAULTS = {
|
|
@@ -23,22 +24,30 @@ const VALID_SCALE_MODES = [
|
|
|
23
24
|
'fixedNarrow',
|
|
24
25
|
'fixedWide',
|
|
25
26
|
];
|
|
27
|
+
let configRevision = 0;
|
|
26
28
|
/**
|
|
27
29
|
* Loads and validates `kurot.config.ts` (or `.js`) from the current working
|
|
28
30
|
* directory, merging it over `DEFAULTS`. Falls back to `DEFAULTS` entirely
|
|
29
31
|
* when no config file is present.
|
|
30
32
|
*
|
|
33
|
+
* @param options - Optional project root and fresh root-module evaluation. Imported
|
|
34
|
+
* helpers retain Node module caching; changes to them require restarting dev.
|
|
31
35
|
* @returns The validated project configuration.
|
|
32
36
|
* @throws {ConfigError} If the project configuration is invalid.
|
|
33
37
|
*/
|
|
34
|
-
export async function loadConfig() {
|
|
35
|
-
const
|
|
36
|
-
const
|
|
38
|
+
export async function loadConfig(options = {}) {
|
|
39
|
+
const root = options.root ?? process.cwd();
|
|
40
|
+
const configPath = path.resolve(root, 'kurot.config.ts');
|
|
41
|
+
const jsConfigPath = path.resolve(root, 'kurot.config.js');
|
|
37
42
|
let config;
|
|
38
43
|
if ((await exists(configPath)) || (await exists(jsConfigPath))) {
|
|
39
44
|
// Dynamic import of `kurot.config.ts` relies on Node's built-in
|
|
40
45
|
// TypeScript type-stripping support (no `tsx`/`ts-node` involved).
|
|
41
|
-
const
|
|
46
|
+
const url = pathToFileURL((await exists(configPath)) ? configPath : jsConfigPath);
|
|
47
|
+
if (options.fresh) {
|
|
48
|
+
url.searchParams.set('kurotConfigRevision', String(++configRevision));
|
|
49
|
+
}
|
|
50
|
+
const mod = await import(url.href);
|
|
42
51
|
const userConfig = mod.default ?? mod;
|
|
43
52
|
config = { ...DEFAULTS, ...userConfig, stage: { ...DEFAULTS.stage, ...userConfig.stage } };
|
|
44
53
|
}
|
|
@@ -51,15 +60,23 @@ export async function loadConfig() {
|
|
|
51
60
|
if (!Number.isInteger(config.stage.frameRate) || config.stage.frameRate <= 0) {
|
|
52
61
|
throw new ConfigError(`Invalid config: stage.frameRate must be a positive integer, got ${config.stage.frameRate}`);
|
|
53
62
|
}
|
|
63
|
+
for (const key of ['width', 'height']) {
|
|
64
|
+
if (!Number.isFinite(config.stage[key]) || config.stage[key] <= 0) {
|
|
65
|
+
throw new ConfigError(`Invalid config: stage.${key} must be a positive finite number, got ${config.stage[key]}`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (!['auto', 'portrait', 'landscape', 'landscapeFlipped'].includes(config.stage.orientation)) {
|
|
69
|
+
throw new ConfigError(`Invalid config: stage.orientation must be auto, portrait, landscape or landscapeFlipped, got '${config.stage.orientation}'`);
|
|
70
|
+
}
|
|
54
71
|
if (!VALID_SCALE_MODES.includes(config.stage.scaleMode)) {
|
|
55
72
|
throw new ConfigError(`Invalid config: stage.scaleMode must be one of ${VALID_SCALE_MODES.map(m => `'${m}'`).join(', ')}, got '${config.stage.scaleMode}'`);
|
|
56
73
|
}
|
|
57
|
-
const entryPath = path.resolve(config.entry);
|
|
74
|
+
const entryPath = path.resolve(root, config.entry);
|
|
58
75
|
if (!(await exists(entryPath))) {
|
|
59
76
|
throw new ConfigError(`Invalid config: entry file '${config.entry}' does not exist`);
|
|
60
77
|
}
|
|
61
78
|
if (config.html) {
|
|
62
|
-
const templatePath = path.resolve(config.html.template);
|
|
79
|
+
const templatePath = path.resolve(root, config.html.template);
|
|
63
80
|
if (!(await exists(templatePath))) {
|
|
64
81
|
throw new ConfigError(`Invalid config: HTML template '${config.html.template}' does not exist`);
|
|
65
82
|
}
|
package/dist/core/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAsH1C,MAAM,QAAQ,G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M,IAAI,WAAW,CAAC,yDAAyD,CAAC,CAAC;IAClF,CAAC;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/core/dev-server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/core/dev-server.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC7C;AAwBD;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuC/F"}
|
package/dist/core/dev-server.js
CHANGED
|
@@ -9,6 +9,7 @@ import { refreshProjectComponents } from './components/discover-components.js';
|
|
|
9
9
|
import { createResourceAssetSync } from './resource-asset-sync.js';
|
|
10
10
|
import { watchResourceDirectory } from './resource-watcher.js';
|
|
11
11
|
import { KUI_THEME_OUTPUT_PATH } from './project.js';
|
|
12
|
+
import { watchStageConfiguration } from './config-watcher.js';
|
|
12
13
|
import { logger } from '../utils/logger.js';
|
|
13
14
|
const MIME_TYPES = {
|
|
14
15
|
'.html': 'text/html; charset=utf-8',
|
|
@@ -65,6 +66,7 @@ export async function startDevServer(project, options) {
|
|
|
65
66
|
const syncAssets = await createResourceAssetSync(project);
|
|
66
67
|
const componentSkinsWatched = watchComponents(project, ctx, options, enqueue, syncAssets);
|
|
67
68
|
watchResources(project, ctx, options, componentSkinsWatched, enqueue, syncAssets);
|
|
69
|
+
watchStageConfiguration(ctx, enqueue, options.onEvent);
|
|
68
70
|
const server = startHttpServer(project, options);
|
|
69
71
|
process.on('SIGINT', async () => {
|
|
70
72
|
logger.info('Stopping dev server...');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-server.js","sourceRoot":"","sources":["../../src/core/dev-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EACN,UAAU,EACV,aAAa,EACb,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,UAAU,GACV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAwB5C,MAAM,UAAU,GAA2B;IAC1C,OAAO,EAAE,0BAA0B;IACnC,KAAK,EAAE,wBAAwB;IAC/B,MAAM,EAAE,wBAAwB;IAChC,MAAM,EAAE,kBAAkB;IAC1B,MAAM,EAAE,UAAU;IAClB,OAAO,EAAE,kBAAkB;IAC3B,MAAM,EAAE,WAAW;I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CH_RELEASE_IGNORED";
|
|
9
|
+
readonly CONFIG_RELOAD_FAILED: "KUROT_CONFIG_RELOAD_FAILED";
|
|
10
|
+
readonly CONFIG_RESTART_REQUIRED: "KUROT_CONFIG_RESTART_REQUIRED";
|
|
9
11
|
};
|
|
10
12
|
/**
|
|
11
13
|
* Union of diagnostic codes currently defined by the CLI.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../../src/core/diagnostics/codes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../../src/core/diagnostics/codes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;CAOnB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAMtF;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE5D"}
|
|
@@ -6,6 +6,8 @@ export const DIAGNOSTIC_CODES = {
|
|
|
6
6
|
KUI_COMPILE_FAILED: 'KUROT_KUI_COMPILE_FAILED',
|
|
7
7
|
KUI_DUPLICATE_DEFAULT: 'KUROT_KUI_DUPLICATE_DEFAULT',
|
|
8
8
|
WATCH_RELEASE_IGNORED: 'KUROT_WATCH_RELEASE_IGNORED',
|
|
9
|
+
CONFIG_RELOAD_FAILED: 'KUROT_CONFIG_RELOAD_FAILED',
|
|
10
|
+
CONFIG_RESTART_REQUIRED: 'KUROT_CONFIG_RESTART_REQUIRED',
|
|
9
11
|
};
|
|
10
12
|
const STRICT_DIAGNOSTIC_CODES = new Set([
|
|
11
13
|
DIAGNOSTIC_CODES.KUI_UNKNOWN_TAG,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codes.js","sourceRoot":"","sources":["../../../src/core/diagnostics/codes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B,eAAe,EAAE,uBAAuB;IACxC,kBAAkB,EAAE,0BAA0B;IAC9C,qBAAqB,EAAE,6BAA6B;IACpD,qBAAqB,EAAE,6BAA6B;
|
|
1
|
+
{"version":3,"file":"codes.js","sourceRoot":"","sources":["../../../src/core/diagnostics/codes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B,eAAe,EAAE,uBAAuB;IACxC,kBAAkB,EAAE,0BAA0B;IAC9C,qBAAqB,EAAE,6BAA6B;IACpD,qBAAqB,EAAE,6BAA6B;IACpD,oBAAoB,EAAE,4BAA4B;IAClD,uBAAuB,EAAE,+BAA+B;CAC/C,CAAC;AAOX,MAAM,uBAAuB,GAAgC,IAAI,GAAG,CAAC;IACpE,gBAAgB,CAAC,eAAe;CAChC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAY;IAClD,OAAO,uBAAuB,CAAC,GAAG,CAAC,IAAsB,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -33,7 +33,7 @@ export type DevEvent = {
|
|
|
33
33
|
readonly url: string;
|
|
34
34
|
} | {
|
|
35
35
|
readonly type: 'build-start';
|
|
36
|
-
readonly reason: 'initial' | 'kui-change' | 'source-change' | 'resource-change';
|
|
36
|
+
readonly reason: 'initial' | 'kui-change' | 'source-change' | 'resource-change' | 'config-change';
|
|
37
37
|
} | {
|
|
38
38
|
readonly type: 'diagnostic';
|
|
39
39
|
readonly diagnostic: Diagnostic;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/core/diagnostics/output.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,U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O,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,MAAM,QAAQ,GACjB;IAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACvD;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,YAAY,GAAG,eAAe,GAAG,iBAAiB,GAAG,eAAe,CAAA;CAAE,GACnI;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAA;CAAE,GAChE;IAAE,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAG/F;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,sBAAsB,CAGjF;AAGD;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB,CAG7E;AAGD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,GAAG,QAAQ,GAAG,IAAI,CAE5E"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { BuildPlugin } from '../pipeline.js';
|
|
1
|
+
import type { BuildContext, BuildPlugin } from '../pipeline.js';
|
|
2
2
|
import type { Project } from '../project.js';
|
|
3
|
+
import type { StageConfig } from '../config.js';
|
|
3
4
|
/**
|
|
4
5
|
* Writes `index.html`.
|
|
5
6
|
*
|
|
@@ -9,6 +10,11 @@ import type { Project } from '../project.js';
|
|
|
9
10
|
* the engine via the user's own `createPlayer()` call.
|
|
10
11
|
*/
|
|
11
12
|
export declare function generateHtml(): BuildPlugin;
|
|
13
|
+
/**
|
|
14
|
+
* Publish a complete entry page with the supplied stage defaults. A failed
|
|
15
|
+
* render/write keeps the previous page; the immutable build project is unchanged.
|
|
16
|
+
*/
|
|
17
|
+
export declare function writeStageHtml(ctx: BuildContext, stage: StageConfig): Promise<void>;
|
|
12
18
|
/**
|
|
13
19
|
* Replaces every required Kurot placeholder in the page template.
|
|
14
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-html.d.ts","sourceRoot":"","sources":["../../../src/core/plugins/generate-html.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-html.d.ts","sourceRoot":"","sources":["../../../src/core/plugins/generate-html.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAoDhD;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,WAAW,CAY1C;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAYzF;AAiCD;;GAEG;AACH,wBAAgB,UAAU,CACzB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC5B,MAAM,CA0BR"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as path from 'node:path';
|
|
2
2
|
import * as fs from 'node:fs/promises';
|
|
3
|
+
import { randomUUID } from 'node:crypto';
|
|
3
4
|
import { BuildError } from '../errors.js';
|
|
4
5
|
import { writeFile } from '../../utils/fs.js';
|
|
5
6
|
const PLACEHOLDERS = {
|
|
@@ -65,14 +66,29 @@ export function generateHtml() {
|
|
|
65
66
|
* Writes the entry page with generated scripts and import-map entries.
|
|
66
67
|
*/
|
|
67
68
|
async apply(ctx) {
|
|
68
|
-
|
|
69
|
-
const template = await loadTemplate(ctx.project);
|
|
70
|
-
const html = renderHtml(template, ctx.project, entryScript, ctx.outputs.engine);
|
|
71
|
-
await writeFile(path.join(ctx.project.outputDir, 'index.html'), html);
|
|
69
|
+
await writeStageHtml(ctx, ctx.project.config.stage);
|
|
72
70
|
await copyTemplateAssets(ctx.project);
|
|
73
71
|
},
|
|
74
72
|
};
|
|
75
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Publish a complete entry page with the supplied stage defaults. A failed
|
|
76
|
+
* render/write keeps the previous page; the immutable build project is unchanged.
|
|
77
|
+
*/
|
|
78
|
+
export async function writeStageHtml(ctx, stage) {
|
|
79
|
+
const project = { ...ctx.project, config: { ...ctx.project.config, stage } };
|
|
80
|
+
const template = await loadTemplate(project);
|
|
81
|
+
const html = renderHtml(template, project, ctx.outputs.entryScript ?? 'main.js', ctx.outputs.engine);
|
|
82
|
+
const destination = path.join(project.outputDir, 'index.html');
|
|
83
|
+
const temporary = `${destination}.${randomUUID()}.tmp`;
|
|
84
|
+
try {
|
|
85
|
+
await writeFile(temporary, html);
|
|
86
|
+
await fs.rename(temporary, destination);
|
|
87
|
+
}
|
|
88
|
+
finally {
|
|
89
|
+
await fs.rm(temporary, { force: true });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
76
92
|
/**
|
|
77
93
|
* Copies files placed beside the project HTML template into the web output.
|
|
78
94
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-html.js","sourceRoot":"","sources":["../../../src/core/plugins/generate-html.ts"],"names":[],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AAC,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACvF,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9C,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAChD,CAAC,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;QACzC,CAAC,YAAY,CAAC,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC;QAC7C,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACjD,CAAC,YAAY,CAAC,WAAW,EAAE,WAAW,CAAC;KACvC,CAAC,CAAC;IAEH,IAAI,IAAI,GAAG,QAAQ,CAAC;IAEpB,KAAK,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,IAAI,YAAY,EAAE,CAAC;QACjD,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC;AAED;;;GAGG;AACH,SAAS,eAAe,CAAC,MAA8B;IACtD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;SACpC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,UAAU,GAAG,SAAS,IAAI,GAAG,CAAC;SACnD,IAAI,CAAC,KAAK,CAAC,CAAC;IACd,OAAO,qDAAqD,OAAO,6BAA6B,CAAC;AAClG,CAAC"}
|
package/docs/ai-context.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @kurot/cli — AI context map
|
|
2
2
|
|
|
3
|
-
`@kurot/cli@3.
|
|
3
|
+
`@kurot/cli@3.8.0` (prepared; publication pending) is build-time tooling on Node.js >= 20, with ordinary
|
|
4
4
|
ui-document dependency **^0.13.0**. Projects supply their own Core/UI runtime.
|
|
5
5
|
Read [architecture](architecture.md) for the plugin pipeline; the source and
|
|
6
6
|
configuration exports establish current behavior.
|
|
@@ -157,6 +157,11 @@ versions document-relative requests; callers that explicitly resolve URLs must
|
|
|
157
157
|
use document.baseURI. Existing UI Theme must receive an absolute config URL.
|
|
158
158
|
See [release assets](release-assets.md). This option requires CLI >= 3.7.0 within 3.x.
|
|
159
159
|
|
|
160
|
+
Since CLI 3.8.0, root ESM config stage changes regenerate HTML in `kurot dev` without
|
|
161
|
+
restarting dev; `core/config-watcher.ts` owns this path. See
|
|
162
|
+
[development watching](dev-resource-watching.md). Core canvas-attribute startup
|
|
163
|
+
requires Core >= 2.6.0 within 2.x; explicit overrides remain supported.
|
|
164
|
+
|
|
160
165
|
## Configuration lookup
|
|
161
166
|
|
|
162
167
|
| Task | File |
|
package/docs/architecture.md
CHANGED
|
@@ -40,7 +40,7 @@ factory variables, property assignments, semantic layout children, and state
|
|
|
40
40
|
property overrides. Document contracts, reusable instances, data bindings, and
|
|
41
41
|
actions remain `UIDocument` concepts.
|
|
42
42
|
|
|
43
|
-
CLI 3.
|
|
43
|
+
CLI 3.8.0 consumes ui-document ^0.13.0, retaining Label text-fitting metadata. The
|
|
44
44
|
compiler emits `textFit`, `minFontSize`, base font sizes and state overrides;
|
|
45
45
|
native UI owns measurement and derives drawing sizes after layout validation.
|
|
46
46
|
See [Label compilation](label-text-layout.md). The application supplies UI
|
|
@@ -97,6 +97,10 @@ and reconciles additions, deletions and directory replacement. Runtime-only
|
|
|
97
97
|
changes do not recompile skins. The fixed style.json and default.res.json paths
|
|
98
98
|
still trigger KUI compilation; font loading remains an application responsibility.
|
|
99
99
|
Changes are debounced and queued, with changed bytes staged before publication.
|
|
100
|
+
A shallow root configuration watcher re-evaluates ESM config after stage edits
|
|
101
|
+
and publishes complete HTML through an atomic rename. Invalid values retain the
|
|
102
|
+
last successful page; structural build changes require restarting dev. This path
|
|
103
|
+
shares the resource build queue and does not mutate the immutable Project.
|
|
100
104
|
Browser refresh remains manual and HTTP responses use no-store. Individual
|
|
101
105
|
renames do not form an atomic multi-file transaction. See
|
|
102
106
|
[resource watching](dev-resource-watching.md).
|
|
@@ -17,9 +17,26 @@ translations and other project-owned files.
|
|
|
17
17
|
| PNG, fonts, language properties and other runtime files | Synchronize assets |
|
|
18
18
|
| Resource directory creation, replacement or deletion | Reconnect watcher and reconcile output; compile KUI when enabled |
|
|
19
19
|
| Reusable component source or skin | Retain component discovery/namespace/catalog rebuild and synchronize assets |
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
| Root kurot.config.ts or .js stage defaults | Validate and atomically regenerate HTML; refresh manually |
|
|
21
|
+
|
|
22
|
+
With CLI >= 3.8.0 within 3.x, stage defaults in `kurot.config.ts` / `.js` can be
|
|
23
|
+
saved without restarting `kurot dev`. `kurot build --watch` retains its existing
|
|
24
|
+
source-watch behavior and does not install the configuration watcher.
|
|
25
|
+
After the successful configuration update, refresh the browser manually. The
|
|
26
|
+
new Player consumes HTML canvas attributes with the Core behavior described in
|
|
27
|
+
[stage configuration](../../core/docs/stage-configuration.md), requiring Core
|
|
28
|
+
>= 2.6.0 within 2.x; explicit runtime options still take priority.
|
|
29
|
+
|
|
30
|
+
The watcher handles ordinary and atomic editor saves of the root ESM config file,
|
|
31
|
+
re-evaluates it with a fresh module URL, validates width/height, scale mode,
|
|
32
|
+
orientation and frame rate, and atomically replaces only the generated HTML.
|
|
33
|
+
Invalid edits keep the last successful page, report an error and allow correction
|
|
34
|
+
without restarting. Imported configuration helpers and dependencies are not
|
|
35
|
+
reloaded; edits to them still require restarting dev.
|
|
36
|
+
|
|
37
|
+
Changes outside `stage`, including entry/output/UI paths, or dependencies still
|
|
38
|
+
require restarting dev. A detected structural config change reports
|
|
39
|
+
`KUROT_CONFIG_RESTART_REQUIRED` and leaves the active outputs intact. Locale configuration is consumed by project code; the CLI does
|
|
23
40
|
not introduce a locale parser or mutate authored skins. A style edit may change
|
|
24
41
|
compiled skin assignments while its XML remains untouched.
|
|
25
42
|
|
|
@@ -52,6 +69,9 @@ A resource-only batch emits JSONL build-start with reason `resource-change`,
|
|
|
52
69
|
followed by build-complete after synchronization. Existing `kui-change` and
|
|
53
70
|
`source-change` reasons retain their meaning. Consumers should tolerate the
|
|
54
71
|
additional reason and refresh only after a successful build-complete event.
|
|
72
|
+
Root configuration updates emit `config-change`; failures additionally emit
|
|
73
|
+
`KUROT_CONFIG_RELOAD_FAILED` or `KUROT_CONFIG_RESTART_REQUIRED` diagnostics.
|
|
74
|
+
The stage watcher shares this serialized queue with resource/component work.
|
|
55
75
|
|
|
56
76
|
## Preview and atlas boundaries
|
|
57
77
|
|
package/docs/game-template.md
CHANGED
|
@@ -31,6 +31,16 @@ This ordering includes loading-screen Labels in the project font. The loading
|
|
|
31
31
|
screen's startup messages stay in English because translations are not loaded yet.
|
|
32
32
|
Templates do not implement live font/theme/language replacement.
|
|
33
33
|
|
|
34
|
+
## Stage defaults
|
|
35
|
+
|
|
36
|
+
Both starters use `createPlayer({ canvas })`. Configure width, height, scale mode,
|
|
37
|
+
orientation and frame rate in `kurot.config.ts`; the CLI writes canvas attributes.
|
|
38
|
+
This requires Core >= 2.6.0 within 2.x, documented in
|
|
39
|
+
[stage configuration](../../core/docs/stage-configuration.md). Explicit options
|
|
40
|
+
remain available for intentional overrides. In dev, save stage settings, wait
|
|
41
|
+
for the configuration update and refresh the browser with CLI >= 3.8.0 within
|
|
42
|
+
3.x; no dev restart is needed.
|
|
43
|
+
|
|
34
44
|
## HTML brand splash
|
|
35
45
|
|
|
36
46
|
The game template's `web/index.html` presents `web/logo.png` beneath a small
|
package/package.json
CHANGED
|
@@ -33,7 +33,10 @@ browser console, resource requests and intended interactions.
|
|
|
33
33
|
- `src/Main.ts`: creates the single Player and root Sprite; add game objects
|
|
34
34
|
and input/update logic here or in application modules it imports.
|
|
35
35
|
- `kurot.config.ts`: build entry, stage settings and output paths. Keep explicit
|
|
36
|
-
|
|
36
|
+
stage defaults here; Main uses `createPlayer({ canvas })` to consume the generated
|
|
37
|
+
canvas attributes. This requires Core >= 2.6.0 within 2.x. With CLI >= 3.8.0
|
|
38
|
+
within 3.x, save stage edits, wait for the dev update, then refresh the browser;
|
|
39
|
+
structural build changes require restarting dev.
|
|
37
40
|
- `template/web/index.html`: authored HTML and canvas.
|
|
38
41
|
- `bin-debug/`, `bin-release/` and `.kurot/`: generated files; edit their inputs.
|
|
39
42
|
|
|
@@ -21,12 +21,10 @@ class Main extends Sprite {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
// ── Bootstrap ─────────────────────────────────────────────────────────────
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
frameRate: 60,
|
|
30
|
-
});
|
|
24
|
+
const canvas = document.getElementById('gameCanvas');
|
|
25
|
+
if (!(canvas instanceof HTMLCanvasElement)) {
|
|
26
|
+
throw new Error('Missing gameCanvas.');
|
|
27
|
+
}
|
|
28
|
+
const app = createPlayer({ canvas });
|
|
31
29
|
|
|
32
30
|
app.start(new Main());
|
package/templates/game/README.md
CHANGED
|
@@ -45,7 +45,10 @@ requests and the intended interactions in the browser.
|
|
|
45
45
|
`src/components/<Name>.ts` with
|
|
46
46
|
`resource/ui/components/<Name>Skin.kui.xml`; export the matching class name.
|
|
47
47
|
- `kurot.config.ts`: build/stage/component settings; `template/web/index.html`:
|
|
48
|
-
authored HTML.
|
|
48
|
+
authored HTML. Main uses `createPlayer({ canvas })` with the generated canvas
|
|
49
|
+
attributes; edit stage defaults only in config. This requires Core >= 2.6.0
|
|
50
|
+
within 2.x. With CLI >= 3.8.0 within 3.x, save stage edits, wait for the update
|
|
51
|
+
and refresh the browser; structural build changes require restarting.
|
|
49
52
|
- `bin-debug/`, `bin-release/`, `.kurot/` and generated theme JSON: build outputs.
|
|
50
53
|
Edit authored inputs; the CLI generates the Skin module and part declarations.
|
|
51
54
|
|
|
@@ -181,13 +181,7 @@ async function start(): Promise<void> {
|
|
|
181
181
|
if (!(canvas instanceof HTMLCanvasElement)) {
|
|
182
182
|
throw new Error('Missing gameCanvas.');
|
|
183
183
|
}
|
|
184
|
-
const app = createPlayer({
|
|
185
|
-
canvas,
|
|
186
|
-
contentWidth: 640,
|
|
187
|
-
contentHeight: 1136,
|
|
188
|
-
scaleMode: 'showAll',
|
|
189
|
-
frameRate: 60,
|
|
190
|
-
});
|
|
184
|
+
const app = createPlayer({ canvas });
|
|
191
185
|
app.start(new Main());
|
|
192
186
|
}
|
|
193
187
|
|