@absolutejs/absolute 0.13.11 → 0.15.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/.claude/settings.local.json +7 -1
- package/CLAUDE.md +65 -56
- package/LICENSE +80 -24
- package/README.md +163 -163
- package/THIRD_PARTY_NOTICES.md +61 -0
- package/dist/cli/index.js +24 -8
- package/dist/index.js +3013 -480
- package/dist/index.js.map +56 -26
- package/dist/{build → src/build}/compileSvelte.d.ts +2 -1
- package/dist/src/build/compileVue.d.ts +33 -0
- package/dist/src/build/generateReactIndexes.d.ts +1 -0
- package/dist/src/build/htmlScriptHMRPlugin.d.ts +13 -0
- package/dist/src/build/wrapHTMLScript.d.ts +24 -0
- package/dist/src/core/build.d.ts +2 -0
- package/dist/src/core/devBuild.d.ts +6 -0
- package/dist/{core → src/core}/index.d.ts +2 -1
- package/dist/src/core/lookup.d.ts +3 -0
- package/dist/{core → src/core}/pageHandlers.d.ts +4 -4
- package/dist/src/dev/assetStore.d.ts +12 -0
- package/dist/src/dev/buildHMRClient.d.ts +1 -0
- package/dist/src/dev/clientManager.d.ts +26 -0
- package/dist/src/dev/configResolver.d.ts +13 -0
- package/dist/src/dev/dependencyGraph.d.ts +13 -0
- package/dist/src/dev/fileHashTracker.d.ts +2 -0
- package/dist/src/dev/fileWatcher.d.ts +3 -0
- package/dist/src/dev/moduleMapper.d.ts +21 -0
- package/dist/src/dev/moduleVersionTracker.d.ts +7 -0
- package/dist/src/dev/pathUtils.d.ts +5 -0
- package/dist/src/dev/reactComponentClassifier.d.ts +2 -0
- package/dist/src/dev/rebuildTrigger.d.ts +10 -0
- package/dist/src/dev/simpleHTMLHMR.d.ts +4 -0
- package/dist/src/dev/simpleHTMXHMR.d.ts +4 -0
- package/dist/src/dev/simpleSvelteHMR.d.ts +1 -0
- package/dist/src/dev/simpleVueHMR.d.ts +1 -0
- package/dist/src/dev/webSocket.d.ts +9 -0
- package/dist/{index.d.ts → src/index.d.ts} +1 -0
- package/dist/src/plugins/hmr.d.ts +62 -0
- package/dist/{plugins → src/plugins}/index.d.ts +2 -1
- package/dist/{plugins → src/plugins}/networking.d.ts +3 -0
- package/dist/{svelte → src/svelte}/renderToReadableStream.d.ts +3 -1
- package/dist/src/utils/getRegisterClientScript.d.ts +10 -0
- package/dist/{utils → src/utils}/index.d.ts +2 -0
- package/dist/src/utils/logger.d.ts +45 -0
- package/dist/src/utils/networking.d.ts +2 -0
- package/dist/src/utils/normalizePath.d.ts +9 -0
- package/dist/src/utils/registerClientScript.d.ts +51 -0
- package/dist/{types.d.ts → types/build.d.ts} +7 -0
- package/dist/types/client.d.ts +104 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/messages.d.ts +138 -0
- package/dist/types/websocket.d.ts +6 -0
- package/eslint.config.mjs +238 -234
- package/package.json +17 -12
- package/tsconfig.build.json +20 -20
- package/types/build.ts +46 -0
- package/types/client.ts +109 -0
- package/types/index.ts +4 -0
- package/types/messages.ts +205 -0
- package/types/websocket.ts +12 -0
- package/types/window-globals.ts +53 -0
- package/dist/build/compileVue.d.ts +0 -5
- package/dist/build/generateReactIndexes.d.ts +0 -1
- package/dist/core/build.d.ts +0 -2
- package/dist/core/lookup.d.ts +0 -1
- package/dist/utils/networking.d.ts +0 -1
- /package/dist/{build → src/build}/generateManifest.d.ts +0 -0
- /package/dist/{build → src/build}/outputLogs.d.ts +0 -0
- /package/dist/{build → src/build}/scanEntryPoints.d.ts +0 -0
- /package/dist/{build → src/build}/updateAssetPaths.d.ts +0 -0
- /package/dist/{cli → src/cli}/index.d.ts +0 -0
- /package/dist/{constants.d.ts → src/constants.d.ts} +0 -0
- /package/dist/{plugins → src/plugins}/pageRouter.d.ts +0 -0
- /package/dist/{svelte → src/svelte}/renderToPipeableStream.d.ts +0 -0
- /package/dist/{svelte → src/svelte}/renderToString.d.ts +0 -0
- /package/dist/{utils → src/utils}/cleanup.d.ts +0 -0
- /package/dist/{utils → src/utils}/commonAncestor.d.ts +0 -0
- /package/dist/{utils → src/utils}/escapeScriptContent.d.ts +0 -0
- /package/dist/{utils → src/utils}/generateHeadElement.d.ts +0 -0
- /package/dist/{utils → src/utils}/getDurationString.d.ts +0 -0
- /package/dist/{utils → src/utils}/getEnv.d.ts +0 -0
- /package/dist/{utils → src/utils}/stringModifiers.d.ts +0 -0
- /package/dist/{utils → src/utils}/validateSafePath.d.ts +0 -0
package/eslint.config.mjs
CHANGED
|
@@ -1,234 +1,238 @@
|
|
|
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
|
-
'**/compiled/**',
|
|
22
|
-
'**/*/htmx.*.min.js',
|
|
23
|
-
'example/build/**',
|
|
24
|
-
'tailwind.config.ts',
|
|
25
|
-
'postcss.config.ts',
|
|
26
|
-
'example/react/indexes/*'
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
pluginJs.configs.recommended,
|
|
31
|
-
|
|
32
|
-
...tseslint.configs.recommended,
|
|
33
|
-
|
|
34
|
-
{
|
|
35
|
-
files: ['**/*.{ts,tsx}'],
|
|
36
|
-
languageOptions: {
|
|
37
|
-
globals: {
|
|
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
|
-
'absolute/
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
],
|
|
82
|
-
'absolute/
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
'import/
|
|
115
|
-
'no-
|
|
116
|
-
'no-
|
|
117
|
-
'no-
|
|
118
|
-
'
|
|
119
|
-
'no-
|
|
120
|
-
'no-
|
|
121
|
-
'no-
|
|
122
|
-
'no-
|
|
123
|
-
'no-
|
|
124
|
-
'no-
|
|
125
|
-
'no-
|
|
126
|
-
'no-
|
|
127
|
-
'no-
|
|
128
|
-
'no-
|
|
129
|
-
'no-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
'no-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
'no-
|
|
138
|
-
'no-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
'no-
|
|
161
|
-
'no-
|
|
162
|
-
'no-
|
|
163
|
-
'no-
|
|
164
|
-
'no-
|
|
165
|
-
'
|
|
166
|
-
'
|
|
167
|
-
'
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
'
|
|
177
|
-
'promise/
|
|
178
|
-
'promise/
|
|
179
|
-
'promise/
|
|
180
|
-
'promise/
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
'
|
|
214
|
-
'
|
|
215
|
-
'
|
|
216
|
-
'
|
|
217
|
-
'
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
'
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
'
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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
|
+
'**/compiled/**',
|
|
22
|
+
'**/*/htmx.*.min.js',
|
|
23
|
+
'example/build/**',
|
|
24
|
+
'tailwind.config.ts',
|
|
25
|
+
'postcss.config.ts',
|
|
26
|
+
'example/react/indexes/*'
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
pluginJs.configs.recommended,
|
|
31
|
+
|
|
32
|
+
...tseslint.configs.recommended,
|
|
33
|
+
|
|
34
|
+
{
|
|
35
|
+
files: ['**/*.{ts,tsx}'],
|
|
36
|
+
languageOptions: {
|
|
37
|
+
globals: {
|
|
38
|
+
...globals.node,
|
|
39
|
+
// TODO: These should only be applied to the src/core/build.ts file.
|
|
40
|
+
BuildMessage: 'readonly',
|
|
41
|
+
ResolveMessage: 'readonly',
|
|
42
|
+
NodeJS: 'readonly',
|
|
43
|
+
Bun: 'readonly',
|
|
44
|
+
Buffer: 'readonly'
|
|
45
|
+
},
|
|
46
|
+
parser: tsParser,
|
|
47
|
+
parserOptions: {
|
|
48
|
+
createDefaultProgram: true,
|
|
49
|
+
project: './tsconfig.json',
|
|
50
|
+
tsconfigRootDir: __dirname
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
plugins: { '@stylistic/ts': stylisticTs },
|
|
54
|
+
rules: {
|
|
55
|
+
'@stylistic/ts/padding-line-between-statements': [
|
|
56
|
+
'error',
|
|
57
|
+
{ blankLine: 'always', next: 'return', prev: '*' }
|
|
58
|
+
],
|
|
59
|
+
|
|
60
|
+
'@typescript-eslint/no-unnecessary-type-assertion': 'error'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
files: ['**/*.{js,mjs,cjs,json,ts,tsx,jsx}'],
|
|
65
|
+
ignores: ['node_modules/**'],
|
|
66
|
+
languageOptions: {
|
|
67
|
+
globals: {
|
|
68
|
+
...globals.browser
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
plugins: {
|
|
72
|
+
absolute: absolutePlugin,
|
|
73
|
+
import: importPlugin,
|
|
74
|
+
promise: promisePlugin,
|
|
75
|
+
security: securityPlugin
|
|
76
|
+
},
|
|
77
|
+
rules: {
|
|
78
|
+
'absolute/explicit-object-types': 'error',
|
|
79
|
+
'absolute/localize-react-props': 'error',
|
|
80
|
+
'absolute/max-depth-extended': ['error', 1],
|
|
81
|
+
'absolute/max-jsxnesting': ['error', 5],
|
|
82
|
+
'absolute/min-var-length': [
|
|
83
|
+
'error',
|
|
84
|
+
{ allowedVars: ['_', 'id', 'db', 'OK'], minLength: 3 }
|
|
85
|
+
],
|
|
86
|
+
'absolute/no-explicit-return-type': 'error',
|
|
87
|
+
'absolute/no-useless-function': 'error',
|
|
88
|
+
'absolute/sort-exports': [
|
|
89
|
+
'error',
|
|
90
|
+
{
|
|
91
|
+
caseSensitive: true,
|
|
92
|
+
natural: true,
|
|
93
|
+
order: 'asc',
|
|
94
|
+
variablesBeforeFunctions: true
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
'absolute/sort-keys-fixable': [
|
|
98
|
+
'error',
|
|
99
|
+
{
|
|
100
|
+
caseSensitive: true,
|
|
101
|
+
natural: true,
|
|
102
|
+
order: 'asc',
|
|
103
|
+
variablesBeforeFunctions: true
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
'arrow-body-style': ['error', 'as-needed'],
|
|
107
|
+
'consistent-return': 'error',
|
|
108
|
+
eqeqeq: 'error',
|
|
109
|
+
'func-style': [
|
|
110
|
+
'error',
|
|
111
|
+
'expression',
|
|
112
|
+
{ allowArrowFunctions: true }
|
|
113
|
+
],
|
|
114
|
+
'import/no-cycle': 'error',
|
|
115
|
+
'import/no-default-export': 'error',
|
|
116
|
+
'import/no-relative-packages': 'error',
|
|
117
|
+
'import/no-unused-modules': ['error', { missingExports: true }],
|
|
118
|
+
'import/order': ['error', { alphabetize: { order: 'asc' } }],
|
|
119
|
+
'no-await-in-loop': 'error',
|
|
120
|
+
'no-debugger': 'error',
|
|
121
|
+
'no-duplicate-case': 'error',
|
|
122
|
+
'no-duplicate-imports': 'error',
|
|
123
|
+
'no-else-return': 'error',
|
|
124
|
+
'no-empty-function': 'error',
|
|
125
|
+
'no-empty-pattern': 'error',
|
|
126
|
+
'no-empty-static-block': 'error',
|
|
127
|
+
'no-fallthrough': 'error',
|
|
128
|
+
'no-floating-decimal': 'error',
|
|
129
|
+
'no-global-assign': 'error',
|
|
130
|
+
'no-implicit-coercion': 'error',
|
|
131
|
+
'no-implicit-globals': 'error',
|
|
132
|
+
'no-loop-func': 'error',
|
|
133
|
+
'no-magic-numbers': [
|
|
134
|
+
'warn',
|
|
135
|
+
{ detectObjects: false, enforceConst: true, ignore: [0, 1, 2] }
|
|
136
|
+
],
|
|
137
|
+
'no-misleading-character-class': 'error',
|
|
138
|
+
'no-nested-ternary': 'error',
|
|
139
|
+
'no-new-native-nonconstructor': 'error',
|
|
140
|
+
'no-new-wrappers': 'error',
|
|
141
|
+
'no-param-reassign': 'error',
|
|
142
|
+
'no-restricted-imports': [
|
|
143
|
+
'error',
|
|
144
|
+
{
|
|
145
|
+
paths: [
|
|
146
|
+
{
|
|
147
|
+
importNames: ['default'],
|
|
148
|
+
message:
|
|
149
|
+
'Import only named React exports for tree-shaking.',
|
|
150
|
+
name: 'react'
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
importNames: ['default'],
|
|
154
|
+
message: 'Import only the required Bun exports.',
|
|
155
|
+
name: 'bun'
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
'no-return-await': 'error',
|
|
161
|
+
'no-shadow': 'error',
|
|
162
|
+
'no-undef': 'error',
|
|
163
|
+
'no-unneeded-ternary': 'error',
|
|
164
|
+
'no-unreachable': 'error',
|
|
165
|
+
'no-useless-assignment': 'error',
|
|
166
|
+
'no-useless-concat': 'error',
|
|
167
|
+
'no-useless-return': 'error',
|
|
168
|
+
'no-var': 'error',
|
|
169
|
+
'prefer-arrow-callback': 'error',
|
|
170
|
+
'prefer-const': 'error',
|
|
171
|
+
'prefer-destructuring': [
|
|
172
|
+
'error',
|
|
173
|
+
{ array: true, object: true },
|
|
174
|
+
{ enforceForRenamedProperties: false }
|
|
175
|
+
],
|
|
176
|
+
'prefer-template': 'error',
|
|
177
|
+
'promise/always-return': 'warn',
|
|
178
|
+
'promise/avoid-new': 'warn',
|
|
179
|
+
'promise/catch-or-return': 'error',
|
|
180
|
+
'promise/no-callback-in-promise': 'warn',
|
|
181
|
+
'promise/no-nesting': 'warn',
|
|
182
|
+
'promise/no-promise-in-callback': 'warn',
|
|
183
|
+
'promise/no-return-wrap': 'error',
|
|
184
|
+
'promise/param-names': 'error'
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
//TODO: Add official eslint support for Svelte.
|
|
189
|
+
files: ['**/*.svelte.ts'],
|
|
190
|
+
languageOptions: {
|
|
191
|
+
globals: {
|
|
192
|
+
$derived: 'readonly',
|
|
193
|
+
$effect: 'readonly',
|
|
194
|
+
$props: 'readonly',
|
|
195
|
+
$state: 'readonly'
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
files: ['eslint.config.mjs', 'src/constants.ts'],
|
|
201
|
+
rules: {
|
|
202
|
+
'no-magic-numbers': 'off'
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
files: ['eslint.config.mjs'],
|
|
207
|
+
rules: {
|
|
208
|
+
'import/no-default-export': 'off'
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
files: [
|
|
213
|
+
'src/utils/index.ts',
|
|
214
|
+
'src/plugins/index.ts',
|
|
215
|
+
'src/core/index.ts',
|
|
216
|
+
'src/index.ts',
|
|
217
|
+
'example/html/scripts/*',
|
|
218
|
+
'tsconfig.json',
|
|
219
|
+
'tsconfig.build.json',
|
|
220
|
+
'package.json',
|
|
221
|
+
'.prettierrc.json'
|
|
222
|
+
],
|
|
223
|
+
rules: {
|
|
224
|
+
'import/no-unused-modules': 'off'
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
files: [
|
|
229
|
+
'tsconfig.json',
|
|
230
|
+
'tsconfig.build.json',
|
|
231
|
+
'package.json',
|
|
232
|
+
'.prettierrc.json'
|
|
233
|
+
],
|
|
234
|
+
rules: {
|
|
235
|
+
'@typescript-eslint/no-unused-expressions': 'off'
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
]);
|
package/package.json
CHANGED
|
@@ -4,15 +4,18 @@
|
|
|
4
4
|
"absolutejs": "./dist/cli/index.js"
|
|
5
5
|
},
|
|
6
6
|
"description": "A fullstack meta-framework for building web applications with TypeScript",
|
|
7
|
+
"engines": {
|
|
8
|
+
"bun": ">=1.3.6"
|
|
9
|
+
},
|
|
7
10
|
"devDependencies": {
|
|
8
|
-
"@elysiajs/static": "1.
|
|
11
|
+
"@elysiajs/static": "1.4.0",
|
|
9
12
|
"@stylistic/eslint-plugin-ts": "4.2.0",
|
|
10
13
|
"@tailwindcss/cli": "4.1.7",
|
|
11
|
-
"@types/bun": "
|
|
12
|
-
"@types/react": "19.
|
|
13
|
-
"@types/react-dom": "19.
|
|
14
|
+
"@types/bun": "^1.2.18",
|
|
15
|
+
"@types/react": "19.2.0",
|
|
16
|
+
"@types/react-dom": "19.2.0",
|
|
14
17
|
"autoprefixer": "10.4.21",
|
|
15
|
-
"elysia": "1.
|
|
18
|
+
"elysia": "1.4.18",
|
|
16
19
|
"elysia-scoped-state": "0.1.1",
|
|
17
20
|
"eslint": "9.26.0",
|
|
18
21
|
"eslint-plugin-absolute": "0.1.4",
|
|
@@ -22,20 +25,21 @@
|
|
|
22
25
|
"postcss": "8.5.3",
|
|
23
26
|
"prettier": "3.5.3",
|
|
24
27
|
"prettier-plugin-svelte": "3.4.0",
|
|
25
|
-
"react": "19.1
|
|
28
|
+
"react": "19.2.1",
|
|
29
|
+
"react-dom": "19.2.1",
|
|
30
|
+
"react-refresh": "^0.18.0",
|
|
26
31
|
"svelte": "5.35.2",
|
|
27
32
|
"tailwindcss": "4.1.7",
|
|
28
33
|
"typescript": "5.8.3",
|
|
29
34
|
"typescript-eslint": "8.32.0",
|
|
30
35
|
"vue": "3.5.27"
|
|
31
36
|
},
|
|
32
|
-
"license": "
|
|
37
|
+
"license": "BSL-1.1",
|
|
33
38
|
"main": "./dist/index.js",
|
|
34
39
|
"name": "@absolutejs/absolute",
|
|
35
40
|
"peerDependencies": {
|
|
36
|
-
"elysia": "^1.
|
|
41
|
+
"elysia": "^1.4.0",
|
|
37
42
|
"react": "^19.1.0",
|
|
38
|
-
"react-dom": "^19.1.0",
|
|
39
43
|
"svelte": "^5.35.2",
|
|
40
44
|
"vue": "^3.5.27"
|
|
41
45
|
},
|
|
@@ -47,13 +51,14 @@
|
|
|
47
51
|
"build": "rm -rf dist && bun build src/index.ts --outdir dist --sourcemap --target=bun --external react --external react-dom --external vue --external @vue/compiler-sfc --external svelte --external elysia && bun build src/cli/index.ts --outfile dist/cli/index.js --target=bun && tsc --emitDeclarationOnly --project tsconfig.build.json",
|
|
48
52
|
"db:push": "drizzle-kit push",
|
|
49
53
|
"db:studio": "drizzle-kit studio",
|
|
50
|
-
"dev": "bun src/cli/index.ts dev example/server.ts",
|
|
54
|
+
"dev": "bun run src/cli/index.ts dev example/server.ts",
|
|
55
|
+
"start": "NODE_ENV=production bun run example/server.ts",
|
|
51
56
|
"format": "prettier --write \"./**/*.{js,jsx,ts,tsx,css,json,mjs,md,svelte,html,vue}\"",
|
|
52
57
|
"lint": "eslint ./",
|
|
53
58
|
"release": "bun run format && bun run build && bun publish",
|
|
54
|
-
"test": "
|
|
59
|
+
"test": "bun test",
|
|
55
60
|
"typecheck": "bun run tsc --noEmit"
|
|
56
61
|
},
|
|
57
62
|
"types": "./dist/index.d.ts",
|
|
58
|
-
"version": "0.
|
|
63
|
+
"version": "0.15.0"
|
|
59
64
|
}
|
package/tsconfig.build.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"allowJs": true,
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"esModuleInterop": true,
|
|
6
|
-
"forceConsistentCasingInFileNames": true,
|
|
7
|
-
"jsx": "react-jsx",
|
|
8
|
-
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
9
|
-
"module": "ESNext",
|
|
10
|
-
"moduleResolution": "bundler",
|
|
11
|
-
"noImplicitAny": true,
|
|
12
|
-
"noUncheckedIndexedAccess": true,
|
|
13
|
-
"outDir": "dist",
|
|
14
|
-
"skipLibCheck": true,
|
|
15
|
-
"strict": true,
|
|
16
|
-
"target": "ESNext"
|
|
17
|
-
},
|
|
18
|
-
"exclude": ["node_modules"],
|
|
19
|
-
"include": ["src/**/*"]
|
|
20
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"allowJs": true,
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"esModuleInterop": true,
|
|
6
|
+
"forceConsistentCasingInFileNames": true,
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
9
|
+
"module": "ESNext",
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"noImplicitAny": true,
|
|
12
|
+
"noUncheckedIndexedAccess": true,
|
|
13
|
+
"outDir": "dist",
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"strict": true,
|
|
16
|
+
"target": "ESNext"
|
|
17
|
+
},
|
|
18
|
+
"exclude": ["node_modules", "src/dev/client"],
|
|
19
|
+
"include": ["src/**/*"]
|
|
20
|
+
}
|
package/types/build.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ComponentType as ReactComponent } from 'react';
|
|
2
|
+
import { Component as SvelteComponent } from 'svelte';
|
|
3
|
+
import { Component as VueComponent } from 'vue';
|
|
4
|
+
|
|
5
|
+
export type BuildOptions = {
|
|
6
|
+
preserveIntermediateFiles?: boolean;
|
|
7
|
+
/** When true, build() throws on error instead of exit(1) - used by HMR rebuilds */
|
|
8
|
+
throwOnError?: boolean;
|
|
9
|
+
hmr?: {
|
|
10
|
+
debounceMs?: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type BuildConfig = {
|
|
15
|
+
buildDirectory?: string;
|
|
16
|
+
assetsDirectory?: string;
|
|
17
|
+
publicDirectory?: string;
|
|
18
|
+
reactDirectory?: string;
|
|
19
|
+
vueDirectory?: string;
|
|
20
|
+
angularDirectory?: string;
|
|
21
|
+
astroDirectory?: string;
|
|
22
|
+
svelteDirectory?: string;
|
|
23
|
+
htmlDirectory?: string;
|
|
24
|
+
htmxDirectory?: string;
|
|
25
|
+
tailwind?: {
|
|
26
|
+
input: string;
|
|
27
|
+
output: string;
|
|
28
|
+
};
|
|
29
|
+
options?: BuildOptions;
|
|
30
|
+
// Optional: List of files to rebuild incrementally (absolute paths)
|
|
31
|
+
// When provided, only these files and their dependencies will be rebuilt
|
|
32
|
+
incrementalFiles?: string[];
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type PropsOf<Component> =
|
|
36
|
+
Component extends ReactComponent<infer Props>
|
|
37
|
+
? Props
|
|
38
|
+
: Component extends SvelteComponent<infer Props>
|
|
39
|
+
? Props
|
|
40
|
+
: Component extends VueComponent<infer Props>
|
|
41
|
+
? Props
|
|
42
|
+
: Record<string, never>;
|
|
43
|
+
|
|
44
|
+
export type PropsArgs<C> = keyof PropsOf<C> extends never ? [] : [PropsOf<C>];
|
|
45
|
+
|
|
46
|
+
export type Prettify<T> = { [K in keyof T]: T[K] } & {};
|