@yahoo/uds-create-cli 5.89.4 → 5.89.6

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.89.4",
3
+ "version": "5.89.6",
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.89.4",
36
- "@yahoo/uds-create-loader": "5.89.4",
37
- "@yahoo/uds-create-types": "5.89.4",
38
- "@yahoo/uds-create-utils": "5.89.4",
35
+ "@yahoo/uds-create-config": "5.89.6",
36
+ "@yahoo/uds-create-loader": "5.89.6",
37
+ "@yahoo/uds-create-types": "5.89.6",
38
+ "@yahoo/uds-create-utils": "5.89.6",
39
39
  "esbuild": "^0.27.4",
40
40
  "ts-morph": "^27.0.2",
41
41
  "get-tsconfig": "^4.10.0",
@@ -54,11 +54,11 @@
54
54
  },
55
55
  "udsSchemaVersion": 20261109144822,
56
56
  "optionalDependencies": {
57
- "@yahoo/uds-create-cli-darwin-arm64": "5.89.4",
58
- "@yahoo/uds-create-cli-darwin-x64": "5.89.4",
59
- "@yahoo/uds-create-cli-linux-arm64": "5.89.4",
60
- "@yahoo/uds-create-cli-linux-x64": "5.89.4",
61
- "@yahoo/uds-create-cli-linux-arm64-musl": "5.89.4",
62
- "@yahoo/uds-create-cli-linux-x64-musl": "5.89.4"
57
+ "@yahoo/uds-create-cli-darwin-arm64": "5.89.6",
58
+ "@yahoo/uds-create-cli-darwin-x64": "5.89.6",
59
+ "@yahoo/uds-create-cli-linux-arm64": "5.89.6",
60
+ "@yahoo/uds-create-cli-linux-x64": "5.89.6",
61
+ "@yahoo/uds-create-cli-linux-arm64-musl": "5.89.6",
62
+ "@yahoo/uds-create-cli-linux-x64-musl": "5.89.6"
63
63
  }
64
64
  }
@@ -69818,80 +69818,6 @@ function isNativeConfig(config2) {
69818
69818
  return config2.name === NATIVE_CONFIG_NAME;
69819
69819
  }
69820
69820
 
69821
- // ../config/dist/framework/utils/field-path.js
69822
- function isPlainObject2(value) {
69823
- return typeof value === "object" && value !== null && !Array.isArray(value);
69824
- }
69825
- function pathSegments(key2, isField2) {
69826
- const dot = key2.indexOf(".");
69827
- if (dot === -1) return [key2];
69828
- return isField2(key2.slice(0, dot)) ? key2.split(".") : [key2];
69829
- }
69830
- function sectionDelta(field, data) {
69831
- if (!isPlainObject2(data)) return { [field]: data };
69832
- return Object.fromEntries(Object.entries(data).map(([key2, value]) => [`${field}.${key2}`, value]));
69833
- }
69834
- function setAtPath(body, segments, value, depth = 0) {
69835
- const [head, ...rest] = segments;
69836
- if (head === void 0) return body;
69837
- const next = { ...body };
69838
- if (rest.length === 0) {
69839
- if (value === null) delete next[head];
69840
- else next[head] = value;
69841
- return next;
69842
- }
69843
- const written = setAtPath(isPlainObject2(next[head]) ? next[head] : {}, rest, value, depth + 1);
69844
- if (depth > 0 && value === null && Object.keys(written).length === 0) delete next[head];
69845
- else next[head] = written;
69846
- return next;
69847
- }
69848
- function applyPathDelta(current, delta, isField2) {
69849
- let out = current;
69850
- for (const [key2, value] of Object.entries(delta)) out = setAtPath(out, pathSegments(key2, isField2), value);
69851
- return out;
69852
- }
69853
- function namedFields(names) {
69854
- const declared2 = new Set(names);
69855
- return (name) => declared2.has(name);
69856
- }
69857
- function touchedFields(delta, isField2) {
69858
- return new Set(Object.keys(delta).map((key2) => pathSegments(key2, isField2)[0]));
69859
- }
69860
-
69861
- // ../config/dist/framework/default-conditions.js
69862
- function storedDefaultConditions(body) {
69863
- const stored = body?.defaultPropsWhen;
69864
- return isPlainObject2(stored) ? stored : {};
69865
- }
69866
- function defaultsFor({ body, given }) {
69867
- const defaults = unconditionalDefaults(body);
69868
- if (Object.keys(storedDefaultConditions(body)).length === 0) return defaults;
69869
- const out = { ...defaults };
69870
- for (const { condition } of holdingDefaultConditions({
69871
- body,
69872
- given
69873
- })) Object.assign(out, condition.props);
69874
- return out;
69875
- }
69876
- function holdingDefaultConditions({ body, given }) {
69877
- const defaults = unconditionalDefaults(body);
69878
- return Object.entries(storedDefaultConditions(body)).flatMap(([key2, condition]) => {
69879
- return Object.entries(condition.when).every(([prop, value]) => {
69880
- const current = given[prop] !== void 0 ? given[prop] : defaults[prop];
69881
- return String(refLeaf(current)) === String(refLeaf(value));
69882
- }) ? [{
69883
- key: key2,
69884
- condition
69885
- }] : [];
69886
- });
69887
- }
69888
- function unconditionalDefaults(body) {
69889
- return body?.defaultProps ?? {};
69890
- }
69891
-
69892
- // ../config/dist/framework/config-operation-kind.js
69893
- var CONFIG_OPERATION_KIND = "config";
69894
-
69895
69821
  // ../config/dist/framework/rejection.js
69896
69822
  var ConfigRejection = class extends Error {
69897
69823
  issues;
@@ -69974,6 +69900,130 @@ var ConfigFormatError = class extends Error {
69974
69900
  }
69975
69901
  };
69976
69902
 
69903
+ // ../config/dist/framework/utils/field-path.js
69904
+ function isPlainObject2(value) {
69905
+ return typeof value === "object" && value !== null && !Array.isArray(value);
69906
+ }
69907
+ function pathSegments(key2, isField2) {
69908
+ const dot = key2.indexOf(".");
69909
+ if (dot === -1) return [key2];
69910
+ return isField2(key2.slice(0, dot)) ? key2.split(".") : [key2];
69911
+ }
69912
+ function sectionDelta(field, data) {
69913
+ if (!isPlainObject2(data)) return { [field]: data };
69914
+ return Object.fromEntries(Object.entries(data).map(([key2, value]) => [`${field}.${key2}`, value]));
69915
+ }
69916
+ function setAtPath(body, segments, value) {
69917
+ return setInRecord({
69918
+ body,
69919
+ segments,
69920
+ value,
69921
+ above: []
69922
+ });
69923
+ }
69924
+ function setInRecord({ body, segments, value, above }) {
69925
+ const [head, ...rest] = segments;
69926
+ if (head === void 0) return body;
69927
+ const next = { ...body };
69928
+ if (rest.length === 0) {
69929
+ if (value === null) delete next[head];
69930
+ else next[head] = value;
69931
+ return next;
69932
+ }
69933
+ const written = setInside({
69934
+ container: next[head],
69935
+ segments: rest,
69936
+ value,
69937
+ above: [...above, head]
69938
+ });
69939
+ if (above.length > 0 && value === null && isPlainObject2(written) && Object.keys(written).length === 0) delete next[head];
69940
+ else next[head] = written;
69941
+ return next;
69942
+ }
69943
+ function setInside({ container, segments, value, above }) {
69944
+ let list;
69945
+ if (Array.isArray(container)) list = container;
69946
+ else if (segments[0] === "-" && !isPlainObject2(container)) list = [];
69947
+ if (!list) return setInRecord({
69948
+ body: isPlainObject2(container) ? container : {},
69949
+ segments,
69950
+ value,
69951
+ above
69952
+ });
69953
+ const [head, ...rest] = segments;
69954
+ const index = entryIndex({
69955
+ list,
69956
+ segment: head,
69957
+ at: above
69958
+ });
69959
+ if (value === null && index === list.length) return container;
69960
+ const next = [...list];
69961
+ if (rest.length === 0) {
69962
+ if (value === null) next.splice(index, 1);
69963
+ else next[index] = value;
69964
+ return next;
69965
+ }
69966
+ next[index] = setInside({
69967
+ container: next[index],
69968
+ segments: rest,
69969
+ value,
69970
+ above: [...above, head]
69971
+ });
69972
+ return next;
69973
+ }
69974
+ function entryIndex({ list, segment, at }) {
69975
+ if (segment === "-") return list.length;
69976
+ const index = /^(0|[1-9]\d*)$/.test(segment) ? Number(segment) : void 0;
69977
+ if (index === void 0 || index > list.length) reject("NOT_FOUND", `"${at.join(".")}" is a list of ${list.length}, so "${segment}" addresses nothing in it. Address an entry by its index (0\u2013${list.length}, where ${list.length} appends) or append with "-".`);
69978
+ return index;
69979
+ }
69980
+ function applyPathDelta(current, delta, isField2) {
69981
+ let out = current;
69982
+ for (const [key2, value] of Object.entries(delta)) out = setAtPath(out, pathSegments(key2, isField2), value);
69983
+ return out;
69984
+ }
69985
+ function namedFields(names) {
69986
+ const declared2 = new Set(names);
69987
+ return (name) => declared2.has(name);
69988
+ }
69989
+ function touchedFields(delta, isField2) {
69990
+ return new Set(Object.keys(delta).map((key2) => pathSegments(key2, isField2)[0]));
69991
+ }
69992
+
69993
+ // ../config/dist/framework/default-conditions.js
69994
+ function storedDefaultConditions(body) {
69995
+ const stored = body?.defaultPropsWhen;
69996
+ return isPlainObject2(stored) ? stored : {};
69997
+ }
69998
+ function defaultsFor({ body, given }) {
69999
+ const defaults = unconditionalDefaults(body);
70000
+ if (Object.keys(storedDefaultConditions(body)).length === 0) return defaults;
70001
+ const out = { ...defaults };
70002
+ for (const { condition } of holdingDefaultConditions({
70003
+ body,
70004
+ given
70005
+ })) Object.assign(out, condition.props);
70006
+ return out;
70007
+ }
70008
+ function holdingDefaultConditions({ body, given }) {
70009
+ const defaults = unconditionalDefaults(body);
70010
+ return Object.entries(storedDefaultConditions(body)).flatMap(([key2, condition]) => {
70011
+ return Object.entries(condition.when).every(([prop, value]) => {
70012
+ const current = given[prop] !== void 0 ? given[prop] : defaults[prop];
70013
+ return String(refLeaf(current)) === String(refLeaf(value));
70014
+ }) ? [{
70015
+ key: key2,
70016
+ condition
70017
+ }] : [];
70018
+ });
70019
+ }
70020
+ function unconditionalDefaults(body) {
70021
+ return body?.defaultProps ?? {};
70022
+ }
70023
+
70024
+ // ../config/dist/framework/config-operation-kind.js
70025
+ var CONFIG_OPERATION_KIND = "config";
70026
+
69977
70027
  // ../config/dist/framework/plan.js
69978
70028
  function describePatch(patch) {
69979
70029
  const { kind, operation } = patch;
@@ -71074,7 +71124,7 @@ function defaultSchemas(kind, declaredFields, groupFields, subEntities, { single
71074
71124
  input: bodyInput(false),
71075
71125
  readOnly: false,
71076
71126
  label: "Update",
71077
- description: `Update a ${kind} \u2014 a partial \`data\` whose KEYS ARE FIELD PATHS. \`{ "value": \u2026 }\` replaces that field; \`{ "value.brand": \u2026 }\` reaches inside and changes only that, leaving its siblings alone; \`null\` at either address removes what is there. Nothing you don't name is touched.`,
71127
+ description: `Update a ${kind} \u2014 a partial \`data\` whose KEYS ARE FIELD PATHS. \`{ "value": \u2026 }\` replaces that field; \`{ "value.brand": \u2026 }\` reaches inside and changes only that, leaving its siblings alone; \`null\` at either address removes what is there. In a list, a number addresses one entry: \`{ "content.2": \u2026 }\` replaces entry 2, the list's length or \`-\` appends, and \`null\` removes that entry. Nothing you don't name is touched.`,
71078
71128
  scope: "item",
71079
71129
  handler: (i, c) => c.apply({
71080
71130
  kind,
@@ -71325,7 +71375,7 @@ function defaultSchemas(kind, declaredFields, groupFields, subEntities, { single
71325
71375
  input: envelope(memberUpdate, { ...address }),
71326
71376
  readOnly: false,
71327
71377
  label: "Update",
71328
- description: `Update a ${kind}'s \`${field}\` section \u2014 a partial \`data\` whose KEYS ARE FIELD PATHS. \`{ "prefix": \u2026 }\` sets that field and leaves every sibling alone; \`null\` removes what is there.`,
71378
+ description: `Update a ${kind}'s \`${field}\` section \u2014 a partial \`data\` whose KEYS ARE FIELD PATHS. \`{ "prefix": \u2026 }\` sets that field and leaves every sibling alone; \`null\` removes what is there. In a list, a number addresses one entry: \`{ "content.2": \u2026 }\` replaces entry 2, the list's length or \`-\` appends, and \`null\` removes that entry.`,
71329
71379
  scope: "item",
71330
71380
  handler: (i, c) => c.apply({
71331
71381
  kind,
@@ -71398,7 +71448,7 @@ function defaultSchemas(kind, declaredFields, groupFields, subEntities, { single
71398
71448
  }),
71399
71449
  readOnly: false,
71400
71450
  label: "Update",
71401
- description: `Update a ${kind}'s \`${field}\` member \`key\`${inside}${derivesKey ? " (leave `key` out to address the member `data` identifies, created when absent)" : ""} \u2014 a partial \`data\` whose KEYS ARE FIELD PATHS. \`{ "layers": \u2026 }\` replaces that field; \`{ "layers.root.bg": \u2026 }\` changes only that leaf and leaves every sibling alone; \`null\` at either address removes what is there. Nothing you don't name is touched, so two edits to one member compose in a single batch. Use \`sub-upsert/${field}\` to replace the member whole.`,
71451
+ description: `Update a ${kind}'s \`${field}\` member \`key\`${inside}${derivesKey ? " (leave `key` out to address the member `data` identifies, created when absent)" : ""} \u2014 a partial \`data\` whose KEYS ARE FIELD PATHS. \`{ "layers": \u2026 }\` replaces that field; \`{ "layers.root.bg": \u2026 }\` changes only that leaf and leaves every sibling alone; \`null\` at either address removes what is there. In a list, a number addresses one entry: \`{ "content.2": \u2026 }\` replaces entry 2, the list's length or \`-\` appends, and \`null\` removes that entry. Nothing you don't name is touched, so two edits to one member compose in a single batch. Use \`sub-upsert/${field}\` to replace the member whole.`,
71402
71452
  scope: "item",
71403
71453
  handler: (i, c) => c.apply({
71404
71454
  kind,