parent
d89ac86b0b
commit
81e145c319
@ -0,0 +1,60 @@ |
||||
{ |
||||
"name": "@ldo/solid", |
||||
"version": "0.0.1-alpha.17", |
||||
"description": "A library for LDO and Solid", |
||||
"main": "dist/index.js", |
||||
"scripts": { |
||||
"example": "ts-node ./example/example.ts", |
||||
"build": "tsc --project tsconfig.build.json", |
||||
"watch": "tsc --watch", |
||||
"test": "jest --coverage", |
||||
"test:watch": "jest --watch", |
||||
"prepublishOnly": "npm run test && npm run build", |
||||
"build:ldo": "ldo build --input src/.shapes --output src/.ldo", |
||||
"lint": "eslint src/** --fix --no-error-on-unmatched-pattern", |
||||
"docs": "typedoc --plugin typedoc-plugin-markdown" |
||||
}, |
||||
"repository": { |
||||
"type": "git", |
||||
"url": "git+https://github.com/o-development/ldobjects.git" |
||||
}, |
||||
"author": "Jackson Morgan", |
||||
"license": "MIT", |
||||
"bugs": { |
||||
"url": "https://github.com/o-development/ldobjects/issues" |
||||
}, |
||||
"homepage": "https://github.com/o-development/ldobjects/tree/main/packages/solid#readme", |
||||
"devDependencies": { |
||||
"@inrupt/solid-client-authn-core": "^1.17.1", |
||||
"@ldo/cli": "^0.0.1-alpha.17", |
||||
"@rdfjs/data-model": "^1.2.0", |
||||
"@rdfjs/types": "^1.0.1", |
||||
"@solid/community-server": "^6.0.2", |
||||
"@types/jest": "^29.0.3", |
||||
"dotenv": "^16.3.1", |
||||
"jest-rdf": "^1.8.0", |
||||
"ts-jest": "^29.0.2", |
||||
"ts-node": "^10.9.1", |
||||
"typed-emitter": "^2.1.0", |
||||
"typedoc": "^0.25.4", |
||||
"typedoc-plugin-markdown": "^3.17.1" |
||||
}, |
||||
"dependencies": { |
||||
"@inrupt/solid-client": "^1.30.0", |
||||
"@ldo/dataset": "^0.0.1-alpha.17", |
||||
"@ldo/ldo": "^0.0.1-alpha.17", |
||||
"@ldo/rdf-utils": "^0.0.1-alpha.17", |
||||
"@types/parse-link-header": "^2.0.1", |
||||
"cross-fetch": "^3.1.6", |
||||
"http-link-header": "^1.1.1", |
||||
"ts-mixer": "^6.0.3" |
||||
}, |
||||
"files": [ |
||||
"dist", |
||||
"src" |
||||
], |
||||
"publishConfig": { |
||||
"access": "public" |
||||
}, |
||||
"gitHead": "1c242d645fc488f8d0e9f4da7425d9928abf1e9d" |
||||
} |
@ -1,9 +1,10 @@ |
||||
import type { Dataset, Quad } from "@rdfjs/types"; |
||||
import type { BulkEditableDataset } from "@ldo/subscribable-dataset"; |
||||
import type { Quad } from "@rdfjs/types"; |
||||
|
||||
export interface BasicRequestOptions { |
||||
fetch?: typeof fetch; |
||||
} |
||||
|
||||
export interface DatasetRequestOptions extends BasicRequestOptions { |
||||
dataset?: Dataset<Quad>; |
||||
dataset?: BulkEditableDataset<Quad>; |
||||
} |
||||
|
@ -0,0 +1,16 @@ |
||||
/* eslint-disable @typescript-eslint/no-explicit-any */ |
||||
import type { WaitingProcess } from "../../util/RequestBatcher"; |
||||
|
||||
export function modifyQueueByMergingEventsWithTheSameKeys(key: string) { |
||||
return ( |
||||
queue: WaitingProcess<any[], any>[], |
||||
currentlyLoading: WaitingProcess<any[], any> | undefined, |
||||
) => { |
||||
if (queue.length === 0 && currentlyLoading?.name === key) { |
||||
return currentlyLoading; |
||||
} else if (queue[queue.length - 1]?.name === key) { |
||||
return queue[queue.length - 1]; |
||||
} |
||||
return undefined; |
||||
}; |
||||
} |
Loading…
Reference in new issue