@ibgib/core-gib 0.0.64 → 0.0.65
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.
- package/dist/common/other/other-constants.d.mts +0 -2
- package/dist/common/other/other-constants.d.mts.map +1 -1
- package/dist/common/other/other-constants.mjs +0 -2
- package/dist/common/other/other-constants.mjs.map +1 -1
- package/dist/witness/app/app-helper.d.mts +0 -1
- package/dist/witness/app/app-helper.d.mts.map +1 -1
- package/dist/witness/app/app-helper.mjs +3 -3
- package/dist/witness/app/app-helper.mjs.map +1 -1
- package/dist/witness/space/metaspace/metaspace-base.d.mts +1 -1
- package/dist/witness/space/metaspace/metaspace-base.d.mts.map +1 -1
- package/dist/witness/space/metaspace/metaspace-base.mjs +40 -28
- package/dist/witness/space/metaspace/metaspace-base.mjs.map +1 -1
- package/dist/witness/space/metaspace/metaspace-types.d.mts +1 -1
- package/dist/witness/space/metaspace/metaspace-types.d.mts.map +1 -1
- package/dist/witness/space/outer-space/outer-space-helper.d.mts.map +1 -1
- package/dist/witness/space/outer-space/outer-space-helper.mjs +5 -0
- package/dist/witness/space/outer-space/outer-space-helper.mjs.map +1 -1
- package/dist/witness/space/outer-space/outer-space-types.d.mts +0 -5
- package/dist/witness/space/outer-space/outer-space-types.d.mts.map +1 -1
- package/dist/witness/space/outer-space/outer-space-types.mjs +0 -1
- package/dist/witness/space/outer-space/outer-space-types.mjs.map +1 -1
- package/package.json +1 -1
- package/src/common/other/other-constants.mts +0 -4
- package/src/witness/app/app-helper.mts +3 -3
- package/src/witness/space/metaspace/metaspace-base.mts +39 -29
- package/src/witness/space/metaspace/metaspace-types.mts +1 -1
- package/src/witness/space/outer-space/outer-space-helper.mts +9 -0
- package/src/witness/space/outer-space/outer-space-types.mts +0 -7
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { IbGibSpaceOptionsCmdModifier, } from '../space-types.mjs';
|
|
12
12
|
import { CIPHERTEXT_REL8N_NAME } from '../../../common/encrypt/encrypt-constants.mjs';
|
|
13
|
-
import { CONSENSUS_REL8N_NAME } from '../../../common/other/other-constants.mjs';
|
|
14
13
|
export const StatusCode = {
|
|
15
14
|
/**
|
|
16
15
|
* Using this as the code for the parent primitive.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outer-space-types.mjs","sourceRoot":"","sources":["../../../../src/witness/space/outer-space/outer-space-types.mts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAGH,4BAA4B,GAE/B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"outer-space-types.mjs","sourceRoot":"","sources":["../../../../src/witness/space/outer-space/outer-space-types.mts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAGH,4BAA4B,GAE/B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AA8BtF,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB;;OAEG;IACH,SAAS,EAAE,WAAyB;IACpC;;OAEG;IACH,SAAS,EAAE,WAAyB;IACpC;;;;;;;;OAQG;IACH,OAAO,EAAE,SAAuB;IAChC;;;;;OAKG;IACH,QAAQ,EAAE,UAAwB;IAClC;;;;;OAKG;IACH,OAAO,EAAE,SAAuB;IAChC;;;;;;;OAOG;IACH,UAAU,EAAE,YAA0B;IACtC;;;;;;;OAOG;IACH,YAAY,EAAE,cAA4B;IAC1C;;;;;;OAMG;IACH,cAAc,EAAE,gBAA8B;IAC9C;;;;;;;;;OASG;IACH,SAAS,EAAE,WAAyB;CACvC,CAAA;AAgHD;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IACxC,GAAG,4BAA4B;CAClC,CAAA;AASD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACvC,GAAG,4BAA4B,EAAE,cAAc;IAC/C;;OAEG;IACH,IAAI,EAAE,MAAqC;CAC9C,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibgib/core-gib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.65",
|
|
4
4
|
"description": "ibgib core functionality, including base architecture for witnesses, spaces, apps, robbots, etc., as well as shared utility functions. Node v19+ needed for heavily-used isomorphic webcrypto hashing consumed in both node and browsers.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://gitlab.com/ibgib/core-gib",
|
|
@@ -16,10 +16,6 @@ import { SYNC_SPACE_REL8N_NAME } from '../../witness/space/space-constants.mjs';
|
|
|
16
16
|
import { DEFAULT_ROOT_REL8N_NAME, ROOT_REL8N_NAME } from '../root/root-constants.mjs';
|
|
17
17
|
import { TAGGED_REL8N_NAME, TAG_REL8N_NAME } from '../tag/tag-constants.mjs';
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
export const CONSENSUS_REL8N_NAME = 'consensus';
|
|
21
|
-
export const CONSENSUS_ADDR_SYNC_NAIVE_PUT_MERGE = 'sync naive put merge^gib'
|
|
22
|
-
|
|
23
19
|
export const AUTOSYNC_ALWAYS_REL8N_NAME = 'always';
|
|
24
20
|
export const ARCHIVE_REL8N_NAME = 'archive';
|
|
25
21
|
export const TRASH_REL8N_NAME = 'trash';
|
|
@@ -325,6 +325,6 @@ export class AppFormBuilder extends WitnessFormBuilder {
|
|
|
325
325
|
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
export function documentLocationIsAtWelcomePage(): boolean {
|
|
329
|
-
|
|
330
|
-
}
|
|
328
|
+
// export function documentLocationIsAtWelcomePage(): boolean {
|
|
329
|
+
// return ['welcome', '/welcome', '/welcome/'].includes(document.location.pathname);
|
|
330
|
+
// }
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { delay, getUUID, groupBy, pretty } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
|
|
2
2
|
import { encrypt, decrypt, } from '@ibgib/encrypt-gib/dist/encrypt-decrypt.mjs';
|
|
3
|
+
import { DEFAULT_ALPHABET_INDEXING_MODE_BLOCKMODE, DEFAULT_ALPHABET_INDEXING_MODE_LEGACY } from '@ibgib/encrypt-gib/dist/constants.mjs';
|
|
3
4
|
import { IbGib_V1, } from '@ibgib/ts-gib/dist/V1/types.mjs';
|
|
4
5
|
import { GIB, GIB_DELIMITER, IB, ROOT, } from '@ibgib/ts-gib/dist/V1/constants.mjs';
|
|
5
6
|
import { IbGibAddr, TjpIbGibAddr, TransformResult, } from '@ibgib/ts-gib/dist/types.mjs';
|
|
@@ -49,7 +50,7 @@ import { spaceNameIsValid, } from '../../../witness/space/space-helper.mjs';
|
|
|
49
50
|
import { RobbotPromptResult } from '../../../witness/robbot/robbot-types.mjs';
|
|
50
51
|
import { createNewRobbot, validateCommonRobbotData, validateCommonRobbotIbGib } from '../../../witness/robbot/robbot-helper.mjs';
|
|
51
52
|
import { AppPromptResult } from '../../../witness/app/app-types.mjs';
|
|
52
|
-
import { createNewApp,
|
|
53
|
+
import { createNewApp, } from '../../../witness/app/app-helper.mjs';
|
|
53
54
|
import { CommentIbGib_V1, UpdateCommentPromptResult } from '../../../common/comment/comment-types.mjs';
|
|
54
55
|
import { IbGibCacheService } from '../../../common/cache/cache-types.mjs';
|
|
55
56
|
import { BOOTSTRAP_DATA_KNOWN_SPACE_IDS_KEY, BOOTSTRAP_IBGIB_ADDR } from '../../../witness/space/bootstrap/bootstrap-constants.mjs';
|
|
@@ -1879,19 +1880,19 @@ export abstract class MetaspaceBase implements MetaspaceService {
|
|
|
1879
1880
|
const lc = `${this.lc}[${this.getPlaintextString.name}]`;
|
|
1880
1881
|
try {
|
|
1881
1882
|
// validate
|
|
1882
|
-
if ((secretIbGibs || []).length === 0) { throw new Error(`secretIbGibs required
|
|
1883
|
+
if ((secretIbGibs || []).length === 0) { throw new Error(`secretIbGibs required. (E: 99a605b540c54b6db4d2ffe2caeb226a)`); }
|
|
1883
1884
|
if (!ciphertextIbGib.data) { throw new Error(`ciphertextIbGib.data falsy (E: 598fc6473149e240a7d6916ecf642323)`); }
|
|
1884
1885
|
if (!ciphertextIbGib.data.ciphertext) { throw new Error(`ciphertextIbGib.data.ciphertext falsy (E: 0e764a71ec214132a5a528f17f495a7c)`); }
|
|
1885
|
-
if (!ciphertextIbGib.rel8ns?.encryption) { throw new Error(`ciphertextIbGib.rel8ns.encryption falsy`) }
|
|
1886
|
-
if (ciphertextIbGib.rel8ns!.encryption!.length !== 1) { throw new Error(`ciphertextIbGib.rel8ns!.encryption!.length !== 1`); }
|
|
1886
|
+
if (!ciphertextIbGib.rel8ns?.encryption) { throw new Error(`ciphertextIbGib.rel8ns.encryption falsy (E: a0b4d5d8674b4d0191fa619164153022)`) }
|
|
1887
|
+
if (ciphertextIbGib.rel8ns!.encryption!.length !== 1) { throw new Error(`ciphertextIbGib.rel8ns!.encryption!.length !== 1 (E: a4a463e1ef0e45b4917eb04cb40d8173)`); }
|
|
1887
1888
|
|
|
1888
1889
|
// get corresponding encryption ibgib for encryption settings
|
|
1889
1890
|
const encryptionAddr = ciphertextIbGib.rel8ns!.encryption![0];
|
|
1890
1891
|
const resEncryption = await this.get({ addr: encryptionAddr, space });
|
|
1891
|
-
if (!resEncryption.success) { throw new Error(`get encryption failed`); }
|
|
1892
|
-
if ((resEncryption.ibGibs || []).length !== 1) { throw new Error(`get encryption retrieved non-1 length (eesh)`); }
|
|
1892
|
+
if (!resEncryption.success) { throw new Error(`get encryption failed (E: feef34c05fae439c81ade7fc23037af1)`); }
|
|
1893
|
+
if ((resEncryption.ibGibs || []).length !== 1) { throw new Error(`get encryption retrieved non-1 length (eesh) (E: 5d7e2023cc2b4e349574c17d5cfc8867)`); }
|
|
1893
1894
|
const encryptionIbGib = resEncryption.ibGibs![0] as IbGib_V1<EncryptionData_V1>;
|
|
1894
|
-
if (!encryptionIbGib.data) { throw new Error(
|
|
1895
|
+
if (!encryptionIbGib.data) { throw new Error(`encryptionIbGib.data falsy (E: 409a243afbf24c20987524f6588816fa)`); }
|
|
1895
1896
|
|
|
1896
1897
|
// prompt user for the password
|
|
1897
1898
|
const password = await this.getPasswordForSecrets({
|
|
@@ -1904,13 +1905,23 @@ export abstract class MetaspaceBase implements MetaspaceService {
|
|
|
1904
1905
|
|
|
1905
1906
|
// we're about the decrypt, but maybe the data doesn't have everything.
|
|
1906
1907
|
// So WARN for any defaults we're using.
|
|
1907
|
-
if (!encryptionIbGib.data.initialRecursions) { console.warn(`${lc} using default initialRecursions`); }
|
|
1908
|
-
if (!encryptionIbGib.data.recursionsPerHash) { console.warn(`${lc} using default recursionsPerHash`); }
|
|
1909
|
-
if (!encryptionIbGib.data.saltStrategy) { console.warn(`${lc} using default saltStrategy`); }
|
|
1910
|
-
if (!encryptionIbGib.data.hashAlgorithm) { console.warn(`${lc} using default hashAlgorithm`); }
|
|
1908
|
+
if (!encryptionIbGib.data.initialRecursions) { console.warn(`${lc} using default initialRecursions because encryptionIbGib does not state this explicitly (W: 66774cbfccd44423949d34167da6d50b)`); }
|
|
1909
|
+
if (!encryptionIbGib.data.recursionsPerHash) { console.warn(`${lc} using default recursionsPerHash because encryptionIbGib does not state this explicitly (W: 29e264094f384d259319ba8587cd4f63)`); }
|
|
1910
|
+
if (!encryptionIbGib.data.saltStrategy) { console.warn(`${lc} using default saltStrategy because encryptionIbGib does not state this explicitly (W: 7a5acadb8d634c7e87f62c86b57ac7a2)`); }
|
|
1911
|
+
if (!encryptionIbGib.data.hashAlgorithm) { console.warn(`${lc} using default hashAlgorithm because encryptionIbGib does not state this explicitly(W: 2254db3569534b239a8c471b700c8500)`); }
|
|
1912
|
+
|
|
1913
|
+
const defaultIndexingMode = encryptionIbGib.data.blockMode ?
|
|
1914
|
+
DEFAULT_ALPHABET_INDEXING_MODE_BLOCKMODE :
|
|
1915
|
+
DEFAULT_ALPHABET_INDEXING_MODE_LEGACY;
|
|
1916
|
+
if (encryptionIbGib.data.blockMode) {
|
|
1917
|
+
if (!encryptionIbGib.data.blockModeOptions) { throw new Error(`invalid encryptionIbGib.data. blockMode is truthy but blockModeOptions is falsy. (E: 84bbc27a5248b7c4734a1674e41dd224)`); }
|
|
1918
|
+
if (!encryptionIbGib.data.indexingMode) {
|
|
1919
|
+
console.warn(`${lc} not complete. using default indexingMode ${defaultIndexingMode} because encryptionIbGib does not state this explicitly. (W: c15797cd8d0740ea886a348c10be2e5c)`)
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1911
1922
|
|
|
1912
1923
|
// do actual decryption
|
|
1913
|
-
if (logalot) { console.log(`${lc} starting decrypt
|
|
1924
|
+
if (logalot) { console.log(`${lc} starting decrypt... (I: e14176ebc9a7470fb977d2184f1e2430)`); }
|
|
1914
1925
|
const timerName = 'sync_log decrypt';
|
|
1915
1926
|
console.time(timerName);
|
|
1916
1927
|
console.timeLog(timerName, 'decrypting...');
|
|
@@ -1927,10 +1938,12 @@ export abstract class MetaspaceBase implements MetaspaceService {
|
|
|
1927
1938
|
hashAlgorithm:
|
|
1928
1939
|
encryptionIbGib.data.hashAlgorithm || DEFAULT_ENCRYPTION_HASH_ALGORITHM,
|
|
1929
1940
|
encryptedDataDelimiter: encryptionIbGib.data.encryptedDataDelimiter,
|
|
1941
|
+
blockMode: encryptionIbGib.data.blockMode ? encryptionIbGib.data.blockModeOptions! : undefined,
|
|
1942
|
+
indexingMode: encryptionIbGib.data.indexingMode || defaultIndexingMode,
|
|
1930
1943
|
});
|
|
1931
1944
|
console.timeLog(timerName, 'decrypting complete.');
|
|
1932
1945
|
console.timeEnd(timerName);
|
|
1933
|
-
if (logalot) { console.log(`${lc} decrypt complete
|
|
1946
|
+
if (logalot) { console.log(`${lc} decrypt complete. (I: 15a8182230294a8a96504ba3667f039a)`); }
|
|
1934
1947
|
if (resDecrypt.errors?.length ?? 0 > 0) { throw new Error(resDecrypt.errors!.join('|')); }
|
|
1935
1948
|
|
|
1936
1949
|
if (!resDecrypt.decryptedData) { throw new Error(`(UNEXPECTED) resDecrypt has no errors but resDecrypt.decryptedData falsy? (E: 06e73992fb02e45e3c18db33f9a61b23)`); }
|
|
@@ -1960,33 +1973,33 @@ export abstract class MetaspaceBase implements MetaspaceService {
|
|
|
1960
1973
|
try {
|
|
1961
1974
|
// validation
|
|
1962
1975
|
if (!space) { throw new Error(`space required (E: d4d3eaa2d7b9143cf1173b8ae6344c23)`); }
|
|
1963
|
-
if (!encryptedSpace.rel8ns?.ciphertext) { throw new Error(`encryptedSpace is not a ciphertext`); }
|
|
1964
|
-
if (encryptedSpace.rel8ns!.ciphertext!.length !== 1) { throw new Error(`only 1 ciphertext rel8n allowed
|
|
1976
|
+
if (!encryptedSpace.rel8ns?.ciphertext) { throw new Error(`encryptedSpace is not a ciphertext (E: be5504a5e2b84f3eaa8fbd6e13aab659)`); }
|
|
1977
|
+
if (encryptedSpace.rel8ns!.ciphertext!.length !== 1) { throw new Error(`only 1 ciphertext rel8n allowed... (E: e8ab2ec38ad844dfb229efc5b8981946)`); }
|
|
1965
1978
|
|
|
1966
1979
|
// get ciphertext ibgib
|
|
1967
1980
|
const ciphertextAddr = encryptedSpace.rel8ns!.ciphertext![0];
|
|
1968
1981
|
const resCiphertext = await this.get({ addr: ciphertextAddr, space });
|
|
1969
|
-
if (!resCiphertext.success) { throw new Error(`get ciphertext failed`); }
|
|
1970
|
-
if ((resCiphertext.ibGibs || []).length !== 1) { throw new Error(`get ciphertext retrieved non-1 length (eesh)`); }
|
|
1982
|
+
if (!resCiphertext.success) { throw new Error(`get ciphertext failed (E: e58b3471c0334cd7bc626998106e6547)`); }
|
|
1983
|
+
if ((resCiphertext.ibGibs || []).length !== 1) { throw new Error(`get ciphertext retrieved non-1 length (eesh) (E: a3a1f00e827b4f88a42b4a7433cf1065)`); }
|
|
1971
1984
|
const ciphertextIbGib = resCiphertext.ibGibs![0] as CiphertextIbGib_V1;
|
|
1972
1985
|
|
|
1973
1986
|
// get secrets associated with enciphered space
|
|
1974
|
-
if (!encryptedSpace.rel8ns?.secret) { throw new Error(
|
|
1987
|
+
if (!encryptedSpace.rel8ns?.secret) { throw new Error(`!encryptionIbGib.rel8ns?.secret (E: 8bfed1541976433da9402d7d3a9138dd)`); }
|
|
1975
1988
|
const secretAddrs = encryptedSpace.rel8ns!.secret!;
|
|
1976
1989
|
const localUserSpace = await this.getLocalUserSpace({});
|
|
1977
|
-
if (!localUserSpace) { throw new Error(`(UNEXPECTED) could not get localUserSpace? (E: 3c5687a15b3b58e3dcf1eca4f5fe5723)`); }
|
|
1990
|
+
if (!localUserSpace) { throw new Error(`(UNEXPECTED) could not get localUserSpace? (E: 3c5687a15b3b58e3dcf1eca4f5fe5723) (E: c123b340177647968e10a6b119d84d2b)`); }
|
|
1978
1991
|
const argGetSecrets = await localUserSpace.argy({
|
|
1979
1992
|
argData: { ibGibAddrs: secretAddrs, cmd: 'get', }
|
|
1980
1993
|
});
|
|
1981
1994
|
const resSecrets = await localUserSpace.witness(argGetSecrets);
|
|
1982
1995
|
if (!resSecrets.data?.success || (resSecrets.ibGibs || []).length === 0) {
|
|
1983
|
-
throw new Error(`couldn't get secret ibgibs`);
|
|
1996
|
+
throw new Error(`couldn't get secret ibgibs (E: cb17687f842f4296a9ecf89d9a568e46)`);
|
|
1984
1997
|
}
|
|
1985
1998
|
const secretIbGibs = resSecrets.ibGibs.concat() as IbGib_V1<SecretData_V1>[];
|
|
1986
1999
|
|
|
1987
2000
|
// get plaintext now that we have the ciphertext ibgib and secret ibgib(s)
|
|
1988
2001
|
const plaintextString = await this.getPlaintextString({
|
|
1989
|
-
ciphertextIbGib
|
|
2002
|
+
ciphertextIbGib,
|
|
1990
2003
|
fnPromptPassword,
|
|
1991
2004
|
dontPrompt,
|
|
1992
2005
|
secretIbGibs,
|
|
@@ -1994,8 +2007,8 @@ export abstract class MetaspaceBase implements MetaspaceService {
|
|
|
1994
2007
|
});
|
|
1995
2008
|
|
|
1996
2009
|
const syncSpaceData = JSON.parse(plaintextString);
|
|
1997
|
-
if (syncSpaceData.type !== 'sync') { throw new Error(`syncSpaceData.type !== 'sync'...this is the only one implemented right now`); }
|
|
1998
|
-
if (syncSpaceData.subtype !== 'aws-dynamodb') { throw new Error(`syncSpaceData.subtype !== 'aws-dynamodb'...only one right now dude`); }
|
|
2010
|
+
if (syncSpaceData.type !== 'sync') { throw new Error(`syncSpaceData.type !== 'sync'...this is the only one implemented right now (E: 509b2373d6f8445ebe5bd6f27f62af93)`); }
|
|
2011
|
+
if (syncSpaceData.subtype !== 'aws-dynamodb') { throw new Error(`syncSpaceData.subtype !== 'aws-dynamodb'...only one right now dude (E: b5caaf3b4c60438eb2cee58ce8e1d3f6)`); }
|
|
1999
2012
|
|
|
2000
2013
|
// this is the original aws only implementation. I've just added (untested)
|
|
2001
2014
|
// a quick factory function where the consumer would do the following code.
|
|
@@ -2300,7 +2313,7 @@ export abstract class MetaspaceBase implements MetaspaceService {
|
|
|
2300
2313
|
}
|
|
2301
2314
|
}
|
|
2302
2315
|
|
|
2303
|
-
async
|
|
2316
|
+
async getSyncSpaces({
|
|
2304
2317
|
unwrapEncrypted,
|
|
2305
2318
|
createIfNone,
|
|
2306
2319
|
dontPrompt,
|
|
@@ -2330,11 +2343,8 @@ export abstract class MetaspaceBase implements MetaspaceService {
|
|
|
2330
2343
|
fnPromptEncryption: (space: IbGibSpaceAny) => Promise<EncryptionIbGib_V1 | undefined>,
|
|
2331
2344
|
fnPromptOuterSpace: (space: IbGibSpaceAny) => Promise<IbGibSpaceAny | undefined>,
|
|
2332
2345
|
}): Promise<IbGibSpaceAny[]> {
|
|
2333
|
-
const lc = `${this.lc}[${this.
|
|
2346
|
+
const lc = `${this.lc}[${this.getSyncSpaces.name}]`;
|
|
2334
2347
|
try {
|
|
2335
|
-
// I don't want this pinging the user if we're on the welcome page.
|
|
2336
|
-
dontPrompt = dontPrompt ?? documentLocationIsAtWelcomePage();
|
|
2337
|
-
|
|
2338
2348
|
space = space ?? await this.getLocalUserSpace({});
|
|
2339
2349
|
if (!space) { throw new Error(`space falsy and localUserSpace not initialized (?) (E: bf09346708ba4d6e9a1389bd1b66d500)`); }
|
|
2340
2350
|
|
|
@@ -2666,7 +2676,7 @@ export abstract class MetaspaceBase implements MetaspaceService {
|
|
|
2666
2676
|
if (logalot) { console.log(`${lc} get sync spaces (returns if none)`); }
|
|
2667
2677
|
console.timeLog(syncTimelogName, 'getAppSyncSpaces starting (unwrapEncrypted is true) starting...');
|
|
2668
2678
|
if (fnPreSyncProgress) { fnPreSyncProgress('getting app sync spaces... (I: aa2e8f32ab26457bad703218aa7fb47d)'); }
|
|
2669
|
-
const appSyncSpaces: IbGibSpaceAny[] = await this.
|
|
2679
|
+
const appSyncSpaces: IbGibSpaceAny[] = await this.getSyncSpaces({
|
|
2670
2680
|
unwrapEncrypted: true,
|
|
2671
2681
|
createIfNone: true,
|
|
2672
2682
|
space: localUserSpace,
|
|
@@ -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
|
|
|
@@ -129,10 +126,6 @@ export interface OuterSpaceData extends IbGibSpaceData {
|
|
|
129
126
|
|
|
130
127
|
export interface OuterSpaceRel8ns extends IbGibSpaceRel8ns {
|
|
131
128
|
[CIPHERTEXT_REL8N_NAME]?: IbGibAddr[];
|
|
132
|
-
/**
|
|
133
|
-
* ATOW this will only be CONSENSUS_ADDR_SYNC_NAIVE_PUT_MERGE
|
|
134
|
-
*/
|
|
135
|
-
[CONSENSUS_REL8N_NAME]?: IbGibAddr[];
|
|
136
129
|
}
|
|
137
130
|
|
|
138
131
|
export interface OuterSpaceIbGib
|