Configuration
The dt-app toolkit will automatically try to resolve a config file named app.config.json
in the project's root
when running a command.
General options
Option | Description | Type | Required | Default Value |
---|---|---|---|---|
root | Project root directory (where the app.config.json file is located). Has to be an absolute path. | string | false | process.cwd() |
environmentUrl | URL to the environment of the project. | string | true | |
oauthClientId | Provides the client ID for authenticating via SSO. | string | false | dt0s08.dt-app-local |
distDir | Relative path to the output directory. | string | false | dist/ |
oauth2File | The secret file where the oauth2 tokens are stored. Can either be an absolute path or a relative path from root. | string | false | ${process.cwd()}/.dt-app/.tokens.json |
icon | Path to the app icon, can either be a .svg (recommended) or .png file. An icon will be auto-generated if no icon path is set. | string | false | |
deploy.build | Whether the app should automatically be built before deployment or not. | boolean | false | true |
injectSdk | Whether the SDK should be injected or not. | boolean | false | true |
dev.fileWatcher.ignore | Glob pattern to specify which files should be ignored by the file-watcher that triggers a rebuild. | string[] | false | [**/*.spec.{ts,tsx}, **/*.test.ts] |
dev.fileWatcher.include | Glob pattern to specify which files should be watched (apart from the root) by the file-watcher that triggers a rebuild. | string[] | false | [] |
App options
Options that are used to generate the manifest.
Option | Description | Type | Required |
---|---|---|---|
app.id | The unique identifier of the app. Limited to 50 characters. Must be an alphanumeric string containing only lowercase characters. | string | true |
app.name | The name of the app. Limited to 40 characters. | string | true |
app.version | The version of the app. | string | true |
app.description | The description of the app. Limited to 80 characters. | string | true |
app.hidden | Hides the listing in the App Launcher. Useful for widget apps. | boolean | false |
app.intents | The list of app capabilities of handling the intents. | IntentsDeclarations | false |
app.pageTokens | The list of page tokens exposed by the app. | Record<string,string> | false |
app.csp.font-src | The font-src directive specifies valid sources for fonts loaded. | DirectiveValue[] | false |
app.csp.img-src | The img-src directive specifies valid sources of images and favicons. | DirectiveValue[] | false |
app.csp.media-src | The media-src directive specifies valid sources for loading media. | DirectiveValue[] | false |
app.csp.style-src | The style-src directive specifies valid sources for stylesheets. | DirectiveValue[] | false |
app.csp.script-src | The script-src directive specifies valid sources for JavaScript. This includes not only URLs loaded directly into script elements, but also things like inline script event handlers (onclick) and XSLT stylesheets which can trigger script execution. | DirectiveValue[] | false |
app.scopes | The list of scopes required by the app. | OAuthScope[] | true |
app.selfMonitoringAgent | The self monitoring agent url | string | false |
Setting app options inside the app.config.json
{
"app": {
"id": "my.app",
"name": "My App",
"description": "My description",
"version": "1.0.0"
}
}
Build options
Options for customizing the build process.
Option | Description | Type | Required | Default Value |
---|---|---|---|---|
build.mode | Whether the build should be performed in production or development mode. | 'production' | 'development' | false | 'production' when building and 'development' when using development server |
build.sourceRoot | Location of source files. | string | false | ./ |
build.settingsPath | A path to custom settings json files. | string | false | settings/schemas |
build.ui.entryPoint | Relative path to the file that serves as the main entry point for the UI. | string | false | src/main.tsx |
build.ui.tsconfig | Relative path (from root ) to tsconfig file. | string | false | tsconfig.json |
build.ui.assets | Assets that should be bundled and served. | Asset[] | false | |
build.ui.sourceMaps | Output source maps for app code and libraries. If set to 'true', only source maps for app code is included. Source maps for node_modules are included if the option is set to 'all'. By default, the option is treated as 'all' for development and 'false' for builds. | boolean | 'all' | false | undefined |
build.functions.input | Relative path to function files. | string | false | api/ |
build.functions.glob | Pattern to specify which files should be built and deployed as functions. Always use UNIX style separators. | string | false | **/*.ts |
build.functions.tsconfig | Relative path (from input ) to tsconfig file. | string | false | tsconfig.json |
build.functions.sourceMaps | Output source maps for app code and libraries. If set to 'true', only source maps for app code is included. Source maps for node_modules are included if the option is set to 'all'. By default, the option is treated as 'all' for development and 'false' for builds. | boolean | 'all' | false | undefined |
build.api.sourceMaps | Output source maps for app code and libraries. If set to 'true', only source maps for app code is included. Source maps for node_modules are included if the option is set to 'all'. By default, the option is treated as 'all' for development and 'false' for builds. | boolean | 'all' | false | undefined |