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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/
tests/
vendor/
dist/
lib/
19 changes: 8 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
"name": "solid-client",
"version": "0.22.4",
"description": "Common library for writing Solid read-write-web applications",
"main": "./index.js",
"main": "./lib/index.js",
"files": [
"index.js",
"config.js",
"lib",
"dist"
],
"scripts": {
"build-lib": "babel src -d lib",
"build-full": "webpack --progress --config webpack.config.js --output-filename solid-client-full.js",
"build-with-rdflib": "webpack --progress --colors --optimize-minimize --optimize-occurrence-order --optimize-dedupe --config webpack.config.js",
"build-without-rdflib": "webpack --progress --colors --optimize-minimize --optimize-occurrence-order --optimize-dedupe --config webpack-no-rdflib.config.js",
"build-qunit-resources": "npm run clean && mkdir -p dist/resources && npm run build-full && browserify -r ./test/resources/profile-minimal.js:test-minimal-profile -o dist/resources/test-minimal-profile.js && browserify -r ./test/resources/profile-private.js:test-minimal-prefs -o dist/resources/test-minimal-prefs.js",
"build": "npm run clean && mkdir dist && npm run build-with-rdflib && npm run build-without-rdflib",
"build": "npm run clean && mkdir dist && npm run build-lib && npm run build-with-rdflib && npm run build-without-rdflib",
"clean": "rm -rf dist/",
"standard": "standard lib/*",
"standard": "standard src/*",
"tape": "tape test/unit/*.js",
"test": "npm run standard && npm run tape",
"qunit": "npm run build-qunit-resources && open test/integration/index.html",
"preversion": "npm test",
"postversion": "git push --follow-tags",
"prepublish": "npm run build"
"prepublish": "npm run test && npm run build"
},
"babel": {
"presets": [
Expand Down Expand Up @@ -55,19 +55,16 @@
},
"homepage": "https://github.com/solid/solid-client",
"dependencies": {
"babel-cli": "^6.18.0",
"babel-preset-es2015": "^6.18.0",
"rdflib": "^0.12.1",
"shorthash": "0.0.2",
"solid-auth-tls": "0.0.4",
"solid-namespace": "^0.1.0",
"solid-permissions": "^0.4.1",
"solid-permissions": "^0.5.0",
"solid-web-client": "0.0.9"
},
"devDependencies": {
"babel-cli": "^6.11.4",
"babel-core": "^6.11.4",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.9.0",
"blue-tape": "^0.2.0",
"json-loader": "^0.5.4",
"qunit": "^0.9.0",
"standard": "^5.4.1",
Expand Down
File renamed without changes.
File renamed without changes.
34 changes: 17 additions & 17 deletions index.js → src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,32 @@ https://github.com/solid/solid
* @main solid-client
*/

var rdf = require('./lib/util/rdf-parser')
var acl = require('solid-permissions')
var webClient = require('solid-web-client')(rdf)
var ClientAuthTLS = require('solid-auth-tls')
var auth = new ClientAuthTLS(webClient)
var identity = require('./lib/identity')
var ns = require('solid-namespace')(rdf)
const rdf = require('./util/rdf-parser')
const webClient = require('solid-web-client')(rdf)
const ClientAuthTLS = require('solid-auth-tls')
const auth = new ClientAuthTLS(webClient)
const identity = require('./identity')
const ns = require('solid-namespace')(rdf)
const acl = require('solid-permissions')

/**
* @class Solid
* @static
*/
var Solid = {
acl: acl.acl,
AppRegistration: require('./lib/solid/app-registration'),
appRegistry: require('./lib/app-registry'),
auth: auth,
config: require('./config'),
const Solid = {
acl,
AppRegistration: require('./solid/app-registration'),
appRegistry: require('./app-registry'),
auth,
config: require('../config'),
currentUser: auth.currentUser.bind(auth),
identity: require('./lib/identity'),
identity: require('./identity'),
login: auth.login.bind(auth),
meta: require('./lib/meta'),
meta: require('./meta'),
rdflib: rdf,
signup: auth.signup.bind(auth),
status: require('./lib/status'),
typeRegistry: require('./lib/type-registry'),
status: require('./status'),
typeRegistry: require('./type-registry'),
vocab: ns,
web: webClient
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 0 additions & 31 deletions test/resources/acl-container-ttl.js

This file was deleted.

10 changes: 5 additions & 5 deletions test/unit/app-registry-test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict'

var appRegistry = require('../../lib/app-registry')
var parseGraph = require('../../lib/util/graph-util').parseGraph
var registry = require('../../lib/registry')
var appRegistry = require('../../src/app-registry')
var parseGraph = require('../../src/util/graph-util').parseGraph
var registry = require('../../src/registry')
var test = require('tape')
var AppRegistration = require('../../lib/solid/app-registration')
var AppRegistration = require('../../src/solid/app-registration')

var rdf = require('../../lib/util/rdf-parser')
var rdf = require('../../src/util/rdf-parser')
var vocab = require('solid-namespace')(rdf)

test('blankPublicAppRegistry() test', function (t) {
Expand Down
13 changes: 13 additions & 0 deletions test/unit/solid-client-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use strict'
const test = require('tape')
const solid = require('../../src/index')

test('solid-permissions api export test', t => {
t.ok(solid.acl, 'solid-permissions lib not exposed as solid.acl')
t.ok(solid.acl.Authorization)
t.ok(solid.acl.PermissionSet)
t.ok(solid.acl.READ && solid.acl.WRITE && solid.acl.APPEND &&
solid.acl.CONTROL)
t.ok(solid.acl.ALL_MODES)
t.end()
})
6 changes: 3 additions & 3 deletions test/unit/solid-profile-test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict'

var test = require('tape')
var SolidProfile = require('../../lib/solid/profile')
var parseGraph = require('../../lib/util/graph-util').parseGraph
var SolidProfile = require('../../src/solid/profile')
var parseGraph = require('../../src/util/graph-util').parseGraph

var rdf = require('../../lib/util/rdf-parser')
var rdf = require('../../src/util/rdf-parser')
var vocab = require('solid-namespace')(rdf)

var rawProfileSource = require('../resources/profile-extended')
Expand Down
10 changes: 5 additions & 5 deletions test/unit/type-registry-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use strict'

var registry = require('../../lib/registry')
var registry = require('../../src/registry')
var test = require('tape')
var typeRegistry = require('../../lib/type-registry')
var parseGraph = require('../../lib/util/graph-util').parseGraph
var SolidProfile = require('../../lib/solid/profile')
var rdf = require('../../lib/util/rdf-parser')
var typeRegistry = require('../../src/type-registry')
var parseGraph = require('../../src/util/graph-util').parseGraph
var SolidProfile = require('../../src/solid/profile')
var rdf = require('../../src/util/rdf-parser')
var vocab = require('solid-namespace')(rdf)

var rawProfileSource = require('../resources/profile-extended')
Expand Down
2 changes: 1 addition & 1 deletion test/unit/vocab-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

var test = require('tape')
var solid = require('../../index')
var solid = require('../../src/index')

test('solid.vocab test', function (t) {
t.plan(1)
Expand Down
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var path = require('path')

module.exports = {
entry: [
'./index.js'
'./lib/index.js'
],
output: {
path: path.join(__dirname, '/dist/'),
Expand All @@ -19,7 +19,7 @@ module.exports = {
loaders: [
{
test: /\.js$/,
// exclude: /(node_modules)/,
exclude: /(node_modules)/,
loader: 'babel',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, I made a comment above about how we should be using babel in the webpack build, not realizing that we already did. We definitely should not be deleting this, otherwise solid-client won't work in browsers.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I removed it from the webpack config because it's made redundant -- the webpack entry point now points to lib/, which is already pre-transpiled.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see. I'd still recommend keeping this, and pointing webpack at the src directory because

  • It removes a dependency on the state of the dev environment
  • Everyone does it this way (I know, I know...)

query: {
presets: ['es2015']
Expand Down