orgnote-api 0.17.4 → 0.17.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/models/sync.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orgnote-api",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.6",
|
|
4
4
|
"description": "Official API for creating extensions for OrgNote app",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"packageManager": "bun@1.1.22",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"test": "vitest",
|
|
10
|
-
"build": "npm run clear &&
|
|
10
|
+
"build": "npm run clear && tspc --project tsconfig.json",
|
|
11
11
|
"clear": "rm -rf dist",
|
|
12
12
|
"codegen:api": "openapi-generator-cli generate",
|
|
13
13
|
"codegen:css-doc": "node collect-css-variables.cjs --docs",
|
|
@@ -43,7 +43,9 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@openapitools/openapi-generator-cli": "2.13.4",
|
|
45
45
|
"@types/node": "20.13.0",
|
|
46
|
+
"ts-patch": "3.2.1",
|
|
46
47
|
"typescript": "^5.3.3",
|
|
48
|
+
"typescript-transform-paths": "3.5.1",
|
|
47
49
|
"vitest": "^1.5.0"
|
|
48
50
|
}
|
|
49
51
|
}
|
|
@@ -25,3 +25,8 @@ test('should handle array with multiple elements correctly', () => {
|
|
|
25
25
|
const result = getStringPath(path);
|
|
26
26
|
expect(result).toBe('this/is/a/test');
|
|
27
27
|
});
|
|
28
|
+
test('Should not take slashes from the path array into account.', () => {
|
|
29
|
+
const path = ['/', 'this', '/', 'is-path', 'qwe'];
|
|
30
|
+
const result = getStringPath(path);
|
|
31
|
+
expect(result).toBe('this/is-path/qwe');
|
|
32
|
+
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { HandlersSyncNotesRequest } from
|
|
1
|
+
import { HandlersSyncNotesRequest } from "../remote-api";
|
|
2
2
|
import { NoteChanges, FileSystem } from '../models';
|
|
3
3
|
export declare function extendNotesFilesDiff(changes: NoteChanges, readFile: FileSystem['readFile']): Promise<HandlersSyncNotesRequest>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SyncParams, Changes, StoredNoteInfo, NoteChanges, FileScanParams, FileSystem } from
|
|
1
|
+
import { SyncParams, Changes, StoredNoteInfo, NoteChanges, FileScanParams, FileSystem } from "../models";
|
|
2
2
|
export declare function findNoteFilesDiff({ fileInfo, readDir, lastSync, storedNotesInfo, dirPath, }: SyncParams): Promise<NoteChanges>;
|
|
3
3
|
export declare function getOrgFilesFromLastSync(filePaths: string[], fileInfo: FileSystem['fileInfo'], lastSync?: Date): Promise<string[]>;
|
|
4
4
|
export declare function readOrgFilesRecursively({ fileInfo, readDir, dirPath, }: FileScanParams): Promise<string[]>;
|
|
@@ -79,7 +79,8 @@ export async function readOrgFilesRecursively({ fileInfo, readDir, dirPath, }) {
|
|
|
79
79
|
if (!isOrgFile(f.name)) {
|
|
80
80
|
continue;
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
const fullFilePath = getFullPath(f.name);
|
|
83
|
+
collectedPaths.push(fullFilePath);
|
|
83
84
|
}
|
|
84
85
|
return collectedPaths;
|
|
85
86
|
}
|