ahmedelgabri 8.0.1 → 8.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.
- package/README.md +2 -2
- package/esm/card.js +4 -0
- package/esm/mod.js +14 -38
- package/package.json +2 -2
- package/script/card.js +6 -0
- package/script/mod.js +15 -40
- package/types/card.d.ts +3 -0
- package/types/card.d.ts.map +1 -0
- package/types/mod.d.ts +0 -9
- package/types/mod.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
<br>
|
|
14
14
|
<br>
|
|
15
15
|
<strong>Deno</strong>
|
|
16
|
-
<pre><code>deno run --allow-env jsr:@ahmed/card</code></pre>
|
|
16
|
+
<pre><code>deno run -r --allow-env jsr:@ahmed/card</code></pre>
|
|
17
17
|
<br>
|
|
18
18
|
<br>
|
|
19
19
|
<strong>node</strong>
|
|
20
|
-
<pre><code>npx ahmedelgabri</code></pre>
|
|
20
|
+
<pre><code>npx ahmedelgabri@latest</code></pre>
|
|
21
21
|
</div>
|
package/esm/card.js
ADDED
package/esm/mod.js
CHANGED
|
@@ -1,32 +1,26 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import "./_dnt.polyfills.js";
|
|
3
1
|
import "./_dnt.polyfills.js";
|
|
4
2
|
import * as dntShim from "./_dnt.shims.js";
|
|
5
3
|
import * as c from "./deps/jsr.io/@std/fmt/0.221.0/colors.js";
|
|
6
4
|
import boxen from "boxen";
|
|
7
5
|
const fullname = "Ahmed El Gabri";
|
|
8
6
|
const social = fullname.toLowerCase().replaceAll(" ", "");
|
|
9
|
-
const mastodonHandle = fullname.toLowerCase().split(" ").at(-1);
|
|
10
7
|
const jsrUserName = fullname.toLowerCase().split(" ").at(0);
|
|
11
|
-
|
|
8
|
+
const domain = fullname.toLowerCase().split(" ").at(-1);
|
|
12
9
|
const handle = c.blue(social);
|
|
13
|
-
const work = c.reset(
|
|
10
|
+
const work = c.reset(`Staff Software Engineer ${c.yellow("@Mirohq")}`);
|
|
14
11
|
const twitter = c.blue(`https://twitter.com/${handle}`);
|
|
15
12
|
const github = c.blue(`https://github.com/${handle}`);
|
|
16
13
|
const linkedin = c.blue(`https://linkedin.com/in/${handle}`);
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const deno = c.reset(`deno run --allow-env jsr:@${c.blue(jsrUserName)}/card`);
|
|
14
|
+
const web = c.blue(`https://${domain}.me`);
|
|
15
|
+
const npx = c.reset(`npx ${handle}@latest`);
|
|
16
|
+
const deno = c.reset(`deno run -r --allow-env jsr:@${c.blue(jsrUserName)}/card`);
|
|
21
17
|
const labelWork = c.gray(" Work: ");
|
|
22
|
-
const labelTwitter = c.dim(" Twitter: ");
|
|
23
|
-
const labelGitHub = c.dim("
|
|
24
|
-
const labelLinkedIn = c.dim("LinkedIn: ");
|
|
25
|
-
const labelWeb = c.dim("
|
|
26
|
-
const labelNode = c.gray("
|
|
27
|
-
const labelDeno = c.gray("
|
|
28
|
-
const labelMastodon = c.dim("Mastodon: ");
|
|
29
|
-
// Actual strings we're going to output
|
|
18
|
+
const labelTwitter = c.dim(" Twitter/X: ");
|
|
19
|
+
const labelGitHub = c.dim(" GitHub: ");
|
|
20
|
+
const labelLinkedIn = c.dim(" LinkedIn: ");
|
|
21
|
+
const labelWeb = c.dim(" Web: ");
|
|
22
|
+
const labelNode = c.gray(" Node: ");
|
|
23
|
+
const labelDeno = c.gray(" Deno: ");
|
|
30
24
|
const working = `${labelWork} ${work}`;
|
|
31
25
|
const twittering = `${labelTwitter} ${twitter}`;
|
|
32
26
|
const githubing = `${labelGitHub} ${github}`;
|
|
@@ -34,18 +28,7 @@ const linkedining = `${labelLinkedIn} ${linkedin}`;
|
|
|
34
28
|
const webing = `${labelWeb} ${web}`;
|
|
35
29
|
const npming = `${labelNode} ${npx}`;
|
|
36
30
|
const denoing = `${labelDeno} ${deno}`;
|
|
37
|
-
const
|
|
38
|
-
// Put all our output together into a single variable so we can use boxen effectively
|
|
39
|
-
const output = `${working}
|
|
40
|
-
|
|
41
|
-
${githubing}
|
|
42
|
-
${linkedining}
|
|
43
|
-
${twittering}
|
|
44
|
-
${mastodoning}
|
|
45
|
-
${webing}
|
|
46
|
-
|
|
47
|
-
${denoing}
|
|
48
|
-
${npming}`;
|
|
31
|
+
const output = `${working}\n\n${githubing}\n${linkedining}\n${twittering}\n${webing}\n\n${denoing}\n${npming}`;
|
|
49
32
|
/**
|
|
50
33
|
* Returns a boxed and colored personal card containing personal information
|
|
51
34
|
*
|
|
@@ -60,15 +43,8 @@ export function getCard() {
|
|
|
60
43
|
borderColor: dntShim.Deno.env.get("NO_COLOR") ? undefined : "blue",
|
|
61
44
|
});
|
|
62
45
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
* colors
|
|
66
|
-
*
|
|
67
|
-
* @returns {string}
|
|
68
|
-
*/
|
|
69
|
-
export function getPlainCard() {
|
|
70
|
-
return output;
|
|
71
|
-
}
|
|
46
|
+
// Needed for deno run ...
|
|
47
|
+
// card.ts is needed for npx ...
|
|
72
48
|
if ((import.meta.url === ("file:///" + process.argv[1].replace(/\\/g, "/")).replace(/\/{3,}/, "///"))) {
|
|
73
49
|
console.log(getCard());
|
|
74
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ahmedelgabri",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.3",
|
|
4
4
|
"description": "A personal card for Ahmed El Gabri (@ahmedelgabri)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"card",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"bin": {
|
|
42
|
-
"ahmedelgabri": "./esm/
|
|
42
|
+
"ahmedelgabri": "./esm/card.js"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"boxen": "7.1.1",
|
package/script/card.js
ADDED
package/script/mod.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
"use strict";
|
|
3
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
3
|
if (k2 === undefined) k2 = k;
|
|
@@ -27,35 +26,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
27
|
};
|
|
29
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.
|
|
31
|
-
require("./_dnt.polyfills.js");
|
|
29
|
+
exports.getCard = void 0;
|
|
32
30
|
require("./_dnt.polyfills.js");
|
|
33
31
|
const dntShim = __importStar(require("./_dnt.shims.js"));
|
|
34
32
|
const c = __importStar(require("./deps/jsr.io/@std/fmt/0.221.0/colors.js"));
|
|
35
33
|
const boxen_1 = __importDefault(require("boxen"));
|
|
36
34
|
const fullname = "Ahmed El Gabri";
|
|
37
35
|
const social = fullname.toLowerCase().replaceAll(" ", "");
|
|
38
|
-
const mastodonHandle = fullname.toLowerCase().split(" ").at(-1);
|
|
39
36
|
const jsrUserName = fullname.toLowerCase().split(" ").at(0);
|
|
40
|
-
|
|
37
|
+
const domain = fullname.toLowerCase().split(" ").at(-1);
|
|
41
38
|
const handle = c.blue(social);
|
|
42
|
-
const work = c.reset(
|
|
39
|
+
const work = c.reset(`Staff Software Engineer ${c.yellow("@Mirohq")}`);
|
|
43
40
|
const twitter = c.blue(`https://twitter.com/${handle}`);
|
|
44
41
|
const github = c.blue(`https://github.com/${handle}`);
|
|
45
42
|
const linkedin = c.blue(`https://linkedin.com/in/${handle}`);
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const deno = c.reset(`deno run --allow-env jsr:@${c.blue(jsrUserName)}/card`);
|
|
43
|
+
const web = c.blue(`https://${domain}.me`);
|
|
44
|
+
const npx = c.reset(`npx ${handle}@latest`);
|
|
45
|
+
const deno = c.reset(`deno run -r --allow-env jsr:@${c.blue(jsrUserName)}/card`);
|
|
50
46
|
const labelWork = c.gray(" Work: ");
|
|
51
|
-
const labelTwitter = c.dim(" Twitter: ");
|
|
52
|
-
const labelGitHub = c.dim("
|
|
53
|
-
const labelLinkedIn = c.dim("LinkedIn: ");
|
|
54
|
-
const labelWeb = c.dim("
|
|
55
|
-
const labelNode = c.gray("
|
|
56
|
-
const labelDeno = c.gray("
|
|
57
|
-
const labelMastodon = c.dim("Mastodon: ");
|
|
58
|
-
// Actual strings we're going to output
|
|
47
|
+
const labelTwitter = c.dim(" Twitter/X: ");
|
|
48
|
+
const labelGitHub = c.dim(" GitHub: ");
|
|
49
|
+
const labelLinkedIn = c.dim(" LinkedIn: ");
|
|
50
|
+
const labelWeb = c.dim(" Web: ");
|
|
51
|
+
const labelNode = c.gray(" Node: ");
|
|
52
|
+
const labelDeno = c.gray(" Deno: ");
|
|
59
53
|
const working = `${labelWork} ${work}`;
|
|
60
54
|
const twittering = `${labelTwitter} ${twitter}`;
|
|
61
55
|
const githubing = `${labelGitHub} ${github}`;
|
|
@@ -63,18 +57,7 @@ const linkedining = `${labelLinkedIn} ${linkedin}`;
|
|
|
63
57
|
const webing = `${labelWeb} ${web}`;
|
|
64
58
|
const npming = `${labelNode} ${npx}`;
|
|
65
59
|
const denoing = `${labelDeno} ${deno}`;
|
|
66
|
-
const
|
|
67
|
-
// Put all our output together into a single variable so we can use boxen effectively
|
|
68
|
-
const output = `${working}
|
|
69
|
-
|
|
70
|
-
${githubing}
|
|
71
|
-
${linkedining}
|
|
72
|
-
${twittering}
|
|
73
|
-
${mastodoning}
|
|
74
|
-
${webing}
|
|
75
|
-
|
|
76
|
-
${denoing}
|
|
77
|
-
${npming}`;
|
|
60
|
+
const output = `${working}\n\n${githubing}\n${linkedining}\n${twittering}\n${webing}\n\n${denoing}\n${npming}`;
|
|
78
61
|
/**
|
|
79
62
|
* Returns a boxed and colored personal card containing personal information
|
|
80
63
|
*
|
|
@@ -90,16 +73,8 @@ function getCard() {
|
|
|
90
73
|
});
|
|
91
74
|
}
|
|
92
75
|
exports.getCard = getCard;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
* colors
|
|
96
|
-
*
|
|
97
|
-
* @returns {string}
|
|
98
|
-
*/
|
|
99
|
-
function getPlainCard() {
|
|
100
|
-
return output;
|
|
101
|
-
}
|
|
102
|
-
exports.getPlainCard = getPlainCard;
|
|
76
|
+
// Needed for deno run ...
|
|
77
|
+
// card.ts is needed for npx ...
|
|
103
78
|
if ((require.main === module)) {
|
|
104
79
|
console.log(getCard());
|
|
105
80
|
}
|
package/types/card.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../src/card.ts"],"names":[],"mappings":";AACA,OAAO,qBAAqB,CAAC"}
|
package/types/mod.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import "./_dnt.polyfills.js";
|
|
3
1
|
import "./_dnt.polyfills.js";
|
|
4
2
|
/**
|
|
5
3
|
* Returns a boxed and colored personal card containing personal information
|
|
@@ -7,11 +5,4 @@ import "./_dnt.polyfills.js";
|
|
|
7
5
|
* @returns {string}
|
|
8
6
|
*/
|
|
9
7
|
export declare function getCard(): string;
|
|
10
|
-
/**
|
|
11
|
-
* Returns personal card containing personal information without ascii art or
|
|
12
|
-
* colors
|
|
13
|
-
*
|
|
14
|
-
* @returns {string}
|
|
15
|
-
*/
|
|
16
|
-
export declare function getPlainCard(): string;
|
|
17
8
|
//# sourceMappingURL=mod.d.ts.map
|
package/types/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAuC7B;;;;GAIG;AACH,wBAAgB,OAAO,IAAI,MAAM,CAQhC"}
|