@outwalk/create-firefly 0.14.4 → 0.15.1

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/index.js CHANGED
@@ -63,7 +63,7 @@ class TemplateBuilder {
63
63
  for (let key of keys) {
64
64
  content = content.replace(new RegExp(`{{${key}}}`, "g"), values[key]);
65
65
  }
66
- return content;
66
+ return content.replace(/\n{3,}/g, "\n\n");
67
67
  };
68
68
  for (let file of filesToCreate) {
69
69
  const originalPath = path.join(src, file);
@@ -154,7 +154,8 @@ const questions = [
154
154
  message: "Select a platform:",
155
155
  choices: [
156
156
  { title: "Express", value: JSON.stringify(express) },
157
- { title: "Hono", value: JSON.stringify(hono) }
157
+ { title: "Hono", value: JSON.stringify(hono) },
158
+ { title: "No Platform (Node)", value: null }
158
159
  ]
159
160
  }
160
161
  ];
@@ -165,7 +166,7 @@ const questions = [
165
166
  const force = args["force"];
166
167
  const platform = JSON.parse(config.platform);
167
168
  const settings = { useCurrentDirectory: false };
168
- const dependencies = ["@outwalk/firefly", ...platform.dependencies];
169
+ const dependencies = ["@outwalk/firefly", ...platform?.dependencies ?? []];
169
170
  if (config.language != "javascript") {
170
171
  dependencies.push(config.language);
171
172
  }
@@ -198,8 +199,14 @@ const questions = [
198
199
  try {
199
200
  const template = new TemplateBuilder(templatePath, projectPath);
200
201
  template.inject("project-name", config.name);
201
- template.snippet("import-platform", path.join(snippetPath, platform.template, "import-platform.template"));
202
- template.snippet("define-platform", path.join(snippetPath, platform.template, "define-platform.template"));
202
+ template.inject("options", !platform ? "" : "{ platform }");
203
+ if (platform) {
204
+ template.snippet("import-platform", path.join(snippetPath, platform.template, "import-platform.template"));
205
+ template.snippet("define-platform", path.join(snippetPath, platform.template, "define-platform.template"));
206
+ } else {
207
+ template.inject("import-platform", "");
208
+ template.inject("define-platform", "");
209
+ }
203
210
  template.build();
204
211
  } catch (error) {
205
212
  logger.error(error.message);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@outwalk/create-firefly",
3
3
  "type": "module",
4
- "version": "0.14.4",
4
+ "version": "0.15.1",
5
5
  "description": "Firefly - a modern scalable web framework.",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -48,13 +48,13 @@
48
48
  },
49
49
  "devDependencies": {
50
50
  "@eslint/js": "^10.0.1",
51
- "@rollup/plugin-commonjs": "^29.0.2",
51
+ "@rollup/plugin-commonjs": "^29.0.3",
52
52
  "@rollup/plugin-json": "^6.1.0",
53
53
  "@rollup/plugin-node-resolve": "^16.0.3",
54
- "esbuild": "^0.27.4",
55
- "eslint": "^10.1.0",
56
- "globals": "^17.4.0",
57
- "rollup": "^4.60.0",
54
+ "esbuild": "^0.28.2",
55
+ "eslint": "^10.10.0",
56
+ "globals": "^17.12.0",
57
+ "rollup": "^4.63.2",
58
58
  "rollup-plugin-esbuild": "^6.2.1"
59
59
  }
60
60
  }
@@ -46,4 +46,7 @@ dist/
46
46
 
47
47
  # Temporary folders
48
48
  tmp/
49
- temp/
49
+ temp/
50
+
51
+ # System files
52
+ .DS_Store
@@ -3,5 +3,6 @@ import firefly from "@outwalk/firefly/eslint";
3
3
  export default {
4
4
  files: ["src/**/*.{js,ts}"],
5
5
  languageOptions: { ...firefly.configs.language },
6
- rules: { ...firefly.configs.recommended }
6
+ rules: { ...firefly.configs.recommended },
7
+ plugins: { ...firefly.configs.plugins },
7
8
  }
@@ -1,6 +1,8 @@
1
1
  {
2
+ "include": ["src"]
2
3
  "compilerOptions": {
3
4
  "experimentalDecorators": true,
5
+ "allowJs": true,
4
6
  "paths": {
5
7
  "@/*": [
6
8
  "./src/*"
@@ -4,8 +4,8 @@
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "engines": {
7
- "node": "^22",
8
- "npm": "^10"
7
+ "node": ">=22",
8
+ "npm": ">=11"
9
9
  },
10
10
  "scripts": {
11
11
  "build": "firefly build",
@@ -4,4 +4,4 @@ import { Application } from "@outwalk/firefly";
4
4
  {{define-platform}}
5
5
 
6
6
  /* start the application */
7
- new Application({ platform }).listen();
7
+ new Application({{options}}).listen();
@@ -46,4 +46,7 @@ dist/
46
46
 
47
47
  # Temporary folders
48
48
  tmp/
49
- temp/
49
+ temp/
50
+
51
+ # System files
52
+ .DS_Store
@@ -3,5 +3,6 @@ import firefly from "@outwalk/firefly/eslint";
3
3
  export default {
4
4
  files: ["src/**/*.{js,ts}"],
5
5
  languageOptions: { ...firefly.configs.language },
6
- rules: { ...firefly.configs.recommended }
6
+ rules: { ...firefly.configs.recommended },
7
+ plugins: { ...firefly.configs.plugins },
7
8
  }
@@ -4,8 +4,8 @@
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "engines": {
7
- "node": "^22",
8
- "npm": "^10"
7
+ "node": ">=22",
8
+ "npm": ">=11"
9
9
  },
10
10
  "scripts": {
11
11
  "build": "firefly build",
@@ -4,4 +4,4 @@ import { Application } from "@outwalk/firefly";
4
4
  {{define-platform}}
5
5
 
6
6
  /* start the application */
7
- new Application({ platform }).listen();
7
+ new Application({{options}}).listen();
@@ -7,10 +7,11 @@
7
7
  "useDefineForClassFields": true,
8
8
 
9
9
  /* syntax */
10
- "target": "ES2020",
10
+ "target": "ES2024",
11
11
  "module": "ESNext",
12
- "lib": ["ES2020"],
12
+ "lib": ["ES2024"],
13
13
  "jsx": "preserve",
14
+ "types": ["node"],
14
15
  "skipLibCheck": true,
15
16
 
16
17
  /* bundler mode */