@yahoo/uds-create-cli 5.117.0 → 5.118.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/package.json +12 -12
- package/subprocess/transform-runner.mjs +61 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yahoo/uds-create-cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.118.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
33
33
|
"@orpc/client": "^1.13.9",
|
|
34
34
|
"@orpc/contract": "^1.13.9",
|
|
35
|
-
"@yahoo/uds-create-config": "5.
|
|
36
|
-
"@yahoo/uds-create-loader": "5.
|
|
37
|
-
"@yahoo/uds-create-types": "5.
|
|
38
|
-
"@yahoo/uds-create-utils": "5.
|
|
35
|
+
"@yahoo/uds-create-config": "5.118.0",
|
|
36
|
+
"@yahoo/uds-create-loader": "5.118.0",
|
|
37
|
+
"@yahoo/uds-create-types": "5.118.0",
|
|
38
|
+
"@yahoo/uds-create-utils": "5.118.0",
|
|
39
39
|
"esbuild": "^0.27.4",
|
|
40
40
|
"ts-morph": "^27.0.2",
|
|
41
41
|
"get-tsconfig": "^4.10.0",
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
"lodash": "^4.17.23",
|
|
53
53
|
"prettier": "^3.8.1"
|
|
54
54
|
},
|
|
55
|
-
"udsSchemaVersion":
|
|
55
|
+
"udsSchemaVersion": 20261124191049,
|
|
56
56
|
"optionalDependencies": {
|
|
57
|
-
"@yahoo/uds-create-cli-darwin-arm64": "5.
|
|
58
|
-
"@yahoo/uds-create-cli-darwin-x64": "5.
|
|
59
|
-
"@yahoo/uds-create-cli-linux-arm64": "5.
|
|
60
|
-
"@yahoo/uds-create-cli-linux-x64": "5.
|
|
61
|
-
"@yahoo/uds-create-cli-linux-arm64-musl": "5.
|
|
62
|
-
"@yahoo/uds-create-cli-linux-x64-musl": "5.
|
|
57
|
+
"@yahoo/uds-create-cli-darwin-arm64": "5.118.0",
|
|
58
|
+
"@yahoo/uds-create-cli-darwin-x64": "5.118.0",
|
|
59
|
+
"@yahoo/uds-create-cli-linux-arm64": "5.118.0",
|
|
60
|
+
"@yahoo/uds-create-cli-linux-x64": "5.118.0",
|
|
61
|
+
"@yahoo/uds-create-cli-linux-arm64-musl": "5.118.0",
|
|
62
|
+
"@yahoo/uds-create-cli-linux-x64-musl": "5.118.0"
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -71550,7 +71550,8 @@ var METADATA = {
|
|
|
71550
71550
|
copiedFrom: external_exports.string().optional(),
|
|
71551
71551
|
hidden: external_exports.boolean().optional(),
|
|
71552
71552
|
deprecated: external_exports.boolean().optional(),
|
|
71553
|
-
guidance: external_exports.string().optional()
|
|
71553
|
+
guidance: external_exports.string().optional(),
|
|
71554
|
+
guidanceMode: external_exports.enum(["replace", "append"]).optional().describe("How local guidance combines with a linked entity: append keeps inherited text and adds the local text after it. Omitted or replace preserves whole-string replacement; an empty replacement suppresses inherited guidance.")
|
|
71554
71555
|
};
|
|
71555
71556
|
var METADATA_KEYS = Object.keys(METADATA);
|
|
71556
71557
|
function composeDiscriminated(discriminator, members2) {
|
|
@@ -93025,6 +93026,7 @@ var Entity = class {
|
|
|
93025
93026
|
deprecated;
|
|
93026
93027
|
/** How to use this entity, as prose for a model. Collected into the guidance document per kind. */
|
|
93027
93028
|
guidance;
|
|
93029
|
+
guidanceMode;
|
|
93028
93030
|
constructor(path2, raw, fieldKeys2, computedKeys = []) {
|
|
93029
93031
|
this.path = path2;
|
|
93030
93032
|
this.fieldKeys = fieldKeys2;
|
|
@@ -93038,6 +93040,7 @@ var Entity = class {
|
|
|
93038
93040
|
this.hidden = raw.hidden;
|
|
93039
93041
|
this.deprecated = raw.deprecated;
|
|
93040
93042
|
this.guidance = raw.guidance;
|
|
93043
|
+
this.guidanceMode = raw.guidanceMode;
|
|
93041
93044
|
}
|
|
93042
93045
|
/**
|
|
93043
93046
|
* The ONE source this item comes from, or `undefined` when it comes from none — what a surface names
|
|
@@ -93126,12 +93129,13 @@ var Entity = class {
|
|
|
93126
93129
|
if (this.hidden !== void 0) out.hidden = this.hidden;
|
|
93127
93130
|
if (this.deprecated !== void 0) out.deprecated = this.deprecated;
|
|
93128
93131
|
if (this.guidance !== void 0) out.guidance = this.guidance;
|
|
93132
|
+
if (this.guidanceMode !== void 0) out.guidanceMode = this.guidanceMode;
|
|
93129
93133
|
return out;
|
|
93130
93134
|
}
|
|
93131
93135
|
};
|
|
93132
93136
|
|
|
93133
93137
|
// ../config/dist/framework/schema-version.js
|
|
93134
|
-
var CURRENT_SCHEMA_VERSION =
|
|
93138
|
+
var CURRENT_SCHEMA_VERSION = 20261124191049;
|
|
93135
93139
|
var SETTINGS_AS_KIND_VERSION = 20260908171448;
|
|
93136
93140
|
var SchemaVersionTooNew = class extends ConfigFormatError {
|
|
93137
93141
|
found;
|
|
@@ -93151,7 +93155,7 @@ function registerSchemaMigrations(...migrations) {
|
|
|
93151
93155
|
for (const migration of migrations) {
|
|
93152
93156
|
if (migration.version !== 1 && !isMintTimestamp(migration.version)) throw new Error(`Schema migration version ${migration.version} is not a mint timestamp \u2014 mint one with \`date +%Y%m%d%H%M%S\`, like a supabase migration.`);
|
|
93153
93157
|
if (REGISTERED.has(migration.version)) throw new Error(`A schema migration at version ${migration.version} is already registered.`);
|
|
93154
|
-
if (migration.version >
|
|
93158
|
+
if (migration.version > 20261124191049) throw new Error(`Schema migration ${migration.version} is newer than CURRENT_SCHEMA_VERSION (${CURRENT_SCHEMA_VERSION}) \u2014 a stale branch merged, or the mint forgot to bump the constant. Re-mint: set CURRENT_SCHEMA_VERSION to the newest migration version.`);
|
|
93155
93159
|
REGISTERED.set(migration.version, migration);
|
|
93156
93160
|
}
|
|
93157
93161
|
}
|
|
@@ -93182,7 +93186,7 @@ function pendingFor(version2, target2, options) {
|
|
|
93182
93186
|
return [...(options?.migrations ?? REGISTERED).values()].filter((m) => m.version > version2 && m.version <= target2).sort((a, b) => a.version - b.version);
|
|
93183
93187
|
}
|
|
93184
93188
|
function upgradeSerializedConfig(json2, options) {
|
|
93185
|
-
const target2 = options?.target ??
|
|
93189
|
+
const target2 = options?.target ?? 20261124191049;
|
|
93186
93190
|
const version2 = detectedWireVersion(json2);
|
|
93187
93191
|
if (version2 > target2) throw new SchemaVersionTooNew(version2, target2);
|
|
93188
93192
|
const raw = json2;
|
|
@@ -96238,6 +96242,7 @@ var Config = class Config2 {
|
|
|
96238
96242
|
retired: entry.retiredFields
|
|
96239
96243
|
}) : parsedDelta;
|
|
96240
96244
|
const touched = touchedFields(delta, isField2);
|
|
96245
|
+
validateGuidanceAppend(delta, extension !== void 0);
|
|
96241
96246
|
if (extension) {
|
|
96242
96247
|
this.at(snapshot).refuseVendorEdit(patch.kind, patch.path);
|
|
96243
96248
|
const resolved = this.at(snapshot).resolveExtension({
|
|
@@ -96273,7 +96278,8 @@ var Config = class Config2 {
|
|
|
96273
96278
|
path: pathOf2(extension),
|
|
96274
96279
|
body: sourceBody,
|
|
96275
96280
|
extend: local,
|
|
96276
|
-
source: this.configFor(extension)
|
|
96281
|
+
source: this.configFor(extension),
|
|
96282
|
+
resolveGuidance: false
|
|
96277
96283
|
});
|
|
96278
96284
|
const createSchema2 = wholeBodySchema(entry, { config: this });
|
|
96279
96285
|
let merged2 = candidate;
|
|
@@ -96304,8 +96310,13 @@ var Config = class Config2 {
|
|
|
96304
96310
|
const accessor = view.accessorOf(patch.kind) ?? patch.kind;
|
|
96305
96311
|
const existing2 = view.sourceOverlay(slug2, patch.kind, patch.path);
|
|
96306
96312
|
const { target: redirect, rest } = redirectOf(local);
|
|
96313
|
+
const comparison = {
|
|
96314
|
+
...sourceBody,
|
|
96315
|
+
guidanceMode: void 0
|
|
96316
|
+
};
|
|
96317
|
+
if (local.guidanceMode === "append") comparison.guidance = void 0;
|
|
96307
96318
|
const overlay = {
|
|
96308
|
-
...redirect === void 0 ? classifyOverlay(local,
|
|
96319
|
+
...redirect === void 0 ? classifyOverlay(local, comparison) : {
|
|
96309
96320
|
override: { __ref: redirect },
|
|
96310
96321
|
...Object.keys(rest).length > 0 ? { extend: rest } : {}
|
|
96311
96322
|
},
|
|
@@ -96801,6 +96812,7 @@ var Config = class Config2 {
|
|
|
96801
96812
|
rejectData(`Cannot set "${key2}" on ${kind} group "${path2}" \u2014 a ${kind} group holds ${[...entry.groupFieldKeys, ...METADATA_KEYS].map((field) => `"${field}"`).join(", ")}.`, [key2]);
|
|
96802
96813
|
}
|
|
96803
96814
|
const current = snapshot.group(kind, path2)?.toJSON() ?? {};
|
|
96815
|
+
validateGuidanceAppend(delta, isRef2(Object.hasOwn(delta, "ref") ? delta.ref : current.ref));
|
|
96804
96816
|
const groupRef = current.ref;
|
|
96805
96817
|
if (isMintedRow(current) && isRef2(groupRef) && !Object.hasOwn(delta, "ref")) {
|
|
96806
96818
|
const slug2 = sourceOf2(groupRef);
|
|
@@ -96817,9 +96829,14 @@ var Config = class Config2 {
|
|
|
96817
96829
|
...delta
|
|
96818
96830
|
};
|
|
96819
96831
|
for (const key2 of Object.keys(local)) if (local[key2] === null) delete local[key2];
|
|
96832
|
+
const comparison = {
|
|
96833
|
+
...theirs,
|
|
96834
|
+
guidanceMode: void 0
|
|
96835
|
+
};
|
|
96836
|
+
if (local.guidanceMode === "append") comparison.guidance = void 0;
|
|
96820
96837
|
const accessor = view.accessorOf(kind) ?? kind;
|
|
96821
96838
|
const overlay = {
|
|
96822
|
-
...classifyOverlay(local,
|
|
96839
|
+
...classifyOverlay(local, comparison),
|
|
96823
96840
|
...existing?.hidden ? { hidden: true } : {}
|
|
96824
96841
|
};
|
|
96825
96842
|
if (view.sourceTypeOf(slug2) === "vendor" && (overlay.override !== void 0 || overlay.extend !== void 0)) reject("UNSUPPORTED", `Cannot update ${kind} group "${path2}" \u2014 it comes from the vendor source "${slug2}", which is used as shipped.`);
|
|
@@ -97086,21 +97103,27 @@ var Config = class Config2 {
|
|
|
97086
97103
|
* nothing. The pin's invariants refuse the last two when they're written, and the build reports a
|
|
97087
97104
|
* missing target (`brokenLinkRedirects`).
|
|
97088
97105
|
*/
|
|
97089
|
-
laidLinkedBody({ kind, path: path2, body, extend: extend2, source }) {
|
|
97106
|
+
laidLinkedBody({ kind, path: path2, body, extend: extend2, source, resolveGuidance = true }) {
|
|
97090
97107
|
const { target: target2, rest } = redirectOf(extend2);
|
|
97091
97108
|
const base = target2 === void 0 ? body : this.redirectedBody({
|
|
97092
97109
|
kind,
|
|
97093
97110
|
path: path2,
|
|
97094
97111
|
target: target2
|
|
97095
97112
|
}) ?? {};
|
|
97096
|
-
|
|
97113
|
+
const inherited = rebasedLinkedBody({
|
|
97097
97114
|
entry: this.entityOf(kind),
|
|
97098
97115
|
path: path2,
|
|
97099
97116
|
body: base,
|
|
97100
97117
|
extend: rest,
|
|
97101
97118
|
config: this,
|
|
97102
97119
|
source: target2 === void 0 ? source : this.configFor({ __ref: target2 })
|
|
97103
|
-
})
|
|
97120
|
+
});
|
|
97121
|
+
return withLocalGuidance({
|
|
97122
|
+
merged: extendBody(inherited, rest),
|
|
97123
|
+
inherited,
|
|
97124
|
+
local: rest,
|
|
97125
|
+
resolve: resolveGuidance
|
|
97126
|
+
});
|
|
97104
97127
|
}
|
|
97105
97128
|
/** The body of the entity a re-pointed path names, or `undefined` when there is none to read. */
|
|
97106
97129
|
redirectedBody({ kind, path: path2, target: target2 }) {
|
|
@@ -98495,12 +98518,19 @@ var Config = class Config2 {
|
|
|
98495
98518
|
owns: (refKind) => from.entityOf(refKind) !== void 0
|
|
98496
98519
|
});
|
|
98497
98520
|
}
|
|
98498
|
-
|
|
98499
|
-
...inherited,
|
|
98521
|
+
const own2 = {
|
|
98500
98522
|
...overlay?.override,
|
|
98501
98523
|
...overlay?.extend,
|
|
98502
98524
|
...body
|
|
98503
98525
|
};
|
|
98526
|
+
return withLocalGuidance({
|
|
98527
|
+
merged: {
|
|
98528
|
+
...inherited,
|
|
98529
|
+
...own2
|
|
98530
|
+
},
|
|
98531
|
+
inherited,
|
|
98532
|
+
local: own2
|
|
98533
|
+
});
|
|
98504
98534
|
}
|
|
98505
98535
|
/** Every group node of a kind, total by default; `{ retired: false }` leaves out retired folders,
|
|
98506
98536
|
* the same way {@link list} leaves out retired items. */
|
|
@@ -100524,7 +100554,7 @@ var Config = class Config2 {
|
|
|
100524
100554
|
* links from the provided sources. A declared `linkedKind` with no provided source throws. */
|
|
100525
100555
|
hydrateFrom(stored, options) {
|
|
100526
100556
|
const claimed = schemaVersionOf(stored);
|
|
100527
|
-
if (claimed >
|
|
100557
|
+
if (claimed > 20261124191049) throw new SchemaVersionTooNew(claimed);
|
|
100528
100558
|
const wire = upgradeSerializedConfig(stored);
|
|
100529
100559
|
if (!Array.isArray(wire.ownedKinds) || typeof wire.items !== "object" || wire.items === null) throw new ConfigFormatError(`Config "${stored.name ?? "system-config"}" cannot be hydrated: this is not a serialized config-v2 config (no "ownedKinds"/"items"). A pre-cutover build artifact converts through the registered cutover migration \u2014 import the config type's module (e.g. \`configs/system\`) before hydrating.`);
|
|
100530
100560
|
const leftover = wire.options;
|
|
@@ -100630,6 +100660,14 @@ function extendBody(base, delta) {
|
|
|
100630
100660
|
for (const [field, value] of Object.entries(delta)) merged[field] = extendBody(merged[field], value);
|
|
100631
100661
|
return merged;
|
|
100632
100662
|
}
|
|
100663
|
+
function validateGuidanceAppend(delta, linked) {
|
|
100664
|
+
if (delta.guidanceMode === "append" && !linked) rejectData("Append mode requires linked guidance. To add advice to this local entity, read its existing guidance and write the complete combined text without append mode. Preserve existing advice unless replacement or removal was requested.", ["guidanceMode"]);
|
|
100665
|
+
}
|
|
100666
|
+
function withLocalGuidance({ merged, inherited, local, resolve = true }) {
|
|
100667
|
+
if (!Object.hasOwn(local, "guidanceMode")) delete merged.guidanceMode;
|
|
100668
|
+
if (resolve && local.guidanceMode === "append" && typeof local.guidance === "string") merged.guidance = [inherited.guidance, local.guidance].filter((text) => typeof text === "string" && text.trim() !== "").join("\n\n");
|
|
100669
|
+
return merged;
|
|
100670
|
+
}
|
|
100633
100671
|
var redirecting = /* @__PURE__ */ new WeakMap();
|
|
100634
100672
|
function sameOrigin(a, b) {
|
|
100635
100673
|
return sameOriginFields(a.fields, b.fields);
|
|
@@ -104482,6 +104520,15 @@ var lintNamesRemovedMigration = {
|
|
|
104482
104520
|
}
|
|
104483
104521
|
};
|
|
104484
104522
|
|
|
104523
|
+
// ../config/dist/migrations/20261124191049_guidance_append_mode.js
|
|
104524
|
+
var GUIDANCE_APPEND_MODE_VERSION = 20261124191049;
|
|
104525
|
+
var guidanceAppendModeMigration = {
|
|
104526
|
+
version: GUIDANCE_APPEND_MODE_VERSION,
|
|
104527
|
+
up(json2) {
|
|
104528
|
+
return json2;
|
|
104529
|
+
}
|
|
104530
|
+
};
|
|
104531
|
+
|
|
104485
104532
|
// ../../node_modules/css-tree/lib/generator/sourceMap.js
|
|
104486
104533
|
var import_source_map_generator = __toESM(require_source_map_generator(), 1);
|
|
104487
104534
|
var trackNodes = /* @__PURE__ */ new Set(["Atrule", "Selector", "Declaration"]);
|
|
@@ -107251,6 +107298,7 @@ if (!registeredSchemaMigrations().has(20261112163439)) registerSchemaMigrations(
|
|
|
107251
107298
|
if (!registeredSchemaMigrations().has(20261113131930)) registerSchemaMigrations(styleSetOwnRuleOnlyMigration);
|
|
107252
107299
|
if (!registeredSchemaMigrations().has(20261117234103)) registerSchemaMigrations(uds6038McpInputsMigration);
|
|
107253
107300
|
if (!registeredSchemaMigrations().has(20261118171253)) registerSchemaMigrations(lintNamesRemovedMigration);
|
|
107301
|
+
if (!registeredSchemaMigrations().has(20261124191049)) registerSchemaMigrations(guidanceAppendModeMigration);
|
|
107254
107302
|
|
|
107255
107303
|
// ../config/dist/capture/node-ops.js
|
|
107256
107304
|
var DEFAULT_WIDTH = 1600;
|