@vendure/common 3.8.1-master-202610200212 → 3.8.1-master-202610230212

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.
@@ -107,7 +107,7 @@ export interface DashboardPromotionV1 {
107
107
  /**
108
108
  * @description
109
109
  * Returns `true` when `value` has all required fields of {@link DashboardPromotionV1}.
110
- * The Dashboard build and the snapshot generator do not use a payload that fails this check.
110
+ * The snapshot generator does not use a payload that fails this check.
111
111
  *
112
112
  * @docsCategory extensions-api
113
113
  * @docsPage PlatformPromotion
@@ -8,7 +8,7 @@ const isArrayOf = (value, check) => Array.isArray(value) && value.every(item =>
8
8
  /**
9
9
  * @description
10
10
  * Returns `true` when `value` has all required fields of {@link DashboardPromotionV1}.
11
- * The Dashboard build and the snapshot generator do not use a payload that fails this check.
11
+ * The snapshot generator does not use a payload that fails this check.
12
12
  *
13
13
  * @docsCategory extensions-api
14
14
  * @docsPage PlatformPromotion
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @description
3
+ * Whether the terminal renders OSC 8 hyperlinks. `FORCE_HYPERLINK` overrides the other checks.
4
+ * Without it, a non-TTY stdout or a CI run gets no hyperlink. The terminal checks follow the
5
+ * `supports-hyperlinks` package, which no Vendure package depends on.
6
+ *
7
+ * Only the default parameters read `process`, so importing this module is safe in a browser.
8
+ */
9
+ export declare function supportsHyperlinks(env?: Record<string, string | undefined>, isTTY?: boolean): boolean;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.supportsHyperlinks = supportsHyperlinks;
4
+ // TERM values of terminals that render OSC 8 hyperlinks but set no TERM_PROGRAM.
5
+ const HYPERLINK_TERMS = ['xterm-kitty', 'xterm-ghostty', 'alacritty', 'foot', 'foot-extra'];
6
+ /**
7
+ * @description
8
+ * Whether the terminal renders OSC 8 hyperlinks. `FORCE_HYPERLINK` overrides the other checks.
9
+ * Without it, a non-TTY stdout or a CI run gets no hyperlink. The terminal checks follow the
10
+ * `supports-hyperlinks` package, which no Vendure package depends on.
11
+ *
12
+ * Only the default parameters read `process`, so importing this module is safe in a browser.
13
+ */
14
+ function supportsHyperlinks(env = process.env, isTTY = process.stdout.isTTY === true) {
15
+ var _a, _b, _c;
16
+ if (env.FORCE_HYPERLINK) {
17
+ return parseInt(env.FORCE_HYPERLINK, 10) !== 0;
18
+ }
19
+ if (!isTTY || env.CI || env.TEAMCITY_VERSION) {
20
+ return false;
21
+ }
22
+ if (env.WT_SESSION) {
23
+ return true;
24
+ }
25
+ if (['iTerm.app', 'vscode', 'WezTerm', 'WarpTerminal'].includes((_a = env.TERM_PROGRAM) !== null && _a !== void 0 ? _a : '')) {
26
+ return true;
27
+ }
28
+ if (HYPERLINK_TERMS.includes((_b = env.TERM) !== null && _b !== void 0 ? _b : '')) {
29
+ return true;
30
+ }
31
+ return Number.parseInt((_c = env.VTE_VERSION) !== null && _c !== void 0 ? _c : '', 10) >= 5000;
32
+ }
33
+ //# sourceMappingURL=supports-hyperlinks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supports-hyperlinks.js","sourceRoot":"","sources":["../src/supports-hyperlinks.ts"],"names":[],"mappings":";;AAWA,gDAoBC;AA/BD,iFAAiF;AACjF,MAAM,eAAe,GAAG,CAAC,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;AAE5F;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAC9B,MAA0C,OAAO,CAAC,GAAG,EACrD,QAAiB,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI;;IAE9C,IAAI,GAAG,CAAC,eAAe,EAAE,CAAC;QACtB,OAAO,QAAQ,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IACD,IAAI,CAAC,KAAK,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,gBAAgB,EAAE,CAAC;QAC3C,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,QAAQ,CAAC,MAAA,GAAG,CAAC,YAAY,mCAAI,EAAE,CAAC,EAAE,CAAC;QACtF,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,IAAI,eAAe,CAAC,QAAQ,CAAC,MAAA,GAAG,CAAC,IAAI,mCAAI,EAAE,CAAC,EAAE,CAAC;QAC3C,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAA,GAAG,CAAC,WAAW,mCAAI,EAAE,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC;AAC9D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendure/common",
3
- "version": "3.8.1-master-202610200212",
3
+ "version": "3.8.1-master-202610230212",
4
4
  "main": "index.js",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "repository": {