Merge pull request #68 from specklesystems/dim/repo-structure
Dim/repo structure
@@ -24,16 +24,15 @@ jobs:
|
||||
SESSION_SECRET: 'keyboard cat'
|
||||
STRATEGY_LOCAL: true
|
||||
CANONICAL_URL: 'http://localhost:3000'
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: 'deps-{{ checksum "package.json" }}'
|
||||
- run: 'npm install'
|
||||
- save_cache:
|
||||
paths:
|
||||
- node_modules
|
||||
key: 'deps-{{ checksum "package.json" }}'
|
||||
- run:
|
||||
command: 'npm install'
|
||||
working_directory: 'packages/server'
|
||||
- run: 'dockerize -wait tcp://localhost:5432 -timeout 1m'
|
||||
- run: 'npm run test:server'
|
||||
- run: 'bash <(curl -s https://codecov.io/bash)'
|
||||
- run:
|
||||
command: 'npm run test'
|
||||
working_directory: 'packages/server'
|
||||
- run:
|
||||
command: 'bash <(curl -s https://codecov.io/bash)'
|
||||
working_directory: 'packages/server'
|
||||
|
||||
@@ -5,3 +5,4 @@ frontend/dist
|
||||
coverage/
|
||||
.env
|
||||
.vscode
|
||||
test-queries
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# The Speckle Frontend App
|
||||
|
||||
Notes:
|
||||
|
||||
- in development mode, the server will proxy the app directly at localhost:3000
|
||||
- in production mode, the server will serve the app statically from the /dist folder.
|
||||
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"packages": [
|
||||
"packages/*"
|
||||
],
|
||||
"version": "independent"
|
||||
}
|
||||
@@ -1,89 +1,7 @@
|
||||
{
|
||||
"name": "speckle-server",
|
||||
"version": "2.0.0",
|
||||
"description": "",
|
||||
"homepage": "https://github.com/specklesystems/server",
|
||||
"author": "AEC Systems",
|
||||
"license": "SEE LICENSE IN readme.md",
|
||||
"main": "./bin/www",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/specklesystems/Server.git"
|
||||
},
|
||||
"scripts": {
|
||||
"dev:all": "cross-env concurrently --kill-others \"npm run dev:server\" \"npm run dev:frontend\"",
|
||||
"dev:frontend": "cd frontend && npm run serve",
|
||||
"build:frontend": "cd frontend && npm run build",
|
||||
"dev:server": "cross-env NODE_ENV=development DEBUG=speckle:* nodemon ./bin/www --watch . --watch ./bin/www -e js,graphql,env",
|
||||
"dev:server:test": "cross-env NODE_ENV=test DEBUG=speckle:* node ./bin/www",
|
||||
"test:server": "cross-env PORT=3001 NODE_ENV=test nyc nyc --reporter html --reporter lcovonly mocha -s 0 --timeout 10000 --exit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sentry/node": "^5.29.2",
|
||||
"@sentry/tracing": "^5.29.2",
|
||||
"apollo-server-express": "^2.19.0",
|
||||
"apollo-server-testing": "^2.19.0",
|
||||
"app-root-path": "^3.0.0",
|
||||
"auto-load": "^3.0.4",
|
||||
"bcrypt": "^5.0.0",
|
||||
"body-parser": "^1.19.0",
|
||||
"busboy": "^0.3.1",
|
||||
"compression": "^1.7.4",
|
||||
"connect-redis": "^4.0.4",
|
||||
"crypto-random-string": "^3.2.0",
|
||||
"debug": "^4.3.1",
|
||||
"dotenv": "^8.2.0",
|
||||
"express": "^4.17.1",
|
||||
"express-session": "^1.17.1",
|
||||
"graphql": "^14.6.0",
|
||||
"graphql-redis-subscriptions": "^2.2.2",
|
||||
"graphql-scalars": "^1.6.1",
|
||||
"graphql-tag": "^2.11.0",
|
||||
"graphql-tools": "^4.0.7",
|
||||
"ioredis": "^4.19.4",
|
||||
"knex": "^0.21.14",
|
||||
"lodash.chunk": "^4.2.0",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.get": "^4.4.2",
|
||||
"lodash.merge": "^4.6.2",
|
||||
"lodash.set": "^4.3.2",
|
||||
"lodash.values": "^4.3.0",
|
||||
"morgan": "^1.10.0",
|
||||
"morgan-debug": "^2.0.0",
|
||||
"node-machine-id": "^1.1.12",
|
||||
"passport": "^0.4.1",
|
||||
"passport-github2": "^0.1.12",
|
||||
"passport-google-oauth2": "^0.2.0",
|
||||
"passport-google-oauth20": "^2.0.0",
|
||||
"pg": "^8.5.1",
|
||||
"pg-query-stream": "^3.4.2",
|
||||
"redis": "^3.0.2",
|
||||
"zxcvbn": "^4.4.2"
|
||||
},
|
||||
"name": "root",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@apollo/client": "^3.3.6",
|
||||
"apollo-cache-inmemory": "^1.6.6",
|
||||
"apollo-client": "^2.6.10",
|
||||
"apollo-link": "^1.2.14",
|
||||
"apollo-link-http": "^1.5.17",
|
||||
"apollo-link-ws": "^1.0.20",
|
||||
"chai": "^4.2.0",
|
||||
"chai-http": "^4.3.0",
|
||||
"concurrently": "^5.2.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"cz-conventional-changelog": "^3.1.0",
|
||||
"eslint": "^7.16.0",
|
||||
"http-proxy-middleware": "^1.0.6",
|
||||
"mocha": "^7.2.0",
|
||||
"node-fetch": "^2.6.1",
|
||||
"nodemon": "^2.0.6",
|
||||
"nyc": "^15.0.1",
|
||||
"supertest": "^4.0.2",
|
||||
"ws": "^7.4.1"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
}
|
||||
"lerna": "^3.22.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# The Speckle Frontend App
|
||||
|
||||
[](https://twitter.com/SpeckleSystems) [](https://discourse.speckle.works)
|
||||
[](https://speckle-works.slack.com/join/shared_invite/enQtNjY5Mzk2NTYxNTA4LTU4MWI5ZjdhMjFmMTIxZDIzOTAzMzRmMTZhY2QxMmM1ZjVmNzJmZGMzMDVlZmJjYWQxYWU0MWJkYmY3N2JjNGI) [](https://speckle.systems)
|
||||
|
||||
## Disclaimer
|
||||
We're working to stabilize the 2.0 API, and until then there will be breaking changes.
|
||||
|
||||
Notes:
|
||||
|
||||
- In **development** mode, the Speckle Server will proxy the frontend from `localhost:8080` to `localhost:3000`. If you don't see anything, ensure you've run `npm run dev` in the frontend package.
|
||||
|
||||
- In **production** mode, the Speckle Server will statically serve the frontend app from `/dist`. You will need to run `npm run build` to populate this folder.
|
||||
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
## Community
|
||||
|
||||
If in trouble, the Speckle Community hangs out in two main places, usually:
|
||||
- on [the forum](https://discourse.speckle.works)
|
||||
- on [the chat](https://speckle-works.slack.com/join/shared_invite/enQtNjY5Mzk2NTYxNTA4LTU4MWI5ZjdhMjFmMTIxZDIzOTAzMzRmMTZhY2QxMmM1ZjVmNzJmZGMzMDVlZmJjYWQxYWU0MWJkYmY3N2JjNGI)
|
||||
|
||||
Do join and introduce yourself! We're happy to help.
|
||||
|
||||
## License
|
||||
Unless otherwise described, the code in this repository is licensed under the Apache-2.0 License. Please note that some modules, extensions or code herein might be otherwise licensed. This is indicated either in the root of the containing folder under a different license file, or in the respective file's header. If you have any questions, don't hesitate to get in touch with us via [email](mailto:hello@speckle.systems).
|
||||
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title>Speckle!</title><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css><link href=/js/chunk-2d22d746.95802905.js rel=prefetch><link href=/css/chunk-vendors.166fd10e.css rel=preload as=style><link href=/js/app.d87c0378.js rel=preload as=script><link href=/js/chunk-vendors.d0101c4c.js rel=preload as=script><link href=/css/chunk-vendors.166fd10e.css rel=stylesheet></head><body><noscript><strong>We're sorry but Speckle doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app><div style="width: 500px;
|
||||
height: 300px;
|
||||
line-height: 300px;
|
||||
font-family: sans-serif !important;
|
||||
position: absolute;
|
||||
top:0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
font-size: 60px;">🔑</div><script src=/js/chunk-vendors.d0101c4c.js></script><script src=/js/app.d87c0378.js></script></div></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title>Speckle Authentication</title><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css><link href=/css/chunk-8a745654.cc701a71.css rel=prefetch><link href=/css/chunk-a84ba648.811ab999.css rel=prefetch><link href=/js/chunk-2d0c7e58.005edb5a.js rel=prefetch><link href=/js/chunk-2d226189.28513e35.js rel=prefetch><link href=/js/chunk-8a745654.4f583db6.js rel=prefetch><link href=/js/chunk-a84ba648.95f05f26.js rel=prefetch><link href=/css/chunk-vendors.166fd10e.css rel=preload as=style><link href=/js/auth.7008088e.js rel=preload as=script><link href=/js/chunk-vendors.d0101c4c.js rel=preload as=script><link href=/css/chunk-vendors.166fd10e.css rel=stylesheet></head><body><noscript><strong>We're sorry but Speckle Authentication doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.d0101c4c.js></script><script src=/js/auth.7008088e.js></script></body></html>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1 @@
|
||||
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 87.5 100"><defs><style>.cls-1{fill:#1697f6;}.cls-2{fill:#7bc6ff;}.cls-3{fill:#1867c0;}.cls-4{fill:#aeddff;}</style></defs><title>Artboard 46</title><polyline class="cls-1" points="43.75 0 23.31 0 43.75 48.32"/><polygon class="cls-2" points="43.75 62.5 43.75 100 0 14.58 22.92 14.58 43.75 62.5"/><polyline class="cls-3" points="43.75 0 64.19 0 43.75 48.32"/><polygon class="cls-4" points="64.58 14.58 87.5 14.58 43.75 100 43.75 62.5 64.58 14.58"/></svg>
|
||||
|
After Width: | Height: | Size: 539 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,2 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c7e58"],{5326:function(e,r,t){"use strict";t.r(r);var a=function(){var e=this,r=e.$createElement,t=e._self._c||r;return e.hasLocalStrategy?t("v-container",{attrs:{fluid:""}},[t("v-form",{ref:"form"},[t("v-row",{staticStyle:{"margin-top":"-10px"},attrs:{dense:""}},[t("v-col",{attrs:{cols:"12"}},[t("v-text-field",{attrs:{label:"your email",rules:e.validation.emailRules,solo:""},model:{value:e.form.email,callback:function(r){e.$set(e.form,"email",r)},expression:"form.email"}})],1),t("v-col",{attrs:{cols:"12"}},[t("v-text-field",{staticStyle:{"margin-top":"-12px"},attrs:{label:"password",type:"password",rules:e.validation.passwordRules,solo:""},model:{value:e.form.password,callback:function(r){e.$set(e.form,"password",r)},expression:"form.password"}}),t("v-btn",{staticStyle:{top:"-22px"},attrs:{block:"",large:"",color:"accent"},on:{click:e.loginUser}},[e._v("Log in")]),t("p",{staticClass:"text-center"},[t("v-btn",{attrs:{text:"",small:"",block:"",color:"accent",to:{name:"Register",query:{appId:e.$route.query.appId}}}},[e._v("Create Account")])],1)],1)],1)],1),t("v-snackbar",{attrs:{"multi-line":""},model:{value:e.registrationError,callback:function(r){e.registrationError=r},expression:"registrationError"}},[e._v(" "+e._s(e.errorMessage)+" "),t("v-btn",{attrs:{color:"red",text:""},on:{click:function(r){e.registrationError=!1}}},[e._v(" Close ")])],1)],1):e._e()},o=[],n=(t("99af"),t("c740"),t("d3b7"),t("ac1f"),t("3ca3"),t("841c"),t("ddb0"),t("2b3d"),t("96cf"),t("1da1")),l=t("8785"),s=t("9530"),i=t.n(s),c=(t("ca94"),t("f7fe"),t("4556")),u=t.n(c);function d(){var e=Object(l["a"])([" query { serverInfo { name company adminContact termsOfService scopes { name description } authStrategies { id name color icon url } } } "]);return d=function(){return e},e}var p={name:"Login",apollo:{serverInfo:{query:i()(d())}},computed:{hasLocalStrategy:function(){return-1!==this.serverInfo.authStrategies.findIndex((function(e){return"local"===e.id}))}},methods:{loginUser:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function r(){var t,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(r.prev=0,t=e.$refs.form.validate(),t){r.next=4;break}throw new Error("Form validation failed");case 4:return r.next=6,fetch("/auth/local/login?appId=".concat(e.appId,"&challenge=").concat(e.challenge),{method:"POST",headers:{"Content-Type":"application/json"},redirect:"follow",body:JSON.stringify({email:e.form.email,password:e.form.password})});case 6:if(a=r.sent,console.log(a),a.redirected&&(window.location=a.url),a.ok){r.next=11;break}throw new Error("Login failed");case 11:r.next=17;break;case 13:r.prev=13,r.t0=r["catch"](0),e.errorMessage=r.t0.message,e.registrationError=!0;case 17:case"end":return r.stop()}}),r,null,[[0,13]])})))()}},data:function(){return{serverInfo:{authStrategies:[]},form:{email:null,password:null},validation:{passwordRules:[function(e){return!!e||"Required"}],emailRules:[function(e){return!!e||"E-mail is required"},function(e){return/.+@.+\..+/.test(e)||"E-mail must be valid"}]},registrationError:!1,errorMessage:"",appId:null,serverApp:null}},mounted:function(){var e=new URLSearchParams(window.location.search),r=e.get("appId"),t=e.get("challenge");this.appId=r||"spklwebapp",t||"spklwebapp"!==this.appId?t&&(this.challenge=t):(this.challenge=u()({length:10}),localStorage.setItem("appChallenge",this.challenge))}},f=p,m=t("2877"),g=t("6544"),v=t.n(g),h=t("8336"),w=t("62ad"),b=t("a523"),k=t("4bd4"),x=t("0fd9"),y=t("2db4"),I=t("8654"),S=Object(m["a"])(f,a,o,!1,null,null,null);r["default"]=S.exports;v()(S,{VBtn:h["a"],VCol:w["a"],VContainer:b["a"],VForm:k["a"],VRow:x["a"],VSnackbar:y["a"],VTextField:I["a"]})}}]);
|
||||
//# sourceMappingURL=chunk-2d0c7e58.005edb5a.js.map
|
||||
@@ -0,0 +1,2 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22d746"],{f820:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},s=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"about"},[n("h1",[t._v("This is an about page")])])}],u=n("2877"),c={},i=Object(u["a"])(c,a,s,!1,null,null,null);e["default"]=i.exports}}]);
|
||||
//# sourceMappingURL=chunk-2d22d746.95802905.js.map
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "frontend",
|
||||
"version": "0.1.0",
|
||||
"name": "@speckle/frontend",
|
||||
"version": "2.1.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -1,8 +1,9 @@
|
||||
{
|
||||
"name": "frontend",
|
||||
"version": "0.1.0",
|
||||
"name": "@speckle/frontend",
|
||||
"version": "2.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"build:setup": "vue-cli-service build",
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 871 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g transform="matrix(1,0,0,1,-4531,-5539)">
|
||||
<g id="Artboard1" transform="matrix(1,0,0,1,4187.76,4786.57)">
|
||||
<rect x="0" y="0" width="3840" height="2160" style="fill:none;"/>
|
||||
<g transform="matrix(0.464023,-0.0256584,0,0.465442,142.078,679.424)">
|
||||
<rect x="1294.87" y="614.156" width="204.453" height="204.719" style="fill:rgb(4,126,251);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.459998,-0.0254359,0.24376,0.219132,280.374,798.898)">
|
||||
<rect x="643.94" y="618.105" width="206.242" height="64.29" style="fill:rgb(123,188,255);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.168269,0.151268,0,0.624912,434.991,941.085)">
|
||||
<rect x="1736.88" y="-457.431" width="93.132" height="152.477" style="fill:rgb(49,59,207);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.606506,-0.0335371,0,0.609944,-2858.9,-955.205)">
|
||||
<text x="5970.62px" y="3532.8px" style="font-family:'Iosevka', monospace;font-size:92.552px;fill:white;">S2</text>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |