@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.
@@ -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.endpoint !== "";
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
- kind: "git",
201
- endpoint: tenant.npmRegistry!.endpoint,
202
- domain: tenant.npmRegistry!.domain,
203
- credentials: tenant.npmRegistry!.credentials,
204
- public: tenant.npmRegistry!.public,
205
- }
206
- : undefined,
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumori/aurora-backend-handler",
3
- "version": "1.1.60",
3
+ "version": "1.1.62",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {