volter 0.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/README.md +1 -0
- package/global.d.ts +3 -0
- package/package.json +53 -0
- package/volter.d.ts +80 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# VolterJS
|
package/global.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "volter",
|
|
3
|
+
"main": "./src/volter.ts",
|
|
4
|
+
"module": "./src/volter.ts",
|
|
5
|
+
"types": "./volter.d.ts",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"files": [
|
|
8
|
+
"*.d.ts"
|
|
9
|
+
],
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@biomejs/biome": "1.5.3",
|
|
12
|
+
"@types/bun": "latest",
|
|
13
|
+
"@types/showdown": "^2.0.6"
|
|
14
|
+
},
|
|
15
|
+
"description": "⚡ Volter a React Meta Framework",
|
|
16
|
+
"version": "0.0.0",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@elysiajs/cors": "^0.8.0",
|
|
19
|
+
"@elysiajs/static": "^0.8.1",
|
|
20
|
+
"bun-types": "^1.0.26",
|
|
21
|
+
"csstype": "^3.1.3",
|
|
22
|
+
"elysia": "latest",
|
|
23
|
+
"showdown": "^2.1.0",
|
|
24
|
+
"typescript": "latest",
|
|
25
|
+
"undici-types": "^5.26.5"
|
|
26
|
+
},
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"import": "./src/volter.ts",
|
|
30
|
+
"require": "./src/volter.ts",
|
|
31
|
+
"types": "./volter.d.ts"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"udp": "bun src/udp.ts",
|
|
36
|
+
"ftp": "bun src/ftp.ts",
|
|
37
|
+
"test": "bun tests/index.test.ts",
|
|
38
|
+
"test:j": "bun tests/json.test.ts"
|
|
39
|
+
},
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "invalid"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"JavaScript",
|
|
46
|
+
"Framework"
|
|
47
|
+
],
|
|
48
|
+
"author": "Modlin Inc",
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"directories": {
|
|
51
|
+
"test": "tests"
|
|
52
|
+
}
|
|
53
|
+
}
|
package/volter.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
declare module 'volter' {
|
|
2
|
+
import type { Elysia } from 'elysia'
|
|
3
|
+
import type { ConverterOptions } from 'showdown'
|
|
4
|
+
|
|
5
|
+
//! Properties //!
|
|
6
|
+
export const HTTPMethods: [
|
|
7
|
+
'ACL',
|
|
8
|
+
'BIND',
|
|
9
|
+
'CHECKOUT',
|
|
10
|
+
'CONNECT',
|
|
11
|
+
'COPY',
|
|
12
|
+
'DELETE',
|
|
13
|
+
'GET',
|
|
14
|
+
'HEAD',
|
|
15
|
+
'LINK',
|
|
16
|
+
'LOCK',
|
|
17
|
+
'M-SEARCH',
|
|
18
|
+
'MERGE',
|
|
19
|
+
'MKACTIVITY',
|
|
20
|
+
'MKCALENDAR',
|
|
21
|
+
'MKCOL',
|
|
22
|
+
'MOVE',
|
|
23
|
+
'NOTIFY',
|
|
24
|
+
'OPTIONS',
|
|
25
|
+
'PATCH',
|
|
26
|
+
'POST',
|
|
27
|
+
'PROPFIND',
|
|
28
|
+
'PROPPATCH',
|
|
29
|
+
'PURGE',
|
|
30
|
+
'PUT',
|
|
31
|
+
'REBIND',
|
|
32
|
+
'REPORT',
|
|
33
|
+
'SEARCH',
|
|
34
|
+
'SOURCE',
|
|
35
|
+
'SUBSCRIBE',
|
|
36
|
+
'TRACE',
|
|
37
|
+
'UNBIND',
|
|
38
|
+
'UNLINK',
|
|
39
|
+
'UNLOCK',
|
|
40
|
+
'UNSUBSCRIBE',
|
|
41
|
+
'ALL'
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
//! Tools //!
|
|
45
|
+
export function readFilesSync(dir: string): Generator<string>
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Markdown to HTML converter using [Showdown](https://github.com/showdownjs/showdown).
|
|
49
|
+
*
|
|
50
|
+
* [MDN Guide](https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Howto/Markdown_in_MDN)
|
|
51
|
+
*
|
|
52
|
+
* @param markdown as a String
|
|
53
|
+
* @param options to customize the converter
|
|
54
|
+
*/
|
|
55
|
+
export function markdown(markdown: string, options?: ConverterOptions): string
|
|
56
|
+
|
|
57
|
+
//! Interfaces & Types //!
|
|
58
|
+
export interface StaticOptions {
|
|
59
|
+
path?: string
|
|
60
|
+
prefix?: string
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type jsExt = '.js' | '.jsx' | '.ts' | '.tsx' | '.mjs' | '.cjs'
|
|
64
|
+
|
|
65
|
+
//! Plugins //!
|
|
66
|
+
/**
|
|
67
|
+
* ElysiaJS plugin for File System Routing
|
|
68
|
+
* @param options The options to use when creating the router
|
|
69
|
+
* @param options.dir The root directory containing the files to route
|
|
70
|
+
*/
|
|
71
|
+
export function FileSystemRouter<D extends string>(options: {
|
|
72
|
+
dir: D,
|
|
73
|
+
fileExtensions?: jsExt[] | string[]
|
|
74
|
+
}): Elysia
|
|
75
|
+
|
|
76
|
+
export function staticFiles(options?: StaticOptions): Elysia
|
|
77
|
+
|
|
78
|
+
//! 3rd Party Modules //!
|
|
79
|
+
export * from '@elysiajs/cors'
|
|
80
|
+
}
|