@salesforce/plugin-omnistudio-migration-tool 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/LICENSE.txt +12 -0
- package/README.md +143 -0
- package/lib/commands/hello/org.d.ts +17 -0
- package/lib/commands/hello/org.js +74 -0
- package/lib/commands/hello/org.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -0
- package/messages/messages.json +22 -0
- package/messages/org.json +12 -0
- package/oclif.manifest.json +1 -0
- package/package.json +110 -0
package/CHANGELOG.md
ADDED
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Copyright (c) 2022, Salesforce.com, Inc.
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
5
|
+
|
|
6
|
+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
7
|
+
|
|
8
|
+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
9
|
+
|
|
10
|
+
* Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
11
|
+
|
|
12
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
### Use the [lerna template](https://github.com/salesforcecli/lerna-template) if you need a library and plugin
|
|
2
|
+
|
|
3
|
+
### This template is useful if the library is already in another repository or the plugin is a wrapper around an API.
|
|
4
|
+
|
|
5
|
+
# plugin-<REPLACE ME>
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@salesforce/plugin-omnistudio-migration-tool) [](https://circleci.com/gh/salesforcecli/plugin-omnistudio-migration-tool/tree/main) [](https://npmjs.org/package/@salesforce/plugin-omnistudio-migration-tool) [](https://raw.githubusercontent.com/salesforcecli/plugin-omnistudio-migration-tool/main/LICENSE.txt)
|
|
8
|
+
|
|
9
|
+
Change above to <REPLACE_ME> before finalizing
|
|
10
|
+
|
|
11
|
+
<REPLACE ME DESCRIPTION START>
|
|
12
|
+
|
|
13
|
+
This repository provides a template for creating a plugin for the Salesforce CLI. To convert this template to a working plugin:
|
|
14
|
+
|
|
15
|
+
1. Clone this repo
|
|
16
|
+
2. Delete the .git folder
|
|
17
|
+
3. Replace filler values
|
|
18
|
+
a) Every instance of `<REPLACE_ME>` can be directly substitued for the name of the new plugin. However beware, things like github paths are for the salesforcecli Github organization
|
|
19
|
+
b) Search for case-matching `REPLACE` to find other filler values, such as for the plugin description
|
|
20
|
+
4. Use `git init` to set up the desired git information
|
|
21
|
+
5. Follow the getting started steps below until the `sfdx hello:org` commmand is functioning
|
|
22
|
+
|
|
23
|
+
<REPLACE ME DESCRIPTION END>
|
|
24
|
+
|
|
25
|
+
## Learn about the plugin-omnistudio-migration-tool
|
|
26
|
+
|
|
27
|
+
Salesforce CLI plugins are based on the [oclif plugin framework](<(https://oclif.io/docs/introduction.html)>). Read the [plugin developer guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_plugins.meta/sfdx_cli_plugins/cli_plugins_architecture_sf_cli.htm) to learn about Salesforce CLI plugin development.
|
|
28
|
+
|
|
29
|
+
This repository contains a lot of additional scripts and tools to help with general Salesforce node development and enforce coding standards. You should familiarize yourself with some of the [node developer packages](https://github.com/forcedotcom/sfdx-dev-packages/) used by Salesforce. There is also a default circleci config using the [release management orb](https://github.com/forcedotcom/npm-release-management-orb) standards.
|
|
30
|
+
|
|
31
|
+
Additionally, there are some additional tests that the Salesforce CLI will enforce if this plugin is ever bundled with the CLI. These test are included by default under the `posttest` script and it is recommended to keep these tests active in your plugin, regardless if you plan to have it bundled.
|
|
32
|
+
|
|
33
|
+
# Everything past here is only a suggestion as to what should be in your specific plugin's description
|
|
34
|
+
|
|
35
|
+
This plugin is bundled with the [Salesforce CLI](https://developer.salesforce.com/tools/sfdxcli). For more information on the CLI, read the [getting started guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm).
|
|
36
|
+
|
|
37
|
+
We always recommend using the latest version of these commands bundled with the CLI, however, you can install a specific version or tag if needed.
|
|
38
|
+
|
|
39
|
+
## Install
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
sfdx plugins:install <REPLACE_ME>@x.y.z
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Issues
|
|
46
|
+
|
|
47
|
+
Please report any issues at https://github.com/forcedotcom/cli/issues
|
|
48
|
+
|
|
49
|
+
## Contributing
|
|
50
|
+
|
|
51
|
+
1. Please read our [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
52
|
+
2. Create a new issue before starting your project so that we can keep track of
|
|
53
|
+
what you are trying to add/fix. That way, we can also offer suggestions or
|
|
54
|
+
let you know if there is already an effort in progress.
|
|
55
|
+
3. Fork this repository.
|
|
56
|
+
4. [Build the plugin locally](#build)
|
|
57
|
+
5. Create a _topic_ branch in your fork. Note, this step is recommended but technically not required if contributing using a fork.
|
|
58
|
+
6. Edit the code in your fork.
|
|
59
|
+
7. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without unit tests.
|
|
60
|
+
8. Sign CLA (see [CLA](#cla) below).
|
|
61
|
+
9. Send us a pull request when you are done. We'll review your code, suggest any needed changes, and merge it in.
|
|
62
|
+
|
|
63
|
+
### CLA
|
|
64
|
+
|
|
65
|
+
External contributors will be required to sign a Contributor's License
|
|
66
|
+
Agreement. You can do so by going to https://cla.salesforce.com/sign-cla.
|
|
67
|
+
|
|
68
|
+
### Build
|
|
69
|
+
|
|
70
|
+
To build the plugin locally, make sure to have yarn installed and run the following commands:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Clone the repository
|
|
74
|
+
git clone git@github.com:salesforcecli/plugin-<REPLACE_ME>
|
|
75
|
+
|
|
76
|
+
# Install the dependencies and compile
|
|
77
|
+
yarn install
|
|
78
|
+
yarn build
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
To use your plugin, run using the local `./bin/run` or `./bin/run.cmd` file.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Run using local run file.
|
|
85
|
+
./bin/run <REPLACE_ME>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Link your plugin to the sfdx cli
|
|
92
|
+
sfdx plugins:link .
|
|
93
|
+
# To verify
|
|
94
|
+
sfdx plugins
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Commands
|
|
98
|
+
|
|
99
|
+
<!-- commands -->
|
|
100
|
+
|
|
101
|
+
- [`sfdx hello:org [-n <string>] [-f] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-helloorg--n-string--f--v-string--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
102
|
+
|
|
103
|
+
## `sfdx hello:org [-n <string>] [-f] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
104
|
+
|
|
105
|
+
print a greeting and your org IDs
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
print a greeting and your org IDs
|
|
109
|
+
|
|
110
|
+
USAGE
|
|
111
|
+
$ sfdx hello:org [-n <string>] [-f] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
|
|
112
|
+
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
113
|
+
|
|
114
|
+
OPTIONS
|
|
115
|
+
-f, --force example boolean flag
|
|
116
|
+
-n, --name=name name to print
|
|
117
|
+
|
|
118
|
+
-u, --targetusername=targetusername username or alias for the target
|
|
119
|
+
org; overrides default target org
|
|
120
|
+
|
|
121
|
+
-v, --targetdevhubusername=targetdevhubusername username or alias for the dev hub
|
|
122
|
+
org; overrides default dev hub org
|
|
123
|
+
|
|
124
|
+
--apiversion=apiversion override the api version used for
|
|
125
|
+
api requests made by this command
|
|
126
|
+
|
|
127
|
+
--json format output as json
|
|
128
|
+
|
|
129
|
+
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
130
|
+
this command invocation
|
|
131
|
+
|
|
132
|
+
EXAMPLES
|
|
133
|
+
sfdx hello:org --targetusername myOrg@example.com --targetdevhubusername devhub@org.com
|
|
134
|
+
Hello world! This is org: MyOrg and I will be around until Tue Mar 20 2018!
|
|
135
|
+
My hub org id is: 00Dxx000000001234
|
|
136
|
+
|
|
137
|
+
sfdx hello:org --name myname --targetusername myOrg@example.com
|
|
138
|
+
Hello myname! This is org: MyOrg and I will be around until Tue Mar 20 2018!
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
_See code: [src/commands/hello/org.ts](https://github.com/salesforcecli/plugin-omnistudio-migration-tool/blob/v1.0.0/src/commands/hello/org.ts)_
|
|
142
|
+
|
|
143
|
+
<!-- commandsstop -->
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { flags, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
import { AnyJson } from '@salesforce/ts-types';
|
|
3
|
+
export default class Org extends SfdxCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static args: {
|
|
7
|
+
name: string;
|
|
8
|
+
}[];
|
|
9
|
+
protected static flagsConfig: {
|
|
10
|
+
name: flags.Discriminated<flags.String>;
|
|
11
|
+
force: flags.Discriminated<flags.Boolean<boolean>>;
|
|
12
|
+
};
|
|
13
|
+
protected static requiresUsername: boolean;
|
|
14
|
+
protected static supportsDevhubUsername: boolean;
|
|
15
|
+
protected static requiresProject: boolean;
|
|
16
|
+
run(): Promise<AnyJson>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const os = require("os");
|
|
10
|
+
const command_1 = require("@salesforce/command");
|
|
11
|
+
const core_1 = require("@salesforce/core");
|
|
12
|
+
// Initialize Messages with the current plugin directory
|
|
13
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
14
|
+
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
|
|
15
|
+
// or any library that is using the messages framework can also be loaded this way.
|
|
16
|
+
// TODO: replace the package name with your new package's name
|
|
17
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-omnistudio-migration-tool', 'org');
|
|
18
|
+
class Org extends command_1.SfdxCommand {
|
|
19
|
+
async run() {
|
|
20
|
+
var _a;
|
|
21
|
+
const name = this.flags.name || 'world';
|
|
22
|
+
// this.org is guaranteed because requiresUsername=true, as opposed to supportsUsername
|
|
23
|
+
const conn = this.org.getConnection();
|
|
24
|
+
const query = 'Select Name, TrialExpirationDate from Organization';
|
|
25
|
+
// Query the org
|
|
26
|
+
const result = await conn.query(query);
|
|
27
|
+
// Organization will always return one result, but this is an example of throwing an error
|
|
28
|
+
// The output and --json will automatically be handled for you.
|
|
29
|
+
if (!result.records || result.records.length <= 0) {
|
|
30
|
+
throw new core_1.SfdxError(messages.getMessage('errorNoOrgResults', [this.org.getOrgId()]));
|
|
31
|
+
}
|
|
32
|
+
// Organization always only returns one result
|
|
33
|
+
const orgName = result.records[0].Name;
|
|
34
|
+
const trialExpirationDate = result.records[0].TrialExpirationDate;
|
|
35
|
+
let outputString = `Hello ${name}! This is org: ${orgName}`;
|
|
36
|
+
if (trialExpirationDate) {
|
|
37
|
+
const date = new Date(trialExpirationDate).toDateString();
|
|
38
|
+
outputString = `${outputString} and I will be around until ${date}!`;
|
|
39
|
+
}
|
|
40
|
+
this.ux.log(outputString);
|
|
41
|
+
// this.hubOrg is NOT guaranteed because supportsHubOrgUsername=true, as opposed to requiresHubOrgUsername.
|
|
42
|
+
if (this.hubOrg) {
|
|
43
|
+
const hubOrgId = this.hubOrg.getOrgId();
|
|
44
|
+
this.ux.log(`My hub org id is: ${hubOrgId}`);
|
|
45
|
+
}
|
|
46
|
+
if (this.flags.force && this.args.file) {
|
|
47
|
+
this.ux.log(`You input --force and a file: ${this.args.file}`);
|
|
48
|
+
}
|
|
49
|
+
// Return an object to be displayed with --json
|
|
50
|
+
return { orgId: (_a = this.org) === null || _a === void 0 ? void 0 : _a.getOrgId(), outputString };
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.default = Org;
|
|
54
|
+
Org.description = messages.getMessage('commandDescription');
|
|
55
|
+
Org.examples = messages.getMessage('examples').split(os.EOL);
|
|
56
|
+
Org.args = [{ name: 'file' }];
|
|
57
|
+
Org.flagsConfig = {
|
|
58
|
+
// flag with a value (-n, --name=VALUE)
|
|
59
|
+
name: command_1.flags.string({
|
|
60
|
+
char: 'n',
|
|
61
|
+
description: messages.getMessage('flags.name'),
|
|
62
|
+
}),
|
|
63
|
+
force: command_1.flags.boolean({
|
|
64
|
+
char: 'f',
|
|
65
|
+
description: messages.getMessage('flags.force'),
|
|
66
|
+
}),
|
|
67
|
+
};
|
|
68
|
+
// Comment this out if your command does not require an org username
|
|
69
|
+
Org.requiresUsername = true;
|
|
70
|
+
// Comment this out if your command does not support a hub org username
|
|
71
|
+
Org.supportsDevhubUsername = true;
|
|
72
|
+
// Set this to true if your command requires a project workspace; 'requiresProject' is false by default
|
|
73
|
+
Org.requiresProject = false;
|
|
74
|
+
//# sourceMappingURL=org.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"org.js","sourceRoot":"","sources":["../../../src/commands/hello/org.ts"],"names":[],"mappings":"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"}
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
module.exports = {};
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,iBAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"HelpDefaults": "If not supplied, the apiversion, template, and outputdir use default values.\n",
|
|
3
|
+
"HelpOutputDirRelative": "The outputdir can be an absolute path or relative to the current working directory.\n",
|
|
4
|
+
"HelpOutputDirRelativeLightning": "If you don’t specify an outputdir, we create a subfolder in your current working directory with the name of your bundle. For example, if the current working directory is force-app and your Lightning bundle is called myBundle, we create force-app/myBundle/ to store the files in the bundle.\n",
|
|
5
|
+
"HelpExamplesTitle": "\nExamples:\n",
|
|
6
|
+
"OutputDirFlagDescription": "folder for saving the created files",
|
|
7
|
+
"OutputDirFlagLongDescription": "The directory to store the newly created files. The location can be an absolute path or relative to the current working directory. The default is the current directory.",
|
|
8
|
+
"TemplateFlagDescription": "template to use for file creation",
|
|
9
|
+
"TemplateFlagLongDescription": "The template to use to create the file. Supplied parameter values or default values are filled into a copy of the template.",
|
|
10
|
+
"TargetDirOutput": "target dir = %s",
|
|
11
|
+
"App": "app",
|
|
12
|
+
"Event": "event",
|
|
13
|
+
"Interface": "interface",
|
|
14
|
+
"Test": "test",
|
|
15
|
+
"Component": "component",
|
|
16
|
+
"Page": "page",
|
|
17
|
+
|
|
18
|
+
"AlphaNumericNameError": "Name must contain only alphanumeric characters.",
|
|
19
|
+
"NameMustStartWithLetterError": "Name must start with a letter.",
|
|
20
|
+
"EndWithUnderscoreError": "Name can't end with an underscore.",
|
|
21
|
+
"DoubleUnderscoreError": "Name can't contain 2 consecutive underscores."
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"commandDescription": "print a greeting and your org IDs",
|
|
3
|
+
"flags": {
|
|
4
|
+
"name": "name to print",
|
|
5
|
+
"force": "example boolean flag"
|
|
6
|
+
},
|
|
7
|
+
"examples": [
|
|
8
|
+
"sfdx hello:org --targetusername myOrg@example.com --targetdevhubusername devhub@org.com\n Hello world! This is org: MyOrg and I will be around until Tue Mar 20 2018!\n My hub org id is: 00Dxx000000001234\n",
|
|
9
|
+
"sfdx hello:org --name myname --targetusername myOrg@example.com\n Hello myname! This is org: MyOrg and I will be around until Tue Mar 20 2018!"
|
|
10
|
+
],
|
|
11
|
+
"errorNoOrgResults": "No results found for the org '%s'."
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"1.0.0","commands":{"hello:org":{"id":"hello:org","description":"print a greeting and your org IDs","usage":"<%= command.id %> [-n <string>] [-f] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-omnistudio-migration-tool","pluginType":"core","aliases":[],"examples":["sfdx hello:org --targetusername myOrg@example.com --targetdevhubusername devhub@org.com"," Hello world! This is org: MyOrg and I will be around until Tue Mar 20 2018!"," My hub org id is: 00Dxx000000001234","","sfdx hello:org --name myname --targetusername myOrg@example.com"," Hello myname! This is org: MyOrg and I will be around until Tue Mar 20 2018!"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetdevhubusername":{"name":"targetdevhubusername","type":"option","char":"v","description":"username or alias for the dev hub org; overrides default dev hub org"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"name":{"name":"name","type":"option","char":"n","description":"name to print"},"force":{"name":"force","type":"boolean","char":"f","description":"example boolean flag","allowNo":false}},"args":[{"name":"file"}]}}}
|
package/package.json
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@salesforce/plugin-omnistudio-migration-tool",
|
|
3
|
+
"description": "A template repository for sfdx plugins",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"author": "Salesforce",
|
|
6
|
+
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@oclif/config": "^1",
|
|
9
|
+
"@salesforce/command": "^3.1.3",
|
|
10
|
+
"@salesforce/core": "^2.28.0",
|
|
11
|
+
"tslib": "^2"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@oclif/dev-cli": "^1",
|
|
15
|
+
"@oclif/plugin-command-snapshot": "^2.2.2",
|
|
16
|
+
"@salesforce/cli-plugins-testkit": "^1.5.3",
|
|
17
|
+
"@salesforce/dev-config": "^2.1.2",
|
|
18
|
+
"@salesforce/dev-scripts": "^1.0.2",
|
|
19
|
+
"@salesforce/plugin-command-reference": "^1.3.18",
|
|
20
|
+
"@salesforce/prettier-config": "^0.0.2",
|
|
21
|
+
"@salesforce/ts-sinon": "1.3.21",
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
23
|
+
"@typescript-eslint/parser": "^4.32.0",
|
|
24
|
+
"chai": "^4.3.4",
|
|
25
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
26
|
+
"eslint": "^7.32.0",
|
|
27
|
+
"eslint-config-prettier": "^8.3.0",
|
|
28
|
+
"eslint-config-salesforce": "^0.1.6",
|
|
29
|
+
"eslint-config-salesforce-license": "^0.1.6",
|
|
30
|
+
"eslint-config-salesforce-typescript": "^0.2.8",
|
|
31
|
+
"eslint-plugin-header": "^3.1.1",
|
|
32
|
+
"eslint-plugin-import": "^2.24.2",
|
|
33
|
+
"eslint-plugin-jsdoc": "^35.5.1",
|
|
34
|
+
"eslint-plugin-prettier": "^3.4.1",
|
|
35
|
+
"husky": "^7.0.4",
|
|
36
|
+
"lint-staged": "^11.2.0",
|
|
37
|
+
"mocha": "^8.4.0",
|
|
38
|
+
"nyc": "^15.1.0",
|
|
39
|
+
"prettier": "^2.4.1",
|
|
40
|
+
"pretty-quick": "^3.1.0",
|
|
41
|
+
"shx": "0.2.2",
|
|
42
|
+
"sinon": "^11.1.1",
|
|
43
|
+
"ts-node": "^10.2.1",
|
|
44
|
+
"typescript": "^4.1.3"
|
|
45
|
+
},
|
|
46
|
+
"config": {
|
|
47
|
+
"commitizen": {
|
|
48
|
+
"path": "cz-conventional-changelog"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=12.0.0"
|
|
53
|
+
},
|
|
54
|
+
"files": [
|
|
55
|
+
"/lib",
|
|
56
|
+
"/messages",
|
|
57
|
+
"/oclif.manifest.json"
|
|
58
|
+
],
|
|
59
|
+
"homepage": "https://github.com/salesforcecli/plugin-omnistudio-migration-tool",
|
|
60
|
+
"keywords": [
|
|
61
|
+
"force",
|
|
62
|
+
"salesforce",
|
|
63
|
+
"sfdx",
|
|
64
|
+
"salesforcedx",
|
|
65
|
+
"sfdx-plugin"
|
|
66
|
+
],
|
|
67
|
+
"license": "BSD-3-Clause",
|
|
68
|
+
"oclif": {
|
|
69
|
+
"commands": "./lib/commands",
|
|
70
|
+
"bin": "sfdx",
|
|
71
|
+
"devPlugins": [
|
|
72
|
+
"@oclif/plugin-help",
|
|
73
|
+
"@oclif/plugin-command-snapshot",
|
|
74
|
+
"@salesforce/plugin-command-reference"
|
|
75
|
+
],
|
|
76
|
+
"topics": {
|
|
77
|
+
"hello": {
|
|
78
|
+
"description": "Commands to say hello."
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"repository": "salesforcecli/plugin-omnistudio-migration-tool",
|
|
83
|
+
"scripts": {
|
|
84
|
+
"build": "sf-build",
|
|
85
|
+
"clean": "sf-clean",
|
|
86
|
+
"clean-all": "sf-clean all",
|
|
87
|
+
"clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
|
|
88
|
+
"compile": "sf-compile",
|
|
89
|
+
"docs": "sf-docs",
|
|
90
|
+
"format": "sf-format",
|
|
91
|
+
"lint": "sf-lint",
|
|
92
|
+
"postpack": "shx rm -f oclif.manifest.json",
|
|
93
|
+
"posttest": "yarn lint && yarn test:deprecation-policy && yarn test:command-reference",
|
|
94
|
+
"prepack": "sf-prepack",
|
|
95
|
+
"prepare": "sf-install",
|
|
96
|
+
"pretest": "sf-compile-test",
|
|
97
|
+
"test": "sf-test",
|
|
98
|
+
"test:command-reference": "./bin/run commandreference:generate --erroronwarnings",
|
|
99
|
+
"test:deprecation-policy": "./bin/run snapshot:compare",
|
|
100
|
+
"test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
|
|
101
|
+
"version": "oclif-dev readme"
|
|
102
|
+
},
|
|
103
|
+
"publishConfig": {
|
|
104
|
+
"access": "public"
|
|
105
|
+
},
|
|
106
|
+
"sfdx": {
|
|
107
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-omnistudio-migration-tool/1.0.0.crt",
|
|
108
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-omnistudio-migration-tool/1.0.0.sig"
|
|
109
|
+
}
|
|
110
|
+
}
|