Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@supercharge/manager

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@supercharge/manager - npm Package Versions

2345

4.0.0-alpha.2

Diff

Changelog

Source

4.0.0-alpha.2 - 2023-12-12

Added

  • @supercharge/env
    • add generic methods Env.get methods for tightened types
      • get<R extends string> (key: string): R
      • get<R extends string> (key: string, defaultValue: R): R
  • @supercharge/contracts
    • allow users to define only selected hashing driver constructros in HashConfig#drivers
    • export a ViteConfig interface
    • extend ViewConfigBuilder interface: add withoutLayout method
    • export RenderableError and ReportableError interfaces
      • RenderableError defines the render(error, httpContext) method
      • ReportableError defines the report(error, httpContext) method
  • @supercharge/core
    • bypass import cache when dynamically importing routes from file path
    • keep the original error as the cause when wrapping that error into an HttpError
  • @supercharge/vite
    • create vite container binding
    • add a ViteConfig instance wrapping a Vite configuration JS object (will be used by a config/vite.ts file)
    • throw InertiaPageNotFoundError error when a given component is missing
    • support attributes in the vite Handlebars helper: {{ vite input="resources/js/app.js" attributes='data-turbo-track="reload" async' }}

Updated

  • bump dependencies
  • @supercharge/vite
    • add Vite ^5.0.0 as a peer dependency
  • @supercharge/view
    • implement withoutLayout method on ViewConfigBuilder instance
    • rename view engines folder to drivers

Breaking Changes

  • @supercharge/vite
    • require Vite >=4.0.0 as a peer dependency
  • @supercharge/view
    • rename HandlebarsCompiler to HandlebarsDriver
marcuspoehls
published 4.0.0-alpha.1 •

Changelog

Source

4.0.0-alpha.1 - 2023-11-18

Added

  • @supercharge/http
    • show requested URL when no route matches

Updated

  • bump dependencies
  • replace import.meta.resolve with Path.resolve because import.meta.resolve sometimes returns a Promise in Node.js
  • @supercharge/contracts
    • update InputBag#get to correctly resolve the return type for an available default value
  • add missing path references to tsconfig.json files of all packages

Breaking Changes

  • bump to Vite 5: this is a breaking change for apps using/requiring Vite 4 (or lower)
marcuspoehls
published 4.0.0-alpha.0 •

Changelog

Source

4.0.0-alpha.0 - 2023-11-13

Added

  • @supercharge/contracts
    • add 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 keys
    • add HttpRequestHeaders 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 limiting
    • add HashAlgorithms 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
    • add createHash method: create a Node.js Hash instance for a given input
    • add md5 method: create a Node.js MD5 hash
    • add sha256 method: create a Node.js SHA256 hash
    • add sha512 method: create a Node.js SHA512 hash
  • @supercharge/view
    • add share method: share data across view templates. This is useful for data like your app name
    • add sharedData method: returns the shared data

Updated

  • bump dependencies
  • @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

Removed

  • @supercharge/contracts
    • removed BodyparserOptions: use BodyparserConfig instead
    • removed CookieOptions: use CookieConfig instead
    • removed CorsOptions: use CorsConfig instead
    • removed HashBuilderOptions: use HashBuilderConfig instead
    • removed StaticAssetsOptions: use StaticAssetsConfig instead

Breaking Changes

  • all packages of the framework moved to ESM

  • require Node.js v20

  • @supercharge/manager

    • remove ensureConfig method: use this.app.config().ensure() within a method of your Manager class instead
  • @supercharge/contracts

    • removed export RequestHeaderBag contract. The Request interface uses the InputBag<IncomingHttpHeaders> instead
    • removed export RequestStateData, use HttpStateData instead
    • StateBag: 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) method
    • StateBag:
      • the 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)
      • rename the add(key, value) method to set(key, value)
      • remove the add(key, value) method
  • @supercharge/hashing

    • removed bcrypt package from being installed automatically, users must install it explicitely when the hashing driver should use bcrypt
    • hashing options require a factory function to return the hash driver constructor
  • @supercharge/view

    • export for the view response changed from View to ViewResponse
  • @supercharge/http

    • the 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 otherwise

    This pull request switches the parameters of the error report, handle, render method:

  • @supercharge/core

    • switch the parameters of the error’s and error handler’s 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)
    
marcuspoehls
published 3.20.4 •

Changelog

Source

3.20.4 - 2023-10-15

Updated

  • @supercharge/hashing
    • remove exports for BcryptDriver and ScryptDriver from the package’s main entrypoint to avoid requiring the bcrypt package immediately, eventhough the bcrypt driver will not be used

Potentially Breaking Change

This 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!

marcuspoehls
published 3.20.3 •

Changelog

Source

3.20.3 - 2023-10-14

Updated

  • bump dependencies
  • @supercharge/hashing
    • require BcryptDriver inside the createBcryptDriver method to only import dependencies when needed. This will support Supercharge to use Bun (the new runtime) because it doesn’t reference a bcrypt_napi bridge
marcuspoehls
published 3.20.2 •

Changelog

Source

3.20.2 - 2023-08-24

Updated

  • bump dependencies

Fixed

  • @supercharge/session
    • use existing session ID (if available) before generating a new one
marcuspoehls
published 3.20.1 •

Changelog

Source

3.20.1 - 2023-08-02

Updated

  • @supercharge/contracts
    • export the ContainerBindings as an empty interface for proper module augmentation and declaration merging
  • @supercharge/core
    • use proper NodeJS.Signals types in shutdown handler
    • support multiple shutdown callbacks
  • @supercharge/manager
    • refine error message for invalid drivers to be more precise which manager is missing which method

Fixed

  • @supercharge/hashing
    • implement missing HashManager#createScryptDriver method
marcuspoehls
published 3.20.0 •

Changelog

Source

3.20.0 - 2023-07-25

Added

  • @supercharge/contracts
    • HTTP input bag: set and remove methods return the this instance for seamless chaining
    • export a RequestStateData 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
        }
    }
    
    • export a 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
  • @supercharge/http
    • export a base Middleware
    • HTTP routes expose a toJSON method
    • HTTP route collection expose a toJSON method
    • HTTP input bag change the visibility of the attributes property from private to protected
  • @supercharge/session
    • add file driver that stores sessions in files on local disc
  • add ESLint to the root of the project

Updated

  • bump dependencies
  • remove .eslintrc.js file from every package (to only use the root ESLint config)
marcuspoehls
published 3.19.0 •

Changelog

Source

3.19.0 - 2023-03-11

Added

  • @supercharge/vite
    • support Vite 4.x

Updated

  • bump dependencies
marcuspoehls
published 3.18.0 •

Changelog

Source

3.18.0 - 2023-01-18

Added

  • @supercharge/database
    • add connections() method returning all active Knex connections
    • service provider: implement the shutdown method closing all connections on application shutdown
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc