@redocly/cli 1.34.4 → 2.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -3
- package/bin/cli.js +1 -1
- package/lib/auth/device-flow.d.ts +1 -0
- package/lib/auth/device-flow.d.ts.map +1 -0
- package/lib/auth/device-flow.js +15 -17
- package/lib/auth/device-flow.js.map +1 -0
- package/lib/auth/oauth-client.d.ts +1 -0
- package/lib/auth/oauth-client.d.ts.map +1 -0
- package/lib/auth/oauth-client.js +21 -23
- package/lib/auth/oauth-client.js.map +1 -0
- package/lib/commands/auth.d.ts +3 -5
- package/lib/commands/auth.d.ts.map +1 -0
- package/lib/commands/auth.js +19 -44
- package/lib/commands/auth.js.map +1 -0
- package/lib/commands/build-docs/index.d.ts +4 -3
- package/lib/commands/build-docs/index.d.ts.map +1 -0
- package/lib/commands/build-docs/index.js +23 -24
- package/lib/commands/build-docs/index.js.map +1 -0
- package/lib/commands/build-docs/types.d.ts +2 -1
- package/lib/commands/build-docs/types.d.ts.map +1 -0
- package/lib/commands/build-docs/types.js +2 -2
- package/lib/commands/build-docs/types.js.map +1 -0
- package/lib/commands/build-docs/utils.d.ts +3 -2
- package/lib/commands/build-docs/utils.d.ts.map +1 -0
- package/lib/commands/build-docs/utils.js +35 -37
- package/lib/commands/build-docs/utils.js.map +1 -0
- package/lib/commands/bundle.d.ts +6 -3
- package/lib/commands/bundle.d.ts.map +1 -0
- package/lib/commands/bundle.js +34 -38
- package/lib/commands/bundle.js.map +1 -0
- package/lib/commands/eject.d.ts +3 -2
- package/lib/commands/eject.d.ts.map +1 -0
- package/lib/commands/eject.js +11 -13
- package/lib/commands/eject.js.map +1 -0
- package/lib/commands/join.d.ts +4 -3
- package/lib/commands/join.d.ts.map +1 -0
- package/lib/commands/join.js +79 -81
- package/lib/commands/join.js.map +1 -0
- package/lib/commands/lint.d.ts +8 -6
- package/lib/commands/lint.d.ts.map +1 -0
- package/lib/commands/lint.js +53 -62
- package/lib/commands/lint.js.map +1 -0
- package/lib/commands/preview-project/constants.d.ts +2 -1
- package/lib/commands/preview-project/constants.d.ts.map +1 -0
- package/lib/commands/preview-project/constants.js +4 -6
- package/lib/commands/preview-project/constants.js.map +1 -0
- package/lib/commands/preview-project/index.d.ts +3 -2
- package/lib/commands/preview-project/index.d.ts.map +1 -0
- package/lib/commands/preview-project/index.js +21 -23
- package/lib/commands/preview-project/index.js.map +1 -0
- package/lib/commands/preview-project/types.d.ts +3 -2
- package/lib/commands/preview-project/types.d.ts.map +1 -0
- package/lib/commands/preview-project/types.js +2 -2
- package/lib/commands/preview-project/types.js.map +1 -0
- package/lib/commands/split/index.d.ts +4 -3
- package/lib/commands/split/index.d.ts.map +1 -0
- package/lib/commands/split/index.js +53 -57
- package/lib/commands/split/index.js.map +1 -0
- package/lib/commands/split/types.d.ts +2 -2
- package/lib/commands/split/types.d.ts.map +1 -0
- package/lib/commands/split/types.js +11 -13
- package/lib/commands/split/types.js.map +1 -0
- package/lib/commands/stats.d.ts +3 -2
- package/lib/commands/stats.d.ts.map +1 -0
- package/lib/commands/stats.js +21 -24
- package/lib/commands/stats.js.map +1 -0
- package/lib/commands/translations.d.ts +3 -2
- package/lib/commands/translations.d.ts.map +1 -0
- package/lib/commands/translations.js +11 -13
- package/lib/commands/translations.js.map +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +109 -239
- package/lib/index.js.map +1 -0
- package/lib/otel.d.ts +2 -1
- package/lib/otel.d.ts.map +1 -0
- package/lib/otel.js +22 -23
- package/lib/otel.js.map +1 -0
- package/lib/reunite/api/api-client.d.ts +4 -3
- package/lib/reunite/api/api-client.d.ts.map +1 -0
- package/lib/reunite/api/api-client.js +14 -20
- package/lib/reunite/api/api-client.js.map +1 -0
- package/lib/reunite/api/api-keys.d.ts +2 -1
- package/lib/reunite/api/api-keys.d.ts.map +1 -0
- package/lib/reunite/api/api-keys.js +4 -20
- package/lib/reunite/api/api-keys.js.map +1 -0
- package/lib/reunite/api/domains.d.ts +5 -2
- package/lib/reunite/api/domains.d.ts.map +1 -0
- package/lib/reunite/api/domains.js +6 -15
- package/lib/reunite/api/domains.js.map +1 -0
- package/lib/reunite/api/index.d.ts +4 -3
- package/lib/reunite/api/index.d.ts.map +1 -0
- package/lib/reunite/api/index.js +4 -19
- package/lib/reunite/api/index.js.map +1 -0
- package/lib/reunite/api/types.d.ts +1 -0
- package/lib/reunite/api/types.d.ts.map +1 -0
- package/lib/reunite/api/types.js +2 -2
- package/lib/reunite/api/types.js.map +1 -0
- package/lib/reunite/commands/push-status.d.ts +6 -5
- package/lib/reunite/commands/push-status.d.ts.map +1 -0
- package/lib/reunite/commands/push-status.js +31 -37
- package/lib/reunite/commands/push-status.js.map +1 -0
- package/lib/reunite/commands/push.d.ts +6 -6
- package/lib/reunite/commands/push.d.ts.map +1 -0
- package/lib/reunite/commands/push.js +31 -40
- package/lib/reunite/commands/push.js.map +1 -0
- package/lib/reunite/commands/utils.d.ts +4 -3
- package/lib/reunite/commands/utils.d.ts.map +1 -0
- package/lib/reunite/commands/utils.js +9 -12
- package/lib/reunite/commands/utils.js.map +1 -0
- package/lib/reunite/utils.d.ts +1 -0
- package/lib/reunite/utils.d.ts.map +1 -0
- package/lib/reunite/utils.js +2 -5
- package/lib/reunite/utils.js.map +1 -0
- package/lib/types.d.ts +15 -27
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +2 -5
- package/lib/types.js.map +1 -0
- package/lib/utils/assert-node-version.d.ts +1 -0
- package/lib/utils/assert-node-version.d.ts.map +1 -0
- package/lib/utils/assert-node-version.js +8 -10
- package/lib/utils/assert-node-version.js.map +1 -0
- package/lib/utils/error.d.ts +4 -0
- package/lib/utils/error.d.ts.map +1 -0
- package/lib/utils/error.js +8 -0
- package/lib/utils/error.js.map +1 -0
- package/lib/utils/fetch-with-timeout.d.ts +1 -0
- package/lib/utils/fetch-with-timeout.d.ts.map +1 -0
- package/lib/utils/fetch-with-timeout.js +6 -8
- package/lib/utils/fetch-with-timeout.js.map +1 -0
- package/lib/utils/{getCommandNameFromArgs.d.ts → get-command-name-from-args.d.ts} +1 -0
- package/lib/utils/get-command-name-from-args.d.ts.map +1 -0
- package/lib/utils/get-command-name-from-args.js +4 -0
- package/lib/utils/get-command-name-from-args.js.map +1 -0
- package/lib/utils/js-utils.d.ts +1 -0
- package/lib/utils/js-utils.d.ts.map +1 -0
- package/lib/utils/js-utils.js +8 -12
- package/lib/utils/js-utils.js.map +1 -0
- package/lib/utils/miscellaneous.d.ts +9 -48
- package/lib/utils/miscellaneous.d.ts.map +1 -0
- package/lib/utils/miscellaneous.js +131 -269
- package/lib/utils/miscellaneous.js.map +1 -0
- package/lib/utils/package.d.ts +2 -0
- package/lib/utils/package.d.ts.map +1 -0
- package/lib/utils/package.js +4 -0
- package/lib/utils/package.js.map +1 -0
- package/lib/utils/platform.d.ts +1 -0
- package/lib/utils/platform.d.ts.map +1 -0
- package/lib/utils/platform.js +5 -9
- package/lib/utils/platform.js.map +1 -0
- package/lib/utils/proxy-agent.d.ts +3 -0
- package/lib/utils/proxy-agent.d.ts.map +1 -0
- package/lib/utils/proxy-agent.js +6 -0
- package/lib/utils/proxy-agent.js.map +1 -0
- package/lib/utils/spinner.d.ts +1 -0
- package/lib/utils/spinner.d.ts.map +1 -0
- package/lib/utils/spinner.js +8 -10
- package/lib/utils/spinner.js.map +1 -0
- package/lib/utils/telemetry.d.ts +40 -0
- package/lib/utils/telemetry.d.ts.map +1 -0
- package/lib/utils/telemetry.js +138 -0
- package/lib/utils/telemetry.js.map +1 -0
- package/lib/utils/update-version-notifier.d.ts +1 -1
- package/lib/utils/update-version-notifier.d.ts.map +1 -0
- package/lib/utils/update-version-notifier.js +35 -38
- package/lib/utils/update-version-notifier.js.map +1 -0
- package/lib/utils/validate-positive-number.d.ts +2 -0
- package/lib/utils/validate-positive-number.d.ts.map +1 -0
- package/lib/utils/validate-positive-number.js +13 -0
- package/lib/utils/validate-positive-number.js.map +1 -0
- package/lib/wrapper.d.ts +3 -3
- package/lib/wrapper.d.ts.map +1 -0
- package/lib/wrapper.js +39 -26
- package/lib/wrapper.js.map +1 -0
- package/package.json +16 -17
- package/CHANGELOG.md +0 -777
- package/lib/__mocks__/@redocly/openapi-core.d.ts +0 -99
- package/lib/__mocks__/@redocly/openapi-core.js +0 -84
- package/lib/__mocks__/documents.d.ts +0 -150
- package/lib/__mocks__/documents.js +0 -123
- package/lib/__mocks__/fs.d.ts +0 -8
- package/lib/__mocks__/fs.js +0 -9
- package/lib/__mocks__/perf_hooks.d.ts +0 -3
- package/lib/__mocks__/perf_hooks.js +0 -6
- package/lib/__mocks__/redoc.d.ts +0 -6
- package/lib/__mocks__/redoc.js +0 -5
- package/lib/__tests__/commands/build-docs.test.d.ts +0 -1
- package/lib/__tests__/commands/build-docs.test.js +0 -54
- package/lib/__tests__/commands/bundle.test.d.ts +0 -1
- package/lib/__tests__/commands/bundle.test.js +0 -235
- package/lib/__tests__/commands/join.test.d.ts +0 -1
- package/lib/__tests__/commands/join.test.js +0 -274
- package/lib/__tests__/commands/lint.test.d.ts +0 -1
- package/lib/__tests__/commands/lint.test.js +0 -149
- package/lib/__tests__/commands/push-region.test.d.ts +0 -1
- package/lib/__tests__/commands/push-region.test.js +0 -90
- package/lib/__tests__/commands/push.test.d.ts +0 -1
- package/lib/__tests__/commands/push.test.js +0 -496
- package/lib/__tests__/fetch-with-timeout.test.d.ts +0 -1
- package/lib/__tests__/fetch-with-timeout.test.js +0 -64
- package/lib/__tests__/fixtures/config.d.ts +0 -21
- package/lib/__tests__/fixtures/config.js +0 -24
- package/lib/__tests__/spinner.test.d.ts +0 -1
- package/lib/__tests__/spinner.test.js +0 -43
- package/lib/__tests__/utils.test.d.ts +0 -1
- package/lib/__tests__/utils.test.js +0 -651
- package/lib/__tests__/wrapper.test.d.ts +0 -1
- package/lib/__tests__/wrapper.test.js +0 -76
- package/lib/auth/__tests__/device-flow.test.d.ts +0 -1
- package/lib/auth/__tests__/device-flow.test.js +0 -62
- package/lib/auth/__tests__/oauth-client.test.d.ts +0 -1
- package/lib/auth/__tests__/oauth-client.test.js +0 -93
- package/lib/commands/preview-docs/index.d.ts +0 -12
- package/lib/commands/preview-docs/index.js +0 -127
- package/lib/commands/preview-docs/preview-server/default.hbs +0 -24
- package/lib/commands/preview-docs/preview-server/hot.js +0 -59
- package/lib/commands/preview-docs/preview-server/oauth2-redirect.html +0 -21
- package/lib/commands/preview-docs/preview-server/preview-server.d.ts +0 -5
- package/lib/commands/preview-docs/preview-server/preview-server.js +0 -113
- package/lib/commands/preview-docs/preview-server/server.d.ts +0 -22
- package/lib/commands/preview-docs/preview-server/server.js +0 -85
- package/lib/commands/push.d.ts +0 -44
- package/lib/commands/push.js +0 -301
- package/lib/commands/split/__tests__/index.test.d.ts +0 -1
- package/lib/commands/split/__tests__/index.test.js +0 -91
- package/lib/reunite/api/__tests__/api-keys.test.d.ts +0 -1
- package/lib/reunite/api/__tests__/api-keys.test.js +0 -26
- package/lib/reunite/api/__tests__/api.client.test.d.ts +0 -1
- package/lib/reunite/api/__tests__/api.client.test.js +0 -337
- package/lib/reunite/api/__tests__/domains.test.d.ts +0 -1
- package/lib/reunite/api/__tests__/domains.test.js +0 -32
- package/lib/reunite/commands/__tests__/push-status.test.d.ts +0 -1
- package/lib/reunite/commands/__tests__/push-status.test.js +0 -563
- package/lib/reunite/commands/__tests__/push.test.d.ts +0 -1
- package/lib/reunite/commands/__tests__/push.test.js +0 -315
- package/lib/reunite/commands/__tests__/utils.test.d.ts +0 -1
- package/lib/reunite/commands/__tests__/utils.test.js +0 -51
- package/lib/utils/__mocks__/miscellaneous.d.ts +0 -43
- package/lib/utils/__mocks__/miscellaneous.js +0 -24
- package/lib/utils/getCommandNameFromArgs.js +0 -6
- package/src/__mocks__/@redocly/openapi-core.ts +0 -88
- package/src/__mocks__/documents.ts +0 -124
- package/src/__mocks__/fs.ts +0 -6
- package/src/__mocks__/perf_hooks.ts +0 -3
- package/src/__mocks__/redoc.ts +0 -2
- package/src/__tests__/commands/build-docs.test.ts +0 -59
- package/src/__tests__/commands/bundle.test.ts +0 -285
- package/src/__tests__/commands/join.test.ts +0 -334
- package/src/__tests__/commands/lint.test.ts +0 -190
- package/src/__tests__/commands/push-region.test.ts +0 -104
- package/src/__tests__/commands/push.test.ts +0 -553
- package/src/__tests__/fetch-with-timeout.test.ts +0 -81
- package/src/__tests__/fixtures/config.ts +0 -21
- package/src/__tests__/fixtures/openapi.json +0 -0
- package/src/__tests__/fixtures/openapi.yaml +0 -0
- package/src/__tests__/fixtures/redocly.yaml +0 -0
- package/src/__tests__/spinner.test.ts +0 -51
- package/src/__tests__/utils.test.ts +0 -781
- package/src/__tests__/wrapper.test.ts +0 -91
- package/src/auth/__tests__/device-flow.test.ts +0 -73
- package/src/auth/__tests__/oauth-client.test.ts +0 -117
- package/src/auth/device-flow.ts +0 -175
- package/src/auth/oauth-client.ts +0 -111
- package/src/commands/auth.ts +0 -66
- package/src/commands/build-docs/index.ts +0 -55
- package/src/commands/build-docs/template.hbs +0 -23
- package/src/commands/build-docs/types.ts +0 -25
- package/src/commands/build-docs/utils.ts +0 -110
- package/src/commands/bundle.ts +0 -154
- package/src/commands/eject.ts +0 -42
- package/src/commands/join.ts +0 -794
- package/src/commands/lint.ts +0 -169
- package/src/commands/preview-docs/index.ts +0 -183
- package/src/commands/preview-docs/preview-server/default.hbs +0 -24
- package/src/commands/preview-docs/preview-server/hot.js +0 -59
- package/src/commands/preview-docs/preview-server/oauth2-redirect.html +0 -21
- package/src/commands/preview-docs/preview-server/preview-server.ts +0 -159
- package/src/commands/preview-docs/preview-server/server.ts +0 -92
- package/src/commands/preview-project/constants.ts +0 -23
- package/src/commands/preview-project/index.ts +0 -71
- package/src/commands/preview-project/types.ts +0 -12
- package/src/commands/push.ts +0 -470
- package/src/commands/split/__tests__/fixtures/samples.json +0 -61
- package/src/commands/split/__tests__/fixtures/spec.json +0 -70
- package/src/commands/split/__tests__/fixtures/webhooks.json +0 -85
- package/src/commands/split/__tests__/index.test.ts +0 -156
- package/src/commands/split/index.ts +0 -397
- package/src/commands/split/types.ts +0 -60
- package/src/commands/stats.ts +0 -140
- package/src/commands/translations.ts +0 -32
- package/src/custom.d.ts +0 -1
- package/src/index.ts +0 -970
- package/src/otel.ts +0 -59
- package/src/reunite/api/__tests__/api-keys.test.ts +0 -37
- package/src/reunite/api/__tests__/api.client.test.ts +0 -452
- package/src/reunite/api/__tests__/domains.test.ts +0 -41
- package/src/reunite/api/api-client.ts +0 -381
- package/src/reunite/api/api-keys.ts +0 -26
- package/src/reunite/api/domains.ts +0 -23
- package/src/reunite/api/index.ts +0 -3
- package/src/reunite/api/types.ts +0 -108
- package/src/reunite/commands/__tests__/push-status.test.ts +0 -653
- package/src/reunite/commands/__tests__/push.test.ts +0 -385
- package/src/reunite/commands/__tests__/utils.test.ts +0 -62
- package/src/reunite/commands/push-status.ts +0 -325
- package/src/reunite/commands/push.ts +0 -235
- package/src/reunite/commands/utils.ts +0 -66
- package/src/reunite/utils.ts +0 -1
- package/src/types.ts +0 -64
- package/src/utils/__mocks__/miscellaneous.ts +0 -24
- package/src/utils/assert-node-version.ts +0 -19
- package/src/utils/fetch-with-timeout.ts +0 -30
- package/src/utils/getCommandNameFromArgs.ts +0 -5
- package/src/utils/js-utils.ts +0 -24
- package/src/utils/miscellaneous.ts +0 -729
- package/src/utils/platform.ts +0 -31
- package/src/utils/spinner.ts +0 -50
- package/src/utils/update-version-notifier.ts +0 -115
- package/src/wrapper.ts +0 -77
- package/tsconfig.json +0 -9
- package/tsconfig.tsbuildinfo +0 -1
package/lib/index.js
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import * as dotenv from 'dotenv';
|
|
4
|
+
import './utils/assert-node-version.js';
|
|
5
|
+
import yargs from 'yargs';
|
|
6
|
+
import { hideBin } from 'yargs/helpers';
|
|
7
|
+
import { logger } from '@redocly/openapi-core';
|
|
8
|
+
import { outputExtensions } from './types.js';
|
|
9
|
+
import { handleStats } from './commands/stats.js';
|
|
10
|
+
import { handleSplit } from './commands/split/index.js';
|
|
11
|
+
import { handleJoin } from './commands/join.js';
|
|
12
|
+
import { handlePush } from './reunite/commands/push.js';
|
|
13
|
+
import { handlePushStatus } from './reunite/commands/push-status.js';
|
|
14
|
+
import { handleLint } from './commands/lint.js';
|
|
15
|
+
import { handleBundle } from './commands/bundle.js';
|
|
16
|
+
import { handleLogin, handleLogout } from './commands/auth.js';
|
|
17
|
+
import { handlerBuildCommand } from './commands/build-docs/index.js';
|
|
18
|
+
import { cacheLatestVersion, notifyUpdateCliVersion } from './utils/update-version-notifier.js';
|
|
19
|
+
import { commandWrapper } from './wrapper.js';
|
|
20
|
+
import { previewProject } from './commands/preview-project/index.js';
|
|
21
|
+
import { handleTranslations } from './commands/translations.js';
|
|
22
|
+
import { handleEject } from './commands/eject.js';
|
|
23
|
+
import { PRODUCT_PLANS } from './commands/preview-project/constants.js';
|
|
24
|
+
import { version } from './utils/package.js';
|
|
25
|
+
import { validatePositiveNumber } from './utils/validate-positive-number.js';
|
|
26
26
|
dotenv.config({ path: path.resolve(process.cwd(), './.env') });
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
(
|
|
31
|
-
yargs
|
|
32
|
-
.version('version', 'Show version number.', update_version_notifier_1.version)
|
|
27
|
+
cacheLatestVersion();
|
|
28
|
+
// TODO: word wrapping is broken (https://github.com/yargs/yargs/issues/2112)
|
|
29
|
+
yargs(hideBin(process.argv))
|
|
30
|
+
.version('version', 'Show version number.', version)
|
|
33
31
|
.help('help', 'Show help.')
|
|
34
|
-
.parserConfiguration({ 'greedy-arrays': false
|
|
35
|
-
.command('stats [api]', 'Show statistics for an API description.', (yargs) => yargs
|
|
32
|
+
.parserConfiguration({ 'greedy-arrays': false })
|
|
33
|
+
.command('stats [api]', 'Show statistics for an API description.', (yargs) => yargs
|
|
34
|
+
.env('REDOCLY_CLI_STATS')
|
|
35
|
+
.positional('api', { type: 'string' })
|
|
36
|
+
.option({
|
|
36
37
|
config: { description: 'Path to the config file.', type: 'string' },
|
|
37
38
|
'lint-config': {
|
|
38
39
|
description: 'Severity level for config file linting.',
|
|
@@ -46,9 +47,10 @@ yargs
|
|
|
46
47
|
},
|
|
47
48
|
}), (argv) => {
|
|
48
49
|
process.env.REDOCLY_CLI_COMMAND = 'stats';
|
|
49
|
-
|
|
50
|
+
commandWrapper(handleStats)(argv);
|
|
50
51
|
})
|
|
51
52
|
.command('split [api]', 'Split an API description into a multi-file structure.', (yargs) => yargs
|
|
53
|
+
.env('REDOCLY_CLI_SPLIT')
|
|
52
54
|
.positional('api', {
|
|
53
55
|
description: 'API description file that you want to split',
|
|
54
56
|
type: 'string',
|
|
@@ -78,9 +80,10 @@ yargs
|
|
|
78
80
|
})
|
|
79
81
|
.demandOption('api'), (argv) => {
|
|
80
82
|
process.env.REDOCLY_CLI_COMMAND = 'split';
|
|
81
|
-
|
|
83
|
+
commandWrapper(handleSplit)(argv);
|
|
82
84
|
})
|
|
83
85
|
.command('join [apis...]', 'Join multiple API descriptions into one [experimental].', (yargs) => yargs
|
|
86
|
+
.env('REDOCLY_CLI_JOIN')
|
|
84
87
|
.positional('apis', {
|
|
85
88
|
array: true,
|
|
86
89
|
type: 'string',
|
|
@@ -121,42 +124,15 @@ yargs
|
|
|
121
124
|
choices: ['warn', 'error', 'off'],
|
|
122
125
|
default: 'warn',
|
|
123
126
|
},
|
|
124
|
-
lint: {
|
|
125
|
-
hidden: true,
|
|
126
|
-
deprecated: true,
|
|
127
|
-
},
|
|
128
|
-
decorate: {
|
|
129
|
-
hidden: true,
|
|
130
|
-
deprecated: true,
|
|
131
|
-
},
|
|
132
|
-
preprocess: {
|
|
133
|
-
hidden: true,
|
|
134
|
-
deprecated: true,
|
|
135
|
-
},
|
|
136
127
|
}), (argv) => {
|
|
137
|
-
|
|
138
|
-
const DECORATORS_DOCUMENTATION_LINK = 'https://redocly.com/docs/cli/decorators/#decorators';
|
|
139
|
-
const JOIN_COMMAND_DOCUMENTATION_LINK = 'https://redocly.com/docs/cli/commands/join/#join';
|
|
140
|
-
DEPRECATED_OPTIONS.forEach((option) => {
|
|
141
|
-
if (argv[option]) {
|
|
142
|
-
process.stdout.write(`${colors.red(`Option --${option} is no longer supported. Please review join command documentation ${JOIN_COMMAND_DOCUMENTATION_LINK}.`)}`);
|
|
143
|
-
process.stdout.write('\n\n');
|
|
144
|
-
if (['preprocess', 'decorate'].includes(option)) {
|
|
145
|
-
process.stdout.write(`${colors.red(`If you are looking for decorators, please review the decorators documentation ${DECORATORS_DOCUMENTATION_LINK}.`)}`);
|
|
146
|
-
process.stdout.write('\n\n');
|
|
147
|
-
}
|
|
148
|
-
yargs.showHelp();
|
|
149
|
-
process.exit(1);
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
process.env.REDOCLY_CLI_COMMAND = 'join';
|
|
153
|
-
(0, wrapper_1.commandWrapper)(join_1.handleJoin)(argv);
|
|
128
|
+
commandWrapper(handleJoin)(argv);
|
|
154
129
|
})
|
|
155
130
|
.command('push-status [pushId]', false, (yargs) => yargs
|
|
131
|
+
.env('REDOCLY_CLI_PUSH_STATUS')
|
|
156
132
|
.positional('pushId', {
|
|
157
133
|
description: 'Push id.',
|
|
158
134
|
type: 'string',
|
|
159
|
-
|
|
135
|
+
demandOption: true,
|
|
160
136
|
})
|
|
161
137
|
.implies('max-execution-time', 'wait')
|
|
162
138
|
.option({
|
|
@@ -164,6 +140,7 @@ yargs
|
|
|
164
140
|
description: 'Name of the organization to push to.',
|
|
165
141
|
type: 'string',
|
|
166
142
|
alias: 'o',
|
|
143
|
+
required: true,
|
|
167
144
|
},
|
|
168
145
|
project: {
|
|
169
146
|
description: 'Name of the project to push to.',
|
|
@@ -180,6 +157,7 @@ yargs
|
|
|
180
157
|
'max-execution-time': {
|
|
181
158
|
description: 'Maximum execution time in seconds.',
|
|
182
159
|
type: 'number',
|
|
160
|
+
coerce: validatePositiveNumber('max-execution-time'),
|
|
183
161
|
},
|
|
184
162
|
'continue-on-deploy-failures': {
|
|
185
163
|
description: 'Command does not fail even if the deployment fails.',
|
|
@@ -193,81 +171,21 @@ yargs
|
|
|
193
171
|
},
|
|
194
172
|
}), (argv) => {
|
|
195
173
|
process.env.REDOCLY_CLI_COMMAND = 'push-status';
|
|
196
|
-
|
|
174
|
+
commandWrapper(handlePushStatus)(argv);
|
|
197
175
|
})
|
|
198
|
-
.command('push [
|
|
199
|
-
.
|
|
176
|
+
.command('push [files...]', 'Push documents to Reunite.', (yargs) => yargs
|
|
177
|
+
.env('REDOCLY_CLI_PUSH')
|
|
178
|
+
.positional('files', {
|
|
200
179
|
type: 'string',
|
|
201
180
|
array: true,
|
|
202
|
-
|
|
203
|
-
default: [],
|
|
181
|
+
demandOption: true,
|
|
204
182
|
})
|
|
205
|
-
.hide('project')
|
|
206
|
-
.hide('domain')
|
|
207
|
-
.hide('mount-path')
|
|
208
|
-
.hide('author')
|
|
209
|
-
.hide('message')
|
|
210
|
-
.hide('default-branch')
|
|
211
|
-
.hide('verbose')
|
|
212
|
-
.hide('commit-sha')
|
|
213
|
-
.hide('commit-url')
|
|
214
|
-
.hide('namespace')
|
|
215
|
-
.hide('repository')
|
|
216
|
-
.hide('wait-for-deployment')
|
|
217
|
-
.hide('created-at')
|
|
218
|
-
.hide('max-execution-time')
|
|
219
|
-
.deprecateOption('batch-id', 'use --job-id')
|
|
220
|
-
.implies('job-id', 'batch-size')
|
|
221
|
-
.implies('batch-id', 'batch-size')
|
|
222
|
-
.implies('batch-size', 'job-id')
|
|
223
|
-
.implies('max-execution-time', 'wait-for-deployment')
|
|
224
183
|
.option({
|
|
225
|
-
destination: {
|
|
226
|
-
description: 'API name and version in the format `name@version`.',
|
|
227
|
-
type: 'string',
|
|
228
|
-
alias: 'd',
|
|
229
|
-
},
|
|
230
184
|
branch: {
|
|
231
185
|
description: 'Branch name to push to.',
|
|
232
186
|
type: 'string',
|
|
233
187
|
alias: 'b',
|
|
234
|
-
|
|
235
|
-
upsert: {
|
|
236
|
-
description: "Create the specified API version if it doesn't exist, update if it does exist.",
|
|
237
|
-
type: 'boolean',
|
|
238
|
-
alias: 'u',
|
|
239
|
-
},
|
|
240
|
-
'batch-id': {
|
|
241
|
-
description: 'Specifies the ID of the CI job that the current push will be associated with.',
|
|
242
|
-
type: 'string',
|
|
243
|
-
requiresArg: true,
|
|
244
|
-
deprecated: true,
|
|
245
|
-
hidden: true,
|
|
246
|
-
},
|
|
247
|
-
'job-id': {
|
|
248
|
-
description: 'ID of the CI job that the current push will be associated with.',
|
|
249
|
-
type: 'string',
|
|
250
|
-
requiresArg: true,
|
|
251
|
-
},
|
|
252
|
-
'batch-size': {
|
|
253
|
-
description: 'Number of CI pushes to expect in a batch.',
|
|
254
|
-
type: 'number',
|
|
255
|
-
requiresArg: true,
|
|
256
|
-
},
|
|
257
|
-
region: { description: 'Specify a region.', alias: 'r', choices: types_1.regionChoices },
|
|
258
|
-
'skip-decorator': {
|
|
259
|
-
description: 'Ignore certain decorators.',
|
|
260
|
-
array: true,
|
|
261
|
-
type: 'string',
|
|
262
|
-
},
|
|
263
|
-
public: {
|
|
264
|
-
description: 'Make the API description available to the public',
|
|
265
|
-
type: 'boolean',
|
|
266
|
-
},
|
|
267
|
-
files: {
|
|
268
|
-
description: 'List of other folders and files to upload',
|
|
269
|
-
array: true,
|
|
270
|
-
type: 'string',
|
|
188
|
+
required: true,
|
|
271
189
|
},
|
|
272
190
|
'lint-config': {
|
|
273
191
|
description: 'Severity level for config file linting.',
|
|
@@ -278,26 +196,31 @@ yargs
|
|
|
278
196
|
description: 'Name of the organization to push to.',
|
|
279
197
|
type: 'string',
|
|
280
198
|
alias: 'o',
|
|
199
|
+
required: true,
|
|
281
200
|
},
|
|
282
201
|
project: {
|
|
283
202
|
description: 'Name of the project to push to.',
|
|
284
203
|
type: 'string',
|
|
285
204
|
alias: 'p',
|
|
205
|
+
required: true,
|
|
286
206
|
},
|
|
287
207
|
'mount-path': {
|
|
288
208
|
description: 'The path files should be pushed to.',
|
|
289
209
|
type: 'string',
|
|
290
210
|
alias: 'mp',
|
|
211
|
+
required: true,
|
|
291
212
|
},
|
|
292
213
|
author: {
|
|
293
214
|
description: 'Author of the commit.',
|
|
294
215
|
type: 'string',
|
|
295
216
|
alias: 'a',
|
|
217
|
+
required: true,
|
|
296
218
|
},
|
|
297
219
|
message: {
|
|
298
220
|
description: 'Commit message.',
|
|
299
221
|
type: 'string',
|
|
300
222
|
alias: 'm',
|
|
223
|
+
required: true,
|
|
301
224
|
},
|
|
302
225
|
'commit-sha': {
|
|
303
226
|
description: 'Commit SHA.',
|
|
@@ -334,6 +257,7 @@ yargs
|
|
|
334
257
|
'max-execution-time': {
|
|
335
258
|
description: 'Maximum execution time in seconds.',
|
|
336
259
|
type: 'number',
|
|
260
|
+
coerce: validatePositiveNumber('max-execution-time'),
|
|
337
261
|
},
|
|
338
262
|
'wait-for-deployment': {
|
|
339
263
|
description: 'Wait for build to finish.',
|
|
@@ -351,9 +275,12 @@ yargs
|
|
|
351
275
|
},
|
|
352
276
|
}), (argv) => {
|
|
353
277
|
process.env.REDOCLY_CLI_COMMAND = 'push';
|
|
354
|
-
|
|
278
|
+
commandWrapper(handlePush)(argv);
|
|
355
279
|
})
|
|
356
|
-
.command('lint [apis...]', 'Lint an API or Arazzo description.', (yargs) => yargs
|
|
280
|
+
.command('lint [apis...]', 'Lint an API or Arazzo description.', (yargs) => yargs
|
|
281
|
+
.env('REDOCLY_CLI_LINT')
|
|
282
|
+
.positional('apis', { array: true, type: 'string', demandOption: true })
|
|
283
|
+
.option({
|
|
357
284
|
format: {
|
|
358
285
|
description: 'Use a specific output format.',
|
|
359
286
|
choices: [
|
|
@@ -406,9 +333,10 @@ yargs
|
|
|
406
333
|
},
|
|
407
334
|
}), (argv) => {
|
|
408
335
|
process.env.REDOCLY_CLI_COMMAND = 'lint';
|
|
409
|
-
|
|
336
|
+
commandWrapper(handleLint)(argv);
|
|
410
337
|
})
|
|
411
338
|
.command('bundle [apis...]', 'Bundle a multi-file API description to a single file.', (yargs) => yargs
|
|
339
|
+
.env('REDOCLY_CLI_BUNDLE')
|
|
412
340
|
.positional('apis', { array: true, type: 'string', demandOption: true })
|
|
413
341
|
.options({
|
|
414
342
|
output: {
|
|
@@ -419,7 +347,7 @@ yargs
|
|
|
419
347
|
ext: {
|
|
420
348
|
description: 'Bundle file extension.',
|
|
421
349
|
requiresArg: true,
|
|
422
|
-
choices:
|
|
350
|
+
choices: outputExtensions,
|
|
423
351
|
},
|
|
424
352
|
'skip-preprocessor': {
|
|
425
353
|
description: 'Ignore certain preprocessors.',
|
|
@@ -471,24 +399,6 @@ yargs
|
|
|
471
399
|
choices: ['warn', 'error', 'off'],
|
|
472
400
|
default: 'warn',
|
|
473
401
|
},
|
|
474
|
-
format: {
|
|
475
|
-
hidden: true,
|
|
476
|
-
deprecated: true,
|
|
477
|
-
},
|
|
478
|
-
lint: {
|
|
479
|
-
hidden: true,
|
|
480
|
-
deprecated: true,
|
|
481
|
-
},
|
|
482
|
-
'skip-rule': {
|
|
483
|
-
hidden: true,
|
|
484
|
-
deprecated: true,
|
|
485
|
-
array: true,
|
|
486
|
-
type: 'string',
|
|
487
|
-
},
|
|
488
|
-
'max-problems': {
|
|
489
|
-
hidden: true,
|
|
490
|
-
deprecated: true,
|
|
491
|
-
},
|
|
492
402
|
})
|
|
493
403
|
.check((argv) => {
|
|
494
404
|
if (argv.output && (!argv.apis || argv.apis.length === 0)) {
|
|
@@ -496,20 +406,9 @@ yargs
|
|
|
496
406
|
}
|
|
497
407
|
return true;
|
|
498
408
|
}), (argv) => {
|
|
499
|
-
|
|
500
|
-
const LINT_AND_BUNDLE_DOCUMENTATION_LINK = 'https://redocly.com/docs/cli/guides/lint-and-bundle/#lint-and-bundle-api-descriptions-with-redocly-cli';
|
|
501
|
-
DEPRECATED_OPTIONS.forEach((option) => {
|
|
502
|
-
if (argv[option]) {
|
|
503
|
-
process.stdout.write(`${colors.red(`Option --${option} is no longer supported. Please use separate commands, as described in the ${LINT_AND_BUNDLE_DOCUMENTATION_LINK}.`)}`);
|
|
504
|
-
process.stdout.write('\n\n');
|
|
505
|
-
yargs.showHelp();
|
|
506
|
-
process.exit(1);
|
|
507
|
-
}
|
|
508
|
-
});
|
|
509
|
-
process.env.REDOCLY_CLI_COMMAND = 'bundle';
|
|
510
|
-
(0, wrapper_1.commandWrapper)(bundle_1.handleBundle)(argv);
|
|
409
|
+
commandWrapper(handleBundle)(argv);
|
|
511
410
|
})
|
|
512
|
-
.command('check-config', 'Lint the Redocly configuration file.', async (yargs) => yargs.option({
|
|
411
|
+
.command('check-config', 'Lint the Redocly configuration file.', async (yargs) => yargs.env('REDOCLY_CLI_CHECK_CONFIG').option({
|
|
513
412
|
config: {
|
|
514
413
|
description: 'Path to the config file.',
|
|
515
414
|
type: 'string',
|
|
@@ -521,16 +420,12 @@ yargs
|
|
|
521
420
|
},
|
|
522
421
|
}), (argv) => {
|
|
523
422
|
process.env.REDOCLY_CLI_COMMAND = 'check-config';
|
|
524
|
-
|
|
423
|
+
commandWrapper()(argv);
|
|
525
424
|
})
|
|
526
|
-
.command('login', 'Log in to Redocly.', async (yargs) => yargs.options({
|
|
527
|
-
verbose: {
|
|
528
|
-
description: 'Include additional output.',
|
|
529
|
-
type: 'boolean',
|
|
530
|
-
},
|
|
425
|
+
.command('login', 'Log in to Redocly.', async (yargs) => yargs.env('REDOCLY_CLI_LOGIN').options({
|
|
531
426
|
residency: {
|
|
532
427
|
description: 'Residency of the application. Defaults to `us`.',
|
|
533
|
-
alias: ['r'
|
|
428
|
+
alias: ['r'],
|
|
534
429
|
type: 'string',
|
|
535
430
|
},
|
|
536
431
|
config: {
|
|
@@ -538,19 +433,15 @@ yargs
|
|
|
538
433
|
requiresArg: true,
|
|
539
434
|
type: 'string',
|
|
540
435
|
},
|
|
541
|
-
next: {
|
|
542
|
-
description: 'Use Reunite application to login.',
|
|
543
|
-
type: 'boolean',
|
|
544
|
-
},
|
|
545
436
|
}), (argv) => {
|
|
546
437
|
process.env.REDOCLY_CLI_COMMAND = 'login';
|
|
547
|
-
|
|
438
|
+
commandWrapper(handleLogin)(argv);
|
|
548
439
|
})
|
|
549
|
-
.command('logout', 'Clear your stored credentials
|
|
440
|
+
.command('logout', 'Clear your stored credentials.', (yargs) => yargs, (argv) => {
|
|
550
441
|
process.env.REDOCLY_CLI_COMMAND = 'logout';
|
|
551
|
-
|
|
442
|
+
commandWrapper(handleLogout)(argv);
|
|
552
443
|
})
|
|
553
|
-
.command('preview', 'Preview Redocly project using one of the product NPM packages.', (yargs) => yargs.options({
|
|
444
|
+
.command('preview', 'Preview Redocly project using one of the product NPM packages.', (yargs) => yargs.env('REDOCLY_CLI_PREVIEW').options({
|
|
554
445
|
product: {
|
|
555
446
|
type: 'string',
|
|
556
447
|
choices: ['redoc', 'revel', 'reef', 'realm', 'redoc-revel', 'redoc-reef', 'revel-reef'],
|
|
@@ -558,7 +449,7 @@ yargs
|
|
|
558
449
|
},
|
|
559
450
|
plan: {
|
|
560
451
|
type: 'string',
|
|
561
|
-
choices:
|
|
452
|
+
choices: PRODUCT_PLANS,
|
|
562
453
|
default: 'enterprise',
|
|
563
454
|
},
|
|
564
455
|
port: {
|
|
@@ -566,6 +457,7 @@ yargs
|
|
|
566
457
|
type: 'number',
|
|
567
458
|
description: 'Preview port.',
|
|
568
459
|
default: 4000,
|
|
460
|
+
coerce: validatePositiveNumber('port', true),
|
|
569
461
|
},
|
|
570
462
|
'project-dir': {
|
|
571
463
|
alias: ['d', 'source-dir'],
|
|
@@ -580,54 +472,9 @@ yargs
|
|
|
580
472
|
},
|
|
581
473
|
}), (argv) => {
|
|
582
474
|
if (process.argv.some((arg) => arg.startsWith('--source-dir'))) {
|
|
583
|
-
|
|
475
|
+
logger.error('Option --source-dir is deprecated and will be removed soon. Use --project-dir instead.\n');
|
|
584
476
|
}
|
|
585
|
-
|
|
586
|
-
})
|
|
587
|
-
.command('preview-docs [api]', 'Preview API reference docs for an API description.', (yargs) => yargs.positional('api', { type: 'string' }).options({
|
|
588
|
-
port: {
|
|
589
|
-
alias: 'p',
|
|
590
|
-
type: 'number',
|
|
591
|
-
default: 8080,
|
|
592
|
-
description: 'Preview port.',
|
|
593
|
-
},
|
|
594
|
-
host: {
|
|
595
|
-
alias: 'h',
|
|
596
|
-
type: 'string',
|
|
597
|
-
default: '127.0.0.1',
|
|
598
|
-
description: 'Preview host.',
|
|
599
|
-
},
|
|
600
|
-
'skip-preprocessor': {
|
|
601
|
-
description: 'Ignore certain preprocessors.',
|
|
602
|
-
array: true,
|
|
603
|
-
type: 'string',
|
|
604
|
-
},
|
|
605
|
-
'skip-decorator': {
|
|
606
|
-
description: 'Ignore certain decorators.',
|
|
607
|
-
array: true,
|
|
608
|
-
type: 'string',
|
|
609
|
-
},
|
|
610
|
-
'use-community-edition': {
|
|
611
|
-
description: 'Use Redoc CE for documentation preview.',
|
|
612
|
-
type: 'boolean',
|
|
613
|
-
},
|
|
614
|
-
force: {
|
|
615
|
-
alias: 'f',
|
|
616
|
-
type: 'boolean',
|
|
617
|
-
description: 'Produce bundle output even when errors occur.',
|
|
618
|
-
},
|
|
619
|
-
config: {
|
|
620
|
-
description: 'Path to the config file.',
|
|
621
|
-
type: 'string',
|
|
622
|
-
},
|
|
623
|
-
'lint-config': {
|
|
624
|
-
description: 'Severity level for config file linting.',
|
|
625
|
-
choices: ['warn', 'error', 'off'],
|
|
626
|
-
default: 'warn',
|
|
627
|
-
},
|
|
628
|
-
}), (argv) => {
|
|
629
|
-
process.env.REDOCLY_CLI_COMMAND = 'preview-docs';
|
|
630
|
-
(0, wrapper_1.commandWrapper)(preview_docs_1.previewDocs)(argv);
|
|
477
|
+
commandWrapper(previewProject)(argv);
|
|
631
478
|
})
|
|
632
479
|
.command('build-docs [api]', 'Produce API documentation as an HTML file', (yargs) => yargs
|
|
633
480
|
.positional('api', { type: 'string' })
|
|
@@ -649,7 +496,7 @@ yargs
|
|
|
649
496
|
},
|
|
650
497
|
t: {
|
|
651
498
|
alias: 'template',
|
|
652
|
-
describe: 'Path to handlebars page template, see https://github.com/Redocly/redocly-cli/blob/
|
|
499
|
+
describe: 'Path to handlebars page template, see https://github.com/Redocly/redocly-cli/blob/main/packages/cli/src/commands/build-docs/template.hbs for the example.',
|
|
653
500
|
type: 'string',
|
|
654
501
|
},
|
|
655
502
|
templateOptions: {
|
|
@@ -674,9 +521,10 @@ yargs
|
|
|
674
521
|
return true;
|
|
675
522
|
}), async (argv) => {
|
|
676
523
|
process.env.REDOCLY_CLI_COMMAND = 'build-docs';
|
|
677
|
-
|
|
524
|
+
commandWrapper(handlerBuildCommand)(argv);
|
|
678
525
|
})
|
|
679
526
|
.command('translate <locale>', 'Creates or updates translations.yaml files and fills them with missing built-in translations and translations from the redocly.yaml and sidebars.yaml files.', (yargs) => yargs
|
|
527
|
+
.env('REDOCLY_CLI_TRANSLATE')
|
|
680
528
|
.positional('locale', {
|
|
681
529
|
description: 'Locale code to generate translations for, or `all` for all current project locales.',
|
|
682
530
|
type: 'string',
|
|
@@ -696,9 +544,10 @@ yargs
|
|
|
696
544
|
},
|
|
697
545
|
}), (argv) => {
|
|
698
546
|
process.env.REDOCLY_CLI_COMMAND = 'translate';
|
|
699
|
-
|
|
547
|
+
commandWrapper(handleTranslations)(argv);
|
|
700
548
|
})
|
|
701
549
|
.command('eject <type> [path]', 'Helper function to eject project elements for customization.', (yargs) => yargs
|
|
550
|
+
.env('REDOCLY_CLI_EJECT')
|
|
702
551
|
.positional('type', {
|
|
703
552
|
description: 'Specifies what type of project element to eject. Currently this value must be `component`.',
|
|
704
553
|
demandOption: true,
|
|
@@ -727,17 +576,17 @@ yargs
|
|
|
727
576
|
},
|
|
728
577
|
}), (argv) => {
|
|
729
578
|
process.env.REDOCLY_CLI_COMMAND = 'eject';
|
|
730
|
-
|
|
579
|
+
commandWrapper(handleEject)(argv);
|
|
731
580
|
})
|
|
732
581
|
.command('respect [files...]', 'Run Arazzo tests.', (yargs) => {
|
|
733
582
|
return yargs
|
|
583
|
+
.env('REDOCLY_CLI_RESPECT')
|
|
734
584
|
.positional('files', {
|
|
735
585
|
describe: 'Test files or glob pattern.',
|
|
736
586
|
type: 'string',
|
|
737
587
|
array: true,
|
|
738
588
|
default: [],
|
|
739
589
|
})
|
|
740
|
-
.env('REDOCLY_CLI_RESPECT')
|
|
741
590
|
.options({
|
|
742
591
|
input: {
|
|
743
592
|
alias: 'i',
|
|
@@ -769,10 +618,12 @@ yargs
|
|
|
769
618
|
'har-output': {
|
|
770
619
|
describe: 'Har file output name.',
|
|
771
620
|
type: 'string',
|
|
621
|
+
alias: 'H',
|
|
772
622
|
},
|
|
773
623
|
'json-output': {
|
|
774
624
|
describe: 'JSON file output name.',
|
|
775
625
|
type: 'string',
|
|
626
|
+
alias: 'J',
|
|
776
627
|
},
|
|
777
628
|
'client-cert': {
|
|
778
629
|
describe: 'Mutual TLS client certificate.',
|
|
@@ -790,19 +641,37 @@ yargs
|
|
|
790
641
|
describe: 'Severity of the check.',
|
|
791
642
|
type: 'string',
|
|
792
643
|
},
|
|
644
|
+
'max-steps': {
|
|
645
|
+
describe: 'Maximum number of steps to run (default: 2000).',
|
|
646
|
+
type: 'number',
|
|
647
|
+
default: 2000,
|
|
648
|
+
coerce: validatePositiveNumber('max-steps', true),
|
|
649
|
+
},
|
|
650
|
+
'max-fetch-timeout': {
|
|
651
|
+
describe: 'Maximum time to wait for API response per request in milliseconds (default: 40 seconds).',
|
|
652
|
+
type: 'number',
|
|
653
|
+
default: 40_000,
|
|
654
|
+
coerce: validatePositiveNumber('max-fetch-timeout', false),
|
|
655
|
+
},
|
|
656
|
+
'execution-timeout': {
|
|
657
|
+
describe: 'Maximum time to wait for the Respect execution in milliseconds (default: 1 hour).',
|
|
658
|
+
type: 'number',
|
|
659
|
+
default: 3_600_000,
|
|
660
|
+
coerce: validatePositiveNumber('execution-timeout', false),
|
|
661
|
+
},
|
|
793
662
|
});
|
|
794
663
|
}, async (argv) => {
|
|
795
664
|
process.env.REDOCLY_CLI_COMMAND = 'respect';
|
|
796
|
-
const { handleRun } = await
|
|
797
|
-
|
|
665
|
+
const { handleRun } = await import('@redocly/respect-core');
|
|
666
|
+
commandWrapper(handleRun)(argv);
|
|
798
667
|
})
|
|
799
668
|
.command('generate-arazzo <descriptionPath>', 'Auto-generate arazzo description file from an API description.', (yargs) => {
|
|
800
669
|
return yargs
|
|
670
|
+
.env('REDOCLY_CLI_GENERATE_ARAZZO')
|
|
801
671
|
.positional('descriptionPath', {
|
|
802
672
|
describe: 'Description file path.',
|
|
803
673
|
type: 'string',
|
|
804
674
|
})
|
|
805
|
-
.env('REDOCLY_CLI_RESPECT')
|
|
806
675
|
.options({
|
|
807
676
|
'output-file': {
|
|
808
677
|
alias: 'o',
|
|
@@ -813,10 +682,11 @@ yargs
|
|
|
813
682
|
});
|
|
814
683
|
}, async (argv) => {
|
|
815
684
|
process.env.REDOCLY_CLI_COMMAND = 'generate-arazzo';
|
|
816
|
-
const { handleGenerate } = await
|
|
817
|
-
|
|
685
|
+
const { handleGenerate } = await import('@redocly/respect-core');
|
|
686
|
+
commandWrapper(handleGenerate)(argv);
|
|
818
687
|
})
|
|
819
688
|
.completion('completion', 'Generate autocomplete script for `redocly` command.')
|
|
820
689
|
.demandCommand(1)
|
|
821
|
-
.middleware([
|
|
690
|
+
.middleware([notifyUpdateCliVersion])
|
|
822
691
|
.strict().argv;
|
|
692
|
+
//# sourceMappingURL=index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E,wBAAwB;QAClC,IAAI,EAAE,QAAQ;KACf,CAAC;SACD,OAAO,CAAC;QACP,aAAa,EAAE;YACb,KAAK,EAAE,GAAG;YACV,QAAQ,EAAE,mBAAmB;YAC7B,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,IAAI;SAClB;KACF,CAAC,CAAC;AACP,CAAC,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;IACb,OAAO,CAAC,GAAG,CAAC,mBAAmB,GAAG,iBAAiB,CAAC;IACpD,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;IACjE,cAAc,CAAC,cAAc,CAAC,CAAC,IAA4C,CAAC,CAAC;AAC/E,CAAC,CACF;KACA,UAAU,CAAC,YAAY,EAAE,qDAAqD,CAAC;KAC/E,aAAa,CAAC,CAAC,CAAC;KAChB,UAAU,CAAC,CAAC,sBAAsB,CAAC,CAAC;KACpC,MAAM,EAAE,CAAC,IAAI,CAAC"}
|
package/lib/otel.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Analytics } from './utils/
|
|
1
|
+
import type { Analytics } from './utils/telemetry.js';
|
|
2
2
|
type Events = {
|
|
3
3
|
[key: string]: Analytics;
|
|
4
4
|
};
|
|
@@ -8,3 +8,4 @@ export declare class OtelServerTelemetry {
|
|
|
8
8
|
}
|
|
9
9
|
export declare const otelTelemetry: OtelServerTelemetry;
|
|
10
10
|
export {};
|
|
11
|
+
//# sourceMappingURL=otel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otel.d.ts","sourceRoot":"","sources":["../src/otel.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,KAAK,MAAM,GAAG;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,CAAC;AAIF,qBAAa,mBAAmB;IAC9B,IAAI;IAoBJ,IAAI,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;CAkB9D;AAED,eAAO,MAAM,aAAa,qBAA4B,CAAC"}
|