Skip to content

Commit 1a9f45c

Browse files
committed
chore: merge main, conflicts, cleanup
2 parents 3107ad1 + bf41130 commit 1a9f45c

18 files changed

+587
-1149
lines changed

CHANGELOG.md

Lines changed: 6 additions & 397 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 124 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,36 +108,150 @@ sf plugins
108108
<!-- commands -->
109109

110110
- [`sf data-seeding generate`](#sf-data-seeding-generate)
111+
- [`sf data-seeding generate report`](#sf-data-seeding-generate-report)
112+
- [`sf data-seeding migrate`](#sf-data-seeding-migrate)
113+
- [`sf data-seeding migrate report`](#sf-data-seeding-migrate-report)
111114

112115
## `sf data-seeding generate`
113116

114-
Summary of a command.
117+
Generate org data using AI
115118

116119
```
117120
USAGE
118-
$ sf data-seeding generate [--json] [--flags-dir <value>] [-n <value>]
121+
$ sf data-seeding generate -o <value> -s <value> -f <value> [--json] [--flags-dir <value>] [-w <value> | --async]
119122
120123
FLAGS
121-
-n, --name=<value> Description of a flag.
124+
-f, --config-file=<value> (required) Path to data seeding JSON configuration file.
125+
-o, --target-org=<value> (required) Username or alias of the Target org where generated data will be loaded to.
126+
-s, --source-org=<value> (required) Username or alias of the Source org containing data to be used as input for AI
127+
to generate similar data.
128+
-w, --wait=<value> [default: 33 minutes] Number of minutes to wait for command to complete.
129+
--async Run the command asynchronously.
122130
123131
GLOBAL FLAGS
124132
--flags-dir=<value> Import flag values from a directory.
125133
--json Format output as json.
126134
127135
DESCRIPTION
128-
Summary of a command.
136+
Generate org data using AI
129137
130-
More information about a command. Don't repeat the summary.
138+
Generates data using AI that is similar to selected data from a source org, based on a configuration file, and loads
139+
it into a target org
131140
132141
EXAMPLES
133-
$ sf data-seeding generate
142+
Generate data using org aliases
134143
135-
FLAG DESCRIPTIONS
136-
-n, --name=<value> Description of a flag.
144+
$ sf data-seeding generate -s mySourceOrg -o myTargetOrg -f "./config/seed-config.json"
137145
138-
More information about a flag. Don't repeat the summary.
146+
Generate data using usernames for each org
147+
148+
$ sf data-seeding generate --source-org="source@org.com" --target-org="target@org.com" --config-file \
149+
"./config/seed-config.json"
150+
```
151+
152+
_See code: [src/commands/data-seeding/generate/index.ts](https://github.com/salesforcecli/plugin-data-seeding/blob/v1.0.3/src/commands/data-seeding/generate/index.ts)_
153+
154+
## `sf data-seeding generate report`
155+
156+
View the status of a data-seeding generate job
157+
158+
```
159+
USAGE
160+
$ sf data-seeding generate report [--json] [--flags-dir <value>] [-i <value>] [-r]
161+
162+
FLAGS
163+
-i, --job-id=<value> ID of a specific `data-seeding generate` job.
164+
-r, --use-most-recent View status of most recent `data-seeding generate` job.
165+
166+
GLOBAL FLAGS
167+
--flags-dir=<value> Import flag values from a directory.
168+
--json Format output as json.
169+
170+
DESCRIPTION
171+
View the status of a data-seeding generate job
172+
173+
View the status of a data-seeding generate job that has already been initiated or completed
174+
175+
EXAMPLES
176+
Display the status of a specific data seeding job
177+
178+
$ sf data-seeding generate report --job-id="[XXXX-YYYY-ZZZZ-AAAA]"
179+
180+
Display the status of a the most recent data seeding job
181+
182+
$ sf data-seeding generate report --use-most-recent
183+
```
184+
185+
_See code: [src/commands/data-seeding/generate/report.ts](https://github.com/salesforcecli/plugin-data-seeding/blob/v1.0.3/src/commands/data-seeding/generate/report.ts)_
186+
187+
## `sf data-seeding migrate`
188+
189+
Migrates data from one org to another
190+
191+
```
192+
USAGE
193+
$ sf data-seeding migrate -o <value> -s <value> -f <value> [--json] [--flags-dir <value>] [-w <value> | --async]
194+
195+
FLAGS
196+
-f, --config-file=<value> (required) Path to data migration JSON configuration file.
197+
-o, --target-org=<value> (required) Username or alias of the Target org where data will be migrated to.
198+
-s, --source-org=<value> (required) Username or alias of the Source org where data will be migrated from.
199+
-w, --wait=<value> [default: 33 minutes] Number of minutes to wait for command to complete.
200+
--async Run the command asynchronously.
201+
202+
GLOBAL FLAGS
203+
--flags-dir=<value> Import flag values from a directory.
204+
--json Format output as json.
205+
206+
DESCRIPTION
207+
Migrates data from one org to another
208+
209+
Migrates selected data based on a configuration file from a source org and into a target org
210+
211+
EXAMPLES
212+
Migrate data using a specific configuration file and org aliases
213+
214+
$ sf data-seeding migrate -s sourceOrg -t targetOrg -f "/config/data-seed.json"
215+
216+
Migrate data using default configuration file and usernames for each org
217+
218+
$ sf data-seeding migrate --source-org="source@org.com" --target-org="target@org.com" \
219+
--config-file="/config/data-seed.json"
220+
```
221+
222+
_See code: [src/commands/data-seeding/migrate/index.ts](https://github.com/salesforcecli/plugin-data-seeding/blob/v1.0.3/src/commands/data-seeding/migrate/index.ts)_
223+
224+
## `sf data-seeding migrate report`
225+
226+
View the status of a data-seeding migrate job
227+
228+
```
229+
USAGE
230+
$ sf data-seeding migrate report [--json] [--flags-dir <value>] [-i <value>] [-r]
231+
232+
FLAGS
233+
-i, --job-id=<value> ID of a specific `data-seeding migrate` job.
234+
-r, --use-most-recent View status of most recent `data-seeding migrate` job.
235+
236+
GLOBAL FLAGS
237+
--flags-dir=<value> Import flag values from a directory.
238+
--json Format output as json.
239+
240+
DESCRIPTION
241+
View the status of a data-seeding migrate job
242+
243+
View the status of a data-seeding migrate job that has already been initiated or completed
244+
245+
EXAMPLES
246+
Display the status of a specific data seeding job
247+
248+
$ sf data-seeding migrate report --job-id="[XXXX-YYYY-ZZZZ-AAAA]"
249+
250+
Display the status of a the most recent data seeding job
251+
252+
$ sf data-seeding migrate report --use-most-recent
139253
```
140254

141-
_See code: [src/commands/data-seeding/generate.ts](https://github.com/salesforcecli/plugin-data-seeding/blob/v1.0.0/src/commands/data-seeding/generate.ts)_
255+
_See code: [src/commands/data-seeding/migrate/report.ts](https://github.com/salesforcecli/plugin-data-seeding/blob/v1.0.3/src/commands/data-seeding/migrate/report.ts)_
142256

143257
<!-- commandsstop -->

command-snapshot.json

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,32 @@
33
"alias": [],
44
"command": "data-seeding:generate",
55
"flagAliases": [],
6-
"flagChars": ["n"],
7-
"flags": ["flags-dir", "json", "name"],
6+
"flagChars": ["f", "o", "s", "w"],
7+
"flags": ["async", "config-file", "flags-dir", "json", "source-org", "target-org", "wait"],
8+
"plugin": "@salesforce/plugin-data-seeding"
9+
},
10+
{
11+
"alias": [],
12+
"command": "data-seeding:generate:report",
13+
"flagAliases": [],
14+
"flagChars": ["i", "r"],
15+
"flags": ["flags-dir", "job-id", "json", "use-most-recent"],
16+
"plugin": "@salesforce/plugin-data-seeding"
17+
},
18+
{
19+
"alias": [],
20+
"command": "data-seeding:migrate",
21+
"flagAliases": [],
22+
"flagChars": ["f", "o", "s", "w"],
23+
"flags": ["async", "config-file", "flags-dir", "json", "source-org", "target-org", "wait"],
24+
"plugin": "@salesforce/plugin-data-seeding"
25+
},
26+
{
27+
"alias": [],
28+
"command": "data-seeding:migrate:report",
29+
"flagAliases": [],
30+
"flagChars": ["i", "r"],
31+
"flags": ["flags-dir", "job-id", "json", "use-most-recent"],
832
"plugin": "@salesforce/plugin-data-seeding"
933
}
1034
]

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
{
22
"name": "@salesforce/plugin-data-seeding",
33
"description": "Migrate real data, generate fake data using GenAI, or deploy data files to target orgs.",
4-
"version": "1.0.0",
4+
"version": "1.0.3",
55
"author": "Salesforce",
66
"bugs": "https://github.com/forcedotcom/cli/issues",
77
"dependencies": {
88
"@oclif/core": "^4",
99
"@oclif/multi-stage-output": "^0.5.0",
10-
"@salesforce/core": "^8.2.7",
11-
"@salesforce/kit": "^3.2.1",
10+
"@salesforce/core": "^8.5.3",
11+
"@salesforce/kit": "^3.2.2",
1212
"@salesforce/sf-plugins-core": "^11.3.3",
1313
"form-data": "^4.0.0",
1414
"got": "^14.4.2",
1515
"tough-cookie": "^4.1.4"
1616
},
1717
"devDependencies": {
18-
"@oclif/plugin-command-snapshot": "^5.2.12",
19-
"@salesforce/cli-plugins-testkit": "^5.3.26",
18+
"@oclif/plugin-command-snapshot": "^5.2.15",
19+
"@salesforce/cli-plugins-testkit": "^5.3.27",
2020
"@salesforce/dev-scripts": "^10.2.9",
21-
"@salesforce/plugin-command-reference": "^3.1.13",
2221
"@types/tough-cookie": "^4.0.5",
22+
"@salesforce/plugin-command-reference": "^3.1.20",
2323
"eslint-plugin-sf-plugin": "^1.20.5",
24-
"oclif": "^4.14.19",
24+
"oclif": "^4.14.28",
2525
"ts-node": "^10.9.2",
2626
"tsx": "^4.19.0",
2727
"typescript": "^5.5.4"
@@ -62,10 +62,10 @@
6262
"description": "Migrate real data, generate fake data using GenAI, or deploy data files to target orgs",
6363
"subtopics": {
6464
"generate": {
65-
"description": "description for data-seeding.generate"
65+
"description": "Generate fake data using GenAI"
6666
},
6767
"migrate": {
68-
"description": "description for data-seeding.migrate"
68+
"description": "Migrate real data between orgs"
6969
}
7070
}
7171
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$ref": "#/definitions/DataSeedingReportResult",
4+
"definitions": {
5+
"DataSeedingReportResult": {
6+
"type": "object",
7+
"properties": {
8+
"dataSeedingJob": {
9+
"$ref": "#/definitions/DataSeedingJob"
10+
},
11+
"jobId": {
12+
"type": "string"
13+
},
14+
"startTime": {
15+
"type": "string"
16+
},
17+
"endTime": {
18+
"type": "string"
19+
},
20+
"status": {
21+
"type": "string"
22+
}
23+
},
24+
"required": ["dataSeedingJob", "jobId"],
25+
"additionalProperties": false
26+
},
27+
"DataSeedingJob": {
28+
"type": "string",
29+
"enum": ["generate", "migrate"]
30+
}
31+
}
32+
}

schemas/data__seeding-generate.json

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,35 @@
44
"definitions": {
55
"DataSeedingGenerateResult": {
66
"type": "object",
7+
"additionalProperties": false,
78
"properties": {
8-
"path": {
9+
"sourceOrg": {
10+
"type": "string"
11+
},
12+
"targetOrg": {
13+
"type": "string"
14+
},
15+
"dataSeedingJob": {
16+
"$ref": "#/definitions/DataSeedingJob"
17+
},
18+
"jobId": {
19+
"type": "string"
20+
},
21+
"startTime": {
22+
"type": "string"
23+
},
24+
"endTime": {
25+
"type": "string"
26+
},
27+
"status": {
928
"type": "string"
1029
}
1130
},
12-
"required": ["path"],
13-
"additionalProperties": false
31+
"required": ["dataSeedingJob", "jobId", "sourceOrg", "targetOrg"]
32+
},
33+
"DataSeedingJob": {
34+
"type": "string",
35+
"enum": ["generate", "migrate"]
1436
}
1537
}
1638
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$ref": "#/definitions/DataSeedingReportResult",
4+
"definitions": {
5+
"DataSeedingReportResult": {
6+
"type": "object",
7+
"properties": {
8+
"dataSeedingJob": {
9+
"$ref": "#/definitions/DataSeedingJob"
10+
},
11+
"jobId": {
12+
"type": "string"
13+
},
14+
"startTime": {
15+
"type": "string"
16+
},
17+
"endTime": {
18+
"type": "string"
19+
},
20+
"status": {
21+
"type": "string"
22+
}
23+
},
24+
"required": ["dataSeedingJob", "jobId"],
25+
"additionalProperties": false
26+
},
27+
"DataSeedingJob": {
28+
"type": "string",
29+
"enum": ["generate", "migrate"]
30+
}
31+
}
32+
}

schemas/data__seeding-migrate.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$ref": "#/definitions/DataSeedingMigrateResult",
4+
"definitions": {
5+
"DataSeedingMigrateResult": {
6+
"type": "object",
7+
"additionalProperties": false,
8+
"properties": {
9+
"sourceOrg": {
10+
"type": "string"
11+
},
12+
"targetOrg": {
13+
"type": "string"
14+
},
15+
"dataSeedingJob": {
16+
"$ref": "#/definitions/DataSeedingJob"
17+
},
18+
"jobId": {
19+
"type": "string"
20+
},
21+
"startTime": {
22+
"type": "string"
23+
},
24+
"endTime": {
25+
"type": "string"
26+
},
27+
"status": {
28+
"type": "string"
29+
}
30+
},
31+
"required": ["dataSeedingJob", "jobId", "sourceOrg", "targetOrg"]
32+
},
33+
"DataSeedingJob": {
34+
"type": "string",
35+
"enum": ["generate", "migrate"]
36+
}
37+
}
38+
}

0 commit comments

Comments
 (0)