@platforma-sdk/block-tools 2.1.5 → 2.1.7

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.
Files changed (100) hide show
  1. package/dist/cli.js +1 -756
  2. package/dist/cli.js.map +1 -1
  3. package/dist/cli.mjs +187 -0
  4. package/dist/cli.mjs.map +1 -0
  5. package/dist/cmd/build-meta.d.ts +10 -0
  6. package/dist/cmd/build-meta.d.ts.map +1 -0
  7. package/dist/cmd/build-model.d.ts +11 -0
  8. package/dist/cmd/build-model.d.ts.map +1 -0
  9. package/dist/cmd/index.d.ts +11 -0
  10. package/dist/cmd/index.d.ts.map +1 -0
  11. package/dist/cmd/pack-block.d.ts +10 -0
  12. package/dist/cmd/pack-block.d.ts.map +1 -0
  13. package/dist/cmd/upload-package-v1.d.ts +15 -0
  14. package/dist/cmd/upload-package-v1.d.ts.map +1 -0
  15. package/dist/common_types.d.ts +3 -0
  16. package/dist/common_types.d.ts.map +1 -0
  17. package/dist/config-BJognM_j.mjs +536 -0
  18. package/dist/config-BJognM_j.mjs.map +1 -0
  19. package/dist/config-CfA0Dj6h.js +3 -0
  20. package/dist/config-CfA0Dj6h.js.map +1 -0
  21. package/dist/index.js +2 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/index.mjs +43 -0
  24. package/dist/index.mjs.map +1 -0
  25. package/dist/lib/storage.d.ts +29 -0
  26. package/dist/lib/storage.d.ts.map +1 -0
  27. package/dist/lib.d.ts +3 -2637
  28. package/dist/lib.d.ts.map +1 -0
  29. package/dist/registry_v1/config.d.ts +12 -0
  30. package/dist/registry_v1/config.d.ts.map +1 -0
  31. package/dist/registry_v1/config_schema.d.ts +94 -0
  32. package/dist/registry_v1/config_schema.d.ts.map +1 -0
  33. package/dist/registry_v1/flags.d.ts +9 -0
  34. package/dist/registry_v1/flags.d.ts.map +1 -0
  35. package/dist/registry_v1/index.d.ts +4 -0
  36. package/dist/registry_v1/index.d.ts.map +1 -0
  37. package/dist/registry_v1/registry.d.ts +46 -0
  38. package/dist/registry_v1/registry.d.ts.map +1 -0
  39. package/dist/registry_v1/v1_repo_schema.d.ts +25 -0
  40. package/dist/registry_v1/v1_repo_schema.d.ts.map +1 -0
  41. package/dist/util.d.ts +4 -0
  42. package/dist/util.d.ts.map +1 -0
  43. package/dist/v2/build_dist.d.ts +3 -0
  44. package/dist/v2/build_dist.d.ts.map +1 -0
  45. package/dist/v2/index.d.ts +4 -0
  46. package/dist/v2/index.d.ts.map +1 -0
  47. package/dist/v2/model/block_components.d.ts +384 -0
  48. package/dist/v2/model/block_components.d.ts.map +1 -0
  49. package/dist/v2/model/common.d.ts +3 -0
  50. package/dist/v2/model/common.d.ts.map +1 -0
  51. package/dist/v2/model/content_conversion.d.ts +35 -0
  52. package/dist/v2/model/content_conversion.d.ts.map +1 -0
  53. package/dist/v2/model/content_types.d.ts +478 -0
  54. package/dist/v2/model/content_types.d.ts.map +1 -0
  55. package/dist/{lib.d.cts → v2/model/index.d.ts} +449 -1005
  56. package/dist/v2/model/index.d.ts.map +1 -0
  57. package/dist/v2/model/meta.d.ts +805 -0
  58. package/dist/v2/model/meta.d.ts.map +1 -0
  59. package/dist/v2/registry/schema.d.ts +15 -0
  60. package/dist/v2/registry/schema.d.ts.map +1 -0
  61. package/dist/v2/source_package.d.ts +8 -0
  62. package/dist/v2/source_package.d.ts.map +1 -0
  63. package/package.json +24 -17
  64. package/src/cmd/build-meta.ts +38 -0
  65. package/src/cmd/build-model.ts +76 -0
  66. package/src/cmd/index.ts +12 -0
  67. package/src/cmd/pack-block.ts +32 -0
  68. package/src/cmd/upload-package-v1.ts +105 -0
  69. package/src/common_types.ts +3 -0
  70. package/src/lib/storage.test.ts +91 -0
  71. package/src/lib/storage.ts +140 -0
  72. package/src/lib.ts +2 -0
  73. package/src/registry_v1/config.ts +90 -0
  74. package/src/registry_v1/config_schema.ts +30 -0
  75. package/src/registry_v1/flags.ts +23 -0
  76. package/src/registry_v1/index.ts +3 -0
  77. package/src/registry_v1/registry.test.ts +122 -0
  78. package/src/registry_v1/registry.ts +253 -0
  79. package/src/registry_v1/v1_repo_schema.ts +42 -0
  80. package/src/util.ts +25 -0
  81. package/src/v2/build_dist.test.ts +16 -0
  82. package/src/v2/build_dist.ts +29 -0
  83. package/src/v2/index.ts +3 -0
  84. package/src/v2/model/block_components.ts +32 -0
  85. package/src/v2/model/common.ts +2 -0
  86. package/src/v2/model/content_conversion.ts +178 -0
  87. package/src/v2/model/content_types.ts +233 -0
  88. package/src/v2/model/index.ts +46 -0
  89. package/src/v2/model/meta.ts +36 -0
  90. package/src/v2/registry/schema.ts +29 -0
  91. package/src/v2/source_package.test.ts +27 -0
  92. package/src/v2/source_package.ts +82 -0
  93. package/dist/cli.cjs +0 -786
  94. package/dist/cli.cjs.map +0 -1
  95. package/dist/cli.d.cts +0 -58
  96. package/dist/cli.d.ts +0 -58
  97. package/dist/lib.cjs +0 -629
  98. package/dist/lib.cjs.map +0 -1
  99. package/dist/lib.js +0 -577
  100. package/dist/lib.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,cAAc,MAAM,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { PlRegFullPackageConfigData, PlRegPackageConfigDataShard } from './config_schema';
2
+ import { BlockRegistry } from './registry';
3
+ import { FullBlockPackageName } from './v1_repo_schema';
4
+ import { MiLogger } from '@milaboratories/ts-helpers';
5
+ export declare class PlRegPackageConfig {
6
+ readonly conf: PlRegFullPackageConfigData;
7
+ constructor(conf: PlRegFullPackageConfigData);
8
+ createRegistry(logger?: MiLogger): BlockRegistry;
9
+ get fullPackageName(): FullBlockPackageName;
10
+ }
11
+ export declare function getConfig(finalShard: PlRegPackageConfigDataShard): Promise<PlRegPackageConfig>;
12
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/registry_v1/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAkDtD,qBAAa,kBAAkB;aACD,IAAI,EAAE,0BAA0B;gBAAhC,IAAI,EAAE,0BAA0B;IAE5D,cAAc,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,aAAa;IAUhD,IAAI,eAAe,IAAI,oBAAoB,CAM1C;CACF;AAED,wBAAsB,SAAS,CAAC,UAAU,EAAE,2BAA2B,+BAKtE"}
@@ -0,0 +1,94 @@
1
+ import { z } from 'zod';
2
+ export declare const PlPackageConfigData: z.ZodObject<{
3
+ organization: z.ZodString;
4
+ package: z.ZodString;
5
+ version: z.ZodOptional<z.ZodString>;
6
+ files: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
7
+ meta: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ organization: string;
10
+ meta: {} & {
11
+ [k: string]: unknown;
12
+ };
13
+ files: Record<string, string>;
14
+ package: string;
15
+ version?: string | undefined;
16
+ }, {
17
+ organization: string;
18
+ meta: {} & {
19
+ [k: string]: unknown;
20
+ };
21
+ package: string;
22
+ files?: Record<string, string> | undefined;
23
+ version?: string | undefined;
24
+ }>;
25
+ export declare const PlRegCommonConfigData: z.ZodObject<{
26
+ registries: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
27
+ registry: z.ZodOptional<z.ZodString>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ registries: Record<string, string>;
30
+ registry?: string | undefined;
31
+ }, {
32
+ registries?: Record<string, string> | undefined;
33
+ registry?: string | undefined;
34
+ }>;
35
+ export type PlRegCommonConfigData = z.infer<typeof PlRegCommonConfigData>;
36
+ export declare const PlRegFullPackageConfigData: z.ZodObject<{
37
+ organization: z.ZodString;
38
+ meta: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
39
+ files: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
40
+ version: z.ZodString;
41
+ package: z.ZodString;
42
+ registries: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
43
+ registry: z.ZodString;
44
+ }, "strip", z.ZodTypeAny, {
45
+ organization: string;
46
+ meta: {} & {
47
+ [k: string]: unknown;
48
+ };
49
+ files: Record<string, string>;
50
+ version: string;
51
+ package: string;
52
+ registries: Record<string, string>;
53
+ registry: string;
54
+ }, {
55
+ organization: string;
56
+ meta: {} & {
57
+ [k: string]: unknown;
58
+ };
59
+ version: string;
60
+ package: string;
61
+ registry: string;
62
+ files?: Record<string, string> | undefined;
63
+ registries?: Record<string, string> | undefined;
64
+ }>;
65
+ export type PlRegFullPackageConfigData = z.infer<typeof PlRegFullPackageConfigData>;
66
+ export declare const PlRegPackageConfigDataShard: z.ZodObject<{
67
+ organization: z.ZodOptional<z.ZodString>;
68
+ meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
69
+ files: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
70
+ version: z.ZodOptional<z.ZodString>;
71
+ package: z.ZodOptional<z.ZodString>;
72
+ registries: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
73
+ registry: z.ZodOptional<z.ZodString>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ files: Record<string, string>;
76
+ registries: Record<string, string>;
77
+ organization?: string | undefined;
78
+ meta?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
79
+ version?: string | undefined;
80
+ package?: string | undefined;
81
+ registry?: string | undefined;
82
+ }, {
83
+ organization?: string | undefined;
84
+ meta?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
85
+ files?: Record<string, string> | undefined;
86
+ version?: string | undefined;
87
+ package?: string | undefined;
88
+ registries?: Record<string, string> | undefined;
89
+ registry?: string | undefined;
90
+ }>;
91
+ export type PlRegPackageConfigDataShard = z.infer<typeof PlRegPackageConfigDataShard>;
92
+ export declare const PlPackageJsonConfigFile = "pl.package.json";
93
+ export declare const PlPackageYamlConfigFile = "pl.package.yaml";
94
+ //# sourceMappingURL=config_schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config_schema.d.ts","sourceRoot":"","sources":["../../src/registry_v1/config_schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;EAM9B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;EAGhC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEtC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AACpF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;EAGtC,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEtF,eAAO,MAAM,uBAAuB,oBAAoB,CAAC;AACzD,eAAO,MAAM,uBAAuB,oBAAoB,CAAC"}
@@ -0,0 +1,9 @@
1
+ export interface TargetFile {
2
+ src: string;
3
+ destName: string;
4
+ }
5
+ export declare const targetFile: import('@oclif/core/interfaces').FlagDefinition<TargetFile, import('@oclif/core/interfaces').CustomOptions, {
6
+ multiple: false;
7
+ requiredOrDefaulted: false;
8
+ }>;
9
+ //# sourceMappingURL=flags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../../src/registry_v1/flags.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAYD,eAAO,MAAM,UAAU;;;EAIrB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './v1_repo_schema';
2
+ export * from './config_schema';
3
+ export { PlRegPackageConfig } from './config';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registry_v1/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { RegistryStorage } from '../lib/storage';
2
+ import { BlockPackageNameWithoutVersion, FullBlockPackageName, GlobalOverview, PackageOverview } from './v1_repo_schema';
3
+ import { MiLogger } from '@milaboratories/ts-helpers';
4
+ /**
5
+ * Layout:
6
+ *
7
+ * _updates_v1/per_package/
8
+ * organisationA/package1/1.2.3/seedABC <-- Tells that change happened for organisationA/package1 version 1.2.3, and reassembly of package1 overview is required
9
+ * organisationA/package1/1.2.3/seedCDE
10
+ * organisationB/package2/1.4.3/seedFGH
11
+ *
12
+ * _updates_v1/_global_update_in <-- Anybody who changes contents writes a random seed in this file
13
+ * _updates_v1/_global_update_out <-- Update process writes update seed from the _global_update_in here after successful update.
14
+ * Mismatch between contents of those files is a sign that another update should be performed.
15
+ *
16
+ * v1/ <-- Actual block packages content
17
+ * organisationA/package2/1.2.3/meta.json
18
+ * organisationA/package2/1.2.3/main.template.plj.gz
19
+ * organisationA/package2/1.2.3/...
20
+ * organisationA/package2/overview.json <-- Per-package aggregated meta-data over all available versions
21
+ * ...
22
+ *
23
+ * v1/overview.json <-- aggregated information about all packages
24
+ *
25
+ */
26
+ export declare class BlockRegistry {
27
+ private readonly storage;
28
+ private readonly logger?;
29
+ constructor(storage: RegistryStorage, logger?: MiLogger | undefined);
30
+ constructNewPackage(pack: FullBlockPackageName): BlockRegistryPackConstructor;
31
+ private updateRegistry;
32
+ updateIfNeeded(force?: boolean): Promise<void>;
33
+ getPackageOverview(name: BlockPackageNameWithoutVersion): Promise<undefined | PackageOverview>;
34
+ getGlobalOverview(): Promise<undefined | GlobalOverview>;
35
+ }
36
+ export declare class BlockRegistryPackConstructor {
37
+ private readonly storage;
38
+ readonly name: FullBlockPackageName;
39
+ private metaAdded;
40
+ readonly seed: `${string}-${string}-${string}-${string}-${string}`;
41
+ constructor(storage: RegistryStorage, name: FullBlockPackageName);
42
+ addFile(file: string, content: Buffer): Promise<void>;
43
+ writeMeta(meta: object): Promise<void>;
44
+ finish(): Promise<void>;
45
+ }
46
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/registry_v1/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,EACL,8BAA8B,EAC9B,oBAAoB,EACpB,cAAc,EAGd,eAAe,EAGhB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAyCtD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,aAAa;IAEtB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;gBADP,OAAO,EAAE,eAAe,EACxB,MAAM,CAAC,EAAE,QAAQ,YAAA;IAGpC,mBAAmB,CAAC,IAAI,EAAE,oBAAoB,GAAG,4BAA4B;YAI/D,cAAc;IAoGtB,cAAc,CAAC,KAAK,GAAE,OAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAuBrD,kBAAkB,CACtB,IAAI,EAAE,8BAA8B,GACnC,OAAO,CAAC,SAAS,GAAG,eAAe,CAAC;IAMjC,iBAAiB,IAAI,OAAO,CAAC,SAAS,GAAG,cAAc,CAAC;CAK/D;AAED,qBAAa,4BAA4B;IAKrC,OAAO,CAAC,QAAQ,CAAC,OAAO;aACR,IAAI,EAAE,oBAAoB;IAL5C,OAAO,CAAC,SAAS,CAAkB;IACnC,SAAgB,IAAI,sDAAgB;gBAGjB,OAAO,EAAE,eAAe,EACzB,IAAI,EAAE,oBAAoB;IAGtC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrD,SAAS,CAAC,IAAI,EAAE,MAAM;IAKtB,MAAM;CAKb"}
@@ -0,0 +1,25 @@
1
+ export interface FullBlockPackageName {
2
+ organization: string;
3
+ package: string;
4
+ version: string;
5
+ }
6
+ export declare function packageContentPrefix(bp: FullBlockPackageName): string;
7
+ export declare function payloadFilePath(bp: FullBlockPackageName, file: string): string;
8
+ export type BlockPackageNameWithoutVersion = Pick<FullBlockPackageName, 'organization' | 'package'>;
9
+ export declare function packageOverviewPath(bp: BlockPackageNameWithoutVersion): string;
10
+ export declare const GlobalOverviewPath = "v1/overview.json";
11
+ export declare const MetaFile = "meta.json";
12
+ export interface PackageOverviewEntry {
13
+ version: string;
14
+ meta: object;
15
+ }
16
+ export type PackageOverview = PackageOverviewEntry[];
17
+ export interface GlobalOverviewEntry {
18
+ organization: string;
19
+ package: string;
20
+ allVersions: string[];
21
+ latestVersion: string;
22
+ latestMeta: object;
23
+ }
24
+ export type GlobalOverview = GlobalOverviewEntry[];
25
+ //# sourceMappingURL=v1_repo_schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v1_repo_schema.d.ts","sourceRoot":"","sources":["../../src/registry_v1/v1_repo_schema.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,oBAAoB,GAAG,MAAM,CAErE;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9E;AAED,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAAC,oBAAoB,EAAE,cAAc,GAAG,SAAS,CAAC,CAAC;AAEpG,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,8BAA8B,GAAG,MAAM,CAE9E;AAED,eAAO,MAAM,kBAAkB,qBAA+B,CAAC;AAE/D,eAAO,MAAM,QAAQ,cAAc,CAAC;AAEpC,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,eAAe,GAAG,oBAAoB,EAAE,CAAC;AAErD,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,cAAc,GAAG,mBAAmB,EAAE,CAAC"}
package/dist/util.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { BigIntStats } from 'node:fs';
2
+ export declare function tryLoadFile<T>(file: string, map: (buf: Buffer) => T): Promise<T | undefined>;
3
+ export declare function tryStat(path: string): Promise<BigIntStats | undefined>;
4
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC,wBAAsB,WAAW,CAAC,CAAC,EACjC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,CAAC,GACtB,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAOxB;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAS5E"}
@@ -0,0 +1,3 @@
1
+ import { BlockPackDescriptionAbsolute, BlockPackManifest } from './model';
2
+ export declare function buildBlockPackDist(description: BlockPackDescriptionAbsolute, dst: string): Promise<BlockPackManifest>;
3
+ //# sourceMappingURL=build_dist.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build_dist.d.ts","sourceRoot":"","sources":["../../src/v2/build_dist.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAG5B,iBAAiB,EAElB,MAAM,SAAS,CAAC;AAMjB,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,4BAA4B,EACzC,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,iBAAiB,CAAC,CAa5B"}
@@ -0,0 +1,4 @@
1
+ export * from './model';
2
+ export * from './build_dist';
3
+ export * from './source_package';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v2/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,384 @@
1
+ import { z } from 'zod';
2
+ export declare function BlockComponentsDescription(moduleRoot: string): z.ZodObject<{
3
+ workflow: z.ZodEffects<z.ZodString, {
4
+ type: "absolute-file";
5
+ file: string;
6
+ }, string>;
7
+ model: z.ZodEffects<z.ZodString, {
8
+ type: "absolute-file";
9
+ file: string;
10
+ }, string>;
11
+ ui: z.ZodEffects<z.ZodString, {
12
+ type: "absolute-folder";
13
+ folder: string;
14
+ }, string>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ workflow: {
17
+ type: "absolute-file";
18
+ file: string;
19
+ };
20
+ model: {
21
+ type: "absolute-file";
22
+ file: string;
23
+ };
24
+ ui: {
25
+ type: "absolute-folder";
26
+ folder: string;
27
+ };
28
+ }, {
29
+ workflow: string;
30
+ model: string;
31
+ ui: string;
32
+ }>;
33
+ export type BlockComponentsDescription = z.infer<ReturnType<typeof BlockComponentsDescription>>;
34
+ export declare function BlockComponentsConsolidate(dstFolder: string, fileAccumulator?: string[]): z.ZodPipeline<z.ZodObject<{
35
+ workflow: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
36
+ type: z.ZodLiteral<"explicit-base64">;
37
+ mimeType: z.ZodString;
38
+ content: z.ZodString;
39
+ }, "strict", z.ZodTypeAny, {
40
+ type: "explicit-base64";
41
+ content: string;
42
+ mimeType: string;
43
+ }, {
44
+ type: "explicit-base64";
45
+ content: string;
46
+ mimeType: string;
47
+ }>, z.ZodObject<{
48
+ type: z.ZodLiteral<"absolute-file">;
49
+ file: z.ZodString;
50
+ }, "strict", z.ZodTypeAny, {
51
+ type: "absolute-file";
52
+ file: string;
53
+ }, {
54
+ type: "absolute-file";
55
+ file: string;
56
+ }>]>, {
57
+ type: "relative";
58
+ path: string;
59
+ } | {
60
+ type: "explicit-base64";
61
+ content: string;
62
+ mimeType: string;
63
+ }, {
64
+ type: "explicit-base64";
65
+ content: string;
66
+ mimeType: string;
67
+ } | {
68
+ type: "absolute-file";
69
+ file: string;
70
+ }>;
71
+ model: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
72
+ type: z.ZodLiteral<"explicit-base64">;
73
+ mimeType: z.ZodString;
74
+ content: z.ZodString;
75
+ }, "strict", z.ZodTypeAny, {
76
+ type: "explicit-base64";
77
+ content: string;
78
+ mimeType: string;
79
+ }, {
80
+ type: "explicit-base64";
81
+ content: string;
82
+ mimeType: string;
83
+ }>, z.ZodObject<{
84
+ type: z.ZodLiteral<"absolute-file">;
85
+ file: z.ZodString;
86
+ }, "strict", z.ZodTypeAny, {
87
+ type: "absolute-file";
88
+ file: string;
89
+ }, {
90
+ type: "absolute-file";
91
+ file: string;
92
+ }>]>, {
93
+ type: "relative";
94
+ path: string;
95
+ } | {
96
+ type: "explicit-base64";
97
+ content: string;
98
+ mimeType: string;
99
+ }, {
100
+ type: "explicit-base64";
101
+ content: string;
102
+ mimeType: string;
103
+ } | {
104
+ type: "absolute-file";
105
+ file: string;
106
+ }>;
107
+ ui: z.ZodEffects<z.ZodObject<{
108
+ type: z.ZodLiteral<"absolute-folder">;
109
+ folder: z.ZodString;
110
+ }, "strict", z.ZodTypeAny, {
111
+ type: "absolute-folder";
112
+ folder: string;
113
+ }, {
114
+ type: "absolute-folder";
115
+ folder: string;
116
+ }>, {
117
+ type: "relative";
118
+ path: string;
119
+ }, {
120
+ type: "absolute-folder";
121
+ folder: string;
122
+ }>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ workflow: {
125
+ type: "relative";
126
+ path: string;
127
+ } | {
128
+ type: "explicit-base64";
129
+ content: string;
130
+ mimeType: string;
131
+ };
132
+ model: {
133
+ type: "relative";
134
+ path: string;
135
+ } | {
136
+ type: "explicit-base64";
137
+ content: string;
138
+ mimeType: string;
139
+ };
140
+ ui: {
141
+ type: "relative";
142
+ path: string;
143
+ };
144
+ }, {
145
+ workflow: {
146
+ type: "explicit-base64";
147
+ content: string;
148
+ mimeType: string;
149
+ } | {
150
+ type: "absolute-file";
151
+ file: string;
152
+ };
153
+ model: {
154
+ type: "explicit-base64";
155
+ content: string;
156
+ mimeType: string;
157
+ } | {
158
+ type: "absolute-file";
159
+ file: string;
160
+ };
161
+ ui: {
162
+ type: "absolute-folder";
163
+ folder: string;
164
+ };
165
+ }>, z.ZodObject<{
166
+ workflow: z.ZodObject<{
167
+ type: z.ZodLiteral<"relative">;
168
+ path: z.ZodString;
169
+ }, "strict", z.ZodTypeAny, {
170
+ type: "relative";
171
+ path: string;
172
+ }, {
173
+ type: "relative";
174
+ path: string;
175
+ }>;
176
+ model: z.ZodObject<{
177
+ type: z.ZodLiteral<"relative">;
178
+ path: z.ZodString;
179
+ }, "strict", z.ZodTypeAny, {
180
+ type: "relative";
181
+ path: string;
182
+ }, {
183
+ type: "relative";
184
+ path: string;
185
+ }>;
186
+ ui: z.ZodObject<{
187
+ type: z.ZodLiteral<"relative">;
188
+ path: z.ZodString;
189
+ }, "strict", z.ZodTypeAny, {
190
+ type: "relative";
191
+ path: string;
192
+ }, {
193
+ type: "relative";
194
+ path: string;
195
+ }>;
196
+ }, "strip", z.ZodTypeAny, {
197
+ ui: {
198
+ type: "relative";
199
+ path: string;
200
+ };
201
+ workflow: {
202
+ type: "relative";
203
+ path: string;
204
+ };
205
+ model: {
206
+ type: "relative";
207
+ path: string;
208
+ };
209
+ }, {
210
+ ui: {
211
+ type: "relative";
212
+ path: string;
213
+ };
214
+ workflow: {
215
+ type: "relative";
216
+ path: string;
217
+ };
218
+ model: {
219
+ type: "relative";
220
+ path: string;
221
+ };
222
+ }>>;
223
+ export declare function BlockComponentsAbsoluteUrl(prefix: string): z.ZodObject<{
224
+ workflow: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
225
+ type: z.ZodLiteral<"explicit-base64">;
226
+ mimeType: z.ZodString;
227
+ content: z.ZodString;
228
+ }, "strict", z.ZodTypeAny, {
229
+ type: "explicit-base64";
230
+ content: string;
231
+ mimeType: string;
232
+ }, {
233
+ type: "explicit-base64";
234
+ content: string;
235
+ mimeType: string;
236
+ }>, z.ZodObject<{
237
+ type: z.ZodLiteral<"relative">;
238
+ path: z.ZodString;
239
+ }, "strict", z.ZodTypeAny, {
240
+ type: "relative";
241
+ path: string;
242
+ }, {
243
+ type: "relative";
244
+ path: string;
245
+ }>]>, {
246
+ type: "absolute-url";
247
+ url: string;
248
+ } | {
249
+ type: "explicit-base64";
250
+ content: string;
251
+ mimeType: string;
252
+ }, {
253
+ type: "explicit-base64";
254
+ content: string;
255
+ mimeType: string;
256
+ } | {
257
+ type: "relative";
258
+ path: string;
259
+ }>;
260
+ model: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
261
+ type: z.ZodLiteral<"explicit-base64">;
262
+ mimeType: z.ZodString;
263
+ content: z.ZodString;
264
+ }, "strict", z.ZodTypeAny, {
265
+ type: "explicit-base64";
266
+ content: string;
267
+ mimeType: string;
268
+ }, {
269
+ type: "explicit-base64";
270
+ content: string;
271
+ mimeType: string;
272
+ }>, z.ZodObject<{
273
+ type: z.ZodLiteral<"relative">;
274
+ path: z.ZodString;
275
+ }, "strict", z.ZodTypeAny, {
276
+ type: "relative";
277
+ path: string;
278
+ }, {
279
+ type: "relative";
280
+ path: string;
281
+ }>]>, {
282
+ type: "absolute-url";
283
+ url: string;
284
+ } | {
285
+ type: "explicit-base64";
286
+ content: string;
287
+ mimeType: string;
288
+ }, {
289
+ type: "explicit-base64";
290
+ content: string;
291
+ mimeType: string;
292
+ } | {
293
+ type: "relative";
294
+ path: string;
295
+ }>;
296
+ ui: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
297
+ type: z.ZodLiteral<"explicit-base64">;
298
+ mimeType: z.ZodString;
299
+ content: z.ZodString;
300
+ }, "strict", z.ZodTypeAny, {
301
+ type: "explicit-base64";
302
+ content: string;
303
+ mimeType: string;
304
+ }, {
305
+ type: "explicit-base64";
306
+ content: string;
307
+ mimeType: string;
308
+ }>, z.ZodObject<{
309
+ type: z.ZodLiteral<"relative">;
310
+ path: z.ZodString;
311
+ }, "strict", z.ZodTypeAny, {
312
+ type: "relative";
313
+ path: string;
314
+ }, {
315
+ type: "relative";
316
+ path: string;
317
+ }>]>, {
318
+ type: "absolute-url";
319
+ url: string;
320
+ } | {
321
+ type: "explicit-base64";
322
+ content: string;
323
+ mimeType: string;
324
+ }, {
325
+ type: "explicit-base64";
326
+ content: string;
327
+ mimeType: string;
328
+ } | {
329
+ type: "relative";
330
+ path: string;
331
+ }>;
332
+ }, "strip", z.ZodTypeAny, {
333
+ workflow: {
334
+ type: "absolute-url";
335
+ url: string;
336
+ } | {
337
+ type: "explicit-base64";
338
+ content: string;
339
+ mimeType: string;
340
+ };
341
+ model: {
342
+ type: "absolute-url";
343
+ url: string;
344
+ } | {
345
+ type: "explicit-base64";
346
+ content: string;
347
+ mimeType: string;
348
+ };
349
+ ui: {
350
+ type: "absolute-url";
351
+ url: string;
352
+ } | {
353
+ type: "explicit-base64";
354
+ content: string;
355
+ mimeType: string;
356
+ };
357
+ }, {
358
+ workflow: {
359
+ type: "explicit-base64";
360
+ content: string;
361
+ mimeType: string;
362
+ } | {
363
+ type: "relative";
364
+ path: string;
365
+ };
366
+ model: {
367
+ type: "explicit-base64";
368
+ content: string;
369
+ mimeType: string;
370
+ } | {
371
+ type: "relative";
372
+ path: string;
373
+ };
374
+ ui: {
375
+ type: "explicit-base64";
376
+ content: string;
377
+ mimeType: string;
378
+ } | {
379
+ type: "relative";
380
+ path: string;
381
+ };
382
+ }>;
383
+ export type BlockComponentsAbsolute = z.infer<ReturnType<typeof BlockComponentsAbsoluteUrl>>;
384
+ //# sourceMappingURL=block_components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block_components.d.ts","sourceRoot":"","sources":["../../../src/v2/model/block_components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAK5D;AACD,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC,CAAC;AAEhG,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,EAAE;;gBAc6hN,UAAU;oBAAqC,SAAS;mBAAiB,SAAS;;;;;;;;;;gBAAkN,UAAU;gBAA+B,SAAS;;;;;;;;;;;;;;;;;;;;;;;gBAAtV,UAAU;oBAAqC,SAAS;mBAAiB,SAAS;;;;;;;;;;gBAAkN,UAAU;gBAA+B,SAAS;;;;;;;;;;;;;;;;;;;;;;;gBAAtqM,UAAU;kBAAmC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAA/I,SAAS;gBAAmB,UAAU;gBAA8B,SAAS;mBAAqB,UAAU;;;;;;;aAAkI,SAAS;gBAAmB,UAAU;gBAA8B,SAAS;mBAAqB,UAAU;;;;;;;UAA+H,SAAS;gBAAmB,UAAU;gBAA8B,SAAS;mBAAqB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAThxC;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM;;gBAO22Q,UAAU;oBAAqC,SAAS;mBAAiB,SAAS;;;;;;;;;;gBAAkN,UAAU;gBAA0B,SAAS;;;;;;;;;;;;;;;;;;;;;;;gBAAjV,UAAU;oBAAqC,SAAS;mBAAiB,SAAS;;;;;;;;;;gBAAkN,UAAU;gBAA0B,SAAS;;;;;;;;;;;;;;;;;;;;;;;gBAAjV,UAAU;oBAAqC,SAAS;mBAAiB,SAAS;;;;;;;;;;gBAAkN,UAAU;gBAA0B,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAFpvR;AACD,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type ContextType = 'local' | 'remote';
2
+ export type ContentType = 'text' | 'binary';
3
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/v2/model/common.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC7C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAC"}