namirasoft-container-registry 1.4.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/dist/NamirasoftContainerRegistryServer.d.ts +19 -0
- package/dist/NamirasoftContainerRegistryServer.js +26 -0
- package/dist/NamirasoftContainerRegistryServer.js.map +1 -0
- package/dist/NamirasoftContainerRegistryServerBase.d.ts +5 -0
- package/dist/NamirasoftContainerRegistryServerBase.js +11 -0
- package/dist/NamirasoftContainerRegistryServerBase.js.map +1 -0
- package/dist/NamirasoftContainerRegistryServerContainerRegistry.d.ts +18 -0
- package/dist/NamirasoftContainerRegistryServerContainerRegistry.js +64 -0
- package/dist/NamirasoftContainerRegistryServerContainerRegistry.js.map +1 -0
- package/dist/NamirasoftContainerRegistryServerContainerRegistryCategory.d.ts +17 -0
- package/dist/NamirasoftContainerRegistryServerContainerRegistryCategory.js +56 -0
- package/dist/NamirasoftContainerRegistryServerContainerRegistryCategory.js.map +1 -0
- package/dist/NamirasoftContainerRegistryServerContainerRegistryField.d.ts +18 -0
- package/dist/NamirasoftContainerRegistryServerContainerRegistryField.js +64 -0
- package/dist/NamirasoftContainerRegistryServerContainerRegistryField.js.map +1 -0
- package/dist/NamirasoftContainerRegistryServerContainerRegistryTag.d.ts +18 -0
- package/dist/NamirasoftContainerRegistryServerContainerRegistryTag.js +64 -0
- package/dist/NamirasoftContainerRegistryServerContainerRegistryTag.js.map +1 -0
- package/dist/NamirasoftContainerRegistryServerHealthz.d.ts +7 -0
- package/dist/NamirasoftContainerRegistryServerHealthz.js +28 -0
- package/dist/NamirasoftContainerRegistryServerHealthz.js.map +1 -0
- package/dist/NamirasoftContainerRegistryServerMetrics.d.ts +7 -0
- package/dist/NamirasoftContainerRegistryServerMetrics.js +28 -0
- package/dist/NamirasoftContainerRegistryServerMetrics.js.map +1 -0
- package/dist/NamirasoftContainerRegistryServerValue.d.ts +7 -0
- package/dist/NamirasoftContainerRegistryServerValue.js +29 -0
- package/dist/NamirasoftContainerRegistryServerValue.js.map +1 -0
- package/dist/command/ContainerRegistryCategoryCommand.d.ts +4 -0
- package/dist/command/ContainerRegistryCategoryCommand.js +21 -0
- package/dist/command/ContainerRegistryCategoryCommand.js.map +1 -0
- package/dist/command/ContainerRegistryCategoryCreateCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryCategoryCreateCommand.js +49 -0
- package/dist/command/ContainerRegistryCategoryCreateCommand.js.map +1 -0
- package/dist/command/ContainerRegistryCategoryDeleteCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryCategoryDeleteCommand.js +38 -0
- package/dist/command/ContainerRegistryCategoryDeleteCommand.js.map +1 -0
- package/dist/command/ContainerRegistryCategoryGetCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryCategoryGetCommand.js +38 -0
- package/dist/command/ContainerRegistryCategoryGetCommand.js.map +1 -0
- package/dist/command/ContainerRegistryCategoryListCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryCategoryListCommand.js +38 -0
- package/dist/command/ContainerRegistryCategoryListCommand.js.map +1 -0
- package/dist/command/ContainerRegistryCommand.d.ts +4 -0
- package/dist/command/ContainerRegistryCommand.js +23 -0
- package/dist/command/ContainerRegistryCommand.js.map +1 -0
- package/dist/command/ContainerRegistryCreateCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryCreateCommand.js +76 -0
- package/dist/command/ContainerRegistryCreateCommand.js.map +1 -0
- package/dist/command/ContainerRegistryDeleteCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryDeleteCommand.js +38 -0
- package/dist/command/ContainerRegistryDeleteCommand.js.map +1 -0
- package/dist/command/ContainerRegistryFieldCommand.d.ts +4 -0
- package/dist/command/ContainerRegistryFieldCommand.js +23 -0
- package/dist/command/ContainerRegistryFieldCommand.js.map +1 -0
- package/dist/command/ContainerRegistryFieldCreateCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryFieldCreateCommand.js +58 -0
- package/dist/command/ContainerRegistryFieldCreateCommand.js.map +1 -0
- package/dist/command/ContainerRegistryFieldDeleteCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryFieldDeleteCommand.js +38 -0
- package/dist/command/ContainerRegistryFieldDeleteCommand.js.map +1 -0
- package/dist/command/ContainerRegistryFieldGetCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryFieldGetCommand.js +38 -0
- package/dist/command/ContainerRegistryFieldGetCommand.js.map +1 -0
- package/dist/command/ContainerRegistryFieldListCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryFieldListCommand.js +38 -0
- package/dist/command/ContainerRegistryFieldListCommand.js.map +1 -0
- package/dist/command/ContainerRegistryFieldUpdateCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryFieldUpdateCommand.js +58 -0
- package/dist/command/ContainerRegistryFieldUpdateCommand.js.map +1 -0
- package/dist/command/ContainerRegistryGetCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryGetCommand.js +38 -0
- package/dist/command/ContainerRegistryGetCommand.js.map +1 -0
- package/dist/command/ContainerRegistryListCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryListCommand.js +38 -0
- package/dist/command/ContainerRegistryListCommand.js.map +1 -0
- package/dist/command/ContainerRegistryTagCommand.d.ts +4 -0
- package/dist/command/ContainerRegistryTagCommand.js +23 -0
- package/dist/command/ContainerRegistryTagCommand.js.map +1 -0
- package/dist/command/ContainerRegistryTagCreateCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryTagCreateCommand.js +58 -0
- package/dist/command/ContainerRegistryTagCreateCommand.js.map +1 -0
- package/dist/command/ContainerRegistryTagDeleteCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryTagDeleteCommand.js +38 -0
- package/dist/command/ContainerRegistryTagDeleteCommand.js.map +1 -0
- package/dist/command/ContainerRegistryTagGetCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryTagGetCommand.js +38 -0
- package/dist/command/ContainerRegistryTagGetCommand.js.map +1 -0
- package/dist/command/ContainerRegistryTagListCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryTagListCommand.js +38 -0
- package/dist/command/ContainerRegistryTagListCommand.js.map +1 -0
- package/dist/command/ContainerRegistryTagUpdateCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryTagUpdateCommand.js +58 -0
- package/dist/command/ContainerRegistryTagUpdateCommand.js.map +1 -0
- package/dist/command/ContainerRegistryUpdateCommand.d.ts +5 -0
- package/dist/command/ContainerRegistryUpdateCommand.js +76 -0
- package/dist/command/ContainerRegistryUpdateCommand.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 +38 -0
- package/dist/command/HealthzGetCommand.js.map +1 -0
- package/dist/command/MetricsCommand.d.ts +4 -0
- package/dist/command/MetricsCommand.js +15 -0
- package/dist/command/MetricsCommand.js.map +1 -0
- package/dist/command/MetricsGetCommand.d.ts +5 -0
- package/dist/command/MetricsGetCommand.js +38 -0
- package/dist/command/MetricsGetCommand.js.map +1 -0
- package/dist/command/ValueCommand.d.ts +4 -0
- package/dist/command/ValueCommand.js +15 -0
- package/dist/command/ValueCommand.js.map +1 -0
- package/dist/command/ValueListCommand.d.ts +5 -0
- package/dist/command/ValueListCommand.js +38 -0
- package/dist/command/ValueListCommand.js.map +1 -0
- package/dist/command/cli.d.ts +2 -0
- package/dist/command/cli.js +26 -0
- package/dist/command/cli.js.map +1 -0
- package/dist/enum/ContainerRegistryType.d.ts +13 -0
- package/dist/enum/ContainerRegistryType.js +18 -0
- package/dist/enum/ContainerRegistryType.js.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.js +66 -0
- package/dist/index.js.map +1 -0
- package/dist/meta/ContainerRegistryMetaTable.d.ts +18 -0
- package/dist/meta/ContainerRegistryMetaTable.js +41 -0
- package/dist/meta/ContainerRegistryMetaTable.js.map +1 -0
- package/dist/meta/NamirasoftContainerRegistryMetaDatabase.d.ts +13 -0
- package/dist/meta/NamirasoftContainerRegistryMetaDatabase.js +27 -0
- package/dist/meta/NamirasoftContainerRegistryMetaDatabase.js.map +1 -0
- package/dist/row/ContainerRegistryCategoryRow.d.ts +8 -0
- package/dist/row/ContainerRegistryCategoryRow.js +3 -0
- package/dist/row/ContainerRegistryCategoryRow.js.map +1 -0
- package/dist/row/ContainerRegistryFieldRow.d.ts +9 -0
- package/dist/row/ContainerRegistryFieldRow.js +3 -0
- package/dist/row/ContainerRegistryFieldRow.js.map +1 -0
- package/dist/row/ContainerRegistryInputRow.d.ts +7 -0
- package/dist/row/ContainerRegistryInputRow.js +3 -0
- package/dist/row/ContainerRegistryInputRow.js.map +1 -0
- package/dist/row/ContainerRegistryRow.d.ts +12 -0
- package/dist/row/ContainerRegistryRow.js +3 -0
- package/dist/row/ContainerRegistryRow.js.map +1 -0
- package/dist/row/ContainerRegistryTagRow.d.ts +9 -0
- package/dist/row/ContainerRegistryTagRow.js +3 -0
- package/dist/row/ContainerRegistryTagRow.js.map +1 -0
- package/dist/row/EntityCategoryInputRow.d.ts +3 -0
- package/dist/row/EntityCategoryInputRow.js +3 -0
- package/dist/row/EntityCategoryInputRow.js.map +1 -0
- package/dist/row/EntityFieldInputRow.d.ts +4 -0
- package/dist/row/EntityFieldInputRow.js +3 -0
- package/dist/row/EntityFieldInputRow.js.map +1 -0
- package/dist/row/EntityTagInputRow.d.ts +4 -0
- package/dist/row/EntityTagInputRow.js +3 -0
- package/dist/row/EntityTagInputRow.js.map +1 -0
- package/logo.png +0 -0
- package/package.json +28 -0
- package/src/NamirasoftContainerRegistryServer.ts +51 -0
- package/src/NamirasoftContainerRegistryServerBase.ts +30 -0
- package/src/NamirasoftContainerRegistryServerContainerRegistry.ts +71 -0
- package/src/NamirasoftContainerRegistryServerContainerRegistryCategory.ts +64 -0
- package/src/NamirasoftContainerRegistryServerContainerRegistryField.ts +71 -0
- package/src/NamirasoftContainerRegistryServerContainerRegistryTag.ts +71 -0
- package/src/NamirasoftContainerRegistryServerHealthz.ts +37 -0
- package/src/NamirasoftContainerRegistryServerMetrics.ts +37 -0
- package/src/NamirasoftContainerRegistryServerValue.ts +38 -0
- package/src/command/ContainerRegistryCategoryCommand.ts +38 -0
- package/src/command/ContainerRegistryCategoryCreateCommand.ts +56 -0
- package/src/command/ContainerRegistryCategoryDeleteCommand.ts +45 -0
- package/src/command/ContainerRegistryCategoryGetCommand.ts +45 -0
- package/src/command/ContainerRegistryCategoryListCommand.ts +45 -0
- package/src/command/ContainerRegistryCommand.ts +40 -0
- package/src/command/ContainerRegistryCreateCommand.ts +83 -0
- package/src/command/ContainerRegistryDeleteCommand.ts +45 -0
- package/src/command/ContainerRegistryFieldCommand.ts +40 -0
- package/src/command/ContainerRegistryFieldCreateCommand.ts +65 -0
- package/src/command/ContainerRegistryFieldDeleteCommand.ts +45 -0
- package/src/command/ContainerRegistryFieldGetCommand.ts +45 -0
- package/src/command/ContainerRegistryFieldListCommand.ts +45 -0
- package/src/command/ContainerRegistryFieldUpdateCommand.ts +65 -0
- package/src/command/ContainerRegistryGetCommand.ts +45 -0
- package/src/command/ContainerRegistryListCommand.ts +45 -0
- package/src/command/ContainerRegistryTagCommand.ts +40 -0
- package/src/command/ContainerRegistryTagCreateCommand.ts +65 -0
- package/src/command/ContainerRegistryTagDeleteCommand.ts +45 -0
- package/src/command/ContainerRegistryTagGetCommand.ts +45 -0
- package/src/command/ContainerRegistryTagListCommand.ts +45 -0
- package/src/command/ContainerRegistryTagUpdateCommand.ts +65 -0
- package/src/command/ContainerRegistryUpdateCommand.ts +83 -0
- package/src/command/HealthzCommand.ts +32 -0
- package/src/command/HealthzGetCommand.ts +45 -0
- package/src/command/MetricsCommand.ts +32 -0
- package/src/command/MetricsGetCommand.ts +45 -0
- package/src/command/ValueCommand.ts +32 -0
- package/src/command/ValueListCommand.ts +45 -0
- package/src/command/cli.ts +45 -0
- package/src/enum/ContainerRegistryType.ts +34 -0
- package/src/index.ts +69 -0
- package/src/meta/ContainerRegistryMetaTable.ts +64 -0
- package/src/meta/NamirasoftContainerRegistryMetaDatabase.ts +51 -0
- package/src/row/ContainerRegistryCategoryRow.ts +29 -0
- package/src/row/ContainerRegistryFieldRow.ts +30 -0
- package/src/row/ContainerRegistryInputRow.ts +29 -0
- package/src/row/ContainerRegistryRow.ts +34 -0
- package/src/row/ContainerRegistryTagRow.ts +30 -0
- package/src/row/EntityCategoryInputRow.ts +24 -0
- package/src/row/EntityFieldInputRow.ts +25 -0
- package/src/row/EntityTagInputRow.ts +25 -0
- package/tsconfig.json +42 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { NamirasoftContainerRegistryServer } from "./NamirasoftContainerRegistryServer";
|
|
23
|
+
import { NamirasoftContainerRegistryServerBase } from "./NamirasoftContainerRegistryServerBase";
|
|
24
|
+
|
|
25
|
+
export class NamirasoftContainerRegistryServerValue extends NamirasoftContainerRegistryServerBase
|
|
26
|
+
{
|
|
27
|
+
constructor(server: NamirasoftContainerRegistryServer)
|
|
28
|
+
{
|
|
29
|
+
super(server);
|
|
30
|
+
this.List = this.List.bind(this);
|
|
31
|
+
}
|
|
32
|
+
async List(table: string, column: string, search: (string | null), field_id: (string | null), limit: (number | null), config?: BaseServerConfig<any>): Promise<string[]>
|
|
33
|
+
{
|
|
34
|
+
let path = `/value/list/${table}/${column}`;
|
|
35
|
+
let { data } = await this.server._get<string[]>(path, { search, field_id, limit }, config);
|
|
36
|
+
return data;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseNavigatorCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { ContainerRegistryCategoryCreateCommand } from "./ContainerRegistryCategoryCreateCommand";
|
|
23
|
+
import { ContainerRegistryCategoryDeleteCommand } from "./ContainerRegistryCategoryDeleteCommand";
|
|
24
|
+
import { ContainerRegistryCategoryGetCommand } from "./ContainerRegistryCategoryGetCommand";
|
|
25
|
+
import { ContainerRegistryCategoryListCommand } from "./ContainerRegistryCategoryListCommand";
|
|
26
|
+
|
|
27
|
+
export class ContainerRegistryCategoryCommand extends BaseNavigatorCommand
|
|
28
|
+
{
|
|
29
|
+
constructor(argv: string[])
|
|
30
|
+
{
|
|
31
|
+
super(argv, {
|
|
32
|
+
"list": ContainerRegistryCategoryListCommand,
|
|
33
|
+
"get": ContainerRegistryCategoryGetCommand,
|
|
34
|
+
"create": ContainerRegistryCategoryCreateCommand,
|
|
35
|
+
"delete": ContainerRegistryCategoryDeleteCommand,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftContainerRegistryServer } from "../NamirasoftContainerRegistryServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class ContainerRegistryCategoryCreateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["entity_id"], [
|
|
31
|
+
{
|
|
32
|
+
name: "category_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'category_id' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["category_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
}
|
|
39
|
+
]);
|
|
40
|
+
}
|
|
41
|
+
override async exec()
|
|
42
|
+
{
|
|
43
|
+
let token = this.app.storage.getNSAToken();
|
|
44
|
+
if (token == null)
|
|
45
|
+
throw new Error("Token is not available. Please login first using:\nns-container-registry account config \nor \nns-container-registry account login.");
|
|
46
|
+
let storage = new IStorageMemoryDedicated();
|
|
47
|
+
let manager = new TokenManager(storage, () => { });
|
|
48
|
+
manager.setValue(token, false);
|
|
49
|
+
let url = this.app.storage.getItem("ns-container-registry-server-url");
|
|
50
|
+
let server = new NamirasoftContainerRegistryServer(url, manager, e => this.app.logger.error(e.message));
|
|
51
|
+
let ans = await server.container_registry_category.Create(this.arg_values[0], {
|
|
52
|
+
category_id: this.option_values.category_id
|
|
53
|
+
});
|
|
54
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
55
|
+
}
|
|
56
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftContainerRegistryServer } from "../NamirasoftContainerRegistryServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class ContainerRegistryCategoryDeleteCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["entity_id", "id"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-container-registry account config \nor \nns-container-registry account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-container-registry-server-url");
|
|
41
|
+
let server = new NamirasoftContainerRegistryServer(url, manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.container_registry_category.Delete(this.arg_values[0], this.arg_values[1]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftContainerRegistryServer } from "../NamirasoftContainerRegistryServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class ContainerRegistryCategoryGetCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-container-registry account config \nor \nns-container-registry account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-container-registry-server-url");
|
|
41
|
+
let server = new NamirasoftContainerRegistryServer(url, manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.container_registry_category.Get(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftContainerRegistryServer } from "../NamirasoftContainerRegistryServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class ContainerRegistryCategoryListCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["filters", "page", "size", "sorts"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-container-registry account config \nor \nns-container-registry account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-container-registry-server-url");
|
|
41
|
+
let server = new NamirasoftContainerRegistryServer(url, manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.container_registry_category.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseNavigatorCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { ContainerRegistryCreateCommand } from "./ContainerRegistryCreateCommand";
|
|
23
|
+
import { ContainerRegistryDeleteCommand } from "./ContainerRegistryDeleteCommand";
|
|
24
|
+
import { ContainerRegistryGetCommand } from "./ContainerRegistryGetCommand";
|
|
25
|
+
import { ContainerRegistryListCommand } from "./ContainerRegistryListCommand";
|
|
26
|
+
import { ContainerRegistryUpdateCommand } from "./ContainerRegistryUpdateCommand";
|
|
27
|
+
|
|
28
|
+
export class ContainerRegistryCommand extends BaseNavigatorCommand
|
|
29
|
+
{
|
|
30
|
+
constructor(argv: string[])
|
|
31
|
+
{
|
|
32
|
+
super(argv, {
|
|
33
|
+
"list": ContainerRegistryListCommand,
|
|
34
|
+
"get": ContainerRegistryGetCommand,
|
|
35
|
+
"create": ContainerRegistryCreateCommand,
|
|
36
|
+
"update": ContainerRegistryUpdateCommand,
|
|
37
|
+
"delete": ContainerRegistryDeleteCommand,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftContainerRegistryServer } from "../NamirasoftContainerRegistryServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class ContainerRegistryCreateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], [
|
|
31
|
+
{
|
|
32
|
+
name: "name",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'name' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["name"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "type",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'type' in body",
|
|
43
|
+
optional: false,
|
|
44
|
+
args: ["type"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "meta",
|
|
49
|
+
short: "",
|
|
50
|
+
description: "Provides the value of 'meta' in body",
|
|
51
|
+
optional: true,
|
|
52
|
+
args: ["meta"],
|
|
53
|
+
defaults: [""]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "description",
|
|
57
|
+
short: "",
|
|
58
|
+
description: "Provides the value of 'description' in body",
|
|
59
|
+
optional: true,
|
|
60
|
+
args: ["description"],
|
|
61
|
+
defaults: [""]
|
|
62
|
+
}
|
|
63
|
+
]);
|
|
64
|
+
}
|
|
65
|
+
override async exec()
|
|
66
|
+
{
|
|
67
|
+
let token = this.app.storage.getNSAToken();
|
|
68
|
+
if (token == null)
|
|
69
|
+
throw new Error("Token is not available. Please login first using:\nns-container-registry account config \nor \nns-container-registry account login.");
|
|
70
|
+
let storage = new IStorageMemoryDedicated();
|
|
71
|
+
let manager = new TokenManager(storage, () => { });
|
|
72
|
+
manager.setValue(token, false);
|
|
73
|
+
let url = this.app.storage.getItem("ns-container-registry-server-url");
|
|
74
|
+
let server = new NamirasoftContainerRegistryServer(url, manager, e => this.app.logger.error(e.message));
|
|
75
|
+
let ans = await server.container_registry.Create({
|
|
76
|
+
name: this.option_values.name,
|
|
77
|
+
type: this.option_values.type,
|
|
78
|
+
meta: this.option_values.meta,
|
|
79
|
+
description: this.option_values.description
|
|
80
|
+
});
|
|
81
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
82
|
+
}
|
|
83
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftContainerRegistryServer } from "../NamirasoftContainerRegistryServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class ContainerRegistryDeleteCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-container-registry account config \nor \nns-container-registry account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-container-registry-server-url");
|
|
41
|
+
let server = new NamirasoftContainerRegistryServer(url, manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.container_registry.Delete(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseNavigatorCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { ContainerRegistryFieldCreateCommand } from "./ContainerRegistryFieldCreateCommand";
|
|
23
|
+
import { ContainerRegistryFieldDeleteCommand } from "./ContainerRegistryFieldDeleteCommand";
|
|
24
|
+
import { ContainerRegistryFieldGetCommand } from "./ContainerRegistryFieldGetCommand";
|
|
25
|
+
import { ContainerRegistryFieldListCommand } from "./ContainerRegistryFieldListCommand";
|
|
26
|
+
import { ContainerRegistryFieldUpdateCommand } from "./ContainerRegistryFieldUpdateCommand";
|
|
27
|
+
|
|
28
|
+
export class ContainerRegistryFieldCommand extends BaseNavigatorCommand
|
|
29
|
+
{
|
|
30
|
+
constructor(argv: string[])
|
|
31
|
+
{
|
|
32
|
+
super(argv, {
|
|
33
|
+
"list": ContainerRegistryFieldListCommand,
|
|
34
|
+
"get": ContainerRegistryFieldGetCommand,
|
|
35
|
+
"create": ContainerRegistryFieldCreateCommand,
|
|
36
|
+
"update": ContainerRegistryFieldUpdateCommand,
|
|
37
|
+
"delete": ContainerRegistryFieldDeleteCommand,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftContainerRegistryServer } from "../NamirasoftContainerRegistryServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class ContainerRegistryFieldCreateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["entity_id"], [
|
|
31
|
+
{
|
|
32
|
+
name: "field_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'field_id' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["field_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "value",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'value' in body",
|
|
43
|
+
optional: true,
|
|
44
|
+
args: ["value"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
}
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
49
|
+
override async exec()
|
|
50
|
+
{
|
|
51
|
+
let token = this.app.storage.getNSAToken();
|
|
52
|
+
if (token == null)
|
|
53
|
+
throw new Error("Token is not available. Please login first using:\nns-container-registry account config \nor \nns-container-registry account login.");
|
|
54
|
+
let storage = new IStorageMemoryDedicated();
|
|
55
|
+
let manager = new TokenManager(storage, () => { });
|
|
56
|
+
manager.setValue(token, false);
|
|
57
|
+
let url = this.app.storage.getItem("ns-container-registry-server-url");
|
|
58
|
+
let server = new NamirasoftContainerRegistryServer(url, manager, e => this.app.logger.error(e.message));
|
|
59
|
+
let ans = await server.container_registry_field.Create(this.arg_values[0], {
|
|
60
|
+
field_id: this.option_values.field_id,
|
|
61
|
+
value: this.option_values.value
|
|
62
|
+
});
|
|
63
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
64
|
+
}
|
|
65
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftContainerRegistryServer } from "../NamirasoftContainerRegistryServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class ContainerRegistryFieldDeleteCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["entity_id", "id"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-container-registry account config \nor \nns-container-registry account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-container-registry-server-url");
|
|
41
|
+
let server = new NamirasoftContainerRegistryServer(url, manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.container_registry_field.Delete(this.arg_values[0], this.arg_values[1]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftContainerRegistryServer } from "../NamirasoftContainerRegistryServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class ContainerRegistryFieldGetCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-container-registry account config \nor \nns-container-registry account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-container-registry-server-url");
|
|
41
|
+
let server = new NamirasoftContainerRegistryServer(url, manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.container_registry_field.Get(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|