@yahoo/uds-create-cli 5.108.2 → 5.108.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yahoo/uds-create-cli",
3
- "version": "5.108.2",
3
+ "version": "5.108.4",
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.108.2",
36
- "@yahoo/uds-create-loader": "5.108.2",
37
- "@yahoo/uds-create-types": "5.108.2",
38
- "@yahoo/uds-create-utils": "5.108.2",
35
+ "@yahoo/uds-create-config": "5.108.4",
36
+ "@yahoo/uds-create-loader": "5.108.4",
37
+ "@yahoo/uds-create-types": "5.108.4",
38
+ "@yahoo/uds-create-utils": "5.108.4",
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": 20261117234103,
55
+ "udsSchemaVersion": 20261118171253,
56
56
  "optionalDependencies": {
57
- "@yahoo/uds-create-cli-darwin-arm64": "5.108.2",
58
- "@yahoo/uds-create-cli-darwin-x64": "5.108.2",
59
- "@yahoo/uds-create-cli-linux-arm64": "5.108.2",
60
- "@yahoo/uds-create-cli-linux-x64": "5.108.2",
61
- "@yahoo/uds-create-cli-linux-arm64-musl": "5.108.2",
62
- "@yahoo/uds-create-cli-linux-x64-musl": "5.108.2"
57
+ "@yahoo/uds-create-cli-darwin-arm64": "5.108.4",
58
+ "@yahoo/uds-create-cli-darwin-x64": "5.108.4",
59
+ "@yahoo/uds-create-cli-linux-arm64": "5.108.4",
60
+ "@yahoo/uds-create-cli-linux-x64": "5.108.4",
61
+ "@yahoo/uds-create-cli-linux-arm64-musl": "5.108.4",
62
+ "@yahoo/uds-create-cli-linux-x64-musl": "5.108.4"
63
63
  }
64
64
  }
@@ -78824,6 +78824,19 @@ var lintFields = external_exports.strictObject({
78824
78824
  })).meta({
78825
78825
  title: "Ignored findings",
78826
78826
  description: "Findings kept on purpose, each with its reason: a rule on a component, narrowed to a layer, a style key and the rule it is written in when those are given, or on a token. `uds lint` and Create both leave them out."
78827
+ }).optional(),
78828
+ /** This system's own words for a rule or a group, by its name, in place of the lint's. */
78829
+ names: external_exports.record(external_exports.string(), external_exports.strictObject({
78830
+ label: external_exports.string().min(1).optional(),
78831
+ description: external_exports.string().min(1).optional()
78832
+ })).meta({
78833
+ title: "Names",
78834
+ description: "This system's own label and description for a rule or a group, keyed by the rule's or group's name: `{ 'near-token': { label: 'Off the scale' } }`. Create's Lint page shows them in place of the lint's own."
78835
+ }).optional(),
78836
+ /** Built-in rules the system has taken out: they don't run and aren't listed. */
78837
+ removed: external_exports.array(external_exports.string()).meta({
78838
+ title: "Removed rules",
78839
+ description: "Built-in rules this system has taken out, by name. They don't run in Create or `uds lint` and aren't listed; taking a name out of the list puts the rule back."
78827
78840
  }).optional()
78828
78841
  });
78829
78842
  var LintSection = defineSubEntity({
@@ -93078,7 +93091,7 @@ var Entity = class {
93078
93091
  };
93079
93092
 
93080
93093
  // ../config/dist/framework/schema-version.js
93081
- var CURRENT_SCHEMA_VERSION = 20261117234103;
93094
+ var CURRENT_SCHEMA_VERSION = 20261118171253;
93082
93095
  var SETTINGS_AS_KIND_VERSION = 20260908171448;
93083
93096
  var SchemaVersionTooNew = class extends ConfigFormatError {
93084
93097
  found;
@@ -93098,7 +93111,7 @@ function registerSchemaMigrations(...migrations) {
93098
93111
  for (const migration of migrations) {
93099
93112
  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.`);
93100
93113
  if (REGISTERED.has(migration.version)) throw new Error(`A schema migration at version ${migration.version} is already registered.`);
93101
- if (migration.version > 20261117234103) 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.`);
93114
+ if (migration.version > 20261118171253) 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.`);
93102
93115
  REGISTERED.set(migration.version, migration);
93103
93116
  }
93104
93117
  }
@@ -93129,7 +93142,7 @@ function pendingFor(version2, target2, options) {
93129
93142
  return [...(options?.migrations ?? REGISTERED).values()].filter((m) => m.version > version2 && m.version <= target2).sort((a, b) => a.version - b.version);
93130
93143
  }
93131
93144
  function upgradeSerializedConfig(json2, options) {
93132
- const target2 = options?.target ?? 20261117234103;
93145
+ const target2 = options?.target ?? 20261118171253;
93133
93146
  const version2 = detectedWireVersion(json2);
93134
93147
  if (version2 > target2) throw new SchemaVersionTooNew(version2, target2);
93135
93148
  const raw = json2;
@@ -93925,6 +93938,12 @@ function rewrittenBody({ body, kind, config: config2, slug: slug2, options }) {
93925
93938
  });
93926
93939
  return sameBody(body, inlined) ? void 0 : inlined;
93927
93940
  }
93941
+ function keptPointer({ config: config2, kind, path: path2, slug: slug2, options }) {
93942
+ if (!options?.keepPointers) return void 0;
93943
+ const stored = config2.storedBody(kind, path2);
93944
+ if (!isExtendedRef(stored) || !wants(stored, slug2)) return void 0;
93945
+ return config2.resolveRef({ __ref: stored.__ref }) ? stored : void 0;
93946
+ }
93928
93947
  function adoptedRefs(config2, slug2) {
93929
93948
  const moved = /* @__PURE__ */ new Map();
93930
93949
  for (const kind of config2.ownedKinds()) {
@@ -93969,11 +93988,36 @@ function inlineAllSources(config2, slug2, options) {
93969
93988
  });
93970
93989
  }
93971
93990
  }
93972
- const materialized = config2.applyAll(detaching).withMaterializedExtensions({ slug: slug2 });
93991
+ const materialized = config2.applyAll(detaching).withMaterializedExtensions({
93992
+ slug: slug2,
93993
+ keepPointers: options?.keepPointers
93994
+ });
93973
93995
  const rewrites = [];
93974
93996
  for (const kind of materialized.ownedKinds()) {
93975
93997
  if (materialized.entityOf(kind)?.sourceIdentity) continue;
93976
93998
  for (const item of materialized.list(kind)) {
93999
+ const pointer = keptPointer({
94000
+ config: materialized,
94001
+ kind,
94002
+ path: item.path,
94003
+ slug: slug2,
94004
+ options: walk
94005
+ });
94006
+ if (pointer !== void 0) {
94007
+ if (!holdsWantedRef(pointer.extend, slug2)) continue;
94008
+ const extend2 = inlineSourcedRefs(pointer.extend, materialized, slug2, walk);
94009
+ if (sameBody(pointer.extend, extend2)) continue;
94010
+ rewrites.push({
94011
+ kind,
94012
+ operation: "replace",
94013
+ path: item.path,
94014
+ data: {
94015
+ ...pointer,
94016
+ extend: extend2
94017
+ }
94018
+ });
94019
+ continue;
94020
+ }
93977
94021
  const data = rewrittenBody({
93978
94022
  body: item.toJSON(),
93979
94023
  kind,
@@ -94013,6 +94057,20 @@ function withoutPointer(meta3) {
94013
94057
  return kept;
94014
94058
  }
94015
94059
  function detachedGroupMeta({ config: config2, kind, groupPath, slug: slug2, options }) {
94060
+ if (options?.keepPointers) {
94061
+ const stored = config2.authoredGroups(kind).find((group) => group.path === groupPath)?.meta;
94062
+ const kept = stored?.ref;
94063
+ const owner = isRef2(kept) ? config2.configFor(kept) : void 0;
94064
+ if (stored && isRef2(kept) && wants(kept, slug2) && owner && declaresGroup(owner, kept)) {
94065
+ const { ref: _kept, ...fields } = stored;
94066
+ if (!holdsWantedRef(fields, slug2)) return void 0;
94067
+ const inlined = inlineSourcedRefs(fields, config2, slug2, options);
94068
+ return sameBody(fields, inlined) ? void 0 : {
94069
+ ...inlined,
94070
+ ref: kept
94071
+ };
94072
+ }
94073
+ }
94016
94074
  const meta3 = config2.groups(kind).find((group) => group.path === groupPath)?.meta ?? {};
94017
94075
  const pointer = meta3.ref;
94018
94076
  if (!isRef2(pointer) || !wants(pointer, slug2)) {
@@ -98155,6 +98213,9 @@ var Config = class Config2 {
98155
98213
  * attribution and upgrade detection. Breaking a link is deleting the pin, once nothing refers
98156
98214
  * through it.
98157
98215
  *
98216
+ * `keepIdentityRefs` and `keepPointers` leave some sourced refs in place. `toJSON` records the closure
98217
+ * they reach, so the serialized result still loads with no sources attached.
98218
+ *
98158
98219
  * Local refs are untouched — the point is to remove dependence on other systems, not to flatten this
98159
98220
  * one into literals.
98160
98221
  */
@@ -98177,7 +98238,7 @@ var Config = class Config2 {
98177
98238
  * flattening `update` onto the envelope it was supposed to have removed, put the value back inside
98178
98239
  * `extend`, and then refuse to drop the pin because the extension still referenced it. `replace`
98179
98240
  * makes a dissolve an ordinary recorded edit, so it survives being replayed. */
98180
- withMaterializedExtensions({ slug: slug2, only } = {}) {
98241
+ withMaterializedExtensions({ slug: slug2, only, keepPointers } = {}) {
98181
98242
  const patches = [];
98182
98243
  for (const kind of this.ownedKinds()) {
98183
98244
  if (only !== void 0 && only.kind !== kind) continue;
@@ -98188,6 +98249,7 @@ var Config = class Config2 {
98188
98249
  if (!isExtendedRef(extension)) continue;
98189
98250
  if (slug2 !== void 0 && sourceOf2(extension) !== slug2) continue;
98190
98251
  if (only === void 0 && sourceOf2(extension) === void 0) continue;
98252
+ if (keepPointers && this.resolveRef({ __ref: extension.__ref })) continue;
98191
98253
  const resolved = this.resolveExtension({
98192
98254
  kind,
98193
98255
  path: path2,
@@ -99944,9 +100006,10 @@ var Config = class Config2 {
99944
100006
  const path2 = pathOf2(target2);
99945
100007
  const entity = source.resolve(kind, path2);
99946
100008
  if (!entity) continue;
100009
+ const pointer = source.borrowedFrom(kind, path2) === void 0 ? void 0 : source.storedBody(kind, path2);
99947
100010
  kinds.add(kind);
99948
100011
  items[kind] ??= {};
99949
- items[kind][path2] = entity.toJSON();
100012
+ items[kind][path2] = pointer ?? entity.toJSON();
99950
100013
  }
99951
100014
  const settings = source.resolve("settings", "settings");
99952
100015
  if (settings && source.ownedKinds().includes("settings")) {
@@ -100421,7 +100484,7 @@ var Config = class Config2 {
100421
100484
  * links from the provided sources. A declared `linkedKind` with no provided source throws. */
100422
100485
  hydrateFrom(stored, options) {
100423
100486
  const claimed = schemaVersionOf(stored);
100424
- if (claimed > 20261117234103) throw new SchemaVersionTooNew(claimed);
100487
+ if (claimed > 20261118171253) throw new SchemaVersionTooNew(claimed);
100425
100488
  const wire = upgradeSerializedConfig(stored);
100426
100489
  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.`);
100427
100490
  const leftover = wire.options;
@@ -104370,6 +104433,15 @@ var styleSetOwnRuleOnlyMigration = {
104370
104433
  }
104371
104434
  };
104372
104435
 
104436
+ // ../config/dist/migrations/20261118171253_lint_names_removed.js
104437
+ var LINT_NAMES_REMOVED_VERSION = 20261118171253;
104438
+ var lintNamesRemovedMigration = {
104439
+ version: LINT_NAMES_REMOVED_VERSION,
104440
+ up(json2) {
104441
+ return json2;
104442
+ }
104443
+ };
104444
+
104373
104445
  // ../../node_modules/css-tree/lib/generator/sourceMap.js
104374
104446
  var import_source_map_generator = __toESM(require_source_map_generator(), 1);
104375
104447
  var trackNodes = /* @__PURE__ */ new Set(["Atrule", "Selector", "Declaration"]);
@@ -107138,6 +107210,7 @@ if (!registeredSchemaMigrations().has(20261112154943)) registerSchemaMigrations(
107138
107210
  if (!registeredSchemaMigrations().has(20261112163439)) registerSchemaMigrations(vendorLinkTypeMigration);
107139
107211
  if (!registeredSchemaMigrations().has(20261113131930)) registerSchemaMigrations(styleSetOwnRuleOnlyMigration);
107140
107212
  if (!registeredSchemaMigrations().has(20261117234103)) registerSchemaMigrations(uds6038McpInputsMigration);
107213
+ if (!registeredSchemaMigrations().has(20261118171253)) registerSchemaMigrations(lintNamesRemovedMigration);
107141
107214
 
107142
107215
  // ../config/dist/capture/node-ops.js
107143
107216
  var DEFAULT_WIDTH = 1600;
@@ -108584,6 +108657,7 @@ if (!registeredSchemaMigrations().has(20261015221052)) registerSchemaMigrations(
108584
108657
  if (!registeredSchemaMigrations().has(20261016135620)) registerSchemaMigrations(motionTypeOnlyMigration);
108585
108658
  if (!registeredSchemaMigrations().has(20261015202345)) registerSchemaMigrations(componentElementSwapMigration);
108586
108659
  if (!registeredSchemaMigrations().has(20261113131930)) registerSchemaMigrations(styleSetOwnRuleOnlyMigration);
108660
+ if (!registeredSchemaMigrations().has(20261118171253)) registerSchemaMigrations(lintNamesRemovedMigration);
108587
108661
 
108588
108662
  // ../config/dist/entities/system/defineComponent.js
108589
108663
  function build(body) {