@dyne/interfacer-client 0.3.3 → 0.3.5

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.
package/dist/index.js CHANGED
@@ -934,19 +934,19 @@ var AuthClient = class {
934
934
  }
935
935
  // ─── Helpers ──────────────────────────────────────────────────────
936
936
  detectTemplate() {
937
- if (typeof window === "undefined") return "InterfacerTesting" /* InterfacerTesting */;
937
+ if (typeof window === "undefined") return "INTERFACER_TESTING" /* InterfacerTesting */;
938
938
  const origin = window.location.origin;
939
939
  switch (origin) {
940
940
  case "https://interfacer.dyne.org":
941
- return "InterfacerDeployment" /* InterfacerDeployment */;
941
+ return "INTERFACER_DEPLOYMENT" /* InterfacerDeployment */;
942
942
  case "https://interfacer-gui-staging.dyne.org":
943
- return "InterfacerStaging" /* InterfacerStaging */;
943
+ return "INTERFACER_STAGING" /* InterfacerStaging */;
944
944
  case "https://beta.interfacer.dyne.org":
945
- return "InterfacerBeta" /* InterfacerBeta */;
945
+ return "INTERFACER_BETA" /* InterfacerBeta */;
946
946
  case "http://localhost:3000":
947
- return "InterfacerTesting" /* InterfacerTesting */;
947
+ return "INTERFACER_TESTING" /* InterfacerTesting */;
948
948
  default:
949
- return "InterfacerSelf" /* InterfacerSelf */;
949
+ return "INTERFACER_SELF" /* InterfacerSelf */;
950
950
  }
951
951
  }
952
952
  };
@@ -1490,21 +1490,24 @@ var ResourceClient = class {
1490
1490
  const loc = await this.createLocation(params.location);
1491
1491
  locationId = loc.id;
1492
1492
  }
1493
- const res = await this.graphql.request(CREATE_PROJECT, {
1493
+ const variables = {
1494
1494
  name: params.name,
1495
1495
  note: params.note || "",
1496
1496
  metadata: JSON.stringify(params.metadata || {}),
1497
1497
  agent: this.userId,
1498
1498
  creationTime: (/* @__PURE__ */ new Date()).toISOString(),
1499
1499
  location: locationId,
1500
- tags: params.tags || [],
1501
1500
  resourceSpec: specId,
1502
1501
  oneUnit: vars.unitOne,
1503
1502
  images: params.images || [],
1504
1503
  repo: params.repo || "",
1505
1504
  process: processId,
1506
1505
  license: params.license || ""
1507
- });
1506
+ };
1507
+ if (params.tags && params.tags.length > 0) {
1508
+ variables.tags = params.tags;
1509
+ }
1510
+ const res = await this.graphql.request(CREATE_PROJECT, variables);
1508
1511
  if (res.errors?.length) throw new Error(`createProject failed: ${res.errors[0].message}`);
1509
1512
  return res.data.createEconomicEvent.economicEvent.resourceInventoriedAs;
1510
1513
  }