lincd-cli 0.2.21 → 0.2.24

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.
@@ -18,12 +18,13 @@ const Page1 = lazy(() => import('./pages/Page1' /* webpackPrefetch: true */));
18
18
  declare var window;
19
19
  export default function App({
20
20
  assets = typeof window !== 'undefined' ? window['assetManifest'] : {},
21
- //on the frontend data will not be set yet, but it will be present in the initial HTML as a script tag with JSON-LD inside, with the ID: lincd_data
21
+ //on the frontend data will not be set yet, but it will be present in the initial HTML as a script tag with JSON-LD inside, with the ID: request-ld
22
22
  //so here we read that back to the data variable, so that the rendering (of that same <script> tag) will be identical as the backend
23
- data = typeof document !== 'undefined' ? document.getElementById('lincd_data')?.innerText : null,
23
+ requestLD = typeof document !== 'undefined' ? document.getElementById('request-ld')?.innerText : null,
24
+ requestObject = typeof document !== 'undefined' ? document.getElementById('request-json')?.innerText : null,
24
25
  }) {
25
26
  return (
26
- <Html assets={assets} data={data} title="${name} - LINCD App">
27
+ <Html assets={assets} requestObject={requestObject} requestLD={requestLD} title="${name} - LINCD App">
27
28
  <Suspense fallback={<Spinner />}>
28
29
  <ErrorBoundary FallbackComponent={Error}>
29
30
  <Content />
@@ -90,20 +91,25 @@ function Header() {
90
91
  );
91
92
  }
92
93
 
93
- function Html({assets, data, children, title}) {
94
+ function Html({assets,requestObject,requestLD,children,title}) {
94
95
  return (
95
96
  <html lang="en">
96
97
  {globalThis.document?.head ? (
97
98
  <head dangerouslySetInnerHTML={{__html: document.head.innerHTML}} />
98
99
  ) : (
99
100
  <head>
101
+ <title>{title}</title>
102
+
100
103
  <meta charSet="utf-8" />
101
104
  <meta name="viewport" content="width=device-width, initial-scale=1" />
105
+
102
106
  <link rel="shortcut icon" href="/static/favicon.ico" />
103
107
  <link rel="stylesheet" href={assets['main.css']} />
108
+
104
109
  {assets['tailwind-cdn'] && <script src={assets['tailwind-cdn']}></script>}
105
- <title>{title}</title>
106
- <script id='lincd_data' type='application/ld+json' dangerouslySetInnerHTML={{__html: data}} />
110
+ <script id='request-ld' type='application/ld+json' dangerouslySetInnerHTML={{__html: requestLD}} />
111
+ <script id='request-json' type='application/json' dangerouslySetInnerHTML={{__html: requestObject}} />
112
+
107
113
  </head>
108
114
  )}
109
115
  <body>
@@ -1,3 +1,5 @@
1
+ import {initFrontend} from 'lincd-server/lib/utils/Frontend';
2
+
1
3
  window['$RefreshReg$'] = () => {};
2
4
  window['$RefreshSig$'] = () => () => {};
3
5
 
@@ -12,11 +14,14 @@ import {BackendFileStore} from 'lincd-server/lib/shapes/BackendFileStore';
12
14
  export const store = new BackendFileStore('main');
13
15
  Storage.setDefaultStore(store);
14
16
 
15
- hydrateRoot(
16
- document,
17
- <React.StrictMode>
18
- <BrowserRouter>
19
- <App assets={window['assetManifest']} />
20
- </BrowserRouter>
21
- </React.StrictMode>,
22
- );
17
+
18
+ initFrontend().then(() => {
19
+ hydrateRoot(
20
+ document,
21
+ <React.StrictMode>
22
+ <BrowserRouter>
23
+ <App assets={window['assetManifest']} />
24
+ </BrowserRouter>
25
+ </React.StrictMode>,
26
+ );
27
+ });
@@ -1,4 +1,27 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
26
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
27
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -81,9 +104,7 @@ var fs_extra_1 = __importDefault(require("fs-extra"));
81
104
  var utils_1 = require("./utils");
82
105
  var chalk_1 = __importDefault(require("chalk"));
83
106
  var child_process_1 = require("child_process");
84
- var package_metadata_js_1 = require("lincd-modules/lib/scripts/package-metadata.js");
85
107
  var models_1 = require("lincd/lib/models");
86
- var Module_1 = require("lincd-modules/lib/shapes/Module");
87
108
  var env_cmd_1 = require("env-cmd");
88
109
  var JSONLDWriter_1 = require("lincd-jsonld/lib/utils/JSONLDWriter");
89
110
  var NameSpace_1 = require("lincd/lib/utils/NameSpace");
@@ -362,8 +383,9 @@ function buildAll(target, target2, target3) {
362
383
  }
363
384
  debugInfo('Now building: ' + chalk_1["default"].blue(packageGroup.map(function (i) { return i.packageName; })));
364
385
  return function (pkg) { return __awaiter(_this, void 0, void 0, function () {
365
- var command;
386
+ var command, skipping;
366
387
  return __generator(this, function (_a) {
388
+ skipping = false;
367
389
  //if we're skipping builds until a certain package
368
390
  if (!building) {
369
391
  //if the package name matches the package we're supposed to start from then start building packages
@@ -374,6 +396,7 @@ function buildAll(target, target2, target3) {
374
396
  else {
375
397
  log(chalk_1["default"].blue('skipping ' + pkg.packageName));
376
398
  command = Promise.resolve(true);
399
+ skipping = true;
377
400
  }
378
401
  }
379
402
  //unless told otherwise, build the package
@@ -403,7 +426,9 @@ function buildAll(target, target2, target3) {
403
426
  }
404
427
  })
405
428
  .then(function (res) {
406
- log(chalk_1["default"].green('Built ' + pkg.packageName));
429
+ if (!skipping) {
430
+ log(chalk_1["default"].green('Built ' + pkg.packageName));
431
+ }
407
432
  done.add(pkg);
408
433
  packagesLeft--;
409
434
  // log(chalk.magenta(packagesLeft + ' packages left'));
@@ -959,7 +984,7 @@ var register = function (registryURL) {
959
984
  };
960
985
  exports.register = register;
961
986
  var buildMetadata = function () { return __awaiter(void 0, void 0, void 0, function () {
962
- var app, envVars, updatedPaths, localPackagePaths, metadataFolder, _loop_1, localPackagePaths_1, localPackagePaths_1_1, _a, packageCodeName, packagePath, lincdPackagePath, isAppPackage, e_1_1, packageMetaData, metadataFile;
987
+ var app, envVars, updatedPaths, localPackagePaths, metadataFolder, _loop_1, localPackagePaths_1, localPackagePaths_1_1, _a, packageCodeName, packagePath, lincdPackagePath, isAppPackage, packageMetaData, metadataFile;
963
988
  var e_1, _b;
964
989
  return __generator(this, function (_c) {
965
990
  switch (_c.label) {
@@ -986,13 +1011,12 @@ var buildMetadata = function () { return __awaiter(void 0, void 0, void 0, funct
986
1011
  case 2:
987
1012
  _c.sent(); //{recursive:true} but not needed with fs-extra
988
1013
  _loop_1 = function (packageCodeName, packagePath, lincdPackagePath, isAppPackage) {
989
- var errors;
990
- return __generator(this, function (_d) {
991
- switch (_d.label) {
992
- case 0:
993
- errors = false;
994
- return [4 /*yield*/, (0, package_metadata_js_1.getPackageMetadata)(packagePath, lincdPackagePath).then(function (response) { return __awaiter(void 0, void 0, void 0, function () {
995
- var pkg, lincdApp, packageMetaData_1, metadataFile_1;
1014
+ var errors = false;
1015
+ Promise.resolve().then(function () { return __importStar(require('lincd-modules/lib/scripts/package-metadata.js')); }).then(function (script) { return __awaiter(void 0, void 0, void 0, function () {
1016
+ return __generator(this, function (_a) {
1017
+ switch (_a.label) {
1018
+ case 0: return [4 /*yield*/, script.getPackageMetadata(packagePath, lincdPackagePath).then(function (response) { return __awaiter(void 0, void 0, void 0, function () {
1019
+ var pkgNode, lincdApp, packageMetaData_1, metadataFile_1;
996
1020
  return __generator(this, function (_a) {
997
1021
  switch (_a.label) {
998
1022
  case 0:
@@ -1003,16 +1027,16 @@ var buildMetadata = function () { return __awaiter(void 0, void 0, void 0, funct
1003
1027
  errors = true;
1004
1028
  return [3 /*break*/, 3];
1005
1029
  case 1:
1006
- pkg = Module_1.Module.getFromURI(response.packageUri);
1030
+ pkgNode = models_1.NamedNode.getOrCreate(response.packageUri);
1007
1031
  lincdApp = (0, NameSpace_1.createNameSpace)('http://lincd.org/ont/lincd-app/');
1008
1032
  Prefix_1.Prefix.add('lincdApp', 'http://lincd.org/ont/lincd-app/');
1009
1033
  if (isAppPackage) {
1010
1034
  //Note: this needs to match with LincdWebApp.ownPackage accessor;
1011
- app.overwrite(lincdApp('ownPackage'), pkg.namedNode);
1035
+ app.overwrite(lincdApp('ownPackage'), pkgNode);
1012
1036
  }
1013
1037
  else {
1014
1038
  //Note: this needs to match with LincdWebApp.packages accessor;
1015
- app.set(lincdApp('maintainsPackage'), pkg.namedNode);
1039
+ app.set(lincdApp('maintainsPackage'), pkgNode);
1016
1040
  }
1017
1041
  packageMetaData_1 = JSON.stringify(response.result, null, 2);
1018
1042
  metadataFile_1 = path_1["default"].join(metadataFolder, packageCodeName + '.json');
@@ -1026,46 +1050,34 @@ var buildMetadata = function () { return __awaiter(void 0, void 0, void 0, funct
1026
1050
  }
1027
1051
  });
1028
1052
  }); })];
1029
- case 1:
1030
- _d.sent();
1031
- return [2 /*return*/];
1032
- }
1033
- });
1053
+ case 1:
1054
+ _a.sent();
1055
+ return [2 /*return*/];
1056
+ }
1057
+ });
1058
+ }); });
1034
1059
  };
1035
- _c.label = 3;
1036
- case 3:
1037
- _c.trys.push([3, 8, 9, 10]);
1038
- localPackagePaths_1 = __values(localPackagePaths), localPackagePaths_1_1 = localPackagePaths_1.next();
1039
- _c.label = 4;
1040
- case 4:
1041
- if (!!localPackagePaths_1_1.done) return [3 /*break*/, 7];
1042
- _a = __read(localPackagePaths_1_1.value, 4), packageCodeName = _a[0], packagePath = _a[1], lincdPackagePath = _a[2], isAppPackage = _a[3];
1043
- return [5 /*yield**/, _loop_1(packageCodeName, packagePath, lincdPackagePath, isAppPackage)];
1044
- case 5:
1045
- _c.sent();
1046
- _c.label = 6;
1047
- case 6:
1048
- localPackagePaths_1_1 = localPackagePaths_1.next();
1049
- return [3 /*break*/, 4];
1050
- case 7: return [3 /*break*/, 10];
1051
- case 8:
1052
- e_1_1 = _c.sent();
1053
- e_1 = { error: e_1_1 };
1054
- return [3 /*break*/, 10];
1055
- case 9:
1056
1060
  try {
1057
- if (localPackagePaths_1_1 && !localPackagePaths_1_1.done && (_b = localPackagePaths_1["return"])) _b.call(localPackagePaths_1);
1061
+ for (localPackagePaths_1 = __values(localPackagePaths), localPackagePaths_1_1 = localPackagePaths_1.next(); !localPackagePaths_1_1.done; localPackagePaths_1_1 = localPackagePaths_1.next()) {
1062
+ _a = __read(localPackagePaths_1_1.value, 4), packageCodeName = _a[0], packagePath = _a[1], lincdPackagePath = _a[2], isAppPackage = _a[3];
1063
+ _loop_1(packageCodeName, packagePath, lincdPackagePath, isAppPackage);
1064
+ }
1065
+ }
1066
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1067
+ finally {
1068
+ try {
1069
+ if (localPackagePaths_1_1 && !localPackagePaths_1_1.done && (_b = localPackagePaths_1["return"])) _b.call(localPackagePaths_1);
1070
+ }
1071
+ finally { if (e_1) throw e_1.error; }
1058
1072
  }
1059
- finally { if (e_1) throw e_1.error; }
1060
- return [7 /*endfinally*/];
1061
- case 10: return [4 /*yield*/, JSONLDWriter_1.JSONLDWriter.stringify(app, process.env.NODE_ENV === 'development')];
1062
- case 11:
1073
+ return [4 /*yield*/, JSONLDWriter_1.JSONLDWriter.stringify(app, process.env.NODE_ENV === 'development')];
1074
+ case 3:
1063
1075
  packageMetaData = _c.sent();
1064
1076
  metadataFile = path_1["default"].join(metadataFolder, '_app.json');
1065
1077
  return [4 /*yield*/, fs_extra_1["default"].writeFile(metadataFile, packageMetaData).then(function () {
1066
1078
  updatedPaths.push(metadataFile);
1067
1079
  })];
1068
- case 12:
1080
+ case 4:
1069
1081
  _c.sent();
1070
1082
  return [2 /*return*/, updatedPaths];
1071
1083
  }
@@ -1151,12 +1163,24 @@ var getLastModifiedSourceTime = function (packagePath) {
1151
1163
  var getLastCommitTime = function (packagePath) {
1152
1164
  // console.log(`git log -1 --format=%ci -- ${packagePath}`);
1153
1165
  // process.exit();
1154
- return (0, utils_1.execPromise)("git log -1 --format=%ci -- ".concat(packagePath))
1155
- .then(function (result) {
1156
- var lastCommit = new Date(result);
1157
- // console.log(packagePath,result,lastCommit);
1158
- return lastCommit;
1159
- })["catch"](function (_a) {
1166
+ return (0, utils_1.execPromise)("git log -1 --format=\"%h %ci\" -- ".concat(packagePath))
1167
+ .then(function (result) { return __awaiter(void 0, void 0, void 0, function () {
1168
+ var commitId, date, lastCommitDate, changes;
1169
+ return __generator(this, function (_a) {
1170
+ switch (_a.label) {
1171
+ case 0:
1172
+ commitId = result.substring(0, result.indexOf(" "));
1173
+ date = result.substring(commitId.length + 1);
1174
+ lastCommitDate = new Date(date);
1175
+ return [4 /*yield*/, (0, utils_1.execPromise)("git show --stat --oneline ".concat(commitId, " -- ").concat(packagePath))];
1176
+ case 1:
1177
+ changes = _a.sent();
1178
+ // log(packagePath,result,lastCommit);
1179
+ // log(changes);
1180
+ return [2 /*return*/, { date: lastCommitDate, changes: changes, commitId: commitId }];
1181
+ }
1182
+ });
1183
+ }); })["catch"](function (_a) {
1160
1184
  var error = _a.error, stdout = _a.stdout, stderr = _a.stderr;
1161
1185
  debugInfo(chalk_1["default"].red('Git error: ') + error.message.toString());
1162
1186
  return null;
@@ -1189,7 +1213,6 @@ var publishUpdated = function (test) {
1189
1213
  var _this = this;
1190
1214
  if (test === void 0) { test = false; }
1191
1215
  var packages = getLocalLincdModules();
1192
- var browserCoreBuilt = false;
1193
1216
  var p = Promise.resolve('');
1194
1217
  var packagesLeft = packages.length;
1195
1218
  var results = [];
@@ -1215,7 +1238,7 @@ var publishUpdated = function (test) {
1215
1238
  }
1216
1239
  return (0, utils_1.execPromise)('npm info ' + pckg.packageName + ' --json')
1217
1240
  .then(function (output) { return __awaiter(_this, void 0, void 0, function () {
1218
- var info, lastPublish, lastPublishDate, lastCommit, err_1, res, browserModule;
1241
+ var info, lastPublish, lastPublishDate, lastCommitInfo, err_1;
1219
1242
  return __generator(this, function (_a) {
1220
1243
  switch (_a.label) {
1221
1244
  case 0:
@@ -1239,8 +1262,8 @@ var publishUpdated = function (test) {
1239
1262
  lastPublishDate = new Date(lastPublish);
1240
1263
  return [4 /*yield*/, getLastCommitTime(pckg.path)];
1241
1264
  case 1:
1242
- lastCommit = _a.sent();
1243
- if (!lastCommit) {
1265
+ lastCommitInfo = _a.sent();
1266
+ if (!lastCommitInfo) {
1244
1267
  shouldPublish = false;
1245
1268
  debugInfo('Could not determine last git commit');
1246
1269
  // return previousResult + ' ' + chalk.red(pckg.packageName + ' - could not determine last commit\n');
@@ -1249,19 +1272,17 @@ var publishUpdated = function (test) {
1249
1272
  else {
1250
1273
  //NOTE: removed lastModified, because switching branches will say that the file was modified and cause everything to publish
1251
1274
  //SO: now you NEED TO commit before it picks up that you should publish
1252
- shouldPublish = lastPublishDate.getTime() < lastCommit.getTime();
1253
- // if (shouldPublish) {
1254
- // log(
1255
- // lastPublishDate.toDateString() +
1256
- // ' ' +
1257
- // lastPublishDate.toTimeString() +
1258
- // ' published ' +
1259
- // info.version,
1260
- // );
1261
- // log(
1262
- // lastCommit.toDateString() + ' ' + new Date(lastCommit).toTimeString() + ' source last committed',
1263
- // );
1264
- // }
1275
+ shouldPublish = lastPublishDate.getTime() < lastCommitInfo.date.getTime();
1276
+ if (shouldPublish) {
1277
+ log(chalk_1["default"].magenta(pckg.packageName) + ' should be published because:');
1278
+ log(lastPublishDate.toDateString() +
1279
+ ' ' +
1280
+ lastPublishDate.toTimeString() +
1281
+ ' published ' +
1282
+ info.version);
1283
+ log(lastCommitInfo.date.toDateString() + ' ' + new Date(lastCommitInfo.date).toTimeString() + ' source last committed:');
1284
+ log(lastCommitInfo.changes);
1285
+ }
1265
1286
  }
1266
1287
  _a.label = 2;
1267
1288
  case 2: return [3 /*break*/, 4];
@@ -1275,21 +1296,8 @@ var publishUpdated = function (test) {
1275
1296
  return [2 /*return*/, chalk_1["default"].red(pckg.packageName + ' failed: ' + err_1.message)];
1276
1297
  case 4:
1277
1298
  if (shouldPublish) {
1278
- res = (0, exports.publishPackage)(pckg, test, info, version);
1279
- if (pckg.packageName == 'browser-core') {
1280
- browserCoreBuilt = true;
1281
- }
1282
- //when publishing core, also make sure to publish browser-core
1283
- if (pckg.packageName == 'core' && !browserCoreBuilt) {
1284
- browserModule = packages.find(function (m) { return m.packageName == 'browser-core'; });
1285
- return [2 /*return*/, Promise.resolve(res).then(function (previousResult) {
1286
- log('# Automatically also publishing package browser-core');
1287
- return (0, exports.publishPackage)(browserModule, test);
1288
- })];
1289
- }
1290
- return [2 /*return*/, res];
1299
+ return [2 /*return*/, (0, exports.publishPackage)(pckg, test, info, version)];
1291
1300
  }
1292
- // return previousResult + ' ' + chalk.green(pckg.packageName + ' latest version is up to date\n');
1293
1301
  return [2 /*return*/, chalk_1["default"].green(pckg.packageName + ' latest version is up to date')];
1294
1302
  }
1295
1303
  });
@@ -1329,18 +1337,22 @@ var publishUpdated = function (test) {
1329
1337
  });
1330
1338
  };
1331
1339
  exports.publishUpdated = publishUpdated;
1332
- function getEnvJsonPath() {
1340
+ function getEnvJsonPath(relativeToPath) {
1341
+ if (relativeToPath === void 0) { relativeToPath = process.cwd(); }
1333
1342
  return __awaiter(this, void 0, void 0, function () {
1334
1343
  var path, i, envFile;
1335
1344
  return __generator(this, function (_a) {
1336
1345
  switch (_a.label) {
1337
1346
  case 0:
1338
- path = './';
1347
+ path = '';
1348
+ if (!relativeToPath.endsWith('/')) {
1349
+ relativeToPath += '/';
1350
+ }
1339
1351
  i = 0;
1340
1352
  _a.label = 1;
1341
1353
  case 1:
1342
1354
  if (!(i <= 10)) return [3 /*break*/, 4];
1343
- return [4 /*yield*/, (0, get_env_vars_1.getEnvFile)({ filePath: path + '.env.json' })["catch"](function (err) {
1355
+ return [4 /*yield*/, (0, get_env_vars_1.getEnvFile)({ filePath: relativeToPath + path + '.env.json' })["catch"](function (err) {
1344
1356
  return null;
1345
1357
  })];
1346
1358
  case 2:
@@ -1381,7 +1393,7 @@ var publishPackage = function (pkg, test, info, publishVersion) {
1381
1393
  return [2 /*return*/, chalk_1["default"].blue(pkg.packageName + ' should publish')];
1382
1394
  }
1383
1395
  console.log(chalk_1["default"].blue('publishing ' + pkg.packageName + ' ' + publishVersion));
1384
- return [4 /*yield*/, getEnvJsonPath()];
1396
+ return [4 /*yield*/, getEnvJsonPath(pkg.path)];
1385
1397
  case 1:
1386
1398
  envJsonPath = _a.sent();
1387
1399
  return [2 /*return*/, (0, utils_1.execPromise)("cd ".concat(pkg.path, " && ").concat(envJsonPath ? "env-cmd -f ".concat(envJsonPath, " --use-shell \"") : '', "yarn version ").concat(publishVersion, " && yarn npm publish").concat(envJsonPath ? "\"" : ''), true, false, {}, true)
@@ -1393,11 +1405,11 @@ var publishPackage = function (pkg, test, info, publishVersion) {
1393
1405
  return chalk_1["default"].red(pkg.packageName + ' failed\n');
1394
1406
  }
1395
1407
  console.log(chalk_1["default"].green('Successfully published ' + pkg.path + ' ' + publishVersion));
1396
- return chalk_1["default"].green(pkg.packageName + ' published ' + publishVersion + '\n');
1408
+ return chalk_1["default"].green(pkg.packageName + ' published ' + publishVersion);
1397
1409
  })["catch"](function (_a) {
1398
1410
  var error = _a.error, stdout = _a.stdout, stderr = _a.stderr;
1399
1411
  console.log(chalk_1["default"].red('Failed to publish: ' + error.message));
1400
- return chalk_1["default"].red(pkg.packageName + ' failed to publish\n');
1412
+ return chalk_1["default"].red(pkg.packageName + ' failed to publish');
1401
1413
  })];
1402
1414
  }
1403
1415
  });
@@ -1407,7 +1419,7 @@ exports.publishPackage = publishPackage;
1407
1419
  var buildUpdated = function (back, target, target2, test) {
1408
1420
  if (test === void 0) { test = false; }
1409
1421
  return __awaiter(this, void 0, void 0, function () {
1410
- var previousResult, packages, jsonldPkgUpdated, cliPkgUpdated, rebuildAllModules, packagesLeft, p;
1422
+ var previousResult, packages, jsonldPkgUpdated, rebuildAllModules, packagesLeft, p;
1411
1423
  var _this = this;
1412
1424
  return __generator(this, function (_a) {
1413
1425
  switch (_a.label) {
@@ -1416,18 +1428,13 @@ var buildUpdated = function (back, target, target2, test) {
1416
1428
  log(test ? 'Checking which packages need to be rebuild' : 'Building updated packages');
1417
1429
  packages = getLocalLincdPackageMap();
1418
1430
  jsonldPkgUpdated = needsRebuilding(packages.get('lincd-jsonld'));
1419
- cliPkgUpdated = needsRebuilding(packages.get('lincd-cli'));
1420
- if (!(jsonldPkgUpdated || cliPkgUpdated)) return [3 /*break*/, 2];
1431
+ if (!jsonldPkgUpdated) return [3 /*break*/, 2];
1421
1432
  return [4 /*yield*/, (0, utils_1.execPromise)('yarn build-core', false, false, {}, true)];
1422
1433
  case 1:
1423
1434
  _a.sent();
1424
1435
  _a.label = 2;
1425
1436
  case 2:
1426
1437
  rebuildAllModules = false;
1427
- if (cliPkgUpdated) {
1428
- rebuildAllModules = true;
1429
- log(chalk_1["default"].magenta('Rebuilding all packages because the build tools (lincd-cli) got updated'));
1430
- }
1431
1438
  packagesLeft = packages.size;
1432
1439
  runOnPackagesGroupedByDependencies(packages, function (packageGroup, dependencies) {
1433
1440
  // console.log('Now checking: ' + chalk.blue(packageGroup.map((i) => i.packageName)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lincd-cli",
3
- "version": "0.2.21",
3
+ "version": "0.2.24",
4
4
  "description": "Command line tools for the lincd.js library",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -60,7 +60,7 @@
60
60
  "license-info-webpack-plugin": "^3.0.0",
61
61
  "lincd": "^0.5",
62
62
  "lincd-app": "^0.1",
63
- "lincd-jsonld": "^0.1",
63
+ "lincd-jsonld": "^0.1.13",
64
64
  "lincd-modules": "^0.1",
65
65
  "load-grunt-tasks": "^5.1.0",
66
66
  "mini-css-extract-plugin": "^2.7.5",