meetfy 1.0.0 → 1.0.1
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/package.json +10 -10
- package/src/constants.ts +1 -3
- package/src/index.ts +6 -1
- package/src/resources/index.html +50 -0
- package/src/services/authService.ts +3 -5
- package/src/services/webServer.ts +28 -9
- package/src/utils/cliUtils.ts +9 -38
- package/test.html +0 -0
- package/dist/features/auth/authService.d.ts +0 -3
- package/dist/features/auth/authService.d.ts.map +0 -1
- package/dist/features/auth/authService.js +0 -86
- package/dist/features/auth/authService.js.map +0 -1
- package/dist/features/meeting/meetingService.d.ts +0 -16
- package/dist/features/meeting/meetingService.d.ts.map +0 -1
- package/dist/features/meeting/meetingService.js +0 -108
- package/dist/features/meeting/meetingService.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -63
- package/dist/index.js.map +0 -1
- package/dist/utils/cliUtils.d.ts +0 -4
- package/dist/utils/cliUtils.d.ts.map +0 -1
- package/dist/utils/cliUtils.js +0 -37
- package/dist/utils/cliUtils.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meetfy",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "CLI tool for creating instant meetings and reserving time in Google Calendar",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
-
"meetfy": "./
|
|
8
|
+
"meetfy": "./src/index.ts"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"start": "node dist/index.js",
|
|
11
|
+
"dev": "tsx --no-deprecation src/index.ts",
|
|
12
|
+
"start": "tsx --no-deprecation src/index.ts",
|
|
14
13
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
15
14
|
"lint": "eslint src/**/*.ts"
|
|
16
15
|
},
|
|
@@ -23,6 +22,7 @@
|
|
|
23
22
|
"author": "",
|
|
24
23
|
"license": "ISC",
|
|
25
24
|
"dependencies": {
|
|
25
|
+
"boxen": "^8.0.1",
|
|
26
26
|
"chalk": "^5.3.0",
|
|
27
27
|
"commander": "^11.1.0",
|
|
28
28
|
"conf": "^12.0.0",
|
|
@@ -30,7 +30,9 @@
|
|
|
30
30
|
"google-auth-library": "^9.0.0",
|
|
31
31
|
"googleapis": "^128.0.0",
|
|
32
32
|
"inquirer": "^9.2.12",
|
|
33
|
-
"ora": "^7.0.1"
|
|
33
|
+
"ora": "^7.0.1",
|
|
34
|
+
"tsx": "^4.20.3",
|
|
35
|
+
"typescript": "5.5"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
|
36
38
|
"@types/express": "^5.0.3",
|
|
@@ -44,8 +46,6 @@
|
|
|
44
46
|
"eslint-plugin-import": "^2.32.0",
|
|
45
47
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
46
48
|
"eslint-plugin-react": "^7.37.5",
|
|
47
|
-
"eslint-plugin-react-hooks": "^4.6.2"
|
|
48
|
-
"tsx": "^4.20.3",
|
|
49
|
-
"typescript": "5.5"
|
|
49
|
+
"eslint-plugin-react-hooks": "^4.6.2"
|
|
50
50
|
}
|
|
51
51
|
}
|
package/src/constants.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
1
|
+
#!/usr/bin/env tsx --no-deprecation
|
|
2
2
|
|
|
3
3
|
import { Command } from 'commander';
|
|
4
4
|
import chalk from 'chalk';
|
|
@@ -49,6 +49,11 @@ program
|
|
|
49
49
|
program
|
|
50
50
|
.command('auth')
|
|
51
51
|
.description('Authenticate with Google Calendar')
|
|
52
|
+
.addHelpText('after', `
|
|
53
|
+
\nExamples:
|
|
54
|
+
\n meetfy auth
|
|
55
|
+
\n meetfy auth --help
|
|
56
|
+
`)
|
|
52
57
|
.action(async () => {
|
|
53
58
|
try {
|
|
54
59
|
showWelcomeMessage();
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Document</title>
|
|
7
|
+
<style>
|
|
8
|
+
.container {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
height: 100vh;
|
|
12
|
+
}
|
|
13
|
+
.header {
|
|
14
|
+
background-color: #f00;
|
|
15
|
+
height: 100px;
|
|
16
|
+
}
|
|
17
|
+
.content {
|
|
18
|
+
display: grid;
|
|
19
|
+
grid-template-columns: 1fr;
|
|
20
|
+
}
|
|
21
|
+
.left {
|
|
22
|
+
background-color: #0f0;
|
|
23
|
+
}
|
|
24
|
+
.right {
|
|
25
|
+
background-color: #00f;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@media (min-width: 768px) {
|
|
29
|
+
.content {
|
|
30
|
+
grid-template-columns: 300px 1fr;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
34
|
+
</head>
|
|
35
|
+
<body>
|
|
36
|
+
<div class="container">
|
|
37
|
+
<div class="header">
|
|
38
|
+
<h1>Header</h1>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="content">
|
|
41
|
+
<div class="left">
|
|
42
|
+
<h1>Left</h1>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="right">
|
|
45
|
+
<h1>Right</h1>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</body>
|
|
50
|
+
</html>
|
|
@@ -5,6 +5,7 @@ import { join } from 'path';
|
|
|
5
5
|
import chalk from 'chalk';
|
|
6
6
|
import config from './configService.js';
|
|
7
7
|
import { getCodeServer } from './webServer.js';
|
|
8
|
+
import { PORT_NUMBER } from '../constants.js';
|
|
8
9
|
|
|
9
10
|
const SCOPES = [
|
|
10
11
|
'https://www.googleapis.com/auth/calendar',
|
|
@@ -12,6 +13,7 @@ const SCOPES = [
|
|
|
12
13
|
];
|
|
13
14
|
|
|
14
15
|
const CREDENTIALS_PATH = join(process.cwd(), 'credentials.json');
|
|
16
|
+
const REDIRECT_URI = `http://localhost:${PORT_NUMBER}/`;
|
|
15
17
|
|
|
16
18
|
interface AuthTokens {
|
|
17
19
|
access_token: string;
|
|
@@ -30,8 +32,6 @@ const getNewTokens = async (oAuth2Client: OAuth2Client): Promise<OAuth2Client |
|
|
|
30
32
|
|
|
31
33
|
console.log(chalk.cyan('🔐 Authorize this app by visiting this url:'), chalk.blue(authUrl));
|
|
32
34
|
|
|
33
|
-
console.log(chalk.cyan('🔐 Waiting for code...'));
|
|
34
|
-
|
|
35
35
|
const code = await getCodeServer();
|
|
36
36
|
|
|
37
37
|
const { tokens } = await oAuth2Client.getToken(code);
|
|
@@ -40,7 +40,6 @@ const getNewTokens = async (oAuth2Client: OAuth2Client): Promise<OAuth2Client |
|
|
|
40
40
|
// Store tokens
|
|
41
41
|
config.set('googleTokens', tokens);
|
|
42
42
|
|
|
43
|
-
console.log(chalk.green('✅ Authentication successful!'));
|
|
44
43
|
return oAuth2Client;
|
|
45
44
|
} catch (error) {
|
|
46
45
|
console.error(chalk.red('❌ Error getting tokens:'), error);
|
|
@@ -67,13 +66,12 @@ export const authenticateGoogle = async (): Promise<OAuth2Client | null> => {
|
|
|
67
66
|
const {
|
|
68
67
|
client_secret: clientSecret,
|
|
69
68
|
client_id: clientId,
|
|
70
|
-
redirect_uris: redirectUris,
|
|
71
69
|
} = credentials.installed || credentials.web;
|
|
72
70
|
|
|
73
71
|
const oAuth2Client = new google.auth.OAuth2(
|
|
74
72
|
clientId,
|
|
75
73
|
clientSecret,
|
|
76
|
-
|
|
74
|
+
REDIRECT_URI,
|
|
77
75
|
);
|
|
78
76
|
|
|
79
77
|
// Check if we have stored tokens
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import http from 'node:http';
|
|
2
2
|
import express, { Request, Response } from 'express';
|
|
3
|
+
import chalk from 'chalk';
|
|
3
4
|
import { PORT_NUMBER } from '../constants.js';
|
|
4
5
|
|
|
5
6
|
const server = express();
|
|
@@ -9,25 +10,43 @@ export const getCodeServer = async (): Promise<string> => new Promise<string>((r
|
|
|
9
10
|
|
|
10
11
|
server.get('/', (req: Request, res: Response) => {
|
|
11
12
|
console.log(req.query);
|
|
12
|
-
res.send(`
|
|
13
|
-
<html>
|
|
14
|
-
<body>
|
|
15
|
-
<h1>Meetfy</h1>
|
|
16
|
-
<p>You can close this window now.</p>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
19
|
-
`);
|
|
20
13
|
|
|
21
14
|
const { code } = req.query;
|
|
22
15
|
if (code) {
|
|
23
|
-
instance.close();
|
|
24
16
|
resolve(code as string);
|
|
17
|
+
res.send(`
|
|
18
|
+
<html>
|
|
19
|
+
<style>
|
|
20
|
+
body {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
height: 100vh;
|
|
26
|
+
background-color: #f0f0f0;
|
|
27
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
28
|
+
}
|
|
29
|
+
h1 {
|
|
30
|
+
color: #000;
|
|
31
|
+
}
|
|
32
|
+
p {
|
|
33
|
+
color: #000;
|
|
34
|
+
}
|
|
35
|
+
</style>
|
|
36
|
+
<body>
|
|
37
|
+
<h1>Meetfy</h1>
|
|
38
|
+
<p>You can close this window now.</p>
|
|
39
|
+
</body>
|
|
40
|
+
</html>
|
|
41
|
+
`);
|
|
42
|
+
instance.close();
|
|
25
43
|
} else {
|
|
26
44
|
reject(new Error('No code found'));
|
|
27
45
|
}
|
|
28
46
|
});
|
|
29
47
|
|
|
30
48
|
instance = server.listen(PORT_NUMBER, (error) => {
|
|
49
|
+
console.log(chalk.cyan(`🔐 Waiting for code on port ${PORT_NUMBER}...`));
|
|
31
50
|
if (error) {
|
|
32
51
|
console.error(error);
|
|
33
52
|
}
|
package/src/utils/cliUtils.ts
CHANGED
|
@@ -1,43 +1,14 @@
|
|
|
1
|
+
import boxen from 'boxen';
|
|
1
2
|
import chalk from 'chalk';
|
|
2
3
|
|
|
3
4
|
export const showWelcomeMessage = (): void => {
|
|
4
|
-
console.log(
|
|
5
|
+
console.log(boxen('Meetfy', {
|
|
6
|
+
padding: 1,
|
|
7
|
+
margin: 0,
|
|
8
|
+
width: 40,
|
|
9
|
+
title: 'Instant Meeting Creator',
|
|
10
|
+
titleAlignment: 'center',
|
|
11
|
+
textAlignment: 'center',
|
|
12
|
+
}));
|
|
5
13
|
console.log(chalk.gray('Create instant meetings and reserve time in Google Calendar\n'));
|
|
6
14
|
};
|
|
7
|
-
|
|
8
|
-
export const showHelp = (): void => {
|
|
9
|
-
console.log(chalk.cyan.bold('\n📖 Meetfy CLI Help'));
|
|
10
|
-
console.log(chalk.gray('\nCommands:'));
|
|
11
|
-
console.log(chalk.white(' create Create an instant meeting'));
|
|
12
|
-
console.log(chalk.white(' auth Authenticate with Google Calendar'));
|
|
13
|
-
console.log(chalk.white(' --help Show this help message'));
|
|
14
|
-
|
|
15
|
-
console.log(chalk.gray('\nExamples:'));
|
|
16
|
-
console.log(chalk.white(' meetfy create'));
|
|
17
|
-
console.log(chalk.white(' meetfy create -t "Team Standup" -d "Daily team sync"'));
|
|
18
|
-
console.log(chalk.white(' meetfy create -p "john@example.com,jane@example.com"'));
|
|
19
|
-
console.log(chalk.white(' meetfy auth'));
|
|
20
|
-
|
|
21
|
-
console.log(chalk.gray('\nOptions for create command:'));
|
|
22
|
-
console.log(chalk.white(' -t, --title <title> Meeting title'));
|
|
23
|
-
console.log(chalk.white(' -d, --description <desc> Meeting description'));
|
|
24
|
-
console.log(chalk.white(' -p, --participants <emails> Comma-separated participant emails'));
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const showSetupInstructions = (): void => {
|
|
28
|
-
console.log(chalk.yellow.bold('\n🔧 Setup Instructions'));
|
|
29
|
-
console.log(chalk.gray('\n1. Google Calendar API Setup:'));
|
|
30
|
-
console.log(chalk.white(' • Go to https://console.cloud.google.com'));
|
|
31
|
-
console.log(chalk.white(' • Create a new project or select existing one'));
|
|
32
|
-
console.log(chalk.white(' • Enable Google Calendar API'));
|
|
33
|
-
console.log(chalk.white(' • Create OAuth 2.0 credentials'));
|
|
34
|
-
console.log(chalk.white(' • Download credentials.json to project root'));
|
|
35
|
-
|
|
36
|
-
console.log(chalk.gray('\n2. Authentication:'));
|
|
37
|
-
console.log(chalk.white(' • Run: meetfy auth'));
|
|
38
|
-
console.log(chalk.white(' • Follow the authentication flow'));
|
|
39
|
-
|
|
40
|
-
console.log(chalk.gray('\n3. Create Meetings:'));
|
|
41
|
-
console.log(chalk.white(' • Run: meetfy create'));
|
|
42
|
-
console.log(chalk.white(' • Or with options: meetfy create -t "Meeting Title"'));
|
|
43
|
-
};
|
package/test.html
ADDED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authService.d.ts","sourceRoot":"","sources":["../../../src/features/auth/authService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAyBnD,eAAO,MAAM,kBAAkB,QAAa,OAAO,CAAC,YAAY,GAAG,IAAI,CA+CtE,CAAC"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { google } from 'googleapis';
|
|
2
|
-
import { readFileSync, existsSync } from 'fs';
|
|
3
|
-
import { join } from 'path';
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
import inquirer from 'inquirer';
|
|
6
|
-
import Conf from 'conf';
|
|
7
|
-
const SCOPES = [
|
|
8
|
-
'https://www.googleapis.com/auth/calendar',
|
|
9
|
-
'https://www.googleapis.com/auth/calendar.events'
|
|
10
|
-
];
|
|
11
|
-
const TOKEN_PATH = join(process.cwd(), '.meetfy-token.json');
|
|
12
|
-
const CREDENTIALS_PATH = join(process.cwd(), 'credentials.json');
|
|
13
|
-
const config = new Conf();
|
|
14
|
-
export const authenticateGoogle = async () => {
|
|
15
|
-
try {
|
|
16
|
-
// Check if credentials file exists
|
|
17
|
-
if (!existsSync(CREDENTIALS_PATH)) {
|
|
18
|
-
console.log(chalk.yellow('⚠️ Google Calendar credentials not found.'));
|
|
19
|
-
console.log(chalk.cyan('📝 Please follow these steps:'));
|
|
20
|
-
console.log(chalk.cyan('1. Go to https://console.cloud.google.com'));
|
|
21
|
-
console.log(chalk.cyan('2. Create a new project or select existing one'));
|
|
22
|
-
console.log(chalk.cyan('3. Enable Google Calendar API'));
|
|
23
|
-
console.log(chalk.cyan('4. Create OAuth 2.0 credentials'));
|
|
24
|
-
console.log(chalk.cyan('5. Download credentials.json and place it in the project root'));
|
|
25
|
-
console.log(chalk.cyan('6. Run: meetfy auth'));
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
const credentials = JSON.parse(readFileSync(CREDENTIALS_PATH, 'utf-8'));
|
|
29
|
-
const { client_secret, client_id, redirect_uris } = credentials.installed || credentials.web;
|
|
30
|
-
const oAuth2Client = new google.auth.OAuth2(client_id, client_secret, redirect_uris[0]);
|
|
31
|
-
// Check if we have stored tokens
|
|
32
|
-
const storedTokens = config.get('googleTokens');
|
|
33
|
-
if (storedTokens) {
|
|
34
|
-
oAuth2Client.setCredentials(storedTokens);
|
|
35
|
-
// Check if token is expired
|
|
36
|
-
if (storedTokens.expiry_date && Date.now() > storedTokens.expiry_date) {
|
|
37
|
-
console.log(chalk.yellow('🔄 Token expired, refreshing...'));
|
|
38
|
-
const { credentials: newTokens } = await oAuth2Client.refreshAccessToken();
|
|
39
|
-
oAuth2Client.setCredentials(newTokens);
|
|
40
|
-
config.set('googleTokens', newTokens);
|
|
41
|
-
}
|
|
42
|
-
return oAuth2Client;
|
|
43
|
-
}
|
|
44
|
-
// Get new tokens
|
|
45
|
-
return await getNewTokens(oAuth2Client);
|
|
46
|
-
}
|
|
47
|
-
catch (error) {
|
|
48
|
-
console.error(chalk.red('❌ Authentication error:'), error);
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
const getNewTokens = async (oAuth2Client) => {
|
|
53
|
-
try {
|
|
54
|
-
const authUrl = oAuth2Client.generateAuthUrl({
|
|
55
|
-
access_type: 'offline',
|
|
56
|
-
scope: SCOPES,
|
|
57
|
-
});
|
|
58
|
-
console.log(chalk.cyan('🔐 Authorize this app by visiting this url:'));
|
|
59
|
-
console.log(chalk.blue(authUrl));
|
|
60
|
-
console.log(chalk.cyan('\n📋 Copy the authorization code from the URL and paste it below.'));
|
|
61
|
-
const { code } = await inquirer.prompt([
|
|
62
|
-
{
|
|
63
|
-
type: 'input',
|
|
64
|
-
name: 'code',
|
|
65
|
-
message: 'Enter the authorization code:',
|
|
66
|
-
validate: (input) => {
|
|
67
|
-
if (!input.trim()) {
|
|
68
|
-
return 'Please enter the authorization code';
|
|
69
|
-
}
|
|
70
|
-
return true;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
]);
|
|
74
|
-
const { tokens } = await oAuth2Client.getToken(code);
|
|
75
|
-
oAuth2Client.setCredentials(tokens);
|
|
76
|
-
// Store tokens
|
|
77
|
-
config.set('googleTokens', tokens);
|
|
78
|
-
console.log(chalk.green('✅ Authentication successful!'));
|
|
79
|
-
return oAuth2Client;
|
|
80
|
-
}
|
|
81
|
-
catch (error) {
|
|
82
|
-
console.error(chalk.red('❌ Error getting tokens:'), error);
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
//# sourceMappingURL=authService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authService.js","sourceRoot":"","sources":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CAAC;IACtB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,yBAAyB,CAAC,EAAE,KAAK,CAAC,CAAC;QAC3D,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { OAuth2Client } from 'google-auth-library';
|
|
2
|
-
interface MeetingOptions {
|
|
3
|
-
title?: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
participants?: string;
|
|
6
|
-
}
|
|
7
|
-
interface MeetingResult {
|
|
8
|
-
id: string;
|
|
9
|
-
hangoutLink: string;
|
|
10
|
-
startTime: string;
|
|
11
|
-
endTime: string;
|
|
12
|
-
title: string;
|
|
13
|
-
}
|
|
14
|
-
export declare const createInstantMeeting: (auth: OAuth2Client, options: MeetingOptions) => Promise<MeetingResult | null>;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=meetingService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meetingService.d.ts","sourceRoot":"","sources":["../../../src/features/meeting/meetingService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAKnD,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,oBAAoB,GAC/B,MAAM,YAAY,EAClB,SAAS,cAAc,KACtB,OAAO,CAAC,aAAa,GAAG,IAAI,CAoE9B,CAAC"}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { google } from 'googleapis';
|
|
2
|
-
import inquirer from 'inquirer';
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import ora from 'ora';
|
|
5
|
-
export const createInstantMeeting = async (auth, options) => {
|
|
6
|
-
try {
|
|
7
|
-
const calendar = google.calendar({ version: 'v3', auth });
|
|
8
|
-
// Get meeting details from user if not provided
|
|
9
|
-
const meetingDetails = await getMeetingDetails(options);
|
|
10
|
-
// Calculate meeting times (30 minutes from now)
|
|
11
|
-
const now = new Date();
|
|
12
|
-
const startTime = new Date(now.getTime() + 5 * 60 * 1000); // Start in 5 minutes
|
|
13
|
-
const endTime = new Date(startTime.getTime() + 30 * 60 * 1000); // 30 minutes duration
|
|
14
|
-
const spinner = ora('Creating meeting and reserving calendar...').start();
|
|
15
|
-
// Create calendar event
|
|
16
|
-
const event = {
|
|
17
|
-
summary: meetingDetails.title,
|
|
18
|
-
description: meetingDetails.description,
|
|
19
|
-
start: {
|
|
20
|
-
dateTime: startTime.toISOString(),
|
|
21
|
-
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
22
|
-
},
|
|
23
|
-
end: {
|
|
24
|
-
dateTime: endTime.toISOString(),
|
|
25
|
-
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
26
|
-
},
|
|
27
|
-
attendees: meetingDetails.participants.map((email) => ({ email: email.trim() })),
|
|
28
|
-
conferenceData: {
|
|
29
|
-
createRequest: {
|
|
30
|
-
requestId: `meetfy-${Date.now()}`,
|
|
31
|
-
conferenceSolutionKey: {
|
|
32
|
-
type: 'hangoutsMeet'
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
reminders: {
|
|
37
|
-
useDefault: false,
|
|
38
|
-
overrides: [
|
|
39
|
-
{ method: 'email', minutes: 10 },
|
|
40
|
-
{ method: 'popup', minutes: 5 }
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
const response = await calendar.events.insert({
|
|
45
|
-
calendarId: 'primary',
|
|
46
|
-
requestBody: event,
|
|
47
|
-
conferenceDataVersion: 1,
|
|
48
|
-
sendUpdates: 'all'
|
|
49
|
-
});
|
|
50
|
-
spinner.succeed('Meeting created successfully!');
|
|
51
|
-
if (!response.data.id || !response.data.hangoutLink) {
|
|
52
|
-
throw new Error('Failed to create meeting with Google Meet link');
|
|
53
|
-
}
|
|
54
|
-
return {
|
|
55
|
-
id: response.data.id,
|
|
56
|
-
hangoutLink: response.data.hangoutLink,
|
|
57
|
-
startTime: startTime.toLocaleString(),
|
|
58
|
-
endTime: endTime.toLocaleString(),
|
|
59
|
-
title: meetingDetails.title
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
catch (error) {
|
|
63
|
-
console.error(chalk.red('❌ Error creating meeting:'), error);
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
const getMeetingDetails = async (options) => {
|
|
68
|
-
const questions = [];
|
|
69
|
-
if (!options.title) {
|
|
70
|
-
questions.push({
|
|
71
|
-
type: 'input',
|
|
72
|
-
name: 'title',
|
|
73
|
-
message: 'Meeting title:',
|
|
74
|
-
default: 'Instant Meeting',
|
|
75
|
-
validate: (input) => {
|
|
76
|
-
if (!input.trim()) {
|
|
77
|
-
return 'Please enter a meeting title';
|
|
78
|
-
}
|
|
79
|
-
return true;
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
if (!options.description) {
|
|
84
|
-
questions.push({
|
|
85
|
-
type: 'input',
|
|
86
|
-
name: 'description',
|
|
87
|
-
message: 'Meeting description (optional):',
|
|
88
|
-
default: 'Instant meeting created via Meetfy CLI'
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
if (!options.participants) {
|
|
92
|
-
questions.push({
|
|
93
|
-
type: 'input',
|
|
94
|
-
name: 'participants',
|
|
95
|
-
message: 'Participant emails (comma-separated, optional):',
|
|
96
|
-
default: ''
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
const answers = questions.length > 0 ? await inquirer.prompt(questions) : {};
|
|
100
|
-
return {
|
|
101
|
-
title: options.title || answers.title,
|
|
102
|
-
description: options.description || answers.description,
|
|
103
|
-
participants: (options.participants || answers.participants || '')
|
|
104
|
-
.split(',')
|
|
105
|
-
.filter((email) => email.trim() !== '')
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
//# sourceMappingURL=meetingService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meetingService.js","sourceRoot":"","sources":["../../../src/features/meeting/meetingService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AAgBtB,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EACvC,IAAkB,EAClB,OAAuB,EACQ,EAAE;IACjC,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAE1D,gDAAgD;QAChD,MAAM,cAAc,GAAG,MAAM,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAExD,gDAAgD;QAChD,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,qBAAqB;QAChF,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,sBAAsB;QAEtF,MAAM,OAAO,GAAG,GAAG,CAAC,4CAA4C,CAAC,CAAC,KAAK,EAAE,CAAC;QAE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AAC;QAC1B,SAAS,CAAC,IAAI,CAAC;YACb,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,iDAAiD;YAC1D,OAAO,EAAE,EAAE;SACZ,CAAC,CAAC;IACL,CAAC;IAED,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAE7E,OAAO;QACL,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK;QACrC,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,WAAW;QACvD,YAAY,EAAE,CAAC,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC;aAC/D,KAAK,CAAC,GAAG,CAAC;aACV,MAAM,CAAC,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;KAClD,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/index.d.ts
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { Command } from 'commander';
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import { createInstantMeeting } from './features/meeting/meetingService.js';
|
|
5
|
-
import { authenticateGoogle } from './features/auth/authService.js';
|
|
6
|
-
import { showWelcomeMessage } from './utils/cliUtils.js';
|
|
7
|
-
const program = new Command();
|
|
8
|
-
program
|
|
9
|
-
.name('meetfy')
|
|
10
|
-
.description('CLI tool for creating instant meetings and reserving time in Google Calendar')
|
|
11
|
-
.version('1.0.0');
|
|
12
|
-
program
|
|
13
|
-
.command('create')
|
|
14
|
-
.description('Create an instant meeting and reserve 30 minutes in your Google Calendar')
|
|
15
|
-
.option('-t, --title <title>', 'Meeting title')
|
|
16
|
-
.option('-d, --description <description>', 'Meeting description')
|
|
17
|
-
.option('-p, --participants <emails>', 'Comma-separated list of participant emails')
|
|
18
|
-
.action(async (options) => {
|
|
19
|
-
try {
|
|
20
|
-
showWelcomeMessage();
|
|
21
|
-
// Authenticate with Google
|
|
22
|
-
const auth = await authenticateGoogle();
|
|
23
|
-
if (!auth) {
|
|
24
|
-
console.log(chalk.red('❌ Authentication failed. Please try again.'));
|
|
25
|
-
process.exit(1);
|
|
26
|
-
}
|
|
27
|
-
// Create instant meeting
|
|
28
|
-
const meeting = await createInstantMeeting(auth, options);
|
|
29
|
-
if (meeting) {
|
|
30
|
-
console.log(chalk.green('✅ Meeting created successfully!'));
|
|
31
|
-
console.log(chalk.cyan(`📅 Meeting ID: ${meeting.id}`));
|
|
32
|
-
console.log(chalk.cyan(`🔗 Join URL: ${meeting.hangoutLink}`));
|
|
33
|
-
console.log(chalk.cyan(`⏰ Duration: 30 minutes`));
|
|
34
|
-
console.log(chalk.cyan(`📅 Start Time: ${meeting.startTime}`));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
console.error(chalk.red('❌ Error creating meeting:'), error);
|
|
39
|
-
process.exit(1);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
program
|
|
43
|
-
.command('auth')
|
|
44
|
-
.description('Authenticate with Google Calendar')
|
|
45
|
-
.action(async () => {
|
|
46
|
-
try {
|
|
47
|
-
showWelcomeMessage();
|
|
48
|
-
const auth = await authenticateGoogle();
|
|
49
|
-
if (auth) {
|
|
50
|
-
console.log(chalk.green('✅ Authentication successful!'));
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
console.log(chalk.red('❌ Authentication failed.'));
|
|
54
|
-
process.exit(1);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
catch (error) {
|
|
58
|
-
console.error(chalk.red('❌ Authentication error:'), error);
|
|
59
|
-
process.exit(1);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
program.parse();
|
|
63
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,8EAA8E,CAAC;KAC3F,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,0EAA0E,CAAC;KACvF,MAAM,CAAC,qBAAqB,EAAE,eAAe,CAAC;KAC9C,MAAM,CAAC,iCAAiC,EAAE,qBAAqB,CAAC;KAChE,MAAM,CAAC,6BAA6B,EAAE,4CAA4C,CAAC;KACnF,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACxB,IAAI,CAAC;QACH,kBAAkB,EAAE,CAAC;QAErB,2BAA2B;QAC3B,MAAM,IAAI,GAAG,MAAM,kBAAkB,EAAE,CAAC;QACxC,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC,CAAC;YACrE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,yBAAyB;Q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D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,yBAAyB,CAAC,EAAE,KAAK,CAAC,CAAC;QAC3D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
package/dist/utils/cliUtils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cliUtils.d.ts","sourceRoot":"","sources":["../../src/utils/cliUtils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,QAAO,IAGrC,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,IAiB3B,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAO,IAgBxC,CAAC"}
|
package/dist/utils/cliUtils.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
export const showWelcomeMessage = () => {
|
|
3
|
-
console.log(chalk.cyan.bold('\n🚀 Meetfy - Instant Meeting Creator'));
|
|
4
|
-
console.log(chalk.gray('Create instant meetings and reserve time in Google Calendar\n'));
|
|
5
|
-
};
|
|
6
|
-
export const showHelp = () => {
|
|
7
|
-
console.log(chalk.cyan.bold('\n📖 Meetfy CLI Help'));
|
|
8
|
-
console.log(chalk.gray('\nCommands:'));
|
|
9
|
-
console.log(chalk.white(' create Create an instant meeting'));
|
|
10
|
-
console.log(chalk.white(' auth Authenticate with Google Calendar'));
|
|
11
|
-
console.log(chalk.white(' --help Show this help message'));
|
|
12
|
-
console.log(chalk.gray('\nExamples:'));
|
|
13
|
-
console.log(chalk.white(' meetfy create'));
|
|
14
|
-
console.log(chalk.white(' meetfy create -t "Team Standup" -d "Daily team sync"'));
|
|
15
|
-
console.log(chalk.white(' meetfy create -p "john@example.com,jane@example.com"'));
|
|
16
|
-
console.log(chalk.white(' meetfy auth'));
|
|
17
|
-
console.log(chalk.gray('\nOptions for create command:'));
|
|
18
|
-
console.log(chalk.white(' -t, --title <title> Meeting title'));
|
|
19
|
-
console.log(chalk.white(' -d, --description <desc> Meeting description'));
|
|
20
|
-
console.log(chalk.white(' -p, --participants <emails> Comma-separated participant emails'));
|
|
21
|
-
};
|
|
22
|
-
export const showSetupInstructions = () => {
|
|
23
|
-
console.log(chalk.yellow.bold('\n🔧 Setup Instructions'));
|
|
24
|
-
console.log(chalk.gray('\n1. Google Calendar API Setup:'));
|
|
25
|
-
console.log(chalk.white(' • Go to https://console.cloud.google.com'));
|
|
26
|
-
console.log(chalk.white(' • Create a new project or select existing one'));
|
|
27
|
-
console.log(chalk.white(' • Enable Google Calendar API'));
|
|
28
|
-
console.log(chalk.white(' • Create OAuth 2.0 credentials'));
|
|
29
|
-
console.log(chalk.white(' • Download credentials.json to project root'));
|
|
30
|
-
console.log(chalk.gray('\n2. Authentication:'));
|
|
31
|
-
console.log(chalk.white(' • Run: meetfy auth'));
|
|
32
|
-
console.log(chalk.white(' • Follow the authentication flow'));
|
|
33
|
-
console.log(chalk.gray('\n3. Create Meetings:'));
|
|
34
|
-
console.log(chalk.white(' • Run: meetfy create'));
|
|
35
|
-
console.log(chalk.white(' • Or with options: meetfy create -t "Meeting Title"'));
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=cliUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cliUtils.js","sourceRoot":"","sources":["../../src/utils/cliUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAS,EAAE;IAC3C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,GAAG,CAAC,KAAK,C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