Skip to content

Commit f2f0962

Browse files
authored
feat: update org command -> app (#36)
1 parent af7c51f commit f2f0962

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

command-snapshot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
{
1111
"alias": [],
12-
"command": "lightning:preview:org",
12+
"command": "lightning:preview:app",
1313
"flagAliases": [],
1414
"flagChars": ["n"],
1515
"flags": ["flags-dir", "json", "name"],
File renamed without changes.

messages/lightning.preview.component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Preview LWC component in insolation.
44

55
# description
66

7-
Preview components, org, and sites. If no topic is specified, the default action is to preview the org.
7+
Preview components, apps, and sites. If no topic is specified, the default action is to preview the org.
88

99
In dev preview mode, you can edit local files and see these changes to your Lightning Web Components (LWC) within your {org name} org:
1010

schemas/lightning-preview-org.json renamed to schemas/lightning-preview-app.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$ref": "#/definitions/LightningPreviewOrgResult",
3+
"$ref": "#/definitions/LightningPreviewAppResult",
44
"definitions": {
5-
"LightningPreviewOrgResult": {
5+
"LightningPreviewAppResult": {
66
"type": "object",
77
"properties": {
88
"path": {

src/commands/lightning/preview/org.ts renamed to src/commands/lightning/preview/app.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
99
import { Messages } from '@salesforce/core';
1010

1111
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
12-
const messages = Messages.loadMessages('@salesforce/plugin-lightning-dev', 'lightning.preview.org');
12+
const messages = Messages.loadMessages('@salesforce/plugin-lightning-dev', 'lightning.preview.app');
1313

14-
export type LightningPreviewOrgResult = {
14+
export type LightningPreviewAppResult = {
1515
path: string;
1616
};
1717

18-
export default class LightningPreviewOrg extends SfCommand<LightningPreviewOrgResult> {
18+
export default class LightningPreviewApp extends SfCommand<LightningPreviewAppResult> {
1919
public static readonly summary = messages.getMessage('summary');
2020
public static readonly description = messages.getMessage('description');
2121
public static readonly examples = messages.getMessages('examples');
@@ -29,8 +29,8 @@ export default class LightningPreviewOrg extends SfCommand<LightningPreviewOrgRe
2929
}),
3030
};
3131

32-
public async run(): Promise<LightningPreviewOrgResult> {
33-
const { flags } = await this.parse(LightningPreviewOrg);
32+
public async run(): Promise<LightningPreviewAppResult> {
33+
const { flags } = await this.parse(LightningPreviewApp);
3434

3535
const name = flags.name ?? 'world';
3636
this.log(`hello ${name} from /Users/nkruk/git/plugin-lightning-dev/src/commands/lightning/preview/org.ts`);

test/commands/lightning/preview/org.test.ts renamed to test/commands/lightning/preview/app.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import { TestContext } from '@salesforce/core/testSetup';
88
import { expect } from 'chai';
99
import { stubSfCommandUx } from '@salesforce/sf-plugins-core';
10-
import LightningPreviewOrg from '../../../../src/commands/lightning/preview/org.js';
10+
import LightningPreviewApp from '../../../../src/commands/lightning/preview/app.js';
1111

1212
describe('lightning preview org', () => {
1313
const $$ = new TestContext();
@@ -22,7 +22,7 @@ describe('lightning preview org', () => {
2222
});
2323

2424
it('runs hello', async () => {
25-
await LightningPreviewOrg.run([]);
25+
await LightningPreviewApp.run([]);
2626
const output = sfCommandStubs.log
2727
.getCalls()
2828
.flatMap((c) => c.args)
@@ -31,12 +31,12 @@ describe('lightning preview org', () => {
3131
});
3232

3333
it('runs hello with --json and no provided name', async () => {
34-
const result = await LightningPreviewOrg.run([]);
34+
const result = await LightningPreviewApp.run([]);
3535
expect(result.path).to.equal('/Users/nkruk/git/plugin-lightning-dev/src/commands/lightning/preview/org.ts');
3636
});
3737

3838
it('runs hello world --name Astro', async () => {
39-
await LightningPreviewOrg.run(['--name', 'Astro']);
39+
await LightningPreviewApp.run(['--name', 'Astro']);
4040
const output = sfCommandStubs.log
4141
.getCalls()
4242
.flatMap((c) => c.args)

0 commit comments

Comments
 (0)