@milaboratories/pl-middle-layer 1.67.4 → 1.67.6

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 (75) hide show
  1. package/dist/block_registry/registry-v2-provider.d.ts +1 -3
  2. package/dist/block_registry/registry-v2-provider.d.ts.map +1 -1
  3. package/dist/block_registry/registry.d.ts +5 -9
  4. package/dist/block_registry/registry.d.ts.map +1 -1
  5. package/dist/block_registry/template_provider.d.ts +3 -5
  6. package/dist/block_registry/template_provider.d.ts.map +1 -1
  7. package/dist/block_registry/watcher.d.ts +4 -6
  8. package/dist/block_registry/watcher.d.ts.map +1 -1
  9. package/dist/block_registry/well_known_registries.d.ts +3 -5
  10. package/dist/block_registry/well_known_registries.d.ts.map +1 -1
  11. package/dist/index.d.ts +3 -0
  12. package/dist/middle_layer/driver_kit.d.ts +3 -4
  13. package/dist/middle_layer/driver_kit.d.ts.map +1 -1
  14. package/dist/middle_layer/middle_layer.d.ts +4 -4
  15. package/dist/middle_layer/middle_layer.d.ts.map +1 -1
  16. package/dist/middle_layer/ops.d.ts +37 -26
  17. package/dist/middle_layer/ops.d.ts.map +1 -1
  18. package/dist/middle_layer/project.d.ts +5 -6
  19. package/dist/middle_layer/project.d.ts.map +1 -1
  20. package/dist/middle_layer/project_list.d.ts +5 -3
  21. package/dist/middle_layer/project_list.d.ts.map +1 -1
  22. package/dist/middle_layer/sharing_list.d.ts +3 -4
  23. package/dist/middle_layer/sharing_list.d.ts.map +1 -1
  24. package/dist/middle_layer/types.d.ts +1 -3
  25. package/dist/middle_layer/types.d.ts.map +1 -1
  26. package/dist/model/block_pack_spec.d.ts +13 -15
  27. package/dist/model/block_pack_spec.d.ts.map +1 -1
  28. package/dist/model/frontend.d.ts +1 -2
  29. package/dist/model/frontend.d.ts.map +1 -1
  30. package/dist/model/project_helper.d.ts +2 -4
  31. package/dist/model/project_helper.d.ts.map +1 -1
  32. package/dist/model/project_model.d.ts +12 -12
  33. package/dist/model/project_model.d.ts.map +1 -1
  34. package/dist/model/sharing_model.d.ts +24 -26
  35. package/dist/model/sharing_model.d.ts.map +1 -1
  36. package/dist/model/template_apply.d.ts +9 -8
  37. package/dist/model/template_apply.d.ts.map +1 -1
  38. package/dist/model/template_export.d.ts +2 -2
  39. package/dist/model/template_export.d.ts.map +1 -1
  40. package/dist/model/template_parser.d.ts +2 -4
  41. package/dist/model/template_parser.d.ts.map +1 -1
  42. package/dist/model/template_resolve.d.ts +10 -11
  43. package/dist/model/template_resolve.d.ts.map +1 -1
  44. package/dist/model/template_serializer.d.ts +6 -5
  45. package/dist/model/template_serializer.d.ts.map +1 -1
  46. package/dist/model/template_spec.d.ts +7 -9
  47. package/dist/model/template_spec.d.ts.map +1 -1
  48. package/dist/mutator/block-pack/block_pack.d.ts +2 -3
  49. package/dist/mutator/block-pack/block_pack.d.ts.map +1 -1
  50. package/dist/mutator/project.cjs +20 -3
  51. package/dist/mutator/project.cjs.map +1 -1
  52. package/dist/mutator/project.d.ts +4 -3
  53. package/dist/mutator/project.d.ts.map +1 -1
  54. package/dist/mutator/project.js +20 -3
  55. package/dist/mutator/project.js.map +1 -1
  56. package/dist/mutator/template/render_template.d.ts +1 -3
  57. package/dist/mutator/template/render_template.d.ts.map +1 -1
  58. package/dist/mutator/template/template_cache.d.ts +15 -16
  59. package/dist/mutator/template/template_cache.d.ts.map +1 -1
  60. package/dist/mutator/template/template_loading.d.ts +10 -12
  61. package/dist/mutator/template/template_loading.d.ts.map +1 -1
  62. package/dist/network_check/network_check.d.ts +3 -5
  63. package/dist/network_check/network_check.d.ts.map +1 -1
  64. package/dist/pool/data.d.ts +2 -4
  65. package/dist/pool/data.d.ts.map +1 -1
  66. package/dist/pool/driver.d.ts +6 -6
  67. package/dist/pool/driver.d.ts.map +1 -1
  68. package/dist/pool/index.d.ts +1 -0
  69. package/dist/pool/p_object_collection.d.ts +1 -3
  70. package/dist/pool/p_object_collection.d.ts.map +1 -1
  71. package/dist/pool/result_pool.d.ts +3 -1
  72. package/dist/worker/worker.d.ts +1 -1
  73. package/package.json +16 -16
  74. package/src/cfg_render/executor.test.ts +42 -60
  75. package/src/mutator/project.ts +27 -5
@@ -2,31 +2,30 @@ import { CachedTemplate, ExplicitTemplate, PreparedTemplate } from "./template_s
2
2
  import { BlockConfigContainer } from "@platforma-sdk/model";
3
3
  import { BlockPackSpec } from "@milaboratories/pl-model-middle-layer";
4
4
  import { ResourceType } from "@milaboratories/pl-client";
5
-
6
5
  //#region src/model/block_pack_spec.d.ts
7
- type FrontendSpec = FrontendFromUrl | FrontendFromFolder | FrontendFromLocalTgz;
8
- interface FrontendFromUrlData {
6
+ export type FrontendSpec = FrontendFromUrl | FrontendFromFolder | FrontendFromLocalTgz;
7
+ export interface FrontendFromUrlData {
9
8
  url: string;
10
9
  }
11
- declare const FrontendFromUrlResourceType: ResourceType;
10
+ export declare const FrontendFromUrlResourceType: ResourceType;
12
11
  /** Directs user of the block pack to download the contents from the URL
13
12
  * outside the pl infrastructure. */
14
- interface FrontendFromUrl extends FrontendFromUrlData {
13
+ export interface FrontendFromUrl extends FrontendFromUrlData {
15
14
  type: "url";
16
15
  }
17
- interface FrontendFromFolderData {
16
+ export interface FrontendFromFolderData {
18
17
  path: string;
19
18
  /** HMAC signature of the path using local secret encoded as hex. */
20
19
  signature: string;
21
20
  }
22
- declare const FrontendFromFolderResourceType: ResourceType;
21
+ export declare const FrontendFromFolderResourceType: ResourceType;
23
22
  /** Directs user of the block pack to load frontend from specific local
24
23
  * folder. Signature allows to confirm that this is the same client who
25
24
  * added the resource. */
26
- interface FrontendFromFolder extends FrontendFromFolderData {
25
+ export interface FrontendFromFolder extends FrontendFromFolderData {
27
26
  type: "local";
28
27
  }
29
- interface FrontendFromLocalTgzData {
28
+ export interface FrontendFromLocalTgzData {
30
29
  /** Absolute path to a local `ui.tgz` archive. */
31
30
  path: string;
32
31
  /** Modification stamp of the source block; part of the cache key so the
@@ -35,17 +34,17 @@ interface FrontendFromLocalTgzData {
35
34
  /** HMAC signature of `path + ":" + mtime` using local secret, encoded as hex. */
36
35
  signature: string;
37
36
  }
38
- declare const FrontendFromLocalTgzResourceType: ResourceType;
37
+ export declare const FrontendFromLocalTgzResourceType: ResourceType;
39
38
  /** Directs user of the block pack to lazily unpack the frontend from a local
40
39
  * `ui.tgz` archive via the download driver — so it inherits the driver's
41
40
  * usage-tracking and space recycling (unlike `local`, which serves a folder
42
41
  * path directly). Used by the `from-pack-v2` loader for npm-consumed blocks. */
43
- interface FrontendFromLocalTgz extends FrontendFromLocalTgzData {
42
+ export interface FrontendFromLocalTgz extends FrontendFromLocalTgzData {
44
43
  type: "local-tgz";
45
44
  }
46
45
  /** Direct instructions to create block-pack from client. Currently, this
47
46
  * is the only block-pack spec that can be directly materialized. */
48
- interface BlockPackExplicit {
47
+ export interface BlockPackExplicit {
49
48
  type: "explicit";
50
49
  template: ExplicitTemplate;
51
50
  config: BlockConfigContainer;
@@ -53,7 +52,7 @@ interface BlockPackExplicit {
53
52
  source: BlockPackSpec;
54
53
  }
55
54
  /** Block-pack spec that can be materialized in pl. */
56
- type BlockPackSpecPrepared = {
55
+ export type BlockPackSpecPrepared = {
57
56
  type: "prepared";
58
57
  template: PreparedTemplate | CachedTemplate;
59
58
  config: BlockConfigContainer;
@@ -67,7 +66,6 @@ type BlockPackSpecPrepared = {
67
66
  requiredCapabilities?: string[];
68
67
  };
69
68
  /** All block-pack specs. */
70
- type BlockPackSpecAny = BlockPackSpecPrepared | BlockPackExplicit | BlockPackSpec;
69
+ export type BlockPackSpecAny = BlockPackSpecPrepared | BlockPackExplicit | BlockPackSpec;
71
70
  //#endregion
72
- export { BlockPackExplicit, BlockPackSpecAny, BlockPackSpecPrepared, FrontendFromFolder, FrontendFromFolderData, FrontendFromFolderResourceType, FrontendFromLocalTgz, FrontendFromLocalTgzData, FrontendFromLocalTgzResourceType, FrontendFromUrl, FrontendFromUrlData, FrontendFromUrlResourceType, FrontendSpec };
73
71
  //# sourceMappingURL=block_pack_spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"block_pack_spec.d.ts","names":[],"sources":["../../src/model/block_pack_spec.ts"],"mappings":";;;;;;KAKY,YAAA,GAAe,eAAA,GAAkB,kBAAA,GAAqB,oBAAA;AAAA,UAEjD,mBAAA;EACf,GAAG;AAAA;AAAA,cAGQ,2BAAA,EAA6B,YAAyD;;;UAIlF,eAAA,SAAwB,mBAAmB;EAC1D,IAAI;AAAA;AAAA,UAGW,sBAAA;EACf,IAAA;EAfgE;EAiBhE,SAAS;AAAA;AAAA,cAGE,8BAAA,EAAgC,YAG5C;;;;UAKgB,kBAAA,SAA2B,sBAAsB;EAChE,IAAI;AAAA;AAAA,UAGW,wBAAA;EA1BkF;EA4BjG,IAAA;EAxBe;;EA2Bf,KAAA;EA3BuC;EA6BvC,SAAA;AAAA;AAAA,cAGW,gCAAA,EAAkC,YAG9C;;;AA5BU;AAGX;UA+BiB,oBAAA,SAA6B,wBAAwB;EACpE,IAAI;AAAA;AA7BL;AAKD;AALC,UAkCgB,iBAAA;EACf,IAAA;EACA,QAAA,EAAU,gBAAA;EACV,MAAA,EAAQ,oBAAA;EACR,QAAA,EAAU,YAAA;EACV,MAAA,EAAQ,aAAA;AAAA;;KAIE,qBAAA;EACV,IAAA;EACA,QAAA,EAAU,gBAAA,GAAmB,cAAA;EAC7B,MAAA,EAAQ,oBAAA;EACR,QAAA,EAAU,YAAA;EACV,MAAA,EAAQ,aAAA;EA1BT;;;AAAA;AAMD;EA0BE,oBAAA;AAAA;;KAIU,gBAAA,GAAmB,qBAAA,GAAwB,iBAAA,GAAoB,aAAA"}
1
+ {"version":3,"file":"block_pack_spec.d.ts","names":[],"sources":["../../src/model/block_pack_spec.ts"],"mappings":";;;;;YAKY,eAAe,kBAAkB,qBAAqB;iBAEjD;EACf;;qBAGW,6BAA6B;;;iBAIzB,wBAAwB;EACvC;;iBAGe;EACf;;EAEA;;qBAGW,gCAAgC;;;;iBAQ5B,2BAA2B;EAC1C;;iBAGe;;EAEf;;;EAGA;;EAEA;;qBAGW,kCAAkC;;;;;iBAS9B,6BAA6B;EAC5C;;;;iBAKe;EACf;EACA,UAAU;EACV,QAAQ;EACR,UAAU;EACV,QAAQ;;;YAIE;EACV;EACA,UAAU,mBAAmB;EAC7B,QAAQ;EACR,UAAU;EACV,QAAQ;;;;;;EAMR;;;YAIU,mBAAmB,wBAAwB,oBAAoB"}
@@ -2,12 +2,11 @@
2
2
  /** Middle layer provides information about where frontend for a specific block
3
3
  * was unpacked and basic meta information about the enclosed UI
4
4
  * (i.e. SDK version). */
5
- interface FrontendData {
5
+ export interface FrontendData {
6
6
  /** URL of the frontend */
7
7
  readonly url: string;
8
8
  /** SDK version used by the UI */
9
9
  readonly sdkVersion: string;
10
10
  }
11
11
  //#endregion
12
- export { FrontendData };
13
12
  //# sourceMappingURL=frontend.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"frontend.d.ts","names":[],"sources":["../../src/model/frontend.ts"],"mappings":";;AAGA;;UAAiB,YAAA;EAEN;EAAA,SAAA,GAAA;;WAGA,UAAU;AAAA"}
1
+ {"version":3,"file":"frontend.d.ts","names":[],"sources":["../../src/model/frontend.ts"],"mappings":";;;;iBAGiB;;WAEN;;WAGA"}
@@ -4,7 +4,6 @@ import { MiLogger } from "@milaboratories/ts-helpers";
4
4
  import { StringifiedJson } from "@milaboratories/pl-model-common";
5
5
  import { SignedResourceId } from "@milaboratories/pl-client";
6
6
  import { QuickJSWASMModule } from "quickjs-emscripten";
7
-
8
7
  //#region src/model/project_helper.d.ts
9
8
  /**
10
9
  * Result of VM-based storage migration.
@@ -13,14 +12,14 @@ import { QuickJSWASMModule } from "quickjs-emscripten";
13
12
  * - Error result: { error: string } - serious failure (no context, etc.)
14
13
  * - Success result: { newStorageJson: StringifiedJson<BlockStorage>, info: string } - migration succeeded
15
14
  */
16
- type MigrationResult = {
15
+ export type MigrationResult = {
17
16
  error: string;
18
17
  } | {
19
18
  error?: undefined;
20
19
  newStorageJson: StringifiedJson<BlockStorage>;
21
20
  info: string;
22
21
  };
23
- declare class ProjectHelper {
22
+ export declare class ProjectHelper {
24
23
  private readonly quickJs;
25
24
  readonly logger: MiLogger;
26
25
  private readonly enrichmentTargetsCache;
@@ -181,5 +180,4 @@ declare class ProjectHelper {
181
180
  migrateStorageInVM(blockConfig: BlockConfig, currentStorageJson: string | undefined): MigrationResult;
182
181
  }
183
182
  //#endregion
184
- export { MigrationResult, ProjectHelper };
185
183
  //# sourceMappingURL=project_helper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"project_helper.d.ts","names":[],"sources":["../../src/model/project_helper.ts"],"mappings":";;;;;;;;;;AAgCA;;;;;KAAY,eAAA;EACN,KAAA;AAAA;EACA,KAAA;EAAmB,cAAA,EAAgB,eAAe,CAAC,YAAA;EAAe,IAAA;AAAA;AAAA,cAsB3D,aAAA;EAAA,iBAaQ,OAAA;EAAA,SACD,MAAA,EAAQ,QAAA;EAAA,iBAbT,sBAAA;cAYE,OAAA,EAAS,iBAAA,EACV,MAAA,GAAQ,QAAA;EAAA;;;;;;;;;;;EAkBnB,qBAAA,CACL,WAAA,EAAa,WAAA,EACb,WAAA,WACC,aAAA;EA8NA;;;;;;;;EA9LI,2BAAA,CAA4B,WAAA,EAAa,WAAA,EAAa,WAAA;EA4Z1D;;;;;;;;;;;;;;;;;;;;;;;;;EA3WI,+BAAA,CACL,WAAA,EAAa,WAAA,EACb,WAAA,WACC,aAAA;EAAA,QAsDK,0BAAA;EAaD,oBAAA,CACL,WAAA,QAAmB,WAAA,EACnB,IAAA,iBACA,GAAA;IAAQ,OAAA,EAAS,gBAAA;IAAkB,YAAA,EAAc,gBAAA;EAAA,IAChD,KAAA;EADO;;;;;;;;;;EAsBH,qBAAA,CAAsB,WAAA,EAAa,WAAA;EA4CxC;;;;;;;;;;;;;;;;;;;;;EADK,0BAAA,CACL,WAAA,EAAa,WAAA,EACb,MAAA,YACC,aAAA;EAiLgB;;;;;;;AA6CD;;;;;;;;;;;;;;;;;;;EAzKX,+BAAA,CACL,WAAA,EAAa,WAAA,EACb,MAAA,WACA,QAAA,EAAU,WAAA,mBACT,aAAA;;;;;;;;;;;;;;EA0EI,sBAAA,CACL,WAAA,EAAa,WAAA,EACb,kBAAA,UACA,OAAA;IAAW,SAAA;IAAmB,KAAA;EAAA;;;;;;;;;EAwCzB,uBAAA,CACL,WAAA,EAAa,WAAA,EACb,cAAA,uBACC,eAAA,CAAgB,gBAAA;;;;;;;;;;;;;;;;EA0CZ,kBAAA,CACL,WAAA,EAAa,WAAA,EACb,kBAAA,uBACC,eAAA;AAAA"}
1
+ {"version":3,"file":"project_helper.d.ts","names":[],"sources":["../../src/model/project_helper.ts"],"mappings":";;;;;;;;;;;;;;YAgCY;EACN;;EACA;EAAmB,gBAAgB,gBAAgB;EAAe;;qBAsB3D;mBAaQ;WACD,QAAQ;mBAbT;EAWjB,YACmB,SAAS,mBACV,SAAQ;;;;;;;;;;;;EAkBnB,sBACL,aAAa,aACb,sBACC;;;;;;;;;EAgCI,4BAA4B,aAAa,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;EAiDtD,gCACL,aAAa,aACb,sBACC;UAsDK;EAaD,qBACL,mBAAmB,aACnB,qBACA;IAAQ,SAAS;IAAkB,cAAc;MAChD;;;;;;;;;;;EAqBI,sBAAsB,aAAa;;;;;;;;;;;;;;;;;;;;;;EA2CnC,2BACL,aAAa,aACb,kBACC;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDI,gCACL,aAAa,aACb,iBACA,UAAU,8BACT;;;;;;;;;;;;;;EA0EI,uBACL,aAAa,aACb,4BACA;IAAW;IAAmB;;;;;;;;;;EAwCzB,wBACL,aAAa,aACb,qCACC,gBAAgB;;;;;;;;;;;;;;;;EA0CZ,mBACL,aAAa,aACb,yCACC"}
@@ -1,25 +1,25 @@
1
+ import "@platforma-sdk/model";
1
2
  import { ProjectListEntry, ProjectMeta } from "@milaboratories/pl-model-middle-layer";
2
3
  import { ProjectId as ProjectId$1 } from "@milaboratories/pl-model-common";
3
4
  import { ResourceType } from "@milaboratories/pl-client";
4
-
5
5
  //#region src/model/project_model.d.ts
6
6
  interface ProjectListEntry$1 extends Omit<ProjectListEntry, "id"> {
7
7
  /** Unique project identifier in middle layer. Use to operate with given project. */
8
8
  id: ProjectId$1;
9
9
  }
10
- declare const ProjectResourceType: ResourceType;
11
- declare const SchemaVersionKey = "SchemaVersion";
12
- declare const SchemaVersionCurrent = "4";
13
- declare const ProjectCreatedTimestamp = "ProjectCreated";
14
- declare const ProjectLastModifiedTimestamp = "ProjectLastModified";
15
- declare const ProjectMetaKey = "ProjectMeta";
16
- declare const ProjectStructureKey = "ProjectStructure";
17
- declare const BlockArgsAuthorKeyPrefix = "BlockArgsAuthor/";
18
- declare const ProjectStructureAuthorKey = "ProjectStructureAuthor";
19
- interface ProjectField {
10
+ export declare const ProjectResourceType: ResourceType;
11
+ export declare const SchemaVersionKey = "SchemaVersion";
12
+ export declare const SchemaVersionCurrent = "4";
13
+ export declare const ProjectCreatedTimestamp = "ProjectCreated";
14
+ export declare const ProjectLastModifiedTimestamp = "ProjectLastModified";
15
+ export declare const ProjectMetaKey = "ProjectMeta";
16
+ export declare const ProjectStructureKey = "ProjectStructure";
17
+ export declare const BlockArgsAuthorKeyPrefix = "BlockArgsAuthor/";
18
+ export declare const ProjectStructureAuthorKey = "ProjectStructureAuthor";
19
+ export interface ProjectField {
20
20
  blockId: string;
21
21
  fieldName: "blockPack" | "blockSettings" | "blockStorage" | "prodArgs" | "currentArgs" | "currentPrerunArgs" | "prodChainCtx" | "prodCtx" | "prodUiCtx" | "prodOutput" | "prodCtxPrevious" | "prodUiCtxPrevious" | "prodOutputPrevious" | "stagingCtx" | "stagingUiCtx" | "stagingOutput" | "stagingCtxPrevious" | "stagingUiCtxPrevious" | "stagingOutputPrevious";
22
22
  }
23
23
  //#endregion
24
- export { BlockArgsAuthorKeyPrefix, ProjectCreatedTimestamp, ProjectField, type ProjectId$1 as ProjectId, ProjectLastModifiedTimestamp, ProjectListEntry$1 as ProjectListEntry, ProjectMetaKey, ProjectResourceType, ProjectStructureAuthorKey, ProjectStructureKey, SchemaVersionCurrent, SchemaVersionKey };
24
+ export { type ProjectId$1 as ProjectId, ProjectListEntry$1 as ProjectListEntry };
25
25
  //# sourceMappingURL=project_model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"project_model.d.ts","names":[],"sources":["../../src/model/project_model.ts"],"mappings":";;;;;UAUiB,kBAAA,SAAyB,IAAA,CAAK,gBAAA;EAA9B;EAEf,EAAA,EAAI,WAAA;AAAA;AAAA,cA+DO,mBAAA,EAAqB,YAAoD;AAAA,cAEzE,gBAAA;AAAA,cAGA,oBAAA;AAAA,cAEA,uBAAA;AAAA,cACA,4BAAA;AAAA,cACA,cAAA;AAAA,cACA,mBAAA;AAAA,cAGA,wBAAA;AAAA,cAOA,yBAAA;AAAA,UAQI,YAAA;EACf,OAAA;EACA,SAAS;AAAA"}
1
+ {"version":3,"file":"project_model.d.ts","names":[],"sources":["../../src/model/project_model.ts"],"mappings":";;;;;UAUiB,2BAAyB,KAAK;;EAE7C,IAAI;;qBA+DO,qBAAqB;qBAErB;qBAGA;qBAEA;qBACA;qBACA;qBACA;qBAGA;qBAOA;iBAQI;EACf;EACA"}
@@ -1,6 +1,5 @@
1
1
  import { Branded, ProjectId } from "@milaboratories/pl-model-common";
2
2
  import { ResourceType, Role } from "@milaboratories/pl-client";
3
-
4
3
  //#region src/model/sharing_model.d.ts
5
4
  /**
6
5
  * Logical identity of a share, stable across replaces. A donor-generated UUID string,
@@ -9,33 +8,33 @@ import { ResourceType, Role } from "@milaboratories/pl-client";
9
8
  * {@link EnvelopeData} or by parsing a `decision/{shareId}` field name) and threads it
10
9
  * through unchanged.
11
10
  */
12
- type ShareId = Branded<string, "ShareId">;
11
+ export type ShareId = Branded<string, "ShareId">;
13
12
  /** Mints a fresh {@link ShareId}. The single place a share's logical identity is created. */
14
- declare function newShareId(): ShareId;
13
+ export declare function newShareId(): ShareId;
15
14
  /** Brands a string already known to be a share id (e.g. parsed from a `decision/{shareId}`
16
15
  * field name) as a {@link ShareId}, without minting a new one. */
17
- declare function asShareId(id: string): ShareId;
16
+ export declare function asShareId(id: string): ShareId;
18
17
  /** Field on the donor's clientRoot holding the {@link SharingOutboxResourceType} resource. */
19
- declare const SharingOutboxField = "sharingOutbox";
18
+ export declare const SharingOutboxField = "sharingOutbox";
20
19
  /** Field on the acceptor's clientRoot holding the {@link SharingStateResourceType} resource. */
21
- declare const SharingStateField = "sharingState";
22
- declare const SharingOutboxResourceType: ResourceType;
23
- declare const SharedEnvelopeResourceType: ResourceType;
24
- declare const SharingStateResourceType: ResourceType;
25
- type EnvelopeMode = "copy" | "read-only" | "collaboration";
20
+ export declare const SharingStateField = "sharingState";
21
+ export declare const SharingOutboxResourceType: ResourceType;
22
+ export declare const SharedEnvelopeResourceType: ResourceType;
23
+ export declare const SharingStateResourceType: ResourceType;
24
+ export type EnvelopeMode = "copy" | "read-only" | "collaboration";
26
25
  /** Per-project decision on change, matching the UI labels: re-snapshot the live source ("update"),
27
26
  * carry the existing snapshot ("keep"), or drop the project from the pack ("remove"). */
28
- type ProjectChangeAction = "keep" | "update" | "remove";
27
+ export type ProjectChangeAction = "keep" | "update" | "remove";
29
28
  /** Key of the per-project envelope maps: a uuid minted per snapshot to name the `project/{uuid}`
30
29
  * field. Distinct from {@link ProjectId} — re-snapshotting one source yields a new uuid each time. */
31
- type ProjectFieldUuid = Branded<string, "ProjectFieldUuid">;
30
+ export type ProjectFieldUuid = Branded<string, "ProjectFieldUuid">;
32
31
  /**
33
32
  * Whether a role may make a resource public (grant to everyone): true for controller,
34
33
  * admin; false for workflow and unspecified. The middle layer carries no policy
35
34
  * of its own here — a crafted call still hits the backend's role + permission-ceiling gate.
36
35
  * `null` (no-auth mode) returns false.
37
36
  */
38
- declare function canGrantToEveryone(role: Role | null): boolean;
37
+ export declare function canGrantToEveryone(role: Role | null): boolean;
39
38
  /**
40
39
  * Whether a role may impersonate another user: open/create another user's root and list
41
40
  * the resources that user can access. Mirrors the backend's authorization rule
@@ -45,15 +44,15 @@ declare function canGrantToEveryone(role: Role | null): boolean;
45
44
  * may share their own projects, but must never be offered impersonation). `null` (no-auth
46
45
  * mode) returns false.
47
46
  */
48
- declare function canImpersonate(role: Role | null): boolean;
47
+ export declare function canImpersonate(role: Role | null): boolean;
49
48
  /** One project's snapshot inside an envelope, keyed by {@link ProjectFieldUuid} in {@link EnvelopeData.projects}. */
50
- interface EnvelopeProject {
49
+ export interface EnvelopeProject {
51
50
  label: string;
52
51
  source: ProjectId;
53
52
  updatedAt: number;
54
53
  }
55
54
  /** Immutable `data` on a SharedEnvelope, set at createEphemeral, never mutated. */
56
- interface EnvelopeData {
55
+ export interface EnvelopeData {
57
56
  schemaVersion: 1;
58
57
  shareId: ShareId;
59
58
  sharedAt: number;
@@ -64,8 +63,8 @@ interface EnvelopeData {
64
63
  projects: Record<ProjectFieldUuid, EnvelopeProject>;
65
64
  }
66
65
  /** Dynamic field on SharingState, one per handled share, keyed by shareId. */
67
- declare const decisionField: (shareId: ShareId) => string;
68
- interface SharingDecision {
66
+ export declare const decisionField: (shareId: ShareId) => string;
67
+ export interface SharingDecision {
69
68
  decision: "accepted" | "rejected";
70
69
  timestamp: number;
71
70
  envelopeSharedAt: number;
@@ -78,11 +77,11 @@ interface SharingDecision {
78
77
  * who responded and when. Informational, not authoritative (a writable grant holder
79
78
  * could write under another login — same trust assumption as the sender field).
80
79
  * Copied forward when a share is changed. */
81
- declare const AcceptanceFieldPrefix = "acceptance/";
82
- declare const acceptanceField: (login: string) => string;
83
- declare const isAcceptanceField: (name: string) => boolean;
84
- declare const acceptanceFieldLogin: (name: string) => string;
85
- interface EnvelopeAcceptance {
80
+ export declare const AcceptanceFieldPrefix = "acceptance/";
81
+ export declare const acceptanceField: (login: string) => string;
82
+ export declare const isAcceptanceField: (name: string) => boolean;
83
+ export declare const acceptanceFieldLogin: (name: string) => string;
84
+ export interface EnvelopeAcceptance {
86
85
  action: "accepted" | "rejected";
87
86
  timestamp: number;
88
87
  }
@@ -92,7 +91,7 @@ interface EnvelopeAcceptance {
92
91
  * `data` byte buffer (the basic-resource read path) goes through here. The reactive tree-node
93
92
  * path uses `node.getDataAsJson<EnvelopeData>()`, which decodes the same JSON.
94
93
  */
95
- declare function decodeEnvelopeData(data: Uint8Array): EnvelopeData;
94
+ export declare function decodeEnvelopeData(data: Uint8Array): EnvelopeData;
96
95
  /**
97
96
  * Options for {@link MiddleLayer.shareProjects}.
98
97
  *
@@ -101,7 +100,7 @@ declare function decodeEnvelopeData(data: Uint8Array): EnvelopeData;
101
100
  * `expiresAt` is set to `null`, so it never expires); the recipients variant grants each
102
101
  * named recipient and the envelope expires after the default TTL.
103
102
  */
104
- type ShareProjectsOptions = {
103
+ export type ShareProjectsOptions = {
105
104
  recipients: string[];
106
105
  title: string;
107
106
  mode: EnvelopeMode;
@@ -118,5 +117,4 @@ type ShareProjectsOptions = {
118
117
  mode: EnvelopeMode;
119
118
  };
120
119
  //#endregion
121
- export { AcceptanceFieldPrefix, EnvelopeAcceptance, EnvelopeData, EnvelopeMode, EnvelopeProject, ProjectChangeAction, ProjectFieldUuid, ShareId, ShareProjectsOptions, SharedEnvelopeResourceType, SharingDecision, SharingOutboxField, SharingOutboxResourceType, SharingStateField, SharingStateResourceType, acceptanceField, acceptanceFieldLogin, asShareId, canGrantToEveryone, canImpersonate, decisionField, decodeEnvelopeData, isAcceptanceField, newShareId };
122
120
  //# sourceMappingURL=sharing_model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sharing_model.d.ts","names":[],"sources":["../../src/model/sharing_model.ts"],"mappings":";;;;;;AAYA;;;;AAA6B;KAAjB,OAAA,GAAU,OAAO;;iBAGb,UAAA,IAAc,OAAO;;AAAA;iBAMrB,SAAA,CAAU,EAAA,WAAa,OAAO;;cAYjC,kBAAA;;cAEA,iBAAA;AAAA,cAEA,yBAAA,EAA2B,YAAsD;AAAA,cACjF,0BAAA,EAA4B,YAAuD;AAAA,cACnF,wBAAA,EAA0B,YAAqD;AAAA,KAEhF,YAAA;AARmB;AAE/B;AAF+B,KAYnB,mBAAA;;;KAIA,gBAAA,GAAmB,OAAO;AAZtC;;;;AAA8F;AAC9F;AADA,iBAoBgB,kBAAA,CAAmB,IAAiB,EAAX,IAAI;;;AAnBmD;AAChG;;;;AAA4F;AAE5F;iBAmCgB,cAAA,CAAe,IAAiB,EAAX,IAAI;;UAWxB,eAAA;EACf,KAAA;EACA,MAAA,EAAQ,SAAS;EACjB,SAAA;AAAA;;UAIe,YAAA;EACf,aAAA;EACA,OAAA,EAAS,OAAA;EACT,QAAA;EACA,SAAA;EACA,IAAA,EAAM,YAAA;EACN,MAAA;EACA,KAAA;EACA,QAAA,EAAU,MAAA,CAAO,gBAAA,EAAkB,eAAA;AAAA;AA7Ce;AAAA,cAiDvC,aAAA,GAAiB,OAAgB,EAAP,OAAO;AAAA,UAE7B,eAAA;EACf,QAAA;EACA,SAAA;EACA,gBAAA;EACA,gBAAA;AAAA;;;;;;;;cAUW,qBAAA;AAAA,cACA,eAAA,GAAmB,KAAa;AAAA,cAChC,iBAAA,GAAqB,IAAY;AAAA,cACjC,oBAAA,GAAwB,IAAY;AAAA,UAEhC,kBAAA;EACf,MAAA;EACA,SAAS;AAAA;;;;;;;iBASK,kBAAA,CAAmB,IAAA,EAAM,UAAA,GAAa,YAAY;;;;;;;;;KAYtD,oBAAA;EAEN,UAAA;EACA,KAAA;EACA,IAAA,EAAM,YAAA;AAAA;EAGN,QAAA;EAnDiC;AAAO;AAE9C;;;;EAwDM,OAAA;EACA,KAAA;EACA,IAAA,EAAM,YAAY;AAAA"}
1
+ {"version":3,"file":"sharing_model.d.ts","names":[],"sources":["../../src/model/sharing_model.ts"],"mappings":";;;;;;;;;;YAYY,UAAU;;wBAGN,cAAc;;;wBAMd,UAAU,aAAa;;qBAY1B;;qBAEA;qBAEA,2BAA2B;qBAC3B,4BAA4B;qBAC5B,0BAA0B;YAE3B;;;YAIA;;;YAIA,mBAAmB;;;;;;;wBAQf,mBAAmB,MAAM;;;;;;;;;;wBAmBzB,eAAe,MAAM;;iBAWpB;EACf;EACA,QAAQ;EACR;;;iBAIe;EACf;EACA,SAAS;EACT;EACA;EACA,MAAM;EACN;EACA;EACA,UAAU,OAAO,kBAAkB;;;qBAIxB,gBAAa,SAAa;iBAEtB;EACf;EACA;EACA;EACA;;;;;;;;;qBAUW;qBACA,kBAAe;qBACf,oBAAiB;qBACjB,uBAAoB;iBAEhB;EACf;EACA;;;;;;;;wBASc,mBAAmB,MAAM,aAAa;;;;;;;;;YAY1C;EAEN;EACA;EACA,MAAM;;EAGN;;;;;;;EAOA;EACA;EACA,MAAM"}
@@ -1,5 +1,4 @@
1
1
  import { BlockKindReference, BlockKindSelectorReference } from "@milaboratories/pl-model-common";
2
-
3
2
  //#region src/model/template_apply.d.ts
4
3
  /**
5
4
  * One entry the file describes in a way this project cannot honour.
@@ -10,7 +9,7 @@ import { BlockKindReference, BlockKindSelectorReference } from "@milaboratories/
10
9
  * it into a {@link TemplateApplyProblem}; anything else reaching that caller is an outage
11
10
  * rather than a statement about the file, and keeps propagating.
12
11
  */
13
- declare class TemplateEntryRejected extends Error {
12
+ export declare class TemplateEntryRejected extends Error {
14
13
  readonly entryId: string;
15
14
  constructor(entryId: string, message: string);
16
15
  }
@@ -22,13 +21,16 @@ declare class TemplateEntryRejected extends Error {
22
21
  * their file each problem belongs to. `error` is a finished sentence for the person
23
22
  * who applied the file, not a code.
24
23
  */
25
- type TemplateApplyProblem = {
26
- /** The template-local id of the entry the problem belongs to. */readonly entryId: string;
24
+ export type TemplateApplyProblem = {
25
+ /** The template-local id of the entry the problem belongs to. */
26
+ readonly entryId: string;
27
27
  readonly error: string;
28
28
  };
29
29
  /** One entry that made it into the project. */
30
- type AppliedEntry = {
31
- /** The entry's id in the file. */readonly templateLocalId: string; /** The project-local id the block was given. */
30
+ export type AppliedEntry = {
31
+ /** The entry's id in the file. */
32
+ readonly templateLocalId: string;
33
+ /** The project-local id the block was given. */
32
34
  readonly blockId: string;
33
35
  };
34
36
  /**
@@ -41,10 +43,9 @@ type AppliedEntry = {
41
43
  * A stage that checks reports every problem it found, so a file with three mistakes takes one
42
44
  * pass to fix. Placement stops at the first one — hence at most one problem from there.
43
45
  */
44
- type TemplateApplyReport = {
46
+ export type TemplateApplyReport = {
45
47
  readonly added: readonly AppliedEntry[];
46
48
  readonly problems: readonly TemplateApplyProblem[];
47
49
  };
48
50
  //#endregion
49
- export { AppliedEntry, TemplateApplyProblem, TemplateApplyReport, TemplateEntryRejected };
50
51
  //# sourceMappingURL=template_apply.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"template_apply.d.ts","names":[],"sources":["../../src/model/template_apply.ts"],"mappings":";;;;;AAkBA;;;;;;;cAAa,qBAAA,SAA8B,KAAK;EAAA,SAEnC,OAAA;cAAA,OAAA,UACT,OAAA;AAAA;AAeJ;;;;AAGgB;AAIhB;;;AAPA,KAAY,oBAAA;EAWM,0EATP,OAAA;EAAA,SACA,KAAK;AAAA;;KAIJ,YAAA;EAkBe,2CAhBhB,eAAA,UAiBmB;EAAA,SAfnB,OAAO;AAAA;;;;;;;;;;;KAaN,mBAAA;EAAA,SACD,KAAA,WAAgB,YAAA;EAAA,SAChB,QAAA,WAAmB,oBAAoB;AAAA"}
1
+ {"version":3,"file":"template_apply.d.ts","names":[],"sources":["../../src/model/template_apply.ts"],"mappings":";;;;;;;;;;;qBAkBa,8BAA8B;WAE9B;EADX,YACW,iBACT;;;;;;;;;;YAeQ;;WAED;WACA;;;YAIC;;WAED;;WAEA;;;;;;;;;;;;YAaC;WACD,gBAAgB;WAChB,mBAAmB"}
@@ -1,9 +1,9 @@
1
+ import "./project_model.js";
1
2
  //#region src/model/template_export.d.ts
2
3
  /** Why one block could not be exported. */
3
- type TemplateExportProblem = {
4
+ export type TemplateExportProblem = {
4
5
  readonly blockId: string;
5
6
  readonly error: string;
6
7
  };
7
8
  //#endregion
8
- export { TemplateExportProblem };
9
9
  //# sourceMappingURL=template_export.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"template_export.d.ts","names":[],"sources":["../../src/model/template_export.ts"],"mappings":";;KAiCY,qBAAA;EAAA,SACD,OAAA;EAAA,SACA,KAAK;AAAA"}
1
+ {"version":3,"file":"template_export.d.ts","names":[],"sources":["../../src/model/template_export.ts"],"mappings":";;;YAiCY;WACD;WACA"}
@@ -1,5 +1,4 @@
1
1
  import { ProjectTemplateV1 } from "@milaboratories/pl-model-common";
2
-
3
2
  //#region src/model/template_parser.d.ts
4
3
  /**
5
4
  * A template file read, or why it could not be.
@@ -10,7 +9,7 @@ import { ProjectTemplateV1 } from "@milaboratories/pl-model-common";
10
9
  * after this one. The message may span several lines when the file has several
11
10
  * fixable issues, so that fixing it takes one pass.
12
11
  */
13
- type TemplateParseOutcome = {
12
+ export type TemplateParseOutcome = {
14
13
  readonly ok: true;
15
14
  readonly document: ProjectTemplateV1;
16
15
  } | {
@@ -37,7 +36,6 @@ type TemplateParseOutcome = {
37
36
  * Nothing here checks that references point anywhere or that a kind can be resolved —
38
37
  * those are later stages, and both need more than the file to answer.
39
38
  */
40
- declare function parseProjectTemplateV1Yaml(text: string): TemplateParseOutcome;
39
+ export declare function parseProjectTemplateV1Yaml(text: string): TemplateParseOutcome;
41
40
  //#endregion
42
- export { TemplateParseOutcome, parseProjectTemplateV1Yaml };
43
41
  //# sourceMappingURL=template_parser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"template_parser.d.ts","names":[],"sources":["../../src/model/template_parser.ts"],"mappings":";;;;;AAiBA;;;;;;;KAAY,oBAAA;EAAA,SACG,EAAA;EAAA,SAAmB,QAAA,EAAU,iBAAiB;AAAA;EAAA,SAC9C,EAAA;EAAA,SAAoB,KAAA;AAAA;;AAsB2C;;;;;;;;;;;;;;;;;;;iBAA9D,0BAAA,CAA2B,IAAA,WAAe,oBAAoB"}
1
+ {"version":3,"file":"template_parser.d.ts","names":[],"sources":["../../src/model/template_parser.ts"],"mappings":";;;;;;;;;;;YAiBY;WACG;WAAmB,UAAU;;WAC7B;WAAoB;;;;;;;;;;;;;;;;;;;;;;wBAsBnB,2BAA2B,eAAe"}
@@ -1,7 +1,6 @@
1
1
  import { TemplateApplyProblem } from "./template_apply.js";
2
2
  import { BlockPackId, BlockPackSpec } from "@milaboratories/pl-model-middle-layer";
3
3
  import { BlockKindSelectorReference, BlockPackLocationReference, ProjectTemplateV1 } from "@milaboratories/pl-model-common";
4
-
5
4
  //#region src/model/template_resolve.d.ts
6
5
  /**
7
6
  * Where a template entry's block comes from.
@@ -24,7 +23,7 @@ import { BlockKindSelectorReference, BlockPackLocationReference, ProjectTemplate
24
23
  * for it at all, and the fallbacks it could invent are all wrong. See
25
24
  * {@link ResolvedEntry}'s `title`.
26
25
  */
27
- type BlockPackProvider = {
26
+ export type BlockPackProvider = {
28
27
  /**
29
28
  * Find the block implementing a kind selector.
30
29
  *
@@ -72,7 +71,7 @@ type BlockPackProvider = {
72
71
  * apply did not allow unstable ones. This is the only reason the user can act on
73
72
  * without editing anything.
74
73
  */
75
- type KindResolution = {
74
+ export type KindResolution = {
76
75
  readonly ok: true;
77
76
  readonly spec: BlockPackSpec;
78
77
  readonly title: string;
@@ -81,7 +80,7 @@ type KindResolution = {
81
80
  readonly reason: "no-matching-kind-version" | "no-implementation" | "no-stable-implementation";
82
81
  };
83
82
  /** The outcome of locating one exact block version. */
84
- type ExactResolution = {
83
+ export type ExactResolution = {
85
84
  readonly ok: true;
86
85
  readonly spec: BlockPackSpec;
87
86
  readonly title: string;
@@ -102,7 +101,7 @@ type ExactResolution = {
102
101
  * - `not-a-block` — something is there, but it is not a block. Usually a path pointing
103
102
  * one directory off, which is why the message has to say what was looked for.
104
103
  */
105
- type LocationResolution = {
104
+ export type LocationResolution = {
106
105
  readonly ok: true;
107
106
  readonly spec: BlockPackSpec;
108
107
  readonly title: string;
@@ -111,8 +110,9 @@ type LocationResolution = {
111
110
  readonly reason: "unsupported-scheme" | "not-found" | "not-a-block";
112
111
  };
113
112
  /** Where one entry's block will come from. */
114
- type ResolvedEntry = {
115
- /** The entry's template-local id. */readonly entryId: string;
113
+ export type ResolvedEntry = {
114
+ /** The entry's template-local id. */
115
+ readonly entryId: string;
116
116
  readonly spec: BlockPackSpec;
117
117
  /**
118
118
  * The block package's own title, as its author published it — `meta.title` for a
@@ -147,7 +147,7 @@ type ResolvedEntry = {
147
147
  * resolution: the point of resolving before construction is that nothing is created
148
148
  * until every entry has an implementation.
149
149
  */
150
- type TemplateResolveOutcome = {
150
+ export type TemplateResolveOutcome = {
151
151
  readonly resolved: readonly ResolvedEntry[];
152
152
  readonly problems: readonly TemplateApplyProblem[];
153
153
  };
@@ -167,7 +167,7 @@ type TemplateResolveOutcome = {
167
167
  * @param provider Where blocks come from
168
168
  * @param options `allowUnstable` applies to the whole document, not per entry
169
169
  */
170
- declare function resolveTemplateEntries(document: ProjectTemplateV1, provider: BlockPackProvider, options: {
170
+ export declare function resolveTemplateEntries(document: ProjectTemplateV1, provider: BlockPackProvider, options: {
171
171
  allowUnstable: boolean;
172
172
  }): Promise<TemplateResolveOutcome>;
173
173
  /**
@@ -184,10 +184,9 @@ declare function resolveTemplateEntries(document: ProjectTemplateV1, provider: B
184
184
  *
185
185
  * @throws if the name has no npm scope or no organization segment
186
186
  */
187
- declare function parseBlockPackName(npmName: string): {
187
+ export declare function parseBlockPackName(npmName: string): {
188
188
  organization: string;
189
189
  name: string;
190
190
  };
191
191
  //#endregion
192
- export { BlockPackProvider, ExactResolution, KindResolution, LocationResolution, ResolvedEntry, TemplateResolveOutcome, parseBlockPackName, resolveTemplateEntries };
193
192
  //# sourceMappingURL=template_resolve.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"template_resolve.d.ts","names":[],"sources":["../../src/model/template_resolve.ts"],"mappings":";;;;;;;AAkCA;;;;;;;;;;;;;;;;;;;KAAY,iBAAA;EAWG;;;;;;;EAHb,MAAA,GACE,IAAA,EAAM,0BAAA,EACN,OAAA;IAAW,aAAA;EAAA,MACR,OAAA,CAAQ,cAAA;EAwBiD;;AAAkB;AAiBlF;;;;EAhCE,cAAA,GAAiB,EAAA,EAAI,WAAA,KAAgB,OAAA,CAAQ,eAAA;EAiCb;;;;;;AAGb;AAOrB;;;;;;EA5BE,UAAA,GAAa,QAAA,EAAU,0BAAA,KAA+B,OAAA,CAAQ,kBAAA;AAAA;;;;AA8BvB;AAezC;;;;;;;;;;KA5BY,cAAA;EAAA,SACG,EAAA;EAAA,SAAmB,IAAA,EAAM,aAAa;EAAA,SAAW,KAAA;AAAA;EAAA,SAEjD,EAAA;EAAA,SACA,MAAA;AAAA;;KAOH,eAAA;EAAA,SACG,EAAA;EAAA,SAAmB,IAAA,EAAM,aAAa;EAAA,SAAW,KAAA;AAAA;EAAA,SACjD,EAAA;EAAA,SAAoB,MAAA;AAAA;;;;;;AAmEe;AAmBlD;;;;;;;KAvEY,kBAAA;EAAA,SAEG,EAAA;EAAA,SACA,IAAA,EAAM,aAAa;EAAA,SACnB,KAAA;AAAA;EAAA,SAGA,EAAA;EAAA,SACA,MAAA;AAAA;;KAIH,aAAA;EA+DqB,8CA7DtB,OAAA;EAAA,SACA,IAAA,EAAM,aAAa;EAqMI;;;;;;;AAA+C;;;;;;;;EAA/C,SArLvB,KAAA;;;;;;;;WAQA,MAAA;AAAA;;;;;;;;;KAWC,sBAAA;EAAA,SACD,QAAA,WAAmB,aAAA;EAAA,SACnB,QAAA,WAAmB,oBAAoB;AAAA;;;;;;;;;;;;;;;;;iBAmB5B,sBAAA,CACpB,QAAA,EAAU,iBAAA,EACV,QAAA,EAAU,iBAAA,EACV,OAAA;EAAW,aAAA;AAAA,IACV,OAAA,CAAQ,sBAAA;;;;;;;;;;;;;;;iBAyIK,kBAAA,CAAmB,OAAA;EAAoB,YAAA;EAAsB,IAAA;AAAA"}
1
+ {"version":3,"file":"template_resolve.d.ts","names":[],"sources":["../../src/model/template_resolve.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;YAkCY;;;;;;;;EAQV,SACE,MAAM,4BACN;IAAW;QACR,QAAQ;;;;;;;;EASb,iBAAiB,IAAI,gBAAgB,QAAQ;;;;;;;;;;;;;;EAe7C,aAAa,UAAU,+BAA+B,QAAQ;;;;;;;;;;;;;;;;YAiBpD;WACG;WAAmB,MAAM;WAAwB;;WAEjD;WACA;;;YAOH;WACG;WAAmB,MAAM;WAAwB;;WACjD;WAAoB;;;;;;;;;;;;;;;YAevB;WAEG;WACA,MAAM;WACN;;WAGA;WACA;;;YAIH;;WAED;WACA,MAAM;;;;;;;;;;;;;;;;WAgBN;;;;;;;;WAQA;;;;;;;;;;YAWC;WACD,mBAAmB;WACnB,mBAAmB;;;;;;;;;;;;;;;;;;wBAmBR,uBACpB,UAAU,mBACV,UAAU,mBACV;EAAW;IACV,QAAQ;;;;;;;;;;;;;;;wBAyIK,mBAAmB;EAAoB;EAAsB"}
@@ -1,17 +1,18 @@
1
+ import "./project_model.js";
1
2
  import { TemplateExportProblem } from "./template_export.js";
2
3
  import { BlockPackSpec } from "@milaboratories/pl-model-middle-layer";
3
4
  import { BlockKindReference, BlockPackLocationReference, ProjectTemplateV1 } from "@milaboratories/pl-model-common";
4
-
5
5
  //#region src/model/template_serializer.d.ts
6
6
  /** What the caller gets back for a whole project. */
7
- type ProjectTemplateExportOutcome = {
7
+ export type ProjectTemplateExportOutcome = {
8
8
  readonly ok: true;
9
- readonly yaml: string; /** The document the YAML was rendered from, already validated. */
9
+ readonly yaml: string;
10
+ /** The document the YAML was rendered from, already validated. */
10
11
  readonly document: ProjectTemplateV1;
11
12
  } | {
12
- readonly ok: false; /** Every block that stands in the way, not just the first. */
13
+ readonly ok: false;
14
+ /** Every block that stands in the way, not just the first. */
13
15
  readonly problems: readonly TemplateExportProblem[];
14
16
  };
15
17
  //#endregion
16
- export { ProjectTemplateExportOutcome };
17
18
  //# sourceMappingURL=template_serializer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"template_serializer.d.ts","names":[],"sources":["../../src/model/template_serializer.ts"],"mappings":";;;;;;KAoCY,4BAAA;EAAA,SAEG,EAAA;EAAA,SACA,IAAA,UAOwC;EAAA,SALxC,QAAA,EAAU,iBAAA;AAAA;EAAA,SAGV,EAAA;WAEA,QAAA,WAAmB,qBAAqB;AAAA"}
1
+ {"version":3,"file":"template_serializer.d.ts","names":[],"sources":["../../src/model/template_serializer.ts"],"mappings":";;;;;;YAoCY;WAEG;WACA;;WAEA,UAAU;;WAGV;;WAEA,mBAAmB"}
@@ -1,30 +1,28 @@
1
1
  import { SignedResourceId } from "@milaboratories/pl-client";
2
2
  import { CompiledTemplateV3, TemplateData } from "@milaboratories/pl-model-backend";
3
-
4
3
  //#region src/model/template_spec.d.ts
5
- interface TemplateFromRegistry {
4
+ export interface TemplateFromRegistry {
6
5
  readonly type: "from-registry";
7
6
  registry: string;
8
7
  path: string;
9
8
  }
10
- interface ExplicitTemplate {
9
+ export interface ExplicitTemplate {
11
10
  readonly type: "explicit";
12
11
  content: Uint8Array;
13
12
  }
14
- interface PreparedTemplate {
13
+ export interface PreparedTemplate {
15
14
  readonly type: "prepared";
16
15
  data: TemplateData | CompiledTemplateV3;
17
16
  }
18
- interface CachedTemplate {
17
+ export interface CachedTemplate {
19
18
  readonly type: "cached";
20
19
  readonly resourceId: SignedResourceId;
21
20
  }
22
- interface TemplateFromFile {
21
+ export interface TemplateFromFile {
23
22
  readonly type: "from-file";
24
23
  path: string;
25
24
  }
26
- type TemplateSpecPrepared = TemplateFromRegistry | ExplicitTemplate | PreparedTemplate | CachedTemplate;
27
- type TemplateSpecAny = TemplateSpecPrepared | TemplateFromFile;
25
+ export type TemplateSpecPrepared = TemplateFromRegistry | ExplicitTemplate | PreparedTemplate | CachedTemplate;
26
+ export type TemplateSpecAny = TemplateSpecPrepared | TemplateFromFile;
28
27
  //#endregion
29
- export { CachedTemplate, ExplicitTemplate, PreparedTemplate, TemplateFromFile, TemplateFromRegistry, TemplateSpecAny, TemplateSpecPrepared };
30
28
  //# sourceMappingURL=template_spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"template_spec.d.ts","names":[],"sources":["../../src/model/template_spec.ts"],"mappings":";;;;UAGiB,oBAAA;EAAA,SACN,IAAA;EACT,QAAA;EACA,IAAA;AAAA;AAAA,UAGe,gBAAA;EAAA,SACN,IAAA;EACT,OAAA,EAAS,UAAU;AAAA;AAAA,UAGJ,gBAAA;EAAA,SACN,IAAA;EACT,IAAA,EAAM,YAAA,GAAe,kBAAkB;AAAA;AAAA,UAGxB,cAAA;EAAA,SACN,IAAA;EAAA,SACA,UAAA,EAAY,gBAAgB;AAAA;AAAA,UAGtB,gBAAA;EAAA,SACN,IAAA;EACT,IAAI;AAAA;AAAA,KAGM,oBAAA,GACR,oBAAA,GACA,gBAAA,GACA,gBAAA,GACA,cAAA;AAAA,KACQ,eAAA,GAAkB,oBAAA,GAAuB,gBAAgB"}
1
+ {"version":3,"file":"template_spec.d.ts","names":[],"sources":["../../src/model/template_spec.ts"],"mappings":";;;iBAGiB;WACN;EACT;EACA;;iBAGe;WACN;EACT,SAAS;;iBAGM;WACN;EACT,MAAM,eAAe;;iBAGN;WACN;WACA,YAAY;;iBAGN;WACN;EACT;;YAGU,uBACR,uBACA,mBACA,mBACA;YACQ,kBAAkB,uBAAuB"}
@@ -1,12 +1,12 @@
1
1
  import { V2RegistryProvider } from "../../block_registry/registry-v2-provider.js";
2
2
  import { BlockPackSpecAny, BlockPackSpecPrepared } from "../../model/block_pack_spec.js";
3
+ import "../../model/index.js";
3
4
  import { BlockConfigContainer } from "@platforma-sdk/model";
4
5
  import { Dispatcher } from "undici";
5
6
  import { Signer } from "@milaboratories/ts-helpers";
6
7
  import { AnyResourceRef, PlTransaction, ResourceType } from "@milaboratories/pl-client";
7
-
8
8
  //#region src/mutator/block-pack/block_pack.d.ts
9
- declare class BlockPackPreparer {
9
+ export declare class BlockPackPreparer {
10
10
  private readonly v2RegistryProvider;
11
11
  private readonly signer;
12
12
  private readonly http?;
@@ -21,5 +21,4 @@ declare class BlockPackPreparer {
21
21
  private prepareWithoutUnpacking;
22
22
  }
23
23
  //#endregion
24
- export { BlockPackPreparer };
25
24
  //# sourceMappingURL=block_pack.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"block_pack.d.ts","names":[],"sources":["../../../src/mutator/block-pack/block_pack.ts"],"mappings":";;;;;;;;cA4Da,iBAAA;EAAA,iBAEQ,kBAAA;EAAA,iBACA,MAAA;EAAA,iBACA,IAAA;cAFA,kBAAA,EAAoB,kBAAA,EACpB,MAAA,EAAQ,MAAA,EACR,IAAA,GAAO,UAAA;EAAA,iBAGT,kBAAA;EAe0B;EAAA,iBAJ1B,aAAA;EAIJ,uBAAA,CAAwB,IAAA,EAAM,gBAAA,GAAmB,OAAA,CAAQ,oBAAA;EAgE3C;EAAA,QAXnB,OAAA;EAWK,OAAA,CAAQ,IAAA,EAAM,gBAAA,GAAmB,OAAA,CAAQ,qBAAA;EAAA,QAmCxC,uBAAA;AAAA"}
1
+ {"version":3,"file":"block_pack.d.ts","names":[],"sources":["../../../src/mutator/block-pack/block_pack.ts"],"mappings":";;;;;;;;qBA4Da;mBAEQ;mBACA;mBACA;EAHnB,YACmB,oBAAoB,oBACpB,QAAQ,QACR,OAAO;mBAGT;;mBAWA;EAIJ,wBAAwB,MAAM,mBAAmB,QAAQ;;UAqD9D;EAWK,QAAQ,MAAM,mBAAmB,QAAQ;UAmCxC"}