-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use re-bundles solid client to login (#81)
* build: re-bundle inrupt sdk * build: export all modules of the solid client * build: minify solid client bundle * feat: login by using the solid sdk service * style: fixed newlines * fix: don't become authenticated before redirect
- Loading branch information
Showing
19 changed files
with
10,316 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"extends": [ | ||
"../../.eslintrc" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
registry=https://registry.npmjs.org/ | ||
|
||
@digita-ai:registry=https://npm.pkg.github.com | ||
//npm.pkg.github.com/:_authToken=${NPM_TOKEN} | ||
always-auth=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * as authn from '@inrupt/solid-client-authn-browser'; | ||
export * as client from '@inrupt/solid-client'; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"name": "@digita-ai/nde-erfgoed-client", | ||
"version": "0.0.1", | ||
"description": "Re-bundled version of the Solid client.", | ||
"author": "Wouter Janssens <wouter@digita.ai>", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "rimraf ./dist && webpack", | ||
"build:dev": "npm run build", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint --fix ." | ||
}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^4.10.0", | ||
"@typescript-eslint/parser": "^4.10.0", | ||
"eslint": "^7.16.0", | ||
"rimraf": "^3.0.2", | ||
"ts-loader": "9.1.1", | ||
"typescript": "^4.1.3", | ||
"webpack": "^5.36.1", | ||
"webpack-cli": "^4.6.0" | ||
}, | ||
"publishConfig": { | ||
"registry": "https://npm.pkg.github.com/" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/digita-ai/nde-erfgoedinstellingen.git", | ||
"directory": "packages/nde-erfgoed-core" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/digita-ai/nde-erfgoedinstellingen/issues" | ||
}, | ||
"dependencies": { | ||
"@inrupt/solid-client": "1.6.1", | ||
"@inrupt/solid-client-authn-browser": "1.8.0", | ||
"rxjs": "^6.6.7" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"compilerOptions": { | ||
// Recommended by Lit Element | ||
"module": "es2015", | ||
"target": "es2017", | ||
"lib": [ | ||
"es2017", | ||
"dom" | ||
], | ||
"moduleResolution": "node", | ||
"experimentalDecorators": true, | ||
// Others | ||
"sourceMap": true, | ||
"declaration": true, | ||
"outDir": "dist", | ||
"typeRoots": [ | ||
"node_modules/@types" | ||
], | ||
"baseUrl": "./", | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"allowJs": true, | ||
"noImplicitAny": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"downlevelIteration": true, | ||
"suppressImplicitAnyIndexErrors": true, | ||
}, | ||
"include": ["lib"], | ||
"exclude": [ | ||
"**/*.spec.ts", | ||
"node_modules", | ||
"dist" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const path = require('path'); | ||
module.exports = { | ||
mode: 'production', | ||
entry: './lib/index.ts', | ||
devtool: 'source-map', | ||
output: { | ||
publicPath: '', | ||
libraryTarget: 'module', | ||
path: path.resolve(__dirname, 'dist'), | ||
filename: 'index.js' | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.tsx?$/, | ||
use: 'ts-loader', | ||
exclude: /node_modules/, | ||
}, | ||
] | ||
}, | ||
resolve: { | ||
extensions: ['.ts', '.js'], | ||
fallback: { | ||
stream: require.resolve('stream-browserify') , | ||
crypto: require.resolve('crypto-browserify') | ||
} | ||
}, | ||
experiments: { | ||
outputModule: true | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/nde-erfgoed-core/lib/errors/not-implemented-error.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { BaseError } from './base-error'; | ||
|
||
/** | ||
* An error thrown when a function is called with invalid arguments. | ||
*/ | ||
export class NotImplementedError extends BaseError { | ||
public readonly name = NotImplementedError.name; | ||
|
||
/** | ||
* Instantiates the error. | ||
* | ||
* @param message A message which describes the error. | ||
* @param value The value of the invalid argument. | ||
* @param cause The underlying error. | ||
*/ | ||
constructor(cause?: Error) { | ||
super('Not implemented', cause); | ||
|
||
Object.setPrototypeOf(this, NotImplementedError.prototype); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.