generated from forcedotcom/library-template
-
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 a7c7251
Showing
38 changed files
with
6,453 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,3 @@ | ||
{ | ||
"extends": ["@commitlint/config-conventional"] | ||
} |
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 @@ | ||
/* | ||
* Copyright (c) 2024, salesforce.com, inc. | ||
* All rights reserved. | ||
* Licensed under the BSD 3-Clause license. | ||
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
*/ | ||
module.exports = { | ||
extends: ['eslint-config-salesforce-typescript', 'eslint-config-salesforce-license', 'plugin:sf-plugin/library'], | ||
}; |
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 @@ | ||
{ | ||
"productTag": "ADD_YOUR_PRODUCT_TAG", | ||
"defaultBuild": "offcore.tooling.54" | ||
} |
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,2 @@ | ||
**/docs/* linguist-generated=true | ||
**/docs/* linguist-documentation |
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 @@ | ||
### What does this PR do? | ||
|
||
### What issues does this PR fix or reference? |
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,10 @@ | ||
name: automerge | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '42 2,5,8,11 * * *' | ||
|
||
jobs: | ||
automerge: | ||
uses: salesforcecli/github-workflows/.github/workflows/automerge.yml@main | ||
secrets: inherit |
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,32 @@ | ||
name: create-github-release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- prerelease/** | ||
tags-ignore: | ||
- '*' | ||
workflow_dispatch: | ||
inputs: | ||
prerelease: | ||
type: string | ||
description: 'Name to use for the prerelease: beta, dev, etc. NOTE: If this is already set in the package.json, it does not need to be passed in here.' | ||
|
||
jobs: | ||
release: | ||
uses: salesforcecli/github-workflows/.github/workflows/create-github-release.yml@main | ||
secrets: inherit | ||
with: | ||
prerelease: ${{ inputs.prerelease }} | ||
# If this is a push event, we want to skip the release if there are no semantic commits | ||
# However, if this is a manual release (workflow_dispatch), then we want to disable skip-on-empty | ||
# This helps recover from forgetting to add semantic commits ('fix:', 'feat:', etc.) | ||
skip-on-empty: ${{ github.event_name == 'push' }} | ||
# docs: | ||
# # Most repos won't use this | ||
# # Depends on the 'release' job to avoid git collisions, not for any functionality reason | ||
# needs: release | ||
# secrets: inherit | ||
# if: ${{ github.ref_name == 'main' }} | ||
# uses: salesforcecli/github-workflows/.github/workflows/publishTypedoc.yml@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,10 @@ | ||
name: devScripts | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '50 6 * * 0' | ||
|
||
jobs: | ||
update: | ||
uses: salesforcecli/github-workflows/.github/workflows/devScriptsUpdate.yml@main | ||
secrets: inherit |
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,43 @@ | ||
name: failureNotifications | ||
on: | ||
workflow_run: | ||
workflows: | ||
- publish | ||
- create-github-release | ||
types: | ||
- completed | ||
jobs: | ||
failure-notify: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'failure' }} | ||
steps: | ||
- name: Announce Failure | ||
id: slack | ||
uses: slackapi/[email protected] | ||
env: | ||
# for non-CLI-team-owned plugins, you can send this anywhere you like | ||
SLACK_WEBHOOK_URL: ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | ||
with: | ||
# Payload can be visually tested here: https://app.slack.com/block-kit-builder/T01GST6QY0G#%7B%22blocks%22:%5B%5D%7D | ||
# Only copy over the "blocks" array to the Block Kit Builder | ||
payload: | | ||
{ | ||
"text": "Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }}", | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": ":bh-alert: Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }} :bh-alert:" | ||
} | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*Repo:* ${{ github.event.workflow_run.repository.html_url }}\n*Workflow name:* `${{ github.event.workflow_run.name }}`\n*Job url:* ${{ github.event.workflow_run.html_url }}" | ||
} | ||
} | ||
] | ||
} |
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,23 @@ | ||
name: Pull Request Slack Notification | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Notify Slack on PR open | ||
env: | ||
WEBHOOK_URL: ${{ secrets.CLI_TEAM_SLACK_WEBHOOK_URL }} | ||
PULL_REQUEST_AUTHOR_ICON_URL: ${{ github.event.pull_request.user.avatar_url }} | ||
PULL_REQUEST_AUTHOR_NAME: ${{ github.event.pull_request.user.login }} | ||
PULL_REQUEST_AUTHOR_PROFILE_URL: ${{ github.event.pull_request.user.html_url }} | ||
PULL_REQUEST_BASE_BRANCH_NAME: ${{ github.event.pull_request.base.ref }} | ||
PULL_REQUEST_COMPARE_BRANCH_NAME: ${{ github.event.pull_request.head.ref }} | ||
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} | ||
PULL_REQUEST_REPO: ${{ github.event.pull_request.head.repo.name }} | ||
PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }} | ||
PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }} | ||
uses: salesforcecli/github-workflows/.github/actions/prNotification@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,31 @@ | ||
name: publish | ||
on: | ||
release: | ||
# both release and prereleases | ||
types: [published] | ||
# support manual release in case something goes wrong and needs to be repeated or tested | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: github tag that needs to publish | ||
type: string | ||
required: true | ||
jobs: | ||
getDistTag: | ||
outputs: | ||
tag: ${{ steps.distTag.outputs.tag }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.release.tag_name || inputs.tag }} | ||
- uses: salesforcecli/github-workflows/.github/actions/getPreReleaseTag@main | ||
id: distTag | ||
npm: | ||
uses: salesforcecli/github-workflows/.github/workflows/npmPublish.yml@main | ||
needs: [getDistTag] | ||
with: | ||
tag: ${{ needs.getDistTag.outputs.tag || 'latest' }} | ||
githubTag: ${{ github.event.release.tag_name || inputs.tag }} | ||
|
||
secrets: inherit |
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,28 @@ | ||
name: tests | ||
on: | ||
push: | ||
branches-ignore: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
yarn-lockfile-check: | ||
uses: salesforcecli/github-workflows/.github/workflows/lockFileCheck.yml@main | ||
# Since the Windows unit tests take much longer, we run the linux unit tests first and then run the windows unit tests in parallel with NUTs | ||
linux-unit-tests: | ||
needs: yarn-lockfile-check | ||
uses: salesforcecli/github-workflows/.github/workflows/unitTestsLinux.yml@main | ||
windows-unit-tests: | ||
needs: linux-unit-tests | ||
uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main | ||
|
||
# Uncomment to enable NUT testing in Github Actions | ||
# nuts: | ||
# needs: linux-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,11 @@ | ||
name: pr-validation | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, edited] | ||
# only applies to PRs that want to merge to main | ||
branches: [main] | ||
|
||
jobs: | ||
pr-validation: | ||
uses: salesforcecli/github-workflows/.github/workflows/validatePR.yml@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,43 @@ | ||
# -- CLEAN | ||
|
||
# use yarn by default, so ignore npm | ||
package-lock.json | ||
|
||
# never checkin npm config | ||
.npmrc | ||
|
||
# debug logs | ||
npm-error.log | ||
yarn-error.log | ||
lerna-debug.log | ||
|
||
# compile source | ||
lib | ||
|
||
# test artifacts | ||
*xunit.xml | ||
*checkstyle.xml | ||
*unitcoverage | ||
.nyc_output | ||
coverage | ||
|
||
# generated docs | ||
docs | ||
|
||
# -- CLEAN ALL | ||
node_modules | ||
|
||
|
||
.eslintcache | ||
.wireit | ||
*.tsbuildinfo | ||
|
||
# -- | ||
# put files here you don't want cleaned with sf-clean | ||
|
||
.sfdx | ||
|
||
# os specific files | ||
.DS_Store | ||
.idea | ||
/Library |
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,8 @@ | ||
{ | ||
"require": "test/init.js, ts-node/register, source-map-support/register", | ||
"watch-extensions": "ts", | ||
"watch-files": ["src", "test"], | ||
"recursive": true, | ||
"reporter": "spec", | ||
"timeout": 5000 | ||
} |
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,5 @@ | ||
{ | ||
"nyc": { | ||
"extends": "@salesforce/dev-config/nyc" | ||
} | ||
} |
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,5 @@ | ||
{ | ||
"test": { | ||
"testsPath": "test/**/*.test.ts" | ||
} | ||
} |
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 @@ | ||
# Changelog |
Validating CODEOWNERS rules …
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,2 @@ | ||
# Comment line immediately above ownership line is reserved for related gus information. Please be careful while editing. | ||
#ECCN:Open Source |
Oops, something went wrong.