Skip to content

Commit

Permalink
Bump dependencies to base packages, fixes #176
Browse files Browse the repository at this point in the history
  • Loading branch information
FabienTaillon committed Oct 14, 2024
1 parent ea52d3b commit cd36292
Show file tree
Hide file tree
Showing 30 changed files with 2,376 additions and 1,544 deletions.
1,891 changes: 1,152 additions & 739 deletions oclif.lock

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{
"name": "texei-sfdx-plugin",
"description": "Texeï's plugin for sfdx",
"version": "2.7.1",
"version": "2.8.0",
"author": "Texeï",
"bugs": "https://github.com/texei/texei-sfdx-plugin/issues",
"type": "module",
"dependencies": {
"@oclif/core": "^2.15.0",
"@salesforce/core": "^5.2.10",
"@salesforce/kit": "^3.0.11",
"@salesforce/packaging": "^2.4.3",
"@salesforce/sf-plugins-core": "^3.1.24",
"@salesforce/source-tracking": "^4.2.14",
"@oclif/core": "^4.0.28",
"@salesforce/core": "^8.6.2",
"@salesforce/kit": "^3.2.3",
"@salesforce/packaging": "^4.2.15",
"@salesforce/sf-plugins-core": "^11.3.12",
"@salesforce/source-tracking": "^7.1.17",
"@types/child-process-promise": "^2.2.2",
"@types/jsforce": "^1.11.0",
"@types/jsforce": "^1.11.5",
"@types/xml2js": "^0.4.11",
"chalk": "^4.1.2",
"child-process-promise": "^2.2.1",
Expand All @@ -35,7 +36,7 @@
"@salesforce/prettier-config": "^0.0.3",
"@salesforce/ts-sinon": "1.4.5",
"@salesforce/ts-types": "^2.0.6",
"@swc/core": "^1.3.35",
"@swc/core": "^1.3.39",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"chai": "^4.3.10",
Expand All @@ -51,13 +52,13 @@
"husky": "^7.0.4",
"mocha": "^9.1.3",
"nyc": "^15.1.0",
"oclif": "^4.14.31",
"oclif": "^4.15.8",
"prettier": "^2.8.3",
"pretty-quick": "^3.1.3",
"shx": "0.3.4",
"sinon": "^11.1.2",
"ts-node": "^10.8.1",
"typescript": "^5.2.2",
"typescript": "^5.6.3",
"wireit": "^0.14.1"
},
"config": {},
Expand Down
4 changes: 2 additions & 2 deletions src/commands/texei/contractstatus/value/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import {
loglevel,
} from '@salesforce/sf-plugins-core';
import { Messages } from '@salesforce/core';
import { StandardValueSetHelper } from '../../../../shared/standardValueSetHelper';
import { StandardValueSetHelper } from '../../../../shared/standardValueSetHelper.js';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down
2 changes: 1 addition & 1 deletion src/commands/texei/cpqsettings/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import * as puppeteer from 'puppeteer';
import { ElementHandle } from 'puppeteer';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down
4 changes: 3 additions & 1 deletion src/commands/texei/data/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { Messages, SfError, Connection } from '@salesforce/core';
import { Record } from 'jsforce';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down Expand Up @@ -252,6 +252,7 @@ export default class Export extends SfCommand<ExportResult> {
// Manually reading stream instead on using jsforce directly
// Because jsforce will return '75008.0' instead of 75008 for a number
const recordStream = conn.bulk.query(sObjectQuery);
// @ts-ignore: TODO: working code, but look at TS warning
const readStream = recordStream.stream();
const csvToJsonParser = csv({ flatKeys: false, checkType: true });
// eslint-disable-next-line @typescript-eslint/no-floating-promises
Expand All @@ -262,6 +263,7 @@ export default class Export extends SfCommand<ExportResult> {
retrievedRecords.push(JSON.parse(data.toString('utf8')));
});

// @ts-ignore: TODO: working code, but look at TS warning
recordStream.on('error', (error) => {
reject(error);
});
Expand Down
2 changes: 1 addition & 1 deletion src/commands/texei/data/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { Messages, SfError, Connection } from '@salesforce/core';
import { Record, RecordResult, SuccessResult, ErrorResult, ExecuteOptions, DescribeSObjectResult } from 'jsforce';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down
2 changes: 1 addition & 1 deletion src/commands/texei/data/plan/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Messages, SfError } from '@salesforce/core';
const dataPlanFilename = 'data-plan.json';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down
2 changes: 1 addition & 1 deletion src/commands/texei/debug/lwc/enable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import { Messages, SfError } from '@salesforce/core';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
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 @@ -13,7 +13,7 @@ import { Messages } from '@salesforce/core';
import * as puppeteer from 'puppeteer';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down
6 changes: 3 additions & 3 deletions src/commands/texei/org/shape/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import {
requiredOrgFlagWithDeprecations,
} from '@salesforce/sf-plugins-core';
import { Messages, SfError } from '@salesforce/core';
import { toTitleCase } from '../../../../shared/utils';
import { toTitleCase } from '../../../../shared/utils.js';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down Expand Up @@ -120,7 +120,7 @@ export default class Extract extends SfCommand<OrgShapeExtractResult> {

// Getting API Version
// TODO: put this in a helper ? Is there a Core library method to get this OOTB ?
let apiVersion = flags.apiversion;
let apiVersion = flags['api-version'];

// if there is an api version set via the apiversion flag, use it
// Otherwise use the latest api version available on the org
Expand Down
2 changes: 1 addition & 1 deletion src/commands/texei/package/dependencies/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const packageAliasesMap = [];
const defaultWait = 10;

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down
2 changes: 1 addition & 1 deletion src/commands/texei/picklist/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { AnyJson } from '@salesforce/ts-types';
import xml2js = require('xml2js');

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down
2 changes: 1 addition & 1 deletion src/commands/texei/picklist/restrict.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import { Messages, SfError } from '@salesforce/core';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down
4 changes: 2 additions & 2 deletions src/commands/texei/picklist/unrestrict.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import {
} from '@salesforce/sf-plugins-core';
import { Messages, SfError } from '@salesforce/core';
import xml2js = require('xml2js');
import { getPackagesPaths, findObjectsFolders } from '../../../shared/sfdxProjectFolder';
import { getPackagesPaths, findObjectsFolders } from '../../../shared/sfdxProjectFolder.js';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down
4 changes: 2 additions & 2 deletions src/commands/texei/profile/clean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import util = require('util');
import { SfCommand, Flags, loglevel } from '@salesforce/sf-plugins-core';
import { Messages, SfError } from '@salesforce/core';
import xml2js = require('xml2js');
import { getDefaultPackagePath, getProfilesInPath } from '../../../shared/sfdxProjectFolder';
import { getDefaultPackagePath, getProfilesInPath } from '../../../shared/sfdxProjectFolder.js';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down
12 changes: 6 additions & 6 deletions src/commands/texei/profile/convert.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
import { Messages, SfError } from '@salesforce/core';
import { Connection } from 'jsforce';
import { Connection } from '@salesforce/core';
import { AnyJson } from '@salesforce/ts-types';
import {
permissionSetNodes,
commonProfilePermissionSetNodes,
nodesHavingDefault,
profileNodesToPermissionSetNodes,
profileTabVisibiltyToPermissionSetTabVisibility,
} from '../../../shared/skinnyProfileHelper';
import { toApiName } from '../../../shared/utils';
import { Profile, PermissionSetMetadataType, PermissionSetTabVisibility } from '../skinnyprofile/MetadataTypes';
} from '../../../shared/skinnyProfileHelper.js';
import { toApiName } from '../../../shared/utils.js';
import { Profile, PermissionSetMetadataType, PermissionSetTabVisibility } from '../skinnyprofile/MetadataTypes.js';

Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('texei-sfdx-plugin', 'profile.convert');

export type ProfileConvertResult = {
Expand Down Expand Up @@ -60,7 +60,7 @@ export default class Convert extends SfCommand<ProfileConvertResult> {
const apiName = flags['override-api-name'] ? flags['override-api-name'] : toApiName(permissionSetName);

// Create a connection to the org
this.connection = flags['target-org']?.getConnection(flags['api-version']) as Connection;
this.connection = flags['target-org']?.getConnection(flags['api-version']);

let commandResult = '';

Expand Down
10 changes: 5 additions & 5 deletions src/commands/texei/profile/empty.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
import { Messages, SfError } from '@salesforce/core';
import { Connection } from 'jsforce';
import { Connection } from '@salesforce/core';
import { AnyJson } from '@salesforce/ts-types';
import { permissionSetNodes, nodesHavingDefault, removeAllProfileAccess } from '../../../shared/skinnyProfileHelper';
import { Profile, ProfileTabVisibility } from '../skinnyprofile/MetadataTypes';
import { permissionSetNodes, nodesHavingDefault, removeAllProfileAccess } from '../../../shared/skinnyProfileHelper.js';
import { Profile, ProfileTabVisibility } from '../skinnyprofile/MetadataTypes.js';

Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('texei-sfdx-plugin', 'profile.empty');

export type ProfileEmptyResult = {
Expand Down Expand Up @@ -41,7 +41,7 @@ export default class Empty extends SfCommand<ProfileEmptyResult> {
const { flags } = await this.parse(Empty);

// Create a connection to the org
this.connection = flags['target-org']?.getConnection(flags['api-version']) as Connection;
this.connection = flags['target-org']?.getConnection(flags['api-version']);

let commandResult = '';

Expand Down
2 changes: 1 addition & 1 deletion src/commands/texei/sharedactivities/enable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Messages } from '@salesforce/core';
import * as puppeteer from 'puppeteer';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down
2 changes: 1 addition & 1 deletion src/commands/texei/sharingcalc/recalculate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Messages } from '@salesforce/core';
import * as puppeteer from 'puppeteer';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down
2 changes: 1 addition & 1 deletion src/commands/texei/sharingcalc/resume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Messages, SfError } from '@salesforce/core';
import * as puppeteer from 'puppeteer';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down
2 changes: 1 addition & 1 deletion src/commands/texei/sharingcalc/suspend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Messages, SfError } from '@salesforce/core';
import * as puppeteer from 'puppeteer';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down
8 changes: 4 additions & 4 deletions src/commands/texei/skinnyprofile/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import * as path from 'node:path';
import xml2js = require('xml2js');
import { SfCommand, Flags, loglevel } from '@salesforce/sf-plugins-core';
import { Messages, SfError } from '@salesforce/core';
import { permissionSetNodes } from '../../../shared/skinnyProfileHelper';
import { getDefaultPackagePath, getProfilesInPath } from '../../../shared/sfdxProjectFolder';
import { ProfileMetadataType } from './MetadataTypes';
import { permissionSetNodes } from '../../../shared/skinnyProfileHelper.js';
import { getDefaultPackagePath, getProfilesInPath } from '../../../shared/sfdxProjectFolder.js';
import { ProfileMetadataType } from './MetadataTypes.js';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down
13 changes: 7 additions & 6 deletions src/commands/texei/skinnyprofile/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import * as path from 'node:path';
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
import { Messages, SfError } from '@salesforce/core';
import { XMLParser } from 'fast-xml-parser';
import { Connection, Record } from 'jsforce';
import { Error } from 'jsforce/lib/api/soap/schema';
import { getDefaultPackagePath, getProfilesInPath } from '../../../shared/sfdxProjectFolder';
import { ProfileMetadataType, PermissionSetRecord } from './MetadataTypes';
import { Record } from 'jsforce';
import { Connection } from '@salesforce/core';
import { Error } from 'jsforce/lib/api/soap/schema.js';
import { getDefaultPackagePath, getProfilesInPath } from '../../../shared/sfdxProjectFolder.js';
import { ProfileMetadataType, PermissionSetRecord } from './MetadataTypes.js';

Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('texei-sfdx-plugin', 'skinnyprofile.create');

export type SkinnyprofileCreateResult = {
Expand Down Expand Up @@ -49,7 +50,7 @@ export default class Create extends SfCommand<SkinnyprofileCreateResult> {
const parser = new XMLParser();

// Create a connection to the org
this.connection = flags['target-org']?.getConnection(flags['api-version']) as Connection;
this.connection = flags['target-org']?.getConnection(flags['api-version']);

let profilesInPath: string[] = [];
const profilesCreated: string[] = [];
Expand Down
12 changes: 7 additions & 5 deletions src/commands/texei/skinnyprofile/retrieve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import {
requiredOrgFlagWithDeprecations,
loglevel,
} from '@salesforce/sf-plugins-core';
import { Messages, Connection, SfError } from '@salesforce/core';
import { Messages, Connection, SfError, SfProject } from '@salesforce/core';
import { AnyJson } from '@salesforce/ts-types';
import { SourceTracking } from '@salesforce/source-tracking';
import { getMetadata, getLayoutsForObject, getRecordTypesForObject } from '../../../shared/sfdxProjectFolder';
import { permissionSetNodes, nodesHavingDefault } from '../../../shared/skinnyProfileHelper';
import { getMetadata, getLayoutsForObject, getRecordTypesForObject } from '../../../shared/sfdxProjectFolder.js';
import { permissionSetNodes, nodesHavingDefault } from '../../../shared/skinnyProfileHelper.js';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
Expand Down Expand Up @@ -128,9 +128,11 @@ export default class Retrieve extends SfCommand<RetrieveResult> {
const maxApiVersion: string = await flags['target-org'].retrieveMaxApiVersion();
await this.retrievePackage(typesToRetrieve, flags.timeout, maxApiVersion);

const projectSF = await SfProject.resolve();

const tracking = await SourceTracking.create({
org: flags['target-org'],
project: this.project,
project: projectSF,
});

// Update local tracking so that Profiles won't be listed as modified and generate conflicts later
Expand Down
2 changes: 1 addition & 1 deletion src/commands/texei/source/customlabel/replace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Messages, SfError } from '@salesforce/core';
import xml2js = require('xml2js');

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

const defaultCustomLabelsFolder = 'force-app/main/default/labels';
const customLabelsFileName = 'CustomLabels.labels-meta.xml';
Expand Down
Loading

0 comments on commit cd36292

Please sign in to comment.