Skip to content

Commit

Permalink
0.0.594
Browse files Browse the repository at this point in the history
  • Loading branch information
ivansglazunov committed Oct 3, 2024
1 parent 5162f03 commit 62e9cfe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions imports/packager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export function sort(
return { sorted };
}

export class Packager<L extends Link<any>> {
export class Packager1<L extends Link<any>> {
pckg: Package;
client: DeepClient<any>;
constructor(client: DeepClient<L>) {
Expand Down Expand Up @@ -995,12 +995,12 @@ export class Packager2<L extends Link<any>> {
const errors = [];

let idI = 0;
const ids = Array.from(Array(pckg.data.length).keys()).map(id => id+99999999);
// const ids = await deep.reserve(pckg.data.length);
// const ids = Array.from(Array(pckg.data.length).keys()).map(id => id+99999999);
const ids = await deep.reserve(pckg.data.length);

const dc = '@deep-foundation/core';

const packageId = _packageId || ids[idI++];
const packageId = _packageId || ids[ids.length];
const inserting = [];
const updating = [];
const remembered: any = {};
Expand All @@ -1011,7 +1011,7 @@ export class Packager2<L extends Link<any>> {
console.log('remind', itemId);
if (!itemId) return 0;
if (pckg.strict) return ids[pckg.data.findIndex(l => l.id === itemId)];
if (remembered[itemId]) return remembered[itemId];
else if (remembered[itemId]) return remembered[itemId];
else {
const item = pckg.data.find(i => i.id == itemId);
await fill(item);
Expand Down Expand Up @@ -1240,4 +1240,6 @@ export class Packager2<L extends Link<any>> {
return { errors };
}
}
}
}

export const Packager = Packager2;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deep-foundation/deeplinks",
"version": "0.0.593",
"version": "0.0.594",
"license": "Unlicense",
"type": "module",
"main": "import.js",
Expand Down

0 comments on commit 62e9cfe

Please sign in to comment.