firebase-tools 10.0.1 → 10.1.3

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 (254) hide show
  1. package/lib/accountExporter.js +9 -8
  2. package/lib/accountImporter.js +10 -8
  3. package/lib/api.js +1 -0
  4. package/lib/apiv2.js +91 -48
  5. package/lib/appdistribution/client.js +1 -1
  6. package/lib/appdistribution/options-parser-util.js +1 -1
  7. package/lib/archiveDirectory.js +63 -73
  8. package/lib/auth.js +2 -2
  9. package/lib/bin/firebase.js +1 -1
  10. package/lib/command.js +26 -26
  11. package/lib/commands/appdistribution-distribute.js +4 -4
  12. package/lib/commands/appdistribution-testers-add.js +2 -2
  13. package/lib/commands/appdistribution-testers-remove.js +2 -2
  14. package/lib/commands/apps-android-sha-create.js +2 -2
  15. package/lib/commands/apps-android-sha-delete.js +2 -2
  16. package/lib/commands/apps-android-sha-list.js +2 -2
  17. package/lib/commands/apps-create.js +9 -9
  18. package/lib/commands/apps-list.js +3 -3
  19. package/lib/commands/apps-sdkconfig.js +8 -8
  20. package/lib/commands/auth-export.js +26 -25
  21. package/lib/commands/auth-import.js +88 -78
  22. package/lib/commands/database-get.js +1 -1
  23. package/lib/commands/database-instances-create.js +4 -4
  24. package/lib/commands/database-instances-list.js +4 -4
  25. package/lib/commands/database-profile.js +1 -1
  26. package/lib/commands/database-push.js +1 -1
  27. package/lib/commands/database-remove.js +2 -2
  28. package/lib/commands/database-set.js +2 -2
  29. package/lib/commands/database-settings-get.js +1 -1
  30. package/lib/commands/database-settings-set.js +1 -1
  31. package/lib/commands/database-update.js +2 -2
  32. package/lib/commands/ext-configure.js +3 -3
  33. package/lib/commands/ext-dev-deprecate.js +4 -4
  34. package/lib/commands/ext-dev-extension-delete.js +3 -3
  35. package/lib/commands/ext-dev-init.js +4 -4
  36. package/lib/commands/ext-dev-list.js +1 -1
  37. package/lib/commands/ext-dev-publish.js +4 -4
  38. package/lib/commands/ext-dev-register.js +6 -6
  39. package/lib/commands/ext-dev-undeprecate.js +4 -4
  40. package/lib/commands/ext-dev-unpublish.js +3 -3
  41. package/lib/commands/ext-dev-usage.js +140 -0
  42. package/lib/commands/ext-export.js +8 -8
  43. package/lib/commands/ext-info.js +5 -5
  44. package/lib/commands/ext-install.js +27 -23
  45. package/lib/commands/ext-list.js +2 -2
  46. package/lib/commands/ext-sources-create.js +2 -2
  47. package/lib/commands/ext-uninstall.js +4 -4
  48. package/lib/commands/ext-update.js +18 -18
  49. package/lib/commands/ext.js +3 -3
  50. package/lib/commands/firestore-delete.js +1 -1
  51. package/lib/commands/functions-config-clone.js +22 -23
  52. package/lib/commands/functions-config-export.js +11 -11
  53. package/lib/commands/functions-config-get.js +22 -22
  54. package/lib/commands/functions-config-set.js +24 -22
  55. package/lib/commands/functions-config-unset.js +20 -22
  56. package/lib/commands/functions-delete.js +3 -3
  57. package/lib/commands/functions-deletegcfartifacts.js +4 -4
  58. package/lib/commands/functions-list.js +1 -1
  59. package/lib/commands/functions-log.js +1 -1
  60. package/lib/commands/help.js +12 -12
  61. package/lib/commands/hosting-channel-create.js +13 -13
  62. package/lib/commands/hosting-channel-delete.js +10 -10
  63. package/lib/commands/hosting-channel-deploy.js +18 -18
  64. package/lib/commands/hosting-channel-list.js +5 -5
  65. package/lib/commands/hosting-channel-open.js +9 -9
  66. package/lib/commands/hosting-clone.js +16 -16
  67. package/lib/commands/hosting-disable.js +1 -1
  68. package/lib/commands/hosting-sites-create.js +7 -7
  69. package/lib/commands/hosting-sites-delete.js +7 -7
  70. package/lib/commands/hosting-sites-get.js +2 -2
  71. package/lib/commands/hosting-sites-list.js +3 -3
  72. package/lib/commands/index.js +1 -0
  73. package/lib/commands/login-ci.js +10 -10
  74. package/lib/commands/login.js +2 -2
  75. package/lib/commands/logout.js +1 -1
  76. package/lib/commands/open.js +1 -1
  77. package/lib/commands/projects-addfirebase.js +2 -2
  78. package/lib/commands/projects-create.js +2 -2
  79. package/lib/commands/projects-list.js +1 -1
  80. package/lib/commands/remoteconfig-get.js +3 -3
  81. package/lib/commands/remoteconfig-rollback.js +3 -3
  82. package/lib/commands/remoteconfig-versions-list.js +7 -2
  83. package/lib/commands/setup-emulators-database.js +8 -7
  84. package/lib/commands/setup-emulators-firestore.js +8 -7
  85. package/lib/commands/setup-emulators-pubsub.js +5 -4
  86. package/lib/commands/setup-emulators-storage.js +4 -3
  87. package/lib/commands/setup-emulators-ui.js +8 -7
  88. package/lib/commands/target-apply.js +17 -16
  89. package/lib/commands/target-clear.js +11 -10
  90. package/lib/commands/target-remove.js +10 -9
  91. package/lib/commands/target.js +20 -20
  92. package/lib/config.js +6 -6
  93. package/lib/database/api.js +2 -2
  94. package/lib/database/metadata.js +16 -24
  95. package/lib/defaultCredentials.js +3 -3
  96. package/lib/deploy/extensions/deploy.js +4 -4
  97. package/lib/deploy/extensions/deploymentSummary.js +5 -4
  98. package/lib/deploy/extensions/index.js +1 -0
  99. package/lib/deploy/extensions/params.js +1 -1
  100. package/lib/deploy/extensions/planner.js +3 -3
  101. package/lib/deploy/extensions/prepare.js +9 -9
  102. package/lib/deploy/extensions/release.js +1 -1
  103. package/lib/deploy/extensions/secrets.js +7 -7
  104. package/lib/deploy/extensions/validate.js +2 -2
  105. package/lib/deploy/functions/backend.js +9 -5
  106. package/lib/deploy/functions/checkIam.js +7 -7
  107. package/lib/deploy/functions/containerCleaner.js +3 -3
  108. package/lib/deploy/functions/deploy.js +4 -4
  109. package/lib/deploy/functions/ensureCloudBuildEnabled.js +3 -3
  110. package/lib/deploy/functions/index.js +1 -0
  111. package/lib/deploy/functions/prepare.js +29 -23
  112. package/lib/deploy/functions/prompts.js +5 -5
  113. package/lib/deploy/functions/release/executor.js +4 -1
  114. package/lib/deploy/functions/release/fabricator.js +9 -6
  115. package/lib/deploy/functions/release/index.js +2 -2
  116. package/lib/deploy/functions/release/planner.js +6 -6
  117. package/lib/deploy/functions/release/reporter.js +8 -4
  118. package/lib/deploy/functions/runtimes/discovery/index.js +2 -2
  119. package/lib/deploy/functions/runtimes/discovery/v1alpha1.js +14 -14
  120. package/lib/deploy/functions/runtimes/golang/index.js +11 -14
  121. package/lib/deploy/functions/runtimes/index.js +6 -10
  122. package/lib/deploy/functions/runtimes/node/index.js +6 -10
  123. package/lib/deploy/functions/runtimes/node/parseTriggers.js +3 -3
  124. package/lib/deploy/functions/runtimes/node/validate.js +2 -1
  125. package/lib/deploy/functions/services/storage.js +1 -1
  126. package/lib/deploy/functions/triggerRegionHelper.js +1 -1
  127. package/lib/deploy/functions/validate.js +32 -4
  128. package/lib/deploy/hosting/convertConfig.js +45 -24
  129. package/lib/deploy/hosting/deploy.js +7 -7
  130. package/lib/deploy/hosting/prepare.js +1 -1
  131. package/lib/deploy/hosting/uploader.js +1 -1
  132. package/lib/deploy/hosting/validate.js +3 -3
  133. package/lib/deploy/remoteconfig/prepare.js +3 -3
  134. package/lib/deploy/remoteconfig/release.js +3 -3
  135. package/lib/deploy/storage/deploy.js +1 -1
  136. package/lib/deploy/storage/release.js +2 -2
  137. package/lib/detectProjectRoot.js +5 -5
  138. package/lib/emulator/auth/apiSpec.js +13 -7
  139. package/lib/emulator/auth/handlers.js +3 -3
  140. package/lib/emulator/auth/index.js +1 -1
  141. package/lib/emulator/auth/operations.js +256 -248
  142. package/lib/emulator/auth/server.js +11 -8
  143. package/lib/emulator/auth/state.js +12 -12
  144. package/lib/emulator/commandUtils.js +5 -5
  145. package/lib/emulator/controller.js +16 -11
  146. package/lib/emulator/downloadableEmulators.js +5 -4
  147. package/lib/emulator/emulatorLogger.js +1 -1
  148. package/lib/emulator/functionsEmulator.js +110 -75
  149. package/lib/emulator/functionsEmulatorRuntime.js +36 -21
  150. package/lib/emulator/functionsEmulatorShell.js +3 -2
  151. package/lib/emulator/functionsRuntimeWorker.js +1 -1
  152. package/lib/emulator/hubExport.js +2 -2
  153. package/lib/emulator/storage/apis/firebase.js +2 -2
  154. package/lib/emulator/storage/apis/gcloud.js +2 -2
  155. package/lib/emulator/storage/cloudFunctions.js +1 -1
  156. package/lib/emulator/storage/files.js +14 -14
  157. package/lib/emulator/storage/index.js +2 -2
  158. package/lib/emulator/storage/metadata.js +7 -6
  159. package/lib/emulator/storage/rules/runtime.js +10 -9
  160. package/lib/emulator/storage/server.js +2 -2
  161. package/lib/ensureApiEnabled.js +7 -7
  162. package/lib/error.js +3 -3
  163. package/lib/extensions/askUserForConsent.js +3 -4
  164. package/lib/extensions/askUserForParam.js +11 -11
  165. package/lib/extensions/billingMigrationHelper.js +2 -2
  166. package/lib/extensions/changelog.js +4 -4
  167. package/lib/extensions/displayExtensionInfo.js +6 -6
  168. package/lib/extensions/emulator/optionsHelper.js +1 -1
  169. package/lib/extensions/emulator/specHelper.js +1 -1
  170. package/lib/extensions/emulator/triggerHelper.js +1 -1
  171. package/lib/extensions/export.js +6 -6
  172. package/lib/extensions/extensionsApi.js +68 -110
  173. package/lib/extensions/extensionsHelper.js +56 -43
  174. package/lib/extensions/listExtensions.js +1 -1
  175. package/lib/extensions/localHelper.js +1 -1
  176. package/lib/extensions/metricsTypeDef.js +2 -0
  177. package/lib/extensions/metricsUtils.js +98 -0
  178. package/lib/extensions/paramHelper.js +6 -6
  179. package/lib/extensions/provisioningHelper.js +13 -14
  180. package/lib/extensions/resolveSource.js +6 -6
  181. package/lib/extensions/secretsUtils.js +3 -3
  182. package/lib/extensions/updateHelper.js +10 -10
  183. package/lib/extensions/utils.js +1 -1
  184. package/lib/extensions/warnings.js +11 -10
  185. package/lib/fetchWebSetup.js +2 -2
  186. package/lib/filterTargets.js +2 -2
  187. package/lib/firestore/indexes.js +2 -2
  188. package/lib/fsAsync.js +3 -3
  189. package/lib/fsutils.js +2 -2
  190. package/lib/functional.js +2 -1
  191. package/lib/functions/env.js +1 -1
  192. package/lib/functions/runtimeConfigExport.js +4 -4
  193. package/lib/functionsConfig.js +7 -8
  194. package/lib/functionsShellCommandAction.js +4 -3
  195. package/lib/gcp/cloudbilling.js +8 -19
  196. package/lib/gcp/cloudfunctions.js +22 -46
  197. package/lib/gcp/cloudlogging.js +8 -11
  198. package/lib/gcp/cloudmonitoring.js +77 -0
  199. package/lib/gcp/cloudscheduler.js +8 -19
  200. package/lib/gcp/firedata.js +5 -4
  201. package/lib/gcp/firestore.js +5 -5
  202. package/lib/gcp/iam.js +19 -34
  203. package/lib/gcp/resourceManager.js +10 -15
  204. package/lib/gcp/rules.js +18 -41
  205. package/lib/gcp/runtimeconfig.js +31 -53
  206. package/lib/gcp/secretManager.js +24 -45
  207. package/lib/gcp/storage.js +24 -29
  208. package/lib/getDefaultDatabaseInstance.js +1 -1
  209. package/lib/getDefaultHostingSite.js +1 -1
  210. package/lib/getProjectNumber.js +2 -2
  211. package/lib/handlePreviewToggles.js +5 -5
  212. package/lib/hosting/api.js +6 -6
  213. package/lib/hosting/cloudRunProxy.js +6 -6
  214. package/lib/hosting/functionsProxy.js +3 -3
  215. package/lib/hosting/implicitInit.js +2 -2
  216. package/lib/hosting/normalizedHostingConfigs.js +3 -3
  217. package/lib/hosting/proxy.js +2 -2
  218. package/lib/init/features/account.js +7 -7
  219. package/lib/init/features/database.js +9 -9
  220. package/lib/init/features/emulators.js +8 -8
  221. package/lib/init/features/firestore/index.js +3 -3
  222. package/lib/init/features/firestore/indexes.js +2 -2
  223. package/lib/init/features/firestore/rules.js +2 -2
  224. package/lib/init/features/functions/golang.js +4 -4
  225. package/lib/init/features/functions/index.js +4 -4
  226. package/lib/init/features/hosting/github.js +31 -31
  227. package/lib/init/features/project.js +8 -8
  228. package/lib/init/features/remoteconfig.js +2 -2
  229. package/lib/init/features/storage.js +2 -2
  230. package/lib/listFiles.js +1 -1
  231. package/lib/management/apps.js +3 -3
  232. package/lib/management/projects.js +6 -6
  233. package/lib/previews.js +2 -2
  234. package/lib/profiler.js +1 -1
  235. package/lib/projectPath.js +1 -1
  236. package/lib/projectUtils.js +2 -2
  237. package/lib/prompt.js +0 -1
  238. package/lib/rc.js +1 -1
  239. package/lib/remoteconfig/get.js +14 -8
  240. package/lib/remoteconfig/rollback.js +13 -6
  241. package/lib/remoteconfig/versionslist.js +13 -7
  242. package/lib/requireAuth.js +2 -2
  243. package/lib/requireDatabaseInstance.js +1 -1
  244. package/lib/requireHostingSite.js +1 -1
  245. package/lib/requirePermissions.js +4 -4
  246. package/lib/rulesDeploy.js +2 -2
  247. package/lib/serve/functions.js +14 -7
  248. package/lib/serve/hosting.js +7 -7
  249. package/lib/utils.js +3 -2
  250. package/npm-shrinkwrap.json +24090 -0
  251. package/package.json +36 -31
  252. package/schema/firebase-config.json +387 -12
  253. package/lib/commands/functions-config-legacy.js +0 -45
  254. package/lib/prepareFirebaseRules.js +0 -58
@@ -1,17 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getExtension = exports.deleteExtension = exports.unpublishExtension = exports.publishExtensionVersion = exports.undeprecateExtensionVersion = exports.deprecateExtensionVersion = exports.registerPublisherProfile = exports.listExtensionVersions = exports.listExtensions = exports.getExtensionVersion = exports.getSource = exports.createSource = exports.updateInstanceFromRegistry = exports.updateInstance = exports.configureInstance = exports.listInstances = exports.getInstance = exports.deleteInstance = exports.createInstance = exports.ParamType = exports.Visibility = exports.RegistryLaunchStage = void 0;
3
+ exports.getExtension = exports.deleteExtension = exports.unpublishExtension = exports.publishExtensionVersion = exports.undeprecateExtensionVersion = exports.deprecateExtensionVersion = exports.registerPublisherProfile = exports.getPublisherProfile = exports.listExtensionVersions = exports.listExtensions = exports.getExtensionVersion = exports.getSource = exports.createSource = exports.updateInstanceFromRegistry = exports.updateInstance = exports.configureInstance = exports.listInstances = exports.getInstance = exports.deleteInstance = exports.createInstance = exports.ParamType = exports.Visibility = exports.RegistryLaunchStage = void 0;
4
4
  const yaml = require("js-yaml");
5
- const _ = require("lodash");
6
5
  const clc = require("cli-color");
7
- const marked = require("marked");
8
- const api = require("../api");
9
- const refs = require("./refs");
6
+ const { marked } = require("marked");
7
+ const apiv2_1 = require("../apiv2");
8
+ const api_1 = require("../api");
9
+ const error_1 = require("../error");
10
10
  const logger_1 = require("../logger");
11
11
  const operationPoller = require("../operation-poller");
12
- const error_1 = require("../error");
12
+ const refs = require("./refs");
13
13
  const VERSION = "v1beta";
14
14
  const PAGE_SIZE_MAX = 100;
15
+ const apiClient = new apiv2_1.Client({ urlPrefix: api_1.extensionsOrigin, apiVersion: VERSION });
15
16
  var RegistryLaunchStage;
16
17
  (function (RegistryLaunchStage) {
17
18
  RegistryLaunchStage["EXPERIMENTAL"] = "EXPERIMENTAL";
@@ -33,22 +34,19 @@ var ParamType;
33
34
  ParamType["SECRET"] = "SECRET";
34
35
  })(ParamType = exports.ParamType || (exports.ParamType = {}));
35
36
  async function createInstanceHelper(projectId, instanceId, config, validateOnly = false) {
36
- const createRes = await api.request("POST", `/${VERSION}/projects/${projectId}/instances/`, {
37
- auth: true,
38
- origin: api.extensionsOrigin,
39
- data: {
40
- name: `projects/${projectId}/instances/${instanceId}`,
41
- config: config,
42
- },
43
- query: {
44
- validateOnly,
37
+ const createRes = await apiClient.post(`/projects/${projectId}/instances/`, {
38
+ name: `projects/${projectId}/instances/${instanceId}`,
39
+ config,
40
+ }, {
41
+ queryParams: {
42
+ validateOnly: validateOnly ? "true" : "false",
45
43
  },
46
44
  });
47
45
  if (validateOnly) {
48
- return createRes;
46
+ return createRes.body;
49
47
  }
50
48
  const pollRes = await operationPoller.pollOperation({
51
- apiOrigin: api.extensionsOrigin,
49
+ apiOrigin: api_1.extensionsOrigin,
52
50
  apiVersion: VERSION,
53
51
  operationResourceName: createRes.body.name,
54
52
  masterTimeout: 600000,
@@ -78,12 +76,9 @@ async function createInstance(args) {
78
76
  }
79
77
  exports.createInstance = createInstance;
80
78
  async function deleteInstance(projectId, instanceId) {
81
- const deleteRes = await api.request("DELETE", `/${VERSION}/projects/${projectId}/instances/${instanceId}`, {
82
- auth: true,
83
- origin: api.extensionsOrigin,
84
- });
79
+ const deleteRes = await apiClient.delete(`/projects/${projectId}/instances/${instanceId}`);
85
80
  const pollRes = await operationPoller.pollOperation({
86
- apiOrigin: api.extensionsOrigin,
81
+ apiOrigin: api_1.extensionsOrigin,
87
82
  apiVersion: VERSION,
88
83
  operationResourceName: deleteRes.body.name,
89
84
  masterTimeout: 600000,
@@ -91,21 +86,16 @@ async function deleteInstance(projectId, instanceId) {
91
86
  return pollRes;
92
87
  }
93
88
  exports.deleteInstance = deleteInstance;
94
- async function getInstance(projectId, instanceId, options = {}) {
95
- const res = await api.request("GET", `/${VERSION}/projects/${projectId}/instances/${instanceId}`, _.assign({
96
- auth: true,
97
- origin: api.extensionsOrigin,
98
- }, options));
89
+ async function getInstance(projectId, instanceId) {
90
+ const res = await apiClient.get(`/projects/${projectId}/instances/${instanceId}`);
99
91
  return res.body;
100
92
  }
101
93
  exports.getInstance = getInstance;
102
94
  async function listInstances(projectId) {
103
95
  const instances = [];
104
- const getNextPage = async (pageToken) => {
105
- const res = await api.request("GET", `/${VERSION}/projects/${projectId}/instances`, {
106
- auth: true,
107
- origin: api.extensionsOrigin,
108
- query: {
96
+ const getNextPage = async (pageToken = "") => {
97
+ const res = await apiClient.get(`/projects/${projectId}/instances`, {
98
+ queryParams: {
109
99
  pageSize: PAGE_SIZE_MAX,
110
100
  pageToken,
111
101
  },
@@ -182,20 +172,17 @@ async function updateInstanceFromRegistry(args) {
182
172
  }
183
173
  exports.updateInstanceFromRegistry = updateInstanceFromRegistry;
184
174
  async function patchInstance(args) {
185
- const updateRes = await api.request("PATCH", `/${VERSION}/projects/${args.projectId}/instances/${args.instanceId}`, {
186
- auth: true,
187
- origin: api.extensionsOrigin,
188
- query: {
175
+ const updateRes = await apiClient.patch(`/projects/${args.projectId}/instances/${args.instanceId}`, args.data, {
176
+ queryParams: {
189
177
  updateMask: args.updateMask,
190
- validateOnly: args.validateOnly,
178
+ validateOnly: args.validateOnly ? "true" : "false",
191
179
  },
192
- data: args.data,
193
180
  });
194
181
  if (args.validateOnly) {
195
182
  return updateRes;
196
183
  }
197
184
  const pollRes = await operationPoller.pollOperation({
198
- apiOrigin: api.extensionsOrigin,
185
+ apiOrigin: api_1.extensionsOrigin,
199
186
  apiVersion: VERSION,
200
187
  operationResourceName: updateRes.body.name,
201
188
  masterTimeout: 600000,
@@ -217,16 +204,12 @@ function populateResourceProperties(spec) {
217
204
  }
218
205
  }
219
206
  async function createSource(projectId, packageUri, extensionRoot) {
220
- const createRes = await api.request("POST", `/${VERSION}/projects/${projectId}/sources/`, {
221
- auth: true,
222
- origin: api.extensionsOrigin,
223
- data: {
224
- packageUri,
225
- extensionRoot,
226
- },
207
+ const createRes = await apiClient.post(`/projects/${projectId}/sources/`, {
208
+ packageUri,
209
+ extensionRoot,
227
210
  });
228
211
  const pollRes = await operationPoller.pollOperation({
229
- apiOrigin: api.extensionsOrigin,
212
+ apiOrigin: api_1.extensionsOrigin,
230
213
  apiVersion: VERSION,
231
214
  operationResourceName: createRes.body.name,
232
215
  masterTimeout: 600000,
@@ -237,18 +220,12 @@ async function createSource(projectId, packageUri, extensionRoot) {
237
220
  return pollRes;
238
221
  }
239
222
  exports.createSource = createSource;
240
- function getSource(sourceName) {
241
- return api
242
- .request("GET", `/${VERSION}/${sourceName}`, {
243
- auth: true,
244
- origin: api.extensionsOrigin,
245
- })
246
- .then((res) => {
247
- if (res.body.spec) {
248
- populateResourceProperties(res.body.spec);
249
- }
250
- return res.body;
251
- });
223
+ async function getSource(sourceName) {
224
+ const res = await apiClient.get(`/${sourceName}`);
225
+ if (res.body.spec) {
226
+ populateResourceProperties(res.body.spec);
227
+ }
228
+ return res.body;
252
229
  }
253
230
  exports.getSource = getSource;
254
231
  async function getExtensionVersion(extensionVersionRef) {
@@ -257,10 +234,7 @@ async function getExtensionVersion(extensionVersionRef) {
257
234
  throw new error_1.FirebaseError(`ExtensionVersion ref "${extensionVersionRef}" must supply a version.`);
258
235
  }
259
236
  try {
260
- const res = await api.request("GET", `/${VERSION}/${refs.toExtensionVersionName(ref)}`, {
261
- auth: true,
262
- origin: api.extensionsOrigin,
263
- });
237
+ const res = await apiClient.get(`/${refs.toExtensionVersionName(ref)}`);
264
238
  if (res.body.spec) {
265
239
  populateResourceProperties(res.body.spec);
266
240
  }
@@ -279,12 +253,9 @@ async function getExtensionVersion(extensionVersionRef) {
279
253
  exports.getExtensionVersion = getExtensionVersion;
280
254
  async function listExtensions(publisherId) {
281
255
  const extensions = [];
282
- const getNextPage = async (pageToken) => {
283
- const res = await api.request("GET", `/${VERSION}/publishers/${publisherId}/extensions`, {
284
- auth: true,
285
- origin: api.extensionsOrigin,
286
- showUnpublished: false,
287
- query: {
256
+ const getNextPage = async (pageToken = "") => {
257
+ const res = await apiClient.get(`/publishers/${publisherId}/extensions`, {
258
+ queryParams: {
288
259
  pageSize: PAGE_SIZE_MAX,
289
260
  pageToken,
290
261
  },
@@ -300,14 +271,12 @@ async function listExtensions(publisherId) {
300
271
  return extensions;
301
272
  }
302
273
  exports.listExtensions = listExtensions;
303
- async function listExtensionVersions(ref, filter) {
274
+ async function listExtensionVersions(ref, filter = "") {
304
275
  const { publisherId, extensionId } = refs.parse(ref);
305
276
  const extensionVersions = [];
306
- const getNextPage = async (pageToken) => {
307
- const res = await api.request("GET", `/${VERSION}/publishers/${publisherId}/extensions/${extensionId}/versions`, {
308
- auth: true,
309
- origin: api.extensionsOrigin,
310
- query: {
277
+ const getNextPage = async (pageToken = "") => {
278
+ const res = await apiClient.get(`/publishers/${publisherId}/extensions/${extensionId}/versions`, {
279
+ queryParams: {
311
280
  filter,
312
281
  pageSize: PAGE_SIZE_MAX,
313
282
  pageToken,
@@ -324,11 +293,20 @@ async function listExtensionVersions(ref, filter) {
324
293
  return extensionVersions;
325
294
  }
326
295
  exports.listExtensionVersions = listExtensionVersions;
296
+ async function getPublisherProfile(projectId, publisherId) {
297
+ const res = await apiClient.get(`/projects/${projectId}/publisherProfile`, {
298
+ queryParams: publisherId == undefined
299
+ ? undefined
300
+ : {
301
+ publisherId,
302
+ },
303
+ });
304
+ return res.body;
305
+ }
306
+ exports.getPublisherProfile = getPublisherProfile;
327
307
  async function registerPublisherProfile(projectId, publisherId) {
328
- const res = await api.request("POST", `/${VERSION}/projects/${projectId}/publisherProfile:register`, {
329
- auth: true,
330
- origin: api.extensionsOrigin,
331
- data: { publisherId },
308
+ const res = await apiClient.post(`/projects/${projectId}/publisherProfile:register`, {
309
+ publisherId,
332
310
  });
333
311
  return res.body;
334
312
  }
@@ -336,10 +314,8 @@ exports.registerPublisherProfile = registerPublisherProfile;
336
314
  async function deprecateExtensionVersion(extensionRef, deprecationMessage) {
337
315
  const ref = refs.parse(extensionRef);
338
316
  try {
339
- const res = await api.request("POST", `/${VERSION}/${refs.toExtensionVersionName(ref)}:deprecate`, {
340
- auth: true,
341
- origin: api.extensionsOrigin,
342
- data: { deprecationMessage },
317
+ const res = await apiClient.post(`/${refs.toExtensionVersionName(ref)}:deprecate`, {
318
+ deprecationMessage,
343
319
  });
344
320
  return res.body;
345
321
  }
@@ -362,10 +338,7 @@ exports.deprecateExtensionVersion = deprecateExtensionVersion;
362
338
  async function undeprecateExtensionVersion(extensionRef) {
363
339
  const ref = refs.parse(extensionRef);
364
340
  try {
365
- const res = await api.request("POST", `/${VERSION}/${refs.toExtensionVersionName(ref)}:undeprecate`, {
366
- auth: true,
367
- origin: api.extensionsOrigin,
368
- });
341
+ const res = await apiClient.post(`/${refs.toExtensionVersionName(ref)}:undeprecate`);
369
342
  return res.body;
370
343
  }
371
344
  catch (err) {
@@ -389,17 +362,13 @@ async function publishExtensionVersion(extensionVersionRef, packageUri, extensio
389
362
  if (!ref.version) {
390
363
  throw new error_1.FirebaseError(`ExtensionVersion ref "${extensionVersionRef}" must supply a version.`);
391
364
  }
392
- const publishRes = await api.request("POST", `/${VERSION}/${refs.toExtensionName(ref)}/versions:publish`, {
393
- auth: true,
394
- origin: api.extensionsOrigin,
395
- data: {
396
- versionId: ref.version,
397
- packageUri,
398
- extensionRoot: extensionRoot !== null && extensionRoot !== void 0 ? extensionRoot : "/",
399
- },
365
+ const publishRes = await apiClient.post(`/${refs.toExtensionName(ref)}/versions:publish`, {
366
+ versionId: ref.version,
367
+ packageUri,
368
+ extensionRoot: extensionRoot !== null && extensionRoot !== void 0 ? extensionRoot : "/",
400
369
  });
401
370
  const pollRes = await operationPoller.pollOperation({
402
- apiOrigin: api.extensionsOrigin,
371
+ apiOrigin: api_1.extensionsOrigin,
403
372
  apiVersion: VERSION,
404
373
  operationResourceName: publishRes.body.name,
405
374
  masterTimeout: 600000,
@@ -412,12 +381,8 @@ async function unpublishExtension(extensionRef) {
412
381
  if (ref.version) {
413
382
  throw new error_1.FirebaseError(`Extension reference "${extensionRef}" must not contain a version.`);
414
383
  }
415
- const url = `/${VERSION}/${refs.toExtensionName(ref)}:unpublish`;
416
384
  try {
417
- await api.request("POST", url, {
418
- auth: true,
419
- origin: api.extensionsOrigin,
420
- });
385
+ await apiClient.post(`/${refs.toExtensionName(ref)}:unpublish`);
421
386
  }
422
387
  catch (err) {
423
388
  if (err.status === 403) {
@@ -437,12 +402,8 @@ async function deleteExtension(extensionRef) {
437
402
  if (ref.version) {
438
403
  throw new error_1.FirebaseError(`Extension reference "${extensionRef}" must not contain a version.`);
439
404
  }
440
- const url = `/${VERSION}/${refs.toExtensionName(ref)}`;
441
405
  try {
442
- await api.request("DELETE", url, {
443
- auth: true,
444
- origin: api.extensionsOrigin,
445
- });
406
+ await apiClient.delete(`/${refs.toExtensionName(ref)}`);
446
407
  }
447
408
  catch (err) {
448
409
  if (err.status === 403) {
@@ -463,10 +424,7 @@ exports.deleteExtension = deleteExtension;
463
424
  async function getExtension(extensionRef) {
464
425
  const ref = refs.parse(extensionRef);
465
426
  try {
466
- const res = await api.request("GET", `/${VERSION}/${refs.toExtensionName(ref)}`, {
467
- auth: true,
468
- origin: api.extensionsOrigin,
469
- });
427
+ const res = await apiClient.get(`/${refs.toExtensionName(ref)}`);
470
428
  return res.body;
471
429
  }
472
430
  catch (err) {
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.confirm = exports.getSourceOrigin = exports.isLocalOrURLPath = exports.isLocalPath = exports.isUrlPath = exports.instanceIdExists = exports.promptForRepeatInstance = exports.promptForOfficialExtension = exports.displayReleaseNotes = exports.getExtensionSourceFromName = exports.createSourceFromLocation = exports.publishExtensionVersionFromLocalSource = exports.ensureExtensionsApiEnabled = exports.promptForValidInstanceId = exports.validateSpec = exports.validateCommandLineParams = exports.populateDefaultParams = exports.substituteParams = exports.getFirebaseProjectParams = exports.getDBInstanceFromURL = exports.resourceTypeToNiceName = exports.AUTOPOULATED_PARAM_PLACEHOLDERS = exports.EXTENSIONS_BUCKET_NAME = exports.URL_REGEX = exports.logPrefix = exports.SourceOrigin = exports.SpecParamType = void 0;
3
+ exports.confirm = exports.getSourceOrigin = exports.isLocalOrURLPath = exports.isLocalPath = exports.isUrlPath = exports.instanceIdExists = exports.promptForRepeatInstance = exports.promptForOfficialExtension = exports.displayReleaseNotes = exports.getPublisherProjectFromName = exports.getExtensionSourceFromName = exports.createSourceFromLocation = exports.publishExtensionVersionFromLocalSource = exports.ensureExtensionsApiEnabled = exports.promptForValidInstanceId = exports.validateSpec = exports.validateCommandLineParams = exports.populateDefaultParams = exports.substituteParams = exports.getFirebaseProjectParams = exports.getDBInstanceFromURL = exports.resourceTypeToNiceName = exports.AUTOPOULATED_PARAM_PLACEHOLDERS = exports.EXTENSIONS_BUCKET_NAME = exports.URL_REGEX = exports.logPrefix = exports.SourceOrigin = exports.SpecParamType = void 0;
4
4
  const _ = require("lodash");
5
5
  const clc = require("cli-color");
6
6
  const ora = require("ora");
7
7
  const semver = require("semver");
8
- const marked = require("marked");
8
+ const { marked } = require("marked");
9
9
  const TerminalRenderer = require("marked-terminal");
10
10
  marked.setOptions({
11
11
  renderer: new TerminalRenderer(),
@@ -48,7 +48,7 @@ var SourceOrigin;
48
48
  exports.logPrefix = "extensions";
49
49
  const VALID_LICENSES = ["apache-2.0"];
50
50
  exports.URL_REGEX = /^https:/;
51
- exports.EXTENSIONS_BUCKET_NAME = utils_2.envOverride("FIREBASE_EXTENSIONS_UPLOAD_BUCKET", "firebase-ext-eap-uploads");
51
+ exports.EXTENSIONS_BUCKET_NAME = (0, utils_2.envOverride)("FIREBASE_EXTENSIONS_UPLOAD_BUCKET", "firebase-ext-eap-uploads");
52
52
  const AUTOPOPULATED_PARAM_NAMES = [
53
53
  "PROJECT_ID",
54
54
  "STORAGE_BUCKET",
@@ -68,7 +68,7 @@ exports.resourceTypeToNiceName = {
68
68
  };
69
69
  function getDBInstanceFromURL(databaseUrl = "") {
70
70
  const instanceRegex = new RegExp("(?:https://)(.*)(?:.firebaseio.com)");
71
- const matches = databaseUrl.match(instanceRegex);
71
+ const matches = instanceRegex.exec(databaseUrl);
72
72
  if (matches && matches.length > 1) {
73
73
  return matches[1];
74
74
  }
@@ -76,8 +76,8 @@ function getDBInstanceFromURL(databaseUrl = "") {
76
76
  }
77
77
  exports.getDBInstanceFromURL = getDBInstanceFromURL;
78
78
  async function getFirebaseProjectParams(projectId) {
79
- const body = await functionsConfig_1.getFirebaseConfig({ project: projectId });
80
- const projectNumber = await getProjectNumber_1.getProjectNumber({ projectId });
79
+ const body = await (0, functionsConfig_1.getFirebaseConfig)({ project: projectId });
80
+ const projectNumber = await (0, getProjectNumber_1.getProjectNumber)({ projectId });
81
81
  const FIREBASE_CONFIG = JSON.stringify({
82
82
  projectId: body.projectId,
83
83
  databaseURL: body.databaseURL,
@@ -134,7 +134,7 @@ function validateCommandLineParams(envVars, paramSpec) {
134
134
  }
135
135
  let allParamsValid = true;
136
136
  for (const param of paramSpec) {
137
- if (!askUserForParam_1.checkResponse(envVars[param.param], param)) {
137
+ if (!(0, askUserForParam_1.checkResponse)(envVars[param.param], param)) {
138
138
  allParamsValid = false;
139
139
  }
140
140
  }
@@ -233,7 +233,7 @@ async function promptForValidInstanceId(instanceId) {
233
233
  let newInstanceId = "";
234
234
  const instanceIdRegex = /^[a-z][a-z\d\-]*[a-z\d]$/;
235
235
  while (!instanceIdIsValid) {
236
- newInstanceId = await prompt_1.promptOnce({
236
+ newInstanceId = await (0, prompt_1.promptOnce)({
237
237
  type: "input",
238
238
  default: instanceId,
239
239
  message: `Please enter a new name for this instance:`,
@@ -253,20 +253,20 @@ async function promptForValidInstanceId(instanceId) {
253
253
  }
254
254
  exports.promptForValidInstanceId = promptForValidInstanceId;
255
255
  async function ensureExtensionsApiEnabled(options) {
256
- const projectId = projectUtils_1.needProjectId(options);
257
- return await ensureApiEnabled_1.ensure(projectId, "firebaseextensions.googleapis.com", "extensions", options.markdown);
256
+ const projectId = (0, projectUtils_1.needProjectId)(options);
257
+ return await (0, ensureApiEnabled_1.ensure)(projectId, "firebaseextensions.googleapis.com", "extensions", options.markdown);
258
258
  }
259
259
  exports.ensureExtensionsApiEnabled = ensureExtensionsApiEnabled;
260
260
  async function archiveAndUploadSource(extPath, bucketName) {
261
- const zippedSource = await archiveDirectory_1.archiveDirectory(extPath, {
261
+ const zippedSource = await (0, archiveDirectory_1.archiveDirectory)(extPath, {
262
262
  type: "zip",
263
263
  ignore: ["node_modules", ".git"],
264
264
  });
265
- const res = await storage_1.uploadObject(zippedSource, bucketName);
265
+ const res = await (0, storage_1.uploadObject)(zippedSource, bucketName);
266
266
  return `/${res.bucket}/${res.object}`;
267
267
  }
268
268
  async function publishExtensionVersionFromLocalSource(args) {
269
- const extensionSpec = await localHelper_1.getLocalExtensionSpec(args.rootDirectory);
269
+ const extensionSpec = await (0, localHelper_1.getLocalExtensionSpec)(args.rootDirectory);
270
270
  if (extensionSpec.name != args.extensionId) {
271
271
  throw new error_1.FirebaseError(`Extension ID '${clc.bold(args.extensionId)}' does not match the name in extension.yaml '${clc.bold(extensionSpec.name)}'.`);
272
272
  }
@@ -275,13 +275,13 @@ async function publishExtensionVersionFromLocalSource(args) {
275
275
  validateSpec(subbedSpec);
276
276
  let extension;
277
277
  try {
278
- extension = await extensionsApi_1.getExtension(`${args.publisherId}/${args.extensionId}`);
278
+ extension = await (0, extensionsApi_1.getExtension)(`${args.publisherId}/${args.extensionId}`);
279
279
  }
280
280
  catch (err) {
281
281
  }
282
282
  let notes;
283
283
  try {
284
- const changes = changelog_1.getLocalChangelog(args.rootDirectory);
284
+ const changes = (0, changelog_1.getLocalChangelog)(args.rootDirectory);
285
285
  notes = changes[extensionSpec.version];
286
286
  }
287
287
  catch (err) {
@@ -315,7 +315,7 @@ async function publishExtensionVersionFromLocalSource(args) {
315
315
  const ref = `${args.publisherId}/${args.extensionId}@${extensionSpec.version}`;
316
316
  let packageUri;
317
317
  let objectPath = "";
318
- const uploadSpinner = ora.default(" Archiving and uploading extension source code");
318
+ const uploadSpinner = ora(" Archiving and uploading extension source code");
319
319
  try {
320
320
  uploadSpinner.start();
321
321
  objectPath = await archiveAndUploadSource(args.rootDirectory, exports.EXTENSIONS_BUCKET_NAME);
@@ -326,11 +326,11 @@ async function publishExtensionVersionFromLocalSource(args) {
326
326
  uploadSpinner.fail();
327
327
  throw err;
328
328
  }
329
- const publishSpinner = ora.default(`Publishing ${clc.bold(ref)}`);
329
+ const publishSpinner = ora(`Publishing ${clc.bold(ref)}`);
330
330
  let res;
331
331
  try {
332
332
  publishSpinner.start();
333
- res = await extensionsApi_1.publishExtensionVersion(ref, packageUri);
333
+ res = await (0, extensionsApi_1.publishExtensionVersion)(ref, packageUri);
334
334
  publishSpinner.succeed(` Successfully published ${clc.bold(ref)}`);
335
335
  }
336
336
  catch (err) {
@@ -348,8 +348,8 @@ async function createSourceFromLocation(projectId, sourceUri) {
348
348
  let packageUri;
349
349
  let extensionRoot;
350
350
  let objectPath = "";
351
- if (!exports.URL_REGEX.test(sourceUri)) {
352
- const uploadSpinner = ora.default(" Archiving and uploading extension source code");
351
+ if (!sourceUri.startsWith("https:")) {
352
+ const uploadSpinner = ora(" Archiving and uploading extension source code");
353
353
  try {
354
354
  uploadSpinner.start();
355
355
  objectPath = await archiveAndUploadSource(sourceUri, exports.EXTENSIONS_BUCKET_NAME);
@@ -365,7 +365,7 @@ async function createSourceFromLocation(projectId, sourceUri) {
365
365
  else {
366
366
  [packageUri, extensionRoot] = sourceUri.split("#");
367
367
  }
368
- const res = await extensionsApi_1.createSource(projectId, packageUri, extensionRoot);
368
+ const res = await (0, extensionsApi_1.createSource)(projectId, packageUri, extensionRoot);
369
369
  logger_1.logger.debug("Created new Extension Source %s", res.name);
370
370
  await deleteUploadedSource(objectPath);
371
371
  return res;
@@ -374,7 +374,7 @@ exports.createSourceFromLocation = createSourceFromLocation;
374
374
  async function deleteUploadedSource(objectPath) {
375
375
  if (objectPath.length) {
376
376
  try {
377
- await storage_1.deleteObject(objectPath);
377
+ await (0, storage_1.deleteObject)(objectPath);
378
378
  logger_1.logger.debug("Cleaned up uploaded source archive");
379
379
  }
380
380
  catch (err) {
@@ -387,17 +387,26 @@ async function getExtensionSourceFromName(extensionName) {
387
387
  const existingSourceRegex = /projects\/.+\/sources\/.+/;
388
388
  if (officialExtensionRegex.test(extensionName)) {
389
389
  const [name, version] = extensionName.split("@");
390
- const registryEntry = await resolveSource_1.resolveRegistryEntry(name);
391
- const sourceUrl = resolveSource_1.resolveSourceUrl(registryEntry, name, version);
392
- return await extensionsApi_1.getSource(sourceUrl);
390
+ const registryEntry = await (0, resolveSource_1.resolveRegistryEntry)(name);
391
+ const sourceUrl = (0, resolveSource_1.resolveSourceUrl)(registryEntry, name, version);
392
+ return await (0, extensionsApi_1.getSource)(sourceUrl);
393
393
  }
394
394
  else if (existingSourceRegex.test(extensionName)) {
395
395
  logger_1.logger.info(`Fetching the source "${extensionName}"...`);
396
- return await extensionsApi_1.getSource(extensionName);
396
+ return await (0, extensionsApi_1.getSource)(extensionName);
397
397
  }
398
398
  throw new error_1.FirebaseError(`Could not find an extension named '${extensionName}'. `);
399
399
  }
400
400
  exports.getExtensionSourceFromName = getExtensionSourceFromName;
401
+ function getPublisherProjectFromName(publisherName) {
402
+ const publisherNameRegex = /projects\/.+\/publisherProfile/;
403
+ if (publisherNameRegex.test(publisherName)) {
404
+ const [_, projectNumber, __] = publisherName.split("/");
405
+ return Number.parseInt(projectNumber);
406
+ }
407
+ throw new error_1.FirebaseError(`Could not find publisher with name '${publisherName}'.`);
408
+ }
409
+ exports.getPublisherProjectFromName = getPublisherProjectFromName;
401
410
  function displayReleaseNotes(publisherId, extensionId, versionId, releaseNotes) {
402
411
  const releaseNotesMessage = releaseNotes
403
412
  ? ` Release notes for this version:\n${marked(releaseNotes)}\n`
@@ -408,12 +417,12 @@ function displayReleaseNotes(publisherId, extensionId, versionId, releaseNotes)
408
417
  }
409
418
  exports.displayReleaseNotes = displayReleaseNotes;
410
419
  async function promptForOfficialExtension(message) {
411
- const officialExts = await resolveSource_1.getExtensionRegistry(true);
412
- return await prompt_1.promptOnce({
420
+ const officialExts = await (0, resolveSource_1.getExtensionRegistry)(true);
421
+ return await (0, prompt_1.promptOnce)({
413
422
  name: "input",
414
423
  type: "list",
415
424
  message,
416
- choices: utils_1.convertOfficialExtensionsToList(officialExts),
425
+ choices: (0, utils_1.convertOfficialExtensionsToList)(officialExts),
417
426
  pageSize: _.size(officialExts),
418
427
  });
419
428
  }
@@ -425,7 +434,7 @@ async function promptForRepeatInstance(projectName, extensionName) {
425
434
  { name: "Install a new instance with a different ID", value: "installNew" },
426
435
  { name: "Cancel extension installation", value: "cancel" },
427
436
  ];
428
- return await prompt_1.promptOnce({
437
+ return await (0, prompt_1.promptOnce)({
429
438
  type: "list",
430
439
  message,
431
440
  choices,
@@ -433,24 +442,28 @@ async function promptForRepeatInstance(projectName, extensionName) {
433
442
  }
434
443
  exports.promptForRepeatInstance = promptForRepeatInstance;
435
444
  async function instanceIdExists(projectId, instanceId) {
436
- const instanceRes = await extensionsApi_1.getInstance(projectId, instanceId, {
437
- resolveOnHTTPError: true,
438
- });
439
- if (instanceRes.error) {
440
- if (_.get(instanceRes, "error.code") === 404) {
441
- return false;
445
+ try {
446
+ await (0, extensionsApi_1.getInstance)(projectId, instanceId);
447
+ }
448
+ catch (err) {
449
+ if (err instanceof error_1.FirebaseError) {
450
+ if (err.status === 404) {
451
+ return false;
452
+ }
453
+ const msg = `Unexpected error when checking if instance ID exists: ${err}`;
454
+ throw new error_1.FirebaseError(msg, {
455
+ original: err,
456
+ });
457
+ }
458
+ else {
459
+ throw err;
442
460
  }
443
- const msg = "Unexpected error when checking if instance ID exists: " +
444
- _.get(instanceRes, "error.message");
445
- throw new error_1.FirebaseError(msg, {
446
- original: instanceRes.error,
447
- });
448
461
  }
449
462
  return true;
450
463
  }
451
464
  exports.instanceIdExists = instanceIdExists;
452
465
  function isUrlPath(extInstallPath) {
453
- return exports.URL_REGEX.test(extInstallPath);
466
+ return extInstallPath.startsWith("https:");
454
467
  }
455
468
  exports.isUrlPath = isUrlPath;
456
469
  function isLocalPath(extInstallPath) {
@@ -493,7 +506,7 @@ exports.getSourceOrigin = getSourceOrigin;
493
506
  async function confirm(args) {
494
507
  if (!args.nonInteractive && !args.force) {
495
508
  const message = `Do you wish to continue?`;
496
- return await prompt_1.promptOnce({
509
+ return await (0, prompt_1.promptOnce)({
497
510
  type: "confirm",
498
511
  message,
499
512
  default: args.default,
@@ -9,7 +9,7 @@ const extensionsHelper_1 = require("./extensionsHelper");
9
9
  const utils = require("../utils");
10
10
  const extensionsUtils = require("./utils");
11
11
  async function listExtensions(projectId) {
12
- const instances = await extensionsApi_1.listInstances(projectId);
12
+ const instances = await (0, extensionsApi_1.listInstances)(projectId);
13
13
  if (instances.length < 1) {
14
14
  utils.logLabeledBullet(extensionsHelper_1.logPrefix, `there are no extensions installed on project ${clc.bold(projectId)}.`);
15
15
  return [];
@@ -22,7 +22,7 @@ async function getLocalExtensionSpec(directory) {
22
22
  }
23
23
  exports.getLocalExtensionSpec = getLocalExtensionSpec;
24
24
  function findExtensionYaml(directory) {
25
- while (!fsutils_1.fileExistsSync(path.resolve(directory, EXTENSIONS_SPEC_FILE))) {
25
+ while (!(0, fsutils_1.fileExistsSync)(path.resolve(directory, EXTENSIONS_SPEC_FILE))) {
26
26
  const parentDir = path.dirname(directory);
27
27
  if (parentDir === directory) {
28
28
  throw new error_1.FirebaseError("Couldn't find an extension.yaml file. Check that you are in the root directory of your extension.");
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });