Skip to content

Commit bfb3236

Browse files
committed
chore: change file structure for split and join commands
1 parent b849ef5 commit bfb3236

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1015
-819
lines changed

packages/cli/src/__tests__/commands/join.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {
88
} from '@redocly/openapi-core';
99
import { yellow } from 'colorette';
1010

11-
import { replace$Refs } from '../../commands/join/helpers/replace-$-refs.js';
1211
import { handleJoin } from '../../commands/join/index.js';
12+
import { replace$Refs } from '../../commands/join/utils/replace-$-refs.js';
1313
import { exitWithError } from '../../utils/error.js';
1414
import {
1515
getAndValidateFileExtension,

packages/cli/src/commands/join/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ import {
2626
writeToFileByExtension,
2727
} from '../../utils/miscellaneous.js';
2828
import type { CommandArgs } from '../../wrapper.js';
29-
import { COMPONENTS } from '../split/types.js';
29+
import { COMPONENTS } from '../split/constants.js';
30+
import type { JoinArgv, AnyOas3Definition } from './types.js';
3031
import {
3132
replace$Refs,
3233
getInfoPrefix,
@@ -38,8 +39,7 @@ import {
3839
collectComponents,
3940
collectWebhooks,
4041
addInfoSectionAndSpecVersion,
41-
} from './helpers/index.js';
42-
import type { JoinArgv, AnyOas3Definition } from './types.js';
42+
} from './utils/index.js';
4343

4444
export async function handleJoin({
4545
argv,

packages/cli/src/commands/join/helpers/add-components-prefix.ts renamed to packages/cli/src/commands/join/utils/add-components-prefix.ts

File renamed without changes.

packages/cli/src/commands/join/helpers/add-info-section.ts renamed to packages/cli/src/commands/join/utils/add-info-section.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { exitWithError } from '../../../utils/error.js';
2-
import { COMPONENTS } from '../../split/types.js';
2+
import { COMPONENTS } from '../../split/constants.js';
33
import { addComponentsPrefix } from './add-components-prefix.js';
44
import { getInfoPrefix } from './get-info-prefix.js';
55

File renamed without changes.

packages/cli/src/commands/join/helpers/add-security-prefix.ts renamed to packages/cli/src/commands/join/utils/add-security-prefix.ts

File renamed without changes.

packages/cli/src/commands/join/helpers/collect-components.ts renamed to packages/cli/src/commands/join/utils/collect-components.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { COMPONENTS } from '../../split/types.js';
1+
import { COMPONENTS } from '../../split/constants.js';
22
import type { AnyOas3Definition, JoinDocumentContext } from '../types.js';
33
import { addPrefix } from './add-prefix.js';
44

packages/cli/src/commands/join/helpers/collect-external-docs.ts renamed to packages/cli/src/commands/join/utils/collect-external-docs.ts

File renamed without changes.

packages/cli/src/commands/join/helpers/collect-paths.ts renamed to packages/cli/src/commands/join/utils/collect-paths.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import {
1010
} from '@redocly/openapi-core';
1111

1212
import { exitWithError } from '../../../utils/error.js';
13-
import { type Oas3Method, OPENAPI3_METHOD_NAMES } from '../../split/types.js';
13+
import { OPENAPI3_METHOD_NAMES } from '../../split/oas/constants.js';
14+
import { type Oas3Method } from '../../split/types.js';
1415
import type { AnyOas3Definition, JoinDocumentContext } from '../types.js';
1516
import { addPrefix } from './add-prefix.js';
1617
import { addSecurityPrefix } from './add-security-prefix.js';

packages/cli/src/commands/join/helpers/collect-webhooks.ts renamed to packages/cli/src/commands/join/utils/collect-webhooks.ts

File renamed without changes.

0 commit comments

Comments
 (0)