@nudojs/core 1.2.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{check-report-0B9Z66n0.d.ts → check-report-BWmfy810.d.ts} +54 -2
- package/dist/{chunk-TOURNNEA.js → chunk-5YNR4Q7E.js} +382 -130
- package/dist/{chunk-4V3CRVSD.js → chunk-CKH6GQAI.js} +3222 -2095
- package/dist/exec.d.ts +598 -3
- package/dist/exec.js +13 -1
- package/dist/index.d.ts +14 -29
- package/dist/index.js +338 -225
- package/dist/internal.d.ts +111 -7
- package/dist/internal.js +65 -3
- package/dist/{hof-types-DqDpAxfh.d.ts → run-Dk08Q5zl.d.ts} +206 -2
- package/package.json +1 -1
- package/dist/index-BNiZvVHw.d.ts +0 -739
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { c as AstEnv, A as Abs, b as Phi, C as Confidence, T as Term, H as HofCollectCtx, S as Shape, a as Pred, R as RelSource,
|
|
2
|
-
export {
|
|
1
|
+
import { c as AstEnv, A as Abs, b as Phi, C as Confidence, T as Term, H as HofCollectCtx, S as Shape, a as Pred, R as RelSource, G as HofSite, I as AbsModuleExports, J as RunTranspiledOptions } from './run-Dk08Q5zl.js';
|
|
2
|
+
export { K as $assignRecord, L as $callNamed, N as $recordBinding, O as EvalAbsAssignRecord, Q as EvalCallRecord, U as EvalFallback, V as ImplicationOracle, W as LiteralValue, X as MAX_EVAL_CALL_DEPTH, Y as MAX_EVAL_TOTAL_CALLS, P as PrimName, Z as RUNTIME_IMPORT_RE, _ as TYPEOF_NAMES, a0 as TranspiledCallResult, a1 as TypeofName, a2 as abs, a3 as absToString, a4 as and, a5 as anyAbs, a6 as anyVar, a7 as app, a8 as assumeFinite, a9 as bigintLit, aa as bindImports, ab as bindingsOf, ac as bool, ad as boolLit, ae as callTranspiledExport, af as callTranspiledExportFull, ag as collectAbsExports, ah as confJoin, ai as emptyPhi, aj as eq, ak as evalExprAbs, al as ge, am as geNum, an as getEvalCallCollector, ao as getImplicationOracle, ap as gt, aq as gtNum, ar as implies, as as isBigPrim, at as isExactLit, au as isNumPrim, av as isStrPrim, aw as le, ax as leNum, ay as lit, az as litValue, aA as lt, aB as ltNum, aC as namespaceAbsOf, aD as ne, aE as negatePred, aF as never, aG as not, aH as noteEvalCallRecord, aI as noteEvalFallback, aJ as num, aK as numLit, aL as numVar, aM as obj, aN as or, aO as pFalse, aP as pTrue, aQ as phiAnd, aR as predEquals, aS as predToString, aT as predVars, aU as primToTypeof, aV as ptypeof, aW as resetEvalCallBudget, aX as runTranspiled, aY as runTranspiledOptionsMemoKey, aZ as setEvalAssignCollector, a_ as setEvalBindingSink, a$ as setEvalCallCollector, b0 as setEvalFallbackCollector, b1 as setImplicationOracle, b2 as shapeOfTerm, b3 as shapeToString, b4 as simplifyTerm, b5 as str, b6 as strLit, b7 as substPred, b8 as termEquals, b9 as termToString, ba as tryRunTranspiled, bb as unknown, bc as v } from './run-Dk08Q5zl.js';
|
|
3
3
|
import { Node } from '@babel/types';
|
|
4
|
-
import { p as parseSource, L as LeakBudget, E as EffectiveInterfaceOpts, b as LoadDepsFingerprint,
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
export { $ as $add, a as $arguments, b as $arr, c as $arrMutContainer, d as $arrRest, e as $arrWithHoles, f as $assignRecord, g as $async, h as $asyncReturn, i as $await, j as $bitand, k as $bitnot, l as $bitor, m as $bitxor, n as $call, o as $callNamed, p as $catchVal, q as $class, r as $classExpr, s as $collectionForEach, t as $concat, u as $copy, v as $del, w as $delRes, x as $div, y as $dynamicImport, z as $elems, B as $eq, C as $eqLoose, D as $fnVal, E as $for, F as $forInKeys, G as $forIter, H as $forOf, I as $fork, J as $ge, K as $gen, L as $get, M as $gt, N as $idx, O as $idxSet, P as $importMeta, Q as $in, S as $instanceof, T as $instanceofNonIdent, U as $invoke, V as $invokeSuper, W as $isBreakTo, X as $isForkExit, Y as $join, Z as $le, _ as $len, a0 as $lit, a1 as $loopBreak, a2 as $loopContinue, a3 as $loopReturn, a4 as $lt, a5 as $mod, a6 as $mul, a7 as $ne, a8 as $neLoose, a9 as $neg, aa as $new, ab as $not, ac as $nullishTest, ad as $obj, ae as $objAccessor, af as $objRest, ag as $optionalGet, ah as $optionalInvoke, ai as $orDefault, aj as $pow, ak as $pushLoopExit, al as $rawThis, am as $reStateCall, an as $recordBinding, ao as $regex, ap as $rethrowIfNudoReturn, aq as $set, ar as $setKey, as as $shl, at as $shr, au as $spread, av as $staticInvoke, aw as $sub, ax as $super, ay as $switch, az as $thisGet, aA as $thisSet, aB as $throw, aC as $toNumber, aD as $toNumeric, aE as $tryCurrentMark, aF as $tryDetachSoftCatch, aG as $tryDigestSoftCatch, aH as $tryDiscardSoft, aI as $tryMark, aJ as $tryOrphanSoft, aK as $tryPopMark, aL as $tryReleaseSoftCatch, aM as $tryReleaseSoftOut, aN as $tryTakeSince, aO as $typeof, aP as $unknown, aQ as $updateAdd, aR as $updateSub, aS as $ushr, aT as $while, aU as $whileSeq, aV as $yield, aW as DEFAULT_MAX_LOOP_ITERS, aX as EvalAbsAssignRecord, aY as EvalCallRecord, aZ as EvalClassSpec, a_ as EvalFallback, a$ as MAX_EVAL_CALL_DEPTH, b0 as MAX_EVAL_TOTAL_CALLS, b1 as NudoLoopSignal, b2 as NudoReturn, b3 as NudoThrow, b4 as NudoUnsupportedError, b5 as RUNTIME_IMPORT_RE, b6 as TranspileOptions, b7 as TranspiledCallResult, b8 as asAbsVal, b9 as bindImports, ba as bindingsOf, bb as callAtFunctionBoundary, bc as callTranspiledExport, bd as callTranspiledExportFull, be as clearBClasses, bf as clearStaleTermPred, bg as collectAbsExports, bh as currentExecPhi, bi as evalExprAbs, bj as fillTuple, bk as foldRequireSpecArg, bl as foldStaticStringExpr, bm as getEvalCallCollector, bn as getEvalClass, bo as isArrMutator, bp as isDefinitelyFalse, bq as isDefinitelyTrue, br as isNudoBreak, bs as isNudoContinue, bt as isNudoReturn, bu as isNudoThrow, bv as litTruth, bw as lookupObjAccessor, bx as namespaceNameOf, by as noteEvalCallRecord, bz as noteEvalFallback, bA as pushLoopExit, bB as pushThrowExit, bC as registerEvalClass, bD as resetEvalCallBudget, bE as runTranspiled, bF as runTranspiledOptionsMemoKey, bG as runWithLoopExits, bH as runtimeImportOf, bI as setEvalAssignCollector, bJ as setEvalBindingSink, bK as setEvalCallCollector, bL as setEvalFallbackCollector, bM as takeLoopExits, bN as takeThrowExits, bO as transpile, bP as transpileBodyNode, bQ as transpileExpression, bR as transpileFile, bS as transpileSource, bT as tryRunTranspiled, bU as withExecPhi } from './index-BNiZvVHw.js';
|
|
4
|
+
import { p as parseSource, L as LeakBudget, E as EffectiveInterfaceOpts, b as LoadDepsFingerprint, j as CheckReport, N as NudoConstraint } from './check-report-BWmfy810.js';
|
|
5
|
+
export { k as CheckAction, C as CheckIssue, o as CheckJson, q as CheckJsonMulti, u as ConstraintBuilder, D as Diagnostic, v as EffectiveInterface, G as GitlabCodeQualityIssue, w as InterfaceDiag, I as InterfaceSource, x as InterfaceTierInfo, a as InterfaceTierOpts, y as NamedImport, z as NudoField, A as NudoFnConstraint, B as NudoSidecarError, F as NudoSig, R as RefineDiag, H as RefineEntry, J as RefineResolveOpts, S as SELF, K as actionsForIssue, O as andC, P as any, Q as array, T as boolean, U as checkArg, V as checkCall, W as constraintAdmitsNullish, X as constraintToEntryAbs, Y as drainPromiseMicros, Z as effectiveInterface, _ as enterPromiseExecutorScope, $ as evalPromiseCtor, a0 as evalPromiseMethod, a1 as evalPromiseStatic, a2 as execNudoModule, a3 as extractDeclaredThrows, a4 as extractFnBudget, a5 as extractNudoImports, a6 as extractRefineReturnFromSource, a7 as extractRefinesFromSource, a8 as fn, a9 as fnConstraintToEntryReqs, aa as formatCheckReport, ab as formatConstraint, ac as formatDiagnostics, ad as formatEffectiveInterfaceDisplay, ae as formatGithubAnnotations, af as formatGitlabCodeQuality, ag as formatInterfaceTierLine, ah as generatedExportNames, ai as getParseSourceCacheSize, aj as getTerm, ak as instantiateConstraint, al as interfaceDiagCount, am as interfaceSourceOf, an as interfaceTierOf, ao as isIntFlag, ap as isNodeModulesPath, aq as isNudoConstraint, ar as leavePromiseExecutorScope, as as lenTerm, at as litC, au as localNamedExports, av as notePromiseExecutorFork, aw as nullable, ax as number, ay as omit, az as partial, aA as pick, aB as queuePromiseMicro, aC as refineDiagCount, aD as refineToIndexedFull, aE as resetNudoModuleExecCache, aF as resetParseSourceCache, aG as resetSidecarLoadFailureCache, aH as serializeCheckJson, aI as serializeCheckJsonMulti, aJ as setInterfaceDiagCollector, aK as setRefineDiagCollector, aL as shape, aM as sidecarClosureFingerprint, aN as sidecarPathOf, aO as string, aP as takeInterfaceDiags, aQ as takeInterfaceDiagsSince, aR as takeRefineDiags, aS as takeRefineDiagsSince, aT as throwConstraintToKinds, aU as union } from './check-report-BWmfy810.js';
|
|
6
|
+
export { $add, $arguments, $arr, $arrMutContainer, $arrRest, $arrWithHoles, $async, $asyncReturn, $await, $bitand, $bitnot, $bitor, $bitxor, $call, $catchVal, $class, $classExpr, $collectionForEach, $concat, $copy, $del, $delRes, $div, $dynamicImport, $elems, $eq, $eqLoose, $fnVal, $for, $forInKeys, $forIter, $forOf, $fork, $ge, $gen, $get, $gt, $idx, $idxSet, $importMeta, $in, $instanceof, $instanceofNonIdent, $invoke, $invokeSuper, $isBreakTo, $isForkExit, $join, $le, $len, $lit, $loopBreak, $loopContinue, $loopReturn, $lt, $mod, $mul, $ne, $neLoose, $neg, $new, $not, $nullishTest, $obj, $objAccessor, $objRest, $optionalGet, $optionalInvoke, $orDefault, $pow, $pushLoopExit, $rawThis, $reStateCall, $regex, $rethrowIfNudoReturn, $set, $setKey, $shl, $shr, $spread, $staticInvoke, $sub, $super, $switch, $thisGet, $thisSet, $throw, $toNumber, $toNumeric, $tryCurrentMark, $tryDetachSoftCatch, $tryDigestSoftCatch, $tryDiscardSoft, $tryMark, $tryOrphanSoft, $tryPopMark, $tryReleaseSoftCatch, $tryReleaseSoftOut, $tryTakeSince, $typeof, $unknown, $updateAdd, $updateSub, $ushr, $while, $whileSeq, $yield, DEFAULT_MAX_LOOP_ITERS, EvalClassSpec, NudoLoopSignal, NudoReturn, NudoThrow, NudoUnsupportedError, TranspileOptions, asAbsVal, callAtFunctionBoundary, clearBClasses, clearStaleTermPred, currentExecPhi, fillTuple, foldRequireSpecArg, foldStaticStringExpr, getEvalClass, isArrMutator, isDefinitelyFalse, isDefinitelyTrue, isNudoBreak, isNudoContinue, isNudoReturn, isNudoThrow, litTruth, lookupObjAccessor, namespaceNameOf, pushLoopExit, pushThrowExit, registerEvalClass, runWithLoopExits, runtimeImportOf, takeLoopExits, takeThrowExits, transpile, transpileBodyNode, transpileExpression, transpileFile, transpileSource, withExecPhi } from './exec.js';
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* AstEnv:抽象求值环境类型面(ast-eval 删除后保留)。
|
|
@@ -494,7 +493,8 @@ declare function evalJsonMethod(name: string, args: Abs[]): Abs | undefined;
|
|
|
494
493
|
declare function evalNumberStatic(name: string, args: Abs[]): Abs | undefined;
|
|
495
494
|
|
|
496
495
|
/**
|
|
497
|
-
* 全局转换函数(parseInt / Number / String / Boolean / Object / Array / Symbol …)
|
|
496
|
+
* 全局转换函数(parseInt / Number / String / Boolean / Object / Array / Symbol / BigInt …)
|
|
497
|
+
* 以及无 `new` 的原生构造器调用(Error 家族 / Map / Set / Promise …)。
|
|
498
498
|
*/
|
|
499
499
|
|
|
500
500
|
declare function evalGlobalFn(name: string, args: Abs[]): Abs | undefined;
|
|
@@ -560,27 +560,6 @@ declare const OBJECT_PROTO_METHOD_NAMES: Set<string>;
|
|
|
560
560
|
declare function objectProtoBrand(): Abs;
|
|
561
561
|
declare function isObjectProtoBrand(a: Abs | undefined): boolean;
|
|
562
562
|
|
|
563
|
-
/**
|
|
564
|
-
* Promise 构造 / then 链 / 静态方法 + micro 队列
|
|
565
|
-
*/
|
|
566
|
-
|
|
567
|
-
declare function enterPromiseExecutorScope(): void;
|
|
568
|
-
declare function leavePromiseExecutorScope(): number;
|
|
569
|
-
/** $fork 在 executor 内发生时打点(多臂 resolve 需 join,不得 first-wins 假精确) */
|
|
570
|
-
declare function notePromiseExecutorFork(): void;
|
|
571
|
-
declare function queuePromiseMicro(task: () => void): void;
|
|
572
|
-
declare function drainPromiseMicros(): void;
|
|
573
|
-
/**
|
|
574
|
-
* new Promise(executor):调用 executor(resolve, reject),收集 resolve 实参作为
|
|
575
|
-
* promise inner。原生只认第一次 settle——顺序双 resolve 取第一次;执行器内
|
|
576
|
-
* $fork 分叉时各臂 settle 值 join(路径敏感,不得 first-wins 假精确)。
|
|
577
|
-
* reject 不填 resolved 通道;永不 settle / 抽象 fn / 执行抛 → promise<unknown>。
|
|
578
|
-
*/
|
|
579
|
-
declare function evalPromiseCtor(args: Abs[]): Abs;
|
|
580
|
-
/** then/catch/finally:可映射回调 → 新 inner;做不到诚实 promise<unknown> */
|
|
581
|
-
declare function evalPromiseMethod(name: string, recv: Abs, args: Abs[]): Abs | undefined;
|
|
582
|
-
declare function evalPromiseStatic(name: string, args: Abs[]): Abs | undefined;
|
|
583
|
-
|
|
584
563
|
/**
|
|
585
564
|
* Error 家族 + evalBuiltinNew / evalBuiltinInstanceMethod + namespace 分派
|
|
586
565
|
*/
|
|
@@ -968,6 +947,12 @@ type AstParam = {
|
|
|
968
947
|
declare function formalParamsFromNodes(params: AstParam[] | undefined | null): FormalParam[];
|
|
969
948
|
/** 求值/签名用形参名(与 analyzer extractParamNames / dts 对齐) */
|
|
970
949
|
declare function formalParamDisplayNames(formals: FormalParam[]): string[];
|
|
950
|
+
/**
|
|
951
|
+
* 签名展示名(C4.1 #64):解构形参渲染为 `{ grade, findings }`,
|
|
952
|
+
* 不落回求值占位 `_p0`——否则读签名的人以为没有契约。
|
|
953
|
+
* 求值/内部键仍用 formalParamDisplayNames(`_p0`)。
|
|
954
|
+
*/
|
|
955
|
+
declare function formalParamSignatureNames(formals: FormalParam[]): string[];
|
|
971
956
|
/** 侧车契约可绑定的参数名全集 */
|
|
972
957
|
declare function contractParamNameSet(formals: FormalParam[]): Set<string>;
|
|
973
958
|
/**
|
|
@@ -1215,4 +1200,4 @@ declare function absToConstraint(a: Abs): NudoConstraint | undefined;
|
|
|
1215
1200
|
*/
|
|
1216
1201
|
declare function joinThenProject(absList: Abs[]): NudoConstraint | undefined;
|
|
1217
1202
|
|
|
1218
|
-
export { Abs, type AbsAssignRecord, type AbsCallRecord, type AbsFnImpl, AbsModuleExports, type AbsSigImpl, AstEnv, type CheckOptions, CheckReport, Confidence, EffectiveInterfaceOpts, type Environment, type ExtState, type FnAbs, type FormalParam, type FormatOptions, HofCollectCtx, HofSite, type LeqResult, type MockHelper, NudoConstraint, OBJECT_PROTO_METHOD_NAMES, type ObjShape, Phi, type PolyFn, Pred, type PropFlags, RelSource, RunTranspiledOptions, Shape, type Slot, Term, type TypeParam, absFunction, absShapeKey, absToConstraint, add, alphaOf, applyCallbackAbs, applyCallbackValue, asAbs, assignSourceSlots, attachFnImpl, beginCollectionFork, betaOf, bitandAbs, bitnotAbs, bitorAbs, bitxorAbs, buildArgsFromAssume, builtinCtorAbs, builtinCtorNameOf, callAbsMethod, canonicalArrayIndex, checkSource, clearCollectionTables, cmp, collectAbsFreeVars, collectionElementJoin, collectionExactLen, contractParamNameSet, createEnvironment, createHofCollectCtx, ctorArgDefinitelyInvalid, ctorNameOfRecv, currentPhi, definitelyNotNullishShape, describePhi, div,
|
|
1203
|
+
export { Abs, type AbsAssignRecord, type AbsCallRecord, type AbsFnImpl, AbsModuleExports, type AbsSigImpl, AstEnv, type CheckOptions, CheckReport, Confidence, EffectiveInterfaceOpts, type Environment, type ExtState, type FnAbs, type FormalParam, type FormatOptions, HofCollectCtx, HofSite, type LeqResult, type MockHelper, NudoConstraint, OBJECT_PROTO_METHOD_NAMES, type ObjShape, Phi, type PolyFn, Pred, type PropFlags, RelSource, RunTranspiledOptions, Shape, type Slot, Term, type TypeParam, absFunction, absShapeKey, absToConstraint, add, alphaOf, applyCallbackAbs, applyCallbackValue, asAbs, assignSourceSlots, attachFnImpl, beginCollectionFork, betaOf, bitandAbs, bitnotAbs, bitorAbs, bitxorAbs, buildArgsFromAssume, builtinCtorAbs, builtinCtorNameOf, callAbsMethod, canonicalArrayIndex, checkSource, clearCollectionTables, cmp, collectAbsFreeVars, collectionElementJoin, collectionExactLen, contractParamNameSet, createEnvironment, createHofCollectCtx, ctorArgDefinitelyInvalid, ctorNameOfRecv, currentPhi, definitelyNotNullishShape, describePhi, div, emptyEnv, endCollectionFork, errorBrandAbs, evalArrayStatic, evalBuiltinInstanceMethod, evalBuiltinNew, evalDateCtor, evalDateMethod, evalDateStatic, evalGlobalFn, evalJsonMethod, evalMathMethod, evalNamespaceCall, evalNumberStatic, evalObjectMethod, evalObjectProtoMethod, evalRegExpCtor, evalRegExpMethod, evalStringStatic, evalSymbolCtor, evictCheckSourceMemoForPaths, evictGeneralizeMemoForPaths, extStateOf, extractFn, falseConstraint, fnOf, formalParamDisplayNames, formalParamSignatureNames, formalParamsFromNodes, formatAbs, formatAbsMultiline, formatShape, formatShapeSlot, generalizeAll, generalizeFromAst, getAbsProperty, getFnImpl, getGeneralizeMemoSize, getPropFlags, getSlot, hostBuiltinCtorName, instantiateReturn, isErrorCtorName, isMapAbs, isNullProtoObj, isNullishLitAbs, isObj, isObjectProtoBrand, isRelFn, isSetAbs, isSymbolAbs, joinAbs, joinFunctions, joinObjects, joinThenProject, joinValues, leqAbs, listFunctionNames, literalMeetsConstraint, locateContractParam, looseEqAbs, makeArrayCtorAbs, makeMapAbs, makeSetAbs, makeSum, makeSymbolAbs, mapClearEntries, mapDeleteEntry, mapElementFallback, mapEntriesAbs, mapGetEntry, mapHasEntry, mapSetEntry, mapSizeAbs, mapValuesAbs, markExtState, markNullProtoObj, markPureFn, matchRelIdentLit, mergeCollectionArms, migrateInvariants, migrateNullProto, mock, mod, mul, negAbs, notAbs, noteCollectionWrite, objOf, objectProtoBrand, objectProtoMethodAbs, parseSource, popCollectionArm, popPhi, powAbs, projectFlatMapResult, promoteParamShape, propertyKeyOf, protoBrandAbs, protoOfRecv, pureFnNameOf, pushCollectionArm, pushPhi, refineAbsForRelTrue, regexBrandAbsFrom, relationFingerprint, relationFn, requiredFnArity, resetCheckSourceMemo, resetGeneralizeMemo, resetPhi, setAddEntry, setApplyCallbackHost, setClearEntries, setDeleteEntry, setElementsAbs, setHasEntry, setPropFlags, setSizeAbs, shapeOnlyFn, shlAbs, shrAbs, snapshotAbs, spread, spy, strictEqAbs, stringOfSymbol, stripTypes, stub, sub, substAbs, substPredAbs, symbolDescriptionAbs, symbolIdOf, toNumberAbs, trueConstraint, tryMakeRegexAbs, tryPromoteDirectCall, tryPromoteForOfIteratee, tryPromoteHofCallback, tryPromoteReceiverAsArr, typeofAbs, undefAbs, ushrAbs, withPhiConstraint, withVar };
|