@alessiofrittoli/fetcher 1.0.0 → 1.1.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/error.d.mts +12 -3
- package/dist/error.d.ts +12 -3
- package/dist/fetch.d.mts +1 -2
- package/dist/fetch.d.ts +1 -2
- package/dist/{types-CVc-rxXe.d.ts → types-B7TKkr2l.d.ts} +1 -1
- package/dist/{types-DuGUXaTD.d.mts → types-DAKtp5Tp.d.mts} +1 -1
- package/dist/types.d.mts +1 -2
- package/dist/types.d.ts +1 -2
- package/dist/xhr/index.d.mts +1 -2
- package/dist/xhr/index.d.ts +1 -2
- package/package.json +12 -11
package/dist/error.d.mts
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import { ErrorCode as ErrorCode$1 } from '@alessiofrittoli/exception/code';
|
|
2
|
-
|
|
3
1
|
declare enum Request {
|
|
4
2
|
XHR_NOT_AVAILABLE = "ERR:XHRNOTAVAILABLE",
|
|
5
3
|
XHR_INVALID_STATE = "ERR:XHRINVALIDSTATE"
|
|
6
4
|
}
|
|
7
5
|
declare const ErrorCode: {
|
|
8
|
-
Exception:
|
|
6
|
+
Exception: {
|
|
7
|
+
readonly UNKNOWN: "ERR:UNKNOWN";
|
|
8
|
+
readonly ABORT: "ERR:ABORT";
|
|
9
|
+
readonly EMPTY_VALUE: "ERR:EMPTYVALUE";
|
|
10
|
+
readonly WRONG_VALUE: "ERR:WRONGVALUE";
|
|
11
|
+
readonly EXPIRED: "ERR:EXPIRED";
|
|
12
|
+
readonly TOO_EARLY: "ERR:TOOEARLY";
|
|
13
|
+
readonly TOO_MANY: "ERR:TOOMANY";
|
|
14
|
+
readonly QUOTA_REACHED: "ERR:QUOTAREACHED";
|
|
15
|
+
readonly NOT_FOUND: "ERR:NOTFOUND";
|
|
16
|
+
readonly OFFLINE: "ERR:INTERNETDISCONNECTED";
|
|
17
|
+
};
|
|
9
18
|
Request: typeof Request;
|
|
10
19
|
};
|
|
11
20
|
type ErrorCode = MergedEnumValue<typeof ErrorCode>;
|
package/dist/error.d.ts
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import { ErrorCode as ErrorCode$1 } from '@alessiofrittoli/exception/code';
|
|
2
|
-
|
|
3
1
|
declare enum Request {
|
|
4
2
|
XHR_NOT_AVAILABLE = "ERR:XHRNOTAVAILABLE",
|
|
5
3
|
XHR_INVALID_STATE = "ERR:XHRINVALIDSTATE"
|
|
6
4
|
}
|
|
7
5
|
declare const ErrorCode: {
|
|
8
|
-
Exception:
|
|
6
|
+
Exception: {
|
|
7
|
+
readonly UNKNOWN: "ERR:UNKNOWN";
|
|
8
|
+
readonly ABORT: "ERR:ABORT";
|
|
9
|
+
readonly EMPTY_VALUE: "ERR:EMPTYVALUE";
|
|
10
|
+
readonly WRONG_VALUE: "ERR:WRONGVALUE";
|
|
11
|
+
readonly EXPIRED: "ERR:EXPIRED";
|
|
12
|
+
readonly TOO_EARLY: "ERR:TOOEARLY";
|
|
13
|
+
readonly TOO_MANY: "ERR:TOOMANY";
|
|
14
|
+
readonly QUOTA_REACHED: "ERR:QUOTAREACHED";
|
|
15
|
+
readonly NOT_FOUND: "ERR:NOTFOUND";
|
|
16
|
+
readonly OFFLINE: "ERR:INTERNETDISCONNECTED";
|
|
17
|
+
};
|
|
9
18
|
Request: typeof Request;
|
|
10
19
|
};
|
|
11
20
|
type ErrorCode = MergedEnumValue<typeof ErrorCode>;
|
package/dist/fetch.d.mts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { AbortSignal } from '@alessiofrittoli/abort-controller';
|
|
2
|
-
import { F as Fetch } from './types-
|
|
2
|
+
import { F as Fetch } from './types-DAKtp5Tp.mjs';
|
|
3
3
|
import '@alessiofrittoli/event-emitter';
|
|
4
4
|
import '@alessiofrittoli/exception';
|
|
5
5
|
import '@alessiofrittoli/exception/abort';
|
|
6
6
|
import '@alessiofrittoli/url-utils';
|
|
7
7
|
import './error.mjs';
|
|
8
|
-
import '@alessiofrittoli/exception/code';
|
|
9
8
|
|
|
10
9
|
interface RequestInit extends globalThis.RequestInit {
|
|
11
10
|
signal?: AbortSignal;
|
package/dist/fetch.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { AbortSignal } from '@alessiofrittoli/abort-controller';
|
|
2
|
-
import { F as Fetch } from './types-
|
|
2
|
+
import { F as Fetch } from './types-B7TKkr2l.js';
|
|
3
3
|
import '@alessiofrittoli/event-emitter';
|
|
4
4
|
import '@alessiofrittoli/exception';
|
|
5
5
|
import '@alessiofrittoli/exception/abort';
|
|
6
6
|
import '@alessiofrittoli/url-utils';
|
|
7
7
|
import './error.js';
|
|
8
|
-
import '@alessiofrittoli/exception/code';
|
|
9
8
|
|
|
10
9
|
interface RequestInit extends globalThis.RequestInit {
|
|
11
10
|
signal?: AbortSignal;
|
|
@@ -15,7 +15,7 @@ declare class Xhr<TReturn = unknown> extends EventEmitter<XHR.Event.Map<TReturn>
|
|
|
15
15
|
request: XMLHttpRequest;
|
|
16
16
|
url: _alessiofrittoli_url_utils.UrlInput;
|
|
17
17
|
method: RequestMethod;
|
|
18
|
-
body:
|
|
18
|
+
body: Document | XMLHttpRequestBodyInit | undefined;
|
|
19
19
|
headers: Headers;
|
|
20
20
|
credentials: {
|
|
21
21
|
username?: string | null;
|
|
@@ -15,7 +15,7 @@ declare class Xhr<TReturn = unknown> extends EventEmitter<XHR.Event.Map<TReturn>
|
|
|
15
15
|
request: XMLHttpRequest;
|
|
16
16
|
url: _alessiofrittoli_url_utils.UrlInput;
|
|
17
17
|
method: RequestMethod;
|
|
18
|
-
body:
|
|
18
|
+
body: Document | XMLHttpRequestBodyInit | undefined;
|
|
19
19
|
headers: Headers;
|
|
20
20
|
credentials: {
|
|
21
21
|
username?: string | null;
|
package/dist/types.d.mts
CHANGED
|
@@ -4,5 +4,4 @@ import '@alessiofrittoli/exception/abort';
|
|
|
4
4
|
import '@alessiofrittoli/url-utils';
|
|
5
5
|
import '@alessiofrittoli/abort-controller';
|
|
6
6
|
import './error.mjs';
|
|
7
|
-
export { F as Fetch, R as RequestMethod, a as XHR } from './types-
|
|
8
|
-
import '@alessiofrittoli/exception/code';
|
|
7
|
+
export { F as Fetch, R as RequestMethod, a as XHR } from './types-DAKtp5Tp.mjs';
|
package/dist/types.d.ts
CHANGED
|
@@ -4,5 +4,4 @@ import '@alessiofrittoli/exception/abort';
|
|
|
4
4
|
import '@alessiofrittoli/url-utils';
|
|
5
5
|
import '@alessiofrittoli/abort-controller';
|
|
6
6
|
import './error.js';
|
|
7
|
-
export { F as Fetch, R as RequestMethod, a as XHR } from './types-
|
|
8
|
-
import '@alessiofrittoli/exception/code';
|
|
7
|
+
export { F as Fetch, R as RequestMethod, a as XHR } from './types-B7TKkr2l.js';
|
package/dist/xhr/index.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { X as Xhr } from '../types-
|
|
1
|
+
export { X as Xhr } from '../types-DAKtp5Tp.mjs';
|
|
2
2
|
import '@alessiofrittoli/url-utils';
|
|
3
3
|
import '@alessiofrittoli/event-emitter';
|
|
4
4
|
import '@alessiofrittoli/exception/abort';
|
|
5
5
|
import '@alessiofrittoli/abort-controller';
|
|
6
6
|
import '../error.mjs';
|
|
7
7
|
import '@alessiofrittoli/exception';
|
|
8
|
-
import '@alessiofrittoli/exception/code';
|
package/dist/xhr/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { X as Xhr } from '../types-
|
|
1
|
+
export { X as Xhr } from '../types-B7TKkr2l.js';
|
|
2
2
|
import '@alessiofrittoli/url-utils';
|
|
3
3
|
import '@alessiofrittoli/event-emitter';
|
|
4
4
|
import '@alessiofrittoli/exception/abort';
|
|
5
5
|
import '@alessiofrittoli/abort-controller';
|
|
6
6
|
import '../error.js';
|
|
7
7
|
import '@alessiofrittoli/exception';
|
|
8
|
-
import '@alessiofrittoli/exception/code';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alessiofrittoli/fetcher",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Typescript fetch/xhr utilities",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Alessio Frittoli",
|
|
@@ -104,6 +104,7 @@
|
|
|
104
104
|
"build:prod": "cross-env NODE_ENV=production tsup",
|
|
105
105
|
"build": "pnpm lint && pnpm test:ci && pnpm build:prod",
|
|
106
106
|
"lint": "eslint",
|
|
107
|
+
"postinstall": "node scripts/postinstall/index.js",
|
|
107
108
|
"release": "node scripts/release.js --verbose --npm",
|
|
108
109
|
"//2a": "*********************************************************************",
|
|
109
110
|
"//2b": "***************************** UNIT TESTS ****************************",
|
|
@@ -124,16 +125,16 @@
|
|
|
124
125
|
"test:fetch": "pnpm test:watch fetch.test.ts"
|
|
125
126
|
},
|
|
126
127
|
"devDependencies": {
|
|
127
|
-
"@alessiofrittoli/crypto-buffer": "^3.
|
|
128
|
-
"@eslint/js": "^
|
|
128
|
+
"@alessiofrittoli/crypto-buffer": "^3.11.0",
|
|
129
|
+
"@eslint/js": "^10.0.1",
|
|
129
130
|
"@jest/globals": "^30.2.0",
|
|
130
131
|
"@types/jest": "^30.0.0",
|
|
131
|
-
"@types/node": "^
|
|
132
|
+
"@types/node": "^25.2.3",
|
|
132
133
|
"concurrently": "^9.2.1",
|
|
133
134
|
"cross-env": "^10.1.0",
|
|
134
|
-
"dotenv": "^17.
|
|
135
|
-
"eslint": "^
|
|
136
|
-
"globals": "^
|
|
135
|
+
"dotenv": "^17.3.1",
|
|
136
|
+
"eslint": "^10.0.0",
|
|
137
|
+
"globals": "^17.3.0",
|
|
137
138
|
"http-server": "^14.1.1",
|
|
138
139
|
"jest": "^30.2.0",
|
|
139
140
|
"jest-environment-jsdom": "^30.2.0",
|
|
@@ -141,16 +142,16 @@
|
|
|
141
142
|
"ts-node": "^10.9.2",
|
|
142
143
|
"tsup": "^8.5.1",
|
|
143
144
|
"typescript": "^5.9.3",
|
|
144
|
-
"typescript-eslint": "^8.
|
|
145
|
+
"typescript-eslint": "^8.55.0"
|
|
145
146
|
},
|
|
146
147
|
"dependencies": {
|
|
147
148
|
"@alessiofrittoli/abort-controller": "^0.1.0",
|
|
148
149
|
"@alessiofrittoli/chain-functions": "^2.5.0",
|
|
149
150
|
"@alessiofrittoli/event-emitter": "^1.6.0",
|
|
150
|
-
"@alessiofrittoli/exception": "^3.
|
|
151
|
-
"@alessiofrittoli/node-scripts": "^3.
|
|
151
|
+
"@alessiofrittoli/exception": "^3.5.0",
|
|
152
|
+
"@alessiofrittoli/node-scripts": "^3.3.0",
|
|
152
153
|
"@alessiofrittoli/type-utils": "^1.9.0",
|
|
153
154
|
"@alessiofrittoli/url-utils": "^3.7.1",
|
|
154
|
-
"@alessiofrittoli/web-utils": "^1.
|
|
155
|
+
"@alessiofrittoli/web-utils": "^1.20.0"
|
|
155
156
|
}
|
|
156
157
|
}
|