@trackunit/iris-app-sdk-rspack 1.6.25 → 1.6.35

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,93 @@
1
+ ## 1.6.35 (2025-09-09)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated iris-app-build-utilities to 1.6.34
6
+ - Updated iris-app-webpack-plugin to 1.6.34
7
+ - Updated iris-app-api to 1.6.34
8
+ - Updated shared-utils to 1.8.34
9
+
10
+ ## 1.6.34 (2025-09-08)
11
+
12
+ ### 🧱 Updated Dependencies
13
+
14
+ - Updated iris-app-build-utilities to 1.6.33
15
+ - Updated iris-app-webpack-plugin to 1.6.33
16
+ - Updated iris-app-api to 1.6.33
17
+ - Updated shared-utils to 1.8.33
18
+
19
+ ## 1.6.33 (2025-09-08)
20
+
21
+ ### 🧱 Updated Dependencies
22
+
23
+ - Updated iris-app-build-utilities to 1.6.32
24
+ - Updated iris-app-webpack-plugin to 1.6.32
25
+ - Updated iris-app-api to 1.6.32
26
+ - Updated shared-utils to 1.8.32
27
+
28
+ ## 1.6.32 (2025-09-08)
29
+
30
+ ### 🧱 Updated Dependencies
31
+
32
+ - Updated iris-app-build-utilities to 1.6.31
33
+ - Updated iris-app-webpack-plugin to 1.6.31
34
+ - Updated iris-app-api to 1.6.31
35
+ - Updated shared-utils to 1.8.31
36
+
37
+ ## 1.6.31 (2025-09-05)
38
+
39
+ ### 🧱 Updated Dependencies
40
+
41
+ - Updated iris-app-build-utilities to 1.6.30
42
+ - Updated iris-app-webpack-plugin to 1.6.30
43
+ - Updated iris-app-api to 1.6.30
44
+ - Updated shared-utils to 1.8.30
45
+
46
+ ## 1.6.30 (2025-09-05)
47
+
48
+ ### 🧱 Updated Dependencies
49
+
50
+ - Updated iris-app-build-utilities to 1.6.29
51
+ - Updated iris-app-webpack-plugin to 1.6.29
52
+ - Updated iris-app-api to 1.6.29
53
+ - Updated shared-utils to 1.8.29
54
+
55
+ ## 1.6.29 (2025-09-05)
56
+
57
+ ### 🧱 Updated Dependencies
58
+
59
+ - Updated iris-app-build-utilities to 1.6.28
60
+ - Updated iris-app-webpack-plugin to 1.6.28
61
+ - Updated iris-app-api to 1.6.28
62
+ - Updated shared-utils to 1.8.28
63
+
64
+ ## 1.6.28 (2025-09-05)
65
+
66
+ ### 🧱 Updated Dependencies
67
+
68
+ - Updated iris-app-build-utilities to 1.6.27
69
+ - Updated iris-app-webpack-plugin to 1.6.27
70
+ - Updated iris-app-api to 1.6.27
71
+ - Updated shared-utils to 1.8.27
72
+
73
+ ## 1.6.27 (2025-09-04)
74
+
75
+ ### 🧱 Updated Dependencies
76
+
77
+ - Updated iris-app-build-utilities to 1.6.26
78
+ - Updated iris-app-webpack-plugin to 1.6.26
79
+ - Updated iris-app-api to 1.6.26
80
+ - Updated shared-utils to 1.8.26
81
+
82
+ ## 1.6.26 (2025-09-04)
83
+
84
+ ### 🧱 Updated Dependencies
85
+
86
+ - Updated iris-app-build-utilities to 1.6.25
87
+ - Updated iris-app-webpack-plugin to 1.6.25
88
+ - Updated iris-app-api to 1.6.25
89
+ - Updated shared-utils to 1.8.25
90
+
1
91
  ## 1.6.25 (2025-09-04)
2
92
 
3
93
  ### 🧱 Updated Dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-sdk-rspack",
3
- "version": "1.6.25",
3
+ "version": "1.6.35",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "executors": "./executors.json",
@@ -16,10 +16,10 @@
16
16
  "pacote": "17.0.6",
17
17
  "semver": "7.5.4",
18
18
  "webpack-bundle-analyzer": "^4.8.0",
19
- "@trackunit/iris-app-build-utilities": "1.6.24",
20
- "@trackunit/shared-utils": "1.8.24",
21
- "@trackunit/iris-app-api": "1.6.24",
22
- "@trackunit/iris-app-webpack-plugin": "1.6.24",
19
+ "@trackunit/iris-app-build-utilities": "1.6.34",
20
+ "@trackunit/shared-utils": "1.8.34",
21
+ "@trackunit/iris-app-api": "1.6.34",
22
+ "@trackunit/iris-app-webpack-plugin": "1.6.34",
23
23
  "tslib": "^2.6.2"
24
24
  },
25
25
  "types": "./src/index.d.ts",
@@ -46,7 +46,7 @@ async function* default_1(options, context) {
46
46
  }
47
47
  deleteOutputDir(context.root, options.outputPath);
48
48
  const observable = new rxjs_1.Observable(subscriber => {
49
- // eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires, local-rules/no-typescript-assertion
49
+ // eslint-disable-next-line @typescript-eslint/no-require-imports, local-rules/no-typescript-assertion
50
50
  const compiler = require("@rspack/core").rspack(config);
51
51
  // Add signal handlers
52
52
  const signals = ["SIGINT", "SIGTERM", "SIGQUIT"];
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/rspack/src/executors/build/executor.ts"],"names":[],"mappings":";;AAmCA,4BAkFC;;AAnHD,wEAAoE;AACpE,kFAAyE;AACzE,2BAA4B;AAC5B,+BAAqC;AACrC,+BAAkC;AAClC,2DAAqC;AAGrC,kBAAgB;AAChB,sEAAmE;AACnE,sEAAgE;AAQhE,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,UAAkB,EAAE,EAAE;IAC3D,MAAM,kBAAkB,GAAG,IAAA,cAAO,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACrD,IAAI,kBAAkB,KAAK,IAAI,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACrE,CAAC;IACD,IAAA,WAAM,EAAC,kBAAkB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC/D,CAAC,CAAC;AAEF;;;;;;GAMG;AACY,KAAK,SAAS,CAAC,WAAE,OAA4B,EAAE,OAAwB;IACpF,MAAM,IAAA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,CACL,EAAE,CAAC,GAAG,CAAC,CAAC,KAAU,EAAE,EAAE;QACpB,sCAAsC;QACtC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,EACF,EAAE,CAAC,GAAG,CAAC,CAAC,KAAU,EAAE,EAAE;QACpB,+DAA+D;QAC/D,OAAO;YACL,OAAO,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE;YAC3B,OAAO,EAAE,IAAA,cAAO,EAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC;SACjC,CAAC;IACtB,CAAC,CAAC,CACH,CAAC;IAEF,+DAA+D;IAC/D,OAAO,KAAK,CAAC,CAAC,IAAA,8BAAa,EAAC,UAA6B,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { ExecutorContext } from \"@nx/devkit\";\nimport { eachValueFrom } from \"@nx/devkit/src/utils/rxjs-for-await\";\nimport { enableTsConfigPath } from \"@trackunit/iris-app-build-utilities\";\nimport { rmSync } from \"fs\";\nimport { join, resolve } from \"path\";\nimport { Observable } from \"rxjs\";\nimport * as op from \"rxjs/operators\";\n\nimport { Configuration } from \"@rspack/core\";\nimport \"win-ca\";\nimport { checkPackageVersion } from \"../utils/checkPackageVersion\";\nimport { getDefaultConfig } from \"../utils/defaultRspackConfig\";\nimport { BuildExecutorSchema } from \"./schema\";\n\nexport type NodeBuildEvent = {\n outfile: string;\n success: boolean;\n};\n\nconst deleteOutputDir = (root: string, outputPath: string) => {\n const resolvedOutputPath = resolve(root, outputPath);\n if (resolvedOutputPath === root) {\n throw new Error(\"Output path MUST not be project root directory!\");\n }\n rmSync(resolvedOutputPath, { recursive: true, force: true });\n};\n\n/**\n * Build executor for building iris apps.\n *\n * @param {BuildExecutorSchema} options build executor options for this nx executor\n * @param {ExecutorContext} context build executor context for this nx executor\n * @yields {NodeBuildEvent} the build event\n */\nexport default async function* (options: BuildExecutorSchema, context: ExecutorContext) {\n await checkPackageVersion(false);\n const projectRoot = context.projectsConfigurations.projects[context.projectName!]!.root;\n const projectRootDir = join(context.root, projectRoot);\n const tileManifestPath = join(context.root, projectRoot, \"iris-app-manifest.ts\");\n enableTsConfigPath({\n projectRootDir,\n });\n if (!options.rspackConfig) {\n throw new Error(\"option.rspackConfig is required\");\n }\n const IrisAppManifest = (await import(tileManifestPath)).default;\n const defaultConfig = await getDefaultConfig(\"production\", context.root, projectRootDir, IrisAppManifest, context);\n\n const customConfigFile = await import(options.rspackConfig);\n\n let config = customConfigFile.default(await defaultConfig);\n const isPromise = config instanceof Promise;\n if (isPromise) {\n config = await config;\n }\n deleteOutputDir(context.root, options.outputPath);\n const observable = new Observable(subscriber => {\n // eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires, local-rules/no-typescript-assertion\n const compiler = require(\"@rspack/core\").rspack(config as Configuration);\n\n // Add signal handlers\n const signals: Array<NodeJS.Signals> = [\"SIGINT\", \"SIGTERM\", \"SIGQUIT\"];\n const cleanup = () => {\n compiler.close((err: Error | null) => {\n if (err) {\n // eslint-disable-next-line no-console\n console.error(err);\n }\n process.exit(0);\n });\n };\n\n signals.forEach(signal => {\n process.on(signal, cleanup);\n });\n\n compiler.run((err: Error | null, stats: any) => {\n if (err) {\n // eslint-disable-next-line no-console\n console.error(err);\n subscriber.error(err);\n return;\n }\n\n subscriber.next(stats);\n subscriber.complete();\n });\n\n // Update cleanup function to remove signal handlers\n return () => {\n signals.forEach(signal => {\n process.off(signal, cleanup);\n });\n compiler.close((err: Error | null) => {\n if (err) {\n // eslint-disable-next-line no-console\n console.error(err);\n }\n });\n };\n }).pipe(\n op.tap((stats: any) => {\n // eslint-disable-next-line no-console\n console.info(stats.toString(config.stats));\n }),\n op.map((stats: any) => {\n // eslint-disable-next-line local-rules/no-typescript-assertion\n return {\n success: !stats.hasErrors(),\n outfile: resolve(context.root, options.outputPath),\n } as NodeBuildEvent;\n })\n );\n\n // eslint-disable-next-line local-rules/no-typescript-assertion\n return yield* eachValueFrom(observable as Observable<any>);\n}\n"]}
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/rspack/src/executors/build/executor.ts"],"names":[],"mappings":";;AAmCA,4BAkFC;;AAnHD,wEAAoE;AACpE,kFAAyE;AACzE,2BAA4B;AAC5B,+BAAqC;AACrC,+BAAkC;AAClC,2DAAqC;AAGrC,kBAAgB;AAChB,sEAAmE;AACnE,sEAAgE;AAQhE,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,UAAkB,EAAE,EAAE;IAC3D,MAAM,kBAAkB,GAAG,IAAA,cAAO,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACrD,IAAI,kBAAkB,KAAK,IAAI,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACrE,CAAC;IACD,IAAA,WAAM,EAAC,kBAAkB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC/D,CAAC,CAAC;AAEF;;;;;;GAMG;AACY,KAAK,SAAS,CAAC,WAAE,OAA4B,EAAE,OAAwB;IACpF,MAAM,IAAA,yCAAmB,EAAC,KAAK,CAAC,CAAC;IACjC,MAAM,WAAW,GAAG,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAY,CAAE,CAAC,IAAI,CAAC;IACxF,MAAM,cAAc,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACvD,MAAM,gBAAgB,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,sBAAsB,CAAC,CAAC;IACjF,IAAA,6CAAkB,EAAC;QACjB,cAAc;KACf,CAAC,CAAC;IACH,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;QAC1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IAEF,+DAA+D;IAC/D,OAAO,KAAK,CAAC,CAAC,IAAA,8BAAa,EAAC,UAA6B,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { ExecutorContext } from \"@nx/devkit\";\nimport { eachValueFrom } from \"@nx/devkit/src/utils/rxjs-for-await\";\nimport { enableTsConfigPath } from \"@trackunit/iris-app-build-utilities\";\nimport { rmSync } from \"fs\";\nimport { join, resolve } from \"path\";\nimport { Observable } from \"rxjs\";\nimport * as op from \"rxjs/operators\";\n\nimport { Configuration } from \"@rspack/core\";\nimport \"win-ca\";\nimport { checkPackageVersion } from \"../utils/checkPackageVersion\";\nimport { getDefaultConfig } from \"../utils/defaultRspackConfig\";\nimport { BuildExecutorSchema } from \"./schema\";\n\nexport type NodeBuildEvent = {\n outfile: string;\n success: boolean;\n};\n\nconst deleteOutputDir = (root: string, outputPath: string) => {\n const resolvedOutputPath = resolve(root, outputPath);\n if (resolvedOutputPath === root) {\n throw new Error(\"Output path MUST not be project root directory!\");\n }\n rmSync(resolvedOutputPath, { recursive: true, force: true });\n};\n\n/**\n * Build executor for building iris apps.\n *\n * @param {BuildExecutorSchema} options build executor options for this nx executor\n * @param {ExecutorContext} context build executor context for this nx executor\n * @yields {NodeBuildEvent} the build event\n */\nexport default async function* (options: BuildExecutorSchema, context: ExecutorContext) {\n await checkPackageVersion(false);\n const projectRoot = context.projectsConfigurations.projects[context.projectName!]!.root;\n const projectRootDir = join(context.root, projectRoot);\n const tileManifestPath = join(context.root, projectRoot, \"iris-app-manifest.ts\");\n enableTsConfigPath({\n projectRootDir,\n });\n if (!options.rspackConfig) {\n throw new Error(\"option.rspackConfig is required\");\n }\n const IrisAppManifest = (await import(tileManifestPath)).default;\n const defaultConfig = await getDefaultConfig(\"production\", context.root, projectRootDir, IrisAppManifest, context);\n\n const customConfigFile = await import(options.rspackConfig);\n\n let config = customConfigFile.default(await defaultConfig);\n const isPromise = config instanceof Promise;\n if (isPromise) {\n config = await config;\n }\n deleteOutputDir(context.root, options.outputPath);\n const observable = new Observable(subscriber => {\n // eslint-disable-next-line @typescript-eslint/no-require-imports, local-rules/no-typescript-assertion\n const compiler = require(\"@rspack/core\").rspack(config as Configuration);\n\n // Add signal handlers\n const signals: Array<NodeJS.Signals> = [\"SIGINT\", \"SIGTERM\", \"SIGQUIT\"];\n const cleanup = () => {\n compiler.close((err: Error | null) => {\n if (err) {\n // eslint-disable-next-line no-console\n console.error(err);\n }\n process.exit(0);\n });\n };\n\n signals.forEach(signal => {\n process.on(signal, cleanup);\n });\n\n compiler.run((err: Error | null, stats: any) => {\n if (err) {\n // eslint-disable-next-line no-console\n console.error(err);\n subscriber.error(err);\n return;\n }\n\n subscriber.next(stats);\n subscriber.complete();\n });\n\n // Update cleanup function to remove signal handlers\n return () => {\n signals.forEach(signal => {\n process.off(signal, cleanup);\n });\n compiler.close((err: Error | null) => {\n if (err) {\n // eslint-disable-next-line no-console\n console.error(err);\n }\n });\n };\n }).pipe(\n op.tap((stats: any) => {\n // eslint-disable-next-line no-console\n console.info(stats.toString(config.stats));\n }),\n op.map((stats: any) => {\n // eslint-disable-next-line local-rules/no-typescript-assertion\n return {\n success: !stats.hasErrors(),\n outfile: resolve(context.root, options.outputPath),\n } as NodeBuildEvent;\n })\n );\n\n // eslint-disable-next-line local-rules/no-typescript-assertion\n return yield* eachValueFrom(observable as Observable<any>);\n}\n"]}
@@ -42,7 +42,7 @@ async function* default_1(options, context) {
42
42
  console.log("Using config", JSON.stringify(config.plugins, null, 2));
43
43
  }
44
44
  const observable = new rxjs_1.Observable(subscriber => {
45
- // eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
45
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
46
46
  const compiler = require("@rspack/core").rspack(config);
47
47
  const devServer = new dev_server_1.RspackDevServer({
48
48
  ...config.devServer,
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../../libs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ACnB,sCAAsC;QACtC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,EACF,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;QAChC,OAAO;QACP,OAAO;KACR,CAAC,CAAC,CACJ,CAAC;IAEF,OAAO,KAAK,CAAC,CAAC,IAAA,8BAAa,EAAC,UAAU,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { ExecutorContext } from \"@nx/devkit\";\nimport { eachValueFrom } from \"@nx/devkit/src/utils/rxjs-for-await\";\nimport { enableTsConfigPath } from \"@trackunit/iris-app-build-utilities\";\nimport { join } from \"path\";\nimport { Observable } from \"rxjs\";\nimport * as op from \"rxjs/operators\";\n\nimport { Configuration } from \"@rspack/core\";\nimport { RspackDevServer } from \"@rspack/dev-server\";\nimport \"win-ca\";\nimport { checkPackageVersion } from \"../utils/checkPackageVersion\";\nimport { getDefaultConfig } from \"../utils/defaultRspackConfig\";\nimport { ServeExecutorSchema } from \"./schema\";\n\n/**\n * Serve executor for serving iris apps.\n *\n * @param {ServeExecutorSchema} options serve executor options for this nx executor\n * @param {ExecutorContext} context serve executor context for this nx executor\n * @yields {AsyncGenerator<any, void, unknown>} the serve observable\n */\nexport default async function* (options: ServeExecutorSchema, context: ExecutorContext) {\n await checkPackageVersion(false);\n const projectRoot = context.projectsConfigurations.projects[context.projectName!]!.root;\n const projectRootDir = join(context.root, projectRoot);\n const tileManifestPath = join(context.root, projectRoot, \"iris-app-manifest.ts\");\n enableTsConfigPath({\n projectRootDir,\n });\n if (!options.rspackConfig) {\n throw new Error(\"option.rspackConfig is required\");\n }\n const IrisAppManifest = (await import(tileManifestPath)).default;\n const defaultConfig = getDefaultConfig(\"development\", context.root, projectRootDir, IrisAppManifest, context);\n const customConfigFile = await import(options.rspackConfig);\n\n let config = customConfigFile.default(await defaultConfig);\n const isPromise = config instanceof Promise;\n if (isPromise) {\n config = await config;\n }\n\n if (context.isVerbose) {\n // eslint-disable-next-line no-console\n console.log(\"Using config\", JSON.stringify(config.plugins, null, 2));\n }\n const observable = new Observable<{ baseUrl: string; success: boolean; stats: any }>(subscriber => {\n // eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports\n const compiler = require(\"@rspack/core\").rspack(config as Configuration);\n const devServer = new RspackDevServer(\n {\n ...config.devServer,\n },\n compiler\n );\n\n devServer.startCallback(() => {\n const baseUrl = `http${config.devServer?.https ? \"s\" : \"\"}://${config.devServer?.host || \"localhost\"}:${config.devServer?.port || 8080}`;\n\n compiler.hooks.done.tap(\"iris-serve\", (stats: any) => {\n subscriber.next({\n baseUrl,\n success: !stats.hasErrors(),\n stats,\n });\n });\n });\n\n return () => {\n devServer.stopCallback(() => {\n subscriber.complete();\n });\n };\n }).pipe(\n op.tap(({ stats }) => {\n // eslint-disable-next-line no-console\n console.info(stats.toString(config.stats));\n }),\n op.map(({ baseUrl, success }) => ({\n baseUrl,\n success,\n }))\n );\n\n return yield* eachValueFrom(observable);\n}\n"]}
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/rspack/src/executors/serve/executor.ts"],"names":[],"mappings":";;AAsBA,4BAgEC;;AApFD,wEAAoE;AACpE,kFAAyE;AACzE,+BAA4B;AAC5B,+BAAkC;AAClC,2DAAqC;AAGrC,mDAAqD;AACrD,kBAAgB;AAChB,sEAAmE;AACnE,sEAAgE;AAGhE;;;;;;GAMG;AACY,KAAK,SAAS,CAAC,WAAE,OAA4B,EAAE,OAAwB;IACpF,MAAM,IAAA,yCAAmB,EAAC,KAAK,CAAC,CAAC;IACjC,MAAM,WAAW,GAAG,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAY,CAAE,CAAC,IAAI,CAAC;IACxF,MAAM,c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x/devkit/src/utils/rxjs-for-await\";\nimport { enableTsConfigPath } from \"@trackunit/iris-app-build-utilities\";\nimport { join } from \"path\";\nimport { Observable } from \"rxjs\";\nimport * as op from \"rxjs/operators\";\n\nimport { Configuration } from \"@rspack/core\";\nimport { RspackDevServer } from \"@rspack/dev-server\";\nimport \"win-ca\";\nimport { checkPackageVersion } from \"../utils/checkPackageVersion\";\nimport { getDefaultConfig } from \"../utils/defaultRspackConfig\";\nimport { ServeExecutorSchema } from \"./schema\";\n\n/**\n * Serve executor for serving iris apps.\n *\n * @param {ServeExecutorSchema} options serve executor options for this nx executor\n * @param {ExecutorContext} context serve executor context for this nx executor\n * @yields {AsyncGenerator<any, void, unknown>} the serve observable\n */\nexport default async function* (options: ServeExecutorSchema, context: ExecutorContext) {\n await checkPackageVersion(false);\n const projectRoot = context.projectsConfigurations.projects[context.projectName!]!.root;\n const projectRootDir = join(context.root, projectRoot);\n const tileManifestPath = join(context.root, projectRoot, \"iris-app-manifest.ts\");\n enableTsConfigPath({\n projectRootDir,\n });\n if (!options.rspackConfig) {\n throw new Error(\"option.rspackConfig is required\");\n }\n const IrisAppManifest = (await import(tileManifestPath)).default;\n const defaultConfig = getDefaultConfig(\"development\", context.root, projectRootDir, IrisAppManifest, context);\n const customConfigFile = await import(options.rspackConfig);\n\n let config = customConfigFile.default(await defaultConfig);\n const isPromise = config instanceof Promise;\n if (isPromise) {\n config = await config;\n }\n\n if (context.isVerbose) {\n // eslint-disable-next-line no-console\n console.log(\"Using config\", JSON.stringify(config.plugins, null, 2));\n }\n const observable = new Observable<{ baseUrl: string; success: boolean; stats: any }>(subscriber => {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const compiler = require(\"@rspack/core\").rspack(config as Configuration);\n const devServer = new RspackDevServer(\n {\n ...config.devServer,\n },\n compiler\n );\n\n devServer.startCallback(() => {\n const baseUrl = `http${config.devServer?.https ? \"s\" : \"\"}://${config.devServer?.host || \"localhost\"}:${config.devServer?.port || 8080}`;\n\n compiler.hooks.done.tap(\"iris-serve\", (stats: any) => {\n subscriber.next({\n baseUrl,\n success: !stats.hasErrors(),\n stats,\n });\n });\n });\n\n return () => {\n devServer.stopCallback(() => {\n subscriber.complete();\n });\n };\n }).pipe(\n op.tap(({ stats }) => {\n // eslint-disable-next-line no-console\n console.info(stats.toString(config.stats));\n }),\n op.map(({ baseUrl, success }) => ({\n baseUrl,\n success,\n }))\n );\n\n return yield* eachValueFrom(observable);\n}\n"]}