@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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  main
4
- } from "../chunk-JQDTKR4K.js";
4
+ } from "../chunk-B3RRUSWS.js";
5
5
 
6
6
  // src/bin/create-fullstack-app.ts
7
7
  main().catch((error) => {
@@ -3022,37 +3022,44 @@ function inferTargetFromPluginOutputs(plugin, context) {
3022
3022
  }
3023
3023
 
3024
3024
  // src/generator/script-builder.ts
3025
- function buildScripts2(plugins, packageJsonTargets, _context) {
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 targetPath = findTargetPath(scriptEntry.target, packageJsonTargets);
3033
- if (!targetPath) {
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 scripts = result.get(targetPath);
3040
- if (!scripts) continue;
3041
- if (scripts[scriptEntry.name]) {
3042
- logger.warn(
3043
- `Script name collision: "${scriptEntry.name}" in ${targetPath} (existing from another plugin, overwriting with ${plugin.meta.id})`
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 findTargetPath(target, packageJsonTargets) {
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?.path || null;
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
- { template: "eslint.config.js.hbs", outputPath: "eslint.config.js", target: "root" },
5
- { template: ".eslintignore.hbs", outputPath: ".eslintignore", target: "root" }
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
- { template: ".prettierrc.hbs", outputPath: ".prettierrc", target: "root" },
5
- { template: ".prettierignore.hbs", outputPath: ".prettierignore", target: "root" }
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 style={{ display: 'grid', gap: 12, maxWidth: 360 }}>
19
- <label htmlFor="email">Email</label>
20
- <Field id="email" name="email" type="email" />
21
- <ErrorMessage name="email" component="small" />
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">Password</label>
24
- <Field id="password" name="password" type="password" />
25
- <ErrorMessage name="password" component="small" />
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 type="submit" disabled={isSubmitting}>
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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  main
3
- } from "./chunk-JQDTKR4K.js";
3
+ } from "./chunk-B3RRUSWS.js";
4
4
  export {
5
5
  main
6
6
  };
@@ -11,9 +11,9 @@ var meta = {
11
11
  platformSupport: "web-only",
12
12
  deps: [],
13
13
  devDeps: [
14
- { name: "tailwindcss", version: "^3.4.16" },
15
- { name: "postcss", version: "^8.4.49" },
16
- { name: "autoprefixer", version: "^10.4.20" }
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: [],
@@ -1,3 +1 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
1
+ @import "tailwindcss";
@@ -1,6 +1,5 @@
1
- export default {
1
+ module.exports = {
2
2
  plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {},
3
+ '@tailwindcss/postcss': {},
5
4
  },
6
5
  };
@@ -1,7 +1,7 @@
1
1
  import type { Config } from 'tailwindcss';
2
2
 
3
3
  const config: Config = {
4
- content: ['./src/**/*.{js,ts,jsx,tsx}'],
4
+ content: ['./src/**/*.{js,ts,jsx,tsx,mdx,html,vue,svelte}'],
5
5
  theme: {
6
6
  extend: {},
7
7
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartix-software-solutions/create-fullstack-app",
3
- "version": "2.0.14",
3
+ "version": "2.0.16",
4
4
  "description": "CLI tool to scaffold full-stack applications with pluggable architecture",
5
5
  "type": "module",
6
6
  "bin": {