diff --git a/package.json b/package.json index a3cebef..4679413 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,8 @@ "i": "^0.3.7", "typescript": "^5.0.2", "vite": "^4.3.2", - "vitest": "^0.31.1" + "vitest": "^0.31.1", + "fake-indexeddb": "^5.0.2" }, "files": [ "dist" diff --git a/src/bag.manager.ts b/src/bag.manager.ts index fc9b916..93d2096 100644 --- a/src/bag.manager.ts +++ b/src/bag.manager.ts @@ -2,6 +2,9 @@ import {CreateBag} from "./saddlebag_engine.ts"; import {Bag} from "./saddlebag.ts"; +export const BAG_OBJECT_STORE = 'bags'; +export const BAG_DB_NAME = 'saddlebag'; + /** * BagManager is a singleton that manages all the bags in the application. */ @@ -25,31 +28,103 @@ export interface BagManager { * Reset all bags to their initial state. */ resetBags(): void; + + /** + * Load all stateful bags from IndexedDB. + * @return {Promise} a promise that resolves when all bags are loaded + */ + loadStatefulBags(): Promise; + + /** + * Get the indexedDB database + * @return {IDBDatabase | null} the indexedDB database + */ + get db(): IDBDatabase | null; + +} + +interface BagDB { + db: IDBDatabase | undefined; } class saddlebagManager implements BagManager { private _bags: Map>; + private readonly _stateful: boolean; + private _db: IDBDatabase | undefined - constructor() { + constructor(stateful: boolean) { this._bags = new Map>(); + this._stateful = stateful; + } + + loadStatefulBags(): Promise { + return new Promise((resolve, reject) => { + const request = indexedDB.open(BAG_DB_NAME, 1); + request.onupgradeneeded = () => { + // @ts-ignore + this._db = request.result + this._db.createObjectStore(BAG_OBJECT_STORE); + }; + + request.onerror = (event) => { + reject(event); + } + + request.onsuccess = () => { + // @ts-ignore + this._db = request.result + + if (this._db) { + const tx = this._db.transaction(BAG_OBJECT_STORE) + const cursor = tx.objectStore(BAG_OBJECT_STORE).openCursor() + + cursor.onerror = (event) => { + reject(event); + } + + cursor.onsuccess = (event) => { + // @ts-ignore + let cursor = event.target.result; + if (cursor) { + let key = cursor.primaryKey; + let value = cursor.value; + const bag = this.createBag(key); + bag.populate(value); + this._bags.set(key, bag); + cursor.continue(); + } else { + resolve({db: this._db}); + } + } + } + } + }) + } + + get db(): IDBDatabase | null { + if (this._db) { + return this._db; + } + return null; } createBag(key: string): Bag { - const store: Bag = CreateBag(); - this._bags.set(key, store); - return store; + const bag: Bag = CreateBag(key, this._stateful); + bag.db = this._db; + this._bags.set(key, bag); + return bag; } getBag(key: string): Bag | undefined { if (this._bags.has(key)) { return this._bags.get(key); } - return CreateBag(); + return CreateBag(key, ); } resetBags() { - this._bags.forEach((store: Bag) => { - store.reset(); + this._bags.forEach((bag: Bag) => { + bag.reset(); }); } } @@ -60,9 +135,9 @@ let _bagManagerSingleton: BagManager; * CreateBagManager creates a singleton BagManager. * @returns {BagManager} the singleton BagManager */ -export function CreateBagManager(): BagManager { +export function CreateBagManager(stateful?: boolean): BagManager { if (!_bagManagerSingleton) { - _bagManagerSingleton = new saddlebagManager(); + _bagManagerSingleton = new saddlebagManager(stateful || false); } return _bagManagerSingleton; } diff --git a/src/saddlebag.ts b/src/saddlebag.ts index d030c46..8ed1442 100644 --- a/src/saddlebag.ts +++ b/src/saddlebag.ts @@ -81,5 +81,15 @@ export interface Bag { * and popular. */ reset(): void; + + /** + * id is the unique identifier of the bag. + */ + get id(): string; + + /** + * db is the IndexedID database that the bag is associated with. + */ + set db(db: IDBDatabase | undefined); } diff --git a/src/saddlebag_engine.spec.ts b/src/saddlebag_engine.spec.ts index aa2d556..7ade648 100644 --- a/src/saddlebag_engine.spec.ts +++ b/src/saddlebag_engine.spec.ts @@ -1,10 +1,61 @@ import {describe, expect, it } from 'vitest' import {CreateBag} from "./saddlebag_engine"; +import {BAG_OBJECT_STORE, CreateBagManager} from "./bag.manager"; + +import indexeddb from 'fake-indexeddb'; + +// @ts-ignore +globalThis.indexedDB = indexeddb; describe('store basics', () => { + it('create a new stateful bag and add an item to it, then check its still there', async (): Promise => { + + const bm = CreateBagManager(true) + expect(bm).toBeDefined(); + expect(bm.db).toBeNull(); + + const p = new Promise((resolve) => { + + bm.loadStatefulBags().then(() => { + + expect(bm.db).toBeDefined(); + + const bag = bm.createBag('foo'); + if (bag) { + expect(bag.id).toEqual('foo'); + expect(bag.get('foo')).toBeUndefined(); + bag.set('foo', 'bar'); + expect(bag.get('foo')).toEqual('bar'); + } + + bm.db.transaction([BAG_OBJECT_STORE]) + .objectStore(BAG_OBJECT_STORE).get('foo').onsuccess = (event: any) => { + + const result = event.target.result; + expect(result).toBeDefined(); + expect(result.get('foo')).toEqual('bar'); + + // create a new bag manager and then try again, should be the same result + const bm2 = CreateBagManager(true) + expect(bm2).toBeDefined(); + + bm2.loadStatefulBags().then(() => { + const bag2 = bm2.getBag('foo'); + if (bag2) { + expect(bag2.get('foo')).toEqual('bar'); + resolve(result) + } + }) + } + }) + }) + return p + }, 500) + + it('create a new bag and add an item to it', () => { - const bag = CreateBag(); + const bag = CreateBag('boo'); expect(bag).toBeDefined(); expect(bag).not.toBeNull(); expect(bag.get('foo')).toBeUndefined(); @@ -13,10 +64,11 @@ describe('store basics', () => { }) it('subscribe and unsubscribe to a store', () => { - const bag = CreateBag(); + const bag = CreateBag('foo'); let counter = 0; + // @ts-ignore const sub1 = bag.subscribe('foo', (value: string) => { counter++; }) @@ -41,7 +93,7 @@ describe('store basics', () => { }); it('subscribe and unsubscribe to a store for all changes', () => { - const bag = CreateBag(); + const bag = CreateBag('foo'); let counter = 0; @@ -64,7 +116,7 @@ describe('store basics', () => { }); it('subscribe and unsubscribe to a store on population', () => { - const bag = CreateBag(); + const bag = CreateBag('foo'); let counter = 0; @@ -92,7 +144,7 @@ describe('store basics', () => { }); it('reset a bag', () => { - const bag = CreateBag(); + const bag = CreateBag('foo'); let counter = 0; @@ -108,7 +160,7 @@ describe('store basics', () => { }); it('check a get value cannot be mutated', () => { - const bag = CreateBag(); + const bag = CreateBag('foo'); const bar = { sleepy: 'time' }; bag.set('k', bar); @@ -120,7 +172,7 @@ describe('store basics', () => { it('check population cannot be mutated after storing', () => { - const bag = CreateBag(); + const bag = CreateBag('foo'); const bar = { sleepy: 'time' }; diff --git a/src/saddlebag_engine.ts b/src/saddlebag_engine.ts index 187d270..a8ac151 100644 --- a/src/saddlebag_engine.ts +++ b/src/saddlebag_engine.ts @@ -4,9 +4,10 @@ import { BagPopulatedSubscriptionFunction, BagValueSubscriptionFunction, Subscription } from "./saddlebag.ts"; +import {BAG_OBJECT_STORE} from "./bag.manager.ts"; -export function CreateBag(): Bag { - return new bag(); +export function CreateBag(id: string, stateful?: boolean): Bag { + return new bag(id, stateful); } export class BagSubscription { @@ -65,21 +66,42 @@ export class BagSubscription { } class bag { + private _id: string; + private _stateful: boolean; private _values: Map; + private _db: IDBDatabase | undefined; + private _bagStore: IDBObjectStore | undefined; + _subscriptions: Map[]>; _allChangesSubscriptions: BagAllChangeSubscriptionFunction[]; _storePopulatedSubscriptions: BagPopulatedSubscriptionFunction[]; - constructor() { + constructor(id: string, stateful?: boolean) { this._values = new Map(); this._subscriptions = new Map[]>() this._allChangesSubscriptions = []; this._storePopulatedSubscriptions = []; + this._stateful = stateful || false; + this._id = id; } set(key: string, value: T): void { this._values.set(key, structuredClone(value)); this.alertSubscribers(key, value) + + if (this._stateful && this._db) { + this._db.transaction([BAG_OBJECT_STORE], 'readwrite') + .objectStore(BAG_OBJECT_STORE) + .put(this._values, this._id); + } + } + + get id(): string { + return this._id; + } + + set db(db: IDBDatabase | undefined) { + this._db = db; } reset(): void { diff --git a/yarn.lock b/yarn.lock index 5a4c7dc..d5f7f11 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,11 +10,6 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@babel/parser@^7.20.15": - version "7.22.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.4.tgz#a770e98fd785c231af9d93f6459d36770993fb32" - integrity sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA== - "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -172,13 +167,6 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@jsdoc/salty@^0.2.1": - version "0.2.5" - resolved "https://registry.yarnpkg.com/@jsdoc/salty/-/salty-0.2.5.tgz#1b2fa5bb8c66485b536d86eee877c263d322f692" - integrity sha512-TfRP53RqunNe2HBobVBJ0VLhK1HbfvBYeTC1ahnN64PWvyYyGebmMiPkuwvD9fpw2ZbkoPb8Q7mwy0aR8Z9rvw== - dependencies: - lodash "^4.17.21" - "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -222,24 +210,6 @@ resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== -"@types/linkify-it@*": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/linkify-it/-/linkify-it-3.0.2.tgz#fd2cd2edbaa7eaac7e7f3c1748b52a19143846c9" - integrity sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA== - -"@types/markdown-it@^12.2.3": - version "12.2.3" - resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-12.2.3.tgz#0d6f6e5e413f8daaa26522904597be3d6cd93b51" - integrity sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ== - dependencies: - "@types/linkify-it" "*" - "@types/mdurl" "*" - -"@types/mdurl@*": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@types/mdurl/-/mdurl-1.0.2.tgz#e2ce9d83a613bacf284c7be7d491945e39e1f8e9" - integrity sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA== - "@types/node@*": version "20.2.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.2.4.tgz#e6c3345f7ed9c6df41fdc288a94e2633167bc15d" @@ -340,11 +310,6 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - assertion-error@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" @@ -355,11 +320,6 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -bluebird@^3.7.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - blueimp-md5@^2.10.0: version "2.19.0" resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.19.0.tgz#b53feea5498dcb53dc6ec4b823adb84b729c4af0" @@ -403,13 +363,6 @@ cac@^6.7.14: resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== -catharsis@^0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/catharsis/-/catharsis-0.9.0.tgz#40382a168be0e6da308c277d3a2b3eb40c7d2121" - integrity sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A== - dependencies: - lodash "^4.17.15" - chai@^4.3.7: version "4.3.7" resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51" @@ -508,11 +461,6 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -entities@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" - integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== - esbuild@^0.17.5: version "0.17.19" resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz" @@ -546,16 +494,16 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - esutils@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +fake-indexeddb@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/fake-indexeddb/-/fake-indexeddb-5.0.2.tgz#8e0b6c75c6dc6639cbb50c1aa948772147d7c93e" + integrity sha512-cB507r5T3D55DfclY01GLkninZLfU7HXV/mhVRTnTRm5k2u+fY7Fof2dBkr80p5t7G7dlA/G5dI87QiMdPpMCQ== + fast-diff@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" @@ -651,11 +599,6 @@ glob@^7.1.3, glob@^7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" -graceful-fs@^4.1.9: - version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" @@ -738,53 +681,11 @@ js-string-escape@^1.0.1: resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef" integrity sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg== -js2xmlparser@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/js2xmlparser/-/js2xmlparser-4.0.2.tgz#2a1fdf01e90585ef2ae872a01bc169c6a8d5e60a" - integrity sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA== - dependencies: - xmlcreate "^2.0.4" - -jsdoc@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/jsdoc/-/jsdoc-4.0.2.tgz#a1273beba964cf433ddf7a70c23fd02c3c60296e" - integrity sha512-e8cIg2z62InH7azBBi3EsSEqrKx+nUtAS5bBcYTSpZFA+vhNPyhv8PTFZ0WsjOPDj04/dOLlm08EDcQJDqaGQg== - dependencies: - "@babel/parser" "^7.20.15" - "@jsdoc/salty" "^0.2.1" - "@types/markdown-it" "^12.2.3" - bluebird "^3.7.2" - catharsis "^0.9.0" - escape-string-regexp "^2.0.0" - js2xmlparser "^4.0.2" - klaw "^3.0.0" - markdown-it "^12.3.2" - markdown-it-anchor "^8.4.1" - marked "^4.0.10" - mkdirp "^1.0.4" - requizzle "^0.2.3" - strip-json-comments "^3.1.0" - underscore "~1.13.2" - jsonc-parser@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== -klaw@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-3.0.0.tgz#b11bec9cf2492f06756d6e809ab73a2910259146" - integrity sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g== - dependencies: - graceful-fs "^4.1.9" - -linkify-it@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.3.tgz#a98baf44ce45a550efb4d49c769d07524cc2fa2e" - integrity sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ== - dependencies: - uc.micro "^1.0.1" - local-pkg@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.3.tgz#0ff361ab3ae7f1c19113d9bb97b98b905dbc4963" @@ -797,7 +698,7 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -lodash@^4.17.15, lodash@^4.17.21: +lodash@^4.17.15: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -830,27 +731,6 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" -markdown-it-anchor@^8.4.1: - version "8.6.7" - resolved "https://registry.yarnpkg.com/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz#ee6926daf3ad1ed5e4e3968b1740eef1c6399634" - integrity sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA== - -markdown-it@^12.3.2: - version "12.3.2" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.3.2.tgz#bf92ac92283fe983fe4de8ff8abfb5ad72cd0c90" - integrity sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg== - dependencies: - argparse "^2.0.1" - entities "~2.1.0" - linkify-it "^3.0.1" - mdurl "^1.0.1" - uc.micro "^1.0.5" - -marked@^4.0.10: - version "4.3.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" - integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== - md5-hex@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-3.0.1.tgz#be3741b510591434b2784d79e556eefc2c9a8e5c" @@ -858,11 +738,6 @@ md5-hex@^3.0.1: dependencies: blueimp-md5 "^2.10.0" -mdurl@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" - integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== - merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" @@ -883,11 +758,6 @@ minimatch@^3.0.4, minimatch@^3.1.1: dependencies: brace-expansion "^1.1.7" -mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - mlly@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.3.0.tgz#3184cb80c6437bda861a9f452ae74e3434ed9cd1" @@ -1018,13 +888,6 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== -requizzle@^0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/requizzle/-/requizzle-0.2.4.tgz#319eb658b28c370f0c20f968fa8ceab98c13d27c" - integrity sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw== - dependencies: - lodash "^4.17.21" - reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -1125,11 +988,6 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" -strip-json-comments@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - strip-literal@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-1.0.1.tgz#0115a332710c849b4e46497891fb8d585e404bd2" @@ -1195,21 +1053,11 @@ typescript@^5.0.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== -uc.micro@^1.0.1, uc.micro@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" - integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== - ufo@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.1.2.tgz#d0d9e0fa09dece0c31ffd57bd363f030a35cfe76" integrity sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ== -underscore@~1.13.2: - version "1.13.6" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.6.tgz#04786a1f589dc6c09f761fc5f45b89e935136441" - integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== - v8-to-istanbul@^9.0.0: version "9.1.0" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz#1b83ed4e397f58c85c266a570fc2558b5feb9265" @@ -1307,11 +1155,6 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -xmlcreate@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/xmlcreate/-/xmlcreate-2.0.4.tgz#0c5ab0f99cdd02a81065fa9cd8f8ae87624889be" - integrity sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg== - y18n@^5.0.5: version "5.0.8" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"