Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.load = void 0;
  4. const experiments = require("../experiments");
  5. function load(client) {
  6. function loadCommand(name) {
  7. const t0 = process.hrtime.bigint();
  8. const { command: cmd } = require(`./${name}`);
  9. cmd.register(client);
  10. const t1 = process.hrtime.bigint();
  11. const diffMS = (t1 - t0) / BigInt(1e6);
  12. if (diffMS > 75) {
  13. }
  14. return cmd.runner();
  15. }
  16. const t0 = process.hrtime.bigint();
  17. client.appdistribution = {};
  18. client.appdistribution.distribute = loadCommand("appdistribution-distribute");
  19. client.appdistribution.testers = {};
  20. client.appdistribution.testers.add = loadCommand("appdistribution-testers-add");
  21. client.appdistribution.testers.delete = loadCommand("appdistribution-testers-remove");
  22. client.apps = {};
  23. client.apps.create = loadCommand("apps-create");
  24. client.apps.list = loadCommand("apps-list");
  25. client.apps.sdkconfig = loadCommand("apps-sdkconfig");
  26. client.apps.android = {};
  27. client.apps.android.sha = {};
  28. client.apps.android.sha.list = loadCommand("apps-android-sha-list");
  29. client.apps.android.sha.create = loadCommand("apps-android-sha-create");
  30. client.apps.android.sha.delete = loadCommand("apps-android-sha-delete");
  31. client.auth = {};
  32. client.auth.export = loadCommand("auth-export");
  33. client.auth.upload = loadCommand("auth-import");
  34. client.crashlytics = {};
  35. client.crashlytics.symbols = {};
  36. client.crashlytics.symbols.upload = loadCommand("crashlytics-symbols-upload");
  37. client.crashlytics.mappingfile = {};
  38. client.crashlytics.mappingfile.generateid = loadCommand("crashlytics-mappingfile-generateid");
  39. client.crashlytics.mappingfile.upload = loadCommand("crashlytics-mappingfile-upload");
  40. client.database = {};
  41. client.database.get = loadCommand("database-get");
  42. client.database.instances = {};
  43. client.database.instances.create = loadCommand("database-instances-create");
  44. client.database.instances.list = loadCommand("database-instances-list");
  45. client.database.profile = loadCommand("database-profile");
  46. client.database.push = loadCommand("database-push");
  47. client.database.remove = loadCommand("database-remove");
  48. if (experiments.isEnabled("rtdbrules")) {
  49. client.database.rules = {};
  50. client.database.rules.get = loadCommand("database-rules-get");
  51. client.database.rules.list = loadCommand("database-rules-list");
  52. client.database.rules.stage = loadCommand("database-rules-stage");
  53. client.database.rules.canary = loadCommand("database-rules-canary");
  54. client.database.rules.release = loadCommand("database-rules-release");
  55. }
  56. client.database.set = loadCommand("database-set");
  57. client.database.settings = {};
  58. client.database.settings.get = loadCommand("database-settings-get");
  59. client.database.settings.set = loadCommand("database-settings-set");
  60. client.database.update = loadCommand("database-update");
  61. client.deploy = loadCommand("deploy");
  62. client.emulators = {};
  63. client.emulators.exec = loadCommand("emulators-exec");
  64. client.emulators.export = loadCommand("emulators-export");
  65. client.emulators.start = loadCommand("emulators-start");
  66. client.experimental = {};
  67. client.experimental.functions = {};
  68. client.experimental.functions.shell = loadCommand("experimental-functions-shell");
  69. client.experiments = {};
  70. client.experiments.list = loadCommand("experiments-list");
  71. client.experiments.describe = loadCommand("experiments-describe");
  72. client.experiments.enable = loadCommand("experiments-enable");
  73. client.experiments.disable = loadCommand("experiments-disable");
  74. client.ext = loadCommand("ext");
  75. client.ext.configure = loadCommand("ext-configure");
  76. client.ext.info = loadCommand("ext-info");
  77. client.ext.export = loadCommand("ext-export");
  78. client.ext.install = loadCommand("ext-install");
  79. client.ext.list = loadCommand("ext-list");
  80. client.ext.uninstall = loadCommand("ext-uninstall");
  81. client.ext.update = loadCommand("ext-update");
  82. if (experiments.isEnabled("ext")) {
  83. client.ext.sources = {};
  84. client.ext.sources.create = loadCommand("ext-sources-create");
  85. }
  86. if (experiments.isEnabled("extdev")) {
  87. client.ext.dev = {};
  88. client.ext.dev.init = loadCommand("ext-dev-init");
  89. client.ext.dev.list = loadCommand("ext-dev-list");
  90. client.ext.dev.register = loadCommand("ext-dev-register");
  91. client.ext.dev.emulators = {};
  92. client.ext.dev.emulators.start = loadCommand("ext-dev-emulators-start");
  93. client.ext.dev.emulators.exec = loadCommand("ext-dev-emulators-exec");
  94. client.ext.dev.deprecate = loadCommand("ext-dev-deprecate");
  95. client.ext.dev.undeprecate = loadCommand("ext-dev-undeprecate");
  96. client.ext.dev.unpublish = loadCommand("ext-dev-unpublish");
  97. client.ext.dev.publish = loadCommand("ext-dev-publish");
  98. client.ext.dev.delete = loadCommand("ext-dev-extension-delete");
  99. client.ext.dev.usage = loadCommand("ext-dev-usage");
  100. }
  101. client.firestore = {};
  102. client.firestore.delete = loadCommand("firestore-delete");
  103. client.firestore.indexes = loadCommand("firestore-indexes-list");
  104. client.functions = {};
  105. client.functions.config = {};
  106. client.functions.config.clone = loadCommand("functions-config-clone");
  107. client.functions.config.export = loadCommand("functions-config-export");
  108. client.functions.config.get = loadCommand("functions-config-get");
  109. client.functions.config.set = loadCommand("functions-config-set");
  110. client.functions.config.unset = loadCommand("functions-config-unset");
  111. client.functions.delete = loadCommand("functions-delete");
  112. client.functions.log = loadCommand("functions-log");
  113. client.functions.shell = loadCommand("functions-shell");
  114. client.functions.list = loadCommand("functions-list");
  115. if (experiments.isEnabled("deletegcfartifacts")) {
  116. client.functions.deletegcfartifacts = loadCommand("functions-deletegcfartifacts");
  117. }
  118. client.functions.secrets = {};
  119. client.functions.secrets.access = loadCommand("functions-secrets-access");
  120. client.functions.secrets.destroy = loadCommand("functions-secrets-destroy");
  121. client.functions.secrets.get = loadCommand("functions-secrets-get");
  122. client.functions.secrets.prune = loadCommand("functions-secrets-prune");
  123. client.functions.secrets.set = loadCommand("functions-secrets-set");
  124. client.help = loadCommand("help");
  125. client.hosting = {};
  126. client.hosting.channel = {};
  127. client.hosting.channel.create = loadCommand("hosting-channel-create");
  128. client.hosting.channel.delete = loadCommand("hosting-channel-delete");
  129. client.hosting.channel.deploy = loadCommand("hosting-channel-deploy");
  130. client.hosting.channel.list = loadCommand("hosting-channel-list");
  131. client.hosting.channel.open = loadCommand("hosting-channel-open");
  132. client.hosting.clone = loadCommand("hosting-clone");
  133. client.hosting.disable = loadCommand("hosting-disable");
  134. client.hosting.sites = {};
  135. client.hosting.sites.create = loadCommand("hosting-sites-create");
  136. client.hosting.sites.delete = loadCommand("hosting-sites-delete");
  137. client.hosting.sites.get = loadCommand("hosting-sites-get");
  138. client.hosting.sites.list = loadCommand("hosting-sites-list");
  139. client.init = loadCommand("init");
  140. if (experiments.isEnabled("internaltesting")) {
  141. client.internaltesting = {};
  142. client.internaltesting.functions = {};
  143. client.internaltesting.functions.discover = loadCommand("internaltesting-functions-discover");
  144. }
  145. client.login = loadCommand("login");
  146. client.login.add = loadCommand("login-add");
  147. client.login.ci = loadCommand("login-ci");
  148. client.login.list = loadCommand("login-list");
  149. client.login.use = loadCommand("login-use");
  150. client.logout = loadCommand("logout");
  151. client.open = loadCommand("open");
  152. client.projects = {};
  153. client.projects.addfirebase = loadCommand("projects-addfirebase");
  154. client.projects.create = loadCommand("projects-create");
  155. client.projects.list = loadCommand("projects-list");
  156. client.remoteconfig = {};
  157. client.remoteconfig.get = loadCommand("remoteconfig-get");
  158. client.remoteconfig.rollback = loadCommand("remoteconfig-rollback");
  159. client.remoteconfig.versions = {};
  160. client.remoteconfig.versions.list = loadCommand("remoteconfig-versions-list");
  161. client.serve = loadCommand("serve");
  162. client.setup = {};
  163. client.setup.emulators = {};
  164. client.setup.emulators.database = loadCommand("setup-emulators-database");
  165. client.setup.emulators.firestore = loadCommand("setup-emulators-firestore");
  166. client.setup.emulators.pubsub = loadCommand("setup-emulators-pubsub");
  167. client.setup.emulators.storage = loadCommand("setup-emulators-storage");
  168. client.setup.emulators.ui = loadCommand("setup-emulators-ui");
  169. client.target = loadCommand("target");
  170. client.target.apply = loadCommand("target-apply");
  171. client.target.clear = loadCommand("target-clear");
  172. client.target.remove = loadCommand("target-remove");
  173. client.use = loadCommand("use");
  174. const t1 = process.hrtime.bigint();
  175. const diffMS = (t1 - t0) / BigInt(1e6);
  176. if (diffMS > 100) {
  177. }
  178. return client;
  179. }
  180. exports.load = load;