parse 8.6.0 → 8.6.1-alpha.1

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/parse.min.js CHANGED
@@ -1,7 +1,14 @@
1
1
  (function(t) {
2
2
  "function" == typeof define && define.amd ? define([], t) : t();
3
3
  })((function() {
4
- var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __esmMin = (t, e) => () => (t && (e = t(t = 0)), e), __commonJSMin = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), __exportAll = (t, e) => {
4
+ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __esmMin = (t, e, r) => () => {
5
+ if (r) throw r[0];
6
+ try {
7
+ return t && (e = t(t = 0)), e;
8
+ } catch (t) {
9
+ throw r = [t], t;
10
+ }
11
+ }, __commonJSMin = (t, e) => () => (e || (t((e = { exports: {} }).exports, e), t = null), e.exports), __exportAll = (t, e) => {
5
12
  let r = {};
6
13
  for (var i in t) __defProp(r, i, {
7
14
  get: t[i],
@@ -110,7 +117,7 @@
110
117
  SERVER_URL: "https://api.parse.com/1",
111
118
  LIVEQUERY_SERVER_URL: null,
112
119
  ENCRYPTED_KEY: null,
113
- VERSION: "js8.6.0",
120
+ VERSION: "js8.6.1-alpha.1",
114
121
  APPLICATION_ID: null,
115
122
  JAVASCRIPT_KEY: null,
116
123
  MAINTENANCE_KEY: null,
@@ -3506,7 +3513,9 @@
3506
3513
  var h, u = require_destroy$1(), f = require_state().getHighWaterMark, l = require_errors_browser().codes, c = l.ERR_INVALID_ARG_TYPE, d = l.ERR_METHOD_NOT_IMPLEMENTED, p = l.ERR_MULTIPLE_CALLBACK, m = l.ERR_STREAM_CANNOT_PIPE, g = l.ERR_STREAM_DESTROYED, y = l.ERR_STREAM_NULL_VALUES, b = l.ERR_STREAM_WRITE_AFTER_END, v = l.ERR_UNKNOWN_ENCODING, _ = u.errorOrDestroy;
3507
3514
  function w() {}
3508
3515
  function M(t, e, n) {
3509
- i = i || require__stream_duplex$1(), t = t || {}, "boolean" != typeof n && (n = e instanceof i), this.objectMode = !!t.objectMode, n && (this.objectMode = this.objectMode || !!t.writableObjectMode), this.highWaterMark = f(this, t, "writableHighWaterMark", n), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1, this.decodeStrings = !(!1 === t.decodeStrings), this.defaultEncoding = t.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(t) {
3516
+ i = i || require__stream_duplex$1(), t = t || {}, "boolean" != typeof n && (n = e instanceof i), this.objectMode = !!t.objectMode, n && (this.objectMode = this.objectMode || !!t.writableObjectMode), this.highWaterMark = f(this, t, "writableHighWaterMark", n), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
3517
+ var o = !1 === t.decodeStrings;
3518
+ this.decodeStrings = !o, this.defaultEncoding = t.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(t) {
3510
3519
  (function(t, e) {
3511
3520
  var r = t._writableState, i = r.sync, n = r.writecb;
3512
3521
  if ("function" != typeof n) throw new p();
@@ -4699,7 +4708,9 @@
4699
4708
  if (t = t || {}, this._data) return this._data;
4700
4709
  if ("buffer" === this._source?.format) return this._data = this._source.buffer.toString("base64"), this._data;
4701
4710
  if (!this._url) throw new Error("Cannot retrieve data for unsaved ParseFile.");
4702
- return t.requestTask = (t) => this._requestTask = t, this._data = (await CoreManager.getFileController().download(this._url, t)).base64, this._data;
4711
+ t.requestTask = (t) => this._requestTask = t;
4712
+ const e = await CoreManager.getFileController().download(this._url, t);
4713
+ return this._data = e.base64, this._data;
4703
4714
  }
4704
4715
  name() {
4705
4716
  return this._name;
@@ -8066,7 +8077,8 @@
8066
8077
  return new e(t);
8067
8078
  }, e;
8068
8079
  }, i._cbcInit = function() {
8069
- this._cbcState = new n(this.options.iv);
8080
+ var t = new n(this.options.iv);
8081
+ this._cbcState = t;
8070
8082
  }, i._update = function(t, e, r, i) {
8071
8083
  var n = this._cbcState, o = this.constructor.super_.prototype, s = n.iv;
8072
8084
  if ("encrypt" === this.type) {
@@ -8113,7 +8125,9 @@
8113
8125
  ];
8114
8126
  }
8115
8127
  function a(t) {
8116
- n.call(this, t), this._edeState = new s(this.type, this.options.key);
8128
+ n.call(this, t);
8129
+ var e = new s(this.type, this.options.key);
8130
+ this._edeState = e;
8117
8131
  }
8118
8132
  i(a, n), e.exports = a, a.create = function(t) {
8119
8133
  return new a(t);
@@ -11239,7 +11253,9 @@
11239
11253
  var s = e instanceof n;
11240
11254
  this.objectMode = !!t.objectMode, s && (this.objectMode = this.objectMode || !!t.writableObjectMode);
11241
11255
  var a = t.highWaterMark, h = t.writableHighWaterMark, u = this.objectMode ? 16 : 16384;
11242
- this.highWaterMark = a || 0 === a ? a : s && (h || 0 === h) ? h : u, this.highWaterMark = Math.floor(this.highWaterMark), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1, this.decodeStrings = !(!1 === t.decodeStrings), this.defaultEncoding = t.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(t) {
11256
+ this.highWaterMark = a || 0 === a ? a : s && (h || 0 === h) ? h : u, this.highWaterMark = Math.floor(this.highWaterMark), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
11257
+ var f = !1 === t.decodeStrings;
11258
+ this.decodeStrings = !f, this.defaultEncoding = t.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(t) {
11243
11259
  (function(t, e) {
11244
11260
  var i = t._writableState, n = i.sync, s = i.writecb;
11245
11261
  if (function(t) {
@@ -20540,7 +20556,7 @@
20540
20556
  var r = function() {
20541
20557
  if (e) {
20542
20558
  if ("function" == typeof e.getRandomValues) try {
20543
- return e.getRandomValues(new Uint32Array(1))[0];
20559
+ return e.getRandomValues(/* @__PURE__ */ new Uint32Array(1))[0];
20544
20560
  } catch (t) {}
20545
20561
  if ("function" == typeof e.randomBytes) try {
20546
20562
  return e.randomBytes(4).readInt32LE();
@@ -22791,7 +22807,11 @@
22791
22807
  if ("function" != typeof t) throw new TypeError("A ParseQuery must be constructed with a ParseObject or class name.");
22792
22808
  {
22793
22809
  const e = t;
22794
- "string" == typeof e.className ? this.className = e.className : this.className = new e().className;
22810
+ if ("string" == typeof e.className) this.className = e.className;
22811
+ else {
22812
+ const t = new e();
22813
+ this.className = t.className;
22814
+ }
22795
22815
  }
22796
22816
  }
22797
22817
  this._where = {}, this._watch = [], this._include = [], this._exclude = [], this._count = !1, this._limit = -1, this._skip = 0, this._readPreference = null, this._includeReadPreference = null, this._subqueryReadPreference = null, this._queriesLocalDatastore = !1, this._localDatastorePinName = null, this._extraOptions = {}, this._xhrRequest = {
@@ -23183,16 +23203,16 @@
23183
23203
  return i.subscribePromise.then((() => i));
23184
23204
  }
23185
23205
  static or(...e) {
23186
- const r = new t(_getClassNameFromQueries(e));
23187
- return r._orQuery(e), r;
23206
+ const r = _getClassNameFromQueries(e), i = new t(r);
23207
+ return i._orQuery(e), i;
23188
23208
  }
23189
23209
  static and(...e) {
23190
- const r = new t(_getClassNameFromQueries(e));
23191
- return r._andQuery(e), r;
23210
+ const r = _getClassNameFromQueries(e), i = new t(r);
23211
+ return i._andQuery(e), i;
23192
23212
  }
23193
23213
  static nor(...e) {
23194
- const r = new t(_getClassNameFromQueries(e));
23195
- return r._norQuery(e), r;
23214
+ const r = _getClassNameFromQueries(e), i = new t(r);
23215
+ return i._norQuery(e), i;
23196
23216
  }
23197
23217
  fromNetwork() {
23198
23218
  return this._queriesLocalDatastore = !1, this._localDatastorePinName = null, this;
@@ -24585,7 +24605,7 @@
24585
24605
  t._localId && (o._localId = t._localId), e[r] = o;
24586
24606
  for (const t in e) n.push(t), i.push(this.pinWithName(t, [e[t]]));
24587
24607
  }
24588
- const o = this.fromPinWithName(r), [s] = await Promise.all([o, i]), a = [...new Set([...s || [], ...n])];
24608
+ const o = this.fromPinWithName(r), [s] = await Promise.all([o, i]), a = [.../* @__PURE__ */ new Set([...s || [], ...n])];
24589
24609
  return this.pinWithName(r, a);
24590
24610
  },
24591
24611
  async _handleUnPinAllWithName(t, e) {
@@ -24920,7 +24940,9 @@
24920
24940
  } });
24921
24941
  var LiveQuerySubscription = class {
24922
24942
  constructor(t, e, r, i) {
24923
- this.id = t, this.query = e, this.sessionToken = r, this.client = i, this.subscribePromise = resolvingPromise(), this.unsubscribePromise = resolvingPromise(), this.subscribed = !1, this.emitter = new (CoreManager.getEventEmitter())(), this.on = (t, e) => this.emitter.on(t, e), this.emit = (t, ...e) => this.emitter.emit(t, ...e), this.on("error", (() => {}));
24943
+ this.id = t, this.query = e, this.sessionToken = r, this.client = i, this.subscribePromise = resolvingPromise(), this.unsubscribePromise = resolvingPromise(), this.subscribed = !1;
24944
+ const n = CoreManager.getEventEmitter();
24945
+ this.emitter = new n(), this.on = (t, e) => this.emitter.on(t, e), this.emit = (t, ...e) => this.emitter.emit(t, ...e), this.on("error", (() => {}));
24924
24946
  }
24925
24947
  unsubscribe() {
24926
24948
  return CoreManager.getLiveQueryController().getDefaultLiveQueryClient().then(((t) => (this.emit("close"), t.unsubscribe(this))));
@@ -24974,7 +24996,9 @@
24974
24996
  }, generateInterval = (t) => Math.random() * Math.min(30, Math.pow(2, t) - 1) * 1e3, LiveQueryClient = class {
24975
24997
  constructor({ applicationId: t, serverURL: e, javascriptKey: r, masterKey: i, sessionToken: n, installationId: o }) {
24976
24998
  if (!e || 0 !== e.indexOf("ws")) throw new Error("You need to set a proper Parse LiveQuery server url before using LiveQueryClient");
24977
- this.reconnectHandle = null, this.attempts = 1, this.id = 0, this.requestId = 1, this.serverURL = e, this.applicationId = t, this.javascriptKey = r || void 0, this.masterKey = i || void 0, this.sessionToken = n || void 0, this.installationId = o || void 0, this.additionalProperties = !0, this.connectPromise = resolvingPromise(), this.subscriptions = /* @__PURE__ */ new Map(), this.state = CLIENT_STATE.INITIALIZED, this.emitter = new (CoreManager.getEventEmitter())(), this.on = (t, e) => this.emitter.on(t, e), this.emit = (t, ...e) => this.emitter.emit(t, ...e), this.on("error", (() => {}));
24999
+ this.reconnectHandle = null, this.attempts = 1, this.id = 0, this.requestId = 1, this.serverURL = e, this.applicationId = t, this.javascriptKey = r || void 0, this.masterKey = i || void 0, this.sessionToken = n || void 0, this.installationId = o || void 0, this.additionalProperties = !0, this.connectPromise = resolvingPromise(), this.subscriptions = /* @__PURE__ */ new Map(), this.state = CLIENT_STATE.INITIALIZED;
25000
+ const s = CoreManager.getEventEmitter();
25001
+ this.emitter = new s(), this.on = (t, e) => this.emitter.on(t, e), this.emit = (t, ...e) => this.emitter.emit(t, ...e), this.on("error", (() => {}));
24978
25002
  }
24979
25003
  shouldOpen() {
24980
25004
  return this.state === CLIENT_STATE.INITIALIZED || this.state === CLIENT_STATE.DISCONNECTED;
@@ -25131,7 +25155,8 @@
25131
25155
  }
25132
25156
  var LiveQuery = class {
25133
25157
  constructor() {
25134
- this.emitter = new (CoreManager.getEventEmitter())(), this.on = (t, e) => this.emitter.on(t, e), this.emit = (t, ...e) => this.emitter.emit(t, ...e), this.on("error", (() => {}));
25158
+ const t = CoreManager.getEventEmitter();
25159
+ this.emitter = new t(), this.on = (t, e) => this.emitter.on(t, e), this.emit = (t, ...e) => this.emitter.emit(t, ...e), this.on("error", (() => {}));
25135
25160
  }
25136
25161
  async open() {
25137
25162
  (await getLiveQueryClient()).open();