-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feat/cli/appmanager/refactoring-commands #2450
Feat/cli/appmanager/refactoring-commands #2450
Conversation
|
f450dbc
to
34c5f67
Compare
e53d3e8
to
8cb1d2a
Compare
1049a48
to
1a48540
Compare
process.env.FUSION_CLI_ENV = fusionEnv; | ||
|
||
const requestService = await fetch( | ||
`https://discovery.ci.fusion-dev.net/service-registry/environments/${fusionEnv}/services/apps`, |
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.
use as doc
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.
adding a todo for now. we need to get it out as alpha and it works. can fix it before beta release.
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.
fix url to disco 🕺
missing changeset. |
Its not a release towards main. |
if (requestBundle.status === 401 || requestBundle.status === 403) { | ||
throw new Error( | ||
`This is not allowed for this role on this app. HTTP message: ${requestBundle.statusText}`, | ||
); | ||
} | ||
|
||
if (requestBundle.status === 404) { | ||
throw new Error(`This app do not exist. HTTP message: ${requestBundle.statusText}`); | ||
} | ||
|
||
if (requestBundle.status === 409) { | ||
throw new Error( | ||
`This version is already published. HTTP message: ${requestBundle.statusText}`, | ||
); | ||
} | ||
|
||
if (requestBundle.status === 410) { | ||
throw new Error(`This app is deleted. HTTP message: ${requestBundle.statusText}`); | ||
} | ||
|
||
if (!requestBundle.ok) { | ||
throw new Error( | ||
`Failed to publish bundle. HTTP status ${requestBundle.status}, ${requestBundle.statusText}`, | ||
); | ||
} | ||
|
||
return await requestBundle.json(); |
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.
Consider switch statement instead.
Why
Refactoring of publish commands and helpers.