Skip to content

Commit

Permalink
Configure API Extractor
Browse files Browse the repository at this point in the history
  • Loading branch information
colincasey committed Mar 17, 2024
1 parent 07c6b13 commit 36b014b
Show file tree
Hide file tree
Showing 5 changed files with 384 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ coverage
.config
.bash_history
dist/
tmp/
41 changes: 41 additions & 0 deletions api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "<projectFolder>/dist/cookie/index.d.ts",
"newlineKind": "os",
"apiReport": {
"enabled": true,
"reportFolder": "api",
"reportTempFolder": "tmp"
},
"docModel": {
"enabled": true,
"apiJsonFilePath": "<projectFolder>/tmp/<unscopedPackageName>.api.json"
},
"dtsRollup": {
"enabled": false
},
"tsdocMetadata": {
"enabled": true
},
"messages": {
"compilerMessageReporting": {
"default": {
"logLevel": "warning"
}
},
"extractorMessageReporting": {
"default": {
"logLevel": "warning"
},
"ae-internal-missing-underscore": {
"logLevel": "none",
"addToApiReportFile": false
}
},
"tsdocMessageReporting": {
"default": {
"logLevel": "warning"
}
}
}
}
5 changes: 5 additions & 0 deletions api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ignoring all the generated docs initially
docs/*.md

# subsequent PRs will un-ignore areas that are under review until
# all docs are complete and we can drop this ignore file entirely
332 changes: 332 additions & 0 deletions api/tough-cookie.api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,332 @@
## API Report File for "tough-cookie"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts

/// <reference types="node" />

// @public (undocumented)
export function canonicalDomain(str: string | null): string | null;

// @public (undocumented)
export class Cookie {
// Warning: (ae-forgotten-export) The symbol "CreateCookieOptions" needs to be exported by the entry point index.d.ts
constructor(options?: CreateCookieOptions);
// (undocumented)
canonicalizedDomain(): string | null;
// (undocumented)
cdomain(): string | null;
// (undocumented)
clone(): Cookie | null;
// (undocumented)
static cookiesCreated: number;
// (undocumented)
cookieString(): string;
// (undocumented)
creation: Date | 'Infinity' | null;
// (undocumented)
creationIndex: number;
// (undocumented)
domain: string | null;
// (undocumented)
expires: Date | 'Infinity' | null;
// (undocumented)
expiryTime(now?: Date): number | undefined;
// (undocumented)
extensions: string[] | null;
// Warning: (ae-forgotten-export) The symbol "fromJSON_2" needs to be exported by the entry point index.d.ts
//
// (undocumented)
static fromJSON: typeof fromJSON_2;
// (undocumented)
hostOnly: boolean | null;
// (undocumented)
httpOnly: boolean;
// (undocumented)
isPersistent(): boolean;
// (undocumented)
key: string;
// (undocumented)
lastAccessed: Date | 'Infinity' | null;
// (undocumented)
maxAge: number | 'Infinity' | '-Infinity' | null;
// Warning: (ae-forgotten-export) The symbol "parse_2" needs to be exported by the entry point index.d.ts
//
// (undocumented)
static parse: typeof parse_2;
// (undocumented)
path: string | null;
// (undocumented)
pathIsDefault: boolean | null;
// (undocumented)
sameSite: string | undefined;
// (undocumented)
static sameSiteCanonical: {
readonly strict: "Strict";
readonly lax: "Lax";
};
// (undocumented)
static sameSiteLevel: {
readonly strict: 3;
readonly lax: 2;
readonly none: 1;
};
// (undocumented)
secure: boolean;
// (undocumented)
static serializableProperties: readonly ["key", "value", "expires", "maxAge", "domain", "path", "secure", "httpOnly", "extensions", "hostOnly", "pathIsDefault", "creation", "lastAccessed", "sameSite"];
// (undocumented)
setExpires(exp: string | Date): void;
// (undocumented)
setMaxAge(age: number): void;
// Warning: (ae-forgotten-export) The symbol "SerializedCookie" needs to be exported by the entry point index.d.ts
//
// (undocumented)
toJSON(): SerializedCookie;
// (undocumented)
toString(): string;
// (undocumented)
TTL(now?: number): number;
// (undocumented)
validate(): boolean;
// (undocumented)
value: string;
}

// @public
export function cookieCompare(a: Cookie, b: Cookie): number;

// @public (undocumented)
export class CookieJar {
// Warning: (ae-forgotten-export) The symbol "CreateCookieJarOptions" needs to be exported by the entry point index.d.ts
constructor(store?: Store | null | undefined, options?: CreateCookieJarOptions | boolean);
// (undocumented)
clone(callback: Callback<CookieJar>): void;
// (undocumented)
clone(newStore: Store, callback: Callback<CookieJar>): void;
// (undocumented)
clone(newStore?: Store): Promise<CookieJar>;
// (undocumented)
cloneSync(newStore?: Store): CookieJar | undefined;
// (undocumented)
_cloneSync(newStore?: Store): CookieJar | undefined;
// (undocumented)
static deserialize(strOrObj: string | object, callback: Callback<CookieJar>): void;
// (undocumented)
static deserialize(strOrObj: string | object, store: Store, callback: Callback<CookieJar>): void;
// (undocumented)
static deserialize(strOrObj: string | object, store?: Store): Promise<CookieJar>;
// (undocumented)
static deserialize(strOrObj: string | object, store?: Store | Callback<CookieJar>, callback?: Callback<CookieJar>): unknown;
// (undocumented)
static deserializeSync(strOrObj: string | SerializedCookieJar, store?: Store): CookieJar;
// (undocumented)
static fromJSON(jsonString: SerializedCookieJar, store?: Store): CookieJar;
// (undocumented)
getCookies(url: string, callback: Callback<Cookie[]>): void;
// Warning: (ae-forgotten-export) The symbol "GetCookiesOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
getCookies(url: string | URL, options: GetCookiesOptions | undefined, callback: Callback<Cookie[]>): void;
// (undocumented)
getCookies(url: string | URL, options?: GetCookiesOptions | undefined): Promise<Cookie[]>;
// (undocumented)
getCookies(url: string | URL, options: GetCookiesOptions | undefined | Callback<Cookie[]>, callback?: Callback<Cookie[]>): unknown;
// (undocumented)
getCookiesSync(url: string, options?: GetCookiesOptions): Cookie[];
// (undocumented)
getCookieString(url: string, options: GetCookiesOptions, callback: Callback<string | undefined>): void;
// (undocumented)
getCookieString(url: string, callback: Callback<string | undefined>): void;
// (undocumented)
getCookieString(url: string, options?: GetCookiesOptions): Promise<string>;
// (undocumented)
getCookieString(url: string, options: GetCookiesOptions | Callback<string | undefined>, callback?: Callback<string | undefined>): unknown;
// (undocumented)
getCookieStringSync(url: string, options?: GetCookiesOptions): string;
// (undocumented)
getSetCookieStrings(url: string, callback: Callback<string[] | undefined>): void;
// (undocumented)
getSetCookieStrings(url: string, options: GetCookiesOptions, callback: Callback<string[] | undefined>): void;
// (undocumented)
getSetCookieStrings(url: string, options?: GetCookiesOptions): Promise<string[] | undefined>;
// (undocumented)
getSetCookieStrings(url: string, options: GetCookiesOptions, callback?: Callback<string[] | undefined>): unknown;
// (undocumented)
getSetCookieStringsSync(url: string, options?: GetCookiesOptions): string[];
// (undocumented)
_importCookies(serialized: unknown, callback: Callback<CookieJar>): void;
// (undocumented)
_importCookiesSync(serialized: unknown): void;
// (undocumented)
readonly prefixSecurity: string;
// Warning: (ae-forgotten-export) The symbol "ErrorCallback" needs to be exported by the entry point index.d.ts
//
// (undocumented)
removeAllCookies(callback: ErrorCallback): void;
// (undocumented)
removeAllCookies(): Promise<void>;
// (undocumented)
removeAllCookiesSync(): void;
// Warning: (ae-forgotten-export) The symbol "SerializedCookieJar" needs to be exported by the entry point index.d.ts
//
// (undocumented)
serialize(callback: Callback<SerializedCookieJar>): void;
// (undocumented)
serialize(): Promise<SerializedCookieJar>;
// (undocumented)
serializeSync(): SerializedCookieJar | undefined;
// Warning: (ae-forgotten-export) The symbol "Callback" needs to be exported by the entry point index.d.ts
//
// (undocumented)
setCookie(cookie: string | Cookie, url: string | URL, callback: Callback<Cookie | undefined>): void;
// Warning: (ae-forgotten-export) The symbol "SetCookieOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
setCookie(cookie: string | Cookie, url: string | URL, options: SetCookieOptions, callback: Callback<Cookie | undefined>): void;
// (undocumented)
setCookie(cookie: string | Cookie, url: string | URL, options?: SetCookieOptions): Promise<Cookie | undefined>;
// (undocumented)
setCookie(cookie: string | Cookie, url: string | URL, options: SetCookieOptions | Callback<Cookie | undefined>, callback?: Callback<Cookie | undefined>): unknown;
// (undocumented)
setCookieSync(cookie: string | Cookie, url: string, options?: SetCookieOptions): Cookie | undefined;
// (undocumented)
readonly store: Store;
// (undocumented)
toJSON(): SerializedCookieJar | undefined;
}

// @public (undocumented)
export function defaultPath(path?: string | null): string;

// @public (undocumented)
export function domainMatch(str?: string | null, domStr?: string | null, canonicalize?: boolean): boolean | null;

// @public
export function formatDate(date: Date): string;

// @public (undocumented)
export const fromJSON: (str: unknown) => Cookie | null;

// Warning: (ae-forgotten-export) The symbol "GetPublicSuffixOptions" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export function getPublicSuffix(domain: string, options?: GetPublicSuffixOptions): string | null;

// @public (undocumented)
export class MemoryCookieStore extends Store {
constructor();
// (undocumented)
findCookie(domain: string | null, path: string | null, key: string | undefined): Promise<Cookie | undefined>;
// (undocumented)
findCookie(domain: string | null, path: string | null, key: string | undefined, callback: Callback<Cookie | undefined>): void;
// (undocumented)
findCookies(domain: string, path: string, allowSpecialUseDomain?: boolean): Promise<Cookie[]>;
// (undocumented)
findCookies(domain: string, path: string, allowSpecialUseDomain?: boolean, callback?: Callback<Cookie[]>): void;
// (undocumented)
getAllCookies(): Promise<Cookie[]>;
// (undocumented)
getAllCookies(callback: Callback<Cookie[]>): void;
// Warning: (ae-forgotten-export) The symbol "MemoryCookieStoreIndex" needs to be exported by the entry point index.d.ts
//
// (undocumented)
idx: MemoryCookieStoreIndex;
// (undocumented)
putCookie(cookie: Cookie): Promise<void>;
// (undocumented)
putCookie(cookie: Cookie, callback: ErrorCallback): void;
// (undocumented)
removeAllCookies(): Promise<void>;
// (undocumented)
removeAllCookies(callback: ErrorCallback): void;
// (undocumented)
removeCookie(domain: string, path: string, key: string): Promise<void>;
// (undocumented)
removeCookie(domain: string, path: string, key: string, callback: ErrorCallback): void;
// (undocumented)
removeCookies(domain: string, path: string): Promise<void>;
// (undocumented)
removeCookies(domain: string, path: string, callback: ErrorCallback): void;
// (undocumented)
synchronous: boolean;
// (undocumented)
updateCookie(oldCookie: Cookie, newCookie: Cookie): Promise<void>;
// (undocumented)
updateCookie(oldCookie: Cookie, newCookie: Cookie, callback: ErrorCallback): void;
}

// @public (undocumented)
export class ParameterError extends Error {
}

// @public (undocumented)
export const parse: (str: string, options?: {
loose?: boolean | undefined;
} | undefined) => Cookie | null | undefined;

// @public (undocumented)
export function parseDate(str: string | undefined | null): Date | undefined;

// @public (undocumented)
export function pathMatch(reqPath: string, cookiePath: string): boolean;

// @public (undocumented)
export function permuteDomain(domain: string, allowSpecialUseDomain?: boolean): string[] | null;

// @public
export function permutePath(path: string): string[];

// @public (undocumented)
export const PrefixSecurityEnum: Readonly<{
SILENT: "silent";
STRICT: "strict";
DISABLED: "unsafe-disabled";
}>;

// @public (undocumented)
export class Store {
constructor();
// (undocumented)
findCookie(domain: string | null, path: string | null, key: string | undefined): Promise<Cookie | null | undefined>;
// (undocumented)
findCookie(domain: string | null, path: string | null, key: string | undefined, callback: Callback<Cookie | null | undefined>): void;
// (undocumented)
findCookies(domain: string | null, path: string | null, allowSpecialUseDomain?: boolean): Promise<Cookie[]>;
// (undocumented)
findCookies(domain: string | null, path: string | null, allowSpecialUseDomain?: boolean, callback?: Callback<Cookie[]>): void;
// (undocumented)
getAllCookies(): Promise<Cookie[]>;
// (undocumented)
getAllCookies(callback: Callback<Cookie[]>): void;
// (undocumented)
putCookie(cookie: Cookie): Promise<void>;
// (undocumented)
putCookie(cookie: Cookie, callback: ErrorCallback): void;
// (undocumented)
removeAllCookies(): Promise<void>;
// (undocumented)
removeAllCookies(callback: ErrorCallback): void;
// (undocumented)
removeCookie(domain: string | null | undefined, path: string | null | undefined, key: string | null | undefined): Promise<void>;
// (undocumented)
removeCookie(domain: string | null | undefined, path: string | null | undefined, key: string | null | undefined, callback: ErrorCallback): void;
// (undocumented)
removeCookies(domain: string, path: string | null): Promise<void>;
// (undocumented)
removeCookies(domain: string, path: string | null, callback: ErrorCallback): void;
// (undocumented)
synchronous: boolean;
// (undocumented)
updateCookie(oldCookie: Cookie, newCookie: Cookie): Promise<void>;
// (undocumented)
updateCookie(oldCookie: Cookie, newCookie: Cookie, callback: ErrorCallback): void;
}

// @public (undocumented)
export const version = "5.0.0-rc.1";

// (No @packageDocumentation comment for this package)

```

0 comments on commit 36b014b

Please sign in to comment.