You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Intensive use of pact often involves rewriting the same config over and over- especially for the broker and consumer/provider names. I'd like to improve this in an idiomatic way by adding a package.json key and a .pactrc. I propose something like this, where PactOptions is under the key "pact" in package.json, or the export from .pactrc.{js,ts,json}:
interface Pacticipant {
name?: string // Name of the pacticipant
// Not sure what other info should go here?
// Possibly tags or version selectors?
// We may want to extend this type differently for provider verification
// and consumer tests
}
interface BrokerOptions {
// token and password are not to be committed, so don't exist here
// They can both be set by environment variables.
url?: string // URL to access the broker
username?: string // username for the broker
}
interface PactOptions {
consumer?: string | Pacticipant // The consumer name
provider?: string | Pacticipant // The provider name
broker?: BrokerOptions
config?: {
spec?: number // Which spec version to support
pactFileDir?: string // Where the pact files are written to or read from
logDir?: string // Where the logs get stored
logLevel?: LogLevel // Log level
doNotTrack?: boolean // Don't track pact download statistics
binaryLocation?: string // The location of the standalone binaries if github is inaccessible
}
}
Thoughts?
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Intensive use of pact often involves rewriting the same config over and over- especially for the broker and consumer/provider names. I'd like to improve this in an idiomatic way by adding a package.json key and a
.pactrc
. I propose something like this, wherePactOptions
is under the key"pact"
in package.json, or the export from.pactrc.{js,ts,json}
:Thoughts?
The text was updated successfully, but these errors were encountered: