
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@adonisjs/application
Advanced tools
The application class for AdonisJs to know more about the environment and project structure of your AdonisJs applications.
Ideally you shouldn't be installing this module directly, since it is part of AdonisJs by default. However, installing module directly is helpful when testing AdonisJs specific addons.
npm i @adonisjs/application
# Yarn
yarn add @adonisjs/application
and then use it as follows:
import { Application } from '@adonisjs/application/build/standalone'
import { Ioc } from '@adonisjs/fold'
const app = new Application(
__dirname,
new Ioc(),
require('./adonisrc.json'),
require('./package.json'),
)
The constructor takes 4 arguments, which you can fake during tests.
Argument position | Description |
---|---|
1 (appRoot) | The application root |
2 (ioc) | Instance of IoC container |
3 (rcContents) | Contents of .adonisrc.json file. You can also provide an empty object |
4 (pkgFile) | Pass the contents of package.json file. Required to pull the app name, version and so on |
The application instance will parse the contents of .adonisrc.json
file. However, if you need the parser, you can access and use it as follows.
import { rcParser } from '@adonisjs/application/build/standalone'
rcParser.parse(require('.adonisrc.json'))
Following are the autogenerated files via Typedoc
FAQs
AdonisJS application class to read app related data
The npm package @adonisjs/application receives a total of 34,313 weekly downloads. As such, @adonisjs/application popularity was classified as popular.
We found that @adonisjs/application demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.