Skip to content

Commit

Permalink
convert lib/localDev to TS
Browse files Browse the repository at this point in the history
  • Loading branch information
camden11 committed Jan 14, 2025
1 parent 6352c29 commit e08ee6d
Show file tree
Hide file tree
Showing 7 changed files with 177 additions and 141 deletions.
8 changes: 4 additions & 4 deletions commands/project/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ exports.handler = async options => {
});

try {
const result = await handleProjectUpload(
const { result, uploadError } = await handleProjectUpload(
derivedAccountId,
projectConfig,
projectDir,
pollProjectBuildAndDeploy,
message
);

if (result.uploadError) {
if (uploadError) {
if (
isSpecifiedError(result.uploadError, {
isSpecifiedError(uploadError, {
subCategory: PROJECT_ERROR_TYPES.PROJECT_LOCKED,
})
) {
Expand All @@ -67,7 +67,7 @@ exports.handler = async options => {
logger.log();
} else {
logError(
result.uploadError,
uploadError,
new ApiErrorContext({
accountId: derivedAccountId,
request: 'project upload',
Expand Down
8 changes: 4 additions & 4 deletions commands/project/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,16 @@ exports.handler = async options => {

// Upload all files if no build exists for this project yet
if (initialUpload || hasNoBuilds) {
const result = await handleProjectUpload(
const { uploadError } = await handleProjectUpload(
derivedAccountId,
projectConfig,
projectDir,
startWatching
);

if (result.uploadError) {
if (uploadError) {
if (
isSpecifiedError(result.uploadError, {
isSpecifiedError(uploadError, {
subCategory: PROJECT_ERROR_TYPES.PROJECT_LOCKED,
})
) {
Expand All @@ -131,7 +131,7 @@ exports.handler = async options => {
logger.log();
} else {
logError(
result.uploadError,
uploadError,
new ApiErrorContext({
accountId: derivedAccountId,
request: 'project upload',
Expand Down
Loading

0 comments on commit e08ee6d

Please sign in to comment.