From 7963de1b3ea4ae1c89f84cf0c15222596e37c0cb Mon Sep 17 00:00:00 2001 From: k-capehart Date: Thu, 30 May 2024 17:51:27 +0000 Subject: [PATCH] chore(release): 1.4.0 [skip ci] --- CHANGELOG.md | 9 ++++++ README.md | 86 +++++++++++++++------------------------------------- package.json | 2 +- 3 files changed, 35 insertions(+), 62 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ad5552..ef3735e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# [1.4.0](https://github.com/k-capehart/kc-sf-plugin/compare/1.3.2...1.4.0) (2024-05-30) + + +### Features + +* combine trigger-framework commands, add custom templates ([#23](https://github.com/k-capehart/kc-sf-plugin/issues/23)) ([351d7b1](https://github.com/k-capehart/kc-sf-plugin/commit/351d7b10b10ff5c28200fc99c30453b14df967c1)) + + + ## [1.3.2](https://github.com/k-capehart/kc-sf-plugin/compare/1.3.0...1.3.2) (2024-05-28) diff --git a/README.md b/README.md index 8a24537..593fc02 100644 --- a/README.md +++ b/README.md @@ -72,10 +72,8 @@ For more template examples: https://github.com/k-capehart/kc-sf-plugin/tree/main ## Commands - -- [`sf kc diff`](#sf-kc-diff) -- [`sf kc trigger-framework init`](#sf-kc-trigger-framework-init) -- [`sf kc trigger-framework trigger`](#sf-kc-trigger-framework-trigger) +* [`sf kc diff`](#sf-kc-diff) +* [`sf kc trigger-framework`](#sf-kc-trigger-framework) ## `sf kc diff` @@ -118,82 +116,48 @@ FLAG DESCRIPTIONS Ignore files by placing them in your .forceignore and using this flag. ``` -_See code: [src/commands/kc/diff.ts](https://github.com/k-capehart/kc-sf-plugin/blob/1.3.1/src/commands/kc/diff.ts)_ - -## `sf kc trigger-framework init` - -Auto generate an Apex Trigger framework. By default, the template uses this Trigger Handler Apex class: https://github.com/k-capehart/sfdc-trigger-framework - -``` -USAGE - $ sf kc trigger-framework init [--json] [--flags-dir ] [-d ] - -FLAGS - -d, --target-dir= [default: force-app/main/default] The target directory for your salesforce project. There - should be subdirectories for classes/ and objects/. - -GLOBAL FLAGS - --flags-dir= Import flag values from a directory. - --json Format output as json. - -DESCRIPTION - Auto generate an Apex Trigger framework. By default, the template uses this Trigger Handler Apex class: - https://github.com/k-capehart/sfdc-trigger-framework - - Using this command will initialize an Apex Trigger framework by creating an extendable Trigger Handler class based off - a template. - - Also creates a CustomSetting called BypassAutomation that can be used to optionally skip triggers for specific users. - - SObject specific trigger handlers should extend this class and override the methods for beforeInsert(), afterInsert(), - etc. - - If a file already exists with the given name then it is not overwritten. - -EXAMPLES - Initialize the trigger framework in the directory: force-app/main/default - - $ sf kc trigger-framework init --target-dir force-app/main/default -``` - -_See code: [src/commands/kc/trigger-framework/init.ts](https://github.com/k-capehart/kc-sf-plugin/blob/1.3.1/src/commands/kc/trigger-framework/init.ts)_ +_See code: [src/commands/kc/diff.ts](https://github.com/k-capehart/kc-sf-plugin/blob/1.4.0/src/commands/kc/diff.ts)_ -## `sf kc trigger-framework trigger` +## `sf kc trigger-framework` -Create a new trigger, handler class, and helper class for a Salesforce object. Recommend using `kc trigger-framework init` first. +Generate apex trigger frameworks based on templates. ``` USAGE - $ sf kc trigger-framework trigger -s [--json] [--flags-dir ] [-d ] + $ sf kc trigger-framework [--json] [--flags-dir ] [-d ] [-i] [-s ] [-t 1] [--custom-template + ] FLAGS - -d, --target-dir= [default: force-app/main/default] The target directory for your apex classes and triggers. - There should be subdirectories for classes/, triggers/, and objects/. - -s, --sobject=... (required) The name of the SObject that the trigger and classes will be created for. + -d, --target-dir= [default: force-app/main/default] The target directory for your salesforce project. + -i, --init Initialize the trigger framework for the given template. + -s, --sobject=... The name of the SObject that the trigger and classes will be created for. + -t, --template=