@leverege/build-tools 2.31.4 → 2.32.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.
@@ -0,0 +1,626 @@
1
+ #!/usr/bin/env node
2
+ /* eslint-disable security/detect-unsafe-regex */
3
+ /* eslint-disable no-console */
4
+ /* eslint-disable max-len */
5
+ "use strict";
6
+
7
+ var _commandLineArgs = _interopRequireDefault(require("command-line-args"));
8
+ var _commandLineUsage = _interopRequireDefault(require("command-line-usage"));
9
+ var _zx = require("zx");
10
+ var _enquirer = _interopRequireDefault(require("enquirer"));
11
+ var _ansiColors = _interopRequireDefault(require("ansi-colors"));
12
+ var _path = _interopRequireDefault(require("path"));
13
+ var _readPkg = require("read-pkg");
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+ const {
16
+ prompt
17
+ } = _enquirer.default;
18
+ const NPMJS_TAGS = {
19
+ ALPHA: 'alpha',
20
+ BETA: 'beta',
21
+ LATEST: 'latest'
22
+ };
23
+ const DEFAULT_PACKAGES_PATH = './packages/*';
24
+
25
+ /**
26
+ * Functions
27
+ */
28
+
29
+ const validateVersionArg = ({
30
+ args
31
+ }) => {
32
+ if (!args.version) {
33
+ return;
34
+ }
35
+ const isValid = /^\d+\.\d+\.\d+(-[a-zA-Z]+\.\d+)?$/.test(args.version);
36
+ if (!isValid) {
37
+ console.log(`
38
+ ${_ansiColors.default.bold.red('ERROR:')} Invalid version arg: ${_ansiColors.default.bold.yellow(args.version)}.
39
+ Use SemVer specs (e.g: ${_ansiColors.default.bold.yellow('2.25.5-beta.1')}).
40
+ `);
41
+ process.exit(1);
42
+ }
43
+ };
44
+ const validateNpmjsTag = ({
45
+ args,
46
+ config
47
+ }) => {
48
+ const npmjsTags = Object.values(NPMJS_TAGS);
49
+ if (args['npmjs-tag'] && !npmjsTags.includes(args['npmjs-tag'])) {
50
+ console.log(`
51
+ ${_ansiColors.default.bold.red('ERROR:')} Invalid npmjs tag: ${_ansiColors.default.bold.yellow(args['npmjs-tag'])}.
52
+ Possible values: ${_ansiColors.default.bold.yellow(npmjsTags.join(', '))}.
53
+ `);
54
+ process.exit(1);
55
+ }
56
+ if ((config?.isBetaRelease === true || args?.version?.includes('-beta.')) && args['npmjs-tag'] === NPMJS_TAGS.LATEST) {
57
+ console.log(`
58
+ ${_ansiColors.default.bold.red('ERROR:')} It's not possible to publish a beta release to npmjs with tag ${_ansiColors.default.bold.yellow('latest')}.
59
+ `);
60
+ process.exit(1);
61
+ }
62
+ };
63
+ const validateArgs = args => {
64
+ validateVersionArg({
65
+ args
66
+ });
67
+ validateNpmjsTag({
68
+ args
69
+ });
70
+ };
71
+ const getCurrentBranch = async () => {
72
+ const {
73
+ stdout
74
+ } = await (0, _zx.$)`git branch --show-current`.nothrow().quiet();
75
+ return stdout.split('\n')[0];
76
+ };
77
+ const getLatestBranches = async ({
78
+ n = 10,
79
+ branchFilter
80
+ }) => {
81
+ const grepFilter = branchFilter || '';
82
+ const {
83
+ stdout
84
+ } = await (0, _zx.$)`git branch -r --sort=-committerdate --format "%(refname:lstrip=3)" | grep "${grepFilter}"`.nothrow().quiet();
85
+ const branches = stdout.split('\n').slice(0, -1).filter(branch => branch !== 'HEAD');
86
+ return branches.slice(0, n);
87
+ };
88
+ const promptForBranch = async (latestBranches, currentBranch) => {
89
+ if (latestBranches.length === 0) {
90
+ console.log(`
91
+ ${_ansiColors.default.bold.red('ERROR:')} Could not find git branches.
92
+ `);
93
+ process.exit(1);
94
+ }
95
+ const {
96
+ branch
97
+ } = await prompt({
98
+ type: 'select',
99
+ name: 'branch',
100
+ message: 'Which branch would you like to release?',
101
+ choices: latestBranches.map(option => ({
102
+ value: option
103
+ })),
104
+ initial: currentBranch
105
+ });
106
+ return branch;
107
+ };
108
+ const getBranch = async branchFilter => {
109
+ const currentBranch = await getCurrentBranch();
110
+ const latestBranches = await getLatestBranches(branchFilter);
111
+ return promptForBranch(latestBranches, currentBranch);
112
+ };
113
+ const getGitRootDirectory = async () => {
114
+ const {
115
+ stdout
116
+ } = await (0, _zx.$)`git rev-parse --show-toplevel`.quiet();
117
+ return stdout.split('\n')[0];
118
+ };
119
+ const getSubDirectories = async (repositoryRoot, directory) => {
120
+ const absolutePathDirectory = _path.default.join(repositoryRoot, directory);
121
+ const relativeDirectory = _path.default.relative(repositoryRoot, absolutePathDirectory);
122
+ try {
123
+ const entries = await _zx.fs.promises.readdir(absolutePathDirectory, {
124
+ withFileTypes: true
125
+ });
126
+ const subDirectories = entries.filter(entry => entry.isDirectory());
127
+ return subDirectories.map(entry => _path.default.join(relativeDirectory, entry.name));
128
+ } catch (err) {
129
+ return [];
130
+ }
131
+ };
132
+ const fileExists = async filePath => {
133
+ try {
134
+ await _zx.fs.promises.access(filePath);
135
+ return true;
136
+ } catch (err) {
137
+ return false;
138
+ }
139
+ };
140
+ const findPackagesInDirectories = async (repositoryRoot, directories) => {
141
+ return directories.reduce(async (accPromise, directory) => {
142
+ const acc = await accPromise;
143
+ const hasWildcard = directory.endsWith('*');
144
+ const basePath = hasWildcard ? directory.slice(0, -1) : directory;
145
+ const directoriesToSearch = hasWildcard ? await getSubDirectories(repositoryRoot, basePath) : [basePath];
146
+ for (let i = 0; i < directoriesToSearch.length; i++) {
147
+ const currentDirectory = directoriesToSearch[i];
148
+ const pkgPath = _path.default.join(directoriesToSearch[i], 'package.json');
149
+ const pkgExists = await fileExists(_path.default.join(repositoryRoot, pkgPath)); // eslint-disable-line no-await-in-loop
150
+ if (pkgExists) {
151
+ acc.push(currentDirectory);
152
+ }
153
+ }
154
+ return acc;
155
+ }, Promise.resolve([]));
156
+ };
157
+ const getMonorepoPackagePaths = async (repositoryRoot, packagesPath) => {
158
+ let pkg;
159
+ try {
160
+ pkg = await (0, _readPkg.readPackage)({
161
+ cwd: repositoryRoot
162
+ });
163
+ } catch (err) {}
164
+ return findPackagesInDirectories(repositoryRoot, pkg?.workspaces || [packagesPath]);
165
+ };
166
+ const selectPackageToUpdate = async (repositoryRoot, packagePaths) => {
167
+ const currentPath = process.cwd();
168
+ const currentPackageRelativePath = _path.default.relative(repositoryRoot, currentPath);
169
+ const {
170
+ packageName
171
+ } = await prompt({
172
+ type: 'select',
173
+ name: 'packageName',
174
+ message: 'What package are you releasing?',
175
+ choices: packagePaths,
176
+ initial: currentPackageRelativePath
177
+ });
178
+ return _path.default.join(repositoryRoot, packageName);
179
+ };
180
+ const getPackagePath = async ({
181
+ repositoryRoot,
182
+ packagesPath = DEFAULT_PACKAGES_PATH
183
+ }) => {
184
+ const packagePaths = await getMonorepoPackagePaths(repositoryRoot, packagesPath);
185
+ if (packagePaths.length > 0) {
186
+ return selectPackageToUpdate(repositoryRoot, packagePaths);
187
+ }
188
+ return repositoryRoot;
189
+ };
190
+ const checkoutToBranch = async branch => {
191
+ try {
192
+ await (0, _zx.$)`git checkout ${branch}`;
193
+ } catch (err) {
194
+ console.log(err.stderr || err);
195
+ process.exit(1);
196
+ }
197
+ };
198
+ const getPackageJsonVersion = async packagePath => {
199
+ if (!packagePath) {
200
+ console.log(`
201
+ ${_ansiColors.default.bold.red('ERROR:')} Could not find a package.json file.
202
+ The tag-release script must run from a npm project.
203
+ `);
204
+ return process.exit(1);
205
+ }
206
+ const packageJson = await (0, _readPkg.readPackage)({
207
+ cwd: packagePath
208
+ });
209
+ return packageJson.version;
210
+ };
211
+ const getNextVersions = currentVersion => {
212
+ const [major, minor, patch, beta] = currentVersion.split(/\.|-beta\./).map(Number);
213
+ const nextMajor = `${major + 1}.0.0`;
214
+ const nextMinor = `${major}.${minor + 1}.0`;
215
+ const nextPatch = `${major}.${minor}.${patch + 1}`;
216
+ const nextBeta = beta ? `${major}.${minor}.${patch}-beta.${beta + 1}` : `${major}.${minor}.${patch + 1}-beta.1`;
217
+ return {
218
+ nextMajor,
219
+ nextMinor,
220
+ nextPatch,
221
+ nextBeta
222
+ };
223
+ };
224
+ const promptForVersion = async currentVersion => {
225
+ const {
226
+ nextMajor,
227
+ nextMinor,
228
+ nextPatch,
229
+ nextBeta
230
+ } = getNextVersions(currentVersion);
231
+ const choices = [{
232
+ hint: '(major release)',
233
+ value: nextMajor
234
+ }, {
235
+ hint: '(minor release)',
236
+ value: nextMinor
237
+ }, {
238
+ hint: '(patch release)',
239
+ value: nextPatch
240
+ }, {
241
+ hint: '(beta release)',
242
+ value: nextBeta
243
+ }, {
244
+ value: 'custom'
245
+ }];
246
+ const {
247
+ version
248
+ } = await prompt({
249
+ type: 'select',
250
+ name: 'version',
251
+ message: `What version are you releasing (current version is ${currentVersion})?`,
252
+ choices
253
+ });
254
+ if (version === 'custom') {
255
+ const {
256
+ customVersion
257
+ } = await prompt({
258
+ type: 'input',
259
+ name: 'customVersion',
260
+ message: `What custom version are you releasing (current version is ${currentVersion})?`,
261
+ initial: currentVersion
262
+ });
263
+ return customVersion;
264
+ }
265
+ return version;
266
+ };
267
+ const getVersion = async ({
268
+ branch,
269
+ packagePath
270
+ }) => {
271
+ await checkoutToBranch(branch);
272
+ const currentVersion = await getPackageJsonVersion(packagePath);
273
+ return promptForVersion(currentVersion);
274
+ };
275
+ const getPackageName = async ({
276
+ packagePath
277
+ }) => {
278
+ const noTrailingSlashPath = packagePath.slice(-1) === '/' ? packagePath.substr(0, packagePath.length - 1) : packagePath;
279
+ return noTrailingSlashPath.split('/').slice(-1)[0];
280
+ };
281
+ const getBuildMessage = ({
282
+ isPackageInRepositoryRoot,
283
+ packageName,
284
+ version
285
+ }) => {
286
+ if (isPackageInRepositoryRoot) {
287
+ return `BUILD v${version}`;
288
+ }
289
+ return `BUILD ${packageName}/v${version}`;
290
+ };
291
+ const getGitTagSuffix = async () => {
292
+ const {
293
+ tagSuffix
294
+ } = await prompt({
295
+ type: 'input',
296
+ name: 'tagSuffix',
297
+ message: 'What suffix you like to add to the tag name for git? (e.g: "-RC.1" for v1.2.3-RC.1)'
298
+ });
299
+ return tagSuffix;
300
+ };
301
+ const confirmPushCommit = async buildMessage => {
302
+ const {
303
+ confirm
304
+ } = await prompt([{
305
+ type: 'confirm',
306
+ name: 'confirm',
307
+ message: `${_ansiColors.default.bold.red('[Warning]')} Commit and push ${_ansiColors.default.bold.yellow(buildMessage)} to git remote?`
308
+ }]);
309
+ return confirm;
310
+ };
311
+ const isPackageInRepositoryRoot = async ({
312
+ repositoryRoot,
313
+ packagePath
314
+ }) => {
315
+ return repositoryRoot === packagePath;
316
+ };
317
+ const promptForNpmjsTag = async ({
318
+ isBetaRelease
319
+ }) => {
320
+ const choices = Object.values(NPMJS_TAGS).map(option => ({
321
+ value: option,
322
+ ...(isBetaRelease && option === NPMJS_TAGS.LATEST && {
323
+ disabled: '(not available for beta releases)'
324
+ })
325
+ }));
326
+ const {
327
+ npmjsTag
328
+ } = await prompt({
329
+ type: 'select',
330
+ name: 'npmjsTag',
331
+ message: 'Which npmjs tag would you like to use when publishing?',
332
+ choices,
333
+ initial: isBetaRelease ? NPMJS_TAGS.BETA : NPMJS_TAGS.LATEST
334
+ });
335
+ return npmjsTag;
336
+ };
337
+ const confirmTagRelease = async ({
338
+ isBetaRelease,
339
+ publishable
340
+ }) => {
341
+ const message = ['Releasing will commit', isBetaRelease ? ' and push' : ', push, and tag', ' the version in git', publishable ? ' and npm' : '', '. Proceed?'].join('');
342
+ const {
343
+ confirmResponse
344
+ } = await prompt({
345
+ type: 'select',
346
+ name: 'confirmResponse',
347
+ message,
348
+ choices: ['yes', 'no', 'advanced'],
349
+ initial: 'yes'
350
+ });
351
+ if (confirmResponse === 'no') {
352
+ console.log('Aborting...');
353
+ process.exit();
354
+ }
355
+ return confirmResponse;
356
+ };
357
+ const isWorkspacePackage = async () => {
358
+ const gitRootDirectory = await getGitRootDirectory();
359
+ try {
360
+ const packageJson = await (0, _readPkg.readPackage)({
361
+ cwd: gitRootDirectory
362
+ });
363
+ return packageJson?.workspaces?.length > 0;
364
+ } catch (err) {
365
+ return false;
366
+ }
367
+ };
368
+ const updateNpmPackageJsonAndLock = async config => {
369
+ const {
370
+ version,
371
+ packagePath,
372
+ isPackageInRepositoryRoot
373
+ } = config;
374
+ const isWorkspace = await isWorkspacePackage();
375
+ try {
376
+ if (!isPackageInRepositoryRoot) {
377
+ await (0, _zx.$)`npm version --no-git-tag-version ${version} --prefix ${packagePath}`;
378
+ if (isWorkspace) {
379
+ await (0, _zx.$)`npm install`;
380
+ } else {
381
+ await (0, _zx.$)`npm install --prefix ${packagePath}`;
382
+ }
383
+ } else {
384
+ await (0, _zx.$)`npm version --no-git-tag-version ${version}`;
385
+ }
386
+ } catch (err) {
387
+ console.log(err.stderr || err);
388
+ process.exit(1);
389
+ }
390
+ };
391
+ const createNewBuildCommit = async ({
392
+ buildMessage
393
+ }) => {
394
+ try {
395
+ await (0, _zx.$)`git add .`;
396
+ await (0, _zx.$)`git commit -m ${buildMessage}`;
397
+ } catch (err) {
398
+ console.log(err.stderr || err);
399
+ process.exit(1);
400
+ }
401
+ };
402
+ const pushToGitRemote = async () => {
403
+ try {
404
+ await (0, _zx.$)`git push`;
405
+ } catch (err) {
406
+ console.log(err.stderr || err);
407
+ process.exit(1);
408
+ }
409
+ };
410
+ const commitAndPushNewBuild = async config => {
411
+ const {
412
+ buildMessage,
413
+ noConfirm
414
+ } = config;
415
+ const confirmAnswer = noConfirm || (await confirmPushCommit(buildMessage));
416
+ if (!confirmAnswer) {
417
+ console.log('Aborting...');
418
+ process.exit();
419
+ }
420
+ await updateNpmPackageJsonAndLock(config);
421
+ await createNewBuildCommit(config);
422
+ await pushToGitRemote();
423
+ };
424
+ const confirmPushTag = async tagName => {
425
+ const {
426
+ confirm
427
+ } = await prompt([{
428
+ type: 'confirm',
429
+ name: 'confirm',
430
+ message: `${_ansiColors.default.bold.red('[Warning]')} Push new tag ${_ansiColors.default.bold.yellow(tagName)} to git remote?`
431
+ }]);
432
+ return confirm;
433
+ };
434
+ const createGitTag = async tagName => {
435
+ try {
436
+ await (0, _zx.$)`git tag ${tagName}`;
437
+ } catch (err) {
438
+ console.log(err.stderr || err);
439
+ process.exit(1);
440
+ }
441
+ };
442
+ const pushGitTag = async tagName => {
443
+ try {
444
+ await (0, _zx.$)`git push origin ${tagName}`;
445
+ } catch (err) {
446
+ console.log(err.stderr || err);
447
+ process.exit(1);
448
+ }
449
+ };
450
+ const createAndPushGitTag = async ({
451
+ tagName,
452
+ noConfirm
453
+ }) => {
454
+ const confirmAnswer = noConfirm || (await confirmPushTag(tagName));
455
+ if (confirmAnswer) {
456
+ await createGitTag(tagName);
457
+ await pushGitTag(tagName);
458
+ }
459
+ };
460
+ const confirmPublishToNpmjs = async (version, npmjsTag) => {
461
+ const {
462
+ confirm
463
+ } = await prompt([{
464
+ type: 'confirm',
465
+ name: 'confirm',
466
+ message: `${_ansiColors.default.bold.red('[Warning]')} Publish new version ${_ansiColors.default.bold.yellow(version)} to npmjs with tag ${_ansiColors.default.bold.yellow(npmjsTag)}?`
467
+ }]);
468
+ return confirm;
469
+ };
470
+ const publishToNpmjs = async ({
471
+ version,
472
+ npmjsTag,
473
+ noConfirm
474
+ }) => {
475
+ const confirmAnswer = noConfirm || (await confirmPublishToNpmjs(version, npmjsTag));
476
+ if (!confirmAnswer) {
477
+ console.log('Aborting...');
478
+ process.exit();
479
+ }
480
+ try {
481
+ await (0, _zx.$)`npm publish --tag ${npmjsTag}`;
482
+ } catch (err) {
483
+ console.log(err.stderr || err);
484
+ process.exit(1);
485
+ }
486
+ };
487
+ const displayReleaseInfo = config => {
488
+ const {
489
+ branch,
490
+ version,
491
+ repositoryRoot,
492
+ packageName,
493
+ packagePath,
494
+ buildMessage,
495
+ tagName,
496
+ publishable,
497
+ npmjsTag,
498
+ isBetaRelease
499
+ } = config;
500
+ console.log(`
501
+
502
+ ${_ansiColors.default.bold.green('============ Tag Release Summary ============')}
503
+ ${_ansiColors.default.blue('Branch:')} ${branch}
504
+ ${_ansiColors.default.blue('Version:')} ${version}
505
+ ${_ansiColors.default.blue('Root directory:')} ${repositoryRoot}
506
+ ${_ansiColors.default.blue('Package name:')} ${packageName}
507
+ ${_ansiColors.default.blue('package.json path:')} ${_path.default.join(packagePath, 'package.json')}${buildMessage ? `
508
+ ${_ansiColors.default.blue('Commit message:')} ${buildMessage}` : ''}${isBetaRelease ? '' : `
509
+ ${_ansiColors.default.blue('Git tag:')} ${tagName}`}${publishable ? `
510
+ ${_ansiColors.default.blue('Npmjs tag:')} ${npmjsTag}` : ''}
511
+ ${_ansiColors.default.bold.green('=============================================')}
512
+ `);
513
+ };
514
+
515
+ /**
516
+ * Script
517
+ */
518
+
519
+ const optionList = [{
520
+ name: 'branch',
521
+ type: String,
522
+ alias: 'b',
523
+ description: 'branch where the tag will be created'
524
+ }, {
525
+ name: 'npmjs-tag',
526
+ type: String,
527
+ alias: 'n',
528
+ description: 'npmjs package tag to be used when publishing (for npmjs lib repositories)',
529
+ typeLabel: 'alpha|beta|latest'
530
+ }, {
531
+ name: 'version',
532
+ type: String,
533
+ alias: 'v',
534
+ description: 'version to be tagged'
535
+ }, {
536
+ name: 'publishable',
537
+ type: Boolean,
538
+ alias: 'p',
539
+ description: 'flag to indicate the repository is publishable to npmjs'
540
+ }, {
541
+ name: 'package-path',
542
+ type: String,
543
+ alias: 'a',
544
+ description: 'relative path to the package from the projec\'s root in case it\'s a monorepo'
545
+ }, {
546
+ name: 'tag-suffix',
547
+ type: String,
548
+ alias: 't',
549
+ description: 'tag suffix to be appended to the version when pushing to git'
550
+ }, {
551
+ name: 'branch-filter',
552
+ type: String,
553
+ alias: 'f',
554
+ description: 'branch filter used to filter available branches in interactive mode'
555
+ }, {
556
+ name: 'no-commit',
557
+ type: Boolean,
558
+ description: 'do not create a new commit on git (in case the goal is just tagging it)'
559
+ }, {
560
+ name: 'no-confirm',
561
+ type: Boolean,
562
+ description: 'push to git and publish to npmjs without asking for confirmation'
563
+ }, {
564
+ name: 'help',
565
+ type: Boolean,
566
+ alias: 'h',
567
+ description: 'show this help'
568
+ }];
569
+ const sections = [{
570
+ header: 'Tag release script',
571
+ content: 'This script is intended to give users a simple way to create git tags, push them and publish to Npmjs (if the --publishable flag is passed)'
572
+ }, {
573
+ header: 'Options',
574
+ optionList
575
+ }];
576
+ const args = (0, _commandLineArgs.default)(optionList, {
577
+ partial: true
578
+ });
579
+ const help = (0, _commandLineUsage.default)(sections);
580
+ if (args.help) {
581
+ console.log(help);
582
+ process.exit();
583
+ }
584
+ validateArgs(args);
585
+ const config = {};
586
+ config.noConfirm = !!args['no-confirm'];
587
+ config.noCommit = !!args['no-commit'];
588
+ config.repositoryRoot = await getGitRootDirectory();
589
+ config.branch = args.branch || (await getBranch({
590
+ branchFilter: args['branch-filter']
591
+ }));
592
+ const argsPackagePath = args['package-path'] && _path.default.join(config.repositoryRoot, args['package-path']);
593
+ config.packagePath = argsPackagePath || (await getPackagePath(config));
594
+ config.isPackageInRepositoryRoot = await isPackageInRepositoryRoot(config);
595
+ config.version = args.version || (await getVersion(config));
596
+ config.packageName = await getPackageName(config);
597
+ config.buildMessage = config.noCommit ? '' : getBuildMessage(config);
598
+ config.isBetaRelease = config.version.includes('-beta.');
599
+ if (!config.isBetaRelease) {
600
+ const tagSuffix = args['tag-suffix'] ?? (await getGitTagSuffix());
601
+ const tagPrefix = config.isPackageInRepositoryRoot ? '' : `${config.packageName}/`;
602
+ config.tagName = `${tagPrefix}v${config.version}${tagSuffix}`;
603
+ }
604
+ config.publishable = !!args.publishable;
605
+ if (config.publishable) {
606
+ validateNpmjsTag({
607
+ config,
608
+ args
609
+ });
610
+ config.npmjsTag = args['npmjs-tag'] || (await promptForNpmjsTag(config));
611
+ }
612
+ displayReleaseInfo(config);
613
+ const confirmResponse = await confirmTagRelease(config);
614
+ if (confirmResponse === 'yes') {
615
+ config.noConfirm = true;
616
+ }
617
+ if (!config.noCommit) {
618
+ await commitAndPushNewBuild(config);
619
+ }
620
+ if (!config.isBetaRelease) {
621
+ await createAndPushGitTag(config);
622
+ }
623
+ if (config.publishable) {
624
+ await publishToNpmjs(config);
625
+ }
626
+ process.exit();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.31.4",
3
+ "version": "2.32.0",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -46,7 +46,8 @@
46
46
  "push-my-chart": "src/push-my-chart",
47
47
  "unleash": "src/unleash.js",
48
48
  "firebaseDeploy": "src/firebaseDeploy.mjs",
49
- "firebaseServe": "src/firebaseServe.mjs"
49
+ "firebaseServe": "src/firebaseServe.mjs",
50
+ "tag-release": "src/tag-release.mjs"
50
51
  },
51
52
  "author": "Leverege Devs",
52
53
  "license": "SEE LICENSE IN LICENSE.md",
@@ -63,6 +64,7 @@
63
64
  "js-yaml": "^4.1.0",
64
65
  "npm-registry-fetch": "^13.3.1",
65
66
  "parse-gitignore": "^2.0.0",
67
+ "read-pkg": "^8.0.0",
66
68
  "readline-sync": "^1.4.10",
67
69
  "semver": "^7.3.8",
68
70
  "simple-git": "^3.17.0",
@@ -48,7 +48,7 @@ extraObjects:
48
48
  entryPoints:
49
49
  - websecure
50
50
  routes:
51
- - match: Host(`OVH:<PROJECT_ID>-monitoring.OVH:<HOST>.com`)
51
+ - match: Host(`OVH:<PROJECT_NAME>-monitoring.OVH:<HOST>.com`)
52
52
  kind: Rule
53
53
  services:
54
54
  - name: grafana
@@ -27,7 +27,7 @@ logs:
27
27
  #
28
28
  #ports:
29
29
  # mqtt:
30
- # export: true
30
+ # expose: true
31
31
  # port: 1883
32
32
  # protocol: TCP
33
33
  # mqtts:
@@ -81,3 +81,9 @@ resources:
81
81
  requests:
82
82
  cpu: "7000m"
83
83
  memory: "12Gi"
84
+
85
+ tolerations:
86
+ - key: "high-compute"
87
+ operator: "Equal"
88
+ value: "true"
89
+ effect: "NoSchedule"
package/src/helmup CHANGED
@@ -13,11 +13,13 @@ PLATFORM=(
13
13
  api-server
14
14
  db-curator
15
15
  emailer
16
+ fota-server
16
17
  imagine
17
18
  message-processor
18
19
  messenger
19
20
  reason
20
21
  resource-server
22
+ rule-engine
21
23
  scheduler
22
24
  transponder-bq
23
25
  transponder-rt