@yahoo/uds-create-cli 5.108.3 → 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 +11 -11
- package/subprocess/transform-runner.mjs +53 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yahoo/uds-create-cli",
|
|
3
|
-
"version": "5.108.
|
|
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.
|
|
36
|
-
"@yahoo/uds-create-loader": "5.108.
|
|
37
|
-
"@yahoo/uds-create-types": "5.108.
|
|
38
|
-
"@yahoo/uds-create-utils": "5.108.
|
|
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",
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
},
|
|
55
55
|
"udsSchemaVersion": 20261118171253,
|
|
56
56
|
"optionalDependencies": {
|
|
57
|
-
"@yahoo/uds-create-cli-darwin-arm64": "5.108.
|
|
58
|
-
"@yahoo/uds-create-cli-darwin-x64": "5.108.
|
|
59
|
-
"@yahoo/uds-create-cli-linux-arm64": "5.108.
|
|
60
|
-
"@yahoo/uds-create-cli-linux-x64": "5.108.
|
|
61
|
-
"@yahoo/uds-create-cli-linux-arm64-musl": "5.108.
|
|
62
|
-
"@yahoo/uds-create-cli-linux-x64-musl": "5.108.
|
|
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
|
}
|
|
@@ -93938,6 +93938,12 @@ function rewrittenBody({ body, kind, config: config2, slug: slug2, options }) {
|
|
|
93938
93938
|
});
|
|
93939
93939
|
return sameBody(body, inlined) ? void 0 : inlined;
|
|
93940
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
|
+
}
|
|
93941
93947
|
function adoptedRefs(config2, slug2) {
|
|
93942
93948
|
const moved = /* @__PURE__ */ new Map();
|
|
93943
93949
|
for (const kind of config2.ownedKinds()) {
|
|
@@ -93982,11 +93988,36 @@ function inlineAllSources(config2, slug2, options) {
|
|
|
93982
93988
|
});
|
|
93983
93989
|
}
|
|
93984
93990
|
}
|
|
93985
|
-
const materialized = config2.applyAll(detaching).withMaterializedExtensions({
|
|
93991
|
+
const materialized = config2.applyAll(detaching).withMaterializedExtensions({
|
|
93992
|
+
slug: slug2,
|
|
93993
|
+
keepPointers: options?.keepPointers
|
|
93994
|
+
});
|
|
93986
93995
|
const rewrites = [];
|
|
93987
93996
|
for (const kind of materialized.ownedKinds()) {
|
|
93988
93997
|
if (materialized.entityOf(kind)?.sourceIdentity) continue;
|
|
93989
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
|
+
}
|
|
93990
94021
|
const data = rewrittenBody({
|
|
93991
94022
|
body: item.toJSON(),
|
|
93992
94023
|
kind,
|
|
@@ -94026,6 +94057,20 @@ function withoutPointer(meta3) {
|
|
|
94026
94057
|
return kept;
|
|
94027
94058
|
}
|
|
94028
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
|
+
}
|
|
94029
94074
|
const meta3 = config2.groups(kind).find((group) => group.path === groupPath)?.meta ?? {};
|
|
94030
94075
|
const pointer = meta3.ref;
|
|
94031
94076
|
if (!isRef2(pointer) || !wants(pointer, slug2)) {
|
|
@@ -98168,6 +98213,9 @@ var Config = class Config2 {
|
|
|
98168
98213
|
* attribution and upgrade detection. Breaking a link is deleting the pin, once nothing refers
|
|
98169
98214
|
* through it.
|
|
98170
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
|
+
*
|
|
98171
98219
|
* Local refs are untouched — the point is to remove dependence on other systems, not to flatten this
|
|
98172
98220
|
* one into literals.
|
|
98173
98221
|
*/
|
|
@@ -98190,7 +98238,7 @@ var Config = class Config2 {
|
|
|
98190
98238
|
* flattening `update` onto the envelope it was supposed to have removed, put the value back inside
|
|
98191
98239
|
* `extend`, and then refuse to drop the pin because the extension still referenced it. `replace`
|
|
98192
98240
|
* makes a dissolve an ordinary recorded edit, so it survives being replayed. */
|
|
98193
|
-
withMaterializedExtensions({ slug: slug2, only } = {}) {
|
|
98241
|
+
withMaterializedExtensions({ slug: slug2, only, keepPointers } = {}) {
|
|
98194
98242
|
const patches = [];
|
|
98195
98243
|
for (const kind of this.ownedKinds()) {
|
|
98196
98244
|
if (only !== void 0 && only.kind !== kind) continue;
|
|
@@ -98201,6 +98249,7 @@ var Config = class Config2 {
|
|
|
98201
98249
|
if (!isExtendedRef(extension)) continue;
|
|
98202
98250
|
if (slug2 !== void 0 && sourceOf2(extension) !== slug2) continue;
|
|
98203
98251
|
if (only === void 0 && sourceOf2(extension) === void 0) continue;
|
|
98252
|
+
if (keepPointers && this.resolveRef({ __ref: extension.__ref })) continue;
|
|
98204
98253
|
const resolved = this.resolveExtension({
|
|
98205
98254
|
kind,
|
|
98206
98255
|
path: path2,
|
|
@@ -99957,9 +100006,10 @@ var Config = class Config2 {
|
|
|
99957
100006
|
const path2 = pathOf2(target2);
|
|
99958
100007
|
const entity = source.resolve(kind, path2);
|
|
99959
100008
|
if (!entity) continue;
|
|
100009
|
+
const pointer = source.borrowedFrom(kind, path2) === void 0 ? void 0 : source.storedBody(kind, path2);
|
|
99960
100010
|
kinds.add(kind);
|
|
99961
100011
|
items[kind] ??= {};
|
|
99962
|
-
items[kind][path2] = entity.toJSON();
|
|
100012
|
+
items[kind][path2] = pointer ?? entity.toJSON();
|
|
99963
100013
|
}
|
|
99964
100014
|
const settings = source.resolve("settings", "settings");
|
|
99965
100015
|
if (settings && source.ownedKinds().includes("settings")) {
|