Skip to content

Commit

Permalink
refactor: remove "util" from filename of a few files in util directory
Browse files Browse the repository at this point in the history
  • Loading branch information
rossiam committed Jan 16, 2025
1 parent ad936ec commit 3d1a1bd
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/commands/apps/create.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type {
} from '../../../lib/command/input-and-output-item.js'
import { InputProcessor, userInputProcessor } from '../../../lib/command/input-processor.js'
import { type authorizeApp, tableFieldDefinitions } from '../../../lib/command/util/apps-util.js'
import { getAppCreateRequestFromUser } from '../../../lib/command/util/apps-util-user-input.js'
import { getAppCreateRequestFromUser } from '../../../lib/command/util/apps-user-input-create.js'
import type { CommandArgs } from '../../../commands/apps/create.js'
import { apiCommandMocks } from '../../test-lib/api-command-mock.js'
import { buildArgvMock, buildArgvMockStub } from '../../test-lib/builder-mock.js'
Expand Down Expand Up @@ -59,7 +59,7 @@ jest.unstable_mockModule('../../../lib/command/util/apps-util.js', () => ({
}))

const getAppCreateRequestFromUserMock = jest.fn<typeof getAppCreateRequestFromUser>()
jest.unstable_mockModule('../../../lib/command/util/apps-util-user-input.js', () => ({
jest.unstable_mockModule('../../../lib/command/util/apps-user-input-create.js', () => ({
getAppCreateRequestFromUser: getAppCreateRequestFromUserMock,
}))

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/commands/apps/oauth/generate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jest.unstable_mockModule('../../../../lib/command/util/apps-util.js', () => ({
}))

const oauthAppScopeDefMock = buildInputDefMock<string>('Scopes Mock')
jest.unstable_mockModule('../../../../lib/command/util/apps-util-input-primitives.js', () => ({
jest.unstable_mockModule('../../../../lib/command/util/apps-input-primitives.js', () => ({
oauthAppScopeDef: oauthAppScopeDefMock,
}))

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/commands/apps/oauth/update.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jest.unstable_mockModule('../../../../lib/command/util/apps-util.js', () => ({

const oauthAppScopeDefMock = buildInputDefMock<string>('Scopes Mock')
const redirectUrisDefMock = buildInputDefMock<string>('Redirect URIs Mock')
jest.unstable_mockModule('../../../../lib/command/util/apps-util-input-primitives.js', () => ({
jest.unstable_mockModule('../../../../lib/command/util/apps-input-primitives.js', () => ({
oauthAppScopeDef: oauthAppScopeDefMock,
redirectUrisDef: redirectUrisDefMock,
}))
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/commands/apps/update.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jest.unstable_mockModule('../../../lib/command/util/apps-user-input-update.js',
getAppUpdateRequestFromUser: getAppUpdateRequestFromUserMock,
}))

jest.unstable_mockModule('../../../lib/command/util/apps-util-input-primitives.js', () => ({
jest.unstable_mockModule('../../../lib/command/util/apps-input-primitives.js', () => ({
smartAppHelpText: 'smartapp help text',
}))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ arrayDefMock.mockReturnValueOnce(redirectUrisDefMock)
const {
oauthAppScopeDef,
redirectUrisDef,
} = await import('../../../../lib/command/util/apps-util-input-primitives.js')
} = await import('../../../../lib/command/util/apps-input-primitives.js')


expect(oauthAppScopeDef).toBe(oauthAppScopeDefMock)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import type {
} from '../../../../lib/item-input/index.js'
import type {
getAppCreateRequestFromUser as getAppCreateRequestFromUserForType,
} from '../../../../lib/command/util/apps-util-user-input.js'
} from '../../../../lib/command/util/apps-user-input-create.js'
import { buildInputDefMock } from '../../../test-lib/input-type-mock.js'


Expand Down Expand Up @@ -76,7 +76,7 @@ jest.unstable_mockModule('../../../../lib/item-input/index.js', () => ({

const oauthAppScopeDefMock = buildInputDefMock('Scopes Mock')
const redirectUrisDefMock = buildInputDefMock('Redirect URIs Mock')
jest.unstable_mockModule('../../../../lib/command/util/apps-util-input-primitives.js', () => ({
jest.unstable_mockModule('../../../../lib/command/util/apps-input-primitives.js', () => ({
oauthAppScopeDef: oauthAppScopeDefMock,
redirectUrisDef: redirectUrisDefMock,
smartAppHelpText: 'smartapp help text',
Expand All @@ -102,7 +102,7 @@ test('module initialization', async () => {
objectDefMock.mockReturnValueOnce(oauthDefMock)
objectDefMock.mockReturnValueOnce(oauthAppCreateRequestDefMock)

getAppCreateRequestFromUser = (await import('../../../../lib/command/util/apps-util-user-input.js'))
getAppCreateRequestFromUser = (await import('../../../../lib/command/util/apps-user-input-create.js'))
.getAppCreateRequestFromUser

expect(computedDefMock).toHaveBeenCalledTimes(2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jest.unstable_mockModule('../../../../lib/item-input/index.js', () => ({
updateFromUserInput: updateFromUserInputMock,
}))

jest.unstable_mockModule('../../../../lib/command//util/apps-util-input-primitives.js', () => ({
jest.unstable_mockModule('../../../../lib/command//util/apps-input-primitives.js', () => ({
smartAppHelpText: 'smartapp help text',
}))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jest.unstable_mockModule('../../../../lib/item-input/index.js', () => ({
const {
arnDef,
webHookUrlDef,
} = await import('../../../../lib/command/util/schema-util-input-primitives.js')
} = await import('../../../../lib/command/util/schema-input-primitives.js')


const generatedStringDef = { name: 'Generated String Def' } as InputDefinition<string>
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/lib/command/util/schema-util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import type {
import type {
arnDef,
webHookUrlDef,
} from '../../../../lib/command/util/schema-util-input-primitives.js'
} from '../../../../lib/command/util/schema-input-primitives.js'
import type {
createChooseFn,
ChooseFunction,
Expand Down Expand Up @@ -84,7 +84,7 @@ jest.unstable_mockModule('../../../../lib/item-input/index.js', () => ({

const arnDefMock = jest.fn<typeof arnDef>()
const webHookUrlDefMock = jest.fn<typeof webHookUrlDef>()
jest.unstable_mockModule('../../../../lib/command/util/schema-util-input-primitives.js', () => ({
jest.unstable_mockModule('../../../../lib/command/util/schema-input-primitives.js', () => ({
arnDef: arnDefMock,
webHookUrlDef: webHookUrlDefMock,
}))
Expand Down
2 changes: 1 addition & 1 deletion src/commands/apps/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
authorizeApp,
tableFieldDefinitions,
} from '../../lib/command/util/apps-util.js'
import { getAppCreateRequestFromUser } from '../../lib/command/util/apps-util-user-input.js'
import { getAppCreateRequestFromUser } from '../../lib/command/util/apps-user-input-create.js'


export type CommandArgs = APICommandFlags & InputAndOutputItemFlags & LambdaAuthFlags & {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/apps/oauth/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
} from '../../../lib/command/input-and-output-item.js'
import { inputProcessor } from '../../../lib/command/input-processor.js'
import { chooseApp } from '../../../lib/command/util/apps-util.js'
import { oauthAppScopeDef } from '../../../lib/command/util/apps-util-input-primitives.js'
import { oauthAppScopeDef } from '../../../lib/command/util/apps-input-primitives.js'
import { objectDef, stringDef, updateFromUserInput } from '../../../lib/item-input/index.js'


Expand Down
2 changes: 1 addition & 1 deletion src/commands/apps/oauth/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { chooseApp, oauthTableFieldDefinitions } from '../../../lib/command/util
import {
oauthAppScopeDef,
redirectUrisDef,
} from '../../../lib/command/util/apps-util-input-primitives.js'
} from '../../../lib/command/util/apps-input-primitives.js'
import { objectDef, stringDef, updateFromUserInput } from '../../../lib/item-input/index.js'


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
staticDef,
stringDef,
} from '../../item-input/index.js'
import { oauthAppScopeDef, redirectUrisDef, smartAppHelpText } from './apps-util-input-primitives.js'
import { oauthAppScopeDef, redirectUrisDef, smartAppHelpText } from './apps-input-primitives.js'
import type { InputAndOutputItemFlags } from '../input-and-output-item.js'
import { type SmartThingsCommandFlags, type SmartThingsCommand } from '../smartthings-command.js'

Expand Down
2 changes: 1 addition & 1 deletion src/lib/command/util/apps-user-input-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
updateFromUserInput,
} from '../../item-input/index.js'
import { type APICommand } from '../api-command.js'
import { smartAppHelpText } from './apps-util-input-primitives.js'
import { smartAppHelpText } from './apps-input-primitives.js'
import { type InputAndOutputItemFlags } from '../input-and-output-item.js'


Expand Down
2 changes: 1 addition & 1 deletion src/lib/command/util/schema-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { clipToMaximum, fatalError } from '../../util.js'
import { emailValidate, httpsURLValidate } from '../../validate-util.js'
import { type APICommand } from '../api-command.js'
import { chooseOrganization, organizationDef } from './organizations-util.js'
import { arnDef, webHookUrlDef } from './schema-util-input-primitives.js'
import { arnDef, webHookUrlDef } from './schema-input-primitives.js'
import { type ChooseFunction, createChooseFn } from './util-util.js'
import { stdinIsTTY, stdoutIsTTY } from '../../io-util.js'

Expand Down

0 comments on commit 3d1a1bd

Please sign in to comment.