@supercharge/manager
Advanced tools
Changelog
4.0.0-alpha.2 - 2023-12-12
@supercharge/env
Env.get
methods for tightened types
get<R extends string> (key: string): R
get<R extends string> (key: string, defaultValue: R): R
@supercharge/contracts
HashConfig#drivers
ViteConfig
interfaceViewConfigBuilder
interface: add withoutLayout
methodRenderableError
and ReportableError
interfaces
RenderableError
defines the render(error, httpContext)
methodReportableError
defines the report(error, httpContext)
method@supercharge/core
cause
when wrapping that error into an HttpError
@supercharge/vite
vite
container bindingViteConfig
instance wrapping a Vite configuration JS object (will be used by a config/vite.ts file)InertiaPageNotFoundError
error when a given component is missingattributes
in the vite
Handlebars helper: {{ vite input="resources/js/app.js" attributes='data-turbo-track="reload" async' }}
@supercharge/vite
^5.0.0
as a peer dependency@supercharge/view
withoutLayout
method on ViewConfigBuilder
instanceengines
folder to drivers
@supercharge/vite
>=4.0.0
as a peer dependency@supercharge/view
HandlebarsCompiler
to HandlebarsDriver
Changelog
4.0.0-alpha.1 - 2023-11-18
@supercharge/http
import.meta.resolve
with Path.resolve
because import.meta.resolve
sometimes returns a Promise in Node.js@supercharge/contracts
InputBag#get
to correctly resolve the return type for an available default valuetsconfig.json
files of all packagesChangelog
4.0.0-alpha.0 - 2023-11-13
@supercharge/contracts
HttpDefaultRequestHeaders
and HttpDefaultRequestHeader
interfaces: these are strict contracts for HTTP headers allowing IntelliSense for individual headers. IntelliSense is not supported on Node.js’s IncomingHttpHeaders
interface because it contains an index signature which opens the interfaces to basically anything … the newly added interfaces are strict for allowed keysHttpRequestHeaders
and HttpRequestHeader
interfaces: HttpRequestHeaders
is an interface to be used by developers for augmentation to add custom, project-specific request headers. For example, this can be used to add headers for rate limitingHashAlgorithms
interface and HashAlgorithm
type: HashAlgorithms
is an interface providing the supported hash algorithms of Node.js v20 for IntelliSense, improving the developer experience when working with hashes@supercharge/hashing
createHash
method: create a Node.js Hash
instance for a given inputmd5
method: create a Node.js MD5 hashsha256
method: create a Node.js SHA256 hashsha512
method: create a Node.js SHA512 hash@supercharge/view
share
method: share data across view templates. This is useful for data like your app namesharedData
method: returns the shared data@supercharge/contracts
StateBag
: add exists
method to determine whether the state bag contains an entry key
, no matter what value is assigned to the key@supercharge/contracts
BodyparserOptions
: use BodyparserConfig
insteadCookieOptions
: use CookieConfig
insteadCorsOptions
: use CorsConfig
insteadHashBuilderOptions
: use HashBuilderConfig
insteadStaticAssetsOptions
: use StaticAssetsConfig
insteadall packages of the framework moved to ESM
require Node.js v20
@supercharge/manager
ensureConfig
method: use this.app.config().ensure()
within a method of your Manager
class instead@supercharge/contracts
RequestHeaderBag
contract. The Request
interface uses the InputBag<IncomingHttpHeaders>
insteadRequestStateData
, use HttpStateData
insteadStateBag
: the has(key)
method now determines whether the value for a given key
is not undefined
. If you want to check whether a given key
is present in the state bag, independently from the value, use the newly added exists(key)
methodStateBag
:
isMissing(key)
method now determines whether a value for a given key
is undefined
(related to has(key)
, because isMissing
is doing the opposite of has
)add(key, value)
method to set(key, value)
add(key, value)
method@supercharge/hashing
bcrypt
package from being installed automatically, users must install it explicitely when the hashing driver should use bcrypt@supercharge/view
View
to ViewResponse
@supercharge/http
RequestHeaderBag
extends the InputBag
which changes the behavior of the has(key)
method: it returns false
if the stored value is undefined
and returns true
otherwiseThis pull request switches the parameters of the error report, handle, render method:
@supercharge/core
report
, handle
, render
methods:// before
handle(ctx: HttpContext, error: Error)
report(ctx: HttpContext, error: Error)
render(ctx: HttpContext, error: Error)
// now
handle(error: Error, ctx: HttpContext)
report(error: Error, ctx: HttpContext)
render(error: Error, ctx: HttpContext)
Changelog
3.20.4 - 2023-10-15
@supercharge/hashing
BcryptDriver
and ScryptDriver
from the package’s main entrypoint to avoid requiring the bcrypt
package immediately, eventhough the bcrypt driver will not be usedThis release removes exports for the BcryptDriver
and ScryptDriver
hashing drivers from the package’s main entrypoint. The driver exports shouldn’t be used standalone. The export was a convenience for testing and interested people. If you imported the drivers from the packge, please update your code to "deep imports" or "deep requires". Thank you!
Changelog
3.20.1 - 2023-08-02
@supercharge/contracts
ContainerBindings
as an empty interface for proper module augmentation and declaration merging@supercharge/core
NodeJS.Signals
types in shutdown handler@supercharge/manager
@supercharge/hashing
HashManager#createScryptDriver
methodChangelog
3.20.0 - 2023-07-25
@supercharge/contracts
set
and remove
methods return the this
instance for seamless chainingRequestStateData
interface. This interface can be extended in your project to define custom properties in the current request state (shared using request.state().share()
)declare module '@supercharge/contracts' {
export interface RequestStateData {
requestId: string
}
}
ContainerBindings
interface. This interface can be extended in your project to define custom container bindings (bound using app.bind(<binding-name>)
or app.singleton(<binding-name>)
)declare module '@supercharge/contracts' {
export interface ContainerBindings {
'router': HttpRouter
}
}
@supercharge/hashing
scrypt
driver based on Node.js’ integrated scrypt
crypto methods@supercharge/http
Middleware
toJSON
methodtoJSON
methodattributes
property from private
to protected
@supercharge/session
file
driver that stores sessions in files on local disc.eslintrc.js
file from every package (to only use the root ESLint config)