Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8,777 changes: 951 additions & 7,826 deletions javascript-tui/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion javascript-tui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dist"
],
"dependencies": {
"@dittolive/ditto": "4.13.1",
"@dittolive/ditto": "5.0.0-preview.4",
"dotenv": "^16.4.5",
"ink": "^4.1.0",
"meow": "^11.0.0",
Expand Down
4 changes: 2 additions & 2 deletions javascript-tui/source/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ const TodoApp = ({ditto}) => {
}
if (input === 's') {
if (syncEnabled) {
ditto.stopSync();
ditto.sync.stop();
setSyncEnabled(false);
} else {
ditto.startSync();
ditto.sync.start();
setSyncEnabled(true);
}
}
Expand Down
15 changes: 1 addition & 14 deletions javascript-tui/source/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ ditto.updateTransportConfig(config => {
config.connect.websocketURLs = [websocketURL];
});

// disable sync with v3 peers, required for DQL
await ditto.disableSyncWithV3();

// Set up authentication for server mode
if (connectConfig.mode === 'server') {
await ditto.auth.setExpirationHandler(
Expand Down Expand Up @@ -122,17 +119,7 @@ if (connectConfig.mode === 'server') {
}
}

// Disable DQL strict mode
// when set to false, collection definitions are no longer required. SELECT queries will return and display all fields by default.
// https://docs.ditto.live/dql/strict-mode
try {
await ditto.store.execute('ALTER SYSTEM SET DQL_STRICT_MODE = false');
} catch (error) {
console.error('Failed to disable DQL strict mode:', error);
process.exit(1); // Exit the application with a non-zero status code
}

ditto.startSync();
ditto.sync.start();

process.on('uncaughtException', err => {
console.error('Uncaught Exception:', err);
Expand Down
11 changes: 1 addition & 10 deletions javascript-tui/tests/integration_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ async function createDittoInstance() {
config.connect.websocketURLs = [websocketURL];
});

await ditto.disableSyncWithV3();

if (connectConfig.mode === 'server') {
await ditto.auth.setExpirationHandler(
async (dittoInstance, timeUntilExpiration) => {
Expand Down Expand Up @@ -72,14 +70,7 @@ async function createDittoInstance() {
}
}

try {
await ditto.store.execute('ALTER SYSTEM SET DQL_STRICT_MODE = false');
} catch (error) {
console.error('Integration test DQL setup failed:', error);
throw error;
}

ditto.startSync();
ditto.sync.start();
return ditto;
}

Expand Down
2 changes: 1 addition & 1 deletion javascript-web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ DITTO_WEBSOCKET_URL=""
Next, run the quickstart app with the following command:

```
npm && npm run dev
npm install && npm run dev
```
Loading