sfdx-hardis 8.4.0 → 8.4.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/lib/commands/hardis/auth/login.js +2 -2
- package/lib/commands/hardis/auth/login.js.map +1 -1
- package/lib/commands/hardis/doc/project2markdown.js +28 -14
- package/lib/commands/hardis/doc/project2markdown.js.map +1 -1
- package/lib/commands/hardis/org/select.js +19 -4
- package/lib/commands/hardis/org/select.js.map +1 -1
- package/lib/commands/hardis/project/create.js +2 -1
- package/lib/commands/hardis/project/create.js.map +1 -1
- package/lib/commands/hardis/work/new.js +2 -1
- package/lib/commands/hardis/work/new.js.map +1 -1
- package/lib/common/docBuilder/docBuilderApex.d.ts +1 -0
- package/lib/common/docBuilder/docBuilderApex.js +10 -0
- package/lib/common/docBuilder/docBuilderApex.js.map +1 -1
- package/lib/common/docBuilder/docUtils.d.ts +6 -1
- package/lib/common/docBuilder/docUtils.js +179 -5
- package/lib/common/docBuilder/docUtils.js.map +1 -1
- package/lib/common/gitProvider/index.d.ts +1 -0
- package/lib/common/gitProvider/index.js +3 -0
- package/lib/common/gitProvider/index.js.map +1 -1
- package/lib/common/utils/authUtils.d.ts +1 -0
- package/lib/common/utils/authUtils.js +23 -2
- package/lib/common/utils/authUtils.js.map +1 -1
- package/lib/common/utils/deployResultSummary.d.ts +36 -0
- package/lib/common/utils/deployResultSummary.js +159 -0
- package/lib/common/utils/deployResultSummary.js.map +1 -1
- package/lib/common/utils/deployTipsList.js +10 -0
- package/lib/common/utils/deployTipsList.js.map +1 -1
- package/lib/common/utils/deployUtils.d.ts +18 -0
- package/lib/common/utils/deployUtils.js +46 -17
- package/lib/common/utils/deployUtils.js.map +1 -1
- package/lib/common/utils/deploymentActionsRegistry.d.ts +4 -0
- package/lib/common/utils/deploymentActionsRegistry.js +27 -4
- package/lib/common/utils/deploymentActionsRegistry.js.map +1 -1
- package/lib/common/utils/gitUtils.js +23 -2
- package/lib/common/utils/gitUtils.js.map +1 -1
- package/lib/common/utils/orgUtils.js +17 -8
- package/lib/common/utils/orgUtils.js.map +1 -1
- package/lib/i18n/de.json +8 -0
- package/lib/i18n/en.json +8 -0
- package/lib/i18n/es.json +8 -0
- package/lib/i18n/fr.json +8 -0
- package/lib/i18n/it.json +8 -0
- package/lib/i18n/ja.json +8 -0
- package/lib/i18n/nl.json +8 -0
- package/lib/i18n/pl.json +8 -0
- package/lib/i18n/pt-BR.json +8 -0
- package/oclif.lock +78 -122
- package/oclif.manifest.json +6201 -6201
- package/package.json +7 -6
|
@@ -3,7 +3,7 @@ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
|
3
3
|
import { Messages, SfError } from '@salesforce/core';
|
|
4
4
|
import c from 'chalk';
|
|
5
5
|
import fs from '../../../common/utils/fsUtils.js';
|
|
6
|
-
import { authOrg } from '../../../common/utils/authUtils.js';
|
|
6
|
+
import { authOrg, runAuthHook } from '../../../common/utils/authUtils.js';
|
|
7
7
|
import { uxLog } from '../../../common/utils/index.js';
|
|
8
8
|
import { t } from '../../../common/utils/i18n.js';
|
|
9
9
|
import { CONSTANTS, getEnvVar } from '../../../config/index.js';
|
|
@@ -160,7 +160,7 @@ In agent mode, all interactive prompts are skipped and default values are used.
|
|
|
160
160
|
encryptedCertContent = (await fs.readFile(flags['encrypted-cert-file'], 'utf8')).trim();
|
|
161
161
|
uxLog("action", this, c.cyan(t('usingEncryptedCertFromFile', { file: c.bold(flags['encrypted-cert-file']) })));
|
|
162
162
|
}
|
|
163
|
-
await this
|
|
163
|
+
await runAuthHook(this, {
|
|
164
164
|
checkAuth: !devHub,
|
|
165
165
|
Command: this,
|
|
166
166
|
devHub,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../../src/commands/hardis/auth/login.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAA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CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACjH,CAAC;QACD,MAAM,WAAW,CAAC,IAAI,EAAE;YACtB,SAAS,EAAE,CAAC,MAAM;YAClB,OAAO,EAAE,IAAI;YACb,MAAM;YACN,OAAO;YACP,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC5C,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1D,CAAC,CAAC;QAEH,yBAAyB;QACzB,IAAI,SAAS,CAAC,qBAAqB,CAAC,IAAI,SAAS,CAAC,6BAA6B,CAAC,EAAE,CAAC;YACjF,MAAM,OAAO,CAAC,eAAe,EAAE;gBAC7B,SAAS,EAAE,IAAI;gBACf,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB,CAAC,CAAC;QACL,CAAC;QAED,+CAA+C;QAC/C,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,CAAC;IACtD,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { XMLBuilder } from "fast-xml-parser";
|
|
|
8
8
|
import sortArray from '../../../common/utils/sortArray.js';
|
|
9
9
|
import { Messages } from '@salesforce/core';
|
|
10
10
|
import { WebSocketClient } from '../../../common/websocketClient.js';
|
|
11
|
-
import { buildAllKnownNavLabels, completeAttributesDescriptionWithAi, getMetaHideAndSearchExcludeLines, getMetaHideLines, readMkDocsFile, replaceInFile, writeMkDocsFile } from '../../../common/docBuilder/docUtils.js';
|
|
11
|
+
import { buildAllKnownNavLabels, completeAttributesDescriptionWithAi, getMetaHideAndSearchExcludeLines, getMetaHideLines, normalizeMkDocsNavTarget, readMkDocsFile, removeDeadDocumentationLinks, replaceInFile, sortMkDocsNavItems, writeMkDocsFile } from '../../../common/docBuilder/docUtils.js';
|
|
12
12
|
import { getLargeXmlParser, parseXmlFile } from '../../../common/utils/xmlUtils.js';
|
|
13
13
|
import { bool2emoji, createTempDir, execCommand, execSfdxJson, filterPackageXml, getCurrentGitBranch, sortCrossPlatform, uxLog } from '../../../common/utils/index.js';
|
|
14
14
|
import { CONSTANTS, getBannerMarkdownAndLink, getConfig } from '../../../config/index.js';
|
|
@@ -488,8 +488,6 @@ ${this.htmlInstructions}
|
|
|
488
488
|
if (this.withExcel) {
|
|
489
489
|
await this.generateExcelFile();
|
|
490
490
|
}
|
|
491
|
-
// Generate PDFs at the end to keep Puppeteer usage in a single sequential batch.
|
|
492
|
-
await this.flushPdfGenerationQueue();
|
|
493
491
|
// Delete files found in docs folder that contain characters not compliant with Windows file system
|
|
494
492
|
// (e.g. /, \, :, *, ?, ", <, >, |)
|
|
495
493
|
const filesToDelete = await glob("**/*", { cwd: this.outputMarkdownRoot, nodir: true });
|
|
@@ -501,6 +499,14 @@ ${this.htmlInstructions}
|
|
|
501
499
|
await fs.remove(filePath);
|
|
502
500
|
}
|
|
503
501
|
}
|
|
502
|
+
// Now that every page is written, links pointing at a page that does not exist are repaired
|
|
503
|
+
// or removed, so the site builds without "page does not exist" and no reader clicks on nothing.
|
|
504
|
+
const fixedLinksNb = await removeDeadDocumentationLinks(this.outputMarkdownRoot);
|
|
505
|
+
if (fixedLinksNb > 0) {
|
|
506
|
+
uxLog("log", this, c.grey(t('fixedLinksToPagesThatDoNotExist', { fixedLinksNb })));
|
|
507
|
+
}
|
|
508
|
+
// Generate PDFs at the end to keep Puppeteer usage in a single sequential batch.
|
|
509
|
+
await this.flushPdfGenerationQueue();
|
|
504
510
|
// Open file in a new VS Code tab if available
|
|
505
511
|
if (WebSocketClient.isAliveWithLwcUI()) {
|
|
506
512
|
WebSocketClient.sendReportFileMessage(this.outputMarkdownIndexFile, t('projectDocumentationIndex'), "report");
|
|
@@ -525,17 +531,21 @@ ${this.htmlInstructions}
|
|
|
525
531
|
scope: ['global', 'public', 'private'],
|
|
526
532
|
targetGenerator: "markdown"
|
|
527
533
|
});
|
|
528
|
-
//
|
|
534
|
+
// ApexDocGen writes one folder per @group ApexDoc tag: "miscellaneous" for the classes
|
|
535
|
+
// that declare none, "triggers" for triggers, and one folder per group otherwise. Only
|
|
536
|
+
// the first two used to be copied, so every class carrying a @group lost its page and
|
|
537
|
+
// the links pointing at it were dead. All groups are flattened into the single apex
|
|
538
|
+
// folder, and the links between them are rewritten to that flat layout.
|
|
529
539
|
const apexDocFolder = path.join(this.outputMarkdownRoot, "apex");
|
|
530
540
|
await fs.ensureDir(apexDocFolder);
|
|
531
|
-
const
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
await fs.
|
|
541
|
+
const generatedApexDocFiles = await glob("**/*.md", { cwd: tempDir });
|
|
542
|
+
for (const generatedApexDocFile of generatedApexDocFiles) {
|
|
543
|
+
if (path.dirname(generatedApexDocFile) === ".") {
|
|
544
|
+
// Reference guide of ApexDocGen: project2markdown writes its own apex/index.md
|
|
545
|
+
continue;
|
|
546
|
+
}
|
|
547
|
+
const apexDocContent = await fs.readFile(path.join(tempDir, generatedApexDocFile), "utf8");
|
|
548
|
+
await fs.writeFile(path.join(apexDocFolder, path.basename(generatedApexDocFile)), DocBuilderApex.flattenApexDocLinks(apexDocContent));
|
|
539
549
|
}
|
|
540
550
|
uxLog("log", this, c.grey(t('generatedMarkdownForApexClassesIn', { apexDocFolder })));
|
|
541
551
|
}
|
|
@@ -1725,13 +1735,17 @@ ${this.htmlInstructions}
|
|
|
1725
1735
|
}
|
|
1726
1736
|
}
|
|
1727
1737
|
addNavNode(nodeName, nodeValue) {
|
|
1738
|
+
// Sub-menus are collected as flat mappings for convenience, but MkDocs (and,
|
|
1739
|
+
// unlike MkDocs, strictly so Zensical) expects a list of single-key mappings.
|
|
1740
|
+
// Entries are then sorted by label, as they are collected in file system order.
|
|
1741
|
+
const navValue = sortMkDocsNavItems(normalizeMkDocsNavTarget(nodeValue));
|
|
1728
1742
|
const nodeIndex = this.mkDocsNavNodes.findIndex(navNode => Object.keys(navNode)[0] === nodeName);
|
|
1729
1743
|
if (nodeIndex > -1) {
|
|
1730
|
-
this.mkDocsNavNodes[nodeIndex][nodeName] =
|
|
1744
|
+
this.mkDocsNavNodes[nodeIndex][nodeName] = navValue;
|
|
1731
1745
|
}
|
|
1732
1746
|
else {
|
|
1733
1747
|
const nodeMenu = {};
|
|
1734
|
-
nodeMenu[nodeName] =
|
|
1748
|
+
nodeMenu[nodeName] = navValue;
|
|
1735
1749
|
this.mkDocsNavNodes.push(nodeMenu);
|
|
1736
1750
|
}
|
|
1737
1751
|
}
|