Skip to content
Open
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
9 changes: 0 additions & 9 deletions .babelrc

This file was deleted.

2 changes: 0 additions & 2 deletions .browserslistrc

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
strategy:
matrix:
node-version:
- 18.x
- 20.x
- 22.x
steps:
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ You can see and try out a SolidOS Databrowser Webapp deployment at <https://soli

`browse.html`serves as a perfect example for Solid WebID authentication and for making use of mashlib functions and variables.

To run/test it locally we created a script `npm run startStaticOS`.
To run/test locally we created a script `npm run start`.

### SolidOS Databrowser Frontend

Expand All @@ -97,18 +97,18 @@ What does `global` mean in mashlib? We mean the `global object` which depends on

These are the most important window context/global variables and the sub-repos from which they are exported:

- [**solid-logic**](https://github.com/solidos/solid-logic/blob/f606b31382a416ee6188930c3ca05cb4ae73cbda/src/index.ts#L29) exports among others: `solidLogicSingleton`, `authn`, `authSession`, `store`, `chat`, `profile`
- [**solid-logic**](https://github.com/solidos/solid-logic/blob/f606b31382a416ee6188930c3ca05cb4ae73cbda/src/index.ts#L29) exports among others: `SolidLogic`
- [**pane-registry**](https://github.com/solidos/pane-registry) is exported entirely through the pane-registry variable
- [**solid-ui**](https://github.com/solidos/solid-ui/blob/c5a8888d6cb61363bc0445be007e3c96de593338/src/index.ts#L79) exports among others: authn, store, rdf, dom under the `UI` variable
- [**solid-panes**](https://github.com/solidos/solid-panes/blob/033f48f8987364cb131455b13e8b0637da95a5ab/src/index.ts#L53) exports getOutliner and the entire solid-ui through the `UI` variable, and solid-panes itself can be used through the `panes` variable

For backward compatibility reasons, there are now different ways to make use of the same variables from mashlib. For example:

- to make use of the UI (solid-ui) one can use `UI` or `panes.UI`
- authentication session, part of solid-logic, can be called as `authSession` or `UI.authn.authSession` or `panes.UI.authn.authSession`
- the store (from solid-logic) can be used as `store` or `UI.store` or `panes.UI.store`
- rdflib is entirely acessible as `UI.rdf` or `panes.UI.rdf`
- the currentUser function is called as `authn.currentUser()` or `UI.auth.currentUser()` or `panes.UI.authn.currentUser()`
- to make use of the UI (solid-ui) one can use `UI` BUT NOT `panes.UI` anymore
- authentication session, part of solid-logic, can be called as `SolidLogic.authSession` BUT NOT `UI.authn.authSession` nor `panes.UI.authn.authSession` anymore
- the store (from solid-logic) can be used as `SolidLogic.store` BUT NOT `UI.store` nor `panes.UI.store` anymore
- rdflib NOT entirely acessible as `UI.rdf` or `panes.UI.rdf` anymore but as `$rdf`
- the currentUser function is called as `SolidLogic.authn.currentUser()` BUT NOT `UI.auth.currentUser()` nor `panes.UI.authn.currentUser()` anymore

You can see example usage in the [SolidOS Databrowser Webapp code](https://github.com/solidos/mashlib/blob/main/static/browse.html#L11).

Expand All @@ -130,7 +130,7 @@ Some packages have been moved and with them some functions too. Here we report o
Functions that moved:

* `currentUser`, `checkUser`, `saveUser`, `offlineTestID` are now part of `solid-logic/authn/SolidAuthnLogic.ts`-> this is because `authn` itself moved to solid-logic.
* `setACLUserPublic`, `fetchACLRel` are not part of `solid-logic/src/acl/aclLogic.ts/` and are exported in [index.ts](https://github.com/solidos/solid-logic/blob/f606b31382a416ee6188930c3ca05cb4ae73cbda/src/index.ts#L12).
* `setACLUserPublic`, `fetchACLRel` are now part of `solid-logic/src/acl/aclLogic.ts/` and are exported in [index.ts](https://github.com/solidos/solid-logic/blob/f606b31382a416ee6188930c3ca05cb4ae73cbda/src/index.ts#L12).
* `loadIndex`, `loadTypeIndexes`, `ensureTypeIndexes`, `registerInTypeIndex` and are exported in [index.ts](https://github.com/solidos/solid-logic/blob/f606b31382a416ee6188930c3ca05cb4ae73cbda/src/index.ts#L16).

## The databrowser hack: upgrading your browser
Expand Down
9 changes: 9 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
],
plugins: [
'@babel/plugin-transform-runtime'
]
}
78 changes: 52 additions & 26 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,34 +1,60 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import tseslintPlugin from '@typescript-eslint/eslint-plugin'
import globals from 'globals'
import tsParser from '@typescript-eslint/parser'

export default [{
ignores: ["**/dist"],
}, {
plugins: {
"@typescript-eslint": typescriptEslint,
export default [
{
ignores: [
'node_modules/**',
'dist/**',
],
},
{
files: ['src/**/*.js', 'src/**/*.cjs', 'src/**/*.mjs'],

languageOptions: {
languageOptions: {
globals: {
...globals.browser,
...globals.node,
Atomics: "readonly",
SharedArrayBuffer: "readonly",
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
}
},
rules: {
semi: ['error', 'never'],
quotes: ['error', 'single'],
'no-console': 'error',
'no-unused-vars': 'error',
'no-undef': 'error'
},

parser: tsParser,
},
files: ["src/**/*.ts"],
rules: {
"no-unused-vars": ["warn", {
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
}],

"@typescript-eslint/no-unused-vars": ["warn", {
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
}],
},
}];
{
files: ["src/**/*.ts"],
plugins: {
"@typescript-eslint": tseslintPlugin,
},
languageOptions: {
globals: {
...globals.browser,
...globals.node,
Atomics: "readonly",
SharedArrayBuffer: "readonly",
},
parser: tsParser,
parserOptions: {
project: ['./tsconfig.json']
},
},

rules: {
semi: ['error', 'never'],
quotes: ['error', 'single'],
'no-console': 'warn',
'no-unused-vars': 'off',
"@typescript-eslint/no-unused-vars": ["warn", {
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
}],
},
}
]
116 changes: 0 additions & 116 deletions local-webpack.config.js

This file was deleted.

Loading