naystack 1.4.32 → 1.4.34
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.
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.esm.js +1 -1
- package/dist/auth/utils/token.cjs.js +1 -1
- package/dist/auth/utils/token.d.mts +1 -1
- package/dist/auth/utils/token.d.ts +1 -1
- package/dist/auth/utils/token.esm.js +1 -1
- package/dist/graphql/server.cjs.js +14 -3
- package/dist/graphql/server.d.mts +2 -3
- package/dist/graphql/server.d.ts +2 -3
- package/dist/graphql/server.esm.js +2 -1
- package/package.json +1 -1
package/dist/auth/index.cjs.js
CHANGED
|
@@ -518,7 +518,7 @@ function initInstagramAuth(props) {
|
|
|
518
518
|
var import_headers2 = require("next/headers");
|
|
519
519
|
async function getRefreshToken() {
|
|
520
520
|
const Cookie = await (0, import_headers2.cookies)();
|
|
521
|
-
return Cookie.get(REFRESH_COOKIE_NAME)?.value;
|
|
521
|
+
return Cookie.get(REFRESH_COOKIE_NAME)?.value || null;
|
|
522
522
|
}
|
|
523
523
|
// Annotate the CommonJS export names for ESM import in node:
|
|
524
524
|
0 && (module.exports = {
|
package/dist/auth/index.esm.js
CHANGED
|
@@ -488,7 +488,7 @@ function initInstagramAuth(props) {
|
|
|
488
488
|
import { cookies as cookies2 } from "next/headers";
|
|
489
489
|
async function getRefreshToken() {
|
|
490
490
|
const Cookie = await cookies2();
|
|
491
|
-
return Cookie.get(REFRESH_COOKIE_NAME)?.value;
|
|
491
|
+
return Cookie.get(REFRESH_COOKIE_NAME)?.value || null;
|
|
492
492
|
}
|
|
493
493
|
export {
|
|
494
494
|
checkAuthStatus,
|
|
@@ -31,7 +31,7 @@ var REFRESH_COOKIE_NAME = "refresh";
|
|
|
31
31
|
// src/auth/utils/token.ts
|
|
32
32
|
async function getRefreshToken() {
|
|
33
33
|
const Cookie = await (0, import_headers.cookies)();
|
|
34
|
-
return Cookie.get(REFRESH_COOKIE_NAME)?.value;
|
|
34
|
+
return Cookie.get(REFRESH_COOKIE_NAME)?.value || null;
|
|
35
35
|
}
|
|
36
36
|
// Annotate the CommonJS export names for ESM import in node:
|
|
37
37
|
0 && (module.exports = {
|
|
@@ -7,7 +7,7 @@ var REFRESH_COOKIE_NAME = "refresh";
|
|
|
7
7
|
// src/auth/utils/token.ts
|
|
8
8
|
async function getRefreshToken() {
|
|
9
9
|
const Cookie = await cookies();
|
|
10
|
-
return Cookie.get(REFRESH_COOKIE_NAME)?.value;
|
|
10
|
+
return Cookie.get(REFRESH_COOKIE_NAME)?.value || null;
|
|
11
11
|
}
|
|
12
12
|
export {
|
|
13
13
|
getRefreshToken
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// src/graphql/server.tsx
|
|
@@ -27,7 +37,8 @@ module.exports = __toCommonJS(server_exports);
|
|
|
27
37
|
var import_client = require("@apollo/client");
|
|
28
38
|
var import_client_integration_nextjs = require("@apollo/client-integration-nextjs");
|
|
29
39
|
var import_headers = require("next/headers");
|
|
30
|
-
var import_react = require("react");
|
|
40
|
+
var import_react = __toESM(require("react"));
|
|
41
|
+
var import_react2 = require("react");
|
|
31
42
|
|
|
32
43
|
// src/env.ts
|
|
33
44
|
var getEnvValue = (key) => {
|
|
@@ -84,7 +95,7 @@ function Injector({
|
|
|
84
95
|
Component,
|
|
85
96
|
props
|
|
86
97
|
}) {
|
|
87
|
-
return /* @__PURE__ */
|
|
98
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react2.Suspense, { fallback: /* @__PURE__ */ import_react.default.createElement(Component, { ...props || {}, loading: true }) }, /* @__PURE__ */ import_react.default.createElement(InjectorSuspensed, { Component, fetch, props }));
|
|
88
99
|
}
|
|
89
100
|
async function InjectorSuspensed({
|
|
90
101
|
fetch,
|
|
@@ -92,7 +103,7 @@ async function InjectorSuspensed({
|
|
|
92
103
|
props
|
|
93
104
|
}) {
|
|
94
105
|
const data = await fetch();
|
|
95
|
-
return /* @__PURE__ */
|
|
106
|
+
return /* @__PURE__ */ import_react.default.createElement(Component, { loading: false, ...props || {}, data });
|
|
96
107
|
}
|
|
97
108
|
var { query: gqlQuery } = (0, import_client_integration_nextjs.registerApolloClient)(() => {
|
|
98
109
|
return new import_client.ApolloClient({
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { FC } from 'react';
|
|
3
1
|
import { OperationVariables } from '@apollo/client';
|
|
4
2
|
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
3
|
+
import React__default, { FC } from 'react';
|
|
5
4
|
|
|
6
5
|
type OmittedProps<Y> = Omit<Omit<Y, "loading">, "data">;
|
|
7
6
|
type ComponentProps<Y> = OmittedProps<Y> extends Record<string, never> ? {
|
|
@@ -15,7 +14,7 @@ declare function Injector<T, Y>({ fetch, Component, props, }: {
|
|
|
15
14
|
data?: T;
|
|
16
15
|
loading: boolean;
|
|
17
16
|
} & Y>;
|
|
18
|
-
} & ComponentProps<Y>):
|
|
17
|
+
} & ComponentProps<Y>): React__default.JSX.Element;
|
|
19
18
|
declare const query: <T, V extends OperationVariables>(_query: TypedDocumentNode<T, V>, options?: {
|
|
20
19
|
variables?: V;
|
|
21
20
|
revalidate?: number;
|
package/dist/graphql/server.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { FC } from 'react';
|
|
3
1
|
import { OperationVariables } from '@apollo/client';
|
|
4
2
|
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
3
|
+
import React__default, { FC } from 'react';
|
|
5
4
|
|
|
6
5
|
type OmittedProps<Y> = Omit<Omit<Y, "loading">, "data">;
|
|
7
6
|
type ComponentProps<Y> = OmittedProps<Y> extends Record<string, never> ? {
|
|
@@ -15,7 +14,7 @@ declare function Injector<T, Y>({ fetch, Component, props, }: {
|
|
|
15
14
|
data?: T;
|
|
16
15
|
loading: boolean;
|
|
17
16
|
} & Y>;
|
|
18
|
-
} & ComponentProps<Y>):
|
|
17
|
+
} & ComponentProps<Y>): React__default.JSX.Element;
|
|
19
18
|
declare const query: <T, V extends OperationVariables>(_query: TypedDocumentNode<T, V>, options?: {
|
|
20
19
|
variables?: V;
|
|
21
20
|
revalidate?: number;
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
} from "@apollo/client";
|
|
7
7
|
import { registerApolloClient } from "@apollo/client-integration-nextjs";
|
|
8
8
|
import { cookies } from "next/headers";
|
|
9
|
+
import React from "react";
|
|
9
10
|
import { Suspense } from "react";
|
|
10
11
|
|
|
11
12
|
// src/env.ts
|
|
@@ -71,7 +72,7 @@ async function InjectorSuspensed({
|
|
|
71
72
|
props
|
|
72
73
|
}) {
|
|
73
74
|
const data = await fetch();
|
|
74
|
-
return /* @__PURE__ */ React.createElement(
|
|
75
|
+
return /* @__PURE__ */ React.createElement(Component, { loading: false, ...props || {}, data });
|
|
75
76
|
}
|
|
76
77
|
var { query: gqlQuery } = registerApolloClient(() => {
|
|
77
78
|
return new ApolloClient({
|