Skip to content

Commit 4807f93

Browse files
fix(deps): resolving comments
1 parent 1906005 commit 4807f93

File tree

13 files changed

+203
-199
lines changed

13 files changed

+203
-199
lines changed

LICENSE.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
Copyright (c) 2018, Salesforce.com, Inc.
22
All rights reserved.
33

4-
Welcome to the Omnistudio Migration Assistant Pilot. This is a pilot tool release and your feedback is invaluable. This migration assistant which is provided for pilot evaluation purposes only and Pilot participants agree to provide feedback as requested.
5-
64
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
75

86
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

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 -o [email protected]
4549
4650
// To migrate everything
47-
sfdx omnistudio:migration:migrate -u [email protected]
51+
sf omnistudio:migration:migrate -o [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 -o [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 -o [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 -o <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+
-o, --target-org=<username> (required) username or alias for the target org
126+
(aliases: -u, --targetusername - deprecated)
127+
128+
--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 -o <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+
-o, --target-org=<username> (required) username or alias for the target org
158+
(aliases: -u, --targetusername - deprecated)
159+
160+
--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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"command": "omnistudio:migration:assess",
44
"plugin": "@salesforce/plugin-omnistudio-migration-tool",
5-
"flags": ["allversions", "only", "relatedobjects", "target-org", "verbose"],
5+
"flags": ["allversions", "loglevel", "only", "relatedobjects", "target-org", "verbose"],
66
"alias": []
77
},
88
{
@@ -14,7 +14,7 @@
1414
{
1515
"command": "omnistudio:migration:migrate",
1616
"plugin": "@salesforce/plugin-omnistudio-migration-tool",
17-
"flags": ["allversions", "only", "relatedobjects", "target-org", "verbose"],
17+
"flags": ["allversions", "loglevel", "only", "relatedobjects", "target-org", "verbose"],
1818
"alias": []
1919
}
2020
]

messages/assess.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,5 +221,6 @@
221221
"globalAutoNumberUnSupportedInOmnistudioPackage": "Omni Global Auto Number is not supported in Omnistudio Foundation package orgs.",
222222
"omniStudioAllVersionsProcessingConsent": "Org uses the standard data model. All versions of Omnistudio components such as Omniscripts, Data Mappers, Integration Procedures, and Flexcards must be assessed. But you’ve not specified -a or allversions flag in the command. Proceed to assess all versions of the Omnistudio components? [y/n]",
223223
"omniStudioAllVersionsProcessingConsentNotGiven": "You've not consented to assess all versions of the Omnistudio components. We cannot proceed with the assessment.",
224-
"omniStudioAllVersionsProcessingConsentGiven": "You've consented to assess all versions of the Omnistudio components."
224+
"omniStudioAllVersionsProcessingConsentGiven": "You've consented to assess all versions of the Omnistudio components.",
225+
"loglevelflagdeprecated": "loglevel is deprecated. Use --verbose instead"
225226
}

messages/migrate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,5 +321,6 @@
321321
"failedToCheckPackagesValue": "Failed to check the value of packages in Omni Interaction Configuration.",
322322
"packageDetails": "Your org contains only the TheFirstInstalledOmniPackage Omni Interaction Configuration.",
323323
"orgUsecaseDetails": "The Org is on %s data model with %s ",
324-
"globalAutoNumberUnSupportedInOmnistudioPackage": "Omni Global Auto Number is not supported in Omnistudio Foundation package orgs."
324+
"globalAutoNumberUnSupportedInOmnistudioPackage": "Omni Global Auto Number is not supported in Omnistudio Foundation package orgs.",
325+
"loglevelflagdeprecated": "loglevel is deprecated. Use --verbose instead."
325326
}

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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": {
@@ -130,18 +132,18 @@
130132
},
131133
"repository": "salesforcecli/plugin-omnistudio-migration-tool",
132134
"scripts": {
133-
"build": "sf-build",
135+
"build": "sf-build && yarn copy-assets",
134136
"clean": "sf-clean",
135137
"clean-all": "sf-clean all",
136138
"clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
137-
"compile": "sf-compile",
139+
"compile": "sf-compile && yarn copy-assets",
138140
"copy-assets": "shx cp -r src/templates lib/ && shx cp -r src/styles lib/ && shx cp -r src/javascripts lib/",
139141
"docs": "sf-docs",
140142
"format": "sf-format",
141143
"lint": "sf-lint",
142144
"postpack": "shx rm -f oclif.manifest.json",
143145
"posttest": "yarn lint && yarn test:deprecation-policy && yarn test:command-reference",
144-
"prepack": "sf-prepack",
146+
"prepack": "sf-prepack && yarn copy-assets",
145147
"prepare": "sf-install",
146148
"pretest": "sf-compile-test",
147149
"test": "sf-test",

src/commands/omnistudio/migration/assess.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ export default class Assess extends SfCommand<AssessmentInfo> {
7070
verbose: flags.boolean({
7171
description: messages.getMessage('enableVerboseOutput'),
7272
}),
73+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
74+
loglevel: flags.string({
75+
description: 'Logging level (deprecated, use --verbose instead)',
76+
deprecated: {
77+
message: messages.getMessage('loglevelflagdeprecated'),
78+
},
79+
options: ['trace', 'debug', 'info', 'warn', 'error', 'fatal'],
80+
}),
7381
};
7482

7583
public async run(): Promise<AssessmentInfo> {

src/commands/omnistudio/migration/info.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,12 @@ export default class Info extends SfCommand<InfoResult> {
4141
public static readonly flags: any = {
4242
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
4343
'target-org': flags.optionalOrg({
44+
char: 'o',
4445
summary: 'Target org username or alias',
4546
required: true,
47+
aliases: ['targetusername', 'u'],
48+
deprecateAliases: true,
49+
makeDefault: false, // Prevent auto-resolution during command-reference generation
4650
}),
4751
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
4852
'target-dev-hub': flags.optionalHub({

src/commands/omnistudio/migration/migrate.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ export default class Migrate extends SfCommand<MigrateResult> {
7171
'target-org': flags.optionalOrg({
7272
summary: 'Target org username or alias',
7373
required: true,
74+
aliases: ['targetusername', 'u'],
75+
deprecateAliases: true,
76+
makeDefault: false, // Prevent auto-resolution during command-reference generation
7477
}),
7578
only: flags.string({
7679
char: 'o',
@@ -88,6 +91,13 @@ export default class Migrate extends SfCommand<MigrateResult> {
8891
verbose: flags.boolean({
8992
description: 'Enable verbose output',
9093
}),
94+
loglevel: flags.string({
95+
description: 'Logging level (deprecated, use --verbose instead)',
96+
deprecated: {
97+
message: messages.getMessage('loglevelflagdeprecated'),
98+
},
99+
options: ['trace', 'debug', 'info', 'warn', 'error', 'fatal'],
100+
}),
91101
};
92102

93103
public async run(): Promise<MigrateResult> {

0 commit comments

Comments
 (0)