feat(daemon): Reorganize and refactor core into client/daemon/shared modules; add IPC protocol and tests
This commit is contained in:
28
test/testassets/simple-script2.ts
Normal file
28
test/testassets/simple-script2.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env tsx
|
||||
|
||||
console.log('TypeScript test script started!');
|
||||
|
||||
// Test TypeScript features
|
||||
interface TestData {
|
||||
message: string;
|
||||
timestamp: Date;
|
||||
}
|
||||
|
||||
const data: TestData = {
|
||||
message: 'Hello from TypeScript',
|
||||
timestamp: new Date()
|
||||
};
|
||||
|
||||
console.log(`Message: ${data.message}`);
|
||||
console.log(`Time: ${data.timestamp.toISOString()}`);
|
||||
|
||||
// Keep the process running for a bit
|
||||
let counter = 0;
|
||||
const interval = setInterval(() => {
|
||||
counter++;
|
||||
console.log(`Counter: ${counter}`);
|
||||
if (counter >= 5) {
|
||||
console.log('Test complete!');
|
||||
clearInterval(interval);
|
||||
}
|
||||
}, 1000);
|
||||
23
test/testassets/simple-test.ts
Normal file
23
test/testassets/simple-test.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env tsx
|
||||
|
||||
console.log('✓ TypeScript execution works!');
|
||||
|
||||
// Test TypeScript features
|
||||
interface TestData {
|
||||
message: string;
|
||||
timestamp: Date;
|
||||
success: boolean;
|
||||
}
|
||||
|
||||
const data: TestData = {
|
||||
message: 'TSPM can run .ts files directly with tsx!',
|
||||
timestamp: new Date(),
|
||||
success: true
|
||||
};
|
||||
|
||||
console.log('Test data:', data);
|
||||
console.log('✓ TypeScript types and interfaces work');
|
||||
console.log('✓ Test complete');
|
||||
|
||||
// Exit cleanly
|
||||
process.exit(0);
|
||||
Reference in New Issue
Block a user