sim 2.1.27-preview.161.1 → 2.1.27-preview.164.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.
@@ -11034,11 +11034,11 @@ export declare const V2_OPERATIONS: {
11034
11034
  };
11035
11035
  readonly credentialId: {
11036
11036
  readonly kind: 'string';
11037
- readonly describe: 'OAuth credential identifier for connectors that require OAuth.';
11037
+ readonly describe: 'OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types); omit it for `apiKey` connectors.';
11038
11038
  };
11039
11039
  readonly apiKey: {
11040
11040
  readonly kind: 'string';
11041
- readonly describe: 'Write-only API key for connectors that use API-key authentication.';
11041
+ readonly describe: 'Write-only API key for connector types whose `auth.mode` is `apiKey` (see connector types), or a personal access token for an OAuth connector that also accepts one, such as GitHub. Send it instead of `credentialId`. Pass a raw key, or a secret reference written as the whole value `{{SECRET_NAME}}`, which the server resolves; `$SECRET_NAME` is not a reference.';
11042
11042
  };
11043
11043
  readonly sourceConfig: {
11044
11044
  readonly kind: 'object';
@@ -16501,7 +16501,7 @@ export declare const V2_OPERATIONS: {
16501
16501
  };
16502
16502
  readonly password: {
16503
16503
  readonly kind: 'string';
16504
- readonly describe: 'Write-only password. Required whenever `authType` is `password`, and rejected otherwise. Never readable back.';
16504
+ readonly describe: 'Write-only password of 15 to 1024 characters, not only whitespace. Required whenever `authType` is `password`, and rejected otherwise. Never readable back. Taken literally, except that a request from the Sim agent resolves a whole-value `{{ENV_VAR}}` reference to that variable before the rules apply.';
16505
16505
  };
16506
16506
  readonly allowedEmails: {
16507
16507
  readonly kind: 'array';
@@ -18161,7 +18161,7 @@ export declare const V2_OPERATIONS: {
18161
18161
  };
18162
18162
  readonly password: {
18163
18163
  readonly kind: 'string';
18164
- readonly describe: 'Password for a password-gated share. Kept when omitted; enabling `password` with neither a supplied nor a stored password is a 400.';
18164
+ readonly describe: 'Password of 15 to 1024 characters for a password-gated share. Kept when omitted; enabling `password` with neither a supplied nor a stored password is a 400. Taken literally, except that a request from the Sim agent resolves a whole-value `{{ENV_VAR}}` reference to that variable before the rules apply.';
18165
18165
  };
18166
18166
  readonly allowedEmails: {
18167
18167
  readonly kind: 'array';
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
  }
@@ -10219,11 +10225,11 @@ var V2_OPERATIONS = {
10219
10225
  connectorType: { kind: "string", required: true, describe: "Registered connector type." },
10220
10226
  credentialId: {
10221
10227
  kind: "string",
10222
- describe: "OAuth credential identifier for connectors that require OAuth."
10228
+ describe: "OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types); omit it for `apiKey` connectors."
10223
10229
  },
10224
10230
  apiKey: {
10225
10231
  kind: "string",
10226
- describe: "Write-only API key for connectors that use API-key authentication."
10232
+ describe: "Write-only API key for connector types whose `auth.mode` is `apiKey` (see connector types), or a personal access token for an OAuth connector that also accepts one, such as GitHub. Send it instead of `credentialId`. Pass a raw key, or a secret reference written as the whole value `{{SECRET_NAME}}`, which the server resolves; `$SECRET_NAME` is not a reference."
10227
10233
  },
10228
10234
  sourceConfig: {
10229
10235
  kind: "object",
@@ -15391,7 +15397,7 @@ var V2_OPERATIONS = {
15391
15397
  },
15392
15398
  password: {
15393
15399
  kind: "string",
15394
- describe: "Write-only password. Required whenever `authType` is `password`, and rejected otherwise. Never readable back."
15400
+ describe: "Write-only password of 15 to 1024 characters, not only whitespace. Required whenever `authType` is `password`, and rejected otherwise. Never readable back. Taken literally, except that a request from the Sim agent resolves a whole-value `{{ENV_VAR}}` reference to that variable before the rules apply."
15395
15401
  },
15396
15402
  allowedEmails: {
15397
15403
  kind: "array",
@@ -16714,7 +16720,7 @@ var V2_OPERATIONS = {
16714
16720
  },
16715
16721
  password: {
16716
16722
  kind: "string",
16717
- describe: "Password for a password-gated share. Kept when omitted; enabling `password` with neither a supplied nor a stored password is a 400."
16723
+ describe: "Password of 15 to 1024 characters for a password-gated share. Kept when omitted; enabling `password` with neither a supplied nor a stored password is a 400. Taken literally, except that a request from the Sim agent resolves a whole-value `{{ENV_VAR}}` reference to that variable before the rules apply."
16718
16724
  },
16719
16725
  allowedEmails: {
16720
16726
  kind: "array",
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
  }
@@ -10270,11 +10276,11 @@ var V2_OPERATIONS = {
10270
10276
  connectorType: { kind: "string", required: true, describe: "Registered connector type." },
10271
10277
  credentialId: {
10272
10278
  kind: "string",
10273
- describe: "OAuth credential identifier for connectors that require OAuth."
10279
+ describe: "OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types); omit it for `apiKey` connectors."
10274
10280
  },
10275
10281
  apiKey: {
10276
10282
  kind: "string",
10277
- describe: "Write-only API key for connectors that use API-key authentication."
10283
+ describe: "Write-only API key for connector types whose `auth.mode` is `apiKey` (see connector types), or a personal access token for an OAuth connector that also accepts one, such as GitHub. Send it instead of `credentialId`. Pass a raw key, or a secret reference written as the whole value `{{SECRET_NAME}}`, which the server resolves; `$SECRET_NAME` is not a reference."
10278
10284
  },
10279
10285
  sourceConfig: {
10280
10286
  kind: "object",
@@ -15442,7 +15448,7 @@ var V2_OPERATIONS = {
15442
15448
  },
15443
15449
  password: {
15444
15450
  kind: "string",
15445
- describe: "Write-only password. Required whenever `authType` is `password`, and rejected otherwise. Never readable back."
15451
+ describe: "Write-only password of 15 to 1024 characters, not only whitespace. Required whenever `authType` is `password`, and rejected otherwise. Never readable back. Taken literally, except that a request from the Sim agent resolves a whole-value `{{ENV_VAR}}` reference to that variable before the rules apply."
15446
15452
  },
15447
15453
  allowedEmails: {
15448
15454
  kind: "array",
@@ -16765,7 +16771,7 @@ var V2_OPERATIONS = {
16765
16771
  },
16766
16772
  password: {
16767
16773
  kind: "string",
16768
- describe: "Password for a password-gated share. Kept when omitted; enabling `password` with neither a supplied nor a stored password is a 400."
16774
+ describe: "Password of 15 to 1024 characters for a password-gated share. Kept when omitted; enabling `password` with neither a supplied nor a stored password is a 400. Taken literally, except that a request from the Sim agent resolves a whole-value `{{ENV_VAR}}` reference to that variable before the rules apply."
16769
16775
  },
16770
16776
  allowedEmails: {
16771
16777
  kind: "array",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim",
3
- "version": "2.1.27-preview.161.1",
3
+ "version": "2.1.27-preview.164.1",
4
4
  "description": "Sim CLI - talk to the Sim API from your terminal",
5
5
  "type": "module",
6
6
  "imports": {