@powerhousedao/connect 1.0.22-dev.0 → 1.0.22-dev.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 (30) hide show
  1. package/dist/assets/{app-DOR_8r1B.js → app-B-5qYsgM.js} +307 -329
  2. package/dist/assets/{app-DOR_8r1B.js.map → app-B-5qYsgM.js.map} +1 -1
  3. package/dist/assets/{app-loader-uXeiy6sl.js → app-loader-DXPAMQYN.js} +45 -36
  4. package/dist/assets/app-loader-DXPAMQYN.js.map +1 -0
  5. package/dist/assets/{browser-B5bfipse.js → browser-DC1g4ocI.js} +5 -4
  6. package/dist/assets/{browser-B5bfipse.js.map → browser-DC1g4ocI.js.map} +1 -1
  7. package/dist/assets/{ccip-Cu6cyUtU.js → ccip-B4L3odPP.js} +5 -4
  8. package/dist/assets/{ccip-Cu6cyUtU.js.map → ccip-B4L3odPP.js.map} +1 -1
  9. package/dist/assets/{content-Cxj0K1dm.js → content-D22zsKwo.js} +6 -5
  10. package/dist/assets/{content-Cxj0K1dm.js.map → content-D22zsKwo.js.map} +1 -1
  11. package/dist/assets/{index-Ct3xGcDm.js → index-CCV8LLva.js} +4 -4
  12. package/dist/assets/{index-Ct3xGcDm.js.map → index-CCV8LLva.js.map} +1 -1
  13. package/dist/assets/{index-BBO5Ckrr.js → index-CKPKk_m5.js} +15 -168
  14. package/dist/assets/index-CKPKk_m5.js.map +1 -0
  15. package/dist/assets/{index-CT91u5m_.js → index-CWah4bZB.js} +5 -4
  16. package/dist/assets/{index-CT91u5m_.js.map → index-CWah4bZB.js.map} +1 -1
  17. package/dist/assets/{index-B7pq58I6.js → index-bTL_WhmE.js} +5 -4
  18. package/dist/assets/{index-B7pq58I6.js.map → index-bTL_WhmE.js.map} +1 -1
  19. package/dist/assets/{main.CMSwP7lX.js → main.B0yzXDFz.js} +2 -2
  20. package/dist/assets/{main.CMSwP7lX.js.map → main.B0yzXDFz.js.map} +1 -1
  21. package/dist/assets/{reactor-analytics-CrWekgnx.js → reactor-analytics-BF1jqSpK.js} +7 -6
  22. package/dist/assets/reactor-analytics-BF1jqSpK.js.map +1 -0
  23. package/dist/assets/{router-BDGkWvYS.js → router-C1-W7Dq7.js} +7 -7
  24. package/dist/assets/{router-BDGkWvYS.js.map → router-C1-W7Dq7.js.map} +1 -1
  25. package/dist/index.html +1 -1
  26. package/dist/vite-envs.sh +1 -1
  27. package/package.json +9 -9
  28. package/dist/assets/app-loader-uXeiy6sl.js.map +0 -1
  29. package/dist/assets/index-BBO5Ckrr.js.map +0 -1
  30. package/dist/assets/reactor-analytics-CrWekgnx.js.map +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-DOR_8r1B.js","assets/main.CMSwP7lX.js","assets/app-CmlD3Pwe.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-B-5qYsgM.js","assets/main.B0yzXDFz.js","assets/app-CmlD3Pwe.css"])))=>i.map(i=>d[i]);
2
2
  var __defProp = Object.defineProperty;
3
3
  var __typeError = (msg) => {
4
4
  throw TypeError(msg);
@@ -11,9 +11,10 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
11
11
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
12
12
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
13
13
  var _tags, _levelString, _errorHandler, _ConsoleLogger_instances, levelValue_get, _getDocumentModelModule, _drives, _ReadModeService_instances, parseGraphQLErrors_fn, fetchDrive_fn, _a, _ServiceWorkerManager_instances, handleServiceWorkerMessage_fn, handleServiceWorker_fn;
14
- import { _ as __vitePreload } from "./main.CMSwP7lX.js";
14
+ import { _ as __vitePreload } from "./main.B0yzXDFz.js";
15
15
  import { jsx, jsxs } from "react/jsx-runtime";
16
16
  import { useState, useEffect, Suspense, lazy } from "react";
17
+ import "node:fs";
17
18
  function _mergeNamespaces(n, m) {
18
19
  for (var i = 0; i < m.length; i++) {
19
20
  const e = m[i];
@@ -11645,8 +11646,7 @@ const driveDocumentModelModule = {
11645
11646
  actions: { ...creators, ...actions },
11646
11647
  utils: { ...documentModelUtils, ...customUtils }
11647
11648
  };
11648
- var define_process_env_default = {};
11649
- const LEVELS = {
11649
+ const LogLevels = {
11650
11650
  verbose: 1,
11651
11651
  debug: 2,
11652
11652
  info: 3,
@@ -11654,6 +11654,10 @@ const LEVELS = {
11654
11654
  error: 5,
11655
11655
  silent: 6
11656
11656
  };
11657
+ function isLogLevel(value) {
11658
+ return typeof value === "string" && value in LogLevels;
11659
+ }
11660
+ var define_process_env_default = {};
11657
11661
  class ConsoleLogger {
11658
11662
  constructor(tags, errorHandler2) {
11659
11663
  __privateAdd(this, _ConsoleLogger_instances);
@@ -11673,6 +11677,10 @@ class ConsoleLogger {
11673
11677
  return __privateGet(this, _levelString);
11674
11678
  }
11675
11679
  set level(level) {
11680
+ if (level !== "env" && !isLogLevel(level)) {
11681
+ throw new Error(`Invalid log level: ${JSON.stringify(level)}.
11682
+ Must be one of ${Object.keys(LogLevels).concat(["env"]).join(", ")}.`);
11683
+ }
11676
11684
  __privateSet(this, _levelString, level);
11677
11685
  }
11678
11686
  get errorHandler() {
@@ -11685,31 +11693,31 @@ class ConsoleLogger {
11685
11693
  return this.debug(...data);
11686
11694
  }
11687
11695
  verbose(...data) {
11688
- if (__privateGet(this, _ConsoleLogger_instances, levelValue_get) > LEVELS.verbose) {
11696
+ if (__privateGet(this, _ConsoleLogger_instances, levelValue_get) > LogLevels.verbose) {
11689
11697
  return;
11690
11698
  }
11691
11699
  return this.debug(...data);
11692
11700
  }
11693
11701
  debug(...data) {
11694
- if (__privateGet(this, _ConsoleLogger_instances, levelValue_get) > LEVELS.debug) {
11702
+ if (__privateGet(this, _ConsoleLogger_instances, levelValue_get) > LogLevels.debug) {
11695
11703
  return;
11696
11704
  }
11697
11705
  return console.debug(...[...__privateGet(this, _tags), ...data]);
11698
11706
  }
11699
11707
  info(...data) {
11700
- if (__privateGet(this, _ConsoleLogger_instances, levelValue_get) > LEVELS.info) {
11708
+ if (__privateGet(this, _ConsoleLogger_instances, levelValue_get) > LogLevels.info) {
11701
11709
  return;
11702
11710
  }
11703
11711
  return console.info(...[...__privateGet(this, _tags), ...data]);
11704
11712
  }
11705
11713
  warn(...data) {
11706
- if (__privateGet(this, _ConsoleLogger_instances, levelValue_get) > LEVELS.warn) {
11714
+ if (__privateGet(this, _ConsoleLogger_instances, levelValue_get) > LogLevels.warn) {
11707
11715
  return;
11708
11716
  }
11709
11717
  return console.warn(...[...__privateGet(this, _tags), ...data]);
11710
11718
  }
11711
11719
  error(...data) {
11712
- if (__privateGet(this, _ConsoleLogger_instances, levelValue_get) > LEVELS.error) {
11720
+ if (__privateGet(this, _ConsoleLogger_instances, levelValue_get) > LogLevels.error) {
11713
11721
  return;
11714
11722
  }
11715
11723
  if (__privateGet(this, _errorHandler)) {
@@ -11726,14 +11734,14 @@ levelValue_get = function() {
11726
11734
  if (__privateGet(this, _levelString) === "env") {
11727
11735
  const envLevel = typeof process !== "undefined" && "env" in process ? define_process_env_default.LOG_LEVEL : void 0;
11728
11736
  if (!envLevel) {
11729
- return LEVELS.debug;
11737
+ return LogLevels.debug;
11730
11738
  }
11731
- if (!(envLevel in LEVELS)) {
11732
- return LEVELS.debug;
11739
+ if (!(envLevel in LogLevels)) {
11740
+ return LogLevels.debug;
11733
11741
  }
11734
- return LEVELS[envLevel];
11742
+ return LogLevels[envLevel];
11735
11743
  }
11736
- return LEVELS[__privateGet(this, _levelString)];
11744
+ return LogLevels[__privateGet(this, _levelString)];
11737
11745
  };
11738
11746
  const loggerInstance = new ConsoleLogger();
11739
11747
  let logLevel = "env";
@@ -22883,7 +22891,7 @@ class PullResponderTransmitter {
22883
22891
  static async executePull(driveId, trigger, onStrandUpdate, onError, onRevisions, onAcknowledge) {
22884
22892
  var _a2, _b;
22885
22893
  staticLogger().verbose(`executePull(driveId: ${driveId}), trigger:`, trigger);
22886
- staticLogger().info(`[SYNC DEBUG] PullResponderTransmitter.executePull starting for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
22894
+ staticLogger().debug(`[SYNC DEBUG] PullResponderTransmitter.executePull starting for drive: ${driveId}, listenerId: ${trigger.data.listenerId}`);
22887
22895
  const { url } = trigger.data;
22888
22896
  let strands;
22889
22897
  let error;
@@ -24403,6 +24411,7 @@ class MemoryStorage {
24403
24411
  if (slug && this.slugToDocumentId[slug]) {
24404
24412
  throw new DocumentAlreadyExistsError(documentId);
24405
24413
  }
24414
+ document.slug = slug;
24406
24415
  this.documents[documentId] = document;
24407
24416
  if (slug) {
24408
24417
  if (this.slugToDocumentId[slug]) {
@@ -26046,7 +26055,7 @@ const nodeOptionsMap = {
26046
26055
  };
26047
26056
  const name = "@powerhousedao/connect";
26048
26057
  const productName = "Powerhouse-Connect";
26049
- const version$1 = "1.0.22-dev.0";
26058
+ const version$1 = "1.0.22-dev.1";
26050
26059
  const description = "Powerhouse Connect";
26051
26060
  const main = "./dist/index.html";
26052
26061
  const type = "module";
@@ -26099,8 +26108,9 @@ const PH_CONNECT_SENTRY_ENV = window.__VITE_ENVS.PH_CONNECT_SENTRY_ENV || "dev";
26099
26108
  const PH_CONNECT_SENTRY_TRACING_ENABLED = window.__VITE_ENVS.PH_CONNECT_SENTRY_TRACING_ENABLED || "false";
26100
26109
  const GA_TRACKING_ID = window.__VITE_ENVS.PH_CONNECT_GA_TRACKING_ID;
26101
26110
  const PH_CONNECT_CLI_VERSION = window.__VITE_ENVS.PH_CONNECT_CLI_VERSION || void 0;
26102
- setLogLevel(window.__VITE_ENVS.LOG_LEVEL);
26103
- logger$1.info(`Setting log level to ${window.__VITE_ENVS.LOG_LEVEL}.`);
26111
+ const LOG_LEVEL = isLogLevel(window.__VITE_ENVS.LOG_LEVEL) ? window.__VITE_ENVS.LOG_LEVEL : "info";
26112
+ setLogLevel(LOG_LEVEL);
26113
+ logger$1.debug(`Setting log level to ${window.__VITE_ENVS.LOG_LEVEL}.`);
26104
26114
  const connectConfig = {
26105
26115
  appVersion: APP_VERSION,
26106
26116
  studioMode: PH_CONNECT_STUDIO_MODE.toString() === "true",
@@ -28866,20 +28876,19 @@ const _BrowserStorage = class _BrowserStorage {
28866
28876
  if (!isValidSlug(slug)) {
28867
28877
  throw new DocumentSlugValidationError(slug);
28868
28878
  }
28869
- if (slug) {
28870
- const slugManifest = await this.getSlugManifest();
28871
- if (slugManifest.slugToId[slug]) {
28872
- throw new DocumentAlreadyExistsError(documentId);
28873
- }
28879
+ const slugManifest = await this.getSlugManifest();
28880
+ if (slugManifest.slugToId[slug]) {
28881
+ throw new DocumentAlreadyExistsError(documentId);
28874
28882
  }
28883
+ document.slug = slug;
28875
28884
  await db.setItem(this.buildDocumentKey(documentId), document);
28876
28885
  if (slug) {
28877
- const slugManifest = await this.getSlugManifest();
28878
- if (slugManifest.slugToId[slug]) {
28886
+ const slugManifest2 = await this.getSlugManifest();
28887
+ if (slugManifest2.slugToId[slug]) {
28879
28888
  throw new Error(`Document with slug ${slug} already exists`);
28880
28889
  }
28881
- slugManifest.slugToId[slug] = documentId;
28882
- await this.updateSlugManifest(slugManifest);
28890
+ slugManifest2.slugToId[slug] = documentId;
28891
+ await this.updateSlugManifest(slugManifest2);
28883
28892
  }
28884
28893
  if (document.documentType === "powerhouse/document-drive") {
28885
28894
  this.updateDriveManifest(documentId, { documentIds: [] });
@@ -31737,7 +31746,7 @@ if (window.__VITE_ENVS.MODE === "development") {
31737
31746
  } else {
31738
31747
  serviceWorkerManager.registerServiceWorker(false);
31739
31748
  }
31740
- const App = lazy(() => __vitePreload(() => import("./app-DOR_8r1B.js").then((n) => n.bu), true ? __vite__mapDeps([0,1,2]) : void 0));
31749
+ const App = lazy(() => __vitePreload(() => import("./app-B-5qYsgM.js").then((n) => n.bs), true ? __vite__mapDeps([0,1,2]) : void 0));
31741
31750
  const AppLoader = /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(App, {}) });
31742
31751
  const appLoader = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
31743
31752
  __proto__: null,
@@ -31821,13 +31830,13 @@ export {
31821
31830
  connectConfig as ah,
31822
31831
  hashDocumentStateForScope as ai,
31823
31832
  getAugmentedNamespace as aj,
31824
- process as ak,
31825
- setErrorHandler as al,
31826
- driveDocumentModelModule as am,
31827
- createBrowserStorage as an,
31828
- createBrowserDocumentDriveServer as ao,
31829
- generateId as ap,
31830
- childLogger as aq,
31833
+ childLogger as ak,
31834
+ process as al,
31835
+ setErrorHandler as am,
31836
+ driveDocumentModelModule as an,
31837
+ createBrowserStorage as ao,
31838
+ createBrowserDocumentDriveServer as ap,
31839
+ generateId as aq,
31831
31840
  reducer as ar,
31832
31841
  isDocumentDrive as as,
31833
31842
  generateAddNodeAction as at,
@@ -31938,4 +31947,4 @@ export {
31938
31947
  ReorderModulesInputSchema as y,
31939
31948
  DeleteModuleInputSchema as z
31940
31949
  };
31941
- //# sourceMappingURL=app-loader-uXeiy6sl.js.map
31950
+ //# sourceMappingURL=app-loader-DXPAMQYN.js.map