@fgv/ts-web-extras 5.0.2 → 5.1.0-0

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 (208) hide show
  1. package/.rush/temp/81e0881271ff236956b2f52e8ca99da6574c6e1e.tar.log +223 -0
  2. package/.rush/temp/chunked-rush-logs/ts-web-extras.build.chunks.jsonl +35 -25
  3. package/.rush/temp/operation/build/all.log +35 -25
  4. package/.rush/temp/operation/build/log-chunks.jsonl +35 -25
  5. package/.rush/temp/operation/build/state.json +1 -1
  6. package/.rush/temp/shrinkwrap-deps.json +175 -163
  7. package/config/jest.config.json +4 -1
  8. package/config/typedoc.json +6 -0
  9. package/dist/index.js +2 -2
  10. package/dist/index.js.map +1 -1
  11. package/dist/packlets/crypto-utils/browserCryptoProvider.js +254 -0
  12. package/dist/packlets/crypto-utils/browserCryptoProvider.js.map +1 -0
  13. package/dist/packlets/crypto-utils/browserHashProvider.js.map +1 -0
  14. package/dist/packlets/{crypto → crypto-utils}/index.js +1 -0
  15. package/dist/packlets/crypto-utils/index.js.map +1 -0
  16. package/dist/packlets/file-api-types/index.js +27 -3
  17. package/dist/packlets/file-api-types/index.js.map +1 -1
  18. package/dist/packlets/file-tree/directoryHandleStore.js +124 -0
  19. package/dist/packlets/file-tree/directoryHandleStore.js.map +1 -0
  20. package/dist/packlets/file-tree/fileApiTreeAccessors.js +76 -0
  21. package/dist/packlets/file-tree/fileApiTreeAccessors.js.map +1 -1
  22. package/dist/packlets/file-tree/fileSystemAccessTreeAccessors.js +345 -0
  23. package/dist/packlets/file-tree/fileSystemAccessTreeAccessors.js.map +1 -0
  24. package/dist/packlets/file-tree/index.js +3 -0
  25. package/dist/packlets/file-tree/index.js.map +1 -1
  26. package/dist/packlets/file-tree/localStorageTreeAccessors.js +308 -0
  27. package/dist/packlets/file-tree/localStorageTreeAccessors.js.map +1 -0
  28. package/dist/test/mocks/idb-keyval.js +6 -0
  29. package/dist/test/mocks/idb-keyval.js.map +1 -0
  30. package/dist/test/unit/browserHashProvider.test.js +1 -1
  31. package/dist/test/unit/browserHashProvider.test.js.map +1 -1
  32. package/dist/test/unit/directoryHandleStore.test.js +190 -0
  33. package/dist/test/unit/directoryHandleStore.test.js.map +1 -0
  34. package/dist/test/unit/fileApiTypes.test.js +30 -0
  35. package/dist/test/unit/fileApiTypes.test.js.map +1 -1
  36. package/dist/test/unit/fileSystemAccessTreeAccessors.test.js +517 -0
  37. package/dist/test/unit/fileSystemAccessTreeAccessors.test.js.map +1 -0
  38. package/dist/test/unit/localStorageTreeAccessors.test.js +595 -0
  39. package/dist/test/unit/localStorageTreeAccessors.test.js.map +1 -0
  40. package/dist/test/utils/fileSystemAccessMocks.js +271 -0
  41. package/dist/test/utils/fileSystemAccessMocks.js.map +1 -0
  42. package/dist/ts-web-extras.d.ts +460 -1
  43. package/dist/tsdoc-metadata.json +1 -1
  44. package/docs/ts-web-extras.cryptoutils.browsercryptoprovider._constructor_.md +50 -0
  45. package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.decrypt.md +104 -0
  46. package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.derivekey.md +88 -0
  47. package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.encrypt.md +72 -0
  48. package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.frombase64.md +56 -0
  49. package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.generatekey.md +19 -0
  50. package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.generaterandombytes.md +56 -0
  51. package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.md +169 -0
  52. package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.tobase64.md +56 -0
  53. package/docs/{ts-web-extras.browserhashprovider.hashparts.md → ts-web-extras.cryptoutils.browserhashprovider.hashparts.md} +2 -2
  54. package/docs/{ts-web-extras.browserhashprovider.hashstring.md → ts-web-extras.cryptoutils.browserhashprovider.hashstring.md} +2 -2
  55. package/docs/{ts-web-extras.browserhashprovider.md → ts-web-extras.cryptoutils.browserhashprovider.md} +4 -4
  56. package/docs/ts-web-extras.cryptoutils.createbrowsercryptoprovider.md +19 -0
  57. package/docs/ts-web-extras.cryptoutils.md +71 -0
  58. package/docs/ts-web-extras.fileapitreeaccessors.createfromlocalstorage.md +74 -0
  59. package/docs/ts-web-extras.fileapitreeaccessors.createpersistent.md +76 -0
  60. package/docs/ts-web-extras.fileapitreeaccessors.md +32 -0
  61. package/docs/ts-web-extras.filesystemaccesstreeaccessors._constructor_.md +114 -0
  62. package/docs/ts-web-extras.filesystemaccesstreeaccessors.fileismutable.md +52 -0
  63. package/docs/ts-web-extras.filesystemaccesstreeaccessors.fromdirectoryhandle.md +72 -0
  64. package/docs/ts-web-extras.filesystemaccesstreeaccessors.getdirtypaths.md +17 -0
  65. package/docs/ts-web-extras.filesystemaccesstreeaccessors.isdirty.md +17 -0
  66. package/docs/ts-web-extras.filesystemaccesstreeaccessors.md +159 -0
  67. package/docs/ts-web-extras.filesystemaccesstreeaccessors.savefilecontents.md +66 -0
  68. package/docs/ts-web-extras.filesystemaccesstreeaccessors.synctodisk.md +17 -0
  69. package/docs/ts-web-extras.ifilesystemaccesstreeparams.autosync.md +13 -0
  70. package/docs/ts-web-extras.ifilesystemaccesstreeparams.md +78 -0
  71. package/docs/ts-web-extras.ifilesystemaccesstreeparams.requirewritepermission.md +13 -0
  72. package/docs/ts-web-extras.ilocalstoragetreeparams.autosync.md +13 -0
  73. package/docs/ts-web-extras.ilocalstoragetreeparams.md +97 -0
  74. package/docs/ts-web-extras.ilocalstoragetreeparams.pathtokeymap.md +13 -0
  75. package/docs/ts-web-extras.ilocalstoragetreeparams.storage.md +13 -0
  76. package/docs/ts-web-extras.localstoragetreeaccessors.fileismutable.md +56 -0
  77. package/docs/ts-web-extras.localstoragetreeaccessors.fromstorage.md +56 -0
  78. package/docs/ts-web-extras.localstoragetreeaccessors.getdirtypaths.md +19 -0
  79. package/docs/ts-web-extras.localstoragetreeaccessors.isdirty.md +19 -0
  80. package/docs/ts-web-extras.localstoragetreeaccessors.md +131 -0
  81. package/docs/ts-web-extras.localstoragetreeaccessors.savefilecontents.md +72 -0
  82. package/docs/ts-web-extras.localstoragetreeaccessors.synctodisk.md +19 -0
  83. package/docs/ts-web-extras.md +50 -4
  84. package/etc/ts-web-extras.api.md +91 -1
  85. package/lib/index.d.ts +2 -1
  86. package/lib/index.d.ts.map +1 -1
  87. package/lib/index.js +25 -2
  88. package/lib/index.js.map +1 -1
  89. package/lib/packlets/crypto-utils/browserCryptoProvider.d.ts +77 -0
  90. package/lib/packlets/crypto-utils/browserCryptoProvider.d.ts.map +1 -0
  91. package/lib/packlets/crypto-utils/browserCryptoProvider.js +259 -0
  92. package/lib/packlets/crypto-utils/browserCryptoProvider.js.map +1 -0
  93. package/lib/packlets/crypto-utils/browserHashProvider.d.ts.map +1 -0
  94. package/lib/packlets/crypto-utils/browserHashProvider.js.map +1 -0
  95. package/lib/packlets/{crypto → crypto-utils}/index.d.ts +1 -0
  96. package/lib/packlets/crypto-utils/index.d.ts.map +1 -0
  97. package/lib/packlets/{crypto → crypto-utils}/index.js +1 -0
  98. package/lib/packlets/crypto-utils/index.js.map +1 -0
  99. package/lib/packlets/file-api-types/index.d.ts.map +1 -1
  100. package/lib/packlets/file-api-types/index.js +27 -3
  101. package/lib/packlets/file-api-types/index.js.map +1 -1
  102. package/lib/packlets/file-tree/directoryHandleStore.d.ts +59 -0
  103. package/lib/packlets/file-tree/directoryHandleStore.d.ts.map +1 -0
  104. package/lib/packlets/file-tree/directoryHandleStore.js +128 -0
  105. package/lib/packlets/file-tree/directoryHandleStore.js.map +1 -0
  106. package/lib/packlets/file-tree/fileApiTreeAccessors.d.ts +57 -0
  107. package/lib/packlets/file-tree/fileApiTreeAccessors.d.ts.map +1 -1
  108. package/lib/packlets/file-tree/fileApiTreeAccessors.js +76 -0
  109. package/lib/packlets/file-tree/fileApiTreeAccessors.js.map +1 -1
  110. package/lib/packlets/file-tree/fileSystemAccessTreeAccessors.d.ts +136 -0
  111. package/lib/packlets/file-tree/fileSystemAccessTreeAccessors.d.ts.map +1 -0
  112. package/lib/packlets/file-tree/fileSystemAccessTreeAccessors.js +349 -0
  113. package/lib/packlets/file-tree/fileSystemAccessTreeAccessors.js.map +1 -0
  114. package/lib/packlets/file-tree/index.d.ts +3 -0
  115. package/lib/packlets/file-tree/index.d.ts.map +1 -1
  116. package/lib/packlets/file-tree/index.js +3 -0
  117. package/lib/packlets/file-tree/index.js.map +1 -1
  118. package/lib/packlets/file-tree/localStorageTreeAccessors.d.ts +129 -0
  119. package/lib/packlets/file-tree/localStorageTreeAccessors.d.ts.map +1 -0
  120. package/lib/packlets/file-tree/localStorageTreeAccessors.js +312 -0
  121. package/lib/packlets/file-tree/localStorageTreeAccessors.js.map +1 -0
  122. package/lib/test/mocks/idb-keyval.d.ts +6 -0
  123. package/lib/test/mocks/idb-keyval.d.ts.map +1 -0
  124. package/lib/test/mocks/idb-keyval.js +9 -0
  125. package/lib/test/mocks/idb-keyval.js.map +1 -0
  126. package/lib/test/unit/browserHashProvider.test.js +21 -21
  127. package/lib/test/unit/browserHashProvider.test.js.map +1 -1
  128. package/lib/test/unit/directoryHandleStore.test.d.ts +2 -0
  129. package/lib/test/unit/directoryHandleStore.test.d.ts.map +1 -0
  130. package/lib/test/unit/directoryHandleStore.test.js +192 -0
  131. package/lib/test/unit/directoryHandleStore.test.js.map +1 -0
  132. package/lib/test/unit/fileApiTypes.test.js +30 -0
  133. package/lib/test/unit/fileApiTypes.test.js.map +1 -1
  134. package/lib/test/unit/fileSystemAccessTreeAccessors.test.d.ts +2 -0
  135. package/lib/test/unit/fileSystemAccessTreeAccessors.test.d.ts.map +1 -0
  136. package/lib/test/unit/fileSystemAccessTreeAccessors.test.js +519 -0
  137. package/lib/test/unit/fileSystemAccessTreeAccessors.test.js.map +1 -0
  138. package/lib/test/unit/localStorageTreeAccessors.test.d.ts +2 -0
  139. package/lib/test/unit/localStorageTreeAccessors.test.d.ts.map +1 -0
  140. package/lib/test/unit/localStorageTreeAccessors.test.js +597 -0
  141. package/lib/test/unit/localStorageTreeAccessors.test.js.map +1 -0
  142. package/lib/test/utils/fileSystemAccessMocks.d.ts +53 -0
  143. package/lib/test/utils/fileSystemAccessMocks.d.ts.map +1 -0
  144. package/lib/test/utils/fileSystemAccessMocks.js +277 -0
  145. package/lib/test/utils/fileSystemAccessMocks.js.map +1 -0
  146. package/package.json +27 -20
  147. package/rush-logs/ts-web-extras.build.cache.log +3 -1
  148. package/rush-logs/ts-web-extras.build.log +35 -25
  149. package/src/index.ts +2 -2
  150. package/src/packlets/crypto-utils/browserCryptoProvider.ts +311 -0
  151. package/src/packlets/{crypto → crypto-utils}/index.ts +1 -0
  152. package/src/packlets/file-api-types/index.ts +24 -3
  153. package/src/packlets/file-tree/directoryHandleStore.ts +136 -0
  154. package/src/packlets/file-tree/fileApiTreeAccessors.ts +90 -0
  155. package/src/packlets/file-tree/fileSystemAccessTreeAccessors.ts +427 -0
  156. package/src/packlets/file-tree/index.ts +3 -0
  157. package/src/packlets/file-tree/localStorageTreeAccessors.ts +377 -0
  158. package/src/test/mocks/idb-keyval.ts +5 -0
  159. package/src/test/unit/browserHashProvider.test.ts +1 -1
  160. package/src/test/unit/directoryHandleStore.test.ts +251 -0
  161. package/src/test/unit/fileApiTypes.test.ts +36 -0
  162. package/src/test/unit/fileSystemAccessTreeAccessors.test.ts +732 -0
  163. package/src/test/unit/localStorageTreeAccessors.test.ts +746 -0
  164. package/src/test/utils/fileSystemAccessMocks.ts +353 -0
  165. package/temp/build/typescript/ts_8nwakTlr.json +1 -0
  166. package/temp/coverage/crypto-utils/browserCryptoProvider.ts.html +1018 -0
  167. package/temp/coverage/{crypto → crypto-utils}/browserHashProvider.ts.html +3 -3
  168. package/temp/coverage/{lcov-report/crypto → crypto-utils}/index.html +21 -6
  169. package/temp/coverage/file-tree/directoryHandleStore.ts.html +493 -0
  170. package/temp/coverage/file-tree/fileApiTreeAccessors.ts.html +276 -6
  171. package/temp/coverage/file-tree/fileSystemAccessTreeAccessors.ts.html +1366 -0
  172. package/temp/coverage/file-tree/index.html +55 -10
  173. package/temp/coverage/file-tree/localStorageTreeAccessors.ts.html +1216 -0
  174. package/temp/coverage/helpers/fileTreeHelpers.ts.html +1 -1
  175. package/temp/coverage/helpers/index.html +1 -1
  176. package/temp/coverage/index.html +15 -15
  177. package/temp/coverage/lcov-report/crypto-utils/browserCryptoProvider.ts.html +1018 -0
  178. package/temp/coverage/lcov-report/{crypto → crypto-utils}/browserHashProvider.ts.html +3 -3
  179. package/temp/coverage/{crypto → lcov-report/crypto-utils}/index.html +21 -6
  180. package/temp/coverage/lcov-report/file-tree/directoryHandleStore.ts.html +493 -0
  181. package/temp/coverage/lcov-report/file-tree/fileApiTreeAccessors.ts.html +276 -6
  182. package/temp/coverage/lcov-report/file-tree/fileSystemAccessTreeAccessors.ts.html +1366 -0
  183. package/temp/coverage/lcov-report/file-tree/index.html +55 -10
  184. package/temp/coverage/lcov-report/file-tree/localStorageTreeAccessors.ts.html +1216 -0
  185. package/temp/coverage/lcov-report/helpers/fileTreeHelpers.ts.html +1 -1
  186. package/temp/coverage/lcov-report/helpers/index.html +1 -1
  187. package/temp/coverage/lcov-report/index.html +15 -15
  188. package/temp/coverage/lcov-report/url-utils/index.html +1 -1
  189. package/temp/coverage/lcov-report/url-utils/urlParams.ts.html +1 -1
  190. package/temp/coverage/lcov.info +2128 -451
  191. package/temp/coverage/url-utils/index.html +1 -1
  192. package/temp/coverage/url-utils/urlParams.ts.html +1 -1
  193. package/temp/test/jest/haste-map-7492f1b44480e0cdd1f220078fb3afd8-c8dd6c3430605adeb2f1cadf4f75e791-8c9336785555d572065b28c111982ba4 +0 -0
  194. package/temp/test/jest/perf-cache-7492f1b44480e0cdd1f220078fb3afd8-da39a3ee5e6b4b0d3255bfef95601890 +1 -1
  195. package/temp/ts-web-extras.api.json +3236 -385
  196. package/temp/ts-web-extras.api.md +91 -1
  197. package/dist/packlets/crypto/browserHashProvider.js.map +0 -1
  198. package/dist/packlets/crypto/index.js.map +0 -1
  199. package/lib/packlets/crypto/browserHashProvider.d.ts.map +0 -1
  200. package/lib/packlets/crypto/browserHashProvider.js.map +0 -1
  201. package/lib/packlets/crypto/index.d.ts.map +0 -1
  202. package/lib/packlets/crypto/index.js.map +0 -1
  203. package/temp/build/typescript/ts_vnCx6LlY.json +0 -1
  204. /package/dist/packlets/{crypto → crypto-utils}/browserHashProvider.js +0 -0
  205. /package/lib/packlets/{crypto → crypto-utils}/browserHashProvider.d.ts +0 -0
  206. /package/lib/packlets/{crypto → crypto-utils}/browserHashProvider.js +0 -0
  207. /package/src/packlets/{crypto → crypto-utils}/browserHashProvider.ts +0 -0
  208. /package/temp/test/jest/jest-transform-cache-7492f1b44480e0cdd1f220078fb3afd8-79ef2876fae7ca75eedb2aa53dc48338/{0e/package_0eb6535f5987849d93ea51ef33a14cf6 → 8d/package_8dcbedef69e4299f0f51fcda8f4f1c8e} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileSystemAccessTreeAccessors.test.js","sourceRoot":"","sources":["../../../src/test/unit/fileSystemAccessTreeAccessors.test.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;AAEH,8BAA4B;AAC5B,wDAAyE;AACzE,wDAAgE;AAChE,oDAA6C;AAC7C,0EAIwC;AAExC,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;IAC7C,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;QACnC,IAAI,CAAC,+DAA+D,EAAE,KAAK,IAAI,EAAE;YAC/E,MAAM,SAAS,GAAG,IAAA,iDAAyB,EAAC,GAAG,EAAE;gBAC/C,UAAU,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,YAAY,EAAE;gBAC3D,aAAa,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,kBAAkB,EAAE;aACxE,CAAC,CAAC;YAEH,MAAM,MAAM,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AAC;YAC5C,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC;YAEzF,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC,UAAU,EAAE,CAAC;YAChD,MAAM,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,2CAA2C,CAAC,CAAC;QAC7E,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/*\n * Copyright (c) 2026 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport '@fgv/ts-utils-jest';\nimport { FileSystemAccessTreeAccessors } from '../../packlets/file-tree';\nimport { FileApiTreeAccessors } from '../../packlets/file-tree';\nimport { FileTree } from '@fgv/ts-json-base';\nimport {\n createMockDirectoryHandle,\n createMockFileHandle,\n MockFileSystemWritableFileStream\n} from '../utils/fileSystemAccessMocks';\n\ndescribe('FileSystemAccessTreeAccessors', () => {\n describe('fromDirectoryHandle', () => {\n test('creates accessors from directory handle with write permission', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'test.txt': { content: 'test content', type: 'text/plain' },\n 'config.json': { content: '{\"name\":\"test\"}', type: 'application/json' }\n });\n\n const result = await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle);\n expect(result).toSucceedAndSatisfy((accessors) => {\n expect(accessors).toBeInstanceOf(FileSystemAccessTreeAccessors);\n expect(accessors.getFileContents('/test.txt')).toSucceedWith('test content');\n expect(accessors.getFileContents('/config.json')).toSucceedWith('{\"name\":\"test\"}');\n });\n });\n\n test('creates accessors with nested directory structure', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'src/index.js': { content: 'console.log(\"hello\");', type: 'text/javascript' },\n 'src/utils/helper.js': { content: 'export const help = () => {};', type: 'text/javascript' },\n 'config/app.json': { content: '{\"version\":\"1.0\"}', type: 'application/json' }\n });\n\n const result = await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle);\n expect(result).toSucceed();\n\n const accessors = result.orThrow();\n expect(accessors.getFileContents('/src/index.js')).toSucceed();\n expect(accessors.getFileContents('/src/utils/helper.js')).toSucceed();\n expect(accessors.getFileContents('/config/app.json')).toSucceed();\n });\n\n test('fails when write permission required but not granted', async () => {\n const dirHandle = createMockDirectoryHandle(\n '/',\n { 'test.txt': { content: 'test', type: 'text/plain' } },\n { hasWritePermission: false }\n );\n\n const result = await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, {\n requireWritePermission: true\n });\n expect(result).toFailWith(/write permission required/i);\n });\n\n test('succeeds with read-only when write permission not required', async () => {\n const dirHandle = createMockDirectoryHandle(\n '/',\n { 'test.txt': { content: 'test', type: 'text/plain' } },\n { hasWritePermission: false }\n );\n\n const result = await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, {\n requireWritePermission: false\n });\n expect(result).toSucceedAndSatisfy((accessors) => {\n expect(accessors.getFileContents('/test.txt')).toSucceedWith('test');\n });\n });\n\n test('applies custom prefix to file paths', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'test.txt': { content: 'test', type: 'text/plain' }\n });\n\n const result = await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, {\n prefix: '/myapp'\n });\n expect(result).toSucceed();\n\n const accessors = result.orThrow();\n // With prefix, files are accessed with the prefix prepended\n expect(accessors.getFileContents('/myapp/test.txt')).toSucceed();\n });\n });\n\n describe('fromFileHandle', () => {\n test('creates single-file accessors from a file handle', async () => {\n const fileHandle = createMockFileHandle('collection.yaml', {\n content: 'metadata:\\n name: Test\\nitems: {}',\n type: 'text/plain'\n });\n\n const result = await FileSystemAccessTreeAccessors.fromFileHandle(fileHandle);\n expect(result).toSucceedAndSatisfy((accessors) => {\n expect(accessors).toBeInstanceOf(FileSystemAccessTreeAccessors);\n expect(accessors.getFileContents('/collection.yaml')).toSucceedWith(\n 'metadata:\\n name: Test\\nitems: {}'\n );\n });\n });\n\n test('fails when write permission required but not granted', async () => {\n const fileHandle = createMockFileHandle(\n 'collection.yaml',\n { content: 'content', type: 'text/plain' },\n undefined,\n { hasWritePermission: false }\n );\n\n const result = await FileSystemAccessTreeAccessors.fromFileHandle(fileHandle, {\n requireWritePermission: true\n });\n expect(result).toFailWith(/write permission required/i);\n });\n\n test('succeeds read-only when write permission not required', async () => {\n const fileHandle = createMockFileHandle(\n 'collection.yaml',\n { content: 'content', type: 'text/plain' },\n undefined,\n { hasWritePermission: false }\n );\n\n const result = await FileSystemAccessTreeAccessors.fromFileHandle(fileHandle, {\n requireWritePermission: false\n });\n expect(result).toSucceedAndSatisfy((accessors) => {\n expect(accessors.getFileContents('/collection.yaml')).toSucceedWith('content');\n });\n });\n\n test('grants permission via prompt', async () => {\n const fileHandle = createMockFileHandle(\n 'collection.yaml',\n { content: 'content', type: 'text/plain' },\n undefined,\n { permissionStatus: 'prompt', requestGranted: true }\n );\n\n const result = await FileSystemAccessTreeAccessors.fromFileHandle(fileHandle);\n expect(result).toSucceed();\n });\n\n test('fails gracefully when queryPermission throws', async () => {\n const fileHandle = {\n kind: 'file' as const,\n name: 'collection.yaml',\n async getFile(): Promise<File> {\n return createMockFileHandle('collection.yaml', {\n content: 'content',\n type: 'text/plain'\n }).getFile();\n },\n async createWritable(): Promise<FileSystemWritableFileStream> {\n throw new Error('not writable');\n },\n async queryPermission(): Promise<PermissionState> {\n throw new Error('Permission API unavailable');\n },\n async requestPermission(): Promise<PermissionState> {\n throw new Error('Permission API unavailable');\n },\n isSameEntry: async (): Promise<boolean> => false\n } as unknown as import('../../packlets/file-api-types').FileSystemFileHandle;\n\n const result = await FileSystemAccessTreeAccessors.fromFileHandle(fileHandle, {\n requireWritePermission: true\n });\n expect(result).toFailWith(/write permission required/i);\n });\n\n test('places file at specified filePath when filePath is provided', async () => {\n const fileHandle = createMockFileHandle('collection.yaml', {\n content: 'items: {}',\n type: 'text/plain'\n });\n\n const result = await FileSystemAccessTreeAccessors.fromFileHandle(fileHandle, {\n filePath: '/data/confections/collection.yaml'\n });\n expect(result).toSucceedAndSatisfy((accessors) => {\n expect(accessors.getFileContents('/data/confections/collection.yaml')).toSucceedWith('items: {}');\n });\n });\n\n test('write-back syncs to original file handle', async () => {\n let writtenContent = '';\n const fileHandle = createMockFileHandle(\n 'collection.yaml',\n { content: 'original', type: 'text/plain' },\n (content) => {\n writtenContent = content;\n }\n );\n\n const accessors = (await FileSystemAccessTreeAccessors.fromFileHandle(fileHandle)).orThrow();\n accessors.saveFileContents('/collection.yaml', 'modified').orThrow();\n expect(accessors.isDirty()).toBe(true);\n\n const syncResult = await accessors.syncToDisk();\n expect(syncResult).toSucceed();\n expect(accessors.isDirty()).toBe(false);\n expect(writtenContent).toBe('modified');\n });\n });\n\n describe('FileApiTreeAccessors.createPersistentFromFile', () => {\n test('creates a FileTree from a single file handle', async () => {\n const fileHandle = createMockFileHandle('collection.yaml', {\n content: 'metadata:\\n name: Test\\nitems: {}',\n type: 'text/plain'\n });\n\n const result = await FileApiTreeAccessors.createPersistentFromFile(fileHandle);\n expect(result).toSucceedAndSatisfy((tree) => {\n expect(tree).toBeInstanceOf(FileTree.FileTree);\n expect(tree.getFile('/collection.yaml')).toSucceed();\n });\n });\n\n test('fails when file handle cannot be opened', async () => {\n const fileHandle = createMockFileHandle('collection.yaml', {\n content: 'content',\n type: 'text/plain',\n failOnRead: true\n });\n\n const result = await FileApiTreeAccessors.createPersistentFromFile(fileHandle);\n expect(result).toFail();\n });\n });\n\n describe('persistence operations', () => {\n describe('isDirty and getDirtyPaths', () => {\n test('returns false when no changes made', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'test.txt': { content: 'original', type: 'text/plain' }\n });\n\n const accessors = (await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle)).orThrow();\n expect(accessors.isDirty()).toBe(false);\n expect(accessors.getDirtyPaths()).toEqual([]);\n });\n\n test('returns true after saving file contents', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'test.txt': { content: 'original', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, { mutable: true })\n ).orThrow();\n\n accessors.saveFileContents('/test.txt', 'modified').orThrow();\n\n expect(accessors.isDirty()).toBe(true);\n expect(accessors.getDirtyPaths()).toEqual(['/test.txt']);\n });\n\n test('tracks multiple dirty files', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'file1.txt': { content: 'content1', type: 'text/plain' },\n 'file2.txt': { content: 'content2', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, { mutable: true })\n ).orThrow();\n\n accessors.saveFileContents('/file1.txt', 'modified1').orThrow();\n accessors.saveFileContents('/file2.txt', 'modified2').orThrow();\n\n expect(accessors.isDirty()).toBe(true);\n expect(accessors.getDirtyPaths()).toContain('/file1.txt');\n expect(accessors.getDirtyPaths()).toContain('/file2.txt');\n });\n });\n\n describe('syncToDisk', () => {\n test('syncs modified files to disk', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'test.txt': { content: 'original', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, { mutable: true })\n ).orThrow();\n\n accessors.saveFileContents('/test.txt', 'modified').orThrow();\n expect(accessors.isDirty()).toBe(true);\n\n const syncResult = await accessors.syncToDisk();\n expect(syncResult).toSucceed();\n expect(accessors.isDirty()).toBe(false);\n\n // Verify the file was actually written\n const fileHandle = await dirHandle.getFileHandle('test.txt');\n const file = await fileHandle.getFile();\n const content = await file.text();\n expect(content).toBe('modified');\n });\n\n test('syncs multiple files in one operation', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'file1.txt': { content: 'content1', type: 'text/plain' },\n 'file2.txt': { content: 'content2', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, { mutable: true })\n ).orThrow();\n\n accessors.saveFileContents('/file1.txt', 'modified1').orThrow();\n accessors.saveFileContents('/file2.txt', 'modified2').orThrow();\n\n const syncResult = await accessors.syncToDisk();\n expect(syncResult).toSucceed();\n expect(accessors.isDirty()).toBe(false);\n });\n\n test('creates new files when syncing', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'existing.txt': { content: 'existing', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, { mutable: true })\n ).orThrow();\n\n // Add a new file to the in-memory tree\n accessors.saveFileContents('/newfile.txt', 'new content').orThrow();\n\n const syncResult = await accessors.syncToDisk();\n expect(syncResult).toSucceed();\n\n // Verify the new file was created\n const fileHandle = await dirHandle.getFileHandle('newfile.txt');\n expect(fileHandle).toBeDefined();\n const file = await fileHandle.getFile();\n const content = await file.text();\n expect(content).toBe('new content');\n });\n\n test('creates nested directories when syncing new files', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'existing.txt': { content: 'existing', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, { mutable: true })\n ).orThrow();\n\n accessors.saveFileContents('/src/utils/helper.js', 'export const help = () => {};').orThrow();\n\n const syncResult = await accessors.syncToDisk();\n expect(syncResult).toSucceed();\n\n // Verify nested directories were created\n const srcDir = await dirHandle.getDirectoryHandle('src');\n const utilsDir = await srcDir.getDirectoryHandle('utils');\n const fileHandle = await utilsDir.getFileHandle('helper.js');\n expect(fileHandle).toBeDefined();\n });\n\n test('fails when write permission not granted', async () => {\n const dirHandle = createMockDirectoryHandle(\n '/',\n { 'test.txt': { content: 'original', type: 'text/plain' } },\n { hasWritePermission: false }\n );\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, {\n mutable: true,\n requireWritePermission: false\n })\n ).orThrow();\n\n accessors.saveFileContents('/test.txt', 'modified').orThrow();\n\n const syncResult = await accessors.syncToDisk();\n expect(syncResult).toFailWith(/write permission not granted/i);\n });\n\n test('clears dirty state after successful sync', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'file1.txt': { content: 'content1', type: 'text/plain' },\n 'file2.txt': { content: 'content2', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, { mutable: true })\n ).orThrow();\n\n accessors.saveFileContents('/file1.txt', 'modified1').orThrow();\n accessors.saveFileContents('/file2.txt', 'modified2').orThrow();\n expect(accessors.isDirty()).toBe(true);\n\n const syncResult = await accessors.syncToDisk();\n expect(syncResult).toSucceed();\n expect(accessors.isDirty()).toBe(false);\n expect(accessors.getDirtyPaths()).toEqual([]);\n });\n });\n\n describe('autoSync mode', () => {\n test('automatically syncs changes when autoSync is enabled', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'test.txt': { content: 'original', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, {\n mutable: true,\n autoSync: true\n })\n ).orThrow();\n\n accessors.saveFileContents('/test.txt', 'modified').orThrow();\n\n // Give auto-sync a moment to complete (it's fire-and-forget)\n await new Promise((resolve) => setTimeout(resolve, 10));\n\n // Verify the file was written\n const fileHandle = await dirHandle.getFileHandle('test.txt');\n const file = await fileHandle.getFile();\n const content = await file.text();\n expect(content).toBe('modified');\n });\n\n test('does not auto-sync when autoSync is disabled', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'test.txt': { content: 'original', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, {\n mutable: true,\n autoSync: false\n })\n ).orThrow();\n\n accessors.saveFileContents('/test.txt', 'modified').orThrow();\n\n // Verify file is marked dirty but not synced\n expect(accessors.isDirty()).toBe(true);\n expect(accessors.getDirtyPaths()).toContain('/test.txt');\n\n // In-memory content should be modified\n expect(accessors.getFileContents('/test.txt')).toSucceedWith('modified');\n });\n });\n });\n\n describe('fileIsMutable', () => {\n test('returns persistent detail when write permission granted', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'test.txt': { content: 'test', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, { mutable: true })\n ).orThrow();\n\n const result = accessors.fileIsMutable('/test.txt');\n expect(result).toSucceedWithDetail(true, 'persistent');\n });\n\n test('returns transient detail when write permission not granted', async () => {\n const dirHandle = createMockDirectoryHandle(\n '/',\n { 'test.txt': { content: 'test', type: 'text/plain' } },\n { hasWritePermission: false }\n );\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, {\n mutable: true,\n requireWritePermission: false\n })\n ).orThrow();\n\n const result = accessors.fileIsMutable('/test.txt');\n expect(result).toSucceedWithDetail(true, 'transient');\n });\n\n test('returns not-mutable when mutability disabled', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'test.txt': { content: 'test', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, { mutable: false })\n ).orThrow();\n\n const result = accessors.fileIsMutable('/test.txt');\n expect(result).toFailWithDetail(/mutability is disabled/i, 'not-mutable');\n });\n });\n\n describe('integration with FileApiTreeAccessors', () => {\n test('createPersistent creates FileTree with persistent accessors', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'test.txt': { content: 'test content', type: 'text/plain' }\n });\n\n const result = await FileApiTreeAccessors.createPersistent(dirHandle, { mutable: true });\n expect(result).toSucceed();\n\n const tree = result.orThrow();\n expect(tree).toBeInstanceOf(FileTree.FileTree);\n expect(FileTree.isPersistentAccessors(tree.hal)).toBe(true);\n\n const file = tree.getFile('/test.txt').orThrow();\n expect(file.getIsMutable()).toSucceedWithDetail(true, 'persistent');\n });\n\n test('createPersistent with autoSync option', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'test.txt': { content: 'original', type: 'text/plain' }\n });\n\n const result = await FileApiTreeAccessors.createPersistent(dirHandle, {\n mutable: true,\n autoSync: true\n });\n\n expect(result).toSucceedAndSatisfy((tree) => {\n expect(tree).toBeInstanceOf(FileTree.FileTree);\n });\n\n const tree = result.orThrow();\n const file = tree.getFile('/test.txt').orThrow();\n file.setRawContents('modified').orThrow();\n\n // Give auto-sync time to complete\n await new Promise((resolve) => setTimeout(resolve, 10));\n\n // Verify file was written\n const fileHandle = await dirHandle.getFileHandle('test.txt');\n const diskFile = await fileHandle.getFile();\n const content = await diskFile.text();\n expect(content).toBe('modified');\n });\n\n test('createPersistent fails with appropriate error', async () => {\n const dirHandle = createMockDirectoryHandle(\n '/',\n { 'test.txt': { content: 'test', type: 'text/plain' } },\n { hasWritePermission: false }\n );\n\n const result = await FileApiTreeAccessors.createPersistent(dirHandle, {\n requireWritePermission: true\n });\n expect(result).toFailWith(/write permission required/i);\n });\n });\n\n describe('error handling', () => {\n test('handles permission query errors gracefully', async () => {\n const dirHandle = createMockDirectoryHandle(\n '/',\n { 'test.txt': { content: 'test', type: 'text/plain' } },\n { permissionError: true }\n );\n\n const result = await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, {\n requireWritePermission: false\n });\n // Should succeed but without write permission due to error\n expect(result).toSucceed();\n });\n\n test('handles permission status \"prompt\" by requesting permission', async () => {\n const dirHandle = createMockDirectoryHandle(\n '/',\n { 'test.txt': { content: 'test', type: 'text/plain' } },\n { permissionStatus: 'prompt', requestGranted: true }\n );\n\n const result = await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, {\n requireWritePermission: true\n });\n expect(result).toSucceedAndSatisfy((accessors) => {\n expect(accessors).toBeInstanceOf(FileSystemAccessTreeAccessors);\n });\n });\n\n test('handles sync failures with aggregated errors', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'file1.txt': { content: 'content1', type: 'text/plain' },\n 'file2.txt': { content: 'content2', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, { mutable: true })\n ).orThrow();\n\n // Modify files\n accessors.saveFileContents('/file1.txt', 'modified1').orThrow();\n accessors.saveFileContents('/file2.txt', 'modified2').orThrow();\n\n // Replace the file handles with ones that fail to write\n const handles = (accessors as any)._handles as Map<string, any>;\n for (const [, handle] of handles) {\n handle.createWritable = jest.fn().mockRejectedValue(new Error('Write permission denied'));\n }\n\n const syncResult = await accessors.syncToDisk();\n expect(syncResult).toFailWith(/Failed to sync 2 file\\(s\\)/i);\n });\n\n test('handles getFileContents failure during sync', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'test.txt': { content: 'original', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, { mutable: true })\n ).orThrow();\n\n // Add a new file\n accessors.saveFileContents('/newfile.txt', 'new content').orThrow();\n\n // Override getFileContents to fail\n const originalGetFileContents = accessors.getFileContents.bind(accessors);\n accessors.getFileContents = jest.fn((path: string) => {\n if (path === '/newfile.txt') {\n return { isSuccess: () => false, isFailure: () => true, message: 'File read error' } as any;\n }\n return originalGetFileContents(path);\n });\n\n const syncResult = await accessors.syncToDisk();\n expect(syncResult).toFailWith(/File read error/i);\n });\n\n test('handles file write failure during sync', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'test.txt': { content: 'original', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, { mutable: true })\n ).orThrow();\n\n accessors.saveFileContents('/test.txt', 'modified').orThrow();\n\n // Replace the handle with one that fails to write\n const handles = (accessors as any)._handles as Map<string, any>;\n const handle = handles.get('/test.txt');\n handle.createWritable = jest.fn().mockRejectedValue(new Error('Disk full'));\n\n const syncResult = await accessors.syncToDisk();\n expect(syncResult).toFailWith(/Failed to write file.*Disk full/i);\n });\n\n test('handles invalid file path with no filename', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'existing.txt': { content: 'existing', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, { mutable: true })\n ).orThrow();\n\n // Override resolveAbsolutePath to return an empty path to trigger the error\n const originalResolveAbsolutePath = (accessors as any).resolveAbsolutePath.bind(accessors);\n (accessors as any).resolveAbsolutePath = jest.fn((path: string) => {\n if (path === '/badpath') {\n return ''; // This will result in no parts after split\n }\n return originalResolveAbsolutePath(path);\n });\n\n // Create a new file with the bad path - don't throw if it fails\n const saveResult = accessors.saveFileContents('/badpath', 'content');\n if (saveResult.isFailure()) {\n // saveFileContents itself might reject the path\n expect(saveResult).toFailWith(/invalid file path/i);\n } else {\n // If save succeeded, sync should fail\n const syncResult = await accessors.syncToDisk();\n expect(syncResult).toFailWith(/Invalid file path/i);\n }\n });\n\n test('handles file creation failure in _createAndWriteFile', async () => {\n const dirHandle = createMockDirectoryHandle('/', {\n 'existing.txt': { content: 'existing', type: 'text/plain' }\n });\n\n const accessors = (\n await FileSystemAccessTreeAccessors.fromDirectoryHandle(dirHandle, { mutable: true })\n ).orThrow();\n\n // Add a new file that will need to be created\n accessors.saveFileContents('/newdir/newfile.txt', 'new content').orThrow();\n\n // Mock getDirectoryHandle to fail\n const rootDir = (accessors as any)._rootDir;\n rootDir.getDirectoryHandle = jest.fn().mockRejectedValue(new Error('Permission denied'));\n\n const syncResult = await accessors.syncToDisk();\n expect(syncResult).toFailWith(/Failed to create file.*Permission denied/i);\n });\n });\n});\n"]}
@@ -0,0 +1,2 @@
1
+ import '@fgv/ts-utils-jest';
2
+ //# sourceMappingURL=localStorageTreeAccessors.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localStorageTreeAccessors.test.d.ts","sourceRoot":"","sources":["../../../src/test/unit/localStorageTreeAccessors.test.ts"],"names":[],"mappings":"AAsBA,OAAO,oBAAoB,CAAC"}