mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-07 22:12:53 +00:00
refactor: update dependencies
This commit is contained in:
@@ -113,7 +113,7 @@ export class ConnectorClientSpec {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
method: bulkRoute.method,
|
||||
url: new URL('http://localhost' + bulkRoute.getUrlFragment()),
|
||||
url: new URL('http://localhost' + bulkRoute.getUrlPath()),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ export class ConnectorClientSpec {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
method: bulkRoute.method,
|
||||
url: new URL('http://localhost' + bulkRoute.getUrlFragment()),
|
||||
url: new URL('http://localhost' + bulkRoute.getUrlPath()),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ export class ConnectorClientSpec {
|
||||
|
||||
sandbox.on(httpClient, 'request', async (request: HttpClientRequest)
|
||||
: Promise<HttpClientResponse<responses>> => {
|
||||
if (request.url.toString() === new URL('http://localhost' + bulkRoute.getUrlFragment()).toString()) {
|
||||
if (request.url.toString() === new URL('http://localhost' + bulkRoute.getUrlPath()).toString()) {
|
||||
return {
|
||||
body: {
|
||||
expiration: moment().add(3600, 'seconds').format(),
|
||||
@@ -207,7 +207,7 @@ export class ConnectorClientSpec {
|
||||
headers: {},
|
||||
statusCode: bulkRoute.statusCodeSuccess,
|
||||
};
|
||||
} else if (request.url.toString() === new URL('http://localhost' + bulkAddRoute.getUrlFragment({
|
||||
} else if (request.url.toString() === new URL('http://localhost' + bulkAddRoute.getUrlPath({
|
||||
UID: 'foo',
|
||||
})).toString()) {
|
||||
return {
|
||||
@@ -237,7 +237,7 @@ export class ConnectorClientSpec {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
method: bulkRoute.method,
|
||||
url: new URL('http://localhost' + bulkRoute.getUrlFragment()),
|
||||
url: new URL('http://localhost' + bulkRoute.getUrlPath()),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ export class ConnectorClientSpec {
|
||||
|
||||
sandbox.on(httpClient, 'request', async (request: HttpClientRequest)
|
||||
: Promise<HttpClientResponse<responses>> => {
|
||||
if (request.url.toString() === new URL('http://localhost' + bulkRoute.getUrlFragment()).toString()) {
|
||||
if (request.url.toString() === new URL('http://localhost' + bulkRoute.getUrlPath()).toString()) {
|
||||
return {
|
||||
body: {
|
||||
expiration: moment().add(3600, 'seconds').format(),
|
||||
@@ -302,7 +302,7 @@ export class ConnectorClientSpec {
|
||||
headers: {},
|
||||
statusCode: bulkRoute.statusCodeSuccess,
|
||||
};
|
||||
} else if (request.url.toString() === new URL('http://localhost' + bulkAddRoute.getUrlFragment({
|
||||
} else if (request.url.toString() === new URL('http://localhost' + bulkAddRoute.getUrlPath({
|
||||
UID: 'foo',
|
||||
})).toString()) {
|
||||
return {
|
||||
@@ -332,7 +332,7 @@ export class ConnectorClientSpec {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
method: bulkRoute.method,
|
||||
url: new URL('http://localhost' + bulkRoute.getUrlFragment()),
|
||||
url: new URL('http://localhost' + bulkRoute.getUrlPath()),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -457,7 +457,7 @@ export class ConnectorClientSpec {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
method: thingUpdateRoute.method,
|
||||
url: new URL('http://localhost' + thingUpdateRoute.getUrlFragment({
|
||||
url: new URL('http://localhost' + thingUpdateRoute.getUrlPath({
|
||||
TYPE: SCThingType.Message,
|
||||
UID: 'foo',
|
||||
})),
|
||||
|
||||
@@ -58,7 +58,7 @@ export class CopySpec {
|
||||
type responses = Response<SCBulkAddResponse | SCBulkDoneResponse | SCBulkResponse | SCSearchResponse>;
|
||||
|
||||
sandbox.on(httpClient, 'request', async (request: RequestOptions): Promise<RecursivePartial<responses>> => {
|
||||
if (request.url.toString() === 'http://foo.bar' + searchRoute.getUrlFragment().toString()) {
|
||||
if (request.url.toString() === 'http://foo.bar' + searchRoute.getUrlPath().toString()) {
|
||||
const body = request.body as SCSearchRequest;
|
||||
|
||||
let count = 0;
|
||||
@@ -92,7 +92,7 @@ export class CopySpec {
|
||||
},
|
||||
statusCode: searchRoute.statusCodeSuccess,
|
||||
};
|
||||
} else if (request.url.toString() === 'http://localhost' + bulkRoute.getUrlFragment().toString()) {
|
||||
} else if (request.url.toString() === 'http://localhost' + bulkRoute.getUrlPath().toString()) {
|
||||
return {
|
||||
body: {
|
||||
state: 'in progress',
|
||||
@@ -100,7 +100,7 @@ export class CopySpec {
|
||||
},
|
||||
statusCode: bulkRoute.statusCodeSuccess,
|
||||
};
|
||||
} else if (request.url.toString() === 'http://localhost' + bulkAddRoute.getUrlFragment({
|
||||
} else if (request.url.toString() === 'http://localhost' + bulkAddRoute.getUrlPath({
|
||||
UID: 'foo',
|
||||
}).toString()) {
|
||||
return {
|
||||
@@ -130,7 +130,7 @@ export class CopySpec {
|
||||
type responses = Response<SCBulkAddResponse | SCBulkDoneResponse | SCBulkResponse | SCSearchResponse>;
|
||||
|
||||
sandbox.on(httpClient, 'request', async (request: RequestOptions): Promise<RecursivePartial<responses>> => {
|
||||
if (request.url.toString() === 'http://foo.bar' + searchRoute.getUrlFragment().toString()) {
|
||||
if (request.url.toString() === 'http://foo.bar' + searchRoute.getUrlPath().toString()) {
|
||||
const body = request.body as SCSearchRequest;
|
||||
|
||||
if (typeof body.size === 'number' && body.size > 0) {
|
||||
@@ -163,7 +163,7 @@ export class CopySpec {
|
||||
},
|
||||
statusCode: searchRoute.statusCodeSuccess,
|
||||
};
|
||||
} else if (request.url.toString() === 'http://localhost' + bulkRoute.getUrlFragment().toString()) {
|
||||
} else if (request.url.toString() === 'http://localhost' + bulkRoute.getUrlPath().toString()) {
|
||||
return {
|
||||
body: {
|
||||
state: 'in progress',
|
||||
@@ -171,7 +171,7 @@ export class CopySpec {
|
||||
},
|
||||
statusCode: bulkRoute.statusCodeSuccess,
|
||||
};
|
||||
} else if (request.url.toString() === 'http://localhost' + bulkAddRoute.getUrlFragment({
|
||||
} else if (request.url.toString() === 'http://localhost' + bulkAddRoute.getUrlPath({
|
||||
UID: 'foo',
|
||||
}).toString()) {
|
||||
return {
|
||||
|
||||
@@ -81,7 +81,7 @@ export class E2EConnectorSpec {
|
||||
let failOnLookup = false;
|
||||
|
||||
sandbox.on(httpClient, 'request', async (request: RequestOptions): Promise<RecursivePartial<responses>> => {
|
||||
if (request.url.toString() === `http://localhost${bulkRoute.getUrlFragment().toString()}`) {
|
||||
if (request.url.toString() === `http://localhost${bulkRoute.getUrlPath().toString()}`) {
|
||||
|
||||
return {
|
||||
body: {
|
||||
@@ -92,7 +92,7 @@ export class E2EConnectorSpec {
|
||||
};
|
||||
}
|
||||
|
||||
if (request.url.toString() === `http://localhost${bulkAddRoute.getUrlFragment({UID: 'foo'}).toString()}`) {
|
||||
if (request.url.toString() === `http://localhost${bulkAddRoute.getUrlPath({UID: 'foo'}).toString()}`) {
|
||||
storedThings.set(request.body.uid, clone(request.body));
|
||||
|
||||
return {
|
||||
@@ -101,14 +101,14 @@ export class E2EConnectorSpec {
|
||||
};
|
||||
}
|
||||
|
||||
if (request.url.toString() === `http://localhost${bulkDoneRoute.getUrlFragment({UID: 'foo'}).toString()}`) {
|
||||
if (request.url.toString() === `http://localhost${bulkDoneRoute.getUrlPath({UID: 'foo'}).toString()}`) {
|
||||
return {
|
||||
body: {},
|
||||
statusCode: bulkDoneRoute.statusCodeSuccess,
|
||||
};
|
||||
}
|
||||
|
||||
if (request.url.toString() === `http://localhost${searchRoute.getUrlFragment().toString()}`) {
|
||||
if (request.url.toString() === `http://localhost${searchRoute.getUrlPath().toString()}`) {
|
||||
const thing = storedThings.get(request.body.filter.arguments.value);
|
||||
if (failOnCompare) {
|
||||
thing!.origin!.modified = 'altered';
|
||||
|
||||
@@ -81,7 +81,7 @@ export class PluginClientSpec {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
method: pluginRegisterRoute.method,
|
||||
url: new URL(`http://localhost${pluginRegisterRoute.getUrlFragment()}`),
|
||||
url: new URL(`http://localhost${pluginRegisterRoute.getUrlPath()}`),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ export class PluginClientSpec {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
method: pluginRegisterRoute.method,
|
||||
url: new URL(`http://localhost${pluginRegisterRoute.getUrlFragment()}`),
|
||||
url: new URL(`http://localhost${pluginRegisterRoute.getUrlPath()}`),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user