@corva/create-app 0.46.0-rc.0 → 0.46.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/lib/flows/lib/api.js +0 -3
- package/lib/flows/lib/notification.js +0 -3
- package/lib/flows/steps/attach/get-all-live-assets.js +0 -2
- package/lib/flows/steps/release/get-config.js +0 -1
- package/lib/flows/steps/rerun/create-task.js +0 -1
- package/lib/flows/steps/rerun/get-app-version.js +0 -1
- package/lib/flows/steps/rerun/prepare-data.js +0 -2
- package/lib/flows/steps/rerun/prepare-well-and-stream-data.js +0 -3
- package/lib/helpers/versioning.js +0 -5
- package/lib/main.js +1 -1
- package/package.json +1 -1
- package/templates/javascript/scheduler/.eslintrc.js +1 -0
- package/templates/javascript/scheduler/.prettierrc +1 -0
- package/templates/javascript/stream/.eslintrc.js +1 -0
- package/templates/javascript/stream/.prettierrc +1 -0
- package/templates/javascript/task/.eslintrc.js +1 -0
- package/templates/javascript/task/.prettierrc +1 -0
- package/templates/typescript/scheduler/.prettierrc +1 -0
- package/templates/typescript/stream/.prettierrc +1 -0
- package/templates/typescript/task/.prettierrc +1 -0
package/lib/flows/lib/api.js
CHANGED
|
@@ -48,7 +48,6 @@ export class Api {
|
|
|
48
48
|
.json();
|
|
49
49
|
|
|
50
50
|
const app = data.find((app) => app.attributes.app_key === appKey);
|
|
51
|
-
|
|
52
51
|
if (!app) {
|
|
53
52
|
throw new Error(`App with key - ${appKey}, not exist`);
|
|
54
53
|
}
|
|
@@ -300,7 +299,6 @@ export class Api {
|
|
|
300
299
|
console.log(`v2/apps/${appId}/packages/${id}`, {
|
|
301
300
|
json: { package: { status: 'published' } },
|
|
302
301
|
});
|
|
303
|
-
|
|
304
302
|
const { data } = await this.#api
|
|
305
303
|
.patch(`v2/apps/${appId}/packages/${id}`, {
|
|
306
304
|
json: { package: { status: 'published' } },
|
|
@@ -324,7 +322,6 @@ export class Api {
|
|
|
324
322
|
*/
|
|
325
323
|
async getAppPackages(appId) {
|
|
326
324
|
const { data } = await this.#api.get(`v2/apps/${appId}/packages`).json();
|
|
327
|
-
|
|
328
325
|
return data;
|
|
329
326
|
}
|
|
330
327
|
|
|
@@ -91,7 +91,6 @@ export class Notification {
|
|
|
91
91
|
*/
|
|
92
92
|
getStreamLink(title, streamId) {
|
|
93
93
|
const streamUrl = `${this.#prefixUrl}/config/streams/${streamId}`;
|
|
94
|
-
|
|
95
94
|
return this._createLink(title, streamUrl);
|
|
96
95
|
}
|
|
97
96
|
|
|
@@ -107,7 +106,6 @@ export class Notification {
|
|
|
107
106
|
*/
|
|
108
107
|
printStreamLink(title, streamId) {
|
|
109
108
|
const link = this.getStreamLink(title, streamId);
|
|
110
|
-
|
|
111
109
|
this.print(link);
|
|
112
110
|
}
|
|
113
111
|
|
|
@@ -123,7 +121,6 @@ export class Notification {
|
|
|
123
121
|
*/
|
|
124
122
|
getAssetLink(title, assetId) {
|
|
125
123
|
const assetUrl = `${this.#prefixUrl}/assets/${assetId}`;
|
|
126
|
-
|
|
127
124
|
return this._createLink(title, assetUrl);
|
|
128
125
|
}
|
|
129
126
|
|
|
@@ -65,7 +65,6 @@ const getAssetsListWithPrompt = (assets, notification) => {
|
|
|
65
65
|
const mapAssetsStreamsData = (assets, streamsData) => {
|
|
66
66
|
return assets.map((asset) => {
|
|
67
67
|
const currentStreams = streamsData.filter((stream) => stream.asset_id === parseInt(asset.id));
|
|
68
|
-
|
|
69
68
|
return {
|
|
70
69
|
assetId: asset.id,
|
|
71
70
|
assetName: asset.attributes.name,
|
|
@@ -104,7 +103,6 @@ const getAssetsStreamsWithPrompt = async (mappedAssetsStreamsData, appId, notifi
|
|
|
104
103
|
|
|
105
104
|
if (streamsWithoutCurrentApp.length === 1) {
|
|
106
105
|
mappedData.selectedStreams = streamsWithoutCurrentApp;
|
|
107
|
-
|
|
108
106
|
continue;
|
|
109
107
|
}
|
|
110
108
|
|
|
@@ -69,7 +69,6 @@ export const PREPARE_DATA_TASK_STEP = {
|
|
|
69
69
|
*/
|
|
70
70
|
const promptAreYouSure = async () => {
|
|
71
71
|
logger.log('\n');
|
|
72
|
-
|
|
73
72
|
const answers = await inquirer.prompt([
|
|
74
73
|
{
|
|
75
74
|
message:
|
|
@@ -83,7 +82,6 @@ const promptAreYouSure = async () => {
|
|
|
83
82
|
default: false,
|
|
84
83
|
},
|
|
85
84
|
]);
|
|
86
|
-
|
|
87
85
|
return answers.option;
|
|
88
86
|
};
|
|
89
87
|
|
|
@@ -104,7 +104,6 @@ const getWellWithPrompt = async (wells, api) => {
|
|
|
104
104
|
const [well] = choices;
|
|
105
105
|
|
|
106
106
|
logger.write(`\n\n${chalk.black.underline.bold(`Process well - ${chalk.green(well.name)}`)}`);
|
|
107
|
-
|
|
108
107
|
return well.value;
|
|
109
108
|
}
|
|
110
109
|
|
|
@@ -144,7 +143,6 @@ const prepareWellAndStreamData = async (assets, api, manifest) => {
|
|
|
144
143
|
|
|
145
144
|
const wells = await api.getWellByAssetId(assetId);
|
|
146
145
|
const well = await getWellWithPrompt(wells, api);
|
|
147
|
-
|
|
148
146
|
mappedAssetsToWells.set(well.attributes.asset_id, well);
|
|
149
147
|
|
|
150
148
|
logger.write('\n Loading streams...');
|
|
@@ -166,7 +164,6 @@ const prepareWellAndStreamData = async (assets, api, manifest) => {
|
|
|
166
164
|
assetsToDelete.push(assetId);
|
|
167
165
|
|
|
168
166
|
if (mappedAssetsToWells.has(assetId)) mappedAssetsToWells.delete(assetId);
|
|
169
|
-
|
|
170
167
|
if (mappedAssetsToStreams.has(assetId)) mappedAssetsToStreams.delete(assetId);
|
|
171
168
|
}
|
|
172
169
|
}
|
|
@@ -16,7 +16,6 @@ export function isInGitRepository(appPath) {
|
|
|
16
16
|
return true;
|
|
17
17
|
} catch (e) {
|
|
18
18
|
debug(e);
|
|
19
|
-
|
|
20
19
|
return false;
|
|
21
20
|
}
|
|
22
21
|
}
|
|
@@ -33,12 +32,10 @@ export function tryGitInit(appPath) {
|
|
|
33
32
|
|
|
34
33
|
execSync('git init', { stdio: 'ignore', cwd: appPath });
|
|
35
34
|
logger.log('Initialized git repo in app');
|
|
36
|
-
|
|
37
35
|
return true;
|
|
38
36
|
} catch (e) {
|
|
39
37
|
debug(e);
|
|
40
38
|
console.warn('Git repo not initialized');
|
|
41
|
-
|
|
42
39
|
return false;
|
|
43
40
|
}
|
|
44
41
|
}
|
|
@@ -51,7 +48,6 @@ export function tryGitCommit(appPath) {
|
|
|
51
48
|
cwd: appPath,
|
|
52
49
|
});
|
|
53
50
|
logger.log('Added first git commit');
|
|
54
|
-
|
|
55
51
|
return true;
|
|
56
52
|
} catch (e) {
|
|
57
53
|
// We couldn't commit in already initialized git repo,
|
|
@@ -82,7 +78,6 @@ export function shouldUseYarn(appPath) {
|
|
|
82
78
|
return true;
|
|
83
79
|
} catch (e) {
|
|
84
80
|
debug(e);
|
|
85
|
-
|
|
86
81
|
return false;
|
|
87
82
|
}
|
|
88
83
|
}
|
package/lib/main.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = { extends: '@corva/eslint-config-node' };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"@corva/eslint-config-node/prettier"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = { extends: '@corva/eslint-config-node' };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"@corva/eslint-config-node/prettier"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = { extends: '@corva/eslint-config-node' };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"@corva/eslint-config-node/prettier"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"@corva/eslint-config-node/prettier"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"@corva/eslint-config-node/prettier"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"@corva/eslint-config-node/prettier"
|