mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-09-11 05:16:27 -07:00
feat(launcher): bundle Bun runtime with launcher artifacts
- Use private Bun runtimes for installed and downloadable launchers - Package runtime licenses, source manifests, and corresponding source releases - Update launcher workflows, setup, updates, and documentation
This commit is contained in:
@@ -149,6 +149,23 @@ test('parseCliPrograms lowers sync options into app-owned CLI tokens', () => {
|
||||
assert.deepEqual(removeTemp.invocations.syncCliTokens, ['--remove-temp', '/tmp/subminer-sync-x']);
|
||||
});
|
||||
|
||||
test('parseCliPrograms forwards transfer cache keys with both sync temp helpers', () => {
|
||||
const key = 'a'.repeat(64);
|
||||
for (const helper of [['--make-temp'], ['--remove-temp', '/tmp/subminer-sync-x']]) {
|
||||
const tokens = [...helper, '--transfer-cache', key];
|
||||
const result = parseCliPrograms(['sync', ...tokens], 'subminer');
|
||||
assert.equal(result.invocations.syncTriggered, true);
|
||||
assert.deepEqual(result.invocations.syncCliTokens, tokens);
|
||||
}
|
||||
});
|
||||
|
||||
test('parseCliPrograms rejects sync --ui with --transfer-cache', () => {
|
||||
assert.throws(
|
||||
() => parseCliPrograms(['sync', '--ui', '--transfer-cache', 'a'.repeat(64)], 'subminer'),
|
||||
{ message: 'Sync --ui cannot be combined with other sync options.' },
|
||||
);
|
||||
});
|
||||
|
||||
test('parseCliPrograms leaves sync validation to the app parser', () => {
|
||||
// Invalid combinations are forwarded; the app's parseSyncCliTokens rejects them.
|
||||
const invalid = parseCliPrograms(['sync', 'media-box', '--push', '--pull'], 'subminer');
|
||||
|
||||
@@ -412,6 +412,7 @@ export function parseCliPrograms(
|
||||
.option('--json', 'Emit machine-readable NDJSON progress output')
|
||||
.option('--make-temp', 'Create a sync temp directory and print its path (used over SSH)')
|
||||
.option('--remove-temp <dir>', 'Remove a sync temp directory created by --make-temp')
|
||||
.option('--transfer-cache <key>', 'Reuse/save a received snapshot with temp helpers (internal)')
|
||||
.option('--ui', 'Open the SubMiner sync window')
|
||||
.option('--log-level <level>', 'Log level')
|
||||
.action((rawHost: string | undefined, options: Record<string, unknown>) => {
|
||||
@@ -433,6 +434,7 @@ export function parseCliPrograms(
|
||||
check ||
|
||||
makeTemp ||
|
||||
removeTemp ||
|
||||
options.transferCache !== undefined ||
|
||||
options.remoteCmd !== undefined ||
|
||||
options.db !== undefined ||
|
||||
options.json === true ||
|
||||
@@ -454,6 +456,8 @@ export function parseCliPrograms(
|
||||
if (merge) tokens.push('--merge', merge);
|
||||
if (makeTemp) tokens.push('--make-temp');
|
||||
if (removeTemp) tokens.push('--remove-temp', removeTemp);
|
||||
if (typeof options.transferCache === 'string')
|
||||
tokens.push('--transfer-cache', options.transferCache);
|
||||
if (push) tokens.push('--push');
|
||||
if (pull) tokens.push('--pull');
|
||||
if (check) tokens.push('--check');
|
||||
|
||||
Reference in New Issue
Block a user