UNPKG

1.45 kBJavaScriptView Raw
1"use strict";
2// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3// See LICENSE in the project root for license information.
4Object.defineProperty(exports, "__esModule", { value: true });
5exports.WorkingPackage = void 0;
6/**
7 * Information about the working package for a particular invocation of API Extractor.
8 *
9 * @remarks
10 * API Extractor tries to model the world as a collection of NPM packages, such that each
11 * .d.ts file belongs to at most one package. When API Extractor is invoked on a project,
12 * we refer to that project as being the "working package". There is exactly one
13 * "working package" for the duration of this analysis. Any files that do not belong to
14 * the working package are referred to as "external": external declarations belonging to
15 * external packages.
16 *
17 * If API Extractor is invoked on a standalone .d.ts file, the "working package" may not
18 * have an actual package.json file on disk, but we still refer to it in concept.
19 */
20class WorkingPackage {
21 constructor(options) {
22 this.packageFolder = options.packageFolder;
23 this.packageJson = options.packageJson;
24 this.entryPointSourceFile = options.entryPointSourceFile;
25 }
26 /**
27 * Returns the full name of the working package.
28 */
29 get name() {
30 return this.packageJson.name;
31 }
32}
33exports.WorkingPackage = WorkingPackage;
34//# sourceMappingURL=WorkingPackage.js.map
\No newline at end of file