@platforma-sdk/block-tools 2.6.70 → 2.7.1

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;
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.1",
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",
39
- "@milaboratories/ts-helpers": "1.7.3",
36
+ "@milaboratories/pl-model-middle-layer": "1.15.0",
40
37
  "@milaboratories/ts-helpers-oclif": "1.1.38",
41
- "@platforma-sdk/blocks-deps-updater": "2.1.0"
38
+ "@milaboratories/pl-model-common": "1.28.0",
39
+ "@milaboratories/resolve-helper": "1.1.3",
40
+ "@platforma-sdk/blocks-deps-updater": "2.2.0",
41
+ "@milaboratories/ts-helpers": "1.7.3"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@rollup/plugin-node-resolve": "^16.0.1",
@@ -53,8 +53,8 @@
53
53
  "vite": "8.0.0-beta.15",
54
54
  "vite-plugin-dts": "^4.5.3",
55
55
  "vitest": "^4.0.18",
56
- "@milaboratories/build-configs": "1.5.2",
57
56
  "@milaboratories/oclif-index": "1.1.1",
57
+ "@milaboratories/build-configs": "1.5.2",
58
58
  "@milaboratories/ts-builder": "1.3.0",
59
59
  "@milaboratories/ts-configs": "1.2.2"
60
60
  },
@@ -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>;