Merge remote-tracking branch 'upstream/alpha' into alpha
This commit is contained in:
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@@ -210,7 +210,11 @@ jobs:
|
|||||||
- run: npm run coverage
|
- run: npm run coverage
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
- run: bash <(curl -s https://codecov.io/bash)
|
- name: Upload code coverage
|
||||||
|
uses: codecov/codecov-action@v4
|
||||||
|
with:
|
||||||
|
fail_ci_if_error: true
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
check-postgres:
|
check-postgres:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -281,7 +285,11 @@ jobs:
|
|||||||
- run: npm run coverage
|
- run: npm run coverage
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
- run: bash <(curl -s https://codecov.io/bash)
|
- name: Upload code coverage
|
||||||
|
uses: codecov/codecov-action@v4
|
||||||
|
with:
|
||||||
|
fail_ci_if_error: true
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
# [7.1.0-alpha.6](https://github.com/parse-community/parse-server/compare/7.1.0-alpha.5...7.1.0-alpha.6) (2024-04-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* `Parse.Cloud.startJob` and `Parse.Push.send` not returning status ID when setting Parse Server option `directAccess: true` ([#8766](https://github.com/parse-community/parse-server/issues/8766)) ([5b0efb2](https://github.com/parse-community/parse-server/commit/5b0efb22efe94c47f243cf8b1e6407ed5c5a67d3))
|
||||||
|
|
||||||
# [7.1.0-alpha.5](https://github.com/parse-community/parse-server/compare/7.1.0-alpha.4...7.1.0-alpha.5) (2024-04-07)
|
# [7.1.0-alpha.5](https://github.com/parse-community/parse-server/compare/7.1.0-alpha.4...7.1.0-alpha.5) (2024-04-07)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "parse-server",
|
"name": "parse-server",
|
||||||
"version": "7.1.0-alpha.5",
|
"version": "7.1.0-alpha.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "parse-server",
|
"name": "parse-server",
|
||||||
"version": "7.1.0-alpha.5",
|
"version": "7.1.0-alpha.6",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "parse-server",
|
"name": "parse-server",
|
||||||
"version": "7.1.0-alpha.5",
|
"version": "7.1.0-alpha.6",
|
||||||
"description": "An express module providing a Parse-compatible API server",
|
"description": "An express module providing a Parse-compatible API server",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@@ -631,4 +631,58 @@ describe('ParseServerRESTController', () => {
|
|||||||
expect(sessions[0].get('installationId')).toBe(installationId);
|
expect(sessions[0].get('installationId')).toBe(installationId);
|
||||||
expect(sessions[0].get('sessionToken')).toBe(loggedUser.sessionToken);
|
expect(sessions[0].get('sessionToken')).toBe(loggedUser.sessionToken);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('returns a statusId when running jobs', async () => {
|
||||||
|
Parse.Cloud.job('CloudJob', () => {
|
||||||
|
return 'Cloud job completed';
|
||||||
|
});
|
||||||
|
const res = await RESTController.request(
|
||||||
|
'POST',
|
||||||
|
'/jobs/CloudJob',
|
||||||
|
{},
|
||||||
|
{ useMasterKey: true, returnStatus: true }
|
||||||
|
);
|
||||||
|
const jobStatusId = res._headers['X-Parse-Job-Status-Id'];
|
||||||
|
expect(jobStatusId).toBeDefined();
|
||||||
|
const result = await Parse.Cloud.getJobStatus(jobStatusId);
|
||||||
|
expect(result.id).toBe(jobStatusId);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('returns a statusId when running push notifications', async () => {
|
||||||
|
const payload = {
|
||||||
|
data: { alert: 'We return status!' },
|
||||||
|
where: { deviceType: 'ios' },
|
||||||
|
};
|
||||||
|
const res = await RESTController.request('POST', '/push', payload, {
|
||||||
|
useMasterKey: true,
|
||||||
|
returnStatus: true,
|
||||||
|
});
|
||||||
|
const pushStatusId = res._headers['X-Parse-Push-Status-Id'];
|
||||||
|
expect(pushStatusId).toBeDefined();
|
||||||
|
|
||||||
|
const result = await Parse.Push.getPushStatus(pushStatusId);
|
||||||
|
expect(result.id).toBe(pushStatusId);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('returns a statusId when running batch push notifications', async () => {
|
||||||
|
const payload = {
|
||||||
|
data: { alert: 'We return status!' },
|
||||||
|
where: { deviceType: 'ios' },
|
||||||
|
};
|
||||||
|
const res = await RESTController.request('POST', 'batch', {
|
||||||
|
requests: [{
|
||||||
|
method: 'POST',
|
||||||
|
path: '/push',
|
||||||
|
body: payload,
|
||||||
|
}],
|
||||||
|
}, {
|
||||||
|
useMasterKey: true,
|
||||||
|
returnStatus: true,
|
||||||
|
});
|
||||||
|
const pushStatusId = res[0]._headers['X-Parse-Push-Status-Id'];
|
||||||
|
expect(pushStatusId).toBeDefined();
|
||||||
|
|
||||||
|
const result = await Parse.Push.getPushStatus(pushStatusId);
|
||||||
|
expect(result.id).toBe(pushStatusId);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -58,8 +58,10 @@ function ParseServerRESTController(applicationId, router) {
|
|||||||
response => {
|
response => {
|
||||||
if (options.returnStatus) {
|
if (options.returnStatus) {
|
||||||
const status = response._status;
|
const status = response._status;
|
||||||
|
const headers = response._headers;
|
||||||
delete response._status;
|
delete response._status;
|
||||||
return { success: response, _status: status };
|
delete response._headers;
|
||||||
|
return { success: response, _status: status, _headers: headers };
|
||||||
}
|
}
|
||||||
return { success: response };
|
return { success: response };
|
||||||
},
|
},
|
||||||
@@ -128,9 +130,9 @@ function ParseServerRESTController(applicationId, router) {
|
|||||||
})
|
})
|
||||||
.then(
|
.then(
|
||||||
resp => {
|
resp => {
|
||||||
const { response, status } = resp;
|
const { response, status, headers = {} } = resp;
|
||||||
if (options.returnStatus) {
|
if (options.returnStatus) {
|
||||||
resolve({ ...response, _status: status });
|
resolve({ ...response, _status: status, _headers: headers });
|
||||||
} else {
|
} else {
|
||||||
resolve(response);
|
resolve(response);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user