@hitachivantara/app-shell-vite-plugin 0.15.0 → 0.15.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-watch-config-plugin.d.ts","sourceRoot":"","sources":["../src/vite-watch-config-plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"vite-watch-config-plugin.d.ts","sourceRoot":"","sources":["../src/vite-watch-config-plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAMzE,MAAM,CAAC,OAAO,UAAU,mBAAmB,CACzC,cAAc,EAAE,gBAAgB,EAChC,IAAI,EAAE,MAAM,EACZ,kBAAkB,CAAC,EAAE,MAAM,EAC3B,oBAAoB,CAAC,EAAE,MAAM,GAC5B,YAAY,CA6Cd"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import { getPublicPath } from "./config-utils.js";
|
|
3
|
+
import { require } from "./nodeModule.js";
|
|
3
4
|
export default function serveAppShellConfig(appShellConfig, root, appShellConfigFile, automaticViewsFolder) {
|
|
4
5
|
return {
|
|
5
6
|
name: "vite-plugin-watch-app-shell-config",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-watch-config-plugin.js","sourceRoot":"","sources":["../src/vite-watch-config-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAMxB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CACzC,cAAgC,E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,CAAC;gBAC7D,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;gBAC5C,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;aAC1C;YAED,MAAM,UAAU,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC;YACjD,MAAM,CAAC,WAAW,CAAC,GAAG,CACpB,GAAG,UAAU,uBAAuB,EACpC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;gBACjB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC;YAC1C,CAAC,CACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import path from \"path\";\n\nimport type { PluginOption } from \"vite\";\n\nimport type { HvAppShellConfig } from \"@hitachivantara/app-shell-shared\";\n\nimport { getPublicPath } from \"./config-utils.js\";\n\nexport default function serveAppShellConfig(\n appShellConfig: HvAppShellConfig,\n root: string,\n appShellConfigFile?: string,\n automaticViewsFolder?: string\n): PluginOption {\n return {\n name: \"vite-plugin-watch-app-shell-config\",\n apply: \"serve\",\n\n configureServer(server) {\n const restartServer = (file: string) => {\n if (appShellConfigFile != null && file.endsWith(appShellConfigFile)) {\n console.info(\"App Shell configuration file changed. Reloading...\");\n delete require.cache[require.resolve(appShellConfigFile)];\n server\n .restart()\n .catch(e => console.error(`Restart failed with: ${e}`));\n }\n };\n\n const restartServer2 = (file: string) => {\n if (automaticViewsFolder != null && file.match(/\\/index\\.[tj]sx?$/)) {\n console.info(\"Automatic views folder changed. Reloading...\");\n server\n .restart()\n .catch(e => console.error(`Restart failed with: ${e}`));\n }\n };\n\n if (appShellConfigFile != null) {\n server.watcher.add(appShellConfigFile);\n server.watcher.on(\"change\", restartServer);\n }\n\n if (automaticViewsFolder != null) {\n server.watcher.add(path.resolve(root, automaticViewsFolder));\n server.watcher.on(\"unlink\", restartServer2);\n server.watcher.on(\"add\", restartServer2);\n }\n\n const publicPath = getPublicPath(appShellConfig);\n server.middlewares.use(\n `${publicPath}app-shell.config.json`,\n async (req, res) => {\n res.end(JSON.stringify(appShellConfig));\n }\n );\n }\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"vite-watch-config-plugin.js","sourceRoot":"","sources":["../src/vite-watch-config-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAMxB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,MAAM,CAAC,OAAO,UAAU,mBAAmB,CACzC,cAAgC,EAChC,IAAY,EACZ,kBAA2B,EAC3B,oBAA6B;IAE7B,OAAO;QACL,IAAI,EAAE,oCAAoC;QAC1C,KAAK,EAAE,OAAO;QAEd,eAAe,CAAC,MAAM;YACpB,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,EAAE;gBACrC,IAAI,kBAAkB,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE;oBACnE,OAAO,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;oBACnE,OAAO,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC;oBAC1D,MAAM;yBACH,OAAO,EAAE;yBACT,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,EAAE,CAAC,CAAC,CAAC;iBAC3D;YACH,CAAC,CAAC;YAEF,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE;gBACtC,IAAI,oBAAoB,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE;oBACnE,OAAO,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;oBAC7D,MAAM;yBACH,OAAO,EAAE;yBACT,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,EAAE,CAAC,CAAC,CAAC;iBAC3D;YACH,CAAC,CAAC;YAEF,IAAI,kBAAkB,IAAI,IAAI,EAAE;gBAC9B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;gBACvC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;aAC5C;YAED,IAAI,oBAAoB,IAAI,IAAI,EAAE;gBAChC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC,CAAC;gBAC7D,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;gBAC5C,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;aAC1C;YAED,MAAM,UAAU,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC;YACjD,MAAM,CAAC,WAAW,CAAC,GAAG,CACpB,GAAG,UAAU,uBAAuB,EACpC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;gBACjB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC;YAC1C,CAAC,CACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import path from \"path\";\n\nimport type { PluginOption } from \"vite\";\n\nimport type { HvAppShellConfig } from \"@hitachivantara/app-shell-shared\";\n\nimport { getPublicPath } from \"./config-utils.js\";\n\nimport { require } from \"./nodeModule.js\";\n\nexport default function serveAppShellConfig(\n appShellConfig: HvAppShellConfig,\n root: string,\n appShellConfigFile?: string,\n automaticViewsFolder?: string\n): PluginOption {\n return {\n name: \"vite-plugin-watch-app-shell-config\",\n apply: \"serve\",\n\n configureServer(server) {\n const restartServer = (file: string) => {\n if (appShellConfigFile != null && file.endsWith(appShellConfigFile)) {\n console.info(\"App Shell configuration file changed. Reloading...\");\n delete require.cache[require.resolve(appShellConfigFile)];\n server\n .restart()\n .catch(e => console.error(`Restart failed with: ${e}`));\n }\n };\n\n const restartServer2 = (file: string) => {\n if (automaticViewsFolder != null && file.match(/\\/index\\.[tj]sx?$/)) {\n console.info(\"Automatic views folder changed. Reloading...\");\n server\n .restart()\n .catch(e => console.error(`Restart failed with: ${e}`));\n }\n };\n\n if (appShellConfigFile != null) {\n server.watcher.add(appShellConfigFile);\n server.watcher.on(\"change\", restartServer);\n }\n\n if (automaticViewsFolder != null) {\n server.watcher.add(path.resolve(root, automaticViewsFolder));\n server.watcher.on(\"unlink\", restartServer2);\n server.watcher.on(\"add\", restartServer2);\n }\n\n const publicPath = getPublicPath(appShellConfig);\n server.middlewares.use(\n `${publicPath}app-shell.config.json`,\n async (req, res) => {\n res.end(JSON.stringify(appShellConfig));\n }\n );\n }\n };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/app-shell-vite-plugin",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "AppShell Vite Plugin",
|
|
5
5
|
"author": "Hitachi Vantara - Boba Fett Team",
|
|
6
6
|
"type": "module",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"@types/react-dom": "^18.0.11",
|
|
58
58
|
"tsc-watch": "^6.0.0"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "2ae797c27cfeb6e3a7cf1ee9c254be96a77d679d"
|
|
61
61
|
}
|