@trackunit/iris-app-build-utilities 2.4.57 → 2.4.59

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/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## 2.4.59 (2026-09-21)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated iris-app-api to 2.6.7
6
+ - Updated shared-utils to 1.16.50
7
+
8
+ ## 2.4.58 (2026-09-21)
9
+
10
+ ### 🧱 Updated Dependencies
11
+
12
+ - Updated iris-app-api to 2.6.6
13
+
1
14
  ## 2.4.57 (2026-09-17)
2
15
 
3
16
  ### 🧱 Updated Dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-build-utilities",
3
- "version": "2.4.57",
3
+ "version": "2.4.59",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "engines": {
@@ -13,9 +13,9 @@
13
13
  "@nx/react": "23.1.0",
14
14
  "tslib": "^2.6.2",
15
15
  "csp-header": "^6.3.1",
16
- "@trackunit/iris-app-api": "2.6.5",
16
+ "@trackunit/iris-app-api": "2.6.7",
17
17
  "@nx/devkit": "23.1.0",
18
- "@trackunit/shared-utils": "1.16.49",
18
+ "@trackunit/shared-utils": "1.16.50",
19
19
  "http-proxy-middleware": "3.0.5",
20
20
  "marked": "14.1.2",
21
21
  "pacote": "^21.0.4",
@@ -1,3 +1,4 @@
1
+ import type { IrisAppExtension } from "@trackunit/iris-app-api";
1
2
  /**
2
3
  * Duplicate of `CUTOFF_VERSION` from
3
4
  * `libs/iris-app-runtime/core-host/src/contentInsetCutoff.ts`.
@@ -5,12 +6,29 @@
5
6
  * keep this string in sync with the host constant (GLU-1660).
6
7
  */
7
8
  export declare const CUTOFF_VERSION = "2.5.13";
9
+ type InsetCheckExtension = Pick<IrisAppExtension, "type"> & Partial<Pick<IrisAppExtension, "sourceRoot">>;
10
+ /**
11
+ * Extension types whose host chrome historically applied content inset
12
+ * (Asset / Site / Admin — `LegacyContentSpaceExtension`). Fleet and Customer
13
+ * Home iframes are always flush, so the advisory is noise for them (GLU-2353).
14
+ */
15
+ export declare const CONTENT_INSET_AFFECTED_EXTENSION_TYPES: ReadonlySet<IrisAppExtension["type"]>;
8
16
  /**
9
17
  * Advisory warning when an app's resolved SDK version is at/above the content-inset
10
18
  * cutoff but the app source has not adopted `p-content-space`. Matches the
11
19
  * `versionCheck`/`console.warn` tone in `checkPackageVersion` — never throws.
12
20
  *
21
+ * Apps that declare none of {@link CONTENT_INSET_AFFECTED_EXTENSION_TYPES} are
22
+ * skipped: the host never applied or removed inset for them.
23
+ *
24
+ * Adoption is measured by scanning each affected extension's `sourceRoot`
25
+ * (monorepo libs) and falling back to `appDir` when no sourceRoot is present
26
+ * (external single-directory apps) (GLU-2401).
27
+ *
13
28
  * @param sdkVersion - Installed `@trackunit/iris-app` version (from `resolveSdkVersion`), if any
14
29
  * @param appDir - Absolute path to the Iris app project root
30
+ * @param extensions - Declared extensions from the loaded Iris app manifest
31
+ * @param workspaceRoot - Nx workspace root used to resolve relative `sourceRoot`s
15
32
  */
16
- export declare const checkContentInsetAdoption: (sdkVersion: string | undefined, appDir: string) => void;
33
+ export declare const checkContentInsetAdoption: (sdkVersion: string | undefined, appDir: string, extensions: ReadonlyArray<InsetCheckExtension>, workspaceRoot?: string) => void;
34
+ export {};
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkContentInsetAdoption = exports.CUTOFF_VERSION = void 0;
3
+ exports.checkContentInsetAdoption = exports.CONTENT_INSET_AFFECTED_EXTENSION_TYPES = exports.CUTOFF_VERSION = void 0;
4
+ const path_1 = require("path");
4
5
  const semver_1 = require("semver");
5
6
  const checkContentSpaceAdoption_1 = require("./checkContentSpaceAdoption");
6
7
  /**
@@ -10,22 +11,46 @@ const checkContentSpaceAdoption_1 = require("./checkContentSpaceAdoption");
10
11
  * keep this string in sync with the host constant (GLU-1660).
11
12
  */
12
13
  exports.CUTOFF_VERSION = "2.5.13";
14
+ /**
15
+ * Extension types whose host chrome historically applied content inset
16
+ * (Asset / Site / Admin — `LegacyContentSpaceExtension`). Fleet and Customer
17
+ * Home iframes are always flush, so the advisory is noise for them (GLU-2353).
18
+ */
19
+ exports.CONTENT_INSET_AFFECTED_EXTENSION_TYPES = new Set([
20
+ "ASSET_HOME_EXTENSION",
21
+ "SITE_HOME_EXTENSION",
22
+ "ADMIN_EXTENSION",
23
+ ]);
13
24
  /**
14
25
  * Advisory warning when an app's resolved SDK version is at/above the content-inset
15
26
  * cutoff but the app source has not adopted `p-content-space`. Matches the
16
27
  * `versionCheck`/`console.warn` tone in `checkPackageVersion` — never throws.
17
28
  *
29
+ * Apps that declare none of {@link CONTENT_INSET_AFFECTED_EXTENSION_TYPES} are
30
+ * skipped: the host never applied or removed inset for them.
31
+ *
32
+ * Adoption is measured by scanning each affected extension's `sourceRoot`
33
+ * (monorepo libs) and falling back to `appDir` when no sourceRoot is present
34
+ * (external single-directory apps) (GLU-2401).
35
+ *
18
36
  * @param sdkVersion - Installed `@trackunit/iris-app` version (from `resolveSdkVersion`), if any
19
37
  * @param appDir - Absolute path to the Iris app project root
38
+ * @param extensions - Declared extensions from the loaded Iris app manifest
39
+ * @param workspaceRoot - Nx workspace root used to resolve relative `sourceRoot`s
20
40
  */
21
- const checkContentInsetAdoption = (sdkVersion, appDir) => {
41
+ const checkContentInsetAdoption = (sdkVersion, appDir, extensions, workspaceRoot = appDir) => {
22
42
  if (sdkVersion === undefined || (0, semver_1.valid)(sdkVersion) === null) {
23
43
  return;
24
44
  }
25
45
  if (!(0, semver_1.gte)(sdkVersion, exports.CUTOFF_VERSION)) {
26
46
  return;
27
47
  }
28
- if ((0, checkContentSpaceAdoption_1.checkContentSpaceAdoption)(appDir)) {
48
+ const affected = extensions.filter(extension => exports.CONTENT_INSET_AFFECTED_EXTENSION_TYPES.has(extension.type));
49
+ if (affected.length === 0) {
50
+ return;
51
+ }
52
+ const scanDirs = collectAdoptionScanDirs(appDir, workspaceRoot, affected);
53
+ if (scanDirs.some(dir => (0, checkContentSpaceAdoption_1.checkContentSpaceAdoption)(dir))) {
29
54
  return;
30
55
  }
31
56
  // eslint-disable-next-line no-console
@@ -33,4 +58,16 @@ const checkContentInsetAdoption = (sdkVersion, appDir) => {
33
58
  ` Add \`p-content-space\` to own your content inset (or the host will apply none). See the Iris App migration guide for details.\n`);
34
59
  };
35
60
  exports.checkContentInsetAdoption = checkContentInsetAdoption;
61
+ const collectAdoptionScanDirs = (appDir, workspaceRoot, affected) => {
62
+ const dirs = new Set();
63
+ for (const extension of affected) {
64
+ const sourceRoot = extension.sourceRoot;
65
+ if (sourceRoot === undefined || sourceRoot === "") {
66
+ dirs.add(appDir);
67
+ continue;
68
+ }
69
+ dirs.add((0, path_1.isAbsolute)(sourceRoot) ? sourceRoot : (0, path_1.join)(workspaceRoot, sourceRoot));
70
+ }
71
+ return [...dirs];
72
+ };
36
73
  //# sourceMappingURL=checkContentInsetAdoption.js.map