Skip to content

Commit

Permalink
feat: (#591) creating @faustjs/next/server export
Browse files Browse the repository at this point in the history
  • Loading branch information
wjohnsto committed Oct 22, 2021
1 parent 69b6321 commit e4ad3ea
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
"import": "./dist/mjs/export/log.js",
"require": "./dist/cjs/export/log.js"
},
"./server": {
"import": "./dist/mjs/export/server.js",
"require": "./dist/cjs/export/server.js"
},
"./utils": {
"import": "./dist/mjs/export/utils.js",
"require": "./dist/cjs/export/utils.js"
Expand Down
1 change: 1 addition & 0 deletions packages/next/server.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './dist/cjs/export/server';
2 changes: 1 addition & 1 deletion packages/next/src/HeadlessProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
AUTH_CLIENT_CACHE_PROP,
CLIENT_CACHE_PROP,
PageProps,
} from './getProps';
} from './server/getProps';
import { HeadlessContext } from './gqty/client';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/export/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from '../gqty/client';
export * from '../config/config';
export * from '../getProps';
export * from '../server/getProps';
export * from '../HeadlessProvider';
export * from '../utils';
export * from '../config/withFaust';
Expand Down
1 change: 1 addition & 0 deletions packages/next/src/export/log.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '../log';
1 change: 1 addition & 0 deletions packages/next/src/export/server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '../server';
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
import { RouterContext } from 'next/dist/shared/lib/router-context';

import React, { FunctionComponent, ComponentClass } from 'react';
import { config } from './config/config';
import { getClient, HeadlessContext } from './gqty/client';
import { config } from '../config/config';
import { getClient, HeadlessContext } from '../gqty/client';

import {
hasCategoryId,
Expand All @@ -23,7 +23,7 @@ import {
hasPostId,
hasPostSlug,
hasPostUri,
} from './utils';
} from '../utils';

export const CLIENT_CACHE_PROP = '__CLIENT_CACHE_PROP';
export const AUTH_CLIENT_CACHE_PROP = '__AUTH_CLIENT_CACHE_PROP';
Expand Down
1 change: 1 addition & 0 deletions packages/next/src/server/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './getProps';

0 comments on commit e4ad3ea

Please sign in to comment.