Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ez4/stateful

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ez4/stateful - npm Package Compare versions

Comparing version 0.0.0 to 0.1.0

2

dist/state/plan.d.ts
import type { EntryState, EntryStates } from '../types/entry.js';
import type { StepState, StepHandlers } from '../types/step.js';
export declare const planSteps: <E extends EntryState>(newEntries: EntryStates<E> | undefined, oldEntries: EntryStates<E> | undefined, handlers: StepHandlers<E>) => StepState[];
export declare const planSteps: <E extends EntryState>(newEntries: EntryStates<E> | undefined, oldEntries: EntryStates<E> | undefined, handlers: StepHandlers<E>) => Promise<StepState[]>;

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

import type { ObjectComparison } from '@ez4/utils';
import type { StepAction } from '../state/step.js';

@@ -10,2 +11,3 @@ import type { EntryState, TypedEntryState } from './entry.js';

order: number;
preview?: ObjectComparison;
};

@@ -39,5 +41,6 @@ /**

* @param candidate Candidate entry.
* @param context Action context.
* @returns Must returns the resulting state of the create action.
*/
create: (candidate: Readonly<E>, context: StepContext<E>) => unknown | undefined | Promise<unknown>;
create: (candidate: Readonly<E>, context: StepContext<E>) => Record<string, any> | undefined | Promise<Record<string, any> | unknown>;
/**

@@ -47,15 +50,25 @@ * Handle entry replacement.

* @param current Current entry.
* @param context Action context.
* @returns Must returns the resulting state of the replace action.
*/
replace: (candidate: Readonly<E>, current: Readonly<E>, context: StepContext<E>) => unknown | undefined | Promise<unknown>;
replace: (candidate: Readonly<E>, current: Readonly<E>, context: StepContext<E>) => Record<string, any> | undefined | Promise<Record<string, any> | undefined>;
/**
* Handle entry preview.
* @param candidate Candidate entry.
* @param current Current entry.
* @returns Must returns the comparison object from the preview action.
*/
preview: (candidate: Readonly<E>, current: Readonly<E>) => ObjectComparison | undefined | Promise<ObjectComparison | undefined>;
/**
* Handle entry updates.
* @param candidate Candidate entry.
* @param current Current entry.
* @param context Action context.
* @returns Must returns the resulting state of the update action.
*/
update: (candidate: Readonly<E>, current: Readonly<E>, context: StepContext<E>) => unknown | undefined | Promise<unknown>;
update: (candidate: Readonly<E>, current: Readonly<E>, context: StepContext<E>) => Record<string, any> | undefined | Promise<Record<string, any> | undefined>;
/**
* Handle entry deletion.
* @param candidate Candidate entry.
* @param context Action context.
* @returns Must returns the resulting state of the delete action.

@@ -62,0 +75,0 @@ */

{
"name": "@ez4/stateful",
"description": "EZ4: Components to manage states with dependencies",
"version": "0.0.0",
"version": "0.1.0",
"author": "Silas B.",

@@ -24,5 +24,7 @@ "license": "MIT",

"clean:registry": "rm -rf ../../.registry/@ez4/stateful",
"prepublishOnly": "npm run clean && npm run build && npm run test",
"publish": "npm publish --access public"
"live:publish": "npm run test && npm publish --access public"
},
"dependencies": {
"@ez4/utils": "^0.1.0"
}
}
}

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