diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2658d7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/AI_prompt.txt b/AI_prompt.txt index 90815a5..73d40fc 100644 --- a/AI_prompt.txt +++ b/AI_prompt.txt @@ -18,12 +18,9 @@ Create a walkthrough for Julia service-A service sending a mix-content chat mess - I updated the following: - NATSBridge.jl. Essentially I add NATS_connection keyword and new publish_message function to support the keyword. - Use them and ONLY them as ground truth. - Then update the following files accordingly: - architecture.md - implementation.md @@ -39,11 +36,8 @@ All API should be semantically consistent and naming should be consistent across Task: Update NATSBridge.js to reflect recent changes in NATSBridge.jl and docs - Context: NATSBridge.jl and docs has been updated. - Requirements: - Source of Truth: Treat the updated NATSBridge.jl and docs as the definitive source. API Consistency: Ensure the Main Package API (e.g., smartsend(), publish_message()) uses consistent naming across all three supported languages. Ecosystem Variance: Low-level native functions (e.g., NATS.connect(), JSON.read()) should follow the conventions of the specific language ecosystem and do not require cross-language consistency. @@ -63,3 +57,15 @@ Now, help me do the following: + +Help me expands this Julia package (NATSBridge) into a cross-platform project by adding a JavaScript and Python/MicroPython implementation. To ensure accuracy, NATSBridge.jl will serve as the ground truth, as the documentation may be outdated. + +My goal is to maintain interface parity at the high-level API for a consistent user experience, while ensuring the low-level implementation adheres strictly to the idiomatic conventions of each respective language (e.g., multiple dispatch in Julia vs. asynchronous, prototype, or class-based patterns in JS and Python/MicroPython) + +Now do the following: +1) check docs to see if there is any mistake. + + + + + diff --git a/examples/tutorial.md b/docs/tutorial.md similarity index 100% rename from examples/tutorial.md rename to docs/tutorial.md diff --git a/examples/walkthrough.md b/docs/walkthrough.md similarity index 100% rename from examples/walkthrough.md rename to docs/walkthrough.md diff --git a/etc.jl b/etc.jl index 629840e..e69de29 100644 --- a/etc.jl +++ b/etc.jl @@ -1,38 +0,0 @@ -Task: Update README.md to reflect recent changes in NATSbridge package. - -Context: the package has been updated with the NATS_connection keyword and the publish_message function. - -Requirements: - -Source of Truth: Treat the updated NATSbridge code as the definitive source. Update README.md to align exactly with these changes. -API Consistency: Ensure the Main Package API (e.g., smartsend(), publish_message()) uses consistent naming across all three supported languages. -Ecosystem Variance: Low-level native functions (e.g., NATS.connect(), JSON.read()) should follow the conventions of the specific language ecosystem and do not require cross-language consistency. - - - - - - - - - - - - - -Help me expands this Julia package (NATSBridge) into a cross-platform project by adding a JavaScript and Python/MicroPython implementation. To ensure accuracy, NATSBridge.jl will serve as the ground truth, as the documentation may be outdated. - -My goal is to maintain interface parity at the high-level API for a consistent user experience, while ensuring the low-level implementation adheres strictly to the idiomatic conventions of each respective language (e.g., multiple dispatch in Julia vs. asynchronous, prototype, or class-based patterns in JS and Python/MicroPython) - -Now do the following: -1) check docs to see if there is any mistake. - - - - - - - - - - diff --git a/test/test_js_mix_payloads_receiver.js b/test/test_js_mix_payloads_receiver.js index 55f4077..6312acf 100644 --- a/test/test_js_mix_payloads_receiver.js +++ b/test/test_js_mix_payloads_receiver.js @@ -8,8 +8,8 @@ const nats = require('nats'); const crypto = require('crypto'); const TEST_SUBJECT = '/test/mix'; -const TEST_BROKER_URL = process.env.NATS_URL || 'nats://localhost:4222'; -const TEST_FILESERVER_URL = process.env.FILESERVER_URL || 'http://localhost:8080'; +const TEST_BROKER_URL = process.env.NATS_URL || 'nats.yiem.cc'; +const TEST_FILESERVER_URL = process.env.FILESERVER_URL || 'http://192.168.88.104:8080'; async function runTest() { console.log('=== JavaScript Mix Payloads Receiver Test ===\n'); diff --git a/test/test_js_mix_payloads_sender.js b/test/test_js_mix_payloads_sender.js index 300942b..4db7fa0 100644 --- a/test/test_js_mix_payloads_sender.js +++ b/test/test_js_mix_payloads_sender.js @@ -7,8 +7,8 @@ const NATSBridge = require('../src/natsbridge.js'); const crypto = require('crypto'); const TEST_SUBJECT = '/test/mix'; -const TEST_BROKER_URL = process.env.NATS_URL || 'nats://localhost:4222'; -const TEST_FILESERVER_URL = process.env.FILESERVER_URL || 'http://localhost:8080'; +const TEST_BROKER_URL = process.env.NATS_URL || 'nats.yiem.cc'; +const TEST_FILESERVER_URL = process.env.FILESERVER_URL || 'http://192.168.88.104:8080'; async function runTest() { console.log('=== JavaScript Mix Payloads Sender Test ===\n'); diff --git a/test/test_js_text_receiver.js b/test/test_js_text_receiver.js index 9d8d450..df9b203 100644 --- a/test/test_js_text_receiver.js +++ b/test/test_js_text_receiver.js @@ -6,8 +6,8 @@ const NATSBridge = require('../src/natsbridge.js'); const crypto = require('crypto'); -const TEST_BROKER_URL = process.env.NATS_URL || 'nats://localhost:4222'; -const TEST_FILESERVER_URL = process.env.FILESERVER_URL || 'http://localhost:8080'; +const TEST_BROKER_URL = process.env.NATS_URL || 'nats.yiem.cc'; +const TEST_FILESERVER_URL = process.env.FILESERVER_URL || 'http://192.168.88.104:8080'; async function runTest() { console.log('=== JavaScript Text Receiver Test ===\n');