Skip to content

Commit ba7daa3

Browse files
committed
feat: set up repl
0 parents  commit ba7daa3

39 files changed

+8523
-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

+7
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

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

.github/workflows/devScripts.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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:
11+
SVC_CLI_BOT_GITHUB_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}

.github/workflows/onRelease.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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@v3
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+
tag: ${{ needs.getDistTag.outputs.tag || 'latest' }}
29+
githubTag: ${{ github.event.release.tag_name || inputs.tag }}
30+
31+
secrets: inherit

.github/workflows/test.yml

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

.gitignore

+49
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

+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+
}

.nycrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"check-coverage": true,
3+
"lines": 0,
4+
"statements": 0,
5+
"functions": 0,
6+
"branches": 0
7+
}

.prettierrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@salesforce/prettier-config"

.repl_history

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
console.log(await conn.query('select name from apexclass'))
2+
console.log(conn.getUsername())
3+
4+
console.log(await conn.query('select id,name from account'))
5+
console.log(await conn.query('select id,name from account'))

.sfdevrc.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"test": {
3+
"testsPath": "test/**/*.test.ts"
4+
},
5+
"wireit": {
6+
"test": {
7+
"dependencies": ["test:compile", "test:only", "lint"]
8+
}
9+
}
10+
}

.vscode/launch.json

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "attach",
10+
"name": "Attach",
11+
"port": 9229,
12+
"skipFiles": ["<node_internals>/**"]
13+
},
14+
{
15+
"name": "Run All Tests",
16+
"type": "node",
17+
"request": "launch",
18+
"program": "${workspaceFolder}/node_modules/mocha/bin/mocha",
19+
"args": ["--inspect", "--colors", "test/**/*.test.ts"],
20+
"env": {
21+
"NODE_ENV": "development",
22+
"SFDX_ENV": "development"
23+
},
24+
"sourceMaps": true,
25+
"smartStep": true,
26+
"internalConsoleOptions": "openOnSessionStart",
27+
"preLaunchTask": "Compile tests"
28+
},
29+
{
30+
"type": "node",
31+
"request": "launch",
32+
"name": "Run Current Test",
33+
"program": "${workspaceFolder}/node_modules/mocha/bin/mocha",
34+
"args": ["--inspect", "--colors", "${file}"],
35+
"env": {
36+
"NODE_ENV": "development",
37+
"SFDX_ENV": "development"
38+
},
39+
"sourceMaps": true,
40+
"smartStep": true,
41+
"internalConsoleOptions": "openOnSessionStart",
42+
"preLaunchTask": "Compile tests"
43+
}
44+
]
45+
}

.vscode/settings.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"files.exclude": {
3+
"**/.git": true,
4+
"**/.svn": true,
5+
"**/.hg": true,
6+
"**/CVS": true,
7+
"**/.DS_Store": true
8+
},
9+
"search.exclude": {
10+
"**/lib": true,
11+
"**/bin": true
12+
},
13+
"editor.tabSize": 2,
14+
"editor.formatOnSave": true,
15+
"rewrap.wrappingColumn": 80
16+
}

.vscode/tasks.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"version": "2.0.0",
3+
"problemMatcher": "$tsc",
4+
"tasks": [
5+
{
6+
"label": "Compile tests",
7+
"group": {
8+
"kind": "build",
9+
"isDefault": true
10+
},
11+
"command": "yarn",
12+
"type": "shell",
13+
"presentation": {
14+
"focus": false,
15+
"panel": "dedicated"
16+
},
17+
"args": ["run", "pretest"],
18+
"isBackground": false
19+
}
20+
]
21+
}

0 commit comments

Comments
 (0)