@eui/tools 6.19.3 → 6.20.1

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.
Files changed (33) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +24 -0
  3. package/bin/eui-scripts.js +2 -0
  4. package/bin/scripts/release-package-standalone.js +5 -0
  5. package/init.js +2 -0
  6. package/package.json +1 -1
  7. package/scripts/csdr/audit/yarn.js +15 -2
  8. package/scripts/csdr/config/angular.js +14 -1
  9. package/scripts/csdr/config/config-skeletons.js +45 -1
  10. package/scripts/csdr/config/global.js +16 -4
  11. package/scripts/csdr/config/packages.js +42 -3
  12. package/scripts/csdr/config/remotes.js +2 -0
  13. package/scripts/csdr/init/global.js +8 -2
  14. package/scripts/csdr/init/packages.js +8 -0
  15. package/scripts/csdr/init/standalone/18.x/.eslintrc.eui18.standalone.json +133 -0
  16. package/scripts/csdr/init/standalone/18.x/.eslintrc.json +44 -0
  17. package/scripts/csdr/init/standalone/18.x/karma.conf.standalone.js +7 -0
  18. package/scripts/csdr/init/standalone/18.x/tsconfig.lib.standalone.json +34 -0
  19. package/scripts/csdr/init/standalone/18.x/tsconfig.spec.standalone.json +17 -0
  20. package/scripts/csdr/init/standalone/18.x/tsconfig.standalone.json +17 -0
  21. package/scripts/csdr/install/common.js +110 -2
  22. package/scripts/csdr/install/packages.js +59 -6
  23. package/scripts/csdr/metadata/package-utils.js +100 -25
  24. package/scripts/csdr/release/package/common.js +96 -52
  25. package/scripts/csdr/release/package/release-package-standalone.js +24 -0
  26. package/scripts/csdr/release/package/release-ui-standalone.js +169 -0
  27. package/scripts/index.js +2 -0
  28. package/scripts/utils/changelog-utils.js +25 -15
  29. package/scripts/utils/clean/clean-utils.js +10 -2
  30. package/scripts/utils/git-utils.js +10 -6
  31. package/scripts/utils/notification/config.js +7 -1
  32. package/scripts/utils/publish/npm.js +18 -4
  33. package/scripts/utils/sonar/sonar-utils.js +13 -4
@@ -72,14 +72,75 @@ module.exports.installDeps = (deps) => {
72
72
  );
73
73
  };
74
74
 
75
- const executeInstall = (module.exports.executeInstall = (cwdPath) => {
75
+
76
+ module.exports.installDepsStandalone = (pkg, deps) => {
77
+ const rootFolder = process.cwd();
78
+ const pkgJsonFile = path.resolve(rootFolder, 'package.json');
79
+ const pkgJson = require(pkgJsonFile);
80
+
81
+ return (
82
+ Promise.resolve()
83
+ // parse eUI deps and explode the sub-packages (v17 issues)
84
+ .then(() => {
85
+ const euiVersion = configUtils.packages.getPackageEuiVersion(pkg);
86
+ const euiVersionNumber = parseInt(euiVersion);
87
+
88
+ if (euiVersionNumber >= 17) {
89
+ Object.keys(deps).forEach((dep) => {
90
+ if (dep === '@eui/deps-base') {
91
+ deps['@eui/components'] = deps[dep];
92
+ deps['@eui/showcase'] = deps[dep];
93
+ deps['@eui/styles'] = deps[dep];
94
+ }
95
+ });
96
+ }
97
+ })
98
+
99
+ // Install dependencies
100
+ .then(() => {
101
+ tools.logTitle('Package dependencies to install : ');
102
+ pkgJson.dependencies = deps;
103
+
104
+ // Updating file and installing
105
+ if (Object.keys(pkgJson.dependencies).length !== 0) {
106
+ tools.writeJsonFileSync(pkgJsonFile, pkgJson);
107
+ tools.logInfo('installing dependencies');
108
+ console.log(pkgJson.dependencies);
109
+
110
+ return executeInstall(rootFolder, configUtils.global.getConfigOptionsStandalone().NPM_REGISTRY_INSTALL);
111
+ }
112
+ })
113
+
114
+ .then(() => {
115
+ pkgJson.dependencies = {}
116
+ pkgJson.resolutions = {}
117
+ tools.writeJsonFileSync(pkgJsonFile, pkgJson);
118
+ })
119
+
120
+ .catch((e) => {
121
+ throw e;
122
+ })
123
+ );
124
+ };
125
+
126
+
127
+
128
+ const executeInstall = (module.exports.executeInstall = (cwdPath, npmRegistry) => {
76
129
  return Promise.resolve()
77
130
  .then(() => {
78
- const installRegistry = getInstallRegistry();
131
+ let installRegistry;
132
+
133
+ if (npmRegistry) {
134
+ installRegistry = npmRegistry;
135
+ } else {
136
+ installRegistry = getInstallRegistry();
137
+ }
79
138
 
80
139
  tools.logInfo(`Install from : ${installRegistry}`);
81
140
  if (!dryRun && !skipInstall) {
82
141
  return execa.shellSync(`yarn --registry ${installRegistry}`, { cwd: cwdPath, stdio: 'inherit' });
142
+ } else {
143
+ tools.logInfo(`Skipping install - Executing command : yarn --registry ${installRegistry}`);
83
144
  }
84
145
  })
85
146
 
@@ -157,3 +218,50 @@ module.exports.getResolvedCarretDeps = (deps, isMaster, isDevEnvTarget) => {
157
218
  })
158
219
  );
159
220
  };
221
+
222
+
223
+ module.exports.getResolvedCarretDepsStandalone = (deps, isMaster, isDevEnvTarget) => {
224
+ tools.logTitle('Resolving carret versions of detected packages');
225
+
226
+ tools.logInfo('processing dependencies : ');
227
+ console.log(deps);
228
+
229
+ return (
230
+ Promise.resolve()
231
+ .then(() => {
232
+ const dependencies = Object.keys(deps).reduce((acc, k) => {
233
+ if (deps[k] && deps[k].substr(0, 1) === '^') {
234
+ const npmPkg = k;
235
+ const version = deps[k];
236
+
237
+ tools.logInfo(`\nProcessing ${npmPkg}:${version}`);
238
+
239
+ // getting last major version from metadata history for pkg found
240
+ const lastMajorVersion = metadataUtils.packageUtils.getLastMajorVersionByNpmPkg(
241
+ npmPkg,
242
+ version.substr(1).split('.')[0],
243
+ isMaster,
244
+ isDevEnvTarget
245
+ );
246
+
247
+ if (lastMajorVersion) {
248
+ tools.logInfo(`--version found : ${lastMajorVersion}`);
249
+ acc[k] = lastMajorVersion;
250
+ } else {
251
+ tools.logWarning(`WARNING : Can't resolve carret version from history for pkg: ${npmPkg} for version ${version}`);
252
+ }
253
+ }
254
+ return acc;
255
+ }, {});
256
+
257
+ return { ...deps, ...dependencies };
258
+ })
259
+
260
+ // don't rethrow in case of error, just log the exception
261
+ .catch((e) => {
262
+ tools.logError('Unable to resolve deps');
263
+ console.log(e);
264
+ return deps;
265
+ })
266
+ );
267
+ };
@@ -72,10 +72,15 @@ const getLocalPackageCompositeDeps = (pkg) => {
72
72
  let pkgJsonFile;
73
73
 
74
74
  if (!skipLocalPackagesDeps) {
75
- if (pkg.child) {
76
- pkgJsonFile = path.join(process.cwd(), 'packages', pkg.parentPkg, 'packages', pkg.folder || pkg.name, 'dependencies-composite.json');
75
+
76
+ if (pkg.standalone) {
77
+ pkgJsonFile = path.join(process.cwd(), 'dependencies-composite.json');
77
78
  } else {
78
- pkgJsonFile = path.join(process.cwd(), 'packages', pkg.name, 'dependencies-composite.json');
79
+ if (pkg.child) {
80
+ pkgJsonFile = path.join(process.cwd(), 'packages', pkg.parentPkg, 'packages', pkg.folder || pkg.name, 'dependencies-composite.json');
81
+ } else {
82
+ pkgJsonFile = path.join(process.cwd(), 'packages', pkg.name, 'dependencies-composite.json');
83
+ }
79
84
  }
80
85
 
81
86
  if (tools.isFileExists(pkgJsonFile)) {
@@ -122,10 +127,14 @@ const getLocalPackageBaseDeps = (pkg) => {
122
127
  let pkgJsonFile;
123
128
 
124
129
  if (!skipLocalPackagesDeps) {
125
- if (pkg.child) {
126
- pkgJsonFile = path.join(process.cwd(), 'packages', pkg.parentPkg, 'packages', pkg.folder || pkg.name, 'dependencies-base.json');
130
+ if (pkg.standalone) {
131
+ pkgJsonFile = path.join(process.cwd(), 'dependencies-base.json');
127
132
  } else {
128
- pkgJsonFile = path.join(process.cwd(), 'packages', pkg.name, 'dependencies-base.json');
133
+ if (pkg.child) {
134
+ pkgJsonFile = path.join(process.cwd(), 'packages', pkg.parentPkg, 'packages', pkg.folder || pkg.name, 'dependencies-base.json');
135
+ } else {
136
+ pkgJsonFile = path.join(process.cwd(), 'packages', pkg.name, 'dependencies-base.json');
137
+ }
129
138
  }
130
139
 
131
140
  if (tools.isFileExists(pkgJsonFile)) {
@@ -277,3 +286,47 @@ module.exports.installDeps = (prj, pkg, isMaster) => {
277
286
  throw e;
278
287
  })
279
288
  }
289
+
290
+
291
+ module.exports.installDepsStandalone = (pkg, isMaster) => {
292
+ let localPkgDeps, localPkgCompositeDeps, remappedDeps, localPkgBaseDeps;
293
+
294
+ return Promise.resolve()
295
+ // fetching depedencies composite deps
296
+ .then(() => {
297
+ return getLocalPackageCompositeDeps(pkg);
298
+ })
299
+ // storing
300
+ .then((localPkgCompositeDepsIn) => {
301
+ localPkgCompositeDeps = localPkgCompositeDepsIn;
302
+ })
303
+
304
+ // remapping from registry
305
+ .then(() => {
306
+ return innerCommon.getResolvedCarretDepsStandalone(localPkgCompositeDeps, isMaster, !isMaster);
307
+ })
308
+ // storing
309
+ .then((remappedDepsIn) => {
310
+ remappedDeps = remappedDepsIn;
311
+ })
312
+
313
+ // fetch dependencies-base deps
314
+ .then(() => {
315
+ return getLocalPackageBaseDeps(pkg);
316
+ })
317
+
318
+ .then((localPkgBaseDepsIn) => {
319
+ localPkgBaseDeps = localPkgBaseDepsIn;
320
+
321
+ const fixedDeps = configUtils.global.getConfigOptionsStandalone().NPM_FIXED_DEPENDENCIES;
322
+
323
+ return innerCommon.installDepsStandalone(pkg, { ...localPkgBaseDeps, ...remappedDeps, ...localPkgDeps, ...fixedDeps});
324
+ })
325
+
326
+ .catch((e) => {
327
+ throw e;
328
+ })
329
+ }
330
+
331
+
332
+
@@ -63,6 +63,55 @@ const getPackageVersions = (module.exports.getPackageVersions = (pkg) => {
63
63
  return versions;
64
64
  });
65
65
 
66
+
67
+ const getPackageVersionsByNpmPkg = (module.exports.getPackageVersionsByNpmPkg = (npmPkg) => {
68
+ let npmOutput;
69
+ try {
70
+ npmOutput = execa.sync('npm', ['view', npmPkg, '--json']).stdout;
71
+ if (npmOutput.trim() === '') {
72
+ npmOutput = execa.sync('npm', ['view', `${npmPkg}@snapshot`, '--json']).stdout;
73
+ }
74
+ } catch(e) {
75
+ npmOutput = e.stdout;
76
+ }
77
+ // console.log(npmOutput);
78
+
79
+ let versions = [];
80
+
81
+ if (!npmOutput) {
82
+ tools.logWarning('Cannot find version of pkg - package is probably not published yet');
83
+ return versions;
84
+ }
85
+
86
+ const json = JSON.parse(npmOutput);
87
+
88
+ if (json.error) {
89
+ tools.logWarning('Error detected while trying to fetch the pkg version');
90
+ console.log(json.error);
91
+
92
+ } else {
93
+ if (json.versions) {
94
+ versions = json.versions.map((v) => {
95
+ return {
96
+ name: npmPkg,
97
+ version: v,
98
+ major: v.split('.')[0],
99
+ snapshot: v.indexOf('snapshot') > -1,
100
+ hotfix: v.indexOf('snapshot') === -1 && v.indexOf('-rc.') === -1 && v.indexOf('-next.') === -1 && v.indexOf('-') > -1,
101
+ rc: v.indexOf('-rc.') > -1,
102
+ date: json.time[v],
103
+ };
104
+ });
105
+ }
106
+ }
107
+
108
+ if (versions.length === 0) {
109
+ tools.logWarning(`Pkg versions not found for ${npmPkg}`);
110
+ }
111
+
112
+ return versions;
113
+ });
114
+
66
115
  module.exports.getPackageVersionsLatest = (pkg) => {
67
116
  const versions = getPackageVersions(pkg);
68
117
  return versions.filter((v) => !v.snapshot);
@@ -142,39 +191,55 @@ module.exports.isNewPackageBuild = (pkg) => {
142
191
  }
143
192
  };
144
193
 
145
- const getPackageVersionsByMajor = (pkg, major, isMaster, isDevEnvTarget) => {
146
- const pkgVersions = getPackageVersions(pkg);
147
194
 
148
- if (pkgVersions) {
149
- if (debug) tools.logInfo(`----> ${pkgVersions.length} metadata versions found for package`);
150
- let versions = [];
195
+
196
+ const filterMajorVersions = (pkgVersions, major, isMaster, isDevEnvTarget) => {
197
+ if (debug) tools.logInfo(`----> ${pkgVersions.length} metadata versions found for package`);
198
+
199
+ let versions = [];
200
+ versions = pkgVersions.filter((v) => v.major === major);
201
+
202
+ if (debug) tools.logInfo(`----> ${versions.length} metadata versions found for major version : ${major}`);
203
+
204
+ if (isMaster) {
205
+ versions = versions.filter((v) => !v.snapshot);
206
+ if (debug) tools.logInfo(`----> ${versions.length} metadata versions found excluding snapshots`);
207
+ } else {
151
208
  versions = pkgVersions.filter((v) => v.major === major);
209
+ if (debug) tools.logInfo(`----> ${versions.length} metadata versions non-master release for major`);
210
+ }
152
211
 
153
- if (debug) tools.logInfo(`----> ${versions.length} metadata versions found for major version : ${major}`);
212
+ if (debug) tools.logInfo('----> exluding hotfix package versions type');
213
+ versions = versions.filter((v) => !v.hotfix);
214
+ if (debug) tools.logInfo(`----> ${versions.length} metadata versions excluding hotfix version type`);
154
215
 
155
- if (isMaster) {
156
- versions = versions.filter((v) => !v.snapshot);
157
- if (debug) tools.logInfo(`----> ${versions.length} metadata versions found excluding snapshots`);
158
- } else {
159
- versions = pkgVersions.filter((v) => v.major === major);
160
- if (debug) tools.logInfo(`----> ${versions.length} metadata versions non-master release for major`);
216
+ if (!isDevEnvTarget) {
217
+ if (debug) {
218
+ tools.logInfo(
219
+ '----=> excluding RC release of versions found for non-DEV build (preventing RC releases to go to another env than DEV'
220
+ );
161
221
  }
222
+ versions = versions.filter((v) => !v.rc);
223
+ if (debug) tools.logInfo(`----> ${versions.length} metadata versions excluding RC version type`);
224
+ }
225
+
226
+ return versions;
227
+ }
162
228
 
163
- if (debug) tools.logInfo('----> exluding hotfix package versions type');
164
- versions = versions.filter((v) => !v.hotfix);
165
- if (debug) tools.logInfo(`----> ${versions.length} metadata versions excluding hotfix version type`);
166
229
 
167
- if (!isDevEnvTarget) {
168
- if (debug) {
169
- tools.logInfo(
170
- '----=> excluding RC release of versions found for non-DEV build (preventing RC releases to go to another env than DEV'
171
- );
172
- }
173
- versions = versions.filter((v) => !v.rc);
174
- if (debug) tools.logInfo(`----> ${versions.length} metadata versions excluding RC version type`);
175
- }
230
+ const getPackageVersionsByMajor = (pkg, major, isMaster, isDevEnvTarget) => {
231
+ const pkgVersions = getPackageVersions(pkg);
176
232
 
177
- return versions;
233
+ if (pkgVersions) {
234
+ return filterMajorVersions(pkgVersions, major, isMaster, isDevEnvTarget);
235
+ }
236
+ };
237
+
238
+ const getPackageVersionsByMajorByNpmPkg = (npmPkg, major, isMaster, isDevEnvTarget) => {
239
+ const pkgVersions = getPackageVersionsByNpmPkg(npmPkg);
240
+
241
+ if (pkgVersions) {
242
+ return filterMajorVersions(pkgVersions, major, isMaster, isDevEnvTarget);
178
243
  }
179
244
  };
180
245
 
@@ -188,6 +253,16 @@ module.exports.getLastMajorVersion = (pkg, major, isMaster, isDevEnvTarget) => {
188
253
  }
189
254
  };
190
255
 
256
+ module.exports.getLastMajorVersionByNpmPkg = (npmPkg, major, isMaster, isDevEnvTarget) => {
257
+ tools.logInfo(`--Getting registry pkg version for ${npmPkg} - major: ${major}`);
258
+
259
+ const pkgVersionsMajor = getPackageVersionsByMajorByNpmPkg(npmPkg, major, isMaster, isDevEnvTarget);
260
+
261
+ if (pkgVersionsMajor && pkgVersionsMajor.length !== 0) {
262
+ return pkgVersionsMajor.splice(-1)[0].version;
263
+ }
264
+ };
265
+
191
266
  module.exports.getVersionMetadata = (pkg, version) => {
192
267
  const pkgVersions = getPackageVersions(pkg);
193
268
  if (pkgVersions) {
@@ -12,13 +12,9 @@ const versionUtils = require('../../version/version-utils');
12
12
  const configUtils = require('../../config/config-utils');
13
13
 
14
14
  // GLOBAL ARGS
15
- const { dryRun, pipelineId } = utils.tools.getArgs();
16
-
17
-
18
-
19
- const getBranches = module.exports.getBranches = () => {
20
- let { branch } = utils.tools.getArgs();
15
+ const { dryRun, pipelineId, skipCommitsCheck } = utils.tools.getArgs();
21
16
 
17
+ const getBranchDefs = (branch) => {
22
18
  if (!branch) {
23
19
  branch = 'master';
24
20
  }
@@ -48,6 +44,22 @@ const getBranches = module.exports.getBranches = () => {
48
44
  }
49
45
  }
50
46
 
47
+ const getBranches = module.exports.getBranches = () => {
48
+ let { branch } = utils.tools.getArgs();
49
+
50
+ return getBranchDefs(branch);
51
+ }
52
+
53
+ const getBranchesFromRepo = module.exports.getBranchesFromRepo = () => {
54
+ let branch = utils.git.getBranchName();
55
+
56
+ return getBranchDefs(branch);
57
+ }
58
+
59
+
60
+
61
+
62
+
51
63
  module.exports.getEnvTarget = () => {
52
64
  let { envTarget } = utils.tools.getArgs();
53
65
 
@@ -93,51 +105,61 @@ module.exports.init = (pkg, envTarget) => {
93
105
  }
94
106
  }
95
107
 
108
+ return Promise.resolve()
109
+ .then(() => {
110
+ return initMessage(pkg, branches, envTarget);
111
+ })
96
112
 
113
+ .catch((e) => {
114
+ throw e;
115
+ })
116
+ }
97
117
 
118
+
119
+ const initMessage = module.exports.initMessage = (pkg, branches, envTarget) => {
98
120
  return Promise.resolve()
99
121
 
100
- // Starting the release flow
101
- .then(() => {
102
- // initiating mail buffer
103
- utils.notification.messageStack.startStack();
122
+ // Starting the release flow
123
+ .then(() => {
124
+ // initiating mail buffer
125
+ utils.notification.messageStack.startStack();
104
126
 
105
- // run start
106
- console.log('\n\n');
107
- utils.tools.logTitle('-------------------------------------------------------------------------------');
108
- utils.tools.logTitle(`Releasing new version of package "${pkg.name}" on branch "${branches.branch}"`);
109
- utils.tools.logTitle('-------------------------------------------------------------------------------');
127
+ // run start
128
+ console.log('\n\n');
129
+ utils.tools.logTitle('-------------------------------------------------------------------------------');
130
+ utils.tools.logTitle(`Releasing new version of package "${pkg.name}" on branch "${branches.branch}"`);
131
+ utils.tools.logTitle('-------------------------------------------------------------------------------');
110
132
 
111
- console.log(pkg);
133
+ console.log(pkg);
112
134
 
113
- let launchMessage = ':arrow_forward: :arrow_forward: :arrow_forward: :arrow_forward: :arrow_forward:';
135
+ let launchMessage = ':arrow_forward: :arrow_forward: :arrow_forward: :arrow_forward: :arrow_forward:';
114
136
 
115
- if (pkg.remote) {
116
- launchMessage += ` Launching remote *${pkg.name}* release for ENV: *${envTarget}*`;
117
- } else {
118
- launchMessage += ` Launching *${pkg.name}* release for branch *${branches.branch}*`;
119
- }
137
+ if (pkg.remote) {
138
+ launchMessage += ` Launching remote *${pkg.name}* release for ENV: *${envTarget}*`;
139
+ } else {
140
+ launchMessage += ` Launching *${pkg.name}* release for branch *${branches.branch}*`;
141
+ }
142
+
143
+ return utils.notification.package.sendPackageMessage({
144
+ package: pkg,
145
+ text: launchMessage
146
+ });
147
+ })
148
+
149
+ .then(() => {
150
+ if (pipelineId) {
151
+ const launchMessage = `:arrow_forward: :arrow_forward: Pipeline ID : https://gitlab.ecdevops.eu/eui/cc-csdr-root/-/pipelines/${pipelineId}`;
120
152
 
121
153
  return utils.notification.package.sendPackageMessage({
122
154
  package: pkg,
123
155
  text: launchMessage
124
156
  });
125
- })
126
-
127
- .then(() => {
128
- if (pipelineId) {
129
- const launchMessage = `:arrow_forward: :arrow_forward: Pipeline ID : https://gitlab.ecdevops.eu/eui/cc-csdr-root/-/pipelines/${pipelineId}`;
130
-
131
- return utils.notification.package.sendPackageMessage({
132
- package: pkg,
133
- text: launchMessage
134
- });
135
- }
136
- })
157
+ }
158
+ })
137
159
 
138
- .catch((e) => {
139
- throw e;
140
- })
160
+ .catch((e) => {
161
+ throw e;
162
+ })
141
163
  }
142
164
 
143
165
 
@@ -183,6 +205,20 @@ module.exports.cloneMetadataLocksRepos = (pkg) => {
183
205
  }
184
206
 
185
207
 
208
+ const checkBranchValidity = module.exports.checkBranchValidity = (branches) => {
209
+ utils.tools.logTitle('Checking branch validity');
210
+
211
+ if (!branches.valid) {
212
+ utils.tools.logInfo('Branch not supported ... stopping : allowed branches are develop-master-next/-support/-hotfix/');
213
+ throw new Error('BRANCH_NOT_SUPPORTED');
214
+
215
+ } else {
216
+ utils.tools.logInfo('Branch is valid... processing');
217
+ }
218
+ }
219
+
220
+
221
+
186
222
  module.exports.preReleaseChecks = (pkg) => {
187
223
  if (dryRun) {
188
224
  return;
@@ -202,15 +238,7 @@ module.exports.preReleaseChecks = (pkg) => {
202
238
  .then(() => {
203
239
  const branches = this.getBranches();
204
240
 
205
- utils.tools.logTitle('Checking branch validity');
206
-
207
- if (!branches.valid) {
208
- utils.tools.logInfo('Branch not supported ... stopping : allowed branches are develop-master-next/-support/-hotfix/');
209
- throw new Error('BRANCH_NOT_SUPPORTED');
210
-
211
- } else {
212
- utils.tools.logInfo('Branch is valid... processing');
213
- }
241
+ checkBranchValidity(branches);
214
242
  })
215
243
 
216
244
  // CHECK eUI VERSION OF PKG VALIDITY (no v10 allowed after 5/04)
@@ -259,6 +287,11 @@ module.exports.commitMetadataChecks = (pkg) => {
259
287
  utils.tools.logTitle('Checking package commit metadata');
260
288
  let pkgMetadata;
261
289
 
290
+ if (skipCommitsCheck) {
291
+ utils.tools.logInfo('Commits checks skip active...skippping');
292
+ return {};
293
+ }
294
+
262
295
  if (pkg.remote) {
263
296
  utils.tools.logWarning('Remote package...skipping');
264
297
  return {};
@@ -309,7 +342,13 @@ module.exports.updateVersion = (pkg, pkgMetadata, envTarget) => {
309
342
  utils.tools.logBanner('UPDATE VERSION');
310
343
 
311
344
  // getting branch flags
312
- const branches = this.getBranches();
345
+ let branches;
346
+
347
+ if (pkg.standalone) {
348
+ branches = this.getBranchesFromRepo();
349
+ } else {
350
+ branches = this.getBranches();
351
+ }
313
352
 
314
353
  // local vars
315
354
  let newVersion;
@@ -442,7 +481,7 @@ const commitPackage = (pkg, version, branches) => {
442
481
  .then(() => {
443
482
  return utils.git.commitAndPush(
444
483
  branches.branch,
445
- `chore(release): update version: ${version} - from CI server`,
484
+ `chore(release): update version: ${version} - from CI server [skip ci]`,
446
485
  pkg.paths.root
447
486
  );
448
487
  })
@@ -459,7 +498,7 @@ const tagAndMerge = (pkg, version, branches) => {
459
498
  if (!branches.isSnapshot && !branches.isSupportSnapshot) {
460
499
  return utils.git.tagVersion(
461
500
  version, branches.branch,
462
- `chore(release): tagging ${version} - from CI server`,
501
+ `chore(release): tagging ${version} - from CI server [skip ci]`,
463
502
  pkg.paths.root
464
503
  );
465
504
  }
@@ -491,7 +530,12 @@ const tagAndMerge = (pkg, version, branches) => {
491
530
  module.exports.runGitOperations = (pkg, version) => {
492
531
  utils.tools.logBanner('RUN GIT OPERATIONS');
493
532
 
494
- const branches = this.getBranches();
533
+ let branches;
534
+ if (pkg.standalone) {
535
+ branches = this.getBranchesFromRepo();
536
+ } else {
537
+ branches = this.getBranches();
538
+ }
495
539
  console.log(branches);
496
540
 
497
541
  if (pkg.remote && pkg.build && pkg.build.envTargetActive) {
@@ -618,7 +662,7 @@ module.exports.sendSuccessNotification = (pkg, version, pkgMetadata) => {
618
662
  if (!pkg.backend) {
619
663
  return Promise.resolve()
620
664
  .then(() => {
621
- if (pkg.build && pkg.build.skipLock) {
665
+ if ((pkg.build && pkg.build.skipLock) || pkg.standalone) {
622
666
  utils.tools.logInfo('lock package de-activated...skipping');
623
667
  } else {
624
668
  return metadataUtils.packageUtils.unlockPackage(pkg);
@@ -661,7 +705,7 @@ module.exports.sendErrorNotification = (pkg, exception, pkgMetadata) => {
661
705
  if (exception !== 'PACKAGE_LOCKED') {
662
706
  return Promise.resolve()
663
707
  .then(() => {
664
- if (pkg.build && pkg.build.skipLock) {
708
+ if ((pkg.build && pkg.build.skipLock) || pkg.standalone) {
665
709
  utils.tools.logInfo('lock package de-activated...skipping');
666
710
  } else {
667
711
  return metadataUtils.packageUtils.unlockPackage(pkg);
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ // UTILS
4
+ const tools = require('../../../utils/tools');
5
+ const configUtils = require('../../config/config-utils');
6
+
7
+ // INNER MODULES
8
+ const innerReleaseUiStandalone = require('./release-ui-standalone');
9
+
10
+
11
+ module.exports.run = () => {
12
+ return Promise.resolve()
13
+ .then(() => {
14
+ tools.logVersion();
15
+ })
16
+
17
+ .then(() => {
18
+ return innerReleaseUiStandalone.run();
19
+ })
20
+
21
+ .catch((e) => {
22
+ throw e;
23
+ })
24
+ }