Configuration for Atlassian Connect Dart #
The configuration library for AcDart provides support for managing configuration for different environments. In particular it has direct support for production and development enviroments with as much defaulting as possible (in development mode) to make set up as easy as possible.
Instead of relying on text files (such as property files, YAML, JSON etc) the library instead uses Dart based configuration. Thanks to Dart's concise syntax and the fact that it is not a compiled language there is not much downside to this approach.
In the upside, using Dart allows for code completion, tool support for catching typos, refactoring etc.
This library can be used on it's own (e.g. as part of your own custom Dart based Atlassian Connect client framework) or as part of the Atlassian Connect Shelf based server.
Basic Usage #
The following shows an example of setting up configuration for development and production.
final config = new AcDartConfigFactory.standard( new AcDartConfig( addonKey: 'foo-bar-addon', repoConfig: new AcDartHostRepoConfig.mongo() ), development: () => new AcDartConfig.development(), production: () => new AcDartConfig());
This configuration relies on the default values and will run in development.
From there you can start to tweak settings as you like. For example
development: () => new AcDartConfig.development( installAddonOnStartup: false, repoConfig: new AcDartHostRepoConfig.mongo(dbUrl: AcDartHostRepoConfig.defaultTestMongoUrlStr) ),
will turn off the auto installation of the addon and use mongo on the default test url for development (instead of in memory which is the default).
- Expose environment name
- Added flag to allow defaulting to development environment
- Host Services upgraded to 0.3.2
- Host Services upgraded to 0.3.1
- Host Services upgraded to 0.3.0
- Host Services upgraded to 0.2.0
- upgraded host services to pick up hijacking fix
- upgraded min sdk version
- Fixed handling of environment variables
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: atlassian_connect_config: ^0.4.2
2. Install it
You can install packages from the command line:
$ pub get
Alternatively, your editor might support
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.
Analysis issues and suggestions
Support Dart 2 in
The SDK constraint in
pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://dart.dev/dart-2#migration.
Maintenance issues and suggestions
dartdoc successfully runs on your package's source files. (-10 points)
Dependencies were not resolved.
|Dart SDK||>=1.2.0 <2.0.0|