@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.cjs CHANGED
@@ -1011,19 +1011,19 @@ var AuthClient = class {
1011
1011
  }
1012
1012
  // ─── Helpers ──────────────────────────────────────────────────────
1013
1013
  detectTemplate() {
1014
- if (typeof window === "undefined") return "InterfacerTesting" /* InterfacerTesting */;
1014
+ if (typeof window === "undefined") return "INTERFACER_TESTING" /* InterfacerTesting */;
1015
1015
  const origin = window.location.origin;
1016
1016
  switch (origin) {
1017
1017
  case "https://interfacer.dyne.org":
1018
- return "InterfacerDeployment" /* InterfacerDeployment */;
1018
+ return "INTERFACER_DEPLOYMENT" /* InterfacerDeployment */;
1019
1019
  case "https://interfacer-gui-staging.dyne.org":
1020
- return "InterfacerStaging" /* InterfacerStaging */;
1020
+ return "INTERFACER_STAGING" /* InterfacerStaging */;
1021
1021
  case "https://beta.interfacer.dyne.org":
1022
- return "InterfacerBeta" /* InterfacerBeta */;
1022
+ return "INTERFACER_BETA" /* InterfacerBeta */;
1023
1023
  case "http://localhost:3000":
1024
- return "InterfacerTesting" /* InterfacerTesting */;
1024
+ return "INTERFACER_TESTING" /* InterfacerTesting */;
1025
1025
  default:
1026
- return "InterfacerSelf" /* InterfacerSelf */;
1026
+ return "INTERFACER_SELF" /* InterfacerSelf */;
1027
1027
  }
1028
1028
  }
1029
1029
  };
@@ -1567,21 +1567,24 @@ var ResourceClient = class {
1567
1567
  const loc = await this.createLocation(params.location);
1568
1568
  locationId = loc.id;
1569
1569
  }
1570
- const res = await this.graphql.request(CREATE_PROJECT, {
1570
+ const variables = {
1571
1571
  name: params.name,
1572
1572
  note: params.note || "",
1573
1573
  metadata: JSON.stringify(params.metadata || {}),
1574
1574
  agent: this.userId,
1575
1575
  creationTime: (/* @__PURE__ */ new Date()).toISOString(),
1576
1576
  location: locationId,
1577
- tags: params.tags || [],
1578
1577
  resourceSpec: specId,
1579
1578
  oneUnit: vars.unitOne,
1580
1579
  images: params.images || [],
1581
1580
  repo: params.repo || "",
1582
1581
  process: processId,
1583
1582
  license: params.license || ""
1584
- });
1583
+ };
1584
+ if (params.tags && params.tags.length > 0) {
1585
+ variables.tags = params.tags;
1586
+ }
1587
+ const res = await this.graphql.request(CREATE_PROJECT, variables);
1585
1588
  if (res.errors?.length) throw new Error(`createProject failed: ${res.errors[0].message}`);
1586
1589
  return res.data.createEconomicEvent.economicEvent.resourceInventoriedAs;
1587
1590
  }