naystack 1.4.36 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var auth_exports = {};
22
22
  __export(auth_exports, {
23
23
  checkAuthStatus: () => checkAuthStatus,
24
+ getContext: () => getContext,
24
25
  getEmailAuthRoutes: () => getEmailAuthRoutes,
25
26
  getRefreshToken: () => getRefreshToken,
26
27
  initGoogleAuth: () => initGoogleAuth,
@@ -522,6 +523,7 @@ async function getRefreshToken() {
522
523
  // Annotate the CommonJS export names for ESM import in node:
523
524
  0 && (module.exports = {
524
525
  checkAuthStatus,
526
+ getContext,
525
527
  getEmailAuthRoutes,
526
528
  getRefreshToken,
527
529
  initGoogleAuth,
@@ -3,11 +3,11 @@ export { initGoogleAuth } from './google/index.mjs';
3
3
  export { initInstagramAuth } from './instagram/index.mjs';
4
4
  export { getRefreshToken } from './utils/token.mjs';
5
5
  export { checkAuthStatus } from './email/token.mjs';
6
+ export { getContext } from './email/utils.mjs';
6
7
  import 'next/server';
7
8
  import './email/types.mjs';
8
9
  import './types.mjs';
9
- import './email/utils.mjs';
10
- import '../graphql/types.mjs';
11
10
  import 'googleapis';
12
11
  import './instagram/utils.mjs';
13
12
  import '../socials/instagram/types.mjs';
13
+ import '../graphql/types.mjs';
@@ -3,11 +3,11 @@ export { initGoogleAuth } from './google/index.js';
3
3
  export { initInstagramAuth } from './instagram/index.js';
4
4
  export { getRefreshToken } from './utils/token.js';
5
5
  export { checkAuthStatus } from './email/token.js';
6
+ export { getContext } from './email/utils.js';
6
7
  import 'next/server';
7
8
  import './email/types.js';
8
9
  import './types.js';
9
- import './email/utils.js';
10
- import '../graphql/types.js';
11
10
  import 'googleapis';
12
11
  import './instagram/utils.js';
13
12
  import '../socials/instagram/types.js';
13
+ import '../graphql/types.js';
@@ -491,6 +491,7 @@ async function getRefreshToken() {
491
491
  }
492
492
  export {
493
493
  checkAuthStatus,
494
+ getContext,
494
495
  getEmailAuthRoutes,
495
496
  getRefreshToken,
496
497
  initGoogleAuth,
@@ -1,7 +1,7 @@
1
1
  export { GQLError } from './errors.mjs';
2
2
  export { initGraphQLServer } from './init.mjs';
3
3
  export { AuthorizedContext, Context } from './types.mjs';
4
- export { FieldLibrary, QueryLibrary, ResponseType, field, query } from './utils.mjs';
4
+ export { FieldLibrary, FieldResponseType, QueryLibrary, QueryResponseType, field, query } from './utils.mjs';
5
5
  import 'graphql/error';
6
6
  import '@apollo/server';
7
7
  import 'next/server';
@@ -1,7 +1,7 @@
1
1
  export { GQLError } from './errors.js';
2
2
  export { initGraphQLServer } from './init.js';
3
3
  export { AuthorizedContext, Context } from './types.js';
4
- export { FieldLibrary, QueryLibrary, ResponseType, field, query } from './utils.js';
4
+ export { FieldLibrary, FieldResponseType, QueryLibrary, QueryResponseType, field, query } from './utils.js';
5
5
  import 'graphql/error';
6
6
  import '@apollo/server';
7
7
  import 'next/server';
@@ -42,6 +42,7 @@ declare function QueryLibrary<T extends Record<string, QueryDefinition<any, any,
42
42
  declare function FieldLibrary<X extends object, T extends Record<string, FieldResolverDefinition<any, any, X, any, any, any, any>> = Record<string, FieldResolverDefinition<any, any, X, any, any, any, any>>>(type: ClassType, queries: T): {
43
43
  new (): {};
44
44
  };
45
- type ResponseType<T extends QueryDefinition<any, any, any, any, any, any>> = Awaited<ReturnType<T["call"]>>;
45
+ type QueryResponseType<T extends QueryDefinition<any, any, any, any, any, any>> = Awaited<ReturnType<T["call"]>>;
46
+ type FieldResponseType<T extends FieldResolverDefinition<any, any, any, any, any, any, any>> = Awaited<ReturnType<T["call"]>>;
46
47
 
47
- export { FieldLibrary, QueryLibrary, type ResponseType, field, query };
48
+ export { FieldLibrary, type FieldResponseType, QueryLibrary, type QueryResponseType, field, query };
@@ -42,6 +42,7 @@ declare function QueryLibrary<T extends Record<string, QueryDefinition<any, any,
42
42
  declare function FieldLibrary<X extends object, T extends Record<string, FieldResolverDefinition<any, any, X, any, any, any, any>> = Record<string, FieldResolverDefinition<any, any, X, any, any, any, any>>>(type: ClassType, queries: T): {
43
43
  new (): {};
44
44
  };
45
- type ResponseType<T extends QueryDefinition<any, any, any, any, any, any>> = Awaited<ReturnType<T["call"]>>;
45
+ type QueryResponseType<T extends QueryDefinition<any, any, any, any, any, any>> = Awaited<ReturnType<T["call"]>>;
46
+ type FieldResponseType<T extends FieldResolverDefinition<any, any, any, any, any, any, any>> = Awaited<ReturnType<T["call"]>>;
46
47
 
47
- export { FieldLibrary, QueryLibrary, type ResponseType, field, query };
48
+ export { FieldLibrary, type FieldResponseType, QueryLibrary, type QueryResponseType, field, query };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naystack",
3
- "version": "1.4.36",
3
+ "version": "1.5.0",
4
4
  "description": "A stack built with Next + GraphQL + S3 + Auth",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",