@kubb/core 5.0.0-beta.102 → 5.0.0-beta.104
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/index.cjs +121 -92
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +122 -93
- package/dist/index.js.map +1 -1
- package/dist/mocks.cjs +10 -5
- package/dist/mocks.cjs.map +1 -1
- package/dist/mocks.d.ts +1 -1
- package/dist/mocks.js +10 -5
- package/dist/mocks.js.map +1 -1
- package/dist/{types-B14Ba9P7.d.ts → types-D116CBzm.d.ts} +69 -5
- package/dist/{usingCtx-CZyLSqds.cjs → usingCtx-BYOZEkiy.cjs} +52 -16
- package/dist/usingCtx-BYOZEkiy.cjs.map +1 -0
- package/dist/{usingCtx-BNggxUEL.js → usingCtx-C24YU3KM.js} +47 -17
- package/dist/usingCtx-C24YU3KM.js.map +1 -0
- package/package.json +2 -2
- package/dist/usingCtx-BNggxUEL.js.map +0 -1
- package/dist/usingCtx-CZyLSqds.cjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __name } from "./rolldown-runtime-C0LytTxp.js";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as PluginFactoryOptions, A as Kubb, At as DiagnosticDoc, B as Exclude, Bt as Hookable, C as KubbWarnContext, Ct as Reporter, D as CreateKubbOptions, Dt as createReporter, E as UserConfig, Et as UserReporter, F as NodeCache, Ft as PerformanceDiagnostic, G as KubbPluginSetupContext, H as Group, Ht as AdapterFactoryOptions, I as KubbDriver, It as ProblemCode, J as Output, K as KubbPluginStartContext, L as FileManagerHooks, Lt as ProblemDiagnostic, M as Generator, Mt as DiagnosticLocation, N as GeneratorContext, Nt as DiagnosticSeverity, O as GenerateOptions, Ot as logLevel, P as defineGenerator, Pt as Diagnostics, Q as Plugin, R as Parser, Rt as SerializedDiagnostic, S as KubbSuccessContext, St as GenerationResult, T as PostGenerateCommand, Tt as ReporterName, U as Include, Ut as AdapterSource, V as Filter, Vt as Adapter, W as KubbPluginEndContext, Wt as createAdapter, X as OutputOptions, Y as OutputMode, Z as Override, _ as KubbHookStartContext, _t as Renderer, a as KubbBuildEndContext, at as ResolveBannerFile, b as KubbLifecycleStartContext, bt as Storage, c as KubbErrorContext, ct as ResolveOptionsContext, d as KubbFilesProcessingStartContext, dt as ResolverDefault, et as PluginName, f as KubbFilesProcessingUpdateContext, ft as ResolverFile, g as KubbHookLineContext, gt as ResolverPathParams, h as KubbHookEndContext, ht as ResolverPatch, i as Input, it as ResolveBannerContext, j as createKubb, jt as DiagnosticKind, k as GenerateResult, kt as Diagnostic, l as KubbFileProcessingUpdate, lt as ResolvePathOptions, m as KubbGenerationStartContext, mt as ResolverFilePathParams, n as CLIOptions, nt as definePlugin, o as KubbBuildStartContext, ot as ResolveFileOptions, p as KubbGenerationEndContext, pt as ResolverFileParams, q as NormalizedPlugin, r as Config, rt as BannerMeta, s as KubbDiagnosticContext, st as ResolveImportsOptions, t as BuildOutput, tt as ResolvePluginOptions, u as KubbFilesProcessingEndContext, ut as Resolver, v as KubbHooks, vt as RendererFactory, w as PossibleConfig, wt as ReporterContext, x as KubbPluginsEndContext, xt as createStorage, y as KubbInfoContext, yt as createRenderer, z as defineParser, zt as UpdateDiagnostic } from "./types-D116CBzm.js";
|
|
3
3
|
//#region src/applyConfigDefaults.d.ts
|
|
4
4
|
type ApplyConfigDefaultsOptions<TOutput> = {
|
|
5
5
|
defaultAdapter: Adapter;
|
|
@@ -183,5 +183,5 @@ declare const fsStorage: (options?: Record<string, never> | undefined) => Storag
|
|
|
183
183
|
*/
|
|
184
184
|
declare const memoryStorage: (options?: Record<string, never> | undefined) => Storage;
|
|
185
185
|
//#endregion
|
|
186
|
-
export { type Adapter, type AdapterFactoryOptions, type AdapterSource, type BannerMeta, BuildOutput, CLIOptions, Config, type CreateKubbOptions, type Diagnostic, type DiagnosticDoc, type DiagnosticKind, type DiagnosticLocation, type DiagnosticSeverity, Diagnostics, type Exclude, type FileManagerHooks, type Filter, type GenerateOptions, type GenerateResult, type GenerationResult, type Generator, type GeneratorContext, type Group, Hookable, type Include, Input, type InputKind, type Kubb, KubbBuildEndContext, KubbBuildStartContext, KubbDiagnosticContext, KubbDriver, KubbErrorContext, KubbFileProcessingUpdate, KubbFilesProcessingEndContext, KubbFilesProcessingStartContext, KubbFilesProcessingUpdateContext, KubbGenerationEndContext, KubbGenerationStartContext, KubbHookEndContext, KubbHookLineContext, KubbHookStartContext, KubbHooks, KubbInfoContext, KubbLifecycleStartContext, type KubbPluginEndContext, type KubbPluginSetupContext, type KubbPluginStartContext, KubbPluginsEndContext, KubbSuccessContext, KubbWarnContext, type NormalizedPlugin, type Output, type OutputMode, type OutputOptions, type Override, type Parser, type PerformanceDiagnostic, type Plugin, type PluginFactoryOptions, type PluginName, PossibleConfig, PostGenerateCommand, type ProblemCode, type ProblemDiagnostic, type Renderer, type RendererFactory, type Reporter, type ReporterContext, type ReporterName, type ResolveBannerContext, type ResolveBannerFile, type ResolveFileOptions, type ResolveImportsOptions, type ResolveOptionsContext, type ResolvePathOptions, type ResolvePluginOptions, Resolver, type ResolverDefault, type ResolverFile, type ResolverFileParams, type ResolverFilePathParams, type ResolverPatch, type ResolverPathParams, type SerializedDiagnostic, type Storage, type UpdateDiagnostic, UserConfig, type UserReporter, applyConfigDefaults, cliReporter, createAdapter, createKubb, createRenderer, createReporter, createResolver, createStorage, defineGenerator, defineParser, definePlugin, fileReporter, fsStorage, getInputKind, jsonReporter, logLevel, memoryStorage };
|
|
186
|
+
export { type Adapter, type AdapterFactoryOptions, type AdapterSource, type BannerMeta, BuildOutput, CLIOptions, Config, type CreateKubbOptions, type Diagnostic, type DiagnosticDoc, type DiagnosticKind, type DiagnosticLocation, type DiagnosticSeverity, Diagnostics, type Exclude, type FileManagerHooks, type Filter, type GenerateOptions, type GenerateResult, type GenerationResult, type Generator, type GeneratorContext, type Group, Hookable, type Include, Input, type InputKind, type Kubb, KubbBuildEndContext, KubbBuildStartContext, KubbDiagnosticContext, KubbDriver, KubbErrorContext, KubbFileProcessingUpdate, KubbFilesProcessingEndContext, KubbFilesProcessingStartContext, KubbFilesProcessingUpdateContext, KubbGenerationEndContext, KubbGenerationStartContext, KubbHookEndContext, KubbHookLineContext, KubbHookStartContext, KubbHooks, KubbInfoContext, KubbLifecycleStartContext, type KubbPluginEndContext, type KubbPluginSetupContext, type KubbPluginStartContext, KubbPluginsEndContext, KubbSuccessContext, KubbWarnContext, type NodeCache, type NormalizedPlugin, type Output, type OutputMode, type OutputOptions, type Override, type Parser, type PerformanceDiagnostic, type Plugin, type PluginFactoryOptions, type PluginName, PossibleConfig, PostGenerateCommand, type ProblemCode, type ProblemDiagnostic, type Renderer, type RendererFactory, type Reporter, type ReporterContext, type ReporterName, type ResolveBannerContext, type ResolveBannerFile, type ResolveFileOptions, type ResolveImportsOptions, type ResolveOptionsContext, type ResolvePathOptions, type ResolvePluginOptions, Resolver, type ResolverDefault, type ResolverFile, type ResolverFileParams, type ResolverFilePathParams, type ResolverPatch, type ResolverPathParams, type SerializedDiagnostic, type Storage, type UpdateDiagnostic, UserConfig, type UserReporter, applyConfigDefaults, cliReporter, createAdapter, createKubb, createRenderer, createReporter, createResolver, createStorage, defineGenerator, defineParser, definePlugin, fileReporter, fsStorage, getInputKind, jsonReporter, logLevel, memoryStorage };
|
|
187
187
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./rolldown-runtime-C0LytTxp.js";
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as clean, c as toPosixPath, d as getErrorMessage, f as toError, i as Hookable, l as write, n as createNodeCache, o as isPathInside, p as camelCase, r as FileManager, s as toFilePath, t as _usingCtx, u as BuildError } from "./usingCtx-C24YU3KM.js";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { stripVTControlCharacters, styleText } from "node:util";
|
|
5
5
|
import { hash } from "node:crypto";
|
|
6
6
|
import { access, glob, readFile, rm } from "node:fs/promises";
|
|
7
7
|
import path, { join, relative, resolve } from "node:path";
|
|
8
|
-
import { ast,
|
|
8
|
+
import { ast, collectImportedRefNames, collectUsedSchemaNames, composeMacros, operationDef, schemaDef, transform } from "@kubb/ast";
|
|
9
9
|
import process$1 from "node:process";
|
|
10
10
|
//#region src/createAdapter.ts
|
|
11
11
|
/**
|
|
@@ -149,7 +149,7 @@ function randomCliColor(text) {
|
|
|
149
149
|
}
|
|
150
150
|
//#endregion
|
|
151
151
|
//#region package.json
|
|
152
|
-
var version = "5.0.0-beta.
|
|
152
|
+
var version = "5.0.0-beta.104";
|
|
153
153
|
//#endregion
|
|
154
154
|
//#region src/constants.ts
|
|
155
155
|
/**
|
|
@@ -845,28 +845,24 @@ var Resolver = class Resolver {
|
|
|
845
845
|
* schemas (`targetName`) import the emitted name. Names and paths go through the top-level
|
|
846
846
|
* `name` and `file`, so import entries follow the plugin's conventions, and a per-call
|
|
847
847
|
* `name` override wins over both.
|
|
848
|
+
*
|
|
849
|
+
* The subtree scan runs through `collectImportedRefNames`, which memoizes by node identity, so a
|
|
850
|
+
* schema shared across the ts, zod, and faker plugins is walked once and every plugin's resolver
|
|
851
|
+
* reads the same ref set instead of re-scanning it per plugin.
|
|
848
852
|
*/
|
|
849
853
|
imports(options) {
|
|
850
854
|
const { node, root, output, group, extname = ".ts", name } = options;
|
|
851
855
|
const resolveName = name ?? ((schemaName) => this.name(schemaName));
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
name: schemaName,
|
|
863
|
-
extname,
|
|
864
|
-
root,
|
|
865
|
-
output,
|
|
866
|
-
group
|
|
867
|
-
}).path
|
|
868
|
-
});
|
|
869
|
-
} });
|
|
856
|
+
return collectImportedRefNames(node).map((schemaName) => ast.factory.createImport({
|
|
857
|
+
name: [resolveName(schemaName)],
|
|
858
|
+
path: this.file({
|
|
859
|
+
name: schemaName,
|
|
860
|
+
extname,
|
|
861
|
+
root,
|
|
862
|
+
output,
|
|
863
|
+
group
|
|
864
|
+
}).path
|
|
865
|
+
}));
|
|
870
866
|
}
|
|
871
867
|
/**
|
|
872
868
|
* Folds each `override` over `base`, left to right, and returns a new resolver with helpers
|
|
@@ -1481,6 +1477,7 @@ var KubbDriver = class {
|
|
|
1481
1477
|
updateBuffer.push(item);
|
|
1482
1478
|
},
|
|
1483
1479
|
end: async (files) => {
|
|
1480
|
+
updateBuffer.sort((a, b) => a.processed - b.processed);
|
|
1484
1481
|
await hooks.callHook("kubb:files:processing:update", { files: updateBuffer.map((item) => ({
|
|
1485
1482
|
...item,
|
|
1486
1483
|
config
|
|
@@ -1589,16 +1586,20 @@ var KubbDriver = class {
|
|
|
1589
1586
|
}));
|
|
1590
1587
|
}
|
|
1591
1588
|
/**
|
|
1592
|
-
* Runs schemas and operations through every plugin's generators.
|
|
1593
|
-
*
|
|
1594
|
-
*
|
|
1595
|
-
* so
|
|
1596
|
-
*
|
|
1597
|
-
*
|
|
1589
|
+
* Runs schemas and operations through every plugin's generators. The walk is node-outer: each
|
|
1590
|
+
* schema is visited once and each operation once, and the node fans out to the matching
|
|
1591
|
+
* generators of every plugin in dependency order. A per-node cache (`createNodeCache`) is created
|
|
1592
|
+
* once per node and shared by all of that node's plugins, so node-derived work is computed once
|
|
1593
|
+
* and reused instead of recomputed per plugin. Each node still runs through the plugin's macros
|
|
1594
|
+
* (from `this.#transforms`) and its exclude/include/override filters before that plugin's
|
|
1595
|
+
* generator sees it, so plugins stay isolated. Schemas run before operations so file output
|
|
1596
|
+
* stays deterministic across runs. A generator with a `match` predicate that resolves `false`
|
|
1597
|
+
* for a node is skipped for that node, without calling `schema`/`operation`.
|
|
1598
1598
|
*
|
|
1599
|
-
*
|
|
1600
|
-
*
|
|
1601
|
-
* `Plugins N/M` counter.
|
|
1599
|
+
* A failing plugin is dropped from the remaining walk, contributes an error diagnostic, and no
|
|
1600
|
+
* longer aborts the other plugins. `kubb:plugin:end` and each plugin's `timing` diagnostic fire
|
|
1601
|
+
* in dependency order once the walk finishes, driving the CLI's `Plugins N/M` counter. The
|
|
1602
|
+
* `operations` batch fires once per plugin after the single operation walk.
|
|
1602
1603
|
*
|
|
1603
1604
|
* When `this.inputNode` is `null`, every entry still gets a `kubb:plugin:end` so
|
|
1604
1605
|
* post-plugin listeners (the barrel writer and friends) complete.
|
|
@@ -1636,105 +1637,133 @@ var KubbDriver = class {
|
|
|
1636
1637
|
}) !== null);
|
|
1637
1638
|
allowedSchemaNamesByPlugin.set(plugin.name, collectUsedSchemaNames(includedOps, schemas));
|
|
1638
1639
|
}
|
|
1639
|
-
|
|
1640
|
+
const states = entries.map(({ plugin, context, hrStart }) => {
|
|
1640
1641
|
const generatorContext = {
|
|
1641
1642
|
...context,
|
|
1642
1643
|
resolver: this.getResolver(plugin.name)
|
|
1643
1644
|
};
|
|
1644
1645
|
const { exclude, include, override } = plugin.options;
|
|
1645
|
-
const optionsAreStatic = !exclude?.length && !include?.length && !override?.length;
|
|
1646
|
-
const allowedSchemaNames = allowedSchemaNamesByPlugin.get(plugin.name) ?? null;
|
|
1647
1646
|
const generators = plugin.generators ?? [];
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
override
|
|
1663
|
-
});
|
|
1664
|
-
if (options === null) return null;
|
|
1665
|
-
return {
|
|
1666
|
-
transformedNode,
|
|
1667
|
-
options
|
|
1668
|
-
};
|
|
1647
|
+
return {
|
|
1648
|
+
plugin,
|
|
1649
|
+
hrStart,
|
|
1650
|
+
generatorContext,
|
|
1651
|
+
exclude,
|
|
1652
|
+
include,
|
|
1653
|
+
override,
|
|
1654
|
+
optionsAreStatic: !exclude?.length && !include?.length && !override?.length,
|
|
1655
|
+
allowedSchemaNames: allowedSchemaNamesByPlugin.get(plugin.name) ?? null,
|
|
1656
|
+
schemaGenerators: generators.filter((generator) => generator.schema),
|
|
1657
|
+
operationGenerators: generators.filter((generator) => generator.operation),
|
|
1658
|
+
operationsGenerators: generators.filter((generator) => generator.operations),
|
|
1659
|
+
pluginOperations: [],
|
|
1660
|
+
error: null
|
|
1669
1661
|
};
|
|
1670
|
-
|
|
1671
|
-
|
|
1662
|
+
});
|
|
1663
|
+
const resolveForPlugin = (state, node) => {
|
|
1664
|
+
const transformedNode = transforms.applyTo(state.plugin.name, node);
|
|
1665
|
+
if (state.optionsAreStatic) return {
|
|
1666
|
+
transformedNode,
|
|
1667
|
+
options: state.plugin.options
|
|
1668
|
+
};
|
|
1669
|
+
const options = state.generatorContext.resolver.default.options(transformedNode, {
|
|
1670
|
+
options: state.plugin.options,
|
|
1671
|
+
exclude: state.exclude,
|
|
1672
|
+
include: state.include,
|
|
1673
|
+
override: state.override
|
|
1674
|
+
});
|
|
1675
|
+
if (options === null) return null;
|
|
1676
|
+
return {
|
|
1677
|
+
transformedNode,
|
|
1678
|
+
options
|
|
1679
|
+
};
|
|
1680
|
+
};
|
|
1681
|
+
for (const node of schemas) {
|
|
1682
|
+
const cache = createNodeCache();
|
|
1683
|
+
for (const state of states) {
|
|
1684
|
+
if (state.error || !state.schemaGenerators.length) continue;
|
|
1672
1685
|
try {
|
|
1673
|
-
const resolved = resolveForPlugin(node);
|
|
1686
|
+
const resolved = resolveForPlugin(state, node);
|
|
1674
1687
|
if (!resolved) continue;
|
|
1675
1688
|
const { transformedNode, options } = resolved;
|
|
1676
|
-
if (allowedSchemaNames !== null && transformedNode.name && !allowedSchemaNames.has(transformedNode.name)) continue;
|
|
1689
|
+
if (state.allowedSchemaNames !== null && transformedNode.name && !state.allowedSchemaNames.has(transformedNode.name)) continue;
|
|
1677
1690
|
const ctx = {
|
|
1678
|
-
...generatorContext,
|
|
1679
|
-
options
|
|
1691
|
+
...state.generatorContext,
|
|
1692
|
+
options,
|
|
1693
|
+
cache
|
|
1680
1694
|
};
|
|
1681
|
-
for (const generator of schemaGenerators)
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1695
|
+
for (const generator of state.schemaGenerators) {
|
|
1696
|
+
if (!(generator.match ? await generator.match(transformedNode, ctx) : true)) continue;
|
|
1697
|
+
await this.dispatch({
|
|
1698
|
+
result: await generator.schema(transformedNode, ctx),
|
|
1699
|
+
renderer: generator.renderer
|
|
1700
|
+
});
|
|
1701
|
+
}
|
|
1685
1702
|
await this.hooks.callHook("kubb:generate:schema", transformedNode, ctx);
|
|
1686
1703
|
} catch (caughtError) {
|
|
1687
|
-
error = toError(caughtError);
|
|
1704
|
+
state.error = toError(caughtError);
|
|
1688
1705
|
}
|
|
1689
1706
|
}
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1707
|
+
}
|
|
1708
|
+
for (const node of operations) {
|
|
1709
|
+
const cache = createNodeCache();
|
|
1710
|
+
for (const state of states) {
|
|
1711
|
+
if (state.error || !state.operationGenerators.length && !state.operationsGenerators.length) continue;
|
|
1693
1712
|
try {
|
|
1694
|
-
const resolved = resolveForPlugin(node);
|
|
1713
|
+
const resolved = resolveForPlugin(state, node);
|
|
1695
1714
|
if (!resolved) continue;
|
|
1696
|
-
pluginOperations.push(resolved.transformedNode);
|
|
1697
|
-
if (operationGenerators.length) {
|
|
1715
|
+
state.pluginOperations.push(resolved.transformedNode);
|
|
1716
|
+
if (state.operationGenerators.length) {
|
|
1698
1717
|
const ctx = {
|
|
1699
|
-
...generatorContext,
|
|
1700
|
-
options: resolved.options
|
|
1718
|
+
...state.generatorContext,
|
|
1719
|
+
options: resolved.options,
|
|
1720
|
+
cache
|
|
1701
1721
|
};
|
|
1702
|
-
for (const generator of operationGenerators)
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1722
|
+
for (const generator of state.operationGenerators) {
|
|
1723
|
+
if (!(generator.match ? await generator.match(resolved.transformedNode, ctx) : true)) continue;
|
|
1724
|
+
await this.dispatch({
|
|
1725
|
+
result: await generator.operation(resolved.transformedNode, ctx),
|
|
1726
|
+
renderer: generator.renderer
|
|
1727
|
+
});
|
|
1728
|
+
}
|
|
1706
1729
|
await this.hooks.callHook("kubb:generate:operation", resolved.transformedNode, ctx);
|
|
1707
1730
|
}
|
|
1708
1731
|
} catch (caughtError) {
|
|
1709
|
-
error = toError(caughtError);
|
|
1732
|
+
state.error = toError(caughtError);
|
|
1710
1733
|
}
|
|
1711
1734
|
}
|
|
1712
|
-
|
|
1735
|
+
}
|
|
1736
|
+
for (const state of states) {
|
|
1737
|
+
if (state.error || !state.operationsGenerators.length) continue;
|
|
1738
|
+
try {
|
|
1713
1739
|
const ctx = {
|
|
1714
|
-
...generatorContext,
|
|
1715
|
-
options: plugin.options
|
|
1740
|
+
...state.generatorContext,
|
|
1741
|
+
options: state.plugin.options,
|
|
1742
|
+
cache: createNodeCache()
|
|
1716
1743
|
};
|
|
1717
|
-
for (const generator of operationsGenerators) await this.dispatch({
|
|
1718
|
-
result: await generator.operations(pluginOperations, ctx),
|
|
1744
|
+
for (const generator of state.operationsGenerators) await this.dispatch({
|
|
1745
|
+
result: await generator.operations(state.pluginOperations, ctx),
|
|
1719
1746
|
renderer: generator.renderer
|
|
1720
1747
|
});
|
|
1721
|
-
await this.hooks.callHook("kubb:generate:operations", pluginOperations, ctx);
|
|
1748
|
+
await this.hooks.callHook("kubb:generate:operations", state.pluginOperations, ctx);
|
|
1722
1749
|
} catch (caughtError) {
|
|
1723
|
-
error = toError(caughtError);
|
|
1750
|
+
state.error = toError(caughtError);
|
|
1724
1751
|
}
|
|
1725
|
-
|
|
1752
|
+
}
|
|
1753
|
+
for (const state of states) {
|
|
1754
|
+
const duration = getElapsedMs(state.hrStart);
|
|
1726
1755
|
await this.#emitPluginEnd({
|
|
1727
|
-
plugin,
|
|
1756
|
+
plugin: state.plugin,
|
|
1728
1757
|
duration,
|
|
1729
|
-
success: !error,
|
|
1730
|
-
error: error ?? void 0
|
|
1758
|
+
success: !state.error,
|
|
1759
|
+
error: state.error ?? void 0
|
|
1731
1760
|
});
|
|
1732
|
-
if (error) diagnostics.push({
|
|
1733
|
-
...Diagnostics.from(error),
|
|
1734
|
-
plugin: plugin.name
|
|
1761
|
+
if (state.error) diagnostics.push({
|
|
1762
|
+
...Diagnostics.from(state.error),
|
|
1763
|
+
plugin: state.plugin.name
|
|
1735
1764
|
});
|
|
1736
1765
|
diagnostics.push(Diagnostics.performance({
|
|
1737
|
-
plugin: plugin.name,
|
|
1766
|
+
plugin: state.plugin.name,
|
|
1738
1767
|
duration
|
|
1739
1768
|
}));
|
|
1740
1769
|
}
|