Skip to content

Commit

Permalink
dev: renamed logic function to logician
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-crowell committed Aug 3, 2024
1 parent 57e1e6d commit 80965a2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/action/src/action/locale_define.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { type Action, Ambit, Rate } from '@do-ob/core/io';
/**
* Define a localization dictionary entry.
*/
export type Payload = [{
export type Payload = {
/**
* The language code the content is localized for.
*
Expand All @@ -24,7 +24,7 @@ export type Payload = [{
* The localized textual content.
*/
content: string;
}];
}[];


export const type = 'locale_define';
Expand Down
10 changes: 5 additions & 5 deletions packages/logic/src/logic.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { test, expect } from 'vitest';
import { logic } from '@do-ob/logic/logic';
import { logician } from '@do-ob/logic/logic';
import { register, locale_define } from '@do-ob/action';
import { contextify } from '@do-ob/core';
import { processify } from './process';

test('should initialize a logic dispatch from the logic function', () => {
const dispatch = logic();
const dispatch = logician();

expect(dispatch).toBeDefined();
});
Expand All @@ -24,7 +24,7 @@ test('should be able to use a custom process', async () => {
[ locale_define, async () => {
return {
code: 'en-US'
};
} as const;
} ]
);

Expand All @@ -37,7 +37,7 @@ test('should be able to use a custom process', async () => {
} ],
);

const { dispatch } = logic({
const { dispatch } = logician({
pool: {
account: processAccount,
subscription: processSubscription,
Expand Down Expand Up @@ -66,7 +66,7 @@ test('should be able to use a custom process', async () => {
});

test('should dispatch an action to the logic for processing', async () => {
const { dispatch } = logic();
const { dispatch } = logician();

const data = await dispatch(register.act({
type: 'webauthn',
Expand Down
2 changes: 1 addition & 1 deletion packages/logic/src/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export interface LogicOptions<
/**
* Generates a logic function wrapper for the given schema.
*/
export function logic<
export function logician<
P extends Process,
T extends Record<string, P>
>(options: LogicOptions<T> = {}) {
Expand Down

0 comments on commit 80965a2

Please sign in to comment.