create-absolutejs 0.17.2 → 0.18.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/CHANGELOG.md +12 -0
- package/README.md +37 -4
- package/changelog.json +25 -5
- package/dist/data.d.ts +1 -1
- package/dist/data.js +0 -1
- package/dist/generators/angular/generateAngularPage.d.ts +5 -6
- package/dist/generators/angular/generateAngularPage.js +16 -33
- package/dist/generators/angular/scaffoldAngular.d.ts +1 -1
- package/dist/generators/angular/scaffoldAngular.js +8 -9
- package/dist/generators/configurations/generateDrizzleConfig.js +1 -1
- package/dist/generators/configurations/generateEslintConfig.d.ts +1 -0
- package/dist/generators/configurations/generateEslintConfig.js +47 -255
- package/dist/generators/configurations/generatePackageJson.js +3 -3
- package/dist/generators/db/generateDatabaseTypes.js +18 -25
- package/dist/generators/db/generateDrizzleSchema.js +13 -9
- package/dist/generators/db/generateHandlers.js +3 -2
- package/dist/generators/db/generateRelationalSchema.d.ts +1 -1
- package/dist/generators/db/generateRelationalSchema.js +1 -1
- package/dist/generators/db/handlerTemplates.d.ts +7 -1
- package/dist/generators/db/handlerTemplates.js +7 -2
- package/dist/generators/db/scaffoldDatabase.d.ts +2 -1
- package/dist/generators/db/scaffoldDatabase.js +8 -6
- package/dist/generators/db/scaffoldDocker.d.ts +2 -1
- package/dist/generators/db/scaffoldDocker.js +5 -3
- package/dist/generators/htmx/scaffoldHTMX.js +1 -0
- package/dist/generators/project/generateAbsoluteAuthConfig.d.ts +1 -1
- package/dist/generators/project/generateAbsoluteAuthConfig.js +11 -10
- package/dist/generators/project/generateDBBlock.js +5 -5
- package/dist/generators/project/generateIdentity.d.ts +1 -0
- package/dist/generators/project/generateIdentity.js +15 -0
- package/dist/generators/project/generateImportsBlock.js +4 -9
- package/dist/generators/project/generateRoutesBlock.d.ts +2 -1
- package/dist/generators/project/generateRoutesBlock.js +8 -13
- package/dist/generators/project/generateServer.js +26 -16
- package/dist/generators/project/scaffoldAgentic.d.ts +1 -1
- package/dist/generators/project/scaffoldAgentic.js +45 -45
- package/dist/generators/project/scaffoldBackend.js +4 -9
- package/dist/generators/react/scaffoldReact.js +2 -2
- package/dist/index.js +0 -0
- package/dist/prompt.js +3 -2
- package/dist/questions/authOption.js +1 -1
- package/dist/questions/databaseEngine.d.ts +1 -1
- package/dist/questions/orm.js +2 -5
- package/dist/scaffold.d.ts +2 -1
- package/dist/scaffold.js +16 -5
- package/dist/templates/configurations/eslint.config.example.mjs +43 -238
- package/dist/templates/htmx/LICENSE +13 -0
- package/dist/templates/htmx/htmx.2.0.11.min.js +1 -0
- package/dist/utils/abort.d.ts +1 -1
- package/dist/utils/abort.js +2 -4
- package/dist/utils/getPackageVersion.js +7 -2
- package/dist/utils/parseCommandLineOptions.js +7 -15
- package/dist/utils/registryChannel.d.ts +2 -0
- package/dist/utils/registryChannel.js +20 -0
- package/dist/versions.d.ts +67 -66
- package/dist/versions.js +67 -66
- package/package.json +26 -23
- package/dist/templates/htmx/htmx.2.0.6.min.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,18 @@ This file is generated by `absolute-changelog` from the entries in
|
|
|
6
6
|
`changelog/`. Edit an entry, not this file — and add new ones under
|
|
7
7
|
`changelog/unreleased/`.
|
|
8
8
|
|
|
9
|
+
## 0.18.0 — 2026-09-23
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Update registry dependency pins and generate compatible Elysia 2, Drizzle 1, Angular and HTMX starters with persistent auth, typed JSON subapps, and executable starter checks**
|
|
14
|
+
|
|
15
|
+
## 0.17.3 — 2026-09-22
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **Generate correctness-focused lint defaults with typed Drizzle checks and isolated Eden API subapps; consume eslint-plugin-absolute 0.12.0**
|
|
20
|
+
|
|
9
21
|
## 0.17.2 — 2026-09-22
|
|
10
22
|
|
|
11
23
|
### Fixed
|
package/README.md
CHANGED
|
@@ -74,13 +74,13 @@ Usage: create-absolute [project-name] [options]
|
|
|
74
74
|
Output directory for build artifacts.
|
|
75
75
|
|
|
76
76
|
- `--db <engine|none>`
|
|
77
|
-
Database engine (`postgresql` | `mysql` | `sqlite` | `mongodb` | `
|
|
77
|
+
Database engine (`postgresql` | `mysql` | `mariadb` | `sqlite` | `mongodb` | `gel` | `singlestore` | `cockroachdb` | `mssql`) or `none`.
|
|
78
78
|
|
|
79
79
|
- `--db-dir <directory>`
|
|
80
80
|
Directory name for your database files.
|
|
81
81
|
|
|
82
82
|
- `--db-host <provider|none>`
|
|
83
|
-
Database host provider (`neon` | `planetscale` | `
|
|
83
|
+
Database host provider (`neon` | `planetscale` | `turso`) or `none`.
|
|
84
84
|
|
|
85
85
|
- `--directory <default|custom>`
|
|
86
86
|
Directory-naming strategy: `default` or `custom`.
|
|
@@ -112,8 +112,8 @@ Usage: create-absolute [project-name] [options]
|
|
|
112
112
|
- `--lts`
|
|
113
113
|
Use LTS versions of required packages.
|
|
114
114
|
|
|
115
|
-
- `--orm <drizzle|
|
|
116
|
-
ORM to configure: `drizzle` | `
|
|
115
|
+
- `--orm <drizzle|none>`
|
|
116
|
+
ORM to configure: `drizzle` | `none`. Prisma scaffolding is not implemented and is rejected before files are written. Drizzle 1 no longer includes the Gel dialect; choose no ORM for Gel.
|
|
117
117
|
|
|
118
118
|
- `--plugin <plugin>`
|
|
119
119
|
Elysia plugin(s) to include (repeatable); `none` skips plugin setup. Select
|
|
@@ -191,3 +191,36 @@ Contributions are welcome! Feel free to open issues or submit pull requests to i
|
|
|
191
191
|
## License
|
|
192
192
|
|
|
193
193
|
**Business Source License 1.1 (BSL-1.1)** – see [`LICENSE`](./LICENSE) for details.
|
|
194
|
+
|
|
195
|
+
## Scaffold compatibility and verification
|
|
196
|
+
|
|
197
|
+
The CLI pins published registry versions; it does not install local package links.
|
|
198
|
+
The compatibility policy in `src/utils/registryChannel.ts` also applies when
|
|
199
|
+
resolving versions at creation time, so npm's older `latest` tag cannot silently
|
|
200
|
+
switch a generated server back to Elysia 1.
|
|
201
|
+
|
|
202
|
+
- AbsoluteJS uses its current 0.20 beta channel.
|
|
203
|
+
- Elysia remains at 2.0.0-beta.6 and OpenAPI at 2.0.0-beta.2: the published
|
|
204
|
+
authentication/plugin contracts still rely on `ElysiaStatus.code`, which later
|
|
205
|
+
Elysia betas changed. Upgrading these requires a coordinated SDK migration.
|
|
206
|
+
- TypeScript 5.9.3 and Angular's current 21 LTS patches match the framework's
|
|
207
|
+
compiler peer dependencies. Newer incompatible compiler majors are not selected.
|
|
208
|
+
- Drizzle ORM and Kit use the coordinated 1.0 release-candidate channel.
|
|
209
|
+
- All other pins are checked against their latest published release channel.
|
|
210
|
+
|
|
211
|
+
Automatic authentication setup currently supplies a complete Google configuration
|
|
212
|
+
and requires a persistent database. Configure other login providers explicitly
|
|
213
|
+
using `@absolutejs/auth` after creation; the CLI rejects unsupported automatic
|
|
214
|
+
provider configurations instead of silently omitting them. Auth sessions are
|
|
215
|
+
in-memory by default; configure a shared session store for multi-instance hosting.
|
|
216
|
+
|
|
217
|
+
`bun run check-versions` checks every scaffold pin against that policy.
|
|
218
|
+
`bun run check:package` runs typechecking, unit tests, compilation and release
|
|
219
|
+
metadata validation. `bun run test:starters` scaffolds representative frontend,
|
|
220
|
+
plugin, database and agentic combinations into a temporary directory, installs
|
|
221
|
+
real registry dependencies, and checks TypeScript and ESLint. SQLite cases also
|
|
222
|
+
exercise generated HTTP validation and persistence using an isolated database.
|
|
223
|
+
The matrix creates Docker configuration files but does not start containers or
|
|
224
|
+
connect to paid providers. Use `SCAFFOLD_CHECK_CASES=sqlite-auth,all-frontends` to
|
|
225
|
+
select cases. Hosted database credentials and real OAuth acceptance are separate
|
|
226
|
+
integration checks, not implied by this matrix.
|
package/changelog.json
CHANGED
|
@@ -3,24 +3,44 @@
|
|
|
3
3
|
"name": "create-absolutejs",
|
|
4
4
|
"releases": [
|
|
5
5
|
{
|
|
6
|
-
"
|
|
6
|
+
"changes": [
|
|
7
|
+
{
|
|
8
|
+
"kind": "fixed",
|
|
9
|
+
"summary": "Update registry dependency pins and generate compatible Elysia 2, Drizzle 1, Angular and HTMX starters with persistent auth, typed JSON subapps, and executable starter checks"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"date": "2026-09-23",
|
|
13
|
+
"version": "0.18.0"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"changes": [
|
|
17
|
+
{
|
|
18
|
+
"kind": "fixed",
|
|
19
|
+
"summary": "Generate correctness-focused lint defaults with typed Drizzle checks and isolated Eden API subapps; consume eslint-plugin-absolute 0.12.0"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
7
22
|
"date": "2026-09-22",
|
|
23
|
+
"version": "0.17.3"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
8
26
|
"changes": [
|
|
9
27
|
{
|
|
10
28
|
"kind": "fixed",
|
|
11
29
|
"summary": "Use the Elysia 2 error lifecycle verified against a fresh generated project"
|
|
12
30
|
}
|
|
13
|
-
]
|
|
31
|
+
],
|
|
32
|
+
"date": "2026-09-22",
|
|
33
|
+
"version": "0.17.2"
|
|
14
34
|
},
|
|
15
35
|
{
|
|
16
|
-
"version": "0.17.1",
|
|
17
|
-
"date": "2026-09-22",
|
|
18
36
|
"changes": [
|
|
19
37
|
{
|
|
20
38
|
"kind": "fixed",
|
|
21
39
|
"summary": "Generate the Elysia 2 onError lifecycle instead of an unsupported on error hook"
|
|
22
40
|
}
|
|
23
|
-
]
|
|
41
|
+
],
|
|
42
|
+
"date": "2026-09-22",
|
|
43
|
+
"version": "0.17.1"
|
|
24
44
|
}
|
|
25
45
|
]
|
|
26
46
|
}
|
package/dist/data.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const availableCodeQualityTools: readonly ["eslint+prettier", "bi
|
|
|
5
5
|
export declare const availableDatabaseEngines: readonly ["postgresql", "mysql", "sqlite", "mongodb", "mariadb", "gel", "singlestore", "cockroachdb", "mssql", "none"];
|
|
6
6
|
export declare const availableDatabaseHosts: readonly ["neon", "planetscale", "turso", "none"];
|
|
7
7
|
export declare const availableDirectoryConfigurations: readonly ["default", "custom"];
|
|
8
|
-
export declare const availableDrizzleDialects: readonly ["
|
|
8
|
+
export declare const availableDrizzleDialects: readonly ["mariadb", "mssql", "mysql", "postgresql", "singlestore", "sqlite"];
|
|
9
9
|
export declare const availableFrontends: readonly ["react", "html", "svelte", "vue", "htmx", "angular"];
|
|
10
10
|
export declare const availableORMs: readonly ["drizzle", "prisma", "none"];
|
|
11
11
|
export declare const availablePlugins: AvailableDependency[];
|
package/dist/data.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Frontend } from '../../types';
|
|
2
|
-
export declare const generateAngularPage: (
|
|
2
|
+
export declare const generateAngularPage: (includeExamples: boolean) => "import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nexport type Context = {\n\tinitialCount: number;\n};\n\n@Component({\n\timports: [CommonModule],\n\tselector: 'angular-page',\n\tstandalone: true,\n\ttemplateUrl: '../templates/angular-example.html'\n})\nexport class AngularExampleComponent {}\n\nexport const factory = () => AngularExampleComponent;\n" | "import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { usePageContext } from '@absolutejs/absolute/angular';\nimport { DropdownComponent } from '../components/dropdown.component';\nimport { AppComponent } from '../components/app.component';\n\n\nexport type Context = {\n\tinitialCount: number;\n};\n\n@Component({\n\timports: [CommonModule, DropdownComponent, AppComponent],\n\tselector: 'angular-page',\n\tstandalone: true,\n\ttemplateUrl: '../templates/angular-example.html'\n})\nexport class AngularExampleComponent {\n\tinitialCount = usePageContext<Context>().initialCount;\n}\n\nexport const factory = () => AngularExampleComponent;\n";
|
|
3
3
|
export declare const generateAngularPageHtml: (includeExamples: boolean) => "<main></main>\n" | "<header>\n\t<a href=\"/\">AbsoluteJS</a>\n\t<app-dropdown></app-dropdown>\n</header>\n<app-root [initialCount]=\"initialCount\"></app-root>\n";
|
|
4
|
-
export declare const generateAppComponent: (
|
|
5
|
-
export declare const generateAppComponentCss: () => string;
|
|
4
|
+
export declare const generateAppComponent: () => string;
|
|
6
5
|
export declare const generateAppComponentHtml: (frontends: Frontend[], editBasePath: string) => string;
|
|
7
|
-
export declare const generateCounterComponent: (
|
|
8
|
-
export declare const generateCounterComponentHtml: () => string;
|
|
6
|
+
export declare const generateCounterComponent: (stylesRelativeDirectory: string) => string;
|
|
9
7
|
export declare const generateCounterComponentCss: () => string;
|
|
10
|
-
export declare const
|
|
8
|
+
export declare const generateCounterComponentHtml: () => string;
|
|
9
|
+
export declare const generateDropdownComponent: () => string;
|
|
11
10
|
export declare const generateDropdownComponentHtml: (frontends: Frontend[]) => string;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { formatNavLink } from '../../utils/formatNavLink';
|
|
2
|
-
|
|
3
|
-
export const generateAngularPage = (_frontends, includeExamples) => {
|
|
2
|
+
export const generateAngularPage = (includeExamples) => {
|
|
4
3
|
if (!includeExamples)
|
|
5
4
|
return `import { Component } from '@angular/core';
|
|
6
5
|
import { CommonModule } from '@angular/common';
|
|
7
|
-
import { defineAngularPage } from '@absolutejs/absolute/angular';
|
|
8
6
|
|
|
9
|
-
type
|
|
7
|
+
export type Context = {
|
|
10
8
|
initialCount: number;
|
|
11
9
|
};
|
|
12
10
|
|
|
@@ -18,19 +16,16 @@ type AngularPageProps = {
|
|
|
18
16
|
})
|
|
19
17
|
export class AngularExampleComponent {}
|
|
20
18
|
|
|
21
|
-
export const
|
|
22
|
-
component: AngularExampleComponent
|
|
23
|
-
});
|
|
19
|
+
export const factory = () => AngularExampleComponent;
|
|
24
20
|
`;
|
|
25
|
-
return `import { Component
|
|
21
|
+
return `import { Component } from '@angular/core';
|
|
26
22
|
import { CommonModule } from '@angular/common';
|
|
27
|
-
import {
|
|
23
|
+
import { usePageContext } from '@absolutejs/absolute/angular';
|
|
28
24
|
import { DropdownComponent } from '../components/dropdown.component';
|
|
29
25
|
import { AppComponent } from '../components/app.component';
|
|
30
26
|
|
|
31
|
-
export const INITIAL_COUNT = new InjectionToken<number>('INITIAL_COUNT');
|
|
32
27
|
|
|
33
|
-
type
|
|
28
|
+
export type Context = {
|
|
34
29
|
initialCount: number;
|
|
35
30
|
};
|
|
36
31
|
|
|
@@ -41,17 +36,10 @@ type AngularPageProps = {
|
|
|
41
36
|
templateUrl: '../templates/angular-example.html'
|
|
42
37
|
})
|
|
43
38
|
export class AngularExampleComponent {
|
|
44
|
-
initialCount
|
|
45
|
-
|
|
46
|
-
constructor() {
|
|
47
|
-
const initialCountToken = inject(INITIAL_COUNT, { optional: true });
|
|
48
|
-
this.initialCount = initialCountToken ?? 0;
|
|
49
|
-
}
|
|
39
|
+
initialCount = usePageContext<Context>().initialCount;
|
|
50
40
|
}
|
|
51
41
|
|
|
52
|
-
export const
|
|
53
|
-
component: AngularExampleComponent
|
|
54
|
-
});
|
|
42
|
+
export const factory = () => AngularExampleComponent;
|
|
55
43
|
`;
|
|
56
44
|
};
|
|
57
45
|
export const generateAngularPageHtml = (includeExamples) => {
|
|
@@ -64,7 +52,7 @@ export const generateAngularPageHtml = (includeExamples) => {
|
|
|
64
52
|
<app-root [initialCount]="initialCount"></app-root>
|
|
65
53
|
`;
|
|
66
54
|
};
|
|
67
|
-
export const generateAppComponent = (
|
|
55
|
+
export const generateAppComponent = () => `import { Component, Input, ViewEncapsulation } from '@angular/core';
|
|
68
56
|
import { CommonModule } from '@angular/common';
|
|
69
57
|
import { CounterComponent } from './counter.component';
|
|
70
58
|
|
|
@@ -73,14 +61,12 @@ import { CounterComponent } from './counter.component';
|
|
|
73
61
|
standalone: true,
|
|
74
62
|
imports: [CommonModule, CounterComponent],
|
|
75
63
|
templateUrl: '../templates/app.component.html',
|
|
76
|
-
styleUrl: '${isSingleFrontend ? '../' : '../../'}styles/app.component.css',
|
|
77
64
|
encapsulation: ViewEncapsulation.None
|
|
78
65
|
})
|
|
79
66
|
export class AppComponent {
|
|
80
67
|
@Input() initialCount: number = 0;
|
|
81
68
|
}
|
|
82
69
|
`;
|
|
83
|
-
export const generateAppComponentCss = () => ``;
|
|
84
70
|
export const generateAppComponentHtml = (frontends, editBasePath) => {
|
|
85
71
|
const exploreBlock = frontends.length > 1
|
|
86
72
|
? `\n\t<p style="margin-top: 2rem">\n\t\tExplore the other pages to see multiple frameworks running\n\t\ttogether.\n\t</p>`
|
|
@@ -114,7 +100,7 @@ export const generateAppComponentHtml = (frontends, editBasePath) => {
|
|
|
114
100
|
</main>
|
|
115
101
|
`;
|
|
116
102
|
};
|
|
117
|
-
export const generateCounterComponent = (
|
|
103
|
+
export const generateCounterComponent = (stylesRelativeDirectory) => `import { Component, Input } from '@angular/core';
|
|
118
104
|
import { CommonModule } from '@angular/common';
|
|
119
105
|
|
|
120
106
|
@Component({
|
|
@@ -122,7 +108,7 @@ import { CommonModule } from '@angular/common';
|
|
|
122
108
|
standalone: true,
|
|
123
109
|
imports: [CommonModule],
|
|
124
110
|
templateUrl: '../templates/counter.component.html',
|
|
125
|
-
styleUrl: '${
|
|
111
|
+
styleUrl: '${stylesRelativeDirectory}/counter.component.css'
|
|
126
112
|
})
|
|
127
113
|
export class CounterComponent {
|
|
128
114
|
@Input() initialCount: number = 0;
|
|
@@ -137,10 +123,6 @@ export class CounterComponent {
|
|
|
137
123
|
}
|
|
138
124
|
}
|
|
139
125
|
`;
|
|
140
|
-
export const generateCounterComponentHtml = () => `<button (click)="increment()">
|
|
141
|
-
count is <span class="counter-value">{{ count }}</span>
|
|
142
|
-
</button>
|
|
143
|
-
`;
|
|
144
126
|
export const generateCounterComponentCss = () => `button {
|
|
145
127
|
background-color: #1a1a1a;
|
|
146
128
|
border: 1px solid transparent;
|
|
@@ -168,9 +150,11 @@ button:focus-visible {
|
|
|
168
150
|
}
|
|
169
151
|
}
|
|
170
152
|
`;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
153
|
+
export const generateCounterComponentHtml = () => `<button (click)="increment()">
|
|
154
|
+
count is <span class="counter-value">{{ count }}</span>
|
|
155
|
+
</button>
|
|
156
|
+
`;
|
|
157
|
+
export const generateDropdownComponent = () => `import { Component } from '@angular/core';
|
|
174
158
|
import { CommonModule } from '@angular/common';
|
|
175
159
|
|
|
176
160
|
@Component({
|
|
@@ -183,7 +167,6 @@ export class DropdownComponent {
|
|
|
183
167
|
isOpen = false;
|
|
184
168
|
}
|
|
185
169
|
`;
|
|
186
|
-
};
|
|
187
170
|
export const generateDropdownComponentHtml = (frontends) => {
|
|
188
171
|
const navLinks = frontends.map(formatNavLink).join('\n\t\t');
|
|
189
172
|
return `<details
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ScaffoldFrontendProps } from '../../types';
|
|
2
|
-
export declare const scaffoldAngular: ({ editBasePath, includeExamples,
|
|
2
|
+
export declare const scaffoldAngular: ({ editBasePath, includeExamples, targetDirectory, frontends, templatesDirectory, projectAssetsDirectory, stylesDirectory, stylesIndexesDirectory }: ScaffoldFrontendProps) => void;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { copyFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
2
|
-
import { join } from 'path';
|
|
2
|
+
import { join, relative } from 'path';
|
|
3
3
|
import { generateMarkupCSS } from '../project/generateMarkupCSS';
|
|
4
|
-
import { generateAngularPage, generateAngularPageHtml, generateAppComponent,
|
|
5
|
-
export const scaffoldAngular = ({ editBasePath, includeExamples,
|
|
4
|
+
import { generateAngularPage, generateAngularPageHtml, generateAppComponent, generateAppComponentHtml, generateCounterComponent, generateCounterComponentCss, generateCounterComponentHtml, generateDropdownComponent, generateDropdownComponentHtml } from './generateAngularPage';
|
|
5
|
+
export const scaffoldAngular = ({ editBasePath, includeExamples, targetDirectory, frontends, templatesDirectory, projectAssetsDirectory, stylesDirectory, stylesIndexesDirectory }) => {
|
|
6
6
|
const pagesDirectory = join(targetDirectory, 'pages');
|
|
7
7
|
const templatesDir = join(targetDirectory, 'templates');
|
|
8
8
|
if (!includeExamples) {
|
|
9
9
|
mkdirSync(pagesDirectory, { recursive: true });
|
|
10
10
|
mkdirSync(templatesDir, { recursive: true });
|
|
11
|
-
writeFileSync(join(pagesDirectory, 'angular-example.ts'), generateAngularPage(
|
|
11
|
+
writeFileSync(join(pagesDirectory, 'angular-example.ts'), generateAngularPage(false), 'utf-8');
|
|
12
12
|
writeFileSync(join(templatesDir, 'angular-example.html'), generateAngularPageHtml(false), 'utf-8');
|
|
13
13
|
writeFileSync(join(stylesIndexesDirectory, 'angular-example.css'), `@import url('../reset.css');\n\nangular-page {\n\tdisplay: flex;\n\tflex: 1;\n\tflex-direction: column;\n}\n`, 'utf-8');
|
|
14
14
|
return;
|
|
@@ -18,14 +18,13 @@ export const scaffoldAngular = ({ editBasePath, includeExamples, isSingleFronten
|
|
|
18
18
|
mkdirSync(componentsDirectory, { recursive: true });
|
|
19
19
|
mkdirSync(pagesDirectory, { recursive: true });
|
|
20
20
|
mkdirSync(templatesDir, { recursive: true });
|
|
21
|
-
writeFileSync(join(pagesDirectory, 'angular-example.ts'), generateAngularPage(
|
|
21
|
+
writeFileSync(join(pagesDirectory, 'angular-example.ts'), generateAngularPage(true), 'utf-8');
|
|
22
22
|
writeFileSync(join(templatesDir, 'angular-example.html'), generateAngularPageHtml(true), 'utf-8');
|
|
23
|
-
writeFileSync(join(componentsDirectory, 'dropdown.component.ts'), generateDropdownComponent(
|
|
23
|
+
writeFileSync(join(componentsDirectory, 'dropdown.component.ts'), generateDropdownComponent(), 'utf-8');
|
|
24
24
|
writeFileSync(join(templatesDir, 'dropdown.component.html'), generateDropdownComponentHtml(frontends), 'utf-8');
|
|
25
|
-
writeFileSync(join(componentsDirectory, 'app.component.ts'), generateAppComponent(
|
|
25
|
+
writeFileSync(join(componentsDirectory, 'app.component.ts'), generateAppComponent(), 'utf-8');
|
|
26
26
|
writeFileSync(join(templatesDir, 'app.component.html'), generateAppComponentHtml(frontends, editBasePath), 'utf-8');
|
|
27
|
-
writeFileSync(join(
|
|
28
|
-
writeFileSync(join(componentsDirectory, 'counter.component.ts'), generateCounterComponent(isSingleFrontend), 'utf-8');
|
|
27
|
+
writeFileSync(join(componentsDirectory, 'counter.component.ts'), generateCounterComponent(relative(componentsDirectory, stylesDirectory).replaceAll('\\', '/')), 'utf-8');
|
|
29
28
|
writeFileSync(join(templatesDir, 'counter.component.html'), generateCounterComponentHtml(), 'utf-8');
|
|
30
29
|
writeFileSync(join(stylesDirectory, 'counter.component.css'), generateCounterComponentCss(), 'utf-8');
|
|
31
30
|
const angularCSS = generateMarkupCSS('angular', '#dd0031');
|
|
@@ -12,7 +12,7 @@ export const createDrizzleConfig = ({ projectName, databaseDirectory, databaseEn
|
|
|
12
12
|
dbCredentials: {
|
|
13
13
|
url: env.DATABASE_URL
|
|
14
14
|
},
|
|
15
|
-
dialect: '${databaseEngine}',
|
|
15
|
+
dialect: '${databaseEngine === 'mariadb' ? 'mysql' : databaseEngine}',
|
|
16
16
|
out: '${databaseDirectory}/migrations',
|
|
17
17
|
schema: '${databaseDirectory}/schema.ts'
|
|
18
18
|
});
|