diff --git a/README.md b/README.md index 08d11f6c..71d48ad3 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,14 @@ create a documentation site that fits your needs, hosted in any static web hosti - [๐Ÿš€ Features](#-features) - [๐Ÿ’ฟ Installation](#-installation) - [โšก Quick Start](#-quick-start) - - [CLI](#cli) - - [Markdown](#markdown) - - [OpenApi](#openapi) - - [Changelog](#changelog) + - [CLI](#cli) + - [Markdown](#markdown) + - [OpenApi](#openapi) + - [Changelog](#changelog) - [โ–ถ๏ธ Available Commands](#๏ธ-available-commands) - - [Markdown](#markdown-1) - - [OpenApi](#openapi-1) - - [Changelog](#changelog-1) + - [Markdown](#markdown-1) + - [OpenApi](#openapi-1) + - [Changelog](#changelog-1) - [๐Ÿ”ฌ Defining a configuration file](#-defining-a-configuration-file) - [๐ŸŒ Translation](#-translation) - [โคต๏ธŽ Importing to your project](#๏ธŽ-importing-to-your-project) @@ -140,9 +140,8 @@ apexdocs changelog --previousVersionDir force-app-previous --currentVersionDir f | Flag | Alias | Description | Default | Required | |-----------------------------------|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------|----------| -| `--sourceDir` | `-s` | The directory where the source files are located. | N/A | * | -| `--sourceDirs` | N/A | Multiple source directories (space-separated). Cannot be used with `--sourceDir` or `--useSfdxProjectJson`. | N/A | * | -| `--useSfdxProjectJson` | N/A | Read source directories from `sfdx-project.json` packageDirectories. Cannot be used with `--sourceDir` or `--sourceDirs`. | `false` | * | +| `--sourceDir` | `-s` | The directory or directories where the source files are located. | N/A | * | +| `--useSfdxProjectJson` | N/A | Read source directories from `sfdx-project.json` packageDirectories. Cannot be used with `--sourceDir`. | `false` | * | | `--sfdxProjectPath` | N/A | Path to directory containing `sfdx-project.json` (defaults to current directory). Only used with `--useSfdxProjectJson`. | `process.cwd()` | No | | `--targetDir` | `-t` | The directory where the generated files will be placed. | `docs` | No | | `--scope` | `-p` | A list of scopes to document. Values should be separated by a space, e.g --scope global public namespaceaccessible. | `[global]` | No | @@ -158,8 +157,7 @@ apexdocs changelog --previousVersionDir force-app-previous --currentVersionDir f | `--includeInlineHelpTextMetadata` | N/A | Whether to include the inline help text for fields in the generated files. | `false` | No | > **Note:** The `*` in the Required column indicates that **one** of the source directory options must be specified: -> - `--sourceDir` (single directory) -> - `--sourceDirs` (multiple directories) +> - `--sourceDir` (single directory or array of directories) > - `--useSfdxProjectJson` (read from sfdx-project.json) > > These options are mutually exclusive - you cannot use more than one at the same time. @@ -396,61 +394,6 @@ There are hooks for both Markdown and Changelog operations (but not for OpenApi) #### Markdown Hooks -##### **macros** - -Allows defining custom macros that can be used in the documentation. - -Macros are reusable pieces of text that can be injected into the documentation, -allowing you to define common pieces of text that you can use across multiple files. - -A common use case is injecting copyright or license information, without -having to copy-paste the same text across multiple classes, polluting your -source code. - -A macro can be defined in your documentation using the `{{macro_name}}` syntax. -In the configuration file, you can then define the macro behavior as a key-value pair, where the key is the name of the -macro, and the value is a function that returns the text to inject in place of the macro. - -**Type** - -```typescript -type MacroSourceMetadata = { - type: 'apex' | 'customobject' | 'customfield' | 'custommetadata' | 'trigger'; - name: string; - filePath: string; -}; - -type MacroFunction = (metadata: MacroSourceMetadata) => string; -``` - -Notice that the `metadata` object contains information about the source of the file for which the macro is being -injected. This allows you to optionally -return different text based on the source of the file. - -Example: Injecting a copyright notice - -```typescript -//... -macros: { - copyright: () => { - return `@copyright Copyright (c) ${new Date().getFullYear()} My Name`; - } -} -//... -``` - -And then in your source code, you can use the macro like this: - -```apex -/** - * {{copyright}} - * @description This is a class - */ -public class MyClass { - //... -} -``` - ##### **transformReferenceGuide** Allows changing the frontmatter and content of the reference guide, or if creating a reference guide page altogether @@ -563,6 +506,61 @@ export default { }; ``` +##### **macros** + +Allows defining custom macros that can be used in the documentation. + +Macros are reusable pieces of text that can be injected into the documentation, +allowing you to define common pieces of text that you can use across multiple files. + +A common use case is injecting copyright or license information, without +having to copy-paste the same text across multiple classes, polluting your +source code. + +A macro can be defined in your documentation using the `{{macro_name}}` syntax. +In the configuration file, you can then define the macro behavior as a key-value pair, where the key is the name of the +macro, and the value is a function that returns the text to inject in place of the macro. + +**Type** + +```typescript +type MacroSourceMetadata = { + type: 'apex' | 'customobject' | 'customfield' | 'custommetadata' | 'trigger'; + name: string; + filePath: string; +}; + +type MacroFunction = (metadata: MacroSourceMetadata) => string; +``` + +Notice that the `metadata` object contains information about the source of the file for which the macro is being +injected. This allows you to optionally +return different text based on the source of the file. + +Example: Injecting a copyright notice + +```typescript +//... +macros: { + copyright: () => { + return `@copyright Copyright (c) ${new Date().getFullYear()} My Name`; + } +} +//... +``` + +And then in your source code, you can use the macro like this: + +```apex +/** + * {{copyright}} + * @description This is a class + */ +public class MyClass { + //... +} +``` + #### Changelog Hooks ##### **transformChangeLogPage** diff --git a/examples/sfdx-multi-dir/README.md b/examples/sfdx-multi-dir/README.md deleted file mode 100644 index 0053b12c..00000000 --- a/examples/sfdx-multi-dir/README.md +++ /dev/null @@ -1,101 +0,0 @@ -# ApexDocs SFDX Project Support Example - -This example demonstrates the new **sfdx-project.json support** feature in ApexDocs, which allows you to automatically read source directories from your Salesforce project configuration instead of manually specifying them. - -## Feature Overview - -ApexDocs now supports three ways to specify source directories: - -1. **Single Directory** (`--sourceDir`) - The traditional approach -2. **Multiple Directories** (`--sourceDirs`) - Specify multiple directories manually -3. **SFDX Project** (`--useSfdxProjectJson`) - Automatically read from `sfdx-project.json` - -## Project Structure - -This example project demonstrates a multi-directory Salesforce project structure: - -``` -sfdx-multi-dir/ -โ”œโ”€โ”€ sfdx-project.json # Project configuration -โ”œโ”€โ”€ force-app/ # Main application code -โ”‚ โ””โ”€โ”€ main/default/classes/ -โ”‚ โ”œโ”€โ”€ AccountService.cls -โ”‚ โ””โ”€โ”€ AccountService.cls-meta.xml -โ””โ”€โ”€ force-LWC/ # Lightning Web Component helpers - โ””โ”€โ”€ main/default/classes/ - โ”œโ”€โ”€ LWCHelper.cls - โ””โ”€โ”€ LWCHelper.cls-meta.xml -``` - -## Configuration Examples - -### Using sfdx-project.json (Recommended) - -```bash -# Read directories automatically from sfdx-project.json -apexdocs markdown --useSfdxProjectJson --targetDir ./docs --scope public -``` - -The `sfdx-project.json` file: -```json -{ - "packageDirectories": [ - { - "path": "force-app", - "default": true - }, - { - "path": "force-LWC", - "default": false - } - ] -} -``` - -### Using Multiple Directories Manually - -```bash -# Specify multiple directories manually -apexdocs markdown --sourceDirs force-app force-LWC --targetDir ./docs --scope public -``` - -### Using Single Directory - -```bash -# Traditional single directory approach -apexdocs markdown --sourceDir force-app --targetDir ./docs --scope public -``` - -### Using SFDX Project with Custom Path - -If your `sfdx-project.json` is not in the current directory: - -```bash -apexdocs markdown --useSfdxProjectJson --sfdxProjectPath ./my-project --targetDir ./docs -``` - -### Configuration File Support - -You can also use these options in your configuration file: - -**package.json:** -```json -{ - "apexdocs": { - "useSfdxProjectJson": true, - "scope": ["public", "global"], - "targetDir": "./docs" - } -} -``` - -**apexdocs.config.js:** -```javascript -module.exports = { - markdown: { - useSfdxProjectJson: true, - scope: ['public', 'global'], - targetDir: './docs' - } -}; -``` diff --git a/examples/sfdx-multi-dir/docs/account-management/AccountService.md b/examples/sfdx-multi-dir/docs/account-management/AccountService.md deleted file mode 100644 index 9dd7fadc..00000000 --- a/examples/sfdx-multi-dir/docs/account-management/AccountService.md +++ /dev/null @@ -1,77 +0,0 @@ -# AccountService Class - -Service class for handling Account operations - -**Group** Account Management - -**Author** ApexDocs Team - -## Methods -### `getAccountById(accountId)` - -Retrieves an Account record by its Id - -#### Signature -```apex -public static Account getAccountById(Id accountId) -``` - -#### Parameters -| Name | Type | Description | -|------|------|-------------| -| accountId | Id | The Id of the Account to retrieve | - -#### Return Type -**Account** - -The Account record or null if not found - -#### Example -Account acc = AccountService.getAccountById('0011234567890123'); - ---- - -### `createAccount(accountName, accountType)` - -Creates a new Account record - -#### Signature -```apex -public static Id createAccount(String accountName, String accountType) -``` - -#### Parameters -| Name | Type | Description | -|------|------|-------------| -| accountName | String | The name for the new Account | -| accountType | String | The type of Account to create | - -#### Return Type -**Id** - -The Id of the newly created Account - -#### Throws -DmlException: if the Account cannot be created - ---- - -### `updateAccountIndustry(accountIds, industry)` - -Updates the industry field for multiple accounts - -#### Signature -```apex -public static Integer updateAccountIndustry(List accountIds, String industry) -``` - -#### Parameters -| Name | Type | Description | -|------|------|-------------| -| accountIds | List<Id> | List of Account Ids to update | -| industry | String | The industry value to set | - -#### Return Type -**Integer** - -Number of successfully updated accounts \ No newline at end of file diff --git a/examples/sfdx-multi-dir/docs/index.md b/examples/sfdx-multi-dir/docs/index.md deleted file mode 100644 index e9a2fafa..00000000 --- a/examples/sfdx-multi-dir/docs/index.md +++ /dev/null @@ -1,13 +0,0 @@ -# Reference Guide - -## Account Management - -### [AccountService](account-management/AccountService.md) - -Service class for handling Account operations - -## Lightning Web Components - -### [LWCHelper](lightning-web-components/LWCHelper.md) - -Helper class for Lightning Web Components \ No newline at end of file diff --git a/examples/sfdx-multi-dir/docs/lightning-web-components/LWCHelper.md b/examples/sfdx-multi-dir/docs/lightning-web-components/LWCHelper.md deleted file mode 100644 index 80be05a6..00000000 --- a/examples/sfdx-multi-dir/docs/lightning-web-components/LWCHelper.md +++ /dev/null @@ -1,196 +0,0 @@ -# LWCHelper Class - -Helper class for Lightning Web Components - -**Group** Lightning Web Components - -**Author** ApexDocs Team - -## Methods -### `getPicklistValues(objectApiName, fieldApiName)` - -`AURAENABLED` - -Retrieves picklist values for a given object and field - -#### Signature -```apex -public static List getPicklistValues(String objectApiName, String fieldApiName) -``` - -#### Parameters -| Name | Type | Description | -|------|------|-------------| -| objectApiName | String | The API name of the object | -| fieldApiName | String | The API name of the field | - -#### Return Type -**List<PicklistEntry>** - -List of picklist entries with label and value - -#### Example -List<PicklistEntry> entries = LWCHelper.getPicklistValues('Account', 'Industry'); - ---- - -### `getCurrentUserInfo()` - -`AURAENABLED` - -Retrieves current user information for LWC components - -#### Signature -```apex -public static UserInfo getCurrentUserInfo() -``` - -#### Return Type -**UserInfo** - -UserInfo object containing user details - ---- - -### `checkUserPermission(objectApiName, operation)` - -`AURAENABLED` - -Validates user permissions for a specific object and operation - -#### Signature -```apex -public static Boolean checkUserPermission(String objectApiName, String operation) -``` - -#### Parameters -| Name | Type | Description | -|------|------|-------------| -| objectApiName | String | The API name of the object | -| operation | String | The operation to check ('create', 'read', 'update', 'delete') | - -#### Return Type -**Boolean** - -True if user has permission, false otherwise - -## Classes -### PicklistEntry Class - -Inner class to represent picklist entries - -#### Properties -##### `label` - -`AURAENABLED` - -###### Signature -```apex -public label -``` - -###### Type -String - ---- - -##### `value` - -`AURAENABLED` - -###### Signature -```apex -public value -``` - -###### Type -String - -#### Constructors -##### `PicklistEntry(label, value)` - -###### Signature -```apex -public PicklistEntry(String label, String value) -``` - -###### Parameters -| Name | Type | Description | -|------|------|-------------| -| label | String | | -| value | String | | - -### UserInfo Class - -Inner class to represent user information - -#### Properties -##### `userId` - -`AURAENABLED` - -###### Signature -```apex -public userId -``` - -###### Type -Id - ---- - -##### `userName` - -`AURAENABLED` - -###### Signature -```apex -public userName -``` - -###### Type -String - ---- - -##### `userEmail` - -`AURAENABLED` - -###### Signature -```apex -public userEmail -``` - -###### Type -String - ---- - -##### `profileId` - -`AURAENABLED` - -###### Signature -```apex -public profileId -``` - -###### Type -Id - -#### Constructors -##### `UserInfo(userId, userName, userEmail, profileId)` - -###### Signature -```apex -public UserInfo(Id userId, String userName, String userEmail, Id profileId) -``` - -###### Parameters -| Name | Type | Description | -|------|------|-------------| -| userId | Id | | -| userName | String | | -| userEmail | String | | -| profileId | Id | | \ No newline at end of file diff --git a/examples/sfdx-multi-dir/force-LWC/main/default/classes/LWCHelper.cls b/examples/sfdx-multi-dir/force-LWC/main/default/classes/LWCHelper.cls deleted file mode 100644 index 818ff49b..00000000 --- a/examples/sfdx-multi-dir/force-LWC/main/default/classes/LWCHelper.cls +++ /dev/null @@ -1,115 +0,0 @@ -/** - * @description Helper class for Lightning Web Components - * @author ApexDocs Team - * @group Lightning Web Components - */ -public with sharing class LWCHelper { - - /** - * @description Retrieves picklist values for a given object and field - * @param objectApiName The API name of the object - * @param fieldApiName The API name of the field - * @return List of picklist entries with label and value - * @example - * List entries = LWCHelper.getPicklistValues('Account', 'Industry'); - */ - @AuraEnabled(cacheable=true) - public static List getPicklistValues(String objectApiName, String fieldApiName) { - List picklistEntries = new List(); - - try { - Schema.SObjectType objectType = Schema.getGlobalDescribe().get(objectApiName); - Schema.DescribeSObjectResult objectDescribe = objectType.getDescribe(); - Schema.DescribeFieldResult fieldDescribe = objectDescribe.fields.getMap().get(fieldApiName).getDescribe(); - - for (Schema.PicklistEntry entry : fieldDescribe.getPicklistValues()) { - if (entry.isActive()) { - picklistEntries.add(new PicklistEntry(entry.getLabel(), entry.getValue())); - } - } - } catch (Exception e) { - System.debug('Error retrieving picklist values: ' + e.getMessage()); - } - - return picklistEntries; - } - - /** - * @description Retrieves current user information for LWC components - * @return UserInfo object containing user details - */ - @AuraEnabled(cacheable=true) - public static UserInfo getCurrentUserInfo() { - return new UserInfo( - UserInfo.getUserId(), - UserInfo.getName(), - UserInfo.getUserEmail(), - UserInfo.getProfileId() - ); - } - - /** - * @description Validates user permissions for a specific object and operation - * @param objectApiName The API name of the object - * @param operation The operation to check ('create', 'read', 'update', 'delete') - * @return True if user has permission, false otherwise - */ - @AuraEnabled(cacheable=true) - public static Boolean checkUserPermission(String objectApiName, String operation) { - try { - Schema.SObjectType objectType = Schema.getGlobalDescribe().get(objectApiName); - Schema.DescribeSObjectResult objectDescribe = objectType.getDescribe(); - - switch on operation.toLowerCase() { - when 'create' { - return objectDescribe.isCreateable(); - } - when 'read' { - return objectDescribe.isAccessible(); - } - when 'update' { - return objectDescribe.isUpdateable(); - } - when 'delete' { - return objectDescribe.isDeletable(); - } - when else { - return false; - } - } - } catch (Exception e) { - System.debug('Error checking user permissions: ' + e.getMessage()); - return false; - } - } - - /** - * @description Inner class to represent picklist entries - */ - public class PicklistEntry { - @AuraEnabled public String label { get; set; } - @AuraEnabled public String value { get; set; } - - public PicklistEntry(String label, String value) { - this.label = label; - this.value = value; - } - } - - /** - * @description Inner class to represent user information - */ - public class UserInfo { - @AuraEnabled public Id userId { get; set; } - @AuraEnabled public String userName { get; set; } - @AuraEnabled public String userEmail { get; set; } - @AuraEnabled public Id profileId { get; set; } - - public UserInfo(Id userId, String userName, String userEmail, Id profileId) { - this.userId = userId; - this.userName = userName; - this.userEmail = userEmail; - this.profileId = profileId; - } - } -} diff --git a/examples/sfdx-multi-dir/force-LWC/main/default/classes/LWCHelper.cls-meta.xml b/examples/sfdx-multi-dir/force-LWC/main/default/classes/LWCHelper.cls-meta.xml deleted file mode 100644 index 7a518297..00000000 --- a/examples/sfdx-multi-dir/force-LWC/main/default/classes/LWCHelper.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 58.0 - Active - diff --git a/examples/sfdx-multi-dir/force-app/main/default/classes/AccountService.cls b/examples/sfdx-multi-dir/force-app/main/default/classes/AccountService.cls deleted file mode 100644 index 87de83c0..00000000 --- a/examples/sfdx-multi-dir/force-app/main/default/classes/AccountService.cls +++ /dev/null @@ -1,76 +0,0 @@ -/** - * @description Service class for handling Account operations - * @author ApexDocs Team - * @group Account Management - */ -public with sharing class AccountService { - - /** - * @description Retrieves an Account record by its Id - * @param accountId The Id of the Account to retrieve - * @return The Account record or null if not found - * @example - * Account acc = AccountService.getAccountById('0011234567890123'); - */ - public static Account getAccountById(Id accountId) { - try { - return [SELECT Id, Name, Type, Industry FROM Account WHERE Id = :accountId LIMIT 1]; - } catch (QueryException e) { - System.debug('Error retrieving account: ' + e.getMessage()); - return null; - } - } - - /** - * @description Creates a new Account record - * @param accountName The name for the new Account - * @param accountType The type of Account to create - * @return The Id of the newly created Account - * @throws DmlException if the Account cannot be created - */ - public static Id createAccount(String accountName, String accountType) { - Account newAccount = new Account( - Name = accountName, - Type = accountType - ); - - insert newAccount; - return newAccount.Id; - } - - /** - * @description Updates the industry field for multiple accounts - * @param accountIds List of Account Ids to update - * @param industry The industry value to set - * @return Number of successfully updated accounts - */ - public static Integer updateAccountIndustry(List accountIds, String industry) { - List accountsToUpdate = [ - SELECT Id FROM Account - WHERE Id IN :accountIds - ]; - - for (Account acc : accountsToUpdate) { - acc.Industry = industry; - } - - try { - update accountsToUpdate; - return accountsToUpdate.size(); - } catch (DmlException e) { - System.debug('Error updating accounts: ' + e.getMessage()); - return 0; - } - } - - /** - * @description Private helper method to validate account data - * @param accountData The account data to validate - * @return True if valid, false otherwise - */ - private static Boolean validateAccountData(Account accountData) { - return accountData != null && - String.isNotBlank(accountData.Name) && - accountData.Name.length() <= 255; - } -} diff --git a/examples/sfdx-multi-dir/force-app/main/default/classes/AccountService.cls-meta.xml b/examples/sfdx-multi-dir/force-app/main/default/classes/AccountService.cls-meta.xml deleted file mode 100644 index 7a518297..00000000 --- a/examples/sfdx-multi-dir/force-app/main/default/classes/AccountService.cls-meta.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 58.0 - Active - diff --git a/examples/sfdx-multi-dir/package-lock.json b/examples/sfdx-multi-dir/package-lock.json deleted file mode 100644 index c4e69395..00000000 --- a/examples/sfdx-multi-dir/package-lock.json +++ /dev/null @@ -1,234 +0,0 @@ -{ - "name": "sfdx-multi-dir-example", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "sfdx-multi-dir-example", - "devDependencies": { - "ts-node": "^10.9.2" - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", - "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "24.0.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.4.tgz", - "integrity": "sha512-ulyqAkrhnuNq9pB76DRBTkcS6YsmDALy6Ua63V8OhrOBgbcYt6IOdzpw5P1+dyRIyMerzLkeYWBeOXPpA9GMAA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "undici-types": "~7.8.0" - } - }, - "node_modules/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, - "license": "MIT" - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, - "license": "ISC" - }, - "node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/typescript": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", - "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", - "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, - "license": "MIT" - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - } - } -} diff --git a/examples/sfdx-multi-dir/package.json b/examples/sfdx-multi-dir/package.json deleted file mode 100644 index 91a2e57c..00000000 --- a/examples/sfdx-multi-dir/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "sfdx-multi-dir-example", - "scripts": { - "apexdocs:build": "ts-node ../../src/cli/generate.ts markdown --useSfdxProjectJson --targetDir ./docs --scope public", - "apexdocs:build:single": "ts-node ../../src/cli/generate.ts markdown --sourceDir force-app --targetDir ./docs --scope public" - }, - "devDependencies": { - "ts-node": "^10.9.2" - } -} diff --git a/examples/sfdx-multi-dir/sfdx-project.json b/examples/sfdx-multi-dir/sfdx-project.json deleted file mode 100644 index 98b282d8..00000000 --- a/examples/sfdx-multi-dir/sfdx-project.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "packageDirectories": [ - { - "path": "force-app", - "default": true - }, - { - "path": "force-LWC", - "default": false - } - ], - "name": "ApexDocs Multi-Directory Example", - "namespace": "", - "sfdcLoginUrl": "https://login.salesforce.com", - "sourceApiVersion": "58.0" -}