@agoric/access-token
Advanced tools
Comparing version
{ | ||
"name": "@agoric/access-token", | ||
"version": "0.4.22-dev-1f816f9.0+1f816f9", | ||
"version": "0.4.22-dev-20168b0.0+20168b0", | ||
"description": "Persistent credentials for Agoric users, backed by a simple JSON file", | ||
@@ -13,3 +13,3 @@ "type": "module", | ||
"test": "ava", | ||
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", | ||
"test:c8": "c8 --all $C8_OPTIONS ava", | ||
"test:xs": "exit 0", | ||
@@ -22,2 +22,3 @@ "lint": "run-s --continue-on-error lint:*", | ||
"dependencies": { | ||
"@agoric/internal": "0.3.3-dev-20168b0.0+20168b0", | ||
"n-readlines": "^1.0.0", | ||
@@ -31,3 +32,3 @@ "proper-lockfile": "^4.1.2", | ||
"ava": "^5.3.0", | ||
"c8": "^9.1.0" | ||
"c8": "^10.1.2" | ||
}, | ||
@@ -49,3 +50,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "1f816f92e8b4f79c43df9608d7a7b443a3ceca20" | ||
"gitHead": "20168b0ba9fe3a1cf804b2fc91604abe4537a10a" | ||
} |
import test from 'ava'; | ||
import { tmpDir } from './tmp.js'; | ||
import tmp from 'tmp'; | ||
import { makeTempDirFactory } from '@agoric/internal/src/tmpDir.js'; | ||
import { | ||
@@ -10,2 +11,4 @@ initJSONStore, | ||
const tmpDir = makeTempDirFactory(tmp); | ||
function testStorage(t, storage) { | ||
@@ -43,3 +46,3 @@ t.falsy(storage.has('missing')); | ||
test('storageInFile', async t => { | ||
const [dbDir, cleanup] = await tmpDir('testdb'); | ||
const [dbDir, cleanup] = tmpDir('testdb'); | ||
t.teardown(cleanup); | ||
@@ -46,0 +49,0 @@ t.is(isJSONStore(dbDir), false); |
import test from 'ava'; | ||
import { tmpDir } from './tmp.js'; | ||
import tmp from 'tmp'; | ||
import { makeTempDirFactory } from '@agoric/internal/src/tmpDir.js'; | ||
import { getAccessToken } from '../src/access-token.js'; | ||
const tmpDir = makeTempDirFactory(tmp); | ||
test('access tokens', async t => { | ||
const [sharedStateDir, removeCallback] = await tmpDir('access-token-test'); | ||
const [sharedStateDir, removeCallback] = tmpDir('access-token-test'); | ||
const [a, b, c] = await Promise.all([ | ||
@@ -9,0 +11,0 @@ getAccessToken(1234, sharedStateDir), |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
38343
-0.74%4
33.33%9
-10%483
-2.82%