zcatalyst-cli 1.12.1 → 1.13.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 (179) hide show
  1. package/lib/apig-utils.js +39 -39
  2. package/lib/archiver.js +13 -9
  3. package/lib/authentication/index.js +22 -18
  4. package/lib/authentication/login.js +32 -32
  5. package/lib/bin/catalyst.js +15 -15
  6. package/lib/cli_table/src/cell.js +26 -26
  7. package/lib/cli_table/src/layout-manager.js +44 -45
  8. package/lib/cli_table/src/table.js +9 -9
  9. package/lib/cli_table/src/utils.js +35 -36
  10. package/lib/client-utils.js +18 -18
  11. package/lib/client.js +1 -1
  12. package/lib/command_needs/auth.js +7 -7
  13. package/lib/command_needs/rc.js +24 -24
  14. package/lib/commands/apig/disable.js +5 -5
  15. package/lib/commands/apig/enable.js +5 -5
  16. package/lib/commands/apig/status.js +9 -9
  17. package/lib/commands/client/delete.js +18 -18
  18. package/lib/commands/client/setup.js +8 -4
  19. package/lib/commands/deploy.js +18 -14
  20. package/lib/commands/ds/export.js +11 -11
  21. package/lib/commands/ds/import.js +12 -12
  22. package/lib/commands/ds/status.js +10 -10
  23. package/lib/commands/event/generate/index.js +21 -17
  24. package/lib/commands/event/generate/integ.js +7 -3
  25. package/lib/commands/functions/add.js +8 -4
  26. package/lib/commands/functions/config.js +5 -5
  27. package/lib/commands/functions/delete.js +20 -20
  28. package/lib/commands/functions/setup.js +8 -4
  29. package/lib/commands/functions/shell.js +7 -3
  30. package/lib/commands/help.js +4 -4
  31. package/lib/commands/iac/export.js +8 -8
  32. package/lib/commands/iac/import.js +23 -19
  33. package/lib/commands/iac/pack.js +15 -11
  34. package/lib/commands/iac/status.js +6 -2
  35. package/lib/commands/index.js +5 -1
  36. package/lib/commands/init.js +14 -10
  37. package/lib/commands/login.js +5 -1
  38. package/lib/commands/logout.js +5 -1
  39. package/lib/commands/project/list.js +14 -10
  40. package/lib/commands/project/reset.js +5 -5
  41. package/lib/commands/project/use.js +9 -9
  42. package/lib/commands/pull.js +18 -14
  43. package/lib/commands/run.js +13 -9
  44. package/lib/commands/serve.js +5 -1
  45. package/lib/commands/token/generate.js +6 -2
  46. package/lib/commands/token/list.js +7 -3
  47. package/lib/commands/token/revoke.js +6 -2
  48. package/lib/commands/whoami.js +3 -3
  49. package/lib/dc.js +2 -2
  50. package/lib/deploy/features/apig.js +6 -6
  51. package/lib/deploy/features/client.js +1 -1
  52. package/lib/deploy/features/functions/index.js +9 -9
  53. package/lib/deploy/features/index.js +5 -1
  54. package/lib/deploy/index.js +2 -2
  55. package/lib/endpoints/index.js +17 -13
  56. package/lib/endpoints/lib/apig.js +5 -5
  57. package/lib/endpoints/lib/applogic.js +4 -4
  58. package/lib/endpoints/lib/cache.js +3 -3
  59. package/lib/endpoints/lib/catalyst-details.js +1 -1
  60. package/lib/endpoints/lib/client.js +5 -5
  61. package/lib/endpoints/lib/datastore.js +2 -2
  62. package/lib/endpoints/lib/ds-bulk.js +5 -5
  63. package/lib/endpoints/lib/env.js +1 -1
  64. package/lib/endpoints/lib/event-bus.js +1 -1
  65. package/lib/endpoints/lib/filestore.js +2 -2
  66. package/lib/endpoints/lib/functions.js +4 -4
  67. package/lib/endpoints/lib/iac.js +10 -10
  68. package/lib/endpoints/lib/project.js +20 -5
  69. package/lib/endpoints/lib/queue.js +3 -3
  70. package/lib/endpoints/lib/sdk.js +1 -1
  71. package/lib/endpoints/lib/zcql.js +1 -1
  72. package/lib/error.js +1 -1
  73. package/lib/errorOut.js +2 -2
  74. package/lib/event_generate/cache.js +5 -5
  75. package/lib/event_generate/custom.js +2 -2
  76. package/lib/event_generate/datastore.js +5 -5
  77. package/lib/event_generate/filestore.js +5 -5
  78. package/lib/event_generate/integration/cliq.js +3 -3
  79. package/lib/event_generate/user.js +1 -1
  80. package/lib/event_generate/webapp.js +5 -5
  81. package/lib/execute-script.js +19 -15
  82. package/lib/express_middlewares/authenticator.js +32 -5
  83. package/lib/express_middlewares/logger.js +2 -2
  84. package/lib/express_middlewares/unknownReqProxy.js +1 -1
  85. package/lib/fn-utils/index.js +5 -1
  86. package/lib/fn-utils/lib/common.js +44 -44
  87. package/lib/fn-utils/lib/integ.js +9 -9
  88. package/lib/fn-utils/lib/java.js +46 -46
  89. package/lib/fn-utils/lib/node.js +7 -7
  90. package/lib/fn-watcher.js +9 -11
  91. package/lib/iac/status/bundle.js +5 -5
  92. package/lib/iac/status/deploy.js +4 -4
  93. package/lib/index.js +2 -2
  94. package/lib/init/dependencies/npm-install.js +1 -1
  95. package/lib/init/dependencies/package-json.js +6 -6
  96. package/lib/init/features/client/index.js +5 -1
  97. package/lib/init/features/client/initializers/angular.js +16 -12
  98. package/lib/init/features/client/initializers/basic.js +10 -6
  99. package/lib/init/features/client/initializers/lyte.js +11 -7
  100. package/lib/init/features/client/initializers/react.js +13 -9
  101. package/lib/init/features/functions/index.js +9 -9
  102. package/lib/init/features/functions/languages/java.js +10 -10
  103. package/lib/init/features/functions/languages/node.js +9 -9
  104. package/lib/init/features/index.js +12 -8
  105. package/lib/init/features/project.js +20 -20
  106. package/lib/init/index.js +2 -2
  107. package/lib/init/util/client.js +7 -3
  108. package/lib/init/util/functions.js +1 -1
  109. package/lib/init/util/project.js +4 -4
  110. package/lib/internal/api.js +19 -19
  111. package/lib/internal/command.js +20 -16
  112. package/lib/internal/config.js +5 -5
  113. package/lib/internal/credential.js +10 -10
  114. package/lib/internal/crypt.js +5 -5
  115. package/lib/internal/rc.js +5 -5
  116. package/lib/migration/global/1.6.2.js +3 -3
  117. package/lib/migration/index.js +22 -18
  118. package/lib/option-filter.js +34 -30
  119. package/lib/optional-import.js +12 -8
  120. package/lib/plugin-loader.js +7 -3
  121. package/lib/port-resolver.js +4 -4
  122. package/lib/progress.js +2 -2
  123. package/lib/prompt/index.js +5 -1
  124. package/lib/prompt/types/file-path.js +1 -1
  125. package/lib/pull/features/apig.js +9 -9
  126. package/lib/pull/features/client.js +7 -7
  127. package/lib/pull/features/functions/index.js +14 -14
  128. package/lib/pull/features/index.js +5 -1
  129. package/lib/pull/index.js +4 -4
  130. package/lib/repl-server.js +2 -2
  131. package/lib/serve/features/apig.js +1 -1
  132. package/lib/serve/features/index.js +8 -4
  133. package/lib/serve/index.js +15 -11
  134. package/lib/serve/server/index.js +34 -27
  135. package/lib/serve/server/lib/java/JavaaioServer.java +2 -1
  136. package/lib/serve/server/lib/java/lib/catalyst-cli-java-runtime-1.0.0.jar +0 -0
  137. package/lib/serve/server/lib/java/lib/catalyst-java-runtime-1.0.0.jar +0 -0
  138. package/lib/serve/server/lib/java/lib/zip4j-2.5.0.jar +0 -0
  139. package/lib/serve/server/lib/master.js +26 -15
  140. package/lib/serve/server/lib/node.js +7 -3
  141. package/lib/serve/server/lib/web_client/index.js +3 -3
  142. package/lib/serve/server/lib/web_client/server.js +17 -17
  143. package/lib/shell/dependencies/http-functions.js +38 -33
  144. package/lib/shell/dependencies/invoker/bio/java/JavabioInvoker.java +7 -2
  145. package/lib/shell/dependencies/invoker/cron/java/JavacronInvoker.java +7 -2
  146. package/lib/shell/dependencies/invoker/event/java/JavaeventInvoker.java +7 -2
  147. package/lib/shell/dependencies/invoker/integ/java/JavaintegInvoker.java +7 -2
  148. package/lib/shell/dependencies/invoker/integ/node.js +8 -4
  149. package/lib/shell/dependencies/local-function.js +44 -40
  150. package/lib/shell/index.js +12 -12
  151. package/lib/shell/prepare/index.js +2 -2
  152. package/lib/shell/prepare/languages/index.js +5 -1
  153. package/lib/shell/prepare/languages/java.js +1 -1
  154. package/lib/throbber/index.js +17 -17
  155. package/lib/throbber/utils.js +9 -9
  156. package/lib/track.js +7 -7
  157. package/lib/util_modules/config/index.js +5 -1
  158. package/lib/util_modules/constants/lib/auth.js +6 -6
  159. package/lib/util_modules/constants/lib/cliq-handlers.js +2 -2
  160. package/lib/util_modules/constants/lib/template.js +21 -21
  161. package/lib/util_modules/constants/lib/urls.js +11 -11
  162. package/lib/util_modules/context-help.js +15 -15
  163. package/lib/util_modules/fs/index.js +5 -1
  164. package/lib/util_modules/fs/lib/async.js +4 -4
  165. package/lib/util_modules/fs/utils.js +1 -1
  166. package/lib/util_modules/logger.js +2 -2
  167. package/lib/util_modules/parser/toml.js +1 -1
  168. package/lib/util_modules/project.js +6 -6
  169. package/lib/util_modules/shell.js +4 -4
  170. package/lib/winston.js +5 -5
  171. package/package.json +39 -39
  172. package/scripts/postInstall.js +7 -6
  173. package/docs/.DS_Store +0 -0
  174. package/lib/serve/server/lib/java/lib/catalyst-function-sdk-1.0.0.jar +0 -0
  175. package/templates/.DS_Store +0 -0
  176. package/templates/init/.DS_Store +0 -0
  177. package/templates/init/client/.DS_Store +0 -0
  178. package/templates/init/client/react/.DS_Store +0 -0
  179. package/templates/init/functions/node/integ/cliq/.DS_Store +0 -0
@@ -1,7 +1,11 @@
1
1
  'use strict';
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -44,7 +48,7 @@ const runMigration = (rc, migFiles, idx = 0) => __awaiter(void 0, void 0, void 0
44
48
  return Promise.resolve();
45
49
  }
46
50
  const migFile = migFiles[idx];
47
- const currentMigFileVersion = path_1.parse(migFile).name;
51
+ const currentMigFileVersion = (0, path_1.parse)(migFile).name;
48
52
  const migDetails = rc.get(['migration', currentMigFileVersion]);
49
53
  if (migDetails && migDetails.completed) {
50
54
  return runMigration(rc, migFiles, ++idx);
@@ -52,14 +56,14 @@ const runMigration = (rc, migFiles, idx = 0) => __awaiter(void 0, void 0, void 0
52
56
  try {
53
57
  const migModule = yield Promise.resolve().then(() => __importStar(require(migFile)));
54
58
  if (migModule.isRequire()) {
55
- logger_1.debug('migration started for v' + currentMigFileVersion);
59
+ (0, logger_1.debug)('migration started for v' + currentMigFileVersion);
56
60
  migModule.migrate();
57
61
  }
58
62
  }
59
63
  catch (e) {
60
- logger_1.debug('migration failed for v' + currentMigFileVersion);
64
+ (0, logger_1.debug)('migration failed for v' + currentMigFileVersion);
61
65
  rc.set(['migration', currentMigFileVersion], {
62
- error: util_1.inspect(e),
66
+ error: (0, util_1.inspect)(e),
63
67
  completed: false
64
68
  });
65
69
  rc.syncSave();
@@ -75,7 +79,7 @@ const runMigration = (rc, migFiles, idx = 0) => __awaiter(void 0, void 0, void 0
75
79
  });
76
80
  rc.set('migration.last_success', currentMigFileVersion);
77
81
  rc.syncSave();
78
- logger_1.debug('migration completed for v' + currentMigFileVersion);
82
+ (0, logger_1.debug)('migration completed for v' + currentMigFileVersion);
79
83
  return runMigration(rc, migFiles, ++idx);
80
84
  });
81
85
  const runGlobalMigration = (migFiles) => __awaiter(void 0, void 0, void 0, function* () {
@@ -86,7 +90,7 @@ const runGlobalMigration = (migFiles) => __awaiter(void 0, void 0, void 0, funct
86
90
  if (!migFile) {
87
91
  return;
88
92
  }
89
- const currentMigFileVersion = path_1.parse(migFile).name;
93
+ const currentMigFileVersion = (0, path_1.parse)(migFile).name;
90
94
  const migDetails = config_store_1.default.get('migration.' + currentMigFileVersion.replace(new RegExp('\\.', 'g'), '\\.'));
91
95
  if (migDetails && migDetails.completed) {
92
96
  return runGlobalMigration(migFiles);
@@ -94,14 +98,14 @@ const runGlobalMigration = (migFiles) => __awaiter(void 0, void 0, void 0, funct
94
98
  try {
95
99
  const migModule = yield Promise.resolve().then(() => __importStar(require(migFile)));
96
100
  if (migModule.isRequire()) {
97
- logger_1.debug('migration started for v' + currentMigFileVersion);
101
+ (0, logger_1.debug)('migration started for v' + currentMigFileVersion);
98
102
  migModule.migrate();
99
103
  }
100
104
  }
101
105
  catch (e) {
102
- logger_1.debug('migration failed for v' + currentMigFileVersion);
106
+ (0, logger_1.debug)('migration failed for v' + currentMigFileVersion);
103
107
  config_store_1.default.set('migration.' + currentMigFileVersion.replace(new RegExp('\\.', 'g'), '\\.'), {
104
- error: util_1.inspect(e),
108
+ error: (0, util_1.inspect)(e),
105
109
  completed: false
106
110
  });
107
111
  const err = error_1.default.getErrorInstance(e, {
@@ -115,7 +119,7 @@ const runGlobalMigration = (migFiles) => __awaiter(void 0, void 0, void 0, funct
115
119
  completed: true
116
120
  });
117
121
  config_store_1.default.set('migration.last_success', currentMigFileVersion);
118
- logger_1.debug('migration completed for v' + currentMigFileVersion);
122
+ (0, logger_1.debug)('migration completed for v' + currentMigFileVersion);
119
123
  return runGlobalMigration(migFiles);
120
124
  });
121
125
  const getMigFiles = (dir, currentVersion, lastRunVersion) => {
@@ -127,25 +131,25 @@ const getMigFiles = (dir, currentVersion, lastRunVersion) => {
127
131
  if (migFiles.length === 0) {
128
132
  return [];
129
133
  }
130
- if (lastRunVersion && semver_1.gte(lastRunVersion, currentVersion)) {
134
+ if (lastRunVersion && (0, semver_1.gte)(lastRunVersion, currentVersion)) {
131
135
  return [];
132
136
  }
133
137
  return migFiles
134
- .filter((file) => semver_1.valid(path_1.parse(file).name) &&
135
- (!lastRunVersion || semver_1.gte(path_1.parse(file).name, lastRunVersion)))
136
- .sort((v1, v2) => semver_1.compare(path_1.parse(v1).name, path_1.parse(v2).name));
138
+ .filter((file) => (0, semver_1.valid)((0, path_1.parse)(file).name) &&
139
+ (!lastRunVersion || (0, semver_1.gte)((0, path_1.parse)(file).name, lastRunVersion)))
140
+ .sort((v1, v2) => (0, semver_1.compare)((0, path_1.parse)(v1).name, (0, path_1.parse)(v2).name));
137
141
  };
138
142
  exports.default = (currentVersion) => __awaiter(void 0, void 0, void 0, function* () {
139
143
  const promiseArr = [];
140
144
  const lastRunGlobalMigration = config_store_1.default.get('migration.last_success');
141
- const globalMigFiles = getMigFiles(path_1.join(__dirname, 'global'), currentVersion, lastRunGlobalMigration);
145
+ const globalMigFiles = getMigFiles((0, path_1.join)(__dirname, 'global'), currentVersion, lastRunGlobalMigration);
142
146
  if (globalMigFiles.length > 0) {
143
147
  promiseArr.push(runGlobalMigration(globalMigFiles));
144
148
  }
145
- const rc = yield rc_1.default.load().catch(() => logger_1.debug('Unable to load rc file.'));
149
+ const rc = yield rc_1.default.load().catch(() => (0, logger_1.debug)('Unable to load rc file.'));
146
150
  if (rc && rc.loaded) {
147
151
  const lastRunLocalMigration = rc.get('migration.last_success');
148
- const localMigFiles = getMigFiles(path_1.join(__dirname, 'local'), currentVersion, lastRunLocalMigration);
152
+ const localMigFiles = getMigFiles((0, path_1.join)(__dirname, 'local'), currentVersion, lastRunLocalMigration);
149
153
  if (localMigFiles.length > 0) {
150
154
  promiseArr.push(runMigration(rc, localMigFiles));
151
155
  }
@@ -1,7 +1,11 @@
1
1
  'use strict';
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -41,13 +45,13 @@ function enrichOptsData(opt, optValue, validTargets, multiTargetSupport = true)
41
45
  .split(',')
42
46
  .reduce((accumulator, entry, entryIndex, optArr) => {
43
47
  if (optArr.indexOf(entry) !== entryIndex) {
44
- optArr[entryIndex] = ansi_colors_1.red(optArr[entryIndex]);
45
- throw new error_1.default(`Duplicate target found for ${ansi_colors_1.bold(entry)}.`, {
48
+ optArr[entryIndex] = (0, ansi_colors_1.red)(optArr[entryIndex]);
49
+ throw new error_1.default(`Duplicate target found for ${(0, ansi_colors_1.bold)(entry)}.`, {
46
50
  exit: 1,
47
51
  errorId: 'OPT-FILTER-1',
48
52
  arg: [
49
- ansi_colors_1.bold('--' + opt),
50
- ansi_colors_1.bold('Option input: ') + ansi_colors_1.italic('--' + opt + ' ' + optArr.join(','))
53
+ (0, ansi_colors_1.bold)('--' + opt),
54
+ (0, ansi_colors_1.bold)('Option input: ') + (0, ansi_colors_1.italic)('--' + opt + ' ' + optArr.join(','))
51
55
  ]
52
56
  });
53
57
  }
@@ -58,8 +62,8 @@ function enrichOptsData(opt, optValue, validTargets, multiTargetSupport = true)
58
62
  errorId: 'OPT-FILTER-2',
59
63
  arg: [
60
64
  ansi_colors_1.bold.red(entrySet[0]),
61
- ansi_colors_1.bold('--' + opt),
62
- ansi_colors_1.bold(validTargets.map((target) => '* ' + target).join('\n'))
65
+ (0, ansi_colors_1.bold)('--' + opt),
66
+ (0, ansi_colors_1.bold)(validTargets.map((target) => '* ' + target).join('\n'))
63
67
  ]
64
68
  });
65
69
  }
@@ -77,8 +81,8 @@ function enrichOptsData(opt, optValue, validTargets, multiTargetSupport = true)
77
81
  ((res.hasFilter && entrySet.length === 1) ||
78
82
  (!res.hasFilter && entrySet.length === 2));
79
83
  if (truthy) {
80
- optArr[idx] = ansi_colors_1.red(optArr[idx]);
81
- optArr[entryIndex] = ansi_colors_1.red(optArr[entryIndex]);
84
+ optArr[idx] = (0, ansi_colors_1.red)(optArr[idx]);
85
+ optArr[entryIndex] = (0, ansi_colors_1.red)(optArr[entryIndex]);
82
86
  }
83
87
  return truthy;
84
88
  })) {
@@ -87,8 +91,8 @@ function enrichOptsData(opt, optValue, validTargets, multiTargetSupport = true)
87
91
  errorId: 'OPT-FILTER-3',
88
92
  arg: [
89
93
  ansi_colors_1.bold.red(entrySet[0]),
90
- ansi_colors_1.bold('--' + opt),
91
- ansi_colors_1.bold('Option input: ') + ansi_colors_1.italic(`--${opt} ${optArr.join(',')}`)
94
+ (0, ansi_colors_1.bold)('--' + opt),
95
+ (0, ansi_colors_1.bold)('Option input: ') + (0, ansi_colors_1.italic)(`--${opt} ${optArr.join(',')}`)
92
96
  ]
93
97
  });
94
98
  }
@@ -104,26 +108,26 @@ function enrichOptsData(opt, optValue, validTargets, multiTargetSupport = true)
104
108
  }, []);
105
109
  }
106
110
  function validateTargets() {
107
- if (option_1.getOptionValue('except', false) && option_1.getOptionValue('only', false)) {
111
+ if ((0, option_1.getOptionValue)('except', false) && (0, option_1.getOptionValue)('only', false)) {
108
112
  throw new error_1.default('Cannot specify both --only and --except', {
109
113
  exit: 1,
110
114
  errorId: 'OPT-FILTER-4',
111
- arg: [ansi_colors_1.bold('--only'), ansi_colors_1.bold('--except')]
115
+ arg: [(0, ansi_colors_1.bold)('--only'), (0, ansi_colors_1.bold)('--except')]
112
116
  });
113
117
  }
114
- const enrichedOnlyOpts = enrichOptsData('only', option_1.getOptionValue('only'), validGlobalTargets);
118
+ const enrichedOnlyOpts = enrichOptsData('only', (0, option_1.getOptionValue)('only'), validGlobalTargets);
115
119
  if (enrichedOnlyOpts.length > 0) {
116
120
  return enrichedOnlyOpts;
117
121
  }
118
- const enrichedExceptOpts = enrichOptsData('except', option_1.getOptionValue('except'), validGlobalTargets);
122
+ const enrichedExceptOpts = enrichOptsData('except', (0, option_1.getOptionValue)('except'), validGlobalTargets);
119
123
  if (enrichedExceptOpts.length > 0) {
120
124
  return enrichedExceptOpts;
121
125
  }
122
126
  return [];
123
127
  }
124
128
  function validatePorts() {
125
- const customHttpPort = option_1.getOptionValue('http', false);
126
- const enrichedDebugOpts = enrichOptsData('debug', option_1.getOptionValue('debug'), Object.keys(constants_1.DEFAULT.serve_port.debug));
129
+ const customHttpPort = (0, option_1.getOptionValue)('http', false);
130
+ const enrichedDebugOpts = enrichOptsData('debug', (0, option_1.getOptionValue)('debug'), Object.keys(constants_1.DEFAULT.serve_port.debug));
127
131
  if (enrichedDebugOpts.some((opt) => {
128
132
  const noFilter = !opt.hasFilter;
129
133
  if (opt.target === 'client') {
@@ -138,10 +142,10 @@ function validatePorts() {
138
142
  exit: 1,
139
143
  errorId: 'OPT-FILTER-6',
140
144
  arg: [
141
- ansi_colors_1.bold('--debug'),
145
+ (0, ansi_colors_1.bold)('--debug'),
142
146
  ansi_colors_1.italic.red('--debug <target>'),
143
- ansi_colors_1.bold('* basicio: ') + ansi_colors_1.italic.green('--debug basicio:<port>'),
144
- ansi_colors_1.bold('* advancedio: ') + ansi_colors_1.italic.green('--debug advancedio:<name>:<port>')
147
+ (0, ansi_colors_1.bold)('* basicio: ') + ansi_colors_1.italic.green('--debug basicio:<port>'),
148
+ (0, ansi_colors_1.bold)('* advancedio: ') + ansi_colors_1.italic.green('--debug advancedio:<name>:<port>')
145
149
  ]
146
150
  });
147
151
  }
@@ -159,8 +163,8 @@ function filterPorts() {
159
163
  exit: 1,
160
164
  errorId: 'OPT-FILTER-7',
161
165
  arg: [
162
- ansi_colors_1.bold('--debug'),
163
- ansi_colors_1.bold('advancedio'),
166
+ (0, ansi_colors_1.bold)('--debug'),
167
+ (0, ansi_colors_1.bold)('advancedio'),
164
168
  ansi_colors_1.italic.red('--debug advancedio:<name|port>'),
165
169
  ansi_colors_1.italic.green('--debug advancedio:<name>:<port>')
166
170
  ]
@@ -182,24 +186,24 @@ function filterTargets(pathSense = true) {
182
186
  if (validTargetResultants.length === 0) {
183
187
  if (runtime_store_1.default.get('project.root') !== runtime_store_1.default.get('cwd')) {
184
188
  targets = targets.filter((target) => {
185
- if (target === 'apig' && option_1.getCurrentCommand() === 'serve') {
189
+ if (target === 'apig' && (0, option_1.getCurrentCommand)() === 'serve') {
186
190
  return true;
187
191
  }
188
192
  if (!pathSense) {
189
193
  return true;
190
194
  }
191
- const targetRoot = project_1.resolveProjectPath(CONFIG[(target + 'Config')].source());
195
+ const targetRoot = (0, project_1.resolveProjectPath)(CONFIG[(target + 'Config')].source());
192
196
  return (fs_1.SYNC.isPathInside(targetRoot, runtime_store_1.default.get('cwd')) ||
193
197
  runtime_store_1.default.get('cwd') === targetRoot);
194
198
  });
195
199
  }
196
200
  }
197
- else if (option_1.getOptionValue('only', false)) {
201
+ else if ((0, option_1.getOptionValue)('only', false)) {
198
202
  targets = validTargetResultants.map((resultant) => {
199
203
  return resultant.target;
200
204
  });
201
205
  }
202
- else if (option_1.getOptionValue('except', false)) {
206
+ else if ((0, option_1.getOptionValue)('except', false)) {
203
207
  const unwantedTargets = validTargetResultants
204
208
  .filter((val) => {
205
209
  if (val.target === 'functions' && val.hasFilter) {
@@ -212,16 +216,16 @@ function filterTargets(pathSense = true) {
212
216
  }
213
217
  targets = js_1.JS.uniq(targets);
214
218
  if (targets.length === 0) {
215
- const aid = option_1.getOptionValue('except', false)
216
- ? `the ${ansi_colors_1.bold('--except')} option does not rule out all the valid targets.`
217
- : `the desired features are initialised in the ${ansi_colors_1.bold(constants_1.FILENAME.config)} file.`;
219
+ const aid = (0, option_1.getOptionValue)('except', false)
220
+ ? `the ${(0, ansi_colors_1.bold)('--except')} option does not rule out all the valid targets.`
221
+ : `the desired features are initialised in the ${(0, ansi_colors_1.bold)(constants_1.FILENAME.config)} file.`;
218
222
  throw new error_1.default('Cannot understand what targets.', {
219
223
  exit: 1,
220
224
  errorId: 'OPT-FILTER-8',
221
225
  arg: [aid]
222
226
  });
223
227
  }
224
- if (targets.length === 1 && targets.includes('apig') && option_1.getCurrentCommand() === 'serve') {
228
+ if (targets.length === 1 && targets.includes('apig') && (0, option_1.getCurrentCommand)() === 'serve') {
225
229
  throw new error_1.default('API Gateway cannot be served separately', {
226
230
  exit: 1,
227
231
  errorId: 'OPT-FILTER-9'
@@ -1,7 +1,11 @@
1
1
  'use strict';
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -38,25 +42,25 @@ const async_js_1 = require("./util_modules/fs/lib/async.js");
38
42
  const error_js_1 = __importDefault(require("./error.js"));
39
43
  const ansi_colors_1 = require("ansi-colors");
40
44
  exports.default = (name, source) => __awaiter(void 0, void 0, void 0, function* () {
41
- if (name === path_1.basename(name)) {
42
- const projectModulePath = project_js_1.resolveProjectPath(path_1.join(source, 'node_modules', name));
43
- const projectModulePathExists = yield async_js_1.dirExists(projectModulePath);
45
+ if (name === (0, path_1.basename)(name)) {
46
+ const projectModulePath = (0, project_js_1.resolveProjectPath)((0, path_1.join)(source, 'node_modules', name));
47
+ const projectModulePathExists = yield (0, async_js_1.dirExists)(projectModulePath);
44
48
  if (!projectModulePathExists) {
45
49
  throw new error_js_1.default('Module path does not exists', {
46
50
  errorId: 'OPT-IMP-1',
47
- arg: [ansi_colors_1.bold(name), ansi_colors_1.italic.red(projectModulePath), ansi_colors_1.bold(source)],
51
+ arg: [(0, ansi_colors_1.bold)(name), ansi_colors_1.italic.red(projectModulePath), (0, ansi_colors_1.bold)(source)],
48
52
  exit: 1
49
53
  });
50
54
  }
51
55
  app_module_path_1.default.addPath(projectModulePath);
52
56
  return Promise.resolve().then(() => __importStar(require(projectModulePath)));
53
57
  }
54
- const projectModulePath = project_js_1.resolveProjectPath(name);
55
- const projectModulePathExists = yield async_js_1.dirExists(projectModulePath);
58
+ const projectModulePath = (0, project_js_1.resolveProjectPath)(name);
59
+ const projectModulePathExists = yield (0, async_js_1.dirExists)(projectModulePath);
56
60
  if (!projectModulePathExists) {
57
61
  throw new error_js_1.default('Module path does not exists', {
58
62
  errorId: 'OPT-IMP-2',
59
- arg: [ansi_colors_1.bold(name), ansi_colors_1.italic.red(projectModulePath), ansi_colors_1.bold(source)],
63
+ arg: [(0, ansi_colors_1.bold)(name), ansi_colors_1.italic.red(projectModulePath), (0, ansi_colors_1.bold)(source)],
60
64
  exit: 1
61
65
  });
62
66
  }
@@ -1,7 +1,11 @@
1
1
  'use strict';
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -70,13 +74,13 @@ function pluginLoader(feature, name, source) {
70
74
  pluginMod = loadedPlugins[specificPlugin];
71
75
  }
72
76
  else {
73
- pluginMod = yield optional_import_js_1.default(specificPlugin, pluginConfig.source());
77
+ pluginMod = yield (0, optional_import_js_1.default)(specificPlugin, pluginConfig.source());
74
78
  }
75
79
  if (pluginMod === undefined) {
76
80
  throw new error_js_1.default(`Configured plugin could not be found for [${feature}:${name}] - ${specificPlugin}`, {
77
81
  exit: 1,
78
82
  errorId: 'PLG-LDR-1',
79
- arg: [ansi_colors_1.italic.red(specificPlugin), ansi_colors_1.bold(name), ansi_colors_1.bold(feature)]
83
+ arg: [ansi_colors_1.italic.red(specificPlugin), (0, ansi_colors_1.bold)(name), (0, ansi_colors_1.bold)(feature)]
80
84
  });
81
85
  }
82
86
  loadedPlugins[specificPlugin] = pluginMod;
@@ -27,7 +27,7 @@ class PortResolver {
27
27
  if (searchSpan < 0) {
28
28
  throw new Error('unable find port. searchSpan has reached the bottom line');
29
29
  }
30
- const port = yield portfinder_1.getPortPromise({
30
+ const port = yield (0, portfinder_1.getPortPromise)({
31
31
  port: startPort,
32
32
  stopPort: startPort + searchSpan
33
33
  });
@@ -77,7 +77,7 @@ class PortResolver {
77
77
  err.arg = [
78
78
  ansi_colors_1.bold.red(port + ''),
79
79
  type === 'debug' ? 'debugging' : 'serving',
80
- ansi_colors_1.bold(feature),
80
+ (0, ansi_colors_1.bold)(feature),
81
81
  name,
82
82
  type
83
83
  ];
@@ -89,11 +89,11 @@ class PortResolver {
89
89
  fileName: __filename
90
90
  });
91
91
  cerr.errorId = 'PORT-RESOLVER-2';
92
- cerr.arg = [ansi_colors_1.bold(port + ''), ansi_colors_1.bold(port + searchSpan + ''), ansi_colors_1.bold('--' + type)];
92
+ cerr.arg = [(0, ansi_colors_1.bold)(port + ''), (0, ansi_colors_1.bold)(port + searchSpan + ''), (0, ansi_colors_1.bold)('--' + type)];
93
93
  throw cerr;
94
94
  }
95
95
  if (finalPort !== port) {
96
- logger_1.debug(`${type} port : '${port}' is not available. Hence port '${finalPort}' will be used instead.`);
96
+ (0, logger_1.debug)(`${type} port : '${port}' is not available. Hence port '${finalPort}' will be used instead.`);
97
97
  }
98
98
  return finalPort;
99
99
  });
package/lib/progress.js CHANGED
@@ -46,8 +46,8 @@ class Progress {
46
46
  const [seconds, nanoSeconds] = process.hrtime(this.startTime);
47
47
  const timeSinceStartInMs = seconds * 1000 + nanoSeconds / 1e6;
48
48
  const averageTimePerCount = timeSinceStartInMs / this.currentProgress;
49
- const estTimeLeftStr = pretty_ms_1.default(Math.round(averageTimePerCount * (this.total - this.currentProgress)));
50
- prependedHeader = 'Est. time left: ' + `${ansi_colors_1.white(estTimeLeftStr)}`;
49
+ const estTimeLeftStr = (0, pretty_ms_1.default)(Math.round(averageTimePerCount * (this.total - this.currentProgress)));
50
+ prependedHeader = 'Est. time left: ' + `${(0, ansi_colors_1.white)(estTimeLeftStr)}`;
51
51
  if (this.currentProgress >= this.total) {
52
52
  if (this.throbber.hasActiveSpinners()) {
53
53
  const [totalSec] = process.hrtime(this.startTime);
@@ -1,7 +1,11 @@
1
1
  'use strict';
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -32,7 +32,7 @@ class InquirerFilePath extends inquirer_autocomplete_prompt_1.default {
32
32
  const { rootPath = '.', exclude = [] } = question;
33
33
  const questionBase = Object.assign({
34
34
  emptyText: 'No valid file inside current directory!. Try giving the entire path and press ' +
35
- ansi_colors_1.cyan('<return> ') +
35
+ (0, ansi_colors_1.cyan)('<return> ') +
36
36
  'key'
37
37
  }, question, {
38
38
  source: (_, pattern) => getPaths(rootPath, pattern, exclude, question.default)
@@ -24,41 +24,41 @@ const logger_1 = require("../../util_modules/logger");
24
24
  const project_1 = require("../../util_modules/project");
25
25
  exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
26
26
  const apigName = config_1.apigConfig.rules();
27
- const apigDirPath = project_1.resolveProjectPath(apigName);
28
- if (sync_1.isPathOutside(runtime_store_1.default.get('project.root'), apigDirPath)) {
29
- logger_1.info('Skipping APIG pull since rules file is outside root dir : ' +
27
+ const apigDirPath = (0, project_1.resolveProjectPath)(apigName);
28
+ if ((0, sync_1.isPathOutside)(runtime_store_1.default.get('project.root'), apigDirPath)) {
29
+ (0, logger_1.info)('Skipping APIG pull since rules file is outside root dir : ' +
30
30
  runtime_store_1.default.get('project.root'));
31
31
  return;
32
32
  }
33
- const apigAPIs = yield endpoints_1.apigAPI();
33
+ const apigAPIs = yield (0, endpoints_1.apigAPI)();
34
34
  const apigStatus = (yield apigAPIs.getAPIGStatus());
35
35
  if (!apigStatus.status) {
36
- logger_1.info();
36
+ (0, logger_1.info)();
37
37
  const consent = yield prompt_1.default.ask(prompt_1.default.question('enable', 'The APIG is disable in catalyst console, Do you want to enable it and pull the APIG rules now ?', {
38
38
  type: 'confirm',
39
39
  defaultAns: false
40
40
  }));
41
41
  if (!consent.enable) {
42
- logger_1.info('Skipping APIG pull. Since the APIG is disabled in catalyst console.');
42
+ (0, logger_1.info)('Skipping APIG pull. Since the APIG is disabled in catalyst console.');
43
43
  return;
44
44
  }
45
45
  yield apigAPIs.updateAPIGStatus(true);
46
46
  }
47
47
  const fileExists = yield fs_1.ASYNC.fileExists(apigDirPath);
48
48
  const overwriteAns = fileExists
49
- ? yield prompt_1.default.ask(prompt_1.default.question('overwrite', 'File ' + ansi_colors_1.underline(apigDirPath) + ' already exists. Overwrite ?', {
49
+ ? yield prompt_1.default.ask(prompt_1.default.question('overwrite', 'File ' + (0, ansi_colors_1.underline)(apigDirPath) + ' already exists. Overwrite ?', {
50
50
  type: 'confirm',
51
51
  defaultAns: false
52
52
  }))
53
53
  : { overwrite: true };
54
54
  if (!overwriteAns.overwrite) {
55
- logger_1.info('Skipping APIG pull');
55
+ (0, logger_1.info)('Skipping APIG pull');
56
56
  return;
57
57
  }
58
58
  yield fs_1.ASYNC.deleteFile(apigDirPath).catch();
59
59
  const rulesArr = (yield apigAPIs.getAllRules());
60
60
  if (!rulesArr || rulesArr.length === 0) {
61
- logger_1.info('No rules found in remote console');
61
+ (0, logger_1.info)('No rules found in remote console');
62
62
  return;
63
63
  }
64
64
  const fileContent = JSON.stringify(rulesArr, null, 2) + '\n';
@@ -25,29 +25,29 @@ const logger_1 = require("../../util_modules/logger");
25
25
  const project_1 = require("../../util_modules/project");
26
26
  exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
27
27
  const clientDirName = config_1.clientConfig.source();
28
- const clientDirPath = project_1.resolveProjectPath(clientDirName);
29
- const webappAPI = yield endpoints_1.clientAPI();
28
+ const clientDirPath = (0, project_1.resolveProjectPath)(clientDirName);
29
+ const webappAPI = yield (0, endpoints_1.clientAPI)();
30
30
  const historyArr = (yield webappAPI.getAllHistory());
31
31
  if (historyArr.length === 0) {
32
- logger_1.info('No history details found in remote console');
32
+ (0, logger_1.info)('No history details found in remote console');
33
33
  return;
34
34
  }
35
35
  const folderExits = yield fs_1.ASYNC.dirExists(clientDirPath);
36
36
  const overwriteAns = folderExits
37
- ? yield prompt_1.default.ask(prompt_1.default.question('overwrite', 'Directory ' + ansi_colors_1.underline(clientDirName) + ' already exists. Overwrite ?', {
37
+ ? yield prompt_1.default.ask(prompt_1.default.question('overwrite', 'Directory ' + (0, ansi_colors_1.underline)(clientDirName) + ' already exists. Overwrite ?', {
38
38
  type: 'confirm',
39
39
  defaultAns: false
40
40
  }))
41
41
  : { overwrite: true };
42
42
  if (!overwriteAns.overwrite) {
43
- logger_1.info('Skipping client pull');
43
+ (0, logger_1.info)('Skipping client pull');
44
44
  return;
45
45
  }
46
46
  yield fs_1.ASYNC.deleteDir(clientDirPath).catch();
47
47
  const choices = historyArr.map((history) => {
48
48
  let live = '';
49
49
  if (js_1.JS.get(history, 'status', false)) {
50
- live = ansi_colors_1.cyan(' (LIVE)');
50
+ live = (0, ansi_colors_1.cyan)(' (LIVE)');
51
51
  }
52
52
  return prompt_1.default.choice(history.app_version + live, {
53
53
  value: history.history_id,
@@ -62,5 +62,5 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
62
62
  yield new archiver_1.default().load(clientZip).extract(clientDirPath).finalize();
63
63
  yield client_utils_1.clientUtils.validate();
64
64
  runtime_store_1.default.set('payload.client', runtime_store_1.default.get('context.client'));
65
- runtime_store_1.default.set('payload.client.source', project_1.resolveProjectPath(clientDirName));
65
+ runtime_store_1.default.set('payload.client.source', (0, project_1.resolveProjectPath)(clientDirName));
66
66
  });
@@ -28,12 +28,12 @@ const project_1 = require("../../../util_modules/project");
28
28
  const runtime_1 = __importDefault(require("../../../util_modules/constants/lib/runtime"));
29
29
  const error_1 = __importDefault(require("../../../error"));
30
30
  exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
31
- const fnAPI = yield endpoints_1.functionsAPI();
31
+ const fnAPI = yield (0, endpoints_1.functionsAPI)();
32
32
  const fnDirName = config_1.functionsConfig.source();
33
- const fnDirPath = project_1.resolveProjectPath(fnDirName);
33
+ const fnDirPath = (0, project_1.resolveProjectPath)(fnDirName);
34
34
  const fnArr = (yield fnAPI.getAllFunctions());
35
35
  if (!Array.isArray(fnArr) || fnArr.length === 0) {
36
- logger_1.info('No function found in remote console.');
36
+ (0, logger_1.info)('No function found in remote console.');
37
37
  return;
38
38
  }
39
39
  const choicesObj = fnArr.reduce((accumulator, fn) => {
@@ -47,7 +47,7 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
47
47
  stack: fn.stack,
48
48
  name,
49
49
  type: type,
50
- source: path_1.join(fnDirPath, name)
50
+ source: (0, path_1.join)(fnDirPath, name)
51
51
  },
52
52
  short: name
53
53
  });
@@ -68,11 +68,11 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
68
68
  if (js_1.JS.isEmpty(ansArr)) {
69
69
  return ('Must select at least one feature.\n' +
70
70
  '(Press ' +
71
- ansi_colors_1.cyan('<space>') +
71
+ (0, ansi_colors_1.cyan)('<space>') +
72
72
  ' to select, ' +
73
- ansi_colors_1.cyan('<a>') +
73
+ (0, ansi_colors_1.cyan)('<a>') +
74
74
  ' to toggle all, ' +
75
- ansi_colors_1.cyan('<i>') +
75
+ (0, ansi_colors_1.cyan)('<i>') +
76
76
  ' to invert selection)');
77
77
  }
78
78
  return true;
@@ -82,7 +82,7 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
82
82
  yield Promise.all(functionsAns.functions.map((fn) => __awaiter(void 0, void 0, void 0, function* () {
83
83
  const folderExists = yield fs_1.ASYNC.dirExists(fn.source);
84
84
  if (folderExists) {
85
- dirOverwriteQns.push(prompt_1.default.question(fn.name, 'Directory ' + ansi_colors_1.underline(fn.source) + ' already exists. Overwrite ?', {
85
+ dirOverwriteQns.push(prompt_1.default.question(fn.name, 'Directory ' + (0, ansi_colors_1.underline)(fn.source) + ' already exists. Overwrite ?', {
86
86
  type: 'confirm',
87
87
  defaultAns: false
88
88
  }));
@@ -93,7 +93,7 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
93
93
  if (dirOverwriteAns[fn.name] === undefined || dirOverwriteAns[fn.name]) {
94
94
  return true;
95
95
  }
96
- logger_1.message('skipping pull of function: ' + fn.name);
96
+ (0, logger_1.message)('skipping pull of function: ' + fn.name);
97
97
  return false;
98
98
  });
99
99
  if (js_1.JS.isEmpty(targets)) {
@@ -109,19 +109,19 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
109
109
  var _a, _b;
110
110
  yield fs_1.ASYNC.ensureDir(fn.source);
111
111
  const buffer = (yield fnAPI.download(fn.id));
112
- yield new archiver_1.default().load(buffer).extract(path_1.join(fnDirPath, fn.name)).finalize();
112
+ yield new archiver_1.default().load(buffer).extract((0, path_1.join)(fnDirPath, fn.name)).finalize();
113
113
  if ((_a = fn.stack) === null || _a === void 0 ? void 0 : _a.startsWith(runtime_1.default.language.nodejs)) {
114
- yield languages_1.node(fn);
114
+ yield (0, languages_1.node)(fn);
115
115
  }
116
116
  else if ((_b = fn.stack) === null || _b === void 0 ? void 0 : _b.startsWith(runtime_1.default.language.java)) {
117
- yield languages_1.java(fn);
117
+ yield (0, languages_1.java)(fn);
118
118
  }
119
119
  return fn;
120
120
  })));
121
121
  targets = targets.filter((target) => {
122
122
  if (!target.valid) {
123
- logger_1.debug('Invalid target : ' + target.name + ' reason : ' + target.failure_reason);
124
- logger_1.warning(`skipping pull of function(${target.name}) since the package is invalid. \nContact catalyst support with debug log.`);
123
+ (0, logger_1.debug)('Invalid target : ' + target.name + ' reason : ' + target.failure_reason);
124
+ (0, logger_1.warning)(`skipping pull of function(${target.name}) since the package is invalid. \nContact catalyst support with debug log.`);
125
125
  new error_1.default('invalid package: ' + target.name, { exit: 2 });
126
126
  }
127
127
  return target.valid;
@@ -1,7 +1,11 @@
1
1
  'use strict';
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];