Skip to content

Commit

Permalink
chore: Initial commit for case-connector
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyJones committed Oct 11, 2023
1 parent 1b635a0 commit c1b1e18
Show file tree
Hide file tree
Showing 25 changed files with 1,034 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"packages/test-equivalence-matchers": "0.13.0",
"packages/documentation": "0.0.6",
".": "0.13.0",
"packages/contract-case-cli": "0.1.4"
"packages/contract-case-cli": "0.1.4",
"packages/case-connector": "0.6.3"
}
82 changes: 82 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

161 changes: 161 additions & 0 deletions packages/case-connector/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
"airbnb-base",
"airbnb-typescript/base",
"prettier"
],
"plugins": ["import", "@typescript-eslint", "eslint-plugin-tsdoc"],
"settings": {
"import/resolver": {
"typescript": {
"project": "tsconfig.json"
}
}
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"project": "tsconfig.json"
},
"ignorePatterns": ["jest.config.ts"],
"rules": {
"max-classes-per-file": "off",
"tsdoc/syntax": "error",
"camelcase": "off",
"no-console": "error",
"no-underscore-dangle": "off",
"import/prefer-default-export": "off",
"import/no-useless-path-segments": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/explicit-module-boundary-types": "error"
},

"overrides": [
{
"files": ["example/**/*.ts"],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"project": "example/tsconfig.json"
},
"rules": {
"no-restricted-imports": [
"error",
{ "patterns": ["src/connectors/*"] }
],

"import/no-extraneous-dependencies": [
"error",
{ "devDependencies": true }
],
"no-console": "off"
}
},
{
"files": ["src/__tests__/**/*.ts"],
"rules": {
"no-restricted-imports": "off"
}
},

{
"files": ["src/connectors/**/*.ts"],
"rules": {
"no-restricted-imports": [
"error",
{ "patterns": ["**/boundaries", "**/boundaries/*"] }
]
}
},
{
"files": ["src/core/**/*.ts"],
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": [
"**/connectors",
"**/connectors/*",
"**/boundaries",
"**/boundaries/*"
]
}
]
}
},
{
"files": ["src/diffmatch/**/*.ts"],
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": [
"**/core",
"**/core/*",
"**/connectors",
"**/connectors/*",
"**/boundaries",
"**/boundaries/*"
]
}
]
}
},
{
"files": ["src/entities/**/*.ts"],
"rules": {
"no-restricted-imports": [
"error",
{
"patterns": [
"**/diffmatch",
"**/diffmatch/*",
"**/core",
"**/core/*",
"**/connectors",
"**/connectors/*",
"**/boundaries",
"**/boundaries/*"
]
}
]
}
},
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
},
{
"extends": "plugin:jest/recommended",
"files": ["**/*.test.ts", "**/*.spec.ts"],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"project": "tsconfig.spec.json"
},
"env": {
"jest": true
},
"plugins": ["jest"],
"rules": {
"no-unused-expressions": "off",
"no-restricted-imports": "off",
"@typescript-eslint/no-explicit-any": "off",
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/expect-expect": [
"error",
{ "assertFunctionNames": ["expect", "expectErrorContaining"] }
]
}
}
]
}
2 changes: 2 additions & 0 deletions packages/case-connector/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
dist
20 changes: 20 additions & 0 deletions packages/case-connector/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

# Exclude typescript source and config
*.ts
tsconfig.json

# Include javascript files and typescript declarations
!*.js
!*.d.ts

# Exclude jsii outdir
dist

# Exclude IDE settings
.vscode

# Include .jsii and .jsii.gz
!.jsii
!.jsii.gz

coverage
3 changes: 3 additions & 0 deletions packages/case-connector/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
Empty file.
29 changes: 29 additions & 0 deletions packages/case-connector/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2023, Timothy Jones
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

- Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 changes: 10 additions & 0 deletions packages/case-connector/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Case-Connector

[![Build and test](https://github.com/case-contract-testing/case/actions/workflows/build-and-test.yml/badge.svg?branch=main)](https://github.com/case-contract-testing/case/actions/workflows/build-and-test.yml)
[![Known Vulnerabilities](https://snyk.io/test/github/case-contract-testing/case/badge.svg?targetFile=packages/case-boundary/package.json)](https://snyk.io/test/github/case-contract-testing/case?targetFile=packages/case-boundary/package.json)

This is the server connector (alternative to the case-boundary) to allow ContractCase to be run as a server.

Don't depend on this directly unless you are writing a custom wrapper for ContractCase.

[Start here instead](https://case.contract-testing.io/docs/intro)
1 change: 1 addition & 0 deletions packages/case-connector/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './src';
Loading

0 comments on commit c1b1e18

Please sign in to comment.