fds-vue-core 6.0.11 → 6.1.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.
package/README.md CHANGED
@@ -136,6 +136,45 @@ import { FdsButtonPrimary, FdsInput, FdsModal } from 'fds-vue-core'
136
136
 
137
137
  All components are fully typed. Type definitions are included in the package.
138
138
 
139
+ ## Commit workflow
140
+
141
+ Use these commands to create commits with the shared Commitizen adapter and security dependency helper.
142
+
143
+ ### In this repo
144
+
145
+ ```bash
146
+ pnpm commit
147
+ pnpm commit:vuln
148
+ ```
149
+
150
+ - `pnpm commit` starts Commitizen prompts (configured via `scripts/cz/cz-adapter.cjs`).
151
+ - `pnpm commit:vuln` runs `scripts/vuln-commit.mjs` and auto-creates a `vuln(...)` commit from staged `package.json` dependency bumps.
152
+
153
+ ### In a consuming repo
154
+
155
+ Install dependencies:
156
+
157
+ ```bash
158
+ pnpm add fds-vue-core
159
+ pnpm add -D commitizen
160
+ ```
161
+
162
+ Add this to the consuming repo `package.json`:
163
+
164
+ ```json
165
+ {
166
+ "scripts": {
167
+ "commit": "cz",
168
+ "commit:vuln": "fds-vuln-commit"
169
+ },
170
+ "config": {
171
+ "commitizen": {
172
+ "path": "fds-vue-core/cz-adapter"
173
+ }
174
+ }
175
+ }
176
+ ```
177
+
139
178
  ## Further Documentation
140
179
 
141
180
  - [Usage Guide](./src/docs/Usage.md) - Detailed usage instructions
package/dist/apply.css CHANGED
@@ -39,7 +39,7 @@
39
39
  }
40
40
  .link,
41
41
  .html a {
42
- @apply text-blue-600 hover:text-blue-700 active:text-blue-800 underline focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500;
42
+ @apply text-blue-600 hover:text-blue-700 active:text-blue-800 underline focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500 cursor-pointer;
43
43
  }
44
44
 
45
45
  .link--with-parens::before {
@@ -2510,14 +2510,38 @@ const parseHeaders = (rawHeaders) => {
2510
2510
  return parsed;
2511
2511
  };
2512
2512
  const $internals = /* @__PURE__ */ Symbol("internals");
2513
+ const isValidHeaderValue = (value) => !/[\r\n]/.test(value);
2514
+ function assertValidHeaderValue(value, header) {
2515
+ if (value === false || value == null) {
2516
+ return;
2517
+ }
2518
+ if (utils$1.isArray(value)) {
2519
+ value.forEach((v) => assertValidHeaderValue(v, header));
2520
+ return;
2521
+ }
2522
+ if (!isValidHeaderValue(String(value))) {
2523
+ throw new Error(`Invalid character in header content ["${header}"]`);
2524
+ }
2525
+ }
2513
2526
  function normalizeHeader(header) {
2514
2527
  return header && String(header).trim().toLowerCase();
2515
2528
  }
2529
+ function stripTrailingCRLF(str) {
2530
+ let end = str.length;
2531
+ while (end > 0) {
2532
+ const charCode = str.charCodeAt(end - 1);
2533
+ if (charCode !== 10 && charCode !== 13) {
2534
+ break;
2535
+ }
2536
+ end -= 1;
2537
+ }
2538
+ return end === str.length ? str : str.slice(0, end);
2539
+ }
2516
2540
  function normalizeValue(value) {
2517
2541
  if (value === false || value == null) {
2518
2542
  return value;
2519
2543
  }
2520
- return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
2544
+ return utils$1.isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
2521
2545
  }
2522
2546
  function parseTokens(str) {
2523
2547
  const tokens = /* @__PURE__ */ Object.create(null);
@@ -2573,6 +2597,7 @@ let AxiosHeaders$1 = class AxiosHeaders {
2573
2597
  }
2574
2598
  const key = utils$1.findKey(self2, lHeader);
2575
2599
  if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
2600
+ assertValidHeaderValue(_value, _header);
2576
2601
  self2[key || _header] = normalizeValue(_value);
2577
2602
  }
2578
2603
  }
@@ -3366,14 +3391,16 @@ const factory = (env) => {
3366
3391
  const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
3367
3392
  const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
3368
3393
  let duplexAccessed = false;
3394
+ const body = new ReadableStream$1();
3369
3395
  const hasContentType = new Request(platform.origin, {
3370
- body: new ReadableStream$1(),
3396
+ body,
3371
3397
  method: "POST",
3372
3398
  get duplex() {
3373
3399
  duplexAccessed = true;
3374
3400
  return "half";
3375
3401
  }
3376
3402
  }).headers.has("Content-Type");
3403
+ body.cancel();
3377
3404
  return duplexAccessed && !hasContentType;
3378
3405
  });
3379
3406
  const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
@@ -3655,7 +3682,7 @@ function dispatchRequest(config) {
3655
3682
  }
3656
3683
  );
3657
3684
  }
3658
- const VERSION$1 = "1.13.6";
3685
+ const VERSION$1 = "1.15.0";
3659
3686
  const validators$1 = {};
3660
3687
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
3661
3688
  validators$1[type] = function validator2(thing) {
@@ -3745,12 +3772,23 @@ let Axios$1 = class Axios {
3745
3772
  if (err instanceof Error) {
3746
3773
  let dummy = {};
3747
3774
  Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
3748
- const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
3775
+ const stack = (() => {
3776
+ if (!dummy.stack) {
3777
+ return "";
3778
+ }
3779
+ const firstNewlineIndex = dummy.stack.indexOf("\n");
3780
+ return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
3781
+ })();
3749
3782
  try {
3750
3783
  if (!err.stack) {
3751
3784
  err.stack = stack;
3752
- } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
3753
- err.stack += "\n" + stack;
3785
+ } else if (stack) {
3786
+ const firstNewlineIndex = stack.indexOf("\n");
3787
+ const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
3788
+ const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
3789
+ if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
3790
+ err.stack += "\n" + stack;
3791
+ }
3754
3792
  }
3755
3793
  } catch (e) {
3756
3794
  }