@seed-hypermedia/cli 0.0.5 → 0.0.7

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 (2) hide show
  1. package/dist/index.js +16 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10588,9 +10588,11 @@ function buildUnsignedRef({
10588
10588
  signer: signerBytes,
10589
10589
  ts: BigInt(Date.now()),
10590
10590
  sig: new Uint8Array(64),
10591
- genesisBlob: CID.parse(genesis),
10592
- generation
10591
+ genesisBlob: CID.parse(genesis)
10593
10592
  };
10593
+ if (generation !== 0) {
10594
+ unsigned.generation = generation;
10595
+ }
10594
10596
  if (!bytesEqual(spaceBytes, signerBytes)) {
10595
10597
  unsigned.space = spaceBytes;
10596
10598
  }
@@ -138443,6 +138445,7 @@ __export(exports_entity_id_url, {
138443
138445
  createOSProtocolUrl: () => createOSProtocolUrl,
138444
138446
  createCommentUrl: () => createCommentUrl,
138445
138447
  commentIdToHmId: () => commentIdToHmId,
138448
+ bookmarkUrlFromRoute: () => bookmarkUrlFromRoute,
138446
138449
  activitySlugToFilter: () => activitySlugToFilter,
138447
138450
  activityFilterToSlug: () => activityFilterToSlug,
138448
138451
  VIEW_TERMS: () => VIEW_TERMS,
@@ -138733,6 +138736,15 @@ function routeToHmUrl(route) {
138733
138736
  }
138734
138737
  return null;
138735
138738
  }
138739
+ function bookmarkUrlFromRoute(route) {
138740
+ if (route.key === "document") {
138741
+ return packBaseId3(route.id.uid, route.id.path);
138742
+ }
138743
+ if (route.key === "feed" || route.key === "activity" || route.key === "directory" || route.key === "collaborators" || route.key === "comments") {
138744
+ return `${packBaseId3(route.id.uid, route.id.path)}/:${route.key}`;
138745
+ }
138746
+ return null;
138747
+ }
138736
138748
  function createWebHMUrl(uid, {
138737
138749
  version: version2,
138738
138750
  blockRef,
@@ -165678,7 +165690,7 @@ function registerDocumentCommands(program2) {
165678
165690
  printSuccess2(`Document published: ${webUrl}`);
165679
165691
  }
165680
165692
  try {
165681
- const childHmUrl = `hm://${account}${path}?v=${changeBlock.cid.toString()}`;
165693
+ const childHmUrl = `hm://${account}${path}`;
165682
165694
  const linked = await autoLinkChildToParent2({ client, account, path, childHmUrl, signer });
165683
165695
  if (linked && !globalOpts.quiet) {
165684
165696
  printInfo("Parent document updated with link");
@@ -165801,7 +165813,7 @@ function registerDocumentCommands(program2) {
165801
165813
  process.exit(1);
165802
165814
  }
165803
165815
  const doc2 = resource.document;
165804
- const generation = doc2.generationInfo ? Number(doc2.generationInfo.generation) : 1;
165816
+ const generation = doc2.generationInfo ? Number(doc2.generationInfo.generation) : 0;
165805
165817
  const refInput = await createTombstoneRef({
165806
165818
  space: unpacked.uid,
165807
165819
  path: hmIdPathToEntityQueryPath3(unpacked.path),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seed-hypermedia/cli",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/seed-hypermedia/seed.git",