Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@swagger-api/apidom-core

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swagger-api/apidom-core - npm Package Compare versions

Comparing version 0.82.2 to 0.83.0

cjs/identity/errors/ElementIdentityError.cjs

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

# [0.83.0](https://github.com/swagger-api/apidom/compare/v0.82.2...v0.83.0) (2023-11-07)
### Features
- **core:** add support for formalized element identity management ([#3366](https://github.com/swagger-api/apidom/issues/3366)) ([65dcd0e](https://github.com/swagger-api/apidom/commit/65dcd0e8a96544773001560fe142a9768a2c3668))
## [0.82.2](https://github.com/swagger-api/apidom/compare/v0.82.1...v0.82.2) (2023-11-03)

@@ -8,0 +14,0 @@

8

package.json
{
"name": "@swagger-api/apidom-core",
"version": "0.82.2",
"version": "0.83.0",
"description": "Tools for manipulating ApiDOM structures.",

@@ -45,4 +45,4 @@ "publishConfig": {

"@babel/runtime-corejs3": "^7.20.7",
"@swagger-api/apidom-ast": "^0.82.2",
"@swagger-api/apidom-error": "^0.82.1",
"@swagger-api/apidom-ast": "^0.83.0",
"@swagger-api/apidom-error": "^0.83.0",
"@types/ramda": "~0.29.6",

@@ -66,3 +66,3 @@ "minim": "~0.23.8",

],
"gitHead": "4d2a5697cba7abcab32abfdbea6ba946b4fd262f"
"gitHead": "4f5563541b7973162e0d5096966d56dbad4c706c"
}
/// <reference path="./minim.d.ts" />
import { Element, ArrayElement, Meta, Attributes, Namespace as Namespace$1, NamespacePlugin, StringElement, ArraySlice, NumberElement, NullElement, BooleanElement, ObjectElement, MemberElement, LinkElement, RefElement, KeyValuePair, ObjectSlice } from 'minim';
import { Element, StringElement, Meta, Attributes, ArrayElement, ArraySlice, NumberElement, NullElement, BooleanElement, ObjectElement, MemberElement, LinkElement, RefElement, Namespace as Namespace$1, NamespacePlugin, KeyValuePair, ObjectSlice } from 'minim';
export { ArrayElement, ArraySlice, Attributes, BooleanElement, Element, KeyValuePair, LinkElement, MemberElement, Meta, NamespacePluginOptions, NullElement, NumberElement, ObjectElement, ObjectSlice, RefElement, StringElement, refract } from 'minim';
import stampit from 'stampit';
import { ApiDOMStructuredError, ApiDOMErrorOptions } from '@swagger-api/apidom-error';
import ShortUniqueId from 'short-unique-id';
export { BREAK, mergeAllVisitors } from '@swagger-api/apidom-ast';

@@ -23,49 +24,2 @@

/**
* Plugin for decorating every semantic element in ApiDOM tree with UUID.
*/
type Predicates = {
isPrimitiveElement: (element: Element) => boolean;
};
declare const plugin: ({ length }?: {
length?: number | undefined;
}) => ({ predicates }: {
predicates: Predicates;
}) => {
pre(): void;
visitor: {
enter<T extends Element>(element: T): void;
};
post(): void;
};
declare class MediaTypes<T> extends Array<T> {
unknownMediaType: string;
filterByFormat(): void;
findBy(): void;
latest(): void;
}
interface Position {
row: number;
column: number;
char: number;
}
interface PositionRange {
start: Position;
end: Position;
}
declare class SourceMap extends ArrayElement {
constructor(content?: Array<any>, meta?: Meta, attributes?: Attributes);
get positionStart(): Element | undefined;
get positionEnd(): Element | undefined;
set position(position: PositionRange | null);
}
declare class Namespace extends Namespace$1 {
constructor();
}
declare const namespace: Namespace;
declare const createNamespace: (namespacePlugin?: NamespacePlugin) => Namespace;
declare class Annotation extends StringElement {

@@ -93,2 +47,18 @@ constructor(content?: string, meta?: Meta, attributes?: Attributes);

interface Position {
row: number;
column: number;
char: number;
}
interface PositionRange {
start: Position;
end: Position;
}
declare class SourceMap extends ArrayElement {
constructor(content?: Array<any>, meta?: Meta, attributes?: Attributes);
get positionStart(): Element | undefined;
get positionEnd(): Element | undefined;
set position(position: PositionRange | null);
}
interface PredicateHelpers {

@@ -142,2 +112,33 @@ hasMethod: typeof hasMethod;

/**
* Plugin for decorating every semantic element in ApiDOM tree with UUID.
*/
type Predicates = {
isPrimitiveElement: typeof isPrimitiveElement;
};
declare const plugin: ({ length }?: {
length?: number | undefined;
}) => ({ predicates }: {
predicates: Predicates;
}) => {
pre(): void;
visitor: {
enter<T extends Element>(element: T): void;
};
post(): void;
};
declare class MediaTypes<T> extends Array<T> {
unknownMediaType: string;
filterByFormat(): void;
findBy(): void;
latest(): void;
}
declare class Namespace extends Namespace$1 {
constructor();
}
declare const namespace: Namespace;
declare const createNamespace: (namespacePlugin?: NamespacePlugin) => Namespace;
declare const filter: <T extends Element>(predicate: (element: any) => boolean, element: T) => ArraySlice;

@@ -249,2 +250,21 @@

interface IdentityManager<T extends Element = Element> {
length: number;
uuid: ShortUniqueId;
identityMap: WeakMap<T, StringElement>;
identify(this: IdentityManager<T>, element: T): StringElement;
forget(this: IdentityManager<T>, element: T): boolean;
generateId(this: IdentityManager<T>): string;
}
declare const IdentityManager: stampit.Stamp<IdentityManager>;
declare const defaultIdentityManager: IdentityManager<Element>;
interface ElementIdentityErrorOptions extends ApiDOMErrorOptions {
readonly value: unknown;
}
declare class ElementIdentityError extends ApiDOMStructuredError {
readonly value: unknown;
constructor(message?: string, structuredOptions?: ElementIdentityErrorOptions);
}
/**

@@ -301,2 +321,2 @@ * Transforms data to an Element from a particular namespace.

export { Annotation as AnnotationElement, CloneError, Comment as CommentElement, DeepCloneError, type ElementPredicate, MediaTypes, Namespace, ParseResult as ParseResultElement, type Position, type PositionRange, ShallowCloneError, SourceMap as SourceMapElement, Transcluder, cloneDeep, cloneNode, cloneShallow, createNamespace, createPredicate, deepmerge, dehydrate, dereference, dispatchPlugins as dispatchRefractorPlugins, filter, find, findAtOffset, from, getNodeType, hasElementSourceMap, includesClasses, includesSymbols, isAnnotationElement, isArrayElement, isBooleanElement, isElement, isLinkElement, isMemberElement, isNullElement, isNumberElement, isObjectElement, isParseResultElement, isPrimitiveElement, isRefElement, isSourceMapElement, isStringElement, keyMapDefault as keyMap, namespace, parents, plugin$1 as refractorPluginElementIdentity, plugin as refractorPluginSemanticElementIdentity, reject, sexprs, some, serializer$1 as toJSON, toString, serializer$2 as toValue, serializer as toYAML, transclude, traverse, visit };
export { Annotation as AnnotationElement, CloneError, Comment as CommentElement, DeepCloneError, ElementIdentityError, type ElementPredicate, IdentityManager, MediaTypes, Namespace, ParseResult as ParseResultElement, type Position, type PositionRange, ShallowCloneError, SourceMap as SourceMapElement, Transcluder, cloneDeep, cloneNode, cloneShallow, createNamespace, createPredicate, deepmerge, defaultIdentityManager, dehydrate, dereference, dispatchPlugins as dispatchRefractorPlugins, filter, find, findAtOffset, from, getNodeType, hasElementSourceMap, includesClasses, includesSymbols, isAnnotationElement, isArrayElement, isBooleanElement, isElement, isLinkElement, isMemberElement, isNullElement, isNumberElement, isObjectElement, isParseResultElement, isPrimitiveElement, isRefElement, isSourceMapElement, isStringElement, keyMapDefault as keyMap, namespace, parents, plugin$1 as refractorPluginElementIdentity, plugin as refractorPluginSemanticElementIdentity, reject, sexprs, some, serializer$1 as toJSON, toString, serializer$2 as toValue, serializer as toYAML, transclude, traverse, visit };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc