Skip to content

Commit a5964f1

Browse files
authored
Merge pull request #1 from hardisgroupcom/copilot/create-sfdx-hardis-plugin-demo
feat: scaffold sf-plugin-hardis-demo using `sf dev generate plugin` with full Plugin API integration
2 parents 685bbc8 + baadc5c commit a5964f1

39 files changed

Lines changed: 15068 additions & 1 deletion

.editorconfig

Lines changed: 11 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.cjs/

.eslintrc.cjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
extends: ['eslint-config-salesforce-typescript', 'plugin:sf-plugin/recommended'],
3+
root: true,
4+
rules: {
5+
header: 'off',
6+
},
7+
};

.github/dependabot.yml

Lines changed: 22 additions & 0 deletions
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']
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
permissions:
19+
contents: write
20+
uses: salesforcecli/github-workflows/.github/workflows/create-github-release.yml@main
21+
secrets:
22+
SVC_CLI_BOT_GITHUB_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
23+
with:
24+
prerelease: ${{ inputs.prerelease }}
25+
# If this is a push event, we want to skip the release if there are no semantic commits
26+
# However, if this is a manual release (workflow_dispatch), then we want to disable skip-on-empty
27+
# This helps recover from forgetting to add semantic commits ('fix:', 'feat:', etc.)
28+
skip-on-empty: ${{ github.event_name == 'push' }}
29+
# docs:
30+
# # Most repos won't use this
31+
# # Depends on the 'release' job to avoid git collisions, not for any functionality reason
32+
# needs: release
33+
# secrets:
34+
# SVC_CLI_BOT_GITHUB_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
35+
# if: ${{ github.ref_name == 'main' }}
36+
# uses: salesforcecli/github-workflows/.github/workflows/publishTypedoc.yml@main

.github/workflows/devScripts.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: devScripts
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '50 6 * * 0'
6+
7+
jobs:
8+
update:
9+
permissions: {}
10+
uses: salesforcecli/github-workflows/.github/workflows/devScriptsUpdate.yml@main
11+
secrets:
12+
SVC_CLI_BOT_GITHUB_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}

.github/workflows/onRelease.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
permissions:
16+
contents: read
17+
outputs:
18+
tag: ${{ steps.distTag.outputs.tag }}
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3
22+
with:
23+
ref: ${{ github.event.release.tag_name || inputs.tag }}
24+
- uses: salesforcecli/github-workflows/.github/actions/getPreReleaseTag@main
25+
id: distTag
26+
npm:
27+
permissions:
28+
contents: read
29+
id-token: write
30+
uses: salesforcecli/github-workflows/.github/workflows/npmPublish.yml@main
31+
needs: [getDistTag]
32+
with:
33+
tag: ${{ needs.getDistTag.outputs.tag || 'latest' }}
34+
githubTag: ${{ github.event.release.tag_name || inputs.tag }}
35+
36+
secrets: inherit

.github/workflows/test.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: tests
2+
on:
3+
push:
4+
branches-ignore: [main]
5+
workflow_dispatch:
6+
7+
jobs:
8+
unit-tests:
9+
permissions: {}
10+
uses: salesforcecli/github-workflows/.github/workflows/unitTest.yml@main
11+
nuts:
12+
permissions: {}
13+
needs: unit-tests
14+
uses: salesforcecli/github-workflows/.github/workflows/nut.yml@main
15+
secrets: inherit
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, windows-latest]
19+
fail-fast: false
20+
with:
21+
os: ${{ matrix.os }}

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
14+
# compile source
15+
lib
16+
17+
# test artifacts
18+
*xunit.xml
19+
*checkstyle.xml
20+
*unitcoverage
21+
.nyc_output
22+
coverage
23+
test_session*
24+
25+
# generated docs
26+
docs
27+
28+
# ignore sfdx-trust files
29+
*.tgz
30+
*.sig
31+
package.json.bak.
32+
33+
34+
npm-shrinkwrap.json
35+
oclif.manifest.json
36+
oclif.lock
37+
38+
# -- CLEAN ALL
39+
*.tsbuildinfo
40+
.eslintcache
41+
.wireit
42+
node_modules
43+
44+
# --
45+
# put files here you don't want cleaned with sf-clean
46+
47+
# os specific files
48+
.DS_Store
49+
.idea

.husky/commit-msg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
# commitlint disabled
5+

0 commit comments

Comments
 (0)