@ibgib/core-gib 0.0.13 → 0.0.15
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/core-types.d.mts +0 -440
- package/dist/core-types.d.mts.map +1 -1
- package/dist/witness/app/app-base-v1.d.mts +2 -2
- package/dist/witness/app/app-base-v1.d.mts.map +1 -1
- package/dist/witness/app/app-base-v1.mjs.map +1 -1
- package/dist/witness/app/app-helper.d.mts +5 -4
- package/dist/witness/app/app-helper.d.mts.map +1 -1
- package/dist/witness/app/app-helper.mjs +2 -2
- package/dist/witness/app/app-helper.mjs.map +1 -1
- package/dist/witness/app/app-types.d.mts +0 -50
- package/dist/witness/app/app-types.d.mts.map +1 -1
- package/dist/witness/app/app-types.mjs.map +1 -1
- package/dist/witness/robbot/robbot-base-v1.d.mts.map +1 -1
- package/dist/witness/robbot/robbot-base-v1.mjs.map +1 -1
- package/dist/witness/robbot/robbot-helper.d.mts +5 -4
- package/dist/witness/robbot/robbot-helper.d.mts.map +1 -1
- package/dist/witness/robbot/robbot-helper.mjs +2 -4
- package/dist/witness/robbot/robbot-helper.mjs.map +1 -1
- package/dist/witness/space/metaspace/metaspace-base.d.mts +6 -2
- package/dist/witness/space/metaspace/metaspace-base.d.mts.map +1 -1
- package/dist/witness/space/metaspace/metaspace-base.mjs +4 -5
- package/dist/witness/space/metaspace/metaspace-base.mjs.map +1 -1
- package/dist/witness/space/metaspace/metaspace-types.d.mts +4 -2
- package/dist/witness/space/metaspace/metaspace-types.d.mts.map +1 -1
- package/dist/witness/witness-base-v1.d.mts.map +1 -1
- package/dist/witness/witness-base-v1.mjs.map +1 -1
- package/dist/witness/witness-with-context/witness-with-context-base-v1.d.mts +4 -4
- package/dist/witness/witness-with-context/witness-with-context-base-v1.d.mts.map +1 -1
- package/dist/witness/witness-with-context/witness-with-context-base-v1.mjs.map +1 -1
- package/package.json +1 -1
- package/src/core-types.mts +417 -417
- package/src/witness/app/app-base-v1.mts +2 -2
- package/src/witness/app/app-helper.mts +6 -4
- package/src/witness/app/app-types.mts +50 -51
- package/src/witness/robbot/robbot-base-v1.mts +0 -1
- package/src/witness/robbot/robbot-helper.mts +6 -5
- package/src/witness/space/metaspace/metaspace-base.mts +6 -3
- package/src/witness/space/metaspace/metaspace-types.mts +4 -2
- package/src/witness/witness-base-v1.mts +0 -1
- package/src/witness/witness-with-context/witness-with-context-base-v1.mts +4 -4
|
@@ -14,7 +14,6 @@ import { PicIbGib_V1 } from '../../common/pic/pic-types.mjs';
|
|
|
14
14
|
import { ErrorIbGib_V1 } from '../../common/error/error-types.mjs';
|
|
15
15
|
import { validateCommonAppData } from './app-helper.mjs';
|
|
16
16
|
import { argy_, isArg, isCommand, resulty_ } from '../witness-helper.mjs';
|
|
17
|
-
import { IbGibLocalSpaceService_AllPowerful } from '../../core-types.mjs';
|
|
18
17
|
import { pretty } from '@ibgib/helper-gib';
|
|
19
18
|
import { GLOBAL_LOG_A_LOT } from '../../core-constants.mjs';
|
|
20
19
|
import { errorIbGib } from '../../common/error/error-helper.mjs';
|
|
@@ -22,6 +21,7 @@ import { getIbGibAddr } from '@ibgib/ts-gib';
|
|
|
22
21
|
import { isComment } from '../../common/comment/comment-helper.mjs';
|
|
23
22
|
import { isPic } from '../../common/pic/pic-helper.mjs';
|
|
24
23
|
import { WitnessWithContextBase_V1 } from '../witness-with-context/witness-with-context-base-v1.mjs';
|
|
24
|
+
import { MetaspaceService } from '../space/metaspace/metaspace-types.mjs';
|
|
25
25
|
|
|
26
26
|
const logalot = GLOBAL_LOG_A_LOT || false;
|
|
27
27
|
|
|
@@ -62,7 +62,7 @@ export abstract class AppBase_V1<
|
|
|
62
62
|
* Reference to the local ibgibs service, which is one way at getting at the
|
|
63
63
|
* local user space.
|
|
64
64
|
*/
|
|
65
|
-
ibgibsSvc:
|
|
65
|
+
ibgibsSvc: MetaspaceService | undefined;
|
|
66
66
|
|
|
67
67
|
constructor(initialData?: TData, initialRel8ns?: TRel8ns) {
|
|
68
68
|
super(initialData, initialRel8ns);
|
|
@@ -4,7 +4,7 @@ import { validateIbGibIntrinsically } from '@ibgib/ts-gib/dist/V1/validate-helpe
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
import { GLOBAL_LOG_A_LOT } from '../../core-constants.mjs';
|
|
7
|
-
import { AppData_V1, } from './app-types.mjs';
|
|
7
|
+
import { AppData_V1, AppIbGib_V1, AppPromptResult, } from './app-types.mjs';
|
|
8
8
|
import { APP_NAME_REGEXP, APP_REL8N_NAME, } from './app-constants.mjs';
|
|
9
9
|
import { IbGibAppAny } from './app-base-v1.mjs';
|
|
10
10
|
// import { CommonService } from '../../services/common.service.mjs';
|
|
@@ -13,9 +13,9 @@ import { IbGibSpaceAny } from '../space/space-base-v1.mjs';
|
|
|
13
13
|
import { WitnessFormBuilder } from '../witness-form-builder.mjs';
|
|
14
14
|
// import { persistTransformResult, registerNewIbGib, rel8ToSpecialIbGib } from './space.mjs';
|
|
15
15
|
import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/index.mjs';
|
|
16
|
-
import { IbGibLocalSpaceService_AllPowerful } from '../../core-types.mjs';
|
|
17
16
|
import { IbGibTimelineUpdateInfo } from '../../common/other/other-types.mjs';
|
|
18
17
|
import { persistTransformResult, registerNewIbGib, rel8ToSpecialIbGib } from '../space/space-helper.mjs';
|
|
18
|
+
import { MetaspaceService } from '../space/metaspace/metaspace-types.mjs';
|
|
19
19
|
|
|
20
20
|
const logalot = GLOBAL_LOG_A_LOT || false;
|
|
21
21
|
|
|
@@ -207,14 +207,16 @@ export function getInfoFromAppInfoIb({
|
|
|
207
207
|
* @returns newly created app ibgib (witness)
|
|
208
208
|
*/
|
|
209
209
|
export async function createNewApp({
|
|
210
|
+
fnPromptApp,
|
|
210
211
|
ibgibs,
|
|
211
212
|
space,
|
|
212
213
|
}: {
|
|
214
|
+
fnPromptApp: (space: IbGibSpaceAny, ibGib: AppIbGib_V1 | null) => Promise<AppPromptResult | undefined>,
|
|
213
215
|
/**
|
|
214
216
|
* Either {@link common} or {@link ibgibs} is required
|
|
215
217
|
* @hack
|
|
216
218
|
*/
|
|
217
|
-
ibgibs?:
|
|
219
|
+
ibgibs?: MetaspaceService,
|
|
218
220
|
/**
|
|
219
221
|
* space within which to create the app. if not provided, the
|
|
220
222
|
* defaults to the local user space via {@link common} or {@link ibgibs}.
|
|
@@ -231,7 +233,7 @@ export async function createNewApp({
|
|
|
231
233
|
|
|
232
234
|
// prompt user to create the ibgib, passing in null because we're
|
|
233
235
|
// creating not editing.
|
|
234
|
-
let resApp = await
|
|
236
|
+
let resApp = await fnPromptApp(space, /*ibGib*/ null);
|
|
235
237
|
|
|
236
238
|
if (!resApp) { throw new Error(`resApp falsy after prompt for app. (E: 2225a567abcd680a5e957e81fbb64123)`); }
|
|
237
239
|
|
|
@@ -70,7 +70,6 @@ export interface AppData_V1 extends WitnessData_V1 {
|
|
|
70
70
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
|
|
74
73
|
export interface AppRel8ns_V1 extends WitnessRel8ns_V1 {
|
|
75
74
|
}
|
|
76
75
|
|
|
@@ -188,16 +187,16 @@ export interface AppResultIbGib<
|
|
|
188
187
|
extends WitnessResultIbGib<TIbGib, TResultData, TResultRel8ns> {
|
|
189
188
|
}
|
|
190
189
|
|
|
191
|
-
/**
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
export interface ExtensionSelectionInfo {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
190
|
+
// /**
|
|
191
|
+
// * When coming from the extension in firefox/chrome(chromium), this info
|
|
192
|
+
// * represents a selection to be converted/saved in an ibgib graph.
|
|
193
|
+
// */
|
|
194
|
+
// export interface ExtensionSelectionInfo {
|
|
195
|
+
// type: 'comment' | 'link';
|
|
196
|
+
// text: string;
|
|
197
|
+
// url?: string;
|
|
198
|
+
// children?: ExtensionSelectionInfo[];
|
|
199
|
+
// }
|
|
201
200
|
|
|
202
201
|
/**
|
|
203
202
|
* this is generated in background.js (WARNING! background.js atow is generated
|
|
@@ -208,45 +207,45 @@ export interface ExtensionSelectionInfo {
|
|
|
208
207
|
* text or clicks an ibgib context menu item to initiate the app, this info is
|
|
209
208
|
* passed to the app via query params (atow).
|
|
210
209
|
*/
|
|
211
|
-
export interface ExtensionLaunchInfo {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
210
|
+
// export interface ExtensionLaunchInfo {
|
|
211
|
+
// /** brand the event so we know it's ours */
|
|
212
|
+
// ib: boolean;
|
|
213
|
+
// /**
|
|
214
|
+
// * indicate to the receiving angular app that we're launching
|
|
215
|
+
// * from an extension in firefox/chrome. (this is obvious here in
|
|
216
|
+
// * background.js but in the angular app, not so much).
|
|
217
|
+
// */
|
|
218
|
+
// isExtensionLaunch: boolean;
|
|
219
|
+
// /**
|
|
220
|
+
// * So consumer knows where this is coming from. (obvious to us
|
|
221
|
+
// * here, but helps consumer)
|
|
222
|
+
// */
|
|
223
|
+
// lc: string,
|
|
224
|
+
// /**
|
|
225
|
+
// * text of the context menu clicked
|
|
226
|
+
// * @link https://developer.chrome.com/docs/extensions/reference/contextMenus/#type-OnClickData
|
|
227
|
+
// */
|
|
228
|
+
// menuItemId: string;
|
|
229
|
+
// /**
|
|
230
|
+
// * url of the page that _initiates_ the click and starts the app.
|
|
231
|
+
// * so if the user is on wikipedia.org, selects some text and clicks on the ibgib link,
|
|
232
|
+
// * in order to generate some ibgib data based on the page, this will be
|
|
233
|
+
// * https://en.wikipedia.org/wiki/Phanerozoic (or whatever).
|
|
234
|
+
// *
|
|
235
|
+
// * @link https://developer.chrome.com/docs/extensions/reference/contextMenus/#type-OnClickData
|
|
236
|
+
// */
|
|
237
|
+
// pageUrl: string;
|
|
238
|
+
// /**
|
|
239
|
+
// * info about selections user made when starting the (extension) app.
|
|
240
|
+
// *
|
|
241
|
+
// * So if they highlight some text and add it, that is one info. If they highlight a whole paragraph
|
|
242
|
+
// * it will create a comment for the p and possibly children infos for links in that paragraph.
|
|
243
|
+
// *
|
|
244
|
+
// * Same goes for if they select a header tag.
|
|
245
|
+
// *
|
|
246
|
+
// * @link https://developer.chrome.com/docs/extensions/reference/contextMenus/#type-OnClickData
|
|
247
|
+
// */
|
|
248
|
+
// selectionInfos?: ExtensionSelectionInfo[];
|
|
249
|
+
// }
|
|
251
250
|
|
|
252
251
|
export type AppPromptResult = TransformResult<IbGibAppAny>;
|
|
@@ -28,7 +28,6 @@ import { CommentIbGib_V1 } from '../../common/comment/comment-types.mjs';
|
|
|
28
28
|
import { PicIbGib_V1 } from '../../common/pic/pic-types.mjs';
|
|
29
29
|
import { getInteractionIbGib_V1, validateCommonRobbotData } from './robbot-helper.mjs';
|
|
30
30
|
import { argy_, isArg, resulty_ } from '../witness-helper.mjs';
|
|
31
|
-
import { IbGibLocalSpaceService_AllPowerful } from '../../core-types.mjs';
|
|
32
31
|
import { validateIbGibIntrinsically } from '@ibgib/ts-gib/dist/V1/validate-helper.mjs';
|
|
33
32
|
import { ErrorIbGib_V1 } from '../../common/error/error-types.mjs';
|
|
34
33
|
import { Lex, clone, delay, getTimestamp, getUUID, pretty } from '@ibgib/helper-gib';
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
DEFAULT_ROBBOT_REQUEST_ESCAPE_STRING,
|
|
14
14
|
RobbotData_V1, RobbotIbGib_V1, RobbotInteractionData_V1, RobbotInteractionIbGib_V1,
|
|
15
15
|
RobbotInteractionIbInfo, RobbotInteractionRel8ns_V1, RobbotInteractionType,
|
|
16
|
-
ROBBOT_INTERACTION_ATOM, ROBBOT_SESSION_ATOM, DEFAULT_ROBBOT_REQUEST_MAX_LENGTH,
|
|
16
|
+
ROBBOT_INTERACTION_ATOM, ROBBOT_SESSION_ATOM, DEFAULT_ROBBOT_REQUEST_MAX_LENGTH, RobbotPromptResult,
|
|
17
17
|
} from './robbot-types.mjs';
|
|
18
18
|
import { IbGibSpaceAny } from '../space/space-base-v1.mjs';
|
|
19
19
|
import { persistTransformResult, registerNewIbGib, rel8ToSpecialIbGib } from '../space/space-helper.mjs';
|
|
20
20
|
import { isComment, parseCommentIb } from '../../common/comment/comment-helper.mjs';
|
|
21
21
|
import { ROBBOT_REL8N_NAME } from './robbot-constants.mjs';
|
|
22
|
-
import { IbGibLocalSpaceService_AllPowerful } from '../../core-types.mjs';
|
|
23
22
|
import { GLOBAL_LOG_A_LOT, ROBBOT_NAME_REGEXP, ROBBOT_PREFIX_SUFFIX_REGEXP, ROBBOT_PREFIX_SUFFIX_REGEXP_DESC } from '../../core-constants.mjs';
|
|
23
|
+
import { MetaspaceService } from '../space/metaspace/metaspace-types.mjs';
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
const logalot = GLOBAL_LOG_A_LOT || false;
|
|
@@ -196,15 +196,16 @@ export function parseRobbotIb({
|
|
|
196
196
|
* @returns newly created robbot ibgib (witness)
|
|
197
197
|
*/
|
|
198
198
|
export async function createNewRobbot({
|
|
199
|
-
|
|
199
|
+
fnPromptRobbot,
|
|
200
200
|
ibgibs,
|
|
201
201
|
space,
|
|
202
202
|
}: {
|
|
203
|
+
fnPromptRobbot: (space: IbGibSpaceAny, ibGib: RobbotIbGib_V1 | null) => Promise<RobbotPromptResult | undefined>;
|
|
203
204
|
/**
|
|
204
205
|
* Either {@link common} or {@link ibgibs} is required
|
|
205
206
|
* @hack
|
|
206
207
|
*/
|
|
207
|
-
ibgibs?:
|
|
208
|
+
ibgibs?: MetaspaceService,
|
|
208
209
|
/**
|
|
209
210
|
* space within which to create the robbot. if not provided, the
|
|
210
211
|
* defaults to the local user space via {@link common} or {@link ibgibs}.
|
|
@@ -221,7 +222,7 @@ export async function createNewRobbot({
|
|
|
221
222
|
|
|
222
223
|
// prompt user to create the ibgib, passing in null because we're
|
|
223
224
|
// creating not editing.
|
|
224
|
-
let resRobbot = await
|
|
225
|
+
let resRobbot = await fnPromptRobbot(space, /*ibGib because creating*/null);
|
|
225
226
|
|
|
226
227
|
if (!resRobbot) { throw new Error(`robbot prompt returned nothing. canceled? (E: 1a08529b53bd3d79c6587b196e5e0823)`); }
|
|
227
228
|
|
|
@@ -188,7 +188,6 @@ export abstract class MetaspaceBase implements MetaspaceService {
|
|
|
188
188
|
const lc = `${this.lc}[${this.getLocalUserSpace.name}]`;
|
|
189
189
|
try {
|
|
190
190
|
if (logalot) { console.log(`${lc} starting...`); }
|
|
191
|
-
debugger;
|
|
192
191
|
|
|
193
192
|
// if we're not explicit with skipLock, go by platform
|
|
194
193
|
// we only need to lock when doing the web, because we could
|
|
@@ -2388,9 +2387,11 @@ export abstract class MetaspaceBase implements MetaspaceService {
|
|
|
2388
2387
|
|
|
2389
2388
|
async getAppRobbotIbGibs({
|
|
2390
2389
|
createIfNone,
|
|
2390
|
+
fnPromptRobbot,
|
|
2391
2391
|
space,
|
|
2392
2392
|
}: {
|
|
2393
2393
|
createIfNone: boolean,
|
|
2394
|
+
fnPromptRobbot: (space: IbGibSpaceAny, ibGib: RobbotIbGib_V1 | null) => Promise<RobbotPromptResult | undefined>;
|
|
2394
2395
|
space?: IbGibSpaceAny,
|
|
2395
2396
|
}): Promise<RobbotIbGib_V1[]> {
|
|
2396
2397
|
const lc = `${this.lc}[${this.getAppRobbotIbGibs.name}]`;
|
|
@@ -2436,7 +2437,7 @@ export abstract class MetaspaceBase implements MetaspaceService {
|
|
|
2436
2437
|
|
|
2437
2438
|
if (appRobbots.length === 0 && createIfNone) {
|
|
2438
2439
|
console.error(`${lc} creating new robbot but should be not casting this on next line in src code. (E: 3252c5917e11421dbc1c26b280b8aeef)`);
|
|
2439
|
-
let robbot = await createNewRobbot({ ibgibs: this as any, space });
|
|
2440
|
+
let robbot = await createNewRobbot({ ibgibs: this as any, space, fnPromptRobbot });
|
|
2440
2441
|
if (robbot) {
|
|
2441
2442
|
appRobbots = await this.getSpecialRel8dIbGibs<RobbotIbGib_V1>({
|
|
2442
2443
|
type: "robbots",
|
|
@@ -2455,9 +2456,11 @@ export abstract class MetaspaceBase implements MetaspaceService {
|
|
|
2455
2456
|
|
|
2456
2457
|
async getAppAppIbGibs({
|
|
2457
2458
|
createIfNone,
|
|
2459
|
+
fnPromptApp,
|
|
2458
2460
|
space,
|
|
2459
2461
|
}: {
|
|
2460
2462
|
createIfNone: boolean,
|
|
2463
|
+
fnPromptApp: (space: IbGibSpaceAny, ibGib: AppIbGib_V1 | null) => Promise<AppPromptResult | undefined>,
|
|
2461
2464
|
space?: IbGibSpaceAny,
|
|
2462
2465
|
}): Promise<AppIbGib_V1[]> {
|
|
2463
2466
|
const lc = `${this.lc}[${this.getAppAppIbGibs.name}]`;
|
|
@@ -2495,7 +2498,7 @@ export abstract class MetaspaceBase implements MetaspaceService {
|
|
|
2495
2498
|
// create if applicable
|
|
2496
2499
|
if (appApps.length === 0 && createIfNone) {
|
|
2497
2500
|
console.error(`${lc} creating new app but should be not casting this on next line in src code. (E: 3252c5917e11421dbc1c26b280b8aeef)`);
|
|
2498
|
-
let app = await createNewApp({ ibgibs: this as any, space });
|
|
2501
|
+
let app = await createNewApp({ ibgibs: this as any, space, fnPromptApp });
|
|
2499
2502
|
if (app) {
|
|
2500
2503
|
appApps = await this.getSpecialRel8dIbGibs<AppIbGib_V1>({
|
|
2501
2504
|
type: "apps",
|
|
@@ -24,8 +24,8 @@ import {
|
|
|
24
24
|
EncryptionData_V1, EncryptionIbGib, EncryptionInfo_EncryptGib,
|
|
25
25
|
SecretData_V1, SecretIbGib_V1, SecretInfo_Password
|
|
26
26
|
} from '../../../common/encrypt/encrypt-types.mjs';
|
|
27
|
-
import { RobbotIbGib_V1 } from '../../../witness/robbot/robbot-types.mjs';
|
|
28
|
-
import { AppIbGib_V1 } from '../../../witness/app/app-types.mjs';
|
|
27
|
+
import { RobbotIbGib_V1, RobbotPromptResult } from '../../../witness/robbot/robbot-types.mjs';
|
|
28
|
+
import { AppIbGib_V1, AppPromptResult } from '../../../witness/app/app-types.mjs';
|
|
29
29
|
import { rel8ToSpecialIbGib, } from '../../../witness/space/space-helper.mjs';
|
|
30
30
|
import { GetDependencyGraphOptions } from '../../../common/other/graph-helper.mjs';
|
|
31
31
|
|
|
@@ -559,10 +559,12 @@ export interface MetaspaceService {
|
|
|
559
559
|
}): Promise<IbGibSpaceAny[]>;
|
|
560
560
|
getAppRobbotIbGibs(arg: {
|
|
561
561
|
createIfNone: boolean,
|
|
562
|
+
fnPromptRobbot: (space: IbGibSpaceAny, ibGib: RobbotIbGib_V1 | null) => Promise<RobbotPromptResult | undefined>;
|
|
562
563
|
space?: IbGibSpaceAny,
|
|
563
564
|
}): Promise<RobbotIbGib_V1[]>;
|
|
564
565
|
getAppAppIbGibs(arg: {
|
|
565
566
|
createIfNone: boolean,
|
|
567
|
+
fnPromptApp: (space: IbGibSpaceAny, ibGib: AppIbGib_V1 | null) => Promise<AppPromptResult | undefined>,
|
|
566
568
|
space?: IbGibSpaceAny,
|
|
567
569
|
}): Promise<AppIbGib_V1[]>;
|
|
568
570
|
syncIbGibs(arg: {
|
|
@@ -9,7 +9,6 @@ import { validateGib, validateIb, validateIbGibIntrinsically } from '@ibgib/ts-g
|
|
|
9
9
|
import { ErrorIbGib_V1 } from '../common/error/error-types.mjs';
|
|
10
10
|
import { toDto } from '../common/other/ibgib-helper.mjs';
|
|
11
11
|
import { GLOBAL_LOG_A_LOT } from '../core-constants.mjs';
|
|
12
|
-
import { IbGibLocalSpaceService_AllPowerful } from '../core-types.mjs';
|
|
13
12
|
import { clone, pretty } from '@ibgib/helper-gib';
|
|
14
13
|
|
|
15
14
|
const logalot = GLOBAL_LOG_A_LOT || false;
|
|
@@ -11,7 +11,6 @@ import { WitnessBase_V1, } from '../witness-base-v1.mjs';
|
|
|
11
11
|
import { CommentIbGib_V1 } from '../../common/comment/comment-types.mjs';
|
|
12
12
|
import { PicIbGib_V1 } from '../../common/pic/pic-types.mjs';
|
|
13
13
|
import { argy_, isArg, resulty_ } from '../witness-helper.mjs';
|
|
14
|
-
import { IbGibLocalSpaceService_AllPowerful } from '../../core-types.mjs';
|
|
15
14
|
import { ErrorIbGib_V1 } from '../../common/error/error-types.mjs';
|
|
16
15
|
import { errorIbGib } from '../../common/error/error-helper.mjs';
|
|
17
16
|
import { createCommentIbGib, parseCommentIb } from '../../common/comment/comment-helper.mjs';
|
|
@@ -20,6 +19,7 @@ import { getTjpAddr } from '../../common/other/ibgib-helper.mjs';
|
|
|
20
19
|
import { IbGibTimelineUpdateInfo } from '../../common/other/other-types.mjs';
|
|
21
20
|
import { WitnessArgIbGib, WitnessData_V1, WitnessRel8ns_V1 } from '../witness-types.mjs';
|
|
22
21
|
import { WitnessWithContextData_V1, WitnessWithContextRel8ns_V1 } from './witness-with-context-types.mjs';
|
|
22
|
+
import { MetaspaceService } from '../space/metaspace/metaspace-types.mjs';
|
|
23
23
|
|
|
24
24
|
const logalot = GLOBAL_LOG_A_LOT || true;
|
|
25
25
|
|
|
@@ -97,7 +97,7 @@ export abstract class WitnessWithContextBase_V1<
|
|
|
97
97
|
* Reference to the local ibgibs service, which is one way at getting at the
|
|
98
98
|
* local user space.
|
|
99
99
|
*/
|
|
100
|
-
public ibgibsSvc:
|
|
100
|
+
public ibgibsSvc: MetaspaceService | undefined;
|
|
101
101
|
|
|
102
102
|
protected _contextChangesSubscription: Subscription | undefined;
|
|
103
103
|
protected _currentWorkingContextIbGib: IbGib_V1 | undefined;
|
|
@@ -206,7 +206,7 @@ export abstract class WitnessWithContextBase_V1<
|
|
|
206
206
|
/**
|
|
207
207
|
* If provided, will register the newly created ibgib.
|
|
208
208
|
*/
|
|
209
|
-
ibgibsSvc?:
|
|
209
|
+
ibgibsSvc?: MetaspaceService,
|
|
210
210
|
// /**
|
|
211
211
|
// * If given (which atow is most likely the case), then the {@link TransformResult} will
|
|
212
212
|
// * be persisted in this `space`.
|
|
@@ -360,7 +360,7 @@ export abstract class WitnessWithContextBase_V1<
|
|
|
360
360
|
text: string,
|
|
361
361
|
contextIbGib: IbGib_V1,
|
|
362
362
|
rel8nName: string,
|
|
363
|
-
ibgibsSvc?:
|
|
363
|
+
ibgibsSvc?: MetaspaceService,
|
|
364
364
|
}): Promise<void> {
|
|
365
365
|
const lc = `${this.lc}[${this.createCommentAndRel8ToContextIbGib.name}]`;
|
|
366
366
|
try {
|