@bakers-build/core 0.5.1-next.852 → 0.5.1-next.854
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.
|
@@ -287,9 +287,6 @@ export function inventoryConfig(options = {}) {
|
|
|
287
287
|
const userId = source.properties.get('user_id');
|
|
288
288
|
if (userId)
|
|
289
289
|
add('retired_key', 'user_id', 'No user_id: the server takes the owner from sign-in.', 'Run bakers init to rewrite the file without it.', 'schema', 'error', userId);
|
|
290
|
-
requireValue('max_parallel', 'A positive integer host capacity.', (property) => typeof property.value === 'number' &&
|
|
291
|
-
Number.isInteger(property.value) &&
|
|
292
|
-
property.value > 0);
|
|
293
290
|
const tunnel = source.properties.get('tunnel');
|
|
294
291
|
const tunnelExpected = 'A boolean tunnel sharing policy.';
|
|
295
292
|
if (tunnel) {
|
|
@@ -390,13 +387,9 @@ export function inventoryConfig(options = {}) {
|
|
|
390
387
|
}
|
|
391
388
|
}
|
|
392
389
|
if (kind !== 'machine') {
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
add('misplaced_key', key, key === 'tunnel'
|
|
397
|
-
? `Machine-owned tunnel belongs in ${machinePath}.`
|
|
398
|
-
: `Host capacity belongs in ${machinePath} at max_parallel.`, `Move ${key} from ${shellQuote(path)} into ${shellQuote(machinePath)}.`, 'ownership', 'error', property, 'machine');
|
|
399
|
-
}
|
|
390
|
+
const property = source.properties.get('tunnel');
|
|
391
|
+
if (property)
|
|
392
|
+
add('misplaced_key', 'tunnel', `Machine-owned tunnel belongs in ${machinePath}.`, `Move tunnel from ${shellQuote(path)} into ${shellQuote(machinePath)}.`, 'ownership', 'error', property, 'machine');
|
|
400
393
|
}
|
|
401
394
|
const findings = report.findings.slice(startFindings);
|
|
402
395
|
if (findings.some((finding) => finding.severity === 'error'))
|
|
@@ -457,7 +450,7 @@ export function inventoryConfig(options = {}) {
|
|
|
457
450
|
}
|
|
458
451
|
else if (finding.owner === 'machine') {
|
|
459
452
|
destinationPath = machinePath;
|
|
460
|
-
destinationKey = finding.key
|
|
453
|
+
destinationKey = finding.key;
|
|
461
454
|
}
|
|
462
455
|
else {
|
|
463
456
|
destinationPath = connectionPath;
|
|
@@ -8,7 +8,7 @@ import { findConfigProjectBbDir, homeBbDir, resolveBbConfigPath, } from './baker
|
|
|
8
8
|
import { inspectConfigSource } from './config-source.js';
|
|
9
9
|
import { importConfig } from './import-config.js';
|
|
10
10
|
import { machineUiConfigPath, projectConductorConfigPath, readUiEntryLayers, } from './layered-ui-entries.js';
|
|
11
|
-
import { assertSchemaVersion1 } from './machine-context.js';
|
|
11
|
+
import { assertSchemaVersion1, warnIgnoredMaxParallel, } from './machine-context.js';
|
|
12
12
|
import { resolveModuleEslintStyle } from './resolve-module.js';
|
|
13
13
|
/**
|
|
14
14
|
* A connection config that was RESOLVED but is not usable — a missing
|
|
@@ -259,6 +259,7 @@ export async function loadBbConnectionBootstrap(host, opts = {}) {
|
|
|
259
259
|
throw new Error(`bakers connection config default export must be an object (${configPath})`);
|
|
260
260
|
}
|
|
261
261
|
assertSchemaVersion1(configPath, raw);
|
|
262
|
+
warnIgnoredMaxParallel(configPath, raw);
|
|
262
263
|
const site = isRecord(raw.site) ? raw.site : {};
|
|
263
264
|
const baseUrl = typeof site.base_url === 'string' ? site.base_url : '';
|
|
264
265
|
if (baseUrl.trim() === '') {
|
|
@@ -20,11 +20,6 @@ export interface MachineContext {
|
|
|
20
20
|
machine_id: string;
|
|
21
21
|
/** Display name for people; never a key. */
|
|
22
22
|
label: string;
|
|
23
|
-
/**
|
|
24
|
-
* Host concurrent-run budget (BB-353). Optional; consumers default to 1.
|
|
25
|
-
* Source of truth for capacity — not the engine conductor.config.js.
|
|
26
|
-
*/
|
|
27
|
-
max_parallel?: number;
|
|
28
23
|
/** Optional selection policy for the agents the machine `addons[]` contribute. */
|
|
29
24
|
agents?: MachineAgentPolicy;
|
|
30
25
|
/**
|
|
@@ -40,6 +35,11 @@ export interface MachineContext {
|
|
|
40
35
|
*/
|
|
41
36
|
tunnel?: boolean;
|
|
42
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Warn once that a leftover `max_parallel` in a config file is ignored: the
|
|
40
|
+
* run budget is set on the machine in the backend.
|
|
41
|
+
*/
|
|
42
|
+
export declare function warnIgnoredMaxParallel(path: string, raw: object): void;
|
|
43
43
|
/** Canonical machine-context path: `<BB_HOME or ~/.bakers>/machine.config.js`. */
|
|
44
44
|
export declare function machineContextPath(): string;
|
|
45
45
|
/** Resolve explicit or canonical current host context. */
|
|
@@ -2,6 +2,14 @@ import { existsSync, readFileSync } from 'node:fs';
|
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { pathToFileURL } from 'node:url';
|
|
4
4
|
import { homeBbDir } from './bakers-dir.js';
|
|
5
|
+
/**
|
|
6
|
+
* Warn once that a leftover `max_parallel` in a config file is ignored: the
|
|
7
|
+
* run budget is set on the machine in the backend.
|
|
8
|
+
*/
|
|
9
|
+
export function warnIgnoredMaxParallel(path, raw) {
|
|
10
|
+
if ('max_parallel' in raw)
|
|
11
|
+
console.warn(`warning: max_parallel in ${path} is ignored; the run budget is set on the machine in the backend.`);
|
|
12
|
+
}
|
|
5
13
|
/** Canonical machine-context path: `<BB_HOME or ~/.bakers>/machine.config.js`. */
|
|
6
14
|
export function machineContextPath() {
|
|
7
15
|
return join(homeBbDir(), 'machine.config.js');
|
package/dist/src/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { type ConfigSourceInspection, type ConfigSourceProperty, declaresTopLeve
|
|
|
9
9
|
export { HOME_IMPORT_EXPRESSION_PATTERN, importConfig, } from './cli/import-config.js';
|
|
10
10
|
export { type LayeredUiEntryLayer, machineUiConfigPath, projectConductorConfigPath, readUiEntryLayers, } from './cli/layered-ui-entries.js';
|
|
11
11
|
export { type BbConnectionConfig, BbConnectionConfigError, type BbConnectionGlobals, type BbConnectionLoadOptions, type BbConnectionSelection, type EffectiveConnectionField, loadBbConfig, loadBbConnectionBootstrap, reportLoadedBbConfigFields, resolveBbConnectionSelection, } from './cli/load-bakers-config.js';
|
|
12
|
-
export { type AgentRoutes, assertSchemaVersion1, type MachineContext, machineContextPath, readMachineContext, resolveMachineContextPath, } from './cli/machine-context.js';
|
|
12
|
+
export { type AgentRoutes, assertSchemaVersion1, type MachineContext, machineContextPath, readMachineContext, resolveMachineContextPath, warnIgnoredMaxParallel, } from './cli/machine-context.js';
|
|
13
13
|
export { corePackageRoot } from './cli/paths.js';
|
|
14
14
|
export { resolveModuleEslintStyle } from './cli/resolve-module.js';
|
|
15
15
|
export { BB_PACKAGE, checkForUpdate, declineUpdate, defaultUpdateCachePath, fetchLatestVersion, fetchUpdateNotice, printVersionLine, REGISTRY_LATEST_URL, resolveCliVersion, UNKNOWN_VERSION, UPDATE_CHECK_TTL_MS, type UpdateCheckOptions, type UpdateCheckResult, updateNotice, } from './cli/version-check.js';
|
package/dist/src/index.js
CHANGED
|
@@ -11,7 +11,7 @@ export { declaresTopLevelKey, findDefaultExportObject, inspectConfigSource, matc
|
|
|
11
11
|
export { HOME_IMPORT_EXPRESSION_PATTERN, importConfig, } from './cli/import-config.js';
|
|
12
12
|
export { machineUiConfigPath, projectConductorConfigPath, readUiEntryLayers, } from './cli/layered-ui-entries.js';
|
|
13
13
|
export { BbConnectionConfigError, loadBbConfig, loadBbConnectionBootstrap, reportLoadedBbConfigFields, resolveBbConnectionSelection, } from './cli/load-bakers-config.js';
|
|
14
|
-
export { assertSchemaVersion1, machineContextPath, readMachineContext, resolveMachineContextPath, } from './cli/machine-context.js';
|
|
14
|
+
export { assertSchemaVersion1, machineContextPath, readMachineContext, resolveMachineContextPath, warnIgnoredMaxParallel, } from './cli/machine-context.js';
|
|
15
15
|
export { corePackageRoot } from './cli/paths.js';
|
|
16
16
|
export { resolveModuleEslintStyle } from './cli/resolve-module.js';
|
|
17
17
|
export { BB_PACKAGE, checkForUpdate, declineUpdate, defaultUpdateCachePath, fetchLatestVersion, fetchUpdateNotice, printVersionLine, REGISTRY_LATEST_URL, resolveCliVersion, UNKNOWN_VERSION, UPDATE_CHECK_TTL_MS, updateNotice, } from './cli/version-check.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bakers-build/core",
|
|
3
|
-
"version": "0.5.1-next.
|
|
3
|
+
"version": "0.5.1-next.854",
|
|
4
4
|
"description": "bakers.build surface-agnostic kernel: host contract, split-config helpers, addon preset/discovery machinery, shared primitives.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"yaml": "^2.7.0"
|
|
39
39
|
},
|
|
40
40
|
"bakersBuild": {
|
|
41
|
-
"commit": "
|
|
41
|
+
"commit": "238bcdaa4adf04d7536cb9b598f5c751345be458",
|
|
42
42
|
"channel": "next"
|
|
43
43
|
}
|
|
44
44
|
}
|