next-drupal
Advanced tools
Comparing version
@@ -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 @@ |
@@ -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" | ||
} |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
359236
0.17%0
-100%40
-2.44%4353
-0.07%