Connection Configuration
flowforger.config.json tells the CLI how to write connection references when it emits Logic Apps JSON, how to generate DSL from existing flows, and how to sign in. flowforger init writes a starting version for a Dataverse environment (see App Registration).
File shape
{
"auth": {
"clientId": "<client-id>",
"tenantId": "<tenant-id>",
"resources": {
"dataverse": "https://contoso.crm.dynamics.com",
"sharepoint": "https://contoso.sharepoint.com"
}
},
"global": {
"connections": {
"sharepoint": {
"referenceName": "shared_sharepointonline",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline",
"connectionReferenceLogicalName": "contoso_sharedsharepointonline_1a2b3",
"runtimeSource": "embedded"
}
},
"parser": {
"skipMetadataFields": ["operationMetadataId"],
"skipActionNamesForKinds": ["initializevariable", "setvariable"]
},
"generator": {
"argumentWhitespace": "spaced",
"multilineExpressions": "preserve"
},
"parity": {
"normalizeFunctionCase": true
}
},
"environments": {
"prod": {
"connections": {
"sharepoint": {
"referenceName": "shared_sharepointonline",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline",
"connectionReferenceLogicalName": "contoso_sharedsharepointonline_prod"
}
}
}
}
}
auth— Sign-in settings for--auth. Top level only; it is not overridden per environment. See--auth.global— Settings used by every environment.environments.<name>— Overrides applied with--config-env <name>.
Connections
connections maps a connector name, as used in the flow (ctx.connectors.sharepoint, ctx.connectors.dataverse, ctx.connectors.office365, ...), to the Logic Apps connection reference its actions use:
| Field | Meaning |
|---|---|
referenceName | The connection reference key in the flow definition, e.g. shared_sharepointonline. The connector actions point at it. |
apiId | The connector API, e.g. /providers/Microsoft.PowerApps/apis/shared_sharepointonline. |
connectionReferenceLogicalName | The logical name of the connection reference in your Dataverse solution, e.g. contoso_sharedsharepointonline_1a2b3. |
runtimeSource | Written into the connection reference as is. Default embedded. |
connectionReferenceLogicalNameWithout it, the emitter makes up a new logical name of the form new_<referenceName>_<random hex> every time it compiles, so each push points the flow at a connection reference that does not exist in the environment. flowforger init fills in the logical names of the connection references it finds in the environment; for any it leaves blank, copy the logical name from the connection reference in your solution.
A flow that declares its own connection references (ctx.flow.connectionReferences in the constructor, which every pulled flow does) keeps them as written. connections is then only used for connectors the flow uses without declaring a reference.
If a connector has no entry in connections at all, the emitter falls back to a built-in default referenceName/apiId for sharepoint, dataverse, wordonlinebusiness, excelonlinebusiness, teams, and onedriveforbusiness (an entry for the last three may also be keyed wordonline, excelonline or onedrive, the DSL's short namespace names). Other connectors (e.g. office365, office365users, office365groups) fall back to shared_<connector> with no apiId, so it's worth defining them explicitly.
To add a connector, add an entry under connections with its referenceName, apiId and connectionReferenceLogicalName.
Environments
# Global config only
flowforger compile flow.ff.ts --emit logicapps --out clientdata.json --config flowforger.config.json
# With environment override
flowforger compile flow.ff.ts --emit logicapps --out clientdata.json --config flowforger.config.json --config-env prod
How an environment is applied depends on the section:
connectionsis replaced, not merged. When an environment definesconnections, that object replaces the global one entirely. In the example above,--config-env prodknows only thesharepointconnection; a Dataverse action would get a generated logical name. Repeat every connector you need under the environment, not just the one you are overriding. This applies tocompile,pushanddiff.parser,generatorandparityare merged key by key. An environment can change one option and keep the rest fromglobal.
Generator, parser and parity options
These shape the DSL that pull and generate-dsl write, and how parity and diff compare definitions. Each has a command-line flag that overrides the config value (generate-dsl).
| Option | Values (default first) | Effect |
|---|---|---|
generator.argumentWhitespace | spaced, compact | func(a, b) or func(a,b) in generated expressions |
generator.multilineExpressions | preserve, flatten | Keep a multiline expression's formatting, or flatten it to one line |
generator.expressionFidelity | strict, relaxed | strict keeps an expression verbatim in ctx.eval(...) when typed DSL would change its spacing or casing; relaxed always writes typed DSL |
generator.descriptionStyle | lineComment, jsdoc | Action descriptions as // comments or @description tags |
generator.skipDefaultConstructor | false, true | Leave out a constructor that only holds boilerplate compile adds back |
parser.skipMetadataFields | [] | Action metadata fields to drop when reading a flow, e.g. ["operationMetadataId"]. diff also ignores them. |
parser.skipActionNamesForKinds | [] | Action kinds (lowercase) whose names are not kept, so the generator writes default names, e.g. ["initializevariable", "setvariable"] |
parity.normalizeFunctionCase | true, false | Treat @Trim(x) and @trim(x) as equal |
parity.normalizeNumbers | true, false | Treat 100.00 and 100 as equal |
parity.normalizeSpaces | true, false | Treat repeated spaces as one |
parity.normalizeItemFunction | true, false | Treat item() and items('Loop') as equal |
Which commands read the config
| Command | Uses | Where the file comes from |
|---|---|---|
compile | connections | Only with --config |
push, diff | connections (to compile a .ff.ts), parser/parity (for diff and push --expect-clean), auth with --auth | --config, else flowforger.config.json in the working directory if present |
pull | parser, generator, auth with --auth | --config, else flowforger.config.json in the working directory if present |
generate-dsl, parity, optimize | parser, generator, parity | Only with --config |
run, activate, runs, run-show, mcp | auth with --auth; parser when reading a cloud run (run-show, run --replay-run) | --config, else flowforger.config.json in the working directory |
scopes | auth.resources (optional, for the resource URLs) | --config, else flowforger.config.json in the working directory if present |
init | Writes the file | --out, default flowforger.config.json |
--auth without a readable config file, or with a config that has no auth section, fails before any sign-in.