dwkim 0.0.3

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.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ import chalk from 'chalk';
3
+ import boxen from 'boxen';
4
+ import { prisma } from '@repo/database';
5
+ // 명함 스타일 설정
6
+ const boxenOptions = {
7
+ padding: 1,
8
+ margin: 1,
9
+ borderStyle: 'round',
10
+ borderColor: 'green',
11
+ };
12
+ const main = async () => {
13
+ const cardData = await prisma.user.findFirst();
14
+ if (!cardData) {
15
+ console.error('No card data found');
16
+ return;
17
+ }
18
+ const cardContent = [
19
+ chalk.white.bold(cardData.name),
20
+ chalk.white(cardData.title),
21
+ chalk.white(cardData.bio),
22
+ '',
23
+ chalk.gray('Email: ') + chalk.white(cardData.email),
24
+ chalk.gray('GitHub: ') + chalk.white(cardData.github),
25
+ chalk.gray('Website: ') + chalk.white(cardData.website),
26
+ ].join('\n');
27
+ // 명함 출력
28
+ console.log(boxen(cardContent, boxenOptions));
29
+ };
30
+ main();
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "dwkim",
3
+ "version": "0.0.3",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "type": "module",
7
+ "bin": "./dist/src/index.js",
8
+ "keywords": [],
9
+ "author": "",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "boxen": "^8.0.1",
13
+ "chalk": "^5.4.1",
14
+ "ts-node": "^10.9.2"
15
+ },
16
+ "devDependencies": {
17
+ "typescript": "5.5.4",
18
+ "@repo/database": "1.0.0",
19
+ "@repo/typescript-config": "0.0.0",
20
+ "@repo/eslint-config": "0.0.0"
21
+ },
22
+ "scripts": {
23
+ "dev": "npm run build && node dist/src/index.js",
24
+ "build": "tsc"
25
+ }
26
+ }
package/src/index.ts ADDED
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env node
2
+
3
+ import chalk from 'chalk';
4
+ import boxen, { type Options } from 'boxen';
5
+ import { prisma } from '@repo/database';
6
+
7
+ // 명함 스타일 설정
8
+ const boxenOptions: Options = {
9
+ padding: 1,
10
+ margin: 1,
11
+ borderStyle: 'round',
12
+ borderColor: 'green',
13
+ };
14
+
15
+ const main = async () => {
16
+ const cardData = await prisma.user.findFirst();
17
+ if (!cardData) {
18
+ console.error('No card data found');
19
+ return;
20
+ }
21
+
22
+ const cardContent = [
23
+ chalk.white.bold(cardData.name),
24
+ chalk.white(cardData.title),
25
+ chalk.white(cardData.bio),
26
+ '',
27
+ chalk.gray('Email: ') + chalk.white(cardData.email),
28
+ chalk.gray('GitHub: ') + chalk.white(cardData.github),
29
+ chalk.gray('Website: ') + chalk.white(cardData.website),
30
+ ].join('\n');
31
+
32
+ // 명함 출력
33
+ console.log(boxen(cardContent, boxenOptions));
34
+ };
35
+
36
+ main();
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "extends": "@repo/typescript-config/base.json",
3
+ "compilerOptions": {
4
+ "target": "es2017",
5
+ "module": "ES2015",
6
+ "outDir": "./dist",
7
+ "rootDir": "./",
8
+ "strict": true,
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "incremental": false
13
+ },
14
+ "include": ["**/*.ts"],
15
+ "exclude": ["node_modules", "dist"]
16
+ }