@xano/cli 0.0.95-beta.7 → 0.0.95-beta.9

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.
@@ -98,8 +98,8 @@ Profile 'selfhosted' created successfully at ~/.xano/credentials.yaml
98
98
  const profileExists = args.name in credentials.profiles;
99
99
  credentials.profiles[args.name] = {
100
100
  access_token: flags.access_token,
101
- account_origin: flags.account_origin ?? '',
102
- instance_origin: flags.instance_origin,
101
+ account_origin: (flags.account_origin ?? '').replace(/\/+$/, ''),
102
+ instance_origin: flags.instance_origin.replace(/\/+$/, ''),
103
103
  ...(flags.workspace && { workspace: flags.workspace }),
104
104
  ...(flags.branch && { branch: flags.branch }),
105
105
  ...(flags.insecure && { insecure: true }),
@@ -128,8 +128,8 @@ Profile 'default' updated successfully at ~/.xano/credentials.yaml
128
128
  // Update only the fields that were provided
129
129
  const updatedProfile = {
130
130
  ...existingProfile,
131
- ...(flags.account_origin !== undefined && { account_origin: flags.account_origin }),
132
- ...(flags.instance_origin !== undefined && { instance_origin: flags.instance_origin }),
131
+ ...(flags.account_origin !== undefined && { account_origin: flags.account_origin.replace(/\/+$/, '') }),
132
+ ...(flags.instance_origin !== undefined && { instance_origin: flags.instance_origin.replace(/\/+$/, '') }),
133
133
  ...(flags.access_token !== undefined && { access_token: flags.access_token }),
134
134
  ...(flags.workspace !== undefined && { workspace: flags.workspace }),
135
135
  ...(flags.branch !== undefined && { branch: flags.branch }),
@@ -339,8 +339,8 @@ Profile 'production' created successfully at ~/.xano/credentials.yaml
339
339
  // Add or update the profile
340
340
  credentials.profiles[profile.name] = {
341
341
  access_token: profile.access_token,
342
- account_origin: profile.account_origin,
343
- instance_origin: profile.instance_origin,
342
+ account_origin: (profile.account_origin || '').replace(/\/+$/, ''),
343
+ instance_origin: profile.instance_origin.replace(/\/+$/, ''),
344
344
  ...(profile.workspace && { workspace: profile.workspace }),
345
345
  ...(profile.branch && { branch: profile.branch }),
346
346
  ...(profile.insecure && { insecure: true }),