@nudojs/service 1.1.2 → 1.1.3

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.
@@ -4,7 +4,7 @@ import { Node } from '@babel/types';
4
4
  import { C as CallRecord } from './call-record-CkyCFkT9.js';
5
5
  import { Abs, AbsModuleExports, BCallRecord, Phi, TranspiledCallResult } from '@nudojs/core';
6
6
  import { BMemberDiag } from '@nudojs/core/internal';
7
- import { D as DiagnosticsLevel, A as AnalysisConfig } from './config-DDB588oA.js';
7
+ import { D as DiagnosticsLevel, A as AnalysisConfig } from './config-B_K4P3jl.js';
8
8
 
9
9
  declare function resolveModule(source: string, fromDir: string): {
10
10
  ast: ReturnType<typeof parse>;
@@ -1,8 +1,8 @@
1
1
  export { A as AnalysisResult, B as BindingInfo, C as CaseHint, b as CaseResult, c as CompletionItem, d as Diagnostic, e as DiagnosticSeverity, f as DiagnosticTag, D as DirectiveCaseMode, F as FunctionAnalysis, R as ReferenceInfo, S as SourceLocation, g as SymbolInfo, h as SymbolTable } from './analyzer-types-CfBrPK9L.js';
2
- export { A as AbsGraphOptions, a as AbsModuleCacheEntry, b as AbsModuleGraphResult, c as AbsModuleLoadIssue, B as BPathRunResult, d as ModuleGraphCache, e as analyzeFile, f as analyzeFileAsync, g as buildModuleGraph, h as clearAbsModuleCache, i as clearBPathCache, j as collectAbsBindingsFromGraph, l as collectCallRecords, o as collectEnvNames, p as computeDirtySet, q as defaultAbsLoadModule, r as diagnosticsLevelForFile, s as evalAbsModuleGraph, t as evictAbsModuleCacheFiles, u as evictBPathCacheForFiles, v as filterDiagnosticsByLevel, w as getAbsModuleCacheSize, x as getBPathCacheSize, z as isBPathCapable, C as locFromNode, F as resolveModule, H as shouldAnalyzeFile, I as sourceHasNudoDirectives, J as topoSortDirty, K as trimBPathCache, L as tryBPathCall, N as tryBPathCallFull, O as tryRunBPath } from './analysis-_DlXLC-L.js';
2
+ export { A as AbsGraphOptions, a as AbsModuleCacheEntry, b as AbsModuleGraphResult, c as AbsModuleLoadIssue, B as BPathRunResult, d as ModuleGraphCache, e as analyzeFile, f as analyzeFileAsync, g as buildModuleGraph, h as clearAbsModuleCache, i as clearBPathCache, j as collectAbsBindingsFromGraph, l as collectCallRecords, o as collectEnvNames, p as computeDirtySet, q as defaultAbsLoadModule, r as diagnosticsLevelForFile, s as evalAbsModuleGraph, t as evictAbsModuleCacheFiles, u as evictBPathCacheForFiles, v as filterDiagnosticsByLevel, w as getAbsModuleCacheSize, x as getBPathCacheSize, z as isBPathCapable, C as locFromNode, F as resolveModule, H as shouldAnalyzeFile, I as sourceHasNudoDirectives, J as topoSortDirty, K as trimBPathCache, L as tryBPathCall, N as tryBPathCallFull, O as tryRunBPath } from './analysis-XrBrG8iG.js';
3
3
  export { C as CallRecord } from './call-record-CkyCFkT9.js';
4
4
  import '@babel/types';
5
5
  import '@nudojs/core';
6
6
  import '@nudojs/parser';
7
7
  import '@nudojs/core/internal';
8
- import './config-DDB588oA.js';
8
+ import './config-B_K4P3jl.js';
package/dist/analysis.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  filterDiagnosticsByLevel,
4
4
  hasNudoDirectives,
5
5
  shouldAnalyzeFile
6
- } from "./chunk-EG6FYQLI.js";
6
+ } from "./chunk-LBAKRTI2.js";
7
7
  import {
8
8
  analyzeFile,
9
9
  analyzeFileAsync,
@@ -28,8 +28,8 @@ import {
28
28
  tryBPathCall,
29
29
  tryBPathCallFull,
30
30
  tryRunBPath
31
- } from "./chunk-NQXAF4LJ.js";
32
- import "./chunk-ZXVAX7DE.js";
31
+ } from "./chunk-H2LVQGKH.js";
32
+ import "./chunk-COMUCF3K.js";
33
33
  export {
34
34
  analyzeFile,
35
35
  analyzeFileAsync,
@@ -529,14 +529,21 @@ import { setBForkBudgetLimit, getBForkBudgetLimit, MAX_B_TOTAL_FORKS } from "@nu
529
529
  function checkConfig(config) {
530
530
  const raw = config?.check;
531
531
  const rawEntry = raw?.entryThrows;
532
+ const rawProfile = raw?.profile;
532
533
  let entryThrows = "error";
533
- if (rawEntry === "off" || rawEntry === "warning" || rawEntry === "error") {
534
+ const entryValid = rawEntry === "off" || rawEntry === "warning" || rawEntry === "error";
535
+ if (entryValid) {
534
536
  entryThrows = rawEntry;
535
- } else if (rawEntry !== void 0) {
536
- process.stderr?.write?.(
537
- `nudo.check.entryThrows: invalid value ${JSON.stringify(rawEntry)} (expected error|warning|off); using error
537
+ } else {
538
+ if (rawEntry !== void 0) {
539
+ process.stderr?.write?.(
540
+ `nudo.check.entryThrows: invalid value ${JSON.stringify(rawEntry)} (expected error|warning|off); using error
538
541
  `
539
- );
542
+ );
543
+ }
544
+ if (rawProfile === "adoption" || rawProfile === "strict") {
545
+ entryThrows = rawProfile === "adoption" ? "warning" : "error";
546
+ }
540
547
  }
541
548
  const ignore = Array.isArray(raw?.ignoreThrows) ? raw.ignoreThrows.filter((s) => typeof s === "string" && s.length > 0) : [];
542
549
  return { entryThrows, ignoreThrows: ignore };
@@ -8,7 +8,7 @@ import {
8
8
  preloadPathEnvs,
9
9
  resolveNpmJsEntry,
10
10
  resolveNpmNudo
11
- } from "./chunk-ZXVAX7DE.js";
11
+ } from "./chunk-COMUCF3K.js";
12
12
 
13
13
  // src/analyzer-module-load.ts
14
14
  import { readFileSync, existsSync, statSync } from "fs";
@@ -2,7 +2,7 @@ import {
2
2
  analysisConfig,
3
3
  findProjectConfig,
4
4
  matchesEmitAllowlist
5
- } from "./chunk-ZXVAX7DE.js";
5
+ } from "./chunk-COMUCF3K.js";
6
6
 
7
7
  // src/target-path.ts
8
8
  function isNudoTargetPath(path) {
@@ -41,6 +41,8 @@ type NudoConfig = {
41
41
  };
42
42
  /** check 门禁(design-cli-semantics §3) */
43
43
  check?: {
44
+ /** L2 预设:adoption → entryThrows=warning,strict → error(显式 entryThrows 优先) */
45
+ profile?: "adoption" | "strict";
44
46
  /** L2 入口 may-throw:error | warning | off(默认 error) */
45
47
  entryThrows?: "error" | "warning" | "off";
46
48
  /** L2 --ignore-throws 类型名列表 */
@@ -9,13 +9,13 @@ import {
9
9
  analyzeFileAsync,
10
10
  defaultLoadModule,
11
11
  evalAbsModuleGraph
12
- } from "../chunk-NQXAF4LJ.js";
12
+ } from "../chunk-H2LVQGKH.js";
13
13
  import {
14
14
  diskCacheRoot,
15
15
  findProjectConfig,
16
16
  interfaceConfig,
17
17
  matchesEmitAllowlist
18
- } from "../chunk-ZXVAX7DE.js";
18
+ } from "../chunk-COMUCF3K.js";
19
19
 
20
20
  // src/emit/interface-surface.ts
21
21
  import { readFileSync, existsSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  export { C as CallRecord } from '../call-record-CkyCFkT9.js';
2
2
  import { Abs } from '@nudojs/core';
3
3
  export { L as LoadedEnv, l as loadEnvs, a as loadEnvsAsync, p as preloadPathEnvs } from '../env-loader-fj0TSCcA.js';
4
- export { A as AnalysisConfig, a as AnalysisMode, C as CheckConfig, D as DiagnosticsLevel, I as InterfaceConfig, N as NudoConfig, b as analysisConfig, c as checkConfig, d as diskCacheRoot, f as findProjectConfig, i as interfaceConfig, m as matchesEmitAllowlist } from '../config-DDB588oA.js';
4
+ export { A as AnalysisConfig, a as AnalysisMode, C as CheckConfig, D as DiagnosticsLevel, I as InterfaceConfig, N as NudoConfig, b as analysisConfig, c as checkConfig, d as diskCacheRoot, f as findProjectConfig, i as interfaceConfig, m as matchesEmitAllowlist } from '../config-B_K4P3jl.js';
5
5
 
6
6
  /**
7
7
  * 内置类原型成员近似表(Abs 声明)。
@@ -13,7 +13,7 @@ import {
13
13
  matchesEmitAllowlist,
14
14
  preloadPathEnvs,
15
15
  resolveNpmNudo
16
- } from "../chunk-ZXVAX7DE.js";
16
+ } from "../chunk-COMUCF3K.js";
17
17
  export {
18
18
  BUILTIN_PROTOTYPE_METHOD_APPROXIMATIONS,
19
19
  analysisConfig,
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { a as AnalyzeLoadModule, D as DirectiveCaseMode, A as AnalysisResult } from './analyzer-types-CfBrPK9L.js';
2
2
  export { B as BindingInfo, C as CaseHint, b as CaseResult, c as CompletionItem, d as Diagnostic, e as DiagnosticSeverity, f as DiagnosticTag, F as FunctionAnalysis, R as ReferenceInfo, S as SourceLocation, g as SymbolInfo, h as SymbolTable } from './analyzer-types-CfBrPK9L.js';
3
- export { A as AbsGraphOptions, a as AbsModuleCacheEntry, b as AbsModuleGraphResult, c as AbsModuleLoadIssue, B as BPathRunResult, E as EnvHarvestConflict, M as MergeHarvestOptions, d as ModuleGraphCache, e as analyzeFile, f as analyzeFileAsync, g as buildModuleGraph, h as clearAbsModuleCache, i as clearBPathCache, j as collectAbsBindingsFromGraph, k as collectBPathReplacements, l as collectCallRecords, m as collectEnvGlobals, n as collectEnvModules, o as collectEnvNames, p as computeDirtySet, q as defaultAbsLoadModule, r as diagnosticsLevelForFile, s as evalAbsModuleGraph, t as evictAbsModuleCacheFiles, u as evictBPathCacheForFiles, v as filterDiagnosticsByLevel, w as getAbsModuleCacheSize, x as getBPathCacheSize, y as getEnvHarvestConflictCollector, z as isBPathCapable, C as locFromNode, D as mergeHarvestUnderEnv, F as resolveModule, G as setEnvHarvestConflictCollector, H as shouldAnalyzeFile, I as sourceHasNudoDirectives, J as topoSortDirty, K as trimBPathCache, L as tryBPathCall, N as tryBPathCallFull, O as tryRunBPath } from './analysis-_DlXLC-L.js';
3
+ export { A as AbsGraphOptions, a as AbsModuleCacheEntry, b as AbsModuleGraphResult, c as AbsModuleLoadIssue, B as BPathRunResult, E as EnvHarvestConflict, M as MergeHarvestOptions, d as ModuleGraphCache, e as analyzeFile, f as analyzeFileAsync, g as buildModuleGraph, h as clearAbsModuleCache, i as clearBPathCache, j as collectAbsBindingsFromGraph, k as collectBPathReplacements, l as collectCallRecords, m as collectEnvGlobals, n as collectEnvModules, o as collectEnvNames, p as computeDirtySet, q as defaultAbsLoadModule, r as diagnosticsLevelForFile, s as evalAbsModuleGraph, t as evictAbsModuleCacheFiles, u as evictBPathCacheForFiles, v as filterDiagnosticsByLevel, w as getAbsModuleCacheSize, x as getBPathCacheSize, y as getEnvHarvestConflictCollector, z as isBPathCapable, C as locFromNode, D as mergeHarvestUnderEnv, F as resolveModule, G as setEnvHarvestConflictCollector, H as shouldAnalyzeFile, I as sourceHasNudoDirectives, J as topoSortDirty, K as trimBPathCache, L as tryBPathCall, N as tryBPathCallFull, O as tryRunBPath } from './analysis-XrBrG8iG.js';
4
4
  import { C as CallRecord } from './call-record-CkyCFkT9.js';
5
5
  export { c as clearPathEnvCaches, g as getPathEnvCacheSizes } from './env-loader-fj0TSCcA.js';
6
- import { N as NudoConfig } from './config-DDB588oA.js';
7
- export { A as AnalysisConfig, a as AnalysisMode, C as CheckConfig, e as DEFAULT_ANALYSIS_MODE, D as DiagnosticsLevel, I as InterfaceConfig, b as analysisConfig, g as applyBForkBudgetFromConfig, c as checkConfig, h as currentBForkBudgetLimit, d as diskCacheRoot, f as findProjectConfig, i as interfaceConfig, m as matchesEmitAllowlist } from './config-DDB588oA.js';
6
+ import { N as NudoConfig } from './config-B_K4P3jl.js';
7
+ export { A as AnalysisConfig, a as AnalysisMode, C as CheckConfig, e as DEFAULT_ANALYSIS_MODE, D as DiagnosticsLevel, I as InterfaceConfig, b as analysisConfig, g as applyBForkBudgetFromConfig, c as checkConfig, h as currentBForkBudgetLimit, d as diskCacheRoot, f as findProjectConfig, i as interfaceConfig, m as matchesEmitAllowlist } from './config-B_K4P3jl.js';
8
8
  import { File, Node } from '@babel/types';
9
9
  import { PolyFn, Abs, AbsModuleExports } from '@nudojs/core';
10
10
  import { L as LoadModule } from './what-if-mIo7I5Ii.js';
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  hasNudoDirectives,
5
5
  isNudoTargetPath,
6
6
  shouldAnalyzeFile
7
- } from "./chunk-EG6FYQLI.js";
7
+ } from "./chunk-LBAKRTI2.js";
8
8
  import {
9
9
  ANALYSIS_ABI,
10
10
  DiskCache,
@@ -72,7 +72,7 @@ import {
72
72
  tryBPathCall,
73
73
  tryBPathCallFull,
74
74
  tryRunBPath
75
- } from "./chunk-NQXAF4LJ.js";
75
+ } from "./chunk-H2LVQGKH.js";
76
76
  import {
77
77
  DEFAULT_ANALYSIS_MODE,
78
78
  DEFAULT_SESSION_CACHE_LIMITS,
@@ -90,7 +90,7 @@ import {
90
90
  resetSessionCacheLimitState,
91
91
  setSessionCacheFromProject,
92
92
  setSessionCacheLimits
93
- } from "./chunk-ZXVAX7DE.js";
93
+ } from "./chunk-COMUCF3K.js";
94
94
 
95
95
  // src/static-imports.ts
96
96
  import { parse } from "@nudojs/parser";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nudojs/service",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "engines": {
5
5
  "node": ">=20"
6
6
  },
@@ -51,12 +51,12 @@
51
51
  "registry": "https://registry.npmjs.org"
52
52
  },
53
53
  "dependencies": {
54
- "@nudojs/core": "1.1.2",
55
- "@nudojs/parser": "1.1.2",
56
- "@nudojs/env": "0.4.4",
54
+ "@nudojs/core": "1.1.3",
55
+ "@nudojs/parser": "1.1.3",
56
+ "@nudojs/env": "0.4.5",
57
57
  "@babel/traverse": "^8.0.6",
58
58
  "@babel/types": "^8.0.6",
59
- "@nudojs/harvester": "0.2.10"
59
+ "@nudojs/harvester": "0.2.11"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/node": "^26.6.2"