@ibgib/core-gib 0.0.64 → 0.0.66

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 (28) hide show
  1. package/dist/common/other/other-constants.d.mts +0 -2
  2. package/dist/common/other/other-constants.d.mts.map +1 -1
  3. package/dist/common/other/other-constants.mjs +0 -2
  4. package/dist/common/other/other-constants.mjs.map +1 -1
  5. package/dist/witness/app/app-helper.d.mts +0 -1
  6. package/dist/witness/app/app-helper.d.mts.map +1 -1
  7. package/dist/witness/app/app-helper.mjs +3 -3
  8. package/dist/witness/app/app-helper.mjs.map +1 -1
  9. package/dist/witness/space/metaspace/metaspace-base.d.mts +9 -59
  10. package/dist/witness/space/metaspace/metaspace-base.d.mts.map +1 -1
  11. package/dist/witness/space/metaspace/metaspace-base.mjs +299 -315
  12. package/dist/witness/space/metaspace/metaspace-base.mjs.map +1 -1
  13. package/dist/witness/space/metaspace/metaspace-types.d.mts +6 -29
  14. package/dist/witness/space/metaspace/metaspace-types.d.mts.map +1 -1
  15. package/dist/witness/space/outer-space/outer-space-helper.d.mts.map +1 -1
  16. package/dist/witness/space/outer-space/outer-space-helper.mjs +5 -0
  17. package/dist/witness/space/outer-space/outer-space-helper.mjs.map +1 -1
  18. package/dist/witness/space/outer-space/outer-space-types.d.mts +9 -4
  19. package/dist/witness/space/outer-space/outer-space-types.d.mts.map +1 -1
  20. package/dist/witness/space/outer-space/outer-space-types.mjs +0 -1
  21. package/dist/witness/space/outer-space/outer-space-types.mjs.map +1 -1
  22. package/package.json +1 -1
  23. package/src/common/other/other-constants.mts +0 -4
  24. package/src/witness/app/app-helper.mts +3 -3
  25. package/src/witness/space/metaspace/metaspace-base.mts +326 -371
  26. package/src/witness/space/metaspace/metaspace-types.mts +27 -62
  27. package/src/witness/space/outer-space/outer-space-helper.mts +9 -0
  28. package/src/witness/space/outer-space/outer-space-types.mts +9 -6
@@ -14,7 +14,7 @@ import {
14
14
  GetIbGibOpts, GetIbGibResult,
15
15
  PutIbGibOpts, PutIbGibResult
16
16
  } from '../../../common/other/other-types.mjs';
17
- import { SyncSagaInfo, } from '../../../witness/space/outer-space/outer-space-types.mjs';
17
+ import { SyncSagaInfo, SyncSpaceIbGib, } from '../../../witness/space/outer-space/outer-space-types.mjs';
18
18
  import { SpaceId } from '../../../witness/space/space-types.mjs';
19
19
  import { IbGibSpaceAny } from '../../../witness/space/space-base-v1.mjs';
20
20
  import { IbGibTimelineUpdateInfo, SpecialIbGibType } from '../../../common/other/other-types.mjs';
@@ -544,24 +544,24 @@ export interface MetaspaceService {
544
544
  dontPrompt?: boolean,
545
545
  space: IbGibSpaceAny,
546
546
  }): Promise<string>;
547
- unwrapEncryptedSyncSpace(arg: {
548
- encryptedSpace: IbGibSpaceAny,
549
- fnPromptPassword: (title: string, msg: string) => Promise<string | null>,
550
- dontPrompt?: boolean,
551
- space?: IbGibSpaceAny,
552
- }): Promise<IbGibSpaceAny>;
553
- getAppSyncSpaces(arg: {
554
- unwrapEncrypted: boolean,
555
- createIfNone: boolean,
556
- /**
557
- * If true, don't prompt the user if we don't have it already cached.
558
- *
559
- * We don't want the user to hit the page and then always have to type in
560
- * the password, just because my password code sucks atow.
561
- */
562
- dontPrompt?: boolean,
563
- space?: IbGibSpaceAny,
564
- }): Promise<IbGibSpaceAny[]>;
547
+ // unwrapEncryptedSyncSpace(arg: {
548
+ // encryptedSpace: IbGibSpaceAny,
549
+ // fnPromptPassword: (title: string, msg: string) => Promise<string | null>,
550
+ // dontPrompt?: boolean,
551
+ // space?: IbGibSpaceAny,
552
+ // }): Promise<IbGibSpaceAny>;
553
+ // getSyncSpaces(arg: {
554
+ // // unwrapEncrypted: boolean,
555
+ // createIfNone: boolean,
556
+ // /**
557
+ // * If true, don't prompt the user if we don't have it already cached.
558
+ // *
559
+ // * We don't want the user to hit the page and then always have to type in
560
+ // * the password, just because my password code sucks atow.
561
+ // */
562
+ // dontPrompt?: boolean,
563
+ // space?: IbGibSpaceAny,
564
+ // }): Promise<SyncSpaceIbGib[]>;
565
565
  getAppRobbotIbGibs(arg: {
566
566
  createIfNone: boolean,
567
567
  fnPromptRobbot: (space: IbGibSpaceAny, ibGib: RobbotIbGib_V1 | null) => Promise<RobbotPromptResult | undefined>;
@@ -581,55 +581,20 @@ export interface MetaspaceService {
581
581
  * ibgibs to be synced.
582
582
  */
583
583
  dependencyGraphIbGibs?: IbGib_V1[],
584
- // confirm?: boolean,
584
+ /**
585
+ * sync space witnesses that we are going to send a put+sync cmd with
586
+ * the given {@link dependencyGraphIbGibs}.
587
+ *
588
+ * Note these are witnesses ({@link IbGibSpaceAny}) and not just the
589
+ * {@link SyncSpaceIbGib} interface, which is itself only an ibgib shape.
590
+ */
591
+ syncSpaceIbGibs: IbGibSpaceAny[],
585
592
  // /**
586
593
  // * If true, will watch ibgibs in dependency graph that have timelines
587
594
  // * (tjps) to keep in sync going forward.
588
595
  // */
589
596
  // watch?: boolean,
590
- /**
591
- * if provided, these will determine which outerspace(s) we will sync
592
- * the {@link dependencyGraphIbGibs} with.
593
- */
594
- outerspaceIds?: SpaceId[],
595
- /**
596
- * The meat of the sync process is tracked via a status within the sync
597
- * spaces themselves. I'm addign this fn to track the pre and post progress
598
- * stuff, since decrypting takes some time, and building the dependency
599
- * graphs takes time. Both of these happen before the actual syncing occurs
600
- * in the spaces.
601
- */
602
- fnPreSyncProgress?: (msg: string) => Promise<void>,
603
597
  }): Promise<SyncSagaInfo[] | undefined>;
604
- // /**
605
- // * Prompts the user to select a new picture for the given `picIbGib`.
606
- // *
607
- // * If the user does select one, this creates the appropriate ibgibs (pic,
608
- // * binary, dependencies), saves them, registers the new pic (but not the bin)
609
- // * in the given `space` if specified, else in the current `localUserSpace`.
610
- // */
611
- // updatePic(arg: {
612
- // /**
613
- // * picIbGib to update with a new image.
614
- // */
615
- // picIbGib: PicIbGib_V1,
616
- // /**
617
- // * space within which we are working, i.e., where the incoming `picIbGib` is
618
- // * and where we will save any new ibgibs.
619
- // */
620
- // space?: IbGibSpaceAny,
621
- // }): Promise<void>;
622
- // updateComment(arg: {
623
- // /**
624
- // * commentIbGib to update with a new text
625
- // */
626
- // commentIbGib: CommentIbGib_V1,
627
- // /**
628
- // * space within which we are working, i.e., where the incoming `commentIbGib` is
629
- // * and where we will save any new ibgibs.
630
- // */
631
- // space?: IbGibSpaceAny,
632
- // }): Promise<void>;
633
598
 
634
599
  /**
635
600
  * creates a new local space with the given `fnLocalSpaceFactory` function
@@ -10,12 +10,21 @@
10
10
  */
11
11
 
12
12
  import { Ib, } from '@ibgib/ts-gib/dist/types.mjs';
13
+ import { extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
13
14
 
15
+ import { GLOBAL_LOG_A_LOT } from '../../../core-constants.mjs';
14
16
  import { SpaceType, SpaceSubtype, VALID_SPACE_SUBTYPES, VALID_SPACE_TYPES, } from '../space-types.mjs';
15
17
  import { StatusCode, StatusIbInfo, } from './outer-space-types.mjs';
16
18
  import { OUTER_SPACE_DEFAULT_IB_DELIMITER } from './outer-space-constants.mjs';
19
+ import { EncryptionIbGib_V1 } from '../../../common/encrypt/encrypt-types.mjs';
20
+ import { SecretIbGib_V1 } from '../../../common/secret/secret-types.mjs';
17
21
 
18
22
 
23
+ /**
24
+ * for verbose logging
25
+ */
26
+ const logalot = GLOBAL_LOG_A_LOT;
27
+
19
28
  /**
20
29
  * Composes ib with given params info.
21
30
  *
@@ -20,9 +20,6 @@ import {
20
20
  } from '../space-types.mjs';
21
21
  import { IbGibSpaceAny } from '../space-base-v1.mjs';
22
22
  import { CIPHERTEXT_REL8N_NAME } from '../../../common/encrypt/encrypt-constants.mjs';
23
- import { CONSENSUS_REL8N_NAME } from '../../../common/other/other-constants.mjs';
24
- import { Subscription_V1 } from '../../../common/pubsub/subscription/subscription-v1.mjs';
25
- import { Subject_V1 } from '../../../common/pubsub/subject/subject-v1.mjs';
26
23
  import { SubjectWitness } from '../../../common/pubsub/subject/subject-types.mjs';
27
24
  import { SubscriptionWitness } from '../../../common/pubsub/subscription/subscription-types.mjs';
28
25
 
@@ -128,13 +125,16 @@ export interface OuterSpaceData extends IbGibSpaceData {
128
125
  }
129
126
 
130
127
  export interface OuterSpaceRel8ns extends IbGibSpaceRel8ns {
131
- [CIPHERTEXT_REL8N_NAME]?: IbGibAddr[];
132
128
  /**
133
- * ATOW this will only be CONSENSUS_ADDR_SYNC_NAIVE_PUT_MERGE
129
+ * the ciphertext will contain private data that is typed per use case (per
130
+ * concrete implementation).
134
131
  */
135
- [CONSENSUS_REL8N_NAME]?: IbGibAddr[];
132
+ [CIPHERTEXT_REL8N_NAME]?: IbGibAddr[];
136
133
  }
137
134
 
135
+ /**
136
+ *
137
+ */
138
138
  export interface OuterSpaceIbGib
139
139
  extends IbGib_V1<OuterSpaceData, OuterSpaceRel8ns> {
140
140
  }
@@ -574,6 +574,9 @@ export interface SagaInfo<
574
574
  sagaId: string;
575
575
  /**
576
576
  * Reference to the space with which we're communicating.
577
+ *
578
+ * Note that this is a witness not just an ibgib data shape. so you will be
579
+ * able to pass in args to witness to this space.
577
580
  */
578
581
  outerSpace: IbGibSpaceAny;
579
582
  spaceId: string;