@stackframe/stack-sc 2.8.61 → 2.8.62

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.
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.combined.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,10 @@
1
+ // src/index.default.ts
2
+ var cookies = void 0;
3
+ var headers = void 0;
4
+ var isReactServer = false;
5
+ export {
6
+ cookies,
7
+ headers,
8
+ isReactServer
9
+ };
10
+ //# sourceMappingURL=index.default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.default.ts"],"sourcesContent":["export const cookies = undefined;\nexport const headers = undefined;\nexport const isReactServer = false;\n"],"mappings":";AAAO,IAAM,UAAU;AAChB,IAAM,UAAU;AAChB,IAAM,gBAAgB;","names":[]}
@@ -0,0 +1,11 @@
1
+ // src/index.react-server.ts
2
+ import { cookies as nextCookies, headers as nextHeaders } from "./next-static-analysis-workaround.js";
3
+ var isReactServer = true;
4
+ var cookies = nextCookies;
5
+ var headers = nextHeaders;
6
+ export {
7
+ cookies,
8
+ headers,
9
+ isReactServer
10
+ };
11
+ //# sourceMappingURL=index.react-server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.react-server.ts"],"sourcesContent":["export const isReactServer = true;\n\n\n// In Next.js 15, the `next/headers` module returns async functions.\n// Since we support both Next.js 14 and 15, we return a union of the two.\n// TODO: Remove this once we drop support for Next.js 14, and replace it with `export { cookies, headers } from 'next/headers';`\n// https://nextjs.org/blog/next-15#async-request-apis-breaking-change\nimport { cookies as nextCookies, headers as nextHeaders } from './next-static-analysis-workaround';\nexport const cookies = nextCookies as typeof nextCookies | ((...args: Parameters<typeof nextCookies>) => Promise<ReturnType<typeof nextCookies>>);\nexport const headers = nextHeaders as typeof nextHeaders | ((...args: Parameters<typeof nextHeaders>) => Promise<ReturnType<typeof nextHeaders>>);\n"],"mappings":";AAOA,SAAS,WAAW,aAAa,WAAW,mBAAmB;AAPxD,IAAM,gBAAgB;AAQtB,IAAM,UAAU;AAChB,IAAM,UAAU;","names":[]}
@@ -0,0 +1,3 @@
1
+ // src/next-static-analysis-workaround.ts
2
+ export * from "next/headers";
3
+ //# sourceMappingURL=next-static-analysis-workaround.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/next-static-analysis-workaround.ts"],"sourcesContent":["// Next statically analyzes the imports and ensures that the `next/headers` module is never imported on a client bundle.\n//\n// We know what we're doing though. We ensure at runtime that we never use the module unless we're on the server, so the\n// static analysis is wrong.\n//\n// Fortunately, as a hack, we can get around it by importing them using the `export from` syntax, which the static\n// analyzer does not detect, but Webpack is fine with it.\n//\n// So, we can use the export syntax here, and then import them normally in the main file.\n\nexport * from 'next/headers';\n"],"mappings":";AAUA,cAAc;","names":[]}
@@ -0,0 +1,9 @@
1
+ import { cookies as cookies$2, headers as headers$2 } from './index.default.mjs';
2
+ import { cookies as cookies$1, headers as headers$1 } from './index.react-server.mjs';
3
+ import 'next/headers';
4
+
5
+ declare const cookies: typeof cookies$1 | typeof cookies$2;
6
+ declare const headers: typeof headers$1 | typeof headers$2;
7
+ declare const isReactServer: boolean;
8
+
9
+ export { cookies, headers, isReactServer };
@@ -1,6 +1,9 @@
1
- import * as def from "./index.default";
2
- import * as reactServer from "./index.react-server";
3
- export declare const cookies: typeof reactServer.cookies | typeof def.cookies;
4
- export declare const headers: typeof reactServer.headers | typeof def.headers;
5
- export declare const isReactServer: boolean;
6
- //# sourceMappingURL=index.combined.d.ts.map
1
+ import { cookies as cookies$2, headers as headers$2 } from './index.default.js';
2
+ import { cookies as cookies$1, headers as headers$1 } from './index.react-server.js';
3
+ import 'next/headers';
4
+
5
+ declare const cookies: typeof cookies$1 | typeof cookies$2;
6
+ declare const headers: typeof headers$1 | typeof headers$2;
7
+ declare const isReactServer: boolean;
8
+
9
+ export { cookies, headers, isReactServer };
@@ -1 +1,19 @@
1
- export {};
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/index.combined.ts
17
+ var index_combined_exports = {};
18
+ module.exports = __toCommonJS(index_combined_exports);
19
+ //# sourceMappingURL=index.combined.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.combined.ts"],"sourcesContent":["import * as def from \"./index.default\";\nimport * as reactServer from \"./index.react-server\";\n\nexport declare const cookies: typeof reactServer.cookies | typeof def.cookies;\nexport declare const headers: typeof reactServer.headers | typeof def.headers;\nexport declare const isReactServer: boolean;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,5 @@
1
+ declare const cookies: undefined;
2
+ declare const headers: undefined;
3
+ declare const isReactServer = false;
4
+
5
+ export { cookies, headers, isReactServer };
@@ -1,4 +1,5 @@
1
- export declare const cookies: undefined;
2
- export declare const headers: undefined;
3
- export declare const isReactServer = false;
4
- //# sourceMappingURL=index.default.d.ts.map
1
+ declare const cookies: undefined;
2
+ declare const headers: undefined;
3
+ declare const isReactServer = false;
4
+
5
+ export { cookies, headers, isReactServer };
@@ -1,3 +1,37 @@
1
- export const cookies = undefined;
2
- export const headers = undefined;
3
- export const isReactServer = false;
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.default.ts
21
+ var index_default_exports = {};
22
+ __export(index_default_exports, {
23
+ cookies: () => cookies,
24
+ headers: () => headers,
25
+ isReactServer: () => isReactServer
26
+ });
27
+ module.exports = __toCommonJS(index_default_exports);
28
+ var cookies = void 0;
29
+ var headers = void 0;
30
+ var isReactServer = false;
31
+ // Annotate the CommonJS export names for ESM import in node:
32
+ 0 && (module.exports = {
33
+ cookies,
34
+ headers,
35
+ isReactServer
36
+ });
37
+ //# sourceMappingURL=index.default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.default.ts"],"sourcesContent":["export const cookies = undefined;\nexport const headers = undefined;\nexport const isReactServer = false;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,UAAU;AAChB,IAAM,UAAU;AAChB,IAAM,gBAAgB;","names":[]}
@@ -0,0 +1,8 @@
1
+ import { cookies as cookies$1, headers as headers$1 } from 'next/headers';
2
+
3
+ declare const isReactServer = true;
4
+
5
+ declare const cookies: typeof cookies$1 | (() => Promise<ReturnType<typeof cookies$1>>);
6
+ declare const headers: typeof headers$1 | (() => Promise<ReturnType<typeof headers$1>>);
7
+
8
+ export { cookies, headers, isReactServer };
@@ -1,5 +1,8 @@
1
- export declare const isReactServer = true;
2
- import { cookies as nextCookies, headers as nextHeaders } from './next-static-analysis-workaround';
3
- export declare const cookies: typeof nextCookies | (() => Promise<ReturnType<typeof nextCookies>>);
4
- export declare const headers: typeof nextHeaders | (() => Promise<ReturnType<typeof nextHeaders>>);
5
- //# sourceMappingURL=index.react-server.d.ts.map
1
+ import { cookies as cookies$1, headers as headers$1 } from 'next/headers';
2
+
3
+ declare const isReactServer = true;
4
+
5
+ declare const cookies: typeof cookies$1 | (() => Promise<ReturnType<typeof cookies$1>>);
6
+ declare const headers: typeof headers$1 | (() => Promise<ReturnType<typeof headers$1>>);
7
+
8
+ export { cookies, headers, isReactServer };
@@ -1,8 +1,38 @@
1
- export const isReactServer = true;
2
- // In Next.js 15, the `next/headers` module returns async functions.
3
- // Since we support both Next.js 14 and 15, we return a union of the two.
4
- // TODO: Remove this once we drop support for Next.js 14, and replace it with `export { cookies, headers } from 'next/headers';`
5
- // https://nextjs.org/blog/next-15#async-request-apis-breaking-change
6
- import { cookies as nextCookies, headers as nextHeaders } from './next-static-analysis-workaround';
7
- export const cookies = nextCookies;
8
- export const headers = nextHeaders;
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.react-server.ts
21
+ var index_react_server_exports = {};
22
+ __export(index_react_server_exports, {
23
+ cookies: () => cookies,
24
+ headers: () => headers,
25
+ isReactServer: () => isReactServer
26
+ });
27
+ module.exports = __toCommonJS(index_react_server_exports);
28
+ var import_next_static_analysis_workaround = require("./next-static-analysis-workaround.js");
29
+ var isReactServer = true;
30
+ var cookies = import_next_static_analysis_workaround.cookies;
31
+ var headers = import_next_static_analysis_workaround.headers;
32
+ // Annotate the CommonJS export names for ESM import in node:
33
+ 0 && (module.exports = {
34
+ cookies,
35
+ headers,
36
+ isReactServer
37
+ });
38
+ //# sourceMappingURL=index.react-server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.react-server.ts"],"sourcesContent":["export const isReactServer = true;\n\n\n// In Next.js 15, the `next/headers` module returns async functions.\n// Since we support both Next.js 14 and 15, we return a union of the two.\n// TODO: Remove this once we drop support for Next.js 14, and replace it with `export { cookies, headers } from 'next/headers';`\n// https://nextjs.org/blog/next-15#async-request-apis-breaking-change\nimport { cookies as nextCookies, headers as nextHeaders } from './next-static-analysis-workaround';\nexport const cookies = nextCookies as typeof nextCookies | ((...args: Parameters<typeof nextCookies>) => Promise<ReturnType<typeof nextCookies>>);\nexport const headers = nextHeaders as typeof nextHeaders | ((...args: Parameters<typeof nextHeaders>) => Promise<ReturnType<typeof nextHeaders>>);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,6CAA+D;AAPxD,IAAM,gBAAgB;AAQtB,IAAM,UAAU,uCAAAA;AAChB,IAAM,UAAU,uCAAAC;","names":["nextCookies","nextHeaders"]}
@@ -1,10 +1,25 @@
1
- // Next statically analyzes the imports and ensures that the `next/headers` module is never imported on a client bundle.
2
- //
3
- // We know what we're doing though. We ensure at runtime that we never use the module unless we're on the server, so the
4
- // static analysis is wrong.
5
- //
6
- // Fortunately, as a hack, we can get around it by importing them using the `export from` syntax, which the static
7
- // analyzer does not detect, but Webpack is fine with it.
8
- //
9
- // So, we can use the export syntax here, and then import them normally in the main file.
10
- export * from 'next/headers';
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // src/next-static-analysis-workaround.ts
18
+ var next_static_analysis_workaround_exports = {};
19
+ module.exports = __toCommonJS(next_static_analysis_workaround_exports);
20
+ __reExport(next_static_analysis_workaround_exports, require("next/headers"), module.exports);
21
+ // Annotate the CommonJS export names for ESM import in node:
22
+ 0 && (module.exports = {
23
+ ...require("next/headers")
24
+ });
25
+ //# sourceMappingURL=next-static-analysis-workaround.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/next-static-analysis-workaround.ts"],"sourcesContent":["// Next statically analyzes the imports and ensures that the `next/headers` module is never imported on a client bundle.\n//\n// We know what we're doing though. We ensure at runtime that we never use the module unless we're on the server, so the\n// static analysis is wrong.\n//\n// Fortunately, as a hack, we can get around it by importing them using the `export from` syntax, which the static\n// analyzer does not detect, but Webpack is fine with it.\n//\n// So, we can use the export syntax here, and then import them normally in the main file.\n\nexport * from 'next/headers';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAUA,oDAAc,yBAVd;","names":[]}
package/package.json CHANGED
@@ -1,20 +1,36 @@
1
1
  {
2
2
  "name": "@stackframe/stack-sc",
3
- "version": "2.8.61",
3
+ "version": "2.8.62",
4
4
  "repository": "https://github.com/stack-auth/stack-auth",
5
5
  "exports": {
6
6
  "./force-react-server": {
7
7
  "types": "./dist/index.react-server.d.ts",
8
- "default": "./dist/index.react-server.js"
8
+ "import": {
9
+ "default": "./dist/esm/index.react-server.js"
10
+ },
11
+ "require": {
12
+ "default": "./dist/index.react-server.js"
13
+ }
9
14
  },
10
15
  "./force-default": {
11
16
  "types": "./dist/index.default.d.ts",
12
- "default": "./dist/index.default.js"
17
+ "import": {
18
+ "default": "./dist/esm/index.default.js"
19
+ },
20
+ "require": {
21
+ "default": "./dist/index.default.js"
22
+ }
13
23
  },
14
24
  ".": {
15
25
  "types": "./dist/index.combined.d.ts",
16
- "react-server": "./dist/index.react-server.js",
17
- "default": "./dist/index.default.js"
26
+ "import": {
27
+ "react-server": "./dist/esm/index.react-server.js",
28
+ "default": "./dist/esm/index.default.js"
29
+ },
30
+ "require": {
31
+ "react-server": "./dist/index.react-server.js",
32
+ "default": "./dist/index.default.js"
33
+ }
18
34
  }
19
35
  },
20
36
  "files": [
@@ -45,10 +61,10 @@
45
61
  "next": "^14.2.35"
46
62
  },
47
63
  "scripts": {
48
- "build": "tsc",
64
+ "build": "rimraf dist && tsup-node",
49
65
  "typecheck": "tsc --noEmit",
50
66
  "clean": "rimraf dist && rimraf node_modules",
51
- "dev": "tsc -w --preserveWatchOutput --declarationMap",
67
+ "dev": "tsup-node --watch",
52
68
  "lint": "eslint --ext .tsx,.ts ."
53
69
  }
54
70
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.combined.d.ts","sourceRoot":"","sources":["../src/index.combined.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,iBAAiB,CAAC;AACvC,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AAEpD,MAAM,CAAC,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,WAAW,CAAC,OAAO,GAAG,OAAO,GAAG,CAAC,OAAO,CAAC;AAC9E,MAAM,CAAC,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,WAAW,CAAC,OAAO,GAAG,OAAO,GAAG,CAAC,OAAO,CAAC;AAC9E,MAAM,CAAC,OAAO,CAAC,MAAM,aAAa,EAAE,OAAO,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.default.d.ts","sourceRoot":"","sources":["../src/index.default.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAY,CAAC;AACjC,eAAO,MAAM,OAAO,WAAY,CAAC;AACjC,eAAO,MAAM,aAAa,QAAQ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.react-server.d.ts","sourceRoot":"","sources":["../src/index.react-server.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,OAAO,CAAC;AAOlC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mCAAmC,CAAC;AACnG,eAAO,MAAM,OAAO,8BAAqF,QAAQ,WAAW,kBAAkB,CAAC,CAAC,CAAC,CAAC;AAClJ,eAAO,MAAM,OAAO,8BAAqF,QAAQ,WAAW,kBAAkB,CAAC,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from 'next/headers';
2
- //# sourceMappingURL=next-static-analysis-workaround.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"next-static-analysis-workaround.d.ts","sourceRoot":"","sources":["../src/next-static-analysis-workaround.ts"],"names":[],"mappings":"AAUA,cAAc,cAAc,CAAC"}