Skip to content
This repository was archived by the owner on Apr 13, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind also removing this in the package.json - https://github.com/solid/solid-client/blob/master/package.json#L27-L30

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, will remove.

}
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
"postversion": "git push --follow-tags",
"prepublish": "npm run test && npm run build"
},
"babel": {
"presets": [
"es2015"
]
},
"repository": {
"type": "git",
"url": "https://github.com/solid/solid-client"
Expand Down Expand Up @@ -57,10 +52,11 @@
"dependencies": {
"rdflib": "^0.13.0",
"shorthash": "0.0.2",
"solid-auth-oidc": "0.0.5",
"solid-auth-tls": "0.0.4",
"solid-namespace": "^0.1.0",
"solid-permissions": "^0.5.1",
"solid-web-client": "^0.2.0"
"solid-web-client": "^0.3.0"
},
"devDependencies": {
"babel-cli": "^6.18.0",
Expand All @@ -69,7 +65,7 @@
"json-loader": "^0.5.4",
"nock": "^9.0.2",
"qunit": "^0.9.0",
"sinon": "^1.17.6",
"sinon": "^2.1.0",
"standard": "^5.4.1",
"tape": "^4.4.0",
"webpack": "^1.13.1"
Expand Down
13 changes: 8 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ https://github.com/solid/solid
*/

const rdf = require('./util/rdf-parser')
const webClient = require('solid-web-client')(rdf)
const ClientAuthOIDC = require('solid-auth-oidc')
const auth = new ClientAuthOIDC()
const webClient = require('solid-web-client')(rdf, { auth })
const ClientAuthTLS = require('solid-auth-tls')
const auth = new ClientAuthTLS(webClient)
const tls = new ClientAuthTLS(webClient)
const identity = require('./identity')
const ns = require('solid-namespace')(rdf)
const acl = require('solid-permissions')
Expand All @@ -50,13 +52,14 @@ const Solid = {
AppRegistration: require('./solid/app-registration'),
appRegistry: require('./app-registry'),
auth,
tls,
config: require('../config'),
currentUser: auth.currentUser.bind(auth),
currentUser: tls.currentUser.bind(tls),
identity: require('./identity'),
login: auth.login.bind(auth),
login: tls.login.bind(tls),
meta: require('./meta'),
rdflib: rdf,
signup: auth.signup.bind(auth),
signup: tls.signup.bind(tls),
status: require('./status'),
typeRegistry: require('./type-registry'),
vocab: ns,
Expand Down
8 changes: 6 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ module.exports = {
fs: 'empty'
},
externals: {
xhr2: 'XMLHttpRequest',
xmlhttprequest: 'XMLHttpRequest'
'xhr2': 'XMLHttpRequest',
'xmlhttprequest': 'XMLHttpRequest',
'node-fetch': 'fetch',
'text-encoding': 'TextEncoder',
'urlutils': 'URL',
'webcrypto': 'crypto'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all these externals necessary? They're declared identically in solid-auth-oidc's webpack config.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd love to find a way to not include them; haven't been able to get it to work without.

},
devtool: 'source-map'
}