@absolutejs/absolute 0.5.5 → 0.6.1
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/build/{TestingIndex.j74ezacm.js → AuthTestingIndex.8q7s3n20.js} +8248 -1515
- package/build/{ProtectedIndex.k3vgnatp.js → DocumentationIndex.cq053dzg.js} +3925 -2777
- package/build/HomeIndex.g38k7rq0.js +48223 -0
- package/build/assets/png/Tumblr_Logos_2018.03.06_t_Icon_Blue.png +0 -0
- package/build/assets/png/logo_withings_black.png +0 -0
- package/build/assets/png/logomark_black.png +0 -0
- package/build/assets/svg/bun-logo.svg +1 -0
- package/build/assets/svg/default-profile-icon-light.svg +3 -0
- package/build/assets/svg/default-profile-icon.svg +3 -0
- package/build/assets/svg/elysia.svg +11 -0
- package/dist/index.js +83 -63
- package/dist/index.js.map +10 -9
- package/dist/src/constants.d.ts +2 -1
- package/dist/src/core/build.d.ts +1 -1
- package/dist/src/core/pageHandlers.d.ts +2 -2
- package/dist/src/plugins/networkingPlugin.d.ts +4 -1
- package/dist/src/plugins/pageRouterPlugin.d.ts +1 -1
- package/dist/src/types.d.ts +1 -5
- package/dist/src/utils/updateScriptTags.d.ts +0 -8
- package/eslint.config.mjs +203 -0
- package/package.json +17 -8
- package/build/HomeIndex.paddd8c9.js +0 -20725
- package/build/NotAuthorizedIndex.7em4g7an.js +0 -20717
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
// eslint.config.mjs
|
|
2
|
+
import { dirname } from "path";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
import pluginJs from "@eslint/js";
|
|
5
|
+
import stylisticTs from "@stylistic/eslint-plugin-ts";
|
|
6
|
+
import tsParser from "@typescript-eslint/parser";
|
|
7
|
+
import { defineConfig } from "eslint/config";
|
|
8
|
+
import absolutePlugin from "eslint-plugin-absolute";
|
|
9
|
+
import importPlugin from "eslint-plugin-import";
|
|
10
|
+
import promisePlugin from "eslint-plugin-promise";
|
|
11
|
+
import securityPlugin from "eslint-plugin-security";
|
|
12
|
+
import globals from "globals";
|
|
13
|
+
import tseslint from "typescript-eslint";
|
|
14
|
+
|
|
15
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
16
|
+
|
|
17
|
+
export default defineConfig([
|
|
18
|
+
{
|
|
19
|
+
ignores: [
|
|
20
|
+
"dist/**",
|
|
21
|
+
"example/build/**",
|
|
22
|
+
"tailwind.config.ts",
|
|
23
|
+
"postcss.config.ts"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
pluginJs.configs.recommended,
|
|
28
|
+
|
|
29
|
+
...tseslint.configs.recommended,
|
|
30
|
+
|
|
31
|
+
{
|
|
32
|
+
files: ["**/*.{ts,tsx}"],
|
|
33
|
+
languageOptions: {
|
|
34
|
+
globals: globals.browser,
|
|
35
|
+
parser: tsParser,
|
|
36
|
+
parserOptions: {
|
|
37
|
+
createDefaultProgram: true,
|
|
38
|
+
project: "./tsconfig.json",
|
|
39
|
+
tsconfigRootDir: __dirname
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
{
|
|
45
|
+
files: ["**/*.{ts,tsx}"],
|
|
46
|
+
plugins: { "@stylistic/ts": stylisticTs },
|
|
47
|
+
rules: {
|
|
48
|
+
"@stylistic/ts/padding-line-between-statements": [
|
|
49
|
+
"error",
|
|
50
|
+
{ blankLine: "always", next: "return", prev: "*" }
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
{
|
|
56
|
+
files: ["**/*.{js,mjs,cjs,ts,tsx,jsx}"],
|
|
57
|
+
ignores: ["node_modules/**"],
|
|
58
|
+
languageOptions: {
|
|
59
|
+
globals: globals.browser
|
|
60
|
+
},
|
|
61
|
+
plugins: {
|
|
62
|
+
absolute: absolutePlugin,
|
|
63
|
+
import: importPlugin,
|
|
64
|
+
promise: promisePlugin,
|
|
65
|
+
security: securityPlugin
|
|
66
|
+
},
|
|
67
|
+
rules: {
|
|
68
|
+
"absolute/explicit-object-types": "error",
|
|
69
|
+
"absolute/localize-react-props": "error",
|
|
70
|
+
"absolute/max-depth-extended": ["error", 1],
|
|
71
|
+
"absolute/max-jsxnesting": ["error", 5],
|
|
72
|
+
"absolute/min-var-length": [
|
|
73
|
+
"error",
|
|
74
|
+
{ allowedVars: ["_", "id", "db", "OK"], minLength: 3 }
|
|
75
|
+
],
|
|
76
|
+
"absolute/no-explicit-return-type": "error",
|
|
77
|
+
"absolute/no-type-cast": "error",
|
|
78
|
+
"absolute/no-useless-function": "error",
|
|
79
|
+
"absolute/sort-exports": [
|
|
80
|
+
"error",
|
|
81
|
+
{
|
|
82
|
+
caseSensitive: true,
|
|
83
|
+
natural: true,
|
|
84
|
+
order: "asc",
|
|
85
|
+
variablesBeforeFunctions: true
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"absolute/sort-keys-fixable": [
|
|
89
|
+
"error",
|
|
90
|
+
{
|
|
91
|
+
caseSensitive: true,
|
|
92
|
+
natural: true,
|
|
93
|
+
order: "asc",
|
|
94
|
+
variablesBeforeFunctions: true
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"arrow-body-style": ["error", "as-needed"],
|
|
98
|
+
"consistent-return": "error",
|
|
99
|
+
eqeqeq: "error",
|
|
100
|
+
"func-style": [
|
|
101
|
+
"error",
|
|
102
|
+
"expression",
|
|
103
|
+
{ allowArrowFunctions: true }
|
|
104
|
+
],
|
|
105
|
+
"import/no-cycle": "error",
|
|
106
|
+
"import/no-default-export": "error",
|
|
107
|
+
"import/no-relative-packages": "error",
|
|
108
|
+
"import/no-unused-modules": ["error", { missingExports: true }],
|
|
109
|
+
"import/order": ["error", { alphabetize: { order: "asc" } }],
|
|
110
|
+
"no-await-in-loop": "error",
|
|
111
|
+
"no-debugger": "error",
|
|
112
|
+
"no-duplicate-case": "error",
|
|
113
|
+
"no-duplicate-imports": "error",
|
|
114
|
+
"no-else-return": "error",
|
|
115
|
+
"no-empty-function": "error",
|
|
116
|
+
"no-empty-pattern": "error",
|
|
117
|
+
"no-empty-static-block": "error",
|
|
118
|
+
"no-fallthrough": "error",
|
|
119
|
+
"no-floating-decimal": "error",
|
|
120
|
+
"no-global-assign": "error",
|
|
121
|
+
"no-implicit-coercion": "error",
|
|
122
|
+
"no-implicit-globals": "error",
|
|
123
|
+
"no-loop-func": "error",
|
|
124
|
+
"no-magic-numbers": [
|
|
125
|
+
"warn",
|
|
126
|
+
{ detectObjects: false, enforceConst: true, ignore: [0, 1, 2] }
|
|
127
|
+
],
|
|
128
|
+
"no-misleading-character-class": "error",
|
|
129
|
+
"no-nested-ternary": "error",
|
|
130
|
+
"no-new-native-nonconstructor": "error",
|
|
131
|
+
"no-new-wrappers": "error",
|
|
132
|
+
"no-param-reassign": "error",
|
|
133
|
+
"no-restricted-imports": [
|
|
134
|
+
"error",
|
|
135
|
+
{
|
|
136
|
+
paths: [
|
|
137
|
+
{
|
|
138
|
+
importNames: ["default"],
|
|
139
|
+
message:
|
|
140
|
+
"Import only named React exports for tree-shaking.",
|
|
141
|
+
name: "react"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
importNames: ["default"],
|
|
145
|
+
message: "Import only the required Bun exports.",
|
|
146
|
+
name: "bun"
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"no-return-await": "error",
|
|
152
|
+
"no-shadow": "error",
|
|
153
|
+
"no-undef": "error",
|
|
154
|
+
"no-unneeded-ternary": "error",
|
|
155
|
+
"no-unreachable": "error",
|
|
156
|
+
"no-useless-assignment": "error",
|
|
157
|
+
"no-useless-concat": "error",
|
|
158
|
+
"no-useless-return": "error",
|
|
159
|
+
"no-var": "error",
|
|
160
|
+
"prefer-arrow-callback": "error",
|
|
161
|
+
"prefer-const": "error",
|
|
162
|
+
"prefer-destructuring": [
|
|
163
|
+
"error",
|
|
164
|
+
{ array: true, object: true },
|
|
165
|
+
{ enforceForRenamedProperties: false }
|
|
166
|
+
],
|
|
167
|
+
"prefer-template": "error",
|
|
168
|
+
"promise/always-return": "warn",
|
|
169
|
+
"promise/avoid-new": "warn",
|
|
170
|
+
"promise/catch-or-return": "error",
|
|
171
|
+
"promise/no-callback-in-promise": "warn",
|
|
172
|
+
"promise/no-nesting": "warn",
|
|
173
|
+
"promise/no-promise-in-callback": "warn",
|
|
174
|
+
"promise/no-return-wrap": "error",
|
|
175
|
+
"promise/param-names": "error"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
files: ["eslint.config.mjs", "src/constants.ts"],
|
|
180
|
+
rules: {
|
|
181
|
+
"no-magic-numbers": "off"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
files: ["eslint.config.mjs"],
|
|
186
|
+
rules: {
|
|
187
|
+
"import/no-default-export": "off"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
files: [
|
|
192
|
+
"src/utils/index.ts",
|
|
193
|
+
"src/plugins/index.ts",
|
|
194
|
+
"src/core/index.ts",
|
|
195
|
+
"src/index.ts",
|
|
196
|
+
"example/**/indexes/*",
|
|
197
|
+
"example/html/scripts/*"
|
|
198
|
+
],
|
|
199
|
+
rules: {
|
|
200
|
+
"import/no-unused-modules": "off"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@absolutejs/absolute",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "A fullstack meta-framework for building web applications with TypeScript",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,30 +13,39 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "rm -rf dist && bun build src/index.ts --outdir dist --sourcemap --target=bun --external react --external react-dom --external elysia && tsc --emitDeclarationOnly --project tsconfig.json",
|
|
15
15
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
16
|
-
"format": "prettier --write \"./**/*.{js,jsx,ts,tsx,css,json}\"",
|
|
16
|
+
"format": "prettier --write \"./**/*.{js,jsx,ts,tsx,css,json,mjs,md}\"",
|
|
17
|
+
"lint": "eslint ./",
|
|
18
|
+
"typecheck": "bun run tsc --noEmit",
|
|
17
19
|
"dev": "bun run --watch example/server.ts",
|
|
18
20
|
"release": "bun run format && bun run build && bun publish"
|
|
19
21
|
},
|
|
20
22
|
"peerDependencies": {
|
|
21
|
-
"elysia": ">= 1.
|
|
23
|
+
"elysia": ">= 1.3.0",
|
|
22
24
|
"react": ">= 19.1.0",
|
|
23
25
|
"react-dom": ">= 19.1.0"
|
|
24
26
|
},
|
|
25
27
|
"devDependencies": {
|
|
26
|
-
"@elysiajs/static": "1.0
|
|
28
|
+
"@elysiajs/static": "1.3.0",
|
|
27
29
|
"@tailwindcss/cli": "4.1.7",
|
|
28
|
-
"@types/bun": "1.
|
|
30
|
+
"@types/bun": "1.2.14",
|
|
29
31
|
"@types/react": "19.1.5",
|
|
30
32
|
"@types/react-dom": "19.1.5",
|
|
31
33
|
"@types/vue": "2.0.0",
|
|
32
34
|
"autoprefixer": "10.4.21",
|
|
33
|
-
"elysia": "1.
|
|
35
|
+
"elysia": "1.3.1",
|
|
34
36
|
"postcss": "8.5.3",
|
|
35
37
|
"prettier": "3.5.3",
|
|
36
38
|
"react": "19.1.0",
|
|
37
39
|
"svelte": "4.2.15",
|
|
38
40
|
"tailwindcss": "4.1.7",
|
|
39
|
-
"typescript": "5.
|
|
40
|
-
"vue": "3.4.26"
|
|
41
|
+
"typescript": "5.8.3",
|
|
42
|
+
"vue": "3.4.26",
|
|
43
|
+
"@stylistic/eslint-plugin-ts": "4.2.0",
|
|
44
|
+
"eslint": "9.26.0",
|
|
45
|
+
"eslint-plugin-absolute": "0.1.0",
|
|
46
|
+
"eslint-plugin-import": "2.31.0",
|
|
47
|
+
"eslint-plugin-promise": "7.2.1",
|
|
48
|
+
"eslint-plugin-security": "3.0.1",
|
|
49
|
+
"typescript-eslint": "8.32.0"
|
|
41
50
|
}
|
|
42
51
|
}
|