namirasoft-log 1.3.6 → 1.3.8
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/.ns-sdkg-dir-deep +1 -0
- package/.ns-sdkg-dir-keep +0 -0
- package/.ns-sdkg-file-keep +12 -0
- package/dist/NamirasoftLogServer.d.ts +9 -0
- package/dist/NamirasoftLogServer.js +10 -0
- package/dist/NamirasoftLogServer.js.map +1 -1
- package/dist/NamirasoftLogServerBase.d.ts +5 -0
- package/dist/NamirasoftLogServerBase.js +12 -0
- package/dist/NamirasoftLogServerBase.js.map +1 -0
- package/dist/NamirasoftLogServerHealthz.d.ts +4 -0
- package/dist/NamirasoftLogServerHealthz.js +25 -0
- package/dist/NamirasoftLogServerHealthz.js.map +1 -0
- package/dist/NamirasoftLogServerLog.d.ts +8 -0
- package/dist/NamirasoftLogServerLog.js +39 -0
- package/dist/NamirasoftLogServerLog.js.map +1 -0
- package/dist/NamirasoftLogServerLogGroup.d.ts +10 -0
- package/dist/NamirasoftLogServerLogGroup.js +53 -0
- package/dist/NamirasoftLogServerLogGroup.js.map +1 -0
- package/dist/command/HealthzCommand.d.ts +4 -0
- package/dist/command/HealthzCommand.js +15 -0
- package/dist/command/HealthzCommand.js.map +1 -0
- package/dist/command/HealthzGetCommand.d.ts +5 -0
- package/dist/command/HealthzGetCommand.js +37 -0
- package/dist/command/HealthzGetCommand.js.map +1 -0
- package/dist/command/LogCommand.d.ts +4 -0
- package/dist/command/LogCommand.js +19 -0
- package/dist/command/LogCommand.js.map +1 -0
- package/dist/command/LogCreateCommand.d.ts +5 -0
- package/dist/command/LogCreateCommand.js +93 -0
- package/dist/command/LogCreateCommand.js.map +1 -0
- package/dist/command/LogGetAllCommand.d.ts +5 -0
- package/dist/command/LogGetAllCommand.js +37 -0
- package/dist/command/LogGetAllCommand.js.map +1 -0
- package/dist/command/LogGetCommand.d.ts +5 -0
- package/dist/command/LogGetCommand.js +37 -0
- package/dist/command/LogGetCommand.js.map +1 -0
- package/dist/command/LogGroupCommand.d.ts +4 -0
- package/dist/command/LogGroupCommand.js +23 -0
- package/dist/command/LogGroupCommand.js.map +1 -0
- package/dist/command/LogGroupCreateCommand.d.ts +5 -0
- package/dist/command/LogGroupCreateCommand.js +57 -0
- package/dist/command/LogGroupCreateCommand.js.map +1 -0
- package/dist/command/LogGroupDeleteCommand.d.ts +5 -0
- package/dist/command/LogGroupDeleteCommand.js +37 -0
- package/dist/command/LogGroupDeleteCommand.js.map +1 -0
- package/dist/command/LogGroupGetAllCommand.d.ts +5 -0
- package/dist/command/LogGroupGetAllCommand.js +37 -0
- package/dist/command/LogGroupGetAllCommand.js.map +1 -0
- package/dist/command/LogGroupGetCommand.d.ts +5 -0
- package/dist/command/LogGroupGetCommand.js +37 -0
- package/dist/command/LogGroupGetCommand.js.map +1 -0
- package/dist/command/LogGroupUpdateCommand.d.ts +5 -0
- package/dist/command/LogGroupUpdateCommand.js +57 -0
- package/dist/command/LogGroupUpdateCommand.js.map +1 -0
- package/dist/command/cli.d.ts +2 -0
- package/dist/command/cli.js +16 -0
- package/dist/command/cli.js.map +1 -0
- package/dist/index.d.ts +23 -1
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/dist/row/LogRow.d.ts +3 -0
- package/dist/row/LogRow.js +3 -0
- package/dist/row/LogRow.js.map +1 -0
- package/dist/row/LogRowInput.d.ts +8 -0
- package/dist/row/LogRowInput.js +3 -0
- package/dist/row/LogRowInput.js.map +1 -0
- package/dist/row/LogRowOutput.d.ts +4 -0
- package/dist/row/LogRowOutput.js +3 -0
- package/dist/row/LogRowOutput.js.map +1 -0
- package/dist/row/LoggroupRow.d.ts +3 -0
- package/dist/row/LoggroupRow.js +3 -0
- package/dist/row/LoggroupRow.js.map +1 -0
- package/dist/row/LoggroupRowInput.d.ts +4 -0
- package/dist/row/LoggroupRowInput.js +3 -0
- package/dist/row/LoggroupRowInput.js.map +1 -0
- package/dist/row/LoggroupRowOutput.d.ts +4 -0
- package/dist/row/LoggroupRowOutput.js +3 -0
- package/dist/row/LoggroupRowOutput.js.map +1 -0
- package/package.json +10 -6
- package/src/NamirasoftLogServer.ts +39 -2
- package/src/NamirasoftLogServerBase.ts +31 -0
- package/src/NamirasoftLogServerHealthz.ts +32 -0
- package/src/NamirasoftLogServerLog.ts +46 -0
- package/src/NamirasoftLogServerLogGroup.ts +58 -0
- package/src/command/HealthzCommand.ts +33 -0
- package/src/command/HealthzGetCommand.ts +45 -0
- package/src/command/LogCommand.ts +37 -0
- package/src/command/LogCreateCommand.ts +101 -0
- package/src/command/LogGetAllCommand.ts +45 -0
- package/src/command/LogGetCommand.ts +45 -0
- package/src/command/LogGroupCommand.ts +41 -0
- package/src/command/LogGroupCreateCommand.ts +65 -0
- package/src/command/LogGroupDeleteCommand.ts +45 -0
- package/src/command/LogGroupGetAllCommand.ts +45 -0
- package/src/command/LogGroupGetCommand.ts +45 -0
- package/src/command/LogGroupUpdateCommand.ts +65 -0
- package/src/command/cli.ts +35 -0
- package/src/index.ts +45 -2
- package/src/row/LogRow.ts +25 -0
- package/src/row/LogRowInput.ts +30 -0
- package/src/row/LogRowOutput.ts +26 -0
- package/src/row/LoggroupRow.ts +25 -0
- package/src/row/LoggroupRowInput.ts +26 -0
- package/src/row/LoggroupRowOutput.ts +26 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/src
|
|
File without changes
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
+
import { NamirasoftLogServerHealthz } from "./NamirasoftLogServerHealthz";
|
|
2
|
+
import { NamirasoftLogServerLog } from "./NamirasoftLogServerLog";
|
|
3
|
+
import { NamirasoftLogServerLogGroup } from "./NamirasoftLogServerLogGroup";
|
|
4
|
+
import { TokenManager } from "namirasoft-account";
|
|
1
5
|
export declare class NamirasoftLogServer {
|
|
6
|
+
manager: TokenManager;
|
|
7
|
+
healthz: NamirasoftLogServerHealthz;
|
|
8
|
+
log: NamirasoftLogServerLog;
|
|
9
|
+
loggroup: NamirasoftLogServerLogGroup;
|
|
10
|
+
constructor(manager: TokenManager, onError: (error: Error) => void);
|
|
2
11
|
}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NamirasoftLogServer = void 0;
|
|
4
|
+
const NamirasoftLogServerHealthz_1 = require("./NamirasoftLogServerHealthz");
|
|
5
|
+
const NamirasoftLogServerLog_1 = require("./NamirasoftLogServerLog");
|
|
6
|
+
const NamirasoftLogServerLogGroup_1 = require("./NamirasoftLogServerLogGroup");
|
|
4
7
|
class NamirasoftLogServer {
|
|
8
|
+
constructor(manager, onError) {
|
|
9
|
+
this.manager = manager;
|
|
10
|
+
this.healthz = new NamirasoftLogServerHealthz_1.NamirasoftLogServerHealthz(manager, onError);
|
|
11
|
+
this.log = new NamirasoftLogServerLog_1.NamirasoftLogServerLog(manager, onError);
|
|
12
|
+
this.loggroup = new NamirasoftLogServerLogGroup_1.NamirasoftLogServerLogGroup(manager, onError);
|
|
13
|
+
}
|
|
5
14
|
}
|
|
6
15
|
exports.NamirasoftLogServer = NamirasoftLogServer;
|
|
16
|
+
;
|
|
7
17
|
//# sourceMappingURL=NamirasoftLogServer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NamirasoftLogServer.js","sourceRoot":"","sources":["../src/NamirasoftLogServer.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"NamirasoftLogServer.js","sourceRoot":"","sources":["../src/NamirasoftLogServer.ts"],"names":[],"mappings":";;;AAqBA,6EAA0E;AAC1E,qEAAkE;AAClE,+EAA4E;AAG5E,MAAa,mBAAmB;IAM5B,YAAY,OAAqB,EAAE,OAA+B;QAE9D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,IAAI,uDAA0B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAChE,IAAI,CAAC,GAAG,GAAG,IAAI,+CAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxD,IAAI,CAAC,QAAQ,GAAG,IAAI,yDAA2B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;CACJ;AAbD,kDAaC;AAAA,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NamirasoftLogServerBase = void 0;
|
|
4
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
5
|
+
class NamirasoftLogServerBase extends namirasoft_account_1.NamirasoftServerBase {
|
|
6
|
+
constructor(manager, onError) {
|
|
7
|
+
super(`https://log.namirasoft.com/api/v1`, manager, onError);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.NamirasoftLogServerBase = NamirasoftLogServerBase;
|
|
11
|
+
;
|
|
12
|
+
//# sourceMappingURL=NamirasoftLogServerBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamirasoftLogServerBase.js","sourceRoot":"","sources":["../src/NamirasoftLogServerBase.ts"],"names":[],"mappings":";;;AAqBA,2DAA0D;AAG1D,MAAa,uBAAwB,SAAQ,yCAAoB;IAE7D,YAAY,OAAqB,EAAE,OAA+B;QAE9D,KAAK,CAAC,mCAAmC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACJ;AAND,0DAMC;AAAA,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NamirasoftLogServerHealthz = void 0;
|
|
13
|
+
const NamirasoftLogServerBase_1 = require("./NamirasoftLogServerBase");
|
|
14
|
+
class NamirasoftLogServerHealthz extends NamirasoftLogServerBase_1.NamirasoftLogServerBase {
|
|
15
|
+
Get() {
|
|
16
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
let path = `/healthz`;
|
|
18
|
+
let { data } = yield this._get(path, {});
|
|
19
|
+
return data;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.NamirasoftLogServerHealthz = NamirasoftLogServerHealthz;
|
|
24
|
+
;
|
|
25
|
+
//# sourceMappingURL=NamirasoftLogServerHealthz.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamirasoftLogServerHealthz.js","sourceRoot":"","sources":["../src/NamirasoftLogServerHealthz.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,uEAAoE;AAEpE,MAAa,0BAA2B,SAAQ,iDAAuB;IAE7D,GAAG;;YAEL,IAAI,IAAI,GAAG,UAAU,CAAC;YACtB,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAO,IAAI,EAAE,EAAE,CAAC,CAAC;YAC/C,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AARD,gEAQC;AAAA,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LogRow } from "./row/LogRow";
|
|
2
|
+
import { LogRowInput } from "./row/LogRowInput";
|
|
3
|
+
import { NamirasoftLogServerBase } from "./NamirasoftLogServerBase";
|
|
4
|
+
export declare class NamirasoftLogServerLog extends NamirasoftLogServerBase {
|
|
5
|
+
GetAll(product_id: (number | null), project_id: (number | null), search: (number | null)): Promise<LogRow[]>;
|
|
6
|
+
Get(id: number): Promise<LogRow>;
|
|
7
|
+
Create(body: LogRowInput): Promise<LogRow>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NamirasoftLogServerLog = void 0;
|
|
13
|
+
const NamirasoftLogServerBase_1 = require("./NamirasoftLogServerBase");
|
|
14
|
+
class NamirasoftLogServerLog extends NamirasoftLogServerBase_1.NamirasoftLogServerBase {
|
|
15
|
+
GetAll(product_id, project_id, search) {
|
|
16
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
let path = `/log/all`;
|
|
18
|
+
let { data } = yield this._get(path, { product_id, project_id, search });
|
|
19
|
+
return data;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
Get(id) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
let path = `/log/${id}`;
|
|
25
|
+
let { data } = yield this._get(path, {});
|
|
26
|
+
return data;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
Create(body) {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
let path = `/log`;
|
|
32
|
+
let { data } = yield this._post(path, {}, body);
|
|
33
|
+
return data;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.NamirasoftLogServerLog = NamirasoftLogServerLog;
|
|
38
|
+
;
|
|
39
|
+
//# sourceMappingURL=NamirasoftLogServerLog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamirasoftLogServerLog.js","sourceRoot":"","sources":["../src/NamirasoftLogServerLog.ts"],"names":[],"mappings":";;;;;;;;;;;;AAuBA,uEAAoE;AAEpE,MAAa,sBAAuB,SAAQ,iDAAuB;IAEzD,MAAM,CAAC,UAA2B,EAAE,UAA2B,EAAE,MAAuB;;YAE1F,IAAI,IAAI,GAAG,UAAU,CAAC;YACtB,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAW,IAAI,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC;YACnF,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,GAAG,CAAC,EAAU;;YAEhB,IAAI,IAAI,GAAG,QAAQ,EAAE,EAAE,CAAC;YACxB,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAS,IAAI,EAAE,EAAE,CAAC,CAAC;YACjD,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,MAAM,CAAC,IAAiB;;YAE1B,IAAI,IAAI,GAAG,MAAM,CAAC;YAClB,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAS,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YACxD,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AApBD,wDAoBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LoggroupRow } from "./row/LoggroupRow";
|
|
2
|
+
import { LoggroupRowInput } from "./row/LoggroupRowInput";
|
|
3
|
+
import { NamirasoftLogServerBase } from "./NamirasoftLogServerBase";
|
|
4
|
+
export declare class NamirasoftLogServerLogGroup extends NamirasoftLogServerBase {
|
|
5
|
+
GetAll(project_id: (number | null), search: (number | null)): Promise<LoggroupRow>;
|
|
6
|
+
Get(id: number): Promise<LoggroupRow>;
|
|
7
|
+
Create(body: LoggroupRowInput): Promise<LoggroupRow>;
|
|
8
|
+
Update(id: number, body: LoggroupRowInput): Promise<LoggroupRow>;
|
|
9
|
+
Delete(id: number): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NamirasoftLogServerLogGroup = void 0;
|
|
13
|
+
const NamirasoftLogServerBase_1 = require("./NamirasoftLogServerBase");
|
|
14
|
+
class NamirasoftLogServerLogGroup extends NamirasoftLogServerBase_1.NamirasoftLogServerBase {
|
|
15
|
+
GetAll(project_id, search) {
|
|
16
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
let path = `/log_group/all`;
|
|
18
|
+
let { data } = yield this._get(path, { project_id, search });
|
|
19
|
+
return data;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
Get(id) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
let path = `/log_group/${id}`;
|
|
25
|
+
let { data } = yield this._get(path, {});
|
|
26
|
+
return data;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
Create(body) {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
let path = `/log_group`;
|
|
32
|
+
let { data } = yield this._post(path, {}, body);
|
|
33
|
+
return data;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
Update(id, body) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
let path = `/log_group/${id}`;
|
|
39
|
+
let { data } = yield this._put(path, {}, body);
|
|
40
|
+
return data;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
Delete(id) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
let path = `/log_group/${id}`;
|
|
46
|
+
let { data } = yield this._delete(path, {});
|
|
47
|
+
return data;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.NamirasoftLogServerLogGroup = NamirasoftLogServerLogGroup;
|
|
52
|
+
;
|
|
53
|
+
//# sourceMappingURL=NamirasoftLogServerLogGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamirasoftLogServerLogGroup.js","sourceRoot":"","sources":["../src/NamirasoftLogServerLogGroup.ts"],"names":[],"mappings":";;;;;;;;;;;;AAuBA,uEAAoE;AAEpE,MAAa,2BAA4B,SAAQ,iDAAuB;IAE9D,MAAM,CAAC,UAA2B,EAAE,MAAuB;;YAE7D,IAAI,IAAI,GAAG,gBAAgB,CAAC;YAC5B,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAc,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC;YAC1E,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,GAAG,CAAC,EAAU;;YAEhB,IAAI,IAAI,GAAG,cAAc,EAAE,EAAE,CAAC;YAC9B,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAc,IAAI,EAAE,EAAE,CAAC,CAAC;YACtD,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,MAAM,CAAC,IAAsB;;YAE/B,IAAI,IAAI,GAAG,YAAY,CAAC;YACxB,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAc,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YAC7D,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,MAAM,CAAC,EAAU,EAAE,IAAsB;;YAE3C,IAAI,IAAI,GAAG,cAAc,EAAE,EAAE,CAAC;YAC9B,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAc,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YAC5D,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,MAAM,CAAC,EAAU;;YAEnB,IAAI,IAAI,GAAG,cAAc,EAAE,EAAE,CAAC;YAC9B,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,CAAO,IAAI,EAAE,EAAE,CAAC,CAAC;YAClD,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AAhCD,kEAgCC;AAAA,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HealthzCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const HealthzGetCommand_1 = require("./HealthzGetCommand");
|
|
6
|
+
class HealthzCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
7
|
+
constructor(argv) {
|
|
8
|
+
super(argv, {
|
|
9
|
+
"get": HealthzGetCommand_1.HealthzGetCommand,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.HealthzCommand = HealthzCommand;
|
|
14
|
+
;
|
|
15
|
+
//# sourceMappingURL=HealthzCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HealthzCommand.js","sourceRoot":"","sources":["../../src/command/HealthzCommand.ts"],"names":[],"mappings":";;;AAqBA,6DAA2D;AAC3D,2DAAwD;AAExD,MAAa,cAAe,SAAQ,0CAAoB;IAEpD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,KAAK,EAAE,qCAAiB;SAC3B,CAAC,CAAC;IACP,CAAC;CACJ;AARD,wCAQC;AAAA,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.HealthzGetCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftLogServer_1 = require("../NamirasoftLogServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class HealthzGetCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, [], []);
|
|
20
|
+
}
|
|
21
|
+
exec() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
let token = this.app.storage.getNSAToken();
|
|
24
|
+
if (token == null)
|
|
25
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
26
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
27
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
28
|
+
manager.setValue(token, false);
|
|
29
|
+
let server = new NamirasoftLogServer_1.NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
30
|
+
let ans = yield server.healthz.Get();
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.HealthzGetCommand = HealthzGetCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=HealthzGetCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HealthzGetCommand.js","sourceRoot":"","sources":["../../src/command/HealthzGetCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,iBAAkB,SAAQ,sCAAgB;IAEnD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACxB,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;YACrI,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,MAAM,GAAG,IAAI,yCAAmB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACrF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;YACrC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,8CAkBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const LogCreateCommand_1 = require("./LogCreateCommand");
|
|
6
|
+
const LogGetAllCommand_1 = require("./LogGetAllCommand");
|
|
7
|
+
const LogGetCommand_1 = require("./LogGetCommand");
|
|
8
|
+
class LogCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
9
|
+
constructor(argv) {
|
|
10
|
+
super(argv, {
|
|
11
|
+
"getall": LogGetAllCommand_1.LogGetAllCommand,
|
|
12
|
+
"get": LogGetCommand_1.LogGetCommand,
|
|
13
|
+
"create": LogCreateCommand_1.LogCreateCommand,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.LogCommand = LogCommand;
|
|
18
|
+
;
|
|
19
|
+
//# sourceMappingURL=LogCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogCommand.js","sourceRoot":"","sources":["../../src/command/LogCommand.ts"],"names":[],"mappings":";;;AAqBA,6DAA2D;AAC3D,yDAAsD;AACtD,yDAAsD;AACtD,mDAAgD;AAEhD,MAAa,UAAW,SAAQ,0CAAoB;IAEhD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,QAAQ,EAAE,mCAAgB;YAC1B,KAAK,EAAE,6BAAa;YACpB,QAAQ,EAAE,mCAAgB;SAC7B,CAAC,CAAC;IACP,CAAC;CACJ;AAVD,gCAUC;AAAA,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogCreateCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftLogServer_1 = require("../NamirasoftLogServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class LogCreateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, [], [
|
|
20
|
+
{
|
|
21
|
+
name: "product_id",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'product_id' in body",
|
|
24
|
+
optional: true,
|
|
25
|
+
args: ["product_id"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "project_id",
|
|
30
|
+
short: "",
|
|
31
|
+
description: "Provides the value of 'project_id' in body",
|
|
32
|
+
optional: true,
|
|
33
|
+
args: ["project_id"],
|
|
34
|
+
defaults: [""]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "log_group_id",
|
|
38
|
+
short: "",
|
|
39
|
+
description: "Provides the value of 'log_group_id' in body",
|
|
40
|
+
optional: true,
|
|
41
|
+
args: ["log_group_id"],
|
|
42
|
+
defaults: [""]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "level",
|
|
46
|
+
short: "",
|
|
47
|
+
description: "Provides the value of 'level' in body",
|
|
48
|
+
optional: true,
|
|
49
|
+
args: ["level"],
|
|
50
|
+
defaults: [""]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "message",
|
|
54
|
+
short: "",
|
|
55
|
+
description: "Provides the value of 'message' in body",
|
|
56
|
+
optional: true,
|
|
57
|
+
args: ["message"],
|
|
58
|
+
defaults: [""]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "stack",
|
|
62
|
+
short: "",
|
|
63
|
+
description: "Provides the value of 'stack' in body",
|
|
64
|
+
optional: true,
|
|
65
|
+
args: ["stack"],
|
|
66
|
+
defaults: [""]
|
|
67
|
+
}
|
|
68
|
+
]);
|
|
69
|
+
}
|
|
70
|
+
exec() {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
let token = this.app.storage.getNSAToken();
|
|
73
|
+
if (token == null)
|
|
74
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
75
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
76
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
77
|
+
manager.setValue(token, false);
|
|
78
|
+
let server = new NamirasoftLogServer_1.NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
79
|
+
let ans = yield server.log.Create({
|
|
80
|
+
product_id: this.option_values.product_id,
|
|
81
|
+
project_id: this.option_values.project_id,
|
|
82
|
+
log_group_id: this.option_values.log_group_id,
|
|
83
|
+
level: this.option_values.level,
|
|
84
|
+
message: this.option_values.message,
|
|
85
|
+
stack: this.option_values.stack
|
|
86
|
+
});
|
|
87
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.LogCreateCommand = LogCreateCommand;
|
|
92
|
+
;
|
|
93
|
+
//# sourceMappingURL=LogCreateCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogCreateCommand.js","sourceRoot":"","sources":["../../src/command/LogCreateCommand.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogGetAllCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftLogServer_1 = require("../NamirasoftLogServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class LogGetAllCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["product_id", "project_id", "search"], []);
|
|
20
|
+
}
|
|
21
|
+
exec() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
let token = this.app.storage.getNSAToken();
|
|
24
|
+
if (token == null)
|
|
25
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
26
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
27
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
28
|
+
manager.setValue(token, false);
|
|
29
|
+
let server = new NamirasoftLogServer_1.NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
30
|
+
let ans = yield server.log.GetAll(this.arg_values[0], this.arg_values[1], this.arg_values[2]);
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.LogGetAllCommand = LogGetAllCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=LogGetAllCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogGetAllCommand.js","sourceRoot":"","sources":["../../src/command/LogGetAllCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,gBAAiB,SAAQ,sCAAgB;IAElD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;YACrI,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,MAAM,GAAG,IAAI,yCAAmB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACrF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9F,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,4CAkBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogGetCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftLogServer_1 = require("../NamirasoftLogServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class LogGetCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["id"], []);
|
|
20
|
+
}
|
|
21
|
+
exec() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
let token = this.app.storage.getNSAToken();
|
|
24
|
+
if (token == null)
|
|
25
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
26
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
27
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
28
|
+
manager.setValue(token, false);
|
|
29
|
+
let server = new NamirasoftLogServer_1.NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
30
|
+
let ans = yield server.log.Get(this.arg_values[0]);
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.LogGetCommand = LogGetCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=LogGetCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogGetCommand.js","sourceRoot":"","sources":["../../src/command/LogGetCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,aAAc,SAAQ,sCAAgB;IAE/C,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5B,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;YACrI,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,MAAM,GAAG,IAAI,yCAAmB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACrF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACnD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,sCAkBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogGroupCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const LogGroupCreateCommand_1 = require("./LogGroupCreateCommand");
|
|
6
|
+
const LogGroupDeleteCommand_1 = require("./LogGroupDeleteCommand");
|
|
7
|
+
const LogGroupGetAllCommand_1 = require("./LogGroupGetAllCommand");
|
|
8
|
+
const LogGroupGetCommand_1 = require("./LogGroupGetCommand");
|
|
9
|
+
const LogGroupUpdateCommand_1 = require("./LogGroupUpdateCommand");
|
|
10
|
+
class LogGroupCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
11
|
+
constructor(argv) {
|
|
12
|
+
super(argv, {
|
|
13
|
+
"getall": LogGroupGetAllCommand_1.LogGroupGetAllCommand,
|
|
14
|
+
"get": LogGroupGetCommand_1.LogGroupGetCommand,
|
|
15
|
+
"create": LogGroupCreateCommand_1.LogGroupCreateCommand,
|
|
16
|
+
"update": LogGroupUpdateCommand_1.LogGroupUpdateCommand,
|
|
17
|
+
"delete": LogGroupDeleteCommand_1.LogGroupDeleteCommand,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.LogGroupCommand = LogGroupCommand;
|
|
22
|
+
;
|
|
23
|
+
//# sourceMappingURL=LogGroupCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogGroupCommand.js","sourceRoot":"","sources":["../../src/command/LogGroupCommand.ts"],"names":[],"mappings":";;;AAqBA,6DAA2D;AAC3D,mEAAgE;AAChE,mEAAgE;AAChE,mEAAgE;AAChE,6DAA0D;AAC1D,mEAAgE;AAEhE,MAAa,eAAgB,SAAQ,0CAAoB;IAErD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,QAAQ,EAAE,6CAAqB;YAC/B,KAAK,EAAE,uCAAkB;YACzB,QAAQ,EAAE,6CAAqB;YAC/B,QAAQ,EAAE,6CAAqB;YAC/B,QAAQ,EAAE,6CAAqB;SAClC,CAAC,CAAC;IACP,CAAC;CACJ;AAZD,0CAYC;AAAA,CAAC"}
|