cetus-tools 1.0.4 → 1.0.6
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/dist/api/bitso/tools/BitsoOrder.d.ts +3 -3
- package/dist/crud/RoleManager.d.ts +26 -0
- package/dist/crud/RoleManager.js +27 -0
- package/dist/crud/RoleManager.js.map +1 -0
- package/dist/crud/test/LoginServiceMock.d.ts +2 -0
- package/dist/crud/test/LoginServiceMock.js +53 -0
- package/dist/crud/test/LoginServiceMock.js.map +1 -0
- package/dist/crud/test/RoleMocks.d.ts +2 -0
- package/dist/crud/test/RoleMocks.js +59 -0
- package/dist/crud/test/RoleMocks.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +52 -52
|
@@ -18,7 +18,7 @@ export interface IBitsoOrderDetails {
|
|
|
18
18
|
original_value: number;
|
|
19
19
|
price?: number;
|
|
20
20
|
side: 'buy' | 'sell';
|
|
21
|
-
status: 'queued' | 'open' | 'partially' | 'filled' | 'cancelled' | 'completed';
|
|
21
|
+
status: 'queued' | 'open' | 'partially' | 'filled' | 'cancelled' | 'completed' | 'partially filled';
|
|
22
22
|
stop?: number;
|
|
23
23
|
time_in_force: 'goodtillcancelled' | 'fillorkill' | 'immediateorcancel' | 'postonly';
|
|
24
24
|
triggered_at?: string;
|
|
@@ -29,14 +29,14 @@ export interface IBitsoOrderDetails {
|
|
|
29
29
|
export declare function parseBitsoOrderDetailsArray(response: {
|
|
30
30
|
[key: string]: string;
|
|
31
31
|
side: 'buy' | 'sell';
|
|
32
|
-
status: 'queued' | 'open' | 'partially' | 'filled' | 'cancelled' | 'completed';
|
|
32
|
+
status: 'queued' | 'open' | 'partially' | 'filled' | 'cancelled' | 'completed' | 'partially filled';
|
|
33
33
|
time_in_force: 'goodtillcancelled' | 'fillorkill' | 'immediateorcancel' | 'postonly';
|
|
34
34
|
type: 'market' | 'limit';
|
|
35
35
|
}[]): IBitsoOrderDetails[];
|
|
36
36
|
export declare function parseBitsoOrderDetails(response: {
|
|
37
37
|
[key: string]: string;
|
|
38
38
|
side: 'buy' | 'sell';
|
|
39
|
-
status: 'queued' | 'open' | 'partially' | 'filled' | 'cancelled' | 'completed';
|
|
39
|
+
status: 'queued' | 'open' | 'partially' | 'filled' | 'cancelled' | 'completed' | 'partially filled';
|
|
40
40
|
time_in_force: 'goodtillcancelled' | 'fillorkill' | 'immediateorcancel' | 'postonly';
|
|
41
41
|
type: 'market' | 'limit';
|
|
42
42
|
}): IBitsoOrderDetails;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from "axios";
|
|
2
|
+
import { CrudServiceManager, StandardIdRequestDefinition } from "itrm-tools";
|
|
3
|
+
export interface IRole {
|
|
4
|
+
roleId?: number;
|
|
5
|
+
name: string;
|
|
6
|
+
permissions: any;
|
|
7
|
+
updatedAt?: string;
|
|
8
|
+
createdAt?: string;
|
|
9
|
+
config?: AxiosRequestConfig;
|
|
10
|
+
}
|
|
11
|
+
interface IRoleDetails {
|
|
12
|
+
roleId?: number;
|
|
13
|
+
name: string;
|
|
14
|
+
permissions: any;
|
|
15
|
+
config?: AxiosRequestConfig;
|
|
16
|
+
}
|
|
17
|
+
export declare class RoleManager extends CrudServiceManager<IRoleDetails, IRole> {
|
|
18
|
+
private url;
|
|
19
|
+
constructor(url: string);
|
|
20
|
+
findById(id: StandardIdRequestDefinition): Promise<IRole | undefined>;
|
|
21
|
+
find(details: IRoleDetails): Promise<IRole | undefined>;
|
|
22
|
+
create(details: IRoleDetails): Promise<IRole | undefined>;
|
|
23
|
+
modify(role: IRole): Promise<any>;
|
|
24
|
+
destroy(role: IRole): Promise<any>;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RoleManager = void 0;
|
|
4
|
+
const itrm_tools_1 = require("itrm-tools");
|
|
5
|
+
class RoleManager extends itrm_tools_1.CrudServiceManager {
|
|
6
|
+
constructor(url) {
|
|
7
|
+
super();
|
|
8
|
+
this.url = url;
|
|
9
|
+
}
|
|
10
|
+
findById(id) {
|
|
11
|
+
return this.sendFinding(`${this.url}/roles?id=${id.id}`, id.config);
|
|
12
|
+
}
|
|
13
|
+
find(details) {
|
|
14
|
+
return this.sendFinding(`${this.url}/roles?role=${details.name}`, details.config);
|
|
15
|
+
}
|
|
16
|
+
create(details) {
|
|
17
|
+
return this.sendCreation(`${this.url}/roles`, { name: details.name, permissions: details.permissions }, details.config);
|
|
18
|
+
}
|
|
19
|
+
modify(role) {
|
|
20
|
+
return this.sendModification(`${this.url}/roles/${role.roleId}`, { name: role.name, permissions: role.permissions }, role.config);
|
|
21
|
+
}
|
|
22
|
+
destroy(role) {
|
|
23
|
+
return this.sendDestuction(`${this.url}/roles/${role.roleId}`, role.config);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.RoleManager = RoleManager;
|
|
27
|
+
//# sourceMappingURL=RoleManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoleManager.js","sourceRoot":"","sources":["../../src/crud/RoleManager.ts"],"names":[],"mappings":";;;AACA,2CAA6E;AAkB7E,MAAa,WAAY,SAAQ,+BAAuC;IAGtE,YAAY,GAAW;QACrB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAEM,QAAQ,CAAC,EAA+B;QAC7C,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,GAAG,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;IACtE,CAAC;IAEM,IAAI,CAAC,OAAqB;QAC/B,OAAO,IAAI,CAAC,WAAW,CACrB,GAAG,IAAI,CAAC,GAAG,eAAe,OAAO,CAAC,IAAI,EAAE,EACxC,OAAO,CAAC,MAAM,CACf,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,OAAqB;QACjC,OAAO,IAAI,CAAC,YAAY,CACtB,GAAG,IAAI,CAAC,GAAG,QAAQ,EACnB,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,EACxD,OAAO,CAAC,MAAM,CACf,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,IAAW;QACvB,OAAO,IAAI,CAAC,gBAAgB,CAC1B,GAAG,IAAI,CAAC,GAAG,UAAU,IAAI,CAAC,MAAM,EAAE,EAClC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAClD,IAAI,CAAC,MAAM,CACZ,CAAC;IACJ,CAAC;IAEM,OAAO,CAAC,IAAW;QACxB,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,GAAG,UAAU,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9E,CAAC;CACF;AAtCD,kCAsCC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyLoginMocks = void 0;
|
|
4
|
+
var users = {};
|
|
5
|
+
var credentials = {};
|
|
6
|
+
function applyLoginMocks(mock) {
|
|
7
|
+
mock.onPost(/\/register/).reply((config) => {
|
|
8
|
+
let data = JSON.parse(config.data);
|
|
9
|
+
let user = {
|
|
10
|
+
userId: Object.keys(users).length + 1,
|
|
11
|
+
roleId: 1,
|
|
12
|
+
metadata: {},
|
|
13
|
+
};
|
|
14
|
+
let key = "" + user.userId;
|
|
15
|
+
users[key] = user;
|
|
16
|
+
credentials[key] = Object.assign({ userId: user.userId, identityId: 1 }, data);
|
|
17
|
+
return [
|
|
18
|
+
200,
|
|
19
|
+
{ status: "Ok", message: "User registered", item: [credentials[key]] },
|
|
20
|
+
];
|
|
21
|
+
});
|
|
22
|
+
mock.onPost(/\/login/).reply((config) => {
|
|
23
|
+
return [
|
|
24
|
+
200,
|
|
25
|
+
{
|
|
26
|
+
jwt: "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEzLCJyb2xlSWQiOjEsImlhdCI6MTY4MDAzNTA1MiwiZXhwIjoxNjgwMDQxMDUyfQ.awEFjDF0QugehpDM48l5Uy8cvyVNB4BRRgZqSH3MaNIEApEh-FBF94Gtqp9hSe-tJ_jY26ShmONot0sxjZ1Tjg",
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
});
|
|
30
|
+
mock.onPost(/\/logout/).reply((config) => {
|
|
31
|
+
return [200, { message: "Session was closed" }];
|
|
32
|
+
});
|
|
33
|
+
mock.onPost(/\/verify/).reply((config) => {
|
|
34
|
+
let data = JSON.parse(config.data);
|
|
35
|
+
if (data.jwt ===
|
|
36
|
+
"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEzLCJyb2xlSWQiOjEsImlhdCI6MTY4MDAzNTA1MiwiZXhwIjoxNjgwMDQxMDUyfQ.awEFjDF0QugehpDM48l5Uy8cvyVNB4BRRgZqSH3MaNIEApEh-FBF94Gtqp9hSe-tJ_jY26ShmONot0sxjZ1Tjg")
|
|
37
|
+
return [200, { userId: 1, roleId: 1 }];
|
|
38
|
+
return [
|
|
39
|
+
401,
|
|
40
|
+
{ errorType: "JWTRecivedIsNotActive", message: "Expired token" },
|
|
41
|
+
];
|
|
42
|
+
});
|
|
43
|
+
mock.onGet(/\/userCredentials\?email=[a-zA-Z0-9@.]+/).reply((config) => {
|
|
44
|
+
let searchedEmail = config.url.split("email=")[1];
|
|
45
|
+
for (let key of Object.keys(credentials))
|
|
46
|
+
if (credentials[key].email === searchedEmail)
|
|
47
|
+
return [200, { result: [credentials[key]] }];
|
|
48
|
+
return [200, { result: [] }];
|
|
49
|
+
});
|
|
50
|
+
//http://localhost:8102/v1/userCredentials?email=user1@mail.test
|
|
51
|
+
}
|
|
52
|
+
exports.applyLoginMocks = applyLoginMocks;
|
|
53
|
+
//# sourceMappingURL=LoginServiceMock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoginServiceMock.js","sourceRoot":"","sources":["../../../src/crud/test/LoginServiceMock.ts"],"names":[],"mappings":";;;AAEA,IAAI,KAAK,GAAQ,EAAE,CAAC;AACpB,IAAI,WAAW,GAAQ,EAAE,CAAC;AAE1B,SAAgB,eAAe,CAAC,IAAiB;IAC/C,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC,MAAW,EAAE,EAAE;QAC9C,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,IAAI,GAAG;YACT,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;YACrC,MAAM,EAAE,CAAC;YACT,QAAQ,EAAE,EAAE;SACb,CAAC;QACF,IAAI,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;QAClB,WAAW,CAAC,GAAG,CAAC,mBAAK,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,IAAK,IAAI,CAAE,CAAC;QACnE,OAAO;YACL,GAAG;YACH,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE;SACvE,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,MAAW,EAAE,EAAE;QAC3C,OAAO;YACL,GAAG;YACH;gBACE,GAAG,E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,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyRoleMocks = void 0;
|
|
4
|
+
var roles = {};
|
|
5
|
+
function applyRoleMocks(mock) {
|
|
6
|
+
mock.onGet(/\/roles\?id=[a-zA-Z0-9]+/).reply((config) => {
|
|
7
|
+
let searchedId = config.url ? config.url.split("id=")[1] : "";
|
|
8
|
+
if (roles[searchedId])
|
|
9
|
+
return [200, { result: [roles[searchedId]] }];
|
|
10
|
+
return [200, { result: [] }];
|
|
11
|
+
});
|
|
12
|
+
mock.onGet(/\/roles\?role=[a-zA-Z0-9]+/).reply((config) => {
|
|
13
|
+
let searchedRole = config.url ? config.url.split("role=")[1] : "";
|
|
14
|
+
for (let key of Object.keys(roles))
|
|
15
|
+
if (roles[key].name === searchedRole)
|
|
16
|
+
return [200, { result: [roles[key]] }];
|
|
17
|
+
return [200, { result: [] }];
|
|
18
|
+
});
|
|
19
|
+
mock.onPost(/\/roles/).reply((config) => {
|
|
20
|
+
let data = JSON.parse(config.data);
|
|
21
|
+
for (let key of Object.keys(roles))
|
|
22
|
+
if (roles[key].role === data.name)
|
|
23
|
+
return [
|
|
24
|
+
400,
|
|
25
|
+
{
|
|
26
|
+
status: "Error",
|
|
27
|
+
type: "SequelizeUniqueConstraintError",
|
|
28
|
+
error: "Validation error",
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
let item = {
|
|
32
|
+
roleId: Object.keys(roles).length + 1,
|
|
33
|
+
name: data.name,
|
|
34
|
+
permissions: data.permissions,
|
|
35
|
+
};
|
|
36
|
+
roles["" + item.roleId] = item;
|
|
37
|
+
return [200, { items: [roles["" + item.roleId]] }];
|
|
38
|
+
});
|
|
39
|
+
mock.onPut(/\/roles\/[0-9]+/).reply((config) => {
|
|
40
|
+
let roleId = config.url ? config.url.split("roles/")[1] : "";
|
|
41
|
+
if (roles[roleId]) {
|
|
42
|
+
let data = JSON.parse(config.data);
|
|
43
|
+
roles[roleId] = Object.assign(Object.assign({}, roles[roleId]), data);
|
|
44
|
+
return [200, { status: "Ok", message: "1 items were updated" }];
|
|
45
|
+
}
|
|
46
|
+
return [200, { status: "Ok", message: "0 items were updated" }];
|
|
47
|
+
});
|
|
48
|
+
mock.onDelete(/\/roles\/[0-9]+/).reply((config) => {
|
|
49
|
+
let searchedRoleId = config.url
|
|
50
|
+
? config.url.split("roles/")[1]
|
|
51
|
+
: "";
|
|
52
|
+
for (let key of Object.keys(roles))
|
|
53
|
+
if (roles[key].roleId == parseInt(searchedRoleId))
|
|
54
|
+
delete roles[key];
|
|
55
|
+
return [200, { status: "Ok", message: "1 items were deleted" }];
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
exports.applyRoleMocks = applyRoleMocks;
|
|
59
|
+
//# sourceMappingURL=RoleMocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoleMocks.js","sourceRoot":"","sources":["../../../src/crud/test/RoleMocks.ts"],"names":[],"mappings":";;;AAEA,IAAI,KAAK,GAAQ,EAAE,CAAC;AAEpB,SAAgB,cAAc,CAAC,IAAiB;IAC9C,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC,KAAK,CAAC,CAAC,MAAW,EAAE,EAAE;QAC3D,IAAI,UAAU,GAAW,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACtE,IAAI,KAAK,CAAC,UAAU,CAAC;YAAE,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;QACrE,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,KAAK,CAAC,4BAA4B,CA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,KAAK,CAAC,GAAG,CAAC,CAAC;QACvE,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;AACL,CAAC;AAlDD,wCAkDC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,8 @@ export { IBitsoBalance as IBitsoBalance, findBalances as findBalances } from './
|
|
|
4
4
|
export { IBitsoBook as IBitsoBook, findBitsoBook as findBitsoBook } from './api/bitso/tools/BitsoBook';
|
|
5
5
|
export { IBitsoOrder as IBitsoOrder, IBitsoOrderDetails as IBitsoOrderDetails } from './api/bitso/tools/BitsoOrder';
|
|
6
6
|
export { IBitsoOrderBook as IBitsoOrderBook, IBitsoBookOrder as IBitsoBookOrder } from './api/bitso/tools/BitsoOrderBook';
|
|
7
|
+
export { RoleManager as RoleManager } from "./crud/RoleManager";
|
|
7
8
|
export { KeyTypeManager as KeyTypeManager, IKeyType as IKeyType, IKeyTypeDetails as IKeyTypeDetails } from './crud/KeyTypeManager';
|
|
8
9
|
export { applyKeyTypeMocks as applyKeyTypeMocks } from './crud/test/KeyTypeMocks';
|
|
10
|
+
export { applyRoleMocks as applyRoleMocks } from "./crud/test/RoleMocks";
|
|
11
|
+
export { applyLoginMocks as applyLoginMocks } from "./crud/test/LoginServiceMock";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.applyKeyTypeMocks = exports.KeyTypeManager = exports.findBitsoBook = exports.findBalances = exports.BitsoApiConnection = exports.ExpressLogableConfig = void 0;
|
|
3
|
+
exports.applyLoginMocks = exports.applyRoleMocks = exports.applyKeyTypeMocks = exports.KeyTypeManager = exports.RoleManager = exports.findBitsoBook = exports.findBalances = exports.BitsoApiConnection = exports.ExpressLogableConfig = void 0;
|
|
4
4
|
var ExpressLogableConfig_1 = require("./api/ExpressLogableConfig");
|
|
5
5
|
Object.defineProperty(exports, "ExpressLogableConfig", { enumerable: true, get: function () { return ExpressLogableConfig_1.ExpressLogableConfig; } });
|
|
6
6
|
var BitsoApiConnection_1 = require("./api/bitso/BitsoApiConnection");
|
|
@@ -9,8 +9,14 @@ var BitsoBalance_1 = require("./api/bitso/tools/BitsoBalance");
|
|
|
9
9
|
Object.defineProperty(exports, "findBalances", { enumerable: true, get: function () { return BitsoBalance_1.findBalances; } });
|
|
10
10
|
var BitsoBook_1 = require("./api/bitso/tools/BitsoBook");
|
|
11
11
|
Object.defineProperty(exports, "findBitsoBook", { enumerable: true, get: function () { return BitsoBook_1.findBitsoBook; } });
|
|
12
|
+
var RoleManager_1 = require("./crud/RoleManager");
|
|
13
|
+
Object.defineProperty(exports, "RoleManager", { enumerable: true, get: function () { return RoleManager_1.RoleManager; } });
|
|
12
14
|
var KeyTypeManager_1 = require("./crud/KeyTypeManager");
|
|
13
15
|
Object.defineProperty(exports, "KeyTypeManager", { enumerable: true, get: function () { return KeyTypeManager_1.KeyTypeManager; } });
|
|
14
16
|
var KeyTypeMocks_1 = require("./crud/test/KeyTypeMocks");
|
|
15
17
|
Object.defineProperty(exports, "applyKeyTypeMocks", { enumerable: true, get: function () { return KeyTypeMocks_1.applyKeyTypeMocks; } });
|
|
18
|
+
var RoleMocks_1 = require("./crud/test/RoleMocks");
|
|
19
|
+
Object.defineProperty(exports, "applyRoleMocks", { enumerable: true, get: function () { return RoleMocks_1.applyRoleMocks; } });
|
|
20
|
+
var LoginServiceMock_1 = require("./crud/test/LoginServiceMock");
|
|
21
|
+
Object.defineProperty(exports, "applyLoginMocks", { enumerable: true, get: function () { return LoginServiceMock_1.applyLoginMocks; } });
|
|
16
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mEAA0F;AAAjF,4HAAA,oBAAoB,OAAwB;AACrD,qEAA4H;AAAjF,wHAAA,kBAAkB,OAAsB;AACnF,+DAA8G;AAArE,4GAAA,YAAY,OAAgB;AACrE,yDAAuG;AAApE,0GAAA,aAAa,OAAiB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mEAA0F;AAAjF,4HAAA,oBAAoB,OAAwB;AACrD,qEAA4H;AAAjF,wHAAA,kBAAkB,OAAsB;AACnF,+DAA8G;AAArE,4GAAA,YAAY,OAAgB;AACrE,yDAAuG;AAApE,0GAAA,aAAa,OAAiB;AAGjE,kDAAgE;AAAvD,0GAAA,WAAW,OAAe;AACnC,wDAAmI;AAA1H,gHAAA,cAAc,OAAkB;AAEzC,yDAAkF;AAAzE,iHAAA,iBAAiB,OAAqB;AAC/C,mDAAyE;AAAhE,2GAAA,cAAc,OAAkB;AACzC,iEAAkF;AAAzE,mHAAA,eAAe,OAAmB"}
|
package/package.json
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "cetus-tools",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Librería para elementos comunes de CETUS",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"/dist"
|
|
9
|
-
],
|
|
10
|
-
"scripts": {
|
|
11
|
-
"build": "rimraf ./dist && tsc --skipLibCheck",
|
|
12
|
-
"publish-lib": "npm run build && npm publish",
|
|
13
|
-
"publish-beta": "npm run build && npm publish --tag beta",
|
|
14
|
-
"publish-dryrun": "npm run build && npm publish --dry-run",
|
|
15
|
-
"link": "npm run build && npm link",
|
|
16
|
-
"test": "npm run build && jest --runInBand --detectOpenHandles",
|
|
17
|
-
"test-watch": "npm run build && jest --watch --runInBand --detectOpenHandles",
|
|
18
|
-
"test-silent": "npm run build && jest --runInBand --detectOpenHandles --silent",
|
|
19
|
-
"test-coverage": "npm run build && jest --runInBand --detectOpenHandles --silent --coverage"
|
|
20
|
-
},
|
|
21
|
-
"repository": {
|
|
22
|
-
"type": "git",
|
|
23
|
-
"url": "git+https://github.com/ITRMachines/cetus-tools.git"
|
|
24
|
-
},
|
|
25
|
-
"keywords": [],
|
|
26
|
-
"bugs": {
|
|
27
|
-
"url": "https://github.com/ITRMachines/cetus-tools/issues"
|
|
28
|
-
},
|
|
29
|
-
"homepage": "https://github.com/ITRMachines/cetus-tools#readme",
|
|
30
|
-
"author": "",
|
|
31
|
-
"license": "ISC",
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@types/crypto-js": "^4.2.1",
|
|
34
|
-
"@types/jest": "^29.5.6",
|
|
35
|
-
"@types/morgan": "^1.9.7",
|
|
36
|
-
"@types/node": "^20.8.7",
|
|
37
|
-
"jest": "^29.7.0",
|
|
38
|
-
"rimraf": "^5.0.5",
|
|
39
|
-
"ts-jest": "^29.1.1",
|
|
40
|
-
"typescript": "^5.2.2"
|
|
41
|
-
},
|
|
42
|
-
"dependencies": {
|
|
43
|
-
"axios": "^1.5.1",
|
|
44
|
-
"crypto-js": "^4.2.0",
|
|
45
|
-
"dotenv": "^16.3.1",
|
|
46
|
-
"itrm-tools": "^1.0.49",
|
|
47
|
-
"morgan": "^1.10.0"
|
|
48
|
-
},
|
|
49
|
-
"optionalDependencies": {
|
|
50
|
-
"axios-mock-adapter": "^1.22.0"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "cetus-tools",
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"description": "Librería para elementos comunes de CETUS",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"/dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "rimraf ./dist && tsc --skipLibCheck",
|
|
12
|
+
"publish-lib": "npm run build && npm publish",
|
|
13
|
+
"publish-beta": "npm run build && npm publish --tag beta",
|
|
14
|
+
"publish-dryrun": "npm run build && npm publish --dry-run",
|
|
15
|
+
"link": "npm run build && npm link",
|
|
16
|
+
"test": "npm run build && jest --runInBand --detectOpenHandles",
|
|
17
|
+
"test-watch": "npm run build && jest --watch --runInBand --detectOpenHandles",
|
|
18
|
+
"test-silent": "npm run build && jest --runInBand --detectOpenHandles --silent",
|
|
19
|
+
"test-coverage": "npm run build && jest --runInBand --detectOpenHandles --silent --coverage"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/ITRMachines/cetus-tools.git"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [],
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/ITRMachines/cetus-tools/issues"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://github.com/ITRMachines/cetus-tools#readme",
|
|
30
|
+
"author": "",
|
|
31
|
+
"license": "ISC",
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/crypto-js": "^4.2.1",
|
|
34
|
+
"@types/jest": "^29.5.6",
|
|
35
|
+
"@types/morgan": "^1.9.7",
|
|
36
|
+
"@types/node": "^20.8.7",
|
|
37
|
+
"jest": "^29.7.0",
|
|
38
|
+
"rimraf": "^5.0.5",
|
|
39
|
+
"ts-jest": "^29.1.1",
|
|
40
|
+
"typescript": "^5.2.2"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"axios": "^1.5.1",
|
|
44
|
+
"crypto-js": "^4.2.0",
|
|
45
|
+
"dotenv": "^16.3.1",
|
|
46
|
+
"itrm-tools": "^1.0.49",
|
|
47
|
+
"morgan": "^1.10.0"
|
|
48
|
+
},
|
|
49
|
+
"optionalDependencies": {
|
|
50
|
+
"axios-mock-adapter": "^1.22.0"
|
|
51
|
+
}
|
|
52
|
+
}
|