-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More initiatives #3
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming things is hard
package.json
Outdated
@@ -18,6 +18,10 @@ | |||
"cross-spawn": "^5.1.0", | |||
"cz-lerna-changelog": "github:patrickarlt/cz-lerna-changelog#3fe7650a2e2e624b1f46e5031c96119759698288", | |||
"date-fns": "^1.29.0", | |||
"@esri/arcgis-rest-request": "^1.1.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove these since they are dependencies
package.json
Outdated
@@ -65,7 +69,10 @@ | |||
"isomorphic-fetch": "^2.2.1", | |||
"isomorphic-form-data": "^1.0.0", | |||
"tslib": "^1.8.1", | |||
"@esri/arcgis-rest-request": "^1.1.1" | |||
"@esri/arcgis-rest-request": "^1.1.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove these and have the individual packages declare their dependencies on arcgis-rest-js packages.
packages/initiatives/package.json
Outdated
"peerDependencies": { | ||
}, | ||
"devDependencies": { | ||
"@esri/arcgis-rest-request": "^1.1.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move these to dependencies
* @param requestOptions - Request options that may have authentication manager | ||
* @returns A Promise that will resolve with the Initiative item and data | ||
*/ | ||
export function getInitiativeWithData( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like @jgravois' idea of having getInitiative()
return the data by default unless the consumer supplies a data: false
option. We can then remove getInitiativeWithData()
* @param requestOptions - Request options that may have authentication manager | ||
* @returns A Promise that will resolve with the Initiative site's domain. Consumer needs to add the protocol | ||
*/ | ||
export function lookupSiteUrlByInitiative( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ultimately we'll want this package to depend on a sites package that exposes getDomain()
or lookupDomain()
fn that takes a siteId
and calls https://hubqa.arcgis.com/utilities/domains?siteId=72900e205eb3479a8cac3d47f56f75fe - in the mean time, we can just create and export
that in this package. This fn should be getSiteDomain()
and it should take an initiative argument either as a string or an IInitiative
, if the former, then call getInitiative()
.
use in favor of #1