@dhis2/app-service-data
Advanced tools
Comparing version 2.7.1 to 2.8.0
@@ -41,3 +41,3 @@ "use strict"; | ||
}) { | ||
return this.fetch((0, _queryToResourcePath.queryToResourcePath)(this.apiPath, query), (0, _queryToRequestOptions.queryToRequestOptions)(type, query, signal)); | ||
return this.fetch((0, _queryToResourcePath.queryToResourcePath)(this.apiPath, query, type), (0, _queryToRequestOptions.queryToRequestOptions)(type, query, signal)); | ||
} | ||
@@ -44,0 +44,0 @@ |
@@ -10,2 +10,4 @@ "use strict"; | ||
var _validateQuery = require("./validateQuery"); | ||
const encodeQueryParameter = param => { | ||
@@ -65,8 +67,10 @@ if (Array.isArray(param)) { | ||
const queryToResourcePath = (apiPath, { | ||
resource, | ||
id, | ||
params = {} | ||
}) => { | ||
const queryToResourcePath = (apiPath, query, type) => { | ||
const { | ||
resource, | ||
id, | ||
params = {} | ||
} = query; | ||
const base = isAction(resource) ? makeActionPath(resource) : (0, _path.joinPath)(apiPath, resource, id); | ||
(0, _validateQuery.validateResourceQuery)(query, type); | ||
@@ -73,0 +77,0 @@ if (Object.keys(params).length) { |
@@ -30,5 +30,5 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
}) { | ||
return this.fetch(queryToResourcePath(this.apiPath, query), queryToRequestOptions(type, query, signal)); | ||
return this.fetch(queryToResourcePath(this.apiPath, query, type), queryToRequestOptions(type, query, signal)); | ||
} | ||
} |
import { joinPath } from './path'; | ||
import { validateResourceQuery } from './validateQuery'; | ||
@@ -57,8 +58,10 @@ const encodeQueryParameter = param => { | ||
export const queryToResourcePath = (apiPath, { | ||
resource, | ||
id, | ||
params = {} | ||
}) => { | ||
export const queryToResourcePath = (apiPath, query, type) => { | ||
const { | ||
resource, | ||
id, | ||
params = {} | ||
} = query; | ||
const base = isAction(resource) ? makeActionPath(resource) : joinPath(apiPath, resource, id); | ||
validateResourceQuery(query, type); | ||
@@ -65,0 +68,0 @@ if (Object.keys(params).length) { |
@@ -1,2 +0,2 @@ | ||
import { ResolvedResourceQuery } from '../../engine'; | ||
export declare const queryToResourcePath: (apiPath: string, { resource, id, params }: ResolvedResourceQuery) => string; | ||
import { ResolvedResourceQuery, FetchType } from '../../engine'; | ||
export declare const queryToResourcePath: (apiPath: string, query: ResolvedResourceQuery, type: FetchType) => string; |
{ | ||
"name": "@dhis2/app-service-data", | ||
"version": "2.7.1", | ||
"version": "2.8.0", | ||
"main": "./build/cjs/index.js", | ||
@@ -25,3 +25,3 @@ "module": "./build/es/index.js", | ||
"peerDependencies": { | ||
"@dhis2/app-service-config": "2.7.1", | ||
"@dhis2/app-service-config": "2.8.0", | ||
"prop-types": "^15.7.2", | ||
@@ -28,0 +28,0 @@ "react": "^16.8", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
235532
173
6542
2
34