scripting-cli 1.0.7 → 1.0.9
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/README.md +91 -0
- package/README_zh.md +91 -0
- package/dist/index.js +384 -16
- package/package.json +27 -22
- package/src/index.ts +451 -15
- package/tsconfig.json +16 -95
- package/.vscode/settings.json +0 -6
- package/dist/build.js +0 -98
- package/dist/config/AppJsonPlugin.js +0 -103
- package/dist/config/webpack.config.js +0 -103
- package/dist/createScript.js +0 -210
- package/dist/startDevServer.js +0 -129
- package/dist/utils.js +0 -29
- package/public/assets.d.ts +0 -40
- package/public/global.d.ts +0 -256
- package/public/logo.svg +0 -4
- package/public/scripting.d.ts +0 -6685
- package/src/build.ts +0 -110
- package/src/config/AppJsonPlugin.ts +0 -139
- package/src/config/webpack.config.ts +0 -115
- package/src/createScript.ts +0 -257
- package/src/startDevServer.ts +0 -147
- package/src/utils.ts +0 -30
package/public/assets.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
declare module '*.avif' {
|
|
3
|
-
const src: string;
|
|
4
|
-
export default src;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
declare module '*.bmp' {
|
|
8
|
-
const src: string;
|
|
9
|
-
export default src;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module '*.gif' {
|
|
13
|
-
const src: string;
|
|
14
|
-
export default src;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare module '*.jpg' {
|
|
18
|
-
const src: string;
|
|
19
|
-
export default src;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
declare module '*.jpeg' {
|
|
23
|
-
const src: string;
|
|
24
|
-
export default src;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
declare module '*.png' {
|
|
28
|
-
const src: string;
|
|
29
|
-
export default src;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
declare module '*.webp' {
|
|
33
|
-
const src: string;
|
|
34
|
-
export default src;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
declare module '*.svg' {
|
|
38
|
-
const src: string;
|
|
39
|
-
export default src;
|
|
40
|
-
}
|
package/public/global.d.ts
DELETED
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
|
|
3
|
-
const console: {
|
|
4
|
-
log: (...args: any[]) => void
|
|
5
|
-
error: (...args: any[]) => void
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const setTimeout: (callback: () => void, timeout?: number) => number
|
|
9
|
-
const clearTimeout: (timerId: number) => void
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Add message event listener from main thread.
|
|
13
|
-
*
|
|
14
|
-
* (Only supports use in Worker)
|
|
15
|
-
*/
|
|
16
|
-
var onmessage: ((event: {
|
|
17
|
-
data: any
|
|
18
|
-
}) => void) | undefined
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Add error event listener.
|
|
22
|
-
*
|
|
23
|
-
* (Only supports use in Worker)
|
|
24
|
-
*/
|
|
25
|
-
var onerror: ((error: {
|
|
26
|
-
filename: string
|
|
27
|
-
message: string
|
|
28
|
-
stack?: string
|
|
29
|
-
}) => void) | undefined
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Post message to main thread.
|
|
33
|
-
*
|
|
34
|
-
* (Only supports use in Worker)
|
|
35
|
-
*/
|
|
36
|
-
const postMessage: (message: any) => void
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Close current thread.
|
|
40
|
-
*
|
|
41
|
-
* (Only supports use in Worker)
|
|
42
|
-
*/
|
|
43
|
-
const close: () => void
|
|
44
|
-
|
|
45
|
-
// /**
|
|
46
|
-
// * A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system.
|
|
47
|
-
// *
|
|
48
|
-
// * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
49
|
-
// */
|
|
50
|
-
// interface Blob {
|
|
51
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
|
|
52
|
-
// readonly size: number
|
|
53
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
|
|
54
|
-
// readonly type: string
|
|
55
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
56
|
-
// arrayBuffer(): Promise<ArrayBuffer>
|
|
57
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
58
|
-
// slice(start?: number, end?: number, contentType?: string): Blob
|
|
59
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
60
|
-
// text(): Promise<string>
|
|
61
|
-
// }
|
|
62
|
-
|
|
63
|
-
// declare var Blob: {
|
|
64
|
-
// prototype: Blob
|
|
65
|
-
// new(blobParts?: (string | ArrayBuffer | ArrayBufferView | Blob)[], options?: BlobPropertyBag): Blob
|
|
66
|
-
// }
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
// interface Body {
|
|
70
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
|
|
71
|
-
// readonly body: string | FormData | Blob | null
|
|
72
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
73
|
-
// arrayBuffer(): Promise<ArrayBuffer>
|
|
74
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
|
|
75
|
-
// blob(): Promise<Blob>
|
|
76
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
|
|
77
|
-
// formData(): Promise<FormData>
|
|
78
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
|
|
79
|
-
// json(): Promise<any>
|
|
80
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
81
|
-
// text(): Promise<string>
|
|
82
|
-
// }
|
|
83
|
-
|
|
84
|
-
// interface ResponseInit {
|
|
85
|
-
// status?: number
|
|
86
|
-
// statusText?: string
|
|
87
|
-
// headers?: HeadersInit | Headers
|
|
88
|
-
// }
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
// interface RequestInit {
|
|
92
|
-
// method?: string
|
|
93
|
-
// headers?: HeadersInit | Headers
|
|
94
|
-
// body?: any
|
|
95
|
-
// mode?: RequestMode
|
|
96
|
-
// credentials?: RequestCredentials
|
|
97
|
-
// cache?: RequestCache
|
|
98
|
-
// redirect?: RequestRedirect
|
|
99
|
-
// referrer?: string
|
|
100
|
-
// }
|
|
101
|
-
|
|
102
|
-
// interface Request {
|
|
103
|
-
// /**
|
|
104
|
-
// * Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
|
|
105
|
-
// *
|
|
106
|
-
// * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/cache)
|
|
107
|
-
// */
|
|
108
|
-
// readonly cache: RequestCache
|
|
109
|
-
// /**
|
|
110
|
-
// * Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL.
|
|
111
|
-
// *
|
|
112
|
-
// * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/credentials)
|
|
113
|
-
// */
|
|
114
|
-
// readonly credentials: RequestCredentials
|
|
115
|
-
// /**
|
|
116
|
-
// * Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header.
|
|
117
|
-
// *
|
|
118
|
-
// * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/headers)
|
|
119
|
-
// */
|
|
120
|
-
// readonly headers: Headers
|
|
121
|
-
// /**
|
|
122
|
-
// * Returns request's HTTP method, which is "GET" by default.
|
|
123
|
-
// *
|
|
124
|
-
// * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/method)
|
|
125
|
-
// */
|
|
126
|
-
// readonly method: string
|
|
127
|
-
// /**
|
|
128
|
-
// * Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs.
|
|
129
|
-
// *
|
|
130
|
-
// * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/mode)
|
|
131
|
-
// */
|
|
132
|
-
// readonly mode: RequestMode
|
|
133
|
-
// /**
|
|
134
|
-
// * Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.
|
|
135
|
-
// *
|
|
136
|
-
// * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/redirect)
|
|
137
|
-
// */
|
|
138
|
-
// readonly redirect: RequestRedirect
|
|
139
|
-
// /**
|
|
140
|
-
// * Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and "about:client" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made.
|
|
141
|
-
// *
|
|
142
|
-
// * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/referrer)
|
|
143
|
-
// */
|
|
144
|
-
// readonly referrer: string
|
|
145
|
-
// /**
|
|
146
|
-
// * Returns the URL of request as a string.
|
|
147
|
-
// *
|
|
148
|
-
// * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/url)
|
|
149
|
-
// */
|
|
150
|
-
// readonly url: string
|
|
151
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
|
|
152
|
-
// clone(): Request
|
|
153
|
-
// }
|
|
154
|
-
|
|
155
|
-
// declare var Request: {
|
|
156
|
-
// prototype: Request
|
|
157
|
-
// new(input: string | Request, init?: RequestInit): Request
|
|
158
|
-
// }
|
|
159
|
-
|
|
160
|
-
// /**
|
|
161
|
-
// * Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
|
|
162
|
-
// *
|
|
163
|
-
// * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
164
|
-
// */
|
|
165
|
-
// interface FormData {
|
|
166
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
167
|
-
// append(name: string, value: string | Blob): void
|
|
168
|
-
// append(name: string, value: string): void
|
|
169
|
-
// append(name: string, blobValue: Blob, filename?: string): void
|
|
170
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
|
|
171
|
-
// delete(name: string): void
|
|
172
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
|
|
173
|
-
// get(name: string): string | Blob | null
|
|
174
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
|
|
175
|
-
// getAll(name: string): (string | Blob | null)[]
|
|
176
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
|
|
177
|
-
// has(name: string): boolean
|
|
178
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
179
|
-
// set(name: string, value: string | Blob): void
|
|
180
|
-
// set(name: string, value: string): void
|
|
181
|
-
// set(name: string, blobValue: Blob, filename?: string): void
|
|
182
|
-
// forEach(callbackfn: (value: string | Blob, key: string, parent: FormData) => void, thisArg?: any): void
|
|
183
|
-
// }
|
|
184
|
-
|
|
185
|
-
// declare var FormData: {
|
|
186
|
-
// prototype: FormData
|
|
187
|
-
// new(): FormData
|
|
188
|
-
// }
|
|
189
|
-
|
|
190
|
-
// /**
|
|
191
|
-
// * This Fetch API interface represents the response to a request.
|
|
192
|
-
// *
|
|
193
|
-
// * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
194
|
-
// */
|
|
195
|
-
// interface Response extends Body {
|
|
196
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
|
|
197
|
-
// readonly headers: Headers
|
|
198
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
|
|
199
|
-
// readonly ok: boolean
|
|
200
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
|
|
201
|
-
// readonly status: number
|
|
202
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
|
|
203
|
-
// readonly statusText: string
|
|
204
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
|
|
205
|
-
// readonly url: string
|
|
206
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
|
|
207
|
-
// clone(): Response
|
|
208
|
-
// }
|
|
209
|
-
|
|
210
|
-
// declare var Response: {
|
|
211
|
-
// prototype: Response
|
|
212
|
-
// new(body?: Blob | null, init?: ResponseInit): Response
|
|
213
|
-
// }
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
// type HeadersInit = [string, string][] | Record<string, string> | Headers
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
// /**
|
|
220
|
-
// * This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs. You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence.
|
|
221
|
-
// *
|
|
222
|
-
// * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
223
|
-
// */
|
|
224
|
-
// interface Headers {
|
|
225
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
|
|
226
|
-
// append(name: string, value: string): void
|
|
227
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
|
|
228
|
-
// delete(name: string): void
|
|
229
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
|
|
230
|
-
// get(name: string): string | null
|
|
231
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
|
|
232
|
-
// has(name: string): boolean
|
|
233
|
-
// /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
|
|
234
|
-
// set(name: string, value: string): void
|
|
235
|
-
// forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void
|
|
236
|
-
|
|
237
|
-
// /** Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
238
|
-
// entries(): IterableIterator<[string, string]>
|
|
239
|
-
// /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
240
|
-
// keys(): IterableIterator<string>
|
|
241
|
-
// /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
242
|
-
// values(): IterableIterator<string>
|
|
243
|
-
// }
|
|
244
|
-
|
|
245
|
-
// declare var Headers: {
|
|
246
|
-
// prototype: Headers
|
|
247
|
-
// new(init?: HeadersInit): Headers
|
|
248
|
-
// }
|
|
249
|
-
|
|
250
|
-
// declare function fetch(input: string | Request, init?: RequestInit & {
|
|
251
|
-
// debugLabel?: string
|
|
252
|
-
// }): Promise<Response>
|
|
253
|
-
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export { }
|
package/public/logo.svg
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<rect width="512" height="512" fill="#1E1E1E"/>
|
|
3
|
-
<path d="M153.613 333L75 256L153.636 179H184.355L105.718 256L184.355 333H153.613ZM357.34 333H326.645L405.282 256L326.645 179H357.364L436 256L357.34 333ZM305.954 179L230.456 333H204.999L280.497 179H305.954Z" fill="white"/>
|
|
4
|
-
</svg>
|