@field123/core
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -25,14 +25,7 @@ 'use strict'; | ||
include: () => include, | ||
isAccessTokenExpired: () => isAccessTokenExpired, | ||
limit: () => limit, | ||
offset: () => offset, | ||
tester: () => tester | ||
offset: () => offset | ||
}); | ||
module.exports = __toCommonJS(src_exports); | ||
// src/helpers.ts | ||
function isAccessTokenExpired(accessToken, currentDateTime) { | ||
return currentDateTime > accessToken.expires * 1e3; | ||
} | ||
// src/query-clauses.ts | ||
@@ -57,6 +50,1 @@ var offset = (value) => { | ||
}; | ||
// src/tester.ts | ||
function tester(str) { | ||
return str; | ||
} |
@@ -1,11 +0,27 @@ | ||
import { AccessToken, OffsetFunction, LimitFunction, IncludeFunction } from '@field123/client-common'; | ||
interface EPClientError { | ||
type: 'General' | 'Auth' | 'Request'; | ||
message: string; | ||
name?: string; | ||
source?: Error; | ||
} | ||
/** | ||
* Check if access token has expired. | ||
* | ||
* @param accessToken | ||
* @param currentDateTime As milliseconds since epoch | ||
* @returns | ||
*/ | ||
declare function isAccessTokenExpired(accessToken: AccessToken, currentDateTime: number): boolean; | ||
interface Offset { | ||
type: 'offset'; | ||
value: number; | ||
} | ||
interface Limit { | ||
type: 'limit'; | ||
value: number; | ||
} | ||
declare type IncludeValue = 'component_products'; | ||
interface Include { | ||
type: 'include'; | ||
value: IncludeValue; | ||
} | ||
declare type EPQueryClause = Offset | Limit | Include; | ||
declare type EPQueryClauseType = EPQueryClause['type']; | ||
declare type LimitFunction = (value: number) => Limit; | ||
declare type IncludeFunction = (value: IncludeValue) => Include; | ||
declare type OffsetFunction = (value: number) => Offset; | ||
declare type EPQueryClauseFunction = LimitFunction | IncludeFunction | OffsetFunction; | ||
@@ -16,4 +32,2 @@ declare const offset: OffsetFunction; | ||
declare function tester(str: string): string; | ||
export { include, isAccessTokenExpired, limit, offset, tester }; | ||
export { EPClientError, EPQueryClause, EPQueryClauseFunction, EPQueryClauseType, Include, IncludeFunction, IncludeValue, Limit, LimitFunction, Offset, OffsetFunction, include, limit, offset }; |
@@ -1,6 +0,1 @@ | ||
// src/helpers.ts | ||
function isAccessTokenExpired(accessToken, currentDateTime) { | ||
return currentDateTime > accessToken.expires * 1e3; | ||
} | ||
// src/query-clauses.ts | ||
@@ -26,7 +21,2 @@ var offset = (value) => { | ||
// src/tester.ts | ||
function tester(str) { | ||
return str; | ||
} | ||
export { include, isAccessTokenExpired, limit, offset, tester }; | ||
export { include, limit, offset }; |
{ | ||
"name": "@field123/core", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"main": "./dist/core.cjs.js", | ||
@@ -35,8 +35,2 @@ "browser": "./dist/core.esm.js", | ||
}, | ||
"dependencies": { | ||
"@field123/client-common": "0.1.0", | ||
"@field123/shopper-common": "0.1.0", | ||
"@field123/requester-common": "0.1.0", | ||
"@field123/auth": "0.1.0" | ||
}, | ||
"publishConfig": { | ||
@@ -43,0 +37,0 @@ "access": "public" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
0
0
3435
94
- Removed@field123/auth@0.1.0
- Removed@field123/client-common@0.1.0
- Removed@field123/requester-common@0.1.0
- Removed@field123/shopper-common@0.1.0
- Removed@field123/auth@0.1.0(transitive)
- Removed@field123/client-common@0.1.0(transitive)
- Removed@field123/requester-common@0.1.0(transitive)
- Removed@field123/shopper-common@0.1.0(transitive)
- Removedfp-ts@2.16.9(transitive)