Releases: wolfstar-project/stars-components
Release list
@wolfstar/prettier-config@0.1.2
@wolfstar/oxlint-config@0.2.1
@wolfstar/oxfmt-config@0.2.1
@wolfstar/i18next-type-generator@3.1.4
@wolfstar/create-http-framework@2.5.2
@wolfstar/http-framework@5.0.0
Major Changes
-
#207
9b71e86- Implementedexperimental.enableNitro:stars dev/stars buildnow build the bot through
Nitro v3's own Vite plugin (nitro/vite, requires Vite 8) instead of refusing with
EXPERIMENT_UNAVAILABLE.@wolfstar/http-framework:Clientnow has afetch(request, options?)method — the WebRequest/Response
counterpart oflisten(), running the exact same signature verification, routing and replies without binding a
port, for anything that speaks Fetch instead ofnode:http(Nitro, a Worker,Bun.serve,Deno.serve, Vite's own
dev middleware). The Discord public key is imported once and reused across calls, the same lifetimelisten()
gives its own signing key. The previously-unannounced@wolfstar/http-framework/fetchsubmodule
(createFetchHandler/FetchHandler/FetchHandlerOptions) is removed in favour of this — a method onClient
itself rather than a separate adapter module to import and wire up.@wolfstar/cli: Nitro v3 is itself a Vite plugin — there is no separatenitro buildstep — so the new
NitroBuilderreuses the project's ownvite.config.*/stars.config#vitethe same waybuild.tool: 'vite'does,
and adds a generated server entry on top: it imports the entry's default export (theClientinstance, already
load()ed rather thanlisten()ed) and callsclient.fetch(request), in the plain
{ fetch(Request): Promise<Response> }shape Nitro's own server entry convention expects.stars buildnow
produces.output/laid out for the configuredexperimental.nitro.preset(node-serverby default, deployable
to anything Nitro targets —cloudflare-module,aws-lambda,vercel,netlify,bun,deno-deploy, and more)
instead of anode:httpprocess;stars devrebuilds and restarts on every change, the same as the other build
tools. Installnitro(andvite) as a dev dependency to use it. The now-implementedEXPERIMENT_UNAVAILABLE
diagnostic code is removed fromcliDiagnostics/CliDiagnosticCode.@wolfstar/cli:NitroBuilderalso turns on Vite's nativeresolve.tsconfigPaths(see
https://nitro.build/examples/import-alias), andstars prepare's generated.stars/tsconfig.jsonnow emits the
same~/@/~~/@@aliasesbuild.tool: 'tsdown'already gets wheneverexperimental.enableNitrois on — a
project's owntsconfig.json#paths/package.jsonimportsjust work under Nitro too, without a
vite-tsconfig-pathsplugin. Thanks @RedStar071!
-
#205
18eda16- Replaced the hand-rolledConfigError(@wolfstar/http-framework/config) andCliError(@wolfstar/cli) error
classes withnosticsDiagnostics: stable, typed diagnostic codes with a
why, an actionablefix, and a docs link, instead of ad hoccode/hint/path/filefields.@wolfstar/http-framework/configno longer exportsConfigError/ConfigErrorOptions. Everystars.config.*
validation and load failure is now built fromconfigDiagnostics(also exported) and thrown as anostics
Diagnostic— catch it withinstanceof Diagnostic(fromnostics) instead ofinstanceof ConfigError. The
option path that used to live on.pathis folded into the diagnostic's message; the configuration file that used
to live on.fileis now in.sources.@wolfstar/clino longer exportsCliError/CliErrorOptions. Its own errors are now built from the new
cliDiagnosticscatalog (also exported) and areDiagnosticinstances too.formatErrorrenders aDiagnostic
withnostics' own ANSI formatter;exitCodeOfmapsstars.config.*diagnostic codes to exit code2and
BUILD_FAILEDto3, the same as before.
ExitCode,exitCodeOfandformatErrorkeep their existing exports and behaviour for every other case (an
unexpected error still renders as a crash report, a non-Errorvalue still stringifies). Thanks @RedStar071!
@wolfstar/http-framework-test-utils@3.0.9
@wolfstar/cli@1.0.0
Major Changes
-
#205
18eda16- Replaced the hand-rolledConfigError(@wolfstar/http-framework/config) andCliError(@wolfstar/cli) error
classes withnosticsDiagnostics: stable, typed diagnostic codes with a
why, an actionablefix, and a docs link, instead of ad hoccode/hint/path/filefields.@wolfstar/http-framework/configno longer exportsConfigError/ConfigErrorOptions. Everystars.config.*
validation and load failure is now built fromconfigDiagnostics(also exported) and thrown as anostics
Diagnostic— catch it withinstanceof Diagnostic(fromnostics) instead ofinstanceof ConfigError. The
option path that used to live on.pathis folded into the diagnostic's message; the configuration file that used
to live on.fileis now in.sources.@wolfstar/clino longer exportsCliError/CliErrorOptions. Its own errors are now built from the new
cliDiagnosticscatalog (also exported) and areDiagnosticinstances too.formatErrorrenders aDiagnostic
withnostics' own ANSI formatter;exitCodeOfmapsstars.config.*diagnostic codes to exit code2and
BUILD_FAILEDto3, the same as before.
ExitCode,exitCodeOfandformatErrorkeep their existing exports and behaviour for every other case (an
unexpected error still renders as a crash report, a non-Errorvalue still stringifies). Thanks @RedStar071!
Minor Changes
-
#207
9b71e86- Implementedexperimental.enableNitro:stars dev/stars buildnow build the bot through
Nitro v3's own Vite plugin (nitro/vite, requires Vite 8) instead of refusing with
EXPERIMENT_UNAVAILABLE.@wolfstar/http-framework:Clientnow has afetch(request, options?)method — the WebRequest/Response
counterpart oflisten(), running the exact same signature verification, routing and replies without binding a
port, for anything that speaks Fetch instead ofnode:http(Nitro, a Worker,Bun.serve,Deno.serve, Vite's own
dev middleware). The Discord public key is imported once and reused across calls, the same lifetimelisten()
gives its own signing key. The previously-unannounced@wolfstar/http-framework/fetchsubmodule
(createFetchHandler/FetchHandler/FetchHandlerOptions) is removed in favour of this — a method onClient
itself rather than a separate adapter module to import and wire up.@wolfstar/cli: Nitro v3 is itself a Vite plugin — there is no separatenitro buildstep — so the new
NitroBuilderreuses the project's ownvite.config.*/stars.config#vitethe same waybuild.tool: 'vite'does,
and adds a generated server entry on top: it imports the entry's default export (theClientinstance, already
load()ed rather thanlisten()ed) and callsclient.fetch(request), in the plain
{ fetch(Request): Promise<Response> }shape Nitro's own server entry convention expects.stars buildnow
produces.output/laid out for the configuredexperimental.nitro.preset(node-serverby default, deployable
to anything Nitro targets —cloudflare-module,aws-lambda,vercel,netlify,bun,deno-deploy, and more)
instead of anode:httpprocess;stars devrebuilds and restarts on every change, the same as the other build
tools. Installnitro(andvite) as a dev dependency to use it. The now-implementedEXPERIMENT_UNAVAILABLE
diagnostic code is removed fromcliDiagnostics/CliDiagnosticCode.@wolfstar/cli:NitroBuilderalso turns on Vite's nativeresolve.tsconfigPaths(see
https://nitro.build/examples/import-alias), andstars prepare's generated.stars/tsconfig.jsonnow emits the
same~/@/~~/@@aliasesbuild.tool: 'tsdown'already gets wheneverexperimental.enableNitrois on — a
project's owntsconfig.json#paths/package.jsonimportsjust work under Nitro too, without a
vite-tsconfig-pathsplugin. Thanks @RedStar071!
Patch Changes
@wolfstar/oxlint-config@0.2.0
Minor Changes
- #202
78b70d9- Ship the shared configs as built TypeScript modules created withdefineConfigfromoxfmt/oxlintinstead of raw JSON files.@wolfstar/oxfmt-confignow default-exports a config object to spread intooxfmt.config.ts, and@wolfstar/oxlint-configdefault-exports one to pass toextendsinoxlint.config.ts. Theindex.jsonand.oxlintrc.jsonentry points are removed. Thanks @RedStar071!