@hexclave/sc 1.0.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.
- package/LICENSE +7 -0
- package/dist/esm/index.combined.d.ts +10 -0
- package/dist/esm/index.combined.d.ts.map +1 -0
- package/dist/esm/index.combined.js +1 -0
- package/dist/esm/index.default.d.ts +7 -0
- package/dist/esm/index.default.d.ts.map +1 -0
- package/dist/esm/index.default.js +8 -0
- package/dist/esm/index.default.js.map +1 -0
- package/dist/esm/index.react-server.d.ts +9 -0
- package/dist/esm/index.react-server.d.ts.map +1 -0
- package/dist/esm/index.react-server.js +10 -0
- package/dist/esm/index.react-server.js.map +1 -0
- package/dist/esm/next-static-analysis-workaround.d.ts +1 -0
- package/dist/esm/next-static-analysis-workaround.js +3 -0
- package/dist/index.combined.d.ts +10 -0
- package/dist/index.combined.d.ts.map +1 -0
- package/dist/index.combined.js +0 -0
- package/dist/index.default.d.ts +7 -0
- package/dist/index.default.d.ts.map +1 -0
- package/dist/index.default.js +12 -0
- package/dist/index.default.js.map +1 -0
- package/dist/index.react-server.d.ts +9 -0
- package/dist/index.react-server.d.ts.map +1 -0
- package/dist/index.react-server.js +13 -0
- package/dist/index.react-server.js.map +1 -0
- package/dist/next-static-analysis-workaround.d.ts +8 -0
- package/dist/next-static-analysis-workaround.d.ts.map +1 -0
- package/dist/next-static-analysis-workaround.js +9 -0
- package/package.json +70 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2024 Stackframe
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as def from "./index.default";
|
|
2
|
+
import * as reactServer from "./index.react-server";
|
|
3
|
+
|
|
4
|
+
//#region src/index.combined.d.ts
|
|
5
|
+
declare const cookies: typeof reactServer.cookies | typeof def.cookies;
|
|
6
|
+
declare const headers: typeof reactServer.headers | typeof def.headers;
|
|
7
|
+
declare const isReactServer: boolean;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { cookies, headers, isReactServer };
|
|
10
|
+
//# sourceMappingURL=index.combined.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.combined.d.ts","names":[],"sources":["../../src/index.combined.ts"],"mappings":";;;;cAGqB,OAAA,SAAgB,WAAA,CAAY,OAAA,UAAiB,GAAA,CAAI,OAAA;AAAA,cACjD,OAAA,SAAgB,WAAA,CAAY,OAAA,UAAiB,GAAA,CAAI,OAAA;AAAA,cACjD,aAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.default.d.ts","names":[],"sources":["../../src/index.default.ts"],"mappings":";cAAa,OAAA;AAAA,cACA,OAAA;AAAA,cACA,aAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.default.js","names":[],"sources":["../../src/index.default.ts"],"sourcesContent":["export const cookies = undefined;\nexport const headers = undefined;\nexport const isReactServer = false;\n"],"mappings":";AAAA,MAAa,UAAU;AACvB,MAAa,UAAU;AACvB,MAAa,gBAAgB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { cookies as cookies$1, headers as headers$1 } from "./next-static-analysis-workaround";
|
|
2
|
+
|
|
3
|
+
//#region src/index.react-server.d.ts
|
|
4
|
+
declare const isReactServer = true;
|
|
5
|
+
declare const cookies: typeof cookies$1 | ((...args: Parameters<typeof cookies$1>) => Promise<ReturnType<typeof cookies$1>>);
|
|
6
|
+
declare const headers: typeof headers$1 | ((...args: Parameters<typeof headers$1>) => Promise<ReturnType<typeof headers$1>>);
|
|
7
|
+
//#endregion
|
|
8
|
+
export { cookies, headers, isReactServer };
|
|
9
|
+
//# sourceMappingURL=index.react-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.react-server.d.ts","names":[],"sources":["../../src/index.react-server.ts"],"mappings":";;;cAAa,aAAA;AAAA,cAQA,OAAA,SAAgC,SAAA,QAAmB,IAAA,EAAM,UAAA,QAAkB,SAAA,MAAiB,OAAA,CAAQ,UAAA,QAAkB,SAAA;AAAA,cACtH,OAAA,SAAgC,SAAA,QAAmB,IAAA,EAAM,UAAA,QAAkB,SAAA,MAAiB,OAAA,CAAQ,UAAA,QAAkB,SAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { cookies as cookies$1, headers as headers$1 } from "./next-static-analysis-workaround.js";
|
|
2
|
+
|
|
3
|
+
//#region src/index.react-server.ts
|
|
4
|
+
const isReactServer = true;
|
|
5
|
+
const cookies = cookies$1;
|
|
6
|
+
const headers = headers$1;
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { cookies, headers, isReactServer };
|
|
10
|
+
//# sourceMappingURL=index.react-server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.react-server.js","names":["nextCookies","nextHeaders"],"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,MAAa,gBAAgB;AAQ7B,MAAa,UAAUA;AACvB,MAAa,UAAUC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "next/headers";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { cookies as cookies$1, headers as headers$1 } from "./index.default.js";
|
|
2
|
+
import { cookies as cookies$2, headers as headers$2 } from "./index.react-server.js";
|
|
3
|
+
|
|
4
|
+
//#region src/index.combined.d.ts
|
|
5
|
+
declare const cookies: typeof cookies$2 | typeof cookies$1;
|
|
6
|
+
declare const headers: typeof headers$2 | typeof headers$1;
|
|
7
|
+
declare const isReactServer: boolean;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { cookies, headers, isReactServer };
|
|
10
|
+
//# sourceMappingURL=index.combined.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.combined.d.ts","names":[],"sources":["../src/index.combined.ts"],"mappings":";;;;cAGqB,OAAA,SAAgB,SAAA,UAA6B,SAAA;AAAA,cAC7C,OAAA,SAAgB,SAAA,UAA6B,SAAA;AAAA,cAC7C,aAAA"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.default.d.ts","names":[],"sources":["../src/index.default.ts"],"mappings":";cAAa,OAAA;AAAA,cACA,OAAA;AAAA,cACA,aAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/index.default.ts
|
|
4
|
+
const cookies = void 0;
|
|
5
|
+
const headers = void 0;
|
|
6
|
+
const isReactServer = false;
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
exports.cookies = cookies;
|
|
10
|
+
exports.headers = headers;
|
|
11
|
+
exports.isReactServer = isReactServer;
|
|
12
|
+
//# sourceMappingURL=index.default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.default.js","names":[],"sources":["../src/index.default.ts"],"sourcesContent":["export const cookies = undefined;\nexport const headers = undefined;\nexport const isReactServer = false;\n"],"mappings":";;;AAAA,MAAa,UAAU;AACvB,MAAa,UAAU;AACvB,MAAa,gBAAgB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { t as next_static_analysis_workaround_d_exports } from "./next-static-analysis-workaround.js";
|
|
2
|
+
|
|
3
|
+
//#region src/index.react-server.d.ts
|
|
4
|
+
declare const isReactServer = true;
|
|
5
|
+
declare const cookies: typeof next_static_analysis_workaround_d_exports.cookies | ((...args: Parameters<typeof next_static_analysis_workaround_d_exports.cookies>) => Promise<ReturnType<typeof next_static_analysis_workaround_d_exports.cookies>>);
|
|
6
|
+
declare const headers: typeof next_static_analysis_workaround_d_exports.headers | ((...args: Parameters<typeof next_static_analysis_workaround_d_exports.headers>) => Promise<ReturnType<typeof next_static_analysis_workaround_d_exports.headers>>);
|
|
7
|
+
//#endregion
|
|
8
|
+
export { cookies, headers, isReactServer };
|
|
9
|
+
//# sourceMappingURL=index.react-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.react-server.d.ts","names":[],"sources":["../src/index.react-server.ts"],"mappings":";;;cAAa,aAAA;AAAA,cAQA,OAAA,SAAgC,yCAAA,CAAA,OAAA,QAAmB,IAAA,EAAM,UAAA,QAAkB,yCAAA,CAAA,OAAA,MAAiB,OAAA,CAAQ,UAAA,QAAkB,yCAAA,CAAA,OAAA;AAAA,cACtH,OAAA,SAAgC,yCAAA,CAAA,OAAA,QAAmB,IAAA,EAAM,UAAA,QAAkB,yCAAA,CAAA,OAAA,MAAiB,OAAA,CAAQ,UAAA,QAAkB,yCAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
let __next_static_analysis_workaround_js = require("./next-static-analysis-workaround.js");
|
|
3
|
+
|
|
4
|
+
//#region src/index.react-server.ts
|
|
5
|
+
const isReactServer = true;
|
|
6
|
+
const cookies = __next_static_analysis_workaround_js.cookies;
|
|
7
|
+
const headers = __next_static_analysis_workaround_js.headers;
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
exports.cookies = cookies;
|
|
11
|
+
exports.headers = headers;
|
|
12
|
+
exports.isReactServer = isReactServer;
|
|
13
|
+
//# sourceMappingURL=index.react-server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.react-server.js","names":["nextCookies","nextHeaders"],"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,MAAa,gBAAgB;AAQ7B,MAAa,UAAUA;AACvB,MAAa,UAAUC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next-static-analysis-workaround.d.ts","names":[],"sources":["../src/next-static-analysis-workaround.ts"],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
var next_headers = require("next/headers");
|
|
4
|
+
Object.keys(next_headers).forEach(function (k) {
|
|
5
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function () { return next_headers[k]; }
|
|
8
|
+
});
|
|
9
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hexclave/sc",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"repository": "https://github.com/hexclave/hexclave",
|
|
5
|
+
"exports": {
|
|
6
|
+
"./force-react-server": {
|
|
7
|
+
"types": "./dist/index.react-server.d.ts",
|
|
8
|
+
"import": {
|
|
9
|
+
"default": "./dist/esm/index.react-server.js"
|
|
10
|
+
},
|
|
11
|
+
"require": {
|
|
12
|
+
"default": "./dist/index.react-server.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"./force-default": {
|
|
16
|
+
"types": "./dist/index.default.d.ts",
|
|
17
|
+
"import": {
|
|
18
|
+
"default": "./dist/esm/index.default.js"
|
|
19
|
+
},
|
|
20
|
+
"require": {
|
|
21
|
+
"default": "./dist/index.default.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.combined.d.ts",
|
|
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
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"README.md",
|
|
38
|
+
"dist",
|
|
39
|
+
"CHANGELOG.md",
|
|
40
|
+
"LICENSE"
|
|
41
|
+
],
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"next": ">=14.1 || >=15.0.0-rc.0",
|
|
44
|
+
"react": ">=19.0.0",
|
|
45
|
+
"react-dom": ">=19.0.0",
|
|
46
|
+
"@types/react": ">=19.0.0",
|
|
47
|
+
"@types/react-dom": ">=19.0.0"
|
|
48
|
+
},
|
|
49
|
+
"peerDependenciesMeta": {
|
|
50
|
+
"@types/react": {
|
|
51
|
+
"optional": true
|
|
52
|
+
},
|
|
53
|
+
"@types/react-dom": {
|
|
54
|
+
"optional": true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"rimraf": "^6.1.2",
|
|
59
|
+
"react": "^19.0.1",
|
|
60
|
+
"react-dom": "^19.0.1",
|
|
61
|
+
"next": "^14.2.35"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "rimraf dist && tsdown",
|
|
65
|
+
"typecheck": "tsc --noEmit",
|
|
66
|
+
"clean": "rimraf dist && rimraf node_modules",
|
|
67
|
+
"dev": "tsdown --watch",
|
|
68
|
+
"lint": "eslint --ext .tsx,.ts ."
|
|
69
|
+
}
|
|
70
|
+
}
|