@signageos/cli 0.10.2 → 1.0.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.
Files changed (146) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +16 -1
  3. package/config/parameters.d.ts +1 -0
  4. package/config/parameters.js +4 -0
  5. package/dist/Applet/Generate/appletGenerateCommand.d.ts +44 -2
  6. package/dist/Applet/Generate/appletGenerateCommand.js +44 -35
  7. package/dist/Applet/Generate/appletGenerateCommand.js.map +1 -1
  8. package/dist/Applet/Start/appletStartCommand.d.ts +59 -2
  9. package/dist/Applet/Start/appletStartCommand.js +31 -22
  10. package/dist/Applet/Start/appletStartCommand.js.map +1 -1
  11. package/dist/Applet/Start/appletStartCommandHelper.d.ts +3 -2
  12. package/dist/Applet/Start/appletStartCommandHelper.js +5 -4
  13. package/dist/Applet/Start/appletStartCommandHelper.js.map +1 -1
  14. package/dist/Applet/Test/Upload/appletTestRunCommand.d.ts +52 -2
  15. package/dist/Applet/Test/Upload/appletTestRunCommand.js +44 -36
  16. package/dist/Applet/Test/Upload/appletTestRunCommand.js.map +1 -1
  17. package/dist/Applet/Test/Upload/appletTestRunFacade.js +2 -1
  18. package/dist/Applet/Test/Upload/appletTestRunFacade.js.map +1 -1
  19. package/dist/Applet/Test/Upload/appletTestUploadCommand.d.ts +42 -2
  20. package/dist/Applet/Test/Upload/appletTestUploadCommand.js +45 -37
  21. package/dist/Applet/Test/Upload/appletTestUploadCommand.js.map +1 -1
  22. package/dist/Applet/Test/Upload/appletTestUploadFacade.js +2 -1
  23. package/dist/Applet/Test/Upload/appletTestUploadFacade.js.map +1 -1
  24. package/dist/Applet/Test/appletTestCommand.d.ts +93 -2
  25. package/dist/Applet/Test/appletTestCommand.js +4 -2
  26. package/dist/Applet/Test/appletTestCommand.js.map +1 -1
  27. package/dist/Applet/Upload/appletUploadCommand.d.ts +63 -5
  28. package/dist/Applet/Upload/appletUploadCommand.js +142 -150
  29. package/dist/Applet/Upload/appletUploadCommand.js.map +1 -1
  30. package/dist/Applet/Upload/appletUploadCommandHelper.d.ts +17 -5
  31. package/dist/Applet/Upload/appletUploadCommandHelper.js +30 -47
  32. package/dist/Applet/Upload/appletUploadCommandHelper.js.map +1 -1
  33. package/dist/Applet/Upload/appletUploadFacade.d.ts +0 -7
  34. package/dist/Applet/Upload/appletUploadFacade.js +21 -23
  35. package/dist/Applet/Upload/appletUploadFacade.js.map +1 -1
  36. package/dist/Applet/Upload/appletUploadFacadeHelper.js +5 -4
  37. package/dist/Applet/Upload/appletUploadFacadeHelper.js.map +1 -1
  38. package/dist/Applet/appletCommand.d.ts +257 -2
  39. package/dist/Applet/appletCommand.js +4 -2
  40. package/dist/Applet/appletCommand.js.map +1 -1
  41. package/dist/Applet/appletFacade.d.ts +1 -3
  42. package/dist/Applet/appletFacade.js +28 -53
  43. package/dist/Applet/appletFacade.js.map +1 -1
  44. package/dist/Auth/loginCommand.d.ts +18 -2
  45. package/dist/Auth/loginCommand.js +16 -13
  46. package/dist/Auth/loginCommand.js.map +1 -1
  47. package/dist/Cache/tmpCache.js +1 -0
  48. package/dist/Cache/tmpCache.js.map +1 -1
  49. package/dist/Cli/helper.js +1 -0
  50. package/dist/Cli/helper.js.map +1 -1
  51. package/dist/Cli/packageVersion.d.ts +0 -6
  52. package/dist/Cli/packageVersion.js +10 -15
  53. package/dist/Cli/packageVersion.js.map +1 -1
  54. package/dist/Command/commandDefinition.d.ts +28 -0
  55. package/dist/Command/commandDefinition.js +8 -0
  56. package/dist/Command/commandDefinition.js.map +1 -0
  57. package/dist/Command/commandProcessor.d.ts +2 -10
  58. package/dist/Command/commandProcessor.js +13 -20
  59. package/dist/Command/commandProcessor.js.map +1 -1
  60. package/dist/Command/globalArgs.d.ts +2 -0
  61. package/dist/Command/globalArgs.js +16 -0
  62. package/dist/Command/globalArgs.js.map +1 -0
  63. package/dist/CommandLine/progressBarFactory.js +1 -0
  64. package/dist/CommandLine/progressBarFactory.js.map +1 -1
  65. package/dist/Device/Connect/connectCommand.d.ts +50 -2
  66. package/dist/Device/Connect/connectCommand.js +23 -18
  67. package/dist/Device/Connect/connectCommand.js.map +1 -1
  68. package/dist/Device/Connect/connectHelper.d.ts +0 -1
  69. package/dist/Device/Connect/connectHelper.js +39 -75
  70. package/dist/Device/Connect/connectHelper.js.map +1 -1
  71. package/dist/Device/Content/setContentCommand.d.ts +42 -2
  72. package/dist/Device/Content/setContentCommand.js +21 -13
  73. package/dist/Device/Content/setContentCommand.js.map +1 -1
  74. package/dist/Device/PowerAction/powerActionCommand.d.ts +42 -2
  75. package/dist/Device/PowerAction/powerActionCommand.js +17 -13
  76. package/dist/Device/PowerAction/powerActionCommand.js.map +1 -1
  77. package/dist/Device/deviceCommand.d.ts +129 -2
  78. package/dist/Device/deviceCommand.js +4 -2
  79. package/dist/Device/deviceCommand.js.map +1 -1
  80. package/dist/Device/deviceFacade.d.ts +11 -10
  81. package/dist/Device/deviceFacade.js +20 -15
  82. package/dist/Device/deviceFacade.js.map +1 -1
  83. package/dist/Emulator/createDomain.js +3 -2
  84. package/dist/Emulator/createDomain.js.map +1 -1
  85. package/dist/Emulator/emulatorFacade.d.ts +3 -1
  86. package/dist/Emulator/emulatorFacade.js +29 -27
  87. package/dist/Emulator/emulatorFacade.js.map +1 -1
  88. package/dist/Emulator/emulatorFactory.d.ts +3 -1
  89. package/dist/Emulator/emulatorFactory.js +19 -17
  90. package/dist/Emulator/emulatorFactory.js.map +1 -1
  91. package/dist/FileSystem/helper.js +21 -15
  92. package/dist/FileSystem/helper.js.map +1 -1
  93. package/dist/FileSystem/packageConfig.js +1 -0
  94. package/dist/FileSystem/packageConfig.js.map +1 -1
  95. package/dist/Firmware/Upload/firmwareUploadCommand.d.ts +48 -2
  96. package/dist/Firmware/Upload/firmwareUploadCommand.js +33 -20
  97. package/dist/Firmware/Upload/firmwareUploadCommand.js.map +1 -1
  98. package/dist/Firmware/Upload/firmwareUploadFacade.js +5 -4
  99. package/dist/Firmware/Upload/firmwareUploadFacade.js.map +1 -1
  100. package/dist/Firmware/Upload/firmwareUploadHelper.js +2 -2
  101. package/dist/Firmware/Upload/firmwareUploadHelper.js.map +1 -1
  102. package/dist/Firmware/firmwareCommand.d.ts +51 -2
  103. package/dist/Firmware/firmwareCommand.js +5 -8
  104. package/dist/Firmware/firmwareCommand.js.map +1 -1
  105. package/dist/Helper/localMachineHelper.d.ts +1 -0
  106. package/dist/Helper/localMachineHelper.js +94 -0
  107. package/dist/Helper/localMachineHelper.js.map +1 -0
  108. package/dist/Organization/Get/organizationGetCommand.d.ts +26 -2
  109. package/dist/Organization/Get/organizationGetCommand.js +11 -7
  110. package/dist/Organization/Get/organizationGetCommand.js.map +1 -1
  111. package/dist/Organization/List/organizationListCommand.d.ts +7 -2
  112. package/dist/Organization/List/organizationListCommand.js +6 -4
  113. package/dist/Organization/List/organizationListCommand.js.map +1 -1
  114. package/dist/Organization/SetDefault/organizationSetDefaultCommand.d.ts +18 -2
  115. package/dist/Organization/SetDefault/organizationSetDefaultCommand.js +12 -9
  116. package/dist/Organization/SetDefault/organizationSetDefaultCommand.js.map +1 -1
  117. package/dist/Organization/organizationCommand.d.ts +49 -2
  118. package/dist/Organization/organizationCommand.js +4 -2
  119. package/dist/Organization/organizationCommand.js.map +1 -1
  120. package/dist/Organization/organizationFacade.d.ts +20 -5
  121. package/dist/Organization/organizationFacade.js +60 -12
  122. package/dist/Organization/organizationFacade.js.map +1 -1
  123. package/dist/RunControl/runControlHelper.d.ts +1 -1
  124. package/dist/RunControl/runControlHelper.js +38 -14
  125. package/dist/RunControl/runControlHelper.js.map +1 -1
  126. package/dist/Stream/helper.js +1 -0
  127. package/dist/Stream/helper.js.map +1 -1
  128. package/dist/Timing/List/timingListCommand.d.ts +34 -2
  129. package/dist/Timing/List/timingListCommand.js +14 -10
  130. package/dist/Timing/List/timingListCommand.js.map +1 -1
  131. package/dist/Timing/timingCommand.d.ts +37 -2
  132. package/dist/Timing/timingCommand.js +4 -2
  133. package/dist/Timing/timingCommand.js.map +1 -1
  134. package/dist/generalCommand.d.ts +64 -0
  135. package/dist/generalCommand.js +46 -0
  136. package/dist/generalCommand.js.map +1 -0
  137. package/dist/helper.d.ts +6 -2
  138. package/dist/helper.js +13 -12
  139. package/dist/helper.js.map +1 -1
  140. package/dist/index.js +6 -18
  141. package/dist/index.js.map +1 -1
  142. package/package-lock.json +1094 -870
  143. package/package.json +14 -13
  144. package/dist/Command/ICommand.d.ts +0 -10
  145. package/dist/Command/ICommand.js +0 -3
  146. package/dist/Command/ICommand.js.map +0 -1
@@ -1,2 +1,18 @@
1
- import ICommand from '../../Command/ICommand';
2
- export declare const organizationSetDefault: ICommand;
1
+ import { CommandLineOptions } from '../../Command/commandDefinition';
2
+ declare const OPTION_LIST: readonly [{
3
+ readonly name: "organization-uid";
4
+ readonly type: StringConstructor;
5
+ readonly description: "Organization UID";
6
+ }];
7
+ export declare const organizationSetDefault: {
8
+ name: "set-default";
9
+ description: string;
10
+ optionList: readonly [{
11
+ readonly name: "organization-uid";
12
+ readonly type: StringConstructor;
13
+ readonly description: "Organization UID";
14
+ }];
15
+ commands: never[];
16
+ run(options: CommandLineOptions<typeof OPTION_LIST>): Promise<void>;
17
+ };
18
+ export {};
@@ -36,17 +36,20 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.organizationSetDefault = void 0;
39
40
  var chalk_1 = require("chalk");
40
41
  var Debug = require("debug");
41
42
  var organizationFacade_1 = require("../organizationFacade");
42
43
  var runControlHelper_1 = require("../../RunControl/runControlHelper");
44
+ var commandDefinition_1 = require("../../Command/commandDefinition");
43
45
  var debug = Debug('@signageos/cli:Organization:get');
44
- exports.organizationSetDefault = {
46
+ var OPTION_LIST = [
47
+ organizationFacade_1.ORGANIZATION_UID_OPTION,
48
+ ];
49
+ exports.organizationSetDefault = (0, commandDefinition_1.createCommandDefinition)({
45
50
  name: 'set-default',
46
51
  description: 'Set default organization to use',
47
- optionList: [
48
- organizationFacade_1.ORGANIZATION_UID_OPTION,
49
- ],
52
+ optionList: OPTION_LIST,
50
53
  commands: [],
51
54
  run: function (options) {
52
55
  return __awaiter(this, void 0, void 0, function () {
@@ -55,22 +58,22 @@ exports.organizationSetDefault = {
55
58
  switch (_a.label) {
56
59
  case 0:
57
60
  debug('Organization set default');
58
- return [4 /*yield*/, organizationFacade_1.getOrganizationUid(options)];
61
+ return [4 /*yield*/, (0, organizationFacade_1.selectOrganizationUid)(options)];
59
62
  case 1:
60
63
  defaultOrganizationUid = _a.sent();
61
- return [4 /*yield*/, organizationFacade_1.getOrganization(defaultOrganizationUid)];
64
+ return [4 /*yield*/, (0, organizationFacade_1.getOrganization)(defaultOrganizationUid)];
62
65
  case 2:
63
66
  organization = _a.sent();
64
- return [4 /*yield*/, runControlHelper_1.updateConfig({
67
+ return [4 /*yield*/, (0, runControlHelper_1.updateConfig)({
65
68
  defaultOrganizationUid: defaultOrganizationUid,
66
69
  })];
67
70
  case 3:
68
71
  _a.sent();
69
- console.log("Organization " + chalk_1.default.green(organization.title + " (" + organization.name + ", " + organization.uid + ")") + " has been set as default");
72
+ console.log("Organization ".concat(chalk_1.default.green("".concat(organization.title, " (").concat(organization.name, ", ").concat(organization.uid, ")")), " has been set as default"));
70
73
  return [2 /*return*/];
71
74
  }
72
75
  });
73
76
  });
74
77
  },
75
- };
78
+ });
76
79
  //# sourceMappingURL=organizationSetDefaultCommand.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"organizationSetDefaultCommand.js","sourceRoot":"","sources":["../../../src/Organization/SetDefault/organizationSetDefaultCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA0B;AAC1B,6BAA+B;AAE/B,4DAAqG;AAErG,sEAAiE;AACjE,IAAM,KAAK,GAAG,KAAK,CAAC,iCAAiC,CAAC,CAAC;AAE1C,QAAA,sBAAsB,GAAa;IAC/C,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,iCAAiC;IAC9C,UAAU,EAAE;QACX,4CAAuB;KACvB;IACD,QAAQ,EAAE,EAAE;IACN,GAAG,EAAT,UAAU,OAA2B;;;;;;wBACpC,KAAK,CAAC,0BAA0B,CAAC,CAAC;wBACH,qBAAM,uCAAkB,CAAC,OAAO,CAAC,EAAA;;wBAA1D,sBAAsB,GAAG,SAAiC;wBAC3C,qBAAM,oCAAe,CAAC,sBAAsB,CAAC,EAAA;;wBAA5D,YAAY,GAAG,SAA6C;wBAClE,qBAAM,+BAAY,CAAC;gCAClB,sBAAsB,wBAAA;6BACtB,CAAC,EAAA;;wBAFF,SAEE,CAAC;wBACH,OAAO,CAAC,GAAG,CAAC,kBAAgB,eAAK,CAAC,KAAK,CAAI,YAAY,CAAC,KAAK,UAAK,YAAY,CAAC,IAAI,UAAK,YAAY,CAAC,GAAG,MAAG,CAAC,6BAA0B,CAAC,CAAC;;;;;KACxI;CACD,CAAC"}
1
+ {"version":3,"file":"organizationSetDefaultCommand.js","sourceRoot":"","sources":["../../../src/Organization/SetDefault/organizationSetDefaultCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA0B;AAC1B,6BAA+B;AAC/B,4DAAwG;AACxG,sEAAiE;AACjE,qEAA8F;AAC9F,IAAM,KAAK,GAAG,KAAK,CAAC,iCAAiC,CAAC,CAAC;AAEvD,IAAM,WAAW,GAAG;IACnB,4CAAuB;CACd,CAAC;AAEE,QAAA,sBAAsB,GAAG,IAAA,2CAAuB,EAAC;IAC7D,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,iCAAiC;IAC9C,UAAU,EAAE,WAAW;IACvB,QAAQ,EAAE,EAAE;IACN,GAAG,EAAT,UAAU,OAA+C;;;;;;wBACxD,KAAK,CAAC,0BAA0B,CAAC,CAAC;wBACH,qBAAM,IAAA,0CAAqB,EAAC,OAAO,CAAC,EAAA;;wBAA7D,sBAAsB,GAAG,SAAoC;wBAC9C,qBAAM,IAAA,oCAAe,EAAC,sBAAsB,CAAC,EAAA;;wBAA5D,YAAY,GAAG,SAA6C;wBAClE,qBAAM,IAAA,+BAAY,EAAC;gCAClB,sBAAsB,wBAAA;6BACtB,CAAC,EAAA;;wBAFF,SAEE,CAAC;wBACH,OAAO,CAAC,GAAG,CAAC,uBAAgB,eAAK,CAAC,KAAK,CAAC,UAAG,YAAY,CAAC,KAAK,eAAK,YAAY,CAAC,IAAI,eAAK,YAAY,CAAC,GAAG,MAAG,CAAC,6BAA0B,CAAC,CAAC;;;;;KACxI;CACD,CAAC,CAAC"}
@@ -1,2 +1,49 @@
1
- import ICommand from "../Command/ICommand";
2
- export declare const organization: ICommand;
1
+ export declare const organization: {
2
+ name: "organization";
3
+ description: string;
4
+ optionList: never[];
5
+ commands: ({
6
+ name: "list";
7
+ description: string;
8
+ optionList: never[];
9
+ commands: never[];
10
+ run(): Promise<void>;
11
+ } | {
12
+ name: "get";
13
+ description: string;
14
+ optionList: readonly [{
15
+ readonly name: "no-default-organization";
16
+ readonly type: BooleanConstructor;
17
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
18
+ }, {
19
+ readonly name: "organization-uid";
20
+ readonly type: StringConstructor;
21
+ readonly description: "Organization UID";
22
+ }];
23
+ commands: never[];
24
+ run(options: import("../Command/commandDefinition").CommandLineOptions<readonly [{
25
+ readonly name: "no-default-organization";
26
+ readonly type: BooleanConstructor;
27
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
28
+ }, {
29
+ readonly name: "organization-uid";
30
+ readonly type: StringConstructor;
31
+ readonly description: "Organization UID";
32
+ }]>): Promise<void>;
33
+ } | {
34
+ name: "set-default";
35
+ description: string;
36
+ optionList: readonly [{
37
+ readonly name: "organization-uid";
38
+ readonly type: StringConstructor;
39
+ readonly description: "Organization UID";
40
+ }];
41
+ commands: never[];
42
+ run(options: import("../Command/commandDefinition").CommandLineOptions<readonly [{
43
+ readonly name: "organization-uid";
44
+ readonly type: StringConstructor;
45
+ readonly description: "Organization UID";
46
+ }]>): Promise<void>;
47
+ })[];
48
+ run(): Promise<never>;
49
+ };
@@ -36,10 +36,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.organization = void 0;
39
40
  var organizationListCommand_1 = require("./List/organizationListCommand");
40
41
  var organizationGetCommand_1 = require("./Get/organizationGetCommand");
41
42
  var organizationSetDefaultCommand_1 = require("./SetDefault/organizationSetDefaultCommand");
42
- exports.organization = {
43
+ var commandDefinition_1 = require("../Command/commandDefinition");
44
+ exports.organization = (0, commandDefinition_1.createCommandDefinition)({
43
45
  name: 'organization',
44
46
  description: 'Organization management',
45
47
  optionList: [],
@@ -55,5 +57,5 @@ exports.organization = {
55
57
  });
56
58
  });
57
59
  },
58
- };
60
+ });
59
61
  //# sourceMappingURL=organizationCommand.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"organizationCommand.js","sourceRoot":"","sources":["../../src/Organization/organizationCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0EAAkE;AAClE,uEAA+D;AAC/D,4FAAoF;AAEvE,QAAA,YAAY,GAAa;IACrC,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,yBAAyB;IACtC,UAAU,EAAE,EAAE;IACd,QAAQ,EAAE;QACT,0CAAgB;QAChB,wCAAe;QACf,sDAAsB;KACtB;IACK,GAAG;;;gBACR,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;;;KACnC;CACD,CAAC"}
1
+ {"version":3,"file":"organizationCommand.js","sourceRoot":"","sources":["../../src/Organization/organizationCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0EAAkE;AAClE,uEAA+D;AAC/D,4FAAoF;AACpF,kEAAuE;AAE1D,QAAA,YAAY,GAAG,IAAA,2CAAuB,EAAC;IACnD,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,yBAAyB;IACtC,UAAU,EAAE,EAAE;IACd,QAAQ,EAAE;QACT,0CAAgB;QAChB,wCAAe;QACf,sDAAsB;KACtB;IACK,GAAG;;;gBACR,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;;;KACnC;CACD,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { CommandLineOptions } from 'command-line-args';
1
+ import { CommandLineOptions } from '../Command/commandDefinition';
2
2
  export interface IOrganization {
3
3
  uid: string;
4
4
  name: string;
@@ -8,10 +8,25 @@ export interface IOrganization {
8
8
  oauthClientSecret: string;
9
9
  }
10
10
  export declare const ORGANIZATION_UID_OPTION: {
11
- name: string;
12
- type: StringConstructor;
13
- description: string;
11
+ readonly name: "organization-uid";
12
+ readonly type: StringConstructor;
13
+ readonly description: "Organization UID";
14
+ };
15
+ export declare const NO_DEFAULT_ORGANIZATION_OPTION: {
16
+ readonly name: "no-default-organization";
17
+ readonly type: BooleanConstructor;
18
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
14
19
  };
15
- export declare function getOrganizationUid(options: CommandLineOptions): Promise<string>;
20
+ export declare const ORGANIZATION_OPTIONS: ({
21
+ readonly name: "organization-uid";
22
+ readonly type: StringConstructor;
23
+ readonly description: "Organization UID";
24
+ } | {
25
+ readonly name: "no-default-organization";
26
+ readonly type: BooleanConstructor;
27
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
28
+ })[];
29
+ export declare function getOrganizationUidOrDefaultOrSelect(options: CommandLineOptions<[typeof ORGANIZATION_UID_OPTION, typeof NO_DEFAULT_ORGANIZATION_OPTION]>): Promise<string>;
30
+ export declare function selectOrganizationUid(options: CommandLineOptions<[typeof ORGANIZATION_UID_OPTION]>): Promise<string>;
16
31
  export declare function getOrganizations(): Promise<IOrganization[]>;
17
32
  export declare function getOrganization(organizationUid: string): Promise<IOrganization>;
@@ -36,15 +36,63 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.getOrganization = exports.getOrganizations = exports.selectOrganizationUid = exports.getOrganizationUidOrDefaultOrSelect = exports.ORGANIZATION_OPTIONS = exports.NO_DEFAULT_ORGANIZATION_OPTION = exports.ORGANIZATION_UID_OPTION = void 0;
39
40
  var chalk_1 = require("chalk");
40
41
  var Debug = require("debug");
41
42
  var prompts = require("prompts");
42
43
  var helper_1 = require("../helper");
43
44
  var runControlHelper_1 = require("../RunControl/runControlHelper");
44
- var commandProcessor_1 = require("../Command/commandProcessor");
45
+ var globalArgs_1 = require("../Command/globalArgs");
45
46
  var debug = Debug('@signageos/cli:Organization:facade');
46
47
  exports.ORGANIZATION_UID_OPTION = { name: 'organization-uid', type: String, description: 'Organization UID' };
47
- function getOrganizationUid(options) {
48
+ exports.NO_DEFAULT_ORGANIZATION_OPTION = {
49
+ name: 'no-default-organization',
50
+ type: Boolean,
51
+ description: 'Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default',
52
+ };
53
+ exports.ORGANIZATION_OPTIONS = [
54
+ exports.ORGANIZATION_UID_OPTION,
55
+ exports.NO_DEFAULT_ORGANIZATION_OPTION,
56
+ ];
57
+ function getOrganizationUidOrDefaultOrSelect(options) {
58
+ return __awaiter(this, void 0, void 0, function () {
59
+ var config, organizationUid, response;
60
+ return __generator(this, function (_a) {
61
+ switch (_a.label) {
62
+ case 0: return [4 /*yield*/, (0, runControlHelper_1.loadConfig)()];
63
+ case 1:
64
+ config = _a.sent();
65
+ organizationUid = options['organization-uid'];
66
+ if (!organizationUid && !options['no-default-organization']) {
67
+ organizationUid = config.defaultOrganizationUid;
68
+ }
69
+ if (!!organizationUid) return [3 /*break*/, 5];
70
+ return [4 /*yield*/, selectOrganizationUid(options)];
71
+ case 2:
72
+ organizationUid = _a.sent();
73
+ if (!organizationUid) return [3 /*break*/, 5];
74
+ return [4 /*yield*/, prompts({
75
+ type: 'confirm',
76
+ name: 'setDefault',
77
+ message: "Do you want to set the organization as a default for current profile?",
78
+ initial: false,
79
+ })];
80
+ case 3:
81
+ response = _a.sent();
82
+ if (!response.setDefault) return [3 /*break*/, 5];
83
+ return [4 /*yield*/, (0, runControlHelper_1.updateConfig)({
84
+ defaultOrganizationUid: organizationUid,
85
+ })];
86
+ case 4:
87
+ _a.sent();
88
+ _a.label = 5;
89
+ case 5: return [2 /*return*/, organizationUid];
90
+ }
91
+ });
92
+ });
93
+ }
94
+ exports.getOrganizationUidOrDefaultOrSelect = getOrganizationUidOrDefaultOrSelect;
95
+ function selectOrganizationUid(options) {
48
96
  return __awaiter(this, void 0, void 0, function () {
49
97
  var organizationUid, organizations, response;
50
98
  return __generator(this, function (_a) {
@@ -60,7 +108,7 @@ function getOrganizationUid(options) {
60
108
  name: 'organizationUid',
61
109
  message: "Select organization to use",
62
110
  choices: organizations.map(function (org) { return ({
63
- title: org.title + " (" + org.name + ", " + org.uid + ")",
111
+ title: "".concat(org.title, " (").concat(org.name, ", ").concat(org.uid, ")"),
64
112
  value: org.uid,
65
113
  }); }),
66
114
  })];
@@ -78,7 +126,7 @@ function getOrganizationUid(options) {
78
126
  });
79
127
  });
80
128
  }
81
- exports.getOrganizationUid = getOrganizationUid;
129
+ exports.selectOrganizationUid = selectOrganizationUid;
82
130
  function getOrganizations() {
83
131
  return __awaiter(this, void 0, void 0, function () {
84
132
  var ORGANIZATION_RESOURCE, config, options, responseOfGet, bodyOfGet, _a, _b;
@@ -86,18 +134,18 @@ function getOrganizations() {
86
134
  switch (_c.label) {
87
135
  case 0:
88
136
  ORGANIZATION_RESOURCE = 'organization';
89
- return [4 /*yield*/, runControlHelper_1.loadConfig()];
137
+ return [4 /*yield*/, (0, runControlHelper_1.loadConfig)()];
90
138
  case 1:
91
139
  config = _c.sent();
92
140
  options = {
93
- url: commandProcessor_1.getGlobalApiUrl(),
141
+ url: (0, globalArgs_1.getGlobalApiUrl)(),
94
142
  auth: {
95
143
  clientId: config.identification,
96
144
  secret: config.apiSecurityToken,
97
145
  },
98
146
  version: 'v1',
99
147
  };
100
- return [4 /*yield*/, helper_1.getResource(options, ORGANIZATION_RESOURCE)];
148
+ return [4 /*yield*/, (0, helper_1.getResource)(options, ORGANIZATION_RESOURCE)];
101
149
  case 2:
102
150
  responseOfGet = _c.sent();
103
151
  _b = (_a = JSON).parse;
@@ -109,7 +157,7 @@ function getOrganizations() {
109
157
  return [2 /*return*/, bodyOfGet];
110
158
  }
111
159
  else if (responseOfGet.status === 403) {
112
- throw new Error("Authentication error. Try to login using " + chalk_1.default.green('sos login'));
160
+ throw new Error("Authentication error. Try to login using ".concat(chalk_1.default.green('sos login')));
113
161
  }
114
162
  else {
115
163
  throw new Error('Unknown error: ' + (bodyOfGet && bodyOfGet.message ? bodyOfGet.message : responseOfGet.status));
@@ -127,18 +175,18 @@ function getOrganization(organizationUid) {
127
175
  switch (_c.label) {
128
176
  case 0:
129
177
  ORGANIZATION_RESOURCE = 'organization';
130
- return [4 /*yield*/, runControlHelper_1.loadConfig()];
178
+ return [4 /*yield*/, (0, runControlHelper_1.loadConfig)()];
131
179
  case 1:
132
180
  config = _c.sent();
133
181
  options = {
134
- url: commandProcessor_1.getGlobalApiUrl(),
182
+ url: (0, globalArgs_1.getGlobalApiUrl)(),
135
183
  auth: {
136
184
  clientId: config.identification,
137
185
  secret: config.apiSecurityToken,
138
186
  },
139
187
  version: 'v1',
140
188
  };
141
- return [4 /*yield*/, helper_1.getResource(options, ORGANIZATION_RESOURCE + '/' + organizationUid)];
189
+ return [4 /*yield*/, (0, helper_1.getResource)(options, ORGANIZATION_RESOURCE + '/' + organizationUid)];
142
190
  case 2:
143
191
  responseOfGet = _c.sent();
144
192
  _b = (_a = JSON).parse;
@@ -150,7 +198,7 @@ function getOrganization(organizationUid) {
150
198
  return [2 /*return*/, bodyOfGet];
151
199
  }
152
200
  else if (responseOfGet.status === 403) {
153
- throw new Error("Authentication error. Try to login using " + chalk_1.default.green('sos login'));
201
+ throw new Error("Authentication error. Try to login using ".concat(chalk_1.default.green('sos login')));
154
202
  }
155
203
  else {
156
204
  throw new Error('Unknown error: ' + (bodyOfGet && bodyOfGet.message ? bodyOfGet.message : responseOfGet.status));
@@ -1 +1 @@
1
- {"version":3,"file":"organizationFacade.js","sourceRoot":"","sources":["../../src/Organization/organizationFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA0B;AAC1B,6BAA+B;AAC/B,iCAAmC;AAEnC,oCAAyD;AACzD,mEAA4D;AAC5D,gEAA8D;AAC9D,IAAM,KAAK,GAAG,KAAK,CAAC,oCAAoC,CAAC,CAAC;AAW7C,QAAA,uBAAuB,GAAG,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;AAEnH,SAAsB,kBAAkB,CAAC,OAA2B;;;;;;oBAC/D,eAAe,GAAuB,OAAO,CAAC,kBAAkB,CAAC,CAAC;yBAClE,CAAC,eAAe,EAAhB,wBAAgB;oBACG,qBAAM,gBAAgB,EAAE,EAAA;;oBAAxC,aAAa,GAAG,SAAwB;oBAC7B,qBAAM,OAAO,CAAC;4BAC9B,IAAI,EAAE,cAAc;4BACpB,IAAI,EAAE,iBAAiB;4BACvB,OAAO,EAAE,4BAA4B;4BACrC,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,UAAC,GAAkB,IAAK,OAAA,CAAC;gCACnD,KAAK,EAAK,GAAG,CAAC,KAAK,UAAK,GAAG,CAAC,IAAI,UAAK,GAAG,CAAC,GAAG,MAAG;gCAC/C,KAAK,EAAE,GAAG,CAAC,GAAG;6BACd,CAAC,EAHiD,CAGjD,CAAC;yBACH,CAAC,EAAA;;oBARI,QAAQ,GAAG,SAQf;oBACF,KAAK,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AI,CAAA,CAAC,KAAK,CAAA;oBAAC,qBAAM,aAAa,CAAC,IAAI,EAAE,EAAA;;oBAAjD,SAAS,GAAG,cAAW,SAA0B,EAAE,wBAAe,EAAC;oBACzE,KAAK,CAAC,2BAA2B,EAAE,SAAS,CAAC,CAAC;oBAC9C,IAAI,aAAa,CAAC,MAAM,KAAK,GAAG,EAAE;wBACjC,sBAAO,SAAS,EAAC;qBACjB;yBAAM,IAAI,aAAa,CAAC,MAAM,KAAK,GAAG,EAAE;wBACxC,MAAM,IAAI,KAAK,CAAC,mDAA4C,eAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAE,CAAC,CAAC;qBACxF;yBAAM;wBACN,MAAM,IAAI,KAAK,CAAC,iBAAiB,GAAG,CAAC,SAAS,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;qBACjH;;;;;CACD;AArBD,0CAqBC"}
@@ -4,7 +4,7 @@ export interface IConfig {
4
4
  defaultOrganizationUid?: string;
5
5
  emulatorUid?: string;
6
6
  }
7
- export declare function saveConfig(config: IConfig): Promise<void>;
7
+ export declare function saveConfig(newConfig: IConfig): Promise<void>;
8
8
  export declare function updateConfig(partialConfig: Partial<IConfig>): Promise<void>;
9
9
  export declare function loadConfig(): Promise<IConfig>;
10
10
  export declare function getConfigFilePath(): string;
@@ -47,25 +47,46 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
47
47
  }
48
48
  };
49
49
  Object.defineProperty(exports, "__esModule", { value: true });
50
+ exports.getConfigFilePath = exports.loadConfig = exports.updateConfig = exports.saveConfig = void 0;
50
51
  var fs = require("fs-extra");
51
52
  var ini = require("ini");
52
53
  var path = require("path");
53
54
  var os = require("os");
55
+ var _ = require("lodash");
54
56
  var chalk_1 = require("chalk");
55
57
  var parameters = require("../../config/parameters");
58
+ var globalArgs_1 = require("../Command/globalArgs");
56
59
  var RUN_CONTROL_FILENAME = '.sosrc';
57
- function saveConfig(config) {
60
+ function saveConfig(newConfig) {
58
61
  return __awaiter(this, void 0, void 0, function () {
59
- var runControlFilePath, runControlFileContent;
62
+ var runControlFilePath, configFile, originalRCFileContent, profile, newRCFileContent;
60
63
  return __generator(this, function (_a) {
61
64
  switch (_a.label) {
62
65
  case 0:
63
66
  runControlFilePath = getConfigFilePath();
64
- runControlFileContent = ini.encode(config);
65
- return [4 /*yield*/, fs.writeFile(runControlFilePath, runControlFileContent, {
67
+ configFile = {};
68
+ return [4 /*yield*/, fs.pathExists(runControlFilePath)];
69
+ case 1:
70
+ if (!_a.sent()) return [3 /*break*/, 3];
71
+ return [4 /*yield*/, fs.readFile(runControlFilePath)];
72
+ case 2:
73
+ originalRCFileContent = _a.sent();
74
+ configFile = ini.decode(originalRCFileContent.toString());
75
+ _a.label = 3;
76
+ case 3:
77
+ profile = (0, globalArgs_1.getGlobalProfile)();
78
+ if (profile) {
79
+ configFile["profile ".concat(profile)] = newConfig;
80
+ }
81
+ else {
82
+ configFile = _.omitBy(configFile, function (_val, key) { return !key.startsWith('profile '); });
83
+ Object.assign(configFile, newConfig);
84
+ }
85
+ newRCFileContent = ini.encode(configFile);
86
+ return [4 /*yield*/, fs.writeFile(runControlFilePath, newRCFileContent, {
66
87
  mode: 384,
67
88
  })];
68
- case 1:
89
+ case 4:
69
90
  _a.sent();
70
91
  return [2 /*return*/];
71
92
  }
@@ -92,22 +113,25 @@ function updateConfig(partialConfig) {
92
113
  }
93
114
  exports.updateConfig = updateConfig;
94
115
  function loadConfig() {
116
+ var _a;
95
117
  return __awaiter(this, void 0, void 0, function () {
96
- var runControlFilePath, config, runControlFileContent;
97
- return __generator(this, function (_a) {
98
- switch (_a.label) {
118
+ var runControlFilePath, configFile, runControlFileContent, profile, config;
119
+ return __generator(this, function (_b) {
120
+ switch (_b.label) {
99
121
  case 0:
100
122
  runControlFilePath = getConfigFilePath();
101
- config = {};
123
+ configFile = {};
102
124
  return [4 /*yield*/, fs.pathExists(runControlFilePath)];
103
125
  case 1:
104
- if (!_a.sent()) return [3 /*break*/, 3];
126
+ if (!_b.sent()) return [3 /*break*/, 3];
105
127
  return [4 /*yield*/, fs.readFile(runControlFilePath)];
106
128
  case 2:
107
- runControlFileContent = _a.sent();
108
- config = ini.decode(runControlFileContent.toString());
109
- _a.label = 3;
129
+ runControlFileContent = _b.sent();
130
+ configFile = ini.decode(runControlFileContent.toString());
131
+ _b.label = 3;
110
132
  case 3:
133
+ profile = (0, globalArgs_1.getGlobalProfile)();
134
+ config = profile ? (_a = configFile["profile ".concat(profile)]) !== null && _a !== void 0 ? _a : {} : configFile;
111
135
  // Overriding from env vars if available
112
136
  if (parameters.accountAuth.tokenId) {
113
137
  config.identification = parameters.accountAuth.tokenId;
@@ -120,7 +144,7 @@ function loadConfig() {
120
144
  }
121
145
  // Temporary suggestion to login getting faster token
122
146
  if (config.identification && !config.identification.match(/[0-9a-f]{20,20}/)) {
123
- console.warn(chalk_1.default.bold.yellow("Your authentication token is outdated. Please do the " + chalk_1.default.green('sos login') + " again."));
147
+ console.warn(chalk_1.default.bold.yellow("Your authentication token is outdated. Please do the ".concat(chalk_1.default.green('sos login'), " again.")));
124
148
  console.warn('After the log in, commands are becoming almost 10x faster.');
125
149
  }
126
150
  return [2 /*return*/, config];
@@ -1 +1 @@
1
- {"version":3,"file":"runControlHelper.js","sourceRoot":"","sources":["../../src/RunControl/runControlHelper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA+B;AAC/B,yBAA2B;AAC3B,2BAA6B;AAC7B,uBAAyB;AACzB,+BAA0B;AAC1B,oDAAsD;AAEtD,IAAM,oBAAoB,GAAG,QAAQ,CAAC;AAStC,SAAsB,UAAU,CAAC,MAAe;;;;;;oBACzC,kBAAkB,GAAG,iBAAiB,EAAE,CAAC;oBACzC,qBAAqB,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,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,CAAC,MAAA,UAAU,CAAC,kBAAW,OAAO,CAAE,CAAC,mCAAI,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;oBAE7E,wCAAwC;oBACxC,IAAI,UAAU,CAAC,WAAW,CAAC,OAAO,EAAE;wBACnC,MAAM,CAAC,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC;qBACvD;oBACD,IAAI,UAAU,CAAC,WAAW,CAAC,KAAK,EAAE;wBACjC,MAAM,CAAC,gBAAgB,GAAG,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC;qBACvD;oBACD,IAAI,UAAU,CAAC,sBAAsB,EAAE;wBACtC,MAAM,CAAC,sBAAsB,GAAG,UAAU,CAAC,sBAAsB,CAAC;qBAClE;oBAED,qDAAqD;oBACrD,IAAI,MAAM,CAAC,cAAc,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE;wBAC7E,OAAO,CAAC,IAAI,CACX,eAAK,CAAC,IAAI,CAAC,MAAM,CAAC,+DAAwD,eAAK,CAAC,KAAK,CAAC,WAAW,CAAC,YAAS,CAAC,CAC5G,CAAC;wBACF,OAAO,CAAC,IAAI,CAAC,4DAA4D,CAAC,CAAC;qBAC3E;oBAED,sBAAO,MAAM,EAAC;;;;CACd;AA/BD,gCA+BC;AAED,SAAgB,iBAAiB;IAChC,IAAM,iBAAiB,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;IACvC,IAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,CAAC;IAC9E,OAAO,kBAAkB,CAAC;AAC3B,CAAC;AAJD,8CAIC"}
@@ -36,6 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.computeMD5 = void 0;
39
40
  var crypto = require("crypto");
40
41
  function computeMD5(input) {
41
42
  return __awaiter(this, void 0, void 0, function () {
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../src/Stream/helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,SAAsB,UAAU,CAAC,KAA4B;;;YAC5D,sBAAO,IAAI,OAAO,CAAC,UAAC,OAAgC,EAAE,MAAkB;oBACvE,IAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;oBACtC,KAAK,CAAC,EAAE,CAAC,UAAU,EAAE;wBACpB,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;wBAC1B,IAAI,IAAI,EAAE;4BACT,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;yBAClB;6BAAM;4BACN,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;yBAC/B;oBACF,CAAC,CAAC,CAAC;oBACH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC3B,CAAC,CAAC,EAAC;;;CACH;AAbD,gCAaC"}
1
+ {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../src/Stream/helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,SAAsB,UAAU,CAAC,KAA4B;;;YAC5D,sBAAO,IAAI,OAAO,CAAC,UAAC,OAAgC,EAAE,MAAkB;oBACvE,IAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;oBACtC,KAAK,CAAC,EAAE,CAAC,UAAU,EAAE;wBACpB,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;wBAC1B,IAAI,IAAI,EAAE;4BACT,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;yBAClB;6BAAM;4BACN,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;yBAC/B;oBACF,CAAC,CAAC,CAAC;oBACH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC3B,CAAC,CAAC,EAAC;;;CACH;AAbD,gCAaC"}
@@ -1,2 +1,34 @@
1
- import ICommand from '../../Command/ICommand';
2
- export declare const timingList: ICommand;
1
+ import { CommandLineOptions } from '../../Command/commandDefinition';
2
+ declare const OPTION_LIST: readonly [{
3
+ readonly name: "no-default-organization";
4
+ readonly type: BooleanConstructor;
5
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
6
+ }, {
7
+ readonly name: "organization-uid";
8
+ readonly type: StringConstructor;
9
+ readonly description: "Organization UID";
10
+ }, {
11
+ readonly name: "device-uid";
12
+ readonly type: StringConstructor;
13
+ readonly description: "Device UID";
14
+ }];
15
+ export declare const timingList: {
16
+ name: "list";
17
+ description: string;
18
+ optionList: readonly [{
19
+ readonly name: "no-default-organization";
20
+ readonly type: BooleanConstructor;
21
+ readonly description: "Prevent using the defaultOrganizationUid from ~/.sosrc which were set using command sos organization set-default";
22
+ }, {
23
+ readonly name: "organization-uid";
24
+ readonly type: StringConstructor;
25
+ readonly description: "Organization UID";
26
+ }, {
27
+ readonly name: "device-uid";
28
+ readonly type: StringConstructor;
29
+ readonly description: "Device UID";
30
+ }];
31
+ commands: never[];
32
+ run(options: CommandLineOptions<typeof OPTION_LIST>): Promise<void>;
33
+ };
34
+ export {};
@@ -36,19 +36,23 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.timingList = void 0;
39
40
  var chalk_1 = require("chalk");
40
41
  var Debug = require("debug");
41
42
  var organizationFacade_1 = require("../../Organization/organizationFacade");
42
43
  var deviceFacade_1 = require("../../Device/deviceFacade");
43
44
  var helper_1 = require("../../helper");
45
+ var commandDefinition_1 = require("../../Command/commandDefinition");
44
46
  var debug = Debug('@signageos/cli:Timing:list');
45
- exports.timingList = {
47
+ var OPTION_LIST = [
48
+ organizationFacade_1.NO_DEFAULT_ORGANIZATION_OPTION,
49
+ organizationFacade_1.ORGANIZATION_UID_OPTION,
50
+ deviceFacade_1.DEVICE_UID_OPTION,
51
+ ];
52
+ exports.timingList = (0, commandDefinition_1.createCommandDefinition)({
46
53
  name: 'list',
47
54
  description: 'List timings assigned to device',
48
- optionList: [
49
- organizationFacade_1.ORGANIZATION_UID_OPTION,
50
- deviceFacade_1.DEVICE_UID_OPTION,
51
- ],
55
+ optionList: OPTION_LIST,
52
56
  commands: [],
53
57
  run: function (options) {
54
58
  return __awaiter(this, void 0, void 0, function () {
@@ -57,14 +61,14 @@ exports.timingList = {
57
61
  switch (_a.label) {
58
62
  case 0:
59
63
  debug('Timing create');
60
- return [4 /*yield*/, organizationFacade_1.getOrganizationUid(options)];
64
+ return [4 /*yield*/, (0, organizationFacade_1.getOrganizationUidOrDefaultOrSelect)(options)];
61
65
  case 1:
62
66
  organizationUid = _a.sent();
63
- return [4 /*yield*/, organizationFacade_1.getOrganization(organizationUid)];
67
+ return [4 /*yield*/, (0, organizationFacade_1.getOrganization)(organizationUid)];
64
68
  case 2:
65
69
  organization = _a.sent();
66
- restApi = helper_1.createOrganizationRestApi(organization);
67
- return [4 /*yield*/, deviceFacade_1.getDeviceUid(restApi, options)];
70
+ restApi = (0, helper_1.createOrganizationRestApi)(organization);
71
+ return [4 /*yield*/, (0, deviceFacade_1.getDeviceUid)(restApi, options)];
68
72
  case 3:
69
73
  deviceUid = _a.sent();
70
74
  return [4 /*yield*/, restApi.timing.getList({
@@ -78,5 +82,5 @@ exports.timingList = {
78
82
  });
79
83
  });
80
84
  },
81
- };
85
+ });
82
86
  //# sourceMappingURL=timingListCommand.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"timingListCommand.js","sourceRoot":"","sources":["../../../src/Timing/List/timingListCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;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