@zayne-labs/callapi-plugins 0.0.2 → 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/dist/esm/index.d.ts +92 -86
- package/dist/esm/index.js +120 -128
- package/dist/esm/index.js.map +1 -1
- package/package.json +11 -10
package/dist/esm/index.d.ts
CHANGED
@@ -1,93 +1,99 @@
|
|
1
|
-
import * as
|
2
|
-
import { AnyFunction } from
|
1
|
+
import * as _zayne_labs_callapi0 from "@zayne-labs/callapi";
|
2
|
+
import { AnyFunction } from "@zayne-labs/toolkit-type-helpers";
|
3
3
|
|
4
|
+
//#region src/logger/logger.d.ts
|
4
5
|
type ConsoleLike = {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
error: AnyFunction<void>;
|
7
|
+
fail?: AnyFunction<void>;
|
8
|
+
log: AnyFunction<void>;
|
9
|
+
success?: AnyFunction<void>;
|
10
|
+
warn?: AnyFunction<void>;
|
10
11
|
};
|
11
12
|
type LoggerOptions = {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
13
|
+
/**
|
14
|
+
* Custom console object
|
15
|
+
*/
|
16
|
+
consoleObject?: ConsoleLike;
|
17
|
+
/**
|
18
|
+
* Enable or disable the logger
|
19
|
+
* @default true
|
20
|
+
*/
|
21
|
+
enabled?: boolean;
|
22
|
+
/**
|
23
|
+
* Enable or disable verbose mode
|
24
|
+
*/
|
25
|
+
verbose?: boolean;
|
25
26
|
};
|
27
|
+
declare const defaultConsole: ConsoleLike;
|
26
28
|
declare const loggerPlugin: (options?: LoggerOptions) => {
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
}
|
29
|
+
id: string;
|
30
|
+
name: string;
|
31
|
+
version: string;
|
32
|
+
hooks: {
|
33
|
+
onRequest: (ctx: _zayne_labs_callapi0.SharedHookContext<unknown> & {
|
34
|
+
options: Partial<unknown>;
|
35
|
+
}) => void;
|
36
|
+
onRequestError: (ctx: _zayne_labs_callapi0.SharedHookContext<unknown> & {
|
37
|
+
error: {
|
38
|
+
errorData: _zayne_labs_callapi0.PossibleJavaScriptError["originalError"];
|
39
|
+
message: string;
|
40
|
+
name: "AbortError" | "Error" | "SyntaxError" | "TimeoutError" | "TypeError" | (`${string}Error` & {});
|
41
|
+
originalError: DOMException | Error | SyntaxError | TypeError;
|
42
|
+
} | {
|
43
|
+
errorData: _zayne_labs_callapi0.ValidationError["issues"];
|
44
|
+
message: string;
|
45
|
+
name: "ValidationError";
|
46
|
+
originalError: _zayne_labs_callapi0.ValidationError;
|
47
|
+
};
|
48
|
+
response: null;
|
49
|
+
} & {
|
50
|
+
options: Partial<unknown>;
|
51
|
+
}) => void;
|
52
|
+
onResponseError: (ctx: _zayne_labs_callapi0.SharedHookContext<unknown> & {
|
53
|
+
error: {
|
54
|
+
errorData: never;
|
55
|
+
message: string;
|
56
|
+
name: "HTTPError";
|
57
|
+
originalError: _zayne_labs_callapi0.HTTPError;
|
58
|
+
};
|
59
|
+
response: Response;
|
60
|
+
} & {
|
61
|
+
options: Partial<unknown>;
|
62
|
+
}) => void;
|
63
|
+
onRetry: (ctx: ((_zayne_labs_callapi0.SharedHookContext<unknown> & ({
|
64
|
+
error: {
|
65
|
+
errorData: _zayne_labs_callapi0.PossibleJavaScriptError["originalError"];
|
66
|
+
message: string;
|
67
|
+
name: "AbortError" | "Error" | "SyntaxError" | "TimeoutError" | "TypeError" | (`${string}Error` & {});
|
68
|
+
originalError: DOMException | Error | SyntaxError | TypeError;
|
69
|
+
} | {
|
70
|
+
errorData: _zayne_labs_callapi0.ValidationError["issues"];
|
71
|
+
message: string;
|
72
|
+
name: "ValidationError";
|
73
|
+
originalError: _zayne_labs_callapi0.ValidationError;
|
74
|
+
};
|
75
|
+
response: Response | null;
|
76
|
+
} | {
|
77
|
+
error: {
|
78
|
+
errorData: never;
|
79
|
+
message: string;
|
80
|
+
name: "HTTPError";
|
81
|
+
originalError: _zayne_labs_callapi0.HTTPError;
|
82
|
+
};
|
83
|
+
response: Response;
|
84
|
+
})) & {
|
85
|
+
retryAttemptCount: number;
|
86
|
+
}) & {
|
87
|
+
options: Partial<unknown>;
|
88
|
+
}) => void;
|
89
|
+
onSuccess: (ctx: _zayne_labs_callapi0.SharedHookContext<unknown> & {
|
90
|
+
data: never;
|
91
|
+
response: Response;
|
92
|
+
} & {
|
93
|
+
options: Partial<unknown>;
|
94
|
+
}) => void;
|
95
|
+
};
|
91
96
|
};
|
92
|
-
|
93
|
-
export {
|
97
|
+
//#endregion
|
98
|
+
export { LoggerOptions, defaultConsole, loggerPlugin };
|
99
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.js
CHANGED
@@ -1,136 +1,128 @@
|
|
1
|
-
import { definePlugin } from
|
2
|
-
import { createConsola } from
|
1
|
+
import { definePlugin } from "@zayne-labs/callapi";
|
2
|
+
import { createConsola } from "consola";
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
[510, "Not Extended"],
|
68
|
-
[511, "Network Authentication Required"]
|
4
|
+
//#region src/logger/constants.ts
|
5
|
+
const statusTextMap = new Map([
|
6
|
+
[100, "Continue"],
|
7
|
+
[101, "Switching Protocols"],
|
8
|
+
[102, "Processing"],
|
9
|
+
[200, "OK"],
|
10
|
+
[201, "Created"],
|
11
|
+
[202, "Accepted"],
|
12
|
+
[203, "Non-Authoritative Information"],
|
13
|
+
[204, "No Content"],
|
14
|
+
[205, "Reset Content"],
|
15
|
+
[206, "Partial Content"],
|
16
|
+
[207, "Multi-Status"],
|
17
|
+
[208, "Already Reported"],
|
18
|
+
[226, "IM Used"],
|
19
|
+
[300, "Multiple Choices"],
|
20
|
+
[301, "Moved Permanently"],
|
21
|
+
[302, "Found"],
|
22
|
+
[303, "See Other"],
|
23
|
+
[304, "Not Modified"],
|
24
|
+
[305, "Use Proxy"],
|
25
|
+
[307, "Temporary Redirect"],
|
26
|
+
[308, "Permanent Redirect"],
|
27
|
+
[400, "Bad Request"],
|
28
|
+
[401, "Unauthorized"],
|
29
|
+
[402, "Payment Required"],
|
30
|
+
[403, "Forbidden"],
|
31
|
+
[404, "Not Found"],
|
32
|
+
[405, "Method Not Allowed"],
|
33
|
+
[406, "Not Acceptable"],
|
34
|
+
[407, "Proxy Authentication Required"],
|
35
|
+
[408, "Request Timeout"],
|
36
|
+
[409, "Conflict"],
|
37
|
+
[410, "Gone"],
|
38
|
+
[411, "Length Required"],
|
39
|
+
[412, "Precondition Failed"],
|
40
|
+
[413, "Payload Too Large"],
|
41
|
+
[414, "URI Too Long"],
|
42
|
+
[415, "Unsupported Media Type"],
|
43
|
+
[416, "Range Not Satisfiable"],
|
44
|
+
[417, "Expectation Failed"],
|
45
|
+
[418, "I'm a teapot"],
|
46
|
+
[421, "Misdirected Request"],
|
47
|
+
[422, "Unprocessable Entity"],
|
48
|
+
[423, "Locked"],
|
49
|
+
[424, "Failed Dependency"],
|
50
|
+
[425, "Too Early"],
|
51
|
+
[426, "Upgrade Required"],
|
52
|
+
[428, "Precondition Required"],
|
53
|
+
[429, "Too Many Requests"],
|
54
|
+
[431, "Request Header Fields Too Large"],
|
55
|
+
[451, "Unavailable For Legal Reasons"],
|
56
|
+
[500, "Internal Server Error"],
|
57
|
+
[501, "Not Implemented"],
|
58
|
+
[502, "Bad Gateway"],
|
59
|
+
[503, "Service Unavailable"],
|
60
|
+
[504, "Gateway Timeout"],
|
61
|
+
[505, "HTTP Version Not Supported"],
|
62
|
+
[506, "Variant Also Negotiates"],
|
63
|
+
[507, "Insufficient Storage"],
|
64
|
+
[508, "Loop Detected"],
|
65
|
+
[510, "Not Extended"],
|
66
|
+
[511, "Network Authentication Required"]
|
69
67
|
]);
|
70
68
|
|
71
|
-
|
72
|
-
|
69
|
+
//#endregion
|
70
|
+
//#region src/logger/utils.ts
|
71
|
+
const getStatusText = (status) => statusTextMap.get(status) ?? "Unknown";
|
73
72
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
warn: (...args) => consola.warn("", ...args)
|
73
|
+
//#endregion
|
74
|
+
//#region src/logger/logger.ts
|
75
|
+
const consola = createConsola({ formatOptions: {
|
76
|
+
colors: true,
|
77
|
+
columns: 80,
|
78
|
+
compact: 10,
|
79
|
+
date: false,
|
80
|
+
fancy: true
|
81
|
+
} });
|
82
|
+
const defaultConsole = {
|
83
|
+
error: (...args) => consola.error("", ...args),
|
84
|
+
fail: (...args) => consola.fail("", ...args),
|
85
|
+
log: (...args) => consola.info("", ...args),
|
86
|
+
success: (...args) => consola.success("", ...args),
|
87
|
+
warn: (...args) => consola.warn("", ...args)
|
90
88
|
};
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
if (!enabled) return;
|
127
|
-
const log = consoleObject.success ?? consoleObject.log;
|
128
|
-
log("Request succeeded", ctx.data);
|
129
|
-
}
|
130
|
-
}
|
131
|
-
};
|
89
|
+
const loggerPlugin = definePlugin((options) => {
|
90
|
+
const { consoleObject = defaultConsole, enabled = true, verbose } = options ?? {};
|
91
|
+
return {
|
92
|
+
id: "logger",
|
93
|
+
name: "Logger",
|
94
|
+
version: "1.0.0",
|
95
|
+
hooks: {
|
96
|
+
onRequest: (ctx) => {
|
97
|
+
if (!enabled) return;
|
98
|
+
consoleObject.log(`Request being sent to: ${ctx.options.fullURL}`);
|
99
|
+
},
|
100
|
+
onRequestError: (ctx) => {
|
101
|
+
if (!enabled) return;
|
102
|
+
const log = consoleObject.fail ?? consoleObject.error;
|
103
|
+
log(`Request to failed with error: ${ctx.error.name}`);
|
104
|
+
verbose && consoleObject.error(ctx.error.errorData);
|
105
|
+
},
|
106
|
+
onResponseError: (ctx) => {
|
107
|
+
if (!enabled) return;
|
108
|
+
const log = consoleObject.fail ?? consoleObject.error;
|
109
|
+
log("Request failed with status: ", ctx.response.status, `(${ctx.response.statusText || getStatusText(ctx.response.status)})`);
|
110
|
+
verbose && consoleObject.error(ctx.error.errorData);
|
111
|
+
},
|
112
|
+
onRetry: (ctx) => {
|
113
|
+
if (!enabled) return;
|
114
|
+
const log = consoleObject.warn ?? consoleObject.log;
|
115
|
+
log(`Retrying request... Attempt: `, ctx.retryAttemptCount);
|
116
|
+
},
|
117
|
+
onSuccess: (ctx) => {
|
118
|
+
if (!enabled) return;
|
119
|
+
const log = consoleObject.success ?? consoleObject.log;
|
120
|
+
log("Request succeeded", ctx.data);
|
121
|
+
}
|
122
|
+
}
|
123
|
+
};
|
132
124
|
});
|
133
125
|
|
134
|
-
|
135
|
-
|
126
|
+
//#endregion
|
127
|
+
export { defaultConsole, loggerPlugin };
|
136
128
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/logger/constants.ts","../../src/logger/utils.ts","../../src/logger/logger.ts"],"
|
1
|
+
{"version":3,"file":"index.js","names":["status: number","defaultConsole: ConsoleLike","options?: LoggerOptions"],"sources":["../../src/logger/constants.ts","../../src/logger/utils.ts","../../src/logger/logger.ts"],"sourcesContent":["export const statusTextMap = new Map<number, string>([\n\t[100, \"Continue\"],\n\t[101, \"Switching Protocols\"],\n\t[102, \"Processing\"],\n\t[200, \"OK\"],\n\t[201, \"Created\"],\n\t[202, \"Accepted\"],\n\t[203, \"Non-Authoritative Information\"],\n\t[204, \"No Content\"],\n\t[205, \"Reset Content\"],\n\t[206, \"Partial Content\"],\n\t[207, \"Multi-Status\"],\n\t[208, \"Already Reported\"],\n\t[226, \"IM Used\"],\n\t[300, \"Multiple Choices\"],\n\t[301, \"Moved Permanently\"],\n\t[302, \"Found\"],\n\t[303, \"See Other\"],\n\t[304, \"Not Modified\"],\n\t[305, \"Use Proxy\"],\n\t[307, \"Temporary Redirect\"],\n\t[308, \"Permanent Redirect\"],\n\t[400, \"Bad Request\"],\n\t[401, \"Unauthorized\"],\n\t[402, \"Payment Required\"],\n\t[403, \"Forbidden\"],\n\t[404, \"Not Found\"],\n\t[405, \"Method Not Allowed\"],\n\t[406, \"Not Acceptable\"],\n\t[407, \"Proxy Authentication Required\"],\n\t[408, \"Request Timeout\"],\n\t[409, \"Conflict\"],\n\t[410, \"Gone\"],\n\t[411, \"Length Required\"],\n\t[412, \"Precondition Failed\"],\n\t[413, \"Payload Too Large\"],\n\t[414, \"URI Too Long\"],\n\t[415, \"Unsupported Media Type\"],\n\t[416, \"Range Not Satisfiable\"],\n\t[417, \"Expectation Failed\"],\n\t[418, \"I'm a teapot\"],\n\t[421, \"Misdirected Request\"],\n\t[422, \"Unprocessable Entity\"],\n\t[423, \"Locked\"],\n\t[424, \"Failed Dependency\"],\n\t[425, \"Too Early\"],\n\t[426, \"Upgrade Required\"],\n\t[428, \"Precondition Required\"],\n\t[429, \"Too Many Requests\"],\n\t[431, \"Request Header Fields Too Large\"],\n\t[451, \"Unavailable For Legal Reasons\"],\n\t[500, \"Internal Server Error\"],\n\t[501, \"Not Implemented\"],\n\t[502, \"Bad Gateway\"],\n\t[503, \"Service Unavailable\"],\n\t[504, \"Gateway Timeout\"],\n\t[505, \"HTTP Version Not Supported\"],\n\t[506, \"Variant Also Negotiates\"],\n\t[507, \"Insufficient Storage\"],\n\t[508, \"Loop Detected\"],\n\t[510, \"Not Extended\"],\n\t[511, \"Network Authentication Required\"],\n]);\n","import { statusTextMap } from \"./constants\";\n\nexport const getStatusText = (status: number) => statusTextMap.get(status) ?? \"Unknown\";\n","import { definePlugin } from \"@zayne-labs/callapi\";\nimport type { AnyFunction } from \"@zayne-labs/toolkit-type-helpers\";\nimport { createConsola } from \"consola\";\nimport { getStatusText } from \"./utils\";\n\ntype ConsoleLike = {\n\terror: AnyFunction<void>;\n\tfail?: AnyFunction<void>;\n\tlog: AnyFunction<void>;\n\tsuccess?: AnyFunction<void>;\n\twarn?: AnyFunction<void>;\n};\n\nconst consola = createConsola({\n\tformatOptions: {\n\t\tcolors: true,\n\t\tcolumns: 80,\n\t\tcompact: 10,\n\t\tdate: false,\n\t\tfancy: true,\n\t},\n});\n\nexport type LoggerOptions = {\n\t/**\n\t * Custom console object\n\t */\n\tconsoleObject?: ConsoleLike;\n\t/**\n\t * Enable or disable the logger\n\t * @default true\n\t */\n\tenabled?: boolean;\n\t/**\n\t * Enable or disable verbose mode\n\t */\n\tverbose?: boolean;\n};\n\n/* eslint-disable ts-eslint/no-unsafe-argument -- Ignore for now */\nexport const defaultConsole: ConsoleLike = {\n\terror: (...args) => consola.error(\"\", ...args),\n\tfail: (...args) => consola.fail(\"\", ...args),\n\tlog: (...args) => consola.info(\"\", ...args),\n\tsuccess: (...args) => consola.success(\"\", ...args),\n\twarn: (...args) => consola.warn(\"\", ...args),\n};\n/* eslint-enable ts-eslint/no-unsafe-argument -- Ignore for now */\n\nexport const loggerPlugin = definePlugin((options?: LoggerOptions) => {\n\tconst { consoleObject = defaultConsole, enabled = true, verbose } = options ?? {};\n\n\treturn {\n\t\t/* eslint-disable perfectionist/sort-objects -- Ignore for now */\n\t\tid: \"logger\",\n\t\tname: \"Logger\",\n\t\tversion: \"1.0.0\",\n\n\t\thooks: {\n\t\t\t/* eslint-enable perfectionist/sort-objects -- Ignore */\n\t\t\tonRequest: (ctx) => {\n\t\t\t\tif (!enabled) return;\n\n\t\t\t\tconsoleObject.log(`Request being sent to: ${ctx.options.fullURL}`);\n\t\t\t},\n\n\t\t\tonRequestError: (ctx) => {\n\t\t\t\tif (!enabled) return;\n\n\t\t\t\tconst log = consoleObject.fail ?? consoleObject.error;\n\n\t\t\t\tlog(`Request to failed with error: ${ctx.error.name}`);\n\n\t\t\t\tverbose && consoleObject.error(ctx.error.errorData);\n\t\t\t},\n\n\t\t\tonResponseError: (ctx) => {\n\t\t\t\tif (!enabled) return;\n\n\t\t\t\tconst log = consoleObject.fail ?? consoleObject.error;\n\n\t\t\t\tlog(\n\t\t\t\t\t\"Request failed with status: \",\n\t\t\t\t\tctx.response.status,\n\t\t\t\t\t`(${ctx.response.statusText || getStatusText(ctx.response.status)})`\n\t\t\t\t);\n\n\t\t\t\tverbose && consoleObject.error(ctx.error.errorData);\n\t\t\t},\n\n\t\t\tonRetry: (ctx) => {\n\t\t\t\tif (!enabled) return;\n\n\t\t\t\tconst log = consoleObject.warn ?? consoleObject.log;\n\n\t\t\t\tlog(`Retrying request... Attempt: `, ctx.retryAttemptCount);\n\t\t\t},\n\n\t\t\tonSuccess: (ctx) => {\n\t\t\t\tif (!enabled) return;\n\n\t\t\t\tconst log = consoleObject.success ?? consoleObject.log;\n\n\t\t\t\tlog(\"Request succeeded\", ctx.data);\n\t\t\t},\n\t\t},\n\t};\n});\n"],"mappings":";;;;AAAA,MAAa,gBAAgB,IAAI,IAAoB;CACpD,CAAC,KAAK,UAAW;CACjB,CAAC,KAAK,qBAAsB;CAC5B,CAAC,KAAK,YAAa;CACnB,CAAC,KAAK,IAAK;CACX,CAAC,KAAK,SAAU;CAChB,CAAC,KAAK,UAAW;CACjB,CAAC,KAAK,+BAAgC;CACtC,CAAC,KAAK,YAAa;CACnB,CAAC,KAAK,eAAgB;CACtB,CAAC,KAAK,iBAAkB;CACxB,CAAC,KAAK,cAAe;CACrB,CAAC,KAAK,kBAAmB;CACzB,CAAC,KAAK,SAAU;CAChB,CAAC,KAAK,kBAAmB;CACzB,CAAC,KAAK,mBAAoB;CAC1B,CAAC,KAAK,OAAQ;CACd,CAAC,KAAK,WAAY;CAClB,CAAC,KAAK,cAAe;C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;AACnB,SAAK,QAAS;IAEd,MAAM,MAAM,cAAc,WAAW,cAAc;AAEnD,QAAI,qBAAqB,IAAI,KAAK;GAClC;EACD;CACD;AACD,EAAC"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@zayne-labs/callapi-plugins",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0
|
4
|
+
"version": "1.0.0",
|
5
5
|
"description": "A collection of plugins for callapi",
|
6
6
|
"author": "Ryan Zayne",
|
7
7
|
"license": "MIT",
|
@@ -15,26 +15,27 @@
|
|
15
15
|
"node": ">=v18.17.0"
|
16
16
|
},
|
17
17
|
"peerDependencies": {
|
18
|
-
"@zayne-labs/toolkit-type-helpers": "
|
18
|
+
"@zayne-labs/toolkit-type-helpers": ">=0.9.35",
|
19
19
|
"consola": "^3.4.2",
|
20
|
-
"@zayne-labs/callapi": "1.
|
20
|
+
"@zayne-labs/callapi": "1.8.0"
|
21
21
|
},
|
22
22
|
"devDependencies": {
|
23
|
-
"@arethetypeswrong/cli": "0.
|
23
|
+
"@arethetypeswrong/cli": "0.18.1",
|
24
24
|
"@size-limit/esbuild-why": "11.2.0",
|
25
25
|
"@size-limit/preset-small-lib": "11.2.0",
|
26
26
|
"@total-typescript/ts-reset": "0.6.1",
|
27
|
-
"@zayne-labs/toolkit-type-helpers": "^0.9.
|
28
|
-
"@zayne-labs/tsconfig": "0.
|
27
|
+
"@zayne-labs/toolkit-type-helpers": "^0.9.46",
|
28
|
+
"@zayne-labs/tsconfig": "0.9.1",
|
29
29
|
"concurrently": "^9.1.2",
|
30
30
|
"consola": "3.4.2",
|
31
31
|
"cross-env": "^7.0.3",
|
32
32
|
"publint": "^0.3.12",
|
33
33
|
"size-limit": "11.2.0",
|
34
|
-
"
|
34
|
+
"tsdown": "^0.12.6",
|
35
|
+
"tsup": "^8.5.0",
|
35
36
|
"typescript": "5.8.3",
|
36
|
-
"vitest": "^3.1.
|
37
|
-
"@zayne-labs/callapi": "1.
|
37
|
+
"vitest": "^3.1.4",
|
38
|
+
"@zayne-labs/callapi": "1.8.0"
|
38
39
|
},
|
39
40
|
"publishConfig": {
|
40
41
|
"access": "public",
|
@@ -48,7 +49,7 @@
|
|
48
49
|
}
|
49
50
|
],
|
50
51
|
"scripts": {
|
51
|
-
"build": "
|
52
|
+
"build": "tsdown",
|
52
53
|
"build:dev": "cross-env NODE_ENV=development tsup",
|
53
54
|
"build:test": "concurrently --prefix-colors \"yellow.bold,#7da4f8.bold,magenta\" --names PUBLINT,TSUP 'pnpm:lint:publint' 'pnpm:build:dev'",
|
54
55
|
"dev": "pnpm build:dev --watch",
|