parse 6.0.0-alpha.1 → 6.0.0-alpha.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.
- package/dist/parse.js +9 -9
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +9 -9
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/ParseHooks.js +7 -7
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/ParseHooks.js +7 -7
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/ParseHooks.js +7 -7
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/ParseHooks.js +7 -7
- package/package.json +1 -1
|
@@ -82,7 +82,7 @@ function remove(hook) {
|
|
|
82
82
|
}
|
|
83
83
|
const DefaultController = {
|
|
84
84
|
get(type, functionName, triggerName) {
|
|
85
|
-
let url = '
|
|
85
|
+
let url = 'hooks/' + type;
|
|
86
86
|
if (functionName) {
|
|
87
87
|
url += '/' + functionName;
|
|
88
88
|
if (triggerName) {
|
|
@@ -94,9 +94,9 @@ const DefaultController = {
|
|
|
94
94
|
create(hook) {
|
|
95
95
|
let url;
|
|
96
96
|
if (hook.functionName && hook.url) {
|
|
97
|
-
url = '
|
|
97
|
+
url = 'hooks/functions';
|
|
98
98
|
} else if (hook.className && hook.triggerName && hook.url) {
|
|
99
|
-
url = '
|
|
99
|
+
url = 'hooks/triggers';
|
|
100
100
|
} else {
|
|
101
101
|
return _promise.default.reject({
|
|
102
102
|
error: 'invalid hook declaration',
|
|
@@ -108,10 +108,10 @@ const DefaultController = {
|
|
|
108
108
|
remove(hook) {
|
|
109
109
|
let url;
|
|
110
110
|
if (hook.functionName) {
|
|
111
|
-
url = '
|
|
111
|
+
url = 'hooks/functions/' + hook.functionName;
|
|
112
112
|
delete hook.functionName;
|
|
113
113
|
} else if (hook.className && hook.triggerName) {
|
|
114
|
-
url = '
|
|
114
|
+
url = 'hooks/triggers/' + hook.className + '/' + hook.triggerName;
|
|
115
115
|
delete hook.className;
|
|
116
116
|
delete hook.triggerName;
|
|
117
117
|
} else {
|
|
@@ -127,10 +127,10 @@ const DefaultController = {
|
|
|
127
127
|
update(hook) {
|
|
128
128
|
let url;
|
|
129
129
|
if (hook.functionName && hook.url) {
|
|
130
|
-
url = '
|
|
130
|
+
url = 'hooks/functions/' + hook.functionName;
|
|
131
131
|
delete hook.functionName;
|
|
132
132
|
} else if (hook.className && hook.triggerName && hook.url) {
|
|
133
|
-
url = '
|
|
133
|
+
url = 'hooks/triggers/' + hook.className + '/' + hook.triggerName;
|
|
134
134
|
delete hook.className;
|
|
135
135
|
delete hook.triggerName;
|
|
136
136
|
} else {
|
package/lib/node/CoreManager.js
CHANGED
package/lib/node/ParseHooks.js
CHANGED
|
@@ -84,7 +84,7 @@ function remove(hook) {
|
|
|
84
84
|
}
|
|
85
85
|
const DefaultController = {
|
|
86
86
|
get(type, functionName, triggerName) {
|
|
87
|
-
let url = '
|
|
87
|
+
let url = 'hooks/' + type;
|
|
88
88
|
if (functionName) {
|
|
89
89
|
url += '/' + functionName;
|
|
90
90
|
if (triggerName) {
|
|
@@ -96,9 +96,9 @@ const DefaultController = {
|
|
|
96
96
|
create(hook) {
|
|
97
97
|
let url;
|
|
98
98
|
if (hook.functionName && hook.url) {
|
|
99
|
-
url = '
|
|
99
|
+
url = 'hooks/functions';
|
|
100
100
|
} else if (hook.className && hook.triggerName && hook.url) {
|
|
101
|
-
url = '
|
|
101
|
+
url = 'hooks/triggers';
|
|
102
102
|
} else {
|
|
103
103
|
return Promise.reject({
|
|
104
104
|
error: 'invalid hook declaration',
|
|
@@ -110,10 +110,10 @@ const DefaultController = {
|
|
|
110
110
|
remove(hook) {
|
|
111
111
|
let url;
|
|
112
112
|
if (hook.functionName) {
|
|
113
|
-
url = '
|
|
113
|
+
url = 'hooks/functions/' + hook.functionName;
|
|
114
114
|
delete hook.functionName;
|
|
115
115
|
} else if (hook.className && hook.triggerName) {
|
|
116
|
-
url = '
|
|
116
|
+
url = 'hooks/triggers/' + hook.className + '/' + hook.triggerName;
|
|
117
117
|
delete hook.className;
|
|
118
118
|
delete hook.triggerName;
|
|
119
119
|
} else {
|
|
@@ -129,10 +129,10 @@ const DefaultController = {
|
|
|
129
129
|
update(hook) {
|
|
130
130
|
let url;
|
|
131
131
|
if (hook.functionName && hook.url) {
|
|
132
|
-
url = '
|
|
132
|
+
url = 'hooks/functions/' + hook.functionName;
|
|
133
133
|
delete hook.functionName;
|
|
134
134
|
} else if (hook.className && hook.triggerName && hook.url) {
|
|
135
|
-
url = '
|
|
135
|
+
url = 'hooks/triggers/' + hook.className + '/' + hook.triggerName;
|
|
136
136
|
delete hook.className;
|
|
137
137
|
delete hook.triggerName;
|
|
138
138
|
} else {
|
|
@@ -78,7 +78,7 @@ function remove(hook) {
|
|
|
78
78
|
}
|
|
79
79
|
var DefaultController = {
|
|
80
80
|
get: function (type, functionName, triggerName) {
|
|
81
|
-
var url = '
|
|
81
|
+
var url = 'hooks/' + type;
|
|
82
82
|
if (functionName) {
|
|
83
83
|
url += '/' + functionName;
|
|
84
84
|
if (triggerName) {
|
|
@@ -90,9 +90,9 @@ var DefaultController = {
|
|
|
90
90
|
create: function (hook) {
|
|
91
91
|
var url;
|
|
92
92
|
if (hook.functionName && hook.url) {
|
|
93
|
-
url = '
|
|
93
|
+
url = 'hooks/functions';
|
|
94
94
|
} else if (hook.className && hook.triggerName && hook.url) {
|
|
95
|
-
url = '
|
|
95
|
+
url = 'hooks/triggers';
|
|
96
96
|
} else {
|
|
97
97
|
return Promise.reject({
|
|
98
98
|
error: 'invalid hook declaration',
|
|
@@ -104,10 +104,10 @@ var DefaultController = {
|
|
|
104
104
|
remove: function (hook) {
|
|
105
105
|
var url;
|
|
106
106
|
if (hook.functionName) {
|
|
107
|
-
url = '
|
|
107
|
+
url = 'hooks/functions/' + hook.functionName;
|
|
108
108
|
delete hook.functionName;
|
|
109
109
|
} else if (hook.className && hook.triggerName) {
|
|
110
|
-
url = '
|
|
110
|
+
url = 'hooks/triggers/' + hook.className + '/' + hook.triggerName;
|
|
111
111
|
delete hook.className;
|
|
112
112
|
delete hook.triggerName;
|
|
113
113
|
} else {
|
|
@@ -123,10 +123,10 @@ var DefaultController = {
|
|
|
123
123
|
update: function (hook) {
|
|
124
124
|
var url;
|
|
125
125
|
if (hook.functionName && hook.url) {
|
|
126
|
-
url = '
|
|
126
|
+
url = 'hooks/functions/' + hook.functionName;
|
|
127
127
|
delete hook.functionName;
|
|
128
128
|
} else if (hook.className && hook.triggerName && hook.url) {
|
|
129
|
-
url = '
|
|
129
|
+
url = 'hooks/triggers/' + hook.className + '/' + hook.triggerName;
|
|
130
130
|
delete hook.className;
|
|
131
131
|
delete hook.triggerName;
|
|
132
132
|
} else {
|
package/lib/weapp/CoreManager.js
CHANGED
package/lib/weapp/ParseHooks.js
CHANGED
|
@@ -82,7 +82,7 @@ function remove(hook) {
|
|
|
82
82
|
}
|
|
83
83
|
const DefaultController = {
|
|
84
84
|
get(type, functionName, triggerName) {
|
|
85
|
-
let url = '
|
|
85
|
+
let url = 'hooks/' + type;
|
|
86
86
|
if (functionName) {
|
|
87
87
|
url += '/' + functionName;
|
|
88
88
|
if (triggerName) {
|
|
@@ -94,9 +94,9 @@ const DefaultController = {
|
|
|
94
94
|
create(hook) {
|
|
95
95
|
let url;
|
|
96
96
|
if (hook.functionName && hook.url) {
|
|
97
|
-
url = '
|
|
97
|
+
url = 'hooks/functions';
|
|
98
98
|
} else if (hook.className && hook.triggerName && hook.url) {
|
|
99
|
-
url = '
|
|
99
|
+
url = 'hooks/triggers';
|
|
100
100
|
} else {
|
|
101
101
|
return _promise.default.reject({
|
|
102
102
|
error: 'invalid hook declaration',
|
|
@@ -108,10 +108,10 @@ const DefaultController = {
|
|
|
108
108
|
remove(hook) {
|
|
109
109
|
let url;
|
|
110
110
|
if (hook.functionName) {
|
|
111
|
-
url = '
|
|
111
|
+
url = 'hooks/functions/' + hook.functionName;
|
|
112
112
|
delete hook.functionName;
|
|
113
113
|
} else if (hook.className && hook.triggerName) {
|
|
114
|
-
url = '
|
|
114
|
+
url = 'hooks/triggers/' + hook.className + '/' + hook.triggerName;
|
|
115
115
|
delete hook.className;
|
|
116
116
|
delete hook.triggerName;
|
|
117
117
|
} else {
|
|
@@ -127,10 +127,10 @@ const DefaultController = {
|
|
|
127
127
|
update(hook) {
|
|
128
128
|
let url;
|
|
129
129
|
if (hook.functionName && hook.url) {
|
|
130
|
-
url = '
|
|
130
|
+
url = 'hooks/functions/' + hook.functionName;
|
|
131
131
|
delete hook.functionName;
|
|
132
132
|
} else if (hook.className && hook.triggerName && hook.url) {
|
|
133
|
-
url = '
|
|
133
|
+
url = 'hooks/triggers/' + hook.className + '/' + hook.triggerName;
|
|
134
134
|
delete hook.className;
|
|
135
135
|
delete hook.triggerName;
|
|
136
136
|
} else {
|