auto-builder-sdk
Version:
SDK for building Auto Builder workflow plugins
47 lines (46 loc) • 2.65 kB
TypeScript
/**
* Resolve the correct `BaseNodeExecutor` implementation at runtime.
*
* We cannot use a dynamic string in a static `import` statement because that
* violates the ECMAScript module spec and breaks the TypeScript → esbuild
* transform used by Vitest. Instead we rely on Node's `createRequire` helper
* which is available in ESM contexts and gives us a synchronous `require`
* function. This keeps the public surface identical while remaining compatible
* with both the Vitest environment (which uses source files directly) and the
* normal runtime (which consumes the compiled `auto-builder` package).
*/
/**
* ---------------------------------------------------------------------------
* Dynamic ESM resolution for services (no more .js shims needed!)
* ---------------------------------------------------------------------------
*/
declare const BaseNodeExecutor: any;
export { BaseNodeExecutor };
export interface PluginMetadata {
name: string;
version: string;
engines: {
'auto-builder': string;
};
main: string;
nodes: string[];
sandbox?: {
enabled?: boolean;
timeoutMs?: number;
memoryMb?: number;
};
}
export declare const definePlugin: <T extends PluginMetadata>(meta: T) => T;
export { validatePlugin, PluginSchema, type ValidPlugin } from './plugin.js';
export { makeStubContext, makeStubNode } from './testing.js';
export { registerCredential, getCredentialDef, listCredentialDefinitions, type CredentialDefinition, type CredentialProperty } from './credentials.js';
export type { INode, INodeExecutionData, IExecutionContext, INodeExecutor, } from './ab-types.js';
export { log } from './logger.js';
export { NodeOperationError, NodeApiError } from './errors.js';
export { getDb, _injectPrisma as _internalInjectPrismaClient } from './db.js';
export type { IDatabaseService, DatabaseExecutionResult, DatabaseCredentials } from './database-service.js';
export { getDatabaseService, _internalInjectDatabaseService } from './database-service.js';
declare const ParameterResolver: any;
export { ParameterResolver };
export { convertToLimitOffset, calculatePaginationMeta, validatePaginationParams, createPaginationResponse, extractPaginationParams, convertLegacyPagination, buildApiPaginationParams, parseApiPaginationResponse, addStandardPagination, validateNodePagination, PAGINATION_NODE_DEFINITION, PAGINATION_SIZE_NODE_DEFINITION, type StandardPaginationParams, type StandardPaginationResponse } from './pagination-utils.js';
export { PAGINATION_CONFIG, updatePaginationConfig, resetPaginationConfig, type PaginationConfig } from './pagination.config.js';