-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c18b562
Showing
43 changed files
with
8,592 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.cjs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
extends: ['eslint-config-salesforce-typescript', 'plugin:sf-plugin/recommended'], | ||
root: true, | ||
rules: { | ||
header: 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' | ||
day: 'saturday' | ||
versioning-strategy: 'increase' | ||
labels: | ||
- 'dependencies' | ||
open-pull-requests-limit: 5 | ||
pull-request-branch-name: | ||
separator: '-' | ||
commit-message: | ||
# cause a release for non-dev-deps | ||
prefix: fix(deps) | ||
# no release for dev-deps | ||
prefix-development: chore(dev-deps) | ||
ignore: | ||
- dependency-name: '@salesforce/dev-scripts' | ||
- dependency-name: '*' | ||
update-types: ['version-update:semver-major'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
unit-tests: | ||
uses: salesforcecli/github-workflows/.github/workflows/unitTest.yml@main | ||
nuts: | ||
needs: unit-tests | ||
uses: salesforcecli/github-workflows/.github/workflows/nut.yml@main | ||
secrets: inherit | ||
strategy: | ||
matrix: | ||
os: [windows-latest] | ||
fail-fast: false | ||
with: | ||
os: ${{ matrix.os }} | ||
release: | ||
needs: [unit-tests, nuts] | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Release Please | ||
id: release | ||
uses: googleapis/release-please-action@v4 | ||
with: | ||
release-type: node | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4.1.1 | ||
if: ${{ steps.release.outputs.release_created == 'true' }} | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4.0.1 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
registry-url: 'https://registry.npmjs.org' | ||
if: ${{ steps.release.outputs.release_created == 'true' }} | ||
|
||
- name: Install Dependencies | ||
run: yarn install | ||
if: ${{ steps.release.outputs.release_created == 'true' }} | ||
|
||
- name: Build | ||
run: yarn build | ||
if: ${{ steps.release.outputs.release_created == 'true' }} | ||
|
||
- name: Publish to NPM | ||
run: npm publish --access public --tag latest | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
if: ${{ steps.release.outputs.release_created == 'true' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: tests | ||
on: | ||
push: | ||
branches-ignore: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
unit-tests: | ||
uses: salesforcecli/github-workflows/.github/workflows/unitTest.yml@main | ||
nuts: | ||
needs: unit-tests | ||
uses: salesforcecli/github-workflows/.github/workflows/nut.yml@main | ||
secrets: inherit | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
fail-fast: false | ||
with: | ||
os: ${{ matrix.os }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# -- CLEAN | ||
tmp/ | ||
# use yarn by default, so ignore npm | ||
package-lock.json | ||
|
||
# never checkin npm config | ||
.npmrc | ||
|
||
# debug logs | ||
npm-error.log | ||
yarn-error.log | ||
|
||
|
||
# compile source | ||
lib | ||
|
||
# test artifacts | ||
*xunit.xml | ||
*checkstyle.xml | ||
*unitcoverage | ||
.nyc_output | ||
coverage | ||
test_session* | ||
stderr*.txt | ||
stdout*.txt | ||
|
||
# generated docs | ||
docs | ||
|
||
# ignore sfdx-trust files | ||
*.tgz | ||
*.sig | ||
package.json.bak. | ||
|
||
|
||
npm-shrinkwrap.json | ||
oclif.manifest.json | ||
oclif.lock | ||
|
||
# -- CLEAN ALL | ||
*.tsbuildinfo | ||
.eslintcache | ||
.wireit | ||
node_modules | ||
|
||
# -- | ||
# put files here you don't want cleaned with sf-clean | ||
|
||
# os specific files | ||
.DS_Store | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn commitlint --edit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn lint && yarn pretty-quick --staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn build && yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
'**/*.{js,json,md}?(x)': () => 'npm run reformat', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"require": ["ts-node/register"], | ||
"watch-extensions": "ts", | ||
"recursive": true, | ||
"reporter": "spec", | ||
"timeout": 600000, | ||
"node-option": ["loader=ts-node/esm"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"check-coverage": true, | ||
"lines": 90, | ||
"statements": 90, | ||
"functions": 90, | ||
"branches": 90 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"@salesforce/prettier-config" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"test": { | ||
"testsPath": "test/**/*.test.ts" | ||
}, | ||
"wireit": { | ||
"test": { | ||
"dependencies": ["test:compile", "test:only", "lint"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "attach", | ||
"name": "Attach", | ||
"port": 9229, | ||
"skipFiles": ["<node_internals>/**"] | ||
}, | ||
{ | ||
"name": "Run All Tests", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/node_modules/mocha/bin/mocha", | ||
"args": ["--inspect", "--colors", "test/**/*.test.ts"], | ||
"env": { | ||
"NODE_ENV": "development", | ||
"SFDX_ENV": "development" | ||
}, | ||
"sourceMaps": true, | ||
"smartStep": true, | ||
"internalConsoleOptions": "openOnSessionStart", | ||
"preLaunchTask": "Compile tests" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Run Current Test", | ||
"program": "${workspaceFolder}/node_modules/mocha/bin/mocha", | ||
"args": ["--inspect", "--colors", "${file}"], | ||
"env": { | ||
"NODE_ENV": "development", | ||
"SFDX_ENV": "development" | ||
}, | ||
"sourceMaps": true, | ||
"smartStep": true, | ||
"internalConsoleOptions": "openOnSessionStart", | ||
"preLaunchTask": "Compile tests" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/CVS": true, | ||
"**/.DS_Store": true | ||
}, | ||
"search.exclude": { | ||
"**/lib": true, | ||
"**/bin": true | ||
}, | ||
"editor.tabSize": 2, | ||
"editor.formatOnSave": true, | ||
"rewrap.wrappingColumn": 80 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"version": "2.0.0", | ||
"problemMatcher": "$tsc", | ||
"tasks": [ | ||
{ | ||
"label": "Compile tests", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"command": "yarn", | ||
"type": "shell", | ||
"presentation": { | ||
"focus": false, | ||
"panel": "dedicated" | ||
}, | ||
"args": ["run", "pretest"], | ||
"isBackground": false | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!-- markdownlint-disable MD024 MD025 --> | ||
<!-- markdown-link-check-disable --> | ||
|
||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Matthew Carvin | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# sf-package-combiner | ||
|
||
[![NPM](https://img.shields.io/npm/v/sf-package-combiner.svg?label=sf-package-combiner)](https://www.npmjs.com/package/sf-package-combiner) [![Downloads/week](https://img.shields.io/npm/dw/sf-package-combiner.svg)](https://npmjs.org/package/sf-package-combiner) [![License](https://img.shields.io/badge/License-BSD%203--Clause-brightgreen.svg)](https://raw.githubusercontent.com/salesforcecli/sf-package-combiner/main/LICENSE.txt) | ||
|
||
A Salesforce CLI plugin to combine multiple manifest files (package.xml) into 1 file that can be used for deployments. | ||
|
||
**NOTE:** When the packages are combined, the `<name>` tags with the metadata name will be converted to lower-case, ex: `<name>customobject</name>`. This ensures that multiple members of the same metadata name are grouped together in the combined package. The `<name>` tags are case insensitive when read by the Salesforce CLI. However, the `<members>` tags are case sensitive and must match the cases to match their API names in Salesforce. This tool will not convert the `<members>` cases, just the `<name`> tags. | ||
|
||
The combined package.xml will use the maximum `<version>` tag found in all packages. If none of the packages provided have `<version>`, it will omit this from the combined package.xml. When you deploy a package.xml without an API version, it will check the `sfdx-project.json` file for the `sourceApiVersion`. If both files do not have an API version, it will default to the max API version available in the target org. | ||
|
||
## Install | ||
|
||
```bash | ||
sf plugins install sf-package-combiner@x.y.z | ||
``` | ||
|
||
## Commands | ||
|
||
<!-- commands --> | ||
|
||
- [`sf sfpc combine`](#sf-sfpc-combine) | ||
|
||
## `sf sfpc combine` | ||
|
||
Combine Salesforce manifest files together. | ||
|
||
``` | ||
USAGE | ||
$ sf sfpc combine [--json] [-f <value>] | ||
FLAGS | ||
-f, --package-file=<value> The path to an existing package.xml file. This flag can be specified multiple times. | ||
-c, --combined-package=<value> The path to save the combined package.xml to. | ||
GLOBAL FLAGS | ||
--json Format output as json. | ||
DESCRIPTION | ||
Combine multiple package files into 1 singular package file. | ||
EXAMPLES | ||
Combine pack1.xml and pack2.xml into package.xml | ||
$ sf sfpc combine -f pack1.xml -f pack2.xml -c package.xml | ||
``` | ||
|
||
<!-- commandsstop --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@echo off | ||
|
||
node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\dev" %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning | ||
// eslint-disable-next-line node/shebang | ||
async function main() { | ||
const { execute } = await import('@oclif/core'); | ||
await execute({ development: true, dir: import.meta.url }); | ||
} | ||
|
||
await main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@echo off | ||
|
||
node "%~dp0\run" %* |
Oops, something went wrong.