Skip to content

Commit

Permalink
Remove conflicts check, increase vbase timeout and fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorflg committed Oct 24, 2024
1 parent fcfc225 commit e72e13f
Show file tree
Hide file tree
Showing 7 changed files with 1,121 additions and 73 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"ts-jest": "^25.2.1",
"ts-node": "^8",
"typescript": "^3.8.2",
"vtex": "2.111.2-beta"
"vtex-latest": "npm:[email protected]",
"vtex": "npm:[email protected]",
"@vtex/api": "npm:@vtex/[email protected]"
},
"engines": {
"node": ">=8.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/commands/workspace/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class WorkspaceDelete extends CustomCommand {
`${ColorifyConstants.COMMAND_OR_VTEX_REF('vtex workspace delete')} workspaceName1 workspaceName2`,
]

static flags = {
static flags: oclifFlags.Input<any> = {
...CustomCommand.globalFlags,
force: oclifFlags.boolean({
char: 'f',
Expand Down
2 changes: 1 addition & 1 deletion src/commands/workspace/reset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class WorkspaceReset extends CustomCommand {
`${ColorifyConstants.COMMAND_OR_VTEX_REF('vtex workspace reset')} workspaceName`,
]

static flags = {
static flags: oclifFlags.Input<any> = {
...CustomCommand.globalFlags,
production: oclifFlags.boolean({
char: 'p',
Expand Down
2 changes: 1 addition & 1 deletion src/commands/workspace/use.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class WorkspaceUse extends CustomCommand {

static aliases = ['use']

static flags = {
static flags: oclifFlags.Input<any> = {
...CustomCommand.globalFlags,
production: oclifFlags.boolean({
char: 'p',
Expand Down
2 changes: 1 addition & 1 deletion src/modules/delete.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Workspaces } from '@vtex/api'
import { Workspaces } from 'vtex/node_modules/@vtex/api/lib/clients/Workspaces'
import chalk from 'chalk'
import { contains, flatten, tail } from 'ramda'
import { createWorkspacesClient, SessionManager, logger, promptConfirm, workspaceUse } from 'vtex'
Expand Down
12 changes: 6 additions & 6 deletions src/modules/promote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ import {
SessionManager,
logger,
promptConfirm,
VBase,
authUrl,
workspaceUse,
COLORS,
} from 'vtex'

import { VBase } from 'vtex-latest'
import { MineWinsConflictsResolver } from '@vtex/api'

const vbase = VBase.createClient()
const vbase = VBase.createClient(undefined, {
timeout: 120 * 1000,
})

const { promote, get } = createWorkspacesClient()
const { account, workspace: currentWorkspace } = SessionManager.getSingleton()
const workspaceUrl = authUrl()
Expand All @@ -32,10 +36,6 @@ const throwIfIsMaster = (workspace: string) => {
All conflicts resolved here is using a mineWins strategy at the content json level.
*/
const handleConflict = async () => {
const conflictsFoundForPagesGraphql = await vbase.checkForConflicts()

if (!conflictsFoundForPagesGraphql) return

// Forcing rebase to avoid conflicts
await axios.get(workspaceUrl)

Expand Down
Loading

0 comments on commit e72e13f

Please sign in to comment.