New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

next-drupal

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-drupal - npm Package Compare versions

Comparing version

to
1.2.2

12

CHANGELOG.md

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

## [1.2.2](https://github.com/chapter-three/next-drupal/compare/next-drupal@1.2.1...next-drupal@1.2.2) (2022-04-11)
### Bug Fixes
* **next-drupal:** unnecessary optional chaining ([3335d94](https://github.com/chapter-three/next-drupal/commit/3335d947b8090bb0b8719f6a385f5a8c2f7a951e))
* **next-drupal:** use a generic for getMenu and useMenu ([8e2cdc2](https://github.com/chapter-three/next-drupal/commit/8e2cdc244c20710f46db94a1f257157f7d285601))
## [1.2.1](https://github.com/chapter-three/next-drupal/compare/next-drupal@1.2.0...next-drupal@1.2.1) (2022-03-28)

@@ -8,0 +20,0 @@

54

dist/client.d.ts

@@ -1,3 +0,3 @@

import type { GetStaticPathsContext, GetStaticPathsResult, GetStaticPropsContext } from "next";
import type { JsonApiResource, Locale, AccessToken, JsonApiResponse, JsonApiWithLocaleOptions, JsonApiParams, DrupalTranslatedPath, DrupalMenuLinkContent, FetchOptions, DrupalClientOptions, BaseUrl, JsonApiWithAuthOptions, PathPrefix, PathAlias } from "./types";
import type { GetStaticPathsContext, GetStaticPathsResult, GetStaticPropsContext, NextApiRequest, NextApiResponse } from "next";
import type { JsonApiResource, Locale, AccessToken, JsonApiResponse, JsonApiWithLocaleOptions, JsonApiParams, DrupalTranslatedPath, DrupalMenuLinkContent, FetchOptions, DrupalClientOptions, BaseUrl, JsonApiWithAuthOptions, PathPrefix, PathAlias, PreviewOptions } from "./types";
export declare class Unstable_DrupalClient {

@@ -17,2 +17,3 @@ baseUrl: BaseUrl;

private withAuth?;
private previewSecret?;
/**

@@ -35,3 +36,3 @@ * Instantiates a new DrupalClient.

getResourceFromContext<T extends JsonApiResource>(type: string, context: GetStaticPropsContext, options?: {
prefix?: PathPrefix;
pathPrefix?: PathPrefix;
isVersionable?: boolean;

@@ -50,12 +51,16 @@ } & JsonApiWithLocaleOptions & JsonApiWithAuthOptions): Promise<T>;

params?: JsonApiParams;
prefix?: PathPrefix;
} & JsonApiWithAuthOptions) => Promise<GetStaticPathsResult["paths"]>;
pathPrefix?: PathPrefix;
} & JsonApiWithAuthOptions) => Promise<GetStaticPathsResult<{
slug: string[];
}>["paths"]>;
getStaticPathsFromContext(types: string | string[], context: GetStaticPathsContext, options?: {
params?: JsonApiParams;
prefix?: PathPrefix;
} & JsonApiWithAuthOptions): Promise<GetStaticPathsResult["paths"]>;
pathPrefix?: PathPrefix;
} & JsonApiWithAuthOptions): Promise<GetStaticPathsResult<{
slug: string[];
}>["paths"]>;
buildStaticPathsFromResources(resources: {
path: PathAlias;
}[], options?: {
prefix?: PathPrefix;
pathPrefix?: PathPrefix;
locale?: Locale;

@@ -68,3 +73,3 @@ }): {

buildStaticPathsParamsFromPaths(paths: string[], options?: {
prefix?: PathPrefix;
pathPrefix?: PathPrefix;
locale?: Locale;

@@ -78,31 +83,22 @@ }): {

translatePathFromContext(context: GetStaticPropsContext, options?: {
prefix?: PathPrefix;
pathPrefix?: PathPrefix;
} & JsonApiWithAuthOptions): Promise<DrupalTranslatedPath>;
getPathFromContext(context: GetStaticPropsContext, options?: {
prefix?: PathPrefix;
pathPrefix?: PathPrefix;
}): string;
getIndex(locale?: Locale): Promise<JsonApiResponse>;
getEntryForResourceType(type: string, locale?: Locale): Promise<string>;
getMenu(name: string, options?: JsonApiWithLocaleOptions): Promise<{
items: DrupalMenuLinkContent[];
tree: DrupalMenuLinkContent[];
preview(request?: NextApiRequest, response?: NextApiResponse, options?: PreviewOptions): Promise<void | NextApiResponse<any>>;
getMenu<T extends DrupalMenuLinkContent>(name: string, options?: JsonApiWithLocaleOptions & JsonApiWithAuthOptions): Promise<{
items: T[];
tree: T[];
}>;
buildMenuTree(links: DrupalMenuLinkContent[], parent?: DrupalMenuLinkContent["id"]): any;
getView<T>(name: string, options?: {
deserialize?: boolean;
} & JsonApiWithLocaleOptions): Promise<{
getView<T>(name: string, options?: JsonApiWithLocaleOptions & JsonApiWithAuthOptions): Promise<{
results: T;
meta: Record<string, any>;
links: {
[key in "next" | "prev" | "self"]?: {
href: "string";
};
};
meta: JsonApiResponse["meta"];
links: JsonApiResponse["links"];
}>;
getSearchIndex<T = JsonApiResource[]>(name: string, options?: {
deserialize?: boolean;
} & JsonApiWithLocaleOptions): Promise<T>;
getSearchIndexFromContext<T = JsonApiResource[]>(name: string, context: GetStaticPropsContext, options?: {
deserialize?: boolean;
} & JsonApiWithLocaleOptions): Promise<T>;
getSearchIndex<T = JsonApiResource[]>(name: string, options?: JsonApiWithLocaleOptions & JsonApiWithAuthOptions): Promise<T>;
getSearchIndexFromContext<T = JsonApiResource[]>(name: string, context: GetStaticPropsContext, options?: JsonApiWithLocaleOptions & JsonApiWithAuthOptions): Promise<T>;
buildUrl(path: string, params?: string | Record<string, string> | URLSearchParams | JsonApiParams): URL;

@@ -109,0 +105,0 @@ getAccessToken(): Promise<AccessToken>;

{
"name": "next-drupal",
"description": "Helpers for Next.js + Drupal.",
"version": "1.2.2-alpha.12+8e2cdc2",
"version": "1.2.2",
"sideEffects": false,

@@ -48,3 +48,3 @@ "source": "src/index.ts",

},
"gitHead": "8e2cdc244c20710f46db94a1f257157f7d285601"
"gitHead": "531e9a4fddd68dbb15d1e01969e131cf5b8addd6"
}