Skip to content

Commit e72e13f

Browse files
committed
Remove conflicts check, increase vbase timeout and fix build
1 parent fcfc225 commit e72e13f

File tree

7 files changed

+1121
-73
lines changed

7 files changed

+1121
-73
lines changed

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
"ts-jest": "^25.2.1",
2929
"ts-node": "^8",
3030
"typescript": "^3.8.2",
31-
"vtex": "2.111.2-beta"
31+
"vtex-latest": "npm:[email protected]",
32+
"vtex": "npm:[email protected]",
33+
"@vtex/api": "npm:@vtex/[email protected]"
3234
},
3335
"engines": {
3436
"node": ">=8.0.0"

src/commands/workspace/delete.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default class WorkspaceDelete extends CustomCommand {
1313
`${ColorifyConstants.COMMAND_OR_VTEX_REF('vtex workspace delete')} workspaceName1 workspaceName2`,
1414
]
1515

16-
static flags = {
16+
static flags: oclifFlags.Input<any> = {
1717
...CustomCommand.globalFlags,
1818
force: oclifFlags.boolean({
1919
char: 'f',

src/commands/workspace/reset.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default class WorkspaceReset extends CustomCommand {
1414
`${ColorifyConstants.COMMAND_OR_VTEX_REF('vtex workspace reset')} workspaceName`,
1515
]
1616

17-
static flags = {
17+
static flags: oclifFlags.Input<any> = {
1818
...CustomCommand.globalFlags,
1919
production: oclifFlags.boolean({
2020
char: 'p',

src/commands/workspace/use.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default class WorkspaceUse extends CustomCommand {
1414

1515
static aliases = ['use']
1616

17-
static flags = {
17+
static flags: oclifFlags.Input<any> = {
1818
...CustomCommand.globalFlags,
1919
production: oclifFlags.boolean({
2020
char: 'p',

src/modules/delete.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Workspaces } from '@vtex/api'
1+
import { Workspaces } from 'vtex/node_modules/@vtex/api/lib/clients/Workspaces'
22
import chalk from 'chalk'
33
import { contains, flatten, tail } from 'ramda'
44
import { createWorkspacesClient, SessionManager, logger, promptConfirm, workspaceUse } from 'vtex'

src/modules/promote.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,18 @@ import {
88
SessionManager,
99
logger,
1010
promptConfirm,
11-
VBase,
1211
authUrl,
1312
workspaceUse,
1413
COLORS,
1514
} from 'vtex'
15+
16+
import { VBase } from 'vtex-latest'
1617
import { MineWinsConflictsResolver } from '@vtex/api'
1718

18-
const vbase = VBase.createClient()
19+
const vbase = VBase.createClient(undefined, {
20+
timeout: 120 * 1000,
21+
})
22+
1923
const { promote, get } = createWorkspacesClient()
2024
const { account, workspace: currentWorkspace } = SessionManager.getSingleton()
2125
const workspaceUrl = authUrl()
@@ -32,10 +36,6 @@ const throwIfIsMaster = (workspace: string) => {
3236
All conflicts resolved here is using a mineWins strategy at the content json level.
3337
*/
3438
const handleConflict = async () => {
35-
const conflictsFoundForPagesGraphql = await vbase.checkForConflicts()
36-
37-
if (!conflictsFoundForPagesGraphql) return
38-
3939
// Forcing rebase to avoid conflicts
4040
await axios.get(workspaceUrl)
4141

0 commit comments

Comments
 (0)