@wolfstar/create-http-framework 2.4.0 → 2.5.0-next-20260913191701

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
@@ -321,23 +321,15 @@ function writeTsconfig(targetDir, ctx) {
321
321
  }));
322
322
  }
323
323
  /**
324
- * Writes the `stars.config.*` file read by the `stars` CLI (`dev`, `build`, `info`, `codegen` scripts). It carries
325
- * the build too: `tsdown` projects are configured here rather than in a `tsdown.config.ts` of their own, which is
326
- * what `future.compatibilityVersion: 4` means for a generated project.
324
+ * Writes the `stars.config.*` file read by the `stars` CLI (`dev`, `build`, `info`, `codegen` scripts). Conventional
325
+ * JavaScript and tsdown projects need no options; an explicit tsc selection is the only generated override.
327
326
  */
328
327
  function writeStarsConfig(targetDir, ctx) {
329
328
  const isJs = ctx.language === "js";
330
- const isTsdown = !isJs && ctx.buildTool === "tsdown";
331
329
  const content = [
332
330
  "import { defineConfig } from '@wolfstar/http-framework/config';",
333
331
  "",
334
- "export default defineConfig({",
335
- `\tentry: 'src/main.${isJs ? "js" : "ts"}',`,
336
- `\tbuild: ${isJs ? "{ tool: 'none' }" : isTsdown ? "{ tool: 'tsdown' }" : "{ tool: 'tsc', tsconfig: 'src/tsconfig.json' }"},`,
337
- " // The next major's defaults: auto imports wired into the build, and `tsdown` configured from this file.",
338
- " future: { compatibilityVersion: 4 }",
339
- ...isTsdown ? [" // The build needs nothing else. Add a `tsdown` block for what the defaults cannot know,", " // such as a plugin that copies assets into dist/."] : [],
340
- "});",
332
+ `export default defineConfig(${!isJs && ctx.buildTool !== "tsdown" ? "{ build: { tool: 'tsc' } }" : "{}"});`,
341
333
  ""
342
334
  ].join("\n");
343
335
  writeFile(join(targetDir, isJs ? "stars.config.js" : "stars.config.ts"), content);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wolfstar/create-http-framework",
3
- "version": "2.4.0",
3
+ "version": "2.5.0-next-20260913191701",
4
4
  "description": "Create a new WolfStar HTTP Framework bot project",
5
5
  "keywords": [
6
6
  "cli",
@@ -46,11 +46,11 @@
46
46
  "@types/handlebars": "^4.1.0",
47
47
  "@types/mri": "^1.2.0",
48
48
  "@types/node": "22.15.21",
49
- "@vitest/coverage-v8": "^4.1.8",
49
+ "@vitest/coverage-v8": "^4.1.11",
50
50
  "golar": "^0.1.10",
51
51
  "tsdown": "^0.22.14",
52
52
  "typescript": "~7.0.2",
53
- "vitest": "^4.1.8"
53
+ "vitest": "^4.1.11"
54
54
  },
55
55
  "engines": {
56
56
  "node": ">=20"
@@ -1,6 +1,5 @@
1
1
  import { setup as envRun } from '@wolfstar/env-utilities';
2
2
 
3
3
  export function setup() {
4
- // From src/lib/setup → .env at the project root
5
- envRun(new URL('../../../.env', import.meta.url));
4
+ envRun();
6
5
  }
@@ -1,6 +1,5 @@
1
1
  import { setup as envRun } from '@wolfstar/env-utilities';
2
2
 
3
3
  export function setup() {
4
- // From dist/lib/setup → .env at the project root
5
- envRun(new URL('../../../.env', import.meta.url));
4
+ envRun();
6
5
  }
@@ -1,7 +1,7 @@
1
1
  import { setup } from './lib/setup/all.js';
2
2
  import { envParseInteger, envParseString } from '@wolfstar/env-utilities';
3
3
  import { Client, container } from '@wolfstar/http-framework';
4
- import { createBanner } from '@wolfstar/start-banner';
4
+ import { createStarsBanner } from '@wolfstar/start-banner';
5
5
  import { morning } from 'gradient-string';
6
6
 
7
7
  await setup();
@@ -15,8 +15,7 @@ await client.listen({ address, port });
15
15
 
16
16
  console.log(
17
17
  morning.multiline(
18
- createBanner({
19
- logo: [' * . *', ' . ★ . ', '* . * .'],
18
+ createStarsBanner({
20
19
  name: ['{{name}}'],
21
20
  extra: [
22
21
  '',
@@ -1,7 +1,7 @@
1
1
  import { setup } from './lib/setup/all.js';
2
2
  import { envParseInteger, envParseString } from '@wolfstar/env-utilities';
3
3
  import { Client, container } from '@wolfstar/http-framework';
4
- import { createBanner } from '@wolfstar/start-banner';
4
+ import { createStarsBanner } from '@wolfstar/start-banner';
5
5
  import { morning } from 'gradient-string';
6
6
 
7
7
  await setup();
@@ -15,8 +15,7 @@ await client.listen({ address, port });
15
15
 
16
16
  console.log(
17
17
  morning.multiline(
18
- createBanner({
19
- logo: [String.raw` * . *`, String.raw` . ★ . `, String.raw`* . * .`],
18
+ createStarsBanner({
20
19
  name: ['{{name}}'],
21
20
  extra: [
22
21
  '',
@@ -2,7 +2,7 @@ import '@wolfstar/plugin-i18next/register';
2
2
  import { setup } from './lib/setup/all.js';
3
3
  import { envParseInteger, envParseString } from '@wolfstar/env-utilities';
4
4
  import { Client, container } from '@wolfstar/http-framework';
5
- import { createBanner } from '@wolfstar/start-banner';
5
+ import { createStarsBanner } from '@wolfstar/start-banner';
6
6
  import { morning } from 'gradient-string';
7
7
 
8
8
  await setup();
@@ -21,8 +21,7 @@ await client.listen({ address, port });
21
21
 
22
22
  console.log(
23
23
  morning.multiline(
24
- createBanner({
25
- logo: [' * . *', ' . ★ . ', '* . * .'],
24
+ createStarsBanner({
26
25
  name: ['{{name}}'],
27
26
  extra: [
28
27
  '',
@@ -2,7 +2,7 @@ import '@wolfstar/plugin-i18next/register';
2
2
  import { setup } from './lib/setup/all.js';
3
3
  import { envParseInteger, envParseString } from '@wolfstar/env-utilities';
4
4
  import { Client, container } from '@wolfstar/http-framework';
5
- import { createBanner } from '@wolfstar/start-banner';
5
+ import { createStarsBanner } from '@wolfstar/start-banner';
6
6
  import { morning } from 'gradient-string';
7
7
 
8
8
  await setup();
@@ -21,8 +21,7 @@ await client.listen({ address, port });
21
21
 
22
22
  console.log(
23
23
  morning.multiline(
24
- createBanner({
25
- logo: [String.raw` * . *`, String.raw` . ★ . `, String.raw`* . * .`],
24
+ createStarsBanner({
26
25
  name: ['{{name}}'],
27
26
  extra: [
28
27
  '',