Skip to content

Commit

Permalink
Merge pull request #22 from texei/bump
Browse files Browse the repository at this point in the history
Bump dependencies + handling customMetadataTypeAccesses on Profiles
  • Loading branch information
FabienTaillon authored Nov 26, 2019
2 parents 2ad4605 + 91d29cf commit a29db7d
Show file tree
Hide file tree
Showing 8 changed files with 365 additions and 1,055 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ EXAMPLE
Data exported!
```

_See code: [src/commands/texei/data/export.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.2.2/src/commands/texei/data/export.ts)_
_See code: [src/commands/texei/data/export.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.3.0/src/commands/texei/data/export.ts)_

## `sfdx texei:data:import -d <string> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

Expand Down Expand Up @@ -93,7 +93,7 @@ EXAMPLE
Data imported!
```

_See code: [src/commands/texei/data/import.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.2.2/src/commands/texei/data/import.ts)_
_See code: [src/commands/texei/data/import.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.3.0/src/commands/texei/data/import.ts)_

## `sfdx texei:org:contractfieldhistory:fix [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

Expand Down Expand Up @@ -121,7 +121,7 @@ EXAMPLE
History tracking fixed.
```

_See code: [src/commands/texei/org/contractfieldhistory/fix.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.2.2/src/commands/texei/org/contractfieldhistory/fix.ts)_
_See code: [src/commands/texei/org/contractfieldhistory/fix.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.3.0/src/commands/texei/org/contractfieldhistory/fix.ts)_

## `sfdx texei:package:dependencies:install [-k <string>] [-b <string>] [-p <string>] [-s <string>] [-n <string>] [-w <number>] [-r] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

Expand Down Expand Up @@ -179,7 +179,7 @@ EXAMPLE
$ texei:package:dependencies:install -u MyScratchOrg -v MyDevHub -k "1:MyPackage1Key 2: 3:MyPackage3Key" -b "DEV"
```

_See code: [src/commands/texei/package/dependencies/install.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.2.2/src/commands/texei/package/dependencies/install.ts)_
_See code: [src/commands/texei/package/dependencies/install.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.3.0/src/commands/texei/package/dependencies/install.ts)_

## `sfdx texei:profile:clean [-k <string>] [-p <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

Expand Down Expand Up @@ -213,7 +213,7 @@ EXAMPLES
custom-sfdx-source-folder/main/profiles,source-folder-2/main/profiles/myAdmin.profile-meta.xml
```

_See code: [src/commands/texei/profile/clean.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.2.2/src/commands/texei/profile/clean.ts)_
_See code: [src/commands/texei/profile/clean.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.3.0/src/commands/texei/profile/clean.ts)_

## `sfdx texei:skinnyprofile:retrieve [-t <string>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

Expand Down Expand Up @@ -246,7 +246,7 @@ EXAMPLE
$ texei:skinnyprofile:retrieve -u MyScratchOrg
```

_See code: [src/commands/texei/skinnyprofile/retrieve.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.2.2/src/commands/texei/skinnyprofile/retrieve.ts)_
_See code: [src/commands/texei/skinnyprofile/retrieve.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.3.0/src/commands/texei/skinnyprofile/retrieve.ts)_

## `sfdx texei:source:customlabel:replace -l <string> -v <string> [-p <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

Expand All @@ -270,7 +270,7 @@ EXAMPLE
$ texei:source:customlabel:replace --label GreatSalesforceBlog --value https://blog.texei.com
```

_See code: [src/commands/texei/source/customlabel/replace.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.2.2/src/commands/texei/source/customlabel/replace.ts)_
_See code: [src/commands/texei/source/customlabel/replace.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.3.0/src/commands/texei/source/customlabel/replace.ts)_

## `sfdx texei:source:layouts:cleanorg [-p <string>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

Expand Down Expand Up @@ -303,7 +303,7 @@ EXAMPLES
$ texei:source:layouts:cleanorg --targetusername myScratchOrg --targetdevhubusername myDevHub
```

_See code: [src/commands/texei/source/layouts/cleanorg.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.2.2/src/commands/texei/source/layouts/cleanorg.ts)_
_See code: [src/commands/texei/source/layouts/cleanorg.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.3.0/src/commands/texei/source/layouts/cleanorg.ts)_

## `sfdx texei:user:update [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`

Expand Down Expand Up @@ -332,8 +332,8 @@ OPTIONS
EXAMPLES
$ sfdx texei:user:update --targetusername [email protected] --values "LanguageLocaleKey='fr'"
Successfully updated record: 005D2A90N8A11SVPE2.
$ sfdx texei:user:update --values "UserPermissionsKnowledgeUser=true --json"
$ sfdx texei:user:update --values "UserPermissionsKnowledgeUser=true" --json
```

_See code: [src/commands/texei/user/update.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.2.2/src/commands/texei/user/update.ts)_
_See code: [src/commands/texei/user/update.ts](https://github.com/texei/texei-sfdx-plugin/blob/v1.3.0/src/commands/texei/user/update.ts)_
<!-- commandsstop -->
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
{
"name": "texei-sfdx-plugin",
"description": "Texeï's plugin for sfdx",
"version": "1.2.2",
"version": "1.3.0",
"author": "Texeï",
"bugs": "https://github.com/https://github.com/texei/texei-sfdx-plugin/issues",
"dependencies": {
"@oclif/command": "^1",
"@oclif/config": "^1",
"@oclif/errors": "^1",
"@salesforce/command": "^1.4.1",
"@salesforce/core": "^1.3.2",
"@salesforce/command": "^2.1.3",
"@salesforce/core": "^2.1.5",
"child-process-promise": "^2.2.1",
"jsforce": "^1.9.2",
"puppeteer": "^2.0.0",
"tslib": "^1",
"unzip": "^0.1.11"
"unzipper": "^0.10.5"
},
"devDependencies": {
"@oclif/dev-cli": "^1",
Expand All @@ -23,12 +22,12 @@
"@salesforce/dev-config": "1.4.1",
"@types/chai": "^4",
"@types/mocha": "^5",
"@types/node": "^10",
"@types/node": "^12",
"chai": "^4",
"globby": "^8",
"mocha": "^5",
"globby": "^10.0.1",
"mocha": "^6.2.2",
"nyc": "^14.1.1",
"rimraf": "^2.6.3",
"rimraf": "^3.0.0",
"ts-node": "^8",
"tslint": "^5",
"typescript": "~3.3"
Expand Down
3 changes: 1 addition & 2 deletions src/commands/texei/data/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as fs from "fs";
import * as path from "path";
import { Record, RecordResult, SuccessResult, Connection } from 'jsforce';
const util = require("util");
import { getJsforceConnection } from '../../../shared/jsforceHelper';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Expand Down Expand Up @@ -44,7 +43,7 @@ export default class Import extends SfdxCommand {
protected static requiresProject = false;

public async run(): Promise<AnyJson> {
conn = await getJsforceConnection(this.org.getConnection().getConnectionOptions());
conn = await this.org.getConnection();
recordIdsMap = new Map<string, string>();

// Just add potential SfdxOrgUser that could be used during export
Expand Down
2 changes: 1 addition & 1 deletion src/commands/texei/org/contractfieldhistory/fix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class Fix extends SfdxCommand {

const POST_LOGIN_PATH = "/ui/setup/layout/FieldHistoryTracking?pEntity=Contract";

this.ux.startSpinner('Retrieving Profiles');
this.ux.startSpinner('Fixing Contract Field History');
this.debug(`DEBUG Login to Scratch Org`);

const browser = await puppeteer.launch({
Expand Down
7 changes: 4 additions & 3 deletions src/commands/texei/skinnyprofile/retrieve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { AnyJson } from "@salesforce/ts-types";
import * as path from 'path';
var fs = require('fs');
var unzip = require('unzip');
var unzipper = require('unzipper');
const util = require('util');
const xml2js = require('xml2js');

Expand Down Expand Up @@ -53,7 +53,8 @@ export default class Retrieve extends SfdxCommand {
'fieldPermissions',
'objectPermissions',
'pageAccesses',
'tabVisibilities'];
'tabVisibilities',
'customMetadataTypeAccesses'];

// These metadata are on Permission Set, but Default is selected on Profile. Keeping only the default value
public nodesHavingDefault = ['applicationVisibilities','recordTypeVisibilities'];
Expand Down Expand Up @@ -148,7 +149,7 @@ export default class Retrieve extends SfdxCommand {
// Setting timeout
conn.metadata.pollTimeout = this.flags.timeout ? this.flags.timeout : defaultTimeout;
// @ts-ignore: Don't know why, but TypeScript doesn't see the callback as optional
const parsed = await conn.metadata.retrieve(mypackage).stream().pipe(unzip.Parse());
const parsed = await conn.metadata.retrieve(mypackage).stream().pipe(unzipper.Parse());

await new Promise(async (resolve, reject) => {
this.debug(`DEBUG Parsing retrieved package`);
Expand Down
2 changes: 1 addition & 1 deletion src/commands/texei/user/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class Update extends SfdxCommand {

public static examples = [
`$ sfdx texei:user:update --targetusername [email protected] --values "LanguageLocaleKey='fr'" \nSuccessfully updated record: 005D2A90N8A11SVPE2.`,
`$ sfdx texei:user:update --values "UserPermissionsKnowledgeUser=true --json"`
`$ sfdx texei:user:update --values "UserPermissionsKnowledgeUser=true" --json`
];

//public static args = [{ name: 'file' }];
Expand Down
15 changes: 0 additions & 15 deletions src/shared/jsforceHelper.ts

This file was deleted.

Loading

0 comments on commit a29db7d

Please sign in to comment.