@learncard/expiration-plugin 1.1.13 → 1.1.15
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/expiration-plugin.cjs.development.js +1 -0
- package/dist/expiration-plugin.cjs.development.js.map +1 -1
- package/dist/expiration-plugin.cjs.production.min.js +1 -1
- package/dist/expiration-plugin.cjs.production.min.js.map +2 -2
- package/dist/expiration-plugin.esm.js.map +1 -1
- package/package.json +3 -3
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../src/index.ts"],
|
4
4
|
"sourcesContent": ["import { VerifyExtension } from '@learncard/vc-plugin';\nimport { LearnCard } from '@learncard/core';\nimport { ExpirationPlugin } from './types';\n\nexport * from './types';\n\n/**\n * @group Plugins\n */\nexport const expirationPlugin = (\n learnCard: LearnCard<any, any, VerifyExtension>\n): ExpirationPlugin => ({\n name: 'Expiration',\n displayName: 'Expiration Extension',\n description: \"Adds a check to make sure credentials aren't expired when verifying them\",\n methods: {\n verifyCredential: async (_learnCard, credential, options) => {\n const verificationCheck = await learnCard.invoke.verifyCredential(credential, options);\n\n if (credential.expirationDate && new Date() > new Date(credential.expirationDate)) {\n verificationCheck.errors.push('expiration error: Credential is expired');\n } else {\n verificationCheck.checks.push('expiration');\n }\n\n return verificationCheck;\n },\n },\n});\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASO,IAAM,mBAAmB,wBAC5B,eACoB;AAAA,EACpB,MAAM;AAAA,EACN,aAAa;AAAA,EACb,aAAa;AAAA,EACb,SAAS;AAAA,IACL,kBAAkB,OAAO,YAAY,YAAY,YAAY;AACzD,YAAM,oBAAoB,MAAM,UAAU,OAAO,iBAAiB,YAAY,OAAO;AAErF,UAAI,WAAW,kBAAkB,IAAI,KAAK,IAAI,IAAI,KAAK,WAAW,cAAc,GAAG;AAC/E,0BAAkB,OAAO,KAAK,yCAAyC;AAAA,MAC3E,OAAO;AACH,0BAAkB,OAAO,KAAK,YAAY;AAAA,MAC9C;AAEA,aAAO;AAAA,IACX;AAAA,EACJ;AACJ,IAnBgC;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
var t=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var o=(i,e)=>t(i,"name",{value:e,configurable:!0});var d=(i,e)=>{for(var n in e)t(i,n,{get:e[n],enumerable:!0})},m=(i,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of s(e))!x.call(i,r)&&r!==n&&t(i,r,{get:()=>e[r],enumerable:!(a=p(e,r))||a.enumerable});return i};var f=i=>m(t({},"__esModule",{value:!0}),i);var y={};d(y,{expirationPlugin:()=>c});module.exports=f(y);var c=o(i=>({name:"Expiration",displayName:"Expiration Extension",description:"Adds a check to make sure credentials aren't expired when verifying them",methods:{verifyCredential:async(e,n,a)=>{let r=await i.invoke.verifyCredential(n,a);return n.expirationDate&&new Date>new Date(n.expirationDate)?r.errors.push("expiration error: Credential is expired"):r.checks.push("expiration"),r}}}),"expirationPlugin");
|
1
|
+
"use strict";var t=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var o=(i,e)=>t(i,"name",{value:e,configurable:!0});var d=(i,e)=>{for(var n in e)t(i,n,{get:e[n],enumerable:!0})},m=(i,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of s(e))!x.call(i,r)&&r!==n&&t(i,r,{get:()=>e[r],enumerable:!(a=p(e,r))||a.enumerable});return i};var f=i=>m(t({},"__esModule",{value:!0}),i);var y={};d(y,{expirationPlugin:()=>c});module.exports=f(y);var c=o(i=>({name:"Expiration",displayName:"Expiration Extension",description:"Adds a check to make sure credentials aren't expired when verifying them",methods:{verifyCredential:async(e,n,a)=>{let r=await i.invoke.verifyCredential(n,a);return n.expirationDate&&new Date>new Date(n.expirationDate)?r.errors.push("expiration error: Credential is expired"):r.checks.push("expiration"),r}}}),"expirationPlugin");
|
2
2
|
//# sourceMappingURL=expiration-plugin.cjs.production.min.js.map
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../src/index.ts"],
|
4
4
|
"sourcesContent": ["import { VerifyExtension } from '@learncard/vc-plugin';\nimport { LearnCard } from '@learncard/core';\nimport { ExpirationPlugin } from './types';\n\nexport * from './types';\n\n/**\n * @group Plugins\n */\nexport const expirationPlugin = (\n learnCard: LearnCard<any, any, VerifyExtension>\n): ExpirationPlugin => ({\n name: 'Expiration',\n displayName: 'Expiration Extension',\n description: \"Adds a check to make sure credentials aren't expired when verifying them\",\n methods: {\n verifyCredential: async (_learnCard, credential, options) => {\n const verificationCheck = await learnCard.invoke.verifyCredential(credential, options);\n\n if (credential.expirationDate && new Date() > new Date(credential.expirationDate)) {\n verificationCheck.errors.push('expiration error: Credential is expired');\n } else {\n verificationCheck.checks.push('expiration');\n }\n\n return verificationCheck;\n },\n },\n});\n"],
|
5
|
-
"mappings": "
|
6
|
-
"names": []
|
5
|
+
"mappings": "4dAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GASO,IAAMI,EAAmBC,EAC5BC,IACoB,CACpB,KAAM,aACN,YAAa,uBACb,YAAa,2EACb,QAAS,CACL,iBAAkB,MAAOC,EAAYC,EAAYC,IAAY,CACzD,IAAMC,EAAoB,MAAMJ,EAAU,OAAO,iBAAiBE,EAAYC,CAAO,EAErF,OAAID,EAAW,gBAAkB,IAAI,KAAS,IAAI,KAAKA,EAAW,cAAc,EAC5EE,EAAkB,OAAO,KAAK,yCAAyC,EAEvEA,EAAkB,OAAO,KAAK,YAAY,EAGvCA,CACX,CACJ,CACJ,GAnBgC",
|
6
|
+
"names": ["src_exports", "__export", "expirationPlugin", "__toCommonJS", "expirationPlugin", "__name", "learnCard", "_learnCard", "credential", "options", "verificationCheck"]
|
7
7
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../src/index.ts"],
|
4
4
|
"sourcesContent": ["import { VerifyExtension } from '@learncard/vc-plugin';\nimport { LearnCard } from '@learncard/core';\nimport { ExpirationPlugin } from './types';\n\nexport * from './types';\n\n/**\n * @group Plugins\n */\nexport const expirationPlugin = (\n learnCard: LearnCard<any, any, VerifyExtension>\n): ExpirationPlugin => ({\n name: 'Expiration',\n displayName: 'Expiration Extension',\n description: \"Adds a check to make sure credentials aren't expired when verifying them\",\n methods: {\n verifyCredential: async (_learnCard, credential, options) => {\n const verificationCheck = await learnCard.invoke.verifyCredential(credential, options);\n\n if (credential.expirationDate && new Date() > new Date(credential.expirationDate)) {\n verificationCheck.errors.push('expiration error: Credential is expired');\n } else {\n verificationCheck.checks.push('expiration');\n }\n\n return verificationCheck;\n },\n },\n});\n"],
|
5
|
-
"mappings": ";;;;AASO,IAAM,mBAAmB,wBAC5B,
|
5
|
+
"mappings": ";;;;AASO,IAAM,mBAAmB,wBAC5B,eACoB;AAAA,EACpB,MAAM;AAAA,EACN,aAAa;AAAA,EACb,aAAa;AAAA,EACb,SAAS;AAAA,IACL,kBAAkB,OAAO,YAAY,YAAY,YAAY;AACzD,YAAM,oBAAoB,MAAM,UAAU,OAAO,iBAAiB,YAAY,OAAO;AAErF,UAAI,WAAW,kBAAkB,IAAI,KAAK,IAAI,IAAI,KAAK,WAAW,cAAc,GAAG;AAC/E,0BAAkB,OAAO,KAAK,yCAAyC;AAAA,MAC3E,OAAO;AACH,0BAAkB,OAAO,KAAK,YAAY;AAAA,MAC9C;AAEA,aAAO;AAAA,IACX;AAAA,EACJ;AACJ,IAnBgC;",
|
6
6
|
"names": []
|
7
7
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@learncard/expiration-plugin",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.15",
|
4
4
|
"description": "",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"module": "./dist/expiration-plugin.esm.js",
|
@@ -31,8 +31,8 @@
|
|
31
31
|
"types": "./dist/index.d.ts",
|
32
32
|
"dependencies": {
|
33
33
|
"why-is-node-running": "^2.2.2",
|
34
|
-
"@learncard/vc-plugin": "^1.1.
|
35
|
-
"@learncard/core": "9.3.
|
34
|
+
"@learncard/vc-plugin": "^1.1.15",
|
35
|
+
"@learncard/core": "9.3.2"
|
36
36
|
},
|
37
37
|
"scripts": {
|
38
38
|
"build": "node ./scripts/build.mjs && shx cp ./scripts/mixedEntypoint.js ./dist/index.js && tsc --p tsconfig.json",
|