@salesforce/apex-node 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE.txt +27 -0
  2. package/README.md +4 -49
  3. package/package.json +36 -13
package/LICENSE.txt ADDED
@@ -0,0 +1,27 @@
1
+ Copyright (c) 2020, Salesforce.com, inc.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification,
5
+ are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice, this
8
+ list of conditions and the following disclaimer.
9
+
10
+ * Redistributions in binary form must reproduce the above copyright notice, this
11
+ list of conditions and the following disclaimer in the documentation and/or
12
+ other materials provided with the distribution.
13
+
14
+ * Neither the name of Salesforce.com nor the names of its contributors may be
15
+ used to endorse or promote products derived from this software without specific
16
+ prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
22
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md CHANGED
@@ -1,62 +1,17 @@
1
1
  # Salesforce Apex Library
2
2
 
3
- [![CircleCI](https://circleci.com/gh/forcedotcom/salesforcedx-apex.svg?style=svg&circle-token=5869ea795e44e1b737f2f2a86fd51cdc2ac08629)](https://circleci.com/gh/forcedotcom/salesforcedx-apex)
4
- ![npm (scoped)](https://img.shields.io/npm/v/@salesforce/plugin-apex)
5
3
  [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
6
4
  [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
7
5
 
8
6
  ## Introduction
9
7
  Typescript library to support the Apex plugin and [Salesforce Extensions for VS Code](https://github.com/forcedotcom/salesforcedx-vscode/).
10
8
 
11
- Note: This library is in beta and has been released early so we can collect feedback. It may contain bugs, undergo major changes, or be discontinued. Please report any issues via the [Issues tab](https://github.com/forcedotcom/salesforcedx-apex/issues).
9
+ Note: Please report any issues via the [Issues tab](https://github.com/forcedotcom/salesforcedx-apex/issues).
12
10
 
13
11
  <br/>
14
12
 
15
- ### Building the Library
16
-
17
- Clone the project and `cd` into it:
18
-
19
- ```
20
- $ git clone git@github.com:forcedotcom/salesforcedx-apex.git
21
- $ cd salesforcedx-apex
22
- ```
23
-
24
- Ensure that you have [Yarn](https://yarnpkg.com/) installed, then run:
25
-
26
- ```
27
- $ yarn install
28
- $ yarn build
29
- ```
30
-
31
-
32
- ### Using the Library
33
-
34
- Install the library locally by adding this information to your project's `package.json`:
35
-
36
- ```
37
- "@salesforce/apex-node": "file://path/to/salesforcedx-apex/packages/apex-node"
38
- ```
39
-
40
- Using the library directly requires access to a Salesforce [Connection](https://forcedotcom.github.io/sfdx-core/classes/authinfo.html). Create an instance of the specific Apex service to get access to the required methods. For example, to get a list of logs:
41
-
42
- ```
43
- $ const authInfo = await AuthInfo.create({ username: myAdminUsername });
44
- $ const connection = await Connection.create({ authInfo });
45
-
46
- $ const logService = new LogService(connection);
47
- $ const logList = await logService.getLogRecords();
48
- ```
49
-
50
- You can use the same pattern for the `Test Service` and `Execute Service` as well.
51
-
52
-
53
- ### Running the Test Suite
54
-
55
- Run the test suite locally by building the project first and then running the tests.
56
-
57
- ```
58
- $ yarn build
59
- $ yarn test
60
- ```
13
+ ## Getting Started
61
14
 
15
+ If you're interested in contributing, take a look at the [CONTRIBUTING](./CONTRIBUTING.md) guide.
62
16
 
17
+ If you're interested in building the plugin and library locally, take a look at the [Developing](./contributing/developing.md) doc.
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@salesforce/apex-node",
3
- "description": "Salesforce js library for Apex",
4
- "version": "1.3.0",
3
+ "description": "Salesforce JS library for Apex",
4
+ "version": "1.4.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/salesforcedx-apex/issues",
7
7
  "main": "lib/src/index.js",
8
8
  "dependencies": {
9
- "@salesforce/core": "^3.23.3",
9
+ "@commitlint/config-conventional": "^17.2.0",
10
+ "@salesforce/core": "^3.31.18",
10
11
  "@types/istanbul-reports": "^3.0.1",
12
+ "commitlint": "^17.2.0",
11
13
  "faye": "1.4.0",
12
14
  "glob": "^8.0.3",
13
15
  "istanbul-lib-coverage": "^3.2.0",
@@ -15,19 +17,30 @@
15
17
  "istanbul-reports": "^3.1.4"
16
18
  },
17
19
  "devDependencies": {
18
- "@salesforce/ts-sinon": "^1.1.2",
20
+ "@salesforce/ts-sinon": "^1.4.2",
19
21
  "@salesforce/ts-types": "1.2.2",
20
22
  "@types/chai": "^4",
23
+ "@types/glob": "^8.0.0",
21
24
  "@types/istanbul-lib-coverage": "^2.0.4",
22
25
  "@types/istanbul-lib-report": "^3.0.0",
23
- "@types/mkdirp": "0.5.2",
24
- "@types/mocha": "^5",
26
+ "@types/mocha": "^10",
25
27
  "@types/node": "^14",
26
28
  "@types/sinon": "^7.5.2",
29
+ "@typescript-eslint/eslint-plugin": "^5.42.1",
30
+ "@typescript-eslint/parser": "^5.42.1",
27
31
  "chai": "^4",
28
- "mocha": "^5",
32
+ "cz-conventional-changelog": "^3.3.0",
33
+ "eslint": "^7.1.0",
34
+ "eslint-config-prettier": "^6.11.0",
35
+ "eslint-plugin-header": "^3.0.0",
36
+ "eslint-plugin-jsdoc": "^19.1.0",
37
+ "eslint-plugin-prettier": "^3.1.4",
38
+ "husky": "^4.2.5",
39
+ "lint-staged": "^10.2.11",
40
+ "mocha": "^10",
29
41
  "mocha-junit-reporter": "^1.23.3",
30
42
  "nyc": "^14.1.1",
43
+ "prettier": "1.19.1",
31
44
  "shx": "^0.3.4",
32
45
  "sinon": "^7.3.1",
33
46
  "source-map-support": "^0.5.16",
@@ -47,14 +60,19 @@
47
60
  ],
48
61
  "scripts": {
49
62
  "build": "shx rm -rf lib && tsc -b",
50
- "format": "prettier --config ../../.prettierrc --write './{src,test,scripts}/**/*.{ts,js,json}'",
63
+ "commit-init": "commitizen init cz-conventional-changelog --save-dev --save-exact --force",
64
+ "commit": "git-cz",
65
+ "format": "prettier --config ./.prettierrc --write './{src,test,scripts}/**/*.{ts,js,json}'",
51
66
  "lint": "eslint -c .eslintrc.json --ext .ts ./src ./test",
52
- "test": "nyc mocha",
53
- "package": "npm pack"
67
+ "test": "nyc mocha ./test/**/*.test.ts",
68
+ "package": "yarn pack",
69
+ "prettier": "prettier ./**/*.{js,json,ts,md} --write",
70
+ "format:check": "prettier ./**/*.{js,json,ts,md} --debug-check"
54
71
  },
55
72
  "husky": {
56
73
  "hooks": {
57
- "pre-commit": "yarn lint-staged"
74
+ "pre-commit": "yarn lint-staged",
75
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
58
76
  }
59
77
  },
60
78
  "lint-staged": {
@@ -64,6 +82,11 @@
64
82
  },
65
83
  "license": "BSD-3-Clause",
66
84
  "engines": {
67
- "node": ">=14.14.0"
85
+ "node": ">=16.13.0"
86
+ },
87
+ "config": {
88
+ "commitizen": {
89
+ "path": "./node_modules/cz-conventional-changelog"
90
+ }
68
91
  }
69
- }
92
+ }