@platforma-sdk/block-tools 2.6.70 → 2.7.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.
@@ -4,11 +4,11 @@ export declare function BlockPackMetaDescription(root: string): z.ZodObject<{
4
4
  title: z.ZodString;
5
5
  description: z.ZodString;
6
6
  longDescription: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, {
7
- type: "relative";
8
- path: string;
9
- } | {
10
7
  type: "explicit-string";
11
8
  content: string;
9
+ } | {
10
+ type: "relative";
11
+ path: string;
12
12
  }, string>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
13
13
  type: z.ZodLiteral<"explicit-string">;
14
14
  content: z.ZodString;
@@ -59,11 +59,11 @@ export declare function BlockPackMetaDescription(root: string): z.ZodObject<{
59
59
  file: string;
60
60
  }>>;
61
61
  changelog: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, {
62
- type: "relative";
63
- path: string;
64
- } | {
65
62
  type: "explicit-string";
66
63
  content: string;
64
+ } | {
65
+ type: "relative";
66
+ path: string;
67
67
  }, string>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
68
68
  type: z.ZodLiteral<"explicit-string">;
69
69
  content: z.ZodString;
@@ -114,12 +114,12 @@ export declare function BlockPackMetaDescription(root: string): z.ZodObject<{
114
114
  file: string;
115
115
  }>>;
116
116
  logo: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, {
117
- type: "relative";
118
- path: string;
119
- } | {
120
117
  type: "explicit-base64";
121
118
  mimeType: string;
122
119
  content: string;
120
+ } | {
121
+ type: "relative";
122
+ path: string;
123
123
  }, string>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
124
124
  type: z.ZodLiteral<"explicit-base64">;
125
125
  mimeType: z.ZodString;
@@ -183,12 +183,12 @@ export declare function BlockPackMetaDescription(root: string): z.ZodObject<{
183
183
  name: z.ZodString;
184
184
  url: z.ZodString;
185
185
  logo: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, {
186
- type: "relative";
187
- path: string;
188
- } | {
189
186
  type: "explicit-base64";
190
187
  mimeType: string;
191
188
  content: string;
189
+ } | {
190
+ type: "relative";
191
+ path: string;
192
192
  }, string>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
193
193
  type: z.ZodLiteral<"explicit-base64">;
194
194
  mimeType: z.ZodString;
@@ -248,12 +248,12 @@ export declare function BlockPackMetaDescription(root: string): z.ZodObject<{
248
248
  name: z.ZodString;
249
249
  url: z.ZodString;
250
250
  logo: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, {
251
- type: "relative";
252
- path: string;
253
- } | {
254
251
  type: "explicit-base64";
255
252
  mimeType: string;
256
253
  content: string;
254
+ } | {
255
+ type: "relative";
256
+ path: string;
257
257
  }, string>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
258
258
  type: z.ZodLiteral<"explicit-base64">;
259
259
  mimeType: z.ZodString;
@@ -313,12 +313,12 @@ export declare function BlockPackMetaDescription(root: string): z.ZodObject<{
313
313
  name: z.ZodString;
314
314
  url: z.ZodString;
315
315
  logo: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, {
316
- type: "relative";
317
- path: string;
318
- } | {
319
316
  type: "explicit-base64";
320
317
  mimeType: string;
321
318
  content: string;
319
+ } | {
320
+ type: "relative";
321
+ path: string;
322
322
  }, string>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
323
323
  type: z.ZodLiteral<"explicit-base64">;
324
324
  mimeType: z.ZodString;
@@ -1203,7 +1203,6 @@ export declare const BlockPackMetaEmbedAbsoluteBase64: z.ZodPipeline<z.ZodObject
1203
1203
  };
1204
1204
  title: string;
1205
1205
  description: string;
1206
- url?: string | undefined;
1207
1206
  longDescription?: string | undefined;
1208
1207
  changelog?: string | undefined;
1209
1208
  logo?: {
@@ -1211,6 +1210,7 @@ export declare const BlockPackMetaEmbedAbsoluteBase64: z.ZodPipeline<z.ZodObject
1211
1210
  mimeType: string;
1212
1211
  content: string;
1213
1212
  } | undefined;
1213
+ url?: string | undefined;
1214
1214
  docs?: string | undefined;
1215
1215
  support?: string | undefined;
1216
1216
  tags?: string[] | undefined;
@@ -1232,7 +1232,6 @@ export declare const BlockPackMetaEmbedAbsoluteBase64: z.ZodPipeline<z.ZodObject
1232
1232
  };
1233
1233
  title: string;
1234
1234
  description: string;
1235
- url?: string | undefined;
1236
1235
  longDescription?: string | undefined;
1237
1236
  changelog?: string | undefined;
1238
1237
  logo?: {
@@ -1240,6 +1239,7 @@ export declare const BlockPackMetaEmbedAbsoluteBase64: z.ZodPipeline<z.ZodObject
1240
1239
  mimeType: string;
1241
1240
  content: string;
1242
1241
  } | undefined;
1242
+ url?: string | undefined;
1243
1243
  docs?: string | undefined;
1244
1244
  support?: string | undefined;
1245
1245
  tags?: string[] | undefined;
@@ -1616,7 +1616,6 @@ export declare const BlockPackMetaEmbedAbsoluteBytes: z.ZodPipeline<z.ZodObject<
1616
1616
  };
1617
1617
  title: string;
1618
1618
  description: string;
1619
- url?: string | undefined;
1620
1619
  longDescription?: string | undefined;
1621
1620
  changelog?: string | undefined;
1622
1621
  logo?: {
@@ -1624,6 +1623,7 @@ export declare const BlockPackMetaEmbedAbsoluteBytes: z.ZodPipeline<z.ZodObject<
1624
1623
  mimeType: string;
1625
1624
  content: Uint8Array<ArrayBuffer>;
1626
1625
  } | undefined;
1626
+ url?: string | undefined;
1627
1627
  docs?: string | undefined;
1628
1628
  support?: string | undefined;
1629
1629
  tags?: string[] | undefined;
@@ -1645,7 +1645,6 @@ export declare const BlockPackMetaEmbedAbsoluteBytes: z.ZodPipeline<z.ZodObject<
1645
1645
  };
1646
1646
  title: string;
1647
1647
  description: string;
1648
- url?: string | undefined;
1649
1648
  longDescription?: string | undefined;
1650
1649
  changelog?: string | undefined;
1651
1650
  logo?: {
@@ -1653,6 +1652,7 @@ export declare const BlockPackMetaEmbedAbsoluteBytes: z.ZodPipeline<z.ZodObject<
1653
1652
  mimeType: string;
1654
1653
  content: Uint8Array<ArrayBuffer>;
1655
1654
  } | undefined;
1655
+ url?: string | undefined;
1656
1656
  docs?: string | undefined;
1657
1657
  support?: string | undefined;
1658
1658
  tags?: string[] | undefined;
@@ -2029,7 +2029,6 @@ export declare function BlockPackMetaEmbedBytes(reader: RelativeContentReader):
2029
2029
  };
2030
2030
  title: string;
2031
2031
  description: string;
2032
- url?: string | undefined;
2033
2032
  longDescription?: string | undefined;
2034
2033
  changelog?: string | undefined;
2035
2034
  logo?: {
@@ -2037,6 +2036,7 @@ export declare function BlockPackMetaEmbedBytes(reader: RelativeContentReader):
2037
2036
  mimeType: string;
2038
2037
  content: Uint8Array<ArrayBuffer>;
2039
2038
  } | undefined;
2039
+ url?: string | undefined;
2040
2040
  docs?: string | undefined;
2041
2041
  support?: string | undefined;
2042
2042
  tags?: string[] | undefined;
@@ -2058,7 +2058,6 @@ export declare function BlockPackMetaEmbedBytes(reader: RelativeContentReader):
2058
2058
  };
2059
2059
  title: string;
2060
2060
  description: string;
2061
- url?: string | undefined;
2062
2061
  longDescription?: string | undefined;
2063
2062
  changelog?: string | undefined;
2064
2063
  logo?: {
@@ -2066,6 +2065,7 @@ export declare function BlockPackMetaEmbedBytes(reader: RelativeContentReader):
2066
2065
  mimeType: string;
2067
2066
  content: Uint8Array<ArrayBuffer>;
2068
2067
  } | undefined;
2068
+ url?: string | undefined;
2069
2069
  docs?: string | undefined;
2070
2070
  support?: string | undefined;
2071
2071
  tags?: string[] | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-sdk/block-tools",
3
- "version": "2.6.70",
3
+ "version": "2.7.0",
4
4
  "description": "Utility to manipulate Platforma Blocks and Block Registry",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {
@@ -32,13 +32,13 @@
32
32
  "undici": "~7.16.0",
33
33
  "yaml": "^2.8.0",
34
34
  "zod": "~3.23.8",
35
- "@milaboratories/pl-model-common": "1.26.1",
36
- "@milaboratories/pl-model-middle-layer": "1.13.1",
37
- "@milaboratories/resolve-helper": "1.1.3",
38
35
  "@milaboratories/pl-http": "1.2.4",
36
+ "@milaboratories/resolve-helper": "1.1.3",
39
37
  "@milaboratories/ts-helpers": "1.7.3",
40
- "@milaboratories/ts-helpers-oclif": "1.1.38",
41
- "@platforma-sdk/blocks-deps-updater": "2.1.0"
38
+ "@milaboratories/pl-model-middle-layer": "1.14.0",
39
+ "@milaboratories/pl-model-common": "1.27.0",
40
+ "@platforma-sdk/blocks-deps-updater": "2.2.0",
41
+ "@milaboratories/ts-helpers-oclif": "1.1.38"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@rollup/plugin-node-resolve": "^16.0.1",
@@ -105,32 +105,27 @@ export function GlobalOverviewEntry<const Description extends z.ZodTypeAny>(
105
105
  .default({}),
106
106
  })
107
107
  .passthrough();
108
- return (
109
- universalSchema
110
- .transform((o) => {
111
- if (o.allVersionsWithChannels) return o;
112
- else
113
- return {
108
+ return universalSchema
109
+ .transform((o) => {
110
+ if (o.allVersionsWithChannels) return o;
111
+ else
112
+ return {
113
+ ...o,
114
+ allVersionsWithChannels: o.allVersions!.map((v) => ({ version: v, channels: [] })),
115
+ };
116
+ })
117
+ .transform((o) =>
118
+ o.latestByChannel[AnyChannel]
119
+ ? o
120
+ : {
114
121
  ...o,
115
- allVersionsWithChannels: o.allVersions!.map((v) => ({ version: v, channels: [] })),
116
- };
117
- })
118
- /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */
119
- // make sure "any" channel set from main body
120
- .transform((o: any) =>
121
- o.latestByChannel[AnyChannel]
122
- ? o
123
- : {
124
- ...o,
125
- latestByChannel: {
126
- ...o.latestByChannel,
127
- [AnyChannel]: { description: o.latest!, manifestSha256: o.latestManifestSha256! },
128
- },
122
+ latestByChannel: {
123
+ ...o.latestByChannel,
124
+ [AnyChannel]: { description: o.latest!, manifestSha256: o.latestManifestSha256! },
129
125
  },
130
- )
131
- /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */
132
- .pipe(universalSchema.required({ allVersionsWithChannels: true }))
133
- );
126
+ },
127
+ )
128
+ .pipe(universalSchema.required({ allVersionsWithChannels: true }));
134
129
  }
135
130
  export const GlobalOverviewEntryReg = GlobalOverviewEntry(BlockPackDescriptionManifest);
136
131
  export type GlobalOverviewEntryReg = z.infer<typeof GlobalOverviewEntryReg>;