@jtl-software/create-cloud-app 0.2.0 → 0.2.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 (2) hide show
  1. package/dist/index.js +9 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -756,14 +756,14 @@ async function listTenantApps(apiBaseUrl, jwt, tenantId) {
756
756
  );
757
757
  const items = Array.isArray(res) ? res : res.items ?? [];
758
758
  return items.map((entry) => {
759
- const id = entry.appId ?? entry.app?.id;
760
- const technicalName = entry.app?.technicalName;
759
+ const id = entry.id;
760
+ const technicalName = entry.technicalName;
761
761
  if (!id || !technicalName) return null;
762
762
  return {
763
763
  id,
764
764
  technicalName,
765
- clientId: entry.app?.clientId,
766
- provisioningStatus: entry.app?.activeVersion?.provisioningStatus,
765
+ clientId: entry.clientId,
766
+ provisioningStatus: entry.activeVersion?.provisioningStatus,
767
767
  isInstalled: entry.isInstalled
768
768
  };
769
769
  }).filter((a) => a !== null);
@@ -795,12 +795,12 @@ async function createDraftApp(apiBaseUrl, jwt, tenantId, manifest) {
795
795
  })
796
796
  }
797
797
  );
798
- if (!created.appId) {
798
+ if (!created.id) {
799
799
  throw new Error(
800
- `/store/apps did not return appId: ${JSON.stringify(created)}`
800
+ `/store/apps did not return id: ${JSON.stringify(created)}`
801
801
  );
802
802
  }
803
- return created.appId;
803
+ return created.id;
804
804
  }
805
805
  async function provisionApp(apiBaseUrl, jwt, tenantId, appId) {
806
806
  const provisioned = await apiCall(
@@ -815,11 +815,11 @@ async function provisionApp(apiBaseUrl, jwt, tenantId, appId) {
815
815
  body: JSON.stringify({ appId })
816
816
  }
817
817
  );
818
- const clientId = provisioned.app?.clientId;
818
+ const clientId = provisioned.clientId;
819
819
  const clientSecret = provisioned.clientSecret;
820
820
  if (!clientId || !clientSecret) {
821
821
  throw new Error(
822
- `provision response missing app.clientId or clientSecret: ${JSON.stringify(provisioned)}`
822
+ `provision response missing clientId or clientSecret: ${JSON.stringify(provisioned)}`
823
823
  );
824
824
  }
825
825
  return { clientId, clientSecret };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jtl-software/create-cloud-app",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "CLI tool for scaffolding JTL Platform cloud apps",
6
6
  "bin": {