@terafina/tffa-sfdx-plugin 17.0.0-rc.9 → 18.0.0-rc.1
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/README.md +91 -151
- package/lib/commands/tffa/apexdoc.js +1 -1
- package/lib/commands/tffa/apexdoc.js.map +1 -1
- package/lib/commands/tffa/data/export.js +46 -16
- package/lib/commands/tffa/data/export.js.map +1 -1
- package/lib/commands/tffa/data/import.js +42 -22
- package/lib/commands/tffa/data/import.js.map +1 -1
- package/lib/commands/tffa/lint.js +1 -1
- package/lib/commands/tffa/lint.js.map +1 -1
- package/lib/commands/tffa/meta.js +13 -12
- package/lib/commands/tffa/meta.js.map +1 -1
- package/lib/commands/tffa/ping.js +5 -7
- package/lib/commands/tffa/ping.js.map +1 -1
- package/lib/commands/tffa/source/apiset.js +14 -14
- package/lib/commands/tffa/source/apiset.js.map +1 -1
- package/lib/commands/tffa/source/createfield.js +43 -31
- package/lib/commands/tffa/source/createfield.js.map +1 -1
- package/lib/services/lint/rules.js +1 -1
- package/lib/services/lint/rules.js.map +1 -1
- package/lib/utils/constants.js +2 -2
- package/lib/utils/constants.js.map +1 -1
- package/lib/utils/ignored-files.js +1 -1
- package/lib/utils/ignored-files.js.map +1 -1
- package/messages/dataExport.js +2 -2
- package/oclif.manifest.json +62 -479
- package/package.json +36 -32
- package/lib/commands/tffa/apexdoc.d.ts +0 -31
- package/lib/commands/tffa/data/export.d.ts +0 -71
- package/lib/commands/tffa/data/import.d.ts +0 -69
- package/lib/commands/tffa/lint.d.ts +0 -22
- package/lib/commands/tffa/meta.d.ts +0 -16
- package/lib/commands/tffa/ping.d.ts +0 -14
- package/lib/commands/tffa/source/apiset.d.ts +0 -11
- package/lib/commands/tffa/source/createfield.d.ts +0 -41
- package/lib/index.d.ts +0 -5
- package/lib/services/apexdoc/common/apex-docs-error.d.ts +0 -23
- package/lib/services/apexdoc/common/array-utils.d.ts +0 -9
- package/lib/services/apexdoc/common/line-reader.d.ts +0 -40
- package/lib/services/apexdoc/common/models/apex-model.d.ts +0 -51
- package/lib/services/apexdoc/common/models/class-group.d.ts +0 -10
- package/lib/services/apexdoc/common/models/class-model.d.ts +0 -41
- package/lib/services/apexdoc/common/models/engine-config.d.ts +0 -23
- package/lib/services/apexdoc/common/models/enum-model.d.ts +0 -15
- package/lib/services/apexdoc/common/models/index.d.ts +0 -10
- package/lib/services/apexdoc/common/models/method-model.d.ts +0 -26
- package/lib/services/apexdoc/common/models/property-model.d.ts +0 -12
- package/lib/services/apexdoc/common/models/top-level-model.d.ts +0 -19
- package/lib/services/apexdoc/common/settings.d.ts +0 -56
- package/lib/services/apexdoc/common/tags.d.ts +0 -22
- package/lib/services/apexdoc/common/utils.d.ts +0 -39
- package/lib/services/apexdoc/common/validator-engine.d.ts +0 -23
- package/lib/services/apexdoc/common/validator.d.ts +0 -16
- package/lib/services/apexdoc/engine/file-manager.d.ts +0 -52
- package/lib/services/apexdoc/engine/generators/generator-utils.d.ts +0 -12
- package/lib/services/apexdoc/engine/generators/menu-generator.d.ts +0 -9
- package/lib/services/apexdoc/engine/generators/models/child-enum-markup-generator.d.ts +0 -10
- package/lib/services/apexdoc/engine/generators/models/class-markup-generator.d.ts +0 -8
- package/lib/services/apexdoc/engine/generators/models/enum-markup-generator.d.ts +0 -9
- package/lib/services/apexdoc/engine/generators/models/markup-generator.d.ts +0 -27
- package/lib/services/apexdoc/engine/generators/models/method-markup-generator.d.ts +0 -22
- package/lib/services/apexdoc/engine/generators/models/property-markup-generator.d.ts +0 -11
- package/lib/services/apexdoc/engine/generators/models/source-markup-generator.d.ts +0 -10
- package/lib/services/apexdoc/engine/generators/models/top-level-markup-generator.d.ts +0 -10
- package/lib/services/apexdoc/engine/generators/see-link-generator.d.ts +0 -20
- package/lib/services/lint/apex-class-scan.d.ts +0 -31
- package/lib/services/lint/apex-pmd.d.ts +0 -10
- package/lib/services/lint/eslint-scan.d.ts +0 -13
- package/lib/services/lint/metadata-scan.d.ts +0 -30
- package/lib/services/lint/rules.d.ts +0 -10
- package/lib/services/lint/stylelint-scan.d.ts +0 -13
- package/lib/services/meta/field-scan.d.ts +0 -23
- package/lib/utils/constants.d.ts +0 -9
- package/lib/utils/ignored-files.d.ts +0 -18
- package/lib/utils/jreSetupManager.d.ts +0 -17
package/package.json
CHANGED
|
@@ -1,72 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@terafina/tffa-sfdx-plugin",
|
|
3
3
|
"description": "sfdx plugin from Terafina containing tools for scanning and extending digital applications for the financial services industry.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "18.0.0-rc.1",
|
|
5
5
|
"author": "Terafina Inc",
|
|
6
6
|
"bugs": "https://github.com/terafinainc/tffa-sfdx-plugin/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@oclif/core": "2.0
|
|
9
|
-
"@
|
|
10
|
-
"@oclif/plugin-
|
|
11
|
-
"@oclif/plugin-
|
|
12
|
-
"@oclif/plugin-
|
|
13
|
-
"@
|
|
14
|
-
"@salesforce/core": "
|
|
15
|
-
"@salesforce/sf-plugins-core": "2.0.2",
|
|
8
|
+
"@oclif/core": "2.8.0",
|
|
9
|
+
"@salesforce/core": "3.34.6",
|
|
10
|
+
"@oclif/plugin-help": "5.2.9",
|
|
11
|
+
"@oclif/plugin-plugins": "2.4.4",
|
|
12
|
+
"@oclif/plugin-version": "1.3.2",
|
|
13
|
+
"@oclif/plugin-warn-if-update-available": "2.0.33",
|
|
14
|
+
"@salesforce/sf-plugins-core": "2.2.7",
|
|
16
15
|
"find-java-home": "2.0.0",
|
|
17
16
|
"cheerio": "1.0.0-rc.12",
|
|
18
|
-
"csv-stringify": "6.
|
|
19
|
-
"fs-extra": "11.1.
|
|
17
|
+
"csv-stringify": "6.3.0",
|
|
18
|
+
"fs-extra": "11.1.1",
|
|
20
19
|
"lodash.escape": "4.0.1",
|
|
21
20
|
"pretty": "2.0.0",
|
|
22
|
-
"rimraf": "4.1
|
|
21
|
+
"rimraf": "4.4.1",
|
|
23
22
|
"tslib": "2.5.0",
|
|
24
23
|
"xml2js": "0.4.23",
|
|
25
24
|
"recursive-readdir": "2.2.3",
|
|
26
25
|
"replace-in-file": "6.3.5"
|
|
27
26
|
},
|
|
28
27
|
"devDependencies": {
|
|
29
|
-
"@commitlint/cli": "17.
|
|
30
|
-
"@commitlint/config-angular": "17.4.
|
|
31
|
-
"@oclif/test": "2.3.
|
|
28
|
+
"@commitlint/cli": "17.5.1",
|
|
29
|
+
"@commitlint/config-angular": "17.4.4",
|
|
30
|
+
"@oclif/test": "2.3.14",
|
|
32
31
|
"@salesforce/dev-config": "3.1.0",
|
|
33
|
-
"@salesforce/ts-sinon": "1.4.
|
|
32
|
+
"@salesforce/ts-sinon": "1.4.6",
|
|
34
33
|
"@types/chai": "4",
|
|
35
34
|
"@types/cheerio": "0.22.31",
|
|
36
35
|
"@types/fs-extra": "11.0.1",
|
|
37
36
|
"@types/js-yaml": "4.0.5",
|
|
38
37
|
"@types/mocha": "10.0.1",
|
|
39
|
-
"@types/node": "18.
|
|
38
|
+
"@types/node": "18.15.11",
|
|
40
39
|
"@types/recursive-readdir": "2.2.1",
|
|
41
40
|
"@types/xml2js": "0.4.11",
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
43
|
-
"@typescript-eslint/parser": "5.
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "5.57.1",
|
|
42
|
+
"@typescript-eslint/parser": "5.57.1",
|
|
44
43
|
"chai": "4",
|
|
45
|
-
"eslint": "8.
|
|
46
|
-
"eslint-config-prettier": "8.
|
|
47
|
-
"eslint-plugin-deprecation": "1.
|
|
44
|
+
"eslint": "8.37.0",
|
|
45
|
+
"eslint-config-prettier": "8.8.0",
|
|
46
|
+
"eslint-plugin-deprecation": "1.4.0",
|
|
48
47
|
"eslint-plugin-header": "3.1.1",
|
|
49
48
|
"eslint-plugin-import": "2.27.5",
|
|
50
49
|
"eslint-plugin-jest": "27.2.1",
|
|
51
|
-
"eslint-plugin-jsdoc": "
|
|
50
|
+
"eslint-plugin-jsdoc": "40.1.1",
|
|
52
51
|
"eslint-plugin-prefer-arrow": "1.2.3",
|
|
53
|
-
"eslint-plugin-sonarjs": "0.
|
|
52
|
+
"eslint-plugin-sonarjs": "0.19.0",
|
|
54
53
|
"globby": "11.0.1",
|
|
55
|
-
"htmlparser2": "8.0.
|
|
54
|
+
"htmlparser2": "8.0.2",
|
|
56
55
|
"husky": "8.0.3",
|
|
57
|
-
"mem-fs": "2.
|
|
58
|
-
"mem-fs-editor": "9.
|
|
56
|
+
"mem-fs": "2.3.0",
|
|
57
|
+
"mem-fs-editor": "9.7.0",
|
|
59
58
|
"mocha": "10.2.0",
|
|
60
59
|
"nyc": "15.1.0",
|
|
61
|
-
"oclif": "3.
|
|
62
|
-
"prettier": "2.8.
|
|
60
|
+
"oclif": "3.7.3",
|
|
61
|
+
"prettier": "2.8.7",
|
|
63
62
|
"prettier-plugin-apex": "1.12.0",
|
|
64
63
|
"properties-parser": "0.3.1",
|
|
65
64
|
"properties-reader": "2.2.0",
|
|
66
65
|
"standard-version": "9.5.0",
|
|
67
66
|
"ts-node": "10",
|
|
68
|
-
"typescript": "
|
|
69
|
-
"yargs": "17.
|
|
67
|
+
"typescript": "5.0.3",
|
|
68
|
+
"yargs": "17.7.1"
|
|
70
69
|
},
|
|
71
70
|
"engines": {
|
|
72
71
|
"node": ">=16.0.0"
|
|
@@ -104,7 +103,12 @@
|
|
|
104
103
|
"@oclif/plugin-help",
|
|
105
104
|
"@oclif/plugin-version",
|
|
106
105
|
"@oclif/plugin-warn-if-update-available"
|
|
107
|
-
]
|
|
106
|
+
],
|
|
107
|
+
"warn-if-update-available": {
|
|
108
|
+
"timeoutInDays": 7,
|
|
109
|
+
"message": "<%= config.name %> update available from <%= chalk.greenBright(config.version) %> to <%= chalk.greenBright(latest) %>.",
|
|
110
|
+
"registry": "https://registry.npmjs.org"
|
|
111
|
+
}
|
|
108
112
|
},
|
|
109
113
|
"main": "lib/index.js",
|
|
110
114
|
"repository": "terafina/tffa-sfdx-plugin",
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NCR Terafina
|
|
3
|
-
**/
|
|
4
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
5
|
-
export default class ApexDoc extends SfCommand<void> {
|
|
6
|
-
static description: string;
|
|
7
|
-
private logger;
|
|
8
|
-
static examples: string[];
|
|
9
|
-
private currentFile;
|
|
10
|
-
static readonly flags: {
|
|
11
|
-
sourcefolder: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
-
destfolder: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
13
|
-
};
|
|
14
|
-
run(): Promise<void>;
|
|
15
|
-
/**
|
|
16
|
-
* Entry point for the program. Called by SFDX on extension activation.
|
|
17
|
-
*
|
|
18
|
-
* @param config The configuration collected from the users config,
|
|
19
|
-
* supplemented with any defaults if user did not include them.
|
|
20
|
-
*/
|
|
21
|
-
private generateDocs;
|
|
22
|
-
private createClassGroupMap;
|
|
23
|
-
/**
|
|
24
|
-
* The main routine for parsing our Apex files. Here we collect ApexDox comments, and create
|
|
25
|
-
* models of our top-level types (Classes and Enums) and their members (Enum values, Methods,
|
|
26
|
-
* Properties, Inner Classes, etc.).
|
|
27
|
-
*
|
|
28
|
-
* @param filePath The path of the file being parsed
|
|
29
|
-
*/
|
|
30
|
-
private parseFileContents;
|
|
31
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NCR Terafina
|
|
3
|
-
**/
|
|
4
|
-
import { FlagsConfig, SfdxCommand } from '@salesforce/command';
|
|
5
|
-
export default class DataExport extends SfdxCommand {
|
|
6
|
-
static requiresUsername: boolean;
|
|
7
|
-
static description: string;
|
|
8
|
-
static examples: string[];
|
|
9
|
-
protected static flagsConfig: FlagsConfig;
|
|
10
|
-
/**
|
|
11
|
-
* Custom prefixes
|
|
12
|
-
*/
|
|
13
|
-
private sObjectTypePrefixMap;
|
|
14
|
-
run(): Promise<any>;
|
|
15
|
-
private execute;
|
|
16
|
-
/**
|
|
17
|
-
* Gets fields to be included when exporting records.
|
|
18
|
-
*/
|
|
19
|
-
private getFields;
|
|
20
|
-
/**
|
|
21
|
-
* Gets the field to be used for ordering when exporting the records.
|
|
22
|
-
*/
|
|
23
|
-
private getOrderBy;
|
|
24
|
-
/**
|
|
25
|
-
* Transforms the exported records, making it ready for writing to config files
|
|
26
|
-
* @param records
|
|
27
|
-
*/
|
|
28
|
-
private transform;
|
|
29
|
-
/**
|
|
30
|
-
* Gets the external id of the record
|
|
31
|
-
* @param record
|
|
32
|
-
* @returns
|
|
33
|
-
* @throws Error if external id or equivalent is not found
|
|
34
|
-
*/
|
|
35
|
-
private getExternalId;
|
|
36
|
-
/**
|
|
37
|
-
* Gets the reference id for the record
|
|
38
|
-
* @param record
|
|
39
|
-
*/
|
|
40
|
-
private getReferenceId;
|
|
41
|
-
/**
|
|
42
|
-
* Gets the object prefix to be used when building the reference id
|
|
43
|
-
* @param sObjectType
|
|
44
|
-
* @returns
|
|
45
|
-
*/
|
|
46
|
-
private getPrefix;
|
|
47
|
-
/**
|
|
48
|
-
* Writes records to JSON files
|
|
49
|
-
* @param records
|
|
50
|
-
*/
|
|
51
|
-
private writeRecords;
|
|
52
|
-
/**
|
|
53
|
-
* Counts the number of SObjects within the record. e.g. a record containing child relationships may contain more than one SObject.
|
|
54
|
-
* @param record
|
|
55
|
-
* @returns
|
|
56
|
-
*/
|
|
57
|
-
private getSObjectCount;
|
|
58
|
-
/**
|
|
59
|
-
* Gets the export plan for the specified object type.
|
|
60
|
-
* @param sObjectType
|
|
61
|
-
* @returns
|
|
62
|
-
*/
|
|
63
|
-
private getExportPlan;
|
|
64
|
-
private getChildExportPlan;
|
|
65
|
-
/**
|
|
66
|
-
* Returns a map of records where key is record.Id and value is record.
|
|
67
|
-
* @param records
|
|
68
|
-
* @returns
|
|
69
|
-
*/
|
|
70
|
-
private toMap;
|
|
71
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NCR Terafina
|
|
3
|
-
**/
|
|
4
|
-
import { FlagsConfig, SfdxCommand } from '@salesforce/command';
|
|
5
|
-
/**
|
|
6
|
-
* Stores external id information of a record.
|
|
7
|
-
* Stores both the external id field name and value.
|
|
8
|
-
*/
|
|
9
|
-
declare type ExternalId = {
|
|
10
|
-
fieldName: string;
|
|
11
|
-
value: string;
|
|
12
|
-
};
|
|
13
|
-
export default class DataImport extends SfdxCommand {
|
|
14
|
-
static requiresUsername: boolean;
|
|
15
|
-
static requiresProject: boolean;
|
|
16
|
-
static description: string;
|
|
17
|
-
static examples: string[];
|
|
18
|
-
protected static flagsConfig: FlagsConfig;
|
|
19
|
-
protected referenceIdExternalIdMap: Map<string, ExternalId>;
|
|
20
|
-
private isScratch;
|
|
21
|
-
private namespacePrefix;
|
|
22
|
-
run(): Promise<any>;
|
|
23
|
-
/**
|
|
24
|
-
* Gathers external ids from the specified records. The external id of each record along with the external id field name
|
|
25
|
-
* is stored as a lookup reference mapped to the reference id of the record.
|
|
26
|
-
* @see referenceIdExternalIdMap
|
|
27
|
-
* @param records
|
|
28
|
-
*/
|
|
29
|
-
private collectExternalIds;
|
|
30
|
-
/**
|
|
31
|
-
* Upserts the records using sfdx bulk2 API.
|
|
32
|
-
* @param records SObject records
|
|
33
|
-
*/
|
|
34
|
-
private upsert;
|
|
35
|
-
/**
|
|
36
|
-
* Creates an upsert request for the records
|
|
37
|
-
* @param records
|
|
38
|
-
*/
|
|
39
|
-
private createUpsertRequest;
|
|
40
|
-
/**
|
|
41
|
-
* Executes the upsert request. May include execution of child upsert requests if the records have child relationships.
|
|
42
|
-
* @param request
|
|
43
|
-
*/
|
|
44
|
-
private execute;
|
|
45
|
-
/**
|
|
46
|
-
* Logs the success/error metrics
|
|
47
|
-
* @param result
|
|
48
|
-
* @param request
|
|
49
|
-
*/
|
|
50
|
-
private logResult;
|
|
51
|
-
/**
|
|
52
|
-
* Checks if file has changed since the last time it was seen by comparing it's last modified date to last known one.
|
|
53
|
-
* @param sobjectfile
|
|
54
|
-
* @returns
|
|
55
|
-
*/
|
|
56
|
-
private determineIfFileChanged;
|
|
57
|
-
/**
|
|
58
|
-
* Tracks the files for any changes in future. Uses last modified date to track changes.
|
|
59
|
-
* @param sobjectfiles
|
|
60
|
-
*/
|
|
61
|
-
private trackFileChange;
|
|
62
|
-
/**
|
|
63
|
-
* Returns the external id field names to be used for:
|
|
64
|
-
* 1. resolving external ids of lookup references on records
|
|
65
|
-
* 2. resolving the external id of records for upsert
|
|
66
|
-
*/
|
|
67
|
-
private getExternalIdFieldNames;
|
|
68
|
-
}
|
|
69
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NCR Terafina
|
|
3
|
-
**/
|
|
4
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
5
|
-
export default class Lint extends SfCommand<void> {
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
private logger;
|
|
9
|
-
static readonly flags: {
|
|
10
|
-
sourcefolder: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
-
minapi: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
-
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
-
rulesetpath: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
14
|
-
eject: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
-
level: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
-
};
|
|
17
|
-
run(): Promise<any>;
|
|
18
|
-
/**
|
|
19
|
-
* print output
|
|
20
|
-
*/
|
|
21
|
-
private printViolations;
|
|
22
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NCR Terafina
|
|
3
|
-
**/
|
|
4
|
-
import { flags, SfdxCommand } from '@salesforce/command';
|
|
5
|
-
export default class Meta extends SfdxCommand {
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
protected static flagsConfig: {
|
|
9
|
-
sourcefolder: flags.Discriminated<flags.String>;
|
|
10
|
-
destpath: flags.Discriminated<flags.String>;
|
|
11
|
-
clientname: flags.Discriminated<flags.String>;
|
|
12
|
-
output: flags.Discriminated<flags.Enum<string>>;
|
|
13
|
-
fields: flags.Discriminated<flags.Boolean<boolean>>;
|
|
14
|
-
};
|
|
15
|
-
run(): Promise<any>;
|
|
16
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NCR Terafina
|
|
3
|
-
**/
|
|
4
|
-
import { SfdxCommand } from '@salesforce/command';
|
|
5
|
-
import { AnyJson } from '@salesforce/ts-types';
|
|
6
|
-
export default class Ping extends SfdxCommand {
|
|
7
|
-
static description: string;
|
|
8
|
-
static examples: string[];
|
|
9
|
-
static args: {
|
|
10
|
-
name: string;
|
|
11
|
-
}[];
|
|
12
|
-
protected static flagsConfig: {};
|
|
13
|
-
run(): Promise<AnyJson>;
|
|
14
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SfdxCommand, flags } from '@salesforce/command';
|
|
2
|
-
export default class SourceApiSet extends SfdxCommand {
|
|
3
|
-
static description: string;
|
|
4
|
-
static examples: string[];
|
|
5
|
-
protected static flagsConfig: {
|
|
6
|
-
help: flags.Discriminated<flags.Boolean<void>>;
|
|
7
|
-
sourcefolder: flags.Discriminated<flags.String>;
|
|
8
|
-
api: flags.Discriminated<flags.Number>;
|
|
9
|
-
};
|
|
10
|
-
run(): Promise<any>;
|
|
11
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NCR Terafina
|
|
3
|
-
**/
|
|
4
|
-
import { SfdxCommand, FlagsConfig } from '@salesforce/command';
|
|
5
|
-
/**
|
|
6
|
-
* Copyright (c) NCR Terafina
|
|
7
|
-
**/
|
|
8
|
-
export default class CreateField extends SfdxCommand {
|
|
9
|
-
static requiresUsername: boolean;
|
|
10
|
-
static requiresProject: boolean;
|
|
11
|
-
static description: string;
|
|
12
|
-
static examples: string[];
|
|
13
|
-
protected static flagsConfig: FlagsConfig;
|
|
14
|
-
private projectdir;
|
|
15
|
-
run(): Promise<any>;
|
|
16
|
-
/**
|
|
17
|
-
* Creates a field definition for the field and writes it to the field-meta xml file.
|
|
18
|
-
* Additional attributes of the field definition are parsed from the flag parameters.
|
|
19
|
-
* @param sObjectType
|
|
20
|
-
* @param fieldName
|
|
21
|
-
*/
|
|
22
|
-
private createField;
|
|
23
|
-
/**
|
|
24
|
-
* Adds a field permission entry for the field to the specified permission sets.
|
|
25
|
-
* @param permissionSets
|
|
26
|
-
* @param sObjectType
|
|
27
|
-
* @param fieldName
|
|
28
|
-
*/
|
|
29
|
-
private addToPermissionSets;
|
|
30
|
-
/**
|
|
31
|
-
* Reads the xml file and returns an xml object
|
|
32
|
-
* @param filename
|
|
33
|
-
*/
|
|
34
|
-
private readXml;
|
|
35
|
-
/**
|
|
36
|
-
* Writes the xml object into the specified file
|
|
37
|
-
* @param filename
|
|
38
|
-
* @param xmlObject
|
|
39
|
-
*/
|
|
40
|
-
private writeXml;
|
|
41
|
-
}
|
package/lib/index.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NCR Terafina
|
|
3
|
-
**/
|
|
4
|
-
declare class ApexDoxError extends Error {
|
|
5
|
-
static INVALID_SCOPE: string;
|
|
6
|
-
static SCOPE_ENTRIES_MAX: string;
|
|
7
|
-
static SCOPE_ENTRIES_MIN: string;
|
|
8
|
-
static INVALID_DIRECTORY: (arg: string, path: string) => string;
|
|
9
|
-
static INVALID_SORT_ORDER: (sortOrder: string) => string;
|
|
10
|
-
static INVALID_PORT: (port: number) => string;
|
|
11
|
-
static INVALID_SOURCE_URL: (url: string) => string;
|
|
12
|
-
static INVALID_TARGET_DIRECTORY: (path: string) => string;
|
|
13
|
-
static ONLY_STRINGS: (arg: string) => string;
|
|
14
|
-
static SCOPE_ENTRY_INVALID: (entry: string) => string;
|
|
15
|
-
static INVALID_TYPE: (arg: string, type: string) => string;
|
|
16
|
-
static NO_FILES_FOUND: (sourceDirs: string) => string;
|
|
17
|
-
static ASSET_NOT_FOUND: (asset: string) => string;
|
|
18
|
-
static INVALID_EXTENSION: (arg: string, path: string, extension: string) => string;
|
|
19
|
-
static INVALID_SEE_QUALIFIER: string;
|
|
20
|
-
static CONFIG_PARSE_ERROR: (fileName: string) => string;
|
|
21
|
-
static UNKNOWN_CONFIG_SETTING: (field: string) => string;
|
|
22
|
-
}
|
|
23
|
-
export default ApexDoxError;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NCR Terafina
|
|
3
|
-
**/
|
|
4
|
-
import { IOnlyExcept } from '../index';
|
|
5
|
-
export declare const last: <T>(arr: T[]) => T;
|
|
6
|
-
export declare const head: <T>(arr: T[]) => T;
|
|
7
|
-
export declare const tail: <T>(arr: T[]) => T[];
|
|
8
|
-
export declare const except: IOnlyExcept;
|
|
9
|
-
export declare const only: IOnlyExcept;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Option } from '../index';
|
|
2
|
-
/**
|
|
3
|
-
* A utility class similar to C#'s LineReader for synchronously reading a file line by line.
|
|
4
|
-
* Uses Node's `readFileSync` to produce an array of lines and implements a simple iterator
|
|
5
|
-
* to advance through them. This may be less space efficient than using Node's native line
|
|
6
|
-
* reader, however, it keeps things synchronous, and avoids callbacks.
|
|
7
|
-
*/
|
|
8
|
-
declare class LineReader {
|
|
9
|
-
private lines;
|
|
10
|
-
private nextIndex;
|
|
11
|
-
private end;
|
|
12
|
-
private content;
|
|
13
|
-
constructor(filePath: string);
|
|
14
|
-
/**
|
|
15
|
-
* Returns the next line and advances the reader a single step.
|
|
16
|
-
* @returns The next line, or null if there is no next line.
|
|
17
|
-
*/
|
|
18
|
-
readLine(): Option<string, null>;
|
|
19
|
-
/**
|
|
20
|
-
* Returns the previous line without affecting the reader's position.
|
|
21
|
-
* @returns String, the previous line, or null if there is no previous line.
|
|
22
|
-
*/
|
|
23
|
-
peekPrevLine(): Option<string, null>;
|
|
24
|
-
/**
|
|
25
|
-
* Returns the next line without advancing the reader.
|
|
26
|
-
* @returns String, the next line, or null if there is no next line.
|
|
27
|
-
*/
|
|
28
|
-
peekNextLine(): Option<string, null>;
|
|
29
|
-
/**
|
|
30
|
-
* Convert the line reader's lines into a single string.
|
|
31
|
-
* @param trim A flag for determining whether or not white space
|
|
32
|
-
* between lines should be trimmed before concatenating into a
|
|
33
|
-
* single string.
|
|
34
|
-
* @param separator The character to join the lines by. Defaults to ''.
|
|
35
|
-
*/
|
|
36
|
-
toString(trim?: boolean, separator?: string): string;
|
|
37
|
-
toContent(): string;
|
|
38
|
-
toArray(): string[];
|
|
39
|
-
}
|
|
40
|
-
export default LineReader;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Option } from '../..';
|
|
2
|
-
declare abstract class ApexModel {
|
|
3
|
-
protected _annotations: string[];
|
|
4
|
-
protected _author: string;
|
|
5
|
-
protected _deprecated: string;
|
|
6
|
-
protected _description: string;
|
|
7
|
-
protected _example: string;
|
|
8
|
-
protected _apipath: string;
|
|
9
|
-
protected _restUrl: string;
|
|
10
|
-
protected _apimethod: string;
|
|
11
|
-
protected _exception: string[];
|
|
12
|
-
protected _groupContentPath: string;
|
|
13
|
-
protected _groupName: string;
|
|
14
|
-
protected _tags: string;
|
|
15
|
-
protected _lineNum: number;
|
|
16
|
-
protected _nameLine: string;
|
|
17
|
-
protected _params: string[];
|
|
18
|
-
protected _queryparams: string[];
|
|
19
|
-
protected _requestheaders: string[];
|
|
20
|
-
protected _responseheaders: string[];
|
|
21
|
-
protected _returns: string;
|
|
22
|
-
protected _scope: string;
|
|
23
|
-
protected _see: string[];
|
|
24
|
-
protected _since: string;
|
|
25
|
-
protected _sourceUrl?: string;
|
|
26
|
-
protected _source: string;
|
|
27
|
-
protected constructor(comments: string[], sourceUrl: Option<string>);
|
|
28
|
-
abstract get name(): string;
|
|
29
|
-
get annotations(): string[];
|
|
30
|
-
get description(): string;
|
|
31
|
-
get lineNum(): number;
|
|
32
|
-
get nameLine(): string;
|
|
33
|
-
get scope(): string;
|
|
34
|
-
get sourceUrl(): Option<string>;
|
|
35
|
-
get source(): string;
|
|
36
|
-
setSource(source: string): void;
|
|
37
|
-
get example(): string;
|
|
38
|
-
get apipath(): string;
|
|
39
|
-
get restUrl(): string;
|
|
40
|
-
get apimethod(): string;
|
|
41
|
-
get deprecated(): string;
|
|
42
|
-
get see(): string[];
|
|
43
|
-
/**
|
|
44
|
-
* This method is based closely on: https://gitlab.com/StevenWCox/sfapexdoc/blob/master/src/apex/com/main/Model.java#L196
|
|
45
|
-
*/
|
|
46
|
-
private parseComments;
|
|
47
|
-
parseAnnotations(line: string, previousLine: Option<string, null>): void;
|
|
48
|
-
protected parseScope(): void;
|
|
49
|
-
protected setNameLine(_nameLine: string, _lineNum: number): void;
|
|
50
|
-
}
|
|
51
|
-
export { ApexModel };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
declare class ClassGroup {
|
|
2
|
-
private _name;
|
|
3
|
-
private _contentSource;
|
|
4
|
-
constructor(name: string, contentSource: string);
|
|
5
|
-
get name(): string;
|
|
6
|
-
get contentSource(): string;
|
|
7
|
-
set contentSource(contentSource: string);
|
|
8
|
-
get contentFileName(): string;
|
|
9
|
-
}
|
|
10
|
-
export { ClassGroup };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NCR Terafina
|
|
3
|
-
**/
|
|
4
|
-
import { EnumModel } from './enum-model';
|
|
5
|
-
import { MethodModel } from './method-model';
|
|
6
|
-
import { TopLevelModel } from './top-level-model';
|
|
7
|
-
import { IDTODefinition, IRestPath, IRestTags, Option } from '../..';
|
|
8
|
-
import { PropertyModel } from './property-model';
|
|
9
|
-
declare class ClassModel extends TopLevelModel {
|
|
10
|
-
private _childClassMap;
|
|
11
|
-
private _cModelParent?;
|
|
12
|
-
private _enums;
|
|
13
|
-
private _isInterface;
|
|
14
|
-
private _methods;
|
|
15
|
-
private _properties;
|
|
16
|
-
private _hasGlobalMethods;
|
|
17
|
-
constructor(cModelParent: Option<ClassModel>, comments: string[], nameLine: string, lineNum: number, sourceUrl: Option<string>);
|
|
18
|
-
addChildClass(child: ClassModel): void;
|
|
19
|
-
get childClasses(): Array<ClassModel>;
|
|
20
|
-
get childClassesSorted(): Array<ClassModel>;
|
|
21
|
-
get childClassMap(): Map<string, ClassModel>;
|
|
22
|
-
get enums(): Array<EnumModel>;
|
|
23
|
-
get enumsSorted(): Array<EnumModel>;
|
|
24
|
-
get groupName(): string;
|
|
25
|
-
get tags(): IRestTags;
|
|
26
|
-
get isInterface(): boolean;
|
|
27
|
-
get isDTO(): boolean;
|
|
28
|
-
get methods(): Array<MethodModel>;
|
|
29
|
-
get restDefinition(): IRestPath[];
|
|
30
|
-
get dtoDefinition(): IDTODefinition;
|
|
31
|
-
get methodsSorted(): Array<MethodModel>;
|
|
32
|
-
get name(): string;
|
|
33
|
-
get properties(): Array<PropertyModel>;
|
|
34
|
-
get propertiesSorted(): Array<PropertyModel>;
|
|
35
|
-
get topMostClassName(): string;
|
|
36
|
-
private setIsInterface;
|
|
37
|
-
setHasGlobalMethods(_hasGlobalMethods: boolean): void;
|
|
38
|
-
get hasGlobalMethods(): boolean;
|
|
39
|
-
get isInnerClass(): boolean;
|
|
40
|
-
}
|
|
41
|
-
export { ClassModel };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { IEngineConfig } from '../..';
|
|
2
|
-
declare class EngineConfig implements IEngineConfig {
|
|
3
|
-
workspaceFolder: string;
|
|
4
|
-
port: number;
|
|
5
|
-
source: {
|
|
6
|
-
path: string;
|
|
7
|
-
sourceUrl: string;
|
|
8
|
-
}[];
|
|
9
|
-
targetDirectory: string;
|
|
10
|
-
includes: string[];
|
|
11
|
-
excludes: string[];
|
|
12
|
-
homePagePath: string;
|
|
13
|
-
scope: string[];
|
|
14
|
-
title: string;
|
|
15
|
-
subtitle: string;
|
|
16
|
-
showTOCSnippets: boolean;
|
|
17
|
-
sortOrder: string;
|
|
18
|
-
cleanDir: boolean;
|
|
19
|
-
assets: any[];
|
|
20
|
-
pages: any[];
|
|
21
|
-
constructor(workspaceFolder?: string, destfolder?: string);
|
|
22
|
-
}
|
|
23
|
-
export default EngineConfig;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NCR Terafina
|
|
3
|
-
**/
|
|
4
|
-
import { TopLevelModel } from './top-level-model';
|
|
5
|
-
import { Option } from '../..';
|
|
6
|
-
declare class EnumModel extends TopLevelModel {
|
|
7
|
-
private _values;
|
|
8
|
-
constructor(comments: string[], nameLine: string, lineNum: number, sourceUrl: Option<string>);
|
|
9
|
-
get groupName(): string;
|
|
10
|
-
get name(): string;
|
|
11
|
-
get values(): string[];
|
|
12
|
-
protected setNameLine(nameLine: string, lineNum: number): void;
|
|
13
|
-
private setValues;
|
|
14
|
-
}
|
|
15
|
-
export { EnumModel };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NCR Terafina
|
|
3
|
-
**/
|
|
4
|
-
export * from './apex-model';
|
|
5
|
-
export * from './class-group';
|
|
6
|
-
export * from './class-model';
|
|
7
|
-
export * from './enum-model';
|
|
8
|
-
export * from './method-model';
|
|
9
|
-
export * from './property-model';
|
|
10
|
-
export * from './top-level-model';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ApexModel } from './apex-model';
|
|
2
|
-
import { IMethodException, IMethodParam, IMethodReturns, IQueryParam, IRequestHeader, IResponseHeader, Option } from '../..';
|
|
3
|
-
declare class MethodModel extends ApexModel {
|
|
4
|
-
private _isConstructor;
|
|
5
|
-
constructor(comments: string[], nameLine: string, lineNum: number, className?: string, sourceUrl?: Option<string>);
|
|
6
|
-
get author(): string;
|
|
7
|
-
get exception(): Array<IMethodException>;
|
|
8
|
-
get isConstructor(): boolean;
|
|
9
|
-
get name(): string;
|
|
10
|
-
get params(): Array<IMethodParam>;
|
|
11
|
-
get queryparams(): Array<IQueryParam>;
|
|
12
|
-
get requestheaders(): Array<IRequestHeader>;
|
|
13
|
-
get responseheaders(): Array<IResponseHeader>;
|
|
14
|
-
get typesFromNameLine(): Map<string, string>;
|
|
15
|
-
get paramsFromNameLine(): string[];
|
|
16
|
-
get implicitReturnType(): string;
|
|
17
|
-
private isNumber;
|
|
18
|
-
get returns(): IMethodReturns;
|
|
19
|
-
parseAnnotations(line: string, previousLine: Option<string, null>): void;
|
|
20
|
-
protected parseScope(): void;
|
|
21
|
-
protected setNameLine(nameLine: string, lineNum: number): void;
|
|
22
|
-
get scope(): string;
|
|
23
|
-
set scope(scope: string);
|
|
24
|
-
get since(): string;
|
|
25
|
-
}
|
|
26
|
-
export { MethodModel };
|