@kumori/aurora-backend-handler 1.1.60 → 1.1.62
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/api/tenant-api-service.ts +18 -10
- package/package.json +1 -1
|
@@ -189,21 +189,29 @@ export const updateTenant = async (tenant: Tenant, security: string) => {
|
|
|
189
189
|
await initializeGlobalWebSocketClient(security);
|
|
190
190
|
|
|
191
191
|
const hasNpmRegistry =
|
|
192
|
-
tenant.npmRegistry && tenant.npmRegistry
|
|
192
|
+
tenant.npmRegistry !== undefined && tenant.npmRegistry !== null;
|
|
193
|
+
const isNpmRegistryEmpty =
|
|
194
|
+
hasNpmRegistry &&
|
|
195
|
+
tenant.npmRegistry!.endpoint === "" &&
|
|
196
|
+
tenant.npmRegistry!.domain === "" &&
|
|
197
|
+
tenant.npmRegistry!.credentials === "" &&
|
|
198
|
+
tenant.npmRegistry!.public === false;
|
|
193
199
|
const hasPlan = tenant.plan?.name;
|
|
194
200
|
|
|
195
201
|
const updateBody: Record<string, any> = {
|
|
196
202
|
tenant: tenant.name,
|
|
197
203
|
spec: {
|
|
198
|
-
registry: hasNpmRegistry
|
|
199
|
-
?
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
204
|
+
registry: !hasNpmRegistry
|
|
205
|
+
? undefined
|
|
206
|
+
: isNpmRegistryEmpty
|
|
207
|
+
? null
|
|
208
|
+
: {
|
|
209
|
+
kind: "git",
|
|
210
|
+
endpoint: tenant.npmRegistry!.endpoint,
|
|
211
|
+
domain: tenant.npmRegistry!.domain,
|
|
212
|
+
credentials: tenant.npmRegistry!.credentials,
|
|
213
|
+
public: tenant.npmRegistry!.public,
|
|
214
|
+
},
|
|
207
215
|
},
|
|
208
216
|
};
|
|
209
217
|
|