diff --git a/messages/deploy.md b/messages/deploy.md index 025a893..37b1b98 100644 --- a/messages/deploy.md +++ b/messages/deploy.md @@ -10,31 +10,31 @@ Deploys an initialized and packaged Data Cloud code extension to a Salesforce or - Deploy a %s package to the org with alias "myorg": - <%= config.bin %> data-code-extension %s deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./package --target-org myorg + <%= config.bin %> data-code-extension %s deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./my-%s-package --target-org myorg - Deploy with a specific CPU size: - <%= config.bin %> data-code-extension %s deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./package --target-org myorg --cpu-size CPU_4XL + <%= config.bin %> data-code-extension %s deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./my-%s-package --target-org myorg --cpu-size CPU_4XL # examples.script - Deploy a script package to the org with alias "myorg": - <%= config.bin %> data-code-extension script deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./package --target-org myorg + <%= config.bin %> data-code-extension script deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./my-script-package --target-org myorg - Deploy with a specific CPU size: - <%= config.bin %> data-code-extension script deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./package --target-org myorg --cpu-size CPU_4XL + <%= config.bin %> data-code-extension script deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./my-script-package --target-org myorg --cpu-size CPU_4XL # examples.function - Deploy a function package to the org with alias "myorg": - <%= config.bin %> data-code-extension function deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./package --target-org myorg --function-invoke-opt UnstructuredChunking + <%= config.bin %> data-code-extension function deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./my-function-package --target-org myorg --function-invoke-opt UnstructuredChunking - Deploy with a specific CPU size: - <%= config.bin %> data-code-extension function deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./package --target-org myorg --cpu-size CPU_4XL --function-invoke-opt UnstructuredChunking + <%= config.bin %> data-code-extension function deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./my-function-package --target-org myorg --cpu-size CPU_4XL --function-invoke-opt UnstructuredChunking # info.checkingPython diff --git a/messages/run.md b/messages/run.md index a62e35a..fe52759 100644 --- a/messages/run.md +++ b/messages/run.md @@ -6,15 +6,25 @@ Run a Data Code Extension %s package locally using data from your Salesforce Org Executes an initialized Data Cloud custom code package against a Salesforce org. The package must be initialized before running. Supports both script and function packages with optional config file and dependencies overrides. -# examples +# examples.script -- Run a %s package against the org with alias "myorg": +- Run a script package against the org with alias "myorg": - <%= config.bin %> data-code-extension %s run --entrypoint ./my-package/entrypoint.py --target-org myorg + <%= config.bin %> data-code-extension script run --entrypoint ./my-script-package/entrypoint.py --target-org myorg - Run with a custom config file: - <%= config.bin %> data-code-extension %s run --entrypoint ./my-package/entrypoint.py --target-org myorg --config-file ./payload/config.json + <%= config.bin %> data-code-extension script run --entrypoint ./my-script-package/entrypoint.py --target-org myorg --config-file ./my-script-package/payload/config.json + +# examples.function + +- Run a function package against the org with alias "myorg": + + <%= config.bin %> data-code-extension function run --entrypoint ./my-function-package/entrypoint.py --target-org myorg + +- Run with a custom config file: + + <%= config.bin %> data-code-extension function run --entrypoint ./my-function-package/entrypoint.py --target-org myorg --config-file ./my-function-package/payload/config.json # info.checkingPython diff --git a/messages/scan.md b/messages/scan.md index 6e04545..9cb397b 100644 --- a/messages/scan.md +++ b/messages/scan.md @@ -6,23 +6,41 @@ Scan the Data Code Extension %s package for permissions and dependencies. Scans Python files in an initialized Data Code Extension package directory to identify required permissions and dependencies. Updates the config.json and requirements.txt files based on the code analysis. -# examples +# examples.script -- Scan a %s package in the current directory: +- Scan a script package in the current directory: - <%= config.bin %> data-code-extension %s scan + <%= config.bin %> data-code-extension script scan - Scan with a custom entrypoint file: - <%= config.bin %> data-code-extension %s scan --entrypoint payload/entrypoint.py + <%= config.bin %> data-code-extension script scan --entrypoint ./payload/entrypoint.py - Perform a dry run to see what would be changed: - <%= config.bin %> data-code-extension %s scan --dry-run + <%= config.bin %> data-code-extension script scan --dry-run - Scan without updating the requirements.txt file: - <%= config.bin %> data-code-extension %s scan --no-requirements + <%= config.bin %> data-code-extension script scan --no-requirements + +# examples.function + +- Scan a function package in the current directory: + + <%= config.bin %> data-code-extension function scan + +- Scan with a custom entrypoint file: + + <%= config.bin %> data-code-extension function scan --entrypoint ./payload/entrypoint.py + +- Perform a dry run to see what would be changed: + + <%= config.bin %> data-code-extension function scan --dry-run + +- Scan without updating the requirements.txt file: + + <%= config.bin %> data-code-extension function scan --no-requirements # info.checkingPython diff --git a/src/commands/data-code-extension/function/run.ts b/src/commands/data-code-extension/function/run.ts index add97cc..86719b5 100644 --- a/src/commands/data-code-extension/function/run.ts +++ b/src/commands/data-code-extension/function/run.ts @@ -24,7 +24,7 @@ export default class Run extends RunBase { public static readonly state = 'beta'; public static readonly summary = messages.getMessage('summary', ['function']); public static readonly description = messages.getMessage('description'); - public static readonly examples = messages.getMessages('examples', ['function', 'function', 'function']); + public static readonly examples = messages.getMessages('examples.function'); public static readonly flags = { entrypoint: Flags.file({ diff --git a/src/commands/data-code-extension/function/scan.ts b/src/commands/data-code-extension/function/scan.ts index ee8e109..0f38c9e 100644 --- a/src/commands/data-code-extension/function/scan.ts +++ b/src/commands/data-code-extension/function/scan.ts @@ -24,13 +24,7 @@ export default class Scan extends ScanBase { public static readonly state = 'beta'; public static readonly summary = messages.getMessage('summary', ['function']); public static readonly description = messages.getMessage('description'); - public static readonly examples = messages.getMessages('examples', [ - 'function', - 'function', - 'function', - 'function', - 'function', - ]); + public static readonly examples = messages.getMessages('examples.function'); public static readonly flags = { entrypoint: Flags.string({ diff --git a/src/commands/data-code-extension/script/run.ts b/src/commands/data-code-extension/script/run.ts index 24ba0c5..016ea78 100644 --- a/src/commands/data-code-extension/script/run.ts +++ b/src/commands/data-code-extension/script/run.ts @@ -24,7 +24,7 @@ export default class Run extends RunBase { public static readonly state = 'beta'; public static readonly summary = messages.getMessage('summary', ['script']); public static readonly description = messages.getMessage('description'); - public static readonly examples = messages.getMessages('examples', ['script', 'script', 'script']); + public static readonly examples = messages.getMessages('examples.script'); public static readonly flags = { entrypoint: Flags.file({ diff --git a/src/commands/data-code-extension/script/scan.ts b/src/commands/data-code-extension/script/scan.ts index af3f6a0..a2170f3 100644 --- a/src/commands/data-code-extension/script/scan.ts +++ b/src/commands/data-code-extension/script/scan.ts @@ -24,13 +24,7 @@ export default class Scan extends ScanBase { public static readonly state = 'beta'; public static readonly summary = messages.getMessage('summary', ['script']); public static readonly description = messages.getMessage('description'); - public static readonly examples = messages.getMessages('examples', [ - 'script', - 'script', - 'script', - 'script', - 'script', - ]); + public static readonly examples = messages.getMessages('examples.script'); public static readonly flags = { entrypoint: Flags.string({