You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file provides guidance when working with code in this repository.
4
+
5
+
## Project Overview
6
+
7
+
This is `@salesforce/plugin-org`, an oclif plugin for the Salesforce CLI that provides commands for working with Salesforce orgs (scratch orgs, sandboxes, production orgs). It is bundled with the official Salesforce CLI and follows Salesforce's standard plugin architecture.
8
+
9
+
## Common Commands
10
+
11
+
### Development
12
+
13
+
```bash
14
+
# Install dependencies and compile
15
+
yarn install
16
+
yarn build
17
+
18
+
# Compile TypeScript (incremental)
19
+
yarn compile
20
+
21
+
# Run linter
22
+
yarn lint
23
+
24
+
# Format code
25
+
yarn format
26
+
27
+
# Run local development version of CLI
28
+
./bin/dev.js org list
29
+
./bin/dev.js org create scratch --help
30
+
```
31
+
32
+
### Testing
33
+
34
+
```bash
35
+
# Run all tests (unit + NUTs + linting + schemas)
36
+
yarn test
37
+
38
+
# Run only unit tests
39
+
yarn test:only
40
+
41
+
# Run unit tests in watch mode
42
+
yarn test:watch
43
+
44
+
# Run NUTs (Non-Unit Tests) - integration tests against real orgs
45
+
yarn test:nuts
46
+
47
+
# Run a specific NUT
48
+
yarn mocha path/to/test.nut.ts
49
+
```
50
+
51
+
### Local Development
52
+
53
+
```bash
54
+
# Run commands via bin/dev.js, it compiles TS source on the fly (no need to run `yarn compile` after every change)
55
+
./bin/dev.js org list
56
+
```
57
+
58
+
## Architecture
59
+
60
+
### Command Structure
61
+
62
+
Commands follow oclif's file-based routing and are organized under `src/commands/org/`:
63
+
64
+
-`create/` - Create scratch orgs and sandboxes
65
+
-`delete/` - Delete scratch orgs and sandboxes
66
+
-`resume/` - Resume async org creation operations
67
+
-`refresh/` - Refresh sandboxes
68
+
-`list/` - List orgs and metadata
69
+
-`open/` - Open orgs in browser
70
+
-`enable/` and `disable/` - Manage source tracking
71
+
72
+
### Message Files
73
+
74
+
Messages are stored in `messages/*.md` files using Salesforce's message framework. Each command typically has its own message file (e.g., `create_scratch.md`, `create.sandbox.md`).
75
+
76
+
### Testing Structure
77
+
78
+
-`test/unit/` - Unit tests using Mocha + Sinon
79
+
-`test/nut/` - Integration tests (NUTs) using `@salesforce/cli-plugins-testkit`
80
+
-`test/shared/` - Tests for shared utilities
81
+
- Sandbox NUTs (`*.sandboxNut.ts`) are extremely slow and should be run selectively via GitHub Actions
Copy file name to clipboardExpand all lines: messages/messages.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,3 @@
3
3
This command will expose sensitive information that allows for subsequent activity using your current authenticated session.
4
4
Sharing this information is equivalent to logging someone in under the current credential, resulting in unintended access and escalation of privilege.
5
5
For additional information, please review the authorization section of the https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_web_flow.htm.
0 commit comments