relq 1.0.33 → 1.0.34

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.
@@ -549,13 +549,21 @@ async function pullCommand(context) {
549
549
  const localCommits = (0, repo_manager_1.getAllCommits)(projectRoot);
550
550
  const localHashes = new Set(localCommits.map(c => c.hash));
551
551
  const missingCommits = remoteCommits.filter(c => !localHashes.has(c.hash));
552
+ let hasSynced = false;
552
553
  if (missingCommits.length > 0) {
553
554
  for (const commit of missingCommits.reverse()) {
554
555
  (0, repo_manager_1.saveCommit)(commit, projectRoot);
555
556
  }
556
557
  console.log(`Synced ${missingCommits.length} commit(s) from remote`);
558
+ hasSynced = true;
557
559
  }
558
- else {
560
+ const typesFilePath = (0, types_manager_1.getTypesFilePath)(schemaPath);
561
+ const typesResult = await (0, types_manager_1.syncTypesFromDb)(connection, typesFilePath);
562
+ if (typesResult.generated && typesResult.typesCount > 0) {
563
+ console.log(`Synced ${typesResult.typesCount} type(s) from remote`);
564
+ hasSynced = true;
565
+ }
566
+ if (!hasSynced) {
559
567
  console.log('Already up to date with remote');
560
568
  }
561
569
  console.log('');
@@ -513,13 +513,21 @@ export async function pullCommand(context) {
513
513
  const localCommits = getAllCommits(projectRoot);
514
514
  const localHashes = new Set(localCommits.map(c => c.hash));
515
515
  const missingCommits = remoteCommits.filter(c => !localHashes.has(c.hash));
516
+ let hasSynced = false;
516
517
  if (missingCommits.length > 0) {
517
518
  for (const commit of missingCommits.reverse()) {
518
519
  saveCommit(commit, projectRoot);
519
520
  }
520
521
  console.log(`Synced ${missingCommits.length} commit(s) from remote`);
522
+ hasSynced = true;
521
523
  }
522
- else {
524
+ const typesFilePath = getTypesFilePath(schemaPath);
525
+ const typesResult = await syncTypesFromDb(connection, typesFilePath);
526
+ if (typesResult.generated && typesResult.typesCount > 0) {
527
+ console.log(`Synced ${typesResult.typesCount} type(s) from remote`);
528
+ hasSynced = true;
529
+ }
530
+ if (!hasSynced) {
523
531
  console.log('Already up to date with remote');
524
532
  }
525
533
  console.log('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "relq",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
4
4
  "description": "The Fully-Typed PostgreSQL ORM for TypeScript",
5
5
  "author": "Olajide Mathew O. <olajide.mathew@yuniq.solutions>",
6
6
  "license": "MIT",