sim 2.1.27-preview.162.1 → 2.1.27

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 CHANGED
@@ -7993,8 +7993,14 @@ function deleteProfile(profile) {
7993
7993
  writeIni(configPath(), configDoc, false);
7994
7994
  return { config, credentials };
7995
7995
  }
7996
+ function stripTrailingSlashes(value) {
7997
+ let end = value.length;
7998
+ while (end > 0 && value.charCodeAt(end - 1) === 47)
7999
+ end--;
8000
+ return value.slice(0, end);
8001
+ }
7996
8002
  function normalizeEndpoint(endpoint, source) {
7997
- const trimmed = endpoint.trim().replace(/\/+$/, "");
8003
+ const trimmed = stripTrailingSlashes(endpoint.trim());
7998
8004
  if (FORBIDDEN_IN_VALUE.test(trimmed)) {
7999
8005
  throw new ProfileConfigError(`Invalid endpoint "${redact(endpoint)}" from ${source}. An endpoint cannot contain line breaks or control characters.`);
8000
8006
  }
package/dist/runtime.js CHANGED
@@ -3807,8 +3807,14 @@ function deleteProfile(profile) {
3807
3807
  writeIni(configPath(), configDoc, false);
3808
3808
  return { config, credentials };
3809
3809
  }
3810
+ function stripTrailingSlashes(value) {
3811
+ let end = value.length;
3812
+ while (end > 0 && value.charCodeAt(end - 1) === 47)
3813
+ end--;
3814
+ return value.slice(0, end);
3815
+ }
3810
3816
  function normalizeEndpoint(endpoint, source) {
3811
- const trimmed = endpoint.trim().replace(/\/+$/, "");
3817
+ const trimmed = stripTrailingSlashes(endpoint.trim());
3812
3818
  if (FORBIDDEN_IN_VALUE.test(trimmed)) {
3813
3819
  throw new ProfileConfigError(`Invalid endpoint "${redact(endpoint)}" from ${source}. An endpoint cannot contain line breaks or control characters.`);
3814
3820
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim",
3
- "version": "2.1.27-preview.162.1",
3
+ "version": "2.1.27",
4
4
  "description": "Sim CLI - talk to the Sim API from your terminal",
5
5
  "type": "module",
6
6
  "imports": {