Skip to content

Commit 57b4700

Browse files
committed
chore: initial repo setup
0 parents  commit 57b4700

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+8567
-0
lines changed

.editorconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.md]
11+
trim_trailing_whitespace = false

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.cjs/

.eslintrc.cjs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright (c) 2020, salesforce.com, inc.
3+
* All rights reserved.
4+
* Licensed under the BSD 3-Clause license.
5+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6+
*/
7+
module.exports = {
8+
extends: ['eslint-config-salesforce-typescript', 'eslint-config-salesforce-license', 'plugin:sf-plugin/recommended'],
9+
root: true,
10+
};

.git2gus/config.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"productTag": "a1aB00000004Bx8IAE",
3+
"defaultBuild": "offcore.tooling.56",
4+
"issueTypeLabels": {
5+
"feature": "USER STORY",
6+
"regression": "BUG P1",
7+
"bug": "BUG P3"
8+
}
9+
}

.github/ISSUE_TEMPLATE/Bug_report.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
---
5+
6+
<!--
7+
NOTICE: While GitHub is the preferred channel for reporting issues/feedback, this is not a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, please use official support channels.
8+
-->
9+
10+
<!--
11+
FOR BUGS RELATED TO THE SALEFORCE CLI, please use this repository: https://github.com/forcedotcom/cli/issues
12+
-->
13+
14+
### Summary
15+
16+
_Short summary of what is going on or to provide context_.
17+
18+
### Steps To Reproduce:
19+
20+
1. This is step 1.
21+
1. This is step 2. All steps should start with '1.'
22+
23+
### Expected result
24+
25+
_Describe what should have happened_.
26+
27+
### Actual result
28+
29+
_Describe what actually happened instead_.
30+
31+
### Additional information
32+
33+
_Feel free to attach a screenshot_.
34+
35+
**VS Code Version**:
36+
37+
**SFDX CLI Version**:
38+
39+
**OS and version**:
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
---
5+
6+
**Is your feature request related to a problem? Please describe.**
7+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
8+
9+
**Describe the solution you'd like**
10+
A clear and concise description of what you want to happen.
11+
12+
**Describe alternatives you've considered**
13+
A clear and concise description of any alternative solutions or features you've considered.
14+
15+
**Additional context**
16+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### What does this PR do?
2+
3+
### What issues does this PR fix or reference?

.github/dependabot.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'npm'
4+
directory: '/'
5+
schedule:
6+
interval: 'weekly'
7+
day: 'saturday'
8+
versioning-strategy: 'increase'
9+
labels:
10+
- 'dependencies'
11+
open-pull-requests-limit: 5
12+
pull-request-branch-name:
13+
separator: '-'
14+
commit-message:
15+
# cause a release for non-dev-deps
16+
prefix: fix(deps)
17+
# no release for dev-deps
18+
prefix-development: chore(dev-deps)
19+
ignore:
20+
- dependency-name: '@salesforce/dev-scripts'
21+
- dependency-name: '*'
22+
update-types: ['version-update:semver-major']

.github/no-response.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Configuration for probot-no-response - https://github.com/probot/no-response
2+
3+
daysUntilClose: 7
4+
responseRequiredLabel: 'more information required'
5+
closeComment: >
6+
This issue has been automatically closed because there has been no response
7+
to our request for more information from the original author. Currently, there
8+
is not enough information provided for us to take action. Please reply and
9+
reopen this issue if you need additional assistance.

.github/workflows/automerge.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: automerge
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '42 2,5,8,11 * * *'
6+
7+
jobs:
8+
automerge:
9+
uses: salesforcecli/github-workflows/.github/workflows/automerge.yml@main
10+
secrets: inherit
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: create-github-release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- prerelease/**
8+
tags-ignore:
9+
- "*"
10+
workflow_dispatch:
11+
inputs:
12+
prerelease:
13+
type: string
14+
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."
15+
16+
jobs:
17+
release:
18+
uses: salesforcecli/github-workflows/.github/workflows/create-github-release.yml@main
19+
secrets: inherit
20+
with:
21+
prerelease: ${{ inputs.prerelease }}
22+
# If this is a push event, we want to skip the release if there are no semantic commits
23+
# However, if this is a manual release (workflow_dispatch), then we want to disable skip-on-empty
24+
# This helps recover from forgetting to add semantic commits ('fix:', 'feat:', etc.)
25+
skip-on-empty: ${{ github.event_name == 'push' }}
26+
# docs:
27+
# # Most repos won't use this
28+
# # Depends on the 'release' job to avoid git collisions, not for any functionality reason
29+
# needs: release
30+
# secrets: inherit
31+
# if: ${{ github.ref_name == 'main' }}
32+
# uses: salesforcecli/github-workflows/.github/workflows/publishTypedoc.yml@main

.github/workflows/devScripts.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: devScripts
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '50 6 * * 0'
6+
7+
jobs:
8+
update:
9+
uses: salesforcecli/github-workflows/.github/workflows/devScriptsUpdate.yml@main
10+
secrets: inherit
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: failureNotifications
2+
on:
3+
workflow_run:
4+
workflows:
5+
- publish
6+
- create-github-release
7+
types:
8+
- completed
9+
jobs:
10+
failure-notify:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
13+
steps:
14+
- name: Announce Failure
15+
id: slack
16+
uses: slackapi/[email protected]
17+
env:
18+
# for non-CLI-team-owned plugins, you can send this anywhere you like
19+
SLACK_WEBHOOK_URL: ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }}
20+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
21+
with:
22+
# Payload can be visually tested here: https://app.slack.com/block-kit-builder/T01GST6QY0G#%7B%22blocks%22:%5B%5D%7D
23+
# Only copy over the "blocks" array to the Block Kit Builder
24+
payload: |
25+
{
26+
"text": "Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }}",
27+
"blocks": [
28+
{
29+
"type": "header",
30+
"text": {
31+
"type": "plain_text",
32+
"text": ":bh-alert: Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }} :bh-alert:"
33+
}
34+
},
35+
{
36+
"type": "section",
37+
"text": {
38+
"type": "mrkdwn",
39+
"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 }}"
40+
}
41+
}
42+
]
43+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Pull Request Slack Notification
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Notify Slack on PR open
12+
env:
13+
WEBHOOK_URL: ${{ secrets.CLI_TEAM_SLACK_WEBHOOK_URL }}
14+
PULL_REQUEST_AUTHOR_ICON_URL: ${{ github.event.pull_request.user.avatar_url }}
15+
PULL_REQUEST_AUTHOR_NAME: ${{ github.event.pull_request.user.login }}
16+
PULL_REQUEST_AUTHOR_PROFILE_URL: ${{ github.event.pull_request.user.html_url }}
17+
PULL_REQUEST_BASE_BRANCH_NAME: ${{ github.event.pull_request.base.ref }}
18+
PULL_REQUEST_COMPARE_BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
19+
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
20+
PULL_REQUEST_REPO: ${{ github.event.pull_request.head.repo.name }}
21+
PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }}
22+
PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }}
23+
uses: salesforcecli/github-workflows/.github/actions/prNotification@main

.github/workflows/onRelease.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: publish
2+
on:
3+
release:
4+
# both release and prereleases
5+
types: [published]
6+
# support manual release in case something goes wrong and needs to be repeated or tested
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: github tag that needs to publish
11+
type: string
12+
required: true
13+
jobs:
14+
getDistTag:
15+
outputs:
16+
tag: ${{ steps.distTag.outputs.tag }}
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.event.release.tag_name || inputs.tag }}
22+
- uses: salesforcecli/github-workflows/.github/actions/getPreReleaseTag@main
23+
id: distTag
24+
npm:
25+
uses: salesforcecli/github-workflows/.github/workflows/npmPublish.yml@main
26+
needs: [getDistTag]
27+
with:
28+
ctc: true
29+
sign: true
30+
tag: ${{ needs.getDistTag.outputs.tag || 'latest' }}
31+
githubTag: ${{ github.event.release.tag_name || inputs.tag }}
32+
33+
secrets: inherit

.github/workflows/test.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: tests
2+
on:
3+
push:
4+
branches-ignore: [main]
5+
workflow_dispatch:
6+
7+
jobs:
8+
yarn-lockfile-check:
9+
uses: salesforcecli/github-workflows/.github/workflows/lockFileCheck.yml@main
10+
# 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
11+
linux-unit-tests:
12+
needs: yarn-lockfile-check
13+
uses: salesforcecli/github-workflows/.github/workflows/unitTestsLinux.yml@main
14+
windows-unit-tests:
15+
needs: linux-unit-tests
16+
uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main
17+
nuts:
18+
needs: linux-unit-tests
19+
uses: salesforcecli/github-workflows/.github/workflows/nut.yml@main
20+
secrets: inherit
21+
strategy:
22+
matrix:
23+
os: [ubuntu-latest, windows-latest]
24+
fail-fast: false
25+
with:
26+
os: ${{ matrix.os }}

.github/workflows/validate-pr.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: pr-validation
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, edited]
6+
# only applies to PRs that want to merge to main
7+
branches: [main]
8+
9+
jobs:
10+
pr-validation:
11+
uses: salesforcecli/github-workflows/.github/workflows/validatePR.yml@main

.gitignore

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# -- CLEAN
2+
tmp/
3+
# use yarn by default, so ignore npm
4+
package-lock.json
5+
6+
# never checkin npm config
7+
.npmrc
8+
9+
# debug logs
10+
npm-error.log
11+
yarn-error.log
12+
13+
# compile source
14+
lib
15+
16+
# test artifacts
17+
*xunit.xml
18+
*checkstyle.xml
19+
*unitcoverage
20+
.nyc_output
21+
coverage
22+
test_session*
23+
24+
# generated docs
25+
docs
26+
27+
# ignore sfdx-trust files
28+
*.tgz
29+
*.sig
30+
package.json.bak.
31+
32+
33+
npm-shrinkwrap.json
34+
35+
# -- CLEAN ALL
36+
*.tsbuildinfo
37+
.eslintcache
38+
.wireit
39+
node_modules
40+
41+
# --
42+
# put files here you don't want cleaned with sf-clean
43+
44+
# os specific files
45+
.DS_Store
46+
.idea

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn commitlint --edit

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn lint && yarn pretty-quick --staged

.husky/pre-push

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn build && yarn test

.lintstagedrc.cjs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
'**/*.{js,json,md}?(x)': () => 'npm run reformat'
3+
};

.mocharc.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"require": ["ts-node/register"],
3+
"watch-extensions": "ts",
4+
"recursive": true,
5+
"reporter": "spec",
6+
"timeout": 600000,
7+
"node-option": ["loader=ts-node/esm"]
8+
}

0 commit comments

Comments
 (0)