Skip to content

Commit

Permalink
feat(runtime-security): add new runtime-security project
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewRedican authored Jun 19, 2023
1 parent feff926 commit 28e74d8
Show file tree
Hide file tree
Showing 11 changed files with 152 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/runtime-security/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
11 changes: 11 additions & 0 deletions packages/runtime-security/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# runtime-security

This library was generated with [Nx](https://nx.dev).

## Building

Run `nx build runtime-security` to build the library.

## Running unit tests

Run `nx test runtime-security` to execute the unit tests via [Jest](https://jestjs.io).
9 changes: 9 additions & 0 deletions packages/runtime-security/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* eslint-disable */
export default {
displayName: 'runtime-security',
preset: '../../jest.preset.js',
transform: {
'^.+\\.[tj]s$': ['ts-jest', {tsconfig: '<rootDir>/tsconfig.spec.json'}]
},
moduleFileExtensions: ['ts', 'js', 'html']
}
5 changes: 5 additions & 0 deletions packages/runtime-security/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "runtime-security",
"version": "0.0.0",
"type": "commonjs"
}
52 changes: 52 additions & 0 deletions packages/runtime-security/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "runtime-security",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/runtime-security/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": [
"{options.outputPath}"
],
"options": {
"outputPath": "dist/packages/runtime-security",
"main": "packages/runtime-security/src/index.ts",
"tsConfig": "packages/runtime-security/tsconfig.lib.json",
"assets": [
"packages/runtime-security/*.md"
]
}
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": [
"{options.outputFile}"
],
"options": {
"lintFilePatterns": [
"packages/runtime-security/**/*.ts"
]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": [
"{workspaceRoot}/coverage/{projectRoot}"
],
"options": {
"jestConfig": "packages/runtime-security/jest.config.ts",
"codeCoverage": true,
"coverageDirectory": "coverage/packages/runtime-security",
"passWithNoTests": false
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
}
}
},
"tags": []
}
1 change: 1 addition & 0 deletions packages/runtime-security/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './lib/common'
7 changes: 7 additions & 0 deletions packages/runtime-security/src/lib/common.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {common} from './common'

describe('common', () => {
it('should work', () => {
expect(common()).toEqual('common')
})
})
3 changes: 3 additions & 0 deletions packages/runtime-security/src/lib/common.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function common(): string {
return 'common'
}
22 changes: 22 additions & 0 deletions packages/runtime-security/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "CommonJS",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}
10 changes: 10 additions & 0 deletions packages/runtime-security/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
"include": ["src/**/*.ts"],
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
}
14 changes: 14 additions & 0 deletions packages/runtime-security/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "CommonJS",
"types": ["jest", "node"]
},
"include": [
"jest.config.ts",
"src/**/*.test.ts",
"src/**/*.spec.ts",
"src/**/*.d.ts"
]
}

0 comments on commit 28e74d8

Please sign in to comment.