@dyne/interfacer-client 0.3.3 → 0.3.4

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
@@ -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
  }