parse 4.2.0-alpha.4 → 4.2.0-alpha.6

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.
@@ -17,7 +17,7 @@ var _ParseCLP = _interopRequireDefault(require("./ParseCLP"));
17
17
  * @flow
18
18
  */
19
19
  /*:: import type { PermissionsMap } from './ParseCLP';*/
20
- var FIELD_TYPES = ['String', 'Number', 'Boolean', 'Date', 'File', 'GeoPoint', 'Polygon', 'Array', 'Object', 'Pointer', 'Relation'];
20
+ var FIELD_TYPES = ['String', 'Number', 'Boolean', 'Bytes', 'Date', 'File', 'GeoPoint', 'Polygon', 'Array', 'Object', 'Pointer', 'Relation'];
21
21
  /*:: type FieldOptions = {
22
22
  required: boolean,
23
23
  defaultValue: mixed,
@@ -236,6 +236,14 @@ var ParseSchema = /*#__PURE__*/function () {
236
236
  };
237
237
  }
238
238
  }
239
+ if (type === 'Bytes') {
240
+ if (options && options.defaultValue) {
241
+ fieldOptions.defaultValue = {
242
+ __type: 'Bytes',
243
+ base64: options.defaultValue
244
+ };
245
+ }
246
+ }
239
247
  this._fields[name] = fieldOptions;
240
248
  return this;
241
249
  }
@@ -303,6 +311,19 @@ var ParseSchema = /*#__PURE__*/function () {
303
311
  return this.addField(name, 'Boolean', options);
304
312
  }
305
313
 
314
+ /**
315
+ * Adding Bytes Field
316
+ *
317
+ * @param {string} name Name of the field that will be created on Parse
318
+ * @param {object} options See {@link https://parseplatform.org/Parse-SDK-JS/api/master/Parse.Schema.html#addField addField}
319
+ * @returns {Parse.Schema} Returns the schema, so you can chain this call.
320
+ */
321
+ }, {
322
+ key: "addBytes",
323
+ value: function (name /*: string*/, options /*: FieldOptions*/) {
324
+ return this.addField(name, 'Bytes', options);
325
+ }
326
+
306
327
  /**
307
328
  * Adding Date Field
308
329
  *
@@ -42,11 +42,7 @@ function _isNativeReflectConstruct() {
42
42
  } catch (e) {
43
43
  return false;
44
44
  }
45
- } /**
46
- * @flow
47
- */
48
- /*:: import type { AttributeMap } from './ObjectStateMutations';*/
49
- /*:: import type { RequestOptions, FullOptions } from './RESTController';*/
45
+ }
50
46
  /**
51
47
  * <p>A Parse.Session object is a local representation of a revocable session.
52
48
  * This class is a subclass of a Parse.Object, and retains the same
@@ -61,7 +57,7 @@ var ParseSession = /*#__PURE__*/function (_ParseObject) {
61
57
  /**
62
58
  * @param {object} attributes The initial set of data to store in the user.
63
59
  */
64
- function ParseSession(attributes /*: ?AttributeMap*/) {
60
+ function ParseSession(attributes /*:: ?: any*/) {
65
61
  var _this;
66
62
  (0, _classCallCheck2.default)(this, ParseSession);
67
63
  _this = _super.call(this, '_Session');
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
3
4
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
5
+ _Object$defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
4
9
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
5
10
  var _CoreManager = _interopRequireDefault(require("./CoreManager"));
6
11
  /**
@@ -88,4 +93,6 @@ var Storage = {
88
93
  }
89
94
  };
90
95
  module.exports = Storage;
96
+ var _default = Storage;
97
+ exports.default = _default;
91
98
  _CoreManager.default.setStorageController(require('./StorageController.weapp'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parse",
3
- "version": "4.2.0-alpha.4",
3
+ "version": "4.2.0-alpha.6",
4
4
  "description": "Parse JavaScript SDK",
5
5
  "homepage": "https://parseplatform.org",
6
6
  "keywords": [
@@ -29,7 +29,7 @@
29
29
  "react-native": false
30
30
  },
31
31
  "dependencies": {
32
- "@babel/runtime-corejs3": "7.22.3",
32
+ "@babel/runtime-corejs3": "7.22.6",
33
33
  "idb-keyval": "6.2.1",
34
34
  "react-native-crypto-js": "1.0.0",
35
35
  "uuid": "9.0.0",
@@ -40,11 +40,13 @@
40
40
  "@babel/core": "7.22.0",
41
41
  "@babel/eslint-parser": "7.21.8",
42
42
  "@babel/plugin-proposal-class-properties": "7.18.6",
43
- "@babel/plugin-transform-flow-comments": "7.21.0",
43
+ "@babel/plugin-transform-flow-comments": "7.22.5",
44
44
  "@babel/plugin-transform-flow-strip-types": "7.21.0",
45
45
  "@babel/plugin-transform-runtime": "7.21.4",
46
46
  "@babel/preset-env": "7.21.5",
47
- "@babel/preset-react": "7.18.6",
47
+ "@babel/preset-react": "7.22.5",
48
+ "@babel/preset-typescript": "7.22.5",
49
+ "@definitelytyped/dtslint": "0.0.163",
48
50
  "@parse/minami": "1.0.0",
49
51
  "@saithodev/semantic-release-backmerge": "2.1.3",
50
52
  "@semantic-release/changelog": "6.0.3",
@@ -82,7 +84,7 @@
82
84
  "jsdoc-babel": "0.5.0",
83
85
  "lint-staged": "13.2.2",
84
86
  "metro-react-native-babel-preset": "0.76.4",
85
- "mongodb-runner": "4.10.0",
87
+ "mongodb-runner": "5.4.3",
86
88
  "parse-server": "git+https://github.com/parse-community/parse-server#alpha",
87
89
  "prettier": "2.8.8",
88
90
  "puppeteer": "20.4.0",
@@ -95,11 +97,13 @@
95
97
  },
96
98
  "scripts": {
97
99
  "build": "node build_releases.js",
100
+ "build:types": "tsc",
98
101
  "release": "node build_releases.js && npm publish",
99
102
  "test": "cross-env PARSE_BUILD=node jest",
100
103
  "test:mongodb": "npm run test:mongodb:runnerstart && npm run integration",
101
- "test:mongodb:runnerstart": "mongodb-runner start",
102
- "posttest:mongodb": "mongodb-runner stop",
104
+ "test:mongodb:runnerstart": "mongodb-runner start -- --port 27017",
105
+ "test:types": "dtslint --expectOnly types",
106
+ "posttest:mongodb": "mongodb-runner stop --all",
103
107
  "lint": "eslint --cache src/ integration/",
104
108
  "lint:fix": "eslint --fix --cache src/ integration/",
105
109
  "watch": "cross-env PARSE_BUILD=${PARSE_BUILD} gulp watch",