Skip to content

Commit

Permalink
chore: get name from path correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
WillieRuemmele committed Sep 10, 2024
1 parent 1da93af commit 9055fd9
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { join } from 'node:path';
import { join, sep } from 'node:path';
import { ensure, JsonMap } from '@salesforce/ts-types';
import type { PermissionSet } from '@jsforce/jsforce-node/lib/api/metadata/schema';
import { SfError } from '@salesforce/core';
Expand Down Expand Up @@ -66,7 +66,11 @@ export class DecomposedPermissionSetFinalizer extends ConvertTransactionFinalize
private getName(): string {
let name: string;
try {
name = Array.from(this.transactionState.permissionSetChildByPath.keys())[0].split(':')[1].split('.')[0];
name = Array.from(this.transactionState.permissionSetChildByPath.keys())[0]
.split(sep)
.slice(-1)[0]
.split(':')[0]
.split('.')[0];
} catch (e) {
throw SfError.create({
cause: e,
Expand Down

2 comments on commit 9055fd9

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 9055fd9 Previous: 233cae5 Ratio
eda-componentSetCreate-linux 244 ms 249 ms 0.98
eda-sourceToMdapi-linux 2423 ms 2346 ms 1.03
eda-sourceToZip-linux 1929 ms 1922 ms 1.00
eda-mdapiToSource-linux 2996 ms 2933 ms 1.02
lotsOfClasses-componentSetCreate-linux 435 ms 430 ms 1.01
lotsOfClasses-sourceToMdapi-linux 3737 ms 3729 ms 1.00
lotsOfClasses-sourceToZip-linux 3269 ms 3249 ms 1.01
lotsOfClasses-mdapiToSource-linux 3642 ms 3626 ms 1.00
lotsOfClassesOneDir-componentSetCreate-linux 756 ms 763 ms 0.99
lotsOfClassesOneDir-sourceToMdapi-linux 6585 ms 6654 ms 0.99
lotsOfClassesOneDir-sourceToZip-linux 5750 ms 5675 ms 1.01
lotsOfClassesOneDir-mdapiToSource-linux 6570 ms 6653 ms 0.99

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 9055fd9 Previous: 233cae5 Ratio
eda-componentSetCreate-win32 637 ms 679 ms 0.94
eda-sourceToMdapi-win32 4375 ms 4590 ms 0.95
eda-sourceToZip-win32 3008 ms 3183 ms 0.95
eda-mdapiToSource-win32 5910 ms 6252 ms 0.95
lotsOfClasses-componentSetCreate-win32 1259 ms 1291 ms 0.98
lotsOfClasses-sourceToMdapi-win32 8032 ms 8295 ms 0.97
lotsOfClasses-sourceToZip-win32 5241 ms 5364 ms 0.98
lotsOfClasses-mdapiToSource-win32 8227 ms 8361 ms 0.98
lotsOfClassesOneDir-componentSetCreate-win32 2237 ms 2332 ms 0.96
lotsOfClassesOneDir-sourceToMdapi-win32 14351 ms 15248 ms 0.94
lotsOfClassesOneDir-sourceToZip-win32 9552 ms 9979 ms 0.96
lotsOfClassesOneDir-mdapiToSource-win32 14642 ms 15449 ms 0.95

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.