@isikk/core 0.4.0 → 0.7.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/dist/configError-BtEWY-oE.d.ts +79 -0
- package/dist/drf/index.cjs +55 -0
- package/dist/drf/index.cjs.map +1 -0
- package/dist/drf/index.d.cts +27 -0
- package/dist/drf/index.d.ts +27 -0
- package/dist/drf/index.js +28 -0
- package/dist/drf/index.js.map +1 -0
- package/dist/hooks/index.cjs +18 -10
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +18 -10
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/next/config/browser.d.ts +6 -4
- package/dist/next/config/browser.js +62 -12
- package/dist/next/config/browser.js.map +1 -1
- package/dist/next/config/index.d.ts +7 -13
- package/dist/next/config/index.js +65 -15
- package/dist/next/config/index.js.map +1 -1
- package/dist/next/middleware/index.cjs.map +1 -1
- package/dist/next/middleware/index.js.map +1 -1
- package/dist/next/request/index.cjs.map +1 -1
- package/dist/next/request/index.d.cts +2 -4
- package/dist/next/request/index.d.ts +2 -4
- package/dist/next/request/index.js.map +1 -1
- package/dist/node/index.cjs +4 -3
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +4 -3
- package/dist/node/index.js.map +1 -1
- package/package.json +11 -2
- package/dist/shared-NQ6Ct9hr.d.ts +0 -37
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isikk/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Everyday TypeScript utilities.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -38,6 +38,11 @@
|
|
|
38
38
|
"import": "./dist/hooks/index.js",
|
|
39
39
|
"require": "./dist/hooks/index.cjs"
|
|
40
40
|
},
|
|
41
|
+
"./drf": {
|
|
42
|
+
"types": "./dist/drf/index.d.ts",
|
|
43
|
+
"import": "./dist/drf/index.js",
|
|
44
|
+
"require": "./dist/drf/index.cjs"
|
|
45
|
+
},
|
|
41
46
|
"./node": {
|
|
42
47
|
"types": "./dist/node/index.d.ts",
|
|
43
48
|
"import": "./dist/node/index.js",
|
|
@@ -81,7 +86,9 @@
|
|
|
81
86
|
"lint:prettier": "prettier --check .",
|
|
82
87
|
"lint": "npm run lint:eslint && npm run lint:types && npm run lint:prettier",
|
|
83
88
|
"fix": "eslint . --fix && prettier --write .",
|
|
84
|
-
"prepare": "husky"
|
|
89
|
+
"prepare": "husky",
|
|
90
|
+
"test:integration": "vitest run --config vitest.integration.config.ts",
|
|
91
|
+
"test:mutation": "stryker run"
|
|
85
92
|
},
|
|
86
93
|
"lint-staged": {
|
|
87
94
|
"*.{ts,tsx}": [
|
|
@@ -118,6 +125,8 @@
|
|
|
118
125
|
"@eslint/eslintrc": "^3.3.6",
|
|
119
126
|
"@eslint/js": "^9.9.1",
|
|
120
127
|
"@fast-check/vitest": "^0.4.1",
|
|
128
|
+
"@stryker-mutator/core": "^9.6.1",
|
|
129
|
+
"@stryker-mutator/vitest-runner": "^9.6.1",
|
|
121
130
|
"@testing-library/dom": "^10.4.1",
|
|
122
131
|
"@testing-library/react": "^16.3.2",
|
|
123
132
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
type Caster<T> = ((value: string) => T) & {
|
|
4
|
-
missingDefault?: T;
|
|
5
|
-
errorDefault?: T;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
type ConfigSchema = {
|
|
9
|
-
[key: string]: Caster<unknown> | ConfigSchema;
|
|
10
|
-
};
|
|
11
|
-
type InferConfig<S> = {
|
|
12
|
-
[K in keyof S]: S[K] extends Caster<infer T> ? T : S[K] extends ConfigSchema ? InferConfig<S[K]> : never;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
interface PublicConfigOptions {
|
|
16
|
-
/** Prepended to every environment variable name this call reads, joined with `sep`. */
|
|
17
|
-
prefix?: string;
|
|
18
|
-
/** Joins the prefix and the nested key path into a variable name. Defaults to `"__"`. */
|
|
19
|
-
sep?: string;
|
|
20
|
-
/**
|
|
21
|
-
* The property the payload is injected under on `window`. Defaults to a name derived from
|
|
22
|
-
* `prefix`. Set it to run two public configs off one prefix, to keep two copies of the package
|
|
23
|
-
* in one page from reading each other's payload, or just to own the name yourself.
|
|
24
|
-
*/
|
|
25
|
-
globalKey?: string;
|
|
26
|
-
}
|
|
27
|
-
interface PublicConfigScriptProps {
|
|
28
|
-
/** Forwarded to the injected `<script>` so a CSP with a per-request nonce keeps working. */
|
|
29
|
-
nonce?: string;
|
|
30
|
-
}
|
|
31
|
-
type PublicConfigScriptComponent = (props: PublicConfigScriptProps) => ReactNode | Promise<ReactNode>;
|
|
32
|
-
interface PublicConfig<S extends ConfigSchema> {
|
|
33
|
-
CONFIG: InferConfig<S>;
|
|
34
|
-
PublicConfigScript: PublicConfigScriptComponent;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export type { ConfigSchema as C, InferConfig as I, PublicConfigOptions as P, PublicConfig as a, PublicConfigScriptComponent as b, PublicConfigScriptProps as c };
|