@corva/create-app 0.102.0-1 → 0.102.0-4
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/lib/constants/package.js +4 -0
- package/lib/helpers/cli-version.js +19 -0
- package/package.json +1 -1
- package/templates/ui/javascript/src/App.completion.js +8 -4
- package/templates/ui/javascript/src/App.drilling.js +8 -4
- package/templates/ui/typescript/src/App.completion.tsx +8 -4
- package/templates/ui/typescript/src/App.drilling.tsx +8 -4
package/lib/constants/package.js
CHANGED
|
@@ -138,6 +138,10 @@ const uiPackage = {
|
|
|
138
138
|
const tsUiPackage = {
|
|
139
139
|
...uiPackage,
|
|
140
140
|
devDependencies: tsUiDevDependencies,
|
|
141
|
+
// todo: temporary solution, ref https://github.com/oppia/oppia/issues/22283#issuecomment-2756641371
|
|
142
|
+
resolutions: {
|
|
143
|
+
'@types/babel__traverse': '7.20.6',
|
|
144
|
+
},
|
|
141
145
|
};
|
|
142
146
|
|
|
143
147
|
const nodeNpmScripts = {
|
|
@@ -36,11 +36,23 @@ Please check your internet connection and that the above request is not blocked
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
+
// Utility function to check if a version is a regular semver without prerelease identifiers
|
|
40
|
+
const isRegularVersion = (version) => {
|
|
41
|
+
return semver.prerelease(version) === null;
|
|
42
|
+
};
|
|
43
|
+
|
|
39
44
|
// NOTE: Stop process and show error if version is outdated
|
|
40
45
|
export async function ensureLatestVersion() {
|
|
41
46
|
const currentVersion = await getCurrentVersion();
|
|
42
47
|
const latestVersion = await getLatestVersion();
|
|
43
48
|
|
|
49
|
+
// Skip version check if current version is a prerelease (dev or next)
|
|
50
|
+
if (!isRegularVersion(currentVersion)) {
|
|
51
|
+
logger.write('Skipping version check for prerelease version.\n');
|
|
52
|
+
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
44
56
|
const isCurrentVersionOutdated = semver.gt(latestVersion, currentVersion);
|
|
45
57
|
|
|
46
58
|
if (isCurrentVersionOutdated) {
|
|
@@ -65,6 +77,13 @@ export async function warnIfOutdated() {
|
|
|
65
77
|
const currentVersion = await getCurrentVersion();
|
|
66
78
|
const latestVersion = await getLatestVersion();
|
|
67
79
|
|
|
80
|
+
// Skip version check if current version is a prerelease (dev or next)
|
|
81
|
+
if (!isRegularVersion(currentVersion)) {
|
|
82
|
+
logger.write(' ⚠️ Skipping version check for prerelease version.\n');
|
|
83
|
+
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
68
87
|
const isCurrentVersionOutdated = semver.gt(latestVersion, currentVersion);
|
|
69
88
|
|
|
70
89
|
if (isCurrentVersionOutdated) {
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AppContainer, AppHeader } from '@corva/ui/componentsV2';
|
|
2
|
+
import { useAppCommons } from '@corva/ui/effects';
|
|
2
3
|
|
|
3
4
|
import { DEFAULT_SETTINGS } from './constants';
|
|
4
5
|
import logo from './assets/logo.svg';
|
|
@@ -19,12 +20,13 @@ function App({
|
|
|
19
20
|
well,
|
|
20
21
|
wells,
|
|
21
22
|
}) {
|
|
23
|
+
const { appKey } = useAppCommons();
|
|
22
24
|
// NOTE: On general type dashboard app receives wells array
|
|
23
25
|
// on asset type dashboard app receives well object
|
|
24
26
|
const wellsList = wells || [well];
|
|
25
27
|
|
|
26
28
|
return (
|
|
27
|
-
<AppContainer header={<AppHeader />}>
|
|
29
|
+
<AppContainer header={<AppHeader />} testId={appKey}>
|
|
28
30
|
<div>
|
|
29
31
|
<img src={logo} alt="logo" className={styles.logo} />
|
|
30
32
|
<p>
|
|
@@ -33,9 +35,9 @@ function App({
|
|
|
33
35
|
<br />
|
|
34
36
|
</p>
|
|
35
37
|
<p>
|
|
36
|
-
Frac Fleet: {fracFleet?.name || 'No Frac Fleet'}
|
|
38
|
+
Frac Fleet: <span data-testid="fracFleet">{fracFleet?.name || 'No Frac Fleet'}</span>
|
|
37
39
|
<br />
|
|
38
|
-
Wells: {wellsList.map(well => well.name).join(', ')}
|
|
40
|
+
Wells: <span data-testid="wellsList">{wellsList.map(well => well.name).join(', ')}</span>
|
|
39
41
|
</p>
|
|
40
42
|
<a
|
|
41
43
|
className="App-link"
|
|
@@ -48,7 +50,9 @@ function App({
|
|
|
48
50
|
</div>
|
|
49
51
|
<div>
|
|
50
52
|
Settings "Example" checkbox is{' '}
|
|
51
|
-
|
|
53
|
+
<span data-testid="exampleCheckboxChecked">
|
|
54
|
+
{isExampleCheckboxChecked ? 'checked' : 'unchecked'}
|
|
55
|
+
</span>
|
|
52
56
|
</div>
|
|
53
57
|
</AppContainer>
|
|
54
58
|
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AppContainer, AppHeader } from '@corva/ui/componentsV2';
|
|
2
|
+
import { useAppCommons } from '@corva/ui/effects';
|
|
2
3
|
|
|
3
4
|
import { DEFAULT_SETTINGS } from './constants';
|
|
4
5
|
import logo from './assets/logo.svg';
|
|
@@ -13,8 +14,9 @@ import styles from './App.css';
|
|
|
13
14
|
* @returns
|
|
14
15
|
*/
|
|
15
16
|
function App({ isExampleCheckboxChecked = DEFAULT_SETTINGS.isExampleCheckboxChecked, rig, well }) {
|
|
17
|
+
const { appKey } = useAppCommons();
|
|
16
18
|
return (
|
|
17
|
-
<AppContainer header={<AppHeader />}>
|
|
19
|
+
<AppContainer header={<AppHeader />} testId={appKey}>
|
|
18
20
|
<div>
|
|
19
21
|
<img src={logo} alt="logo" className={styles.logo} />
|
|
20
22
|
<p>
|
|
@@ -23,9 +25,9 @@ function App({ isExampleCheckboxChecked = DEFAULT_SETTINGS.isExampleCheckboxChec
|
|
|
23
25
|
<br />
|
|
24
26
|
</p>
|
|
25
27
|
<p>
|
|
26
|
-
Rig: {rig.name}
|
|
28
|
+
Rig: <span data-testid="rig">{rig.name}</span>
|
|
27
29
|
<br />
|
|
28
|
-
Well: {well.name}
|
|
30
|
+
Well: <span data-testid="well">{well.name}</span>
|
|
29
31
|
</p>
|
|
30
32
|
<a
|
|
31
33
|
className="App-link"
|
|
@@ -38,7 +40,9 @@ function App({ isExampleCheckboxChecked = DEFAULT_SETTINGS.isExampleCheckboxChec
|
|
|
38
40
|
</div>
|
|
39
41
|
<div>
|
|
40
42
|
Settings "Example" checkbox is{' '}
|
|
41
|
-
|
|
43
|
+
<span data-testid="exampleCheckboxState">
|
|
44
|
+
{isExampleCheckboxChecked ? 'checked' : 'unchecked'}
|
|
45
|
+
</span>
|
|
42
46
|
</div>
|
|
43
47
|
</AppContainer>
|
|
44
48
|
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AppContainer, AppHeader } from '@corva/ui/componentsV2';
|
|
2
|
+
import { useAppCommons } from '@corva/ui/effects';
|
|
2
3
|
|
|
3
4
|
import { DEFAULT_SETTINGS } from './constants';
|
|
4
5
|
import logo from './assets/logo.svg';
|
|
@@ -18,12 +19,13 @@ function App({
|
|
|
18
19
|
well,
|
|
19
20
|
wells,
|
|
20
21
|
}: AppProps): JSX.Element {
|
|
22
|
+
const { appKey } = useAppCommons();
|
|
21
23
|
// NOTE: On general type dashboard app receives wells array
|
|
22
24
|
// on asset type dashboard app receives well object
|
|
23
25
|
const wellsList = wells || [well];
|
|
24
26
|
|
|
25
27
|
return (
|
|
26
|
-
<AppContainer header={<AppHeader />}>
|
|
28
|
+
<AppContainer header={<AppHeader />} testId={appKey}>
|
|
27
29
|
<div>
|
|
28
30
|
<img src={logo} alt="logo" className={styles.logo} />
|
|
29
31
|
<p>
|
|
@@ -32,9 +34,9 @@ function App({
|
|
|
32
34
|
<br />
|
|
33
35
|
</p>
|
|
34
36
|
<p>
|
|
35
|
-
Frac Fleet: {fracFleet?.name || 'No Frac Fleet'}
|
|
37
|
+
Frac Fleet: <span data-testid="fracFleet">{fracFleet?.name || 'No Frac Fleet'}</span>
|
|
36
38
|
<br />
|
|
37
|
-
Wells: {wellsList.map(well => well.name).join(', ')}
|
|
39
|
+
Wells: <span data-testid="wellsList">{wellsList.map(well => well.name).join(', ')}</span>
|
|
38
40
|
</p>
|
|
39
41
|
<a
|
|
40
42
|
className="App-link"
|
|
@@ -47,7 +49,9 @@ function App({
|
|
|
47
49
|
</div>
|
|
48
50
|
<div>
|
|
49
51
|
Settings "Example" checkbox is{' '}
|
|
50
|
-
|
|
52
|
+
<span data-testid="exampleCheckboxState">
|
|
53
|
+
{isExampleCheckboxChecked ? 'checked' : 'unchecked'}
|
|
54
|
+
</span>
|
|
51
55
|
</div>
|
|
52
56
|
</AppContainer>
|
|
53
57
|
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AppContainer, AppHeader } from '@corva/ui/componentsV2';
|
|
2
|
+
import { useAppCommons } from '@corva/ui/effects';
|
|
2
3
|
|
|
3
4
|
import { DEFAULT_SETTINGS } from './constants';
|
|
4
5
|
import logo from './assets/logo.svg';
|
|
@@ -16,8 +17,9 @@ function App({
|
|
|
16
17
|
rig,
|
|
17
18
|
well,
|
|
18
19
|
}: AppProps): JSX.Element {
|
|
20
|
+
const { appKey } = useAppCommons();
|
|
19
21
|
return (
|
|
20
|
-
<AppContainer header={<AppHeader />}>
|
|
22
|
+
<AppContainer header={<AppHeader />} testId={appKey}>
|
|
21
23
|
<div>
|
|
22
24
|
<img src={logo} alt="logo" className={styles.logo} />
|
|
23
25
|
<p>
|
|
@@ -26,9 +28,9 @@ function App({
|
|
|
26
28
|
<br />
|
|
27
29
|
</p>
|
|
28
30
|
<p>
|
|
29
|
-
Rig: {rig.name}
|
|
31
|
+
Rig: <span data-testid="rig">{rig.name}</span>
|
|
30
32
|
<br />
|
|
31
|
-
Well: {well.name}
|
|
33
|
+
Well: <span data-testid="well">{well.name}</span>
|
|
32
34
|
</p>
|
|
33
35
|
<a
|
|
34
36
|
className="App-link"
|
|
@@ -41,7 +43,9 @@ function App({
|
|
|
41
43
|
</div>
|
|
42
44
|
<div>
|
|
43
45
|
Settings "Example" checkbox is{' '}
|
|
44
|
-
|
|
46
|
+
<span data-testid="exampleCheckboxState">
|
|
47
|
+
{isExampleCheckboxChecked ? 'checked' : 'unchecked'}
|
|
48
|
+
</span>
|
|
45
49
|
</div>
|
|
46
50
|
</AppContainer>
|
|
47
51
|
);
|