parse 6.1.1 → 7.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +2 -1
  2. package/dist/parse.js +58626 -26564
  3. package/dist/parse.min.js +1 -14
  4. package/dist/parse.weapp.js +58737 -26628
  5. package/dist/parse.weapp.min.js +1 -14
  6. package/index.js +1 -1
  7. package/lib/browser/CoreManager.js +3 -4
  8. package/lib/browser/ObjectStateMutations.js +51 -9
  9. package/lib/browser/Parse.js +42 -44
  10. package/lib/browser/ParseFile.js +74 -54
  11. package/lib/browser/ParseObject.js +32 -29
  12. package/lib/browser/ParseOp.js +2 -2
  13. package/lib/browser/ParseQuery.js +14 -14
  14. package/lib/browser/RESTController.js +154 -129
  15. package/lib/browser/SingleInstanceStateController.js +28 -27
  16. package/lib/browser/UniqueInstanceStateController.js +19 -23
  17. package/lib/browser/Xhr.weapp.js +62 -102
  18. package/lib/browser/decode.js +8 -1
  19. package/lib/browser/encode.js +9 -1
  20. package/lib/browser/equals.js +1 -1
  21. package/lib/browser/isDangerousKey.js +29 -0
  22. package/lib/browser/uuid.js +6 -2
  23. package/lib/node/CoreManager.js +3 -4
  24. package/lib/node/ObjectStateMutations.js +50 -9
  25. package/lib/node/Parse.js +43 -47
  26. package/lib/node/ParseFile.js +75 -70
  27. package/lib/node/ParseObject.js +29 -28
  28. package/lib/node/RESTController.js +152 -128
  29. package/lib/node/SingleInstanceStateController.js +26 -28
  30. package/lib/node/UniqueInstanceStateController.js +19 -24
  31. package/lib/node/Xhr.weapp.js +58 -81
  32. package/lib/node/decode.js +8 -1
  33. package/lib/node/encode.js +9 -1
  34. package/lib/node/equals.js +1 -1
  35. package/lib/node/isDangerousKey.js +25 -0
  36. package/lib/node/uuid.js +4 -2
  37. package/lib/react-native/CoreManager.js +3 -4
  38. package/lib/react-native/ObjectStateMutations.js +40 -9
  39. package/lib/react-native/Parse.js +25 -37
  40. package/lib/react-native/ParseFile.js +62 -50
  41. package/lib/react-native/ParseObject.js +29 -28
  42. package/lib/react-native/ParseQuery.js +25 -25
  43. package/lib/react-native/RESTController.js +186 -150
  44. package/lib/react-native/SingleInstanceStateController.js +23 -28
  45. package/lib/react-native/UniqueInstanceStateController.js +19 -24
  46. package/lib/react-native/Xhr.weapp.js +63 -95
  47. package/lib/react-native/decode.js +7 -1
  48. package/lib/react-native/encode.js +7 -1
  49. package/lib/react-native/equals.js +1 -1
  50. package/lib/react-native/isDangerousKey.js +17 -0
  51. package/lib/react-native/uuid.js +1 -2
  52. package/lib/weapp/CoreManager.js +3 -4
  53. package/lib/weapp/ObjectStateMutations.js +51 -9
  54. package/lib/weapp/Parse.js +40 -44
  55. package/lib/weapp/ParseFile.js +74 -55
  56. package/lib/weapp/ParseObject.js +32 -29
  57. package/lib/weapp/ParseOp.js +2 -2
  58. package/lib/weapp/ParseQuery.js +14 -14
  59. package/lib/weapp/RESTController.js +155 -130
  60. package/lib/weapp/SingleInstanceStateController.js +28 -27
  61. package/lib/weapp/UniqueInstanceStateController.js +19 -23
  62. package/lib/weapp/Xhr.weapp.js +62 -102
  63. package/lib/weapp/decode.js +8 -1
  64. package/lib/weapp/encode.js +9 -1
  65. package/lib/weapp/equals.js +1 -1
  66. package/lib/weapp/isDangerousKey.js +29 -0
  67. package/lib/weapp/uuid.js +2 -1
  68. package/node.js +1 -1
  69. package/package.json +38 -55
  70. package/react-native.js +1 -1
  71. package/types/Parse.d.ts +16 -10
  72. package/types/ParseFile.d.ts +20 -5
  73. package/types/ParseObject.d.ts +1 -1
  74. package/types/RESTController.d.ts +2 -7
  75. package/types/SingleInstanceStateController.d.ts +3 -3
  76. package/types/Xhr.weapp.d.ts +1 -29
  77. package/types/isDangerousKey.d.ts +7 -0
  78. package/types/tests.ts +2 -0
  79. package/weapp.js +1 -1
@@ -1,29 +1 @@
1
- declare class XhrWeapp {
2
- UNSENT: number;
3
- OPENED: number;
4
- HEADERS_RECEIVED: number;
5
- LOADING: number;
6
- DONE: number;
7
- header: any;
8
- readyState: any;
9
- status: number;
10
- response: string | undefined;
11
- responseType: string;
12
- responseText: string;
13
- responseHeader: any;
14
- method: string;
15
- url: string;
16
- onabort: () => void;
17
- onprogress: () => void;
18
- onerror: () => void;
19
- onreadystatechange: () => void;
20
- requestTask: any;
21
- constructor();
22
- getAllResponseHeaders(): string;
23
- getResponseHeader(key: any): any;
24
- setRequestHeader(key: any, value: any): void;
25
- open(method: any, url: any): void;
26
- abort(): void;
27
- send(data: any): void;
28
- }
29
- export default XhrWeapp;
1
+ export declare function polyfillFetch(): void;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Check if a property name or path is potentially dangerous for prototype pollution
3
+ * Dangerous keys include: __proto__, constructor, prototype
4
+ * @param key - The property name or dotted path to check
5
+ * @returns true if the key is dangerous, false otherwise
6
+ */
7
+ export declare function isDangerousKey(key: string): boolean;
package/types/tests.ts CHANGED
@@ -904,6 +904,7 @@ async function test_cancel_query() {
904
904
  query.cancel();
905
905
  }
906
906
 
907
+ /* eslint-disable @typescript-eslint/no-redundant-type-constituents -- object is intentionally included for testing Exclude<FieldType, object>. */
907
908
  type FieldType =
908
909
  | string
909
910
  | number
@@ -916,6 +917,7 @@ type FieldType =
916
917
  | Parse.Pointer
917
918
  | Parse.Polygon
918
919
  | Parse.Relation;
920
+ /* eslint-enable @typescript-eslint/no-redundant-type-constituents */
919
921
  async function test_schema(
920
922
  anyField: FieldType,
921
923
  notString: Exclude<FieldType, string>,
package/weapp.js CHANGED
@@ -1 +1 @@
1
- module.exports = require('./lib/weapp/Parse.js');
1
+ module.exports = require('./lib/weapp/Parse.js').default;