@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.
- package/dist/index.js +9 -9
- 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.
|
|
760
|
-
const technicalName = entry.
|
|
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.
|
|
766
|
-
provisioningStatus: entry.
|
|
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.
|
|
798
|
+
if (!created.id) {
|
|
799
799
|
throw new Error(
|
|
800
|
-
`/store/apps did not return
|
|
800
|
+
`/store/apps did not return id: ${JSON.stringify(created)}`
|
|
801
801
|
);
|
|
802
802
|
}
|
|
803
|
-
return created.
|
|
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.
|
|
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
|
|
822
|
+
`provision response missing clientId or clientSecret: ${JSON.stringify(provisioned)}`
|
|
823
823
|
);
|
|
824
824
|
}
|
|
825
825
|
return { clientId, clientSecret };
|