@inlang/sdk 2.0.0-prerelease.0 → 2.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.
- package/LICENSE +21 -201
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/lix/index.d.ts +2 -0
- package/dist/lix/index.d.ts.map +1 -0
- package/dist/lix/index.js +5 -0
- package/dist/lix/index.js.map +1 -0
- package/dist/project/api.d.ts +0 -4
- package/dist/project/api.d.ts.map +1 -1
- package/dist/project/api.js +2 -2
- package/dist/project/api.js.map +1 -1
- package/dist/project/initHandleSaveToLixOnChange.d.ts.map +1 -1
- package/dist/project/initHandleSaveToLixOnChange.js +16 -10
- package/dist/project/initHandleSaveToLixOnChange.js.map +1 -1
- package/dist/project/loadProject.d.ts +11 -1
- package/dist/project/loadProject.d.ts.map +1 -1
- package/dist/project/loadProject.js +79 -16
- package/dist/project/loadProject.js.map +1 -1
- package/dist/project/loadProject.test.js +45 -22
- package/dist/project/loadProject.test.js.map +1 -1
- package/dist/project/loadProjectFromDirectory.d.ts +0 -10
- package/dist/project/loadProjectFromDirectory.d.ts.map +1 -1
- package/dist/project/loadProjectFromDirectory.js +30 -39
- package/dist/project/loadProjectFromDirectory.js.map +1 -1
- package/dist/project/loadProjectFromDirectory.test.js +32 -11
- package/dist/project/loadProjectFromDirectory.test.js.map +1 -1
- package/dist/project/loadProjectInMemory.d.ts.map +1 -1
- package/dist/project/loadProjectInMemory.js +3 -2
- package/dist/project/loadProjectInMemory.js.map +1 -1
- package/dist/project/maybeCaptureTelemetry.d.ts +8 -2
- package/dist/project/maybeCaptureTelemetry.d.ts.map +1 -1
- package/dist/project/maybeCaptureTelemetry.js +49 -37
- package/dist/project/maybeCaptureTelemetry.js.map +1 -1
- package/dist/project/maybeCaptureTelemetry.test.js +14 -3
- package/dist/project/maybeCaptureTelemetry.test.js.map +1 -1
- package/dist/project/newProject.d.ts.map +1 -1
- package/dist/project/newProject.js +6 -5
- package/dist/project/newProject.js.map +1 -1
- package/dist/project/saveProjectToDirectory.test.js +3 -3
- package/dist/project/saveProjectToDirectory.test.js.map +1 -1
- package/dist/query-utilities/index.d.ts +0 -1
- package/dist/query-utilities/index.d.ts.map +1 -1
- package/dist/query-utilities/index.js +2 -3
- package/dist/query-utilities/index.js.map +1 -1
- package/dist/services/env-variables/index.js +3 -3
- package/dist/services/env-variables/index.js.map +1 -1
- package/dist/services/telemetry/capture.d.ts +1 -0
- package/dist/services/telemetry/capture.d.ts.map +1 -1
- package/dist/services/telemetry/capture.js +5 -6
- package/dist/services/telemetry/capture.js.map +1 -1
- package/dist/services/telemetry/capture.test.js +4 -2
- package/dist/services/telemetry/capture.test.js.map +1 -1
- package/package.json +6 -11
- package/src/index.ts +0 -2
- package/src/lix/index.ts +1 -0
- package/src/project/api.ts +0 -4
- package/src/project/initHandleSaveToLixOnChange.ts +13 -8
- package/src/project/loadProject.test.ts +51 -23
- package/src/project/loadProject.ts +108 -15
- package/src/project/loadProjectFromDirectory.test.ts +44 -9
- package/src/project/loadProjectFromDirectory.ts +32 -47
- package/src/project/loadProjectInMemory.ts +1 -0
- package/src/project/maybeCaptureTelemetry.test.ts +16 -2
- package/src/project/maybeCaptureTelemetry.ts +55 -37
- package/src/project/newProject.ts +4 -3
- package/src/project/saveProjectToDirectory.test.ts +1 -1
- package/src/query-utilities/index.ts +0 -1
- package/src/services/telemetry/capture.test.ts +2 -0
- package/src/services/telemetry/capture.ts +5 -4
- package/dist/project/state/id$.d.ts +0 -6
- package/dist/project/state/id$.d.ts.map +0 -1
- package/dist/project/state/id$.js +0 -19
- package/dist/project/state/id$.js.map +0 -1
- package/dist/project/state/id$.test.d.ts +0 -2
- package/dist/project/state/id$.test.d.ts.map +0 -1
- package/dist/project/state/id$.test.js +0 -36
- package/dist/project/state/id$.test.js.map +0 -1
- package/dist/project/state/setSettings.d.ts +0 -7
- package/dist/project/state/setSettings.d.ts.map +0 -1
- package/dist/project/state/setSettings.js +0 -16
- package/dist/project/state/setSettings.js.map +0 -1
- package/dist/project/state/setSettings.test.d.ts +0 -2
- package/dist/project/state/setSettings.test.d.ts.map +0 -1
- package/dist/project/state/setSettings.test.js +0 -58
- package/dist/project/state/setSettings.test.js.map +0 -1
- package/dist/project/state/settings$.d.ts +0 -7
- package/dist/project/state/settings$.d.ts.map +0 -1
- package/dist/project/state/settings$.js +0 -21
- package/dist/project/state/settings$.js.map +0 -1
- package/dist/project/state/settings$.test.d.ts +0 -2
- package/dist/project/state/settings$.test.d.ts.map +0 -1
- package/dist/project/state/settings$.test.js +0 -51
- package/dist/project/state/settings$.test.js.map +0 -1
- package/dist/project/state/state.d.ts +0 -58
- package/dist/project/state/state.d.ts.map +0 -1
- package/dist/project/state/state.js +0 -67
- package/dist/project/state/state.js.map +0 -1
- package/dist/project/state/state.test.d.ts +0 -2
- package/dist/project/state/state.test.d.ts.map +0 -1
- package/dist/project/state/state.test.js +0 -103
- package/dist/project/state/state.test.js.map +0 -1
- package/dist/query-utilities/pollQuery.d.ts +0 -14
- package/dist/query-utilities/pollQuery.d.ts.map +0 -1
- package/dist/query-utilities/pollQuery.js +0 -22
- package/dist/query-utilities/pollQuery.js.map +0 -1
- package/dist/query-utilities/pollQuery.test.d.ts +0 -2
- package/dist/query-utilities/pollQuery.test.d.ts.map +0 -1
- package/dist/query-utilities/pollQuery.test.js +0 -67
- package/dist/query-utilities/pollQuery.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/LICENSE +0 -21
- package/node_modules/@lix-js/sdk/README.md +0 -68
- package/node_modules/@lix-js/sdk/dist/account/create-account.d.ts +0 -7
- package/node_modules/@lix-js/sdk/dist/account/create-account.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/account/create-account.js +0 -20
- package/node_modules/@lix-js/sdk/dist/account/create-account.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/account/create-account.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/account/create-account.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/account/create-account.test.js +0 -22
- package/node_modules/@lix-js/sdk/dist/account/create-account.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/account/database-schema.d.ts +0 -18
- package/node_modules/@lix-js/sdk/dist/account/database-schema.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/account/database-schema.js +0 -36
- package/node_modules/@lix-js/sdk/dist/account/database-schema.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/account/database-schema.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/account/database-schema.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/account/database-schema.test.js +0 -139
- package/node_modules/@lix-js/sdk/dist/account/database-schema.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/account/index.d.ts +0 -4
- package/node_modules/@lix-js/sdk/dist/account/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/account/index.js +0 -4
- package/node_modules/@lix-js/sdk/dist/account/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/account/switch-account.d.ts +0 -26
- package/node_modules/@lix-js/sdk/dist/account/switch-account.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/account/switch-account.js +0 -34
- package/node_modules/@lix-js/sdk/dist/account/switch-account.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/account/switch-account.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/account/switch-account.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/account/switch-account.test.js +0 -48
- package/node_modules/@lix-js/sdk/dist/account/switch-account.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change/apply-changes.d.ts +0 -25
- package/node_modules/@lix-js/sdk/dist/change/apply-changes.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change/apply-changes.js +0 -98
- package/node_modules/@lix-js/sdk/dist/change/apply-changes.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change/apply-changes.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change/apply-changes.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change/apply-changes.test.js +0 -222
- package/node_modules/@lix-js/sdk/dist/change/apply-changes.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change/create-change.d.ts +0 -27
- package/node_modules/@lix-js/sdk/dist/change/create-change.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change/create-change.js +0 -97
- package/node_modules/@lix-js/sdk/dist/change/create-change.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change/create-change.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change/create-change.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change/create-change.test.js +0 -235
- package/node_modules/@lix-js/sdk/dist/change/create-change.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change/index.d.ts +0 -3
- package/node_modules/@lix-js/sdk/dist/change/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change/index.js +0 -3
- package/node_modules/@lix-js/sdk/dist/change/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change/mock-change.d.ts +0 -10
- package/node_modules/@lix-js/sdk/dist/change/mock-change.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change/mock-change.js +0 -20
- package/node_modules/@lix-js/sdk/dist/change/mock-change.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/create-change-conflict.d.ts +0 -15
- package/node_modules/@lix-js/sdk/dist/change-conflict/create-change-conflict.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/create-change-conflict.js +0 -67
- package/node_modules/@lix-js/sdk/dist/change-conflict/create-change-conflict.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/create-change-conflict.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change-conflict/create-change-conflict.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/create-change-conflict.test.js +0 -145
- package/node_modules/@lix-js/sdk/dist/change-conflict/create-change-conflict.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-change-conflicts.d.ts +0 -23
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-change-conflicts.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-change-conflicts.js +0 -50
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-change-conflicts.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-change-conflicts.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-change-conflicts.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-change-conflicts.test.js +0 -182
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-change-conflicts.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-diverging-entity-conflict.d.ts +0 -32
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-diverging-entity-conflict.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-diverging-entity-conflict.js +0 -66
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-diverging-entity-conflict.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-diverging-entity-conflict.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-diverging-entity-conflict.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-diverging-entity-conflict.test.js +0 -201
- package/node_modules/@lix-js/sdk/dist/change-conflict/detect-diverging-entity-conflict.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/garbage-collect-change-conflicts.d.ts +0 -14
- package/node_modules/@lix-js/sdk/dist/change-conflict/garbage-collect-change-conflicts.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/garbage-collect-change-conflicts.js +0 -67
- package/node_modules/@lix-js/sdk/dist/change-conflict/garbage-collect-change-conflicts.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/garbage-collect-change-conflicts.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change-conflict/garbage-collect-change-conflicts.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/garbage-collect-change-conflicts.test.js +0 -182
- package/node_modules/@lix-js/sdk/dist/change-conflict/garbage-collect-change-conflicts.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/index.d.ts +0 -4
- package/node_modules/@lix-js/sdk/dist/change-conflict/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/index.js +0 -4
- package/node_modules/@lix-js/sdk/dist/change-conflict/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/resolve-conflict-by-selecting.d.ts +0 -12
- package/node_modules/@lix-js/sdk/dist/change-conflict/resolve-conflict-by-selecting.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/resolve-conflict-by-selecting.js +0 -48
- package/node_modules/@lix-js/sdk/dist/change-conflict/resolve-conflict-by-selecting.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/resolve-conflict-by-selecting.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change-conflict/resolve-conflict-by-selecting.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/resolve-conflict-by-selecting.test.js +0 -95
- package/node_modules/@lix-js/sdk/dist/change-conflict/resolve-conflict-by-selecting.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/update-change-conflicts.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change-conflict/update-change-conflicts.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-conflict/update-change-conflicts.js +0 -72
- package/node_modules/@lix-js/sdk/dist/change-conflict/update-change-conflicts.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/change-queue-settled.d.ts +0 -13
- package/node_modules/@lix-js/sdk/dist/change-queue/change-queue-settled.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/change-queue-settled.js +0 -25
- package/node_modules/@lix-js/sdk/dist/change-queue/change-queue-settled.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/change-queue-settled.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change-queue/change-queue-settled.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/change-queue-settled.test.js +0 -47
- package/node_modules/@lix-js/sdk/dist/change-queue/change-queue-settled.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/file-handlers.d.ts +0 -24
- package/node_modules/@lix-js/sdk/dist/change-queue/file-handlers.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/file-handlers.js +0 -209
- package/node_modules/@lix-js/sdk/dist/change-queue/file-handlers.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/index.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change-queue/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/index.js +0 -2
- package/node_modules/@lix-js/sdk/dist/change-queue/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/init-change-queue.d.ts +0 -7
- package/node_modules/@lix-js/sdk/dist/change-queue/init-change-queue.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/init-change-queue.js +0 -80
- package/node_modules/@lix-js/sdk/dist/change-queue/init-change-queue.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/init-change-queue.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change-queue/init-change-queue.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/init-change-queue.test.js +0 -373
- package/node_modules/@lix-js/sdk/dist/change-queue/init-change-queue.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/with-skip-change-queue.d.ts +0 -3
- package/node_modules/@lix-js/sdk/dist/change-queue/with-skip-change-queue.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/with-skip-change-queue.js +0 -26
- package/node_modules/@lix-js/sdk/dist/change-queue/with-skip-change-queue.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/with-skip-change-queue.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change-queue/with-skip-change-queue.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-queue/with-skip-change-queue.test.js +0 -138
- package/node_modules/@lix-js/sdk/dist/change-queue/with-skip-change-queue.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-schema/index.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change-schema/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-schema/index.js +0 -2
- package/node_modules/@lix-js/sdk/dist/change-schema/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-schema/types.d.ts +0 -40
- package/node_modules/@lix-js/sdk/dist/change-schema/types.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-schema/types.js +0 -2
- package/node_modules/@lix-js/sdk/dist/change-schema/types.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-schema/types.test-d.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change-schema/types.test-d.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-schema/types.test-d.js +0 -34
- package/node_modules/@lix-js/sdk/dist/change-schema/types.test-d.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-set/change-set-element-in-symmetric-difference.d.ts +0 -19
- package/node_modules/@lix-js/sdk/dist/change-set/change-set-element-in-symmetric-difference.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-set/change-set-element-in-symmetric-difference.js +0 -36
- package/node_modules/@lix-js/sdk/dist/change-set/change-set-element-in-symmetric-difference.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-set/change-set-element-in-symmetric-difference.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change-set/change-set-element-in-symmetric-difference.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-set/change-set-element-in-symmetric-difference.test.js +0 -106
- package/node_modules/@lix-js/sdk/dist/change-set/change-set-element-in-symmetric-difference.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-set/create-change-set.d.ts +0 -16
- package/node_modules/@lix-js/sdk/dist/change-set/create-change-set.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-set/create-change-set.js +0 -33
- package/node_modules/@lix-js/sdk/dist/change-set/create-change-set.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-set/create-change-set.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/change-set/create-change-set.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-set/create-change-set.test.js +0 -37
- package/node_modules/@lix-js/sdk/dist/change-set/create-change-set.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-set/index.d.ts +0 -3
- package/node_modules/@lix-js/sdk/dist/change-set/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/change-set/index.js +0 -3
- package/node_modules/@lix-js/sdk/dist/change-set/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/apply-schema.d.ts +0 -8
- package/node_modules/@lix-js/sdk/dist/database/apply-schema.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/apply-schema.js +0 -266
- package/node_modules/@lix-js/sdk/dist/database/apply-schema.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/execute-sync.d.ts +0 -18
- package/node_modules/@lix-js/sdk/dist/database/execute-sync.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/execute-sync.js +0 -36
- package/node_modules/@lix-js/sdk/dist/database/execute-sync.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/execute-sync.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/database/execute-sync.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/execute-sync.test.js +0 -118
- package/node_modules/@lix-js/sdk/dist/database/execute-sync.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/index.d.ts +0 -5
- package/node_modules/@lix-js/sdk/dist/database/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/index.js +0 -5
- package/node_modules/@lix-js/sdk/dist/database/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/init-db.d.ts +0 -7
- package/node_modules/@lix-js/sdk/dist/database/init-db.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/init-db.js +0 -95
- package/node_modules/@lix-js/sdk/dist/database/init-db.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/init-db.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/database/init-db.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/init-db.test.js +0 -497
- package/node_modules/@lix-js/sdk/dist/database/init-db.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v1.d.ts +0 -3
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v1.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v1.js +0 -44
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v1.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v1.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v1.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v1.test.js +0 -162
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v1.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v2.d.ts +0 -12
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v2.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v2.js +0 -149
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v2.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v2.no_test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v2.no_test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v2.no_test.js +0 -162
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/parse-jsonb-plugin-v2.no_test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/serialize-jsonb-plugin.d.ts +0 -3
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/serialize-jsonb-plugin.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/serialize-jsonb-plugin.js +0 -100
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/serialize-jsonb-plugin.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/serialize-jsonb-plugin.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/serialize-jsonb-plugin.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/serialize-jsonb-plugin.test.js +0 -107
- package/node_modules/@lix-js/sdk/dist/database/kysely-plugin/serialize-jsonb-plugin.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/mutation-log/database-schema.d.ts +0 -16
- package/node_modules/@lix-js/sdk/dist/database/mutation-log/database-schema.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/mutation-log/database-schema.js +0 -101
- package/node_modules/@lix-js/sdk/dist/database/mutation-log/database-schema.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/mutation-log/lix-session.d.ts +0 -8
- package/node_modules/@lix-js/sdk/dist/database/mutation-log/lix-session.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/mutation-log/lix-session.js +0 -18
- package/node_modules/@lix-js/sdk/dist/database/mutation-log/lix-session.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/nano-id.d.ts +0 -21
- package/node_modules/@lix-js/sdk/dist/database/nano-id.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/nano-id.js +0 -58
- package/node_modules/@lix-js/sdk/dist/database/nano-id.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/nano-id.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/database/nano-id.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/nano-id.test.js +0 -13
- package/node_modules/@lix-js/sdk/dist/database/nano-id.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/schema.d.ts +0 -212
- package/node_modules/@lix-js/sdk/dist/database/schema.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/database/schema.js +0 -2
- package/node_modules/@lix-js/sdk/dist/database/schema.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/discussion/create-comment.d.ts +0 -8
- package/node_modules/@lix-js/sdk/dist/discussion/create-comment.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/discussion/create-comment.js +0 -12
- package/node_modules/@lix-js/sdk/dist/discussion/create-comment.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/discussion/create-discussion.d.ts +0 -21
- package/node_modules/@lix-js/sdk/dist/discussion/create-discussion.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/discussion/create-discussion.js +0 -40
- package/node_modules/@lix-js/sdk/dist/discussion/create-discussion.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/discussion/create-discussion.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/discussion/create-discussion.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/discussion/create-discussion.test.js +0 -38
- package/node_modules/@lix-js/sdk/dist/discussion/create-discussion.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/discussion/index.d.ts +0 -3
- package/node_modules/@lix-js/sdk/dist/discussion/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/discussion/index.js +0 -3
- package/node_modules/@lix-js/sdk/dist/discussion/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file/index.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/file/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file/index.js +0 -2
- package/node_modules/@lix-js/sdk/dist/file/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file/validate-file-path.d.ts +0 -16
- package/node_modules/@lix-js/sdk/dist/file/validate-file-path.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file/validate-file-path.js +0 -44
- package/node_modules/@lix-js/sdk/dist/file/validate-file-path.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file/validate-file-path.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/file/validate-file-path.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file/validate-file-path.test.js +0 -36
- package/node_modules/@lix-js/sdk/dist/file/validate-file-path.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/file-handlers.d.ts +0 -24
- package/node_modules/@lix-js/sdk/dist/file-queue/file-handlers.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/file-handlers.js +0 -209
- package/node_modules/@lix-js/sdk/dist/file-queue/file-handlers.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-process.d.ts +0 -5
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-process.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-process.js +0 -85
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-process.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-process.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-process.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-process.test.js +0 -373
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-process.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-settled.d.ts +0 -13
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-settled.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-settled.js +0 -25
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-settled.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-settled.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-settled.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-settled.test.js +0 -47
- package/node_modules/@lix-js/sdk/dist/file-queue/file-queue-settled.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/index.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/file-queue/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/index.js +0 -2
- package/node_modules/@lix-js/sdk/dist/file-queue/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/with-skip-file-queue.d.ts +0 -3
- package/node_modules/@lix-js/sdk/dist/file-queue/with-skip-file-queue.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/with-skip-file-queue.js +0 -26
- package/node_modules/@lix-js/sdk/dist/file-queue/with-skip-file-queue.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/with-skip-file-queue.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/file-queue/with-skip-file-queue.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/file-queue/with-skip-file-queue.test.js +0 -138
- package/node_modules/@lix-js/sdk/dist/file-queue/with-skip-file-queue.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/index.d.ts +0 -17
- package/node_modules/@lix-js/sdk/dist/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/index.js +0 -17
- package/node_modules/@lix-js/sdk/dist/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/key-value/database-schema.d.ts +0 -42
- package/node_modules/@lix-js/sdk/dist/key-value/database-schema.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/key-value/database-schema.js +0 -21
- package/node_modules/@lix-js/sdk/dist/key-value/database-schema.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/key-value/database-schema.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/key-value/database-schema.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/key-value/database-schema.test.js +0 -114
- package/node_modules/@lix-js/sdk/dist/key-value/database-schema.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/close-lix.d.ts +0 -8
- package/node_modules/@lix-js/sdk/dist/lix/close-lix.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/close-lix.js +0 -7
- package/node_modules/@lix-js/sdk/dist/lix/close-lix.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/index.d.ts +0 -5
- package/node_modules/@lix-js/sdk/dist/lix/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/index.js +0 -8
- package/node_modules/@lix-js/sdk/dist/lix/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/merge.d.ts +0 -9
- package/node_modules/@lix-js/sdk/dist/lix/merge.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/merge.get-leaf-changes-only-in-source.d.ts +0 -15
- package/node_modules/@lix-js/sdk/dist/lix/merge.get-leaf-changes-only-in-source.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/merge.get-leaf-changes-only-in-source.js +0 -34
- package/node_modules/@lix-js/sdk/dist/lix/merge.get-leaf-changes-only-in-source.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/merge.get-leaf-changes-only-in-source.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/lix/merge.get-leaf-changes-only-in-source.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/merge.get-leaf-changes-only-in-source.test.js +0 -121
- package/node_modules/@lix-js/sdk/dist/lix/merge.get-leaf-changes-only-in-source.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/merge.js +0 -195
- package/node_modules/@lix-js/sdk/dist/lix/merge.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/merge.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/lix/merge.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/merge.test.js +0 -689
- package/node_modules/@lix-js/sdk/dist/lix/merge.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/new-lix.d.ts +0 -8
- package/node_modules/@lix-js/sdk/dist/lix/new-lix.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/new-lix.js +0 -26
- package/node_modules/@lix-js/sdk/dist/lix/new-lix.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/new-lix.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/lix/new-lix.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/new-lix.test.js +0 -21
- package/node_modules/@lix-js/sdk/dist/lix/new-lix.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/open-lix-in-memory.d.ts +0 -12
- package/node_modules/@lix-js/sdk/dist/lix/open-lix-in-memory.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/open-lix-in-memory.js +0 -19
- package/node_modules/@lix-js/sdk/dist/lix/open-lix-in-memory.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/open-lix-in-memory.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/lix/open-lix-in-memory.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/open-lix-in-memory.test.js +0 -30
- package/node_modules/@lix-js/sdk/dist/lix/open-lix-in-memory.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/open-lix.d.ts +0 -50
- package/node_modules/@lix-js/sdk/dist/lix/open-lix.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/open-lix.js +0 -33
- package/node_modules/@lix-js/sdk/dist/lix/open-lix.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/open-lix.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/lix/open-lix.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/open-lix.test.js +0 -38
- package/node_modules/@lix-js/sdk/dist/lix/open-lix.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/to-blob.d.ts +0 -11
- package/node_modules/@lix-js/sdk/dist/lix/to-blob.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/lix/to-blob.js +0 -11
- package/node_modules/@lix-js/sdk/dist/lix/to-blob.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/apply-own-change.d.ts +0 -10
- package/node_modules/@lix-js/sdk/dist/own-change-control/apply-own-change.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/apply-own-change.js +0 -69
- package/node_modules/@lix-js/sdk/dist/own-change-control/apply-own-change.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/apply-own-change.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/own-change-control/apply-own-change.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/apply-own-change.test.js +0 -297
- package/node_modules/@lix-js/sdk/dist/own-change-control/apply-own-change.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/change-controlled-tables.d.ts +0 -60
- package/node_modules/@lix-js/sdk/dist/own-change-control/change-controlled-tables.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/change-controlled-tables.js +0 -70
- package/node_modules/@lix-js/sdk/dist/own-change-control/change-controlled-tables.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/change-controlled-tables.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/own-change-control/change-controlled-tables.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/change-controlled-tables.test.js +0 -48
- package/node_modules/@lix-js/sdk/dist/own-change-control/change-controlled-tables.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/database-triggers.d.ts +0 -5
- package/node_modules/@lix-js/sdk/dist/own-change-control/database-triggers.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/database-triggers.js +0 -135
- package/node_modules/@lix-js/sdk/dist/own-change-control/database-triggers.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/database-triggers.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/own-change-control/database-triggers.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/database-triggers.test.js +0 -214
- package/node_modules/@lix-js/sdk/dist/own-change-control/database-triggers.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/index.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/own-change-control/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/index.js +0 -2
- package/node_modules/@lix-js/sdk/dist/own-change-control/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/with-skip-own-change-control.d.ts +0 -3
- package/node_modules/@lix-js/sdk/dist/own-change-control/with-skip-own-change-control.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/with-skip-own-change-control.js +0 -28
- package/node_modules/@lix-js/sdk/dist/own-change-control/with-skip-own-change-control.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/with-skip-own-change-control.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/own-change-control/with-skip-own-change-control.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-change-control/with-skip-own-change-control.test.js +0 -49
- package/node_modules/@lix-js/sdk/dist/own-change-control/with-skip-own-change-control.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/apply-own-entity-change.d.ts +0 -10
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/apply-own-entity-change.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/apply-own-entity-change.js +0 -69
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/apply-own-entity-change.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/apply-own-entity-change.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/apply-own-entity-change.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/apply-own-entity-change.test.js +0 -297
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/apply-own-entity-change.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/change-controlled-tables.d.ts +0 -61
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/change-controlled-tables.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/change-controlled-tables.js +0 -71
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/change-controlled-tables.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/change-controlled-tables.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/change-controlled-tables.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/change-controlled-tables.test.js +0 -48
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/change-controlled-tables.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/database-triggers.d.ts +0 -5
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/database-triggers.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/database-triggers.js +0 -135
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/database-triggers.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/database-triggers.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/database-triggers.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/database-triggers.test.js +0 -214
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/database-triggers.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/index.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/index.js +0 -2
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/with-skip-own-change-control.d.ts +0 -3
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/with-skip-own-change-control.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/with-skip-own-change-control.js +0 -24
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/with-skip-own-change-control.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/with-skip-own-change-control.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/with-skip-own-change-control.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/with-skip-own-change-control.test.js +0 -49
- package/node_modules/@lix-js/sdk/dist/own-entity-change-control/with-skip-own-change-control.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/plugin/index.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/plugin/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/plugin/index.js +0 -2
- package/node_modules/@lix-js/sdk/dist/plugin/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/plugin/lix-plugin.d.ts +0 -114
- package/node_modules/@lix-js/sdk/dist/plugin/lix-plugin.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/plugin/lix-plugin.js +0 -2
- package/node_modules/@lix-js/sdk/dist/plugin/lix-plugin.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/plugin/lix-plugin.test-d.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/plugin/lix-plugin.test-d.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/plugin/lix-plugin.test-d.js +0 -40
- package/node_modules/@lix-js/sdk/dist/plugin/lix-plugin.test-d.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/plugin/load-plugin.d.ts +0 -5
- package/node_modules/@lix-js/sdk/dist/plugin/load-plugin.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/plugin/load-plugin.js +0 -20
- package/node_modules/@lix-js/sdk/dist/plugin/load-plugin.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/plugin/with-transaction.d.ts +0 -11
- package/node_modules/@lix-js/sdk/dist/plugin/with-transaction.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/plugin/with-transaction.js +0 -15
- package/node_modules/@lix-js/sdk/dist/plugin/with-transaction.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-conflict-in-version.d.ts +0 -15
- package/node_modules/@lix-js/sdk/dist/query-filter/change-conflict-in-version.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-conflict-in-version.js +0 -18
- package/node_modules/@lix-js/sdk/dist/query-filter/change-conflict-in-version.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-conflict-in-version.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/query-filter/change-conflict-in-version.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-conflict-in-version.test.js +0 -55
- package/node_modules/@lix-js/sdk/dist/query-filter/change-conflict-in-version.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-has-label.d.ts +0 -25
- package/node_modules/@lix-js/sdk/dist/query-filter/change-has-label.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-has-label.js +0 -30
- package/node_modules/@lix-js/sdk/dist/query-filter/change-has-label.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-has-label.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/query-filter/change-has-label.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-has-label.test.js +0 -46
- package/node_modules/@lix-js/sdk/dist/query-filter/change-has-label.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-in-version.d.ts +0 -16
- package/node_modules/@lix-js/sdk/dist/query-filter/change-in-version.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-in-version.js +0 -29
- package/node_modules/@lix-js/sdk/dist/query-filter/change-in-version.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-in-version.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/query-filter/change-in-version.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-in-version.test.js +0 -75
- package/node_modules/@lix-js/sdk/dist/query-filter/change-in-version.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-in-version.d.ts +0 -16
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-in-version.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-in-version.js +0 -35
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-in-version.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-in-version.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-in-version.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-in-version.test.js +0 -70
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-in-version.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-of.bench.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-of.bench.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-of.bench.js +0 -132
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-of.bench.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-of.d.ts +0 -29
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-of.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-of.js +0 -44
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-of.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-of.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-of.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-of.test.js +0 -71
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf-of.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf.d.ts +0 -18
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf.js +0 -18
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf.test.js +0 -122
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-leaf.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-lowest-common-ancestor-of.d.ts +0 -16
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-lowest-common-ancestor-of.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-lowest-common-ancestor-of.js +0 -55
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-lowest-common-ancestor-of.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-lowest-common-ancestor-of.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-lowest-common-ancestor-of.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-lowest-common-ancestor-of.test.js +0 -155
- package/node_modules/@lix-js/sdk/dist/query-filter/change-is-lowest-common-ancestor-of.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-set-has-label.d.ts +0 -25
- package/node_modules/@lix-js/sdk/dist/query-filter/change-set-has-label.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-set-has-label.js +0 -29
- package/node_modules/@lix-js/sdk/dist/query-filter/change-set-has-label.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-set-has-label.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/query-filter/change-set-has-label.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/change-set-has-label.test.js +0 -43
- package/node_modules/@lix-js/sdk/dist/query-filter/change-set-has-label.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/index.d.ts +0 -9
- package/node_modules/@lix-js/sdk/dist/query-filter/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/index.js +0 -9
- package/node_modules/@lix-js/sdk/dist/query-filter/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-difference.d.ts +0 -18
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-difference.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-difference.js +0 -25
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-difference.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-difference.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-difference.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-difference.test.js +0 -85
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-difference.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-symmetric-difference.d.ts +0 -19
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-symmetric-difference.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-symmetric-difference.js +0 -36
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-symmetric-difference.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-symmetric-difference.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-symmetric-difference.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-symmetric-difference.test.js +0 -84
- package/node_modules/@lix-js/sdk/dist/query-filter/version-change-in-symmetric-difference.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/create-server-api-handler.d.ts +0 -48
- package/node_modules/@lix-js/sdk/dist/server-api-handler/create-server-api-handler.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/create-server-api-handler.js +0 -68
- package/node_modules/@lix-js/sdk/dist/server-api-handler/create-server-api-handler.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/environment/create-in-memory-environment.d.ts +0 -8
- package/node_modules/@lix-js/sdk/dist/server-api-handler/environment/create-in-memory-environment.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/environment/create-in-memory-environment.js +0 -97
- package/node_modules/@lix-js/sdk/dist/server-api-handler/environment/create-in-memory-environment.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/environment/create-in-memory-environment.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/server-api-handler/environment/create-in-memory-environment.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/environment/create-in-memory-environment.test.js +0 -103
- package/node_modules/@lix-js/sdk/dist/server-api-handler/environment/create-in-memory-environment.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/environment/environment.d.ts +0 -53
- package/node_modules/@lix-js/sdk/dist/server-api-handler/environment/environment.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/environment/environment.js +0 -2
- package/node_modules/@lix-js/sdk/dist/server-api-handler/environment/environment.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/index.d.ts +0 -3
- package/node_modules/@lix-js/sdk/dist/server-api-handler/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/index.js +0 -3
- package/node_modules/@lix-js/sdk/dist/server-api-handler/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/get-v1.d.ts +0 -3
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/get-v1.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/get-v1.js +0 -44
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/get-v1.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/get-v1.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/get-v1.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/get-v1.test.js +0 -108
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/get-v1.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/new-v1.d.ts +0 -3
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/new-v1.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/new-v1.js +0 -38
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/new-v1.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/new-v1.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/new-v1.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/new-v1.test.js +0 -72
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/new-v1.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/pull-v1.d.ts +0 -3
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/pull-v1.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/pull-v1.js +0 -41
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/pull-v1.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/pull-v1.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/pull-v1.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/pull-v1.test.js +0 -146
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/pull-v1.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/push-v1.d.ts +0 -3
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/push-v1.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/push-v1.js +0 -142
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/push-v1.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/push-v1.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/push-v1.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/push-v1.test.js +0 -231
- package/node_modules/@lix-js/sdk/dist/server-api-handler/routes/push-v1.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/snapshot/create-snapshot.d.ts +0 -18
- package/node_modules/@lix-js/sdk/dist/snapshot/create-snapshot.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/snapshot/create-snapshot.js +0 -33
- package/node_modules/@lix-js/sdk/dist/snapshot/create-snapshot.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/snapshot/create-snapshot.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/snapshot/create-snapshot.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/snapshot/create-snapshot.test.js +0 -54
- package/node_modules/@lix-js/sdk/dist/snapshot/create-snapshot.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/snapshot/index.d.ts +0 -3
- package/node_modules/@lix-js/sdk/dist/snapshot/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/snapshot/index.js +0 -3
- package/node_modules/@lix-js/sdk/dist/snapshot/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/snapshot/json-sha-256.d.ts +0 -8
- package/node_modules/@lix-js/sdk/dist/snapshot/json-sha-256.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/snapshot/json-sha-256.js +0 -29
- package/node_modules/@lix-js/sdk/dist/snapshot/json-sha-256.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/snapshot/json-sha-256.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/snapshot/json-sha-256.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/snapshot/json-sha-256.test.js +0 -10
- package/node_modules/@lix-js/sdk/dist/snapshot/json-sha-256.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/snapshot/mock-json-snapshot.d.ts +0 -8
- package/node_modules/@lix-js/sdk/dist/snapshot/mock-json-snapshot.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/snapshot/mock-json-snapshot.js +0 -13
- package/node_modules/@lix-js/sdk/dist/snapshot/mock-json-snapshot.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/get-diffing-rows.d.ts +0 -16
- package/node_modules/@lix-js/sdk/dist/sync/get-diffing-rows.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/get-diffing-rows.js +0 -62
- package/node_modules/@lix-js/sdk/dist/sync/get-diffing-rows.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/merge-state.d.ts +0 -20
- package/node_modules/@lix-js/sdk/dist/sync/merge-state.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/merge-state.js +0 -237
- package/node_modules/@lix-js/sdk/dist/sync/merge-state.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/pull-from-server.d.ts +0 -8
- package/node_modules/@lix-js/sdk/dist/sync/pull-from-server.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/pull-from-server.js +0 -113
- package/node_modules/@lix-js/sdk/dist/sync/pull-from-server.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/pull-from-server.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/sync/pull-from-server.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/pull-from-server.test.js +0 -340
- package/node_modules/@lix-js/sdk/dist/sync/pull-from-server.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/push-to-server.d.ts +0 -12
- package/node_modules/@lix-js/sdk/dist/sync/push-to-server.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/push-to-server.js +0 -35
- package/node_modules/@lix-js/sdk/dist/sync/push-to-server.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/push-to-server.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/sync/push-to-server.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/push-to-server.test.js +0 -308
- package/node_modules/@lix-js/sdk/dist/sync/push-to-server.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/sync-process.d.ts +0 -5
- package/node_modules/@lix-js/sdk/dist/sync/sync-process.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/sync-process.js +0 -74
- package/node_modules/@lix-js/sdk/dist/sync/sync-process.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/sync-process.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/sync/sync-process.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/sync/sync-process.test.js +0 -243
- package/node_modules/@lix-js/sdk/dist/sync/sync-process.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/create-version.d.ts +0 -27
- package/node_modules/@lix-js/sdk/dist/version/create-version.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/create-version.js +0 -74
- package/node_modules/@lix-js/sdk/dist/version/create-version.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/create-version.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/version/create-version.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/create-version.test.js +0 -126
- package/node_modules/@lix-js/sdk/dist/version/create-version.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/index.d.ts +0 -8
- package/node_modules/@lix-js/sdk/dist/version/index.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/index.js +0 -8
- package/node_modules/@lix-js/sdk/dist/version/index.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/merge-version.d.ts +0 -8
- package/node_modules/@lix-js/sdk/dist/version/merge-version.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/merge-version.js +0 -67
- package/node_modules/@lix-js/sdk/dist/version/merge-version.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/merge-version.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/version/merge-version.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/merge-version.test.js +0 -434
- package/node_modules/@lix-js/sdk/dist/version/merge-version.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/switch-version.d.ts +0 -27
- package/node_modules/@lix-js/sdk/dist/version/switch-version.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/switch-version.js +0 -91
- package/node_modules/@lix-js/sdk/dist/version/switch-version.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/switch-version.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/version/switch-version.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/switch-version.test.js +0 -227
- package/node_modules/@lix-js/sdk/dist/version/switch-version.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/update-changes-in-version.d.ts +0 -13
- package/node_modules/@lix-js/sdk/dist/version/update-changes-in-version.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/update-changes-in-version.js +0 -36
- package/node_modules/@lix-js/sdk/dist/version/update-changes-in-version.js.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/update-changes-in-version.test.d.ts +0 -2
- package/node_modules/@lix-js/sdk/dist/version/update-changes-in-version.test.d.ts.map +0 -1
- package/node_modules/@lix-js/sdk/dist/version/update-changes-in-version.test.js +0 -323
- package/node_modules/@lix-js/sdk/dist/version/update-changes-in-version.test.js.map +0 -1
- package/node_modules/@lix-js/sdk/package.json +0 -52
- package/node_modules/@lix-js/sdk/src/account/create-account.test.ts +0 -26
- package/node_modules/@lix-js/sdk/src/account/create-account.ts +0 -26
- package/node_modules/@lix-js/sdk/src/account/database-schema.test.ts +0 -187
- package/node_modules/@lix-js/sdk/src/account/database-schema.ts +0 -58
- package/node_modules/@lix-js/sdk/src/account/index.ts +0 -3
- package/node_modules/@lix-js/sdk/src/account/switch-account.test.ts +0 -63
- package/node_modules/@lix-js/sdk/src/account/switch-account.ts +0 -39
- package/node_modules/@lix-js/sdk/src/change/apply-changes.test.ts +0 -268
- package/node_modules/@lix-js/sdk/src/change/apply-changes.ts +0 -114
- package/node_modules/@lix-js/sdk/src/change/create-change.test.ts +0 -296
- package/node_modules/@lix-js/sdk/src/change/create-change.ts +0 -129
- package/node_modules/@lix-js/sdk/src/change/index.ts +0 -2
- package/node_modules/@lix-js/sdk/src/change/mock-change.ts +0 -21
- package/node_modules/@lix-js/sdk/src/change-conflict/create-change-conflict.test.ts +0 -173
- package/node_modules/@lix-js/sdk/src/change-conflict/create-change-conflict.ts +0 -105
- package/node_modules/@lix-js/sdk/src/change-conflict/detect-change-conflicts.test.ts +0 -215
- package/node_modules/@lix-js/sdk/src/change-conflict/detect-change-conflicts.ts +0 -65
- package/node_modules/@lix-js/sdk/src/change-conflict/detect-diverging-entity-conflict.test.ts +0 -228
- package/node_modules/@lix-js/sdk/src/change-conflict/detect-diverging-entity-conflict.ts +0 -82
- package/node_modules/@lix-js/sdk/src/change-conflict/garbage-collect-change-conflicts.test.ts +0 -219
- package/node_modules/@lix-js/sdk/src/change-conflict/garbage-collect-change-conflicts.ts +0 -96
- package/node_modules/@lix-js/sdk/src/change-conflict/index.ts +0 -3
- package/node_modules/@lix-js/sdk/src/change-conflict/resolve-conflict-by-selecting.test.ts +0 -118
- package/node_modules/@lix-js/sdk/src/change-conflict/resolve-conflict-by-selecting.ts +0 -66
- package/node_modules/@lix-js/sdk/src/change-conflict/update-change-conflicts.ts +0 -79
- package/node_modules/@lix-js/sdk/src/change-schema/README.md +0 -3
- package/node_modules/@lix-js/sdk/src/change-schema/index.ts +0 -4
- package/node_modules/@lix-js/sdk/src/change-schema/types.test-d.ts +0 -52
- package/node_modules/@lix-js/sdk/src/change-schema/types.ts +0 -53
- package/node_modules/@lix-js/sdk/src/change-set/change-set-element-in-symmetric-difference.test.ts +0 -128
- package/node_modules/@lix-js/sdk/src/change-set/change-set-element-in-symmetric-difference.ts +0 -52
- package/node_modules/@lix-js/sdk/src/change-set/create-change-set.test.ts +0 -43
- package/node_modules/@lix-js/sdk/src/change-set/create-change-set.ts +0 -41
- package/node_modules/@lix-js/sdk/src/change-set/index.ts +0 -2
- package/node_modules/@lix-js/sdk/src/database/apply-schema.ts +0 -270
- package/node_modules/@lix-js/sdk/src/database/execute-sync.test.ts +0 -152
- package/node_modules/@lix-js/sdk/src/database/execute-sync.ts +0 -47
- package/node_modules/@lix-js/sdk/src/database/index.ts +0 -4
- package/node_modules/@lix-js/sdk/src/database/init-db.test.ts +0 -628
- package/node_modules/@lix-js/sdk/src/database/init-db.ts +0 -111
- package/node_modules/@lix-js/sdk/src/database/kysely-plugin/parse-jsonb-plugin-v1.test.ts +0 -204
- package/node_modules/@lix-js/sdk/src/database/kysely-plugin/parse-jsonb-plugin-v1.ts +0 -55
- package/node_modules/@lix-js/sdk/src/database/kysely-plugin/parse-jsonb-plugin-v2.no_test.ts +0 -204
- package/node_modules/@lix-js/sdk/src/database/kysely-plugin/parse-jsonb-plugin-v2.ts +0 -194
- package/node_modules/@lix-js/sdk/src/database/kysely-plugin/serialize-jsonb-plugin.test.ts +0 -132
- package/node_modules/@lix-js/sdk/src/database/kysely-plugin/serialize-jsonb-plugin.ts +0 -122
- package/node_modules/@lix-js/sdk/src/database/mutation-log/database-schema.ts +0 -126
- package/node_modules/@lix-js/sdk/src/database/mutation-log/lix-session.ts +0 -19
- package/node_modules/@lix-js/sdk/src/database/nano-id.test.ts +0 -15
- package/node_modules/@lix-js/sdk/src/database/nano-id.ts +0 -72
- package/node_modules/@lix-js/sdk/src/database/schema.ts +0 -273
- package/node_modules/@lix-js/sdk/src/discussion/create-comment.ts +0 -18
- package/node_modules/@lix-js/sdk/src/discussion/create-discussion.test.ts +0 -45
- package/node_modules/@lix-js/sdk/src/discussion/create-discussion.ts +0 -48
- package/node_modules/@lix-js/sdk/src/discussion/index.ts +0 -2
- package/node_modules/@lix-js/sdk/src/file/index.ts +0 -1
- package/node_modules/@lix-js/sdk/src/file/validate-file-path.test.ts +0 -44
- package/node_modules/@lix-js/sdk/src/file/validate-file-path.ts +0 -60
- package/node_modules/@lix-js/sdk/src/file-queue/file-handlers.ts +0 -273
- package/node_modules/@lix-js/sdk/src/file-queue/file-queue-process.test.ts +0 -457
- package/node_modules/@lix-js/sdk/src/file-queue/file-queue-process.ts +0 -101
- package/node_modules/@lix-js/sdk/src/file-queue/file-queue-settled.test.ts +0 -56
- package/node_modules/@lix-js/sdk/src/file-queue/file-queue-settled.ts +0 -31
- package/node_modules/@lix-js/sdk/src/file-queue/index.ts +0 -1
- package/node_modules/@lix-js/sdk/src/file-queue/with-skip-file-queue.test.ts +0 -158
- package/node_modules/@lix-js/sdk/src/file-queue/with-skip-file-queue.ts +0 -33
- package/node_modules/@lix-js/sdk/src/index.ts +0 -16
- package/node_modules/@lix-js/sdk/src/key-value/database-schema.test.ts +0 -140
- package/node_modules/@lix-js/sdk/src/key-value/database-schema.ts +0 -66
- package/node_modules/@lix-js/sdk/src/lix/close-lix.ts +0 -8
- package/node_modules/@lix-js/sdk/src/lix/index.ts +0 -7
- package/node_modules/@lix-js/sdk/src/lix/merge.get-leaf-changes-only-in-source.test.ts +0 -143
- package/node_modules/@lix-js/sdk/src/lix/merge.get-leaf-changes-only-in-source.ts +0 -46
- package/node_modules/@lix-js/sdk/src/lix/merge.test.ts +0 -858
- package/node_modules/@lix-js/sdk/src/lix/merge.ts +0 -244
- package/node_modules/@lix-js/sdk/src/lix/new-lix.test.ts +0 -23
- package/node_modules/@lix-js/sdk/src/lix/new-lix.ts +0 -29
- package/node_modules/@lix-js/sdk/src/lix/open-lix-in-memory.test.ts +0 -34
- package/node_modules/@lix-js/sdk/src/lix/open-lix-in-memory.ts +0 -28
- package/node_modules/@lix-js/sdk/src/lix/open-lix.test.ts +0 -45
- package/node_modules/@lix-js/sdk/src/lix/open-lix.ts +0 -86
- package/node_modules/@lix-js/sdk/src/lix/to-blob.ts +0 -14
- package/node_modules/@lix-js/sdk/src/own-change-control/apply-own-change.test.ts +0 -361
- package/node_modules/@lix-js/sdk/src/own-change-control/apply-own-change.ts +0 -110
- package/node_modules/@lix-js/sdk/src/own-change-control/change-controlled-tables.test.ts +0 -69
- package/node_modules/@lix-js/sdk/src/own-change-control/change-controlled-tables.ts +0 -102
- package/node_modules/@lix-js/sdk/src/own-change-control/database-triggers.test.ts +0 -259
- package/node_modules/@lix-js/sdk/src/own-change-control/database-triggers.ts +0 -189
- package/node_modules/@lix-js/sdk/src/own-change-control/index.ts +0 -1
- package/node_modules/@lix-js/sdk/src/own-change-control/with-skip-own-change-control.test.ts +0 -57
- package/node_modules/@lix-js/sdk/src/own-change-control/with-skip-own-change-control.ts +0 -34
- package/node_modules/@lix-js/sdk/src/plugin/index.ts +0 -6
- package/node_modules/@lix-js/sdk/src/plugin/lix-plugin.test-d.ts +0 -45
- package/node_modules/@lix-js/sdk/src/plugin/lix-plugin.ts +0 -128
- package/node_modules/@lix-js/sdk/src/plugin/load-plugin.ts +0 -28
- package/node_modules/@lix-js/sdk/src/plugin/with-transaction.ts +0 -22
- package/node_modules/@lix-js/sdk/src/query-filter/change-conflict-in-version.test.ts +0 -62
- package/node_modules/@lix-js/sdk/src/query-filter/change-conflict-in-version.ts +0 -25
- package/node_modules/@lix-js/sdk/src/query-filter/change-has-label.test.ts +0 -52
- package/node_modules/@lix-js/sdk/src/query-filter/change-has-label.ts +0 -41
- package/node_modules/@lix-js/sdk/src/query-filter/change-in-version.test.ts +0 -82
- package/node_modules/@lix-js/sdk/src/query-filter/change-in-version.ts +0 -31
- package/node_modules/@lix-js/sdk/src/query-filter/change-is-leaf-in-version.test.ts +0 -77
- package/node_modules/@lix-js/sdk/src/query-filter/change-is-leaf-in-version.ts +0 -36
- package/node_modules/@lix-js/sdk/src/query-filter/change-is-leaf-of.bench.ts +0 -175
- package/node_modules/@lix-js/sdk/src/query-filter/change-is-leaf-of.test.ts +0 -84
- package/node_modules/@lix-js/sdk/src/query-filter/change-is-leaf-of.ts +0 -46
- package/node_modules/@lix-js/sdk/src/query-filter/change-is-leaf.test.ts +0 -140
- package/node_modules/@lix-js/sdk/src/query-filter/change-is-leaf.ts +0 -25
- package/node_modules/@lix-js/sdk/src/query-filter/change-is-lowest-common-ancestor-of.test.ts +0 -173
- package/node_modules/@lix-js/sdk/src/query-filter/change-is-lowest-common-ancestor-of.ts +0 -57
- package/node_modules/@lix-js/sdk/src/query-filter/change-set-has-label.test.ts +0 -50
- package/node_modules/@lix-js/sdk/src/query-filter/change-set-has-label.ts +0 -36
- package/node_modules/@lix-js/sdk/src/query-filter/index.ts +0 -8
- package/node_modules/@lix-js/sdk/src/query-filter/version-change-in-difference.test.ts +0 -105
- package/node_modules/@lix-js/sdk/src/query-filter/version-change-in-difference.ts +0 -37
- package/node_modules/@lix-js/sdk/src/query-filter/version-change-in-symmetric-difference.test.ts +0 -104
- package/node_modules/@lix-js/sdk/src/query-filter/version-change-in-symmetric-difference.ts +0 -52
- package/node_modules/@lix-js/sdk/src/server-api-handler/create-server-api-handler.ts +0 -84
- package/node_modules/@lix-js/sdk/src/server-api-handler/environment/create-in-memory-environment.test.ts +0 -131
- package/node_modules/@lix-js/sdk/src/server-api-handler/environment/create-in-memory-environment.ts +0 -115
- package/node_modules/@lix-js/sdk/src/server-api-handler/environment/environment.ts +0 -43
- package/node_modules/@lix-js/sdk/src/server-api-handler/index.ts +0 -5
- package/node_modules/@lix-js/sdk/src/server-api-handler/routes/get-v1.test.ts +0 -147
- package/node_modules/@lix-js/sdk/src/server-api-handler/routes/get-v1.ts +0 -61
- package/node_modules/@lix-js/sdk/src/server-api-handler/routes/new-v1.test.ts +0 -103
- package/node_modules/@lix-js/sdk/src/server-api-handler/routes/new-v1.ts +0 -46
- package/node_modules/@lix-js/sdk/src/server-api-handler/routes/pull-v1.test.ts +0 -201
- package/node_modules/@lix-js/sdk/src/server-api-handler/routes/pull-v1.ts +0 -57
- package/node_modules/@lix-js/sdk/src/server-api-handler/routes/push-v1.test.ts +0 -302
- package/node_modules/@lix-js/sdk/src/server-api-handler/routes/push-v1.ts +0 -180
- package/node_modules/@lix-js/sdk/src/snapshot/create-snapshot.test.ts +0 -68
- package/node_modules/@lix-js/sdk/src/snapshot/create-snapshot.ts +0 -40
- package/node_modules/@lix-js/sdk/src/snapshot/index.ts +0 -2
- package/node_modules/@lix-js/sdk/src/snapshot/json-sha-256.test.ts +0 -12
- package/node_modules/@lix-js/sdk/src/snapshot/json-sha-256.ts +0 -35
- package/node_modules/@lix-js/sdk/src/snapshot/mock-json-snapshot.ts +0 -14
- package/node_modules/@lix-js/sdk/src/sync/get-diffing-rows.ts +0 -96
- package/node_modules/@lix-js/sdk/src/sync/merge-state.ts +0 -310
- package/node_modules/@lix-js/sdk/src/sync/pull-from-server.test.ts +0 -425
- package/node_modules/@lix-js/sdk/src/sync/pull-from-server.ts +0 -144
- package/node_modules/@lix-js/sdk/src/sync/push-to-server.test.ts +0 -391
- package/node_modules/@lix-js/sdk/src/sync/push-to-server.ts +0 -47
- package/node_modules/@lix-js/sdk/src/sync/sync-process.test.ts +0 -321
- package/node_modules/@lix-js/sdk/src/sync/sync-process.ts +0 -85
- package/node_modules/@lix-js/sdk/src/version/create-version.test.ts +0 -149
- package/node_modules/@lix-js/sdk/src/version/create-version.ts +0 -88
- package/node_modules/@lix-js/sdk/src/version/index.ts +0 -8
- package/node_modules/@lix-js/sdk/src/version/merge-version.test.ts +0 -530
- package/node_modules/@lix-js/sdk/src/version/merge-version.ts +0 -88
- package/node_modules/@lix-js/sdk/src/version/switch-version.test.ts +0 -292
- package/node_modules/@lix-js/sdk/src/version/switch-version.ts +0 -110
- package/node_modules/@lix-js/sdk/src/version/update-changes-in-version.test.ts +0 -371
- package/node_modules/@lix-js/sdk/src/version/update-changes-in-version.ts +0 -47
- package/node_modules/sqlite-wasm-kysely/LICENSE +0 -21
- package/node_modules/sqlite-wasm-kysely/README.md +0 -11
- package/node_modules/sqlite-wasm-kysely/dist/dialect.d.ts +0 -11
- package/node_modules/sqlite-wasm-kysely/dist/dialect.js +0 -13
- package/node_modules/sqlite-wasm-kysely/dist/dialect.js.map +0 -1
- package/node_modules/sqlite-wasm-kysely/dist/index.d.ts +0 -2
- package/node_modules/sqlite-wasm-kysely/dist/index.js +0 -3
- package/node_modules/sqlite-wasm-kysely/dist/index.js.map +0 -1
- package/node_modules/sqlite-wasm-kysely/dist/kysely/ConnectionMutex.d.ts +0 -5
- package/node_modules/sqlite-wasm-kysely/dist/kysely/ConnectionMutex.js +0 -34
- package/node_modules/sqlite-wasm-kysely/dist/kysely/ConnectionMutex.js.map +0 -1
- package/node_modules/sqlite-wasm-kysely/dist/kysely/SqliteWasmConnection.d.ts +0 -8
- package/node_modules/sqlite-wasm-kysely/dist/kysely/SqliteWasmConnection.js +0 -57
- package/node_modules/sqlite-wasm-kysely/dist/kysely/SqliteWasmConnection.js.map +0 -1
- package/node_modules/sqlite-wasm-kysely/dist/kysely/SqliteWasmDialectConfig.d.ts +0 -18
- package/node_modules/sqlite-wasm-kysely/dist/kysely/SqliteWasmDialectConfig.js +0 -2
- package/node_modules/sqlite-wasm-kysely/dist/kysely/SqliteWasmDialectConfig.js.map +0 -1
- package/node_modules/sqlite-wasm-kysely/dist/kysely/SqliteWasmDriver.d.ts +0 -13
- package/node_modules/sqlite-wasm-kysely/dist/kysely/SqliteWasmDriver.js +0 -57
- package/node_modules/sqlite-wasm-kysely/dist/kysely/SqliteWasmDriver.js.map +0 -1
- package/node_modules/sqlite-wasm-kysely/dist/kysely/index.d.ts +0 -4
- package/node_modules/sqlite-wasm-kysely/dist/kysely/index.js +0 -4
- package/node_modules/sqlite-wasm-kysely/dist/kysely/index.js.map +0 -1
- package/node_modules/sqlite-wasm-kysely/dist/kysely/sqliteModule.d.ts +0 -3
- package/node_modules/sqlite-wasm-kysely/dist/kysely/sqliteModule.js +0 -5
- package/node_modules/sqlite-wasm-kysely/dist/kysely/sqliteModule.js.map +0 -1
- package/node_modules/sqlite-wasm-kysely/dist/util/contentFromDatabase.d.ts +0 -9
- package/node_modules/sqlite-wasm-kysely/dist/util/contentFromDatabase.js +0 -12
- package/node_modules/sqlite-wasm-kysely/dist/util/contentFromDatabase.js.map +0 -1
- package/node_modules/sqlite-wasm-kysely/dist/util/createInMemoryDatabase.d.ts +0 -3
- package/node_modules/sqlite-wasm-kysely/dist/util/createInMemoryDatabase.js +0 -22
- package/node_modules/sqlite-wasm-kysely/dist/util/createInMemoryDatabase.js.map +0 -1
- package/node_modules/sqlite-wasm-kysely/dist/util/importDatabase.d.ts +0 -7
- package/node_modules/sqlite-wasm-kysely/dist/util/importDatabase.js +0 -15
- package/node_modules/sqlite-wasm-kysely/dist/util/importDatabase.js.map +0 -1
- package/node_modules/sqlite-wasm-kysely/dist/util/index.d.ts +0 -5
- package/node_modules/sqlite-wasm-kysely/dist/util/index.js +0 -5
- package/node_modules/sqlite-wasm-kysely/dist/util/index.js.map +0 -1
- package/node_modules/sqlite-wasm-kysely/dist/util/loadDatabaseInMemory.d.ts +0 -1
- package/node_modules/sqlite-wasm-kysely/dist/util/loadDatabaseInMemory.js +0 -13
- package/node_modules/sqlite-wasm-kysely/dist/util/loadDatabaseInMemory.js.map +0 -1
- package/node_modules/sqlite-wasm-kysely/dist/util/sqliteWasmBinary.d.ts +0 -7
- package/node_modules/sqlite-wasm-kysely/dist/util/sqliteWasmBinary.js +0 -17
- package/node_modules/sqlite-wasm-kysely/dist/util/sqliteWasmBinary.js.map +0 -1
- package/node_modules/sqlite-wasm-kysely/package.json +0 -34
- package/node_modules/sqlite-wasm-kysely/src/dialect.ts +0 -15
- package/node_modules/sqlite-wasm-kysely/src/index.ts +0 -2
- package/node_modules/sqlite-wasm-kysely/src/kysely/ConnectionMutex.ts +0 -23
- package/node_modules/sqlite-wasm-kysely/src/kysely/SqliteWasmConnection.ts +0 -57
- package/node_modules/sqlite-wasm-kysely/src/kysely/SqliteWasmDialectConfig.ts +0 -19
- package/node_modules/sqlite-wasm-kysely/src/kysely/SqliteWasmDriver.ts +0 -58
- package/node_modules/sqlite-wasm-kysely/src/kysely/index.ts +0 -4
- package/node_modules/sqlite-wasm-kysely/src/kysely/sqliteModule.ts +0 -7
- package/node_modules/sqlite-wasm-kysely/src/util/contentFromDatabase.ts +0 -13
- package/node_modules/sqlite-wasm-kysely/src/util/createInMemoryDatabase.ts +0 -30
- package/node_modules/sqlite-wasm-kysely/src/util/importDatabase.ts +0 -34
- package/node_modules/sqlite-wasm-kysely/src/util/index.ts +0 -5
- package/node_modules/sqlite-wasm-kysely/src/util/loadDatabaseInMemory.ts +0 -13
- package/node_modules/sqlite-wasm-kysely/src/util/sqliteWasmBinary.ts +0 -20
- package/src/project/state/README.md +0 -22
- package/src/project/state/id$.test.ts +0 -40
- package/src/project/state/id$.ts +0 -21
- package/src/project/state/setSettings.test.ts +0 -73
- package/src/project/state/setSettings.ts +0 -19
- package/src/project/state/settings$.test.ts +0 -63
- package/src/project/state/settings$.ts +0 -26
- package/src/project/state/state.test.ts +0 -128
- package/src/project/state/state.ts +0 -94
- package/src/query-utilities/pollQuery.test.ts +0 -88
- package/src/query-utilities/pollQuery.ts +0 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadProject.js","sources":["project/loadProject.ts"],"sourceRoot":"/","sourcesContent":["import { toBlob, type Lix } from \"@lix-js/sdk\";\nimport type { InlangPlugin } from \"../plugin/schema.js\";\nimport type { ProjectSettings } from \"../json-schema/settings.js\";\nimport { type SqliteDatabase } from \"sqlite-wasm-kysely\";\nimport { initDb } from \"../database/initDb.js\";\nimport { initHandleSaveToLixOnChange } from \"./initHandleSaveToLixOnChange.js\";\nimport { type PreprocessPluginBeforeImportFunction } from \"../plugin/importPlugins.js\";\nimport type { InlangProject } from \"./api.js\";\nimport { createProjectState } from \"./state/state.js\";\nimport { withLanguageTagToLocaleMigration } from \"../migrations/v2/withLanguageTagToLocaleMigration.js\";\nimport { v4 } from \"uuid\";\nimport { initErrorReporting } from \"../services/error-reporting/index.js\";\nimport { maybeCaptureLoadedProject } from \"./maybeCaptureTelemetry.js\";\nimport { importFiles } from \"../import-export/importFiles.js\";\nimport { exportFiles } from \"../import-export/exportFiles.js\";\n\n/**\n * Common load project logic.\n */\nexport async function loadProject(args: {\n\tsqlite: SqliteDatabase;\n\tlix: Lix;\n\t/**\n\t * Provide plugins to the project.\n\t *\n\t * This is useful for testing or providing plugins that are\n\t * app specific. Keep in mind that provided plugins\n\t * are not shared with other instances.\n\t */\n\tprovidePlugins?: InlangPlugin[];\n\t/**\n\t * Function that preprocesses the plugin before importing it.\n\t *\n\t * The callback can be used to process plugins as needed in the\n\t * environment of the app. For example, Sherlock uses this to convert\n\t * ESM, which all inlang plugins are written in, to CJS which Sherlock\n\t * runs in.\n\t *\n\t * @example\n\t * const project = await loadProject({ preprocessPluginBeforeImport: (moduleText) => convertEsmToCjs(moduleText) })\n\t *\n\t */\n\tpreprocessPluginBeforeImport?: PreprocessPluginBeforeImportFunction;\n\t/**\n\t * The id of the app that is using the SDK.\n\t *\n\t * The is used for telemetry purposes. To derive insights like\n\t * which app is using the SDK, how many projects are loaded, etc.\n\t *\n\t * The app id can be removed at any time in the future\n\t */\n\tappId?: string;\n}): Promise<InlangProject> {\n\tconst db = initDb({ sqlite: args.sqlite });\n\n\tawait maybeMigrateFirstProjectId({ lix: args.lix });\n\n\tconst settingsFile = await args.lix.db\n\t\t.selectFrom(\"file\")\n\t\t.select(\"data\")\n\t\t.where(\"path\", \"=\", \"/settings.json\")\n\t\t.executeTakeFirstOrThrow();\n\n\tconst settings = withLanguageTagToLocaleMigration(\n\t\tJSON.parse(new TextDecoder().decode(settingsFile.data)) as ProjectSettings\n\t);\n\n\tconst state = createProjectState({\n\t\t...args,\n\t\tsettings,\n\t});\n\n\t// TODO implement garbage collection/a proper queue.\n\t// for the protoype and tests, it seems good enough\n\t// without garbage collection of old promises.\n\tconst pendingSaveToLixPromises: Promise<unknown>[] = [];\n\n\tawait initHandleSaveToLixOnChange({\n\t\tsqlite: args.sqlite,\n\t\tdb,\n\t\tlix: args.lix,\n\t\tpendingPromises: pendingSaveToLixPromises,\n\t});\n\n\t// not awaiting to not block the load time of a project\n\tmaybeCaptureLoadedProject({\n\t\tdb,\n\t\tstate,\n\t\tappId: args.appId,\n\t});\n\n\tinitErrorReporting({ projectId: await state.id.get() });\n\n\treturn {\n\t\tdb,\n\t\tid: state.id,\n\t\tsettings: state.settings,\n\t\tplugins: state.plugins,\n\t\terrors: state.errors,\n\t\timportFiles: async ({ files, pluginKey }) => {\n\t\t\treturn await importFiles({\n\t\t\t\tfiles,\n\t\t\t\tpluginKey,\n\t\t\t\tsettings: await state.settings.get(),\n\t\t\t\tplugins: await state.plugins.get(),\n\t\t\t\tdb,\n\t\t\t});\n\t\t},\n\t\texportFiles: async ({ pluginKey }) => {\n\t\t\treturn (\n\t\t\t\tawait exportFiles({\n\t\t\t\t\tpluginKey,\n\t\t\t\t\tdb,\n\t\t\t\t\tsettings: await state.settings.get(),\n\t\t\t\t\tplugins: await state.plugins.get(),\n\t\t\t\t})\n\t\t\t).map((output) => ({ ...output, pluginKey }));\n\t\t},\n\t\tclose: async () => {\n\t\t\tawait db.destroy();\n\t\t\tawait args.lix.db.destroy();\n\t\t},\n\t\t_sqlite: args.sqlite,\n\t\ttoBlob: async () => {\n\t\t\tawait Promise.all(pendingSaveToLixPromises);\n\t\t\treturn await toBlob({ lix: args.lix });\n\t\t},\n\t\tlix: args.lix,\n\t};\n}\n\n/**\n * Old leftover migration from v1. Probably not needed anymore.\n *\n * Kept it in just in case.\n */\nasync function maybeMigrateFirstProjectId(args: { lix: Lix }): Promise<void> {\n\tconst firstProjectIdFile = await args.lix.db\n\t\t.selectFrom(\"file\")\n\t\t.select(\"data\")\n\t\t.where(\"path\", \"=\", \"/project_id\")\n\t\t.executeTakeFirst();\n\n\tif (!firstProjectIdFile) {\n\t\tawait args.lix.db\n\t\t\t.insertInto(\"file\")\n\t\t\t.values({\n\t\t\t\tpath: \"/project_id\",\n\t\t\t\tdata: new TextEncoder().encode(v4()),\n\t\t\t})\n\t\t\t.execute();\n\t}\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM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AAC,EAAE,GAAG,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;QAC/C,CAAC;QACD,KAAK,EAAE,KAAK,IAAI,EAAE;YACjB,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC;YACnB,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC;QAC7B,CAAC;QACD,OAAO,EAAE,IAAI,CAAC,MAAM;QACpB,MAAM,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;YAC5C,OAAO,MAAM,MAAM,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACxC,CAAC;QACD,GAAG,EAAE,IAAI,CAAC,GAAG;KACb,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,KAAK,UAAU,0BAA0B,CAAC,IAAkB;IAC3D,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE;SAC1C,UAAU,CAAC,MAAM,CAAC;SAClB,MAAM,CAAC,MAAM,CAAC;SACd,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,aAAa,CAAC;SACjC,gBAAgB,EAAE,CAAC;IAErB,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACzB,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE;aACf,UAAU,CAAC,MAAM,CAAC;aAClB,MAAM,CAAC;YACP,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;SACpC,CAAC;aACD,OAAO,EAAE,CAAC;IACb,CAAC;AACF,CAAC","debug_id":"ef7bf1ff-db80-5316-95ab-aa0f6f1a24f9"}
|
|
1
|
+
{"version":3,"file":"loadProject.js","sources":["project/loadProject.ts"],"sourceRoot":"/","sourcesContent":["import { toBlob, type Account, type Lix } from \"@lix-js/sdk\";\nimport type { InlangPlugin } from \"../plugin/schema.js\";\nimport type { ProjectSettings } from \"../json-schema/settings.js\";\nimport { type SqliteDatabase } from \"sqlite-wasm-kysely\";\nimport { initDb } from \"../database/initDb.js\";\nimport { initHandleSaveToLixOnChange } from \"./initHandleSaveToLixOnChange.js\";\nimport {\n\timportPlugins,\n\ttype PreprocessPluginBeforeImportFunction,\n} from \"../plugin/importPlugins.js\";\nimport type { InlangProject } from \"./api.js\";\nimport { withLanguageTagToLocaleMigration } from \"../migrations/v2/withLanguageTagToLocaleMigration.js\";\nimport { v4 } from \"uuid\";\nimport { initErrorReporting } from \"../services/error-reporting/index.js\";\nimport { maybeCaptureLoadedProject } from \"./maybeCaptureTelemetry.js\";\nimport { importFiles } from \"../import-export/importFiles.js\";\nimport { exportFiles } from \"../import-export/exportFiles.js\";\n\n/**\n * Common load project logic.\n */\nexport async function loadProject(args: {\n\tsqlite: SqliteDatabase;\n\tlix: Lix;\n\t/**\n\t * The account that loaded the project.\n\t *\n\t * Defaults to an anonymous/new account if undefined.\n\t *\n\t * @example\n\t * const account = localStorage.getItem(\"account\")\n\t * const project = await loadProject({ account })\n\t */\n\taccount?: Account;\n\t/**\n\t * Provide plugins to the project.\n\t *\n\t * This is useful for testing or providing plugins that are\n\t * app specific. Keep in mind that provided plugins\n\t * are not shared with other instances.\n\t */\n\tprovidePlugins?: InlangPlugin[];\n\t/**\n\t * Function that preprocesses the plugin before importing it.\n\t *\n\t * The callback can be used to process plugins as needed in the\n\t * environment of the app. For example, Sherlock uses this to convert\n\t * ESM, which all inlang plugins are written in, to CJS which Sherlock\n\t * runs in.\n\t *\n\t * @example\n\t * const project = await loadProject({ preprocessPluginBeforeImport: (moduleText) => convertEsmToCjs(moduleText) })\n\t *\n\t */\n\tpreprocessPluginBeforeImport?: PreprocessPluginBeforeImportFunction;\n\t/**\n\t * The id of the app that is using the SDK.\n\t *\n\t * The is used for telemetry purposes. To derive insights like\n\t * which app is using the SDK, how many projects are loaded, etc.\n\t *\n\t * The app id can be removed at any time in the future\n\t */\n\tappId?: string;\n}): Promise<InlangProject> {\n\tconst db = initDb({ sqlite: args.sqlite });\n\n\tawait maybeMigrateFirstProjectId({ lix: args.lix });\n\n\tconst settingsFile = await args.lix.db\n\t\t.selectFrom(\"file\")\n\t\t.select(\"data\")\n\t\t.where(\"path\", \"=\", \"/settings.json\")\n\t\t.executeTakeFirstOrThrow();\n\n\tconst settings = withLanguageTagToLocaleMigration(\n\t\tJSON.parse(new TextDecoder().decode(settingsFile.data)) as ProjectSettings\n\t);\n\n\tconst importedPlugins = await importPlugins({\n\t\tsettings,\n\t\tlix: args.lix,\n\t\tpreprocessPluginBeforeImport: args.preprocessPluginBeforeImport,\n\t});\n\n\tconst plugins = [...(args.providePlugins ?? []), ...importedPlugins.plugins];\n\n\tconst idFile = await args.lix.db\n\t\t.selectFrom(\"file\")\n\t\t.where(\"path\", \"=\", \"/project_id\")\n\t\t.select(\"data\")\n\t\t.executeTakeFirstOrThrow();\n\n\tconst id = new TextDecoder().decode(idFile.data);\n\n\t// const state = createProjectState({\n\t// \t...args,\n\t// \tsettings,\n\t// });\n\n\t// TODO implement garbage collection/a proper queue.\n\t// for the protoype and tests, it seems good enough\n\t// without garbage collection of old promises.\n\tconst pendingSaveToLixPromises: Promise<unknown>[] = [];\n\n\tawait initHandleSaveToLixOnChange({\n\t\tsqlite: args.sqlite,\n\t\tdb,\n\t\tlix: args.lix,\n\t\tpendingPromises: pendingSaveToLixPromises,\n\t});\n\n\t// not awaiting to not block the load time of a project\n\tmaybeCaptureLoadedProject({\n\t\tdb,\n\t\tid,\n\t\tsettings,\n\t\tplugins,\n\t\tlix: args.lix,\n\t\tappId: args.appId,\n\t});\n\n\tinitErrorReporting({ projectId: id });\n\n\treturn {\n\t\tdb,\n\t\tid: {\n\t\t\tget: async () => {\n\t\t\t\tconst file = await args.lix.db\n\t\t\t\t\t.selectFrom(\"file\")\n\t\t\t\t\t.where(\"path\", \"=\", \"/project_id\")\n\t\t\t\t\t.select(\"file.data\")\n\t\t\t\t\t.executeTakeFirstOrThrow();\n\t\t\t\treturn new TextDecoder().decode(file.data);\n\t\t\t},\n\t\t},\n\t\tsettings: {\n\t\t\tget: async () => {\n\t\t\t\tconst file = await args.lix.db\n\t\t\t\t\t.selectFrom(\"file\")\n\t\t\t\t\t.where(\"path\", \"=\", \"/settings.json\")\n\t\t\t\t\t.select(\"file.data\")\n\t\t\t\t\t.executeTakeFirstOrThrow();\n\t\t\t\treturn withLanguageTagToLocaleMigration(\n\t\t\t\t\tJSON.parse(new TextDecoder().decode(file.data))\n\t\t\t\t);\n\t\t\t},\n\t\t\tset: async (newSettings) => {\n\t\t\t\tconst cloned = JSON.parse(JSON.stringify(newSettings));\n\t\t\t\tcloned.languageTags = cloned.locales;\n\t\t\t\tcloned.sourceLanguageTag = cloned.baseLocale;\n\n\t\t\t\tawait args.lix.db\n\t\t\t\t\t.updateTable(\"file\")\n\t\t\t\t\t.where(\"path\", \"=\", \"/settings.json\")\n\t\t\t\t\t.set({\n\t\t\t\t\t\tdata: new TextEncoder().encode(\n\t\t\t\t\t\t\tJSON.stringify(cloned, undefined, 2)\n\t\t\t\t\t\t),\n\t\t\t\t\t})\n\t\t\t\t\t.execute();\n\t\t\t},\n\t\t},\n\t\tplugins: {\n\t\t\tget: async () => plugins,\n\t\t},\n\t\terrors: {\n\t\t\tget: async () => [...importedPlugins.errors],\n\t\t},\n\t\t// errors: state.errors,\n\t\timportFiles: async ({ files, pluginKey }) => {\n\t\t\tconst settingsFile = await args.lix.db\n\t\t\t\t.selectFrom(\"file\")\n\t\t\t\t.where(\"path\", \"=\", \"/settings.json\")\n\t\t\t\t.select(\"file.data\")\n\t\t\t\t.executeTakeFirstOrThrow();\n\n\t\t\tconst settings = JSON.parse(\n\t\t\t\tnew TextDecoder().decode(settingsFile.data)\n\t\t\t) as ProjectSettings;\n\n\t\t\treturn await importFiles({\n\t\t\t\tfiles,\n\t\t\t\tpluginKey,\n\t\t\t\tsettings,\n\t\t\t\t// TODO don't use global state, might be stale\n\t\t\t\tplugins,\n\t\t\t\tdb,\n\t\t\t});\n\t\t},\n\t\texportFiles: async ({ pluginKey }) => {\n\t\t\tconst settingsFile = await args.lix.db\n\t\t\t\t.selectFrom(\"file\")\n\t\t\t\t.where(\"path\", \"=\", \"/settings.json\")\n\t\t\t\t.select(\"file.data\")\n\t\t\t\t.executeTakeFirstOrThrow();\n\n\t\t\tconst settings = JSON.parse(\n\t\t\t\tnew TextDecoder().decode(settingsFile.data)\n\t\t\t) as ProjectSettings;\n\n\t\t\treturn (\n\t\t\t\tawait exportFiles({\n\t\t\t\t\tpluginKey,\n\t\t\t\t\tdb,\n\t\t\t\t\tsettings,\n\t\t\t\t\t// TODO don't use global state, might be stale\n\t\t\t\t\tplugins,\n\t\t\t\t})\n\t\t\t).map((output) => ({ ...output, pluginKey }));\n\t\t},\n\t\tclose: async () => {\n\t\t\tawait db.destroy();\n\t\t\tawait args.lix.db.destroy();\n\t\t},\n\t\t_sqlite: args.sqlite,\n\t\ttoBlob: async () => {\n\t\t\tawait Promise.all(pendingSaveToLixPromises);\n\t\t\treturn await toBlob({ lix: args.lix });\n\t\t},\n\t\tlix: args.lix,\n\t};\n}\n\n/**\n * Old leftover migration from v1. Probably not needed anymore.\n *\n * Kept it in just in case.\n */\nasync function maybeMigrateFirstProjectId(args: { lix: Lix }): Promise<void> {\n\tconst firstProjectIdFile = await args.lix.db\n\t\t.selectFrom(\"file\")\n\t\t.select(\"data\")\n\t\t.where(\"path\", \"=\", \"/project_id\")\n\t\t.executeTakeFirst();\n\n\tif (!firstProjectIdFile) {\n\t\tawait args.lix.db\n\t\t\t.insertInto(\"file\")\n\t\t\t.values({\n\t\t\t\tpath: \"/project_id\",\n\t\t\t\tdata: new TextEncoder().encode(v4()),\n\t\t\t})\n\t\t\t.execute();\n\t}\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,EAA0B,MAAM,aAAa,CAAC;AAG7D,OAAO,EAAuB,MAAM,oBAAoB,CAAC;AACzD,OAAO,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YACnB,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC;QAC7B,CAAC;QACD,OAAO,EAAE,IAAI,CAAC,MAAM;QACpB,MAAM,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;YAC5C,OAAO,MAAM,MAAM,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACxC,CAAC;QACD,GAAG,EAAE,IAAI,CAAC,GAAG;KACb,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,KAAK,UAAU,0BAA0B,CAAC,IAAkB;IAC3D,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE;SAC1C,UAAU,CAAC,MAAM,CAAC;SAClB,MAAM,CAAC,MAAM,CAAC;SACd,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,aAAa,CAAC;SACjC,gBAAgB,EAAE,CAAC;IAErB,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACzB,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE;aACf,UAAU,CAAC,MAAM,CAAC;aAClB,MAAM,CAAC;YACP,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;SACpC,CAAC;aACD,OAAO,EAAE,CAAC;IACb,CAAC;AACF,CAAC","debug_id":"ed6fb309-3e32-52c8-87d0-1d450e0d29b9"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d1aa7d55-973a-5652-b6c6-b87ef78216ef")}catch(e){}}();
|
|
3
3
|
import { expect, test } from "vitest";
|
|
4
4
|
import { newProject } from "./newProject.js";
|
|
5
5
|
import { loadProjectInMemory } from "./loadProjectInMemory.js";
|
|
@@ -96,28 +96,51 @@ test("if a project has no id, it should be generated", async () => {
|
|
|
96
96
|
expect(id).toBeDefined();
|
|
97
97
|
expect(validate(id)).toBe(true);
|
|
98
98
|
});
|
|
99
|
-
test("
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
test("providing an account should work", async () => {
|
|
100
|
+
const mockAccount = {
|
|
101
|
+
id: "mock-account-id",
|
|
102
|
+
name: "peter",
|
|
103
|
+
};
|
|
104
|
+
const project = await loadProjectInMemory({
|
|
105
|
+
blob: await newProject(),
|
|
106
|
+
account: mockAccount,
|
|
105
107
|
});
|
|
106
|
-
await project.lix.db
|
|
107
|
-
.
|
|
108
|
-
.
|
|
109
|
-
.set({
|
|
110
|
-
data: new TextEncoder().encode(JSON.stringify({
|
|
111
|
-
baseLocale: "en",
|
|
112
|
-
locales: ["en"],
|
|
113
|
-
modules: ["invalid-module.js"],
|
|
114
|
-
})),
|
|
115
|
-
})
|
|
108
|
+
const activeAccount = await project.lix.db
|
|
109
|
+
.selectFrom("active_account")
|
|
110
|
+
.selectAll()
|
|
116
111
|
.execute();
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
112
|
+
expect(activeAccount).toEqual([mockAccount]);
|
|
113
|
+
});
|
|
114
|
+
// test("subscribing to errors should work", async () => {
|
|
115
|
+
// const project = await loadProjectInMemory({ blob: await newProject() });
|
|
116
|
+
// expect(await project.errors.get()).toEqual([]);
|
|
117
|
+
// let errorsFromSub: readonly Error[] = [];
|
|
118
|
+
// project.errors.subscribe((value) => {
|
|
119
|
+
// errorsFromSub = value;
|
|
120
|
+
// });
|
|
121
|
+
// await project.lix.db
|
|
122
|
+
// .updateTable("file")
|
|
123
|
+
// .where("path", "=", "/settings.json")
|
|
124
|
+
// .set({
|
|
125
|
+
// data: new TextEncoder().encode(
|
|
126
|
+
// JSON.stringify({
|
|
127
|
+
// baseLocale: "en",
|
|
128
|
+
// locales: ["en"],
|
|
129
|
+
// modules: ["invalid-module.js"],
|
|
130
|
+
// })
|
|
131
|
+
// ),
|
|
132
|
+
// })
|
|
133
|
+
// .execute();
|
|
134
|
+
// const errors = await project.errors.get();
|
|
135
|
+
// expect(errors.length).toBe(1);
|
|
136
|
+
// expect(errorsFromSub.length).toBe(1);
|
|
137
|
+
// expect(errorsFromSub).toStrictEqual(errors);
|
|
138
|
+
// });
|
|
139
|
+
test("closing a project should not lead to a throw", async () => {
|
|
140
|
+
const project = await loadProjectInMemory({ blob: await newProject() });
|
|
141
|
+
await project.close();
|
|
142
|
+
// capture async throws
|
|
143
|
+
await new Promise((resolve) => setTimeout(resolve, 250));
|
|
121
144
|
});
|
|
122
145
|
//# sourceMappingURL=loadProject.test.js.map
|
|
123
|
-
//# debugId=
|
|
146
|
+
//# debugId=d1aa7d55-973a-5652-b6c6-b87ef78216ef
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadProject.test.js","sources":["project/loadProject.test.ts"],"sourceRoot":"/","sourcesContent":["import { expect, test } from \"vitest\";\nimport { newProject } from \"./newProject.js\";\nimport { loadProjectInMemory } from \"./loadProjectInMemory.js\";\nimport { validate } from \"uuid\";\n\ntest(\"it should persist changes of bundles, messages, and variants to lix \", async () => {\n\tconst file1 = await newProject();\n\tconst project1 = await loadProjectInMemory({ blob: file1 });\n\tconst bundle = await project1.db\n\t\t.insertInto(\"bundle\")\n\t\t.defaultValues()\n\t\t.returning(\"id\")\n\t\t.executeTakeFirstOrThrow();\n\n\tconst message = await project1.db\n\t\t.insertInto(\"message\")\n\t\t.values({\n\t\t\tbundleId: bundle.id,\n\t\t\tlocale: \"en\",\n\t\t})\n\t\t.returning(\"id\")\n\t\t.executeTakeFirstOrThrow();\n\n\tawait project1.db\n\t\t.insertInto(\"variant\")\n\t\t.values({\n\t\t\tmessageId: message.id,\n\t\t})\n\t\t.execute();\n\n\tconst file1AfterUpdates = await project1.toBlob();\n\tawait project1.close();\n\n\tconst project2 = await loadProjectInMemory({ blob: file1AfterUpdates });\n\tconst bundles = await project2.db.selectFrom(\"bundle\").select(\"id\").execute();\n\tconst messages = await project2.db\n\t\t.selectFrom(\"message\")\n\t\t.select(\"id\")\n\t\t.execute();\n\tconst variants = await project2.db\n\t\t.selectFrom(\"variant\")\n\t\t.select(\"id\")\n\t\t.execute();\n\texpect(bundles.length).toBe(1);\n\texpect(messages.length).toBe(1);\n\texpect(variants.length).toBe(1);\n});\n\ntest(\"get and set settings\", async () => {\n\tconst project = await loadProjectInMemory({ blob: await newProject() });\n\tconst settings = await project.settings.get();\n\n\texpect(settings[\"plugin.key\"]).toBeUndefined();\n\n\tconst copied = structuredClone(settings);\n\n\tcopied[\"plugin.key\"] = { test: \"value\" };\n\n\tawait project.settings.set(copied);\n\n\tconst updatedSettings = await project.settings.get();\n\texpect(updatedSettings[\"plugin.key\"]).toEqual({ test: \"value\" });\n});\n\ntest(\"it should set sourceLanguageTag and languageTags if non-existent to make v1 plugins work\", async () => {\n\tconst project = await loadProjectInMemory({\n\t\tblob: await newProject({\n\t\t\tsettings: {\n\t\t\t\tbaseLocale: \"en\",\n\t\t\t\tlocales: [\"en\", \"de\"],\n\t\t\t},\n\t\t}),\n\t});\n\tconst settings = await project.settings.get();\n\texpect(settings.baseLocale).toBe(\"en\");\n\texpect(settings.sourceLanguageTag).toBe(\"en\");\n\texpect(settings.languageTags).toEqual([\"en\", \"de\"]);\n\texpect(settings.locales).toEqual([\"en\", \"de\"]);\n});\n\ntest(\"providing plugins should work\", async () => {\n\tconst project = await loadProjectInMemory({\n\t\tblob: await newProject({\n\t\t\tsettings: {\n\t\t\t\tbaseLocale: \"en\",\n\t\t\t\tlocales: [\"en\"],\n\t\t\t\tmodules: [],\n\t\t\t},\n\t\t}),\n\t\tprovidePlugins: [{ key: \"my-provided-plugin\" }],\n\t});\n\n\tconst plugins = await project.plugins.get();\n\tconst errors = await project.errors.get();\n\n\texpect(plugins.length).toBe(1);\n\texpect(plugins[0]?.key).toBe(\"my-provided-plugin\");\n\texpect(errors.length).toBe(0);\n});\n\ntest(\"if a project has no id, it should be generated\", async () => {\n\tconst project = await loadProjectInMemory({ blob: await newProject() });\n\n\tawait project.lix.db\n\t\t.deleteFrom(\"file\")\n\t\t.where(\"path\", \"=\", \"/project_id\")\n\t\t.execute();\n\n\tconst blob = await project.toBlob();\n\n\tconst project2 = await loadProjectInMemory({ blob });\n\n\tconst id = await project2.id.get();\n\n\texpect(id).toBeDefined();\n\texpect(validate(id)).toBe(true);\n});\n\ntest(\"subscribing to errors should work\", async () => {\n\tconst project = await loadProjectInMemory({ blob: await newProject() });\n\n\texpect(await project.errors.get()).toEqual([]);\n\n\tlet errorsFromSub: readonly Error[] = [];\n\tproject.errors.subscribe((value) => {\n\t\terrorsFromSub = value;\n\t});\n\n\tawait project.lix.db\n\t\t.updateTable(\"file\")\n\t\t.where(\"path\", \"=\", \"/settings.json\")\n\t\t.set({\n\t\t\tdata: new TextEncoder().encode(\n\t\t\t\tJSON.stringify({\n\t\t\t\t\tbaseLocale: \"en\",\n\t\t\t\t\tlocales: [\"en\"],\n\t\t\t\t\tmodules: [\"invalid-module.js\"],\n\t\t\t\t})\n\t\t\t),\n\t\t})\n\t\t.execute();\n\n\tconst errors = await project.errors.get();\n\n\texpect(errors.length).toBe(1);\n\texpect(errorsFromSub.length).toBe(1);\n\texpect(errorsFromSub).toStrictEqual(errors);\n});\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAA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OAAO,CAAC,GAAG,CAAC,EAAE;SAClB,WAAW,CAAC,MAAM,CAAC;SACnB,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,gBAAgB,CAAC;SACpC,GAAG,CAAC;QACJ,IAAI,EAAE,IAAI,WAAW,EAAE,CAAC,MAAM,CAC7B,IAAI,CAAC,SAAS,CAAC;YACd,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE,CAAC,IAAI,CAAC;YACf,OAAO,EAAE,CAAC,mBAAmB,CAAC;SAC9B,CAAC,CACF;KACD,CAAC;SACD,OAAO,EAAE,CAAC;IAEZ,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;IAE1C,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9B,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACrC,MAAM,CAAC,aAAa,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AAC7C,CAAC,CAAC,CAAC","debug_id":"3a3ddecd-0efe-5737-b0ae-3bd47569c867"}
|
|
1
|
+
{"version":3,"file":"loadProject.test.js","sources":["project/loadProject.test.ts"],"sourceRoot":"/","sourcesContent":["import { expect, test } from \"vitest\";\nimport { newProject } from \"./newProject.js\";\nimport { loadProjectInMemory } from \"./loadProjectInMemory.js\";\nimport { validate } from \"uuid\";\n\ntest(\"it should persist changes of bundles, messages, and variants to lix \", async () => {\n\tconst file1 = await newProject();\n\tconst project1 = await loadProjectInMemory({ blob: file1 });\n\tconst bundle = await project1.db\n\t\t.insertInto(\"bundle\")\n\t\t.defaultValues()\n\t\t.returning(\"id\")\n\t\t.executeTakeFirstOrThrow();\n\n\tconst message = await project1.db\n\t\t.insertInto(\"message\")\n\t\t.values({\n\t\t\tbundleId: bundle.id,\n\t\t\tlocale: \"en\",\n\t\t})\n\t\t.returning(\"id\")\n\t\t.executeTakeFirstOrThrow();\n\n\tawait project1.db\n\t\t.insertInto(\"variant\")\n\t\t.values({\n\t\t\tmessageId: message.id,\n\t\t})\n\t\t.execute();\n\n\tconst file1AfterUpdates = await project1.toBlob();\n\tawait project1.close();\n\n\tconst project2 = await loadProjectInMemory({ blob: file1AfterUpdates });\n\tconst bundles = await project2.db.selectFrom(\"bundle\").select(\"id\").execute();\n\tconst messages = await project2.db\n\t\t.selectFrom(\"message\")\n\t\t.select(\"id\")\n\t\t.execute();\n\tconst variants = await project2.db\n\t\t.selectFrom(\"variant\")\n\t\t.select(\"id\")\n\t\t.execute();\n\texpect(bundles.length).toBe(1);\n\texpect(messages.length).toBe(1);\n\texpect(variants.length).toBe(1);\n});\n\ntest(\"get and set settings\", async () => {\n\tconst project = await loadProjectInMemory({ blob: await newProject() });\n\tconst settings = await project.settings.get();\n\n\texpect(settings[\"plugin.key\"]).toBeUndefined();\n\n\tconst copied = structuredClone(settings);\n\n\tcopied[\"plugin.key\"] = { test: \"value\" };\n\n\tawait project.settings.set(copied);\n\n\tconst updatedSettings = await project.settings.get();\n\texpect(updatedSettings[\"plugin.key\"]).toEqual({ test: \"value\" });\n});\n\ntest(\"it should set sourceLanguageTag and languageTags if non-existent to make v1 plugins work\", async () => {\n\tconst project = await loadProjectInMemory({\n\t\tblob: await newProject({\n\t\t\tsettings: {\n\t\t\t\tbaseLocale: \"en\",\n\t\t\t\tlocales: [\"en\", \"de\"],\n\t\t\t},\n\t\t}),\n\t});\n\tconst settings = await project.settings.get();\n\texpect(settings.baseLocale).toBe(\"en\");\n\texpect(settings.sourceLanguageTag).toBe(\"en\");\n\texpect(settings.languageTags).toEqual([\"en\", \"de\"]);\n\texpect(settings.locales).toEqual([\"en\", \"de\"]);\n});\n\ntest(\"providing plugins should work\", async () => {\n\tconst project = await loadProjectInMemory({\n\t\tblob: await newProject({\n\t\t\tsettings: {\n\t\t\t\tbaseLocale: \"en\",\n\t\t\t\tlocales: [\"en\"],\n\t\t\t\tmodules: [],\n\t\t\t},\n\t\t}),\n\t\tprovidePlugins: [{ key: \"my-provided-plugin\" }],\n\t});\n\n\tconst plugins = await project.plugins.get();\n\tconst errors = await project.errors.get();\n\n\texpect(plugins.length).toBe(1);\n\texpect(plugins[0]?.key).toBe(\"my-provided-plugin\");\n\texpect(errors.length).toBe(0);\n});\n\ntest(\"if a project has no id, it should be generated\", async () => {\n\tconst project = await loadProjectInMemory({ blob: await newProject() });\n\n\tawait project.lix.db\n\t\t.deleteFrom(\"file\")\n\t\t.where(\"path\", \"=\", \"/project_id\")\n\t\t.execute();\n\n\tconst blob = await project.toBlob();\n\n\tconst project2 = await loadProjectInMemory({ blob });\n\n\tconst id = await project2.id.get();\n\n\texpect(id).toBeDefined();\n\texpect(validate(id)).toBe(true);\n});\n\ntest(\"providing an account should work\", async () => {\n\tconst mockAccount = {\n\t\tid: \"mock-account-id\",\n\t\tname: \"peter\",\n\t};\n\n\tconst project = await loadProjectInMemory({\n\t\tblob: await newProject(),\n\t\taccount: mockAccount,\n\t});\n\n\tconst activeAccount = await project.lix.db\n\t\t.selectFrom(\"active_account\")\n\t\t.selectAll()\n\t\t.execute();\n\n\texpect(activeAccount).toEqual([mockAccount]);\n});\n\n// test(\"subscribing to errors should work\", async () => {\n// \tconst project = await loadProjectInMemory({ blob: await newProject() });\n\n// \texpect(await project.errors.get()).toEqual([]);\n\n// \tlet errorsFromSub: readonly Error[] = [];\n// \tproject.errors.subscribe((value) => {\n// \t\terrorsFromSub = value;\n// \t});\n\n// \tawait project.lix.db\n// \t\t.updateTable(\"file\")\n// \t\t.where(\"path\", \"=\", \"/settings.json\")\n// \t\t.set({\n// \t\t\tdata: new TextEncoder().encode(\n// \t\t\t\tJSON.stringify({\n// \t\t\t\t\tbaseLocale: \"en\",\n// \t\t\t\t\tlocales: [\"en\"],\n// \t\t\t\t\tmodules: [\"invalid-module.js\"],\n// \t\t\t\t})\n// \t\t\t),\n// \t\t})\n// \t\t.execute();\n\n// \tconst errors = await project.errors.get();\n\n// \texpect(errors.length).toBe(1);\n// \texpect(errorsFromSub.length).toBe(1);\n// \texpect(errorsFromSub).toStrictEqual(errors);\n// });\n\ntest(\"closing a project should not lead to a throw\", async () => {\n\tconst project = await loadProjectInMemory({ blob: await newProject() });\n\n\tawait project.close();\n\n\t// capture async throws\n\tawait new Promise((resolve) => setTimeout(resolve, 250));\n});\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAEhC,IAAI,CAAC,sEAAsE,EAAE,KAAK,IAAI,EAAE;IACvF,MAAM,KAAK,GAAG,MAAM,UAAU,EAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,MAAM,mBAAmB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5D,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,EAAE;SAC9B,UAAU,CAAC,QAAQ,CAAC;SACpB,aAAa,EAAE;SACf,SAAS,CAAC,IAAI,CAAC;SACf,uBAAuB,EAAE,CAAC;IAE5B,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,EAAE;SAC/B,UAAU,CAAC,SAAS,CAAC;SACrB,MAAM,CAAC;QACP,QAAQ,EAAE,MAAM,CAAC,EAAE;QACnB,MAAM,EAAE,IAAI;KACZ,CAAC;SACD,SAAS,CAAC,IAAI,CAAC;SACf,uBAAuB,EAAE,CAAC;IAE5B,MAAM,QAAQ,CAAC,EAAE;SACf,UAAU,CAAC,SAAS,CAAC;SACrB,MAAM,CAAC;QACP,SAAS,EAAE,OAAO,CAAC,EAAE;KACrB,CAAC;SACD,OAAO,EAAE,CAAC;IAEZ,MAAM,iBAAiB,GAAG,MAAM,QAAQ,CAAC,MAAM,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,7 +3,6 @@ import { type Lix } from "@lix-js/sdk";
|
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import type { InlangPlugin, NodeFsPromisesSubsetLegacy } from "../plugin/schema.js";
|
|
5
5
|
import type { ProjectSettings } from "../json-schema/settings.js";
|
|
6
|
-
import type { InlangProject } from "./api.js";
|
|
7
6
|
/**
|
|
8
7
|
* Loads a project from a directory.
|
|
9
8
|
*
|
|
@@ -17,24 +16,18 @@ export declare function loadProjectFromDirectory(args: {
|
|
|
17
16
|
} & Omit<Parameters<typeof loadProjectInMemory>[0], "blob">): Promise<{
|
|
18
17
|
errors: {
|
|
19
18
|
get: () => Promise<Error[]>;
|
|
20
|
-
subscribe: (callback: Parameters<InlangProject["errors"]["subscribe"]>[0]) => {
|
|
21
|
-
unsubscribe: () => void;
|
|
22
|
-
};
|
|
23
19
|
};
|
|
24
20
|
db: import("kysely").Kysely<import("../index.js").InlangDatabaseSchema>;
|
|
25
21
|
_sqlite: import("sqlite-wasm-kysely").SqliteDatabase;
|
|
26
22
|
id: {
|
|
27
23
|
get: () => Promise<string>;
|
|
28
|
-
subscribe: import("./api.js").Subscription<string>;
|
|
29
24
|
};
|
|
30
25
|
plugins: {
|
|
31
26
|
get: () => Promise<readonly InlangPlugin[]>;
|
|
32
|
-
subscribe: import("./api.js").Subscription<readonly InlangPlugin[]>;
|
|
33
27
|
};
|
|
34
28
|
settings: {
|
|
35
29
|
get: () => Promise<ProjectSettings>;
|
|
36
30
|
set: (settings: ProjectSettings) => Promise<void>;
|
|
37
|
-
subscribe: import("./api.js").Subscription<ProjectSettings>;
|
|
38
31
|
};
|
|
39
32
|
lix: Lix;
|
|
40
33
|
importFiles: (args: {
|
|
@@ -47,9 +40,6 @@ export declare function loadProjectFromDirectory(args: {
|
|
|
47
40
|
close: () => Promise<void>;
|
|
48
41
|
toBlob: () => Promise<Blob>;
|
|
49
42
|
}>;
|
|
50
|
-
export declare class WarningLocalPluginImport extends Error {
|
|
51
|
-
constructor(module: string);
|
|
52
|
-
}
|
|
53
43
|
export declare class WarningDeprecatedLintRule extends Error {
|
|
54
44
|
constructor(module: string);
|
|
55
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadProjectFromDirectory.d.ts","sourceRoot":"/","sources":["project/loadProjectFromDirectory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,MAAM,SAAS,CAAC;AAGzB,OAAO,KAAK,EACX,YAAY,EACZ,0BAA0B,EAC1B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"loadProjectFromDirectory.d.ts","sourceRoot":"/","sources":["project/loadProjectFromDirectory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,MAAM,SAAS,CAAC;AAGzB,OAAO,KAAK,EACX,YAAY,EACZ,0BAA0B,EAC1B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAKlE;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC7C,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,OAAO,EAAE,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAClE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,EACzC,MAAM,CACN;;;;;;;;;;;;;;;;;;;;;;;;;;GAuJD;AAmfD,qBAAa,yBAA0B,SAAQ,KAAK;gBACvC,MAAM,EAAE,MAAM;CAM1B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAChC,EAAE,EAAE,0BAA0B,EAC9B,WAAW,EAAE,MAAM,GACjB,0BAA0B,CAgB5B;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAWxE;AAED,qBAAa,uBAAwB,SAAQ,KAAK;IACjD,IAAI,EAAE,MAAM,CAAC;gBAED,IAAI,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;CAMhD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a707cbbf-d9cd-5dca-9279-55823fc96f37")}catch(e){}}();
|
|
3
3
|
import { newProject } from "./newProject.js";
|
|
4
4
|
import { loadProjectInMemory } from "./loadProjectInMemory.js";
|
|
5
5
|
import {} from "@lix-js/sdk";
|
|
@@ -15,8 +15,11 @@ import { upsertBundleNestedMatchByProperties } from "../import-export/upsertBund
|
|
|
15
15
|
* that is stored in git.
|
|
16
16
|
*/
|
|
17
17
|
export async function loadProjectFromDirectory(args) {
|
|
18
|
+
const settingsPath = nodePath.join(args.path, "settings.json");
|
|
19
|
+
const settings = JSON.parse(await args.fs.promises.readFile(settingsPath, "utf8"));
|
|
18
20
|
const localImport = await importLocalPlugins({
|
|
19
21
|
fs: args.fs,
|
|
22
|
+
settings,
|
|
20
23
|
path: args.path,
|
|
21
24
|
});
|
|
22
25
|
const providePluginsWithLocalPlugins = [
|
|
@@ -30,7 +33,9 @@ export async function loadProjectFromDirectory(args) {
|
|
|
30
33
|
const project = await loadProjectInMemory({
|
|
31
34
|
...args,
|
|
32
35
|
providePlugins: providePluginsWithLocalPlugins,
|
|
33
|
-
blob: await newProject(
|
|
36
|
+
blob: await newProject({
|
|
37
|
+
settings,
|
|
38
|
+
}),
|
|
34
39
|
});
|
|
35
40
|
await syncLixFsFiles({
|
|
36
41
|
fs: args.fs,
|
|
@@ -121,22 +126,19 @@ export async function loadProjectFromDirectory(args) {
|
|
|
121
126
|
...project,
|
|
122
127
|
errors: {
|
|
123
128
|
get: async () => {
|
|
124
|
-
|
|
125
|
-
return [
|
|
126
|
-
...withLocallyImportedPluginWarning(errors),
|
|
127
|
-
...localImport.errors,
|
|
128
|
-
...importedResourceFileErrors,
|
|
129
|
-
];
|
|
130
|
-
},
|
|
131
|
-
subscribe: (callback) => {
|
|
132
|
-
return project.errors.subscribe((value) => {
|
|
133
|
-
callback([
|
|
134
|
-
...withLocallyImportedPluginWarning(value),
|
|
135
|
-
...localImport.errors,
|
|
136
|
-
...importedResourceFileErrors,
|
|
137
|
-
]);
|
|
138
|
-
});
|
|
129
|
+
return [...localImport.errors, ...importedResourceFileErrors];
|
|
139
130
|
},
|
|
131
|
+
// subscribe: (
|
|
132
|
+
// callback: Parameters<InlangProject["errors"]["subscribe"]>[0]
|
|
133
|
+
// ) => {
|
|
134
|
+
// return project.errors.subscribe((value) => {
|
|
135
|
+
// callback([
|
|
136
|
+
// ...withLocallyImportedPluginWarning(value),
|
|
137
|
+
// ...localImport.errors,
|
|
138
|
+
// ...importedResourceFileErrors,
|
|
139
|
+
// ]);
|
|
140
|
+
// });
|
|
141
|
+
// },
|
|
140
142
|
},
|
|
141
143
|
};
|
|
142
144
|
}
|
|
@@ -389,9 +391,12 @@ async function syncLixFsFiles(args) {
|
|
|
389
391
|
if (!statesToSync.fsFileStates[path]) {
|
|
390
392
|
if (lixState.state == "unknown") {
|
|
391
393
|
// ADD TO FS (6)
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
394
|
+
// create directory if not exists
|
|
395
|
+
args.fs.mkdirSync(nodePath.dirname(nodePath.join(args.path, path)), {
|
|
396
|
+
recursive: true,
|
|
397
|
+
});
|
|
398
|
+
// write file
|
|
399
|
+
args.fs.writeFileSync(nodePath.join(args.path, path), Buffer.from(lixState.content));
|
|
395
400
|
statesToSync.fsFileStates[path] = {
|
|
396
401
|
state: "known",
|
|
397
402
|
content: lixState.content,
|
|
@@ -482,9 +487,10 @@ function categorizePlugins(plugins) {
|
|
|
482
487
|
async function importLocalPlugins(args) {
|
|
483
488
|
const errors = [];
|
|
484
489
|
const locallyImportedPlugins = [];
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
|
|
490
|
+
for (const module of args.settings.modules ?? []) {
|
|
491
|
+
if (module.startsWith("http")) {
|
|
492
|
+
continue;
|
|
493
|
+
}
|
|
488
494
|
const modulePath = absolutePathFromProject(args.path, module);
|
|
489
495
|
try {
|
|
490
496
|
let moduleAsText = await args.fs.promises.readFile(modulePath, "utf8");
|
|
@@ -510,21 +516,6 @@ async function importLocalPlugins(args) {
|
|
|
510
516
|
locallyImportedPlugins,
|
|
511
517
|
};
|
|
512
518
|
}
|
|
513
|
-
function withLocallyImportedPluginWarning(errors) {
|
|
514
|
-
return errors.map((error) => {
|
|
515
|
-
if (error instanceof PluginImportError &&
|
|
516
|
-
error.plugin.startsWith("http") === false) {
|
|
517
|
-
return new WarningLocalPluginImport(error.plugin);
|
|
518
|
-
}
|
|
519
|
-
return error;
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
|
-
export class WarningLocalPluginImport extends Error {
|
|
523
|
-
constructor(module) {
|
|
524
|
-
super(`Plugin ${module} is imported from a local path. This will work fine in dev tools like Sherlock or Paraglide JS but is not portable. Web apps like Fink or Parrot won't be able to import this plugin. It is recommended to use an http url to import plugins. The plugins are cached locally and will be available offline.`);
|
|
525
|
-
this.name = "WarningLocalImport";
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
519
|
export class WarningDeprecatedLintRule extends Error {
|
|
529
520
|
constructor(module) {
|
|
530
521
|
super(`The lint rule ${module} is deprecated. Please remove the lint rule from the settings. Lint rules are interim built into apps and will be succeeded by more generilizable lix validation rules.`);
|
|
@@ -590,4 +581,4 @@ export class ResourceFileImportError extends Error {
|
|
|
590
581
|
}
|
|
591
582
|
}
|
|
592
583
|
//# sourceMappingURL=loadProjectFromDirectory.js.map
|
|
593
|
-
//# debugId=
|
|
584
|
+
//# debugId=a707cbbf-d9cd-5dca-9279-55823fc96f37
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadProjectFromDirectory.js","sources":["project/loadProjectFromDirectory.ts"],"sourceRoot":"/","sourcesContent":["import { newProject } from \"./newProject.js\";\nimport { loadProjectInMemory } from \"./loadProjectInMemory.js\";\nimport { type Lix } from \"@lix-js/sdk\";\n\nimport fs from \"node:fs\";\n\nimport nodePath from \"node:path\";\nimport type {\n\tInlangPlugin,\n\tNodeFsPromisesSubsetLegacy,\n} from \"../plugin/schema.js\";\nimport { fromMessageV1 } from \"../json-schema/old-v1-message/fromMessageV1.js\";\nimport type { ProjectSettings } from \"../json-schema/settings.js\";\nimport type { PreprocessPluginBeforeImportFunction } from \"../plugin/importPlugins.js\";\nimport { PluginImportError } from \"../plugin/errors.js\";\nimport type { InlangProject } from \"./api.js\";\nimport { upsertBundleNestedMatchByProperties } from \"../import-export/upsertBundleNestedMatchByProperties.js\";\n\n/**\n * Loads a project from a directory.\n *\n * Main use case are dev tools that want to load a project from a directory\n * that is stored in git.\n */\nexport async function loadProjectFromDirectory(\n\targs: { path: string; fs: typeof fs; syncInterval?: number } & Omit<\n\t\tParameters<typeof loadProjectInMemory>[0],\n\t\t\"blob\"\n\t>\n) {\n\tconst localImport = await importLocalPlugins({\n\t\tfs: args.fs,\n\t\tpath: args.path,\n\t});\n\n\tconst providePluginsWithLocalPlugins = [\n\t\t...(args.providePlugins ?? []),\n\t\t...localImport.locallyImportedPlugins,\n\t];\n\n\t// TODO call tempProject.lix.settled() to wait for the new settings file, and remove reload of the proejct as soon as reactive settings has landed\n\t// NOTE: we need to ensure two things:\n\t// 1. settled needs to include the changes from the copyFiles call\n\t// 2. the changes created from the copyFiles call need to be realized and lead to a signal on the settings\n\tconst project = await loadProjectInMemory({\n\t\t...args,\n\t\tprovidePlugins: providePluginsWithLocalPlugins,\n\t\tblob: await newProject(),\n\t});\n\n\tawait syncLixFsFiles({\n\t\tfs: args.fs,\n\t\tpath: args.path,\n\t\tlix: project.lix,\n\t\tsyncInterval: args.syncInterval,\n\t});\n\n\tconst {\n\t\tloadMessagesPlugins,\n\t\tsaveMessagesPlugins,\n\t\timportPlugins,\n\t\texportPlugins,\n\t} = categorizePlugins(await project.plugins.get());\n\n\t// TODO i guess we should move this validation logic into sdk2/src/project/loadProject.ts\n\t// Two scenarios could arise:\n\t// 1. set settings is called from an app - it should detect and reject the setting of settings -> app need to be able to validate before calling set\n\t// 2. the settings file loaded from disc here is corrupted -> user has to fix the file on disc\n\tif (loadMessagesPlugins.length > 1 || saveMessagesPlugins.length > 1) {\n\t\tthrow new Error(\n\t\t\t\"Max one loadMessages (found: \" +\n\t\t\t\tloadMessagesPlugins.length +\n\t\t\t\t\") and one saveMessages plugins (found: \" +\n\t\t\t\tsaveMessagesPlugins.length +\n\t\t\t\t\") are allowed \"\n\t\t);\n\t}\n\tconst importedResourceFileErrors: Error[] = [];\n\n\tif (\n\t\t(loadMessagesPlugins.length > 0 || saveMessagesPlugins.length > 0) &&\n\t\t(exportPlugins.length > 0 || importPlugins.length > 0)\n\t) {\n\t\tthrow new Error(\n\t\t\t\"Plugins for loadMessages (found: \" +\n\t\t\t\tloadMessagesPlugins.length +\n\t\t\t\t\") and saveMessages plugins (found: \" +\n\t\t\t\tsaveMessagesPlugins.length +\n\t\t\t\t\") must not coexist with import (found: \" +\n\t\t\t\timportPlugins.length +\n\t\t\t\t\") or export (found: \" +\n\t\t\t\texportPlugins.length +\n\t\t\t\t\") \"\n\t\t);\n\t} else if (loadMessagesPlugins.length > 1 || saveMessagesPlugins.length > 1) {\n\t\tthrow new Error(\n\t\t\t\"Max one loadMessages (found: \" +\n\t\t\t\tloadMessagesPlugins.length +\n\t\t\t\t\") and one saveMessages plugins (found: \" +\n\t\t\t\tsaveMessagesPlugins.length +\n\t\t\t\t\") are allowed \"\n\t\t);\n\t} else if (importPlugins[0]) {\n\t\tconst importer = importPlugins[0];\n\t\tconst files = [];\n\n\t\tif (importer.toBeImportedFiles) {\n\t\t\tconst toBeImportedFiles = await importer.toBeImportedFiles({\n\t\t\t\tsettings: await project.settings.get(),\n\t\t\t});\n\t\t\tfor (const toBeImported of toBeImportedFiles) {\n\t\t\t\tconst absolute = absolutePathFromProject(args.path, toBeImported.path);\n\t\t\t\ttry {\n\t\t\t\t\tconst data = await args.fs.promises.readFile(absolute);\n\t\t\t\t\tconst name = nodePath.basename(toBeImported.path);\n\t\t\t\t\tfiles.push({\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tlocale: toBeImported.locale,\n\t\t\t\t\t\tcontent: data,\n\t\t\t\t\t\tpluginKey: importer.key,\n\t\t\t\t\t\ttoBeImportedFilesMetadata: toBeImported.metadata,\n\t\t\t\t\t});\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// https://github.com/opral/inlang-sdk/issues/202\n\t\t\t\t\tif ((e as any)?.code === \"ENOENT\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\timportedResourceFileErrors.push(\n\t\t\t\t\t\tnew ResourceFileImportError({\n\t\t\t\t\t\t\tcause: e as Error,\n\t\t\t\t\t\t\tpath: toBeImported.path,\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tawait project.importFiles({\n\t\t\tpluginKey: importer.key,\n\t\t\tfiles: files as any,\n\t\t});\n\t} else if (loadMessagesPlugins[0] !== undefined) {\n\t\t// TODO create resource files from loadMessageFn call - to poll?\n\t\tawait loadLegacyMessages({\n\t\t\tproject,\n\t\t\tprojectPath: args.path,\n\t\t\tfs: args.fs,\n\t\t\tpluginKey: loadMessagesPlugins[0].key ?? loadMessagesPlugins[0].id,\n\t\t\tloadMessagesFn: loadMessagesPlugins[0].loadMessages,\n\t\t});\n\t}\n\n\treturn {\n\t\t...project,\n\t\terrors: {\n\t\t\tget: async () => {\n\t\t\t\tconst errors = await project.errors.get();\n\t\t\t\treturn [\n\t\t\t\t\t...withLocallyImportedPluginWarning(errors),\n\t\t\t\t\t...localImport.errors,\n\t\t\t\t\t...importedResourceFileErrors,\n\t\t\t\t];\n\t\t\t},\n\t\t\tsubscribe: (\n\t\t\t\tcallback: Parameters<InlangProject[\"errors\"][\"subscribe\"]>[0]\n\t\t\t) => {\n\t\t\t\treturn project.errors.subscribe((value) => {\n\t\t\t\t\tcallback([\n\t\t\t\t\t\t...withLocallyImportedPluginWarning(value),\n\t\t\t\t\t\t...localImport.errors,\n\t\t\t\t\t\t...importedResourceFileErrors,\n\t\t\t\t\t]);\n\t\t\t\t});\n\t\t\t},\n\t\t},\n\t};\n}\n\nasync function loadLegacyMessages(args: {\n\tproject: Awaited<ReturnType<typeof loadProjectInMemory>>;\n\tpluginKey: NonNullable<InlangPlugin[\"key\"] | InlangPlugin[\"id\"]>;\n\tloadMessagesFn: Required<InlangPlugin>[\"loadMessages\"];\n\tprojectPath: string;\n\tfs: typeof fs;\n}) {\n\tconst loadedLegacyMessages = await args.loadMessagesFn({\n\t\tsettings: await args.project.settings.get(),\n\t\t// @ts-expect-error - type mismatch\n\t\tnodeishFs: withAbsolutePaths(args.fs.promises, args.projectPath),\n\t});\n\tconst upsertQueries = [];\n\n\tfor (const legacyMessage of loadedLegacyMessages) {\n\t\tconst messageBundle = fromMessageV1(legacyMessage);\n\n\t\tupsertQueries.push(\n\t\t\tupsertBundleNestedMatchByProperties(args.project.db, messageBundle)\n\t\t);\n\t}\n\n\treturn await Promise.all(upsertQueries);\n}\n\ntype FsFileState = Record<\n\tstring,\n\t{\n\t\t/*mtime: number, hash: string, */ content: ArrayBuffer;\n\t\tstate: \"known\" | \"unknown\" | \"updated\" | \"gone\";\n\t}\n>;\n\nfunction arrayBuffersEqual(a: ArrayBuffer, b: ArrayBuffer) {\n\tif (a.byteLength !== b.byteLength) return false;\n\n\t// Create views for byte-by-byte comparison\n\tconst view1 = new Uint8Array(a);\n\tconst view2 = new Uint8Array(b);\n\n\t// Compare each byte\n\tfor (const [i, element] of view1.entries()) {\n\t\tif (element !== view2[i]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Watches a directory and copies files into lix, keeping them in sync.\n */\nasync function syncLixFsFiles(args: {\n\tfs: typeof fs;\n\tpath: string;\n\tlix: Lix;\n\tsyncInterval?: number;\n}) {\n\t// NOTE this function is async - while it runs 100% sync in the naiv implementation - we may want to change to an async version to optimize\n\tasync function checkFsStateRecursive(\n\t\tdirPath: string,\n\t\tcurrentState: FsFileState\n\t) {\n\t\tconst entries = args.fs.readdirSync(dirPath, { withFileTypes: true });\n\n\t\tfor (const entry of entries) {\n\t\t\tconst fullPath = nodePath.join(dirPath, entry.name);\n\t\t\tif (entry.isDirectory()) {\n\t\t\t\tcheckFsStateRecursive(fullPath, currentState);\n\t\t\t} else {\n\t\t\t\t// NOTE we could start with comparing the mdate and skip file read completely...\n\t\t\t\tconst data = args.fs.readFileSync(fullPath) as unknown as ArrayBuffer;\n\n\t\t\t\tconst relativePath = \"/\" + nodePath.relative(args.path, fullPath);\n\n\t\t\t\tif (!currentState[relativePath]) {\n\t\t\t\t\tcurrentState[relativePath] = {\n\t\t\t\t\t\tcontent: data,\n\t\t\t\t\t\tstate: \"unknown\",\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tif (arrayBuffersEqual(currentState[relativePath].content, data)) {\n\t\t\t\t\t\tcurrentState[relativePath].state = \"known\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentState[relativePath].state = \"updated\";\n\t\t\t\t\t\tcurrentState[relativePath].content = data;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tasync function checkLixState(currentLixState: FsFileState) {\n\t\t// go through all files in lix and check there state\n\t\tconst filesInLix = await args.lix.db\n\t\t\t.selectFrom(\"file\")\n\t\t\t.where(\"path\", \"not like\", \"%db.sqlite\")\n\t\t\t.selectAll()\n\t\t\t.execute();\n\n\t\tfor (const fileInLix of filesInLix) {\n\t\t\tconst currentStateOfFileInLix = currentLixState[fileInLix.path];\n\t\t\t// NOTE we could start with comparing the mdate and skip file read completely...\n\t\t\tif (!currentStateOfFileInLix) {\n\t\t\t\tcurrentLixState[fileInLix.path] = {\n\t\t\t\t\tcontent: new Uint8Array(fileInLix.data).buffer,\n\t\t\t\t\tstate: \"unknown\",\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tarrayBuffersEqual(\n\t\t\t\t\t\tcurrentStateOfFileInLix.content,\n\t\t\t\t\t\tfileInLix.data.buffer as ArrayBuffer\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tcurrentStateOfFileInLix.state = \"known\";\n\t\t\t\t} else {\n\t\t\t\t\tcurrentStateOfFileInLix.state = \"updated\";\n\t\t\t\t\tcurrentStateOfFileInLix.content = fileInLix.data\n\t\t\t\t\t\t.buffer as ArrayBuffer;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tasync function syncUpFsAndLixFiles(statesToSync: {\n\t\tfsFileStates: FsFileState;\n\t\tlixFileStates: FsFileState;\n\t}) {\n\t\t// for (const file of Object.keys(statesToSync.fsFileStates)) {\n\t\t// \tif (file.includes(\"gitignore\"))\n\t\t// \t\tconsole.log(\n\t\t// \t\t\t\"fsFileStates : \" +\n\t\t// \t\t\t\tfile +\n\t\t// \t\t\t\t\" fs \" +\n\t\t// \t\t\t\tstatesToSync.fsFileStates[file]?.state +\n\t\t// \t\t\t\t\" lix \" +\n\t\t// \t\t\t\tstatesToSync.lixFileStates[file]?.state\n\t\t// \t\t);\n\t\t// }\n\n\t\t// Sync cases:\n\t\t// fs - no state for file | fs - unkonwn | fs - known | fs - updated | fs - gone\n\t\t// lix - no state for file \tNOTHING\t(1)\t | ADD TO LIX(2) | ERROR (3) | ERROR (4) | ERROR (5)\n\t\t// lix - unknown\t\t\t\t\tADD TO FS (6) | USE FS VER.(7) | ERROR (8) | CASE (9) | CASE (10)\n\t\t// lix - known ERROR (11) | ERROR (12) | NOTHING(13) | ERROR (14) | ERROR (15)\n\t\t// lix - updated\t\t\t\t\tERROR (16) | ERROR (17) | USE LIX (18) | CASE (19) | CASE (20)\n\t\t// lix - gone \t\t\t\t\t\tERROR (21) | ERROR (22) | DELETE FS (23)| CASE (24) | CASE (25)\n\n\t\t// TODO check export import from saveFileToDirectory\n\n\t\tfor (const [path, fsState] of Object.entries(statesToSync.fsFileStates)) {\n\t\t\t// no state for file in LIX\n\t\t\tif (!statesToSync.lixFileStates[path]) {\n\t\t\t\tif (fsState.state === \"unknown\") {\n\t\t\t\t\t// ADD TO LIX(2)\n\t\t\t\t\tawait upsertFileInLix(args, path, fsState.content);\n\t\t\t\t\tstatesToSync.lixFileStates[path] = {\n\t\t\t\t\t\tstate: \"known\",\n\t\t\t\t\t\tcontent: fsState.content,\n\t\t\t\t\t};\n\t\t\t\t\tfsState.state = \"known\";\n\t\t\t\t} else {\n\t\t\t\t\t// ERROR (3), ERROR (4), ERROR (5)\n\t\t\t\t\t// The file does not exist in lix but its state differs from unknown?\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\"Illeagal lix<->fs sync state. The file [\" +\n\t\t\t\t\t\t\tpath +\n\t\t\t\t\t\t\t\"] that was \" +\n\t\t\t\t\t\t\tfsState.state +\n\t\t\t\t\t\t\t\" on disc did not exit in lix\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst lixState = statesToSync.lixFileStates[path];\n\t\t\t\tif (fsState.state === \"unknown\") {\n\t\t\t\t\tif (lixState.state === \"unknown\") {\n\t\t\t\t\t\tif (arrayBuffersEqual(lixState.content, fsState.content)) {\n\t\t\t\t\t\t\tlixState.state = \"known\";\n\t\t\t\t\t\t\tfsState.state = \"known\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tawait upsertFileInLix(args, path, fsState.content);\n\t\t\t\t\t\t\tlixState.content = fsState.content;\n\t\t\t\t\t\t\tlixState.state = \"known\";\n\t\t\t\t\t\t\tfsState.state = \"known\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// ERROR 12, 17, 22\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\"Illeagal lix<->fs sync state. The file [\" +\n\t\t\t\t\t\t\t\tpath +\n\t\t\t\t\t\t\t\t\"] that was \" +\n\t\t\t\t\t\t\t\tfsState.state +\n\t\t\t\t\t\t\t\t\" but did exist in lix already\"\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else if (fsState.state === \"known\") {\n\t\t\t\t\tif (lixState.state === \"known\") {\n\t\t\t\t\t\t// NO OP - NOTHING(13)\n\t\t\t\t\t} else if (lixState.state === \"updated\") {\n\t\t\t\t\t\t// USE LIX (18)\n\t\t\t\t\t\targs.fs.writeFileSync(\n\t\t\t\t\t\t\t// TODO check platform dependent folder separator\n\t\t\t\t\t\t\targs.path + path,\n\t\t\t\t\t\t\tBuffer.from(lixState.content)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tfsState.content = lixState.content;\n\t\t\t\t\t\tfsState.state = \"known\";\n\t\t\t\t\t\tlixState.state = \"known\";\n\t\t\t\t\t} else if (lixState.state === \"gone\") {\n\t\t\t\t\t\t// DELETE FS (23)\n\t\t\t\t\t\targs.fs.unlinkSync(args.path + path);\n\t\t\t\t\t\tfsState.state = \"gone\";\n\t\t\t\t\t\tlixState.state = \"gone\";\n\t\t\t\t\t}\n\t\t\t\t} else if (fsState.state === \"updated\") {\n\t\t\t\t\tif (lixState.state === \"unknown\") {\n\t\t\t\t\t\t// TODO A file was added to lix while a known file from fs was updated?\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\"Illeagal lix<->fs sync state. The file [\" +\n\t\t\t\t\t\t\t\tpath +\n\t\t\t\t\t\t\t\t\"] that was \" +\n\t\t\t\t\t\t\t\tfsState.state +\n\t\t\t\t\t\t\t\t\" but it was not known by lix yet?\"\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if (lixState.state === \"known\") {\n\t\t\t\t\t\tawait upsertFileInLix(args, path, fsState.content);\n\t\t\t\t\t\tlixState.content = fsState.content;\n\n\t\t\t\t\t\tfsState.state = \"known\";\n\t\t\t\t\t} else if (lixState.state === \"updated\") {\n\t\t\t\t\t\t// seems like we saw an update on the file in fs while some changes on lix have not been reached fs? FS -> Winns?\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\"seems like we saw an update on the file \" +\n\t\t\t\t\t\t\t\tpath +\n\t\t\t\t\t\t\t\t\" in fs while some changes on lix have not been reached fs? FS -> Winns?\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait upsertFileInLix(args, path, fsState.content);\n\t\t\t\t\t\tlixState.content = fsState.content;\n\t\t\t\t\t\tlixState.state = \"known\";\n\t\t\t\t\t\tfsState.state = \"known\";\n\t\t\t\t\t} else if (lixState.state === \"gone\") {\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\"seems like we saw an delete in lix while some changes on fs have not been reached fs? FS -> Winns?\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\t// TODO update the lix state\n\t\t\t\t\t\tlixState.content = fsState.content;\n\t\t\t\t\t\tlixState.state = \"known\";\n\t\t\t\t\t\tfsState.state = \"known\";\n\t\t\t\t\t}\n\t\t\t\t} else if (fsState.state === \"gone\") {\n\t\t\t\t\tif (lixState.state === \"unknown\") {\n\t\t\t\t\t\t// TODO A file was added to lix while a known file from fs was removed?\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\"Illeagal lix<->fs sync state. The file [\" +\n\t\t\t\t\t\t\t\tpath +\n\t\t\t\t\t\t\t\t\"] that was \" +\n\t\t\t\t\t\t\t\tfsState.state +\n\t\t\t\t\t\t\t\t\" but it was not known by lix yet?\"\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if (lixState.state === \"known\") {\n\t\t\t\t\t\t// file is in known state with lix - means we have only changes on the fs - easy\n\t\t\t\t\t\tawait args.lix.db\n\t\t\t\t\t\t\t.deleteFrom(\"file\")\n\t\t\t\t\t\t\t.where(\"path\", \"=\", path)\n\t\t\t\t\t\t\t.execute();\n\t\t\t\t\t\t// NOTE: states where both are gone will get removed in the lix state loop\n\t\t\t\t\t\tlixState.state = \"gone\";\n\t\t\t\t\t} else if (lixState.state === \"updated\") {\n\t\t\t\t\t\t// seems like we saw an update on the file in fs while some changes on lix have not been reached fs? FS -> Winns?\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\"seems like we saw an update on the file in fs while some changes on lix have not been reached fs? FS -> Winns?\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait args.lix.db\n\t\t\t\t\t\t\t.deleteFrom(\"file\")\n\t\t\t\t\t\t\t.where(\"path\", \"=\", path)\n\t\t\t\t\t\t\t.execute();\n\t\t\t\t\t\t// NOTE: states where both are gone will get removed in the lix state loop\n\t\t\t\t\t\tlixState.state = \"gone\";\n\t\t\t\t\t\tfsState.state = \"gone\";\n\t\t\t\t\t} else if (lixState.state === \"gone\") {\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\"seems like we saw an delete in lix while we have a delete in lix simultaniously?\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\tlixState.state = \"gone\";\n\t\t\t\t\t\tfsState.state = \"gone\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (const [path, lixState] of Object.entries(statesToSync.lixFileStates)) {\n\t\t\t// no state for file in fs\n\t\t\tif (!statesToSync.fsFileStates[path]) {\n\t\t\t\tif (lixState.state == \"unknown\") {\n\t\t\t\t\t// ADD TO FS (6)\n\t\t\t\t\targs.fs.writeFileSync(\n\t\t\t\t\t\t// TODO check platform dependent folder separator\n\t\t\t\t\t\targs.path + path,\n\t\t\t\t\t\tBuffer.from(lixState.content)\n\t\t\t\t\t);\n\t\t\t\t\tstatesToSync.fsFileStates[path] = {\n\t\t\t\t\t\tstate: \"known\",\n\t\t\t\t\t\tcontent: lixState.content,\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\t// ERROR (11) 16 21\n\t\t\t\t\t// The file does not exist on fs but its state differs from unknown?\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\"Illeagal lix<->fs sync state. The file [\" +\n\t\t\t\t\t\t\tpath +\n\t\t\t\t\t\t\t\"] that was in the state\" +\n\t\t\t\t\t\t\tlixState.state +\n\t\t\t\t\t\t\t\" for lix did not exist on disk\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tlixState.state === \"gone\" &&\n\t\t\t\t\tstatesToSync.fsFileStates[path].state === \"gone\"\n\t\t\t\t) {\n\t\t\t\t\tdelete statesToSync.lixFileStates[path];\n\t\t\t\t\tdelete statesToSync.fsFileStates[path];\n\t\t\t\t} else if (lixState.state !== statesToSync.fsFileStates[path].state) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\"At this stage both states should be in sync lix state \" +\n\t\t\t\t\t\t\tlixState.state +\n\t\t\t\t\t\t\t\" fs state \" +\n\t\t\t\t\t\t\tstatesToSync.fsFileStates[path].state\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tasync function syncFiles(\n\t\tdirPath: string,\n\t\tfileStates: {\n\t\t\tlixFileStates: FsFileState;\n\t\t\tfsFileStates: FsFileState;\n\t\t},\n\t\tinterval?: number\n\t) {\n\t\t// mark all states as removed - checkFsStateRecursive will update those that exist on the disc correspondingly\n\t\tfor (const fsState of Object.values(fileStates.fsFileStates)) {\n\t\t\tfsState.state = \"gone\";\n\t\t}\n\n\t\t// mark all states as removed - checkFsStateRecursive will update those that exist on the disc correspondingly\n\t\tfor (const lixState of Object.values(fileStates.lixFileStates)) {\n\t\t\tlixState.state = \"gone\";\n\t\t}\n\n\t\t// read states from disc - detect changes\n\t\tawait checkFsStateRecursive(dirPath, fileStates.fsFileStates);\n\n\t\t// read states form lix - detect changes\n\t\tawait checkLixState(fileStates.lixFileStates);\n\n\t\t// sync fs<->lix\n\t\tawait syncUpFsAndLixFiles(fileStates);\n\n\t\tif (interval) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tsyncFiles(dirPath, fileStates, interval);\n\t\t\t}, interval);\n\t\t}\n\n\t\treturn;\n\t}\n\n\t// Initial copy of all files\n\tawait syncFiles(\n\t\targs.path,\n\t\t{ fsFileStates: {}, lixFileStates: {} },\n\t\targs.syncInterval\n\t);\n\n\treturn;\n}\n\nasync function upsertFileInLix(\n\targs: { fs: typeof fs; path: string; lix: Lix },\n\tpath: string,\n\tdata: ArrayBuffer\n) {\n\t// file is in known state with lix - means we have only changes on the fs - easy\n\t// NOTE we use file_internal for now see: https://linear.app/opral/issue/LIXDK-102/re-visit-simplifying-the-change-queue-implementation#comment-65eb3485\n\t// This means we don't see changes for the file we update via this method!\n\tawait args.lix.db\n\t\t.insertInto(\"file\") // change queue\n\t\t.values({\n\t\t\tpath: path,\n\t\t\tdata: new Uint8Array(data),\n\t\t})\n\t\t.onConflict((oc) =>\n\t\t\toc.column(\"path\").doUpdateSet({ data: new Uint8Array(data) })\n\t\t)\n\t\t.execute();\n}\n\n// TODO i guess we should move this validation logic into sdk2/src/project/loadProject.ts\nfunction categorizePlugins(plugins: readonly InlangPlugin[]): {\n\tloadMessagesPlugins: (InlangPlugin &\n\t\tRequired<Pick<InlangPlugin, \"loadMessages\">>)[];\n\tsaveMessagesPlugins: (InlangPlugin &\n\t\tRequired<Pick<InlangPlugin, \"saveMessages\">>)[];\n\timportPlugins: (InlangPlugin &\n\t\tRequired<Pick<InlangPlugin, \"importFiles\" | \"toBeImportedFiles\">>)[];\n\texportPlugins: (InlangPlugin & Required<Pick<InlangPlugin, \"exportFiles\">>)[];\n} {\n\tconst loadMessagesPlugins = plugins.filter(\n\t\t(\n\t\t\tplugin\n\t\t): plugin is InlangPlugin & Required<Pick<InlangPlugin, \"loadMessages\">> =>\n\t\t\tplugin.loadMessages !== undefined\n\t);\n\n\tconst saveMessagesPlugins = plugins.filter(\n\t\t(\n\t\t\tplugin\n\t\t): plugin is InlangPlugin & Required<Pick<InlangPlugin, \"saveMessages\">> =>\n\t\t\tplugin.saveMessages !== undefined\n\t);\n\n\tconst importPlugins = plugins.filter(\n\t\t(\n\t\t\tplugin\n\t\t): plugin is InlangPlugin &\n\t\t\tRequired<Pick<InlangPlugin, \"importFiles\" | \"toBeImportedFiles\">> =>\n\t\t\tplugin.importFiles !== undefined && plugin.toBeImportedFiles !== undefined\n\t);\n\n\tconst exportPlugins = plugins.filter(\n\t\t(\n\t\t\tplugin\n\t\t): plugin is InlangPlugin & Required<Pick<InlangPlugin, \"exportFiles\">> =>\n\t\t\tplugin.exportFiles !== undefined\n\t);\n\n\treturn {\n\t\tloadMessagesPlugins,\n\t\tsaveMessagesPlugins,\n\t\timportPlugins,\n\t\texportPlugins,\n\t};\n}\n\n/**\n * Imports local plugins for backwards compatibility.\n *\n * https://github.com/opral/inlang-sdk/issues/171\n */\nasync function importLocalPlugins(args: {\n\tfs: typeof fs;\n\tpath: string;\n\tpreprocessPluginBeforeImport?: PreprocessPluginBeforeImportFunction;\n}) {\n\tconst errors: Error[] = [];\n\tconst locallyImportedPlugins = [];\n\tconst settingsPath = nodePath.join(args.path, \"settings.json\");\n\tconst settings = JSON.parse(\n\t\tawait args.fs.promises.readFile(settingsPath, \"utf8\")\n\t) as ProjectSettings;\n\tfor (const module of settings.modules ?? []) {\n\t\tconst modulePath = absolutePathFromProject(args.path, module);\n\t\ttry {\n\t\t\tlet moduleAsText = await args.fs.promises.readFile(modulePath, \"utf8\");\n\t\t\tif (moduleAsText.includes(\"messageLintRule\")) {\n\t\t\t\terrors.push(new WarningDeprecatedLintRule(module));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (args.preprocessPluginBeforeImport) {\n\t\t\t\tmoduleAsText = await args.preprocessPluginBeforeImport(moduleAsText);\n\t\t\t}\n\t\t\tconst moduleWithMimeType =\n\t\t\t\t\"data:application/javascript,\" + encodeURIComponent(moduleAsText);\n\t\t\tconst { default: plugin } = await import(\n\t\t\t\t/* @vite-ignore */ moduleWithMimeType\n\t\t\t);\n\t\t\tlocallyImportedPlugins.push(plugin);\n\t\t} catch (e) {\n\t\t\terrors.push(new PluginImportError({ plugin: module, cause: e as Error }));\n\t\t\tcontinue;\n\t\t}\n\t}\n\treturn {\n\t\terrors,\n\t\tlocallyImportedPlugins,\n\t};\n}\n\nfunction withLocallyImportedPluginWarning(errors: readonly Error[]) {\n\treturn errors.map((error) => {\n\t\tif (\n\t\t\terror instanceof PluginImportError &&\n\t\t\terror.plugin.startsWith(\"http\") === false\n\t\t) {\n\t\t\treturn new WarningLocalPluginImport(error.plugin);\n\t\t}\n\t\treturn error;\n\t});\n}\n\nexport class WarningLocalPluginImport extends Error {\n\tconstructor(module: string) {\n\t\tsuper(\n\t\t\t`Plugin ${module} is imported from a local path. This will work fine in dev tools like Sherlock or Paraglide JS but is not portable. Web apps like Fink or Parrot won't be able to import this plugin. It is recommended to use an http url to import plugins. The plugins are cached locally and will be available offline.`\n\t\t);\n\t\tthis.name = \"WarningLocalImport\";\n\t}\n}\n\nexport class WarningDeprecatedLintRule extends Error {\n\tconstructor(module: string) {\n\t\tsuper(\n\t\t\t`The lint rule ${module} is deprecated. Please remove the lint rule from the settings. Lint rules are interim built into apps and will be succeeded by more generilizable lix validation rules.`\n\t\t);\n\t\tthis.name = \"WarningDeprecatedLintRule\";\n\t}\n}\n\n/**\n * Resolving absolute paths for fs functions.\n *\n * This mapping is required for backwards compatibility.\n * Relative paths in the project.inlang/settings.json\n * file are resolved to absolute paths with `*.inlang`\n * being pruned.\n *\n * @example\n * \"/website/project.inlang\"\n * \"./local-plugins/mock-plugin.js\"\n * -> \"/website/local-plugins/mock-plugin.js\"\n *\n */\nexport function withAbsolutePaths(\n\tfs: NodeFsPromisesSubsetLegacy,\n\tprojectPath: string\n): NodeFsPromisesSubsetLegacy {\n\treturn {\n\t\t// @ts-expect-error - node type mismatch\n\t\treadFile: (path, options) => {\n\t\t\treturn fs.readFile(absolutePathFromProject(projectPath, path), options);\n\t\t},\n\t\twriteFile: (path, data) => {\n\t\t\treturn fs.writeFile(absolutePathFromProject(projectPath, path), data);\n\t\t},\n\t\tmkdir: (path) => {\n\t\t\treturn fs.mkdir(absolutePathFromProject(projectPath, path));\n\t\t},\n\t\treaddir: (path) => {\n\t\t\treturn fs.readdir(absolutePathFromProject(projectPath, path));\n\t\t},\n\t};\n}\n\n/**\n * Joins a path from a project path.\n *\n * @example\n * joinPathFromProject(\"/project.inlang\", \"./local-plugins/mock-plugin.js\") -> \"/local-plugins/mock-plugin.js\"\n *\n * joinPathFromProject(\"/website/project.inlang\", \"./mock-plugin.js\") -> \"/website/mock-plugin.js\"\n */\nexport function absolutePathFromProject(projectPath: string, path: string) {\n\t// need to remove the project path from the module path for legacy reasons\n\t// \"/project.inlang/local-plugins/mock-plugin.js\" -> \"/local-plugins/mock-plugin.js\"\n\tconst pathWithoutProject = projectPath\n\t\t.split(nodePath.sep)\n\t\t.slice(0, -1)\n\t\t.join(nodePath.sep);\n\n\tconst resolvedPath = nodePath.resolve(pathWithoutProject, path);\n\n\treturn resolvedPath;\n}\n\nexport class ResourceFileImportError extends Error {\n\tpath: string;\n\n\tconstructor(args: { cause: Error; path: string }) {\n\t\tsuper(\"Could not import a resource file\");\n\t\tthis.name = \"ResourceFileImportError\";\n\t\tthis.cause = args.cause;\n\t\tthis.path = args.path;\n\t}\n}\n"],"names":[],"mappings":";;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G,IAAI,CAAC,IAAI,CAAC;IACvB,CAAC;CACD","debug_id":"06ed56aa-293b-5bcc-8b06-9611e0c16b04"}
|
|
1
|
+
{"version":3,"file":"loadProjectFromDirectory.js","sources":["project/loadProjectFromDirectory.ts"],"sourceRoot":"/","sourcesContent":["import { newProject } from \"./newProject.js\";\nimport { loadProjectInMemory } from \"./loadProjectInMemory.js\";\nimport { type Lix } from \"@lix-js/sdk\";\n\nimport fs from \"node:fs\";\n\nimport nodePath from \"node:path\";\nimport type {\n\tInlangPlugin,\n\tNodeFsPromisesSubsetLegacy,\n} from \"../plugin/schema.js\";\nimport { fromMessageV1 } from \"../json-schema/old-v1-message/fromMessageV1.js\";\nimport type { ProjectSettings } from \"../json-schema/settings.js\";\nimport type { PreprocessPluginBeforeImportFunction } from \"../plugin/importPlugins.js\";\nimport { PluginImportError } from \"../plugin/errors.js\";\nimport { upsertBundleNestedMatchByProperties } from \"../import-export/upsertBundleNestedMatchByProperties.js\";\n\n/**\n * Loads a project from a directory.\n *\n * Main use case are dev tools that want to load a project from a directory\n * that is stored in git.\n */\nexport async function loadProjectFromDirectory(\n\targs: { path: string; fs: typeof fs; syncInterval?: number } & Omit<\n\t\tParameters<typeof loadProjectInMemory>[0],\n\t\t\"blob\"\n\t>\n) {\n\tconst settingsPath = nodePath.join(args.path, \"settings.json\");\n\tconst settings = JSON.parse(\n\t\tawait args.fs.promises.readFile(settingsPath, \"utf8\")\n\t) as ProjectSettings;\n\n\tconst localImport = await importLocalPlugins({\n\t\tfs: args.fs,\n\t\tsettings,\n\t\tpath: args.path,\n\t});\n\n\tconst providePluginsWithLocalPlugins = [\n\t\t...(args.providePlugins ?? []),\n\t\t...localImport.locallyImportedPlugins,\n\t];\n\n\t// TODO call tempProject.lix.settled() to wait for the new settings file, and remove reload of the proejct as soon as reactive settings has landed\n\t// NOTE: we need to ensure two things:\n\t// 1. settled needs to include the changes from the copyFiles call\n\t// 2. the changes created from the copyFiles call need to be realized and lead to a signal on the settings\n\tconst project = await loadProjectInMemory({\n\t\t...args,\n\t\tprovidePlugins: providePluginsWithLocalPlugins,\n\t\tblob: await newProject({\n\t\t\tsettings,\n\t\t}),\n\t});\n\n\tawait syncLixFsFiles({\n\t\tfs: args.fs,\n\t\tpath: args.path,\n\t\tlix: project.lix,\n\t\tsyncInterval: args.syncInterval,\n\t});\n\n\tconst {\n\t\tloadMessagesPlugins,\n\t\tsaveMessagesPlugins,\n\t\timportPlugins,\n\t\texportPlugins,\n\t} = categorizePlugins(await project.plugins.get());\n\n\t// TODO i guess we should move this validation logic into sdk2/src/project/loadProject.ts\n\t// Two scenarios could arise:\n\t// 1. set settings is called from an app - it should detect and reject the setting of settings -> app need to be able to validate before calling set\n\t// 2. the settings file loaded from disc here is corrupted -> user has to fix the file on disc\n\tif (loadMessagesPlugins.length > 1 || saveMessagesPlugins.length > 1) {\n\t\tthrow new Error(\n\t\t\t\"Max one loadMessages (found: \" +\n\t\t\t\tloadMessagesPlugins.length +\n\t\t\t\t\") and one saveMessages plugins (found: \" +\n\t\t\t\tsaveMessagesPlugins.length +\n\t\t\t\t\") are allowed \"\n\t\t);\n\t}\n\tconst importedResourceFileErrors: Error[] = [];\n\n\tif (\n\t\t(loadMessagesPlugins.length > 0 || saveMessagesPlugins.length > 0) &&\n\t\t(exportPlugins.length > 0 || importPlugins.length > 0)\n\t) {\n\t\tthrow new Error(\n\t\t\t\"Plugins for loadMessages (found: \" +\n\t\t\t\tloadMessagesPlugins.length +\n\t\t\t\t\") and saveMessages plugins (found: \" +\n\t\t\t\tsaveMessagesPlugins.length +\n\t\t\t\t\") must not coexist with import (found: \" +\n\t\t\t\timportPlugins.length +\n\t\t\t\t\") or export (found: \" +\n\t\t\t\texportPlugins.length +\n\t\t\t\t\") \"\n\t\t);\n\t} else if (loadMessagesPlugins.length > 1 || saveMessagesPlugins.length > 1) {\n\t\tthrow new Error(\n\t\t\t\"Max one loadMessages (found: \" +\n\t\t\t\tloadMessagesPlugins.length +\n\t\t\t\t\") and one saveMessages plugins (found: \" +\n\t\t\t\tsaveMessagesPlugins.length +\n\t\t\t\t\") are allowed \"\n\t\t);\n\t} else if (importPlugins[0]) {\n\t\tconst importer = importPlugins[0];\n\t\tconst files = [];\n\n\t\tif (importer.toBeImportedFiles) {\n\t\t\tconst toBeImportedFiles = await importer.toBeImportedFiles({\n\t\t\t\tsettings: await project.settings.get(),\n\t\t\t});\n\t\t\tfor (const toBeImported of toBeImportedFiles) {\n\t\t\t\tconst absolute = absolutePathFromProject(args.path, toBeImported.path);\n\t\t\t\ttry {\n\t\t\t\t\tconst data = await args.fs.promises.readFile(absolute);\n\t\t\t\t\tconst name = nodePath.basename(toBeImported.path);\n\t\t\t\t\tfiles.push({\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tlocale: toBeImported.locale,\n\t\t\t\t\t\tcontent: data,\n\t\t\t\t\t\tpluginKey: importer.key,\n\t\t\t\t\t\ttoBeImportedFilesMetadata: toBeImported.metadata,\n\t\t\t\t\t});\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// https://github.com/opral/inlang-sdk/issues/202\n\t\t\t\t\tif ((e as any)?.code === \"ENOENT\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\timportedResourceFileErrors.push(\n\t\t\t\t\t\tnew ResourceFileImportError({\n\t\t\t\t\t\t\tcause: e as Error,\n\t\t\t\t\t\t\tpath: toBeImported.path,\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tawait project.importFiles({\n\t\t\tpluginKey: importer.key,\n\t\t\tfiles: files as any,\n\t\t});\n\t} else if (loadMessagesPlugins[0] !== undefined) {\n\t\t// TODO create resource files from loadMessageFn call - to poll?\n\t\tawait loadLegacyMessages({\n\t\t\tproject,\n\t\t\tprojectPath: args.path,\n\t\t\tfs: args.fs,\n\t\t\tpluginKey: loadMessagesPlugins[0].key ?? loadMessagesPlugins[0].id,\n\t\t\tloadMessagesFn: loadMessagesPlugins[0].loadMessages,\n\t\t});\n\t}\n\n\treturn {\n\t\t...project,\n\t\terrors: {\n\t\t\tget: async () => {\n\t\t\t\treturn [...localImport.errors, ...importedResourceFileErrors];\n\t\t\t},\n\t\t\t// subscribe: (\n\t\t\t// \tcallback: Parameters<InlangProject[\"errors\"][\"subscribe\"]>[0]\n\t\t\t// ) => {\n\t\t\t// \treturn project.errors.subscribe((value) => {\n\t\t\t// \t\tcallback([\n\t\t\t// \t\t\t...withLocallyImportedPluginWarning(value),\n\t\t\t// \t\t\t...localImport.errors,\n\t\t\t// \t\t\t...importedResourceFileErrors,\n\t\t\t// \t\t]);\n\t\t\t// \t});\n\t\t\t// },\n\t\t},\n\t};\n}\n\nasync function loadLegacyMessages(args: {\n\tproject: Awaited<ReturnType<typeof loadProjectInMemory>>;\n\tpluginKey: NonNullable<InlangPlugin[\"key\"] | InlangPlugin[\"id\"]>;\n\tloadMessagesFn: Required<InlangPlugin>[\"loadMessages\"];\n\tprojectPath: string;\n\tfs: typeof fs;\n}) {\n\tconst loadedLegacyMessages = await args.loadMessagesFn({\n\t\tsettings: await args.project.settings.get(),\n\t\t// @ts-expect-error - type mismatch\n\t\tnodeishFs: withAbsolutePaths(args.fs.promises, args.projectPath),\n\t});\n\tconst upsertQueries = [];\n\n\tfor (const legacyMessage of loadedLegacyMessages) {\n\t\tconst messageBundle = fromMessageV1(legacyMessage);\n\n\t\tupsertQueries.push(\n\t\t\tupsertBundleNestedMatchByProperties(args.project.db, messageBundle)\n\t\t);\n\t}\n\n\treturn await Promise.all(upsertQueries);\n}\n\ntype FsFileState = Record<\n\tstring,\n\t{\n\t\t/*mtime: number, hash: string, */ content: ArrayBuffer;\n\t\tstate: \"known\" | \"unknown\" | \"updated\" | \"gone\";\n\t}\n>;\n\nfunction arrayBuffersEqual(a: ArrayBuffer, b: ArrayBuffer) {\n\tif (a.byteLength !== b.byteLength) return false;\n\n\t// Create views for byte-by-byte comparison\n\tconst view1 = new Uint8Array(a);\n\tconst view2 = new Uint8Array(b);\n\n\t// Compare each byte\n\tfor (const [i, element] of view1.entries()) {\n\t\tif (element !== view2[i]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Watches a directory and copies files into lix, keeping them in sync.\n */\nasync function syncLixFsFiles(args: {\n\tfs: typeof fs;\n\tpath: string;\n\tlix: Lix;\n\tsyncInterval?: number;\n}) {\n\t// NOTE this function is async - while it runs 100% sync in the naiv implementation - we may want to change to an async version to optimize\n\tasync function checkFsStateRecursive(\n\t\tdirPath: string,\n\t\tcurrentState: FsFileState\n\t) {\n\t\tconst entries = args.fs.readdirSync(dirPath, { withFileTypes: true });\n\n\t\tfor (const entry of entries) {\n\t\t\tconst fullPath = nodePath.join(dirPath, entry.name);\n\t\t\tif (entry.isDirectory()) {\n\t\t\t\tcheckFsStateRecursive(fullPath, currentState);\n\t\t\t} else {\n\t\t\t\t// NOTE we could start with comparing the mdate and skip file read completely...\n\t\t\t\tconst data = args.fs.readFileSync(fullPath) as unknown as ArrayBuffer;\n\n\t\t\t\tconst relativePath = \"/\" + nodePath.relative(args.path, fullPath);\n\n\t\t\t\tif (!currentState[relativePath]) {\n\t\t\t\t\tcurrentState[relativePath] = {\n\t\t\t\t\t\tcontent: data,\n\t\t\t\t\t\tstate: \"unknown\",\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tif (arrayBuffersEqual(currentState[relativePath].content, data)) {\n\t\t\t\t\t\tcurrentState[relativePath].state = \"known\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentState[relativePath].state = \"updated\";\n\t\t\t\t\t\tcurrentState[relativePath].content = data;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tasync function checkLixState(currentLixState: FsFileState) {\n\t\t// go through all files in lix and check there state\n\t\tconst filesInLix = await args.lix.db\n\t\t\t.selectFrom(\"file\")\n\t\t\t.where(\"path\", \"not like\", \"%db.sqlite\")\n\t\t\t.selectAll()\n\t\t\t.execute();\n\n\t\tfor (const fileInLix of filesInLix) {\n\t\t\tconst currentStateOfFileInLix = currentLixState[fileInLix.path];\n\t\t\t// NOTE we could start with comparing the mdate and skip file read completely...\n\t\t\tif (!currentStateOfFileInLix) {\n\t\t\t\tcurrentLixState[fileInLix.path] = {\n\t\t\t\t\tcontent: new Uint8Array(fileInLix.data).buffer,\n\t\t\t\t\tstate: \"unknown\",\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tarrayBuffersEqual(\n\t\t\t\t\t\tcurrentStateOfFileInLix.content,\n\t\t\t\t\t\tfileInLix.data.buffer as ArrayBuffer\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tcurrentStateOfFileInLix.state = \"known\";\n\t\t\t\t} else {\n\t\t\t\t\tcurrentStateOfFileInLix.state = \"updated\";\n\t\t\t\t\tcurrentStateOfFileInLix.content = fileInLix.data\n\t\t\t\t\t\t.buffer as ArrayBuffer;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tasync function syncUpFsAndLixFiles(statesToSync: {\n\t\tfsFileStates: FsFileState;\n\t\tlixFileStates: FsFileState;\n\t}) {\n\t\t// for (const file of Object.keys(statesToSync.fsFileStates)) {\n\t\t// \tif (file.includes(\"gitignore\"))\n\t\t// \t\tconsole.log(\n\t\t// \t\t\t\"fsFileStates : \" +\n\t\t// \t\t\t\tfile +\n\t\t// \t\t\t\t\" fs \" +\n\t\t// \t\t\t\tstatesToSync.fsFileStates[file]?.state +\n\t\t// \t\t\t\t\" lix \" +\n\t\t// \t\t\t\tstatesToSync.lixFileStates[file]?.state\n\t\t// \t\t);\n\t\t// }\n\n\t\t// Sync cases:\n\t\t// fs - no state for file | fs - unkonwn | fs - known | fs - updated | fs - gone\n\t\t// lix - no state for file \tNOTHING\t(1)\t | ADD TO LIX(2) | ERROR (3) | ERROR (4) | ERROR (5)\n\t\t// lix - unknown\t\t\t\t\tADD TO FS (6) | USE FS VER.(7) | ERROR (8) | CASE (9) | CASE (10)\n\t\t// lix - known ERROR (11) | ERROR (12) | NOTHING(13) | ERROR (14) | ERROR (15)\n\t\t// lix - updated\t\t\t\t\tERROR (16) | ERROR (17) | USE LIX (18) | CASE (19) | CASE (20)\n\t\t// lix - gone \t\t\t\t\t\tERROR (21) | ERROR (22) | DELETE FS (23)| CASE (24) | CASE (25)\n\n\t\t// TODO check export import from saveFileToDirectory\n\n\t\tfor (const [path, fsState] of Object.entries(statesToSync.fsFileStates)) {\n\t\t\t// no state for file in LIX\n\t\t\tif (!statesToSync.lixFileStates[path]) {\n\t\t\t\tif (fsState.state === \"unknown\") {\n\t\t\t\t\t// ADD TO LIX(2)\n\t\t\t\t\tawait upsertFileInLix(args, path, fsState.content);\n\t\t\t\t\tstatesToSync.lixFileStates[path] = {\n\t\t\t\t\t\tstate: \"known\",\n\t\t\t\t\t\tcontent: fsState.content,\n\t\t\t\t\t};\n\t\t\t\t\tfsState.state = \"known\";\n\t\t\t\t} else {\n\t\t\t\t\t// ERROR (3), ERROR (4), ERROR (5)\n\t\t\t\t\t// The file does not exist in lix but its state differs from unknown?\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\"Illeagal lix<->fs sync state. The file [\" +\n\t\t\t\t\t\t\tpath +\n\t\t\t\t\t\t\t\"] that was \" +\n\t\t\t\t\t\t\tfsState.state +\n\t\t\t\t\t\t\t\" on disc did not exit in lix\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst lixState = statesToSync.lixFileStates[path];\n\t\t\t\tif (fsState.state === \"unknown\") {\n\t\t\t\t\tif (lixState.state === \"unknown\") {\n\t\t\t\t\t\tif (arrayBuffersEqual(lixState.content, fsState.content)) {\n\t\t\t\t\t\t\tlixState.state = \"known\";\n\t\t\t\t\t\t\tfsState.state = \"known\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tawait upsertFileInLix(args, path, fsState.content);\n\t\t\t\t\t\t\tlixState.content = fsState.content;\n\t\t\t\t\t\t\tlixState.state = \"known\";\n\t\t\t\t\t\t\tfsState.state = \"known\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// ERROR 12, 17, 22\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\"Illeagal lix<->fs sync state. The file [\" +\n\t\t\t\t\t\t\t\tpath +\n\t\t\t\t\t\t\t\t\"] that was \" +\n\t\t\t\t\t\t\t\tfsState.state +\n\t\t\t\t\t\t\t\t\" but did exist in lix already\"\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else if (fsState.state === \"known\") {\n\t\t\t\t\tif (lixState.state === \"known\") {\n\t\t\t\t\t\t// NO OP - NOTHING(13)\n\t\t\t\t\t} else if (lixState.state === \"updated\") {\n\t\t\t\t\t\t// USE LIX (18)\n\t\t\t\t\t\targs.fs.writeFileSync(\n\t\t\t\t\t\t\t// TODO check platform dependent folder separator\n\t\t\t\t\t\t\targs.path + path,\n\t\t\t\t\t\t\tBuffer.from(lixState.content)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tfsState.content = lixState.content;\n\t\t\t\t\t\tfsState.state = \"known\";\n\t\t\t\t\t\tlixState.state = \"known\";\n\t\t\t\t\t} else if (lixState.state === \"gone\") {\n\t\t\t\t\t\t// DELETE FS (23)\n\t\t\t\t\t\targs.fs.unlinkSync(args.path + path);\n\t\t\t\t\t\tfsState.state = \"gone\";\n\t\t\t\t\t\tlixState.state = \"gone\";\n\t\t\t\t\t}\n\t\t\t\t} else if (fsState.state === \"updated\") {\n\t\t\t\t\tif (lixState.state === \"unknown\") {\n\t\t\t\t\t\t// TODO A file was added to lix while a known file from fs was updated?\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\"Illeagal lix<->fs sync state. The file [\" +\n\t\t\t\t\t\t\t\tpath +\n\t\t\t\t\t\t\t\t\"] that was \" +\n\t\t\t\t\t\t\t\tfsState.state +\n\t\t\t\t\t\t\t\t\" but it was not known by lix yet?\"\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if (lixState.state === \"known\") {\n\t\t\t\t\t\tawait upsertFileInLix(args, path, fsState.content);\n\t\t\t\t\t\tlixState.content = fsState.content;\n\n\t\t\t\t\t\tfsState.state = \"known\";\n\t\t\t\t\t} else if (lixState.state === \"updated\") {\n\t\t\t\t\t\t// seems like we saw an update on the file in fs while some changes on lix have not been reached fs? FS -> Winns?\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\"seems like we saw an update on the file \" +\n\t\t\t\t\t\t\t\tpath +\n\t\t\t\t\t\t\t\t\" in fs while some changes on lix have not been reached fs? FS -> Winns?\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait upsertFileInLix(args, path, fsState.content);\n\t\t\t\t\t\tlixState.content = fsState.content;\n\t\t\t\t\t\tlixState.state = \"known\";\n\t\t\t\t\t\tfsState.state = \"known\";\n\t\t\t\t\t} else if (lixState.state === \"gone\") {\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\"seems like we saw an delete in lix while some changes on fs have not been reached fs? FS -> Winns?\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\t// TODO update the lix state\n\t\t\t\t\t\tlixState.content = fsState.content;\n\t\t\t\t\t\tlixState.state = \"known\";\n\t\t\t\t\t\tfsState.state = \"known\";\n\t\t\t\t\t}\n\t\t\t\t} else if (fsState.state === \"gone\") {\n\t\t\t\t\tif (lixState.state === \"unknown\") {\n\t\t\t\t\t\t// TODO A file was added to lix while a known file from fs was removed?\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\"Illeagal lix<->fs sync state. The file [\" +\n\t\t\t\t\t\t\t\tpath +\n\t\t\t\t\t\t\t\t\"] that was \" +\n\t\t\t\t\t\t\t\tfsState.state +\n\t\t\t\t\t\t\t\t\" but it was not known by lix yet?\"\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if (lixState.state === \"known\") {\n\t\t\t\t\t\t// file is in known state with lix - means we have only changes on the fs - easy\n\t\t\t\t\t\tawait args.lix.db\n\t\t\t\t\t\t\t.deleteFrom(\"file\")\n\t\t\t\t\t\t\t.where(\"path\", \"=\", path)\n\t\t\t\t\t\t\t.execute();\n\t\t\t\t\t\t// NOTE: states where both are gone will get removed in the lix state loop\n\t\t\t\t\t\tlixState.state = \"gone\";\n\t\t\t\t\t} else if (lixState.state === \"updated\") {\n\t\t\t\t\t\t// seems like we saw an update on the file in fs while some changes on lix have not been reached fs? FS -> Winns?\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\"seems like we saw an update on the file in fs while some changes on lix have not been reached fs? FS -> Winns?\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait args.lix.db\n\t\t\t\t\t\t\t.deleteFrom(\"file\")\n\t\t\t\t\t\t\t.where(\"path\", \"=\", path)\n\t\t\t\t\t\t\t.execute();\n\t\t\t\t\t\t// NOTE: states where both are gone will get removed in the lix state loop\n\t\t\t\t\t\tlixState.state = \"gone\";\n\t\t\t\t\t\tfsState.state = \"gone\";\n\t\t\t\t\t} else if (lixState.state === \"gone\") {\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\"seems like we saw an delete in lix while we have a delete in lix simultaniously?\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\tlixState.state = \"gone\";\n\t\t\t\t\t\tfsState.state = \"gone\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (const [path, lixState] of Object.entries(statesToSync.lixFileStates)) {\n\t\t\t// no state for file in fs\n\t\t\tif (!statesToSync.fsFileStates[path]) {\n\t\t\t\tif (lixState.state == \"unknown\") {\n\t\t\t\t\t// ADD TO FS (6)\n\t\t\t\t\t// create directory if not exists\n\t\t\t\t\targs.fs.mkdirSync(nodePath.dirname(nodePath.join(args.path, path)), {\n\t\t\t\t\t\trecursive: true,\n\t\t\t\t\t});\n\t\t\t\t\t// write file\n\t\t\t\t\targs.fs.writeFileSync(\n\t\t\t\t\t\tnodePath.join(args.path, path),\n\t\t\t\t\t\tBuffer.from(lixState.content)\n\t\t\t\t\t);\n\t\t\t\t\tstatesToSync.fsFileStates[path] = {\n\t\t\t\t\t\tstate: \"known\",\n\t\t\t\t\t\tcontent: lixState.content,\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\t// ERROR (11) 16 21\n\t\t\t\t\t// The file does not exist on fs but its state differs from unknown?\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\"Illeagal lix<->fs sync state. The file [\" +\n\t\t\t\t\t\t\tpath +\n\t\t\t\t\t\t\t\"] that was in the state\" +\n\t\t\t\t\t\t\tlixState.state +\n\t\t\t\t\t\t\t\" for lix did not exist on disk\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tlixState.state === \"gone\" &&\n\t\t\t\t\tstatesToSync.fsFileStates[path].state === \"gone\"\n\t\t\t\t) {\n\t\t\t\t\tdelete statesToSync.lixFileStates[path];\n\t\t\t\t\tdelete statesToSync.fsFileStates[path];\n\t\t\t\t} else if (lixState.state !== statesToSync.fsFileStates[path].state) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\"At this stage both states should be in sync lix state \" +\n\t\t\t\t\t\t\tlixState.state +\n\t\t\t\t\t\t\t\" fs state \" +\n\t\t\t\t\t\t\tstatesToSync.fsFileStates[path].state\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tasync function syncFiles(\n\t\tdirPath: string,\n\t\tfileStates: {\n\t\t\tlixFileStates: FsFileState;\n\t\t\tfsFileStates: FsFileState;\n\t\t},\n\t\tinterval?: number\n\t) {\n\t\t// mark all states as removed - checkFsStateRecursive will update those that exist on the disc correspondingly\n\t\tfor (const fsState of Object.values(fileStates.fsFileStates)) {\n\t\t\tfsState.state = \"gone\";\n\t\t}\n\n\t\t// mark all states as removed - checkFsStateRecursive will update those that exist on the disc correspondingly\n\t\tfor (const lixState of Object.values(fileStates.lixFileStates)) {\n\t\t\tlixState.state = \"gone\";\n\t\t}\n\n\t\t// read states from disc - detect changes\n\t\tawait checkFsStateRecursive(dirPath, fileStates.fsFileStates);\n\n\t\t// read states form lix - detect changes\n\t\tawait checkLixState(fileStates.lixFileStates);\n\n\t\t// sync fs<->lix\n\t\tawait syncUpFsAndLixFiles(fileStates);\n\n\t\tif (interval) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tsyncFiles(dirPath, fileStates, interval);\n\t\t\t}, interval);\n\t\t}\n\n\t\treturn;\n\t}\n\n\t// Initial copy of all files\n\tawait syncFiles(\n\t\targs.path,\n\t\t{ fsFileStates: {}, lixFileStates: {} },\n\t\targs.syncInterval\n\t);\n\n\treturn;\n}\n\nasync function upsertFileInLix(\n\targs: { fs: typeof fs; path: string; lix: Lix },\n\tpath: string,\n\tdata: ArrayBuffer\n) {\n\t// file is in known state with lix - means we have only changes on the fs - easy\n\t// NOTE we use file_internal for now see: https://linear.app/opral/issue/LIXDK-102/re-visit-simplifying-the-change-queue-implementation#comment-65eb3485\n\t// This means we don't see changes for the file we update via this method!\n\tawait args.lix.db\n\t\t.insertInto(\"file\") // change queue\n\t\t.values({\n\t\t\tpath: path,\n\t\t\tdata: new Uint8Array(data),\n\t\t})\n\t\t.onConflict((oc) =>\n\t\t\toc.column(\"path\").doUpdateSet({ data: new Uint8Array(data) })\n\t\t)\n\t\t.execute();\n}\n\n// TODO i guess we should move this validation logic into sdk2/src/project/loadProject.ts\nfunction categorizePlugins(plugins: readonly InlangPlugin[]): {\n\tloadMessagesPlugins: (InlangPlugin &\n\t\tRequired<Pick<InlangPlugin, \"loadMessages\">>)[];\n\tsaveMessagesPlugins: (InlangPlugin &\n\t\tRequired<Pick<InlangPlugin, \"saveMessages\">>)[];\n\timportPlugins: (InlangPlugin &\n\t\tRequired<Pick<InlangPlugin, \"importFiles\" | \"toBeImportedFiles\">>)[];\n\texportPlugins: (InlangPlugin & Required<Pick<InlangPlugin, \"exportFiles\">>)[];\n} {\n\tconst loadMessagesPlugins = plugins.filter(\n\t\t(\n\t\t\tplugin\n\t\t): plugin is InlangPlugin & Required<Pick<InlangPlugin, \"loadMessages\">> =>\n\t\t\tplugin.loadMessages !== undefined\n\t);\n\n\tconst saveMessagesPlugins = plugins.filter(\n\t\t(\n\t\t\tplugin\n\t\t): plugin is InlangPlugin & Required<Pick<InlangPlugin, \"saveMessages\">> =>\n\t\t\tplugin.saveMessages !== undefined\n\t);\n\n\tconst importPlugins = plugins.filter(\n\t\t(\n\t\t\tplugin\n\t\t): plugin is InlangPlugin &\n\t\t\tRequired<Pick<InlangPlugin, \"importFiles\" | \"toBeImportedFiles\">> =>\n\t\t\tplugin.importFiles !== undefined && plugin.toBeImportedFiles !== undefined\n\t);\n\n\tconst exportPlugins = plugins.filter(\n\t\t(\n\t\t\tplugin\n\t\t): plugin is InlangPlugin & Required<Pick<InlangPlugin, \"exportFiles\">> =>\n\t\t\tplugin.exportFiles !== undefined\n\t);\n\n\treturn {\n\t\tloadMessagesPlugins,\n\t\tsaveMessagesPlugins,\n\t\timportPlugins,\n\t\texportPlugins,\n\t};\n}\n\n/**\n * Imports local plugins for backwards compatibility.\n *\n * https://github.com/opral/inlang-sdk/issues/171\n */\nasync function importLocalPlugins(args: {\n\tfs: typeof fs;\n\tsettings: ProjectSettings;\n\tpath: string;\n\tpreprocessPluginBeforeImport?: PreprocessPluginBeforeImportFunction;\n}) {\n\tconst errors: Error[] = [];\n\tconst locallyImportedPlugins = [];\n\tfor (const module of args.settings.modules ?? []) {\n\t\tif (module.startsWith(\"http\")) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst modulePath = absolutePathFromProject(args.path, module);\n\t\ttry {\n\t\t\tlet moduleAsText = await args.fs.promises.readFile(modulePath, \"utf8\");\n\t\t\tif (moduleAsText.includes(\"messageLintRule\")) {\n\t\t\t\terrors.push(new WarningDeprecatedLintRule(module));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (args.preprocessPluginBeforeImport) {\n\t\t\t\tmoduleAsText = await args.preprocessPluginBeforeImport(moduleAsText);\n\t\t\t}\n\t\t\tconst moduleWithMimeType =\n\t\t\t\t\"data:application/javascript,\" + encodeURIComponent(moduleAsText);\n\t\t\tconst { default: plugin } = await import(\n\t\t\t\t/* @vite-ignore */ moduleWithMimeType\n\t\t\t);\n\t\t\tlocallyImportedPlugins.push(plugin);\n\t\t} catch (e) {\n\t\t\terrors.push(new PluginImportError({ plugin: module, cause: e as Error }));\n\t\t\tcontinue;\n\t\t}\n\t}\n\treturn {\n\t\terrors,\n\t\tlocallyImportedPlugins,\n\t};\n}\n\nexport class WarningDeprecatedLintRule extends Error {\n\tconstructor(module: string) {\n\t\tsuper(\n\t\t\t`The lint rule ${module} is deprecated. Please remove the lint rule from the settings. Lint rules are interim built into apps and will be succeeded by more generilizable lix validation rules.`\n\t\t);\n\t\tthis.name = \"WarningDeprecatedLintRule\";\n\t}\n}\n\n/**\n * Resolving absolute paths for fs functions.\n *\n * This mapping is required for backwards compatibility.\n * Relative paths in the project.inlang/settings.json\n * file are resolved to absolute paths with `*.inlang`\n * being pruned.\n *\n * @example\n * \"/website/project.inlang\"\n * \"./local-plugins/mock-plugin.js\"\n * -> \"/website/local-plugins/mock-plugin.js\"\n *\n */\nexport function withAbsolutePaths(\n\tfs: NodeFsPromisesSubsetLegacy,\n\tprojectPath: string\n): NodeFsPromisesSubsetLegacy {\n\treturn {\n\t\t// @ts-expect-error - node type mismatch\n\t\treadFile: (path, options) => {\n\t\t\treturn fs.readFile(absolutePathFromProject(projectPath, path), options);\n\t\t},\n\t\twriteFile: (path, data) => {\n\t\t\treturn fs.writeFile(absolutePathFromProject(projectPath, path), data);\n\t\t},\n\t\tmkdir: (path) => {\n\t\t\treturn fs.mkdir(absolutePathFromProject(projectPath, path));\n\t\t},\n\t\treaddir: (path) => {\n\t\t\treturn fs.readdir(absolutePathFromProject(projectPath, path));\n\t\t},\n\t};\n}\n\n/**\n * Joins a path from a project path.\n *\n * @example\n * joinPathFromProject(\"/project.inlang\", \"./local-plugins/mock-plugin.js\") -> \"/local-plugins/mock-plugin.js\"\n *\n * joinPathFromProject(\"/website/project.inlang\", \"./mock-plugin.js\") -> \"/website/mock-plugin.js\"\n */\nexport function absolutePathFromProject(projectPath: string, path: string) {\n\t// need to remove the project path from the module path for legacy reasons\n\t// \"/project.inlang/local-plugins/mock-plugin.js\" -> \"/local-plugins/mock-plugin.js\"\n\tconst pathWithoutProject = projectPath\n\t\t.split(nodePath.sep)\n\t\t.slice(0, -1)\n\t\t.join(nodePath.sep);\n\n\tconst resolvedPath = nodePath.resolve(pathWithoutProject, path);\n\n\treturn resolvedPath;\n}\n\nexport class ResourceFileImportError extends Error {\n\tpath: string;\n\n\tconstructor(args: { cause: Error; path: string }) {\n\t\tsuper(\"Could not import a resource file\");\n\t\tthis.name = \"ResourceFileImportError\";\n\t\tthis.cause = args.cause;\n\t\tthis.path = args.path;\n\t}\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAY,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,OAAO,QAAQ,MAAM,WAAW,CAAC;AAKjC,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAG/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,mCAAmC,EAAE,MAAM,yDAAyD,CAAC;AAE9G;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC7C,IAGC;IAED,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IAC/D,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAC1B,MAAM,IAAI,CAAC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