@lemonmade/ucp-schema 0.0.0-preview-20260123174501 → 0.0.0-preview-20260125155159
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/CHANGELOG.md +8 -2
- package/build/esm/compose.mjs +3 -3
- package/build/esnext/compose.esnext +3 -3
- package/package.json +1 -1
- package/source/compose.ts +3 -3
- package/source/types.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
# @lemonmade/ucp-schema
|
|
2
2
|
|
|
3
|
-
## 0.0.0-preview-
|
|
3
|
+
## 0.0.0-preview-20260125155159
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- Use 'get' instead of 'read' for base UCP schema
|
|
8
|
+
|
|
9
|
+
## 0.1.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`8e9a962`](https://github.com/lemonmade/nursery/commit/8e9a962c831a9d812b9581cfb9bc6f1afcc81c3f) Thanks [@lemonmade](https://github.com/lemonmade)! - Use 'get' instead of 'read' for base UCP schema
|
|
8
14
|
|
|
9
15
|
## 0.1.1
|
|
10
16
|
|
package/build/esm/compose.mjs
CHANGED
|
@@ -102,7 +102,7 @@ class UcpSchemaComposer {
|
|
|
102
102
|
* @returns An iterator of schema URL and composed schema pairs
|
|
103
103
|
*/
|
|
104
104
|
entries({
|
|
105
|
-
operation = '
|
|
105
|
+
operation = 'get'
|
|
106
106
|
} = {}) {
|
|
107
107
|
return this.#schemaMapForOperation(operation).entries();
|
|
108
108
|
}
|
|
@@ -112,7 +112,7 @@ class UcpSchemaComposer {
|
|
|
112
112
|
* Used by UcpSchemaComposerFile.
|
|
113
113
|
*/
|
|
114
114
|
composedSchema(schema, {
|
|
115
|
-
operation = '
|
|
115
|
+
operation = 'get'
|
|
116
116
|
} = {}) {
|
|
117
117
|
return this.#schemaMapForOperation(operation).get(schema);
|
|
118
118
|
}
|
|
@@ -273,7 +273,7 @@ function processSchemaUcpMetadata(schema, operation) {
|
|
|
273
273
|
if (value.ucp_request == null) continue;
|
|
274
274
|
const ucpRequest = typeof value.ucp_request === 'string' ? value.ucp_request : value.ucp_request[operation];
|
|
275
275
|
delete value.ucp_request;
|
|
276
|
-
if (operation === '
|
|
276
|
+
if (operation === 'get') continue;
|
|
277
277
|
switch (ucpRequest) {
|
|
278
278
|
case 'omit':
|
|
279
279
|
delete schema.properties[key];
|
|
@@ -64,14 +64,14 @@ class UcpSchemaComposer {
|
|
|
64
64
|
* @param options.operation - The operation context
|
|
65
65
|
* @returns An iterator of schema URL and composed schema pairs
|
|
66
66
|
*/
|
|
67
|
-
entries({ operation = "
|
|
67
|
+
entries({ operation = "get" } = {}) {
|
|
68
68
|
return this.#schemaMapForOperation(operation).entries();
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
71
|
* Internal method to get the composed schema directly.
|
|
72
72
|
* Used by UcpSchemaComposerFile.
|
|
73
73
|
*/
|
|
74
|
-
composedSchema(schema, { operation = "
|
|
74
|
+
composedSchema(schema, { operation = "get" } = {}) {
|
|
75
75
|
return this.#schemaMapForOperation(operation).get(schema);
|
|
76
76
|
}
|
|
77
77
|
#schemaMapForOperation(operation) {
|
|
@@ -194,7 +194,7 @@ function processSchemaUcpMetadata(schema, operation) {
|
|
|
194
194
|
if (value.ucp_request == null) continue;
|
|
195
195
|
const ucpRequest = typeof value.ucp_request === "string" ? value.ucp_request : value.ucp_request[operation];
|
|
196
196
|
delete value.ucp_request;
|
|
197
|
-
if (operation === "
|
|
197
|
+
if (operation === "get") continue;
|
|
198
198
|
switch (ucpRequest) {
|
|
199
199
|
case "omit":
|
|
200
200
|
delete schema.properties[key];
|
package/package.json
CHANGED
package/source/compose.ts
CHANGED
|
@@ -153,7 +153,7 @@ export class UcpSchemaComposer {
|
|
|
153
153
|
* @param options.operation - The operation context
|
|
154
154
|
* @returns An iterator of schema URL and composed schema pairs
|
|
155
155
|
*/
|
|
156
|
-
entries({operation = '
|
|
156
|
+
entries({operation = 'get'}: {operation?: UcpOperation} = {}) {
|
|
157
157
|
return this.#schemaMapForOperation(operation).entries();
|
|
158
158
|
}
|
|
159
159
|
|
|
@@ -163,7 +163,7 @@ export class UcpSchemaComposer {
|
|
|
163
163
|
*/
|
|
164
164
|
composedSchema(
|
|
165
165
|
schema: string,
|
|
166
|
-
{operation = '
|
|
166
|
+
{operation = 'get'}: {operation?: UcpOperation} = {},
|
|
167
167
|
): UcpProfileJsonSchema | undefined {
|
|
168
168
|
return this.#schemaMapForOperation(operation).get(schema);
|
|
169
169
|
}
|
|
@@ -350,7 +350,7 @@ function processSchemaUcpMetadata(
|
|
|
350
350
|
: value.ucp_request[operation];
|
|
351
351
|
delete value.ucp_request;
|
|
352
352
|
|
|
353
|
-
if (operation === '
|
|
353
|
+
if (operation === 'get') continue;
|
|
354
354
|
|
|
355
355
|
switch (ucpRequest) {
|
|
356
356
|
case 'omit':
|