diff --git a/.pnp.js b/.pnp.js index 0cdefb172..bccb337c7 100755 --- a/.pnp.js +++ b/.pnp.js @@ -4973,7 +4973,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@babel/preset-env", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:7.12.1"], ["@babel/preset-react", "virtual:22157ea722f8d6428f1fcf0a6f7f6c7d6b902d9c785256c60a65fe6cd0db76ebccc7c1457ee047df0ba6909ff018e300c4f4957a60f5b670089810dfc417af9b#npm:7.12.1"], ["@lowdefy/helpers", "workspace:packages/helpers"], - ["@lowdefy/type", "npm:1.0.1"], ["babel-jest", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:26.5.2"], ["babel-loader", "virtual:22157ea722f8d6428f1fcf0a6f7f6c7d6b902d9c785256c60a65fe6cd0db76ebccc7c1457ee047df0ba6909ff018e300c4f4957a60f5b670089810dfc417af9b#npm:8.1.0"], ["babel-plugin-import", "npm:1.13.1"], @@ -5011,7 +5010,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@babel/cli", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:7.12.1"], ["@babel/core", "npm:7.12.1"], ["@babel/preset-env", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:7.12.1"], - ["@lowdefy/type", "npm:1.0.0"], ["babel-jest", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:26.5.2"], ["jest", "npm:26.5.3"], ["tinycolor2", "npm:1.4.2"] @@ -5019,17 +5017,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "SOFT", }] ]], - ["@lowdefy/delete", [ - ["npm:1.0.1", { - "packageLocation": "./.yarn/cache/@lowdefy-delete-npm-1.0.1-437b8f32d8-fee9d86f52.zip/node_modules/@lowdefy/delete/", - "packageDependencies": [ - ["@lowdefy/delete", "npm:1.0.1"], - ["@lowdefy/get", "npm:1.0.1"], - ["@lowdefy/type", "npm:1.0.1"] - ], - "linkType": "HARD", - }] - ]], ["@lowdefy/engine", [ ["workspace:packages/engine", { "packageLocation": "./packages/engine/", @@ -5038,13 +5025,8 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@babel/cli", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:7.12.1"], ["@babel/core", "npm:7.12.1"], ["@babel/preset-env", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:7.12.1"], - ["@lowdefy/delete", "npm:1.0.1"], - ["@lowdefy/get", "npm:1.0.1"], ["@lowdefy/helpers", "workspace:packages/helpers"], ["@lowdefy/operators", "workspace:packages/operators"], - ["@lowdefy/serializer", "npm:1.0.0"], - ["@lowdefy/set", "npm:1.0.1"], - ["@lowdefy/type", "npm:1.0.1"], ["babel-jest", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:26.5.2"], ["graphql", "npm:15.3.0"], ["graphql-tag", "virtual:90d4a72924f341713b457eb175224e1ec0cb1cc17fae57e4425352a06b7bd1badc2992c0aaf430411c746462d51ce4afd9da56feea73b62dad7f9bec3f6bc226#npm:2.11.0"], @@ -5096,16 +5078,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "SOFT", }] ]], - ["@lowdefy/get", [ - ["npm:1.0.1", { - "packageLocation": "./.yarn/cache/@lowdefy-get-npm-1.0.1-5bc3405973-6f66955a79.zip/node_modules/@lowdefy/get/", - "packageDependencies": [ - ["@lowdefy/get", "npm:1.0.1"], - ["@lowdefy/type", "npm:1.0.1"] - ], - "linkType": "HARD", - }] - ]], ["@lowdefy/graphql", [ ["workspace:packages/graphql", { "packageLocation": "./packages/graphql/", @@ -5114,8 +5086,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@babel/cli", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:7.12.1"], ["@babel/core", "npm:7.12.1"], ["@babel/preset-env", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:7.12.1"], - ["@lowdefy/get", "npm:1.0.1"], - ["@lowdefy/type", "npm:1.0.1"], + ["@lowdefy/helpers", "workspace:packages/helpers"], ["apollo-server", "virtual:7fa6405098723f150ab741c1e73c906de11a676b4cc641bac8b3397ea2dd6efbb913e72a780932220533241b442cc586b41b26c7b5ac786de486992cd2db054c#npm:2.18.2"], ["apollo-server-testing", "virtual:7fa6405098723f150ab741c1e73c906de11a676b4cc641bac8b3397ea2dd6efbb913e72a780932220533241b442cc586b41b26c7b5ac786de486992cd2db054c#npm:2.18.2"], ["babel-jest", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:26.5.2"], @@ -5157,7 +5128,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@babel/preset-env", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:7.12.1"], ["@babel/preset-react", "virtual:22157ea722f8d6428f1fcf0a6f7f6c7d6b902d9c785256c60a65fe6cd0db76ebccc7c1457ee047df0ba6909ff018e300c4f4957a60f5b670089810dfc417af9b#npm:7.12.1"], ["@lowdefy/block-tools", "workspace:packages/blockTools"], - ["@lowdefy/type", "npm:1.0.1"], + ["@lowdefy/helpers", "workspace:packages/helpers"], ["antd", "virtual:54dfdd95092c538917b1daf717721dd3beca716f0768958f8123e1439693d909b26a74c88b3fb65b402559e626be2accab32554fb8a3874e699047fe18793f5e#npm:4.4.2"], ["babel-jest", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:26.5.2"], ["babel-loader", "virtual:54dfdd95092c538917b1daf717721dd3beca716f0768958f8123e1439693d909b26a74c88b3fb65b402559e626be2accab32554fb8a3874e699047fe18793f5e#npm:8.1.0"], @@ -5214,7 +5185,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@babel/cli", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:7.12.1"], ["@babel/core", "npm:7.12.1"], ["@babel/preset-env", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:7.12.1"], - ["@lowdefy/type", "npm:1.0.1"], + ["@lowdefy/helpers", "workspace:packages/helpers"], ["babel-jest", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:26.5.2"], ["jest", "npm:26.5.3"], ["nunjucks", "npm:3.2.2"], @@ -5231,11 +5202,8 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@babel/cli", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:7.12.1"], ["@babel/core", "npm:7.12.1"], ["@babel/preset-env", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:7.12.1"], - ["@lowdefy/get", "npm:1.0.1"], ["@lowdefy/helpers", "workspace:packages/helpers"], ["@lowdefy/nunjucks", "workspace:packages/nunjucks"], - ["@lowdefy/serializer", "npm:1.0.0"], - ["@lowdefy/type", "npm:1.0.1"], ["babel-jest", "virtual:4a7337632ff6e9ee5a1c45a62a9ff4cc325a9367b21424babda93e269fe01b671e885bc41bdeebafb83c81f2a8eebbf0102043354a4e58905f61c8c3387cda1e#npm:26.5.2"], ["jest", "npm:26.5.3"], ["js-yaml", "npm:3.14.0"], @@ -5257,10 +5225,8 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@babel/preset-react", "virtual:22157ea722f8d6428f1fcf0a6f7f6c7d6b902d9c785256c60a65fe6cd0db76ebccc7c1457ee047df0ba6909ff018e300c4f4957a60f5b670089810dfc417af9b#npm:7.12.1"], ["@lowdefy/block-tools", "workspace:packages/blockTools"], ["@lowdefy/engine", "workspace:packages/engine"], - ["@lowdefy/get", "npm:1.0.1"], ["@lowdefy/helpers", "workspace:packages/helpers"], ["@lowdefy/layout", "workspace:packages/layout"], - ["@lowdefy/set", "npm:1.0.1"], ["babel-loader", "virtual:e7dd2bdbec1b3ec399e5f3318d0a58728583b58181f43cb8f4f372a1b2b9707e2ffcf76bd80aad3c5c64a731754028a8070020628ca4fa0a02fe260c179762ae#npm:8.1.0"], ["bundle-loader", "npm:0.5.6"], ["css-loader", "virtual:e7dd2bdbec1b3ec399e5f3318d0a58728583b58181f43cb8f4f372a1b2b9707e2ffcf76bd80aad3c5c64a731754028a8070020628ca4fa0a02fe260c179762ae#npm:4.3.0"], @@ -5281,42 +5247,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "SOFT", }] ]], - ["@lowdefy/serializer", [ - ["npm:1.0.0", { - "packageLocation": "./.yarn/cache/@lowdefy-serializer-npm-1.0.0-42b2a6540d-8880af5555.zip/node_modules/@lowdefy/serializer/", - "packageDependencies": [ - ["@lowdefy/serializer", "npm:1.0.0"], - ["@lowdefy/type", "npm:1.0.1"] - ], - "linkType": "HARD", - }] - ]], - ["@lowdefy/set", [ - ["npm:1.0.1", { - "packageLocation": "./.yarn/cache/@lowdefy-set-npm-1.0.1-3e3f6dc81d-80ef56f187.zip/node_modules/@lowdefy/set/", - "packageDependencies": [ - ["@lowdefy/set", "npm:1.0.1"], - ["@lowdefy/type", "npm:1.0.1"] - ], - "linkType": "HARD", - }] - ]], - ["@lowdefy/type", [ - ["npm:1.0.0", { - "packageLocation": "./.yarn/cache/@lowdefy-type-npm-1.0.0-5c152b70b4-06668d6f58.zip/node_modules/@lowdefy/type/", - "packageDependencies": [ - ["@lowdefy/type", "npm:1.0.0"] - ], - "linkType": "HARD", - }], - ["npm:1.0.1", { - "packageLocation": "./.yarn/cache/@lowdefy-type-npm-1.0.1-ca488ffd94-42778b9f54.zip/node_modules/@lowdefy/type/", - "packageDependencies": [ - ["@lowdefy/type", "npm:1.0.1"] - ], - "linkType": "HARD", - }] - ]], ["@mrmlnc/readdir-enhanced", [ ["npm:2.2.1", { "packageLocation": "./.yarn/cache/@mrmlnc-readdir-enhanced-npm-2.2.1-5286808663-e01193b783.zip/node_modules/@mrmlnc/readdir-enhanced/", diff --git a/.yarn/cache/@lowdefy-delete-npm-1.0.1-437b8f32d8-fee9d86f52.zip b/.yarn/cache/@lowdefy-delete-npm-1.0.1-437b8f32d8-fee9d86f52.zip deleted file mode 100644 index f6862fbbf..000000000 Binary files a/.yarn/cache/@lowdefy-delete-npm-1.0.1-437b8f32d8-fee9d86f52.zip and /dev/null differ diff --git a/.yarn/cache/@lowdefy-get-npm-1.0.1-5bc3405973-6f66955a79.zip b/.yarn/cache/@lowdefy-get-npm-1.0.1-5bc3405973-6f66955a79.zip deleted file mode 100644 index c1f4e7f1a..000000000 Binary files a/.yarn/cache/@lowdefy-get-npm-1.0.1-5bc3405973-6f66955a79.zip and /dev/null differ diff --git a/.yarn/cache/@lowdefy-serializer-npm-1.0.0-42b2a6540d-8880af5555.zip b/.yarn/cache/@lowdefy-serializer-npm-1.0.0-42b2a6540d-8880af5555.zip deleted file mode 100644 index 48d8d813b..000000000 Binary files a/.yarn/cache/@lowdefy-serializer-npm-1.0.0-42b2a6540d-8880af5555.zip and /dev/null differ diff --git a/.yarn/cache/@lowdefy-set-npm-1.0.1-3e3f6dc81d-80ef56f187.zip b/.yarn/cache/@lowdefy-set-npm-1.0.1-3e3f6dc81d-80ef56f187.zip deleted file mode 100644 index 9ad2ba790..000000000 Binary files a/.yarn/cache/@lowdefy-set-npm-1.0.1-3e3f6dc81d-80ef56f187.zip and /dev/null differ diff --git a/.yarn/cache/@lowdefy-type-npm-1.0.0-5c152b70b4-06668d6f58.zip b/.yarn/cache/@lowdefy-type-npm-1.0.0-5c152b70b4-06668d6f58.zip deleted file mode 100644 index fcd276b7f..000000000 Binary files a/.yarn/cache/@lowdefy-type-npm-1.0.0-5c152b70b4-06668d6f58.zip and /dev/null differ diff --git a/.yarn/cache/@lowdefy-type-npm-1.0.1-ca488ffd94-42778b9f54.zip b/.yarn/cache/@lowdefy-type-npm-1.0.1-ca488ffd94-42778b9f54.zip deleted file mode 100644 index 0c2b051d1..000000000 Binary files a/.yarn/cache/@lowdefy-type-npm-1.0.1-ca488ffd94-42778b9f54.zip and /dev/null differ diff --git a/packages/blockTools/package.json b/packages/blockTools/package.json index e1fdcfad8..70e592e94 100644 --- a/packages/blockTools/package.json +++ b/packages/blockTools/package.json @@ -35,8 +35,7 @@ "test": "jest --coverage" }, "dependencies": { - "@lowdefy/helpers": "1.0.0", - "@lowdefy/type": "1.0.1", + "@lowdefy/helpers": "1.1.0", "create-emotion": "10.0.27", "react": "17.0.0-rc.2", "react-dom": "17.0.0-rc.2" diff --git a/packages/blockTools/src/Skeleton/SkeletonAvatar.js b/packages/blockTools/src/Skeleton/SkeletonAvatar.js index 7fa7c577c..8d3ecb0f1 100644 --- a/packages/blockTools/src/Skeleton/SkeletonAvatar.js +++ b/packages/blockTools/src/Skeleton/SkeletonAvatar.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import type from '@lowdefy/type'; +import { type } from '@lowdefy/helpers'; import blockDefaults from '../blockDefaults'; import Skeleton from './Skeleton'; diff --git a/packages/blockTools/src/Spinner/IconSpinner.js b/packages/blockTools/src/Spinner/IconSpinner.js index 1e498eef6..d44764f8b 100644 --- a/packages/blockTools/src/Spinner/IconSpinner.js +++ b/packages/blockTools/src/Spinner/IconSpinner.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import type from '@lowdefy/type'; +import { type } from '@lowdefy/helpers'; import blockDefaults from '../blockDefaults'; import './IconSpinner.css'; diff --git a/packages/blockTools/src/makeCssClass.js b/packages/blockTools/src/makeCssClass.js index 3e6619c8c..80b9b87f3 100644 --- a/packages/blockTools/src/makeCssClass.js +++ b/packages/blockTools/src/makeCssClass.js @@ -15,6 +15,7 @@ */ import { mergeObjects } from '@lowdefy/helpers'; + import mediaToCssObject from './mediaToCssObject'; import getEmotionCss from './getEmotionCss'; diff --git a/packages/color/package.json b/packages/color/package.json index 95a975570..eccffb872 100644 --- a/packages/color/package.json +++ b/packages/color/package.json @@ -30,7 +30,6 @@ "npm-publish": "npm publish --access public" }, "dependencies": { - "@lowdefy/type": "1.0.0", "tinycolor2": "1.4.2" }, "devDependencies": { diff --git a/packages/engine/package.json b/packages/engine/package.json index c9d095b4a..ddf51e6f1 100644 --- a/packages/engine/package.json +++ b/packages/engine/package.json @@ -31,13 +31,8 @@ "test": "jest --coverage" }, "dependencies": { - "@lowdefy/delete": "1.0.1", - "@lowdefy/get": "1.0.1", - "@lowdefy/helpers": "1.0.0", + "@lowdefy/helpers": "1.1.0", "@lowdefy/operators": "1.0.0", - "@lowdefy/serializer": "1.0.0", - "@lowdefy/set": "1.0.1", - "@lowdefy/type": "1.0.1", "graphql": "15.3.0", "graphql-tag": "2.11.0" }, diff --git a/packages/engine/src/Actions.js b/packages/engine/src/Actions.js index 086cb38de..0a3578323 100644 --- a/packages/engine/src/Actions.js +++ b/packages/engine/src/Actions.js @@ -17,11 +17,7 @@ limitations under the License. */ -import { applyArrayIndices, urlQuery } from '@lowdefy/helpers'; -import type from '@lowdefy/type'; -import get from '@lowdefy/get'; -import set from '@lowdefy/set'; -import serializer from '@lowdefy/serializer'; +import { applyArrayIndices, get, serializer, set, type, urlQuery } from '@lowdefy/helpers'; import makeContextId from './makeContextId'; diff --git a/packages/engine/src/BlockActions.js b/packages/engine/src/BlockActions.js index 29056eaef..9f9d6a9fd 100644 --- a/packages/engine/src/BlockActions.js +++ b/packages/engine/src/BlockActions.js @@ -14,7 +14,7 @@ limitations under the License. */ -import type from '@lowdefy/type'; +import { type } from '@lowdefy/helpers'; class BlockActions { constructor({ arrayIndices, block, context }) { @@ -34,6 +34,7 @@ class BlockActions { callRec(args, actions, results, resolve, reject) { if (actions.length > 0) { + // eslint-disable-next-line no-unused-vars const { fn, success, error, ...action } = actions[0]; try { const skip = this.context.parser.parse({ diff --git a/packages/engine/src/Blocks.js b/packages/engine/src/Blocks.js index b9947df73..b4fd98c4c 100644 --- a/packages/engine/src/Blocks.js +++ b/packages/engine/src/Blocks.js @@ -16,15 +16,10 @@ limitations under the License. */ -import type from '@lowdefy/type'; -import get from '@lowdefy/get'; -import set from '@lowdefy/set'; -import { applyArrayIndices } from '@lowdefy/helpers'; -import serializer from '@lowdefy/serializer'; +import { applyArrayIndices, get, serializer, set, swap, type } from '@lowdefy/helpers'; import BlockActions from './BlockActions'; import getFieldValues from './getFieldValues'; -import swap from './swap'; class Blocks { constructor({ arrayIndices, areas, context }) { @@ -92,6 +87,7 @@ class Blocks { if (!type.isNone(block.areas)) { block.areasLayout = {}; Object.keys(block.areas).forEach((key) => { + // eslint-disable-next-line no-unused-vars const { blocks, ...areaLayout } = block.areas[key]; block.areasLayout[key] = { ...areaLayout }; }); diff --git a/packages/engine/src/Mutations.js b/packages/engine/src/Mutations.js index 148082b92..1a5f49892 100644 --- a/packages/engine/src/Mutations.js +++ b/packages/engine/src/Mutations.js @@ -14,9 +14,8 @@ limitations under the License. */ -import get from '@lowdefy/get'; -import serializer from '@lowdefy/serializer'; import gql from 'graphql-tag'; +import { get, serializer } from '@lowdefy/helpers'; const CALL_MUTATION = gql` mutation callMutation($requestMutationInput: RequestMutationInput!) { diff --git a/packages/engine/src/Requests.js b/packages/engine/src/Requests.js index 8b56726b3..7c58c4921 100644 --- a/packages/engine/src/Requests.js +++ b/packages/engine/src/Requests.js @@ -14,9 +14,8 @@ limitations under the License. */ -import get from '@lowdefy/get'; -import serializer from '@lowdefy/serializer'; import gql from 'graphql-tag'; +import { get, serializer } from '@lowdefy/helpers'; const CALL_REQUEST = gql` query callRequest($requestInput: RequestInput!) { diff --git a/packages/engine/src/State.js b/packages/engine/src/State.js index 0a1a7577d..b01011be4 100644 --- a/packages/engine/src/State.js +++ b/packages/engine/src/State.js @@ -14,12 +14,7 @@ limitations under the License. */ -import type from '@lowdefy/type'; -import get from '@lowdefy/get'; -import set from '@lowdefy/set'; -import del from '@lowdefy/delete'; -import serializer from '@lowdefy/serializer'; -import swap from './swap'; +import { unset, get, serializer, set, swap, type } from '@lowdefy/helpers'; class State { constructor(context) { @@ -58,7 +53,7 @@ class State { } del(field) { - del(this.context.state, field); + unset(this.context.state, field); } swapItems(field, from, to) { diff --git a/packages/engine/src/getFieldValues.js b/packages/engine/src/getFieldValues.js index f5ae891b5..a8732222f 100644 --- a/packages/engine/src/getFieldValues.js +++ b/packages/engine/src/getFieldValues.js @@ -14,9 +14,7 @@ limitations under the License. */ -// engine - -import serializer from '@lowdefy/serializer'; +import { serializer } from '@lowdefy/helpers'; function getFieldValues(operatorName, ...args) { const result = new Set(); diff --git a/packages/engine/src/makeContextId.js b/packages/engine/src/makeContextId.js index 990f9d488..078f3df3b 100644 --- a/packages/engine/src/makeContextId.js +++ b/packages/engine/src/makeContextId.js @@ -14,8 +14,7 @@ limitations under the License. */ -import type from '@lowdefy/type'; -import serializer from '@lowdefy/serializer'; +import { serializer, type } from '@lowdefy/helpers'; function makeContextId({ blockId, pageId, urlQuery = {} }) { if (!type.isString(blockId)) { diff --git a/packages/engine/test/Actions/CallMethod.test.js b/packages/engine/test/Actions/CallMethod.test.js index b78c05e10..3e8bb3e0a 100644 --- a/packages/engine/test/Actions/CallMethod.test.js +++ b/packages/engine/test/Actions/CallMethod.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 testContext from '../testContext'; diff --git a/packages/engine/test/Actions/Fetch.test.js b/packages/engine/test/Actions/Fetch.test.js index ca802645b..11095541a 100644 --- a/packages/engine/test/Actions/Fetch.test.js +++ b/packages/engine/test/Actions/Fetch.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 testContext from '../testContext'; diff --git a/packages/engine/test/Actions/Link.test.js b/packages/engine/test/Actions/Link.test.js index 516999e8c..4cc037fdb 100644 --- a/packages/engine/test/Actions/Link.test.js +++ b/packages/engine/test/Actions/Link.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 testContext from '../testContext'; diff --git a/packages/engine/test/Actions/Message.test.js b/packages/engine/test/Actions/Message.test.js index 9bee13698..c4a6a59cd 100644 --- a/packages/engine/test/Actions/Message.test.js +++ b/packages/engine/test/Actions/Message.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 testContext from '../testContext'; diff --git a/packages/engine/test/Actions/Mutate.test.js b/packages/engine/test/Actions/Mutate.test.js index 38b047e29..ded85b19a 100644 --- a/packages/engine/test/Actions/Mutate.test.js +++ b/packages/engine/test/Actions/Mutate.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 testContext from '../testContext'; diff --git a/packages/engine/test/Actions/Reset.test.js b/packages/engine/test/Actions/Reset.test.js index 59f8b2bba..8a95b35ff 100644 --- a/packages/engine/test/Actions/Reset.test.js +++ b/packages/engine/test/Actions/Reset.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 testContext from '../testContext'; diff --git a/packages/engine/test/Actions/ScrollTo.test.js b/packages/engine/test/Actions/ScrollTo.test.js index 0689b52c5..1f069775b 100644 --- a/packages/engine/test/Actions/ScrollTo.test.js +++ b/packages/engine/test/Actions/ScrollTo.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 testContext from '../testContext'; diff --git a/packages/engine/test/Actions/SetGlobal.test.js b/packages/engine/test/Actions/SetGlobal.test.js index 3fbeb76f7..a869bbe5e 100644 --- a/packages/engine/test/Actions/SetGlobal.test.js +++ b/packages/engine/test/Actions/SetGlobal.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 testContext from '../testContext'; diff --git a/packages/engine/test/Actions/SetState.test.js b/packages/engine/test/Actions/SetState.test.js index 43dee6914..86201e0bc 100644 --- a/packages/engine/test/Actions/SetState.test.js +++ b/packages/engine/test/Actions/SetState.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 testContext from '../testContext'; diff --git a/packages/engine/test/Actions/Validate.test.js b/packages/engine/test/Actions/Validate.test.js index bf405888a..c81f6c7ee 100644 --- a/packages/engine/test/Actions/Validate.test.js +++ b/packages/engine/test/Actions/Validate.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 testContext from '../testContext'; diff --git a/packages/engine/test/Block/Blocks.test.js b/packages/engine/test/Block/Blocks.test.js index 445eb504d..a8ad7265e 100644 --- a/packages/engine/test/Block/Blocks.test.js +++ b/packages/engine/test/Block/Blocks.test.js @@ -16,7 +16,7 @@ limitations under the License. */ -import serializer from '@lowdefy/serializer'; +import { serializer } from '@lowdefy/helpers'; import { WebParser } from '@lowdefy/operators'; import Blocks from '../../src/Blocks'; diff --git a/packages/engine/test/BlockActions.test.js b/packages/engine/test/BlockActions.test.js index 97d2fc435..38e23e98e 100644 --- a/packages/engine/test/BlockActions.test.js +++ b/packages/engine/test/BlockActions.test.js @@ -1,19 +1,19 @@ /* eslint-disable prefer-promise-reject-errors */ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 testContext from './testContext'; diff --git a/packages/engine/test/Mutations.test.js b/packages/engine/test/Mutations.test.js index ae405563a..4cbb0f157 100644 --- a/packages/engine/test/Mutations.test.js +++ b/packages/engine/test/Mutations.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 MutationsClass from '../src/Mutations'; diff --git a/packages/engine/test/Requests.test.js b/packages/engine/test/Requests.test.js index f69d7eaed..edee57652 100644 --- a/packages/engine/test/Requests.test.js +++ b/packages/engine/test/Requests.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 RequestsClass from '../src/Requests'; diff --git a/packages/engine/test/State.test.js b/packages/engine/test/State.test.js index 938c72a7f..3fcf6325b 100644 --- a/packages/engine/test/State.test.js +++ b/packages/engine/test/State.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 State from '../src/State'; diff --git a/packages/engine/test/getContext.test.js b/packages/engine/test/getContext.test.js index d452a44ce..4a99cf3d6 100644 --- a/packages/engine/test/getContext.test.js +++ b/packages/engine/test/getContext.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 getContext from '../src/getContext'; diff --git a/packages/engine/test/getFieldValues.test.js b/packages/engine/test/getFieldValues.test.js index d9ce60bf2..095ec5f1a 100644 --- a/packages/engine/test/getFieldValues.test.js +++ b/packages/engine/test/getFieldValues.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 getFieldValues from '../src/getFieldValues'; diff --git a/packages/engine/test/makeContextId.test.js b/packages/engine/test/makeContextId.test.js index a1e27a823..ce48e6516 100644 --- a/packages/engine/test/makeContextId.test.js +++ b/packages/engine/test/makeContextId.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 makeContextId from '../src/makeContextId'; diff --git a/packages/engine/test/swap.test.js b/packages/engine/test/swap.test.js deleted file mode 100644 index d13d0287b..000000000 --- a/packages/engine/test/swap.test.js +++ /dev/null @@ -1,37 +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 swap from '../src/swap'; - -test('swap', () => { - const arr = [0, 1, 2, 3, 4]; - swap(arr, 2, 3); - expect(arr).toEqual([0, 1, 3, 2, 4]); -}); - -test('swap out of bounds', () => { - const arr = [0, 1, 2, 3, 4]; - swap(arr, -1, 3); - expect(arr).toEqual(arr); - swap(arr, 2, 8); - expect(arr).toEqual(arr); -}); - -test('not an array', () => { - const arr = 1; - swap(arr, 2, 3); - expect(arr).toEqual(1); -}); diff --git a/packages/engine/test/testContext.js b/packages/engine/test/testContext.js index f622ea7c5..53b0ac8bd 100644 --- a/packages/engine/test/testContext.js +++ b/packages/engine/test/testContext.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 { WebParser } from '@lowdefy/operators'; diff --git a/packages/express/server.js b/packages/express/server.js index 11d673f5d..d1aac2298 100644 --- a/packages/express/server.js +++ b/packages/express/server.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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. */ const path = require('path'); diff --git a/packages/graphql/package.json b/packages/graphql/package.json index 53c4f9f18..0955ab656 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -28,8 +28,7 @@ "test": "jest --coverage" }, "dependencies": { - "@lowdefy/get": "1.0.1", - "@lowdefy/type": "1.0.1", + "@lowdefy/helpers": "1.1.0", "apollo-server": "2.18.2", "dataloader": "2.0.0", "graphql": "15.3.0", diff --git a/packages/graphql/src/context/context.js b/packages/graphql/src/context/context.js index f3966258f..392c22dfc 100644 --- a/packages/graphql/src/context/context.js +++ b/packages/graphql/src/context/context.js @@ -1,22 +1,22 @@ /* eslint-disable no-param-reassign */ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 get from '@lowdefy/get'; +import { get } from '@lowdefy/helpers'; import createGetController from './getController'; import createGetLoader from './getLoader'; diff --git a/packages/graphql/src/context/context.test.js b/packages/graphql/src/context/context.test.js index ad5e5ce7a..45226a498 100644 --- a/packages/graphql/src/context/context.test.js +++ b/packages/graphql/src/context/context.test.js @@ -1,3 +1,19 @@ +/* + 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 createContext from './context'; import { PageController } from '../controllers/pageController'; diff --git a/packages/graphql/src/context/errors.js b/packages/graphql/src/context/errors.js index c0969e5b3..50daab59a 100644 --- a/packages/graphql/src/context/errors.js +++ b/packages/graphql/src/context/errors.js @@ -1,19 +1,19 @@ /* eslint-disable max-classes-per-file */ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 { ApolloError } from 'apollo-server'; diff --git a/packages/graphql/src/context/errors.test.js b/packages/graphql/src/context/errors.test.js index d445c9b03..ac0e03729 100644 --- a/packages/graphql/src/context/errors.test.js +++ b/packages/graphql/src/context/errors.test.js @@ -1,3 +1,19 @@ +/* + 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 { ApolloError } from 'apollo-server'; import { AuthenticationError, diff --git a/packages/graphql/src/context/getController.js b/packages/graphql/src/context/getController.js index fddf2766f..af50f7374 100644 --- a/packages/graphql/src/context/getController.js +++ b/packages/graphql/src/context/getController.js @@ -1,20 +1,20 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 type from '@lowdefy/type'; +import { type } from '@lowdefy/helpers'; import createPageController from '../controllers/pageController'; import createComponentController from '../controllers/componentController'; diff --git a/packages/graphql/src/context/getController.test.js b/packages/graphql/src/context/getController.test.js index f73438775..fdec941dd 100644 --- a/packages/graphql/src/context/getController.test.js +++ b/packages/graphql/src/context/getController.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 createGetController from './getController'; diff --git a/packages/graphql/src/context/getLoader.js b/packages/graphql/src/context/getLoader.js index af3d076ed..bd1aa57cc 100644 --- a/packages/graphql/src/context/getLoader.js +++ b/packages/graphql/src/context/getLoader.js @@ -1,20 +1,20 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 type from '@lowdefy/type'; +import { type } from '@lowdefy/helpers'; import createPageLoader from '../loaders/pageLoader'; import createComponentLoader from '../loaders/componentLoader'; diff --git a/packages/graphql/src/context/getLoader.test.js b/packages/graphql/src/context/getLoader.test.js index b2b10891f..4bf6c4c13 100644 --- a/packages/graphql/src/context/getLoader.test.js +++ b/packages/graphql/src/context/getLoader.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 Dataloader from 'dataloader'; diff --git a/packages/graphql/src/controllers/componentController.js b/packages/graphql/src/controllers/componentController.js index 91f29e6c7..7e7ce1a2d 100644 --- a/packages/graphql/src/controllers/componentController.js +++ b/packages/graphql/src/controllers/componentController.js @@ -1,20 +1,20 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 get from '@lowdefy/get'; +import { get } from '@lowdefy/helpers'; class ComponentController { constructor({ getLoader, DEPLOYMENT_ID, DEPLOYMENT_NAME, DOMAIN_NAME }) { diff --git a/packages/graphql/src/controllers/componentController.test.js b/packages/graphql/src/controllers/componentController.test.js index 4c7ed1087..7301caf22 100644 --- a/packages/graphql/src/controllers/componentController.test.js +++ b/packages/graphql/src/controllers/componentController.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 createComponentController from './componentController'; diff --git a/packages/graphql/src/controllers/pageController.js b/packages/graphql/src/controllers/pageController.js index d7a850226..80c156bb9 100644 --- a/packages/graphql/src/controllers/pageController.js +++ b/packages/graphql/src/controllers/pageController.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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. */ class PageController { diff --git a/packages/graphql/src/controllers/pageController.test.js b/packages/graphql/src/controllers/pageController.test.js index 9c0934a17..a183b6777 100644 --- a/packages/graphql/src/controllers/pageController.test.js +++ b/packages/graphql/src/controllers/pageController.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 createPageController from './pageController'; diff --git a/packages/graphql/src/index.js b/packages/graphql/src/index.js index 711982fcf..6d6d7485a 100644 --- a/packages/graphql/src/index.js +++ b/packages/graphql/src/index.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 typeDefs from './schema'; diff --git a/packages/graphql/src/loaders/componentLoader.js b/packages/graphql/src/loaders/componentLoader.js index f70ce745f..3f5cf2212 100644 --- a/packages/graphql/src/loaders/componentLoader.js +++ b/packages/graphql/src/loaders/componentLoader.js @@ -1,18 +1,19 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 Dataloader from 'dataloader'; import readJsonFile from './readJsonFile'; diff --git a/packages/graphql/src/loaders/componentLoader.test.js b/packages/graphql/src/loaders/componentLoader.test.js index 08a3ac517..17841d592 100644 --- a/packages/graphql/src/loaders/componentLoader.test.js +++ b/packages/graphql/src/loaders/componentLoader.test.js @@ -1,3 +1,19 @@ +/* + 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 createComponentLoader from './componentLoader'; import { ConfigurationError } from '../context/errors'; diff --git a/packages/graphql/src/loaders/pageLoader.js b/packages/graphql/src/loaders/pageLoader.js index a9d159bf2..f2542bbdb 100644 --- a/packages/graphql/src/loaders/pageLoader.js +++ b/packages/graphql/src/loaders/pageLoader.js @@ -1,18 +1,19 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 Dataloader from 'dataloader'; import readJsonFile from './readJsonFile'; diff --git a/packages/graphql/src/loaders/pageLoader.test.js b/packages/graphql/src/loaders/pageLoader.test.js index 6f0fecad8..148b1ce75 100644 --- a/packages/graphql/src/loaders/pageLoader.test.js +++ b/packages/graphql/src/loaders/pageLoader.test.js @@ -1,3 +1,19 @@ +/* + 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 createPageLoader from './pageLoader'; import { ConfigurationError } from '../context/errors'; diff --git a/packages/graphql/src/loaders/readJsonFile.js b/packages/graphql/src/loaders/readJsonFile.js index b59dc1695..b8a687271 100644 --- a/packages/graphql/src/loaders/readJsonFile.js +++ b/packages/graphql/src/loaders/readJsonFile.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 fs from 'fs'; diff --git a/packages/graphql/src/loaders/readJsonFile.test.js b/packages/graphql/src/loaders/readJsonFile.test.js index d7c520d85..8a3c4f2cb 100644 --- a/packages/graphql/src/loaders/readJsonFile.test.js +++ b/packages/graphql/src/loaders/readJsonFile.test.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 readJsonFile from './readJsonFile'; diff --git a/packages/graphql/src/resolvers/queries/lowdefyGlobal/lowdefyGlobal.js b/packages/graphql/src/resolvers/queries/lowdefyGlobal/lowdefyGlobal.js index d98a99fda..418ab1a5f 100644 --- a/packages/graphql/src/resolvers/queries/lowdefyGlobal/lowdefyGlobal.js +++ b/packages/graphql/src/resolvers/queries/lowdefyGlobal/lowdefyGlobal.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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. */ async function lowdefyGlobal(_, __, { getController }) { diff --git a/packages/graphql/src/resolvers/queries/menu/menu.js b/packages/graphql/src/resolvers/queries/menu/menu.js index 5b3b713ee..86a287162 100644 --- a/packages/graphql/src/resolvers/queries/menu/menu.js +++ b/packages/graphql/src/resolvers/queries/menu/menu.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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. */ async function menu(_, __, { getController }) { diff --git a/packages/graphql/src/resolvers/queries/page/page.js b/packages/graphql/src/resolvers/queries/page/page.js index 3171d17ce..d4b73c784 100644 --- a/packages/graphql/src/resolvers/queries/page/page.js +++ b/packages/graphql/src/resolvers/queries/page/page.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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. */ async function page(_, { pageId }, { getController }) { diff --git a/packages/graphql/src/resolvers/resolvers.js b/packages/graphql/src/resolvers/resolvers.js index 44cb1881f..cedf5aaba 100644 --- a/packages/graphql/src/resolvers/resolvers.js +++ b/packages/graphql/src/resolvers/resolvers.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 GraphQLJSON from 'graphql-type-json'; diff --git a/packages/graphql/src/schema.js b/packages/graphql/src/schema.js index 82d319719..d427b27be 100644 --- a/packages/graphql/src/schema.js +++ b/packages/graphql/src/schema.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 { gql } from 'apollo-server'; diff --git a/packages/graphql/src/test/runTestQuery.js b/packages/graphql/src/test/runTestQuery.js index 7883c9afc..fc7203400 100644 --- a/packages/graphql/src/test/runTestQuery.js +++ b/packages/graphql/src/test/runTestQuery.js @@ -1,3 +1,19 @@ +/* + 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 { ApolloServer } from 'apollo-server'; // eslint-disable-next-line import/no-extraneous-dependencies import { createTestClient } from 'apollo-server-testing'; diff --git a/packages/graphql/src/test/testContext.js b/packages/graphql/src/test/testContext.js index 58ce35d27..4bfed98ba 100644 --- a/packages/graphql/src/test/testContext.js +++ b/packages/graphql/src/test/testContext.js @@ -1,17 +1,17 @@ /* - Copyright 2020 Lowdefy, Inc + 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 + 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 + 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. + 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 createGetController from '../context/getController'; diff --git a/packages/helpers/package.json b/packages/helpers/package.json index 03c3febcd..b16d0904d 100644 --- a/packages/helpers/package.json +++ b/packages/helpers/package.json @@ -1,6 +1,6 @@ { "name": "@lowdefy/helpers", - "version": "1.0.0", + "version": "1.1.0", "licence": "Apache-2.0", "description": "", "homepage": "https://lowdefy.com", diff --git a/packages/helpers/src/index.js b/packages/helpers/src/index.js index 86f299722..4806b0c41 100644 --- a/packages/helpers/src/index.js +++ b/packages/helpers/src/index.js @@ -21,6 +21,7 @@ import omit from './omit'; import serializer from './serializer'; import set from './set'; import stableStringify from './stableStringify'; +import swap from './swap'; import type from './type'; import unset from './unset'; import urlQuery from './urlQuery'; @@ -33,6 +34,7 @@ export { serializer, set, stableStringify, + swap, type, unset, urlQuery, diff --git a/packages/engine/src/swap.js b/packages/helpers/src/swap.js similarity index 94% rename from packages/engine/src/swap.js rename to packages/helpers/src/swap.js index dd6611cb6..e799cb128 100644 --- a/packages/engine/src/swap.js +++ b/packages/helpers/src/swap.js @@ -14,9 +14,7 @@ limitations under the License. */ -// engine - -import type from '@lowdefy/type'; +import type from './type'; const swap = (arr, from, to) => { if (!type.isArray(arr) || from < 0 || to < 0 || from >= arr.length || to >= arr.length) { diff --git a/packages/helpers/test/swap.test.js b/packages/helpers/test/swap.test.js new file mode 100644 index 000000000..57a00e8d0 --- /dev/null +++ b/packages/helpers/test/swap.test.js @@ -0,0 +1,37 @@ +/* + 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 swap from '../src/swap'; + +test('swap', () => { + const arr = [0, 1, 2, 3, 4]; + swap(arr, 2, 3); + expect(arr).toEqual([0, 1, 3, 2, 4]); +}); + +test('swap out of bounds', () => { + const arr = [0, 1, 2, 3, 4]; + swap(arr, -1, 3); + expect(arr).toEqual(arr); + swap(arr, 2, 8); + expect(arr).toEqual(arr); +}); + +test('not an array', () => { + const arr = 1; + swap(arr, 2, 3); + expect(arr).toEqual(1); +}); diff --git a/packages/layout/demo/AutoBlockSim.js b/packages/layout/demo/AutoBlockSim.js index d8f7ffa51..2d49a860f 100644 --- a/packages/layout/demo/AutoBlockSim.js +++ b/packages/layout/demo/AutoBlockSim.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import type from '@lowdefy/type'; +import { type } from '@lowdefy/helpers'; import { ErrorBoundary } from '@lowdefy/block-tools'; import { Area, BlockLayout, layoutParamsToArea } from '../src'; diff --git a/packages/layout/package.json b/packages/layout/package.json index b974134f5..2667292ba 100644 --- a/packages/layout/package.json +++ b/packages/layout/package.json @@ -35,7 +35,7 @@ "test": "jest --coverage" }, "dependencies": { - "@lowdefy/type": "1.0.1", + "@lowdefy/helpers": "1.1.0", "antd": "4.4.2", "react": "17.0.0-rc.2", "react-dom": "17.0.0-rc.2" diff --git a/packages/layout/src/deriveLayout.js b/packages/layout/src/deriveLayout.js index 08721dc60..25c4822b3 100644 --- a/packages/layout/src/deriveLayout.js +++ b/packages/layout/src/deriveLayout.js @@ -14,7 +14,7 @@ limitations under the License. */ -import type from '@lowdefy/type'; +import { type } from '@lowdefy/helpers'; const sanitizeGrow = (value) => { if (value === 'unset' || value === 'inherit' || value === 'initial') { diff --git a/packages/layout/src/gutterSetup.js b/packages/layout/src/gutterSetup.js index f20a394d1..4b2d7740f 100644 --- a/packages/layout/src/gutterSetup.js +++ b/packages/layout/src/gutterSetup.js @@ -14,7 +14,7 @@ limitations under the License. */ -import type from '@lowdefy/type'; +import { type } from '@lowdefy/helpers'; const gutterSetup = (gutter) => { if (type.isInt(gutter) || type.isObject(gutter)) { diff --git a/packages/layout/src/layoutParamsToArea.js b/packages/layout/src/layoutParamsToArea.js index 4f3c5430e..44a4276cb 100644 --- a/packages/layout/src/layoutParamsToArea.js +++ b/packages/layout/src/layoutParamsToArea.js @@ -14,7 +14,7 @@ limitations under the License. */ -import type from '@lowdefy/type'; +import { type } from '@lowdefy/helpers'; const layoutParamsToArea = ({ areaKey, area, layout }) => { if (areaKey !== 'content') { diff --git a/packages/nunjucks/package.json b/packages/nunjucks/package.json index 67edba1d9..a3dc16395 100644 --- a/packages/nunjucks/package.json +++ b/packages/nunjucks/package.json @@ -30,7 +30,7 @@ "npm-publish": "npm publish --access public" }, "dependencies": { - "@lowdefy/type": "1.0.1", + "@lowdefy/helpers": "1.1.0", "nunjucks": "3.2.2", "nunjucks-date-filter": "0.1.1" }, diff --git a/packages/nunjucks/src/nunjucks.js b/packages/nunjucks/src/nunjucks.js index 8540c655b..1f19e4b69 100644 --- a/packages/nunjucks/src/nunjucks.js +++ b/packages/nunjucks/src/nunjucks.js @@ -16,7 +16,7 @@ import nunjucks from 'nunjucks'; import dateFilter from 'nunjucks-date-filter'; -import type from '@lowdefy/type'; +import { type } from '@lowdefy/helpers'; // dateFilter.setDefaultFormat('YYYY-MM-DD'); export const nunjucksEnv = new nunjucks.Environment(); diff --git a/packages/operators/package.json b/packages/operators/package.json index 29980a300..dead8eada 100644 --- a/packages/operators/package.json +++ b/packages/operators/package.json @@ -31,11 +31,8 @@ "npm-publish": "npm publish --access public" }, "dependencies": { - "@lowdefy/get": "1.0.1", - "@lowdefy/helpers": "1.0.0", + "@lowdefy/helpers": "1.1.0", "@lowdefy/nunjucks": "1.0.0", - "@lowdefy/serializer": "1.0.0", - "@lowdefy/type": "1.0.1", "js-yaml": "3.14.0", "mingo": "3.0.6" }, diff --git a/packages/operators/src/nodeParser.js b/packages/operators/src/nodeParser.js index cdb50c0ad..7157642b1 100644 --- a/packages/operators/src/nodeParser.js +++ b/packages/operators/src/nodeParser.js @@ -16,9 +16,7 @@ limitations under the License. */ -import get from '@lowdefy/get'; -import serializer from '@lowdefy/serializer'; -import type from '@lowdefy/type'; +import { get, serializer, type } from '@lowdefy/helpers'; import { _and, diff --git a/packages/operators/src/operators.js b/packages/operators/src/operators.js index e0967fa9a..7393a0576 100644 --- a/packages/operators/src/operators.js +++ b/packages/operators/src/operators.js @@ -16,12 +16,10 @@ limitations under the License. */ -import get from '@lowdefy/get'; -import serializer from '@lowdefy/serializer'; -import type from '@lowdefy/type'; -import { nunjucksFunction } from '@lowdefy/nunjucks'; import YAML from 'js-yaml'; import mingo from 'mingo'; +import { get, serializer, type } from '@lowdefy/helpers'; +import { nunjucksFunction } from '@lowdefy/nunjucks'; import { useOperators as mingoUseOperators, OperatorType as MingoOperatorType } from 'mingo/core'; import * as mingoAccumulatorOperators from 'mingo/operators/accumulator'; import * as mingoExpressionOperators from 'mingo/operators/expression'; diff --git a/packages/operators/src/webParser.js b/packages/operators/src/webParser.js index e4055ded7..1158dce43 100644 --- a/packages/operators/src/webParser.js +++ b/packages/operators/src/webParser.js @@ -16,10 +16,7 @@ limitations under the License. */ -import get from '@lowdefy/get'; -import { applyArrayIndices } from '@lowdefy/helpers'; -import serializer from '@lowdefy/serializer'; -import type from '@lowdefy/type'; +import { applyArrayIndices, get, serializer, type } from '@lowdefy/helpers'; import { _and, diff --git a/packages/renderer/package.json b/packages/renderer/package.json index 2f6e8906d..9826728b5 100644 --- a/packages/renderer/package.json +++ b/packages/renderer/package.json @@ -39,10 +39,8 @@ "@apollo/link-retry": "2.0.0-beta.3", "@lowdefy/block-tools": "1.0.1-experimental.1", "@lowdefy/engine": "0.0.0-experimental.0", - "@lowdefy/get": "1.0.1", - "@lowdefy/helpers": "1.0.0", + "@lowdefy/helpers": "1.1.0", "@lowdefy/layout": "1.0.0", - "@lowdefy/set": "1.0.1", "graphql": "15.3.0", "graphql-type-json": "0.3.2", "react": "17.0.0-rc.3", diff --git a/packages/renderer/src/Renderer.js b/packages/renderer/src/Renderer.js index 0059e32d8..97c90339a 100644 --- a/packages/renderer/src/Renderer.js +++ b/packages/renderer/src/Renderer.js @@ -19,7 +19,7 @@ import { BrowserRouter, Route, Redirect, Switch, useLocation } from 'react-route import { ApolloProvider, useQuery, gql } from '@apollo/client'; import { ErrorBoundary, Loading } from '@lowdefy/block-tools'; -import get from '@lowdefy/get'; +import { get } from '@lowdefy/helpers'; import useGqlClient from './utils/graphql/useGqlClient'; import Page from './page/Page'; diff --git a/packages/renderer/src/page/Page.js b/packages/renderer/src/page/Page.js index f99235820..886a5bcc8 100644 --- a/packages/renderer/src/page/Page.js +++ b/packages/renderer/src/page/Page.js @@ -21,8 +21,7 @@ import { useParams, useHistory, useLocation, Redirect } from 'react-router-dom'; import { useQuery, gql } from '@apollo/client'; import { Loading } from '@lowdefy/block-tools'; -import get from '@lowdefy/get'; -import { urlQuery } from '@lowdefy/helpers'; +import { get, urlQuery } from '@lowdefy/helpers'; import Helmet from './Helmet'; import Block from './block/Block'; diff --git a/packages/renderer/src/page/block/Block.js b/packages/renderer/src/page/block/Block.js index 0d978609d..c06b192eb 100644 --- a/packages/renderer/src/page/block/Block.js +++ b/packages/renderer/src/page/block/Block.js @@ -17,7 +17,7 @@ import React, { Suspense } from 'react'; import { ErrorBoundary, Loading } from '@lowdefy/block-tools'; -import get from '@lowdefy/get'; +import { get } from '@lowdefy/helpers'; import LoadBlock from './LoadBlock'; import Defaults from './Defaults'; diff --git a/packages/renderer/src/page/block/Context.js b/packages/renderer/src/page/block/Context.js index 5fc46191f..6abc00393 100644 --- a/packages/renderer/src/page/block/Context.js +++ b/packages/renderer/src/page/block/Context.js @@ -16,7 +16,7 @@ import React from 'react'; import { Loading } from '@lowdefy/block-tools'; -import get from '@lowdefy/get'; +import { get } from '@lowdefy/helpers'; import useContext from './useContext'; diff --git a/packages/renderer/src/page/block/LoadBlock.js b/packages/renderer/src/page/block/LoadBlock.js index 3d4751012..0fb3a2f77 100644 --- a/packages/renderer/src/page/block/LoadBlock.js +++ b/packages/renderer/src/page/block/LoadBlock.js @@ -16,7 +16,7 @@ import React, { lazy } from 'react'; import { Loading } from '@lowdefy/block-tools'; -import get from '@lowdefy/get'; +import { get } from '@lowdefy/helpers'; import useDynamicScript from '../../utils/useDynamicScript'; import loadComponent from '../../utils/loadComponent'; diff --git a/packages/renderer/src/page/block/WatchCache.js b/packages/renderer/src/page/block/WatchCache.js index c2cdf0c36..323cfbe12 100644 --- a/packages/renderer/src/page/block/WatchCache.js +++ b/packages/renderer/src/page/block/WatchCache.js @@ -15,7 +15,7 @@ */ import React from 'react'; -import get from '@lowdefy/get'; +import { get } from '@lowdefy/helpers'; import { useQuery, gql } from '@apollo/client'; import { Loading } from '@lowdefy/block-tools'; diff --git a/yarn.lock b/yarn.lock index 13b0fe68c..65ddc06fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3686,8 +3686,7 @@ __metadata: "@babel/core": 7.12.1 "@babel/preset-env": 7.12.1 "@babel/preset-react": 7.12.1 - "@lowdefy/helpers": 1.0.0 - "@lowdefy/type": 1.0.1 + "@lowdefy/helpers": 1.1.0 babel-jest: 26.5.2 babel-loader: 8.1.0 babel-plugin-import: 1.13.1 @@ -3723,23 +3722,12 @@ __metadata: "@babel/cli": 7.12.1 "@babel/core": 7.12.1 "@babel/preset-env": 7.12.1 - "@lowdefy/type": 1.0.0 babel-jest: 26.5.2 jest: 26.5.3 tinycolor2: 1.4.2 languageName: unknown linkType: soft -"@lowdefy/delete@npm:1.0.1": - version: 1.0.1 - resolution: "@lowdefy/delete@npm:1.0.1" - dependencies: - "@lowdefy/get": 1.0.1 - "@lowdefy/type": 1.0.1 - checksum: fee9d86f52643b4d2a8f68d732fec64f1805628fe6d1b42ff1bfea515b767ff8fb6198ee3fce49033f9edcb943676d0993ef537048e3118b6e7855dee4535c6e - languageName: node - linkType: hard - "@lowdefy/engine@0.0.0-experimental.0, @lowdefy/engine@workspace:packages/engine": version: 0.0.0-use.local resolution: "@lowdefy/engine@workspace:packages/engine" @@ -3747,13 +3735,8 @@ __metadata: "@babel/cli": 7.12.1 "@babel/core": 7.12.1 "@babel/preset-env": 7.12.1 - "@lowdefy/delete": 1.0.1 - "@lowdefy/get": 1.0.1 - "@lowdefy/helpers": 1.0.0 + "@lowdefy/helpers": 1.1.0 "@lowdefy/operators": 1.0.0 - "@lowdefy/serializer": 1.0.0 - "@lowdefy/set": 1.0.1 - "@lowdefy/type": 1.0.1 babel-jest: 26.5.2 graphql: 15.3.0 graphql-tag: 2.11.0 @@ -3800,15 +3783,6 @@ __metadata: languageName: unknown linkType: soft -"@lowdefy/get@npm:1.0.1": - version: 1.0.1 - resolution: "@lowdefy/get@npm:1.0.1" - dependencies: - "@lowdefy/type": 1.0.1 - checksum: 6f66955a79f693620309ceb98684b7e612bef7d7e787fb7c4791498653b4911c7d8131e205bee781bf66c1c536b94db605fdca498d86699c7e13bac82d2a84f3 - languageName: node - linkType: hard - "@lowdefy/graphql@0.0.0-experimental.0, @lowdefy/graphql@workspace:packages/graphql": version: 0.0.0-use.local resolution: "@lowdefy/graphql@workspace:packages/graphql" @@ -3816,8 +3790,7 @@ __metadata: "@babel/cli": 7.12.1 "@babel/core": 7.12.1 "@babel/preset-env": 7.12.1 - "@lowdefy/get": 1.0.1 - "@lowdefy/type": 1.0.1 + "@lowdefy/helpers": 1.1.0 apollo-server: 2.18.2 apollo-server-testing: 2.18.2 babel-jest: 26.5.2 @@ -3831,7 +3804,7 @@ __metadata: languageName: unknown linkType: soft -"@lowdefy/helpers@1.0.0, @lowdefy/helpers@workspace:packages/helpers": +"@lowdefy/helpers@1.1.0, @lowdefy/helpers@workspace:packages/helpers": version: 0.0.0-use.local resolution: "@lowdefy/helpers@workspace:packages/helpers" dependencies: @@ -3855,7 +3828,7 @@ __metadata: "@babel/preset-env": 7.12.1 "@babel/preset-react": 7.12.1 "@lowdefy/block-tools": 1.0.1-experimental.1 - "@lowdefy/type": 1.0.1 + "@lowdefy/helpers": 1.1.0 antd: 4.4.2 babel-jest: 26.5.2 babel-loader: 8.1.0 @@ -3908,7 +3881,7 @@ __metadata: "@babel/cli": 7.12.1 "@babel/core": 7.12.1 "@babel/preset-env": 7.12.1 - "@lowdefy/type": 1.0.1 + "@lowdefy/helpers": 1.1.0 babel-jest: 26.5.2 jest: 26.5.3 nunjucks: 3.2.2 @@ -3923,11 +3896,8 @@ __metadata: "@babel/cli": 7.12.1 "@babel/core": 7.12.1 "@babel/preset-env": 7.12.1 - "@lowdefy/get": 1.0.1 - "@lowdefy/helpers": 1.0.0 + "@lowdefy/helpers": 1.1.0 "@lowdefy/nunjucks": 1.0.0 - "@lowdefy/serializer": 1.0.0 - "@lowdefy/type": 1.0.1 babel-jest: 26.5.2 jest: 26.5.3 js-yaml: 3.14.0 @@ -3947,10 +3917,8 @@ __metadata: "@babel/preset-react": 7.12.1 "@lowdefy/block-tools": 1.0.1-experimental.1 "@lowdefy/engine": 0.0.0-experimental.0 - "@lowdefy/get": 1.0.1 - "@lowdefy/helpers": 1.0.0 + "@lowdefy/helpers": 1.1.0 "@lowdefy/layout": 1.0.0 - "@lowdefy/set": 1.0.1 babel-loader: 8.1.0 bundle-loader: 0.5.6 css-loader: 4.3.0 @@ -3970,38 +3938,6 @@ __metadata: languageName: unknown linkType: soft -"@lowdefy/serializer@npm:1.0.0": - version: 1.0.0 - resolution: "@lowdefy/serializer@npm:1.0.0" - dependencies: - "@lowdefy/type": 1.0.1 - checksum: 8880af5555339624160884adf32d611457d316779af312ea90ebfb64c555fe6021aa034b86bd76656c823db0a98fd0006f1e5cc80b94fb0bd92789bf8d8aa79c - languageName: node - linkType: hard - -"@lowdefy/set@npm:1.0.1": - version: 1.0.1 - resolution: "@lowdefy/set@npm:1.0.1" - dependencies: - "@lowdefy/type": 1.0.1 - checksum: 80ef56f1873edd085bb72be4eb9f0241e9eb6709dc57c3387769b571f5c423157ab601234c32a24485c79789f04b9d4018686f5d44118ba02acff04d3d0d4351 - languageName: node - linkType: hard - -"@lowdefy/type@npm:1.0.0": - version: 1.0.0 - resolution: "@lowdefy/type@npm:1.0.0" - checksum: 06668d6f581f2c4f46f0c1752e7f946abc84ef4f9334780ef6534eeba554a075f78cf49212fb8c124672a1e16c4c3ffc0abb3e360ca0b67727fa7a164c69904f - languageName: node - linkType: hard - -"@lowdefy/type@npm:1.0.1": - version: 1.0.1 - resolution: "@lowdefy/type@npm:1.0.1" - checksum: 42778b9f54ac984cc14f29e600d0e3cb794b9b944c66bc9098154c1c7cb50a3113161e4a9afc07815bd0f330014185aff0eabe34f3ebe07a02b4df4063ba8f5d - languageName: node - linkType: hard - "@mrmlnc/readdir-enhanced@npm:^2.2.1": version: 2.2.1 resolution: "@mrmlnc/readdir-enhanced@npm:2.2.1"