Skip to content

Commit 247c117

Browse files
Merge pull request #447 from salesforcecli/u/pallavi-das/W-20080070_node
W-20080070 Upgrading to latest salesforce/core and using sfcommands
2 parents 939d599 + caa39a5 commit 247c117

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+4131
-2944
lines changed

README.md

Lines changed: 56 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ The Omnistudio Migration Assistant is a Salesforce CLI plugin that automates the
44

55
## 🚀 Before You Begin
66

7+
> **Note:** The `sfdx` CLI has been deprecated. Please use `sf` CLI commands instead. The deprecated `sfdx` command aliases (`-u`, `--targetusername`) are still supported.
8+
79
⚠️ IMPORTANT: Before installing and using the Omnistudio Migration Assistant, contact Salesforce support.
810

911
- Review the migration phases in [Migration Process from Omnistudio for Managed Packages to Omnistudio](https://help.salesforce.com/s/articleView?id=xcloud.os_migrate_omnistudio_custom_objects_to_standard_objects.htm&language=en_US&type=5)
@@ -12,6 +14,8 @@ The Omnistudio Migration Assistant is a Salesforce CLI plugin that automates the
1214

1315
- To deploy LWC as part of auto-deployment process, environment variable 'OMA_AUTH_KEY' should be set with requested NPM repository access key from Salesforce Customer Support.
1416

17+
- This tool requires Node Version 18+.
18+
1519
- LWC migration auto-deployment needs minimum node version of 18.17.1
1620

1721
## Install and Run the Omnistudio Migration Assistant
@@ -41,10 +45,10 @@ sf plugins install @salesforce/[email protected]
4145

4246
```
4347
// To assess everything without migrating
44-
sfdx omnistudio:migration:assess -u [email protected]
48+
sf omnistudio:migration:assess -u [email protected]
4549
4650
// To migrate everything
47-
sfdx omnistudio:migration:migrate -u [email protected]
51+
sf omnistudio:migration:migrate -u [email protected]
4852
4953
5054
// To migrate/assess specific components: Flexcards, Data Mappers, Integration Procedures, Omniscripts, Omni Global Auto Numbers or Custom Labels, add the following parameters:
@@ -102,10 +106,10 @@ Assessment provides detailed information about:
102106

103107
```bash
104108
# Assess Omni Global Auto Numbers only
105-
sfdx omnistudio:migration:assess -u [email protected] --only=autonumber
109+
sf omnistudio:migration:assess -u [email protected] --only=autonumber
106110

107111
# Migrate Omni Global Auto Numbers only
108-
sfdx omnistudio:migration:migrate -u [email protected] --only=autonumber
112+
sf omnistudio:migration:migrate -u [email protected] --only=autonumber
109113
```
110114

111115
5. An HTML page will be open in your default browser with the results of your migration/assessment job.
@@ -114,70 +118,64 @@ sfdx omnistudio:migration:migrate -u [email protected] --only=autonum
114118

115119
```
116120
USAGE
117-
$ sf omnistudio:migration:assess [-v <string>] [-u <string>] [--loglevel
118-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
121+
$ sf omnistudio:migration:assess -u <username> [--only <component>] [--allversions]
122+
[--relatedobjects <objects>] [--verbose]
119123
120124
OPTIONS
121-
-u, --targetusername=targetusername username or alias for the target
122-
org; overrides default target org
123-
124-
-v, --targetdevhubusername=targetdevhubusername username or alias for the dev hub
125-
org; overrides default dev hub org
126-
127-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
128-
this command invocation
129-
130-
-a, --allversions migrate all versions and not
131-
and not just the active ones.
132-
133-
--only=only specify any single components to migrate:
134-
dm (Data Mappers),
135-
ip (Integration Procedures),
136-
os (Omniscripts),
137-
fc (Flexcards),
138-
autonumber (Omni Global Auto Numbers),
139-
cl (Custom Labels)
140-
141-
--relatedobjects=relatedobjects(comma separated) specify one or more related objects to assess:
142-
'apex' for Apex classes
143-
'lwc' for LWC (Lightning Web Components)
144-
'expsites' for Experience Sites
145-
'flexipage' for FlexiPages
125+
-u, --target-org=<username> (required) username or alias for the target org
126+
(alias: --targetusername - deprecated)
127+
128+
-o, --only=<component> specify a single component to assess:
129+
dm (Data Mappers),
130+
ip (Integration Procedures),
131+
os (Omniscripts),
132+
fc (Flexcards),
133+
autonumber (Omni Global Auto Numbers),
134+
cl (Custom Labels)
135+
136+
-a, --allversions assess all versions, not just the active ones
137+
138+
-r, --relatedobjects=<objects> specify one or more related objects to assess (comma separated):
139+
apex - Apex classes
140+
lwc - Lightning Web Components
141+
expsites - Experience Sites
142+
flexipage - FlexiPages
143+
144+
--verbose enable verbose output
145+
146+
--loglevel=<level> (deprecated) use --verbose instead
146147
```
147148

148149
### Migrate Usage & parameters
149150

150151
```
151152
USAGE
152-
$ sf omnistudio:migration:migrate [-v <string>] [-u <string>] [--loglevel
153-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
153+
$ sf omnistudio:migration:migrate -u <username> [--only <component>] [--allversions]
154+
[--relatedobjects <objects>] [--verbose]
154155
155156
OPTIONS
156-
-u, --targetusername=targetusername username or alias for the target
157-
org; overrides default target org
158-
159-
-v, --targetdevhubusername=targetdevhubusername username or alias for the dev hub
160-
org; overrides default dev hub org
161-
162-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
163-
this command invocation
164-
165-
-a, --allversions migrate all versions and not
166-
and not just the active ones.
167-
168-
--only=only specify any single components to migrate:
169-
dm (Data Mappers),
170-
ip (Integration Procedures),
171-
os (Omniscripts),
172-
fc (Flexcards),
173-
autonumber (Omni Global Auto Numbers),
174-
cl (Custom Labels)
175-
176-
--relatedobjects=relatedobjects(comma separated) specify one or more related objects to assess:
177-
'apex' for Apex classes
178-
'lwc' for LWC (Lightning Web Components)
179-
'expsites' for Experience Sites
180-
'flexipage' for FlexiPages
157+
-u, --target-org=<username> (required) username or alias for the target org
158+
(aliases: --targetusername - deprecated)
159+
160+
-o, --only=<component> specify a single component to migrate:
161+
dm (Data Mappers),
162+
ip (Integration Procedures),
163+
os (Omniscripts),
164+
fc (Flexcards),
165+
autonumber (Omni Global Auto Numbers),
166+
cl (Custom Labels)
167+
168+
-a, --allversions migrate all versions, not just the active ones
169+
170+
-r, --relatedobjects=<objects> specify one or more related objects to migrate (comma separated):
171+
apex - Apex classes
172+
lwc - Lightning Web Components
173+
expsites - Experience Sites
174+
flexipage - FlexiPages
175+
176+
--verbose enable verbose output
177+
178+
--loglevel=<level> (deprecated) use --verbose instead
181179
```
182180

183181
Terms:

appveyor.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
environment:
2-
nodejs_version: "10"
2+
nodejs_version: '18'
33
cache:
44
- '%LOCALAPPDATA%\Yarn -> appveyor.yml'
55
- node_modules -> yarn.lock
@@ -16,4 +16,3 @@ build_script:
1616

1717
test_script:
1818
- yarn test
19-

command-snapshot.json

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,20 @@
11
[
2-
{
3-
"command": "basecommand",
4-
"plugin": "@salesforce/plugin-omnistudio-migration-tool",
5-
"flags": ["apiversion", "json", "loglevel", "targetusername"],
6-
"alias": []
7-
},
82
{
93
"command": "omnistudio:migration:assess",
104
"plugin": "@salesforce/plugin-omnistudio-migration-tool",
11-
"flags": ["allversions", "apiversion", "json", "loglevel", "only", "relatedobjects", "targetusername", "verbose"],
5+
"flags": ["allversions", "loglevel", "only", "relatedobjects", "target-org", "verbose"],
126
"alias": []
137
},
148
{
159
"command": "omnistudio:migration:info",
1610
"plugin": "@salesforce/plugin-omnistudio-migration-tool",
17-
"flags": [
18-
"allversions",
19-
"apiversion",
20-
"json",
21-
"loglevel",
22-
"name",
23-
"targetdevhubusername",
24-
"targetusername",
25-
"verbose"
26-
],
11+
"flags": ["allversions", "name", "target-org", "verbose"],
2712
"alias": []
2813
},
2914
{
3015
"command": "omnistudio:migration:migrate",
3116
"plugin": "@salesforce/plugin-omnistudio-migration-tool",
32-
"flags": ["allversions", "apiversion", "json", "loglevel", "only", "relatedobjects", "targetusername", "verbose"],
17+
"flags": ["allversions", "loglevel", "only", "relatedobjects", "target-org", "verbose"],
3318
"alias": []
3419
}
3520
]

messages/assess.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,5 +225,6 @@
225225
"omniStudioAllVersionsProcessingConsentGiven": "You've consented to assess all versions of the Omnistudio components.",
226226
"preparingStorageForMetadataEnabledOrg": "Preparing storage for %s org on Standard Data Model with Metadata API enabled",
227227
"processingNotRequired": "Assessment not required for Standard Data Model Orgs with Metadata API enabled",
228-
"skippingTruncation": "Skipping Trunction as standard data model org"
228+
"skippingTruncation": "Skipping Trunction as standard data model org",
229+
"loglevelFlagDeprecated": "loglevel is deprecated. Use --verbose instead"
229230
}

messages/migrate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,5 +324,6 @@
324324
"orgUsecaseDetails": "The Org is on %s data model with %s and Omnistudio Metadata API %s",
325325
"preparingStorageForMetadataEnabledOrg": "Preparing storage for %s org on Standard Data Model with Metadata API enabled",
326326
"processingNotRequired": "Migration not required for Standard Data Model Orgs with Metadata API enabled",
327-
"skippingTruncation": "Skipping Trunction as standard data model org"
327+
"skippingTruncation": "Skipping Trunction as standard data model org",
328+
"loglevelFlagDeprecated": "loglevel is deprecated. Use --verbose instead."
328329
}

package.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
"bugs": "https://github.com/forcedotcom/cli/issues",
77
"dependencies": {
88
"@apexdevtools/apex-parser": "^4.1.0",
9+
"@babel/parser": "^7.25.6",
10+
"@babel/traverse": "^7.25.6",
911
"@babel/types": "^7.25.6",
1012
"@oclif/command": "^1",
1113
"@oclif/config": "^1",
1214
"@oclif/errors": "^1",
13-
"@salesforce/command": "^4.2.1",
14-
"@salesforce/core": "^2.37.1",
15+
"@salesforce/core": "^8.23.4",
16+
"@salesforce/sf-plugins-core": "^11.3.10",
1517
"@types/jsdom": "^21.1.7",
1618
"@types/lodash.chunk": "^4.2.9",
1719
"@types/shelljs": "^0.8.15",
@@ -22,9 +24,7 @@
2224
"lodash.chunk": "^4.2.0",
2325
"open": "^8.4.2",
2426
"shelljs": "^0.8.5",
25-
"tslib": "^2",
26-
"@babel/parser": "^7.25.6",
27-
"@babel/traverse": "^7.25.6"
27+
"tslib": "^2"
2828
},
2929
"devDependencies": {
3030
"@oclif/dev-cli": "^1",
@@ -37,7 +37,7 @@
3737
"@salesforce/prettier-config": "^0.0.3",
3838
"@salesforce/ts-sinon": "^1",
3939
"@types/babel__traverse": "^7.20.6",
40-
"@types/jsforce": "^1.11.5",
40+
"@types/jsforce": "^1.11.6",
4141
"@types/xmldom": "^0.1.34",
4242
"@typescript-eslint/eslint-plugin": "^4.2.0",
4343
"@typescript-eslint/parser": "^4.2.0",
@@ -62,13 +62,15 @@
6262
"puppeteer": "^24.12.1",
6363
"sinon": "10.0.0",
6464
"ts-node": "^10.9.2",
65-
"typescript": "^4.9.5"
65+
"typescript": "^5.4.5"
6666
},
6767
"resolutions": {
6868
"nanoid": "^3.3.8",
6969
"marked": "^4.0.10",
7070
"semver": "^7.5.2",
7171
"jsonwebtoken": "^9.0.2",
72+
"jws": "^3.2.3",
73+
"js-yaml": "^4.1.1",
7274
"form-data": "^4.0.4",
7375
"trim-newlines": "^3.0.1",
7476
"minimatch": "^3.0.5",
@@ -111,7 +113,7 @@
111113
"license": "BSD-3-Clause",
112114
"oclif": {
113115
"commands": "./lib/commands",
114-
"bin": "sfdx",
116+
"bin": "sf",
115117
"topics": {
116118
"omnistudio": {
117119
"subtopics": {

src/commands/basecommand.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)