New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@agoric/base-zone

Package Overview
Dependencies
Maintainers
0
Versions
998
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agoric/base-zone - npm Package Compare versions

Comparing version 0.1.1-dev-780a461.0 to 0.1.1-dev-785e426.0

src/prepare-revocable.d.ts

30

package.json
{
"name": "@agoric/base-zone",
"version": "0.1.1-dev-780a461.0+780a461",
"version": "0.1.1-dev-785e426.0+785e426",
"description": "Allocation zone abstraction library and heap implementation",

@@ -11,5 +11,5 @@ "type": "module",

"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'",
"test": "ava",
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
"test:c8": "c8 --all $C8_OPTIONS ava",
"test:xs": "exit 0",

@@ -23,2 +23,3 @@ "lint-fix": "yarn lint:eslint --fix",

".": "./src/index.js",
"./zone-helpers.js": "./zone-helpers.js",
"./heap.js": "./heap.js",

@@ -31,10 +32,13 @@ "./tools/*": "./tools/*"

"dependencies": {
"@agoric/store": "0.9.3-dev-780a461.0+780a461",
"@endo/exo": "^1.0.1",
"@endo/far": "^1.0.1",
"@endo/pass-style": "^1.0.1",
"@endo/patterns": "^1.0.1"
"@agoric/store": "0.9.3-dev-785e426.0+785e426",
"@endo/common": "^1.2.8",
"@endo/errors": "^1.2.8",
"@endo/exo": "^1.5.7",
"@endo/far": "^1.1.9",
"@endo/pass-style": "^1.4.7",
"@endo/patterns": "^1.4.7"
},
"devDependencies": {
"@endo/init": "^1.0.1",
"@endo/init": "^1.1.7",
"@endo/ses-ava": "^1.2.8",
"ava": "^5.3.0"

@@ -46,7 +50,7 @@ },

"engines": {
"node": ">=14.15.0"
"node": "^18.12 || ^20.9"
},
"ava": {
"files": [
"test/**/test-*.js"
"test/**/*.test.*"
],

@@ -60,5 +64,5 @@ "require": [

"typeCoverage": {
"atLeast": 88.7
"atLeast": 91.4
},
"gitHead": "780a4613a6a5f805cedf2686cb2b3c0412f7ffff"
"gitHead": "785e426312297a21731f67c9e36815502cbf9fb9"
}

@@ -9,2 +9,6 @@ # Base Zone Library

This library is used internally by [`@agoric/zone`](../zone/README.md); refer to it for more details. Unless you are an author of a new Zone backing store type, or want to use `makeHeapZone` without introducing build dependencies on `@agoric/vat-data`, you should instead use `@agoric/zone`.
This library is used internally by [@agoric/zone](../zone/README.md); refer to it for more details. Unless you are an author of a new Zone backing store type, or want to use `makeHeapZone` without introducing build dependencies on [@agoric/vat-data](../vat-data/README.md), you should instead use [@agoric/zone](../zone/README.md).
---
Be aware that both this package `@agoric/base-zone` and `@agoric/store` will move from the agoric-sdk repository to the endo repository and likely renamed `@endo/zone` and `@endo/store`. At that time, we will first deprecate the versions here, then replace them with deprecated stubs that reexport from their new home. We hope to eventually remove even these stubs, depending on the compat cost at that time.

@@ -8,3 +8,2 @@ /* eslint-disable import/export */

// @ts-expect-error TS1383: Only named exports may use 'export type'.
export type * from './types.js';

@@ -1,2 +0,2 @@

export function makeHeapZone(baseLabel?: string | undefined): import('./types.js').Zone;
export function makeHeapZone(baseLabel?: string): import("./types.js").Zone;
//# sourceMappingURL=heap.d.ts.map
// @ts-check
// @jessie-check
import { Far } from '@endo/far';
import { Far, isPassable } from '@endo/pass-style';
import { makeExo, defineExoClass, defineExoClassKit } from '@endo/exo';

@@ -15,3 +15,3 @@ import {

import { agoricVatDataKeys as keys } from './keys.js';
import { isPassable } from './is-passable.js';
import { watchPromise } from './watch-promise.js';

@@ -54,2 +54,3 @@ /**

makeOnce,
watchPromise,
detached: detachedHeapStores.detached,

@@ -56,0 +57,0 @@ isStorable: detachedHeapStores.isStorable,

@@ -5,2 +5,3 @@ export * from "./exports.js";

export * from "./is-passable.js";
export * from "./watch-promise.js";
//# sourceMappingURL=index.d.ts.map
// @jessie-check
/// <reference types="@agoric/store/exported.js" />
// eslint-disable-next-line import/export

@@ -10,1 +12,2 @@ export * from './exports.js';

export * from './is-passable.js';
export * from './watch-promise.js';

@@ -1,2 +0,2 @@

export function isPassable(specimen: any): specimen is any;
export function isPassable(specimen: any): specimen is Passable;
//# sourceMappingURL=is-passable.d.ts.map

@@ -1,23 +0,8 @@

import { passStyleOf } from '@endo/pass-style';
import { isPassable as realIsPassable } from '@endo/pass-style';
/**
* Is `specimen` Passable? This returns true iff `passStyleOf(specimen)`
* returns a string. This returns `false` iff `passStyleOf(specimen)` throws.
* Under no normal circumstance should `isPassable(specimen)` throw.
*
* TODO implement an isPassable that does not rely on try/catch, and
* move it to @endo/pass-style.
* This implementation is just a standin until then
*
* @deprecated Import `isPassable` directly from `@endo/pass-style`
* @param {any} specimen
* @returns {specimen is Passable}
*/
export const isPassable = specimen => {
try {
// In fact, it never returns undefined. It either returns a
// string or throws.
return passStyleOf(specimen) !== undefined;
} catch (_) {
return false;
}
};
export const isPassable = specimen => realIsPassable(specimen);

@@ -6,3 +6,3 @@ /**

*/
export const agoricVatDataKeys: import('./types.js').KeyMakers;
export const agoricVatDataKeys: import("./types.js").KeyMakers;
//# sourceMappingURL=keys.d.ts.map

@@ -1,5 +0,5 @@

export function makeOnceKit(debugName: string, stores: import('./types.js').Stores, backingStore?: any): {
export function makeOnceKit(debugName: string, stores: import("./types.js").Stores, backingStore?: import("@agoric/swingset-liveslots").MapStore<string, any>): {
makeOnce: <V>(key: string, maker: (key: string) => V) => V;
wrapProvider: <T extends (key: string, ...rest: unknown[]) => any>(provider: T, labelToKeys?: ((label: string) => string[]) | undefined) => T;
wrapProvider: <T extends (key: string, ...rest: any[]) => any>(provider: T, labelToKeys?: (label: string) => string[]) => T;
};
//# sourceMappingURL=make-once.d.ts.map
// @ts-check
const { Fail } = assert;
import { Fail } from '@endo/errors';

@@ -38,3 +38,3 @@ /** @param {string} label */

*
* @template {(key: string, ...rest: unknown[]) => any} T
* @template {(key: string, ...rest: any[]) => any} T
* @param {T} provider

@@ -41,0 +41,0 @@ * @param {(label: string) => string[]} [labelToKeys]

@@ -1,9 +0,3 @@

export type KeyCategories = 'exoClass' | 'exoClassKit' | 'exo' | 'store' | 'zone';
export type KeyMakers = {
exoClass: (label: string) => string[];
exoClassKit: (label: string) => string[];
exo: (label: string) => string[];
store: (label: string) => string[];
zone: (label: string) => string[];
};
export type KeyCategories = "exoClass" | "exoClassKit" | "exo" | "store" | "zone";
export type KeyMakers = Record<KeyCategories, (label: string) => string[]>;
/**

@@ -35,2 +29,6 @@ * A bag of methods for creating defensible objects and

subZone: (label: string, options?: StoreOptions) => Zone;
/**
* register a promise watcher created by this zone
*/
watchPromise: typeof watchPromise;
};

@@ -49,15 +47,15 @@ export type Stores = {

*/
mapStore: <K, V>(label: string, options?: StoreOptions) => MapStore<K, V>;
mapStore: (label: string, options?: StoreOptions) => MapStore<any, any>;
/**
* provide a Set-like store named `label` in the zone
*/
setStore: <K_1>(label: string, options?: StoreOptions) => SetStore<K_1>;
setStore: <K>(label: string, options?: StoreOptions) => SetStore<K>;
/**
* provide a WeakMap-like store named `label` in the zone
*/
weakMapStore: <K_2, V_1>(label: string, options?: StoreOptions) => WeakMapStore<K_2, V_1>;
weakMapStore: <K, V>(label: string, options?: StoreOptions) => WeakMapStore<K, V>;
/**
* provide a WeakSet-like store named `label` in the zone
*/
weakSetStore: <K_3>(label: string, options?: StoreOptions) => WeakSetStore<K_3>;
weakSetStore: <K>(label: string, options?: StoreOptions) => WeakSetStore<K>;
};

@@ -67,2 +65,3 @@ import { makeExo } from '@endo/exo';

import { defineExoClassKit } from '@endo/exo';
import { watchPromise } from './watch-promise.js';
//# sourceMappingURL=types.d.ts.map
// eslint-disable-next-line no-unused-vars
import { makeExo, defineExoClass, defineExoClassKit } from '@endo/exo';
// eslint-disable-next-line no-unused-vars
import { watchPromise } from './watch-promise.js';
// Ensure this is a module.
export {};
/**
* @import {Key} from '@endo/patterns';
* @import {Passable} from '@endo/pass-style';
*/
/** @typedef {'exoClass' | 'exoClassKit' | 'exo' | 'store' | 'zone'} KeyCategories */

@@ -19,2 +29,3 @@ /** @typedef {Record<KeyCategories, (label: string) => string[]>} KeyMakers */

* @property {(label: string, options?: StoreOptions) => Zone} subZone create a new Zone that can be passed to untrusted consumers without exposing the storage of the parent zone
* @property {typeof watchPromise} watchPromise register a promise watcher created by this zone
*/

@@ -26,5 +37,5 @@

* @property {(specimen: unknown) => boolean} isStorable return true if the specimen can be stored in the zone, whether as exo-object state or in a store
* @property {<K,V>(label: string, options?: StoreOptions) => MapStore<K, V>} mapStore provide a Map-like store named `label` in the zone
* @property {(label: string, options?: StoreOptions) => MapStore<any, any>} mapStore provide a Map-like store named `label` in the zone
* @property {<K>(label: string, options?: StoreOptions) => SetStore<K>} setStore provide a Set-like store named `label` in the zone
* @property {<K,V>(
* @property {<K, V>(
* label: string, options?: StoreOptions) => WeakMapStore<K, V>

@@ -31,0 +42,0 @@ * } weakMapStore provide a WeakMap-like store named `label` in the zone

@@ -1,5 +0,4 @@

// eslint-disable-next-line import/no-extraneous-dependencies
import { wrapTest } from '@endo/ses-ava';
import rawTest from 'ava';
import test from 'ava';
export { test };
export const test = wrapTest(rawTest);
// This file can contain .js-specific Typescript compiler config.
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"maxNodeModuleJsDepth": 2,
},
"compilerOptions": {},
"include": [

@@ -8,0 +6,0 @@ "*.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc