@dartix-software-solutions/create-fullstack-app 2.0.14 → 2.0.16
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/bin/create-fullstack-app.js +1 -1
- package/dist/{chunk-JQDTKR4K.js → chunk-B3RRUSWS.js} +20 -13
- package/dist/devtools/eslint/file-map.js +36 -2
- package/dist/devtools/prettier/file-map.js +36 -2
- package/dist/forms/formik/templates/components/SampleForm.tsx.hbs +16 -8
- package/dist/index.js +1 -1
- package/dist/styling/web/tailwind/meta.js +3 -3
- package/dist/styling/web/tailwind/templates/globals.css.hbs +1 -3
- package/dist/styling/web/tailwind/templates/postcss.config.js.hbs +2 -3
- package/dist/styling/web/tailwind/templates/tailwind.config.ts.hbs +1 -1
- package/package.json +1 -1
|
@@ -3022,37 +3022,44 @@ function inferTargetFromPluginOutputs(plugin, context) {
|
|
|
3022
3022
|
}
|
|
3023
3023
|
|
|
3024
3024
|
// src/generator/script-builder.ts
|
|
3025
|
-
function buildScripts2(plugins, packageJsonTargets,
|
|
3025
|
+
function buildScripts2(plugins, packageJsonTargets, context) {
|
|
3026
3026
|
const result = /* @__PURE__ */ new Map();
|
|
3027
3027
|
for (const target of packageJsonTargets) {
|
|
3028
3028
|
result.set(target.path, {});
|
|
3029
3029
|
}
|
|
3030
3030
|
for (const plugin of plugins) {
|
|
3031
3031
|
for (const scriptEntry of plugin.meta.scripts) {
|
|
3032
|
-
const
|
|
3033
|
-
if (
|
|
3032
|
+
const targetPaths = findTargetPaths(scriptEntry.target, packageJsonTargets, context);
|
|
3033
|
+
if (targetPaths.length === 0) {
|
|
3034
3034
|
logger.warn(
|
|
3035
3035
|
`Could not resolve target for script "${scriptEntry.name}" from plugin "${plugin.meta.id}" (target: ${scriptEntry.target})`
|
|
3036
3036
|
);
|
|
3037
3037
|
continue;
|
|
3038
3038
|
}
|
|
3039
|
-
const
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3039
|
+
for (const targetPath of targetPaths) {
|
|
3040
|
+
const scripts = result.get(targetPath);
|
|
3041
|
+
if (!scripts) continue;
|
|
3042
|
+
if (scripts[scriptEntry.name]) {
|
|
3043
|
+
logger.warn(
|
|
3044
|
+
`Script name collision: "${scriptEntry.name}" in ${targetPath} (existing from another plugin, overwriting with ${plugin.meta.id})`
|
|
3045
|
+
);
|
|
3046
|
+
}
|
|
3047
|
+
scripts[scriptEntry.name] = scriptEntry.command;
|
|
3045
3048
|
}
|
|
3046
|
-
scripts[scriptEntry.name] = scriptEntry.command;
|
|
3047
3049
|
}
|
|
3048
3050
|
}
|
|
3049
3051
|
return result;
|
|
3050
3052
|
}
|
|
3051
|
-
function
|
|
3053
|
+
function findTargetPaths(target, packageJsonTargets, context) {
|
|
3052
3054
|
const match = packageJsonTargets.find((t) => t.target === target);
|
|
3053
|
-
if (match) return match.path;
|
|
3055
|
+
if (match) return [match.path];
|
|
3056
|
+
if (target === TARGETS.ROOT && context.isSingleApp && context.isFullstack) {
|
|
3057
|
+
const frontend = packageJsonTargets.find((t) => t.target === TARGETS.FRONTEND)?.path;
|
|
3058
|
+
const backend = packageJsonTargets.find((t) => t.target === TARGETS.BACKEND)?.path;
|
|
3059
|
+
return [frontend, backend].filter((p) => Boolean(p));
|
|
3060
|
+
}
|
|
3054
3061
|
const root = packageJsonTargets.find((t) => t.target === TARGETS.ROOT);
|
|
3055
|
-
return root
|
|
3062
|
+
return root ? [root.path] : [];
|
|
3056
3063
|
}
|
|
3057
3064
|
|
|
3058
3065
|
// src/generator/env-builder.ts
|
|
@@ -1,8 +1,42 @@
|
|
|
1
1
|
// src/plugins/devtools/eslint/file-map.ts
|
|
2
2
|
var fileMap = {
|
|
3
3
|
files: [
|
|
4
|
-
{
|
|
5
|
-
|
|
4
|
+
{
|
|
5
|
+
template: "eslint.config.js.hbs",
|
|
6
|
+
outputPath: "eslint.config.js",
|
|
7
|
+
target: "root",
|
|
8
|
+
when: (ctx) => !(ctx.isSingleApp && ctx.isFullstack)
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
template: ".eslintignore.hbs",
|
|
12
|
+
outputPath: ".eslintignore",
|
|
13
|
+
target: "root",
|
|
14
|
+
when: (ctx) => !(ctx.isSingleApp && ctx.isFullstack)
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
template: "eslint.config.js.hbs",
|
|
18
|
+
outputPath: "eslint.config.js",
|
|
19
|
+
target: "frontend",
|
|
20
|
+
when: (ctx) => ctx.isSingleApp && ctx.isFullstack
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
template: ".eslintignore.hbs",
|
|
24
|
+
outputPath: ".eslintignore",
|
|
25
|
+
target: "frontend",
|
|
26
|
+
when: (ctx) => ctx.isSingleApp && ctx.isFullstack
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
template: "eslint.config.js.hbs",
|
|
30
|
+
outputPath: "eslint.config.js",
|
|
31
|
+
target: "backend",
|
|
32
|
+
when: (ctx) => ctx.isSingleApp && ctx.isFullstack
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
template: ".eslintignore.hbs",
|
|
36
|
+
outputPath: ".eslintignore",
|
|
37
|
+
target: "backend",
|
|
38
|
+
when: (ctx) => ctx.isSingleApp && ctx.isFullstack
|
|
39
|
+
}
|
|
6
40
|
],
|
|
7
41
|
injections: []
|
|
8
42
|
};
|
|
@@ -1,8 +1,42 @@
|
|
|
1
1
|
// src/plugins/devtools/prettier/file-map.ts
|
|
2
2
|
var fileMap = {
|
|
3
3
|
files: [
|
|
4
|
-
{
|
|
5
|
-
|
|
4
|
+
{
|
|
5
|
+
template: ".prettierrc.hbs",
|
|
6
|
+
outputPath: ".prettierrc",
|
|
7
|
+
target: "root",
|
|
8
|
+
when: (ctx) => !(ctx.isSingleApp && ctx.isFullstack)
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
template: ".prettierignore.hbs",
|
|
12
|
+
outputPath: ".prettierignore",
|
|
13
|
+
target: "root",
|
|
14
|
+
when: (ctx) => !(ctx.isSingleApp && ctx.isFullstack)
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
template: ".prettierrc.hbs",
|
|
18
|
+
outputPath: ".prettierrc",
|
|
19
|
+
target: "frontend",
|
|
20
|
+
when: (ctx) => ctx.isSingleApp && ctx.isFullstack
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
template: ".prettierignore.hbs",
|
|
24
|
+
outputPath: ".prettierignore",
|
|
25
|
+
target: "frontend",
|
|
26
|
+
when: (ctx) => ctx.isSingleApp && ctx.isFullstack
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
template: ".prettierrc.hbs",
|
|
30
|
+
outputPath: ".prettierrc",
|
|
31
|
+
target: "backend",
|
|
32
|
+
when: (ctx) => ctx.isSingleApp && ctx.isFullstack
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
template: ".prettierignore.hbs",
|
|
36
|
+
outputPath: ".prettierignore",
|
|
37
|
+
target: "backend",
|
|
38
|
+
when: (ctx) => ctx.isSingleApp && ctx.isFullstack
|
|
39
|
+
}
|
|
6
40
|
],
|
|
7
41
|
injections: []
|
|
8
42
|
};
|
|
@@ -15,16 +15,24 @@ export function SampleForm(): JSX.Element {
|
|
|
15
15
|
}}
|
|
16
16
|
>
|
|
17
17
|
{({ isSubmitting }) => (
|
|
18
|
-
<Form
|
|
19
|
-
<label htmlFor="email">
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
<Form className="grid max-w-sm gap-3">
|
|
19
|
+
<label htmlFor="email" className="text-sm font-medium">
|
|
20
|
+
Email
|
|
21
|
+
</label>
|
|
22
|
+
<Field id="email" name="email" type="email" className="rounded border px-3 py-2" />
|
|
23
|
+
<ErrorMessage name="email" component="small" className="text-sm text-red-600" />
|
|
22
24
|
|
|
23
|
-
<label htmlFor="password">
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
<label htmlFor="password" className="text-sm font-medium">
|
|
26
|
+
Password
|
|
27
|
+
</label>
|
|
28
|
+
<Field id="password" name="password" type="password" className="rounded border px-3 py-2" />
|
|
29
|
+
<ErrorMessage name="password" component="small" className="text-sm text-red-600" />
|
|
26
30
|
|
|
27
|
-
<button
|
|
31
|
+
<button
|
|
32
|
+
type="submit"
|
|
33
|
+
disabled={isSubmitting}
|
|
34
|
+
className="rounded bg-black px-4 py-2 text-white disabled:opacity-60"
|
|
35
|
+
>
|
|
28
36
|
{isSubmitting ? 'Submitting...' : 'Submit'}
|
|
29
37
|
</button>
|
|
30
38
|
</Form>
|
package/dist/index.js
CHANGED
|
@@ -11,9 +11,9 @@ var meta = {
|
|
|
11
11
|
platformSupport: "web-only",
|
|
12
12
|
deps: [],
|
|
13
13
|
devDeps: [
|
|
14
|
-
{ name: "tailwindcss", version: "^
|
|
15
|
-
{ name: "postcss", version: "^
|
|
16
|
-
{ name: "
|
|
14
|
+
{ name: "tailwindcss", version: "^4.1.0" },
|
|
15
|
+
{ name: "@tailwindcss/postcss", version: "^4.1.0" },
|
|
16
|
+
{ name: "postcss", version: "^8.4.49" }
|
|
17
17
|
],
|
|
18
18
|
envVars: [],
|
|
19
19
|
scripts: [],
|