Socket
Socket
Sign inDemoInstall

@haibun/core

Package Overview
Dependencies
Maintainers
1
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@haibun/core - npm Package Compare versions

Comparing version 1.32.9 to 1.32.11

build/currentVersion.d.ts.map

3

build/currentVersion.d.ts

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

export declare const currentVersion = "1.32.9";
export declare const currentVersion = "1.32.11";
//# sourceMappingURL=currentVersion.d.ts.map

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

export const currentVersion = '1.32.9';
export const currentVersion = '1.32.11';
//# sourceMappingURL=currentVersion.js.map
export * as defs from './lib/defs.js';
//# sourceMappingURL=index.d.ts.map

@@ -12,1 +12,2 @@ import Logger from './Logger.js';

}
//# sourceMappingURL=ConnectedLogger.d.ts.map

@@ -44,1 +44,2 @@ import { TTag, WorkspaceBuilder } from './defs.js';

}
//# sourceMappingURL=contexts.d.ts.map

@@ -39,8 +39,9 @@ import { Resolver } from '../phases/Resolver.js';

}
export declare enum HANDLER_USAGE {
EXCLUSIVE = "exclusive",
FALLBACK = "fallback"
}
export declare const HANDLER_USAGE: {
readonly EXCLUSIVE: "exclusive";
readonly FALLBACK: "fallback";
};
export type THandlerUsage = typeof HANDLER_USAGE[keyof typeof HANDLER_USAGE];
export interface IHandler {
usage?: HANDLER_USAGE;
usage?: THandlerUsage;
handle: Function;

@@ -341,1 +342,2 @@ }

export {};
//# sourceMappingURL=defs.d.ts.map
import { currentVersion } from '../currentVersion.js';
export var HANDLER_USAGE;
(function (HANDLER_USAGE) {
HANDLER_USAGE["EXCLUSIVE"] = "exclusive";
HANDLER_USAGE["FALLBACK"] = "fallback";
})(HANDLER_USAGE || (HANDLER_USAGE = {}));
import { constructorName } from './util/index.js';
export const HANDLER_USAGE = {
EXCLUSIVE: 'exclusive',
FALLBACK: 'fallback',
};
export const isHasHandlers = (s) => s.handlers !== undefined;

@@ -22,3 +22,3 @@ export class WorkspaceBuilder {

if (!this.world) {
throw Error(`stepper without world ${this.constructor.name}`);
throw Error(`stepper without world ${constructorName(this)}`);
}

@@ -25,0 +25,0 @@ return this.world;

@@ -12,1 +12,2 @@ import { Context } from './contexts.js';

}, featureLine: string, actions: TFound[], world: TWorld): void;
//# sourceMappingURL=domain.d.ts.map
import { DomainContext } from './contexts.js';
import { BASE_TYPES } from './defs.js';
import { constructorName } from './util/index.js';
export const isBaseType = (type) => BASE_TYPES.includes(type);

@@ -41,3 +42,3 @@ export const getStepShared = (type, world) => {

if (getDomain(d.name, domainWorld)) {
throw Error(`duplicate domain "${d.name}" in "${module.constructor.name}"`);
throw Error(`duplicate domain "${d.name}" in "${constructorName(module)}"`);
}

@@ -44,0 +45,0 @@ domainWorld.domains.push({ ...d, module, shared: new DomainContext(d.name) });

@@ -23,1 +23,2 @@ import { TExpandedFeature, TFeature, TFeatures } from './defs.js';

export declare const featureSplit: (content: string) => string[];
//# sourceMappingURL=features.d.ts.map
export {};
//# sourceMappingURL=features.test.d.ts.map

@@ -0,4 +1,6 @@

import { describe, it, test, expect } from 'vitest';
import { AStepper, DEFAULT_DEST } from './defs.js';
import * as steps from './features.js';
import { asFeatures, testWithDefaults } from './test/lib.js';
import { testWithDefaults } from './test/lib.js';
import { asFeatures } from './resolver-features.js';
import { actionOK } from './util/index.js';

@@ -5,0 +7,0 @@ describe('expandBackgrounds', () => {

@@ -81,2 +81,3 @@ import { TAnyFixme, TStepResult, TTag, TVStep } from '../defs.js';

};
export type TArtifactType = TArtifact['type'];
export interface ILogger {

@@ -121,1 +122,2 @@ debug: (what: TLogArgs, ctx?: TMessageContext) => void;

export {};
//# sourceMappingURL=logger.d.ts.map

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

import { TTag } from './defs.js';
import { ILogger, ILogOutput, TLogArgs, TLogHistory, TLogLevel, TMessageContext, TOutputEnv } from './interfaces/logger.js';
import { TAnyFixme, TTag } from './defs.js';
import { ILogger, ILogOutput, TActionStage, TArtifact, TArtifactMessageContext, TArtifactType, TLogArgs, TLogHistory, TLogLevel, TMessageContext, TOutputEnv } from './interfaces/logger.js';
export declare const LOGGER_LOG: {

@@ -39,3 +39,18 @@ level: string;

error: (args: TLogArgs, mctx?: TMessageContext) => void;
static logContext({ details, stage, type, path, event, tag, content }: {
details: TAnyFixme;
stage: TActionStage;
type: TArtifactType;
path?: string;
content?: string;
event: string;
tag: TTag;
}): TArtifactMessageContext;
static logArtifact({ type, path, content }: {
type: TArtifactType;
path?: string;
content?: string;
}): TArtifact;
}
export {};
//# sourceMappingURL=Logger.d.ts.map

@@ -70,3 +70,9 @@ import { descTag, isFirstTag } from './util/index.js';

error = (args, mctx) => this.out('error', args, mctx);
static logContext({ details, stage, type, path, event, tag, content }) {
return { topic: { ...details, event, stage }, artifact: { type, path, content }, tag };
}
static logArtifact({ type, path, content }) {
return { type, path, content };
}
}
//# sourceMappingURL=Logger.js.map
export {};
//# sourceMappingURL=Logger.test.d.ts.map

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

import { describe, test, it, expect } from 'vitest';
import Logger, { LOGGER_LEVELS } from './Logger.js';

@@ -16,3 +17,3 @@ import { getDefaultTag } from './test/lib.js';

describe('logger with subscriber', () => {
test.skip('subscriber receives topic', (done) => {
test.skip('subscriber receives topic', async () => {
const logger = new Logger({ level: 'debug' });

@@ -22,10 +23,13 @@ const tag = getDefaultTag(0);

const step = { '@type': 'Step', description: 'step 1', actions: [], source: { path: 'path', type: 'foo', base: 'foo', name: 'foo', content: 'foo' }, in: 'in', seq: 1 };
const subscriber = {
out(level, args, ctx) {
expect(ctx.topic).toBeDefined();
expect(ctx.topic.result).toEqual(step);
done();
},
};
logger.addSubscriber(subscriber);
const subscriberPromise = new Promise((resolve) => {
const subscriber = {
out(level, args, ctx) {
expect(ctx.topic).toBeDefined();
expect(ctx.topic.result).toEqual(step);
resolve();
},
};
logger.addSubscriber(subscriber);
});
await subscriberPromise;
// FIXME

@@ -36,13 +40,16 @@ // logger.log('test', <TExecutorMessageContext>{ topic: { stage: 'Executor', result: { step } }, tag });

describe('logger with output', () => {
test('output gets current tag', (done) => {
const output = {
out(level, args, ctx) {
expect(ctx?.tag?.loop).toBe(0);
done();
},
};
const dlogger = new Logger({ output, tag: getDefaultTag(0) });
dlogger.log('test');
it('output gets current tag', async () => {
const outputPromise = new Promise((resolve) => {
const output = {
out(level, args, ctx) {
expect(ctx?.tag?.loop).toBe(0);
resolve();
},
};
const dlogger = new Logger({ output, tag: getDefaultTag(0) });
dlogger.log('test');
});
await outputPromise;
});
});
//# sourceMappingURL=Logger.test.js.map

@@ -24,1 +24,2 @@ import { THistoryWithMeta, TLogHistory, TLogHistoryWithArtifact, TLogHistoryWithExecutorTopic } from './interfaces/logger.js';

export declare const TRACKS_DIR = "tracks";
//# sourceMappingURL=LogHistory.d.ts.map

@@ -20,1 +20,2 @@ import { TStep, TNamedVar, TFound, TNamed, TWorld, TVStep } from './defs.js';

export declare function getNamedToVars(found: TFound, world: TWorld, vstep: TVStep): TNamed;
//# sourceMappingURL=namedVars.d.ts.map
export {};
//# sourceMappingURL=namedVars.test.d.ts.map

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

import { describe, it, test, expect } from 'vitest';
import { AStepper, OK } from './defs.js';

@@ -5,3 +6,4 @@ import { getNamedMatches, namedInterpolation, matchGroups, getNamedToVars } from './namedVars.js';

import { actionNotOK, createSteppers, getSerialTime } from './util/index.js';
import { asExpandedFeatures, getDefaultWorld, testWithDefaults, TEST_BASE } from './test/lib.js';
import { getDefaultWorld, testWithDefaults, TEST_BASE } from './test/lib.js';
import { asExpandedFeatures } from './resolver-features.js';
import { withNameType } from './features.js';

@@ -8,0 +10,0 @@ describe('namedMatches', () => {

@@ -21,1 +21,2 @@ import { TRunOptions, TRunResult, TTagValue } from './defs.js';

}>;
//# sourceMappingURL=run-with-options.d.ts.map

@@ -28,1 +28,2 @@ import { TSpecl, TExecutorResult, TWorld, TFeature, TEndFeatureCallback, CStepper, TBase } from './defs.js';

export {};
//# sourceMappingURL=run.d.ts.map
export {};
//# sourceMappingURL=run.domains.test.d.ts.map

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

import { describe, it, expect } from 'vitest';
import { onCurrentTypeForDomain, setShared } from '../steps/vars.js';

@@ -5,3 +6,4 @@ import { AStepper } from './defs.js';

import { runWith } from './run.js';
import { asFeatures, getDefaultWorld, testWithDefaults } from './test/lib.js';
import { getDefaultWorld, testWithDefaults } from './test/lib.js';
import { asFeatures } from './resolver-features.js';
import { actionOK, getDefaultOptions } from './util/index.js';

@@ -8,0 +10,0 @@ const TTYPE = 'page';

@@ -31,2 +31,3 @@ import { DEFAULT_DEST } from './defs.js';

const errorBail = (phase, error, details) => {
world.logger.error(`errorBail ${phase} ${error} ${details}`, error.stack);
result = { ok: false, shared: world.shared, tag, failure: { stage: phase, error: { message: error.message, details: { stack: error.stack, details } } } };

@@ -33,0 +34,0 @@ throw Error(error);

export {};
//# sourceMappingURL=run.test.d.ts.map

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

import { describe, it, expect } from 'vitest';
import { AStepper, OK } from './defs.js';

@@ -2,0 +3,0 @@ import { testWithDefaults } from './test/lib.js';

/// <reference types="node" resolution-mode="require"/>
import { TWorld, TVStep, TProtoOptions, CStepper, TExpandedFeature, TExecutorResult } from '../defs.js';
import { TWorld, TVStep, TProtoOptions, CStepper, TExecutorResult } from '../defs.js';
export declare const HAIBUN_O_TESTSTEPSWITHOPTIONS_EXISTS = "HAIBUN_O_TESTSTEPSWITHOPTIONS_EXISTS";

@@ -24,18 +24,2 @@ export declare const TEST_BASE = "test_base";

}): TWorld;
export declare const asFeatures: (w: {
base?: string;
path: string;
content: string;
}[]) => {
path: string;
base: any;
name: string;
type: string;
content: string;
}[];
export declare const asExpandedFeatures: (w: {
base?: string;
path: string;
content: string;
}[]) => TExpandedFeature[];
export declare function getDefaultWorld(sequence: number, env?: NodeJS.ProcessEnv): {

@@ -46,1 +30,2 @@ world: TWorld;

export {};
//# sourceMappingURL=lib.d.ts.map

@@ -7,6 +7,7 @@ import { DEFAULT_DEST } from '../defs.js';

import { WorldContext } from '../contexts.js';
import { featureSplit, withNameType } from './../features.js';
import { withNameType } from './../features.js';
import { getDomains, verifyDomainsOrError } from './../domain.js';
import Logger, { LOGGER_LOG } from '../Logger.js';
import { Timer } from '../Timer.js';
import { asFeatures } from '../resolver-features.js';
export const HAIBUN_O_TESTSTEPSWITHOPTIONS_EXISTS = 'HAIBUN_O_TESTSTEPSWITHOPTIONS_EXISTS';

@@ -53,11 +54,2 @@ export const TEST_BASE = 'test_base';

}
export const asFeatures = (w) => w.map((i) => withNameType(i.base || TEST_BASE, i.path, i.content));
// FIXME can't really do this without reproducing resolve
export const asExpandedFeatures = (w) => asFeatures(w).map((i) => {
const expanded = featureSplit(i.content).map((a) => ({ line: a, feature: i }));
const a = { ...i, expanded };
delete a.content;
// a.featureLine = asFeatureLine()
return a;
});
export function getDefaultWorld(sequence, env = process.env) {

@@ -64,0 +56,0 @@ return {

export {};
//# sourceMappingURL=lib.test.d.ts.map

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

import { asFeatures, TEST_BASE } from "./lib.js";
import { describe, it, expect } from 'vitest';
import { TEST_BASE } from "./lib.js";
import { asFeatures } from '../resolver-features.js';
describe('asFeatures', () => {

@@ -3,0 +5,0 @@ it('should add base to path', () => {

@@ -45,1 +45,2 @@ import { TNamed, AStepper } from '../defs.js';

export default TestSteps;
//# sourceMappingURL=TestSteps.d.ts.map

@@ -26,1 +26,2 @@ import { AStepper } from '../defs.js';

export default TestStepsWithDomain;
//# sourceMappingURL=TestStepsWithDomain.d.ts.map

@@ -52,1 +52,2 @@ import { AStepper } from '../defs.js';

};
//# sourceMappingURL=TestStepsWithOptions.d.ts.map

@@ -10,1 +10,2 @@ import { ILogger } from './interfaces/logger.js';

}
//# sourceMappingURL=TestLogger.d.ts.map

@@ -8,1 +8,2 @@ export declare class Timer {

}
//# sourceMappingURL=Timer.d.ts.map

@@ -17,2 +17,3 @@ import { TNotOKActionResult, TOKActionResult, TSpecl, TWorld, TRuntime, TActionResultTopics, TActionResult, TFound, TTag, AStepper, TExtraOptions, CStepper, TTagValue, TFeatureResult, ISourcedHandler } from '../defs.js';

export declare function getActionable(value: string): string;
export declare function constructorName(stepper: AStepper): string;
export declare function describeSteppers(steppers: AStepper[]): string;

@@ -24,2 +25,5 @@ export declare function isLowerCase(str: string): boolean;

export declare function getPre(stepper: AStepper): string;
/**
* Find a stepper by option value from a list of steppers
*/
export declare function getStepperOptionValue(key: string, value: string, csteppers: CStepper[]): {

@@ -81,1 +85,2 @@ error?: string;

export {};
//# sourceMappingURL=index.d.ts.map

@@ -57,6 +57,10 @@ import { DEFAULT_DEST, HANDLER_USAGE, } from '../defs.js';

}
export function constructorName(stepper) {
// FIXME deal with vitest / esbuild keepNames nonsense
return stepper.constructor.name.replace(/2$/, '');
}
export function describeSteppers(steppers) {
return steppers
?.map((stepper) => {
return `${stepper.constructor.name}: ${Object.keys(stepper?.steps).sort().join('|')}`;
return `${constructorName(stepper)}: ${Object.keys(stepper?.steps).sort().join('|')}`;
}).sort().join(' ');

@@ -89,3 +93,3 @@ }

catch (e) {
console.error(`setWorldStepperOptions ${stepper.constructor.name} failed`, e);
console.error(`setWorldStepperOptions ${constructorName(stepper)} failed`, e);
throw e;

@@ -96,4 +100,7 @@ }

export function getPre(stepper) {
return ['HAIBUN', 'O', stepper.constructor.name.toUpperCase()].join('_') + '_';
return ['HAIBUN', 'O', constructorName(stepper).toUpperCase()].join('_') + '_';
}
/**
* Find a stepper by option value from a list of steppers
*/
export function getStepperOptionValue(key, value, csteppers) {

@@ -165,3 +172,3 @@ for (const cstepper of csteppers) {

if (!val) {
throw Error(`Cannot find ${optionNames.map(o => getStepperOptionName(stepper, o)).join(' or ')} in your ${stepper.constructor.name} options ${JSON.stringify(Object.keys(extraOptions).filter(k => k.startsWith(getPre(stepper))))}`);
throw Error(`Cannot find ${optionNames.map(o => getStepperOptionName(stepper, o)).join(' or ')} in your ${constructorName(stepper)} options ${JSON.stringify(Object.keys(extraOptions).filter(k => k.startsWith(getPre(stepper))))}`);
}

@@ -171,6 +178,6 @@ return findStepper(steppers, val);

export function findStepper(steppers, name) {
const stepper = steppers.find((s) => s.constructor.name === name);
const stepper = steppers.find((s) => constructorName(s) === name);
if (!stepper) {
// FIXME does not cascade
throw Error(`Cannot find ${name} from ${JSON.stringify(steppers.map((s) => s.constructor.name), null, 2)} `);
throw Error(`Cannot find ${name} from ${JSON.stringify(steppers.map((s) => constructorName(s)), null, 2)} `);
}

@@ -177,0 +184,0 @@ return stepper;

export {};
//# sourceMappingURL=util.test.d.ts.map

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

import { describe, it, test, expect } from 'vitest';
import * as util from './index.js';

@@ -8,2 +9,3 @@ import * as TFileSystemJs from './workspace-lib.js';

import { AStepper, HANDLER_USAGE, OK } from '../defs.js';
import { constructorName } from './index.js';
describe('output', () => {

@@ -23,5 +25,7 @@ it('OutputResult default', async () => {

describe('isLowerCase', () => {
expect(util.isLowerCase('a')).toBe(true);
expect(util.isLowerCase('A')).toBe(false);
expect(util.isLowerCase('0')).toBe(false);
it('is lower case', () => {
expect(util.isLowerCase('a')).toBe(true);
expect(util.isLowerCase('A')).toBe(false);
expect(util.isLowerCase('0')).toBe(false);
});
});

@@ -40,3 +44,3 @@ describe('findHandlers', () => {

expect(found.length).toBe(1);
expect(found[0].stepper.constructor.name).toBe('TestStepperHandler');
expect(constructorName(found[0].stepper)).toBe('TestStepperHandler');
});

@@ -53,3 +57,3 @@ it(`does not find handlers from classes that don't implement IHasHandler`, () => {

expect(found.length).toBe(1);
expect(found[0].stepper.constructor.name).toBe('ExclusiveTestStepperHandler');
expect(constructorName(found[0].stepper)).toBe('ExclusiveTestStepperHandler');
});

@@ -74,3 +78,3 @@ it(`throws error for duplicate exclusives`, () => {

expect(found.length).toBe(1);
expect(found[0].stepper.constructor.name).toBe('TestStepperHandler');
expect(constructorName(found[0].stepper)).toBe('TestStepperHandler');
});

@@ -89,3 +93,3 @@ it(`keeps one fallback from mix pak`, () => {

expect(found.length).toBe(1);
expect(found[0].stepper.constructor.name).toBe('TestStepperHandler');
expect(constructorName(found[0].stepper)).toBe('TestStepperHandler');
});

@@ -101,3 +105,3 @@ it(`keeps first fallback from multiple fallbacks`, () => {

expect(found.length).toBe(1);
expect(found[0].stepper.constructor.name).toBe('FallbackTestStepperHandler');
expect(constructorName(found[0].stepper)).toBe('FallbackTestStepperHandler');
});

@@ -138,9 +142,10 @@ });

});
// FIXME vitest where is TestSteps2 coming from?
it('finds from first multiple options', async () => {
const ts = new TestOptionsStepper();
const steppers = await getCreateSteppers([], [TestOptionsStepper, TestSteps]);
const options = { [util.getStepperOptionName(ts, 'A')]: 'TestSteps', [util.getStepperOptionName(ts, 'B')]: 'TestOptionsStepper' };
const s = util.findStepperFromOption(steppers, ts, options, 'A', 'B');
const steppers = await getCreateSteppers([], [TestSteps, TestOptionsStepper]);
const options = { [util.getStepperOptionName(ts, 'optionA')]: 'TestSteps', [util.getStepperOptionName(ts, 'B')]: 'TestOptionsStepper' };
const s = util.findStepperFromOption(steppers, ts, options, 'optionA', 'optionB');
expect(s).toBeDefined();
expect(s.constructor.name).toBe('TestSteps');
expect(constructorName(s)).toBe('TestSteps');
});

@@ -195,2 +200,3 @@ it('throws for not found stepper', async () => {

await util.verifyExtraOptions({ [HAIBUN_O_TESTSTEPSWITHOPTIONS_EXISTS]: 'true' }, [TestStepsWithOptions]);
console.log('🤑', JSON.stringify(world.options, null, 2));
expect(world.options[HAIBUN_O_TESTSTEPSWITHOPTIONS_EXISTS]).toEqual(42);

@@ -197,0 +203,0 @@ });

@@ -6,4 +6,14 @@ /// <reference types="node" resolution-mode="require"/>

export declare function getSteppers(stepperNames: string[]): Promise<CStepper[]>;
export declare const workspaceRoot: string;
type TImportMeta = {
url: string;
};
export declare function getPackageLocation(meta: TImportMeta): string;
export declare const getFilename: (meta: TImportMeta) => string;
export declare const getDirname: (meta: TImportMeta) => string;
export declare function getModuleLocation(name: string): string;
export declare function getOutputResult(type: string | undefined, result: TExecutorResult): Promise<object | string>;
export declare function getStepper(s: string): Promise<CStepper>;
export declare function getConfigFromBase(bases: TBase, fs?: TFileSystem): TSpecl | null;
export {};
//# sourceMappingURL=workspace-lib.d.ts.map
import nodeFS from 'fs';
import path from 'path';
import path, { dirname } from 'path';
import { DEFAULT_DEST } from '../defs.js';
import { use } from './index.js';
import { fileURLToPath } from 'url';
export async function getSteppers(stepperNames) {

@@ -19,22 +20,15 @@ const steppers = [];

}
// workspaceRoot adapted from @nrwl/devkit
const workspaceRoot = workspaceRootInner(process.cwd(), process.cwd());
function workspaceRootInner(dir, candidateRoot, fs = nodeFS) {
if (path.dirname(dir) === dir) {
return candidateRoot;
}
// FIXME circumstantial
if (fs.existsSync(path.join(dir, 'nx.json'))) {
return dir;
}
else if (fs.existsSync(path.join(dir, 'node_modules', 'nx', 'package.json'))) {
return workspaceRootInner(path.dirname(dir), dir);
}
else {
return workspaceRootInner(path.dirname(dir), candidateRoot);
}
// const workspaceRoot = workspaceRootInner(process.cwd(), process.cwd());
export const workspaceRoot = getWorkspaceRoot();
export function getPackageLocation(meta) {
return dirname(fileURLToPath(meta.url));
}
function getModuleLocation(name) {
export const getFilename = (meta) => fileURLToPath(meta.url);
export const getDirname = (meta) => fileURLToPath(new URL('.', meta.url));
function getWorkspaceRoot() {
return process.cwd();
}
export function getModuleLocation(name) {
if (name.startsWith('~')) {
return [workspaceRoot, 'node_modules', name.substr(1)].join('/');
return [workspaceRoot, 'node_modules', name.substring(1)].join('/');
}

@@ -44,3 +38,3 @@ else if (name.match(/^[a-zA-Z].*/)) {

}
return path.resolve(process.cwd(), name);
return path.resolve(workspaceRoot, name);
}

@@ -47,0 +41,0 @@ export async function getOutputResult(type, result) {

@@ -17,1 +17,2 @@ import { WorkspaceContext } from '../lib/contexts.js';

}
//# sourceMappingURL=Builder.d.ts.map
export {};
//# sourceMappingURL=Builder.test.d.ts.map

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

import { describe, test } from 'vitest';
import { WorkspaceContext } from '../lib/contexts.js';

@@ -2,0 +3,0 @@ import { OK } from '../lib/defs.js';

@@ -16,1 +16,2 @@ import { TBase, TFeature } from '../lib/defs.js';

}[];
//# sourceMappingURL=collector.d.ts.map
export {};
//# sourceMappingURL=collector.test.d.ts.map

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

import { describe, it, expect } from 'vitest';
import { basesFrom } from '../lib/util/index.js';

@@ -2,0 +3,0 @@ import { getFeaturesAndBackgrounds, shouldProcess } from './collector.js';

@@ -21,1 +21,2 @@ import { TVStep, TResolvedFeature, TExecutorResult, TStepResult, TFeatureResult, TActionResult, TWorld, AStepper, TEndFeatureCallback, CStepper, TFound } from '../lib/defs.js';

}
//# sourceMappingURL=Executor.d.ts.map
import { STAY, STAY_FAILURE, } from '../lib/defs.js';
import { getNamedToVars } from '../lib/namedVars.js';
import { actionNotOK, applyResShouldContinue, setStepperWorlds, sleep, createSteppers, findStepper } from '../lib/util/index.js';
import { actionNotOK, applyResShouldContinue, setStepperWorlds, sleep, createSteppers, findStepper, constructorName } from '../lib/util/index.js';
export class Executor {

@@ -53,3 +53,2 @@ // find the stepper and action, call it and return its result

const errorBail = (phase, error, extra) => {
console.error('error', phase, error, extra);
throw Error(error);

@@ -114,3 +113,3 @@ };

const res = await s.onFailure(result, step);
this.world.logger.error(`onFailure from ${result.in} for ${s.constructor.name}`, res);
this.world.logger.error(`onFailure from ${result.in} for ${constructorName(s)}`, res);
}

@@ -122,3 +121,3 @@ }

if (s.endFeature) {
this.world.logger.debug(`endFeature ${s.constructor.name}`);
this.world.logger.debug(`endFeature ${constructorName(s)}`);
await s.endFeature().catch((error) => {

@@ -128,3 +127,3 @@ console.error('endFeature', error);

});
this.world.logger.debug(`endedFeature ${s.constructor.name}`);
this.world.logger.debug(`endedFeature ${constructorName(s)}`);
}

@@ -146,3 +145,3 @@ }

if (s.close) {
this.world.logger.debug(`closing ${s.constructor.name}`);
this.world.logger.debug(`closing ${constructorName(s)}`);
await s.close();

@@ -149,0 +148,0 @@ }

@@ -19,1 +19,2 @@ import { TFound, TResolvedFeature, TWorld, TExpandedFeature, AStepper } from '../lib/defs.js';

}
//# sourceMappingURL=Resolver.d.ts.map
export {};
//# sourceMappingURL=Resolver.domains.test.d.ts.map

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

import { describe, test, expect } from 'vitest';
describe('validate map steps', () => {

@@ -73,3 +74,2 @@ test('placeholder', () => {

});
export {};
//# sourceMappingURL=Resolver.domains.test.js.map
import { OK, BASE_TYPES } from '../lib/defs.js';
import { namedInterpolation, getMatch } from '../lib/namedVars.js';
import { asExpandedFeatures } from '../lib/test/lib.js';
import { getActionable, describeSteppers, isLowerCase, dePolite } from '../lib/util/index.js';
import { asExpandedFeatures } from '../lib/resolver-features.js';
import { getActionable, describeSteppers, isLowerCase, dePolite, constructorName } from '../lib/util/index.js';
import { BUILT, EVENT_AFTER } from './Builder.js';

@@ -93,3 +93,3 @@ export class Resolver {

for (const stepper of this.steppers) {
const stepperName = stepper.constructor.name;
const stepperName = constructorName(stepper);
const { steps } = stepper;

@@ -96,0 +96,0 @@ for (const actionName in steps) {

export {};
//# sourceMappingURL=Resolver.test.d.ts.map

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

import { describe, it, test, expect } from 'vitest';
import { AStepper, OK } from '../lib/defs.js';
import { asExpandedFeatures, getDefaultWorld } from '../lib/test/lib.js';
import { getDefaultWorld } from '../lib/test/lib.js';
import { asExpandedFeatures } from '../lib/resolver-features.js';
import TestSteps from '../lib/test/TestSteps.js';

@@ -4,0 +6,0 @@ import { createSteppers } from '../lib/util/index.js';

@@ -19,1 +19,2 @@ import { AStepper } from '../lib/defs.js';

export default Conformance;
//# sourceMappingURL=conformance.d.ts.map

@@ -27,1 +27,2 @@ import { TNamed, AStepper } from '../lib/defs.js';

export default Credentials;
//# sourceMappingURL=credentials.d.ts.map

@@ -67,1 +67,2 @@ import { TNamed, AStepper, TWorld, TVStep } from '../lib/defs.js';

export default Haibun;
//# sourceMappingURL=haibun.d.ts.map
export {};
//# sourceMappingURL=haibun.test.d.ts.map

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

import { describe, it, expect } from 'vitest';
import { FeatureExecutor } from '../phases/Executor.js';
import { asExpandedFeatures, getDefaultWorld, getTestEnv, testWithDefaults } from '../lib/test/lib.js';
import { getDefaultWorld, getTestEnv, testWithDefaults } from '../lib/test/lib.js';
import { asExpandedFeatures } from '../lib/resolver-features.js';
import TestSteps from '../lib/test/TestSteps.js';

@@ -4,0 +6,0 @@ import Haibun from './haibun.js';

export declare function parseMatches(docs: {
[name: string]: string | undefined;
}, base: string, matches: RegExp[]): Promise<void>;
//# sourceMappingURL=parse.d.ts.map

@@ -27,1 +27,2 @@ import { AStepper, TNamed } from '../lib/defs.js';

export default Parse;
//# sourceMappingURL=parse.d.ts.map

@@ -135,1 +135,2 @@ import { Context } from '../lib/contexts.js';

}, world: TWorld) => any;
//# sourceMappingURL=vars.d.ts.map
export {};
//# sourceMappingURL=vars.test.d.ts.map

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

import { it, expect, describe } from 'vitest';
import { FeatureExecutor } from '../phases/Executor.js';

@@ -2,0 +3,0 @@ import { getDefaultWorld, getTestEnv, testWithDefaults } from '../lib/test/lib.js';

{
"name": "@haibun/core",
"type": "module",
"version": "1.32.9",
"version": "1.32.11",
"description": "",

@@ -26,5 +26,5 @@ "author": "",

"lint": "eslint -c .eslintrc.json --ext .ts,.js src",
"test": "jest",
"coverage": "jest --coverage",
"test-watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch",
"test": "vitest run",
"coverage": "vitest --coverage",
"test-watch": "vitest",
"build": "tsc -b .",

@@ -31,0 +31,0 @@ "build-watch": "tsc -b . --watch",

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

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

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

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

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

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