@tantawowa/hosanna-tools 3.10.2 → 3.12.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 +2 -0
- package/dist/build-info.json +3 -3
- package/dist/cli.js +84 -0
- package/dist/cli.js.map +1 -1
- package/dist/generation/shapes/shape-compiler.d.ts +57 -0
- package/dist/generation/shapes/shape-compiler.js +370 -0
- package/dist/generation/shapes/shape-compiler.js.map +1 -0
- package/dist/index.d.ts +10 -1
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/app-config-compiler.d.ts +55 -0
- package/dist/lib/app-config-compiler.js +436 -0
- package/dist/lib/app-config-compiler.js.map +1 -0
- package/dist/lib/app-config.d.ts +2 -0
- package/dist/lib/app-config.js +19 -0
- package/dist/lib/app-config.js.map +1 -0
- package/dist/lib/cli.app-config-compile.d.ts +6 -0
- package/dist/lib/cli.app-config-compile.js +90 -0
- package/dist/lib/cli.app-config-compile.js.map +1 -0
- package/dist/run/executor.d.ts +8 -0
- package/dist/run/executor.js +99 -13
- package/dist/run/executor.js.map +1 -1
- package/dist/run/ios-device.js +5 -2
- package/dist/run/ios-device.js.map +1 -1
- package/dist/run/planner.d.ts +6 -0
- package/dist/run/planner.js +95 -12
- package/dist/run/planner.js.map +1 -1
- package/dist/run/run-config.d.ts +13 -0
- package/dist/run/run-config.js +116 -6
- package/dist/run/run-config.js.map +1 -1
- package/dist/run/run-controller.js +2 -0
- package/dist/run/run-controller.js.map +1 -1
- package/dist/support-tools/build-config-resolver.js +20 -0
- package/dist/support-tools/build-config-resolver.js.map +1 -1
- package/dist/support-tools/command-debugger.js +82 -20
- package/dist/support-tools/command-debugger.js.map +1 -1
- package/dist/support-tools/mcp-server/tools.js +98 -0
- package/dist/support-tools/mcp-server/tools.js.map +1 -1
- package/dist/support-tools/mcp-server/types.d.ts +1 -0
- package/dist/support-tools/mcp-server/types.js +1 -0
- package/dist/support-tools/mcp-server/types.js.map +1 -1
- package/dist/testing/client.d.ts +24 -10
- package/dist/testing/client.js +83 -9
- package/dist/testing/client.js.map +1 -1
- package/dist/testing/launcher.d.ts +4 -1
- package/dist/testing/launcher.js +24 -6
- package/dist/testing/launcher.js.map +1 -1
- package/dist/touch/touch-sequence.d.ts +33 -0
- package/dist/touch/touch-sequence.js +90 -0
- package/dist/touch/touch-sequence.js.map +1 -0
- package/dist/vite.js +66 -0
- package/dist/vite.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -282,6 +282,8 @@ Supported inputs include `file/line: pkg:/components/source_0.brs(7475)`, `at ..
|
|
|
282
282
|
|
|
283
283
|
Production JavaScript bundles strip `console.*` calls by default. Configure this through the normal overlay chain with `build.stripLogs`: set it to `false` in `build-config/prod.json` to retain production logs, or in `build-config/prod.apple.json` / `build-config/prod.web.json` for a platform-only exception. Non-production environments keep logs unless their overlay explicitly enables stripping. Apple `prod` builds use Xcode `Release`; other environments continue to use `Debug`.
|
|
284
284
|
|
|
285
|
+
Roku builds also populate `assetServer.baseUrl` when an overlay does not define it. `hst run` uses the resolved project Vite port and a reachable LAN IPv4 address. Override either the complete URL with `HS_ASSET_SERVER_BASE_URL`, or its parts with `HS_ASSET_SERVER_HOST` and `HS_ASSET_SERVER_PORT`; the equivalent `HOSANNA_ASSET_SERVER_*` names are also accepted. Explicit build-config overlays remain authoritative. The legacy `game.assetBaseUrl` setting is generated independently for backward compatibility.
|
|
286
|
+
|
|
285
287
|
Native builds can resolve config immediately before the platform build:
|
|
286
288
|
|
|
287
289
|
```bash
|
package/dist/build-info.json
CHANGED
package/dist/cli.js
CHANGED
|
@@ -59,6 +59,7 @@ const generation_utils_js_2 = require("./generation/generation-utils.js");
|
|
|
59
59
|
const env_info_js_1 = require("./lib/env-info.js");
|
|
60
60
|
const hosanna_tools_utils_js_1 = require("./lib/hosanna-tools-utils.js");
|
|
61
61
|
const cli_app_config_resolve_js_1 = require("./lib/cli.app-config-resolve.js");
|
|
62
|
+
const cli_app_config_compile_js_1 = require("./lib/cli.app-config-compile.js");
|
|
62
63
|
const hosanna_config_js_1 = require("./lib/hosanna-config.js");
|
|
63
64
|
function formatRunPlanText(plan, explain, command = 'run') {
|
|
64
65
|
const lines = [
|
|
@@ -134,6 +135,10 @@ function runPlanFlagsFromCliArgs(args, format) {
|
|
|
134
135
|
format,
|
|
135
136
|
explain: rawHasFlag('explain') ? Boolean(args.explain) : undefined,
|
|
136
137
|
allowProfileInProd: rawHasFlag('allow-profile-in-prod') ? Boolean(args['allow-profile-in-prod']) : undefined,
|
|
138
|
+
shapeDelivery: rawHasFlag('shape-delivery') ? args['shape-delivery'] : undefined,
|
|
139
|
+
fontDelivery: rawHasFlag('font-delivery') ? args['font-delivery'] : undefined,
|
|
140
|
+
bundleRevision: rawHasFlag('bundle-revision') ? args['bundle-revision'] : undefined,
|
|
141
|
+
rebuildAppConfig: rawHasFlag('rebuild-app-config') ? Boolean(args['rebuild-app-config']) : undefined,
|
|
137
142
|
passthroughArgs: args['--'],
|
|
138
143
|
};
|
|
139
144
|
}
|
|
@@ -568,6 +573,77 @@ catch (err) {
|
|
|
568
573
|
console.error(`Failed to resolve app config: ${message}`);
|
|
569
574
|
process.exit(1);
|
|
570
575
|
}
|
|
576
|
+
})
|
|
577
|
+
.command('app-config:compile', 'Resolve AppConfig and materialize precompiled theme shapes, bundled fonts, and an asset-bundle manifest', yargs => yargs
|
|
578
|
+
.option('input', { type: 'string', describe: 'Input path, app.config.<name>.json filename, or short selector' })
|
|
579
|
+
.option('cwd', { type: 'string', describe: 'Project root (default: current working directory)' })
|
|
580
|
+
.option('expression', { type: 'string', describe: 'Expression selector such as tv, phone, or tablet' })
|
|
581
|
+
.option('platform', { type: 'string', default: 'roku', describe: 'Compilation platform' })
|
|
582
|
+
.option('out', { type: 'string', describe: 'Final resolved AppConfig output path' })
|
|
583
|
+
.option('generated-dir', { type: 'string', describe: 'Generated target root (contains package/)' })
|
|
584
|
+
.option('shape-delivery', { type: 'string', choices: ['runtime', 'embedded', 'bundled'], default: 'runtime', describe: 'Default delivery for shapes without an entry-level override' })
|
|
585
|
+
.option('font-delivery', { type: 'string', choices: ['embedded', 'bundled'], default: 'embedded', describe: 'Default delivery for font objects without an entry-level override' })
|
|
586
|
+
.option('bundle-id', { type: 'string', describe: 'Asset bundle id used in cachefs URIs' })
|
|
587
|
+
.option('bundle-revision', { type: 'string', describe: 'Manual bundle version revision used to invalidate device caches' })
|
|
588
|
+
.option('bundle-config-key', { type: 'string', default: 'compiledTheme', describe: 'Key written beneath AppConfig assetBundles' })
|
|
589
|
+
.option('bundle-output-dir', { type: 'string', default: 'public/asset-bundles', describe: 'Publishable asset-bundle output root' })
|
|
590
|
+
.option('asset-url-root', { type: 'string', default: '/asset-bundles', describe: 'HTTP URL root written into bundle asset descriptors' })
|
|
591
|
+
.option('watch', { type: 'boolean', default: false, describe: 'Watch AppConfig inheritance and local bundled files' })
|
|
592
|
+
.option('rebuild', { type: 'boolean', default: false, describe: 'Re-render compiler assets instead of reusing the incremental cache' })
|
|
593
|
+
.option('force', { type: 'boolean', default: false, describe: 'Rewrite unchanged compiler-owned files' }), async (args) => {
|
|
594
|
+
try {
|
|
595
|
+
await (0, cli_app_config_compile_js_1.runAppConfigCompileCommand)({
|
|
596
|
+
cwd: args.cwd,
|
|
597
|
+
input: args.input,
|
|
598
|
+
expression: args.expression,
|
|
599
|
+
platform: args.platform,
|
|
600
|
+
out: args.out,
|
|
601
|
+
generatedDir: args.generatedDir,
|
|
602
|
+
shapeDelivery: args.shapeDelivery,
|
|
603
|
+
fontDelivery: args.fontDelivery,
|
|
604
|
+
bundleId: args.bundleId,
|
|
605
|
+
bundleRevision: args.bundleRevision,
|
|
606
|
+
bundleConfigKey: args.bundleConfigKey,
|
|
607
|
+
bundleOutputDir: args.bundleOutputDir,
|
|
608
|
+
assetUrlRoot: args.assetUrlRoot,
|
|
609
|
+
watch: Boolean(args.watch),
|
|
610
|
+
rebuild: Boolean(args.rebuild),
|
|
611
|
+
force: Boolean(args.force),
|
|
612
|
+
});
|
|
613
|
+
if (!args.watch)
|
|
614
|
+
process.exit(0);
|
|
615
|
+
}
|
|
616
|
+
catch (err) {
|
|
617
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
618
|
+
console.error(`Failed to compile app config: ${message}`);
|
|
619
|
+
process.exit(1);
|
|
620
|
+
}
|
|
621
|
+
})
|
|
622
|
+
.command('app-config:clean', 'Remove compiler-owned AppConfig package, asset bundle, and incremental caches for one target', yargs => yargs
|
|
623
|
+
.option('input', { type: 'string', describe: 'Input path, app.config.<name>.json filename, or short selector used to infer the target' })
|
|
624
|
+
.option('cwd', { type: 'string', describe: 'Project root (default: current working directory)' })
|
|
625
|
+
.option('expression', { type: 'string', describe: 'Expression selector such as tv, phone, or tablet' })
|
|
626
|
+
.option('platform', { type: 'string', default: 'roku', describe: 'Compilation platform' })
|
|
627
|
+
.option('generated-dir', { type: 'string', describe: 'Generated target root (contains package/)' })
|
|
628
|
+
.option('bundle-id', { type: 'string', describe: 'Asset bundle id to remove' })
|
|
629
|
+
.option('bundle-output-dir', { type: 'string', default: 'public/asset-bundles', describe: 'Asset-bundle output root' }), args => {
|
|
630
|
+
try {
|
|
631
|
+
(0, cli_app_config_compile_js_1.runAppConfigCleanCommand)({
|
|
632
|
+
cwd: args.cwd,
|
|
633
|
+
input: args.input,
|
|
634
|
+
expression: args.expression,
|
|
635
|
+
platform: args.platform,
|
|
636
|
+
generatedDir: args.generatedDir,
|
|
637
|
+
bundleId: args.bundleId,
|
|
638
|
+
bundleOutputDir: args.bundleOutputDir,
|
|
639
|
+
});
|
|
640
|
+
process.exit(0);
|
|
641
|
+
}
|
|
642
|
+
catch (err) {
|
|
643
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
644
|
+
console.error(`Failed to clean app config: ${message}`);
|
|
645
|
+
process.exit(1);
|
|
646
|
+
}
|
|
571
647
|
})
|
|
572
648
|
.command('native:init [platform]', 'Initialize app-owned Hosanna native thin projects and config', yargs => yargs
|
|
573
649
|
.positional('platform', { type: 'string', choices: NATIVE_PLATFORM_CHOICES, default: 'all', describe: 'Native platform family to initialize' })
|
|
@@ -1803,6 +1879,10 @@ catch (err) {
|
|
|
1803
1879
|
.option('profile', { type: 'string', describe: 'Build config profile (env: HS_BUILD_PROFILE)' })
|
|
1804
1880
|
.option('allow-profile-in-prod', { type: 'boolean', default: false, describe: 'Allow applying --profile with --env prod' })
|
|
1805
1881
|
.option('app-config', { type: 'string', describe: 'Runtime app config selector passed to web/native launch inputs' })
|
|
1882
|
+
.option('shape-delivery', { type: 'string', choices: ['runtime', 'embedded', 'bundled'], describe: 'Override the build AppConfig shape delivery policy' })
|
|
1883
|
+
.option('font-delivery', { type: 'string', choices: ['embedded', 'bundled'], describe: 'Override the build AppConfig font delivery policy' })
|
|
1884
|
+
.option('bundle-revision', { type: 'string', describe: 'Override the build asset-bundle cache revision' })
|
|
1885
|
+
.option('rebuild-app-config', { type: 'boolean', default: false, describe: 'Re-render AppConfig compiler assets for this build' })
|
|
1806
1886
|
.option('hot-reload', { type: 'boolean', default: false, describe: 'Use native JS dev server where supported' })
|
|
1807
1887
|
.option('bundled', { type: 'boolean', default: false, describe: 'Use bundled native JS/assets where supported' })
|
|
1808
1888
|
.option('vitePort', { type: 'number', description: 'Port for Vite dev server', default: 5173 })
|
|
@@ -1869,6 +1949,10 @@ catch (err) {
|
|
|
1869
1949
|
.option('profile', { type: 'string', describe: 'Build config profile (env: HS_BUILD_PROFILE)' })
|
|
1870
1950
|
.option('allow-profile-in-prod', { type: 'boolean', default: false, describe: 'Allow applying --profile with --env prod' })
|
|
1871
1951
|
.option('app-config', { type: 'string', describe: 'Runtime app config selector passed to web/native launch inputs' })
|
|
1952
|
+
.option('shape-delivery', { type: 'string', choices: ['runtime', 'embedded', 'bundled'], describe: 'Override the build AppConfig shape delivery policy' })
|
|
1953
|
+
.option('font-delivery', { type: 'string', choices: ['embedded', 'bundled'], describe: 'Override the build AppConfig font delivery policy' })
|
|
1954
|
+
.option('bundle-revision', { type: 'string', describe: 'Override the build asset-bundle cache revision' })
|
|
1955
|
+
.option('rebuild-app-config', { type: 'boolean', default: false, describe: 'Re-render AppConfig compiler assets for this run' })
|
|
1872
1956
|
.option('hot-reload', { type: 'boolean', default: false, describe: 'Use native JS dev server where supported' })
|
|
1873
1957
|
.option('bundled', { type: 'boolean', default: false, describe: 'Use bundled native JS/assets where supported' })
|
|
1874
1958
|
.option('vitePort', { type: 'number', description: 'Port for Vite dev server', default: 5173 })
|