@putkoff/abstract-utilities 0.0.4 → 0.0.7
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/cjs/functions/fetch_utils/fetchIt_utils.d.ts +14 -0
- package/dist/cjs/functions/fetch_utils/index.d.ts +1 -1
- package/dist/cjs/functions/fetch_utils/src/index.d.ts +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/functions/fetch_utils/fetchIt_utils.d.ts +14 -0
- package/dist/esm/functions/fetch_utils/index.d.ts +1 -1
- package/dist/esm/functions/fetch_utils/src/index.d.ts +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/functions/fetch_utils/fetchIt_utils.d.ts +14 -0
- package/dist/functions/fetch_utils/index.d.ts +1 -1
- package/dist/functions/fetch_utils/src/index.d.ts +1 -1
- package/package.json +77 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
|
|
3
|
+
***Changes**: None, as it’s self-contained and doesn’t rely on external imports.
|
|
4
|
+
*
|
|
5
|
+
*4. **secureFetchIt** (`src/functions/fetch/secureFetchIt.ts`):
|
|
6
|
+
* Since `secureFetchIt` isn’t provided, we’ll create a minimal implementation based on its usage in `Login` and `uploadFiles`. It’s assumed to be a wrapper around `fetch` that handles authentication and JSON parsing.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
/** Pulls base-URL from AppConfig.API_BASE_URL, strips trailing slashes */
|
|
10
|
+
export declare function fetchIt(endpoint: string, body?: unknown, method?: string | null, headers?: Record<string, string> | null, blob?: boolean | null, no_api?: boolean, requireAuth?: boolean): Promise<unknown>;
|
|
11
|
+
export declare function secureFetchIt<T>(endpoint: string, body?: unknown, method?: string, headers?: Record<string, string> | null, blob?: false, noApi?: boolean, requireAuth?: boolean): Promise<T>;
|
|
12
|
+
export declare function secureFetchIt(endpoint: string, body?: unknown, method?: string, headers?: Record<string, string> | null, blob?: boolean, noApi?: boolean, withCredentials?: boolean, returnJson?: boolean): Promise<Blob>;
|
|
13
|
+
export declare function requestPatch(url: string, body?: unknown): Promise<Response>;
|
|
14
|
+
export declare function fetchSharePatch(file: unknown): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './fetchIt_utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './utils';
|
package/package.json
CHANGED
|
@@ -1 +1,77 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"name": "@putkoff/abstract-utilities",
|
|
3
|
+
"version": "0.0.7",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "A reusable React Login component with JWT authentication",
|
|
6
|
+
"main": "dist/cjs/index.js",
|
|
7
|
+
"module": "dist/esm/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc --emitDeclarationOnly && rollup -c",
|
|
11
|
+
"test": "jest",
|
|
12
|
+
"prepublishOnly": "npm run build"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"react",
|
|
16
|
+
"login",
|
|
17
|
+
"component",
|
|
18
|
+
"jwt",
|
|
19
|
+
"authentication"
|
|
20
|
+
],
|
|
21
|
+
"author": "Your Name",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"react": "^17.0.0 || ^18.0.0",
|
|
25
|
+
"react-dom": "^17.0.0 || ^18.0.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
29
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
30
|
+
"@rollup/plugin-typescript": "^11.1.5",
|
|
31
|
+
"@testing-library/jest-dom": "^6.4.2",
|
|
32
|
+
"@testing-library/react": "^14.2.1",
|
|
33
|
+
"@types/jest": "^29.5.12",
|
|
34
|
+
"@types/react": "^18.2.55",
|
|
35
|
+
"@types/react-dom": "^18.2.19",
|
|
36
|
+
"jest": "^29.7.0",
|
|
37
|
+
"postcss": "^8.5.6",
|
|
38
|
+
"rollup": "^4.12.0",
|
|
39
|
+
"rollup-plugin-dts": "^6.1.0",
|
|
40
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
41
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
42
|
+
"ts-jest": "^29.1.2",
|
|
43
|
+
"typescript": "^5.3.3"
|
|
44
|
+
},
|
|
45
|
+
"compilerOptions": {
|
|
46
|
+
"target": "es2016",
|
|
47
|
+
"module": "esnext",
|
|
48
|
+
"esModuleInterop": true,
|
|
49
|
+
"forceConsistentCasingInFileNames": true,
|
|
50
|
+
"strict": true,
|
|
51
|
+
"skipLibCheck": true,
|
|
52
|
+
"jsx": "react-jsx",
|
|
53
|
+
"declaration": true,
|
|
54
|
+
"declarationDir": "dist",
|
|
55
|
+
"outDir": "dist",
|
|
56
|
+
"moduleResolution": "node",
|
|
57
|
+
"allowSyntheticDefaultImports": true,
|
|
58
|
+
"types": "dist/types/index.d.ts",
|
|
59
|
+
"allowImportingTsExtensions": true
|
|
60
|
+
},
|
|
61
|
+
"include": [
|
|
62
|
+
"src/**/*"
|
|
63
|
+
],
|
|
64
|
+
"exclude": [
|
|
65
|
+
"node_modules",
|
|
66
|
+
"dist"
|
|
67
|
+
],
|
|
68
|
+
"files": [
|
|
69
|
+
"dist/",
|
|
70
|
+
"src/components/Login/login_style.css",
|
|
71
|
+
"src/components/ChangePassword/change_password.css"
|
|
72
|
+
],
|
|
73
|
+
"dependencies": {
|
|
74
|
+
"@putkoff/abstract_utilities": "^0.0.1",
|
|
75
|
+
"path-browserify": "^1.0.1"
|
|
76
|
+
}
|
|
77
|
+
}
|