@trackunit/iris-app-build-utilities 1.11.13 → 1.11.14

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,7 @@
1
+ ## 1.11.14 (2026-01-21)
2
+
3
+ This was a version bump only for iris-app-build-utilities to align it with other projects, there were no code changes.
4
+
1
5
  ## 1.11.13 (2026-01-20)
2
6
 
3
7
  ### 🧱 Updated Dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-build-utilities",
3
- "version": "1.11.13",
3
+ "version": "1.11.14",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "engines": {
@@ -20,6 +20,15 @@ const createIrisAppDevServerConfig = async (port) => ({
20
20
  "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
21
21
  "Access-Control-Allow-Headers": "X-Requested-With, baggage, content-type, Authorization, sentry-trace, session-id, commit-number, x-trackunitappversion",
22
22
  },
23
+ proxy: [
24
+ {
25
+ context: ["/invoke"],
26
+ target: "https://dev.iris.trackunit.app",
27
+ changeOrigin: true,
28
+ secure: true,
29
+ logLevel: "debug",
30
+ },
31
+ ],
23
32
  onListening: () => { },
24
33
  setupMiddlewares: (middlewares, devServer) => {
25
34
  middlewares.push({
@@ -1 +1 @@
1
- {"version":3,"file":"getIrisAppDevServer.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-build-utilities/src/getIrisAppDevServer.ts"],"names":[],"mappings":";;;AAEA,yDAAsD;AAEtD;;;;;;;;GAQG;AACH,MAAM,4BAA4B,GAAG,KAAK,EAAE,IAAY,EAAE,EAAE,CAAC,CAAC;IAC5D,IAAI;IACJ,kBAAkB,EAAE,IAAI;IACxB,OAAO,EAAE;QACP,kCAAkC,EAAE,MAAM;QAC1C,wBAAwB,EAAE,MAAM;QAChC,8BAA8B,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AC7C,gCAA+D,EAAE,EACzB,EAAE;IAC1C,MAAM,IAAI,GAAG,MAAM,IAAA,mCAAgB,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,MAAM,4BAA4B,CAAC,IAAI,CAAC,CAAC;IAE5D,sFAAsF;IACtF,qFAAqF;IACrF,mHAAmH;IACnH,+DAA+D;IAC/D,OAAO,EAAE,GAAG,UAAU,EAAE,GAAG,6BAA6B,EAA8C,CAAC;AACzG,CAAC,CAAC;AAXW,QAAA,0BAA0B,8BAWrC;AAEF;;;;;GAKG;AACI,MAAM,yBAAyB,GAAG,KAAK,EAC5C,+BAAgD,EAAE,EACxB,EAAE;IAC5B,MAAM,IAAI,GAAG,MAAM,IAAA,mCAAgB,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,MAAM,4BAA4B,CAAC,IAAI,CAAC,CAAC;IAE5D,sFAAsF;IACtF,qFAAqF;IACrF,mHAAmH;IACnH,+DAA+D;IAC/D,OAAO,EAAE,GAAG,UAAU,EAAE,GAAG,4BAA4B,EAAgC,CAAC;AAC1F,CAAC,CAAC;AAXW,QAAA,yBAAyB,6BAWpC","sourcesContent":["import type { DevServer as RspackDevServer } from \"@rspack/core\";\nimport type { Configuration as WebpackDevServerConfiguration } from \"webpack-dev-server\";\nimport { getAvailablePort } from \"./getAvailablePort\";\n\n/**\n * Creates the base Iris App dev server configuration.\n *\n * Returns the config without explicit typing because webpack-dev-server's Configuration\n * and rspack's DevServer are nominally different types despite being structurally identical.\n * The rspack team acknowledges this type incompatibility in their own codebase with @ts-ignore.\n *\n * @see https://github.com/web-infra-dev/rspack/blob/main/packages/rspack-dev-server/src/server.ts\n */\nconst createIrisAppDevServerConfig = async (port: number) => ({\n port,\n historyApiFallback: true,\n headers: {\n \"Access-Control-Allow-Credentials\": \"true\",\n \"Access-Control-Max-Age\": \"3600\",\n \"Access-Control-Allow-Methods\": \"GET, POST, PUT, DELETE, OPTIONS\",\n \"Access-Control-Allow-Headers\":\n \"X-Requested-With, baggage, content-type, Authorization, sentry-trace, session-id, commit-number, x-trackunitappversion\",\n },\n onListening: () => {},\n setupMiddlewares: (\n middlewares: Array<{ name?: string; path?: string; middleware: unknown }>,\n devServer: { app?: { use: (path: string, handler: unknown) => void } }\n ) => {\n middlewares.push({\n name: \"cors-preflight\",\n path: \"/\",\n middleware: (\n req: { method?: string },\n res: { send?: (body: unknown) => void; end?: (body: string) => void },\n next: () => void\n ) => {\n if (req.method === \"GET\") {\n next();\n } else {\n res.end?.(\"GET, HEAD\");\n }\n },\n });\n devServer.app?.use(\n \"/\",\n (\n request: { headers: { origin?: string } },\n response: { header: (name: string, value: string) => void },\n next: () => void\n ) => {\n response.header(\"Access-Control-Allow-Origin\", request.headers.origin || \"https://dev.manager.trackunit.com\");\n next();\n }\n );\n devServer.app?.use(\n \"/manifestAndToken\",\n async (\n request: { headers: { origin?: string } },\n response: {\n header: (name: string, value: string) => void;\n send: (body: unknown) => void;\n status: (code: number) => void;\n }\n ) => {\n response.header(\"Access-Control-Allow-Origin\", request.headers.origin || \"https://dev.manager.trackunit.com\");\n response.header(\n \"Access-Control-Allow-Headers\",\n \"X-Requested-With, baggage, content-type, Authorization, sentry-trace, session-id, commit-number, x-trackunitappversion\"\n );\n try {\n const resp = await fetch(`http://localhost:${port}/manifest.json`);\n const body = await resp.json();\n response.send({ manifest: body });\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"ERROR: \", e);\n response.status(500);\n response.send(e);\n }\n }\n );\n devServer.app?.use(\n \"/extensionloader.js\",\n async (\n request: { headers: { origin?: string } },\n response: {\n header: (name: string, value: string) => void;\n send: (body: unknown) => void;\n status: (code: number) => void;\n }\n ) => {\n response.header(\"Access-Control-Allow-Origin\", request.headers.origin || \"https://dev.manager.trackunit.com\");\n response.header(\n \"Access-Control-Allow-Headers\",\n \"X-Requested-With, baggage, content-type, Authorization, sentry-trace, session-id, commit-number, x-trackunitappversion\"\n );\n try {\n let url = \"https://iris.trackunit.app/extensionloader.js\";\n if (process.env.LOCAL === \"true\") {\n url = \"http://localhost:3000/extensionloader.js\";\n }\n const resp = await fetch(url);\n const body = await resp.text();\n response.send(body);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"ERROR: \", e);\n response.status(500);\n response.send(e);\n }\n }\n );\n return middlewares;\n },\n});\n\n/**\n * Generates a dev server configuration for webpack configuration.\n *\n * @param webpackDevServerConfiguration The configuration to extend.\n * @returns {WebpackDevServerConfiguration} The dev server for webpack.\n */\nexport const getIrisAppWebpackDevServer = async (\n webpackDevServerConfiguration: WebpackDevServerConfiguration = {}\n): Promise<WebpackDevServerConfiguration> => {\n const port = await getAvailablePort(22220, 22229);\n const baseConfig = await createIrisAppDevServerConfig(port);\n\n // Type assertion required: webpack-dev-server and rspack have nominally different but\n // structurally identical DevServer types. This is a known limitation acknowledged by\n // the rspack team. See: https://github.com/web-infra-dev/rspack/blob/main/packages/rspack-dev-server/src/server.ts\n // eslint-disable-next-line local-rules/no-typescript-assertion\n return { ...baseConfig, ...webpackDevServerConfiguration } as unknown as WebpackDevServerConfiguration;\n};\n\n/**\n * Generates a dev server configuration for rspack configuration.\n *\n * @param rspackDevServerConfiguration The configuration to extend.\n * @returns {RspackDevServer} The dev server for rspack.\n */\nexport const getIrisAppRspackDevServer = async (\n rspackDevServerConfiguration: RspackDevServer = {}\n): Promise<RspackDevServer> => {\n const port = await getAvailablePort(22220, 22229);\n const baseConfig = await createIrisAppDevServerConfig(port);\n\n // Type assertion required: webpack-dev-server and rspack have nominally different but\n // structurally identical DevServer types. This is a known limitation acknowledged by\n // the rspack team. See: https://github.com/web-infra-dev/rspack/blob/main/packages/rspack-dev-server/src/server.ts\n // eslint-disable-next-line local-rules/no-typescript-assertion\n return { ...baseConfig, ...rspackDevServerConfiguration } as unknown as RspackDevServer;\n};\n"]}
1
+ {"version":3,"file":"getIrisAppDevServer.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris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nimport type { Configuration as WebpackDevServerConfiguration } from \"webpack-dev-server\";\nimport { getAvailablePort } from \"./getAvailablePort\";\n\n/**\n * Creates the base Iris App dev server configuration.\n *\n * Returns the config without explicit typing because webpack-dev-server's Configuration\n * and rspack's DevServer are nominally different types despite being structurally identical.\n * The rspack team acknowledges this type incompatibility in their own codebase with @ts-ignore.\n *\n * @see https://github.com/web-infra-dev/rspack/blob/main/packages/rspack-dev-server/src/server.ts\n */\nconst createIrisAppDevServerConfig = async (port: number) => ({\n port,\n historyApiFallback: true,\n headers: {\n \"Access-Control-Allow-Credentials\": \"true\",\n \"Access-Control-Max-Age\": \"3600\",\n \"Access-Control-Allow-Methods\": \"GET, POST, PUT, DELETE, OPTIONS\",\n \"Access-Control-Allow-Headers\":\n \"X-Requested-With, baggage, content-type, Authorization, sentry-trace, session-id, commit-number, x-trackunitappversion\",\n },\n proxy: [\n {\n context: [\"/invoke\"],\n target: \"https://dev.iris.trackunit.app\",\n changeOrigin: true,\n secure: true,\n logLevel: \"debug\",\n },\n ],\n onListening: () => {},\n setupMiddlewares: (\n middlewares: Array<{ name?: string; path?: string; middleware: unknown }>,\n devServer: { app?: { use: (path: string, handler: unknown) => void } }\n ) => {\n middlewares.push({\n name: \"cors-preflight\",\n path: \"/\",\n middleware: (\n req: { method?: string },\n res: { send?: (body: unknown) => void; end?: (body: string) => void },\n next: () => void\n ) => {\n if (req.method === \"GET\") {\n next();\n } else {\n res.end?.(\"GET, HEAD\");\n }\n },\n });\n devServer.app?.use(\n \"/\",\n (\n request: { headers: { origin?: string } },\n response: { header: (name: string, value: string) => void },\n next: () => void\n ) => {\n response.header(\"Access-Control-Allow-Origin\", request.headers.origin || \"https://dev.manager.trackunit.com\");\n next();\n }\n );\n devServer.app?.use(\n \"/manifestAndToken\",\n async (\n request: { headers: { origin?: string } },\n response: {\n header: (name: string, value: string) => void;\n send: (body: unknown) => void;\n status: (code: number) => void;\n }\n ) => {\n response.header(\"Access-Control-Allow-Origin\", request.headers.origin || \"https://dev.manager.trackunit.com\");\n response.header(\n \"Access-Control-Allow-Headers\",\n \"X-Requested-With, baggage, content-type, Authorization, sentry-trace, session-id, commit-number, x-trackunitappversion\"\n );\n try {\n const resp = await fetch(`http://localhost:${port}/manifest.json`);\n const body = await resp.json();\n response.send({ manifest: body });\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"ERROR: \", e);\n response.status(500);\n response.send(e);\n }\n }\n );\n devServer.app?.use(\n \"/extensionloader.js\",\n async (\n request: { headers: { origin?: string } },\n response: {\n header: (name: string, value: string) => void;\n send: (body: unknown) => void;\n status: (code: number) => void;\n }\n ) => {\n response.header(\"Access-Control-Allow-Origin\", request.headers.origin || \"https://dev.manager.trackunit.com\");\n response.header(\n \"Access-Control-Allow-Headers\",\n \"X-Requested-With, baggage, content-type, Authorization, sentry-trace, session-id, commit-number, x-trackunitappversion\"\n );\n try {\n let url = \"https://iris.trackunit.app/extensionloader.js\";\n if (process.env.LOCAL === \"true\") {\n url = \"http://localhost:3000/extensionloader.js\";\n }\n const resp = await fetch(url);\n const body = await resp.text();\n response.send(body);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"ERROR: \", e);\n response.status(500);\n response.send(e);\n }\n }\n );\n return middlewares;\n },\n});\n\n/**\n * Generates a dev server configuration for webpack configuration.\n *\n * @param webpackDevServerConfiguration The configuration to extend.\n * @returns {WebpackDevServerConfiguration} The dev server for webpack.\n */\nexport const getIrisAppWebpackDevServer = async (\n webpackDevServerConfiguration: WebpackDevServerConfiguration = {}\n): Promise<WebpackDevServerConfiguration> => {\n const port = await getAvailablePort(22220, 22229);\n const baseConfig = await createIrisAppDevServerConfig(port);\n\n // Type assertion required: webpack-dev-server and rspack have nominally different but\n // structurally identical DevServer types. This is a known limitation acknowledged by\n // the rspack team. See: https://github.com/web-infra-dev/rspack/blob/main/packages/rspack-dev-server/src/server.ts\n // eslint-disable-next-line local-rules/no-typescript-assertion\n return { ...baseConfig, ...webpackDevServerConfiguration } as unknown as WebpackDevServerConfiguration;\n};\n\n/**\n * Generates a dev server configuration for rspack configuration.\n *\n * @param rspackDevServerConfiguration The configuration to extend.\n * @returns {RspackDevServer} The dev server for rspack.\n */\nexport const getIrisAppRspackDevServer = async (\n rspackDevServerConfiguration: RspackDevServer = {}\n): Promise<RspackDevServer> => {\n const port = await getAvailablePort(22220, 22229);\n const baseConfig = await createIrisAppDevServerConfig(port);\n\n // Type assertion required: webpack-dev-server and rspack have nominally different but\n // structurally identical DevServer types. This is a known limitation acknowledged by\n // the rspack team. See: https://github.com/web-infra-dev/rspack/blob/main/packages/rspack-dev-server/src/server.ts\n // eslint-disable-next-line local-rules/no-typescript-assertion\n return { ...baseConfig, ...rspackDevServerConfiguration } as unknown as RspackDevServer;\n};\n"]}