orgnote-api 0.18.0 → 0.18.1

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.
Files changed (47) hide show
  1. package/api.d.ts +3 -3
  2. package/encryption/__tests__/encryption.spec.js +3 -3
  3. package/encryption/__tests__/note-encryption.spec.js +3 -3
  4. package/encryption/encryption.d.ts +2 -2
  5. package/encryption/encryption.js +1 -1
  6. package/encryption/index.d.ts +2 -2
  7. package/encryption/index.js +2 -2
  8. package/encryption/note-encryption.d.ts +1 -1
  9. package/encryption/note-encryption.js +3 -3
  10. package/index.d.ts +6 -6
  11. package/index.js +6 -6
  12. package/mappers/index.d.ts +1 -1
  13. package/mappers/index.js +1 -1
  14. package/mappers/orgnode-to-note.d.ts +1 -1
  15. package/mappers/orgnode-to-note.js +1 -1
  16. package/models/command.d.ts +1 -1
  17. package/models/editor.d.ts +1 -1
  18. package/models/encryption.d.ts +1 -1
  19. package/models/extension.d.ts +1 -1
  20. package/models/index.d.ts +13 -13
  21. package/models/index.js +13 -13
  22. package/models/modal.d.ts +1 -1
  23. package/models/note.d.ts +1 -1
  24. package/models/sync.d.ts +2 -2
  25. package/package.json +13 -2
  26. package/remote-api/api.d.ts +3 -3
  27. package/remote-api/api.js +2 -2
  28. package/remote-api/base.d.ts +1 -1
  29. package/remote-api/common.d.ts +2 -2
  30. package/remote-api/common.js +1 -1
  31. package/remote-api/index.d.ts +2 -2
  32. package/remote-api/index.js +2 -2
  33. package/tools/__tests__/find-files-diff.spec.js +1 -1
  34. package/tools/__tests__/find-note-files-diff.spec.js +3 -3
  35. package/tools/__tests__/get-file-name.spec.js +1 -1
  36. package/tools/__tests__/get-string-path.spec.js +1 -1
  37. package/tools/__tests__/is-gpg-encrypted.spec.js +1 -1
  38. package/tools/__tests__/is-org-file.spec.js +1 -1
  39. package/tools/__tests__/join.spec.js +1 -1
  40. package/tools/__tests__/read-org-files-recursively.spec.js +1 -1
  41. package/tools/__tests__/split-path.spec.js +1 -1
  42. package/tools/extend-notes-files-diff.d.ts +2 -2
  43. package/tools/extend-notes-files-diff.js +1 -1
  44. package/tools/find-notes-files-diff.d.ts +1 -1
  45. package/tools/find-notes-files-diff.js +3 -3
  46. package/tools/index.d.ts +8 -8
  47. package/tools/index.js +8 -8
package/api.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { Command, CSSVariable, ThemeVariable, Note, InlineEmbeddedWidget, MultilineEmbeddedWidget, OrgLineClass, WidgetBuilder, CommandPreview, OrgNoteEncryption, Modal } from './models';
1
+ import { Command, CSSVariable, ThemeVariable, Note, InlineEmbeddedWidget, MultilineEmbeddedWidget, OrgLineClass, WidgetBuilder, CommandPreview, OrgNoteEncryption, Modal } from './models/index.js';
2
2
  import type { NavigationFailure } from 'vue-router';
3
- import { WidgetType } from './models/widget-type';
3
+ import { WidgetType } from './models/widget-type.js';
4
4
  import type { Component } from 'vue';
5
5
  import { NodeType } from 'org-mode-ast';
6
- import { EditorExtension } from './models/editor';
6
+ import { EditorExtension } from './models/editor.js';
7
7
  type WithNodeType<T> = {
8
8
  nodeType: NodeType;
9
9
  } & T;
@@ -1,7 +1,7 @@
1
- import { encryptViaKeys, decryptViaKeys, encryptViaPassword, decryptViaPassword, NoKeysProvidedError, NoPasswordProvidedError, IncorrectOrMissingPrivateKeyPasswordError, encrypt, decrypt, armor, unarmor, } from '../encryption';
1
+ import { encryptViaKeys, decryptViaKeys, encryptViaPassword, decryptViaPassword, NoKeysProvidedError, NoPasswordProvidedError, IncorrectOrMissingPrivateKeyPasswordError, encrypt, decrypt, armor, unarmor, } from "../encryption.js";
2
2
  import { test, expect } from 'vitest';
3
- import { armoredPublicKey, armoredPrivateKey, privateKeyPassphrase, } from './encryption-keys';
4
- import { ModelsPublicNoteEncryptionTypeEnum } from 'src/remote-api';
3
+ import { armoredPublicKey, armoredPrivateKey, privateKeyPassphrase, } from "./encryption-keys.js";
4
+ import { ModelsPublicNoteEncryptionTypeEnum } from "../../remote-api/index.js";
5
5
  test('Should encrypt text as armored message via keys', async () => {
6
6
  const res = await encryptViaKeys({
7
7
  type: ModelsPublicNoteEncryptionTypeEnum.GpgKeys,
@@ -1,7 +1,7 @@
1
1
  import { expect, test } from 'vitest';
2
- import { decryptNote, encryptNote } from '../note-encryption';
3
- import { armoredPublicKey, armoredPrivateKey, privateKeyPassphrase, } from './encryption-keys';
4
- import { ModelsPublicNoteEncryptionTypeEnum } from '../../remote-api';
2
+ import { decryptNote, encryptNote } from "../note-encryption.js";
3
+ import { armoredPublicKey, armoredPrivateKey, privateKeyPassphrase, } from "./encryption-keys.js";
4
+ import { ModelsPublicNoteEncryptionTypeEnum } from "../../remote-api/index.js";
5
5
  test('Should encrypt note content via password', async () => {
6
6
  const noteText = `#+ID: qweqwe
7
7
 
@@ -1,6 +1,6 @@
1
1
  import { Stream } from 'openpgp';
2
- import { OrgNoteEncryption, OrgNotePasswordEncryption, WithDecryptionContent } from '../models/encryption';
3
- import { OrgNoteGpgEncryption, WithEncryptionContent } from '../models';
2
+ import { OrgNoteEncryption, OrgNotePasswordEncryption, WithDecryptionContent } from '../models/encryption.js';
3
+ import { OrgNoteGpgEncryption, WithEncryptionContent } from '../models/index.js';
4
4
  import { enums } from 'openpgp';
5
5
  export declare class IncorrectOrMissingPrivateKeyPasswordError extends Error {
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import { createMessage, decrypt as _decrypt, decryptKey, encrypt as _encrypt, readKey, readMessage, readPrivateKey, } from 'openpgp';
2
- import { ModelsPublicNoteEncryptionTypeEnum } from '../remote-api';
2
+ import { ModelsPublicNoteEncryptionTypeEnum } from "../remote-api/index.js";
3
3
  import { armor as _armor, unarmor as _unarmor, enums } from 'openpgp';
4
4
  export class IncorrectOrMissingPrivateKeyPasswordError extends Error {
5
5
  }
@@ -1,2 +1,2 @@
1
- export * from './note-encryption';
2
- export * from './encryption';
1
+ export * from './note-encryption.js';
2
+ export * from './encryption.js';
@@ -1,2 +1,2 @@
1
- export * from './note-encryption';
2
- export * from './encryption';
1
+ export * from "./note-encryption.js";
2
+ export * from "./encryption.js";
@@ -1,4 +1,4 @@
1
- import { OrgNoteEncryption, WithEncryptionContent, WithNoteDecryptionContent } from '../models/encryption';
1
+ import { OrgNoteEncryption, WithEncryptionContent, WithNoteDecryptionContent } from '../models/encryption.js';
2
2
  export interface AbstractEncryptedNote {
3
3
  encrypted?: boolean;
4
4
  meta: {
@@ -1,7 +1,7 @@
1
- import { ModelsPublicNoteEncryptionTypeEnum } from '../remote-api';
2
- import { decrypt, encrypt } from './encryption';
1
+ import { ModelsPublicNoteEncryptionTypeEnum } from "../remote-api/index.js";
2
+ import { decrypt, encrypt } from "./encryption.js";
3
3
  import { parse, withMetaInfo } from 'org-mode-ast';
4
- import { isGpgEncrypted } from '..';
4
+ import { isGpgEncrypted } from '../index.js';
5
5
  // TODO: master change signature for encrypt notes without content
6
6
  export async function encryptNote(note, encryptionParams) {
7
7
  note.encrypted = false;
package/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export * from './api';
2
- export * from './models';
1
+ export * from './api.js';
2
+ export * from './models/index.js';
3
3
  import type * as ast from 'org-mode-ast';
4
- export * from './encryption';
5
- export * from './tools';
6
- export * from './files-api';
7
- export * from './mappers';
4
+ export * from './encryption/index.js';
5
+ export * from './tools/index.js';
6
+ export * from './files-api.js';
7
+ export * from './mappers/index.js';
8
8
  export { ast };
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export * from './api';
2
- export * from './models';
3
- export * from './encryption';
4
- export * from './tools';
5
- export * from './files-api';
6
- export * from './mappers';
1
+ export * from "./api.js";
2
+ export * from "./models/index.js";
3
+ export * from "./encryption/index.js";
4
+ export * from "./tools/index.js";
5
+ export * from "./files-api.js";
6
+ export * from "./mappers/index.js";
@@ -1 +1 @@
1
- export * from './orgnode-to-note';
1
+ export * from './orgnode-to-note.js';
package/mappers/index.js CHANGED
@@ -1 +1 @@
1
- export * from './orgnode-to-note';
1
+ export * from "./orgnode-to-note.js";
@@ -1,3 +1,3 @@
1
1
  import { OrgNode } from 'org-mode-ast';
2
- import { FileInfo, Note } from "../models";
2
+ import { FileInfo, Note } from "../models/index.js";
3
3
  export declare function orgnodeToNote(orgnode: OrgNode, fileInfo: FileInfo): Note;
@@ -1,4 +1,4 @@
1
- import { splitPath } from 'src/tools';
1
+ import { splitPath } from "../tools/index.js";
2
2
  export function orgnodeToNote(orgnode, fileInfo) {
3
3
  return {
4
4
  id: orgnode.meta.id,
@@ -1,4 +1,4 @@
1
- import { DefaultCommands } from './default-commands';
1
+ import { DefaultCommands } from './default-commands.js';
2
2
  export declare const DEFAULT_KEYBINDING_GROUP = "default";
3
3
  export type CommandGroup = 'settings' | 'editor' | 'global' | 'note-detail' | 'completion' | string;
4
4
  export interface CommandHandlerParams<T = any> {
@@ -2,7 +2,7 @@ import type { OrgNode } from 'org-mode-ast';
2
2
  import type { Component } from 'vue';
3
3
  import type { EditorView } from '@codemirror/view';
4
4
  import type { Extension } from '@codemirror/state';
5
- import { InlineEmbeddedWidget } from './widget';
5
+ import { InlineEmbeddedWidget } from './widget.js';
6
6
  interface DynamicComponent {
7
7
  mount: (cmp: Component, wrap: Element, props?: {
8
8
  [key: string]: unknown;
@@ -1,4 +1,4 @@
1
- import type { ModelsPublicNoteEncryptionTypeEnum } from '../remote-api';
1
+ import type { ModelsPublicNoteEncryptionTypeEnum } from '../remote-api/index.js';
2
2
  export type EcnryptionFormat = 'binary' | 'armored';
3
3
  export interface BaseOrgNoteEncryption {
4
4
  format?: 'binary' | 'armored';
@@ -1,4 +1,4 @@
1
- import { OrgNoteApi } from '../api';
1
+ import { OrgNoteApi } from '../api.js';
2
2
  export interface ExtensionManifest {
3
3
  name: string;
4
4
  version: string;
package/models/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- export * from './note';
2
- export * from './command';
3
- export * from './completion';
4
- export * from './extension';
5
- export * from './theme-variables';
6
- export * from './widget';
7
- export * from './modal';
8
- export * from './widget-type';
9
- export * from './editor';
10
- export * from './default-commands';
11
- export * from './encryption';
12
- export * from './file-system';
13
- export * from './sync';
1
+ export * from './note.js';
2
+ export * from './command.js';
3
+ export * from './completion.js';
4
+ export * from './extension.js';
5
+ export * from './theme-variables.js';
6
+ export * from './widget.js';
7
+ export * from './modal.js';
8
+ export * from './widget-type.js';
9
+ export * from './editor.js';
10
+ export * from './default-commands.js';
11
+ export * from './encryption.js';
12
+ export * from './file-system.js';
13
+ export * from './sync.js';
package/models/index.js CHANGED
@@ -1,13 +1,13 @@
1
- export * from './note';
2
- export * from './command';
3
- export * from './completion';
4
- export * from './extension';
5
- export * from './theme-variables';
6
- export * from './widget';
7
- export * from './modal';
8
- export * from './widget-type';
9
- export * from './editor';
10
- export * from './default-commands';
11
- export * from './encryption';
12
- export * from './file-system';
13
- export * from './sync';
1
+ export * from "./note.js";
2
+ export * from "./command.js";
3
+ export * from "./completion.js";
4
+ export * from "./extension.js";
5
+ export * from "./theme-variables.js";
6
+ export * from "./widget.js";
7
+ export * from "./modal.js";
8
+ export * from "./widget-type.js";
9
+ export * from "./editor.js";
10
+ export * from "./default-commands.js";
11
+ export * from "./encryption.js";
12
+ export * from "./file-system.js";
13
+ export * from "./sync.js";
package/models/modal.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { VueComponent } from './vue-component';
1
+ import { VueComponent } from './vue-component.js';
2
2
  export interface ModalConfig<T = any> {
3
3
  closable?: boolean;
4
4
  title?: string;
package/models/note.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ModelsPublicNote, ModelsPublicUser } from '../remote-api';
1
+ import type { ModelsPublicNote, ModelsPublicUser } from '../remote-api/index.js';
2
2
  export interface NotesFilter {
3
3
  searchText?: string;
4
4
  userId?: string;
package/models/sync.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { HandlersCreatingNote } from "../remote-api";
2
- import { FileSystem } from './file-system';
1
+ import { HandlersCreatingNote } from "../remote-api/index.js";
2
+ import { FileSystem } from './file-system.js';
3
3
  export interface Changes {
4
4
  deleted: string[];
5
5
  created: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orgnote-api",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "description": "Official API for creating extensions for OrgNote app",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -12,7 +12,8 @@
12
12
  "codegen:api": "openapi-generator-cli generate",
13
13
  "codegen:css-doc": "node collect-css-variables.cjs --docs",
14
14
  "codegen:css-types": "node collect-css-variables.cjs --types",
15
- "prepub": "npm run build && cp -rf package.json package-lock.json README.md dist/",
15
+ "fix-esm-imports": "fix-esm-import-path ./dist",
16
+ "prepub": "npm run build && npm run fix-esm-imports && cp -rf package.json package-lock.json README.md dist/",
16
17
  "pub": "npm run prepub && cd dist && npm publish",
17
18
  "pub:yalc": "npm run prepub && cd dist && yalc publish --push"
18
19
  },
@@ -20,6 +21,14 @@
20
21
  "type": "git",
21
22
  "url": "git+https://github.com/artawower/orgnote-api.git"
22
23
  },
24
+ "exports": {
25
+ ".": "./index.js",
26
+ "./remote-api": "./remote-api/index.js",
27
+ "./encryption": "./encryption/index.js",
28
+ "./tools": "./tools/index.js",
29
+ "./mappers": "./mappers/index.js",
30
+ "./commands": "./commands/index.js"
31
+ },
23
32
  "files": ["**"],
24
33
  "types": "./index.d.ts",
25
34
  "keywords": ["orgnote", "org-mode", "org-roam", "api", "extensions"],
@@ -43,9 +52,11 @@
43
52
  "devDependencies": {
44
53
  "@openapitools/openapi-generator-cli": "2.13.4",
45
54
  "@types/node": "20.13.0",
55
+ "fix-esm-import-path": "1.10.0",
46
56
  "ts-patch": "3.2.1",
47
57
  "typescript": "^5.3.3",
48
58
  "typescript-transform-paths": "3.5.1",
59
+ "typescript-transformer-esm": "1.1.0",
49
60
  "vitest": "^1.5.0"
50
61
  }
51
62
  }
@@ -9,10 +9,10 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { Configuration } from './configuration';
12
+ import type { Configuration } from './configuration.js';
13
13
  import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
- import type { RequestArgs } from './base';
15
- import { BaseAPI } from './base';
14
+ import type { RequestArgs } from './base.js';
15
+ import { BaseAPI } from './base.js';
16
16
  /**
17
17
  *
18
18
  * @export
package/remote-api/api.js CHANGED
@@ -14,9 +14,9 @@
14
14
  import globalAxios from 'axios';
15
15
  // Some imports not used depending on template conditions
16
16
  // @ts-ignore
17
- import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
17
+ import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from "./common.js";
18
18
  // @ts-ignore
19
- import { BASE_PATH, BaseAPI, operationServerMap } from './base';
19
+ import { BASE_PATH, BaseAPI, operationServerMap } from "./base.js";
20
20
  export const HandlersCreatingNoteEncryptionTypeEnum = {
21
21
  GpgKeys: 'gpgKeys',
22
22
  GpgPassword: 'gpgPassword',
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { Configuration } from './configuration';
12
+ import type { Configuration } from './configuration.js';
13
13
  import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
14
  export declare const BASE_PATH: string;
15
15
  /**
@@ -9,8 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { Configuration } from "./configuration";
13
- import type { RequestArgs } from "./base";
12
+ import type { Configuration } from "./configuration.js";
13
+ import type { RequestArgs } from "./base.js";
14
14
  import type { AxiosInstance, AxiosResponse } from 'axios';
15
15
  /**
16
16
  *
@@ -11,7 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- import { RequiredError } from "./base";
14
+ import { RequiredError } from "./base.js";
15
15
  /**
16
16
  *
17
17
  * @export
@@ -9,5 +9,5 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- export * from "./api";
13
- export * from "./configuration";
12
+ export * from "./api.js";
13
+ export * from "./configuration.js";
@@ -11,5 +11,5 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- export * from "./api";
15
- export * from "./configuration";
14
+ export * from "./api.js";
15
+ export * from "./configuration.js";
@@ -1,7 +1,7 @@
1
1
  import { afterEach, beforeEach, expect, test } from 'vitest';
2
2
  import { mkdirSync, rmdirSync, statSync, utimesSync, writeFileSync } from 'fs';
3
3
  import { join } from 'path';
4
- import { findFilesDiff } from '../find-notes-files-diff';
4
+ import { findFilesDiff } from "../find-notes-files-diff.js";
5
5
  const testFilesFolder = 'src/tools/__tests__/miscellaneous2/';
6
6
  function initFiles() {
7
7
  mkdirSync(testFilesFolder);
@@ -1,10 +1,10 @@
1
1
  import { mkdirSync, writeFileSync, utimesSync, readdirSync } from 'fs';
2
2
  import { afterEach, beforeEach, test, expect } from 'vitest';
3
- import { findNoteFilesDiff } from '../find-notes-files-diff';
3
+ import { findNoteFilesDiff } from "../find-notes-files-diff.js";
4
4
  import { statSync } from 'fs';
5
5
  import { rmSync } from 'fs';
6
- import { getFileName } from '../get-file-name';
7
- import { join } from '../join-path';
6
+ import { getFileName } from "../get-file-name.js";
7
+ import { join } from "../join-path.js";
8
8
  const testFilesFolder = 'src/tools/__tests__/miscellaneous/';
9
9
  const nestedFolder = 'nested-folder/';
10
10
  const fn = (fileName) => `${testFilesFolder}${fileName}`;
@@ -1,4 +1,4 @@
1
- import { getFileName, getFileNameWithoutExtension } from '../get-file-name';
1
+ import { getFileName, getFileNameWithoutExtension } from "../get-file-name.js";
2
2
  import { test, expect } from 'vitest';
3
3
  test('Should return file name from path', () => {
4
4
  expect(getFileName('/some/path/foo.org')).toBe('foo.org');
@@ -1,4 +1,4 @@
1
- import { getStringPath } from '../get-string-path';
1
+ import { getStringPath } from "../get-string-path.js";
2
2
  import { test, expect } from 'vitest';
3
3
  test('should return the same string if path is a string', () => {
4
4
  const path = 'some/path';
@@ -1,5 +1,5 @@
1
1
  import { expect, test } from 'vitest';
2
- import { isGpgEncrypted } from '../is-gpg-encrypted';
2
+ import { isGpgEncrypted } from "../is-gpg-encrypted.js";
3
3
  test('Should return true if the content is gpg encrypted', () => {
4
4
  const content = `-----BEGIN PGP MESSAGE-----
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { test, expect } from 'vitest';
2
- import { isOrgFile, isOrgGpgFile } from '../is-org-file';
2
+ import { isOrgFile, isOrgGpgFile } from "../is-org-file.js";
3
3
  test('Should return true for org files', () => {
4
4
  const files = [
5
5
  'myNote.org',
@@ -1,5 +1,5 @@
1
1
  import { test, expect } from 'vitest';
2
- import { join } from '../join-path';
2
+ import { join } from "../join-path.js";
3
3
  test('Should join file paths', () => {
4
4
  const samples = [
5
5
  ['dir1', 'subdir2', 'file'],
@@ -1,5 +1,5 @@
1
1
  import { describe, it, expect, vi } from 'vitest';
2
- import { readOrgFilesRecursively } from '../find-notes-files-diff';
2
+ import { readOrgFilesRecursively } from "../find-notes-files-diff.js";
3
3
  // NOTE: AI generated
4
4
  const mockReadDir = vi.fn();
5
5
  const mockFileInfo = vi.fn();
@@ -1,5 +1,5 @@
1
1
  import { test, expect } from 'vitest';
2
- import { splitPath } from 'src/tools';
2
+ import { splitPath } from "../index.js";
3
3
  test('Should correctly split various paths with different formats', () => {
4
4
  const pathExpected = [
5
5
  ['/some/long/path/file.txt', ['some', 'long', 'path', 'file.txt']],
@@ -1,3 +1,3 @@
1
- import { HandlersSyncNotesRequest } from "../remote-api";
2
- import { NoteChanges, FileSystem } from '../models';
1
+ import { HandlersSyncNotesRequest } from "../remote-api/index.js";
2
+ import { NoteChanges, FileSystem } from '../models/index.js';
3
3
  export declare function extendNotesFilesDiff(changes: NoteChanges, readFile: FileSystem['readFile']): Promise<HandlersSyncNotesRequest>;
@@ -1,4 +1,4 @@
1
- import { isOrgGpgFile } from './is-org-file';
1
+ import { isOrgGpgFile } from "./is-org-file.js";
2
2
  export async function extendNotesFilesDiff(changes, readFile) {
3
3
  const upsertedNotesFromLastSync = [
4
4
  ...changes.updated,
@@ -1,4 +1,4 @@
1
- import { SyncParams, Changes, StoredNoteInfo, NoteChanges, FileScanParams, FileSystem } from "../models";
1
+ import { SyncParams, Changes, StoredNoteInfo, NoteChanges, FileScanParams, FileSystem } from "../models/index.js";
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[]>;
@@ -1,6 +1,6 @@
1
- import { getStringPath } from './get-string-path';
2
- import { isOrgFile } from './is-org-file';
3
- import { join } from './join-path';
1
+ import { getStringPath } from "./get-string-path.js";
2
+ import { isOrgFile } from "./is-org-file.js";
3
+ import { join } from "./join-path.js";
4
4
  export async function findNoteFilesDiff({ fileInfo, readDir, lastSync, storedNotesInfo, dirPath, }) {
5
5
  const orgFilePaths = await readOrgFilesRecursively({
6
6
  fileInfo,
package/tools/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export * from './mock-server';
2
- export * from './is-gpg-encrypted';
3
- export * from './is-org-file';
4
- export * from './get-string-path';
5
- export * from './get-file-name';
6
- export * from './find-notes-files-diff';
7
- export * from './join-path';
8
- export * from './split-path';
1
+ export * from './mock-server.js';
2
+ export * from './is-gpg-encrypted.js';
3
+ export * from './is-org-file.js';
4
+ export * from './get-string-path.js';
5
+ export * from './get-file-name.js';
6
+ export * from './find-notes-files-diff.js';
7
+ export * from './join-path.js';
8
+ export * from './split-path.js';
package/tools/index.js CHANGED
@@ -1,8 +1,8 @@
1
- export * from './mock-server';
2
- export * from './is-gpg-encrypted';
3
- export * from './is-org-file';
4
- export * from './get-string-path';
5
- export * from './get-file-name';
6
- export * from './find-notes-files-diff';
7
- export * from './join-path';
8
- export * from './split-path';
1
+ export * from "./mock-server.js";
2
+ export * from "./is-gpg-encrypted.js";
3
+ export * from "./is-org-file.js";
4
+ export * from "./get-string-path.js";
5
+ export * from "./get-file-name.js";
6
+ export * from "./find-notes-files-diff.js";
7
+ export * from "./join-path.js";
8
+ export * from "./split-path.js";