changes from node_modules to using rollup-plugin-alias, fixes tests
|
@ -20,7 +20,9 @@
|
||||||
"testURL": "http://jest-breaks-if-this-does-not-exist",
|
"testURL": "http://jest-breaks-if-this-does-not-exist",
|
||||||
"moduleNameMapper": {
|
"moduleNameMapper": {
|
||||||
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/internals/mocks/fileMock.js",
|
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/internals/mocks/fileMock.js",
|
||||||
"\\.(css|less|sass|scss)$": "identity-obj-proxy"
|
"\\.(css|less|sass|scss)$": "identity-obj-proxy",
|
||||||
|
"components(.*)$": "<rootDir>/src/components$1",
|
||||||
|
"builderStore(.*)$": "<rootDir>/src/builderStore$1"
|
||||||
},
|
},
|
||||||
"moduleFileExtensions": [
|
"moduleFileExtensions": [
|
||||||
"js"
|
"js"
|
||||||
|
@ -55,6 +57,7 @@
|
||||||
"@babel/plugin-transform-runtime": "^7.5.5",
|
"@babel/plugin-transform-runtime": "^7.5.5",
|
||||||
"@babel/preset-env": "^7.5.5",
|
"@babel/preset-env": "^7.5.5",
|
||||||
"@babel/runtime": "^7.5.5",
|
"@babel/runtime": "^7.5.5",
|
||||||
|
"@rollup/plugin-alias": "^3.0.1",
|
||||||
"@sveltech/routify": "1.5.0-beta.16",
|
"@sveltech/routify": "1.5.0-beta.16",
|
||||||
"babel-jest": "^24.8.0",
|
"babel-jest": "^24.8.0",
|
||||||
"browser-sync": "^2.26.7",
|
"browser-sync": "^2.26.7",
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import alias from "@rollup/plugin-alias"
|
||||||
import svelte from "rollup-plugin-svelte"
|
import svelte from "rollup-plugin-svelte"
|
||||||
import resolve from "rollup-plugin-node-resolve"
|
import resolve from "rollup-plugin-node-resolve"
|
||||||
import commonjs from "rollup-plugin-commonjs"
|
import commonjs from "rollup-plugin-commonjs"
|
||||||
|
@ -11,6 +12,8 @@ import browsersync from "rollup-plugin-browsersync"
|
||||||
import proxy from "http-proxy-middleware"
|
import proxy from "http-proxy-middleware"
|
||||||
import replace from "rollup-plugin-replace"
|
import replace from "rollup-plugin-replace"
|
||||||
|
|
||||||
|
import path from "path"
|
||||||
|
|
||||||
const target = "http://localhost:4001"
|
const target = "http://localhost:4001"
|
||||||
const _builderProxy = proxy("/_builder", {
|
const _builderProxy = proxy("/_builder", {
|
||||||
target: "http://localhost:3000",
|
target: "http://localhost:3000",
|
||||||
|
@ -142,6 +145,11 @@ const coreExternal = [
|
||||||
"@nx-js/compiler-util",
|
"@nx-js/compiler-util",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const customResolver = resolve({
|
||||||
|
extensions: [".mjs", ".js", ".jsx", ".json", ".sass", ".scss", ".svelte"]
|
||||||
|
})
|
||||||
|
const projectRootDir = path.resolve(__dirname)
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
input: "src/main.js",
|
input: "src/main.js",
|
||||||
output: {
|
output: {
|
||||||
|
@ -151,6 +159,13 @@ export default {
|
||||||
file: `${outputpath}/bundle.js`,
|
file: `${outputpath}/bundle.js`,
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
alias({
|
||||||
|
entries: [
|
||||||
|
{ find: "components", replacement: path.resolve(projectRootDir, 'src/components') },
|
||||||
|
{ find: "builderStore", replacement: path.resolve(projectRootDir, 'src/builderStore') }
|
||||||
|
],
|
||||||
|
customResolver
|
||||||
|
}),
|
||||||
copy({
|
copy({
|
||||||
targets: [
|
targets: [
|
||||||
{ src: "src/index.html", dest: outputpath, rename: "__app.html" },
|
{ src: "src/index.html", dest: outputpath, rename: "__app.html" },
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { createNewHierarchy } from "../common/core"
|
import { createNewHierarchy } from "components/common/core"
|
||||||
|
|
||||||
export const createPackage = (packageInfo, store) => {
|
export const createPackage = (packageInfo, store) => {
|
||||||
packageInfo.createNewPackage("")
|
packageInfo.createNewPackage("")
|
|
@ -1,7 +1,7 @@
|
||||||
import { writable } from "svelte/store"
|
import { writable } from "svelte/store"
|
||||||
import api from "../api"
|
import api from "../api"
|
||||||
import { cloneDeep, sortBy, find, remove } from "lodash/fp"
|
import { cloneDeep, sortBy, find, remove } from "lodash/fp"
|
||||||
import { hierarchy as hierarchyFunctions } from "../../../../../core/src"
|
import { hierarchy as hierarchyFunctions } from "../../../../core/src"
|
||||||
import {
|
import {
|
||||||
getNode,
|
getNode,
|
||||||
validate,
|
validate,
|
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 213 B |
Before Width: | Height: | Size: 254 B After Width: | Height: | Size: 254 B |
Before Width: | Height: | Size: 254 B After Width: | Height: | Size: 254 B |
Before Width: | Height: | Size: 250 B After Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 157 B After Width: | Height: | Size: 157 B |
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 388 B After Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 430 B After Width: | Height: | Size: 430 B |
Before Width: | Height: | Size: 365 B After Width: | Height: | Size: 365 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 305 B After Width: | Height: | Size: 305 B |
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 448 B |
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 447 B |
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 362 B |
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 387 B |
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
|
@ -3,17 +3,17 @@ import {
|
||||||
common,
|
common,
|
||||||
getTemplateApi,
|
getTemplateApi,
|
||||||
getAuthApi,
|
getAuthApi,
|
||||||
} from "../../../../../core/src"
|
} from "../../../../core/src"
|
||||||
import { _getNew } from "../../../../../core/src/recordApi/getNew"
|
import { _getNew } from "../../../../core/src/recordApi/getNew"
|
||||||
import { find, filter, keyBy, flatten, map } from "lodash/fp"
|
import { find, filter, keyBy, flatten, map } from "lodash/fp"
|
||||||
import { generateSchema } from "../../../../../core/src/indexing/indexSchemaCreator"
|
import { generateSchema } from "../../../../core/src/indexing/indexSchemaCreator"
|
||||||
import { generate } from "shortid"
|
import { generate } from "shortid"
|
||||||
|
|
||||||
export { canDeleteIndex } from "../../../../../core/src/templateApi/canDeleteIndex"
|
export { canDeleteIndex } from "../../../../core/src/templateApi/canDeleteIndex"
|
||||||
export { canDeleteRecord } from "../../../../../core/src/templateApi/canDeleteRecord"
|
export { canDeleteRecord } from "../../../../core/src/templateApi/canDeleteRecord"
|
||||||
export { userWithFullAccess } from "../../../../../core/src/index"
|
export { userWithFullAccess } from "../../../../core/src/index"
|
||||||
export { joinKey } from "../../../../../core/src/common"
|
export { joinKey } from "../../../../core/src/common"
|
||||||
export { getExactNodeForKey } from "../../../../../core/src/templateApi/hierarchy"
|
export { getExactNodeForKey } from "../../../../core/src/templateApi/hierarchy"
|
||||||
export const pipe = common.$
|
export const pipe = common.$
|
||||||
|
|
||||||
export const events = common.eventsList
|
export const events = common.eventsList
|
|
@ -1,7 +1,7 @@
|
||||||
import { eventHandlers } from "../../../../../client/src/state/eventHandlers"
|
import { eventHandlers } from "../../../../client/src/state/eventHandlers"
|
||||||
import { writable } from "svelte/store"
|
import { writable } from "svelte/store"
|
||||||
export { EVENT_TYPE_MEMBER_NAME } from "../../../../../client/src/state/eventHandlers"
|
export { EVENT_TYPE_MEMBER_NAME } from "../../../../client/src/state/eventHandlers"
|
||||||
import { createCoreApi } from "../../../../../client/src/core"
|
import { createCoreApi } from "../../../../client/src/core"
|
||||||
|
|
||||||
export const allHandlers = (appDefinition, user) => {
|
export const allHandlers = (appDefinition, user) => {
|
||||||
const coreApi = createCoreApi(appDefinition, user)
|
const coreApi = createCoreApi(appDefinition, user)
|
|
@ -8,7 +8,7 @@
|
||||||
import {
|
import {
|
||||||
hierarchy as hierarchyFunctions,
|
hierarchy as hierarchyFunctions,
|
||||||
common,
|
common,
|
||||||
} from "../../../../../core/src/"
|
} from "../../../../core/src/"
|
||||||
import ErrorsBox from "components/common/ErrorsBox.svelte"
|
import ErrorsBox from "components/common/ErrorsBox.svelte"
|
||||||
import ActionButton from "components/common/ActionButton.svelte"
|
import ActionButton from "components/common/ActionButton.svelte"
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
isDate,
|
isDate,
|
||||||
} from "lodash/fp"
|
} from "lodash/fp"
|
||||||
import { store, backendUiStore } from "builderStore"
|
import { store, backendUiStore } from "builderStore"
|
||||||
import { common, hierarchy } from "../../../../../core/src/"
|
import { common, hierarchy } from "../../../../core/src/"
|
||||||
import { getNode } from "components/common/core"
|
import { getNode } from "components/common/core"
|
||||||
import { templateApi, pipe, validate } from "components/common/core"
|
import { templateApi, pipe, validate } from "components/common/core"
|
||||||
import ErrorsBox from "components/common/ErrorsBox.svelte"
|
import ErrorsBox from "components/common/ErrorsBox.svelte"
|