@ccci/micro-server 1.0.126 → 1.0.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -115336,19 +115336,19 @@ var require_parseParams = __commonJS((exports, module) => {
115336
115336
 
115337
115337
  // node_modules/@fastify/busboy/lib/utils/basename.js
115338
115338
  var require_basename = __commonJS((exports, module) => {
115339
- module.exports = function basename(path4) {
115340
- if (typeof path4 !== "string") {
115339
+ module.exports = function basename(path3) {
115340
+ if (typeof path3 !== "string") {
115341
115341
  return "";
115342
115342
  }
115343
- for (var i = path4.length - 1;i >= 0; --i) {
115344
- switch (path4.charCodeAt(i)) {
115343
+ for (var i = path3.length - 1;i >= 0; --i) {
115344
+ switch (path3.charCodeAt(i)) {
115345
115345
  case 47:
115346
115346
  case 92:
115347
- path4 = path4.slice(i + 1);
115348
- return path4 === ".." || path4 === "." ? "" : path4;
115347
+ path3 = path3.slice(i + 1);
115348
+ return path3 === ".." || path3 === "." ? "" : path3;
115349
115349
  }
115350
115350
  }
115351
- return path4 === ".." || path4 === "." ? "" : path4;
115351
+ return path3 === ".." || path3 === "." ? "" : path3;
115352
115352
  };
115353
115353
  });
115354
115354
 
@@ -133325,7 +133325,7 @@ var require_credential_internal = __commonJS((exports) => {
133325
133325
  var readCredentialFile = function(filePath, ignoreMissing) {
133326
133326
  let fileText;
133327
133327
  try {
133328
- fileText = fs7.readFileSync(filePath, "utf8");
133328
+ fileText = fs6.readFileSync(filePath, "utf8");
133329
133329
  } catch (error) {
133330
133330
  if (ignoreMissing) {
133331
133331
  return null;
@@ -133357,9 +133357,9 @@ var require_credential_internal = __commonJS((exports) => {
133357
133357
  */
133358
133358
  Object.defineProperty(exports, "__esModule", { value: true });
133359
133359
  exports.getApplicationDefault = exports.isApplicationDefault = exports.ImpersonatedServiceAccountCredential = exports.RefreshTokenCredential = exports.ComputeEngineCredential = exports.ServiceAccountCredential = undefined;
133360
- var fs7 = __require("fs");
133360
+ var fs6 = __require("fs");
133361
133361
  var os = __require("os");
133362
- var path4 = __require("path");
133362
+ var path3 = __require("path");
133363
133363
  var error_1 = require_error();
133364
133364
  var api_request_1 = require_api_request();
133365
133365
  var util = require_validator3();
@@ -133376,10 +133376,10 @@ var require_credential_internal = __commonJS((exports) => {
133376
133376
  if (sys && sys.length >= 3 && sys.substring(0, 3).toLowerCase() === "win") {
133377
133377
  return process.env.APPDATA;
133378
133378
  }
133379
- return process.env.HOME && path4.resolve(process.env.HOME, ".config");
133379
+ return process.env.HOME && path3.resolve(process.env.HOME, ".config");
133380
133380
  })();
133381
133381
  var GCLOUD_CREDENTIAL_SUFFIX = "gcloud/application_default_credentials.json";
133382
- var GCLOUD_CREDENTIAL_PATH = configDir && path4.resolve(configDir, GCLOUD_CREDENTIAL_SUFFIX);
133382
+ var GCLOUD_CREDENTIAL_PATH = configDir && path3.resolve(configDir, GCLOUD_CREDENTIAL_SUFFIX);
133383
133383
  var REFRESH_TOKEN_HOST = "www.googleapis.com";
133384
133384
  var REFRESH_TOKEN_PATH = "/oauth2/v4/token";
133385
133385
  var ONE_HOUR_IN_SECONDS = 60 * 60;
@@ -133433,7 +133433,7 @@ var require_credential_internal = __commonJS((exports) => {
133433
133433
  class ServiceAccount {
133434
133434
  static fromPath(filePath) {
133435
133435
  try {
133436
- return new ServiceAccount(JSON.parse(fs7.readFileSync(filePath, "utf8")));
133436
+ return new ServiceAccount(JSON.parse(fs6.readFileSync(filePath, "utf8")));
133437
133437
  } catch (error) {
133438
133438
  throw new error_1.FirebaseAppError(error_1.AppErrorCodes.INVALID_CREDENTIAL, "Failed to parse service account json file: " + error);
133439
133439
  }
@@ -133543,7 +133543,7 @@ var require_credential_internal = __commonJS((exports) => {
133543
133543
  class RefreshToken {
133544
133544
  static fromPath(filePath) {
133545
133545
  try {
133546
- return new RefreshToken(JSON.parse(fs7.readFileSync(filePath, "utf8")));
133546
+ return new RefreshToken(JSON.parse(fs6.readFileSync(filePath, "utf8")));
133547
133547
  } catch (error) {
133548
133548
  throw new error_1.FirebaseAppError(error_1.AppErrorCodes.INVALID_CREDENTIAL, "Failed to parse refresh token file: " + error);
133549
133549
  }
@@ -133595,7 +133595,7 @@ var require_credential_internal = __commonJS((exports) => {
133595
133595
  class ImpersonatedServiceAccount {
133596
133596
  static fromPath(filePath) {
133597
133597
  try {
133598
- return new ImpersonatedServiceAccount(JSON.parse(fs7.readFileSync(filePath, "utf8")));
133598
+ return new ImpersonatedServiceAccount(JSON.parse(fs6.readFileSync(filePath, "utf8")));
133599
133599
  } catch (error) {
133600
133600
  throw new error_1.FirebaseAppError(error_1.AppErrorCodes.INVALID_CREDENTIAL, "Failed to parse impersonated service account file: " + error);
133601
133601
  }
@@ -133968,7 +133968,7 @@ var require_lifecycle = __commonJS((exports) => {
133968
133968
  return {};
133969
133969
  }
133970
133970
  try {
133971
- const contents = config.startsWith("{") ? config : fs7.readFileSync(config, "utf8");
133971
+ const contents = config.startsWith("{") ? config : fs6.readFileSync(config, "utf8");
133972
133972
  return JSON.parse(contents);
133973
133973
  } catch (error) {
133974
133974
  throw new error_1.FirebaseAppError(error_1.AppErrorCodes.INVALID_APP_OPTIONS, "Failed to parse app options file: " + error);
@@ -133993,7 +133993,7 @@ var require_lifecycle = __commonJS((exports) => {
133993
133993
  */
133994
133994
  Object.defineProperty(exports, "__esModule", { value: true });
133995
133995
  exports.FIREBASE_CONFIG_VAR = exports.deleteApp = exports.getApps = exports.getApp = exports.initializeApp = exports.defaultAppStore = exports.AppStore = undefined;
133996
- var fs7 = __require("fs");
133996
+ var fs6 = __require("fs");
133997
133997
  var validator = require_validator3();
133998
133998
  var error_1 = require_error();
133999
133999
  var credential_internal_1 = require_credential_internal();
@@ -142394,13 +142394,13 @@ var require_request2 = __commonJS((exports, module) => {
142394
142394
  return new Promise((resolve, reject) => {
142395
142395
  const {
142396
142396
  hostname,
142397
- path: path4,
142397
+ path: path3,
142398
142398
  port,
142399
142399
  protocol
142400
142400
  } = urlUtil.parse(options.uri);
142401
142401
  const requestOptions = {
142402
142402
  hostname,
142403
- path: path4,
142403
+ path: path3,
142404
142404
  port,
142405
142405
  method: "GET",
142406
142406
  ...options.headers && { headers: { ...options.headers } },
@@ -148350,15 +148350,15 @@ var require_index_cjs = __commonJS((exports) => {
148350
148350
  throw new Error("Attempted to log a message with an invalid logType (value: ".concat(logType, ")"));
148351
148351
  }
148352
148352
  };
148353
- var Logger7 = function() {
148354
- function Logger8(name) {
148353
+ var Logger6 = function() {
148354
+ function Logger7(name) {
148355
148355
  this.name = name;
148356
148356
  this._logLevel = defaultLogLevel;
148357
148357
  this._logHandler = defaultLogHandler;
148358
148358
  this._userLogHandler = null;
148359
148359
  instances.push(this);
148360
148360
  }
148361
- Object.defineProperty(Logger8.prototype, "logLevel", {
148361
+ Object.defineProperty(Logger7.prototype, "logLevel", {
148362
148362
  get: function() {
148363
148363
  return this._logLevel;
148364
148364
  },
@@ -148371,10 +148371,10 @@ var require_index_cjs = __commonJS((exports) => {
148371
148371
  enumerable: false,
148372
148372
  configurable: true
148373
148373
  });
148374
- Logger8.prototype.setLogLevel = function(val2) {
148374
+ Logger7.prototype.setLogLevel = function(val2) {
148375
148375
  this._logLevel = typeof val2 === "string" ? levelStringToEnum[val2] : val2;
148376
148376
  };
148377
- Object.defineProperty(Logger8.prototype, "logHandler", {
148377
+ Object.defineProperty(Logger7.prototype, "logHandler", {
148378
148378
  get: function() {
148379
148379
  return this._logHandler;
148380
148380
  },
@@ -148387,7 +148387,7 @@ var require_index_cjs = __commonJS((exports) => {
148387
148387
  enumerable: false,
148388
148388
  configurable: true
148389
148389
  });
148390
- Object.defineProperty(Logger8.prototype, "userLogHandler", {
148390
+ Object.defineProperty(Logger7.prototype, "userLogHandler", {
148391
148391
  get: function() {
148392
148392
  return this._userLogHandler;
148393
148393
  },
@@ -148397,7 +148397,7 @@ var require_index_cjs = __commonJS((exports) => {
148397
148397
  enumerable: false,
148398
148398
  configurable: true
148399
148399
  });
148400
- Logger8.prototype.debug = function() {
148400
+ Logger7.prototype.debug = function() {
148401
148401
  var args = [];
148402
148402
  for (var _i = 0;_i < arguments.length; _i++) {
148403
148403
  args[_i] = arguments[_i];
@@ -148405,7 +148405,7 @@ var require_index_cjs = __commonJS((exports) => {
148405
148405
  this._userLogHandler && this._userLogHandler.apply(this, tslib.__spreadArray([this, exports.LogLevel.DEBUG], args, false));
148406
148406
  this._logHandler.apply(this, tslib.__spreadArray([this, exports.LogLevel.DEBUG], args, false));
148407
148407
  };
148408
- Logger8.prototype.log = function() {
148408
+ Logger7.prototype.log = function() {
148409
148409
  var args = [];
148410
148410
  for (var _i = 0;_i < arguments.length; _i++) {
148411
148411
  args[_i] = arguments[_i];
@@ -148413,7 +148413,7 @@ var require_index_cjs = __commonJS((exports) => {
148413
148413
  this._userLogHandler && this._userLogHandler.apply(this, tslib.__spreadArray([this, exports.LogLevel.VERBOSE], args, false));
148414
148414
  this._logHandler.apply(this, tslib.__spreadArray([this, exports.LogLevel.VERBOSE], args, false));
148415
148415
  };
148416
- Logger8.prototype.info = function() {
148416
+ Logger7.prototype.info = function() {
148417
148417
  var args = [];
148418
148418
  for (var _i = 0;_i < arguments.length; _i++) {
148419
148419
  args[_i] = arguments[_i];
@@ -148421,7 +148421,7 @@ var require_index_cjs = __commonJS((exports) => {
148421
148421
  this._userLogHandler && this._userLogHandler.apply(this, tslib.__spreadArray([this, exports.LogLevel.INFO], args, false));
148422
148422
  this._logHandler.apply(this, tslib.__spreadArray([this, exports.LogLevel.INFO], args, false));
148423
148423
  };
148424
- Logger8.prototype.warn = function() {
148424
+ Logger7.prototype.warn = function() {
148425
148425
  var args = [];
148426
148426
  for (var _i = 0;_i < arguments.length; _i++) {
148427
148427
  args[_i] = arguments[_i];
@@ -148429,7 +148429,7 @@ var require_index_cjs = __commonJS((exports) => {
148429
148429
  this._userLogHandler && this._userLogHandler.apply(this, tslib.__spreadArray([this, exports.LogLevel.WARN], args, false));
148430
148430
  this._logHandler.apply(this, tslib.__spreadArray([this, exports.LogLevel.WARN], args, false));
148431
148431
  };
148432
- Logger8.prototype.error = function() {
148432
+ Logger7.prototype.error = function() {
148433
148433
  var args = [];
148434
148434
  for (var _i = 0;_i < arguments.length; _i++) {
148435
148435
  args[_i] = arguments[_i];
@@ -148437,9 +148437,9 @@ var require_index_cjs = __commonJS((exports) => {
148437
148437
  this._userLogHandler && this._userLogHandler.apply(this, tslib.__spreadArray([this, exports.LogLevel.ERROR], args, false));
148438
148438
  this._logHandler.apply(this, tslib.__spreadArray([this, exports.LogLevel.ERROR], args, false));
148439
148439
  };
148440
- return Logger8;
148440
+ return Logger7;
148441
148441
  }();
148442
- exports.Logger = Logger7;
148442
+ exports.Logger = Logger6;
148443
148443
  exports.setLogLevel = setLogLevel;
148444
148444
  exports.setUserLogHandler = setUserLogHandler;
148445
148445
  });
@@ -148865,57 +148865,57 @@ var require_index_standalone = __commonJS((exports) => {
148865
148865
  var newEmptyPath = function() {
148866
148866
  return new Path("");
148867
148867
  };
148868
- var pathGetFront = function(path4) {
148869
- if (path4.pieceNum_ >= path4.pieces_.length) {
148868
+ var pathGetFront = function(path3) {
148869
+ if (path3.pieceNum_ >= path3.pieces_.length) {
148870
148870
  return null;
148871
148871
  }
148872
- return path4.pieces_[path4.pieceNum_];
148872
+ return path3.pieces_[path3.pieceNum_];
148873
148873
  };
148874
- var pathGetLength = function(path4) {
148875
- return path4.pieces_.length - path4.pieceNum_;
148874
+ var pathGetLength = function(path3) {
148875
+ return path3.pieces_.length - path3.pieceNum_;
148876
148876
  };
148877
- var pathPopFront = function(path4) {
148878
- var pieceNum = path4.pieceNum_;
148879
- if (pieceNum < path4.pieces_.length) {
148877
+ var pathPopFront = function(path3) {
148878
+ var pieceNum = path3.pieceNum_;
148879
+ if (pieceNum < path3.pieces_.length) {
148880
148880
  pieceNum++;
148881
148881
  }
148882
- return new Path(path4.pieces_, pieceNum);
148882
+ return new Path(path3.pieces_, pieceNum);
148883
148883
  };
148884
- var pathGetBack = function(path4) {
148885
- if (path4.pieceNum_ < path4.pieces_.length) {
148886
- return path4.pieces_[path4.pieces_.length - 1];
148884
+ var pathGetBack = function(path3) {
148885
+ if (path3.pieceNum_ < path3.pieces_.length) {
148886
+ return path3.pieces_[path3.pieces_.length - 1];
148887
148887
  }
148888
148888
  return null;
148889
148889
  };
148890
- var pathToUrlEncodedString = function(path4) {
148890
+ var pathToUrlEncodedString = function(path3) {
148891
148891
  var pathString = "";
148892
- for (var i = path4.pieceNum_;i < path4.pieces_.length; i++) {
148893
- if (path4.pieces_[i] !== "") {
148894
- pathString += "/" + encodeURIComponent(String(path4.pieces_[i]));
148892
+ for (var i = path3.pieceNum_;i < path3.pieces_.length; i++) {
148893
+ if (path3.pieces_[i] !== "") {
148894
+ pathString += "/" + encodeURIComponent(String(path3.pieces_[i]));
148895
148895
  }
148896
148896
  }
148897
148897
  return pathString || "/";
148898
148898
  };
148899
- var pathSlice = function(path4, begin) {
148899
+ var pathSlice = function(path3, begin) {
148900
148900
  if (begin === undefined) {
148901
148901
  begin = 0;
148902
148902
  }
148903
- return path4.pieces_.slice(path4.pieceNum_ + begin);
148903
+ return path3.pieces_.slice(path3.pieceNum_ + begin);
148904
148904
  };
148905
- var pathParent = function(path4) {
148906
- if (path4.pieceNum_ >= path4.pieces_.length) {
148905
+ var pathParent = function(path3) {
148906
+ if (path3.pieceNum_ >= path3.pieces_.length) {
148907
148907
  return null;
148908
148908
  }
148909
148909
  var pieces = [];
148910
- for (var i = path4.pieceNum_;i < path4.pieces_.length - 1; i++) {
148911
- pieces.push(path4.pieces_[i]);
148910
+ for (var i = path3.pieceNum_;i < path3.pieces_.length - 1; i++) {
148911
+ pieces.push(path3.pieces_[i]);
148912
148912
  }
148913
148913
  return new Path(pieces, 0);
148914
148914
  };
148915
- var pathChild = function(path4, childPathObj) {
148915
+ var pathChild = function(path3, childPathObj) {
148916
148916
  var pieces = [];
148917
- for (var i = path4.pieceNum_;i < path4.pieces_.length; i++) {
148918
- pieces.push(path4.pieces_[i]);
148917
+ for (var i = path3.pieceNum_;i < path3.pieces_.length; i++) {
148918
+ pieces.push(path3.pieces_[i]);
148919
148919
  }
148920
148920
  if (childPathObj instanceof Path) {
148921
148921
  for (var i = childPathObj.pieceNum_;i < childPathObj.pieces_.length; i++) {
@@ -148931,8 +148931,8 @@ var require_index_standalone = __commonJS((exports) => {
148931
148931
  }
148932
148932
  return new Path(pieces, 0);
148933
148933
  };
148934
- var pathIsEmpty = function(path4) {
148935
- return path4.pieceNum_ >= path4.pieces_.length;
148934
+ var pathIsEmpty = function(path3) {
148935
+ return path3.pieceNum_ >= path3.pieces_.length;
148936
148936
  };
148937
148937
  var newRelativePath = function(outerPath, innerPath) {
148938
148938
  var outer = pathGetFront(outerPath), inner = pathGetFront(innerPath);
@@ -148958,25 +148958,25 @@ var require_index_standalone = __commonJS((exports) => {
148958
148958
  }
148959
148959
  return leftKeys.length < rightKeys.length ? -1 : 1;
148960
148960
  };
148961
- var pathEquals = function(path4, other) {
148962
- if (pathGetLength(path4) !== pathGetLength(other)) {
148961
+ var pathEquals = function(path3, other) {
148962
+ if (pathGetLength(path3) !== pathGetLength(other)) {
148963
148963
  return false;
148964
148964
  }
148965
- for (var i = path4.pieceNum_, j = other.pieceNum_;i <= path4.pieces_.length; i++, j++) {
148966
- if (path4.pieces_[i] !== other.pieces_[j]) {
148965
+ for (var i = path3.pieceNum_, j = other.pieceNum_;i <= path3.pieces_.length; i++, j++) {
148966
+ if (path3.pieces_[i] !== other.pieces_[j]) {
148967
148967
  return false;
148968
148968
  }
148969
148969
  }
148970
148970
  return true;
148971
148971
  };
148972
- var pathContains = function(path4, other) {
148973
- var i = path4.pieceNum_;
148972
+ var pathContains = function(path3, other) {
148973
+ var i = path3.pieceNum_;
148974
148974
  var j = other.pieceNum_;
148975
- if (pathGetLength(path4) > pathGetLength(other)) {
148975
+ if (pathGetLength(path3) > pathGetLength(other)) {
148976
148976
  return false;
148977
148977
  }
148978
- while (i < path4.pieces_.length) {
148979
- if (path4.pieces_[i] !== other.pieces_[j]) {
148978
+ while (i < path3.pieces_.length) {
148979
+ if (path3.pieces_[i] !== other.pieces_[j]) {
148980
148980
  return false;
148981
148981
  }
148982
148982
  ++i;
@@ -149265,24 +149265,24 @@ var require_index_standalone = __commonJS((exports) => {
149265
149265
  children: new Map
149266
149266
  };
149267
149267
  };
149268
- var sparseSnapshotTreeRemember = function(sparseSnapshotTree, path4, data) {
149269
- if (pathIsEmpty(path4)) {
149268
+ var sparseSnapshotTreeRemember = function(sparseSnapshotTree, path3, data) {
149269
+ if (pathIsEmpty(path3)) {
149270
149270
  sparseSnapshotTree.value = data;
149271
149271
  sparseSnapshotTree.children.clear();
149272
149272
  } else if (sparseSnapshotTree.value !== null) {
149273
- sparseSnapshotTree.value = sparseSnapshotTree.value.updateChild(path4, data);
149273
+ sparseSnapshotTree.value = sparseSnapshotTree.value.updateChild(path3, data);
149274
149274
  } else {
149275
- var childKey = pathGetFront(path4);
149275
+ var childKey = pathGetFront(path3);
149276
149276
  if (!sparseSnapshotTree.children.has(childKey)) {
149277
149277
  sparseSnapshotTree.children.set(childKey, newSparseSnapshotTree());
149278
149278
  }
149279
149279
  var child2 = sparseSnapshotTree.children.get(childKey);
149280
- path4 = pathPopFront(path4);
149281
- sparseSnapshotTreeRemember(child2, path4, data);
149280
+ path3 = pathPopFront(path3);
149281
+ sparseSnapshotTreeRemember(child2, path3, data);
149282
149282
  }
149283
149283
  };
149284
- var sparseSnapshotTreeForget = function(sparseSnapshotTree, path4) {
149285
- if (pathIsEmpty(path4)) {
149284
+ var sparseSnapshotTreeForget = function(sparseSnapshotTree, path3) {
149285
+ if (pathIsEmpty(path3)) {
149286
149286
  sparseSnapshotTree.value = null;
149287
149287
  sparseSnapshotTree.children.clear();
149288
149288
  return true;
@@ -149296,13 +149296,13 @@ var require_index_standalone = __commonJS((exports) => {
149296
149296
  value.forEachChild(PRIORITY_INDEX, function(key2, tree) {
149297
149297
  sparseSnapshotTreeRemember(sparseSnapshotTree, new Path(key2), tree);
149298
149298
  });
149299
- return sparseSnapshotTreeForget(sparseSnapshotTree, path4);
149299
+ return sparseSnapshotTreeForget(sparseSnapshotTree, path3);
149300
149300
  }
149301
149301
  } else if (sparseSnapshotTree.children.size > 0) {
149302
- var childKey = pathGetFront(path4);
149303
- path4 = pathPopFront(path4);
149302
+ var childKey = pathGetFront(path3);
149303
+ path3 = pathPopFront(path3);
149304
149304
  if (sparseSnapshotTree.children.has(childKey)) {
149305
- var safeToRemove = sparseSnapshotTreeForget(sparseSnapshotTree.children.get(childKey), path4);
149305
+ var safeToRemove = sparseSnapshotTreeForget(sparseSnapshotTree.children.get(childKey), path3);
149306
149306
  if (safeToRemove) {
149307
149307
  sparseSnapshotTree.children.delete(childKey);
149308
149308
  }
@@ -149318,8 +149318,8 @@ var require_index_standalone = __commonJS((exports) => {
149318
149318
  func(prefixPath, sparseSnapshotTree.value);
149319
149319
  } else {
149320
149320
  sparseSnapshotTreeForEachChild(sparseSnapshotTree, function(key2, tree) {
149321
- var path4 = new Path(prefixPath.toString() + "/" + key2);
149322
- sparseSnapshotTreeForEachTree(tree, path4, func);
149321
+ var path3 = new Path(prefixPath.toString() + "/" + key2);
149322
+ sparseSnapshotTreeForEachTree(tree, path3, func);
149323
149323
  });
149324
149324
  }
149325
149325
  };
@@ -149414,46 +149414,46 @@ var require_index_standalone = __commonJS((exports) => {
149414
149414
  var viewCacheGetCompleteServerSnap = function(viewCache) {
149415
149415
  return viewCache.serverCache.isFullyInitialized() ? viewCache.serverCache.getNode() : null;
149416
149416
  };
149417
- var compoundWriteAddWrite = function(compoundWrite, path4, node) {
149418
- if (pathIsEmpty(path4)) {
149417
+ var compoundWriteAddWrite = function(compoundWrite, path3, node) {
149418
+ if (pathIsEmpty(path3)) {
149419
149419
  return new CompoundWrite(new ImmutableTree(node));
149420
149420
  } else {
149421
- var rootmost = compoundWrite.writeTree_.findRootMostValueAndPath(path4);
149421
+ var rootmost = compoundWrite.writeTree_.findRootMostValueAndPath(path3);
149422
149422
  if (rootmost != null) {
149423
149423
  var rootMostPath = rootmost.path;
149424
149424
  var value = rootmost.value;
149425
- var relativePath = newRelativePath(rootMostPath, path4);
149425
+ var relativePath = newRelativePath(rootMostPath, path3);
149426
149426
  value = value.updateChild(relativePath, node);
149427
149427
  return new CompoundWrite(compoundWrite.writeTree_.set(rootMostPath, value));
149428
149428
  } else {
149429
149429
  var subtree = new ImmutableTree(node);
149430
- var newWriteTree2 = compoundWrite.writeTree_.setTree(path4, subtree);
149430
+ var newWriteTree2 = compoundWrite.writeTree_.setTree(path3, subtree);
149431
149431
  return new CompoundWrite(newWriteTree2);
149432
149432
  }
149433
149433
  }
149434
149434
  };
149435
- var compoundWriteAddWrites = function(compoundWrite, path4, updates) {
149435
+ var compoundWriteAddWrites = function(compoundWrite, path3, updates) {
149436
149436
  var newWrite = compoundWrite;
149437
149437
  each(updates, function(childKey, node) {
149438
- newWrite = compoundWriteAddWrite(newWrite, pathChild(path4, childKey), node);
149438
+ newWrite = compoundWriteAddWrite(newWrite, pathChild(path3, childKey), node);
149439
149439
  });
149440
149440
  return newWrite;
149441
149441
  };
149442
- var compoundWriteRemoveWrite = function(compoundWrite, path4) {
149443
- if (pathIsEmpty(path4)) {
149442
+ var compoundWriteRemoveWrite = function(compoundWrite, path3) {
149443
+ if (pathIsEmpty(path3)) {
149444
149444
  return CompoundWrite.empty();
149445
149445
  } else {
149446
- var newWriteTree2 = compoundWrite.writeTree_.setTree(path4, new ImmutableTree(null));
149446
+ var newWriteTree2 = compoundWrite.writeTree_.setTree(path3, new ImmutableTree(null));
149447
149447
  return new CompoundWrite(newWriteTree2);
149448
149448
  }
149449
149449
  };
149450
- var compoundWriteHasCompleteWrite = function(compoundWrite, path4) {
149451
- return compoundWriteGetCompleteNode(compoundWrite, path4) != null;
149450
+ var compoundWriteHasCompleteWrite = function(compoundWrite, path3) {
149451
+ return compoundWriteGetCompleteNode(compoundWrite, path3) != null;
149452
149452
  };
149453
- var compoundWriteGetCompleteNode = function(compoundWrite, path4) {
149454
- var rootmost = compoundWrite.writeTree_.findRootMostValueAndPath(path4);
149453
+ var compoundWriteGetCompleteNode = function(compoundWrite, path3) {
149454
+ var rootmost = compoundWrite.writeTree_.findRootMostValueAndPath(path3);
149455
149455
  if (rootmost != null) {
149456
- return compoundWrite.writeTree_.get(rootmost.path).getChild(newRelativePath(rootmost.path, path4));
149456
+ return compoundWrite.writeTree_.get(rootmost.path).getChild(newRelativePath(rootmost.path, path3));
149457
149457
  } else {
149458
149458
  return null;
149459
149459
  }
@@ -149476,15 +149476,15 @@ var require_index_standalone = __commonJS((exports) => {
149476
149476
  }
149477
149477
  return children2;
149478
149478
  };
149479
- var compoundWriteChildCompoundWrite = function(compoundWrite, path4) {
149480
- if (pathIsEmpty(path4)) {
149479
+ var compoundWriteChildCompoundWrite = function(compoundWrite, path3) {
149480
+ if (pathIsEmpty(path3)) {
149481
149481
  return compoundWrite;
149482
149482
  } else {
149483
- var shadowingNode = compoundWriteGetCompleteNode(compoundWrite, path4);
149483
+ var shadowingNode = compoundWriteGetCompleteNode(compoundWrite, path3);
149484
149484
  if (shadowingNode != null) {
149485
149485
  return new CompoundWrite(new ImmutableTree(shadowingNode));
149486
149486
  } else {
149487
- return new CompoundWrite(compoundWrite.writeTree_.subtree(path4));
149487
+ return new CompoundWrite(compoundWrite.writeTree_.subtree(path3));
149488
149488
  }
149489
149489
  }
149490
149490
  };
@@ -149513,34 +149513,34 @@ var require_index_standalone = __commonJS((exports) => {
149513
149513
  return node;
149514
149514
  }
149515
149515
  };
149516
- var writeTreeChildWrites = function(writeTree, path4) {
149517
- return newWriteTreeRef(path4, writeTree);
149516
+ var writeTreeChildWrites = function(writeTree, path3) {
149517
+ return newWriteTreeRef(path3, writeTree);
149518
149518
  };
149519
- var writeTreeAddOverwrite = function(writeTree, path4, snap, writeId, visible) {
149519
+ var writeTreeAddOverwrite = function(writeTree, path3, snap, writeId, visible) {
149520
149520
  util.assert(writeId > writeTree.lastWriteId, "Stacking an older write on top of newer ones");
149521
149521
  if (visible === undefined) {
149522
149522
  visible = true;
149523
149523
  }
149524
149524
  writeTree.allWrites.push({
149525
- path: path4,
149525
+ path: path3,
149526
149526
  snap,
149527
149527
  writeId,
149528
149528
  visible
149529
149529
  });
149530
149530
  if (visible) {
149531
- writeTree.visibleWrites = compoundWriteAddWrite(writeTree.visibleWrites, path4, snap);
149531
+ writeTree.visibleWrites = compoundWriteAddWrite(writeTree.visibleWrites, path3, snap);
149532
149532
  }
149533
149533
  writeTree.lastWriteId = writeId;
149534
149534
  };
149535
- var writeTreeAddMerge = function(writeTree, path4, changedChildren, writeId) {
149535
+ var writeTreeAddMerge = function(writeTree, path3, changedChildren, writeId) {
149536
149536
  util.assert(writeId > writeTree.lastWriteId, "Stacking an older merge on top of newer ones");
149537
149537
  writeTree.allWrites.push({
149538
- path: path4,
149538
+ path: path3,
149539
149539
  children: changedChildren,
149540
149540
  writeId,
149541
149541
  visible: true
149542
149542
  });
149543
- writeTree.visibleWrites = compoundWriteAddWrites(writeTree.visibleWrites, path4, changedChildren);
149543
+ writeTree.visibleWrites = compoundWriteAddWrites(writeTree.visibleWrites, path3, changedChildren);
149544
149544
  writeTree.lastWriteId = writeId;
149545
149545
  };
149546
149546
  var writeTreeGetWrite = function(writeTree, writeId) {
@@ -149590,12 +149590,12 @@ var require_index_standalone = __commonJS((exports) => {
149590
149590
  return true;
149591
149591
  }
149592
149592
  };
149593
- var writeTreeRecordContainsPath_ = function(writeRecord, path4) {
149593
+ var writeTreeRecordContainsPath_ = function(writeRecord, path3) {
149594
149594
  if (writeRecord.snap) {
149595
- return pathContains(writeRecord.path, path4);
149595
+ return pathContains(writeRecord.path, path3);
149596
149596
  } else {
149597
149597
  for (var childName in writeRecord.children) {
149598
- if (writeRecord.children.hasOwnProperty(childName) && pathContains(pathChild(writeRecord.path, childName), path4)) {
149598
+ if (writeRecord.children.hasOwnProperty(childName) && pathContains(pathChild(writeRecord.path, childName), path3)) {
149599
149599
  return true;
149600
149600
  }
149601
149601
  }
@@ -149717,11 +149717,11 @@ var require_index_standalone = __commonJS((exports) => {
149717
149717
  };
149718
149718
  var writeTreeCalcEventCacheAfterServerOverwrite = function(writeTree, treePath, childPath, existingEventSnap, existingServerSnap) {
149719
149719
  util.assert(existingEventSnap || existingServerSnap, "Either existingEventSnap or existingServerSnap must exist");
149720
- var path4 = pathChild(treePath, childPath);
149721
- if (compoundWriteHasCompleteWrite(writeTree.visibleWrites, path4)) {
149720
+ var path3 = pathChild(treePath, childPath);
149721
+ if (compoundWriteHasCompleteWrite(writeTree.visibleWrites, path3)) {
149722
149722
  return null;
149723
149723
  } else {
149724
- var childMerge = compoundWriteChildCompoundWrite(writeTree.visibleWrites, path4);
149724
+ var childMerge = compoundWriteChildCompoundWrite(writeTree.visibleWrites, path3);
149725
149725
  if (compoundWriteIsEmpty(childMerge)) {
149726
149726
  return existingServerSnap.getChild(childPath);
149727
149727
  } else {
@@ -149730,21 +149730,21 @@ var require_index_standalone = __commonJS((exports) => {
149730
149730
  }
149731
149731
  };
149732
149732
  var writeTreeCalcCompleteChild = function(writeTree, treePath, childKey, existingServerSnap) {
149733
- var path4 = pathChild(treePath, childKey);
149734
- var shadowingNode = compoundWriteGetCompleteNode(writeTree.visibleWrites, path4);
149733
+ var path3 = pathChild(treePath, childKey);
149734
+ var shadowingNode = compoundWriteGetCompleteNode(writeTree.visibleWrites, path3);
149735
149735
  if (shadowingNode != null) {
149736
149736
  return shadowingNode;
149737
149737
  } else {
149738
149738
  if (existingServerSnap.isCompleteForChild(childKey)) {
149739
- var childMerge = compoundWriteChildCompoundWrite(writeTree.visibleWrites, path4);
149739
+ var childMerge = compoundWriteChildCompoundWrite(writeTree.visibleWrites, path3);
149740
149740
  return compoundWriteApply(childMerge, existingServerSnap.getNode().getImmediateChild(childKey));
149741
149741
  } else {
149742
149742
  return null;
149743
149743
  }
149744
149744
  }
149745
149745
  };
149746
- var writeTreeShadowingWrite = function(writeTree, path4) {
149747
- return compoundWriteGetCompleteNode(writeTree.visibleWrites, path4);
149746
+ var writeTreeShadowingWrite = function(writeTree, path3) {
149747
+ return compoundWriteGetCompleteNode(writeTree.visibleWrites, path3);
149748
149748
  };
149749
149749
  var writeTreeCalcIndexedSlice = function(writeTree, treePath, completeServerData, startPost, count, reverse, index2) {
149750
149750
  var toIterate;
@@ -149787,11 +149787,11 @@ var require_index_standalone = __commonJS((exports) => {
149787
149787
  var writeTreeRefCalcCompleteEventChildren = function(writeTreeRef, completeServerChildren) {
149788
149788
  return writeTreeCalcCompleteEventChildren(writeTreeRef.writeTree, writeTreeRef.treePath, completeServerChildren);
149789
149789
  };
149790
- var writeTreeRefCalcEventCacheAfterServerOverwrite = function(writeTreeRef, path4, existingEventSnap, existingServerSnap) {
149791
- return writeTreeCalcEventCacheAfterServerOverwrite(writeTreeRef.writeTree, writeTreeRef.treePath, path4, existingEventSnap, existingServerSnap);
149790
+ var writeTreeRefCalcEventCacheAfterServerOverwrite = function(writeTreeRef, path3, existingEventSnap, existingServerSnap) {
149791
+ return writeTreeCalcEventCacheAfterServerOverwrite(writeTreeRef.writeTree, writeTreeRef.treePath, path3, existingEventSnap, existingServerSnap);
149792
149792
  };
149793
- var writeTreeRefShadowingWrite = function(writeTreeRef, path4) {
149794
- return writeTreeShadowingWrite(writeTreeRef.writeTree, pathChild(writeTreeRef.treePath, path4));
149793
+ var writeTreeRefShadowingWrite = function(writeTreeRef, path3) {
149794
+ return writeTreeShadowingWrite(writeTreeRef.writeTree, pathChild(writeTreeRef.treePath, path3));
149795
149795
  };
149796
149796
  var writeTreeRefCalcIndexedSlice = function(writeTreeRef, completeServerData, startPost, count, reverse, index2) {
149797
149797
  return writeTreeCalcIndexedSlice(writeTreeRef.writeTree, writeTreeRef.treePath, completeServerData, startPost, count, reverse, index2);
@@ -149802,9 +149802,9 @@ var require_index_standalone = __commonJS((exports) => {
149802
149802
  var writeTreeRefChild = function(writeTreeRef, childName) {
149803
149803
  return newWriteTreeRef(pathChild(writeTreeRef.treePath, childName), writeTreeRef.writeTree);
149804
149804
  };
149805
- var newWriteTreeRef = function(path4, writeTree) {
149805
+ var newWriteTreeRef = function(path3, writeTree) {
149806
149806
  return {
149807
- treePath: path4,
149807
+ treePath: path3,
149808
149808
  writeTree
149809
149809
  };
149810
149810
  };
@@ -149985,16 +149985,16 @@ var require_index_standalone = __commonJS((exports) => {
149985
149985
  var viewProcessorCacheHasChild = function(viewCache, childKey) {
149986
149986
  return viewCache.eventCache.isCompleteForChild(childKey);
149987
149987
  };
149988
- var viewProcessorApplyUserMerge = function(viewProcessor, viewCache, path4, changedChildren, writesCache, serverCache, accumulator) {
149988
+ var viewProcessorApplyUserMerge = function(viewProcessor, viewCache, path3, changedChildren, writesCache, serverCache, accumulator) {
149989
149989
  var curViewCache = viewCache;
149990
149990
  changedChildren.foreach(function(relativePath, childNode) {
149991
- var writePath = pathChild(path4, relativePath);
149991
+ var writePath = pathChild(path3, relativePath);
149992
149992
  if (viewProcessorCacheHasChild(viewCache, pathGetFront(writePath))) {
149993
149993
  curViewCache = viewProcessorApplyUserOverwrite(viewProcessor, curViewCache, writePath, childNode, writesCache, serverCache, accumulator);
149994
149994
  }
149995
149995
  });
149996
149996
  changedChildren.foreach(function(relativePath, childNode) {
149997
- var writePath = pathChild(path4, relativePath);
149997
+ var writePath = pathChild(path3, relativePath);
149998
149998
  if (!viewProcessorCacheHasChild(viewCache, pathGetFront(writePath))) {
149999
149999
  curViewCache = viewProcessorApplyUserOverwrite(viewProcessor, curViewCache, writePath, childNode, writesCache, serverCache, accumulator);
150000
150000
  }
@@ -150007,16 +150007,16 @@ var require_index_standalone = __commonJS((exports) => {
150007
150007
  });
150008
150008
  return node;
150009
150009
  };
150010
- var viewProcessorApplyServerMerge = function(viewProcessor, viewCache, path4, changedChildren, writesCache, serverCache, filterServerNode, accumulator) {
150010
+ var viewProcessorApplyServerMerge = function(viewProcessor, viewCache, path3, changedChildren, writesCache, serverCache, filterServerNode, accumulator) {
150011
150011
  if (viewCache.serverCache.getNode().isEmpty() && !viewCache.serverCache.isFullyInitialized()) {
150012
150012
  return viewCache;
150013
150013
  }
150014
150014
  var curViewCache = viewCache;
150015
150015
  var viewMergeTree;
150016
- if (pathIsEmpty(path4)) {
150016
+ if (pathIsEmpty(path3)) {
150017
150017
  viewMergeTree = changedChildren;
150018
150018
  } else {
150019
- viewMergeTree = new ImmutableTree(null).setTree(path4, changedChildren);
150019
+ viewMergeTree = new ImmutableTree(null).setTree(path3, changedChildren);
150020
150020
  }
150021
150021
  var serverNode = viewCache.serverCache.getNode();
150022
150022
  viewMergeTree.children.inorderTraversal(function(childKey, childTree) {
@@ -150065,20 +150065,20 @@ var require_index_standalone = __commonJS((exports) => {
150065
150065
  return viewProcessorApplyServerMerge(viewProcessor, viewCache, ackPath, changedChildren_2, writesCache, completeCache, filterServerNode, accumulator);
150066
150066
  }
150067
150067
  };
150068
- var viewProcessorListenComplete = function(viewProcessor, viewCache, path4, writesCache, accumulator) {
150068
+ var viewProcessorListenComplete = function(viewProcessor, viewCache, path3, writesCache, accumulator) {
150069
150069
  var oldServerNode = viewCache.serverCache;
150070
- var newViewCache2 = viewCacheUpdateServerSnap(viewCache, oldServerNode.getNode(), oldServerNode.isFullyInitialized() || pathIsEmpty(path4), oldServerNode.isFiltered());
150071
- return viewProcessorGenerateEventCacheAfterServerEvent(viewProcessor, newViewCache2, path4, writesCache, NO_COMPLETE_CHILD_SOURCE, accumulator);
150070
+ var newViewCache2 = viewCacheUpdateServerSnap(viewCache, oldServerNode.getNode(), oldServerNode.isFullyInitialized() || pathIsEmpty(path3), oldServerNode.isFiltered());
150071
+ return viewProcessorGenerateEventCacheAfterServerEvent(viewProcessor, newViewCache2, path3, writesCache, NO_COMPLETE_CHILD_SOURCE, accumulator);
150072
150072
  };
150073
- var viewProcessorRevertUserWrite = function(viewProcessor, viewCache, path4, writesCache, completeServerCache, accumulator) {
150073
+ var viewProcessorRevertUserWrite = function(viewProcessor, viewCache, path3, writesCache, completeServerCache, accumulator) {
150074
150074
  var complete;
150075
- if (writeTreeRefShadowingWrite(writesCache, path4) != null) {
150075
+ if (writeTreeRefShadowingWrite(writesCache, path3) != null) {
150076
150076
  return viewCache;
150077
150077
  } else {
150078
150078
  var source = new WriteTreeCompleteChildSource(writesCache, viewCache, completeServerCache);
150079
150079
  var oldEventCache = viewCache.eventCache.getNode();
150080
150080
  var newEventCache = undefined;
150081
- if (pathIsEmpty(path4) || pathGetFront(path4) === ".priority") {
150081
+ if (pathIsEmpty(path3) || pathGetFront(path3) === ".priority") {
150082
150082
  var newNode = undefined;
150083
150083
  if (viewCache.serverCache.isFullyInitialized()) {
150084
150084
  newNode = writeTreeRefCalcCompleteEventCache(writesCache, viewCacheGetCompleteServerSnap(viewCache));
@@ -150090,15 +150090,15 @@ var require_index_standalone = __commonJS((exports) => {
150090
150090
  newNode = newNode;
150091
150091
  newEventCache = viewProcessor.filter.updateFullNode(oldEventCache, newNode, accumulator);
150092
150092
  } else {
150093
- var childKey = pathGetFront(path4);
150093
+ var childKey = pathGetFront(path3);
150094
150094
  var newChild = writeTreeRefCalcCompleteChild(writesCache, childKey, viewCache.serverCache);
150095
150095
  if (newChild == null && viewCache.serverCache.isCompleteForChild(childKey)) {
150096
150096
  newChild = oldEventCache.getImmediateChild(childKey);
150097
150097
  }
150098
150098
  if (newChild != null) {
150099
- newEventCache = viewProcessor.filter.updateChild(oldEventCache, childKey, newChild, pathPopFront(path4), source, accumulator);
150099
+ newEventCache = viewProcessor.filter.updateChild(oldEventCache, childKey, newChild, pathPopFront(path3), source, accumulator);
150100
150100
  } else if (viewCache.eventCache.getNode().hasChild(childKey)) {
150101
- newEventCache = viewProcessor.filter.updateChild(oldEventCache, childKey, ChildrenNode.EMPTY_NODE, pathPopFront(path4), source, accumulator);
150101
+ newEventCache = viewProcessor.filter.updateChild(oldEventCache, childKey, ChildrenNode.EMPTY_NODE, pathPopFront(path3), source, accumulator);
150102
150102
  } else {
150103
150103
  newEventCache = oldEventCache;
150104
150104
  }
@@ -150119,11 +150119,11 @@ var require_index_standalone = __commonJS((exports) => {
150119
150119
  var viewGetCompleteNode = function(view) {
150120
150120
  return viewCacheGetCompleteEventSnap(view.viewCache_);
150121
150121
  };
150122
- var viewGetCompleteServerCache = function(view, path4) {
150122
+ var viewGetCompleteServerCache = function(view, path3) {
150123
150123
  var cache = viewCacheGetCompleteServerSnap(view.viewCache_);
150124
150124
  if (cache) {
150125
- if (view.query._queryParams.loadsAllData() || !pathIsEmpty(path4) && !cache.getImmediateChild(pathGetFront(path4)).isEmpty()) {
150126
- return cache.getChild(path4);
150125
+ if (view.query._queryParams.loadsAllData() || !pathIsEmpty(path3) && !cache.getImmediateChild(pathGetFront(path3)).isEmpty()) {
150126
+ return cache.getChild(path3);
150127
150127
  }
150128
150128
  }
150129
150129
  return null;
@@ -150329,13 +150329,13 @@ var require_index_standalone = __commonJS((exports) => {
150329
150329
  }
150330
150330
  return result;
150331
150331
  };
150332
- var syncPointGetCompleteServerCache = function(syncPoint, path4) {
150332
+ var syncPointGetCompleteServerCache = function(syncPoint, path3) {
150333
150333
  var e_4, _a;
150334
150334
  var serverCache = null;
150335
150335
  try {
150336
150336
  for (var _b = tslib.__values(syncPoint.views.values()), _c = _b.next();!_c.done; _c = _b.next()) {
150337
150337
  var view = _c.value;
150338
- serverCache = serverCache || viewGetCompleteServerCache(view, path4);
150338
+ serverCache = serverCache || viewGetCompleteServerCache(view, path3);
150339
150339
  }
150340
150340
  } catch (e_4_1) {
150341
150341
  e_4 = { error: e_4_1 };
@@ -150395,18 +150395,18 @@ var require_index_standalone = __commonJS((exports) => {
150395
150395
  util.assert(referenceConstructor, "Reference.ts has not been loaded");
150396
150396
  return referenceConstructor;
150397
150397
  };
150398
- var syncTreeApplyUserOverwrite = function(syncTree, path4, newData, writeId, visible) {
150399
- writeTreeAddOverwrite(syncTree.pendingWriteTree_, path4, newData, writeId, visible);
150398
+ var syncTreeApplyUserOverwrite = function(syncTree, path3, newData, writeId, visible) {
150399
+ writeTreeAddOverwrite(syncTree.pendingWriteTree_, path3, newData, writeId, visible);
150400
150400
  if (!visible) {
150401
150401
  return [];
150402
150402
  } else {
150403
- return syncTreeApplyOperationToSyncPoints_(syncTree, new Overwrite(newOperationSourceUser(), path4, newData));
150403
+ return syncTreeApplyOperationToSyncPoints_(syncTree, new Overwrite(newOperationSourceUser(), path3, newData));
150404
150404
  }
150405
150405
  };
150406
- var syncTreeApplyUserMerge = function(syncTree, path4, changedChildren, writeId) {
150407
- writeTreeAddMerge(syncTree.pendingWriteTree_, path4, changedChildren, writeId);
150406
+ var syncTreeApplyUserMerge = function(syncTree, path3, changedChildren, writeId) {
150407
+ writeTreeAddMerge(syncTree.pendingWriteTree_, path3, changedChildren, writeId);
150408
150408
  var changeTree = ImmutableTree.fromObject(changedChildren);
150409
- return syncTreeApplyOperationToSyncPoints_(syncTree, new Merge(newOperationSourceUser(), path4, changeTree));
150409
+ return syncTreeApplyOperationToSyncPoints_(syncTree, new Merge(newOperationSourceUser(), path3, changeTree));
150410
150410
  };
150411
150411
  var syncTreeAckUserWrite = function(syncTree, writeId, revert) {
150412
150412
  if (revert === undefined) {
@@ -150428,22 +150428,22 @@ var require_index_standalone = __commonJS((exports) => {
150428
150428
  return syncTreeApplyOperationToSyncPoints_(syncTree, new AckUserWrite(write.path, affectedTree_1, revert));
150429
150429
  }
150430
150430
  };
150431
- var syncTreeApplyServerOverwrite = function(syncTree, path4, newData) {
150432
- return syncTreeApplyOperationToSyncPoints_(syncTree, new Overwrite(newOperationSourceServer(), path4, newData));
150431
+ var syncTreeApplyServerOverwrite = function(syncTree, path3, newData) {
150432
+ return syncTreeApplyOperationToSyncPoints_(syncTree, new Overwrite(newOperationSourceServer(), path3, newData));
150433
150433
  };
150434
- var syncTreeApplyServerMerge = function(syncTree, path4, changedChildren) {
150434
+ var syncTreeApplyServerMerge = function(syncTree, path3, changedChildren) {
150435
150435
  var changeTree = ImmutableTree.fromObject(changedChildren);
150436
- return syncTreeApplyOperationToSyncPoints_(syncTree, new Merge(newOperationSourceServer(), path4, changeTree));
150436
+ return syncTreeApplyOperationToSyncPoints_(syncTree, new Merge(newOperationSourceServer(), path3, changeTree));
150437
150437
  };
150438
- var syncTreeApplyListenComplete = function(syncTree, path4) {
150439
- return syncTreeApplyOperationToSyncPoints_(syncTree, new ListenComplete(newOperationSourceServer(), path4));
150438
+ var syncTreeApplyListenComplete = function(syncTree, path3) {
150439
+ return syncTreeApplyOperationToSyncPoints_(syncTree, new ListenComplete(newOperationSourceServer(), path3));
150440
150440
  };
150441
- var syncTreeApplyTaggedListenComplete = function(syncTree, path4, tag) {
150441
+ var syncTreeApplyTaggedListenComplete = function(syncTree, path3, tag) {
150442
150442
  var queryKey = syncTreeQueryKeyForTag_(syncTree, tag);
150443
150443
  if (queryKey) {
150444
150444
  var r = syncTreeParseQueryKey_(queryKey);
150445
150445
  var { path: queryPath, queryId } = r;
150446
- var relativePath = newRelativePath(queryPath, path4);
150446
+ var relativePath = newRelativePath(queryPath, path3);
150447
150447
  var op = new ListenComplete(newOperationSourceServerTaggedQuery(queryId), relativePath);
150448
150448
  return syncTreeApplyTaggedOperation_(syncTree, queryPath, op);
150449
150449
  } else {
@@ -150454,13 +150454,13 @@ var require_index_standalone = __commonJS((exports) => {
150454
150454
  if (skipListenerDedup === undefined) {
150455
150455
  skipListenerDedup = false;
150456
150456
  }
150457
- var path4 = query2._path;
150458
- var maybeSyncPoint = syncTree.syncPointTree_.get(path4);
150457
+ var path3 = query2._path;
150458
+ var maybeSyncPoint = syncTree.syncPointTree_.get(path3);
150459
150459
  var cancelEvents = [];
150460
150460
  if (maybeSyncPoint && (query2._queryIdentifier === "default" || syncPointViewExistsForQuery(maybeSyncPoint, query2))) {
150461
150461
  var removedAndEvents = syncPointRemoveEventRegistration(maybeSyncPoint, query2, eventRegistration, cancelError);
150462
150462
  if (syncPointIsEmpty(maybeSyncPoint)) {
150463
- syncTree.syncPointTree_ = syncTree.syncPointTree_.remove(path4);
150463
+ syncTree.syncPointTree_ = syncTree.syncPointTree_.remove(path3);
150464
150464
  }
150465
150465
  var removed = removedAndEvents.removed;
150466
150466
  cancelEvents = removedAndEvents.events;
@@ -150468,11 +150468,11 @@ var require_index_standalone = __commonJS((exports) => {
150468
150468
  var removingDefault = removed.findIndex(function(query3) {
150469
150469
  return query3._queryParams.loadsAllData();
150470
150470
  }) !== -1;
150471
- var covered = syncTree.syncPointTree_.findOnPath(path4, function(relativePath, parentSyncPoint) {
150471
+ var covered = syncTree.syncPointTree_.findOnPath(path3, function(relativePath, parentSyncPoint) {
150472
150472
  return syncPointHasCompleteView(parentSyncPoint);
150473
150473
  });
150474
150474
  if (removingDefault && !covered) {
150475
- var subtree = syncTree.syncPointTree_.subtree(path4);
150475
+ var subtree = syncTree.syncPointTree_.subtree(path3);
150476
150476
  if (!subtree.isEmpty()) {
150477
150477
  var newViews = syncTreeCollectDistinctViewsForSubTree_(subtree);
150478
150478
  for (var i = 0;i < newViews.length; ++i) {
@@ -150498,24 +150498,24 @@ var require_index_standalone = __commonJS((exports) => {
150498
150498
  }
150499
150499
  return cancelEvents;
150500
150500
  };
150501
- var syncTreeApplyTaggedQueryOverwrite = function(syncTree, path4, snap, tag) {
150501
+ var syncTreeApplyTaggedQueryOverwrite = function(syncTree, path3, snap, tag) {
150502
150502
  var queryKey = syncTreeQueryKeyForTag_(syncTree, tag);
150503
150503
  if (queryKey != null) {
150504
150504
  var r = syncTreeParseQueryKey_(queryKey);
150505
150505
  var { path: queryPath, queryId } = r;
150506
- var relativePath = newRelativePath(queryPath, path4);
150506
+ var relativePath = newRelativePath(queryPath, path3);
150507
150507
  var op = new Overwrite(newOperationSourceServerTaggedQuery(queryId), relativePath, snap);
150508
150508
  return syncTreeApplyTaggedOperation_(syncTree, queryPath, op);
150509
150509
  } else {
150510
150510
  return [];
150511
150511
  }
150512
150512
  };
150513
- var syncTreeApplyTaggedQueryMerge = function(syncTree, path4, changedChildren, tag) {
150513
+ var syncTreeApplyTaggedQueryMerge = function(syncTree, path3, changedChildren, tag) {
150514
150514
  var queryKey = syncTreeQueryKeyForTag_(syncTree, tag);
150515
150515
  if (queryKey) {
150516
150516
  var r = syncTreeParseQueryKey_(queryKey);
150517
150517
  var { path: queryPath, queryId } = r;
150518
- var relativePath = newRelativePath(queryPath, path4);
150518
+ var relativePath = newRelativePath(queryPath, path3);
150519
150519
  var changeTree = ImmutableTree.fromObject(changedChildren);
150520
150520
  var op = new Merge(newOperationSourceServerTaggedQuery(queryId), relativePath, changeTree);
150521
150521
  return syncTreeApplyTaggedOperation_(syncTree, queryPath, op);
@@ -150527,18 +150527,18 @@ var require_index_standalone = __commonJS((exports) => {
150527
150527
  if (skipSetupListener === undefined) {
150528
150528
  skipSetupListener = false;
150529
150529
  }
150530
- var path4 = query2._path;
150530
+ var path3 = query2._path;
150531
150531
  var serverCache = null;
150532
150532
  var foundAncestorDefaultView = false;
150533
- syncTree.syncPointTree_.foreachOnPath(path4, function(pathToSyncPoint, sp) {
150534
- var relativePath = newRelativePath(pathToSyncPoint, path4);
150533
+ syncTree.syncPointTree_.foreachOnPath(path3, function(pathToSyncPoint, sp) {
150534
+ var relativePath = newRelativePath(pathToSyncPoint, path3);
150535
150535
  serverCache = serverCache || syncPointGetCompleteServerCache(sp, relativePath);
150536
150536
  foundAncestorDefaultView = foundAncestorDefaultView || syncPointHasCompleteView(sp);
150537
150537
  });
150538
- var syncPoint = syncTree.syncPointTree_.get(path4);
150538
+ var syncPoint = syncTree.syncPointTree_.get(path3);
150539
150539
  if (!syncPoint) {
150540
150540
  syncPoint = new SyncPoint;
150541
- syncTree.syncPointTree_ = syncTree.syncPointTree_.set(path4, syncPoint);
150541
+ syncTree.syncPointTree_ = syncTree.syncPointTree_.set(path3, syncPoint);
150542
150542
  } else {
150543
150543
  foundAncestorDefaultView = foundAncestorDefaultView || syncPointHasCompleteView(syncPoint);
150544
150544
  serverCache = serverCache || syncPointGetCompleteServerCache(syncPoint, newEmptyPath());
@@ -150549,7 +150549,7 @@ var require_index_standalone = __commonJS((exports) => {
150549
150549
  } else {
150550
150550
  serverCacheComplete = false;
150551
150551
  serverCache = ChildrenNode.EMPTY_NODE;
150552
- var subtree = syncTree.syncPointTree_.subtree(path4);
150552
+ var subtree = syncTree.syncPointTree_.subtree(path3);
150553
150553
  subtree.foreachChild(function(childName, childSyncPoint) {
150554
150554
  var completeCache = syncPointGetCompleteServerCache(childSyncPoint, newEmptyPath());
150555
150555
  if (completeCache) {
@@ -150565,7 +150565,7 @@ var require_index_standalone = __commonJS((exports) => {
150565
150565
  syncTree.queryToTagMap.set(queryKey, tag);
150566
150566
  syncTree.tagToQueryMap.set(tag, queryKey);
150567
150567
  }
150568
- var writesCache = writeTreeChildWrites(syncTree.pendingWriteTree_, path4);
150568
+ var writesCache = writeTreeChildWrites(syncTree.pendingWriteTree_, path3);
150569
150569
  var events = syncPointAddEventRegistration(syncPoint, query2, eventRegistration, writesCache, serverCache, serverCacheComplete);
150570
150570
  if (!viewAlreadyExists && !foundAncestorDefaultView && !skipSetupListener) {
150571
150571
  var view = syncPointViewForQuery(syncPoint, query2);
@@ -150573,29 +150573,29 @@ var require_index_standalone = __commonJS((exports) => {
150573
150573
  }
150574
150574
  return events;
150575
150575
  };
150576
- var syncTreeCalcCompleteEventCache = function(syncTree, path4, writeIdsToExclude) {
150576
+ var syncTreeCalcCompleteEventCache = function(syncTree, path3, writeIdsToExclude) {
150577
150577
  var includeHiddenSets = true;
150578
150578
  var writeTree = syncTree.pendingWriteTree_;
150579
- var serverCache = syncTree.syncPointTree_.findOnPath(path4, function(pathSoFar, syncPoint) {
150580
- var relativePath = newRelativePath(pathSoFar, path4);
150579
+ var serverCache = syncTree.syncPointTree_.findOnPath(path3, function(pathSoFar, syncPoint) {
150580
+ var relativePath = newRelativePath(pathSoFar, path3);
150581
150581
  var serverCache2 = syncPointGetCompleteServerCache(syncPoint, relativePath);
150582
150582
  if (serverCache2) {
150583
150583
  return serverCache2;
150584
150584
  }
150585
150585
  });
150586
- return writeTreeCalcCompleteEventCache(writeTree, path4, serverCache, writeIdsToExclude, includeHiddenSets);
150586
+ return writeTreeCalcCompleteEventCache(writeTree, path3, serverCache, writeIdsToExclude, includeHiddenSets);
150587
150587
  };
150588
150588
  var syncTreeGetServerValue = function(syncTree, query2) {
150589
- var path4 = query2._path;
150589
+ var path3 = query2._path;
150590
150590
  var serverCache = null;
150591
- syncTree.syncPointTree_.foreachOnPath(path4, function(pathToSyncPoint, sp) {
150592
- var relativePath = newRelativePath(pathToSyncPoint, path4);
150591
+ syncTree.syncPointTree_.foreachOnPath(path3, function(pathToSyncPoint, sp) {
150592
+ var relativePath = newRelativePath(pathToSyncPoint, path3);
150593
150593
  serverCache = serverCache || syncPointGetCompleteServerCache(sp, relativePath);
150594
150594
  });
150595
- var syncPoint = syncTree.syncPointTree_.get(path4);
150595
+ var syncPoint = syncTree.syncPointTree_.get(path3);
150596
150596
  if (!syncPoint) {
150597
150597
  syncPoint = new SyncPoint;
150598
- syncTree.syncPointTree_ = syncTree.syncPointTree_.set(path4, syncPoint);
150598
+ syncTree.syncPointTree_ = syncTree.syncPointTree_.set(path3, syncPoint);
150599
150599
  } else {
150600
150600
  serverCache = serverCache || syncPointGetCompleteServerCache(syncPoint, newEmptyPath());
150601
150601
  }
@@ -150735,11 +150735,11 @@ var require_index_standalone = __commonJS((exports) => {
150735
150735
  return syncTreeNextQueryTag_++;
150736
150736
  };
150737
150737
  var syncTreeSetupListener_ = function(syncTree, query2, view) {
150738
- var path4 = query2._path;
150738
+ var path3 = query2._path;
150739
150739
  var tag = syncTreeTagForQuery(syncTree, query2);
150740
150740
  var listener = syncTreeCreateListenerForView_(syncTree, view);
150741
150741
  var events = syncTree.listenProvider_.startListening(syncTreeQueryForListening_(query2), tag, listener.hashFn, listener.onComplete);
150742
- var subtree = syncTree.syncPointTree_.subtree(path4);
150742
+ var subtree = syncTree.syncPointTree_.subtree(path3);
150743
150743
  if (tag) {
150744
150744
  util.assert(!syncPointHasCompleteView(subtree.value), "If we're adding a query, it shouldn't be shadowed");
150745
150745
  } else {
@@ -150794,16 +150794,16 @@ var require_index_standalone = __commonJS((exports) => {
150794
150794
  }
150795
150795
  };
150796
150796
  var treeSubTree = function(tree, pathObj) {
150797
- var path4 = pathObj instanceof Path ? pathObj : new Path(pathObj);
150798
- var child2 = tree, next = pathGetFront(path4);
150797
+ var path3 = pathObj instanceof Path ? pathObj : new Path(pathObj);
150798
+ var child2 = tree, next = pathGetFront(path3);
150799
150799
  while (next !== null) {
150800
150800
  var childNode = util.safeGet(child2.node.children, next) || {
150801
150801
  children: {},
150802
150802
  childCount: 0
150803
150803
  };
150804
150804
  child2 = new Tree(next, child2, childNode);
150805
- path4 = pathPopFront(path4);
150806
- next = pathGetFront(path4);
150805
+ path3 = pathPopFront(path3);
150806
+ next = pathGetFront(path3);
150807
150807
  }
150808
150808
  return child2;
150809
150809
  };
@@ -150871,13 +150871,13 @@ var require_index_standalone = __commonJS((exports) => {
150871
150871
  var currList = null;
150872
150872
  for (var i = 0;i < eventDataList.length; i++) {
150873
150873
  var data = eventDataList[i];
150874
- var path4 = data.getPath();
150875
- if (currList !== null && !pathEquals(path4, currList.path)) {
150874
+ var path3 = data.getPath();
150875
+ if (currList !== null && !pathEquals(path3, currList.path)) {
150876
150876
  eventQueue.eventLists_.push(currList);
150877
150877
  currList = null;
150878
150878
  }
150879
150879
  if (currList === null) {
150880
- currList = { events: [], path: path4 };
150880
+ currList = { events: [], path: path3 };
150881
150881
  }
150882
150882
  currList.events.push(data);
150883
150883
  }
@@ -150885,10 +150885,10 @@ var require_index_standalone = __commonJS((exports) => {
150885
150885
  eventQueue.eventLists_.push(currList);
150886
150886
  }
150887
150887
  };
150888
- var eventQueueRaiseEventsAtPath = function(eventQueue, path4, eventDataList) {
150888
+ var eventQueueRaiseEventsAtPath = function(eventQueue, path3, eventDataList) {
150889
150889
  eventQueueQueueEvents(eventQueue, eventDataList);
150890
150890
  eventQueueRaiseQueuedEventsMatchingPredicate(eventQueue, function(eventPath) {
150891
- return pathEquals(eventPath, path4);
150891
+ return pathEquals(eventPath, path3);
150892
150892
  });
150893
150893
  };
150894
150894
  var eventQueueRaiseEventsForChangedPath = function(eventQueue, changedPath, eventDataList) {
@@ -151010,7 +151010,7 @@ var require_index_standalone = __commonJS((exports) => {
151010
151010
  };
151011
151011
  var repoOnDataUpdate = function(repo, pathString, data, isMerge, tag) {
151012
151012
  repo.dataUpdateCount++;
151013
- var path4 = new Path(pathString);
151013
+ var path3 = new Path(pathString);
151014
151014
  data = repo.interceptServerDataCallback_ ? repo.interceptServerDataCallback_(pathString, data) : data;
151015
151015
  var events = [];
151016
151016
  if (tag) {
@@ -151018,23 +151018,23 @@ var require_index_standalone = __commonJS((exports) => {
151018
151018
  var taggedChildren = util.map(data, function(raw) {
151019
151019
  return nodeFromJSON(raw);
151020
151020
  });
151021
- events = syncTreeApplyTaggedQueryMerge(repo.serverSyncTree_, path4, taggedChildren, tag);
151021
+ events = syncTreeApplyTaggedQueryMerge(repo.serverSyncTree_, path3, taggedChildren, tag);
151022
151022
  } else {
151023
151023
  var taggedSnap = nodeFromJSON(data);
151024
- events = syncTreeApplyTaggedQueryOverwrite(repo.serverSyncTree_, path4, taggedSnap, tag);
151024
+ events = syncTreeApplyTaggedQueryOverwrite(repo.serverSyncTree_, path3, taggedSnap, tag);
151025
151025
  }
151026
151026
  } else if (isMerge) {
151027
151027
  var changedChildren = util.map(data, function(raw) {
151028
151028
  return nodeFromJSON(raw);
151029
151029
  });
151030
- events = syncTreeApplyServerMerge(repo.serverSyncTree_, path4, changedChildren);
151030
+ events = syncTreeApplyServerMerge(repo.serverSyncTree_, path3, changedChildren);
151031
151031
  } else {
151032
151032
  var snap = nodeFromJSON(data);
151033
- events = syncTreeApplyServerOverwrite(repo.serverSyncTree_, path4, snap);
151033
+ events = syncTreeApplyServerOverwrite(repo.serverSyncTree_, path3, snap);
151034
151034
  }
151035
- var affectedPath = path4;
151035
+ var affectedPath = path3;
151036
151036
  if (events.length > 0) {
151037
- affectedPath = repoRerunTransactions(repo, path4);
151037
+ affectedPath = repoRerunTransactions(repo, path3);
151038
151038
  }
151039
151039
  eventQueueRaiseEventsForChangedPath(repo.eventQueue_, affectedPath, events);
151040
151040
  };
@@ -151050,11 +151050,11 @@ var require_index_standalone = __commonJS((exports) => {
151050
151050
  });
151051
151051
  };
151052
151052
  var repoUpdateInfo = function(repo, pathString, value) {
151053
- var path4 = new Path("/.info/" + pathString);
151053
+ var path3 = new Path("/.info/" + pathString);
151054
151054
  var newNode = nodeFromJSON(value);
151055
- repo.infoData_.updateSnapshot(path4, newNode);
151056
- var events = syncTreeApplyServerOverwrite(repo.infoSyncTree_, path4, newNode);
151057
- eventQueueRaiseEventsForChangedPath(repo.eventQueue_, path4, events);
151055
+ repo.infoData_.updateSnapshot(path3, newNode);
151056
+ var events = syncTreeApplyServerOverwrite(repo.infoSyncTree_, path3, newNode);
151057
+ eventQueueRaiseEventsForChangedPath(repo.eventQueue_, path3, events);
151058
151058
  };
151059
151059
  var repoGetNextWriteId = function(repo) {
151060
151060
  return repo.nextWriteId_++;
@@ -151082,60 +151082,60 @@ var require_index_standalone = __commonJS((exports) => {
151082
151082
  return Promise.reject(new Error(err));
151083
151083
  });
151084
151084
  };
151085
- var repoSetWithPriority = function(repo, path4, newVal, newPriority, onComplete) {
151085
+ var repoSetWithPriority = function(repo, path3, newVal, newPriority, onComplete) {
151086
151086
  repoLog(repo, "set", {
151087
- path: path4.toString(),
151087
+ path: path3.toString(),
151088
151088
  value: newVal,
151089
151089
  priority: newPriority
151090
151090
  });
151091
151091
  var serverValues = repoGenerateServerValues(repo);
151092
151092
  var newNodeUnresolved = nodeFromJSON(newVal, newPriority);
151093
- var existing = syncTreeCalcCompleteEventCache(repo.serverSyncTree_, path4);
151093
+ var existing = syncTreeCalcCompleteEventCache(repo.serverSyncTree_, path3);
151094
151094
  var newNode = resolveDeferredValueSnapshot(newNodeUnresolved, existing, serverValues);
151095
151095
  var writeId = repoGetNextWriteId(repo);
151096
- var events = syncTreeApplyUserOverwrite(repo.serverSyncTree_, path4, newNode, writeId, true);
151096
+ var events = syncTreeApplyUserOverwrite(repo.serverSyncTree_, path3, newNode, writeId, true);
151097
151097
  eventQueueQueueEvents(repo.eventQueue_, events);
151098
- repo.server_.put(path4.toString(), newNodeUnresolved.val(true), function(status, errorReason) {
151098
+ repo.server_.put(path3.toString(), newNodeUnresolved.val(true), function(status, errorReason) {
151099
151099
  var success = status === "ok";
151100
151100
  if (!success) {
151101
- warn$1("set at " + path4 + " failed: " + status);
151101
+ warn$1("set at " + path3 + " failed: " + status);
151102
151102
  }
151103
151103
  var clearEvents = syncTreeAckUserWrite(repo.serverSyncTree_, writeId, !success);
151104
- eventQueueRaiseEventsForChangedPath(repo.eventQueue_, path4, clearEvents);
151104
+ eventQueueRaiseEventsForChangedPath(repo.eventQueue_, path3, clearEvents);
151105
151105
  repoCallOnCompleteCallback(repo, onComplete, status, errorReason);
151106
151106
  });
151107
- var affectedPath = repoAbortTransactions(repo, path4);
151107
+ var affectedPath = repoAbortTransactions(repo, path3);
151108
151108
  repoRerunTransactions(repo, affectedPath);
151109
151109
  eventQueueRaiseEventsForChangedPath(repo.eventQueue_, affectedPath, []);
151110
151110
  };
151111
- var repoUpdate = function(repo, path4, childrenToMerge, onComplete) {
151112
- repoLog(repo, "update", { path: path4.toString(), value: childrenToMerge });
151111
+ var repoUpdate = function(repo, path3, childrenToMerge, onComplete) {
151112
+ repoLog(repo, "update", { path: path3.toString(), value: childrenToMerge });
151113
151113
  var empty = true;
151114
151114
  var serverValues = repoGenerateServerValues(repo);
151115
151115
  var changedChildren = {};
151116
151116
  each(childrenToMerge, function(changedKey, changedValue) {
151117
151117
  empty = false;
151118
- changedChildren[changedKey] = resolveDeferredValueTree(pathChild(path4, changedKey), nodeFromJSON(changedValue), repo.serverSyncTree_, serverValues);
151118
+ changedChildren[changedKey] = resolveDeferredValueTree(pathChild(path3, changedKey), nodeFromJSON(changedValue), repo.serverSyncTree_, serverValues);
151119
151119
  });
151120
151120
  if (!empty) {
151121
151121
  var writeId_1 = repoGetNextWriteId(repo);
151122
- var events = syncTreeApplyUserMerge(repo.serverSyncTree_, path4, changedChildren, writeId_1);
151122
+ var events = syncTreeApplyUserMerge(repo.serverSyncTree_, path3, changedChildren, writeId_1);
151123
151123
  eventQueueQueueEvents(repo.eventQueue_, events);
151124
- repo.server_.merge(path4.toString(), childrenToMerge, function(status, errorReason) {
151124
+ repo.server_.merge(path3.toString(), childrenToMerge, function(status, errorReason) {
151125
151125
  var success = status === "ok";
151126
151126
  if (!success) {
151127
- warn$1("update at " + path4 + " failed: " + status);
151127
+ warn$1("update at " + path3 + " failed: " + status);
151128
151128
  }
151129
151129
  var clearEvents = syncTreeAckUserWrite(repo.serverSyncTree_, writeId_1, !success);
151130
- var affectedPath = clearEvents.length > 0 ? repoRerunTransactions(repo, path4) : path4;
151130
+ var affectedPath = clearEvents.length > 0 ? repoRerunTransactions(repo, path3) : path3;
151131
151131
  eventQueueRaiseEventsForChangedPath(repo.eventQueue_, affectedPath, clearEvents);
151132
151132
  repoCallOnCompleteCallback(repo, onComplete, status, errorReason);
151133
151133
  });
151134
151134
  each(childrenToMerge, function(changedPath) {
151135
- var affectedPath = repoAbortTransactions(repo, pathChild(path4, changedPath));
151135
+ var affectedPath = repoAbortTransactions(repo, pathChild(path3, changedPath));
151136
151136
  repoRerunTransactions(repo, affectedPath);
151137
151137
  });
151138
- eventQueueRaiseEventsForChangedPath(repo.eventQueue_, path4, []);
151138
+ eventQueueRaiseEventsForChangedPath(repo.eventQueue_, path3, []);
151139
151139
  } else {
151140
151140
  log("update() called with empty data. Don't do anything.");
151141
151141
  repoCallOnCompleteCallback(repo, onComplete, "ok", undefined);
@@ -151145,56 +151145,56 @@ var require_index_standalone = __commonJS((exports) => {
151145
151145
  repoLog(repo, "onDisconnectEvents");
151146
151146
  var serverValues = repoGenerateServerValues(repo);
151147
151147
  var resolvedOnDisconnectTree = newSparseSnapshotTree();
151148
- sparseSnapshotTreeForEachTree(repo.onDisconnect_, newEmptyPath(), function(path4, node) {
151149
- var resolved = resolveDeferredValueTree(path4, node, repo.serverSyncTree_, serverValues);
151150
- sparseSnapshotTreeRemember(resolvedOnDisconnectTree, path4, resolved);
151148
+ sparseSnapshotTreeForEachTree(repo.onDisconnect_, newEmptyPath(), function(path3, node) {
151149
+ var resolved = resolveDeferredValueTree(path3, node, repo.serverSyncTree_, serverValues);
151150
+ sparseSnapshotTreeRemember(resolvedOnDisconnectTree, path3, resolved);
151151
151151
  });
151152
151152
  var events = [];
151153
- sparseSnapshotTreeForEachTree(resolvedOnDisconnectTree, newEmptyPath(), function(path4, snap) {
151154
- events = events.concat(syncTreeApplyServerOverwrite(repo.serverSyncTree_, path4, snap));
151155
- var affectedPath = repoAbortTransactions(repo, path4);
151153
+ sparseSnapshotTreeForEachTree(resolvedOnDisconnectTree, newEmptyPath(), function(path3, snap) {
151154
+ events = events.concat(syncTreeApplyServerOverwrite(repo.serverSyncTree_, path3, snap));
151155
+ var affectedPath = repoAbortTransactions(repo, path3);
151156
151156
  repoRerunTransactions(repo, affectedPath);
151157
151157
  });
151158
151158
  repo.onDisconnect_ = newSparseSnapshotTree();
151159
151159
  eventQueueRaiseEventsForChangedPath(repo.eventQueue_, newEmptyPath(), events);
151160
151160
  };
151161
- var repoOnDisconnectCancel = function(repo, path4, onComplete) {
151162
- repo.server_.onDisconnectCancel(path4.toString(), function(status, errorReason) {
151161
+ var repoOnDisconnectCancel = function(repo, path3, onComplete) {
151162
+ repo.server_.onDisconnectCancel(path3.toString(), function(status, errorReason) {
151163
151163
  if (status === "ok") {
151164
- sparseSnapshotTreeForget(repo.onDisconnect_, path4);
151164
+ sparseSnapshotTreeForget(repo.onDisconnect_, path3);
151165
151165
  }
151166
151166
  repoCallOnCompleteCallback(repo, onComplete, status, errorReason);
151167
151167
  });
151168
151168
  };
151169
- var repoOnDisconnectSet = function(repo, path4, value, onComplete) {
151169
+ var repoOnDisconnectSet = function(repo, path3, value, onComplete) {
151170
151170
  var newNode = nodeFromJSON(value);
151171
- repo.server_.onDisconnectPut(path4.toString(), newNode.val(true), function(status, errorReason) {
151171
+ repo.server_.onDisconnectPut(path3.toString(), newNode.val(true), function(status, errorReason) {
151172
151172
  if (status === "ok") {
151173
- sparseSnapshotTreeRemember(repo.onDisconnect_, path4, newNode);
151173
+ sparseSnapshotTreeRemember(repo.onDisconnect_, path3, newNode);
151174
151174
  }
151175
151175
  repoCallOnCompleteCallback(repo, onComplete, status, errorReason);
151176
151176
  });
151177
151177
  };
151178
- var repoOnDisconnectSetWithPriority = function(repo, path4, value, priority, onComplete) {
151178
+ var repoOnDisconnectSetWithPriority = function(repo, path3, value, priority, onComplete) {
151179
151179
  var newNode = nodeFromJSON(value, priority);
151180
- repo.server_.onDisconnectPut(path4.toString(), newNode.val(true), function(status, errorReason) {
151180
+ repo.server_.onDisconnectPut(path3.toString(), newNode.val(true), function(status, errorReason) {
151181
151181
  if (status === "ok") {
151182
- sparseSnapshotTreeRemember(repo.onDisconnect_, path4, newNode);
151182
+ sparseSnapshotTreeRemember(repo.onDisconnect_, path3, newNode);
151183
151183
  }
151184
151184
  repoCallOnCompleteCallback(repo, onComplete, status, errorReason);
151185
151185
  });
151186
151186
  };
151187
- var repoOnDisconnectUpdate = function(repo, path4, childrenToMerge, onComplete) {
151187
+ var repoOnDisconnectUpdate = function(repo, path3, childrenToMerge, onComplete) {
151188
151188
  if (util.isEmpty(childrenToMerge)) {
151189
151189
  log("onDisconnect().update() called with empty data. Don't do anything.");
151190
151190
  repoCallOnCompleteCallback(repo, onComplete, "ok", undefined);
151191
151191
  return;
151192
151192
  }
151193
- repo.server_.onDisconnectMerge(path4.toString(), childrenToMerge, function(status, errorReason) {
151193
+ repo.server_.onDisconnectMerge(path3.toString(), childrenToMerge, function(status, errorReason) {
151194
151194
  if (status === "ok") {
151195
151195
  each(childrenToMerge, function(childName, childNode) {
151196
151196
  var newChildNode = nodeFromJSON(childNode);
151197
- sparseSnapshotTreeRemember(repo.onDisconnect_, pathChild(path4, childName), newChildNode);
151197
+ sparseSnapshotTreeRemember(repo.onDisconnect_, pathChild(path3, childName), newChildNode);
151198
151198
  });
151199
151199
  }
151200
151200
  repoCallOnCompleteCallback(repo, onComplete, status, errorReason);
@@ -151257,10 +151257,10 @@ var require_index_standalone = __commonJS((exports) => {
151257
151257
  });
151258
151258
  }
151259
151259
  };
151260
- var repoStartTransaction = function(repo, path4, transactionUpdate, onComplete, unwatcher, applyLocally) {
151261
- repoLog(repo, "transaction on " + path4);
151260
+ var repoStartTransaction = function(repo, path3, transactionUpdate, onComplete, unwatcher, applyLocally) {
151261
+ repoLog(repo, "transaction on " + path3);
151262
151262
  var transaction = {
151263
- path: path4,
151263
+ path: path3,
151264
151264
  update: transactionUpdate,
151265
151265
  onComplete,
151266
151266
  status: null,
@@ -151274,7 +151274,7 @@ var require_index_standalone = __commonJS((exports) => {
151274
151274
  currentOutputSnapshotRaw: null,
151275
151275
  currentOutputSnapshotResolved: null
151276
151276
  };
151277
- var currentState = repoGetLatestState(repo, path4, undefined);
151277
+ var currentState = repoGetLatestState(repo, path3, undefined);
151278
151278
  transaction.currentInputSnapshot = currentState;
151279
151279
  var newVal = transaction.update(currentState.val());
151280
151280
  if (newVal === undefined) {
@@ -151287,7 +151287,7 @@ var require_index_standalone = __commonJS((exports) => {
151287
151287
  } else {
151288
151288
  validateFirebaseData("transaction failed: Data returned ", newVal, transaction.path);
151289
151289
  transaction.status = 0;
151290
- var queueNode = treeSubTree(repo.transactionQueueTree_, path4);
151290
+ var queueNode = treeSubTree(repo.transactionQueueTree_, path3);
151291
151291
  var nodeQueue = treeGetValue(queueNode) || [];
151292
151292
  nodeQueue.push(transaction);
151293
151293
  treeSetValue(queueNode, nodeQueue);
@@ -151296,7 +151296,7 @@ var require_index_standalone = __commonJS((exports) => {
151296
151296
  priorityForNode = util.safeGet(newVal, ".priority");
151297
151297
  util.assert(isValidPriority(priorityForNode), "Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.");
151298
151298
  } else {
151299
- var currentNode = syncTreeCalcCompleteEventCache(repo.serverSyncTree_, path4) || ChildrenNode.EMPTY_NODE;
151299
+ var currentNode = syncTreeCalcCompleteEventCache(repo.serverSyncTree_, path3) || ChildrenNode.EMPTY_NODE;
151300
151300
  priorityForNode = currentNode.getPriority().val();
151301
151301
  }
151302
151302
  var serverValues = repoGenerateServerValues(repo);
@@ -151305,13 +151305,13 @@ var require_index_standalone = __commonJS((exports) => {
151305
151305
  transaction.currentOutputSnapshotRaw = newNodeUnresolved;
151306
151306
  transaction.currentOutputSnapshotResolved = newNode;
151307
151307
  transaction.currentWriteId = repoGetNextWriteId(repo);
151308
- var events = syncTreeApplyUserOverwrite(repo.serverSyncTree_, path4, newNode, transaction.currentWriteId, transaction.applyLocally);
151309
- eventQueueRaiseEventsForChangedPath(repo.eventQueue_, path4, events);
151308
+ var events = syncTreeApplyUserOverwrite(repo.serverSyncTree_, path3, newNode, transaction.currentWriteId, transaction.applyLocally);
151309
+ eventQueueRaiseEventsForChangedPath(repo.eventQueue_, path3, events);
151310
151310
  repoSendReadyTransactions(repo, repo.transactionQueueTree_);
151311
151311
  }
151312
151312
  };
151313
- var repoGetLatestState = function(repo, path4, excludeSets) {
151314
- return syncTreeCalcCompleteEventCache(repo.serverSyncTree_, path4, excludeSets) || ChildrenNode.EMPTY_NODE;
151313
+ var repoGetLatestState = function(repo, path3, excludeSets) {
151314
+ return syncTreeCalcCompleteEventCache(repo.serverSyncTree_, path3, excludeSets) || ChildrenNode.EMPTY_NODE;
151315
151315
  };
151316
151316
  var repoSendReadyTransactions = function(repo, node) {
151317
151317
  if (node === undefined) {
@@ -151335,11 +151335,11 @@ var require_index_standalone = __commonJS((exports) => {
151335
151335
  });
151336
151336
  }
151337
151337
  };
151338
- var repoSendTransactionQueue = function(repo, path4, queue) {
151338
+ var repoSendTransactionQueue = function(repo, path3, queue) {
151339
151339
  var setsToIgnore = queue.map(function(txn2) {
151340
151340
  return txn2.currentWriteId;
151341
151341
  });
151342
- var latestState = repoGetLatestState(repo, path4, setsToIgnore);
151342
+ var latestState = repoGetLatestState(repo, path3, setsToIgnore);
151343
151343
  var snapToSend = latestState;
151344
151344
  var latestHash = latestState.hash();
151345
151345
  for (var i = 0;i < queue.length; i++) {
@@ -151347,11 +151347,11 @@ var require_index_standalone = __commonJS((exports) => {
151347
151347
  util.assert(txn.status === 0, "tryToSendTransactionQueue_: items in queue should all be run.");
151348
151348
  txn.status = 1;
151349
151349
  txn.retryCount++;
151350
- var relativePath = newRelativePath(path4, txn.path);
151350
+ var relativePath = newRelativePath(path3, txn.path);
151351
151351
  snapToSend = snapToSend.updateChild(relativePath, txn.currentOutputSnapshotRaw);
151352
151352
  }
151353
151353
  var dataToSend = snapToSend.val(true);
151354
- var pathToSend = path4;
151354
+ var pathToSend = path3;
151355
151355
  repo.server_.put(pathToSend.toString(), dataToSend, function(status) {
151356
151356
  repoLog(repo, "transaction put response", {
151357
151357
  path: pathToSend.toString(),
@@ -151373,9 +151373,9 @@ var require_index_standalone = __commonJS((exports) => {
151373
151373
  for (var i2 = 0;i2 < queue.length; i2++) {
151374
151374
  _loop_1(i2);
151375
151375
  }
151376
- repoPruneCompletedTransactionsBelowNode(repo, treeSubTree(repo.transactionQueueTree_, path4));
151376
+ repoPruneCompletedTransactionsBelowNode(repo, treeSubTree(repo.transactionQueueTree_, path3));
151377
151377
  repoSendReadyTransactions(repo, repo.transactionQueueTree_);
151378
- eventQueueRaiseEventsForChangedPath(repo.eventQueue_, path4, events);
151378
+ eventQueueRaiseEventsForChangedPath(repo.eventQueue_, path3, events);
151379
151379
  for (var i2 = 0;i2 < callbacks.length; i2++) {
151380
151380
  exceptionGuard(callbacks[i2]);
151381
151381
  }
@@ -151395,18 +151395,18 @@ var require_index_standalone = __commonJS((exports) => {
151395
151395
  queue[i2].abortReason = status;
151396
151396
  }
151397
151397
  }
151398
- repoRerunTransactions(repo, path4);
151398
+ repoRerunTransactions(repo, path3);
151399
151399
  }
151400
151400
  }, latestHash);
151401
151401
  };
151402
151402
  var repoRerunTransactions = function(repo, changedPath) {
151403
151403
  var rootMostTransactionNode = repoGetAncestorTransactionNode(repo, changedPath);
151404
- var path4 = treeGetPath(rootMostTransactionNode);
151404
+ var path3 = treeGetPath(rootMostTransactionNode);
151405
151405
  var queue = repoBuildTransactionQueue(repo, rootMostTransactionNode);
151406
- repoRerunTransactionQueue(repo, queue, path4);
151407
- return path4;
151406
+ repoRerunTransactionQueue(repo, queue, path3);
151407
+ return path3;
151408
151408
  };
151409
- var repoRerunTransactionQueue = function(repo, queue, path4) {
151409
+ var repoRerunTransactionQueue = function(repo, queue, path3) {
151410
151410
  if (queue.length === 0) {
151411
151411
  return;
151412
151412
  }
@@ -151420,7 +151420,7 @@ var require_index_standalone = __commonJS((exports) => {
151420
151420
  });
151421
151421
  var _loop_2 = function(i2) {
151422
151422
  var transaction = queue[i2];
151423
- var relativePath = newRelativePath(path4, transaction.path);
151423
+ var relativePath = newRelativePath(path3, transaction.path);
151424
151424
  var abortTransaction = false, abortReason;
151425
151425
  util.assert(relativePath !== null, "rerunTransactionsUnderNode_: relativePath should not be null.");
151426
151426
  if (transaction.status === 4) {
@@ -151459,7 +151459,7 @@ var require_index_standalone = __commonJS((exports) => {
151459
151459
  }
151460
151460
  }
151461
151461
  }
151462
- eventQueueRaiseEventsForChangedPath(repo.eventQueue_, path4, events);
151462
+ eventQueueRaiseEventsForChangedPath(repo.eventQueue_, path3, events);
151463
151463
  events = [];
151464
151464
  if (abortTransaction) {
151465
151465
  queue[i2].status = 2;
@@ -151488,14 +151488,14 @@ var require_index_standalone = __commonJS((exports) => {
151488
151488
  }
151489
151489
  repoSendReadyTransactions(repo, repo.transactionQueueTree_);
151490
151490
  };
151491
- var repoGetAncestorTransactionNode = function(repo, path4) {
151491
+ var repoGetAncestorTransactionNode = function(repo, path3) {
151492
151492
  var front;
151493
151493
  var transactionNode = repo.transactionQueueTree_;
151494
- front = pathGetFront(path4);
151494
+ front = pathGetFront(path3);
151495
151495
  while (front !== null && treeGetValue(transactionNode) === undefined) {
151496
151496
  transactionNode = treeSubTree(transactionNode, front);
151497
- path4 = pathPopFront(path4);
151498
- front = pathGetFront(path4);
151497
+ path3 = pathPopFront(path3);
151498
+ front = pathGetFront(path3);
151499
151499
  }
151500
151500
  return transactionNode;
151501
151501
  };
@@ -151535,9 +151535,9 @@ var require_index_standalone = __commonJS((exports) => {
151535
151535
  repoPruneCompletedTransactionsBelowNode(repo, childNode);
151536
151536
  });
151537
151537
  };
151538
- var repoAbortTransactions = function(repo, path4) {
151539
- var affectedPath = treeGetPath(repoGetAncestorTransactionNode(repo, path4));
151540
- var transactionNode = treeSubTree(repo.transactionQueueTree_, path4);
151538
+ var repoAbortTransactions = function(repo, path3) {
151539
+ var affectedPath = treeGetPath(repoGetAncestorTransactionNode(repo, path3));
151540
+ var transactionNode = treeSubTree(repo.transactionQueueTree_, path3);
151541
151541
  treeForEachAncestor(transactionNode, function(node) {
151542
151542
  repoAbortTransactionsOnNode(repo, node);
151543
151543
  });
@@ -151677,10 +151677,10 @@ var require_index_standalone = __commonJS((exports) => {
151677
151677
  throw new Error("Query: Can't combine startAt(), startAfter(), endAt(), endBefore(), and limit(). Use limitToFirst() or limitToLast() instead.");
151678
151678
  }
151679
151679
  };
151680
- var ref = function(db, path4) {
151680
+ var ref = function(db, path3) {
151681
151681
  db = util.getModularInstance(db);
151682
151682
  db._checkNotDeleted("ref");
151683
- return path4 !== undefined ? child(db._root, path4) : db._root;
151683
+ return path3 !== undefined ? child(db._root, path3) : db._root;
151684
151684
  };
151685
151685
  var refFromURL = function(db, url2) {
151686
151686
  db = util.getModularInstance(db);
@@ -151693,14 +151693,14 @@ var require_index_standalone = __commonJS((exports) => {
151693
151693
  }
151694
151694
  return ref(db, parsedURL.path.toString());
151695
151695
  };
151696
- var child = function(parent, path4) {
151696
+ var child = function(parent, path3) {
151697
151697
  parent = util.getModularInstance(parent);
151698
151698
  if (pathGetFront(parent._path) === null) {
151699
- validateRootPathString("child", "path", path4, false);
151699
+ validateRootPathString("child", "path", path3, false);
151700
151700
  } else {
151701
- validatePathString("child", "path", path4, false);
151701
+ validatePathString("child", "path", path3, false);
151702
151702
  }
151703
- return new ReferenceImpl(parent._repo, pathChild(parent._path, path4));
151703
+ return new ReferenceImpl(parent._repo, pathChild(parent._path, path3));
151704
151704
  };
151705
151705
  var onDisconnect = function(ref2) {
151706
151706
  ref2 = util.getModularInstance(ref2);
@@ -151858,16 +151858,16 @@ var require_index_standalone = __commonJS((exports) => {
151858
151858
  }
151859
151859
  return new QueryLimitToLastConstraint(limit);
151860
151860
  };
151861
- var orderByChild = function(path4) {
151862
- if (path4 === "$key") {
151861
+ var orderByChild = function(path3) {
151862
+ if (path3 === "$key") {
151863
151863
  throw new Error('orderByChild: "$key" is invalid. Use orderByKey() instead.');
151864
- } else if (path4 === "$priority") {
151864
+ } else if (path3 === "$priority") {
151865
151865
  throw new Error('orderByChild: "$priority" is invalid. Use orderByPriority() instead.');
151866
- } else if (path4 === "$value") {
151866
+ } else if (path3 === "$value") {
151867
151867
  throw new Error('orderByChild: "$value" is invalid. Use orderByValue() instead.');
151868
151868
  }
151869
- validatePathString("orderByChild", "path", path4, false);
151870
- return new QueryOrderByChildConstraint(path4);
151869
+ validatePathString("orderByChild", "path", path3, false);
151870
+ return new QueryOrderByChildConstraint(path3);
151871
151871
  };
151872
151872
  var orderByKey = function() {
151873
151873
  return new QueryOrderByKeyConstraint;
@@ -156595,9 +156595,9 @@ var require_index_standalone = __commonJS((exports) => {
156595
156595
  return Path2;
156596
156596
  }();
156597
156597
  var ValidationPath = function() {
156598
- function ValidationPath2(path4, errorPrefix_) {
156598
+ function ValidationPath2(path3, errorPrefix_) {
156599
156599
  this.errorPrefix_ = errorPrefix_;
156600
- this.parts_ = pathSlice(path4, 0);
156600
+ this.parts_ = pathSlice(path3, 0);
156601
156601
  this.byteLength_ = Math.max(1, this.parts_.length);
156602
156602
  for (var i = 0;i < this.parts_.length; i++) {
156603
156603
  this.byteLength_ += util.stringLength(this.parts_[i]);
@@ -157864,10 +157864,10 @@ var require_index_standalone = __commonJS((exports) => {
157864
157864
  return LeafNode2.__childrenNodeConstructor.EMPTY_NODE;
157865
157865
  }
157866
157866
  };
157867
- LeafNode2.prototype.getChild = function(path4) {
157868
- if (pathIsEmpty(path4)) {
157867
+ LeafNode2.prototype.getChild = function(path3) {
157868
+ if (pathIsEmpty(path3)) {
157869
157869
  return this;
157870
- } else if (pathGetFront(path4) === ".priority") {
157870
+ } else if (pathGetFront(path3) === ".priority") {
157871
157871
  return this.priorityNode_;
157872
157872
  } else {
157873
157873
  return LeafNode2.__childrenNodeConstructor.EMPTY_NODE;
@@ -157888,15 +157888,15 @@ var require_index_standalone = __commonJS((exports) => {
157888
157888
  return LeafNode2.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(childName, newChildNode).updatePriority(this.priorityNode_);
157889
157889
  }
157890
157890
  };
157891
- LeafNode2.prototype.updateChild = function(path4, newChildNode) {
157892
- var front = pathGetFront(path4);
157891
+ LeafNode2.prototype.updateChild = function(path3, newChildNode) {
157892
+ var front = pathGetFront(path3);
157893
157893
  if (front === null) {
157894
157894
  return newChildNode;
157895
157895
  } else if (newChildNode.isEmpty() && front !== ".priority") {
157896
157896
  return this;
157897
157897
  } else {
157898
- util.assert(front !== ".priority" || pathGetLength(path4) === 1, ".priority must be the last token in a path");
157899
- return this.updateImmediateChild(front, LeafNode2.__childrenNodeConstructor.EMPTY_NODE.updateChild(pathPopFront(path4), newChildNode));
157898
+ util.assert(front !== ".priority" || pathGetLength(path3) === 1, ".priority must be the last token in a path");
157899
+ return this.updateImmediateChild(front, LeafNode2.__childrenNodeConstructor.EMPTY_NODE.updateChild(pathPopFront(path3), newChildNode));
157900
157900
  }
157901
157901
  };
157902
157902
  LeafNode2.prototype.isEmpty = function() {
@@ -158254,12 +158254,12 @@ var require_index_standalone = __commonJS((exports) => {
158254
158254
  return child2 === null ? EMPTY_NODE : child2;
158255
158255
  }
158256
158256
  };
158257
- ChildrenNode2.prototype.getChild = function(path4) {
158258
- var front = pathGetFront(path4);
158257
+ ChildrenNode2.prototype.getChild = function(path3) {
158258
+ var front = pathGetFront(path3);
158259
158259
  if (front === null) {
158260
158260
  return this;
158261
158261
  }
158262
- return this.getImmediateChild(front).getChild(pathPopFront(path4));
158262
+ return this.getImmediateChild(front).getChild(pathPopFront(path3));
158263
158263
  };
158264
158264
  ChildrenNode2.prototype.hasChild = function(childName) {
158265
158265
  return this.children_.get(childName) !== null;
@@ -158282,13 +158282,13 @@ var require_index_standalone = __commonJS((exports) => {
158282
158282
  return new ChildrenNode2(newChildren, newPriority, newIndexMap);
158283
158283
  }
158284
158284
  };
158285
- ChildrenNode2.prototype.updateChild = function(path4, newChildNode) {
158286
- var front = pathGetFront(path4);
158285
+ ChildrenNode2.prototype.updateChild = function(path3, newChildNode) {
158286
+ var front = pathGetFront(path3);
158287
158287
  if (front === null) {
158288
158288
  return newChildNode;
158289
158289
  } else {
158290
- util.assert(pathGetFront(path4) !== ".priority" || pathGetLength(path4) === 1, ".priority must be the last token in a path");
158291
- var newImmediateChild = this.getImmediateChild(front).updateChild(pathPopFront(path4), newChildNode);
158290
+ util.assert(pathGetFront(path3) !== ".priority" || pathGetLength(path3) === 1, ".priority must be the last token in a path");
158291
+ var newImmediateChild = this.getImmediateChild(front).updateChild(pathPopFront(path3), newChildNode);
158292
158292
  return this.updateImmediateChild(front, newImmediateChild);
158293
158293
  }
158294
158294
  };
@@ -159132,11 +159132,11 @@ var require_index_standalone = __commonJS((exports) => {
159132
159132
  function SnapshotHolder2() {
159133
159133
  this.rootNode_ = ChildrenNode.EMPTY_NODE;
159134
159134
  }
159135
- SnapshotHolder2.prototype.getNode = function(path4) {
159136
- return this.rootNode_.getChild(path4);
159135
+ SnapshotHolder2.prototype.getNode = function(path3) {
159136
+ return this.rootNode_.getChild(path3);
159137
159137
  };
159138
- SnapshotHolder2.prototype.updateSnapshot = function(path4, newSnapshotNode) {
159139
- this.rootNode_ = this.rootNode_.updateChild(path4, newSnapshotNode);
159138
+ SnapshotHolder2.prototype.updateSnapshot = function(path3, newSnapshotNode) {
159139
+ this.rootNode_ = this.rootNode_.updateChild(path3, newSnapshotNode);
159140
159140
  };
159141
159141
  return SnapshotHolder2;
159142
159142
  }();
@@ -159195,8 +159195,8 @@ var require_index_standalone = __commonJS((exports) => {
159195
159195
  OperationType2[OperationType2["LISTEN_COMPLETE"] = 3] = "LISTEN_COMPLETE";
159196
159196
  })(OperationType || (OperationType = {}));
159197
159197
  var AckUserWrite = function() {
159198
- function AckUserWrite2(path4, affectedTree, revert) {
159199
- this.path = path4;
159198
+ function AckUserWrite2(path3, affectedTree, revert) {
159199
+ this.path = path3;
159200
159200
  this.affectedTree = affectedTree;
159201
159201
  this.revert = revert;
159202
159202
  this.type = OperationType.ACK_USER_WRITE;
@@ -159217,9 +159217,9 @@ var require_index_standalone = __commonJS((exports) => {
159217
159217
  return AckUserWrite2;
159218
159218
  }();
159219
159219
  var ListenComplete = function() {
159220
- function ListenComplete2(source, path4) {
159220
+ function ListenComplete2(source, path3) {
159221
159221
  this.source = source;
159222
- this.path = path4;
159222
+ this.path = path3;
159223
159223
  this.type = OperationType.LISTEN_COMPLETE;
159224
159224
  }
159225
159225
  ListenComplete2.prototype.operationForChild = function(childName) {
@@ -159232,9 +159232,9 @@ var require_index_standalone = __commonJS((exports) => {
159232
159232
  return ListenComplete2;
159233
159233
  }();
159234
159234
  var Overwrite = function() {
159235
- function Overwrite2(source, path4, snap) {
159235
+ function Overwrite2(source, path3, snap) {
159236
159236
  this.source = source;
159237
- this.path = path4;
159237
+ this.path = path3;
159238
159238
  this.snap = snap;
159239
159239
  this.type = OperationType.OVERWRITE;
159240
159240
  }
@@ -159248,9 +159248,9 @@ var require_index_standalone = __commonJS((exports) => {
159248
159248
  return Overwrite2;
159249
159249
  }();
159250
159250
  var Merge = function() {
159251
- function Merge2(source, path4, children2) {
159251
+ function Merge2(source, path3, children2) {
159252
159252
  this.source = source;
159253
- this.path = path4;
159253
+ this.path = path3;
159254
159254
  this.children = children2;
159255
159255
  this.type = OperationType.MERGE;
159256
159256
  }
@@ -159286,11 +159286,11 @@ var require_index_standalone = __commonJS((exports) => {
159286
159286
  CacheNode2.prototype.isFiltered = function() {
159287
159287
  return this.filtered_;
159288
159288
  };
159289
- CacheNode2.prototype.isCompleteForPath = function(path4) {
159290
- if (pathIsEmpty(path4)) {
159289
+ CacheNode2.prototype.isCompleteForPath = function(path3) {
159290
+ if (pathIsEmpty(path3)) {
159291
159291
  return this.isFullyInitialized() && !this.filtered_;
159292
159292
  }
159293
- var childKey = pathGetFront(path4);
159293
+ var childKey = pathGetFront(path3);
159294
159294
  return this.isCompleteForChild(childKey);
159295
159295
  };
159296
159296
  CacheNode2.prototype.isCompleteForChild = function(key2) {
@@ -159452,8 +159452,8 @@ var require_index_standalone = __commonJS((exports) => {
159452
159452
  });
159453
159453
  return fn2(pathSoFar, this.value, accum);
159454
159454
  };
159455
- ImmutableTree2.prototype.findOnPath = function(path4, f) {
159456
- return this.findOnPath_(path4, newEmptyPath(), f);
159455
+ ImmutableTree2.prototype.findOnPath = function(path3, f) {
159456
+ return this.findOnPath_(path3, newEmptyPath(), f);
159457
159457
  };
159458
159458
  ImmutableTree2.prototype.findOnPath_ = function(pathToFollow, pathSoFar, f) {
159459
159459
  var result = this.value ? f(pathSoFar, this.value) : false;
@@ -159473,8 +159473,8 @@ var require_index_standalone = __commonJS((exports) => {
159473
159473
  }
159474
159474
  }
159475
159475
  };
159476
- ImmutableTree2.prototype.foreachOnPath = function(path4, f) {
159477
- return this.foreachOnPath_(path4, newEmptyPath(), f);
159476
+ ImmutableTree2.prototype.foreachOnPath = function(path3, f) {
159477
+ return this.foreachOnPath_(path3, newEmptyPath(), f);
159478
159478
  };
159479
159479
  ImmutableTree2.prototype.foreachOnPath_ = function(pathToFollow, currentRelativePath, f) {
159480
159480
  if (pathIsEmpty(pathToFollow)) {
@@ -159655,9 +159655,9 @@ var require_index_standalone = __commonJS((exports) => {
159655
159655
  return ExistingValueProvider2;
159656
159656
  }();
159657
159657
  var DeferredValueProvider = function() {
159658
- function DeferredValueProvider2(syncTree, path4) {
159658
+ function DeferredValueProvider2(syncTree, path3) {
159659
159659
  this.syncTree_ = syncTree;
159660
- this.path_ = path4;
159660
+ this.path_ = path3;
159661
159661
  }
159662
159662
  DeferredValueProvider2.prototype.getImmediateChild = function(childName) {
159663
159663
  var childPath = pathChild(this.path_, childName);
@@ -159714,8 +159714,8 @@ var require_index_standalone = __commonJS((exports) => {
159714
159714
  }
159715
159715
  return existingVal + delta;
159716
159716
  };
159717
- var resolveDeferredValueTree = function(path4, node, syncTree, serverValues) {
159718
- return resolveDeferredValue(node, new DeferredValueProvider(syncTree, path4), serverValues);
159717
+ var resolveDeferredValueTree = function(path3, node, syncTree, serverValues) {
159718
+ return resolveDeferredValue(node, new DeferredValueProvider(syncTree, path3), serverValues);
159719
159719
  };
159720
159720
  var resolveDeferredValueSnapshot = function(node, existing, serverValues) {
159721
159721
  return resolveDeferredValue(node, new ExistingValueProvider(existing), serverValues);
@@ -159755,25 +159755,25 @@ var require_index_standalone = __commonJS((exports) => {
159755
159755
  var isValidPriority = function(priority) {
159756
159756
  return priority === null || typeof priority === "string" || typeof priority === "number" && !isInvalidJSONNumber(priority) || priority && typeof priority === "object" && util.contains(priority, ".sv");
159757
159757
  };
159758
- var validateFirebaseDataArg = function(fnName, value, path4, optional) {
159758
+ var validateFirebaseDataArg = function(fnName, value, path3, optional) {
159759
159759
  if (optional && value === undefined) {
159760
159760
  return;
159761
159761
  }
159762
- validateFirebaseData(util.errorPrefix(fnName, "value"), value, path4);
159762
+ validateFirebaseData(util.errorPrefix(fnName, "value"), value, path3);
159763
159763
  };
159764
159764
  var validateFirebaseData = function(errorPrefix, data, path_) {
159765
- var path4 = path_ instanceof Path ? new ValidationPath(path_, errorPrefix) : path_;
159765
+ var path3 = path_ instanceof Path ? new ValidationPath(path_, errorPrefix) : path_;
159766
159766
  if (data === undefined) {
159767
- throw new Error(errorPrefix + "contains undefined " + validationPathToErrorString(path4));
159767
+ throw new Error(errorPrefix + "contains undefined " + validationPathToErrorString(path3));
159768
159768
  }
159769
159769
  if (typeof data === "function") {
159770
- throw new Error(errorPrefix + "contains a function " + validationPathToErrorString(path4) + " with contents = " + data.toString());
159770
+ throw new Error(errorPrefix + "contains a function " + validationPathToErrorString(path3) + " with contents = " + data.toString());
159771
159771
  }
159772
159772
  if (isInvalidJSONNumber(data)) {
159773
- throw new Error(errorPrefix + "contains " + data.toString() + " " + validationPathToErrorString(path4));
159773
+ throw new Error(errorPrefix + "contains " + data.toString() + " " + validationPathToErrorString(path3));
159774
159774
  }
159775
159775
  if (typeof data === "string" && data.length > MAX_LEAF_SIZE_ / 3 && util.stringLength(data) > MAX_LEAF_SIZE_) {
159776
- throw new Error(errorPrefix + "contains a string greater than " + MAX_LEAF_SIZE_ + " utf8 bytes " + validationPathToErrorString(path4) + " ('" + data.substring(0, 50) + "...')");
159776
+ throw new Error(errorPrefix + "contains a string greater than " + MAX_LEAF_SIZE_ + " utf8 bytes " + validationPathToErrorString(path3) + " ('" + data.substring(0, 50) + "...')");
159777
159777
  }
159778
159778
  if (data && typeof data === "object") {
159779
159779
  var hasDotValue_1 = false;
@@ -159784,15 +159784,15 @@ var require_index_standalone = __commonJS((exports) => {
159784
159784
  } else if (key2 !== ".priority" && key2 !== ".sv") {
159785
159785
  hasActualChild_1 = true;
159786
159786
  if (!isValidKey(key2)) {
159787
- throw new Error(errorPrefix + " contains an invalid key (" + key2 + ") " + validationPathToErrorString(path4) + '. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');
159787
+ throw new Error(errorPrefix + " contains an invalid key (" + key2 + ") " + validationPathToErrorString(path3) + '. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');
159788
159788
  }
159789
159789
  }
159790
- validationPathPush(path4, key2);
159791
- validateFirebaseData(errorPrefix, value, path4);
159792
- validationPathPop(path4);
159790
+ validationPathPush(path3, key2);
159791
+ validateFirebaseData(errorPrefix, value, path3);
159792
+ validationPathPop(path3);
159793
159793
  });
159794
159794
  if (hasDotValue_1 && hasActualChild_1) {
159795
- throw new Error(errorPrefix + ' contains ".value" child ' + validationPathToErrorString(path4) + " in addition to actual children.");
159795
+ throw new Error(errorPrefix + ' contains ".value" child ' + validationPathToErrorString(path3) + " in addition to actual children.");
159796
159796
  }
159797
159797
  }
159798
159798
  };
@@ -159819,7 +159819,7 @@ var require_index_standalone = __commonJS((exports) => {
159819
159819
  prevPath = curPath;
159820
159820
  }
159821
159821
  };
159822
- var validateFirebaseMergeDataArg = function(fnName, data, path4, optional) {
159822
+ var validateFirebaseMergeDataArg = function(fnName, data, path3, optional) {
159823
159823
  if (optional && data === undefined) {
159824
159824
  return;
159825
159825
  }
@@ -159830,7 +159830,7 @@ var require_index_standalone = __commonJS((exports) => {
159830
159830
  var mergePaths = [];
159831
159831
  each(data, function(key2, value) {
159832
159832
  var curPath = new Path(key2);
159833
- validateFirebaseData(errorPrefix, value, pathChild(path4, curPath));
159833
+ validateFirebaseData(errorPrefix, value, pathChild(path3, curPath));
159834
159834
  if (pathGetBack(curPath) === ".priority") {
159835
159835
  if (!isValidPriority(value)) {
159836
159836
  throw new Error(errorPrefix + "contains an invalid value for '" + curPath.toString() + "', which must be a valid Firebase priority (a string, finite number, server value, or null).");
@@ -159873,8 +159873,8 @@ var require_index_standalone = __commonJS((exports) => {
159873
159873
  }
159874
159874
  validatePathString(fnName, argumentName, pathString, optional);
159875
159875
  };
159876
- var validateWritablePath = function(fnName, path4) {
159877
- if (pathGetFront(path4) === ".info") {
159876
+ var validateWritablePath = function(fnName, path3) {
159877
+ if (pathGetFront(path3) === ".info") {
159878
159878
  throw new Error(fnName + " failed = Can't modify data under /.info/");
159879
159879
  }
159880
159880
  };
@@ -160045,10 +160045,10 @@ var require_index_standalone = __commonJS((exports) => {
160045
160045
  return DataEvent2;
160046
160046
  }();
160047
160047
  var CancelEvent = function() {
160048
- function CancelEvent2(eventRegistration, error2, path4) {
160048
+ function CancelEvent2(eventRegistration, error2, path3) {
160049
160049
  this.eventRegistration = eventRegistration;
160050
160050
  this.error = error2;
160051
- this.path = path4;
160051
+ this.path = path3;
160052
160052
  }
160053
160053
  CancelEvent2.prototype.getPath = function() {
160054
160054
  return this.path;
@@ -160194,8 +160194,8 @@ var require_index_standalone = __commonJS((exports) => {
160194
160194
  }();
160195
160195
  var ReferenceImpl = function(_super) {
160196
160196
  tslib.__extends(ReferenceImpl2, _super);
160197
- function ReferenceImpl2(repo, path4) {
160198
- return _super.call(this, repo, path4, new QueryParams, false) || this;
160197
+ function ReferenceImpl2(repo, path3) {
160198
+ return _super.call(this, repo, path3, new QueryParams, false) || this;
160199
160199
  }
160200
160200
  Object.defineProperty(ReferenceImpl2.prototype, "parent", {
160201
160201
  get: function() {
@@ -160245,9 +160245,9 @@ var require_index_standalone = __commonJS((exports) => {
160245
160245
  enumerable: false,
160246
160246
  configurable: true
160247
160247
  });
160248
- DataSnapshot2.prototype.child = function(path4) {
160249
- var childPath = new Path(path4);
160250
- var childRef = child(this.ref, path4);
160248
+ DataSnapshot2.prototype.child = function(path3) {
160249
+ var childPath = new Path(path3);
160250
+ var childRef = child(this.ref, path3);
160251
160251
  return new DataSnapshot2(this._node.getChild(childPath), childRef, PRIORITY_INDEX);
160252
160252
  };
160253
160253
  DataSnapshot2.prototype.exists = function() {
@@ -160266,8 +160266,8 @@ var require_index_standalone = __commonJS((exports) => {
160266
160266
  return action(new DataSnapshot2(node, child(_this.ref, key2), PRIORITY_INDEX));
160267
160267
  });
160268
160268
  };
160269
- DataSnapshot2.prototype.hasChild = function(path4) {
160270
- var childPath = new Path(path4);
160269
+ DataSnapshot2.prototype.hasChild = function(path3) {
160270
+ var childPath = new Path(path3);
160271
160271
  return !this._node.getChild(childPath).isEmpty();
160272
160272
  };
160273
160273
  DataSnapshot2.prototype.hasChildren = function() {
@@ -160308,9 +160308,9 @@ var require_index_standalone = __commonJS((exports) => {
160308
160308
  };
160309
160309
  }
160310
160310
  };
160311
- ValueEventRegistration2.prototype.createCancelEvent = function(error2, path4) {
160311
+ ValueEventRegistration2.prototype.createCancelEvent = function(error2, path3) {
160312
160312
  if (this.callbackContext.hasCancelCallback) {
160313
- return new CancelEvent(this, error2, path4);
160313
+ return new CancelEvent(this, error2, path3);
160314
160314
  } else {
160315
160315
  return null;
160316
160316
  }
@@ -160339,9 +160339,9 @@ var require_index_standalone = __commonJS((exports) => {
160339
160339
  eventToCheck = eventToCheck === "children_removed" ? "child_removed" : eventToCheck;
160340
160340
  return this.eventType === eventToCheck;
160341
160341
  };
160342
- ChildEventRegistration2.prototype.createCancelEvent = function(error2, path4) {
160342
+ ChildEventRegistration2.prototype.createCancelEvent = function(error2, path3) {
160343
160343
  if (this.callbackContext.hasCancelCallback) {
160344
- return new CancelEvent(this, error2, path4);
160344
+ return new CancelEvent(this, error2, path3);
160345
160345
  } else {
160346
160346
  return null;
160347
160347
  }
@@ -160858,16 +160858,16 @@ var require_index_standalone = __commonJS((exports) => {
160858
160858
  require$$1$3.validateArgCount("DataSnapshot.exists", 0, 0, arguments.length);
160859
160859
  return this._delegate.exists();
160860
160860
  };
160861
- DataSnapshot2.prototype.child = function(path4) {
160861
+ DataSnapshot2.prototype.child = function(path3) {
160862
160862
  require$$1$3.validateArgCount("DataSnapshot.child", 0, 1, arguments.length);
160863
- path4 = String(path4);
160864
- _validatePathString("DataSnapshot.child", "path", path4, false);
160865
- return new DataSnapshot2(this._database, this._delegate.child(path4));
160863
+ path3 = String(path3);
160864
+ _validatePathString("DataSnapshot.child", "path", path3, false);
160865
+ return new DataSnapshot2(this._database, this._delegate.child(path3));
160866
160866
  };
160867
- DataSnapshot2.prototype.hasChild = function(path4) {
160867
+ DataSnapshot2.prototype.hasChild = function(path3) {
160868
160868
  require$$1$3.validateArgCount("DataSnapshot.hasChild", 1, 1, arguments.length);
160869
- _validatePathString("DataSnapshot.hasChild", "path", path4, false);
160870
- return this._delegate.hasChild(path4);
160869
+ _validatePathString("DataSnapshot.hasChild", "path", path3, false);
160870
+ return this._delegate.hasChild(path3);
160871
160871
  };
160872
160872
  DataSnapshot2.prototype.getPriority = function() {
160873
160873
  require$$1$3.validateArgCount("DataSnapshot.getPriority", 0, 0, arguments.length);
@@ -161027,9 +161027,9 @@ var require_index_standalone = __commonJS((exports) => {
161027
161027
  require$$1$3.validateArgCount("Query.limitToLast", 1, 1, arguments.length);
161028
161028
  return new Query2(this.database, query_1(this._delegate, limitToLast_1(limit)));
161029
161029
  };
161030
- Query2.prototype.orderByChild = function(path4) {
161030
+ Query2.prototype.orderByChild = function(path3) {
161031
161031
  require$$1$3.validateArgCount("Query.orderByChild", 1, 1, arguments.length);
161032
- return new Query2(this.database, query_1(this._delegate, orderByChild_1(path4)));
161032
+ return new Query2(this.database, query_1(this._delegate, orderByChild_1(path3)));
161033
161033
  };
161034
161034
  Query2.prototype.orderByKey = function() {
161035
161035
  require$$1$3.validateArgCount("Query.orderByKey", 0, 0, arguments.length);
@@ -161306,13 +161306,13 @@ var require_index_standalone = __commonJS((exports) => {
161306
161306
  }
161307
161307
  connectDatabaseEmulator_1(this._delegate, host, port, options);
161308
161308
  };
161309
- Database2.prototype.ref = function(path4) {
161309
+ Database2.prototype.ref = function(path3) {
161310
161310
  require$$1$3.validateArgCount("database.ref", 0, 1, arguments.length);
161311
- if (path4 instanceof Reference) {
161312
- var childRef = refFromURL_1(this._delegate, path4.toString());
161311
+ if (path3 instanceof Reference) {
161312
+ var childRef = refFromURL_1(this._delegate, path3.toString());
161313
161313
  return new Reference(this, childRef);
161314
161314
  } else {
161315
- var childRef = ref_1(this._delegate, path4);
161315
+ var childRef = ref_1(this._delegate, path3);
161316
161316
  return new Reference(this, childRef);
161317
161317
  }
161318
161318
  };
@@ -161383,7 +161383,7 @@ var require_database = __commonJS((exports) => {
161383
161383
  Object.defineProperty(exports, "__esModule", { value: true });
161384
161384
  exports.DatabaseService = undefined;
161385
161385
  var url_1 = __require("url");
161386
- var path4 = __require("path");
161386
+ var path3 = __require("path");
161387
161387
  var error_1 = require_error();
161388
161388
  var validator = require_validator3();
161389
161389
  var api_request_1 = require_api_request();
@@ -161490,7 +161490,7 @@ var require_database = __commonJS((exports) => {
161490
161490
  const namespace = extractNamespace(parsedUrl);
161491
161491
  parsedUrl = new url_1.URL(`http://${emulatorHost}?ns=${namespace}`);
161492
161492
  }
161493
- parsedUrl.pathname = path4.join(parsedUrl.pathname, RULES_URL_PATH);
161493
+ parsedUrl.pathname = path3.join(parsedUrl.pathname, RULES_URL_PATH);
161494
161494
  this.dbUrl = parsedUrl.toString();
161495
161495
  this.httpClient = new api_request_1.AuthorizedHttpClient(app);
161496
161496
  }
@@ -162210,10 +162210,10 @@ var require_messaging_api_request_internal = __commonJS((exports) => {
162210
162210
  this.http2Client = new api_request_1.AuthorizedHttp2Client(app);
162211
162211
  this.batchClient = new batch_request_internal_1.BatchRequestClient(this.httpClient, FIREBASE_MESSAGING_BATCH_URL, FIREBASE_MESSAGING_HEADERS);
162212
162212
  }
162213
- invokeRequestHandler(host, path4, requestData) {
162213
+ invokeRequestHandler(host, path3, requestData) {
162214
162214
  const request3 = {
162215
162215
  method: FIREBASE_MESSAGING_HTTP_METHOD,
162216
- url: `https://${host}${path4}`,
162216
+ url: `https://${host}${path3}`,
162217
162217
  data: requestData,
162218
162218
  headers: LEGACY_FIREBASE_MESSAGING_HEADERS,
162219
162219
  timeout: FIREBASE_MESSAGING_TIMEOUT
@@ -162234,10 +162234,10 @@ var require_messaging_api_request_internal = __commonJS((exports) => {
162234
162234
  throw err;
162235
162235
  });
162236
162236
  }
162237
- invokeHttpRequestHandlerForSendResponse(host, path4, requestData) {
162237
+ invokeHttpRequestHandlerForSendResponse(host, path3, requestData) {
162238
162238
  const request3 = {
162239
162239
  method: FIREBASE_MESSAGING_HTTP_METHOD,
162240
- url: `https://${host}${path4}`,
162240
+ url: `https://${host}${path3}`,
162241
162241
  data: requestData,
162242
162242
  headers: LEGACY_FIREBASE_MESSAGING_HEADERS,
162243
162243
  timeout: FIREBASE_MESSAGING_TIMEOUT
@@ -162251,10 +162251,10 @@ var require_messaging_api_request_internal = __commonJS((exports) => {
162251
162251
  throw err;
162252
162252
  });
162253
162253
  }
162254
- invokeHttp2RequestHandlerForSendResponse(host, path4, requestData, http2SessionHandler) {
162254
+ invokeHttp2RequestHandlerForSendResponse(host, path3, requestData, http2SessionHandler) {
162255
162255
  const request3 = {
162256
162256
  method: FIREBASE_MESSAGING_HTTP_METHOD,
162257
- url: `https://${host}${path4}`,
162257
+ url: `https://${host}${path3}`,
162258
162258
  data: requestData,
162259
162259
  headers: LEGACY_FIREBASE_MESSAGING_HEADERS,
162260
162260
  timeout: FIREBASE_MESSAGING_TIMEOUT,
@@ -162688,7 +162688,7 @@ var require_messaging = __commonJS((exports) => {
162688
162688
  return this.urlPath;
162689
162689
  });
162690
162690
  }
162691
- sendTopicManagementRequest(registrationTokenOrTokens, topic, methodName, path4) {
162691
+ sendTopicManagementRequest(registrationTokenOrTokens, topic, methodName, path3) {
162692
162692
  this.validateRegistrationTokensType(registrationTokenOrTokens, methodName);
162693
162693
  this.validateTopicType(topic, methodName);
162694
162694
  topic = this.normalizeTopic(topic);
@@ -162703,7 +162703,7 @@ var require_messaging = __commonJS((exports) => {
162703
162703
  to: topic,
162704
162704
  registration_tokens: registrationTokensArray
162705
162705
  };
162706
- return this.messagingRequestHandler.invokeRequestHandler(FCM_TOPIC_MANAGEMENT_HOST, path4, request3);
162706
+ return this.messagingRequestHandler.invokeRequestHandler(FCM_TOPIC_MANAGEMENT_HOST, path3, request3);
162707
162707
  }).then((response4) => {
162708
162708
  return mapRawResponseToTopicManagementResponse(response4);
162709
162709
  });
@@ -163670,14 +163670,14 @@ var require_url_state_machine = __commonJS((exports, module) => {
163670
163670
  return url.replace(/\u0009|\u000A|\u000D/g, "");
163671
163671
  };
163672
163672
  var shortenPath = function(url) {
163673
- const path4 = url.path;
163674
- if (path4.length === 0) {
163673
+ const path3 = url.path;
163674
+ if (path3.length === 0) {
163675
163675
  return;
163676
163676
  }
163677
- if (url.scheme === "file" && path4.length === 1 && isNormalizedWindowsDriveLetter(path4[0])) {
163677
+ if (url.scheme === "file" && path3.length === 1 && isNormalizedWindowsDriveLetter(path3[0])) {
163678
163678
  return;
163679
163679
  }
163680
- path4.pop();
163680
+ path3.pop();
163681
163681
  };
163682
163682
  var includesCredentials = function(url) {
163683
163683
  return url.username !== "" || url.password !== "";
@@ -172142,12 +172142,12 @@ var require_src8 = __commonJS((exports) => {
172142
172142
  var _GoogleToken_requestToken;
172143
172143
  Object.defineProperty(exports, "__esModule", { value: true });
172144
172144
  exports.GoogleToken = undefined;
172145
- var fs7 = __require("fs");
172145
+ var fs6 = __require("fs");
172146
172146
  var gaxios_1 = require_src6();
172147
172147
  var jws = require_jws2();
172148
- var path4 = __require("path");
172148
+ var path3 = __require("path");
172149
172149
  var util_1 = __require("util");
172150
- var readFile = fs7.readFile ? (0, util_1.promisify)(fs7.readFile) : async () => {
172150
+ var readFile = fs6.readFile ? (0, util_1.promisify)(fs6.readFile) : async () => {
172151
172151
  throw new ErrorWithCode("use key rather than keyFile.", "MISSING_CREDENTIALS");
172152
172152
  };
172153
172153
  var GOOGLE_TOKEN_URL = "https://www.googleapis.com/oauth2/v4/token";
@@ -172215,7 +172215,7 @@ var require_src8 = __commonJS((exports) => {
172215
172215
  return __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_getTokenAsync).call(this, opts);
172216
172216
  }
172217
172217
  async getCredentials(keyFile) {
172218
- const ext = path4.extname(keyFile);
172218
+ const ext = path3.extname(keyFile);
172219
172219
  switch (ext) {
172220
172220
  case ".json": {
172221
172221
  const key = await readFile(keyFile, "utf8");
@@ -173823,12 +173823,12 @@ var require_filesubjecttokensupplier = __commonJS((exports) => {
173823
173823
  Object.defineProperty(exports, "__esModule", { value: true });
173824
173824
  exports.FileSubjectTokenSupplier = undefined;
173825
173825
  var util_1 = __require("util");
173826
- var fs7 = __require("fs");
173827
- var readFile = (0, util_1.promisify)((_a = fs7.readFile) !== null && _a !== undefined ? _a : () => {
173826
+ var fs6 = __require("fs");
173827
+ var readFile = (0, util_1.promisify)((_a = fs6.readFile) !== null && _a !== undefined ? _a : () => {
173828
173828
  });
173829
- var realpath = (0, util_1.promisify)((_b = fs7.realpath) !== null && _b !== undefined ? _b : () => {
173829
+ var realpath = (0, util_1.promisify)((_b = fs6.realpath) !== null && _b !== undefined ? _b : () => {
173830
173830
  });
173831
- var lstat = (0, util_1.promisify)((_c = fs7.lstat) !== null && _c !== undefined ? _c : () => {
173831
+ var lstat = (0, util_1.promisify)((_c = fs6.lstat) !== null && _c !== undefined ? _c : () => {
173832
173832
  });
173833
173833
 
173834
173834
  class FileSubjectTokenSupplier {
@@ -174384,7 +174384,7 @@ var require_pluggable_auth_handler = __commonJS((exports) => {
174384
174384
  var pluggable_auth_client_1 = require_pluggable_auth_client();
174385
174385
  var executable_response_1 = require_executable_response();
174386
174386
  var childProcess = __require("child_process");
174387
- var fs7 = __require("fs");
174387
+ var fs6 = __require("fs");
174388
174388
 
174389
174389
  class PluggableAuthHandler {
174390
174390
  constructor(options) {
@@ -174440,14 +174440,14 @@ var require_pluggable_auth_handler = __commonJS((exports) => {
174440
174440
  }
174441
174441
  let filePath;
174442
174442
  try {
174443
- filePath = await fs7.promises.realpath(this.outputFile);
174443
+ filePath = await fs6.promises.realpath(this.outputFile);
174444
174444
  } catch (_a) {
174445
174445
  return;
174446
174446
  }
174447
- if (!(await fs7.promises.lstat(filePath)).isFile()) {
174447
+ if (!(await fs6.promises.lstat(filePath)).isFile()) {
174448
174448
  return;
174449
174449
  }
174450
- const responseString = await fs7.promises.readFile(filePath, {
174450
+ const responseString = await fs6.promises.readFile(filePath, {
174451
174451
  encoding: "utf8"
174452
174452
  });
174453
174453
  if (responseString === "") {
@@ -174774,10 +174774,10 @@ var require_googleauth = __commonJS((exports) => {
174774
174774
  Object.defineProperty(exports, "__esModule", { value: true });
174775
174775
  exports.GoogleAuth = exports.GoogleAuthExceptionMessages = exports.CLOUD_SDK_CLIENT_ID = undefined;
174776
174776
  var child_process_1 = __require("child_process");
174777
- var fs7 = __require("fs");
174777
+ var fs6 = __require("fs");
174778
174778
  var gcpMetadata = require_src7();
174779
174779
  var os = __require("os");
174780
- var path4 = __require("path");
174780
+ var path3 = __require("path");
174781
174781
  var crypto_1 = require_crypto3();
174782
174782
  var transporters_1 = require_transporters();
174783
174783
  var computeclient_1 = require_computeclient();
@@ -174970,12 +174970,12 @@ var require_googleauth = __commonJS((exports) => {
174970
174970
  } else {
174971
174971
  const home = process.env["HOME"];
174972
174972
  if (home) {
174973
- location2 = path4.join(home, ".config");
174973
+ location2 = path3.join(home, ".config");
174974
174974
  }
174975
174975
  }
174976
174976
  if (location2) {
174977
- location2 = path4.join(location2, "gcloud", "application_default_credentials.json");
174978
- if (!fs7.existsSync(location2)) {
174977
+ location2 = path3.join(location2, "gcloud", "application_default_credentials.json");
174978
+ if (!fs6.existsSync(location2)) {
174979
174979
  location2 = null;
174980
174980
  }
174981
174981
  }
@@ -174990,8 +174990,8 @@ var require_googleauth = __commonJS((exports) => {
174990
174990
  throw new Error("The file path is invalid.");
174991
174991
  }
174992
174992
  try {
174993
- filePath = fs7.realpathSync(filePath);
174994
- if (!fs7.lstatSync(filePath).isFile()) {
174993
+ filePath = fs6.realpathSync(filePath);
174994
+ if (!fs6.lstatSync(filePath).isFile()) {
174995
174995
  throw new Error;
174996
174996
  }
174997
174997
  } catch (err) {
@@ -175000,7 +175000,7 @@ var require_googleauth = __commonJS((exports) => {
175000
175000
  }
175001
175001
  throw err;
175002
175002
  }
175003
- const readStream = fs7.createReadStream(filePath);
175003
+ const readStream = fs6.createReadStream(filePath);
175004
175004
  return this.fromStream(readStream, options);
175005
175005
  }
175006
175006
  fromImpersonatedJSON(json2) {
@@ -175295,8 +175295,8 @@ var require_googleauth = __commonJS((exports) => {
175295
175295
  if (this.jsonContent) {
175296
175296
  return this._cacheClientFromJSON(this.jsonContent, this.clientOptions);
175297
175297
  } else if (this.keyFilename) {
175298
- const filePath = path4.resolve(this.keyFilename);
175299
- const stream5 = fs7.createReadStream(filePath);
175298
+ const filePath = path3.resolve(this.keyFilename);
175299
+ const stream5 = fs6.createReadStream(filePath);
175300
175300
  return await this.fromStreamAsync(stream5, this.clientOptions);
175301
175301
  } else if (this.apiKey) {
175302
175302
  const client2 = await this.fromAPIKey(this.apiKey, this.clientOptions);
@@ -179478,7 +179478,7 @@ var require_util6 = __commonJS((exports) => {
179478
179478
  var getModuleFormat = function() {
179479
179479
  return isEsm ? "ESM" : "CJS";
179480
179480
  };
179481
- var __dirname = "/Users/john/Documents/ccci/packages/micro-server/node_modules/@google-cloud/storage/build/cjs/src";
179481
+ var __dirname = "/Users/ariel/work/micro-server/node_modules/@google-cloud/storage/build/cjs/src";
179482
179482
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
179483
179483
  if (k2 === undefined)
179484
179484
  k2 = k;
@@ -179534,7 +179534,7 @@ var require_util6 = __commonJS((exports) => {
179534
179534
  exports.getUserAgentString = getUserAgentString;
179535
179535
  exports.getDirName = getDirName;
179536
179536
  exports.getModuleFormat = getModuleFormat;
179537
- var path4 = __importStar(__require("path"));
179537
+ var path3 = __importStar(__require("path"));
179538
179538
  var querystring = __importStar(__require("querystring"));
179539
179539
  var stream_1 = __require("stream");
179540
179540
  var url = __importStar(__require("url"));
@@ -181286,11 +181286,11 @@ var require_Mime = __commonJS((exports, module) => {
181286
181286
  }
181287
181287
  }
181288
181288
  };
181289
- Mime.prototype.getType = function(path4) {
181290
- path4 = String(path4);
181291
- let last = path4.replace(/^.*[/\\]/, "").toLowerCase();
181289
+ Mime.prototype.getType = function(path3) {
181290
+ path3 = String(path3);
181291
+ let last = path3.replace(/^.*[/\\]/, "").toLowerCase();
181292
181292
  let ext = last.replace(/^.*\./, "").toLowerCase();
181293
- let hasPath = last.length < path4.length;
181293
+ let hasPath = last.length < path3.length;
181294
181294
  let hasDot = ext.length < last.length - 1;
181295
181295
  return (hasDot || !hasPath) && this._types[ext] || null;
181296
181296
  };
@@ -181801,10 +181801,10 @@ var require_acl = __commonJS((exports) => {
181801
181801
  get(optionsOrCallback, cb) {
181802
181802
  const options = typeof optionsOrCallback === "object" ? optionsOrCallback : null;
181803
181803
  const callback = typeof optionsOrCallback === "function" ? optionsOrCallback : cb;
181804
- let path4 = "";
181804
+ let path3 = "";
181805
181805
  const query = {};
181806
181806
  if (options) {
181807
- path4 = "/" + encodeURIComponent(options.entity);
181807
+ path3 = "/" + encodeURIComponent(options.entity);
181808
181808
  if (options.generation) {
181809
181809
  query.generation = options.generation;
181810
181810
  }
@@ -181813,7 +181813,7 @@ var require_acl = __commonJS((exports) => {
181813
181813
  }
181814
181814
  }
181815
181815
  this.request({
181816
- uri: path4,
181816
+ uri: path3,
181817
181817
  qs: query
181818
181818
  }, (err, resp) => {
181819
181819
  if (err) {
@@ -183290,10 +183290,10 @@ var require_signer = __commonJS((exports) => {
183290
183290
  return `${headerName}:${canonicalValue}\n`;
183291
183291
  }).join("");
183292
183292
  }
183293
- getCanonicalRequest(method, path4, query, headers, signedHeaders, contentSha256) {
183293
+ getCanonicalRequest(method, path3, query, headers, signedHeaders, contentSha256) {
183294
183294
  return [
183295
183295
  method,
183296
- path4,
183296
+ path3,
183297
183297
  query,
183298
183298
  headers,
183299
183299
  signedHeaders,
@@ -183880,7 +183880,7 @@ var require_file2 = __commonJS((exports) => {
183880
183880
  var index_js_1 = require_nodejs_common();
183881
183881
  var promisify_1 = require_src16();
183882
183882
  var crypto5 = __importStar(__require("crypto"));
183883
- var fs7 = __importStar(__require("fs"));
183883
+ var fs6 = __importStar(__require("fs"));
183884
183884
  var mime_1 = __importDefault(require_mime2());
183885
183885
  var resumableUpload = __importStar(require_resumable_upload());
183886
183886
  var stream_1 = __require("stream");
@@ -184426,14 +184426,14 @@ var require_file2 = __commonJS((exports) => {
184426
184426
  if (destination) {
184427
184427
  fileStream.on("error", callback).once("data", (data) => {
184428
184428
  receivedData = true;
184429
- const writable = fs7.createWriteStream(destination);
184429
+ const writable = fs6.createWriteStream(destination);
184430
184430
  writable.write(data);
184431
184431
  fileStream.pipe(writable).on("error", callback).on("finish", callback);
184432
184432
  }).on("end", () => {
184433
184433
  if (!receivedData) {
184434
184434
  const data = Buffer.alloc(0);
184435
184435
  try {
184436
- fs7.writeFileSync(destination, data);
184436
+ fs6.writeFileSync(destination, data);
184437
184437
  callback(null, data);
184438
184438
  } catch (e) {
184439
184439
  callback(e, data);
@@ -185231,9 +185231,9 @@ var require_bucket = __commonJS((exports) => {
185231
185231
  var index_js_1 = require_nodejs_common();
185232
185232
  var paginator_1 = require_src17();
185233
185233
  var promisify_1 = require_src16();
185234
- var fs7 = __importStar(__require("fs"));
185234
+ var fs6 = __importStar(__require("fs"));
185235
185235
  var mime_1 = __importDefault(require_mime2());
185236
- var path4 = __importStar(__require("path"));
185236
+ var path3 = __importStar(__require("path"));
185237
185237
  var p_limit_1 = __importDefault(require_p_limit());
185238
185238
  var util_1 = __require("util");
185239
185239
  var async_retry_1 = __importDefault(require_lib16());
@@ -185931,7 +185931,7 @@ var require_bucket = __commonJS((exports) => {
185931
185931
  if (options.onUploadProgress) {
185932
185932
  writable.on("progress", options.onUploadProgress);
185933
185933
  }
185934
- fs7.createReadStream(pathString).on("error", bail).pipe(writable).on("error", (err) => {
185934
+ fs6.createReadStream(pathString).on("error", bail).pipe(writable).on("error", (err) => {
185935
185935
  if (this.storage.retryOptions.autoRetry && this.storage.retryOptions.retryableErrorFn(err)) {
185936
185936
  return reject(err);
185937
185937
  } else {
@@ -185979,7 +185979,7 @@ var require_bucket = __commonJS((exports) => {
185979
185979
  preconditionOpts: this.instancePreconditionOpts
185980
185980
  });
185981
185981
  } else {
185982
- const destination = path4.basename(pathString);
185982
+ const destination = path3.basename(pathString);
185983
185983
  newFile = this.file(destination, {
185984
185984
  encryptionKey: options.encryptionKey,
185985
185985
  kmsKeyName: options.kmsKeyName,
@@ -188097,7 +188097,7 @@ var require_transfer_manager = __commonJS((exports) => {
188097
188097
  exports.TransferManager = exports.MultiPartUploadError = undefined;
188098
188098
  var file_js_1 = require_file2();
188099
188099
  var p_limit_1 = __importDefault(require_p_limit());
188100
- var path4 = __importStar(__require("path"));
188100
+ var path3 = __importStar(__require("path"));
188101
188101
  var fs_1 = __require("fs");
188102
188102
  var crc32c_js_1 = require_crc32c();
188103
188103
  var google_auth_library_1 = require_src9();
@@ -188304,9 +188304,9 @@ var require_transfer_manager = __commonJS((exports) => {
188304
188304
  ...options.passthroughOptions,
188305
188305
  [util_js_1.GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.UPLOAD_MANY
188306
188306
  };
188307
- passThroughOptionsCopy.destination = options.customDestinationBuilder ? options.customDestinationBuilder(filePath, options) : filePath.split(path4.sep).join(path4.posix.sep);
188307
+ passThroughOptionsCopy.destination = options.customDestinationBuilder ? options.customDestinationBuilder(filePath, options) : filePath.split(path3.sep).join(path3.posix.sep);
188308
188308
  if (options.prefix) {
188309
- passThroughOptionsCopy.destination = path4.posix.join(...options.prefix.split(path4.sep), passThroughOptionsCopy.destination);
188309
+ passThroughOptionsCopy.destination = path3.posix.join(...options.prefix.split(path3.sep), passThroughOptionsCopy.destination);
188310
188310
  }
188311
188311
  promises2.push(limit(() => this.bucket.upload(filePath, passThroughOptionsCopy)));
188312
188312
  }
@@ -188337,14 +188337,14 @@ var require_transfer_manager = __commonJS((exports) => {
188337
188337
  [util_js_1.GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.DOWNLOAD_MANY
188338
188338
  };
188339
188339
  if (options.prefix || passThroughOptionsCopy.destination) {
188340
- passThroughOptionsCopy.destination = path4.join(options.prefix || "", passThroughOptionsCopy.destination || "", file.name);
188340
+ passThroughOptionsCopy.destination = path3.join(options.prefix || "", passThroughOptionsCopy.destination || "", file.name);
188341
188341
  }
188342
188342
  if (options.stripPrefix) {
188343
188343
  passThroughOptionsCopy.destination = file.name.replace(regex, "");
188344
188344
  }
188345
188345
  promises2.push(limit(async () => {
188346
188346
  const destination = passThroughOptionsCopy.destination;
188347
- if (destination && destination.endsWith(path4.sep)) {
188347
+ if (destination && destination.endsWith(path3.sep)) {
188348
188348
  await fs_1.promises.mkdir(destination, { recursive: true });
188349
188349
  return Promise.resolve([
188350
188350
  Buffer.alloc(0)
@@ -188368,7 +188368,7 @@ var require_transfer_manager = __commonJS((exports) => {
188368
188368
  chunkSize = size;
188369
188369
  }
188370
188370
  let start = 0;
188371
- const filePath = options.destination || path4.basename(file.name);
188371
+ const filePath = options.destination || path3.basename(file.name);
188372
188372
  const fileToWrite = await fs_1.promises.open(filePath, "w");
188373
188373
  while (start < size) {
188374
188374
  const chunkStart = start;
@@ -188409,7 +188409,7 @@ var require_transfer_manager = __commonJS((exports) => {
188409
188409
  const chunkSize = options.chunkSizeBytes || UPLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE;
188410
188410
  const limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT);
188411
188411
  const maxQueueSize = options.maxQueueSize || options.concurrencyLimit || DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT;
188412
- const fileName = options.uploadName || path4.basename(filePath);
188412
+ const fileName = options.uploadName || path3.basename(filePath);
188413
188413
  const mpuHelper = generator(this.bucket, fileName, options.uploadId, options.partsMap);
188414
188414
  let partNumber = 1;
188415
188415
  let promises2 = [];
@@ -188448,7 +188448,7 @@ var require_transfer_manager = __commonJS((exports) => {
188448
188448
  withFileTypes: true
188449
188449
  });
188450
188450
  for (const curFileOrDirectory of filesAndSubdirectories) {
188451
- const fullPath = path4.join(directory, curFileOrDirectory.name);
188451
+ const fullPath = path3.join(directory, curFileOrDirectory.name);
188452
188452
  curFileOrDirectory.isDirectory() ? yield* this.getPathsFromDirectory(fullPath) : yield fullPath;
188453
188453
  }
188454
188454
  }
@@ -190398,8 +190398,8 @@ var require_fetch2 = __commonJS((exports, module) => {
190398
190398
  options = {};
190399
190399
  if (!callback)
190400
190400
  return asPromise(fetch, this, filename, options);
190401
- if (!options.xhr && fs7 && fs7.readFile)
190402
- return fs7.readFile(filename, function fetchReadFileCallback(err, contents) {
190401
+ if (!options.xhr && fs6 && fs6.readFile)
190402
+ return fs6.readFile(filename, function fetchReadFileCallback(err, contents) {
190403
190403
  return err && typeof XMLHttpRequest !== "undefined" ? fetch.xhr(filename, options, callback) : err ? callback(err) : callback(null, options.binary ? contents : contents.toString("utf8"));
190404
190404
  });
190405
190405
  return fetch.xhr(filename, options, callback);
@@ -190407,7 +190407,7 @@ var require_fetch2 = __commonJS((exports, module) => {
190407
190407
  module.exports = fetch;
190408
190408
  var asPromise = require_aspromise();
190409
190409
  var inquire = require_inquire();
190410
- var fs7 = inquire("fs");
190410
+ var fs6 = inquire("fs");
190411
190411
  fetch.xhr = function fetch_xhr(filename, options, callback) {
190412
190412
  var xhr = new XMLHttpRequest;
190413
190413
  xhr.onreadystatechange = function fetchOnReadyStateChange() {
@@ -190438,13 +190438,13 @@ var require_fetch2 = __commonJS((exports, module) => {
190438
190438
 
190439
190439
  // node_modules/@protobufjs/path/index.js
190440
190440
  var require_path = __commonJS((exports) => {
190441
- var path4 = exports;
190442
- var isAbsolute = path4.isAbsolute = function isAbsolute(path5) {
190443
- return /^(?:\/|\w+:)/.test(path5);
190441
+ var path3 = exports;
190442
+ var isAbsolute = path3.isAbsolute = function isAbsolute(path4) {
190443
+ return /^(?:\/|\w+:)/.test(path4);
190444
190444
  };
190445
- var normalize = path4.normalize = function normalize(path5) {
190446
- path5 = path5.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
190447
- var parts = path5.split("/"), absolute = isAbsolute(path5), prefix = "";
190445
+ var normalize = path3.normalize = function normalize(path4) {
190446
+ path4 = path4.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
190447
+ var parts = path4.split("/"), absolute = isAbsolute(path4), prefix = "";
190448
190448
  if (absolute)
190449
190449
  prefix = parts.shift() + "/";
190450
190450
  for (var i = 0;i < parts.length; ) {
@@ -190462,7 +190462,7 @@ var require_path = __commonJS((exports) => {
190462
190462
  }
190463
190463
  return prefix + parts.join("/");
190464
190464
  };
190465
- path4.resolve = function resolve(originPath, includePath, alreadyNormalized) {
190465
+ path3.resolve = function resolve(originPath, includePath, alreadyNormalized) {
190466
190466
  if (!alreadyNormalized)
190467
190467
  includePath = normalize(includePath);
190468
190468
  if (isAbsolute(includePath))
@@ -190927,16 +190927,16 @@ var require_namespace = __commonJS((exports, module) => {
190927
190927
  object.onRemove(this);
190928
190928
  return clearCache(this);
190929
190929
  };
190930
- Namespace.prototype.define = function define(path4, json2) {
190931
- if (util.isString(path4))
190932
- path4 = path4.split(".");
190933
- else if (!Array.isArray(path4))
190930
+ Namespace.prototype.define = function define(path3, json2) {
190931
+ if (util.isString(path3))
190932
+ path3 = path3.split(".");
190933
+ else if (!Array.isArray(path3))
190934
190934
  throw TypeError("illegal path");
190935
- if (path4 && path4.length && path4[0] === "")
190935
+ if (path3 && path3.length && path3[0] === "")
190936
190936
  throw Error("path must be relative");
190937
190937
  var ptr = this;
190938
- while (path4.length > 0) {
190939
- var part = path4.shift();
190938
+ while (path3.length > 0) {
190939
+ var part = path3.shift();
190940
190940
  if (ptr.nested && ptr.nested[part]) {
190941
190941
  ptr = ptr.nested[part];
190942
190942
  if (!(ptr instanceof Namespace))
@@ -190957,57 +190957,57 @@ var require_namespace = __commonJS((exports, module) => {
190957
190957
  nested[i++].resolve();
190958
190958
  return this.resolve();
190959
190959
  };
190960
- Namespace.prototype.lookup = function lookup(path4, filterTypes, parentAlreadyChecked) {
190960
+ Namespace.prototype.lookup = function lookup(path3, filterTypes, parentAlreadyChecked) {
190961
190961
  if (typeof filterTypes === "boolean") {
190962
190962
  parentAlreadyChecked = filterTypes;
190963
190963
  filterTypes = undefined;
190964
190964
  } else if (filterTypes && !Array.isArray(filterTypes))
190965
190965
  filterTypes = [filterTypes];
190966
- if (util.isString(path4) && path4.length) {
190967
- if (path4 === ".")
190966
+ if (util.isString(path3) && path3.length) {
190967
+ if (path3 === ".")
190968
190968
  return this.root;
190969
- path4 = path4.split(".");
190970
- } else if (!path4.length)
190969
+ path3 = path3.split(".");
190970
+ } else if (!path3.length)
190971
190971
  return this;
190972
- if (path4[0] === "")
190973
- return this.root.lookup(path4.slice(1), filterTypes);
190974
- var found = this.get(path4[0]);
190972
+ if (path3[0] === "")
190973
+ return this.root.lookup(path3.slice(1), filterTypes);
190974
+ var found = this.get(path3[0]);
190975
190975
  if (found) {
190976
- if (path4.length === 1) {
190976
+ if (path3.length === 1) {
190977
190977
  if (!filterTypes || filterTypes.indexOf(found.constructor) > -1)
190978
190978
  return found;
190979
- } else if (found instanceof Namespace && (found = found.lookup(path4.slice(1), filterTypes, true)))
190979
+ } else if (found instanceof Namespace && (found = found.lookup(path3.slice(1), filterTypes, true)))
190980
190980
  return found;
190981
190981
  } else
190982
190982
  for (var i = 0;i < this.nestedArray.length; ++i)
190983
- if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path4, filterTypes, true)))
190983
+ if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path3, filterTypes, true)))
190984
190984
  return found;
190985
190985
  if (this.parent === null || parentAlreadyChecked)
190986
190986
  return null;
190987
- return this.parent.lookup(path4, filterTypes);
190987
+ return this.parent.lookup(path3, filterTypes);
190988
190988
  };
190989
- Namespace.prototype.lookupType = function lookupType(path4) {
190990
- var found = this.lookup(path4, [Type]);
190989
+ Namespace.prototype.lookupType = function lookupType(path3) {
190990
+ var found = this.lookup(path3, [Type]);
190991
190991
  if (!found)
190992
- throw Error("no such type: " + path4);
190992
+ throw Error("no such type: " + path3);
190993
190993
  return found;
190994
190994
  };
190995
- Namespace.prototype.lookupEnum = function lookupEnum(path4) {
190996
- var found = this.lookup(path4, [Enum]);
190995
+ Namespace.prototype.lookupEnum = function lookupEnum(path3) {
190996
+ var found = this.lookup(path3, [Enum]);
190997
190997
  if (!found)
190998
- throw Error("no such Enum '" + path4 + "' in " + this);
190998
+ throw Error("no such Enum '" + path3 + "' in " + this);
190999
190999
  return found;
191000
191000
  };
191001
- Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path4) {
191002
- var found = this.lookup(path4, [Type, Enum]);
191001
+ Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path3) {
191002
+ var found = this.lookup(path3, [Type, Enum]);
191003
191003
  if (!found)
191004
- throw Error("no such Type or Enum '" + path4 + "' in " + this);
191004
+ throw Error("no such Type or Enum '" + path3 + "' in " + this);
191005
191005
  return found;
191006
191006
  };
191007
- Namespace.prototype.lookupService = function lookupService(path4) {
191008
- var found = this.lookup(path4, [Service]);
191007
+ Namespace.prototype.lookupService = function lookupService(path3) {
191008
+ var found = this.lookup(path3, [Service]);
191009
191009
  if (!found)
191010
- throw Error("no such Service '" + path4 + "' in " + this);
191010
+ throw Error("no such Service '" + path3 + "' in " + this);
191011
191011
  return found;
191012
191012
  };
191013
191013
  Namespace._configure = function(Type_, Service_, Enum_) {
@@ -192230,14 +192230,14 @@ var require_util9 = __commonJS((exports, module) => {
192230
192230
  Object.defineProperty(object, "$type", { value: enm, enumerable: false });
192231
192231
  return enm;
192232
192232
  };
192233
- util.setProperty = function setProperty(dst, path4, value) {
192234
- function setProp(dst2, path5, value2) {
192235
- var part = path5.shift();
192233
+ util.setProperty = function setProperty(dst, path3, value) {
192234
+ function setProp(dst2, path4, value2) {
192235
+ var part = path4.shift();
192236
192236
  if (part === "__proto__" || part === "prototype") {
192237
192237
  return dst2;
192238
192238
  }
192239
- if (path5.length > 0) {
192240
- dst2[part] = setProp(dst2[part] || {}, path5, value2);
192239
+ if (path4.length > 0) {
192240
+ dst2[part] = setProp(dst2[part] || {}, path4, value2);
192241
192241
  } else {
192242
192242
  var prevValue = dst2[part];
192243
192243
  if (prevValue)
@@ -192248,10 +192248,10 @@ var require_util9 = __commonJS((exports, module) => {
192248
192248
  }
192249
192249
  if (typeof dst !== "object")
192250
192250
  throw TypeError("dst must be an object");
192251
- if (!path4)
192251
+ if (!path3)
192252
192252
  throw TypeError("path must be specified");
192253
- path4 = path4.split(".");
192254
- return setProp(dst, path4, value);
192253
+ path3 = path3.split(".");
192254
+ return setProp(dst, path3, value);
192255
192255
  };
192256
192256
  Object.defineProperty(util, "decorateRoot", {
192257
192257
  get: function() {
@@ -192290,12 +192290,12 @@ var require_object = __commonJS((exports, module) => {
192290
192290
  },
192291
192291
  fullName: {
192292
192292
  get: function() {
192293
- var path4 = [this.name], ptr = this.parent;
192293
+ var path3 = [this.name], ptr = this.parent;
192294
192294
  while (ptr) {
192295
- path4.unshift(ptr.name);
192295
+ path3.unshift(ptr.name);
192296
192296
  ptr = ptr.parent;
192297
192297
  }
192298
- return path4.join(".");
192298
+ return path3.join(".");
192299
192299
  }
192300
192300
  }
192301
192301
  });
@@ -208664,14 +208664,14 @@ var require_pathTemplate = __commonJS((exports) => {
208664
208664
  this.segments = this.parsePathTemplate(data);
208665
208665
  this.size = this.segments.length;
208666
208666
  }
208667
- match(path4) {
208668
- let pathSegments = path4.split("/");
208667
+ match(path3) {
208668
+ let pathSegments = path3.split("/");
208669
208669
  const bindings = {};
208670
208670
  if (pathSegments.length !== this.segments.length) {
208671
208671
  if (!this.data.includes("**")) {
208672
- throw new TypeError(`This path ${path4} does not match path template ${this.data}, the number of parameters is not same.`);
208672
+ throw new TypeError(`This path ${path3} does not match path template ${this.data}, the number of parameters is not same.`);
208673
208673
  } else if (pathSegments.length !== this.segments.length + 1) {
208674
- throw new TypeError(`This path ${path4} does not match path template ${this.data}, the number of parameters is not same with one wildcard.`);
208674
+ throw new TypeError(`This path ${path3} does not match path template ${this.data}, the number of parameters is not same with one wildcard.`);
208675
208675
  }
208676
208676
  }
208677
208677
  for (let index2 = 0;index2 < this.segments.length && pathSegments.length > 0; index2++) {
@@ -208718,7 +208718,7 @@ var require_pathTemplate = __commonJS((exports) => {
208718
208718
  if (Object.keys(bindings).length !== Object.keys(this.bindings).length) {
208719
208719
  throw new TypeError(`The number of variables ${Object.keys(bindings).length} does not match the number of needed variables ${Object.keys(this.bindings).length}`);
208720
208720
  }
208721
- let path4 = this.inspect();
208721
+ let path3 = this.inspect();
208722
208722
  for (const key of Object.keys(bindings)) {
208723
208723
  const b = bindings[key].toString();
208724
208724
  if (!this.bindings[key]) {
@@ -208729,15 +208729,15 @@ var require_pathTemplate = __commonJS((exports) => {
208729
208729
  if (!b.match(/[^/{}]+/)) {
208730
208730
  throw new TypeError(`render fails for not matching ${b}`);
208731
208731
  }
208732
- path4 = path4.replace(`{${key}=*}`, `${b}`);
208732
+ path3 = path3.replace(`{${key}=*}`, `${b}`);
208733
208733
  } else if (variable === "**") {
208734
208734
  if (!b.match(/[^{}]+/)) {
208735
208735
  throw new TypeError(`render fails for not matching ${b}`);
208736
208736
  }
208737
- path4 = path4.replace(`{${key}=**}`, `${b}`);
208737
+ path3 = path3.replace(`{${key}=**}`, `${b}`);
208738
208738
  }
208739
208739
  }
208740
- return path4;
208740
+ return path3;
208741
208741
  }
208742
208742
  inspect() {
208743
208743
  return this.segments.join("/");
@@ -209862,8 +209862,8 @@ var require_timestamp3 = __commonJS((exports) => {
209862
209862
 
209863
209863
  // node_modules/@google-cloud/firestore/build/src/validate.js
209864
209864
  var require_validate6 = __commonJS((exports) => {
209865
- var customObjectMessage = function(arg, value, path4) {
209866
- const fieldPathMessage = path4 ? ` (found in field "${path4}")` : "";
209865
+ var customObjectMessage = function(arg, value, path3) {
209866
+ const fieldPathMessage = path3 ? ` (found in field "${path3}")` : "";
209867
209867
  if ((0, util_1.isObject)(value)) {
209868
209868
  const typeName = value.constructor.name;
209869
209869
  switch (typeName) {
@@ -210787,8 +210787,8 @@ var require_path2 = __commonJS((exports) => {
210787
210787
  if (elements) {
210788
210788
  const project = elements[1];
210789
210789
  const database = elements[2];
210790
- const path4 = elements[3];
210791
- return new QualifiedResourcePath(project, database).append(path4);
210790
+ const path3 = elements[3];
210791
+ return new QualifiedResourcePath(project, database).append(path3);
210792
210792
  }
210793
210793
  throw new Error(`Resource name '${absolutePath}' is not valid.`);
210794
210794
  }
@@ -210884,20 +210884,20 @@ var require_path2 = __commonJS((exports) => {
210884
210884
 
210885
210885
  // node_modules/@google-cloud/firestore/build/src/serializer.js
210886
210886
  var require_serializer = __commonJS((exports) => {
210887
- var validateUserInput = function(arg, value, desc, options, path4, level, inArray) {
210888
- if (path4 && path4.size - 1 > MAX_DEPTH) {
210887
+ var validateUserInput = function(arg, value, desc, options, path3, level, inArray) {
210888
+ if (path3 && path3.size - 1 > MAX_DEPTH) {
210889
210889
  throw new Error(`${(0, validate_1.invalidArgumentMessage)(arg, desc)} Input object is deeper than ${MAX_DEPTH} levels or contains a cycle.`);
210890
210890
  }
210891
210891
  level = level || 0;
210892
210892
  inArray = inArray || false;
210893
- const fieldPathMessage = path4 ? ` (found in field "${path4}")` : "";
210893
+ const fieldPathMessage = path3 ? ` (found in field "${path3}")` : "";
210894
210894
  if (Array.isArray(value)) {
210895
210895
  for (let i = 0;i < value.length; ++i) {
210896
- validateUserInput(arg, value[i], desc, options, path4 ? path4.append(String(i)) : new path_1.FieldPath(String(i)), level + 1, true);
210896
+ validateUserInput(arg, value[i], desc, options, path3 ? path3.append(String(i)) : new path_1.FieldPath(String(i)), level + 1, true);
210897
210897
  }
210898
210898
  } else if ((0, util_1.isPlainObject)(value)) {
210899
210899
  for (const prop of Object.keys(value)) {
210900
- validateUserInput(arg, value[prop], desc, options, path4 ? path4.append(new path_1.FieldPath(prop)) : new path_1.FieldPath(prop), level + 1, inArray);
210900
+ validateUserInput(arg, value[prop], desc, options, path3 ? path3.append(new path_1.FieldPath(prop)) : new path_1.FieldPath(prop), level + 1, inArray);
210901
210901
  }
210902
210902
  } else if (value === undefined) {
210903
210903
  if (options.allowUndefined && level === 0) {
@@ -210913,7 +210913,7 @@ var require_serializer = __commonJS((exports) => {
210913
210913
  throw new Error(`${(0, validate_1.invalidArgumentMessage)(arg, desc)} ${value.methodName}() must appear at the top-level and can only be used in update() ` + `or set() with {merge:true}${fieldPathMessage}.`);
210914
210914
  } else if (options.allowDeletes === "root") {
210915
210915
  if (level === 0) {
210916
- } else if (level === 1 && (path4 === null || path4 === undefined ? undefined : path4.size) === 1) {
210916
+ } else if (level === 1 && (path3 === null || path3 === undefined ? undefined : path3.size) === 1) {
210917
210917
  } else {
210918
210918
  throw new Error(`${(0, validate_1.invalidArgumentMessage)(arg, desc)} ${value.methodName}() must appear at the top-level and can only be used in update() ` + `or set() with {merge:true}${fieldPathMessage}.`);
210919
210919
  }
@@ -210933,7 +210933,7 @@ var require_serializer = __commonJS((exports) => {
210933
210933
  } else if (value instanceof Buffer || value instanceof Uint8Array) {
210934
210934
  } else if (value === null) {
210935
210935
  } else if (typeof value === "object") {
210936
- throw new Error((0, validate_1.customObjectMessage)(arg, value, path4));
210936
+ throw new Error((0, validate_1.customObjectMessage)(arg, value, path3));
210937
210937
  }
210938
210938
  };
210939
210939
  var isMomentJsType = function(value) {
@@ -210970,7 +210970,7 @@ var require_serializer = __commonJS((exports) => {
210970
210970
 
210971
210971
  class Serializer {
210972
210972
  constructor(firestore) {
210973
- this.createReference = (path4) => firestore.doc(path4);
210973
+ this.createReference = (path3) => firestore.doc(path3);
210974
210974
  this.createInteger = (n) => firestore._settings.useBigInt ? BigInt(n) : Number(n);
210975
210975
  this.allowUndefined = !!firestore._settings.ignoreUndefinedProperties;
210976
210976
  }
@@ -214293,7 +214293,7 @@ var require_tls_helpers = __commonJS((exports) => {
214293
214293
  var getDefaultRootsData = function() {
214294
214294
  if (DEFAULT_ROOTS_FILE_PATH) {
214295
214295
  if (defaultRootsData === null) {
214296
- defaultRootsData = fs7.readFileSync(DEFAULT_ROOTS_FILE_PATH);
214296
+ defaultRootsData = fs6.readFileSync(DEFAULT_ROOTS_FILE_PATH);
214297
214297
  }
214298
214298
  return defaultRootsData;
214299
214299
  }
@@ -214301,7 +214301,7 @@ var require_tls_helpers = __commonJS((exports) => {
214301
214301
  };
214302
214302
  Object.defineProperty(exports, "__esModule", { value: true });
214303
214303
  exports.getDefaultRootsData = exports.CIPHER_SUITES = undefined;
214304
- var fs7 = __require("fs");
214304
+ var fs6 = __require("fs");
214305
214305
  exports.CIPHER_SUITES = process.env.GRPC_SSL_CIPHER_SUITES;
214306
214306
  var DEFAULT_ROOTS_FILE_PATH = process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH;
214307
214307
  var defaultRootsData = null;
@@ -214893,19 +214893,19 @@ var require_uri_parser = __commonJS((exports) => {
214893
214893
  path: parsedUri[3]
214894
214894
  };
214895
214895
  };
214896
- var splitHostPort = function(path4) {
214897
- if (path4.startsWith("[")) {
214898
- const hostEnd = path4.indexOf("]");
214896
+ var splitHostPort = function(path3) {
214897
+ if (path3.startsWith("[")) {
214898
+ const hostEnd = path3.indexOf("]");
214899
214899
  if (hostEnd === -1) {
214900
214900
  return null;
214901
214901
  }
214902
- const host = path4.substring(1, hostEnd);
214902
+ const host = path3.substring(1, hostEnd);
214903
214903
  if (host.indexOf(":") === -1) {
214904
214904
  return null;
214905
214905
  }
214906
- if (path4.length > hostEnd + 1) {
214907
- if (path4[hostEnd + 1] === ":") {
214908
- const portString = path4.substring(hostEnd + 2);
214906
+ if (path3.length > hostEnd + 1) {
214907
+ if (path3[hostEnd + 1] === ":") {
214908
+ const portString = path3.substring(hostEnd + 2);
214909
214909
  if (NUMBER_REGEX.test(portString)) {
214910
214910
  return {
214911
214911
  host,
@@ -214923,7 +214923,7 @@ var require_uri_parser = __commonJS((exports) => {
214923
214923
  };
214924
214924
  }
214925
214925
  } else {
214926
- const splitPath = path4.split(":");
214926
+ const splitPath = path3.split(":");
214927
214927
  if (splitPath.length === 2) {
214928
214928
  if (NUMBER_REGEX.test(splitPath[1])) {
214929
214929
  return {
@@ -214935,7 +214935,7 @@ var require_uri_parser = __commonJS((exports) => {
214935
214935
  }
214936
214936
  } else {
214937
214937
  return {
214938
- host: path4
214938
+ host: path3
214939
214939
  };
214940
214940
  }
214941
214941
  }
@@ -217706,13 +217706,13 @@ var require_util13 = __commonJS((exports) => {
217706
217706
  var addIncludePathResolver = function(root, includePaths) {
217707
217707
  const originalResolvePath = root.resolvePath;
217708
217708
  root.resolvePath = (origin, target) => {
217709
- if (path4.isAbsolute(target)) {
217709
+ if (path3.isAbsolute(target)) {
217710
217710
  return target;
217711
217711
  }
217712
217712
  for (const directory of includePaths) {
217713
- const fullPath = path4.join(directory, target);
217713
+ const fullPath = path3.join(directory, target);
217714
217714
  try {
217715
- fs7.accessSync(fullPath, fs7.constants.R_OK);
217715
+ fs6.accessSync(fullPath, fs6.constants.R_OK);
217716
217716
  return fullPath;
217717
217717
  } catch (err) {
217718
217718
  continue;
@@ -217760,8 +217760,8 @@ var require_util13 = __commonJS((exports) => {
217760
217760
  };
217761
217761
  Object.defineProperty(exports, "__esModule", { value: true });
217762
217762
  exports.addCommonProtos = exports.loadProtosWithOptionsSync = exports.loadProtosWithOptions = undefined;
217763
- var fs7 = __require("fs");
217764
- var path4 = __require("path");
217763
+ var fs6 = __require("fs");
217764
+ var path3 = __require("path");
217765
217765
  var Protobuf = require_src19();
217766
217766
  exports.loadProtosWithOptions = loadProtosWithOptions;
217767
217767
  exports.loadProtosWithOptionsSync = loadProtosWithOptionsSync;
@@ -219571,14 +219571,14 @@ var require_call_interface = __commonJS((exports) => {
219571
219571
 
219572
219572
  // node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/client-interceptors.js
219573
219573
  var require_client_interceptors = __commonJS((exports) => {
219574
- var getCall = function(channel, path4, options) {
219574
+ var getCall = function(channel, path3, options) {
219575
219575
  var _a, _b;
219576
219576
  const deadline = (_a = options.deadline) !== null && _a !== undefined ? _a : Infinity;
219577
219577
  const host = options.host;
219578
219578
  const parent = (_b = options.parent) !== null && _b !== undefined ? _b : null;
219579
219579
  const propagateFlags = options.propagate_flags;
219580
219580
  const credentials = options.credentials;
219581
- const call = channel.createCall(path4, deadline, host, parent, propagateFlags);
219581
+ const call = channel.createCall(path3, deadline, host, parent, propagateFlags);
219582
219582
  if (credentials) {
219583
219583
  call.setCredentials(credentials);
219584
219584
  }
@@ -220330,9 +220330,9 @@ var require_make_client = __commonJS((exports) => {
220330
220330
  ServiceClientImpl.serviceName = serviceName;
220331
220331
  return ServiceClientImpl;
220332
220332
  };
220333
- var partial = function(fn2, path4, serialize, deserialize) {
220333
+ var partial = function(fn2, path3, serialize, deserialize) {
220334
220334
  return function(...args) {
220335
- return fn2.call(this, path4, serialize, deserialize, ...args);
220335
+ return fn2.call(this, path3, serialize, deserialize, ...args);
220336
220336
  };
220337
220337
  };
220338
220338
  var isProtobufTypeDefinition = function(obj) {
@@ -220722,7 +220722,7 @@ var require_channelz = __commonJS((exports) => {
220722
220722
  var setup = function() {
220723
220723
  (0, admin_1.registerAdminService)(getChannelzServiceDefinition, getChannelzHandlers);
220724
220724
  };
220725
- var __dirname = "/Users/john/Documents/ccci/packages/micro-server/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src";
220725
+ var __dirname = "/Users/ariel/work/micro-server/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src";
220726
220726
  Object.defineProperty(exports, "__esModule", { value: true });
220727
220727
  exports.setup = exports.getChannelzServiceDefinition = exports.getChannelzHandlers = exports.unregisterChannelzRef = exports.registerChannelzSocket = exports.registerChannelzServer = exports.registerChannelzSubchannel = exports.registerChannelzChannel = exports.ChannelzCallTrackerStub = exports.ChannelzCallTracker = exports.ChannelzChildrenTrackerStub = exports.ChannelzChildrenTracker = exports.ChannelzTrace = exports.ChannelzTraceStub = undefined;
220728
220728
  var net_1 = __require("net");
@@ -224819,9 +224819,9 @@ var require_server_call = __commonJS((exports) => {
224819
224819
  exports.serverErrorToStatus = serverErrorToStatus;
224820
224820
 
224821
224821
  class ServerUnaryCallImpl extends events_1.EventEmitter {
224822
- constructor(path4, call, metadata, request3) {
224822
+ constructor(path3, call, metadata, request3) {
224823
224823
  super();
224824
- this.path = path4;
224824
+ this.path = path3;
224825
224825
  this.call = call;
224826
224826
  this.metadata = metadata;
224827
224827
  this.request = request3;
@@ -224846,9 +224846,9 @@ var require_server_call = __commonJS((exports) => {
224846
224846
  exports.ServerUnaryCallImpl = ServerUnaryCallImpl;
224847
224847
 
224848
224848
  class ServerReadableStreamImpl extends stream_1.Readable {
224849
- constructor(path4, call, metadata) {
224849
+ constructor(path3, call, metadata) {
224850
224850
  super({ objectMode: true });
224851
- this.path = path4;
224851
+ this.path = path3;
224852
224852
  this.call = call;
224853
224853
  this.metadata = metadata;
224854
224854
  this.cancelled = false;
@@ -224875,9 +224875,9 @@ var require_server_call = __commonJS((exports) => {
224875
224875
  exports.ServerReadableStreamImpl = ServerReadableStreamImpl;
224876
224876
 
224877
224877
  class ServerWritableStreamImpl extends stream_1.Writable {
224878
- constructor(path4, call, metadata, request3) {
224878
+ constructor(path3, call, metadata, request3) {
224879
224879
  super({ objectMode: true });
224880
- this.path = path4;
224880
+ this.path = path3;
224881
224881
  this.call = call;
224882
224882
  this.metadata = metadata;
224883
224883
  this.request = request3;
@@ -224925,9 +224925,9 @@ var require_server_call = __commonJS((exports) => {
224925
224925
  exports.ServerWritableStreamImpl = ServerWritableStreamImpl;
224926
224926
 
224927
224927
  class ServerDuplexStreamImpl extends stream_1.Duplex {
224928
- constructor(path4, call, metadata) {
224928
+ constructor(path3, call, metadata) {
224929
224929
  super({ objectMode: true });
224930
- this.path = path4;
224930
+ this.path = path3;
224931
224931
  this.call = call;
224932
224932
  this.metadata = metadata;
224933
224933
  this.pendingStatus = {
@@ -226830,11 +226830,11 @@ var require_server = __commonJS((exports) => {
226830
226830
  }
226831
226831
  return true;
226832
226832
  }
226833
- _retrieveHandler(path4) {
226834
- this.trace("Received call to method " + path4 + " at address " + this.serverAddressString);
226835
- const handler = this.handlers.get(path4);
226833
+ _retrieveHandler(path3) {
226834
+ this.trace("Received call to method " + path3 + " at address " + this.serverAddressString);
226835
+ const handler = this.handlers.get(path3);
226836
226836
  if (handler === undefined) {
226837
- this.trace("No handler registered for method " + path4 + ". Sending UNIMPLEMENTED status.");
226837
+ this.trace("No handler registered for method " + path3 + ". Sending UNIMPLEMENTED status.");
226838
226838
  return null;
226839
226839
  }
226840
226840
  return handler;
@@ -226856,10 +226856,10 @@ var require_server = __commonJS((exports) => {
226856
226856
  channelzSessionInfo === null || channelzSessionInfo === undefined || channelzSessionInfo.streamTracker.addCallFailed();
226857
226857
  return;
226858
226858
  }
226859
- const path4 = headers[HTTP2_HEADER_PATH];
226860
- const handler = this._retrieveHandler(path4);
226859
+ const path3 = headers[HTTP2_HEADER_PATH];
226860
+ const handler = this._retrieveHandler(path3);
226861
226861
  if (!handler) {
226862
- this._respondWithError(getUnimplementedStatusResponse(path4), stream5, channelzSessionInfo);
226862
+ this._respondWithError(getUnimplementedStatusResponse(path3), stream5, channelzSessionInfo);
226863
226863
  return;
226864
226864
  }
226865
226865
  const callEventTracker = {
@@ -226907,10 +226907,10 @@ var require_server = __commonJS((exports) => {
226907
226907
  if (this._verifyContentType(stream5, headers) !== true) {
226908
226908
  return;
226909
226909
  }
226910
- const path4 = headers[HTTP2_HEADER_PATH];
226911
- const handler = this._retrieveHandler(path4);
226910
+ const path3 = headers[HTTP2_HEADER_PATH];
226911
+ const handler = this._retrieveHandler(path3);
226912
226912
  if (!handler) {
226913
- this._respondWithError(getUnimplementedStatusResponse(path4), stream5, null);
226913
+ this._respondWithError(getUnimplementedStatusResponse(path3), stream5, null);
226914
226914
  return;
226915
226915
  }
226916
226916
  const call = (0, server_interceptors_1.getServerInterceptingCall)([...extraInterceptors, ...this.interceptors], stream5, headers, null, handler, this.options);
@@ -227826,13 +227826,13 @@ var require_resolver_uds = __commonJS((exports) => {
227826
227826
  this.listener = listener;
227827
227827
  this.hasReturnedResult = false;
227828
227828
  this.endpoints = [];
227829
- let path4;
227829
+ let path3;
227830
227830
  if (target.authority === "") {
227831
- path4 = "/" + target.path;
227831
+ path3 = "/" + target.path;
227832
227832
  } else {
227833
- path4 = target.path;
227833
+ path3 = target.path;
227834
227834
  }
227835
- this.endpoints = [{ addresses: [{ path: path4 }] }];
227835
+ this.endpoints = [{ addresses: [{ path: path3 }] }];
227836
227836
  }
227837
227837
  updateResolution() {
227838
227838
  if (!this.hasReturnedResult) {
@@ -227890,12 +227890,12 @@ var require_resolver_ip = __commonJS((exports) => {
227890
227890
  return;
227891
227891
  }
227892
227892
  const pathList = target.path.split(",");
227893
- for (const path4 of pathList) {
227894
- const hostPort = (0, uri_parser_1.splitHostPort)(path4);
227893
+ for (const path3 of pathList) {
227894
+ const hostPort = (0, uri_parser_1.splitHostPort)(path3);
227895
227895
  if (hostPort === null) {
227896
227896
  this.error = {
227897
227897
  code: constants_1.Status.UNAVAILABLE,
227898
- details: `Failed to parse ${target.scheme} address ${path4}`,
227898
+ details: `Failed to parse ${target.scheme} address ${path3}`,
227899
227899
  metadata: new metadata_1.Metadata
227900
227900
  };
227901
227901
  return;
@@ -227903,7 +227903,7 @@ var require_resolver_ip = __commonJS((exports) => {
227903
227903
  if (target.scheme === IPV4_SCHEME && !(0, net_1.isIPv4)(hostPort.host) || target.scheme === IPV6_SCHEME && !(0, net_1.isIPv6)(hostPort.host)) {
227904
227904
  this.error = {
227905
227905
  code: constants_1.Status.UNAVAILABLE,
227906
- details: `Failed to parse ${target.scheme} address ${path4}`,
227906
+ details: `Failed to parse ${target.scheme} address ${path3}`,
227907
227907
  metadata: new metadata_1.Metadata
227908
227908
  };
227909
227909
  return;
@@ -228876,9 +228876,9 @@ var require_protosList = __commonJS((exports, module) => {
228876
228876
 
228877
228877
  // node_modules/google-gax/build/src/grpc.js
228878
228878
  var require_grpc = __commonJS((exports) => {
228879
- async function readFileAsync(path5) {
228879
+ async function readFileAsync(path4) {
228880
228880
  return new Promise((resolve, reject) => {
228881
- fs7.readFile(path5, "utf8", (err, content) => {
228881
+ fs6.readFile(path4, "utf8", (err, content) => {
228882
228882
  if (err)
228883
228883
  return reject(err);
228884
228884
  else
@@ -228896,25 +228896,25 @@ var require_grpc = __commonJS((exports) => {
228896
228896
  });
228897
228897
  });
228898
228898
  }
228899
- var __dirname = "/Users/john/Documents/ccci/packages/micro-server/node_modules/google-gax/build/src";
228899
+ var __dirname = "/Users/ariel/work/micro-server/node_modules/google-gax/build/src";
228900
228900
  Object.defineProperty(exports, "__esModule", { value: true });
228901
228901
  exports.GoogleProtoFilesRoot = exports.GrpcClient = exports.ClientStub = undefined;
228902
228902
  var grpcProtoLoader = require_src21();
228903
228903
  var child_process_1 = __require("child_process");
228904
- var fs7 = __require("fs");
228904
+ var fs6 = __require("fs");
228905
228905
  var google_auth_library_1 = require_src9();
228906
228906
  var grpc = require_src22();
228907
228907
  var os = __require("os");
228908
228908
  var path_1 = __require("path");
228909
- var path4 = __require("path");
228909
+ var path3 = __require("path");
228910
228910
  var protobuf = require_src19();
228911
228911
  var objectHash = require_object_hash();
228912
228912
  var gax = require_gax();
228913
- var googleProtoFilesDir = path4.join(__dirname, "..", "..", "build", "protos");
228913
+ var googleProtoFilesDir = path3.join(__dirname, "..", "..", "build", "protos");
228914
228914
  var INCLUDE_DIRS = [];
228915
228915
  INCLUDE_DIRS.push(googleProtoFilesDir);
228916
228916
  var commonProtoFiles = require_protosList();
228917
- var COMMON_PROTO_FILES = commonProtoFiles.map((file) => file.replace(/[/\\]/g, path4.sep));
228917
+ var COMMON_PROTO_FILES = commonProtoFiles.map((file) => file.replace(/[/\\]/g, path3.sep));
228918
228918
 
228919
228919
  class ClientStub extends grpc.Client {
228920
228920
  }
@@ -228984,8 +228984,8 @@ var require_grpc = __commonJS((exports) => {
228984
228984
  }
228985
228985
  loadProto(protoPath, filename, ignoreCache = false) {
228986
228986
  if (!filename) {
228987
- filename = path4.basename(protoPath);
228988
- protoPath = path4.dirname(protoPath);
228987
+ filename = path3.basename(protoPath);
228988
+ protoPath = path3.dirname(protoPath);
228989
228989
  }
228990
228990
  if (Array.isArray(filename) && filename.length === 0) {
228991
228991
  return {};
@@ -228995,10 +228995,10 @@ var require_grpc = __commonJS((exports) => {
228995
228995
  return this.loadFromProto(filename, options, ignoreCache);
228996
228996
  }
228997
228997
  static _resolveFile(protoPath, filename) {
228998
- if (fs7.existsSync(path4.join(protoPath, filename))) {
228999
- return path4.join(protoPath, filename);
228998
+ if (fs6.existsSync(path3.join(protoPath, filename))) {
228999
+ return path3.join(protoPath, filename);
229000
229000
  } else if (COMMON_PROTO_FILES.indexOf(filename) > -1) {
229001
- return path4.join(googleProtoFilesDir, filename);
229001
+ return path3.join(googleProtoFilesDir, filename);
229002
229002
  }
229003
229003
  throw new Error(filename + " could not be found in " + protoPath);
229004
229004
  }
@@ -229142,32 +229142,32 @@ var require_grpc = __commonJS((exports) => {
229142
229142
  super(...args);
229143
229143
  }
229144
229144
  resolvePath(originPath, includePath) {
229145
- originPath = path4.normalize(originPath);
229146
- includePath = path4.normalize(includePath);
229147
- if (path4.isAbsolute(includePath)) {
229148
- if (!fs7.existsSync(includePath)) {
229145
+ originPath = path3.normalize(originPath);
229146
+ includePath = path3.normalize(includePath);
229147
+ if (path3.isAbsolute(includePath)) {
229148
+ if (!fs6.existsSync(includePath)) {
229149
229149
  throw new Error("The include `" + includePath + "` was not found.");
229150
229150
  }
229151
229151
  return includePath;
229152
229152
  }
229153
229153
  if (COMMON_PROTO_FILES.indexOf(includePath) > -1) {
229154
- return path4.join(googleProtoFilesDir, includePath);
229154
+ return path3.join(googleProtoFilesDir, includePath);
229155
229155
  }
229156
229156
  return GoogleProtoFilesRoot._findIncludePath(originPath, includePath);
229157
229157
  }
229158
229158
  static _findIncludePath(originPath, includePath) {
229159
- originPath = path4.normalize(originPath);
229160
- includePath = path4.normalize(includePath);
229159
+ originPath = path3.normalize(originPath);
229160
+ includePath = path3.normalize(includePath);
229161
229161
  let current = originPath;
229162
- let found = fs7.existsSync(path4.join(current, includePath));
229162
+ let found = fs6.existsSync(path3.join(current, includePath));
229163
229163
  while (!found && current.length > 0) {
229164
- current = current.substring(0, current.lastIndexOf(path4.sep));
229165
- found = fs7.existsSync(path4.join(current, includePath));
229164
+ current = current.substring(0, current.lastIndexOf(path3.sep));
229165
+ found = fs6.existsSync(path3.join(current, includePath));
229166
229166
  }
229167
229167
  if (!found) {
229168
229168
  throw new Error("The include `" + includePath + "` was not found.");
229169
229169
  }
229170
- return path4.join(current, includePath);
229170
+ return path3.join(current, includePath);
229171
229171
  }
229172
229172
  }
229173
229173
  exports.GoogleProtoFilesRoot = GoogleProtoFilesRoot;
@@ -229843,8 +229843,8 @@ var require_query11 = __commonJS((exports) => {
229843
229843
  (0, path_1.validateFieldPath)("fieldPath", fieldPath);
229844
229844
  operator = (0, helpers_1.validateQueryOperator)("opStr", operator, value);
229845
229845
  (0, helpers_1.validateQueryValue)("value", value, this._allowUndefined);
229846
- const path4 = index_1.FieldPath.fromArgument(fieldPath);
229847
- if (index_1.FieldPath.documentId().isEqual(path4)) {
229846
+ const path3 = index_1.FieldPath.fromArgument(fieldPath);
229847
+ if (index_1.FieldPath.documentId().isEqual(path3)) {
229848
229848
  if (operator === "array-contains" || operator === "array-contains-any") {
229849
229849
  throw new Error(`Invalid Query. You can't perform '${operator}' ` + "queries on FieldPath.documentId().");
229850
229850
  } else if (operator === "in" || operator === "not-in") {
@@ -229856,7 +229856,7 @@ var require_query11 = __commonJS((exports) => {
229856
229856
  value = this.validateReference(value);
229857
229857
  }
229858
229858
  }
229859
- return new field_filter_internal_1.FieldFilterInternal(this._serializer, path4, constants_1.comparisonOperators[operator], value);
229859
+ return new field_filter_internal_1.FieldFilterInternal(this._serializer, path3, constants_1.comparisonOperators[operator], value);
229860
229860
  }
229861
229861
  _parseCompositeFilter(compositeFilterData) {
229862
229862
  const parsedFilters = compositeFilterData._getFilters().map((filter) => this._parseFilter(filter)).filter((parsedFilter) => parsedFilter.getFilters().length > 0);
@@ -229993,9 +229993,9 @@ var require_query11 = __commonJS((exports) => {
229993
229993
  const basePath = this._queryOptions.allDescendants ? this._queryOptions.parentPath : this._queryOptions.parentPath.append(this._queryOptions.collectionId);
229994
229994
  let reference;
229995
229995
  if (typeof val2 === "string") {
229996
- const path4 = basePath.append(val2);
229996
+ const path3 = basePath.append(val2);
229997
229997
  if (this._queryOptions.allDescendants) {
229998
- if (!path4.isDocument) {
229998
+ if (!path3.isDocument) {
229999
229999
  throw new Error("When querying a collection group and ordering by FieldPath.documentId(), the corresponding value must result in " + `a valid document path, but '${val2}' is not because it ` + "contains an odd number of segments.");
230000
230000
  }
230001
230001
  } else if (val2.indexOf("/") !== -1) {
@@ -230312,8 +230312,8 @@ var require_collection_reference = __commonJS((exports) => {
230312
230312
  var query_options_1 = require_query_options();
230313
230313
 
230314
230314
  class CollectionReference extends query_1.Query {
230315
- constructor(firestore, path4, converter) {
230316
- super(firestore, query_options_1.QueryOptions.forCollectionQuery(path4, converter));
230315
+ constructor(firestore, path3, converter) {
230316
+ super(firestore, query_options_1.QueryOptions.forCollectionQuery(path3, converter));
230317
230317
  }
230318
230318
  get _resourcePath() {
230319
230319
  return this._queryOptions.parentPath.append(this._queryOptions.collectionId);
@@ -230343,8 +230343,8 @@ var require_collection_reference = __commonJS((exports) => {
230343
230343
  };
230344
230344
  return this.firestore.request("listDocuments", request3, tag).then((documents) => {
230345
230345
  return documents.map((doc) => {
230346
- const path4 = path_1.QualifiedResourcePath.fromSlashSeparatedString(doc.name);
230347
- return this.doc(path4.id);
230346
+ const path3 = path_1.QualifiedResourcePath.fromSlashSeparatedString(doc.name);
230347
+ return this.doc(path3.id);
230348
230348
  });
230349
230349
  });
230350
230350
  });
@@ -230355,11 +230355,11 @@ var require_collection_reference = __commonJS((exports) => {
230355
230355
  } else {
230356
230356
  (0, path_1.validateResourcePath)("documentPath", documentPath);
230357
230357
  }
230358
- const path4 = this._resourcePath.append(documentPath);
230359
- if (!path4.isDocument) {
230358
+ const path3 = this._resourcePath.append(documentPath);
230359
+ if (!path3.isDocument) {
230360
230360
  throw new Error(`Value for argument "documentPath" must point to a document, but was "${documentPath}". Your path does not contain an even number of components.`);
230361
230361
  }
230362
- return new document_reference_1.DocumentReference(this.firestore, path4, this._queryOptions.converter);
230362
+ return new document_reference_1.DocumentReference(this.firestore, path3, this._queryOptions.converter);
230363
230363
  }
230364
230364
  add(data) {
230365
230365
  const firestoreData = this._queryOptions.converter.toFirestore(data);
@@ -230420,11 +230420,11 @@ var require_document_reference = __commonJS((exports) => {
230420
230420
  }
230421
230421
  collection(collectionPath) {
230422
230422
  (0, path_1.validateResourcePath)("collectionPath", collectionPath);
230423
- const path4 = this._path.append(collectionPath);
230424
- if (!path4.isCollection) {
230423
+ const path3 = this._path.append(collectionPath);
230424
+ if (!path3.isCollection) {
230425
230425
  throw new Error(`Value for argument "collectionPath" must point to a collection, but was "${collectionPath}". Your path does not contain an odd number of components.`);
230426
230426
  }
230427
- return new collection_reference_1.CollectionReference(this._firestore, path4);
230427
+ return new collection_reference_1.CollectionReference(this._firestore, path3);
230428
230428
  }
230429
230429
  listCollections() {
230430
230430
  const tag = (0, util_1.requestTag)();
@@ -230549,9 +230549,9 @@ var require_document = __commonJS((exports) => {
230549
230549
  }
230550
230550
  static fromUpdateMap(ref, data) {
230551
230551
  const serializer = ref.firestore._serializer;
230552
- function merge(target, value, path4, pos) {
230553
- const key = path4[pos];
230554
- const isLast = pos === path4.length - 1;
230552
+ function merge(target, value, path3, pos) {
230553
+ const key = path3[pos];
230554
+ const isLast = pos === path3.length - 1;
230555
230555
  if (target[key] === undefined) {
230556
230556
  if (isLast) {
230557
230557
  if (value instanceof field_value_1.FieldTransform) {
@@ -230568,7 +230568,7 @@ var require_document = __commonJS((exports) => {
230568
230568
  fields: {}
230569
230569
  }
230570
230570
  };
230571
- const nestedValue = merge(childNode.mapValue.fields, value, path4, pos + 1);
230571
+ const nestedValue = merge(childNode.mapValue.fields, value, path3, pos + 1);
230572
230572
  if (nestedValue) {
230573
230573
  childNode.mapValue.fields = nestedValue;
230574
230574
  target[key] = childNode;
@@ -230579,14 +230579,14 @@ var require_document = __commonJS((exports) => {
230579
230579
  }
230580
230580
  } else {
230581
230581
  assert(!isLast, "Can't merge current value into a nested object");
230582
- target[key].mapValue.fields = merge(target[key].mapValue.fields, value, path4, pos + 1);
230582
+ target[key].mapValue.fields = merge(target[key].mapValue.fields, value, path3, pos + 1);
230583
230583
  return target;
230584
230584
  }
230585
230585
  }
230586
230586
  const res = {};
230587
230587
  for (const [key, value] of data) {
230588
- const path4 = key.toArray();
230589
- merge(res, value, path4, 0);
230588
+ const path3 = key.toArray();
230589
+ merge(res, value, path3, 0);
230590
230590
  }
230591
230591
  return new DocumentSnapshot(ref, res);
230592
230592
  }
@@ -230835,20 +230835,20 @@ var require_document = __commonJS((exports) => {
230835
230835
  }
230836
230836
  static fromUpdateMap(ref, data) {
230837
230837
  const transforms = new Map;
230838
- function encode_(val2, path4, allowTransforms) {
230838
+ function encode_(val2, path3, allowTransforms) {
230839
230839
  if (val2 instanceof field_value_1.FieldTransform && val2.includeInDocumentTransform) {
230840
230840
  if (allowTransforms) {
230841
- transforms.set(path4, val2);
230841
+ transforms.set(path3, val2);
230842
230842
  } else {
230843
230843
  throw new Error(`${val2.methodName}() is not supported inside of array values.`);
230844
230844
  }
230845
230845
  } else if (Array.isArray(val2)) {
230846
230846
  for (let i = 0;i < val2.length; ++i) {
230847
- encode_(val2[i], path4.append(String(i)), false);
230847
+ encode_(val2[i], path3.append(String(i)), false);
230848
230848
  }
230849
230849
  } else if ((0, util_1.isPlainObject)(val2)) {
230850
230850
  for (const prop of Object.keys(val2)) {
230851
- encode_(val2[prop], path4.append(new path_1.FieldPath(prop)), allowTransforms);
230851
+ encode_(val2[prop], path3.append(new path_1.FieldPath(prop)), allowTransforms);
230852
230852
  }
230853
230853
  }
230854
230854
  }
@@ -230868,7 +230868,7 @@ var require_document = __commonJS((exports) => {
230868
230868
  this.transforms.forEach((transform) => transform.validate(allowUndefined));
230869
230869
  }
230870
230870
  toProto(serializer) {
230871
- return Array.from(this.transforms, ([path4, transform]) => transform.toProto(serializer, path4));
230871
+ return Array.from(this.transforms, ([path3, transform]) => transform.toProto(serializer, path3));
230872
230872
  }
230873
230873
  }
230874
230874
  exports.DocumentTransform = DocumentTransform;
@@ -230966,8 +230966,8 @@ var require_write_batch = __commonJS((exports) => {
230966
230966
  allowUndefined
230967
230967
  });
230968
230968
  };
230969
- var validateFieldValue = function(arg, val2, allowUndefined, path4) {
230970
- (0, serializer_1.validateUserInput)(arg, val2, "Firestore value", { allowDeletes: "root", allowTransforms: true, allowUndefined }, path4);
230969
+ var validateFieldValue = function(arg, val2, allowUndefined, path3) {
230970
+ (0, serializer_1.validateUserInput)(arg, val2, "Firestore value", { allowDeletes: "root", allowTransforms: true, allowUndefined }, path3);
230971
230971
  };
230972
230972
  var validateNoConflictingFields = function(arg, data) {
230973
230973
  const fields = [];
@@ -237567,9 +237567,9 @@ var require_document_reader = __commonJS((exports) => {
237567
237567
  snapshot = this.firestore.snapshot_(response4.missing, response4.readTime);
237568
237568
  }
237569
237569
  if (snapshot) {
237570
- const path4 = snapshot.ref.formattedName;
237571
- this.outstandingDocuments.delete(path4);
237572
- this.retrievedDocuments.set(path4, snapshot);
237570
+ const path3 = snapshot.ref.formattedName;
237571
+ this.outstandingDocuments.delete(path3);
237572
+ this.retrievedDocuments.set(path3, snapshot);
237573
237573
  ++resultCount;
237574
237574
  }
237575
237575
  }
@@ -240880,19 +240880,19 @@ var require_src24 = __commonJS((exports, module) => {
240880
240880
  }
240881
240881
  doc(documentPath) {
240882
240882
  (0, path_1.validateResourcePath)("documentPath", documentPath);
240883
- const path4 = path_1.ResourcePath.EMPTY.append(documentPath);
240884
- if (!path4.isDocument) {
240883
+ const path3 = path_1.ResourcePath.EMPTY.append(documentPath);
240884
+ if (!path3.isDocument) {
240885
240885
  throw new Error(`Value for argument "documentPath" must point to a document, but was "${documentPath}". Your path does not contain an even number of components.`);
240886
240886
  }
240887
- return new document_reference_1.DocumentReference(this, path4);
240887
+ return new document_reference_1.DocumentReference(this, path3);
240888
240888
  }
240889
240889
  collection(collectionPath) {
240890
240890
  (0, path_1.validateResourcePath)("collectionPath", collectionPath);
240891
- const path4 = path_1.ResourcePath.EMPTY.append(collectionPath);
240892
- if (!path4.isCollection) {
240891
+ const path3 = path_1.ResourcePath.EMPTY.append(collectionPath);
240892
+ if (!path3.isCollection) {
240893
240893
  throw new Error(`Value for argument "collectionPath" must point to a collection, but was "${collectionPath}". Your path does not contain an odd number of components.`);
240894
240894
  }
240895
- return new collection_reference_1.CollectionReference(this, path4);
240895
+ return new collection_reference_1.CollectionReference(this, path3);
240896
240896
  }
240897
240897
  collectionGroup(collectionId) {
240898
240898
  if (collectionId.indexOf("/") !== -1) {
@@ -241449,9 +241449,9 @@ var require_installations_request_handler = __commonJS((exports) => {
241449
241449
  return this.invokeRequestHandler(new api_request_1.ApiSettings(fid, "DELETE"));
241450
241450
  }
241451
241451
  invokeRequestHandler(apiSettings) {
241452
- return this.getPathPrefix().then((path4) => {
241452
+ return this.getPathPrefix().then((path3) => {
241453
241453
  const req = {
241454
- url: `https://${this.host}${path4}${apiSettings.getEndpoint()}`,
241454
+ url: `https://${this.host}${path3}${apiSettings.getEndpoint()}`,
241455
241455
  method: apiSettings.getHttpMethod(),
241456
241456
  timeout: this.timeout
241457
241457
  };
@@ -242382,11 +242382,11 @@ var require_project_management_api_request_internal = __commonJS((exports) => {
242382
242382
  });
242383
242383
  });
242384
242384
  }
242385
- invokeRequestHandler(method, path4, requestData, apiVersion = "v1") {
242385
+ invokeRequestHandler(method, path3, requestData, apiVersion = "v1") {
242386
242386
  const baseUrlToUse = apiVersion === "v1" ? this.baseUrl : this.baseBetaUrl;
242387
242387
  const request3 = {
242388
242388
  method,
242389
- url: `${baseUrlToUse}${path4}`,
242389
+ url: `${baseUrlToUse}${path3}`,
242390
242390
  headers: PROJECT_MANAGEMENT_HEADERS,
242391
242391
  data: requestData,
242392
242392
  timeout: PROJECT_MANAGEMENT_TIMEOUT_MILLIS
@@ -243415,14 +243415,14 @@ var require_remote_config_api_client_internal = __commonJS((exports) => {
243415
243415
  });
243416
243416
  }
243417
243417
  sendPutRequest(template, etag, validateOnly) {
243418
- let path4 = "remoteConfig";
243418
+ let path3 = "remoteConfig";
243419
243419
  if (validateOnly) {
243420
- path4 += "?validate_only=true";
243420
+ path3 += "?validate_only=true";
243421
243421
  }
243422
243422
  return this.getUrl().then((url) => {
243423
243423
  const request3 = {
243424
243424
  method: "PUT",
243425
- url: `${url}/${path4}`,
243425
+ url: `${url}/${path3}`,
243426
243426
  headers: { ...FIREBASE_REMOTE_CONFIG_HEADERS, "If-Match": etag },
243427
243427
  data: {
243428
243428
  conditions: template.conditions,
@@ -243695,7 +243695,7 @@ var require_farmhash_modern = __commonJS((exports, module) => {
243695
243695
  }
243696
243696
  return cachedInt32Memory0;
243697
243697
  };
243698
- var __dirname = "/Users/john/Documents/ccci/packages/micro-server/node_modules/farmhash-modern/bin/nodejs";
243698
+ var __dirname = "/Users/ariel/work/micro-server/node_modules/farmhash-modern/bin/nodejs";
243699
243699
  var imports = {};
243700
243700
  imports["__wbindgen_placeholder__"] = exports;
243701
243701
  var wasm;
@@ -243786,8 +243786,8 @@ var require_farmhash_modern = __commonJS((exports, module) => {
243786
243786
  exports.__wbindgen_object_drop_ref = function(arg0) {
243787
243787
  takeObject(arg0);
243788
243788
  };
243789
- var path4 = __require("path").join(__dirname, "farmhash_modern_bg.wasm");
243790
- var bytes = __require("fs").readFileSync(path4);
243789
+ var path3 = __require("path").join(__dirname, "farmhash_modern_bg.wasm");
243790
+ var bytes = __require("fs").readFileSync(path3);
243791
243791
  var wasmModule = new WebAssembly.Module(bytes);
243792
243792
  var wasmInstance = new WebAssembly.Instance(wasmModule, imports);
243793
243793
  wasm = wasmInstance.exports;
@@ -250869,7 +250869,57 @@ class Mailer {
250869
250869
  }
250870
250870
  }
250871
250871
 
250872
- // src/utils/WebsocketServer.ts
250872
+ // src/utils/PushNotifier.ts
250873
+ var import_firebase_admin = __toESM(require_lib18(), 1);
250874
+
250875
+ class PushNotifier {
250876
+ static FirebaseAdmin = import_firebase_admin.default;
250877
+ static instance = 0;
250878
+ static rootDir;
250879
+ constructor(path3) {
250880
+ PushNotifier.rootDir = path3;
250881
+ const configPath = `${PushNotifier.rootDir}/notif.config.ts`;
250882
+ if (!PushNotifier.instance) {
250883
+ import(configPath).then((FirebaseServiceAccount) => {
250884
+ PushNotifier.FirebaseAdmin.initializeApp({
250885
+ credential: import_firebase_admin.default.credential.cert(FirebaseServiceAccount.default)
250886
+ });
250887
+ PushNotifier.instance = PushNotifier.FirebaseAdmin.app.length;
250888
+ });
250889
+ }
250890
+ }
250891
+ static async sendNotifications(tokens, message, metadata = {}, options) {
250892
+ try {
250893
+ let params = [];
250894
+ tokens.forEach((token) => {
250895
+ params.push({
250896
+ token,
250897
+ notification: message,
250898
+ data: metadata
250899
+ });
250900
+ });
250901
+ let result = await PushNotifier.FirebaseAdmin.messaging().sendEach(params);
250902
+ return result;
250903
+ } catch (error) {
250904
+ console.log("error :>> ", error);
250905
+ }
250906
+ }
250907
+ static async sendNotification(token, message, metadata = {}, options) {
250908
+ try {
250909
+ let params = {
250910
+ token,
250911
+ notification: message,
250912
+ data: metadata
250913
+ };
250914
+ let result = await PushNotifier.FirebaseAdmin.messaging().send(params);
250915
+ return result;
250916
+ } catch (error) {
250917
+ console.log("error :>> ", error);
250918
+ }
250919
+ }
250920
+ }
250921
+
250922
+ // src/utils/WebSocketServer.ts
250873
250923
  import fs6 from "node:fs";
250874
250924
  import path3 from "node:path";
250875
250925
  class WebSocketServer {
@@ -250936,56 +250986,6 @@ class WebSocketServer {
250936
250986
  }
250937
250987
  }
250938
250988
 
250939
- // src/utils/PushNotifier.ts
250940
- var import_firebase_admin = __toESM(require_lib18(), 1);
250941
-
250942
- class PushNotifier {
250943
- static FirebaseAdmin = import_firebase_admin.default;
250944
- static instance = 0;
250945
- static rootDir;
250946
- constructor(path4) {
250947
- PushNotifier.rootDir = path4;
250948
- const configPath = `${PushNotifier.rootDir}/notif.config.ts`;
250949
- if (!PushNotifier.instance) {
250950
- import(configPath).then((FirebaseServiceAccount) => {
250951
- PushNotifier.FirebaseAdmin.initializeApp({
250952
- credential: import_firebase_admin.default.credential.cert(FirebaseServiceAccount.default)
250953
- });
250954
- PushNotifier.instance = PushNotifier.FirebaseAdmin.app.length;
250955
- });
250956
- }
250957
- }
250958
- static async sendNotifications(tokens, message, metadata = {}, options) {
250959
- try {
250960
- let params = [];
250961
- tokens.forEach((token) => {
250962
- params.push({
250963
- token,
250964
- notification: message,
250965
- data: metadata
250966
- });
250967
- });
250968
- let result = await PushNotifier.FirebaseAdmin.messaging().sendEach(params);
250969
- return result;
250970
- } catch (error) {
250971
- console.log("error :>> ", error);
250972
- }
250973
- }
250974
- static async sendNotification(token, message, metadata = {}, options) {
250975
- try {
250976
- let params = {
250977
- token,
250978
- notification: message,
250979
- data: metadata
250980
- };
250981
- let result = await PushNotifier.FirebaseAdmin.messaging().send(params);
250982
- return result;
250983
- } catch (error) {
250984
- console.log("error :>> ", error);
250985
- }
250986
- }
250987
- }
250988
-
250989
250989
  // src/utils/ApplicationServer.ts
250990
250990
  class ApplicationServer {
250991
250991
  static app;
@@ -251056,6 +251056,7 @@ class BaseRouter {
251056
251056
  this.archives = this.archives.bind(this);
251057
251057
  this.restore = this.restore.bind(this);
251058
251058
  this.count = this.count.bind(this);
251059
+ this.stats = this.stats.bind(this);
251059
251060
  }
251060
251061
  async get(req, res, next) {
251061
251062
  let response4;
@@ -251137,12 +251138,23 @@ class BaseRouter {
251137
251138
  res.status(422).json(error);
251138
251139
  }
251139
251140
  }
251141
+ async stats(req, res, next) {
251142
+ let response4;
251143
+ try {
251144
+ response4 = await this.controller.stats(req, res, next);
251145
+ res.status(200).json(response4);
251146
+ } catch (error) {
251147
+ Logger.error(error);
251148
+ res.status(422).json(error);
251149
+ }
251150
+ }
251140
251151
  getMapping = () => {
251141
251152
  return [
251142
251153
  { method: GET, path: "/", function: this.get },
251143
251154
  { method: POST, path: "/", function: this.post },
251144
251155
  { method: GET, path: "/archives", function: this.archives },
251145
251156
  { method: GET, path: "/count", function: this.count },
251157
+ { method: GET, path: "/stats", function: this.stats },
251146
251158
  { method: GET, path: "/:id", function: this.getId },
251147
251159
  { method: PUT, path: "/:id", function: this.update },
251148
251160
  { method: DELETE, path: "/:id", function: this.delete },
@@ -251261,6 +251273,9 @@ function ConstructQuery(query) {
251261
251273
  });
251262
251274
  options.includes = includes;
251263
251275
  }
251276
+ if (query.paranoid) {
251277
+ options.paranoid = query.paranoid !== "false";
251278
+ }
251264
251279
  return options;
251265
251280
  }
251266
251281
  var getQueryField = function(field) {
@@ -251490,6 +251505,27 @@ class BaseController {
251490
251505
  throw ErrorResponseHandler(error);
251491
251506
  }
251492
251507
  }
251508
+ async stats(req, res, next) {
251509
+ try {
251510
+ let query = req.query;
251511
+ let options = ConstructQuery(query);
251512
+ let response4 = null;
251513
+ if (!response4 && query.groupBy) {
251514
+ response4 = await this._model?.findAll({
251515
+ where: options.where,
251516
+ attributes: [
251517
+ query.groupBy,
251518
+ [Sequelize.fn("COUNT", Sequelize.col("id")), "count"]
251519
+ ],
251520
+ group: query.groupBy
251521
+ });
251522
+ }
251523
+ return response4;
251524
+ } catch (error) {
251525
+ Logger.error(error);
251526
+ throw ErrorResponseHandler(error);
251527
+ }
251528
+ }
251493
251529
  async beforeCreate(req) {
251494
251530
  }
251495
251531
  async afterCreate(req, rec) {