create-absolutejs 0.10.3 → 0.12.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/dist/constants.d.ts +2 -2
- package/dist/constants.js +2 -2
- package/dist/data.d.ts +10 -10
- package/dist/data.js +88 -95
- package/dist/generators/angular/generateAngularPage.d.ts +11 -0
- package/dist/generators/angular/generateAngularPage.js +174 -0
- package/dist/generators/angular/scaffoldAngular.d.ts +2 -0
- package/dist/generators/angular/scaffoldAngular.js +38 -0
- package/dist/generators/configurations/generatePackageJson.js +28 -3
- package/dist/generators/configurations/scaffoldConfigurationFiles.js +26 -2
- package/dist/generators/db/dockerInitTemplates.d.ts +9 -9
- package/dist/generators/db/dockerInitTemplates.js +9 -9
- package/dist/generators/db/generateDatabaseTypes.js +5 -0
- package/dist/generators/db/generateDockerContainer.js +4 -2
- package/dist/generators/db/generateDrizzleSchema.js +16 -6
- package/dist/generators/db/handlerTemplates.d.ts +5 -0
- package/dist/generators/db/handlerTemplates.js +6 -0
- package/dist/generators/db/scaffoldDocker.js +42 -30
- package/dist/generators/html/generateHTMLPage.d.ts +1 -1
- package/dist/generators/html/generateHTMLPage.js +3 -3
- package/dist/generators/html/scaffoldHTML.d.ts +1 -1
- package/dist/generators/html/scaffoldHTML.js +4 -6
- package/dist/generators/htmx/generateHTMXPage.d.ts +1 -1
- package/dist/generators/htmx/generateHTMXPage.js +3 -3
- package/dist/generators/htmx/scaffoldHTMX.d.ts +1 -1
- package/dist/generators/htmx/scaffoldHTMX.js +4 -6
- package/dist/generators/project/computeFlags.d.ts +1 -0
- package/dist/generators/project/computeFlags.js +1 -0
- package/dist/generators/project/generateBuildBlock.d.ts +2 -1
- package/dist/generators/project/generateBuildBlock.js +12 -7
- package/dist/generators/project/generateDBBlock.js +6 -0
- package/dist/generators/project/generateImportsBlock.d.ts +1 -2
- package/dist/generators/project/generateImportsBlock.js +48 -50
- package/dist/generators/project/generateMarkupCSS.d.ts +1 -1
- package/dist/generators/project/generateMarkupCSS.js +5 -1
- package/dist/generators/project/generateRoutesBlock.d.ts +1 -4
- package/dist/generators/project/generateRoutesBlock.js +44 -38
- package/dist/generators/project/generateServer.js +5 -12
- package/dist/generators/project/scaffoldFrontends.js +40 -4
- package/dist/generators/react/generateReactComponents.d.ts +2 -2
- package/dist/generators/react/generateReactComponents.js +33 -33
- package/dist/generators/react/scaffoldReact.d.ts +1 -1
- package/dist/generators/react/scaffoldReact.js +4 -6
- package/dist/generators/svelte/generateSveltePage.d.ts +1 -1
- package/dist/generators/svelte/generateSveltePage.js +20 -2
- package/dist/generators/svelte/scaffoldSvelte.d.ts +1 -1
- package/dist/generators/svelte/scaffoldSvelte.js +4 -6
- package/dist/generators/vue/generateVuePage.d.ts +1 -1
- package/dist/generators/vue/generateVuePage.js +2 -229
- package/dist/generators/vue/scaffoldVue.d.ts +1 -1
- package/dist/generators/vue/scaffoldVue.js +6 -2
- package/dist/questions/databaseEngine.d.ts +1 -1
- package/dist/questions/frontendDirectoryConfigurations.d.ts +1 -1
- package/dist/questions/frontends.d.ts +1 -1
- package/dist/questions/frontends.js +3 -3
- package/dist/scaffold.js +14 -2
- package/dist/templates/assets/svg/angular.svg +18 -0
- package/dist/templates/configurations/tsconfig.example.json +12 -12
- package/dist/templates/react/components/App.tsx +2 -2
- package/dist/templates/react/components/Head.tsx +7 -7
- package/dist/templates/react/components/OAuthLink.tsx +2 -2
- package/dist/templates/styles/colors.ts +6 -8
- package/dist/templates/styles/reset.css +15 -0
- package/dist/templates/svelte/components/Counter.svelte +4 -0
- package/dist/templates/vue/components/CountButton.vue +1 -1
- package/dist/typeGuards.d.ts +6 -6
- package/dist/typeGuards.js +6 -6
- package/dist/types.d.ts +3 -0
- package/dist/utils/checkDockerInstalled.d.ts +4 -4
- package/dist/utils/checkDockerInstalled.js +78 -71
- package/dist/utils/parseCommandLineOptions.js +13 -16
- package/dist/versions.d.ts +38 -29
- package/dist/versions.js +49 -39
- package/package.json +10 -9
- /package/dist/templates/configurations/{eslint.config.mjs → eslint.config.example.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { formatNavLink } from '../../utils/formatNavLink';
|
|
2
|
-
export const generateVuePage = (frontends) => {
|
|
2
|
+
export const generateVuePage = (frontends, editBasePath) => {
|
|
3
3
|
const navLinks = frontends.map(formatNavLink).join('\n\t\t\t');
|
|
4
4
|
return `<script setup lang="ts">
|
|
5
5
|
import CountButton from '../components/CountButton.vue';
|
|
@@ -60,7 +60,7 @@ const closeDropdown = (event: PointerEvent) => {
|
|
|
60
60
|
<h1>AbsoluteJS + Vue</h1>
|
|
61
61
|
<CountButton :initialCount="count" />
|
|
62
62
|
<p>
|
|
63
|
-
Edit <code
|
|
63
|
+
Edit <code>${editBasePath}/pages/VueExample.vue</code> and save
|
|
64
64
|
to test HMR.
|
|
65
65
|
</p>
|
|
66
66
|
${frontends.length > 1
|
|
@@ -75,32 +75,6 @@ ${frontends.length > 1
|
|
|
75
75
|
</template>
|
|
76
76
|
|
|
77
77
|
<style scoped>
|
|
78
|
-
:global(*) {
|
|
79
|
-
box-sizing: border-box;
|
|
80
|
-
line-height: 1.5;
|
|
81
|
-
margin: 0;
|
|
82
|
-
padding: 0;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
:global(html) {
|
|
86
|
-
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
87
|
-
height: 100%;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
:global(body) {
|
|
91
|
-
background-color: #2c2c2c;
|
|
92
|
-
color: #f5f5f5;
|
|
93
|
-
color-scheme: light dark;
|
|
94
|
-
display: flex;
|
|
95
|
-
flex-direction: column;
|
|
96
|
-
font-synthesis: none;
|
|
97
|
-
font-weight: 400;
|
|
98
|
-
height: 100%;
|
|
99
|
-
-moz-osx-font-smoothing: grayscale;
|
|
100
|
-
text-rendering: optimizeLegibility;
|
|
101
|
-
-webkit-font-smoothing: antialiased;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
78
|
:global(#root) {
|
|
105
79
|
display: flex;
|
|
106
80
|
flex-direction: column;
|
|
@@ -108,207 +82,6 @@ ${frontends.length > 1
|
|
|
108
82
|
height: 100%;
|
|
109
83
|
width: 100%;
|
|
110
84
|
}
|
|
111
|
-
|
|
112
|
-
:global(main) {
|
|
113
|
-
align-items: center;
|
|
114
|
-
display: flex;
|
|
115
|
-
flex: 1;
|
|
116
|
-
flex-direction: column;
|
|
117
|
-
justify-content: center;
|
|
118
|
-
text-align: center;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
:global(h1),
|
|
122
|
-
:global(h2),
|
|
123
|
-
:global(h3),
|
|
124
|
-
:global(h4),
|
|
125
|
-
:global(h5),
|
|
126
|
-
:global(h6) {
|
|
127
|
-
line-height: 1.1;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
:global(p) {
|
|
131
|
-
font-size: 1.2rem;
|
|
132
|
-
max-width: 1280px;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
a {
|
|
136
|
-
color: #5fbeeb;
|
|
137
|
-
font-size: 1.5rem;
|
|
138
|
-
font-weight: 500;
|
|
139
|
-
position: relative;
|
|
140
|
-
text-decoration: none;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
header {
|
|
144
|
-
align-items: center;
|
|
145
|
-
background-color: #1a1a1a;
|
|
146
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
147
|
-
display: flex;
|
|
148
|
-
justify-content: space-between;
|
|
149
|
-
padding: 2rem;
|
|
150
|
-
text-align: center;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
header a {
|
|
154
|
-
position: relative;
|
|
155
|
-
color: #5fbeeb;
|
|
156
|
-
text-decoration: none;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
header a::after {
|
|
160
|
-
content: '';
|
|
161
|
-
position: absolute;
|
|
162
|
-
left: 0;
|
|
163
|
-
bottom: 0;
|
|
164
|
-
width: 100%;
|
|
165
|
-
height: 2px;
|
|
166
|
-
background: linear-gradient(90deg, #5fbeeb 0%, #35d5a2 50%, #ff4b91 100%);
|
|
167
|
-
transform: scaleX(0);
|
|
168
|
-
transform-origin: left;
|
|
169
|
-
transition: transform 0.25s ease-in-out;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
header a:hover::after {
|
|
173
|
-
transform: scaleX(1);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
h1 {
|
|
177
|
-
font-size: 2.5rem;
|
|
178
|
-
margin-top: 2rem;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.logo {
|
|
182
|
-
height: 8rem;
|
|
183
|
-
width: 8rem;
|
|
184
|
-
will-change: filter;
|
|
185
|
-
transition: filter 300ms;
|
|
186
|
-
}
|
|
187
|
-
.logo:hover {
|
|
188
|
-
filter: drop-shadow(0 0 2rem #5fbeeb);
|
|
189
|
-
}
|
|
190
|
-
.logo.vue:hover {
|
|
191
|
-
filter: drop-shadow(0 0 2rem #42b883);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
nav {
|
|
195
|
-
display: flex;
|
|
196
|
-
gap: 4rem;
|
|
197
|
-
justify-content: center;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
header details {
|
|
201
|
-
position: relative;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
header details summary {
|
|
205
|
-
list-style: none;
|
|
206
|
-
appearance: none;
|
|
207
|
-
-webkit-appearance: none;
|
|
208
|
-
cursor: pointer;
|
|
209
|
-
user-select: none;
|
|
210
|
-
color: #5fbeeb;
|
|
211
|
-
font-size: 1.5rem;
|
|
212
|
-
font-weight: 500;
|
|
213
|
-
padding: 0.5rem 1rem;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
header summary::after {
|
|
217
|
-
content: '▼';
|
|
218
|
-
display: inline-block;
|
|
219
|
-
margin-left: 0.5rem;
|
|
220
|
-
font-size: 0.75rem;
|
|
221
|
-
transition: transform 0.3s ease;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
header details[open] summary::after {
|
|
225
|
-
transform: rotate(180deg);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
header details nav {
|
|
229
|
-
content-visibility: visible;
|
|
230
|
-
position: absolute;
|
|
231
|
-
top: 100%;
|
|
232
|
-
right: -0.5rem;
|
|
233
|
-
display: flex;
|
|
234
|
-
flex-direction: column;
|
|
235
|
-
gap: 0.75rem;
|
|
236
|
-
background: rgba(128, 128, 128, 0.15);
|
|
237
|
-
backdrop-filter: blur(4px);
|
|
238
|
-
border: 1px solid #5fbeeb;
|
|
239
|
-
border-radius: 1rem;
|
|
240
|
-
padding: 1rem 1.5rem;
|
|
241
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
|
|
242
|
-
opacity: 0;
|
|
243
|
-
transform: translateY(-8px);
|
|
244
|
-
pointer-events: none;
|
|
245
|
-
transition:
|
|
246
|
-
opacity 0.3s ease,
|
|
247
|
-
transform 0.3s ease;
|
|
248
|
-
z-index: 1000;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
header details[open] nav {
|
|
252
|
-
opacity: 1;
|
|
253
|
-
transform: translateY(0);
|
|
254
|
-
pointer-events: auto;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
header details nav a {
|
|
258
|
-
font-size: 1.1rem;
|
|
259
|
-
padding: 0.25rem 0;
|
|
260
|
-
white-space: nowrap;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
@media (max-width: 480px) {
|
|
264
|
-
:global(main) {
|
|
265
|
-
padding: 1rem;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
:global(p) {
|
|
269
|
-
font-size: 1rem;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
header {
|
|
273
|
-
padding: 1rem;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
a {
|
|
277
|
-
font-size: 1.2rem;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
h1 {
|
|
281
|
-
font-size: 1.75rem;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.logo {
|
|
285
|
-
height: 5rem;
|
|
286
|
-
width: 5rem;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
nav {
|
|
290
|
-
gap: 2rem;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
header details summary {
|
|
294
|
-
font-size: 1.2rem;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
@media (prefers-color-scheme: light) {
|
|
299
|
-
:global(body) {
|
|
300
|
-
background-color: #f5f5f5;
|
|
301
|
-
color: #1a1a1a;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
header {
|
|
305
|
-
background-color: #ffffff;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
button {
|
|
309
|
-
background-color: #ffffff;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
85
|
</style>
|
|
313
86
|
`;
|
|
314
87
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ScaffoldFrontendProps } from '../../types';
|
|
2
2
|
type ScaffoldVueProps = Omit<ScaffoldFrontendProps, 'isSingleFrontend'>;
|
|
3
|
-
export declare const scaffoldVue: ({ targetDirectory, templatesDirectory, frontends, projectAssetsDirectory }: ScaffoldVueProps) => void;
|
|
3
|
+
export declare const scaffoldVue: ({ editBasePath, targetDirectory, templatesDirectory, frontends, projectAssetsDirectory, stylesIndexesDirectory }: ScaffoldVueProps) => void;
|
|
4
4
|
export {};
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { cpSync, copyFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
2
2
|
import { join } from 'path';
|
|
3
|
+
import { generateMarkupCSS } from '../project/generateMarkupCSS';
|
|
3
4
|
import { generateVuePage } from './generateVuePage';
|
|
4
|
-
export const scaffoldVue = ({ targetDirectory, templatesDirectory, frontends, projectAssetsDirectory }) => {
|
|
5
|
+
export const scaffoldVue = ({ editBasePath, targetDirectory, templatesDirectory, frontends, projectAssetsDirectory, stylesIndexesDirectory }) => {
|
|
5
6
|
copyFileSync(join(templatesDirectory, 'assets', 'svg', 'vue-logo.svg'), join(projectAssetsDirectory, 'svg', 'vue-logo.svg'));
|
|
6
7
|
cpSync(join(templatesDirectory, 'vue'), targetDirectory, {
|
|
7
8
|
recursive: true
|
|
8
9
|
});
|
|
9
|
-
const vuePage = generateVuePage(frontends);
|
|
10
|
+
const vuePage = generateVuePage(frontends, editBasePath);
|
|
10
11
|
const pagesDirectory = join(targetDirectory, 'pages');
|
|
11
12
|
mkdirSync(pagesDirectory, { recursive: true });
|
|
12
13
|
const vueFilePath = join(pagesDirectory, 'VueExample.vue');
|
|
13
14
|
writeFileSync(vueFilePath, vuePage, 'utf-8');
|
|
15
|
+
const cssOutputFile = join(stylesIndexesDirectory, 'vue-example.css');
|
|
16
|
+
const vueCSS = generateMarkupCSS('vue', '#42b883');
|
|
17
|
+
writeFileSync(cssOutputFile, vueCSS, 'utf-8');
|
|
14
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getDatabaseEngine: () => Promise<"gel" | "
|
|
1
|
+
export declare const getDatabaseEngine: () => Promise<"gel" | "mariadb" | "mssql" | "mysql" | "postgresql" | "singlestore" | "sqlite" | "mongodb" | "cockroachdb" | undefined>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { DirectoryConfiguration, Frontend } from '../types';
|
|
2
|
-
export declare const getFrontendDirectoryConfigurations: (directoryConfiguration: DirectoryConfiguration, frontends: Frontend[], passedFrontendDirectories: Partial<Record<Frontend, string>> | undefined) => Promise<Partial<Record<"react" | "html" | "svelte" | "vue" | "htmx", string>>>;
|
|
2
|
+
export declare const getFrontendDirectoryConfigurations: (directoryConfiguration: DirectoryConfiguration, frontends: Frontend[], passedFrontendDirectories: Partial<Record<Frontend, string>> | undefined) => Promise<Partial<Record<"react" | "html" | "svelte" | "vue" | "htmx" | "angular", string>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getFrontends: () => Promise<("react" | "html" | "svelte" | "vue" | "htmx")[]>;
|
|
1
|
+
export declare const getFrontends: () => Promise<("react" | "html" | "svelte" | "vue" | "htmx" | "angular")[]>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { multiselect, isCancel } from '@clack/prompts';
|
|
2
|
-
import { frontendLabels } from '../data';
|
|
2
|
+
import { availableFrontends, frontendLabels } from '../data';
|
|
3
3
|
import { isFrontend } from '../typeGuards';
|
|
4
4
|
import { abort } from '../utils/abort';
|
|
5
5
|
export const getFrontends = async () => {
|
|
6
6
|
const frontends = await multiselect({
|
|
7
7
|
message: 'Frontend(s) (space to select, enter to finish):',
|
|
8
|
-
options:
|
|
9
|
-
label,
|
|
8
|
+
options: availableFrontends.map((value) => ({
|
|
9
|
+
label: frontendLabels[value],
|
|
10
10
|
value
|
|
11
11
|
}))
|
|
12
12
|
});
|
package/dist/scaffold.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { copyFileSync } from 'fs';
|
|
1
|
+
import { copyFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
2
2
|
import { join, dirname } from 'path';
|
|
3
3
|
import { fileURLToPath } from 'url';
|
|
4
4
|
import { formatProject } from './commands/formatProject';
|
|
@@ -66,7 +66,7 @@ export const scaffold = async ({ response: { projectName, codeQualityTool, initi
|
|
|
66
66
|
projectName,
|
|
67
67
|
typesDirectory
|
|
68
68
|
});
|
|
69
|
-
dockerFreshInstall = result
|
|
69
|
+
({ dockerFreshInstall } = result);
|
|
70
70
|
}
|
|
71
71
|
scaffoldFrontends({
|
|
72
72
|
absProviders,
|
|
@@ -81,6 +81,18 @@ export const scaffold = async ({ response: { projectName, codeQualityTool, initi
|
|
|
81
81
|
useHTMLScripts,
|
|
82
82
|
useTailwind
|
|
83
83
|
});
|
|
84
|
+
const utilsDirectory = join(frontendDirectory, 'utils');
|
|
85
|
+
mkdirSync(utilsDirectory, { recursive: true });
|
|
86
|
+
writeFileSync(join(utilsDirectory, 'edenTreaty.ts'), `import { treaty } from '@elysiajs/eden'
|
|
87
|
+
import type { Server } from '../../backend/server'
|
|
88
|
+
|
|
89
|
+
const serverUrl =
|
|
90
|
+
typeof window !== 'undefined'
|
|
91
|
+
? window.location.origin
|
|
92
|
+
: 'http://localhost:3000'
|
|
93
|
+
|
|
94
|
+
export const server = treaty<Server>(serverUrl)
|
|
95
|
+
`);
|
|
84
96
|
if (installDependenciesNow) {
|
|
85
97
|
await installDependencies(packageManager, projectName);
|
|
86
98
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="a" x1="64" y1="128" x2="64" y2="0" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop offset="0" stop-color="#e40035"/>
|
|
5
|
+
<stop offset=".24" stop-color="#f60a48"/>
|
|
6
|
+
<stop offset=".352" stop-color="#f20755"/>
|
|
7
|
+
<stop offset=".494" stop-color="#dc087d"/>
|
|
8
|
+
<stop offset=".745" stop-color="#9717e7"/>
|
|
9
|
+
<stop offset="1" stop-color="#6c00f5"/>
|
|
10
|
+
</linearGradient>
|
|
11
|
+
<linearGradient id="b" x1="64" y1="128" x2="64" y2="0" gradientUnits="userSpaceOnUse">
|
|
12
|
+
<stop offset="0" stop-color="#ff31d9" stop-opacity=".8"/>
|
|
13
|
+
<stop offset="1" stop-color="#ff5be1" stop-opacity="0"/>
|
|
14
|
+
</linearGradient>
|
|
15
|
+
</defs>
|
|
16
|
+
<path fill="url(#a)" d="M7.9 89.9 3.5 21.3 49.7 0ZM124.5 21.3 120.1 89.9 78.3 0ZM64 34.1 80.5 74.3 47.5 74.3ZM95.5 110 64 128 32.5 110 38.9 94.5 89.2 94.5Z"/>
|
|
17
|
+
<path fill="url(#b)" d="M7.9 89.9 3.5 21.3 49.7 0ZM124.5 21.3 120.1 89.9 78.3 0ZM64 34.1 80.5 74.3 47.5 74.3ZM95.5 110 64 128 32.5 110 38.9 94.5 89.2 94.5Z"/>
|
|
18
|
+
</svg>
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
/* Visit https://aka.ms/tsconfig to read more about this file */
|
|
4
|
-
|
|
5
|
-
/* Projects */
|
|
6
|
-
"incremental": true,
|
|
7
|
-
"tsBuildInfoFile": ".absolutejs/tsconfig.tsbuildinfo",
|
|
8
3
|
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
9
4
|
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
|
10
5
|
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
@@ -50,9 +45,13 @@
|
|
|
50
45
|
/* Interop Constraints */
|
|
51
46
|
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
|
52
47
|
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
53
|
-
"esModuleInterop": true, // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node.
|
|
54
|
-
/* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ "forceConsistentCasingInFileNames": true, // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment.
|
|
55
|
-
/*
|
|
48
|
+
"esModuleInterop": true, // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */,
|
|
49
|
+
/* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ "forceConsistentCasingInFileNames": true, // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
|
|
50
|
+
/* Visit https://aka.ms/tsconfig to read more about this file */
|
|
51
|
+
|
|
52
|
+
/* Projects */
|
|
53
|
+
"incremental": true,
|
|
54
|
+
/* Ensure that casing is correct in imports. */ "jsx": "react-jsx", // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */,
|
|
56
55
|
/* Specify what JSX code is generated. */ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
57
56
|
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
|
58
57
|
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
@@ -62,8 +61,8 @@
|
|
|
62
61
|
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
63
62
|
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
64
63
|
/* Modules */
|
|
65
|
-
"module": "ESNext", // "rootDir": "./", /* Specify the root folder within your source files.
|
|
66
|
-
/* Specify what module code is generated. */ "moduleResolution": "bundler", // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type.
|
|
64
|
+
"module": "ESNext", // "rootDir": "./", /* Specify the root folder within your source files. */,
|
|
65
|
+
/* Specify what module code is generated. */ "moduleResolution": "bundler", // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */,
|
|
67
66
|
/* Specify how TypeScript looks up a file from a given module specifier. */ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
|
68
67
|
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
69
68
|
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
|
@@ -76,7 +75,7 @@
|
|
|
76
75
|
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
77
76
|
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
78
77
|
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
79
|
-
"noUncheckedIndexedAccess": true, // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier.
|
|
78
|
+
"noUncheckedIndexedAccess": true, // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */,
|
|
80
79
|
/* Add 'undefined' to a type when accessed using an index. */ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
|
81
80
|
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
82
81
|
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
@@ -86,7 +85,8 @@
|
|
|
86
85
|
/* Skip type checking all .d.ts files. */ "strict": true /* Visit https://aka.ms/tsconfig to read more about this file */,
|
|
87
86
|
/* Enable all strict type-checking options. */ /* Projects */
|
|
88
87
|
/* Language and Environment */
|
|
89
|
-
"target": "ESNext"
|
|
88
|
+
"target": "ESNext",
|
|
89
|
+
"tsBuildInfoFile": ".absolutejs/tsconfig.tsbuildinfo"
|
|
90
90
|
/* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ /* Skip type checking all .d.ts files. */
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -10,16 +10,16 @@ export const App = ({ initialCount }: AppProps) => {
|
|
|
10
10
|
<nav>
|
|
11
11
|
<a href="https://absolutejs.com" target="_blank">
|
|
12
12
|
<img
|
|
13
|
+
alt="AbsoluteJS Logo"
|
|
13
14
|
className="logo"
|
|
14
15
|
src="/assets/png/absolutejs-temp.png"
|
|
15
|
-
alt="AbsoluteJS Logo"
|
|
16
16
|
/>
|
|
17
17
|
</a>
|
|
18
18
|
<a href="https://react.dev/">
|
|
19
19
|
<img
|
|
20
|
+
alt="React Logo"
|
|
20
21
|
className="logo react"
|
|
21
22
|
src="/assets/svg/react.svg"
|
|
22
|
-
alt="React Logo"
|
|
23
23
|
/>
|
|
24
24
|
</a>
|
|
25
25
|
</nav>
|
|
@@ -16,19 +16,19 @@ export const Head = ({
|
|
|
16
16
|
<head>
|
|
17
17
|
<meta charSet="utf-8" />
|
|
18
18
|
<title>{title}</title>
|
|
19
|
-
<meta name="description"
|
|
20
|
-
<meta
|
|
21
|
-
<link rel="icon"
|
|
22
|
-
<link
|
|
19
|
+
<meta content={description} name="description" />
|
|
20
|
+
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
|
21
|
+
<link href={icon} rel="icon" />
|
|
22
|
+
<link href="https://fonts.googleapis.com" rel="preconnect" />
|
|
23
23
|
<link
|
|
24
|
-
rel="preconnect"
|
|
25
|
-
href="https://fonts.gstatic.com"
|
|
26
24
|
crossOrigin="anonymous"
|
|
25
|
+
href="https://fonts.gstatic.com"
|
|
26
|
+
rel="preconnect"
|
|
27
27
|
/>
|
|
28
28
|
<link
|
|
29
29
|
href={`https://fonts.googleapis.com/css2?family=${font}:wght@100..900&display=swap`}
|
|
30
30
|
rel="stylesheet"
|
|
31
31
|
/>
|
|
32
|
-
{cssPath && <link rel="stylesheet"
|
|
32
|
+
{cssPath && <link href={cssPath} rel="stylesheet" type="text/css" />}
|
|
33
33
|
</head>
|
|
34
34
|
);
|
|
@@ -17,18 +17,18 @@ export const OAuthLink = ({
|
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
19
|
<a
|
|
20
|
+
href={provider ? `/oauth2/${provider}/authorization` : undefined}
|
|
20
21
|
style={{
|
|
21
22
|
alignItems: 'center',
|
|
22
23
|
display: 'flex',
|
|
23
24
|
gap: '0.5rem'
|
|
24
25
|
}}
|
|
25
|
-
href={provider ? `/oauth2/${provider}/authorization` : undefined}
|
|
26
26
|
>
|
|
27
27
|
{provider ? (
|
|
28
28
|
<img
|
|
29
|
-
style={{ height: '2rem', width: '2rem' }}
|
|
30
29
|
alt={`${name} logo`}
|
|
31
30
|
src={logoUrl}
|
|
31
|
+
style={{ height: '2rem', width: '2rem' }}
|
|
32
32
|
/>
|
|
33
33
|
) : (
|
|
34
34
|
<p>Provider not configured</p>
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
export const primaryColor = '#5FBEEB';
|
|
2
|
-
export const secondaryColor = '#35d5a2';
|
|
3
|
-
export const tertiaryColor = '#ff4b91';
|
|
4
|
-
|
|
5
|
-
export const lightPrimaryColor = '#ffffff';
|
|
6
|
-
export const lightSecondaryColor = '#f5f5f5';
|
|
7
|
-
export const lightTertiaryColor = '#e0e0e0';
|
|
8
|
-
|
|
9
1
|
export const darkPrimaryColor = '#1a1a1a';
|
|
10
2
|
export const darkSecondaryColor = '#2c2c2c';
|
|
11
3
|
export const darkTertiaryColor = '#3c3c3c';
|
|
4
|
+
export const lightPrimaryColor = '#ffffff';
|
|
5
|
+
export const lightSecondaryColor = '#f5f5f5';
|
|
6
|
+
export const lightTertiaryColor = '#e0e0e0';
|
|
7
|
+
export const primaryColor = '#5FBEEB';
|
|
8
|
+
export const secondaryColor = '#35d5a2';
|
|
9
|
+
export const tertiaryColor = '#ff4b91';
|
|
@@ -76,6 +76,16 @@ button:focus-visible {
|
|
|
76
76
|
outline: 4px auto -webkit-focus-ring-color;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
code {
|
|
80
|
+
background-color: rgba(255, 255, 255, 0.08);
|
|
81
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
82
|
+
border-radius: 0.375rem;
|
|
83
|
+
font-family:
|
|
84
|
+
'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
|
|
85
|
+
font-size: 0.875em;
|
|
86
|
+
padding: 0.2rem 0.5rem;
|
|
87
|
+
}
|
|
88
|
+
|
|
79
89
|
@media (max-width: 480px) {
|
|
80
90
|
main {
|
|
81
91
|
padding: 1rem;
|
|
@@ -95,4 +105,9 @@ button:focus-visible {
|
|
|
95
105
|
background-color: #f5f5f5;
|
|
96
106
|
color: #1a1a1a;
|
|
97
107
|
}
|
|
108
|
+
|
|
109
|
+
code {
|
|
110
|
+
background-color: rgba(0, 0, 0, 0.06);
|
|
111
|
+
border-color: rgba(0, 0, 0, 0.1);
|
|
112
|
+
}
|
|
98
113
|
}
|
package/dist/typeGuards.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { AuthOption, AvailableDrizzleDialect, CodeQualityTool, DatabaseEngine, DatabaseHost, Frontend, ORM } from './types';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const isDirectoryConfig: (value: string) => value is "default" | "custom";
|
|
4
|
-
export declare const isDrizzleDialect: (value: string | undefined) => value is AvailableDrizzleDialect;
|
|
5
|
-
export declare const isPrismaDialect: (value: string | undefined) => value is string;
|
|
2
|
+
export declare const isCodeQualityTool: (value: string | undefined) => value is CodeQualityTool;
|
|
6
3
|
export declare const isDatabaseEngine: (value: string | undefined) => value is DatabaseEngine;
|
|
7
4
|
export declare const isDatabaseHost: (value: string | undefined) => value is DatabaseHost;
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
5
|
+
export declare const isDirectoryConfig: (value: string) => value is "default" | "custom";
|
|
6
|
+
export declare const isDrizzleDialect: (value: string | undefined) => value is AvailableDrizzleDialect;
|
|
10
7
|
export declare const isFrontend: (value: string | undefined) => value is Frontend;
|
|
8
|
+
export declare const isORM: (value: string | undefined) => value is ORM;
|
|
9
|
+
export declare const isPrismaDialect: (value: string | undefined) => value is string;
|
|
10
|
+
export declare const isValidAuthOption: (value: string | undefined) => value is AuthOption;
|
package/dist/typeGuards.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { availableDatabaseEngines, availableDatabaseHosts, availableDrizzleDialects, availablePrismaDialects, frontendLabels } from './data';
|
|
2
|
-
export const
|
|
3
|
-
export const isDirectoryConfig = (value) => value === 'default' || value === 'custom';
|
|
4
|
-
export const isDrizzleDialect = (value) => availableDrizzleDialects.some((dialect) => dialect === value);
|
|
5
|
-
export const isPrismaDialect = (value) => availablePrismaDialects.some((dialect) => dialect === value);
|
|
2
|
+
export const isCodeQualityTool = (value) => value === 'eslint+prettier' || value === 'biome' || value === undefined;
|
|
6
3
|
export const isDatabaseEngine = (value) => availableDatabaseEngines.some((engine) => engine === value);
|
|
7
4
|
export const isDatabaseHost = (value) => availableDatabaseHosts.some((host) => host === value);
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
5
|
+
export const isDirectoryConfig = (value) => value === 'default' || value === 'custom';
|
|
6
|
+
export const isDrizzleDialect = (value) => availableDrizzleDialects.some((dialect) => dialect === value);
|
|
10
7
|
export const isFrontend = (value) => value !== undefined && Object.keys(frontendLabels).includes(value);
|
|
8
|
+
export const isORM = (value) => value === 'drizzle' || value === 'prisma' || value === undefined;
|
|
9
|
+
export const isPrismaDialect = (value) => availablePrismaDialects.some((dialect) => dialect === value);
|
|
10
|
+
export const isValidAuthOption = (value) => value === 'abs' || value === 'none' || value === undefined;
|
package/dist/types.d.ts
CHANGED
|
@@ -4,9 +4,12 @@ export type ScaffoldFrontendProps = {
|
|
|
4
4
|
absProviders: ProviderOption[] | undefined;
|
|
5
5
|
assetsDirectory: string;
|
|
6
6
|
authOption: AuthOption;
|
|
7
|
+
editBasePath: string;
|
|
7
8
|
targetDirectory: string;
|
|
8
9
|
templatesDirectory: string;
|
|
9
10
|
projectAssetsDirectory: string;
|
|
11
|
+
stylesDirectory: string;
|
|
12
|
+
stylesIndexesDirectory: string;
|
|
10
13
|
isSingleFrontend: boolean;
|
|
11
14
|
frontends: Frontend[];
|
|
12
15
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare const resolveDockerExe: () => string;
|
|
2
1
|
export declare const hasDocker: () => Promise<boolean>;
|
|
3
2
|
export declare const isDockerDaemonRunning: () => Promise<boolean>;
|
|
3
|
+
export declare const resolveDockerExe: () => "C:\\Program Files\\Docker\\Docker\\resources\\bin\\docker.exe" | "docker";
|
|
4
|
+
export declare const checkDockerInstalled: (databaseEngine?: string) => Promise<{
|
|
5
|
+
freshInstall: boolean;
|
|
6
|
+
}>;
|
|
4
7
|
export declare const ensureDockerDaemonRunning: () => Promise<{
|
|
5
8
|
daemonWasStarted: boolean;
|
|
6
9
|
}>;
|
|
7
10
|
export declare const shutdownDockerDaemon: () => Promise<void>;
|
|
8
|
-
export declare const checkDockerInstalled: (databaseEngine?: string) => Promise<{
|
|
9
|
-
freshInstall: boolean;
|
|
10
|
-
}>;
|