Skip to content

Commit daf3042

Browse files
style(Sky): Reformat SCM and CustomEditor callback arguments
Reformat long ternary operators and function call arguments to span multiple lines for improved readability. Changes affect SCM provider registration and CustomEditor capability registration handlers in SkyBridge. No functional changes - purely formatting improvements to match existing code style.
1 parent 3c76a37 commit daf3042

1 file changed

Lines changed: 27 additions & 15 deletions

File tree

Source/Function/SkyBridge.ts

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,9 @@ export async function InstallSkyBridge(): Promise<void> {
14441444
};
14451445
const Repository = Services.SCM.registerSCMProvider(Provider);
14461446
const ScmHandleNumber: number | undefined =
1447-
typeof Payload?.handle === "number" ? Payload.handle : undefined;
1447+
typeof Payload?.handle === "number"
1448+
? Payload.handle
1449+
: undefined;
14481450
const Shim: CelSCMShim = {
14491451
Provider,
14501452
Repository,
@@ -1473,7 +1475,8 @@ export async function InstallSkyBridge(): Promise<void> {
14731475
if (W?.process?.env?.LAND_DEV_LOG?.includes?.("cel-scm")) {
14741476
(W.console || console).warn(
14751477
`[Sky:CEL-SCM] registerSCMProvider failed for "${ScmId}": ${
1476-
(Error as { message?: string })?.message ?? String(Error)
1478+
(Error as { message?: string })?.message ??
1479+
String(Error)
14771480
}`,
14781481
);
14791482
}
@@ -1615,7 +1618,8 @@ export async function InstallSkyBridge(): Promise<void> {
16151618
if (W?.process?.env?.LAND_DEV_LOG?.includes?.("cel-scm")) {
16161619
(W.console || console).warn(
16171620
`[Sky:CEL-SCM] registerGroup failed for "${GroupId}": ${
1618-
(Error as { message?: string })?.message ?? String(Error)
1621+
(Error as { message?: string })?.message ??
1622+
String(Error)
16191623
}`,
16201624
);
16211625
}
@@ -2363,30 +2367,38 @@ export async function InstallSkyBridge(): Promise<void> {
23632367
);
23642368
try {
23652369
const Services: any = (globalThis as any).__CEL_SERVICES__;
2366-
if (!Services?.CustomEditor?.registerCustomEditorCapabilities) return;
2370+
if (!Services?.CustomEditor?.registerCustomEditorCapabilities)
2371+
return;
23672372
const Args = Array.isArray(Payload?.args) ? Payload.args : [];
23682373
const ViewType: string = String(Args[1] ?? "");
23692374
const Options =
23702375
typeof Args[2] === "object" && Args[2] !== null
23712376
? (Args[2] as Record<string, unknown>)
23722377
: {};
2373-
if (!ViewType || CustomEditorCapabilityHandles.has(ViewType)) return;
2374-
const Disposable = Services.CustomEditor.registerCustomEditorCapabilities(
2375-
ViewType,
2376-
{
2377-
supportsMultipleEditorsPerDocument: Boolean(
2378-
Options.supportsMultipleEditorsPerDocument,
2379-
),
2380-
},
2381-
);
2378+
if (!ViewType || CustomEditorCapabilityHandles.has(ViewType))
2379+
return;
2380+
const Disposable =
2381+
Services.CustomEditor.registerCustomEditorCapabilities(
2382+
ViewType,
2383+
{
2384+
supportsMultipleEditorsPerDocument: Boolean(
2385+
Options.supportsMultipleEditorsPerDocument,
2386+
),
2387+
},
2388+
);
23822389
CustomEditorCapabilityHandles.set(ViewType, Disposable);
23832390
} catch (Error) {
23842391
try {
23852392
const W = globalThis as any;
2386-
if (W?.process?.env?.LAND_DEV_LOG?.includes?.("cel-customeditor")) {
2393+
if (
2394+
W?.process?.env?.LAND_DEV_LOG?.includes?.(
2395+
"cel-customeditor",
2396+
)
2397+
) {
23872398
(W.console || console).warn(
23882399
`[Sky:CEL-CustomEditor] registerCapability failed: ${
2389-
(Error as { message?: string })?.message ?? String(Error)
2400+
(Error as { message?: string })?.message ??
2401+
String(Error)
23902402
}`,
23912403
);
23922404
}

0 commit comments

Comments
 (0)