@smartsoft001/crud-shell-dtos 1.1.91 → 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 +13 -0
- package/README.md +36 -4
- package/jest.config.ts +27 -0
- package/package.json +2 -20
- package/project.json +44 -0
- package/src/index.ts +2 -0
- package/src/lib/interfaces.ts +28 -0
- package/src/lib/user.dto.ts +7 -0
- package/tsconfig.json +13 -0
- package/tsconfig.lib.json +11 -0
- package/tsconfig.spec.json +20 -0
- package/src/index.d.ts +0 -2
- package/src/index.js +0 -6
- package/src/index.js.map +0 -1
- package/src/lib/interfaces.d.ts +0 -21
- package/src/lib/interfaces.js +0 -3
- package/src/lib/interfaces.js.map +0 -1
- package/src/lib/user.dto.d.ts +0 -4
- package/src/lib/user.dto.js +0 -19
- package/src/lib/user.dto.js.map +0 -1
- package/test-setup.js +0 -1
- package/test-setup.js.map +0 -1
- /package/{test-setup.d.ts → test-setup.ts} +0 -0
package/.eslintrc
ADDED
package/README.md
CHANGED
|
@@ -1,7 +1,39 @@
|
|
|
1
|
-
# crud-shell-dtos
|
|
1
|
+
# 📦 @smartsoft001/crud-shell-dtos
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
 
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 🚀 Usage
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
`npm i @smartsoft001/crud-shell-dtos`
|
|
8
|
+
|
|
9
|
+
## 🛠️ DTOs
|
|
10
|
+
|
|
11
|
+
### UserDto
|
|
12
|
+
Fields:
|
|
13
|
+
<table>
|
|
14
|
+
<tr><td>username</td><td>string (required, focused)</td></tr>
|
|
15
|
+
<tr><td>password</td><td>string (required)</td></tr>
|
|
16
|
+
</table>
|
|
17
|
+
|
|
18
|
+
## 🧩 Interfaces
|
|
19
|
+
|
|
20
|
+
### IItemCreateData
|
|
21
|
+
<table>
|
|
22
|
+
<tr><td>id</td><td>string</td></tr>
|
|
23
|
+
<tr><td>type</td><td>'create'</td></tr>
|
|
24
|
+
<tr><td>data</td><td>any</td></tr>
|
|
25
|
+
</table>
|
|
26
|
+
|
|
27
|
+
### IItemUpdateData
|
|
28
|
+
<table>
|
|
29
|
+
<tr><td>id</td><td>string</td></tr>
|
|
30
|
+
<tr><td>type</td><td>'update'</td></tr>
|
|
31
|
+
<tr><td>data.removedFields</td><td>Array<string></td></tr>
|
|
32
|
+
<tr><td>data.updatedFields</td><td>{ [key: string]: any }</td></tr>
|
|
33
|
+
</table>
|
|
34
|
+
|
|
35
|
+
### IItemDeleteData
|
|
36
|
+
<table>
|
|
37
|
+
<tr><td>id</td><td>string</td></tr>
|
|
38
|
+
<tr><td>type</td><td>'delete'</td></tr>
|
|
39
|
+
</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/crud/shell/dtos',
|
|
14
|
+
displayName: 'crud-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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartsoft001/crud-shell-dtos",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.67.0",
|
|
4
4
|
"description": "This library was generated with [Nx](https://nx.dev).",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,23 +11,5 @@
|
|
|
11
11
|
"bugs": {
|
|
12
12
|
"url": "https://github.com/emiljuchnikowski/smartsoft/issues"
|
|
13
13
|
},
|
|
14
|
-
"homepage": "https://github.com/emiljuchnikowski/smartsoft#readme"
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"@angular/common": "16.1.3",
|
|
17
|
-
"@angular/core": "16.1.3",
|
|
18
|
-
"flatted": "^3.2.4",
|
|
19
|
-
"guid-typescript": "1.0.9",
|
|
20
|
-
"lodash": "^4.17.20",
|
|
21
|
-
"md5": "2.3.0",
|
|
22
|
-
"reflect-metadata": "0.1.13",
|
|
23
|
-
"rxjs": "7.8.1"
|
|
24
|
-
},
|
|
25
|
-
"peerDependencies": {
|
|
26
|
-
"@smartsoft001/models": "1.1.91",
|
|
27
|
-
"@smartsoft001/utils": "1.1.91",
|
|
28
|
-
"util": "0.12.5",
|
|
29
|
-
"tslib": "2.5.3"
|
|
30
|
-
},
|
|
31
|
-
"main": "./src/index.js",
|
|
32
|
-
"types": "./src/index.d.ts"
|
|
14
|
+
"homepage": "https://github.com/emiljuchnikowski/smartsoft#readme"
|
|
33
15
|
}
|
package/project.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "crud-shell-dtos",
|
|
3
|
+
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
+
"sourceRoot": "packages/crud/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/crud/shell/dtos/**/*.{ts,tsx,js,jsx}",
|
|
14
|
+
"packages/crud/shell/dtos/package.json"
|
|
15
|
+
],
|
|
16
|
+
"tsConfig": [
|
|
17
|
+
"packages/crud/shell/dtos/tsconfig.lib.json",
|
|
18
|
+
"packages/crud/shell/dtos/tsconfig.spec.json"
|
|
19
|
+
],
|
|
20
|
+
"exclude": ["**/node_modules/**", "!packages/crud/shell/dtos/**/*"]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"test": {
|
|
24
|
+
"executor": "@nx/jest:jest",
|
|
25
|
+
"options": {
|
|
26
|
+
"jestConfig": "packages/crud/shell/dtos/jest.config.ts",
|
|
27
|
+
"passWithNoTests": true
|
|
28
|
+
},
|
|
29
|
+
"outputs": ["{workspaceRoot}/coverage/packages/crud/shell/dtos"]
|
|
30
|
+
},
|
|
31
|
+
"build": {
|
|
32
|
+
"executor": "@nx/esbuild:esbuild",
|
|
33
|
+
"options": {
|
|
34
|
+
"outputPath": "dist/packages/crud/shell/dtos",
|
|
35
|
+
"tsConfig": "packages/crud/shell/dtos/tsconfig.lib.json",
|
|
36
|
+
"packageJson": "packages/crud/shell/dtos/package.json",
|
|
37
|
+
"main": "packages/crud/shell/dtos/src/index.ts",
|
|
38
|
+
"assets": ["packages/crud/shell/dtos/*.md"]
|
|
39
|
+
},
|
|
40
|
+
"outputs": ["{options.outputPath}"]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"tags": ["scope:crud", "type:shell"]
|
|
44
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface IItemCreateData {
|
|
2
|
+
id: string;
|
|
3
|
+
type: 'create';
|
|
4
|
+
data: any;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface IItemUpdateData {
|
|
8
|
+
id: string;
|
|
9
|
+
type: 'update';
|
|
10
|
+
data: {
|
|
11
|
+
removedFields: Array<string>;
|
|
12
|
+
updatedFields: {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IItemDeleteData {
|
|
19
|
+
id: string;
|
|
20
|
+
type: 'delete';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type ItemChangedData =
|
|
24
|
+
| IItemCreateData
|
|
25
|
+
| IItemUpdateData
|
|
26
|
+
| IItemDeleteData;
|
|
27
|
+
|
|
28
|
+
export type ItemChangedDataType = 'create' | 'update' | 'delete';
|
package/tsconfig.json
ADDED
|
@@ -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
|
+
}
|
package/src/index.d.ts
DELETED
package/src/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./lib/interfaces"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./lib/user.dto"), exports);
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/crud/shell/dtos/src/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,yDAAgC"}
|
package/src/lib/interfaces.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface IItemCreateData {
|
|
2
|
-
id: string;
|
|
3
|
-
type: 'create';
|
|
4
|
-
data: any;
|
|
5
|
-
}
|
|
6
|
-
export interface IItemUpdateData {
|
|
7
|
-
id: string;
|
|
8
|
-
type: 'update';
|
|
9
|
-
data: {
|
|
10
|
-
removedFields: Array<string>;
|
|
11
|
-
updatedFields: {
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export interface IItemDeleteData {
|
|
17
|
-
id: string;
|
|
18
|
-
type: 'delete';
|
|
19
|
-
}
|
|
20
|
-
export type ItemChangedData = IItemCreateData | IItemUpdateData | IItemDeleteData;
|
|
21
|
-
export type ItemChangedDataType = 'create' | 'update' | 'delete';
|
package/src/lib/interfaces.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../../../libs/crud/shell/dtos/src/lib/interfaces.ts"],"names":[],"mappings":""}
|
package/src/lib/user.dto.d.ts
DELETED
package/src/lib/user.dto.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserDto = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const models_1 = require("@smartsoft001/models");
|
|
6
|
-
let UserDto = exports.UserDto = class UserDto {
|
|
7
|
-
};
|
|
8
|
-
tslib_1.__decorate([
|
|
9
|
-
(0, models_1.Field)({ required: true, focused: true }),
|
|
10
|
-
tslib_1.__metadata("design:type", String)
|
|
11
|
-
], UserDto.prototype, "username", void 0);
|
|
12
|
-
tslib_1.__decorate([
|
|
13
|
-
(0, models_1.Field)({ required: true }),
|
|
14
|
-
tslib_1.__metadata("design:type", String)
|
|
15
|
-
], UserDto.prototype, "password", void 0);
|
|
16
|
-
exports.UserDto = UserDto = tslib_1.__decorate([
|
|
17
|
-
(0, models_1.Model)({})
|
|
18
|
-
], UserDto);
|
|
19
|
-
//# sourceMappingURL=user.dto.js.map
|
package/src/lib/user.dto.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.dto.js","sourceRoot":"","sources":["../../../../../../../libs/crud/shell/dtos/src/lib/user.dto.ts"],"names":[],"mappings":";;;;AAAA,iDAAkD;AAG3C,IAAM,OAAO,qBAAb,MAAM,OAAO;CAGnB,CAAA;AAF6C;IAAzC,IAAA,cAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;yCAAkB;AAChC;IAA1B,IAAA,cAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAAkB;kBAFnC,OAAO;IADnB,IAAA,cAAK,EAAC,EAAE,CAAC;GACG,OAAO,CAGnB"}
|
package/test-setup.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=test-setup.js.map
|
package/test-setup.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-setup.js","sourceRoot":"","sources":["../../../../../libs/crud/shell/dtos/test-setup.ts"],"names":[],"mappings":""}
|
|
File without changes
|