@smartsoft001/trans-shell-dtos-services 2.67.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.
package/.eslintrc.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "../../../../.eslintrc.json",
3
+ "rules": {
4
+
5
+ },
6
+ "ignorePatterns": ["!**/*"],
7
+ "overrides": [
8
+ {
9
+ "files": ["*.json"],
10
+ "parser": "jsonc-eslint-parser"
11
+ }
12
+ ]
13
+ }
package/README.md ADDED
@@ -0,0 +1,23 @@
1
+ # 📦 @smartsoft001/trans-shell-dtos
2
+
3
+ ![npm](https://img.shields.io/npm/v/@smartsoft001/trans-shell-dtos) ![downloads](https://img.shields.io/npm/dm/@smartsoft001/trans-shell-dtos)
4
+
5
+ ## 🚀 Usage
6
+
7
+ `npm i @smartsoft001/trans-shell-dtos`
8
+
9
+ ## 🛠️ DTOs
10
+
11
+ ### TransCreateDto
12
+
13
+ Fields:
14
+ <table>
15
+ <tr><td>amount</td><td>number (required, currency)</td></tr>
16
+ <tr><td>system</td><td>'payu' (required, text)</td></tr>
17
+ <tr><td>data</td><td>T (required)</td></tr>
18
+ <tr><td>name</td><td>string (required, text)</td></tr>
19
+ <tr><td>firstName</td><td>string (text)</td></tr>
20
+ <tr><td>lastName</td><td>string (text)</td></tr>
21
+ <tr><td>email</td><td>string (email)</td></tr>
22
+ <tr><td>contactPhone</td><td>string (text)</td></tr>
23
+ </table>
package/jest.config.ts ADDED
@@ -0,0 +1,27 @@
1
+ /* eslint-disable */
2
+ export default {
3
+ globals: {},
4
+ transform: {
5
+ '^.+\\.[tj]sx?$': [
6
+ 'ts-jest',
7
+ {
8
+ tsConfig: '<rootDir>/tsconfig.spec.json',
9
+ },
10
+ ],
11
+ },
12
+ moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
13
+ coverageDirectory: '../../../../coverage/packages/trans/shell/dtos',
14
+ displayName: 'trans-shell-dtos',
15
+ testEnvironment: 'node',
16
+ preset: '../../../../jest.preset.js',
17
+ /* TODO: Update to latest Jest snapshotFormat
18
+ * By default Nx has kept the older style of Jest Snapshot formats
19
+ * to prevent breaking of any existing tests with snapshots.
20
+ * It's recommend you update to the latest format.
21
+ * You can do this by removing snapshotFormat property
22
+ * and running tests with --update-snapshot flag.
23
+ * Example: From within the project directory, run "nx test --update-snapshot"
24
+ * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
25
+ */
26
+ snapshotFormat: { escapeString: true, printBasicPrototype: true },
27
+ };
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@smartsoft001/trans-shell-dtos-services",
3
+ "version": "2.67.0",
4
+ "description": "This library was generated with [Nx](https://nx.dev).",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/emiljuchnikowski/smartsoft.git"
8
+ },
9
+ "author": "Emil Juchnikowski",
10
+ "license": "ISC",
11
+ "bugs": {
12
+ "url": "https://github.com/emiljuchnikowski/smartsoft/issues"
13
+ },
14
+ "homepage": "https://github.com/emiljuchnikowski/smartsoft#readme"
15
+ }
package/project.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "trans-shell-dtos",
3
+ "$schema": "../../../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "packages/trans/shell/dtos/src",
5
+ "projectType": "library",
6
+ "generators": {},
7
+ "targets": {
8
+ "lint": {
9
+ "executor": "@nx/eslint:lint",
10
+ "outputs": ["{options.outputFile}"],
11
+ "options": {
12
+ "lintFilePatterns": [
13
+ "packages/trans/shell/dtos/**/*.{ts,tsx,js,jsx}",
14
+ "packages/trans/shell/dtos/package.json"
15
+ ]
16
+ }
17
+ },
18
+ "test": {
19
+ "executor": "@nx/jest:jest",
20
+ "options": {
21
+ "jestConfig": "packages/trans/shell/dtos/jest.config.ts",
22
+ "passWithNoTests": true
23
+ },
24
+ "outputs": ["{workspaceRoot}/coverage/packages/trans/shell/dtos"]
25
+ },
26
+ "build": {
27
+ "executor": "@nx/esbuild:esbuild",
28
+ "outputs": ["{options.outputPath}"],
29
+ "options": {
30
+ "outputPath": "dist/packages/trans/shell/dtos",
31
+ "tsConfig": "packages/trans/shell/dtos/tsconfig.lib.json",
32
+ "packageJson": "packages/trans/shell/dtos/package.json",
33
+ "main": "packages/trans/shell/dtos/src/index.ts",
34
+ "assets": ["packages/trans/shell/dtos/*.md"]
35
+ }
36
+ }
37
+ },
38
+ "tags": ["scope:trans", "type:shell"]
39
+ }
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './lib/trans-create.dto';
@@ -0,0 +1,13 @@
1
+ import { Field, FieldType, Model } from '@smartsoft001/models';
2
+
3
+ @Model({})
4
+ export class TransCreateDto<T> {
5
+ @Field({ required: true, type: FieldType.currency }) amount: number;
6
+ @Field({ required: true, type: FieldType.text }) system: 'payu';
7
+ @Field({ required: true }) data: T;
8
+ @Field({ required: true, type: FieldType.text }) name: string;
9
+ @Field({ type: FieldType.text }) firstName: string;
10
+ @Field({ type: FieldType.text }) lastName: string;
11
+ @Field({ type: FieldType.email }) email: string;
12
+ @Field({ type: FieldType.text }) contactPhone: string;
13
+ }
package/test-setup.ts ADDED
File without changes
package/tsconfig.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "../../../../tsconfig.base.json",
3
+ "files": [],
4
+ "include": [],
5
+ "references": [
6
+ {
7
+ "path": "./tsconfig.lib.json"
8
+ },
9
+ {
10
+ "path": "./tsconfig.spec.json"
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "module": "commonjs",
5
+ "outDir": "../../../../dist/out-tsc",
6
+ "declaration": true,
7
+ "types": ["node"]
8
+ },
9
+ "exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"],
10
+ "include": ["**/*.ts"]
11
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../../../../dist/out-tsc",
5
+ "module": "commonjs",
6
+ "types": ["jest", "node"]
7
+ },
8
+ "include": [
9
+ "**/*.spec.ts",
10
+ "**/*.test.ts",
11
+ "**/*.spec.tsx",
12
+ "**/*.test.tsx",
13
+ "**/*.spec.js",
14
+ "**/*.test.js",
15
+ "**/*.spec.jsx",
16
+ "**/*.test.jsx",
17
+ "**/*.d.ts",
18
+ "jest.config.ts"
19
+ ]
20
+ }