Skip to content

Commit

Permalink
BYOR: Change manual-deploy to custom-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahum committed Jan 16, 2024
1 parent 0c0604d commit 6b98477
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions __tests__/bin/vip-app-deploy.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { appDeployCmd } from '../../src/bin/vip-app-deploy';
import * as exit from '../../src/lib/cli/exit';
import { uploadImportSqlFileToS3 } from '../../src/lib/client-file-uploader';
import { gates, promptToContinue } from '../../src/lib/manual-deploy/manual-deploy';
import { validateDeployFileExt, validateFilename } from '../../src/lib/validations/manual-deploy';
import { gates, promptToContinue } from '../../src/lib/custom-deploy/custom-deploy';
import { validateDeployFileExt, validateFilename } from '../../src/lib/validations/custom-deploy';

jest.mock( '../../src/lib/client-file-uploader', () => ( {
...jest.requireActual( '../../src/lib/client-file-uploader' ),
Expand All @@ -12,7 +12,7 @@ jest.mock( '../../src/lib/client-file-uploader', () => ( {
uploadImportSqlFileToS3: jest.fn(),
} ) );

jest.mock( '../../src/lib/manual-deploy/manual-deploy', () => ( {
jest.mock( '../../src/lib/custom-deploy/custom-deploy', () => ( {
gates: jest.fn(),
renameFile: jest.fn(),
promptToContinue: jest.fn().mockResolvedValue( true ),
Expand Down
2 changes: 1 addition & 1 deletion src/bin/vip-app-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
WithId,
UploadArguments,
} from '../lib/client-file-uploader';
import { gates } from '../lib/manual-deploy/manual-deploy';
import { gates } from '../lib/custom-deploy/custom-deploy';
import { trackEventWithEnv } from '../lib/tracker';

const appQuery = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { checkFileAccess, getFileSize, isFile, FileMeta } from '../../lib/client
import { GB_IN_BYTES } from '../../lib/constants/file-size';
import { WORDPRESS_SITE_TYPE_IDS } from '../../lib/constants/vipgo';
import { trackEventWithEnv } from '../../lib/tracker';
import { validateDeployFileExt, validateFilename } from '../../lib/validations/manual-deploy';
import { validateDeployFileExt, validateFilename } from '../../lib/validations/custom-deploy';

const DEPLOY_MAX_FILE_SIZE = 4 * GB_IN_BYTES;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function validateFilename( filename: string ) {
// Exits if filename contains anything outside a-z A-Z - _ .
if ( ! re.test( filename ) ) {
exit.withError(
'Error: The characters used in the name of a file for manual deploys are limited to [0-9,a-z,A-Z,-,_,.]'
'Error: The characters used in the name of a file for custom deploys are limited to [0-9,a-z,A-Z,-,_,.]'
);
}
}

0 comments on commit 6b98477

Please sign in to comment.