mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-21 23:16:43 +00:00
chore: prettier-plugin-sort-imports
This commit is contained in:
@@ -4,15 +4,15 @@
|
||||
* This file pulls from the root "site.config.ts" as well as environment variables
|
||||
* for optional depenencies.
|
||||
*/
|
||||
|
||||
import { parsePageId } from 'notion-utils'
|
||||
import type posthog from 'posthog-js'
|
||||
|
||||
import { getEnv, getSiteConfig } from './get-config-value'
|
||||
import { NavigationLink } from './site-config'
|
||||
import {
|
||||
NavigationStyle,
|
||||
PageUrlOverridesInverseMap,
|
||||
PageUrlOverridesMap,
|
||||
NavigationStyle,
|
||||
Site
|
||||
} from './types'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Keyv from '@keyvhq/core'
|
||||
import KeyvRedis from '@keyvhq/redis'
|
||||
|
||||
import { isRedisEnabled, redisUrl, redisNamespace } from './config'
|
||||
import { isRedisEnabled, redisNamespace, redisUrl } from './config'
|
||||
|
||||
let db: Keyv
|
||||
if (isRedisEnabled) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ExtendedRecordMap } from 'notion-types'
|
||||
import {
|
||||
parsePageId,
|
||||
getCanonicalPageId as getCanonicalPageIdImpl
|
||||
getCanonicalPageId as getCanonicalPageIdImpl,
|
||||
parsePageId
|
||||
} from 'notion-utils'
|
||||
|
||||
import { inversePageUrlOverrides } from './config'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import * as types from './types'
|
||||
import { getPageProperty } from 'notion-utils'
|
||||
|
||||
import * as types from './types'
|
||||
|
||||
export function getPageTweet(
|
||||
block: types.Block,
|
||||
recordMap: types.ExtendedRecordMap
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import pMemoize from 'p-memoize'
|
||||
import { getAllPagesInSpace, uuidToId } from 'notion-utils'
|
||||
import pMemoize from 'p-memoize'
|
||||
|
||||
import { includeNotionIdInUrls } from './config'
|
||||
import { notion } from './notion-api'
|
||||
import { getCanonicalPageId } from './get-canonical-page-id'
|
||||
import * as config from './config'
|
||||
import * as types from './types'
|
||||
import { includeNotionIdInUrls } from './config'
|
||||
import { getCanonicalPageId } from './get-canonical-page-id'
|
||||
import { notion } from './notion-api'
|
||||
|
||||
const uuid = !!includeNotionIdInUrls
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Block } from 'notion-types'
|
||||
import { defaultMapImageUrl } from 'react-notion-x'
|
||||
|
||||
import { defaultPageIcon, defaultPageCover } from './config'
|
||||
import { defaultPageCover, defaultPageIcon } from './config'
|
||||
|
||||
export const mapImageUrl = (url: string, block: Block) => {
|
||||
if (url === defaultPageCover || url === defaultPageIcon) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { ExtendedRecordMap } from 'notion-types'
|
||||
import { uuidToId, parsePageId } from 'notion-utils'
|
||||
import { parsePageId, uuidToId } from 'notion-utils'
|
||||
|
||||
import { Site } from './types'
|
||||
import { includeNotionIdInUrls } from './config'
|
||||
import { getCanonicalPageId } from './get-canonical-page-id'
|
||||
import { Site } from './types'
|
||||
|
||||
// include UUIDs in page URLs during local development but not in production
|
||||
// (they're nice for debugging and speed up local dev)
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import pMap from 'p-map'
|
||||
import pMemoize from 'p-memoize'
|
||||
import { ExtendedRecordMap, SearchParams, SearchResults } from 'notion-types'
|
||||
import { mergeRecordMaps } from 'notion-utils'
|
||||
import pMap from 'p-map'
|
||||
import pMemoize from 'p-memoize'
|
||||
|
||||
import { notion } from './notion-api'
|
||||
import { getPreviewImageMap } from './preview-images'
|
||||
import {
|
||||
isPreviewImageSupportEnabled,
|
||||
navigationStyle,
|
||||
navigationLinks
|
||||
navigationLinks,
|
||||
navigationStyle
|
||||
} from './config'
|
||||
import { notion } from './notion-api'
|
||||
import { getPreviewImageMap } from './preview-images'
|
||||
|
||||
const getNavigationLinkPages = pMemoize(
|
||||
async (): Promise<ExtendedRecordMap[]> => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { parsePageId, getPageTitle } from 'notion-utils'
|
||||
import { getPage } from './notion'
|
||||
import { getPageTitle, parsePageId } from 'notion-utils'
|
||||
|
||||
import * as config from './config'
|
||||
import { getPage } from './notion'
|
||||
|
||||
export const oembed = async ({
|
||||
url,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import got from 'got'
|
||||
import lqip from 'lqip-modern'
|
||||
import pMap from 'p-map'
|
||||
import pMemoize from 'p-memoize'
|
||||
import { ExtendedRecordMap, PreviewImage, PreviewImageMap } from 'notion-types'
|
||||
import { getPageImageUrls, normalizeUrl } from 'notion-utils'
|
||||
import pMap from 'p-map'
|
||||
import pMemoize from 'p-memoize'
|
||||
|
||||
import { defaultPageIcon, defaultPageCover } from './config'
|
||||
import { defaultPageCover, defaultPageIcon } from './config'
|
||||
import { db } from './db'
|
||||
import { mapImageUrl } from './map-image-url'
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { parsePageId } from 'notion-utils'
|
||||
import { ExtendedRecordMap } from 'notion-types'
|
||||
import { parsePageId } from 'notion-utils'
|
||||
|
||||
import * as acl from './acl'
|
||||
import { pageUrlOverrides, pageUrlAdditions, environment, site } from './config'
|
||||
import { environment, pageUrlAdditions, pageUrlOverrides, site } from './config'
|
||||
import { db } from './db'
|
||||
import { getPage } from './notion'
|
||||
import { getSiteMap } from './get-site-map'
|
||||
import { getPage } from './notion'
|
||||
|
||||
export async function resolveNotionPage(domain: string, rawPageId?: string) {
|
||||
let pageId: string
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// import ky from 'ky'
|
||||
import ExpiryMap from 'expiry-map'
|
||||
import fetch from 'isomorphic-unfetch'
|
||||
import pMemoize from 'p-memoize'
|
||||
import ExpiryMap from 'expiry-map'
|
||||
|
||||
import { api } from './config'
|
||||
import * as types from './types'
|
||||
import { api } from './config'
|
||||
|
||||
export const searchNotion = pMemoize(searchNotionImpl, {
|
||||
cacheKey: (args) => args[0]?.query,
|
||||
|
||||
Reference in New Issue
Block a user