@yongdall/web 0.5.6 → 0.6.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/boot.mjs +1 -1
- package/boot.mjs.map +1 -1
- package/index.d.mts +127 -235
- package/index.mjs +17 -14
- package/index.mjs.map +1 -1
- package/package.json +3 -3
- package/plugin.d.mts +1 -91
- package/plugin.mjs +1 -1
- package/plugin.mjs.map +1 -1
- package/require.d.mts +2 -2
- package/require.mjs +1 -1
- package/require.mjs.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yongdall/web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@yongdall/common": "^0.5.3"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@neeloong/form": "^0.
|
|
15
|
+
"@neeloong/form": "^0.30.0",
|
|
16
16
|
"@yongdall/types": "^0.5.2",
|
|
17
17
|
"dompurify": "^3.3.3",
|
|
18
18
|
"dot-request": "^0.5.4",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"signal-polyfill": "^0.2.2"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@neeloong/form": "^0.
|
|
23
|
+
"@neeloong/form": "^0.30.0",
|
|
24
24
|
"dompurify": "^3.3.3",
|
|
25
25
|
"dot-request": "^0.5.4",
|
|
26
26
|
"jszip": "^3.10.1",
|
package/plugin.d.mts
CHANGED
|
@@ -2,96 +2,6 @@ import * as dot_request0 from "dot-request";
|
|
|
2
2
|
|
|
3
3
|
//#region packages/web/plugin.d.mts
|
|
4
4
|
declare const pluginId: string;
|
|
5
|
-
/** @deprecated */
|
|
6
|
-
/** @type {(url: string) => Promise<any>} */
|
|
7
|
-
declare const importPluginStyle: (url: string) => Promise<any>;
|
|
8
|
-
/** @deprecated */
|
|
9
|
-
/** @type {(url: string) => Promise<HTMLLinkElement>} */
|
|
10
|
-
declare const importPluginWidget: (url: string) => Promise<HTMLLinkElement>;
|
|
11
|
-
/** @deprecated */
|
|
12
|
-
declare const pluginRequest: {
|
|
13
|
-
build(): any;
|
|
14
|
-
method(method: string, path?: string): any;
|
|
15
|
-
readonly version: string;
|
|
16
|
-
buildResult(response: Promise<Response>): Result;
|
|
17
|
-
clone<T extends dot_request0.default>(target: T): T;
|
|
18
|
-
clone(): any;
|
|
19
|
-
get(path?: string | undefined): any;
|
|
20
|
-
get(template: TemplateStringsArray, ...substitutions: any[]): any;
|
|
21
|
-
post(path?: string | undefined): any;
|
|
22
|
-
post(template: TemplateStringsArray, ...substitutions: any[]): any;
|
|
23
|
-
put(path?: string | undefined): any;
|
|
24
|
-
put(template: TemplateStringsArray, ...substitutions: any[]): any;
|
|
25
|
-
delete(path?: string | undefined): any;
|
|
26
|
-
delete(template: TemplateStringsArray, ...substitutions: any[]): any;
|
|
27
|
-
head(path?: string | undefined): any;
|
|
28
|
-
head(template: TemplateStringsArray, ...substitutions: any[]): any;
|
|
29
|
-
path(path: string): any;
|
|
30
|
-
path(template: TemplateStringsArray, ...substitutions: any[]): any;
|
|
31
|
-
prefix(prefix?: string | undefined): any;
|
|
32
|
-
prefix(template: TemplateStringsArray, ...substitutions: any[]): any;
|
|
33
|
-
suffix(suffix?: string | undefined): any;
|
|
34
|
-
suffix(template: TemplateStringsArray, ...substitutions: any[]): any;
|
|
35
|
-
append(...path: string[]): any;
|
|
36
|
-
append(template: TemplateStringsArray, ...substitutions: any[]): any;
|
|
37
|
-
header(headers: () => Record<string, HeaderValue> | null): HeaderValue | (() => HeaderValue);
|
|
38
|
-
header(name: string): HeaderValue | (() => HeaderValue);
|
|
39
|
-
header(name: string, value: HeaderValue | (() => HeaderValue)): any;
|
|
40
|
-
header(headers: Record<string, HeaderValue | (() => HeaderValue)>): any;
|
|
41
|
-
redirect(redirect: boolean | "error"): any;
|
|
42
|
-
redirect(): boolean | "error";
|
|
43
|
-
timeout(ms: number): any;
|
|
44
|
-
timeout(): number;
|
|
45
|
-
credentials(credentials: RequestCredentials | null): any;
|
|
46
|
-
credentials(): RequestCredentials | null;
|
|
47
|
-
mode(mode: RequestMode | "" | null): any;
|
|
48
|
-
mode(): RequestMode | "";
|
|
49
|
-
cache(cache: RequestCache | null): any;
|
|
50
|
-
cache(): RequestCache | null;
|
|
51
|
-
referrer(referrer: string): any;
|
|
52
|
-
referrer(): string;
|
|
53
|
-
referrerPolicy(rp: ReferrerPolicy | null): any;
|
|
54
|
-
referrerPolicy(): ReferrerPolicy | null;
|
|
55
|
-
integrity(integrity: string): any;
|
|
56
|
-
integrity(): string;
|
|
57
|
-
keepalive(keep: boolean): any;
|
|
58
|
-
keepalive(): boolean;
|
|
59
|
-
context<V>(name: string | symbol): V;
|
|
60
|
-
context(name: string | symbol, value: any): any;
|
|
61
|
-
context(context: Record<string, any>): any;
|
|
62
|
-
params(params?: Record<string, string | number> | undefined): any;
|
|
63
|
-
query(query?: Record<string, any> | undefined): any;
|
|
64
|
-
search(search?: string | undefined): any;
|
|
65
|
-
data(data?: Record<string, any> | undefined): any;
|
|
66
|
-
body(body?: BodyData, type?: string | undefined): any;
|
|
67
|
-
body(body?: object | Record<string, any>): any;
|
|
68
|
-
form(form?: FormData | object | Record<string, any>): any;
|
|
69
|
-
signal(signal?: Signal): any;
|
|
70
|
-
signalHandler(handler?: boolean | SignalHandler | undefined): any;
|
|
71
|
-
uploadProgress(up: ProgressListener): any;
|
|
72
|
-
stringifyJSON(fn?: ((value: any) => string) | null | undefined): any;
|
|
73
|
-
downloadProgress(dp: ProgressListener | null): any;
|
|
74
|
-
errorHandler(eh: ErrorHandler | null): any;
|
|
75
|
-
parseJSON(fn: ((value: string) => any) | null): any;
|
|
76
|
-
create(): Request;
|
|
77
|
-
fetch(fetch: Fetch): any;
|
|
78
|
-
fetch(): Result;
|
|
79
|
-
ok(error?: ErrorHandler | null | undefined): Result;
|
|
80
|
-
text(): Promise<string>;
|
|
81
|
-
blob(): Promise<Blob>;
|
|
82
|
-
arrayBuffer(): Promise<ArrayBuffer>;
|
|
83
|
-
formData(): Promise<FormData>;
|
|
84
|
-
json<T>(reviver?: ((this: any, key: string, value: any) => any) | undefined): Promise<T>;
|
|
85
|
-
searchParams(): Promise<URLSearchParams>;
|
|
86
|
-
stream(): Promise<ReadableStream<Uint8Array> | null>;
|
|
87
|
-
result<T>(): Promise<T | null>;
|
|
88
|
-
done<T = void>(value: T): Promise<T>;
|
|
89
|
-
done(): Promise<void>;
|
|
90
|
-
then<TResult1 = Response, TResult2 = never>(fulfilled?: ((value: Response) => TResult1 | PromiseLike<TResult1>) | null | undefined, rejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
91
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<Response | TResult>;
|
|
92
|
-
finally(onfinally: (() => void) | null): Promise<Response>;
|
|
93
|
-
"__#private@#private": any;
|
|
94
|
-
};
|
|
95
5
|
declare const Plugin: {
|
|
96
6
|
importStyle(url: string): Promise<HTMLLinkElement>;
|
|
97
7
|
import(url: string): Promise<any>;
|
|
@@ -185,4 +95,4 @@ declare const Plugin: {
|
|
|
185
95
|
};
|
|
186
96
|
};
|
|
187
97
|
//#endregion
|
|
188
|
-
export { Plugin as default,
|
|
98
|
+
export { Plugin as default, pluginId };
|
package/plugin.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{buildPlugin as e}from"@yongdall/web";const t=new URL(import.meta.url),n=decodeURIComponent(t.search.substring(1).split(`&`).find(e=>e.startsWith(`plugin=`)&&e.length>7)?.substring(7)||``)
|
|
1
|
+
import{buildPlugin as e}from"@yongdall/web";const t=new URL(import.meta.url),n=decodeURIComponent(t.search.substring(1).split(`&`).find(e=>e.startsWith(`plugin=`)&&e.length>7)?.substring(7)||``);var r=e(n);export{r as default,n as pluginId};
|
|
2
2
|
//# sourceMappingURL=plugin.mjs.map
|
package/plugin.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.mjs","names":[],"sources":["../../packages/web/plugin.mjs"],"sourcesContent":["import { buildPlugin } from '@yongdall/web';\nconst url = new URL(import.meta.url)\nconst paramKey = `plugin=`\nexport const pluginId = decodeURIComponent(url.search.substring(1).split('&')\n\t.find(v => v.startsWith(paramKey) && v.length > paramKey.length)\n\t?.substring(paramKey.length) || '')\n\nconst Plugin = buildPlugin(pluginId);\n\nexport default Plugin;\n
|
|
1
|
+
{"version":3,"file":"plugin.mjs","names":[],"sources":["../../packages/web/plugin.mjs"],"sourcesContent":["import { buildPlugin } from '@yongdall/web';\nconst url = new URL(import.meta.url)\nconst paramKey = `plugin=`\nexport const pluginId = decodeURIComponent(url.search.substring(1).split('&')\n\t.find(v => v.startsWith(paramKey) && v.length > paramKey.length)\n\t?.substring(paramKey.length) || '')\n\nconst Plugin = buildPlugin(pluginId);\n\nexport default Plugin;\n"],"mappings":"4CACA,MAAM,EAAM,IAAI,IAAI,OAAO,KAAK,IAAI,CAEvB,EAAW,mBAAmB,EAAI,OAAO,UAAU,EAAE,CAAC,MAAM,IAAI,CAC3E,KAAK,GAAK,EAAE,WAAW,UAAS,EAAI,EAAE,OAAS,EAAgB,EAC9D,UAAU,EAAgB,EAAI,GAAG,CAIpC,IAAA,EAFe,EAAY,EAAS"}
|
package/require.d.mts
CHANGED
package/require.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{require as e}from"@yongdall/web";const t=new URL(import.meta.url).searchParams,n=t.getAll(`path`).find(Boolean)||`/`,r=t.getAll(`name`).find(Boolean)||``,i=t.getAll(`type`).find(Boolean)||``;var a=await e(n,r,i);export{a as default,r as name,n as path,i as type};
|
|
2
2
|
//# sourceMappingURL=require.mjs.map
|
package/require.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require.mjs","names":[],"sources":["../../packages/web/require.mts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"require.mjs","names":[],"sources":["../../packages/web/require.mts"],"sourcesContent":["import { require } from '@yongdall/web';\nconst searchParams = new URL(import.meta.url).searchParams;\nexport const path = searchParams.getAll('path').find(Boolean) || '/';\nexport const name = searchParams.getAll('name').find(Boolean) || '';\nexport const type = searchParams.getAll('type').find(Boolean) || '';\n\nexport default await require(path, name, type);\n"],"mappings":"wCACA,MAAM,EAAe,IAAI,IAAI,OAAO,KAAK,IAAI,CAAC,aACjC,EAAO,EAAa,OAAO,OAAO,CAAC,KAAK,QAAQ,EAAI,IACpD,EAAO,EAAa,OAAO,OAAO,CAAC,KAAK,QAAQ,EAAI,GACpD,EAAO,EAAa,OAAO,OAAO,CAAC,KAAK,QAAQ,EAAI,GAEjE,IAAA,EAAe,MAAM,EAAQ,EAAM,EAAM,EAAK"}
|