diff --git a/packages/subapp-server/package.json b/packages/subapp-server/package.json index 856000c52..62e479604 100644 --- a/packages/subapp-server/package.json +++ b/packages/subapp-server/package.json @@ -30,6 +30,7 @@ "@hapi/boom": "^7.4.1", "@xarc/index-page": "^1.0.0", "@xarc/jsx-renderer": "^1.0.0", + "@xarc/tag-renderer": "^1.0.0", "filter-scan-dir": "^1.0.9", "http-status-codes": "^1.3.0", "optional-require": "^1.0.0", @@ -51,7 +52,8 @@ "dependencies": { "@xarc/index-page": "../xarc-index-page", "subapp-util": "../subapp-util", - "@xarc/jsx-renderer": "../xarc-jsx-renderer" + "@xarc/jsx-renderer": "../xarc-jsx-renderer", + "@xarc/tag-renderer": "../xarc-tag-renderer" } }, "nyc": { diff --git a/packages/xarc-jsx-renderer/package.json b/packages/xarc-jsx-renderer/package.json index 581404eba..925dc4510 100644 --- a/packages/xarc-jsx-renderer/package.json +++ b/packages/xarc-jsx-renderer/package.json @@ -106,8 +106,7 @@ }, "fyn": { "dependencies": { - "@xarc/render-context": "../xarc-render-context", - "xaa": "../../../xaa" + "@xarc/render-context": "../xarc-render-context" }, "devDependencies": {} } diff --git a/samples/poc-subapp-min/config/default.js b/samples/poc-subapp-min/config/default.js index 676b80e1d..7c085cacb 100644 --- a/samples/poc-subapp-min/config/default.js +++ b/samples/poc-subapp-min/config/default.js @@ -10,19 +10,9 @@ const portFromEnv = () => { module.exports = { plugins: { - "webpack-dev": { - module: "@xarc/app-dev/lib/webpack-dev-hapi", + "@xarc/app-dev": { enable: process.env.WEBPACK_DEV === "true" }, - inert: { - enable: true - }, - electrodeStaticPaths: { - enable: true, - options: { - pathPrefix: "dist" - } - }, "subapp-server": { options: { insertTokenIds: true } } }, connections: { diff --git a/samples/poc-subapp-min/src/server/index.js b/samples/poc-subapp-min/src/server/index.js index 72b226407..a4741e354 100644 --- a/samples/poc-subapp-min/src/server/index.js +++ b/samples/poc-subapp-min/src/server/index.js @@ -10,8 +10,7 @@ const electrodeConfippet = require("electrode-confippet"); const support = require("@xarc/app/support"); // -const staticPathsDecor = require("electrode-static-paths"); -const electrodeServer = require("electrode-server"); +const electrodeServer = require("@xarc/fastify-server"); // // sample to show electrode server startup events @@ -28,9 +27,8 @@ function setupElectrodeServerEvents(emitter) { } const startServer = config => { - const decor = staticPathsDecor(); if (!config.listener) config.listener = setupElectrodeServerEvents; - return electrodeServer(config, [decor]); + return electrodeServer(config, []); }; // diff --git a/samples/poc-subapp-pbx/config/default.js b/samples/poc-subapp-pbx/config/default.js index 24fbf2e30..125ee2878 100644 --- a/samples/poc-subapp-pbx/config/default.js +++ b/samples/poc-subapp-pbx/config/default.js @@ -13,15 +13,6 @@ module.exports = { "@xarc/app-dev": { enable: process.env.WEBPACK_DEV === "true" }, - inert: { - enable: true - }, - electrodeStaticPaths: { - enable: true, - options: { - pathPrefix: "dist" - } - }, "subapp-server": { options: { cdn: { enable: true }, insertTokenIds: true } } }, connections: { diff --git a/samples/poc-subapp-pbx/package.json b/samples/poc-subapp-pbx/package.json index 3355996d5..81aaa8bb0 100644 --- a/samples/poc-subapp-pbx/package.json +++ b/samples/poc-subapp-pbx/package.json @@ -33,11 +33,12 @@ "build": "clap build" }, "dependencies": { - "@hapi/inert": "^5.2.2", - "@xarc/app": "^6.3.0", + + "@xarc/app": "^8.1.6", + "@xarc/app-dev": "^8.1.6", + "@xarc/fastify-server": "^2.0.0", "electrode-confippet": "^1.5.0", - "electrode-server": "^3.0.0", - "electrode-static-paths": "^3.0.0", + "electrode-archetype-opt-sass": "^2.0.0", "preact": "^10.1.1", "preact-render-to-string": "^5.1.3", "redux": "^4.0.4", @@ -48,7 +49,7 @@ "xaa": "^1.3.1" }, "devDependencies": { - "@xarc/app-dev": "^6.3.0", + "@xarc/app-dev": "^8.1.6", "electrode-archetype-opt-sass": "^2.0.0", "prettier": "^1.19.1", "tachyons-sass": "^4.9.5" diff --git a/samples/poc-subapp-pbx/src/server/index.js b/samples/poc-subapp-pbx/src/server/index.js index fdb6c95da..2353a3110 100644 --- a/samples/poc-subapp-pbx/src/server/index.js +++ b/samples/poc-subapp-pbx/src/server/index.js @@ -1,6 +1,5 @@ "use strict"; -const xaa = require("xaa"); /* eslint-disable global-require */ process.on("SIGINT", () => { @@ -9,10 +8,10 @@ process.on("SIGINT", () => { const electrodeConfippet = require("electrode-confippet"); const support = require("@xarc/app/support"); +const xaa = require("xaa"); // -const staticPathsDecor = require("electrode-static-paths"); -const electrodeServer = require("electrode-server"); +const electrodeServer = require("@xarc/fastify-server"); // // sample to show electrode server startup events @@ -29,32 +28,21 @@ function setupElectrodeServerEvents(emitter) { } const startServer = config => { - const decor = staticPathsDecor(); - if (!config.listener) config.listener = setupElectrodeServerEvents; - return electrodeServer(config, [decor]); + if (!config.listener) { + config.listener = setupElectrodeServerEvents; + } + + const server = electrodeServer(config, []); + return server; }; // module.exports = async () => { - await support.load(); // loads runtime support - - try { - const config = electrodeConfippet.config; - const server = await startServer(config); - server.route({ - path: "/api/{delay}", - method: "get", - async handler(request, h) { - const delay = Number(request.params.delay); - await xaa.delay(delay); - return `hello ${request.query.msg} - delay ${delay}`; - } - }); - } catch (err) { - console.log("start server failed -", err.message); // eslint-disable-line - process.exit(1); - } + await support.load(); + const config = electrodeConfippet.config; + const server = await startServer(config); + return server; }; if (require.main === module) { diff --git a/samples/poc-subapp-pmin/config/default.js b/samples/poc-subapp-pmin/config/default.js index 6970bb7d9..7c085cacb 100644 --- a/samples/poc-subapp-pmin/config/default.js +++ b/samples/poc-subapp-pmin/config/default.js @@ -13,15 +13,6 @@ module.exports = { "@xarc/app-dev": { enable: process.env.WEBPACK_DEV === "true" }, - inert: { - enable: true - }, - electrodeStaticPaths: { - enable: true, - options: { - pathPrefix: "dist" - } - }, "subapp-server": { options: { insertTokenIds: true } } }, connections: { diff --git a/samples/poc-subapp-pmin/package.json b/samples/poc-subapp-pmin/package.json index dfd7d005e..1708a58f4 100644 --- a/samples/poc-subapp-pmin/package.json +++ b/samples/poc-subapp-pmin/package.json @@ -33,11 +33,11 @@ "build": "clap build" }, "dependencies": { - "@hapi/inert": "^5.2.2", - "@xarc/app": "^6.3.0", + "@xarc/app": "^8.1.6", + "@xarc/app-dev": "^8.1.6", + "@xarc/fastify-server": "^2.0.0", "electrode-confippet": "^1.5.0", "electrode-server": "^3.0.0", - "electrode-static-paths": "^3.0.0", "preact": "^10.1.1", "preact-render-to-string": "^5.1.3", "redux": "^4.0.4", @@ -47,22 +47,17 @@ "subapp-server": "../../packages/subapp-server" }, "devDependencies": { - "@xarc/app-dev": "^6.3.0", - "electrode-archetype-opt-less": "../../packages/electrode-archetype-opt-less", - "electrode-archetype-opt-sass": "../../packages/electrode-archetype-opt-sass", - "electrode-archetype-opt-stylus": "../../packages/electrode-archetype-opt-stylus", - "tachyons-sass": "^4.9.5" + "@xarc/app-dev": "^8.1.6", + "tachyons-sass": "^4.9.5", + "electrode-archetype-opt-sass": "../../packages/electrode-archetype-opt-sass", + "electrode-archetype-opt-stylus": "../../packages/electrode-archetype-opt-stylus" }, "fyn": { "dependencies": { - "@xarc/app": "../../packages/xarc-app", - "electrode-archetype-opt-preact": "../../packages/electrode-archetype-opt-preact" + "@xarc/app": "../../packages/xarc-app" }, "devDependencies": { - "@xarc/app-dev": "../../packages/xarc-app-dev", - "electrode-archetype-opt-less": "../../packages/electrode-archetype-opt-less", - "electrode-archetype-opt-sass": "../../packages/electrode-archetype-opt-sass", - "electrode-archetype-opt-stylus": "../../packages/electrode-archetype-opt-stylus" + "@xarc/app-dev": "../../packages/xarc-app-dev" } }, "optionalDependencies": {} diff --git a/samples/poc-subapp-pmin/src/server/index.js b/samples/poc-subapp-pmin/src/server/index.js index 72b226407..a4741e354 100644 --- a/samples/poc-subapp-pmin/src/server/index.js +++ b/samples/poc-subapp-pmin/src/server/index.js @@ -10,8 +10,7 @@ const electrodeConfippet = require("electrode-confippet"); const support = require("@xarc/app/support"); // -const staticPathsDecor = require("electrode-static-paths"); -const electrodeServer = require("electrode-server"); +const electrodeServer = require("@xarc/fastify-server"); // // sample to show electrode server startup events @@ -28,9 +27,8 @@ function setupElectrodeServerEvents(emitter) { } const startServer = config => { - const decor = staticPathsDecor(); if (!config.listener) config.listener = setupElectrodeServerEvents; - return electrodeServer(config, [decor]); + return electrodeServer(config, []); }; // diff --git a/samples/poc-subapp/package.json b/samples/poc-subapp/package.json index b511f84e3..615eb5df4 100644 --- a/samples/poc-subapp/package.json +++ b/samples/poc-subapp/package.json @@ -34,11 +34,10 @@ "test": "clap check", "build": "clap build" }, - "dependencies": { + "dependencies": { "@xarc/app": "^8.1.6", "@xarc/app-dev": "^8.1.6", "@xarc/fastify-server": "^2.0.0", - "electrode-archetype-opt-react": "^3.0.0", "electrode-confippet": "^1.5.0", "react": "^16.13.1", "react-async-ssr": "^0.7.2", @@ -52,24 +51,16 @@ "subapp-server": "^1.2.4", "subapp-web": "^1.0.30" }, - "devDependencies": { - "@xarc/app-dev": "^8.1.6", - "electrode-archetype-opt-eslint": "^2.0.0", - "electrode-archetype-opt-jest": "^25.0.0" - }, + "devDependencies":{ + "@xarc/app-dev": "^8.1.6" + }, "fyn": { "dependencies": { "@xarc/app": "../../packages/xarc-app", - "electrode-archetype-opt-react": "../../packages/electrode-archetype-opt-react", "subapp-react": "../../packages/subapp-react", "subapp-redux": "../../packages/subapp-redux", "subapp-server": "../../packages/subapp-server", "subapp-web": "../../packages/subapp-web" - }, - "devDependencies": { - "@xarc/app-dev": "../../packages/xarc-app-dev", - "electrode-archetype-opt-eslint": "../../packages/electrode-archetype-opt-eslint", - "electrode-archetype-opt-jest": "../../packages/electrode-archetype-opt-jest" } }, "prettier": {