Skip to content

Commit d1bafc1

Browse files
committed
fix: resolve TypeScript error and update command snapshots
1 parent 08c566e commit d1bafc1

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

command-snapshot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"command": "lightning:dev:site",
2121
"flagAliases": [],
2222
"flagChars": ["l", "n", "o"],
23-
"flags": ["flags-dir", "get-latest", "guest", "name", "target-org", "ssr"],
23+
"flags": ["flags-dir", "get-latest", "guest", "name", "ssr", "target-org"],
2424
"plugin": "@salesforce/plugin-lightning-dev"
2525
}
2626
]

src/commands/lightning/dev/site.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import fs from 'node:fs';
88
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
99
import { Connection, Logger, Messages, SfProject } from '@salesforce/core';
1010
import { Platform } from '@salesforce/lwc-dev-mobile-core';
11+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
12+
// @ts-ignore: No type definitions available for @lwrjs/api
1113
import { expDev, SitesLocalDevOptions, setupDev } from '@lwrjs/api';
1214
import open from 'open';
1315
import { OrgUtils } from '../../../shared/orgUtils.js';

src/lwrjs-api.d.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2023, salesforce.com, inc.
3+
* All rights reserved.
4+
* Licensed under the BSD 3-Clause license.
5+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6+
*/
7+
8+
declare module '@lwrjs/api' {
9+
export interface SitesLocalDevOptions {
10+
sfCLI?: boolean;
11+
authToken?: string;
12+
open?: boolean;
13+
port?: number;
14+
logLevel?: string;
15+
mode?: string;
16+
siteZip?: string;
17+
siteDir?: string;
18+
}
19+
20+
export function expDev(options: SitesLocalDevOptions): Promise<void>;
21+
export function setupDev(options: SitesLocalDevOptions): Promise<void>;
22+
}

0 commit comments

Comments
 (0)