mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-02-23 14:39:32 +08:00
breaking(server): remove @lowdefy/server package
This commit is contained in:
parent
9ddf9ebbe0
commit
b13adff101
318
.pnp.js
generated
318
.pnp.js
generated
@ -86,10 +86,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
"name": "@lowdefy/renderer",
|
||||
"reference": "workspace:packages/renderer"
|
||||
},
|
||||
{
|
||||
"name": "@lowdefy/server",
|
||||
"reference": "workspace:packages/server"
|
||||
},
|
||||
{
|
||||
"name": "@lowdefy/server-dev",
|
||||
"reference": "workspace:packages/servers/serverDev"
|
||||
@ -119,7 +115,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@lowdefy/nunjucks", ["workspace:packages/nunjucks"]],
|
||||
["@lowdefy/operators", ["workspace:packages/operators"]],
|
||||
["@lowdefy/renderer", ["workspace:packages/renderer"]],
|
||||
["@lowdefy/server", ["workspace:packages/server"]],
|
||||
["@lowdefy/server-dev", ["workspace:packages/servers/serverDev"]],
|
||||
["@lowdefy/server-docker", ["workspace:packages/servers/serverDocker"]]
|
||||
],
|
||||
@ -4030,38 +4025,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
"linkType": "SOFT",
|
||||
}]
|
||||
]],
|
||||
["@lowdefy/server", [
|
||||
["workspace:packages/server", {
|
||||
"packageLocation": "./packages/server/",
|
||||
"packageDependencies": [
|
||||
["@lowdefy/server", "workspace:packages/server"],
|
||||
["@babel/cli", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:7.12.8"],
|
||||
["@babel/core", "npm:7.12.9"],
|
||||
["@babel/preset-env", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:7.12.7"],
|
||||
["@babel/preset-react", "virtual:22157ea722f8d6428f1fcf0a6f7f6c7d6b902d9c785256c60a65fe6cd0db76ebccc7c1457ee047df0ba6909ff018e300c4f4957a60f5b670089810dfc417af9b#npm:7.12.7"],
|
||||
["@lowdefy/block-tools", "workspace:packages/blockTools"],
|
||||
["@lowdefy/graphql", "workspace:packages/graphql"],
|
||||
["apollo-server-express", "virtual:1e43113c7dc84a5d03308bf7ffaf00574d351ca16282af6c6c0b9576804fb03914bdf2200961292f439926b2e537dce172d7529f79013ce51b9f2d56e9cd836b#npm:2.19.0"],
|
||||
["babel-jest", "virtual:caddf51df4928b33a437ca87b8f5ddfb6205ebd6d8231f74d4ee7223f3866e6f815b221aa1e2bd33e98915f701e95bae72a93d2288b49a34a6246bdbc2a4a132#npm:26.6.3"],
|
||||
["babel-loader", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:8.2.2"],
|
||||
["clean-webpack-plugin", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:3.0.0"],
|
||||
["css-loader", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:5.0.1"],
|
||||
["express", "npm:4.17.1"],
|
||||
["graphql", "npm:15.4.0"],
|
||||
["html-webpack-plugin", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:4.5.0"],
|
||||
["jest", "npm:26.6.3"],
|
||||
["nodemon", "npm:2.0.6"],
|
||||
["react", "npm:17.0.1"],
|
||||
["react-dom", "virtual:22157ea722f8d6428f1fcf0a6f7f6c7d6b902d9c785256c60a65fe6cd0db76ebccc7c1457ee047df0ba6909ff018e300c4f4957a60f5b670089810dfc417af9b#npm:17.0.1"],
|
||||
["style-loader", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:2.0.0"],
|
||||
["webpack", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:5.9.0"],
|
||||
["webpack-cli", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:4.2.0"],
|
||||
["webpack-dev-server", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:3.11.0"],
|
||||
["webpack-merge", "npm:5.4.0"]
|
||||
],
|
||||
"linkType": "SOFT",
|
||||
}]
|
||||
]],
|
||||
["@lowdefy/server-dev", [
|
||||
["workspace:packages/servers/serverDev", {
|
||||
"packageLocation": "./packages/servers/serverDev/",
|
||||
@ -5557,20 +5520,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:690ddc04a766b00b821bcc6ae53875a5d73afe9b476c8215aab3daac215d8d317bb7de5689ea24e9c5d6a47c2584c9fae221e43a5ea46face61c77ca738deda4#npm:1.1.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/@webpack-cli-info-virtual-98ad9f025b/0/cache/@webpack-cli-info-npm-1.1.0-d9d99c1087-798cbdfd54.zip/node_modules/@webpack-cli/info/",
|
||||
"packageDependencies": [
|
||||
["@webpack-cli/info", "virtual:690ddc04a766b00b821bcc6ae53875a5d73afe9b476c8215aab3daac215d8d317bb7de5689ea24e9c5d6a47c2584c9fae221e43a5ea46face61c77ca738deda4#npm:1.1.0"],
|
||||
["@types/webpack-cli", null],
|
||||
["envinfo", "npm:7.7.3"],
|
||||
["webpack-cli", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:4.2.0"]
|
||||
],
|
||||
"packagePeers": [
|
||||
"@types/webpack-cli",
|
||||
"webpack-cli"
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:85aa9731c3de99415dc689ba62edb192d397d48a9078eef77ece27382b707c02851bf2bd56f9b0896f068c76995860a72294dae6a4752d7d47a1891d19c195e2#npm:1.1.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/@webpack-cli-info-virtual-a8af32ae16/0/cache/@webpack-cli-info-npm-1.1.0-d9d99c1087-798cbdfd54.zip/node_modules/@webpack-cli/info/",
|
||||
"packageDependencies": [
|
||||
@ -5731,21 +5680,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:690ddc04a766b00b821bcc6ae53875a5d73afe9b476c8215aab3daac215d8d317bb7de5689ea24e9c5d6a47c2584c9fae221e43a5ea46face61c77ca738deda4#npm:1.1.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/@webpack-cli-serve-virtual-7acd7f8059/0/cache/@webpack-cli-serve-npm-1.1.0-4f0e34ce07-7684766d7d.zip/node_modules/@webpack-cli/serve/",
|
||||
"packageDependencies": [
|
||||
["@webpack-cli/serve", "virtual:690ddc04a766b00b821bcc6ae53875a5d73afe9b476c8215aab3daac215d8d317bb7de5689ea24e9c5d6a47c2584c9fae221e43a5ea46face61c77ca738deda4#npm:1.1.0"],
|
||||
["@types/webpack-cli", null],
|
||||
["webpack-cli", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:4.2.0"],
|
||||
["webpack-dev-server", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:3.11.0"]
|
||||
],
|
||||
"packagePeers": [
|
||||
"@types/webpack-cli",
|
||||
"webpack-cli",
|
||||
"webpack-dev-server"
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:85aa9731c3de99415dc689ba62edb192d397d48a9078eef77ece27382b707c02851bf2bd56f9b0896f068c76995860a72294dae6a4752d7d47a1891d19c195e2#npm:1.1.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/@webpack-cli-serve-virtual-f1203a0d2b/0/cache/@webpack-cli-serve-npm-1.1.0-4f0e34ce07-7684766d7d.zip/node_modules/@webpack-cli/serve/",
|
||||
"packageDependencies": [
|
||||
@ -7333,27 +7267,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
}]
|
||||
]],
|
||||
["babel-loader", [
|
||||
["virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:8.2.2", {
|
||||
"packageLocation": "./.yarn/$$virtual/babel-loader-virtual-5403515e96/0/cache/babel-loader-npm-8.2.2-b4e600c2c5-362bb71573.zip/node_modules/babel-loader/",
|
||||
"packageDependencies": [
|
||||
["babel-loader", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:8.2.2"],
|
||||
["@babel/core", "npm:7.12.9"],
|
||||
["@types/babel__core", null],
|
||||
["@types/webpack", null],
|
||||
["find-cache-dir", "npm:3.3.1"],
|
||||
["loader-utils", "npm:1.4.0"],
|
||||
["make-dir", "npm:3.1.0"],
|
||||
["schema-utils", "npm:2.7.1"],
|
||||
["webpack", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:5.9.0"]
|
||||
],
|
||||
"packagePeers": [
|
||||
"@babel/core",
|
||||
"@types/babel__core",
|
||||
"@types/webpack",
|
||||
"webpack"
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:03b50f68d1bc1bcd2c564b153fc8a0f3f73d722ae5563251798eadf289b054849d6a1f3602228c617458c9af844d044431bcc00bb48aa96b362ca9055e633014#npm:8.2.2", {
|
||||
"packageLocation": "./.yarn/$$virtual/babel-loader-virtual-e186b4a8e5/0/cache/babel-loader-npm-8.2.2-b4e600c2c5-362bb71573.zip/node_modules/babel-loader/",
|
||||
"packageDependencies": [
|
||||
@ -8644,19 +8557,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
}]
|
||||
]],
|
||||
["clean-webpack-plugin", [
|
||||
["virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:3.0.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/clean-webpack-plugin-virtual-43808e0940/0/cache/clean-webpack-plugin-npm-3.0.0-21f4eeb4fb-fc0fbd1c8e.zip/node_modules/clean-webpack-plugin/",
|
||||
"packageDependencies": [
|
||||
["clean-webpack-plugin", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:3.0.0"],
|
||||
["@types/webpack", "npm:4.41.25"],
|
||||
["del", "npm:4.1.1"],
|
||||
["webpack", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:5.9.0"]
|
||||
],
|
||||
"packagePeers": [
|
||||
"webpack"
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:03b50f68d1bc1bcd2c564b153fc8a0f3f73d722ae5563251798eadf289b054849d6a1f3602228c617458c9af844d044431bcc00bb48aa96b362ca9055e633014#npm:3.0.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/clean-webpack-plugin-virtual-5774a1e747/0/cache/clean-webpack-plugin-npm-3.0.0-21f4eeb4fb-fc0fbd1c8e.zip/node_modules/clean-webpack-plugin/",
|
||||
"packageDependencies": [
|
||||
@ -9675,31 +9575,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
}]
|
||||
]],
|
||||
["css-loader", [
|
||||
["virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:5.0.1", {
|
||||
"packageLocation": "./.yarn/$$virtual/css-loader-virtual-62ad8433b3/0/cache/css-loader-npm-5.0.1-d2034d30e0-5c257ac08d.zip/node_modules/css-loader/",
|
||||
"packageDependencies": [
|
||||
["css-loader", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:5.0.1"],
|
||||
["@types/webpack", null],
|
||||
["camelcase", "npm:6.2.0"],
|
||||
["cssesc", "npm:3.0.0"],
|
||||
["icss-utils", "virtual:004f71c08b7f25984eaf7112e8491f5ccf6523e9e5f1da384bce1c54d1c64f35756f2af220c6671f23f782fd6af1018649d1b48a76b56a23094c915a05e1de57#npm:5.1.0"],
|
||||
["loader-utils", "npm:2.0.0"],
|
||||
["postcss", "npm:8.1.10"],
|
||||
["postcss-modules-extract-imports", "virtual:004f71c08b7f25984eaf7112e8491f5ccf6523e9e5f1da384bce1c54d1c64f35756f2af220c6671f23f782fd6af1018649d1b48a76b56a23094c915a05e1de57#npm:3.0.0"],
|
||||
["postcss-modules-local-by-default", "virtual:004f71c08b7f25984eaf7112e8491f5ccf6523e9e5f1da384bce1c54d1c64f35756f2af220c6671f23f782fd6af1018649d1b48a76b56a23094c915a05e1de57#npm:4.0.0"],
|
||||
["postcss-modules-scope", "virtual:004f71c08b7f25984eaf7112e8491f5ccf6523e9e5f1da384bce1c54d1c64f35756f2af220c6671f23f782fd6af1018649d1b48a76b56a23094c915a05e1de57#npm:3.0.0"],
|
||||
["postcss-modules-values", "virtual:004f71c08b7f25984eaf7112e8491f5ccf6523e9e5f1da384bce1c54d1c64f35756f2af220c6671f23f782fd6af1018649d1b48a76b56a23094c915a05e1de57#npm:4.0.0"],
|
||||
["postcss-value-parser", "npm:4.1.0"],
|
||||
["schema-utils", "npm:3.0.0"],
|
||||
["semver", "npm:7.3.2"],
|
||||
["webpack", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:5.9.0"]
|
||||
],
|
||||
"packagePeers": [
|
||||
"@types/webpack",
|
||||
"webpack"
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:03b50f68d1bc1bcd2c564b153fc8a0f3f73d722ae5563251798eadf289b054849d6a1f3602228c617458c9af844d044431bcc00bb48aa96b362ca9055e633014#npm:5.0.1", {
|
||||
"packageLocation": "./.yarn/$$virtual/css-loader-virtual-b19b1eb4dc/0/cache/css-loader-npm-5.0.1-d2034d30e0-5c257ac08d.zip/node_modules/css-loader/",
|
||||
"packageDependencies": [
|
||||
@ -13462,26 +13337,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
}]
|
||||
]],
|
||||
["html-webpack-plugin", [
|
||||
["virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:4.5.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/html-webpack-plugin-virtual-5476d43d01/0/cache/html-webpack-plugin-npm-4.5.0-a74a71941d-df4dd38bd8.zip/node_modules/html-webpack-plugin/",
|
||||
"packageDependencies": [
|
||||
["html-webpack-plugin", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:4.5.0"],
|
||||
["@types/html-minifier-terser", "npm:5.1.1"],
|
||||
["@types/tapable", "npm:1.0.6"],
|
||||
["@types/webpack", "npm:4.41.25"],
|
||||
["html-minifier-terser", "npm:5.1.1"],
|
||||
["loader-utils", "npm:1.4.0"],
|
||||
["lodash", "npm:4.17.20"],
|
||||
["pretty-error", "npm:2.1.2"],
|
||||
["tapable", "npm:1.1.3"],
|
||||
["util.promisify", "npm:1.0.0"],
|
||||
["webpack", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:5.9.0"]
|
||||
],
|
||||
"packagePeers": [
|
||||
"webpack"
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:03b50f68d1bc1bcd2c564b153fc8a0f3f73d722ae5563251798eadf289b054849d6a1f3602228c617458c9af844d044431bcc00bb48aa96b362ca9055e633014#npm:4.5.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/html-webpack-plugin-virtual-330bcf1b96/0/cache/html-webpack-plugin-npm-4.5.0-a74a71941d-df4dd38bd8.zip/node_modules/html-webpack-plugin/",
|
||||
"packageDependencies": [
|
||||
@ -22591,21 +22446,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
}]
|
||||
]],
|
||||
["style-loader", [
|
||||
["virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:2.0.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/style-loader-virtual-caaadebd65/0/cache/style-loader-npm-2.0.0-b9a5c4a2aa-ffc3054882.zip/node_modules/style-loader/",
|
||||
"packageDependencies": [
|
||||
["style-loader", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:2.0.0"],
|
||||
["@types/webpack", null],
|
||||
["loader-utils", "npm:2.0.0"],
|
||||
["schema-utils", "npm:3.0.0"],
|
||||
["webpack", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:5.9.0"]
|
||||
],
|
||||
"packagePeers": [
|
||||
"@types/webpack",
|
||||
"webpack"
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:03b50f68d1bc1bcd2c564b153fc8a0f3f73d722ae5563251798eadf289b054849d6a1f3602228c617458c9af844d044431bcc00bb48aa96b362ca9055e633014#npm:2.0.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/style-loader-virtual-b69052b86e/0/cache/style-loader-npm-2.0.0-b9a5c4a2aa-ffc3054882.zip/node_modules/style-loader/",
|
||||
"packageDependencies": [
|
||||
@ -23045,25 +22885,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:1b5e768b98fb9ddb56637944fd20bf38f30348ff3ea7c4b8efb0d7778b14e38dad025d1b8194b30d93114dfb5749e55274b2e3fdf6c3e63e901dcfb0114526b0#npm:5.0.3", {
|
||||
"packageLocation": "./.yarn/$$virtual/terser-webpack-plugin-virtual-e17c220adc/0/cache/terser-webpack-plugin-npm-5.0.3-df7af3661a-e71ae79f55.zip/node_modules/terser-webpack-plugin/",
|
||||
"packageDependencies": [
|
||||
["terser-webpack-plugin", "virtual:1b5e768b98fb9ddb56637944fd20bf38f30348ff3ea7c4b8efb0d7778b14e38dad025d1b8194b30d93114dfb5749e55274b2e3fdf6c3e63e901dcfb0114526b0#npm:5.0.3"],
|
||||
["@types/webpack", null],
|
||||
["jest-worker", "npm:26.6.2"],
|
||||
["p-limit", "npm:3.1.0"],
|
||||
["schema-utils", "npm:3.0.0"],
|
||||
["serialize-javascript", "npm:5.0.1"],
|
||||
["source-map", "npm:0.6.1"],
|
||||
["terser", "npm:5.5.1"],
|
||||
["webpack", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:5.9.0"]
|
||||
],
|
||||
"packagePeers": [
|
||||
"@types/webpack",
|
||||
"webpack"
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:3487d642df8c3bb042af3818901b278873984231b3660fd317f01260e63120c54672d65e828497967d37d38d5b508e924f7f82eae6b89ba1e6c8d3f6351b5bf1#npm:5.0.3", {
|
||||
"packageLocation": "./.yarn/$$virtual/terser-webpack-plugin-virtual-1b61ec2acc/0/cache/terser-webpack-plugin-npm-5.0.3-df7af3661a-e71ae79f55.zip/node_modules/terser-webpack-plugin/",
|
||||
"packageDependencies": [
|
||||
@ -24426,41 +24247,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
}]
|
||||
]],
|
||||
["webpack", [
|
||||
["virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:5.9.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/webpack-virtual-1b5e768b98/0/cache/webpack-npm-5.9.0-26a5af1b56-8534b14b72.zip/node_modules/webpack/",
|
||||
"packageDependencies": [
|
||||
["webpack", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:5.9.0"],
|
||||
["@types/eslint-scope", "npm:3.7.0"],
|
||||
["@types/estree", "npm:0.0.45"],
|
||||
["@webassemblyjs/ast", "npm:1.9.0"],
|
||||
["@webassemblyjs/helper-module-context", "npm:1.9.0"],
|
||||
["@webassemblyjs/wasm-edit", "npm:1.9.0"],
|
||||
["@webassemblyjs/wasm-parser", "npm:1.9.0"],
|
||||
["acorn", "npm:8.0.4"],
|
||||
["browserslist", "npm:4.14.7"],
|
||||
["chrome-trace-event", "npm:1.0.2"],
|
||||
["enhanced-resolve", "npm:5.3.2"],
|
||||
["eslint-scope", "npm:5.1.1"],
|
||||
["events", "npm:3.2.0"],
|
||||
["glob-to-regexp", "npm:0.4.1"],
|
||||
["graceful-fs", "npm:4.2.4"],
|
||||
["json-parse-better-errors", "npm:1.0.2"],
|
||||
["loader-runner", "npm:4.1.0"],
|
||||
["mime-types", "npm:2.1.27"],
|
||||
["neo-async", "npm:2.6.2"],
|
||||
["pkg-dir", "npm:4.2.0"],
|
||||
["schema-utils", "npm:3.0.0"],
|
||||
["tapable", "npm:2.1.1"],
|
||||
["terser-webpack-plugin", "virtual:1b5e768b98fb9ddb56637944fd20bf38f30348ff3ea7c4b8efb0d7778b14e38dad025d1b8194b30d93114dfb5749e55274b2e3fdf6c3e63e901dcfb0114526b0#npm:5.0.3"],
|
||||
["watchpack", "npm:2.0.1"],
|
||||
["webpack-cli", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:4.2.0"],
|
||||
["webpack-sources", "npm:2.2.0"]
|
||||
],
|
||||
"packagePeers": [
|
||||
"webpack-cli"
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:03b50f68d1bc1bcd2c564b153fc8a0f3f73d722ae5563251798eadf289b054849d6a1f3602228c617458c9af844d044431bcc00bb48aa96b362ca9055e633014#npm:5.9.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/webpack-virtual-8e7937ffc0/0/cache/webpack-npm-5.9.0-26a5af1b56-8534b14b72.zip/node_modules/webpack/",
|
||||
"packageDependencies": [
|
||||
@ -24848,44 +24634,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
}]
|
||||
]],
|
||||
["webpack-cli", [
|
||||
["virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:4.2.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/webpack-cli-virtual-690ddc04a7/0/cache/webpack-cli-npm-4.2.0-70247c2988-eb2f12e13a.zip/node_modules/webpack-cli/",
|
||||
"packageDependencies": [
|
||||
["webpack-cli", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:4.2.0"],
|
||||
["@types/webpack", null],
|
||||
["@webpack-cli/generate-loader", null],
|
||||
["@webpack-cli/generate-plugin", null],
|
||||
["@webpack-cli/info", "virtual:690ddc04a766b00b821bcc6ae53875a5d73afe9b476c8215aab3daac215d8d317bb7de5689ea24e9c5d6a47c2584c9fae221e43a5ea46face61c77ca738deda4#npm:1.1.0"],
|
||||
["@webpack-cli/init", null],
|
||||
["@webpack-cli/migrate", null],
|
||||
["@webpack-cli/serve", "virtual:690ddc04a766b00b821bcc6ae53875a5d73afe9b476c8215aab3daac215d8d317bb7de5689ea24e9c5d6a47c2584c9fae221e43a5ea46face61c77ca738deda4#npm:1.1.0"],
|
||||
["colorette", "npm:1.2.1"],
|
||||
["command-line-usage", "npm:6.1.1"],
|
||||
["commander", "npm:6.2.0"],
|
||||
["enquirer", "npm:2.3.6"],
|
||||
["execa", "npm:4.1.0"],
|
||||
["import-local", "npm:3.0.2"],
|
||||
["interpret", "npm:2.2.0"],
|
||||
["leven", "npm:3.1.0"],
|
||||
["rechoir", "npm:0.7.0"],
|
||||
["v8-compile-cache", "npm:2.2.0"],
|
||||
["webpack", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:5.9.0"],
|
||||
["webpack-bundle-analyzer", null],
|
||||
["webpack-dev-server", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:3.11.0"],
|
||||
["webpack-merge", "npm:4.2.2"]
|
||||
],
|
||||
"packagePeers": [
|
||||
"@types/webpack",
|
||||
"@webpack-cli/generate-loader",
|
||||
"@webpack-cli/generate-plugin",
|
||||
"@webpack-cli/init",
|
||||
"@webpack-cli/migrate",
|
||||
"webpack-bundle-analyzer",
|
||||
"webpack-dev-server",
|
||||
"webpack"
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:03b50f68d1bc1bcd2c564b153fc8a0f3f73d722ae5563251798eadf289b054849d6a1f3602228c617458c9af844d044431bcc00bb48aa96b362ca9055e633014#npm:4.2.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/webpack-cli-virtual-bd38d9569c/0/cache/webpack-cli-npm-4.2.0-70247c2988-eb2f12e13a.zip/node_modules/webpack-cli/",
|
||||
"packageDependencies": [
|
||||
@ -25324,24 +25072,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:6213fedbe680a69d41905621eac4d72dab31256d72879b950182ee6ddbdbcbdf46a4b01254d3ef4986a23c07bf93a39478253b01cff4a98229d46861bd017c21#npm:3.7.2", {
|
||||
"packageLocation": "./.yarn/$$virtual/webpack-dev-middleware-virtual-66eb026764/0/cache/webpack-dev-middleware-npm-3.7.2-4f005aab9a-88480e7d7f.zip/node_modules/webpack-dev-middleware/",
|
||||
"packageDependencies": [
|
||||
["webpack-dev-middleware", "virtual:6213fedbe680a69d41905621eac4d72dab31256d72879b950182ee6ddbdbcbdf46a4b01254d3ef4986a23c07bf93a39478253b01cff4a98229d46861bd017c21#npm:3.7.2"],
|
||||
["@types/webpack", null],
|
||||
["memory-fs", "npm:0.4.1"],
|
||||
["mime", "npm:2.4.6"],
|
||||
["mkdirp", "npm:0.5.5"],
|
||||
["range-parser", "npm:1.2.1"],
|
||||
["webpack", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:5.9.0"],
|
||||
["webpack-log", "npm:2.0.0"]
|
||||
],
|
||||
"packagePeers": [
|
||||
"@types/webpack",
|
||||
"webpack"
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:6f4e2bf1a5eb3ef1b627ee5c9a8e495f9e567df994a6b4b24ea855777427626987d50742a9abc0c99cfa1142168ae2a93199a19fb153b7085c56d0932444a6a0#npm:3.7.2", {
|
||||
"packageLocation": "./.yarn/$$virtual/webpack-dev-middleware-virtual-64ae28144a/0/cache/webpack-dev-middleware-npm-3.7.2-4f005aab9a-88480e7d7f.zip/node_modules/webpack-dev-middleware/",
|
||||
"packageDependencies": [
|
||||
@ -25434,54 +25164,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
}]
|
||||
]],
|
||||
["webpack-dev-server", [
|
||||
["virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:3.11.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/webpack-dev-server-virtual-6213fedbe6/0/cache/webpack-dev-server-npm-3.11.0-42b1303dbc-1d34457456.zip/node_modules/webpack-dev-server/",
|
||||
"packageDependencies": [
|
||||
["webpack-dev-server", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:3.11.0"],
|
||||
["@types/webpack", null],
|
||||
["ansi-html", "npm:0.0.7"],
|
||||
["bonjour", "npm:3.5.0"],
|
||||
["chokidar", "npm:2.1.8"],
|
||||
["compression", "npm:1.7.4"],
|
||||
["connect-history-api-fallback", "npm:1.6.0"],
|
||||
["debug", "virtual:e5ed5cc3bed29b8588dada2d99a7d1aa8a0b5595798b084f82e905d974cca7178eed57b0c50c8f819f591c83e85d87a7ff9c2676bcf2271b7e0618c976a62473#npm:4.3.1"],
|
||||
["del", "npm:4.1.1"],
|
||||
["express", "npm:4.17.1"],
|
||||
["html-entities", "npm:1.3.1"],
|
||||
["http-proxy-middleware", "npm:0.19.1"],
|
||||
["import-local", "npm:2.0.0"],
|
||||
["internal-ip", "npm:4.3.0"],
|
||||
["ip", "npm:1.1.5"],
|
||||
["is-absolute-url", "npm:3.0.3"],
|
||||
["killable", "npm:1.0.1"],
|
||||
["loglevel", "npm:1.7.1"],
|
||||
["opn", "npm:5.5.0"],
|
||||
["p-retry", "npm:3.0.1"],
|
||||
["portfinder", "npm:1.0.28"],
|
||||
["schema-utils", "npm:1.0.0"],
|
||||
["selfsigned", "npm:1.10.8"],
|
||||
["semver", "npm:6.3.0"],
|
||||
["serve-index", "npm:1.9.1"],
|
||||
["sockjs", "npm:0.3.20"],
|
||||
["sockjs-client", "npm:1.4.0"],
|
||||
["spdy", "npm:4.0.2"],
|
||||
["strip-ansi", "npm:3.0.1"],
|
||||
["supports-color", "npm:6.1.0"],
|
||||
["url", "npm:0.11.0"],
|
||||
["webpack", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:5.9.0"],
|
||||
["webpack-cli", "virtual:003bebd8b7a948d12b44e2c11a621884feb1891eea3645171e827971487f79396db9f7422bc411ccf3f90877e94ec86f5c3da70b96efb5daddb2ee3b35eae5c6#npm:4.2.0"],
|
||||
["webpack-dev-middleware", "virtual:6213fedbe680a69d41905621eac4d72dab31256d72879b950182ee6ddbdbcbdf46a4b01254d3ef4986a23c07bf93a39478253b01cff4a98229d46861bd017c21#npm:3.7.2"],
|
||||
["webpack-log", "npm:2.0.0"],
|
||||
["ws", "npm:6.2.1"],
|
||||
["yargs", "npm:13.3.2"]
|
||||
],
|
||||
"packagePeers": [
|
||||
"@types/webpack",
|
||||
"webpack-cli",
|
||||
"webpack"
|
||||
],
|
||||
"linkType": "HARD",
|
||||
}],
|
||||
["virtual:03b50f68d1bc1bcd2c564b153fc8a0f3f73d722ae5563251798eadf289b054849d6a1f3602228c617458c9af844d044431bcc00bb48aa96b362ca9055e633014#npm:3.11.0", {
|
||||
"packageLocation": "./.yarn/$$virtual/webpack-dev-server-virtual-c861a49ddd/0/cache/webpack-dev-server-npm-3.11.0-42b1303dbc-1d34457456.zip/node_modules/webpack-dev-server/",
|
||||
"packageDependencies": [
|
||||
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"targets": {
|
||||
"node": "12",
|
||||
"esmodules": true
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"ignore": ["./src/shell"]
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
FROM node:14-alpine
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
|
||||
|
||||
WORKDIR /home/node/app
|
||||
|
||||
COPY package.json ./
|
||||
|
||||
USER node
|
||||
|
||||
RUN npm install --only=production
|
||||
|
||||
COPY --chown=node:node ./dist ./dist
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "./dist/server.js"]
|
@ -1,11 +0,0 @@
|
||||
module.exports = {
|
||||
clearMocks: true,
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: ['src/**/*.js'],
|
||||
coverageDirectory: 'coverage',
|
||||
coveragePathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/test/', '<rootDir>/src/shell/'],
|
||||
coverageReporters: [['lcov', { projectRoot: '../..' }], 'text', 'clover'],
|
||||
errorOnDeprecated: true,
|
||||
testEnvironment: 'node',
|
||||
testPathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/.lowdefy/'],
|
||||
};
|
@ -1,72 +0,0 @@
|
||||
{
|
||||
"name": "@lowdefy/server",
|
||||
"version": "0.0.0-alpha.5",
|
||||
"license": "Apache-2.0",
|
||||
"description": "",
|
||||
"homepage": "https://lowdefy.com",
|
||||
"bugs": {
|
||||
"url": "https://github.com/lowdefy/lowdefy/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Sam Tolmay",
|
||||
"url": "https://github.com/SamTolmay"
|
||||
},
|
||||
{
|
||||
"name": "Gerrie van Wyk",
|
||||
"url": "https://github.com/Gervwyk"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/lowdefy/lowdefy.git"
|
||||
},
|
||||
"files": [
|
||||
"dist/*"
|
||||
],
|
||||
"scripts": {
|
||||
"babel": "babel src --out-dir dist",
|
||||
"babel:dev": "babel src --out-dir dev",
|
||||
"build": "yarn webpack && yarn babel",
|
||||
"build:dev": "yarn webpack:dev && yarn babel:dev",
|
||||
"build:docker": "docker build --tag lowdefy/lowdefy .",
|
||||
"clean": "rm -rf dist && rm -rf dev",
|
||||
"npm-publish": "npm publish --access public",
|
||||
"prepublishOnly": "yarn build",
|
||||
"start": "nodemon dev/server.js",
|
||||
"test": "jest --coverage",
|
||||
"version:prerelease": "yarn version prerelease",
|
||||
"version:patch": "yarn version patch -d",
|
||||
"version:minor": "yarn version minor -d",
|
||||
"version:major": "yarn version major -d",
|
||||
"webpack": "webpack --config webpack.prod.js",
|
||||
"webpack:dev": "webpack --config webpack.dev.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lowdefy/block-tools": "1.0.3",
|
||||
"@lowdefy/graphql": "0.0.0-alpha.5",
|
||||
"apollo-server-express": "2.19.0",
|
||||
"express": "4.17.1",
|
||||
"graphql": "15.4.0",
|
||||
"react": "17.0.1",
|
||||
"react-dom": "17.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.12.8",
|
||||
"@babel/core": "7.12.9",
|
||||
"@babel/preset-env": "7.12.7",
|
||||
"@babel/preset-react": "7.12.7",
|
||||
"babel-jest": "26.6.3",
|
||||
"babel-loader": "8.2.2",
|
||||
"clean-webpack-plugin": "3.0.0",
|
||||
"css-loader": "5.0.1",
|
||||
"html-webpack-plugin": "4.5.0",
|
||||
"jest": "26.6.3",
|
||||
"nodemon": "2.0.6",
|
||||
"style-loader": "2.0.0",
|
||||
"webpack": "5.9.0",
|
||||
"webpack-cli": "4.2.0",
|
||||
"webpack-dev-server": "3.11.0",
|
||||
"webpack-merge": "5.4.0"
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
function createGetSecretsFromEnv() {
|
||||
const secrets = {};
|
||||
|
||||
Object.keys(process.env).forEach((key) => {
|
||||
if (key.startsWith('LOWDEFY_SECRET_')) {
|
||||
secrets[key.replace('LOWDEFY_SECRET_', '')] = process.env[key];
|
||||
}
|
||||
});
|
||||
Object.freeze(secrets);
|
||||
return () => secrets;
|
||||
}
|
||||
|
||||
export default createGetSecretsFromEnv;
|
@ -1,45 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import express from 'express';
|
||||
import { ApolloServer } from 'apollo-server-express';
|
||||
import { typeDefs, resolvers, createContext } from '@lowdefy/graphql';
|
||||
|
||||
import createGetSecretsFromEnv from './createGetSecretsFromEnv';
|
||||
|
||||
const config = {
|
||||
CONFIGURATION_BASE_PATH: path.resolve(process.cwd(), './.lowdefy/build'),
|
||||
logger: console,
|
||||
getSecrets: createGetSecretsFromEnv(),
|
||||
};
|
||||
|
||||
const context = createContext(config);
|
||||
const server = new ApolloServer({ typeDefs, resolvers, context });
|
||||
const app = express();
|
||||
|
||||
server.applyMiddleware({ app, path: '/api/graphql' });
|
||||
|
||||
// Serve Webpack shell files from './shell/dist'
|
||||
app.use(express.static('dist/shell'));
|
||||
|
||||
// Redirect all 404 to index.html with status 200
|
||||
// This should always be the last route
|
||||
app.use((req, res) => {
|
||||
res.sendFile(path.resolve(process.cwd(), 'dist/shell/index.html'));
|
||||
});
|
||||
|
||||
app.listen({ port: 3000 }, () => console.log(`🚀 Server ready at http://localhost:3000`));
|
33
packages/server/src/shell/bootstrap.js
vendored
33
packages/server/src/shell/bootstrap.js
vendored
@ -1,33 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*global __webpack_share_scopes__, __webpack_init_sharing__*/
|
||||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Loading } from '@lowdefy/block-tools';
|
||||
|
||||
const Renderer = React.lazy(() => import('lowdefy_renderer/Renderer'));
|
||||
|
||||
function Shell() {
|
||||
return (
|
||||
<React.Suspense fallback={<Loading type="Spinner" properties={{ height: '100vh' }} />}>
|
||||
<Renderer />
|
||||
</React.Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
ReactDOM.render(<Shell />, document.getElementById('root'));
|
@ -1,28 +0,0 @@
|
||||
<!--
|
||||
Copyright 2020 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License. -->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Lowdefy App</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="emotion"></div>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
@ -1,17 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import('./bootstrap');
|
@ -1,90 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import createGetSecretsFromEnv from '../src/createGetSecretsFromEnv';
|
||||
|
||||
const realEnv = process.env;
|
||||
|
||||
afterEach(() => {
|
||||
process.env = realEnv;
|
||||
});
|
||||
|
||||
test('Get secret from env', () => {
|
||||
process.env = {
|
||||
LOWDEFY_SECRET_TEST: 'supersecret',
|
||||
};
|
||||
const getSecrets = createGetSecretsFromEnv();
|
||||
expect(getSecrets()).toEqual({
|
||||
TEST: 'supersecret',
|
||||
});
|
||||
});
|
||||
|
||||
test('Get multiple secrets from env, ignore other env variable', () => {
|
||||
process.env = {
|
||||
LOWDEFY_SECRET_TEST_1: 'supersecret1',
|
||||
LOWDEFY_SECRET_TEST_2: 'supersecret2',
|
||||
OTHER_VAR: 'other',
|
||||
ANOTHER_VAR: 'another',
|
||||
ASDF_GHJK: 'asdfghjk',
|
||||
};
|
||||
const getSecrets = createGetSecretsFromEnv();
|
||||
expect(getSecrets()).toEqual({
|
||||
TEST_1: 'supersecret1',
|
||||
TEST_2: 'supersecret2',
|
||||
});
|
||||
});
|
||||
|
||||
test('Only replace first occurrence of "LOWDEFY_SECRET_"', () => {
|
||||
process.env = {
|
||||
LOWDEFY_SECRET_LOWDEFY_SECRET_TEST: 'supersecret',
|
||||
};
|
||||
const getSecrets = createGetSecretsFromEnv();
|
||||
expect(getSecrets()).toEqual({
|
||||
LOWDEFY_SECRET_TEST: 'supersecret',
|
||||
});
|
||||
});
|
||||
|
||||
test('Return an empty object if no secrets', () => {
|
||||
process.env = {
|
||||
OTHER_VAR: 'other',
|
||||
ANOTHER_VAR: 'another',
|
||||
ASDF_GHJK: 'asdfghjk',
|
||||
};
|
||||
const getSecrets = createGetSecretsFromEnv();
|
||||
expect(getSecrets()).toEqual({});
|
||||
});
|
||||
|
||||
test('Return the same object', () => {
|
||||
process.env = {
|
||||
LOWDEFY_SECRET_TEST: 'supersecret',
|
||||
};
|
||||
const getSecrets = createGetSecretsFromEnv();
|
||||
expect(getSecrets()).toBe(getSecrets());
|
||||
});
|
||||
|
||||
test('Secrets are immutable', () => {
|
||||
process.env = {
|
||||
LOWDEFY_SECRET_TEST: 'supersecret',
|
||||
};
|
||||
const getSecrets = createGetSecretsFromEnv();
|
||||
const secrets = getSecrets();
|
||||
expect(secrets).toEqual({
|
||||
TEST: 'supersecret',
|
||||
});
|
||||
expect(() => {
|
||||
secrets.test = 'changed';
|
||||
}).toThrow(TypeError);
|
||||
});
|
@ -1,36 +0,0 @@
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: './src/shell/index',
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
loader: 'babel-loader',
|
||||
exclude: /node_modules/,
|
||||
options: {
|
||||
babelrc: false,
|
||||
presets: ['@babel/preset-react'],
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'style-loader',
|
||||
},
|
||||
{
|
||||
loader: 'css-loader', // translates CSS into CommonJS
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new CleanWebpackPlugin(),
|
||||
new HtmlWebpackPlugin({
|
||||
template: './src/shell/index.html',
|
||||
}),
|
||||
],
|
||||
};
|
@ -1,39 +0,0 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const { merge } = require('webpack-merge');
|
||||
const { ModuleFederationPlugin } = require('webpack').container;
|
||||
|
||||
const common = require('./webpack.common.js');
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'development',
|
||||
devtool: 'eval-source-map',
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dev/shell'),
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('development'),
|
||||
}),
|
||||
new ModuleFederationPlugin({
|
||||
name: 'lowdefy_web_shell',
|
||||
shared: {
|
||||
...packageJson.dependencies,
|
||||
react: {
|
||||
singleton: true, // only a single version of the shared module is allowed
|
||||
requiredVersion: '~17.0.0',
|
||||
version: packageJson.dependencies.react,
|
||||
},
|
||||
'react-dom': {
|
||||
singleton: true, // only a single version of the shared module is allowed
|
||||
requiredVersion: '~17.0.0',
|
||||
version: packageJson.dependencies['react-dom'],
|
||||
},
|
||||
},
|
||||
remotes: {
|
||||
lowdefy_renderer: `lowdefy_renderer@http://localhost:3001/remoteEntry.js`,
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
@ -1,38 +0,0 @@
|
||||
const path = require('path');
|
||||
const { merge } = require('webpack-merge');
|
||||
const webpack = require('webpack');
|
||||
const { ModuleFederationPlugin } = require('webpack').container;
|
||||
|
||||
const common = require('./webpack.common.js');
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist/shell'),
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||
}),
|
||||
new ModuleFederationPlugin({
|
||||
name: 'lowdefy_web_shell',
|
||||
shared: {
|
||||
...packageJson.dependencies,
|
||||
react: {
|
||||
singleton: true, // only a single version of the shared module is allowed
|
||||
requiredVersion: '~17.0.0',
|
||||
version: packageJson.dependencies.react,
|
||||
},
|
||||
'react-dom': {
|
||||
singleton: true, // only a single version of the shared module is allowed
|
||||
requiredVersion: '~17.0.0',
|
||||
version: packageJson.dependencies['react-dom'],
|
||||
},
|
||||
},
|
||||
remotes: {
|
||||
lowdefy_renderer: `lowdefy_renderer@https://unpkg.com/@lowdefy/renderer@${packageJson.version}/dist/remoteEntry.js`,
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
30
yarn.lock
30
yarn.lock
@ -3212,36 +3212,6 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@lowdefy/server@workspace:packages/server":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@lowdefy/server@workspace:packages/server"
|
||||
dependencies:
|
||||
"@babel/cli": 7.12.8
|
||||
"@babel/core": 7.12.9
|
||||
"@babel/preset-env": 7.12.7
|
||||
"@babel/preset-react": 7.12.7
|
||||
"@lowdefy/block-tools": 1.0.3
|
||||
"@lowdefy/graphql": 0.0.0-alpha.5
|
||||
apollo-server-express: 2.19.0
|
||||
babel-jest: 26.6.3
|
||||
babel-loader: 8.2.2
|
||||
clean-webpack-plugin: 3.0.0
|
||||
css-loader: 5.0.1
|
||||
express: 4.17.1
|
||||
graphql: 15.4.0
|
||||
html-webpack-plugin: 4.5.0
|
||||
jest: 26.6.3
|
||||
nodemon: 2.0.6
|
||||
react: 17.0.1
|
||||
react-dom: 17.0.1
|
||||
style-loader: 2.0.0
|
||||
webpack: 5.9.0
|
||||
webpack-cli: 4.2.0
|
||||
webpack-dev-server: 3.11.0
|
||||
webpack-merge: 5.4.0
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@mrmlnc/readdir-enhanced@npm:^2.2.1":
|
||||
version: 2.2.1
|
||||
resolution: "@mrmlnc/readdir-enhanced@npm:2.2.1"
|
||||
|
Loading…
Reference in New Issue
Block a user