Socket
Socket
Sign inDemoInstall

@jsdocs-io/extractor

Package Overview
Dependencies
12
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0-4 to 1.0.0-5

221

dist/index.d.ts
import { SourceFile, ModuleDeclaration, Project } from 'ts-morph';
import * as effect_Cause from 'effect/Cause';
import * as effect_Types from 'effect/Types';
import { Context, Effect } from 'effect';
import * as effect_Scope from 'effect/Scope';
import { Effect } from 'effect';
import * as read_pkg from 'read-pkg';

@@ -186,5 +188,5 @@ import { NormalizedPackageJson } from 'read-pkg';

/**
Name of the container that contains the top-level declarations
(e.g., a namespace's name). This is used to generate declaration IDs.
*/
Name of the container that contains the top-level declarations
(e.g., a namespace's name). This is used to generate declaration IDs.
*/
containerName: string;

@@ -196,8 +198,8 @@ /** Container that contains the top-level declarations. */

/**
Instance of a `ts-morph` `Project`. This is used to find ambient modules.
*/
Instance of a `ts-morph` `Project`. This is used to find ambient modules.
*/
project?: Project;
/**
Name of the package being analyzed. This is used to filter ambient modules.
*/
Name of the package being analyzed. This is used to filter ambient modules.
*/
pkgName?: string;

@@ -249,6 +251,33 @@ };

/** @internal */
declare class ProjectError {
type InstallPackageOptions = {
pkg: string;
cwd: string;
};
declare const InstallPackageError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
readonly _tag: "InstallPackageError";
} & Readonly<A>;
/** @internal */
declare class InstallPackageError extends InstallPackageError_base<{
cause?: unknown;
}> {
}
declare const PackageManager_base: Context.TagClass<PackageManager, "PackageManager", {
readonly installPackage: ({ pkg, cwd, }: InstallPackageOptions) => Effect.Effect<string[], InstallPackageError>;
}>;
/** @internal */
declare class PackageManager extends PackageManager_base {
}
/** @internal */
declare const bunPackageManager: (bunPath?: string) => {
readonly installPackage: ({ pkg, cwd, }: InstallPackageOptions) => Effect.Effect<string[], InstallPackageError, never>;
};
declare const ProjectError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
readonly _tag: "ProjectError";
} & Readonly<A>;
/** @internal */
declare class ProjectError extends ProjectError_base<{
readonly cause?: unknown;
readonly _tag = "ProjectError";
constructor(cause?: unknown);
}> {
}

@@ -262,38 +291,38 @@

/**
Package to extract the API from.
This can be either a package name (e.g., `foo`) or any other query
that can be passed to `bun add` (e.g., `foo@1.0.0`).
@see {@link https://bun.sh/docs/cli/add | Bun docs}
*/
Package to extract the API from.
This can be either a package name (e.g., `foo`) or any other query
that can be passed to `bun add` (e.g., `foo@1.0.0`).
@see {@link https://bun.sh/docs/cli/add | Bun docs}
*/
pkg: string;
/**
Specific subpath to consider in a package.
If a package has multiple entrypoints listed in the `exports` property
of its `package.json`, use `subpath` to select a specific one by its name
(e.g., `someFeature`).
@defaultValue `.` (package root)
@see {@link https://nodejs.org/api/packages.html#subpath-exports | Node.js docs}
@see {@link https://github.com/lukeed/resolve.exports | resolve.exports docs}
*/
Specific subpath to consider in a package.
If a package has multiple entrypoints listed in the `exports` property
of its `package.json`, use `subpath` to select a specific one by its name
(e.g., `someFeature`).
@defaultValue `.` (package root)
@see {@link https://nodejs.org/api/packages.html#subpath-exports | Node.js docs}
@see {@link https://github.com/lukeed/resolve.exports | resolve.exports docs}
*/
subpath?: string;
/**
Packages can have deeply nested modules and namespaces.
Use `maxDepth` to limit the depth of the extraction.
Declarations nested at levels deeper than this value will be ignored.
@defaultValue 5
*/
Packages can have deeply nested modules and namespaces.
Use `maxDepth` to limit the depth of the extraction.
Declarations nested at levels deeper than this value will be ignored.
@defaultValue 5
*/
maxDepth?: number;
/**
Absolute path to the `bun` executable.
Used to locate bun if it's not in `PATH`.
@defaultValue `bun`
*/
Absolute path to the `bun` executable.
Used to locate bun if it's not in `PATH`.
@defaultValue `bun`
*/
bunPath?: string;

@@ -310,17 +339,17 @@ };

/**
Package subpath selected when extracting the API (e.g., `.`, `someFeature`).
@see {@link ExtractPackageApiOptions.subpath}
@see {@link https://nodejs.org/api/packages.html#subpath-exports | Node.js docs}
*/
Package subpath selected when extracting the API (e.g., `.`, `someFeature`).
@see {@link ExtractPackageApiOptions.subpath}
@see {@link https://nodejs.org/api/packages.html#subpath-exports | Node.js docs}
*/
subpath: string;
/**
Type declarations file, resolved from the selected `subpath`,
that acts as the entrypoint for the package (e.g., `index.d.ts`).
*/
Type declarations file, resolved from the selected `subpath`,
that acts as the entrypoint for the package (e.g., `index.d.ts`).
*/
types: string;
/**
Package description extracted from the `types` file if a
JSDoc comment with the `@packageDocumentation` tag is found.
*/
Package description extracted from the `types` file if a
JSDoc comment with the `@packageDocumentation` tag is found.
*/
overview: string | undefined;

@@ -330,9 +359,9 @@ /** Declarations exported (or re-exported) by the package. */

/**
All packages resolved and installed when installing the package (included).
@example
```ts
["foo@1.0.0", "bar@2.0.0", "baz@3.0.0"]
```
*/
All packages resolved and installed when installing the package (included).
@example
```ts
["foo@1.0.0", "bar@2.0.0", "baz@3.0.0"]
```
*/
packages: string[];

@@ -374,7 +403,9 @@ /** Timestamp of when the package was analyzed. */

};
declare const WorkDirError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
readonly _tag: "WorkDirError";
} & Readonly<A>;
/** @internal */
declare class WorkDirError {
readonly cause?: unknown;
readonly _tag = "WorkDirError";
constructor(cause?: unknown);
declare class WorkDirError extends WorkDirError_base<{
cause?: unknown;
}> {
}

@@ -387,5 +418,7 @@ /** @internal */

declare const PackageTypesError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
readonly _tag: "PackageTypesError";
} & Readonly<A>;
/** @internal */
declare class PackageTypesError {
readonly _tag = "PackageTypesError";
declare class PackageTypesError extends PackageTypesError_base {
}

@@ -402,5 +435,10 @@ /**

declare const PackageNameError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
readonly _tag: "PackageNameError";
} & Readonly<A>;
/** @internal */
declare class PackageNameError {
readonly _tag = "PackageNameError";
declare class PackageNameError extends PackageNameError_base<{
warnings?: string[];
errors?: string[];
}> {
}

@@ -410,7 +448,9 @@ /** @internal */

declare const PackageJsonError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
readonly _tag: "PackageJsonError";
} & Readonly<A>;
/** @internal */
declare class PackageJsonError {
readonly cause?: unknown;
readonly _tag = "PackageJsonError";
constructor(cause?: unknown);
declare class PackageJsonError extends PackageJsonError_base<{
cause?: unknown;
}> {
}

@@ -420,37 +460,14 @@ /** @internal */

declare const PackageDeclarationsError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
readonly _tag: "PackageDeclarationsError";
} & Readonly<A>;
/** @internal */
declare class PackageDeclarationsError {
readonly cause?: unknown;
readonly _tag = "PackageDeclarationsError";
constructor(cause?: unknown);
declare class PackageDeclarationsError extends PackageDeclarationsError_base<{
cause?: unknown;
}> {
}
/** @internal */
type InstallPackageOptions = {
pkg: string;
cwd: string;
bunPath?: string;
};
/** @internal */
declare class InstallPackageError {
readonly cause?: unknown;
readonly _tag = "InstallPackageError";
constructor(cause?: unknown);
}
/** @internal */
declare const installPackage: ({ pkg, cwd, bunPath, }: InstallPackageOptions) => Effect.Effect<string[], InstallPackageError, never>;
declare const extractPackageApiEffect: ({ pkg, subpath, maxDepth, }: ExtractPackageApiOptions) => Effect.Effect<PackageApi, InstallPackageError | ProjectError | PackageDeclarationsError | PackageJsonError | PackageNameError | PackageTypesError | WorkDirError, PackageManager | effect_Scope.Scope>;
/** @internal */
declare const extractPackageApiEffect: ({ pkg, subpath, maxDepth, bunPath, }: ExtractPackageApiOptions) => Effect.Effect<{
name: string;
version: string;
subpath: string;
types: string;
overview: string | undefined;
declarations: ExtractedDeclaration[];
packages: string[];
analyzedAt: string;
analyzedIn: number;
}, ProjectError | InstallPackageError | PackageDeclarationsError | PackageJsonError | PackageNameError | PackageTypesError | WorkDirError, never>;
/**

@@ -467,2 +484,2 @@ `parseDocComment` parses a JSDoc comment using `@microsoft/tsdoc`.

export { type AllExtractedDeclaration, type AllExtractedDeclarationKind, type ExtractDeclarationsOptions, type ExtractPackageApiOptions, type ExtractedClass, type ExtractedClassConstructor, type ExtractedClassMethod, type ExtractedClassProperty, type ExtractedDeclaration, type ExtractedDeclarationKind, type ExtractedEnum, type ExtractedEnumMember, type ExtractedFunction, type ExtractedInterface, type ExtractedInterfaceCallSignature, type ExtractedInterfaceConstructSignature, type ExtractedInterfaceGetAccessor, type ExtractedInterfaceIndexSignature, type ExtractedInterfaceMethod, type ExtractedInterfaceProperty, type ExtractedInterfaceSetAccessor, type ExtractedNamespace, type ExtractedTypeAlias, type ExtractedVariable, InstallPackageError, type InstallPackageOptions, type PackageApi, PackageDeclarationsError, PackageJsonError, PackageNameError, PackageTypesError, ProjectError, type WorkDir, WorkDirError, extractDeclarations, extractPackageApi, extractPackageApiEffect, installPackage, packageJson, packageName, packageTypes, parseDocComment, workDir };
export { type AllExtractedDeclaration, type AllExtractedDeclarationKind, type ExtractDeclarationsOptions, type ExtractPackageApiOptions, type ExtractedClass, type ExtractedClassConstructor, type ExtractedClassMethod, type ExtractedClassProperty, type ExtractedDeclaration, type ExtractedDeclarationKind, type ExtractedEnum, type ExtractedEnumMember, type ExtractedFunction, type ExtractedInterface, type ExtractedInterfaceCallSignature, type ExtractedInterfaceConstructSignature, type ExtractedInterfaceGetAccessor, type ExtractedInterfaceIndexSignature, type ExtractedInterfaceMethod, type ExtractedInterfaceProperty, type ExtractedInterfaceSetAccessor, type ExtractedNamespace, type ExtractedTypeAlias, type ExtractedVariable, InstallPackageError, type InstallPackageOptions, type PackageApi, PackageDeclarationsError, PackageJsonError, PackageManager, PackageNameError, PackageTypesError, ProjectError, type WorkDir, WorkDirError, bunPackageManager, extractDeclarations, extractPackageApi, extractPackageApiEffect, packageJson, packageName, packageTypes, parseDocComment, workDir };

@@ -0,16 +1,35 @@

// src/bun-package-manager.ts
import { Effect as Effect2 } from "effect";
import { execa } from "execa";
// src/package-manager.ts
import { Context, Data } from "effect";
var InstallPackageError = class extends Data.TaggedError("InstallPackageError") {
};
var PackageManager = class extends Context.Tag("PackageManager")() {
};
// src/bun-package-manager.ts
var bunPackageManager = (bunPath = "bun") => PackageManager.of({
installPackage: ({ pkg, cwd }) => Effect2.gen(function* (_) {
const { stdout } = yield* _(
Effect2.tryPromise({
try: () => execa(bunPath, ["add", pkg, "--verbose"], { cwd }),
catch: (e) => new InstallPackageError({ cause: e })
})
);
const lines = stdout.split("\n");
const beginHash = lines.findIndex((line) => line.startsWith("-- BEGIN SHA512/256"));
const endHash = lines.findIndex((line) => line.startsWith("-- END HASH"));
const installedPackages = lines.slice(beginHash + 1, endHash);
return installedPackages;
})
});
// src/create-project.ts
import { Effect } from "effect";
import {
ModuleKind,
ModuleResolutionKind,
Project,
ScriptTarget
} from "ts-morph";
var ProjectError = class {
constructor(cause) {
this.cause = cause;
}
_tag = "ProjectError";
import { Data as Data2, Effect as Effect3 } from "effect";
import { ModuleKind, ModuleResolutionKind, Project, ScriptTarget } from "ts-morph";
var ProjectError = class extends Data2.TaggedError("ProjectError") {
};
var createProject = ({ indexFilePath, cwd }) => Effect.try({
var createProject = ({ indexFilePath, cwd }) => Effect3.try({
try: () => {

@@ -37,3 +56,3 @@ const project = new Project({

},
catch: (e) => new ProjectError(e)
catch: (e) => new ProjectError({ cause: e })
});

@@ -78,6 +97,3 @@

const implementation = node.getImplementation();
return [
...node.getOverloads(),
...implementation ? [implementation] : []
];
return [...node.getOverloads(), ...implementation ? [implementation] : []];
}

@@ -146,5 +162,3 @@ if (Node.isMethodSignature(node) && node.getParent().getKind() === SyntaxKind.InterfaceDeclaration) {

// src/export-equals-declarations.ts
import {
SyntaxKind as SyntaxKind3
} from "ts-morph";
import { SyntaxKind as SyntaxKind3 } from "ts-morph";

@@ -193,6 +207,3 @@ // src/is-exported-declarations.ts

const exportedDeclarations2 = [];
for (const [
exportName,
declarations
] of container.getExportedDeclarations()) {
for (const [exportName, declarations] of container.getExportedDeclarations()) {
for (const declaration of declarations) {

@@ -578,14 +589,5 @@ if (isHidden(declaration) || !isExportedDeclarations(declaration)) {

methods: await extractInterfaceMethods(interfaceId, declaration),
constructSignatures: await extractInterfaceConstructSignatures(
interfaceId,
declaration
),
callSignatures: await extractInterfaceCallSignatures(
interfaceId,
declaration
),
indexSignatures: await extractInterfaceIndexSignatures(
interfaceId,
declaration
),
constructSignatures: await extractInterfaceConstructSignatures(interfaceId, declaration),
callSignatures: await extractInterfaceCallSignatures(interfaceId, declaration),
indexSignatures: await extractInterfaceIndexSignatures(interfaceId, declaration),
getAccessors: await extractInterfaceGetAccessors(interfaceId, declaration),

@@ -968,7 +970,3 @@ setAccessors: await extractInterfaceSetAccessors(interfaceId, declaration)

if (isVariableAssignmentExpression(declaration)) {
return extractVariableAssignmentExpression(
containerName,
exportName,
declaration
);
return extractVariableAssignmentExpression(containerName, exportName, declaration);
}

@@ -1010,8 +1008,3 @@ if (isExpression(declaration)) {

});
return extractNamespace(
containerName,
exportName,
declaration,
innerDeclarations
);
return extractNamespace(containerName, exportName, declaration, innerDeclarations);
}

@@ -1024,8 +1017,3 @@ if (isFileModule(declaration) && maxDepth > 0) {

});
return extractFileModule(
containerName,
exportName,
declaration,
innerDeclarations
);
return extractFileModule(containerName, exportName, declaration, innerDeclarations);
}

@@ -1036,47 +1024,12 @@ return void 0;

// src/extract-package-api.ts
import { Effect as Effect9 } from "effect";
import { Effect as Effect10 } from "effect";
// src/extract-package-api-effect.ts
import { Effect as Effect8 } from "effect";
import { Effect as Effect9 } from "effect";
import { performance } from "perf_hooks";
import { join } from "pathe";
// src/install-package.ts
import { Effect as Effect2 } from "effect";
import { execa } from "execa";
var InstallPackageError = class {
constructor(cause) {
this.cause = cause;
}
_tag = "InstallPackageError";
};
var installPackage = ({
pkg,
cwd,
bunPath = "bun"
}) => Effect2.gen(function* (_) {
const { stdout } = yield* _(bunAdd({ pkg, cwd, bunPath }));
return installedPackages(stdout);
});
var bunAdd = ({ pkg, cwd, bunPath }) => Effect2.tryPromise({
try: () => execa(bunPath, ["add", pkg, "--verbose"], { cwd }),
catch: (e) => new InstallPackageError(e)
});
var installedPackages = (stdout) => {
const lines = stdout.split("\n");
const beginHash = lines.findIndex(
(line) => line.startsWith("-- BEGIN SHA512/256")
);
const endHash = lines.findIndex((line) => line.startsWith("-- END HASH"));
const installedPackages2 = lines.slice(beginHash + 1, endHash);
return installedPackages2;
};
// src/package-declarations.ts
import { Effect as Effect3 } from "effect";
var PackageDeclarationsError = class {
constructor(cause) {
this.cause = cause;
}
_tag = "PackageDeclarationsError";
import { Data as Data3, Effect as Effect4 } from "effect";
var PackageDeclarationsError = class extends Data3.TaggedError("PackageDeclarationsError") {
};

@@ -1088,3 +1041,3 @@ var packageDeclarations = ({

maxDepth
}) => Effect3.tryPromise({
}) => Effect4.tryPromise({
try: () => extractDeclarations({

@@ -1097,32 +1050,28 @@ containerName: "",

}),
catch: (e) => new PackageDeclarationsError(e)
catch: (e) => new PackageDeclarationsError({ cause: e })
});
// src/package-json.ts
import { Effect as Effect4 } from "effect";
import { Data as Data4, Effect as Effect5 } from "effect";
import { readPackage } from "read-pkg";
var PackageJsonError = class {
constructor(cause) {
this.cause = cause;
}
_tag = "PackageJsonError";
var PackageJsonError = class extends Data4.TaggedError("PackageJsonError") {
};
var packageJson = (pkgDir) => Effect4.tryPromise({
var packageJson = (pkgDir) => Effect5.tryPromise({
try: () => readPackage({ cwd: pkgDir }),
catch: (e) => new PackageJsonError(e)
catch: (e) => new PackageJsonError({ cause: e })
});
// src/package-name.ts
import { Effect as Effect5 } from "effect";
import { Data as Data5, Effect as Effect6 } from "effect";
import validate from "validate-npm-package-name";
var PackageNameError = class {
_tag = "PackageNameError";
var PackageNameError = class extends Data5.TaggedError("PackageNameError") {
};
var packageName = (pkg) => Effect5.suspend(() => {
var packageName = (pkg) => Effect6.gen(function* (_) {
const versionMarker = pkg.lastIndexOf("@");
const name = pkg.slice(0, versionMarker > 0 ? versionMarker : void 0);
if (!validate(name).validForNewPackages) {
return Effect5.fail(new PackageNameError());
const pkgName = pkg.slice(0, versionMarker > 0 ? versionMarker : void 0);
const { validForNewPackages, warnings, errors } = validate(pkgName);
if (!validForNewPackages) {
return yield* _(new PackageNameError({ warnings, errors }));
}
return Effect5.succeed(name);
return pkgName;
});

@@ -1137,8 +1086,7 @@

// src/package-types.ts
import { Effect as Effect6 } from "effect";
import { Data as Data6, Effect as Effect7 } from "effect";
import { exports } from "resolve.exports";
var PackageTypesError = class {
_tag = "PackageTypesError";
var PackageTypesError = class extends Data6.TaggedError("PackageTypesError") {
};
var packageTypes = (pkgJson, subpath) => Effect6.gen(function* (_) {
var packageTypes = (pkgJson, subpath) => Effect7.gen(function* (_) {
const resolvedPaths = yield* _(resolveExports(pkgJson, subpath));

@@ -1156,3 +1104,3 @@ const firstPath = resolvedPaths[0];

}
return yield* _(Effect6.fail(new PackageTypesError()));
return yield* _(new PackageTypesError());
});

@@ -1165,5 +1113,5 @@ var resolveExports = (pkgJson, subpath) => {

}) ?? [];
return Effect6.succeed(resolvedPaths);
return Effect7.succeed(resolvedPaths);
} catch {
return Effect6.succeed([]);
return Effect7.succeed([]);
}

@@ -1174,12 +1122,8 @@ };

// src/work-dir.ts
import { Effect as Effect7 } from "effect";
import { Data as Data7, Effect as Effect8 } from "effect";
import { rm } from "fs/promises";
import { temporaryDirectory } from "tempy";
var WorkDirError = class {
constructor(cause) {
this.cause = cause;
}
_tag = "WorkDirError";
var WorkDirError = class extends Data7.TaggedError("WorkDirError") {
};
var acquire = Effect7.try({
var acquire = Effect8.try({
try: () => {

@@ -1197,6 +1141,6 @@ const path = temporaryDirectory();

},
catch: (e) => new WorkDirError(e)
catch: (e) => new WorkDirError({ cause: e })
});
var release = (workDir2) => Effect7.promise(() => workDir2.close());
var workDir = Effect7.acquireRelease(acquire, release);
var release = (workDir2) => Effect8.promise(() => workDir2.close());
var workDir = Effect8.acquireRelease(acquire, release);

@@ -1207,34 +1151,29 @@ // src/extract-package-api-effect.ts

subpath = ".",
maxDepth = 5,
bunPath = "bun"
}) => Effect8.scoped(
Effect8.gen(function* (_) {
const startTime = performance.now();
const pkgName = yield* _(packageName(pkg));
const { path: cwd } = yield* _(workDir);
const packages = yield* _(installPackage({ pkg, cwd, bunPath }));
const pkgDir = join(cwd, "node_modules", pkgName);
const pkgJson = yield* _(packageJson(pkgDir));
const types = yield* _(packageTypes(pkgJson, subpath));
const indexFilePath = join(pkgDir, types);
const { project, indexFile } = yield* _(
createProject({ indexFilePath, cwd })
);
const overview = packageOverview(indexFile);
const declarations = yield* _(
packageDeclarations({ pkgName, project, indexFile, maxDepth })
);
return {
name: pkgJson.name,
version: pkgJson.version,
subpath,
types,
overview,
declarations,
packages,
analyzedAt: (/* @__PURE__ */ new Date()).toISOString(),
analyzedIn: Math.round(performance.now() - startTime)
};
})
);
maxDepth = 5
}) => Effect9.gen(function* (_) {
const startTime = performance.now();
const pkgName = yield* _(packageName(pkg));
const { path: cwd } = yield* _(workDir);
const pm = yield* _(PackageManager);
const packages = yield* _(pm.installPackage({ pkg, cwd }));
const pkgDir = join(cwd, "node_modules", pkgName);
const pkgJson = yield* _(packageJson(pkgDir));
const types = yield* _(packageTypes(pkgJson, subpath));
const indexFilePath = join(pkgDir, types);
const { project, indexFile } = yield* _(createProject({ indexFilePath, cwd }));
const overview = packageOverview(indexFile);
const declarations = yield* _(packageDeclarations({ pkgName, project, indexFile, maxDepth }));
const pkgApi = {
name: pkgJson.name,
version: pkgJson.version,
subpath,
types,
overview,
declarations,
packages,
analyzedAt: (/* @__PURE__ */ new Date()).toISOString(),
analyzedIn: Math.round(performance.now() - startTime)
};
return pkgApi;
});

@@ -1247,4 +1186,6 @@ // src/extract-package-api.ts

bunPath = "bun"
}) => Effect9.runPromise(
extractPackageApiEffect({ pkg, subpath, maxDepth, bunPath })
}) => extractPackageApiEffect({ pkg, subpath, maxDepth }).pipe(
Effect10.scoped,
Effect10.provideService(PackageManager, bunPackageManager(bunPath)),
Effect10.runPromise
);

@@ -1255,2 +1196,3 @@ export {

PackageJsonError,
PackageManager,
PackageNameError,

@@ -1260,6 +1202,6 @@ PackageTypesError,

WorkDirError,
bunPackageManager,
extractDeclarations,
extractPackageApi,
extractPackageApiEffect,
installPackage,
packageJson,

@@ -1266,0 +1208,0 @@ packageName,

{
"name": "@jsdocs-io/extractor",
"version": "1.0.0-4",
"version": "1.0.0-5",
"description": "The API extractor for npm packages powering jsdocs.io",

@@ -5,0 +5,0 @@ "license": "AGPL-3.0-or-later",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc