Skip to content

Commit 0223006

Browse files
committed
Enhance command documentation and add timeout options
- Updated schemaClone, tableCopy, compareSchema, export, and schemaClone documentation to include a new `--timeout` option with default values. - Added timeout options to the command reference documentation. - Modified tests to ensure proper functionality of builder methods and input prompts. - Refactored tests to remove deprecated aliases and ensure consistency in command usage. - Improved type definitions for various commands to include new timeout and limit parameters.
1 parent 097d7a7 commit 0223006

75 files changed

Lines changed: 576 additions & 144 deletions

Some content is hidden

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The [change log](CHANGELOG.md) describes notable changes in this package.
66

77
## 📚 Documentation
88

9-
Complete documentation is available in the **[`docs/`](docs/)** folder and organized with VitePress.
9+
Complete documentation is available in the **[`docs/`](docs/)** folder and organized with VitePress. This README will maintain a high-level overview and quick links to the most important sections of the documentation but over time expect that more and more detailed documentation will be added to the docs folder as the project evolves.
1010

1111
**Quick Links:**
1212

bin/compareData.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,19 @@ export let inputPrompts = {
116116
required: false,
117117
ask: () => false
118118
},
119+
limit: {
120+
description: baseLite.bundle.getText("compareDataLimit"),
121+
type: 'number',
122+
required: false,
123+
default: 1000,
124+
ask: () => false
125+
},
126+
timeout: {
127+
description: baseLite.bundle.getText("compareDataTimeout"),
128+
type: 'number',
129+
required: false,
130+
ask: () => false
131+
},
119132
profile: {
120133
description: baseLite.bundle.getText("profile"),
121134
type: 'string',

bin/compareSchema.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ export let inputPrompts = {
104104
required: false,
105105
ask: () => false
106106
},
107+
timeout: {
108+
description: baseLite.bundle.getText("compareSchemaTimeout"),
109+
type: 'number',
110+
required: false,
111+
ask: () => false
112+
},
107113
profile: {
108114
description: baseLite.bundle.getText("profile"),
109115
type: 'string',

bin/dataDiff.js

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const builder = (yargs) => yargs.options(baseLite.getBuilder({
8282
}
8383
})).example('hana-cli dataDiff --table1 source_data --table2 target_data', baseLite.bundle.getText("dataDiffExample"))
8484

85-
export let inputPrompts = {
85+
const buildInputPrompts = () => ({
8686
table1: {
8787
description: baseLite.bundle.getText("dataDiffTable1"),
8888
type: 'string',
@@ -126,6 +126,27 @@ export let inputPrompts = {
126126
required: false,
127127
ask: () => false
128128
},
129+
showValues: {
130+
description: baseLite.bundle.getText("dataDiffShowValues"),
131+
type: 'boolean',
132+
required: false,
133+
default: false,
134+
ask: () => false
135+
},
136+
limit: {
137+
description: baseLite.bundle.getText("dataDiffLimit"),
138+
type: 'number',
139+
required: false,
140+
default: 10000,
141+
ask: () => false
142+
},
143+
timeout: {
144+
description: baseLite.bundle.getText("dataDiffTimeout"),
145+
type: 'number',
146+
required: false,
147+
default: 3600,
148+
ask: () => false
149+
},
129150
profile: {
130151
description: baseLite.bundle.getText("profile"),
131152
type: 'string',
@@ -138,7 +159,9 @@ export let inputPrompts = {
138159
required: false,
139160
ask: () => false
140161
}
141-
}
162+
})
163+
164+
export const inputPrompts = Object.freeze(buildInputPrompts())
142165

143166
/**
144167
* Command handler function

bin/dataLineage.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ export let inputPrompts = {
9797
required: false,
9898
ask: () => false
9999
},
100+
timeout: {
101+
description: baseLite.bundle.getText("dataLineageTimeout"),
102+
type: 'number',
103+
required: false,
104+
default: 3600,
105+
ask: () => false
106+
},
100107
profile: {
101108
description: baseLite.bundle.getText("profile"),
102109
type: 'string',

bin/dataMask.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ export const inputPrompts = {
9898
required: false,
9999
ask: () => false
100100
},
101+
output: {
102+
description: baseLite.bundle.getText("dataMaskOutput"),
103+
type: 'string',
104+
required: false,
105+
ask: () => false
106+
},
101107
profile: {
102108
description: baseLite.bundle.getText("profile"),
103109
type: 'string',

bin/dataProfile.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,42 @@ export let inputPrompts = {
110110
required: false,
111111
ask: () => false
112112
},
113+
nullAnalysis: {
114+
description: baseLite.bundle.getText("dataProfileNullAnalysis"),
115+
type: 'boolean',
116+
required: false,
117+
ask: () => false
118+
},
119+
cardinalityAnalysis: {
120+
description: baseLite.bundle.getText("dataProfileCardinalityAnalysis"),
121+
type: 'boolean',
122+
required: false,
123+
ask: () => false
124+
},
125+
statisticalAnalysis: {
126+
description: baseLite.bundle.getText("dataProfileStatisticalAnalysis"),
127+
type: 'boolean',
128+
required: false,
129+
ask: () => false
130+
},
131+
patternAnalysis: {
132+
description: baseLite.bundle.getText("dataProfilePatternAnalysis"),
133+
type: 'boolean',
134+
required: false,
135+
ask: () => false
136+
},
137+
sampleSize: {
138+
description: baseLite.bundle.getText("dataProfileSampleSize"),
139+
type: 'number',
140+
required: false,
141+
ask: () => false
142+
},
143+
timeout: {
144+
description: baseLite.bundle.getText("dataProfileTimeout"),
145+
type: 'number',
146+
required: false,
147+
ask: () => false
148+
},
113149
profile: {
114150
description: baseLite.bundle.getText("profile"),
115151
type: 'string',

bin/dataSync.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ export let inputPrompts = {
100100
type: 'string',
101101
required: true
102102
},
103+
timeout: {
104+
description: baseLite.bundle.getText("dataSyncTimeout"),
105+
type: 'number',
106+
required: false,
107+
default: 3600,
108+
ask: () => false
109+
},
103110
profile: {
104111
description: baseLite.bundle.getText("profile"),
105112
type: 'string',

bin/dataValidator.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,20 @@ export let inputPrompts = {
105105
required: false,
106106
ask: () => false
107107
},
108+
limit: {
109+
description: baseLite.bundle.getText("dataValidatorLimit"),
110+
type: 'number',
111+
required: false,
112+
default: 10000,
113+
ask: () => false
114+
},
115+
timeout: {
116+
description: baseLite.bundle.getText("dataValidatorTimeout"),
117+
type: 'number',
118+
required: false,
119+
default: 3600,
120+
ask: () => false
121+
},
108122
profile: {
109123
description: baseLite.bundle.getText("profile"),
110124
type: 'string',

bin/duplicateDetection.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,20 @@ export let inputPrompts = {
112112
required: false,
113113
ask: () => false
114114
},
115+
limit: {
116+
description: baseLite.bundle.getText("duplicateDetectionLimit"),
117+
type: 'number',
118+
required: false,
119+
default: 10000,
120+
ask: () => false
121+
},
122+
timeout: {
123+
description: baseLite.bundle.getText("duplicateDetectionTimeout"),
124+
type: 'number',
125+
required: false,
126+
default: 3600,
127+
ask: () => false
128+
},
115129
profile: {
116130
description: baseLite.bundle.getText("profile"),
117131
type: 'string',

0 commit comments

Comments
 (0)