webfont-awesome-pro 1.0.0 → 1.1.0
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 +31 -17
- package/dist/fapro.d.ts.map +1 -1
- package/dist/index.cjs +11 -7
- package/dist/index.cjs.map +1 -1
- package/dist/module.mjs +11 -7
- package/dist/module.mjs.map +1 -1
- package/dist/types/webfapro.d.ts +2 -0
- package/dist/webfapro.js +3 -0
- package/dist/webfapro.js.map +1 -0
- package/package.json +95 -72
package/README.md
CHANGED
|
@@ -1,25 +1,46 @@
|
|
|
1
|
-
# Font Awesome Pro
|
|
1
|
+
# Font Awesome Pro Plus Downloader
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use the Latest [**Font Awesome Pro Plus**](https://fontawesome.com/) for Free. Get all stylesheets and webfonts into your project easily!
|
|
4
4
|
|
|
5
|
-
- Downloader Version: v1.
|
|
5
|
+
- Downloader Version: v1.1.0
|
|
6
6
|
- Font Awesome Pro Version: v7.0.0
|
|
7
7
|
|
|
8
8
|
## NOTICE
|
|
9
|
-
**Font Awesome Pro** Downloader was made for educational purposes only!
|
|
9
|
+
**Font Awesome Pro Plus** Downloader was made for educational purposes only!
|
|
10
10
|
|
|
11
|
-
This downloader provides **Paid
|
|
11
|
+
This downloader provides **Paid (Pro Plus) Version** for the latest official package. It is intended for experimental and **personal use** only. It is **licensed for commercial** use.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
**DO NOT** use this downloader if you are not the *Creators* or you have not buy the official product from the official website.
|
|
14
|
+
|
|
15
|
+
To unlock commercial use for your own projects, and get an official product license, please consider to go to the Font Awesome official webiste: https://fontawesome.com/plans
|
|
14
16
|
|
|
15
17
|
## SETUP
|
|
16
18
|
|
|
17
|
-
```
|
|
19
|
+
```bash
|
|
18
20
|
npm install webfont-awesome-pro
|
|
19
21
|
```
|
|
20
22
|
|
|
21
23
|
## USAGE
|
|
22
24
|
|
|
25
|
+
Choose one from the following how you want to use the downloader.
|
|
26
|
+
|
|
27
|
+
#### Command Line
|
|
28
|
+
```bash
|
|
29
|
+
npx webfapro
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
#### Script `package.json`
|
|
33
|
+
```javascript
|
|
34
|
+
...
|
|
35
|
+
"scripts": {
|
|
36
|
+
...
|
|
37
|
+
"get-fapro": "webfapro"
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
```bash
|
|
41
|
+
npm run get-fapro
|
|
42
|
+
```
|
|
43
|
+
|
|
23
44
|
#### JavaScript/TypeScript ES Modules - import
|
|
24
45
|
```javascript
|
|
25
46
|
import { getFapro } from "webfont-awesome-pro";
|
|
@@ -36,15 +57,8 @@ const { getFapro } = require("webfont-awesome-pro");
|
|
|
36
57
|
getFapro();
|
|
37
58
|
```
|
|
38
59
|
|
|
39
|
-
##
|
|
40
|
-
|
|
41
|
-
**Download Path Question**
|
|
60
|
+
## DOWNLOAD PATH
|
|
42
61
|
|
|
43
|
-
Type the path to save the assets. It will makes new directory if does not exist. Leave it empty to use default folder `fapro`.
|
|
62
|
+
Once the downloader is running, it will ask you to enter the download path. Type the path where you want to save the assets. It will makes new directory if does not exist. Leave it empty to use default folder `fapro`.
|
|
44
63
|
|
|
45
|
-
Example: `public/fapro`
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
Enter download path: (fapro) public/fapro
|
|
49
|
-
✅ Stylesheets and webfonts will be downloaded to `public/fapro`
|
|
50
|
-
```
|
|
64
|
+
Example: `public/assets/fapro`
|
package/dist/fapro.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AW0BA,qCAAqC,IAAI,CAExC;AACD,4BAA4B,IAAI,CAE/B","sources":["src/src/helper/waittime.ts","src/src/main/question.ts","src/src/pages/askQuestions.ts","src/src/main/dir-checker.ts","src/src/main/file-downloader.ts","src/src/pages/cssDownload.ts","src/src/main/font-extractor.ts","src/src/pages/fontsDownload.ts","src/src/pages/fa.types.ts","src/src/pages/versionCheck.ts","src/src/pages/noticeOfficial.ts","src/src/index.ts","src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,"import chalk from \"chalk\"\
|
|
1
|
+
{"mappings":"AW0BA,qCAAqC,IAAI,CAExC;AACD,4BAA4B,IAAI,CAE/B","sources":["src/src/helper/waittime.ts","src/src/main/question.ts","src/src/pages/askQuestions.ts","src/src/main/dir-checker.ts","src/src/main/file-downloader.ts","src/src/pages/cssDownload.ts","src/src/main/font-extractor.ts","src/src/pages/fontsDownload.ts","src/src/pages/fa.types.ts","src/src/pages/versionCheck.ts","src/src/pages/noticeOfficial.ts","src/src/index.ts","src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,"import chalk from \"chalk\"\nimport waittime from \"./helper/waittime\"\nimport askQuestion from \"./pages/askQuestions\"\nimport cssDownload from \"./pages/cssDownload\"\nimport { downloadFonts, readFonts } from \"./pages/fontsDownload\"\nimport checkVersion from \"./pages/versionCheck\"\nimport unofficialNotice from \"./pages/noticeOfficial\"\n\nasync function startDownloader(): Promise<void> {\n await waittime(100)\n console.clear()\n const { isOk } = await unofficialNotice()\n if (!isOk) return\n const { useDir } = await askQuestion()\n const { fontlist, useVer, baseUrl } = await checkVersion()\n const cssUrls: string[] = await cssDownload(useVer, useDir, fontlist)\n const fontUrls: string[] = await readFonts(cssUrls, useDir)\n await downloadFonts(fontUrls, useDir, baseUrl)\n await waittime(2000)\n console.log(\"--------\")\n await waittime(1000)\n console.log(chalk.green(`✅ Font Awesome ${useVer.split(\".\")[0]} Pro Plus v${useVer} Downloaded Successfully!`))\n await waittime(1000)\n console.log(chalk.bgGreen.black(\" --- DONE --- \"))\n await waittime(2000)\n}\nexport function getFontAwesomePro(): void {\n startDownloader()\n}\nexport function getFapro(): void {\n startDownloader()\n}\n"],"names":[],"version":3,"file":"fapro.d.ts.map","sourceRoot":"../"}
|
package/dist/index.cjs
CHANGED
|
@@ -221,7 +221,7 @@ async function $b5a14f8b420f5894$export$2e2bcd8739ae039() {
|
|
|
221
221
|
console.log("--------");
|
|
222
222
|
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(1000);
|
|
223
223
|
console.log(" ");
|
|
224
|
-
console.log((0, ($parcel$interopDefault($cl6Iw$chalk))).bgGreen.black(` -- Downloading Version ${curFonts.version} of Font Awesome ${curFonts.version.split(".")[0]} Pro -- `));
|
|
224
|
+
console.log((0, ($parcel$interopDefault($cl6Iw$chalk))).bgGreen.black(` -- Downloading Version ${curFonts.version} of Font Awesome ${curFonts.version.split(".")[0]} Pro Plus -- `));
|
|
225
225
|
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(1000);
|
|
226
226
|
console.log(" ");
|
|
227
227
|
console.log("--------");
|
|
@@ -243,19 +243,23 @@ async function $b5a14f8b420f5894$export$2e2bcd8739ae039() {
|
|
|
243
243
|
|
|
244
244
|
|
|
245
245
|
async function $4eef5e371b281461$export$2e2bcd8739ae039() {
|
|
246
|
-
console.log((0, ($parcel$interopDefault($cl6Iw$chalk))).bgCyan.black(" -- Font Awesome Pro Downloader | Devanka761 -- "));
|
|
246
|
+
console.log((0, ($parcel$interopDefault($cl6Iw$chalk))).bgCyan.black(" -- Font Awesome Pro Plus Downloader | Devanka761 -- "));
|
|
247
247
|
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(500);
|
|
248
248
|
console.log("");
|
|
249
249
|
console.log("--------");
|
|
250
|
-
console.log(`Font Awesome Pro Downloader was made for ${(0, ($parcel$interopDefault($cl6Iw$chalk))).yellow("educational purposes")} only!`);
|
|
250
|
+
console.log(`Font Awesome Pro Plus Downloader was made for ${(0, ($parcel$interopDefault($cl6Iw$chalk))).yellow("educational purposes")} only!`);
|
|
251
251
|
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(100);
|
|
252
252
|
console.log("--------");
|
|
253
253
|
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(100);
|
|
254
|
-
console.log(`This downloader provides ${(0, ($parcel$interopDefault($cl6Iw$chalk))).bold.green("Paid
|
|
254
|
+
console.log(`This downloader provides ${(0, ($parcel$interopDefault($cl6Iw$chalk))).bold.green("Paid (Pro Plus) Version")} for the latest Official Package. It is intended for ${(0, ($parcel$interopDefault($cl6Iw$chalk))).yellow("experimental")} and ${(0, ($parcel$interopDefault($cl6Iw$chalk))).yellow("personal use")} only. It is ${(0, ($parcel$interopDefault($cl6Iw$chalk))).red("licensed for commercial")} use.`);
|
|
255
255
|
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(100);
|
|
256
256
|
console.log("--------");
|
|
257
257
|
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(100);
|
|
258
|
-
console.log(
|
|
258
|
+
console.log(`${(0, ($parcel$interopDefault($cl6Iw$chalk))).red("DO NOT")} use this downloader if you are not a ${(0, ($parcel$interopDefault($cl6Iw$chalk))).bold.green("Creator")} or you have never buy the official product from the official website.`);
|
|
259
|
+
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(100);
|
|
260
|
+
console.log("--------");
|
|
261
|
+
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(100);
|
|
262
|
+
console.log(`To unlock commercial use for your own projects, and get an official product license, please consider to go to the ${(0, ($parcel$interopDefault($cl6Iw$chalk))).green("Font Awesome")} webiste: ${(0, ($parcel$interopDefault($cl6Iw$chalk))).green("https://fontawesome.com/plans")}`);
|
|
259
263
|
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(100);
|
|
260
264
|
console.log("--------");
|
|
261
265
|
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(500);
|
|
@@ -271,7 +275,7 @@ async function $4eef5e371b281461$export$2e2bcd8739ae039() {
|
|
|
271
275
|
if (!isOk) {
|
|
272
276
|
console.log("--------");
|
|
273
277
|
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(1000);
|
|
274
|
-
console.log((0, ($parcel$interopDefault($cl6Iw$chalk))).red("\u26D4 Font Awesome Pro Downloader Canceled"));
|
|
278
|
+
console.log((0, ($parcel$interopDefault($cl6Iw$chalk))).red("\u26D4 Font Awesome Pro Plus Downloader Canceled"));
|
|
275
279
|
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(1000);
|
|
276
280
|
console.log((0, ($parcel$interopDefault($cl6Iw$chalk))).bgRed.black(" --- DONE --- "));
|
|
277
281
|
}
|
|
@@ -294,7 +298,7 @@ async function $123f4982a51872b4$var$startDownloader() {
|
|
|
294
298
|
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(2000);
|
|
295
299
|
console.log("--------");
|
|
296
300
|
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(1000);
|
|
297
|
-
console.log((0, ($parcel$interopDefault($cl6Iw$chalk))).green(`\u{2705} Font Awesome ${useVer.split(".")[0]} Pro v${useVer} Downloaded Successfully!`));
|
|
301
|
+
console.log((0, ($parcel$interopDefault($cl6Iw$chalk))).green(`\u{2705} Font Awesome ${useVer.split(".")[0]} Pro Plus v${useVer} Downloaded Successfully!`));
|
|
298
302
|
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(1000);
|
|
299
303
|
console.log((0, ($parcel$interopDefault($cl6Iw$chalk))).bgGreen.black(" --- DONE --- "));
|
|
300
304
|
await (0, $4335f2725be7a2e4$export$2e2bcd8739ae039)(2000);
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;ACAe,kDAAkB,KAAa,GAAG,EAAE,IAAY,CAAC;IAC9D,OAAO,IAAI,QAAQ,CAAC,UAAY,WAAW,SAAS,KAAK;AAC3D;;;;;AEAO,SAAS,0CAAS,IAAY;IACnC,OAAO,IAAI,QAAQ,CAAC;QAClB,MAAM,KAAK,CAAA,GAAA,yCAAO,EAAE,eAAe,CAAC;YAClC,OAAO,QAAQ,KAAK;YACpB,QAAQ,QAAQ,MAAM;QACxB;QACA,GAAG,QAAQ,CAAC,MAAM,CAAC;YAC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QACf,QAAQ,GAAG,CAAC,CAAA,GAAA,sCAAI,EAAE,GAAG,CAAC;QACtB,MAAM,CAAA,GAAA,wCAAO,EAAE;QACf,QAAQ,GAAG,CAAC,CAAA,GAAA,sCAAI,EAAE,KAAK,CAAC,KAAK,CAAC;IAChC;IAEA,OAAO;cAAE;IAAK;AAChB;;;AX3BA,eAAe;IACb,MAAM,CAAA,GAAA,wCAAO,EAAE;IACf,QAAQ,KAAK;IACb,MAAM,QAAE,IAAI,EAAE,GAAG,MAAM,CAAA,GAAA,wCAAe;IACtC,IAAI,CAAC,MAAM;IACX,MAAM,UAAE,MAAM,EAAE,GAAG,MAAM,CAAA,GAAA,wCAAU;IACnC,MAAM,YAAE,QAAQ,UAAE,MAAM,WAAE,OAAO,EAAE,GAAG,MAAM,CAAA,GAAA,wCAAW;IACvD,MAAM,UAAoB,MAAM,CAAA,GAAA,wCAAU,EAAE,QAAQ,QAAQ;IAC5D,MAAM,WAAqB,MAAM,CAAA,GAAA,yCAAQ,EAAE,SAAS;IACpD,MAAM,CAAA,GAAA,yCAAY,EAAE,UAAU,QAAQ;IACtC,MAAM,CAAA,GAAA,wCAAO,EAAE;IACf,QAAQ,GAAG,CAAC;IACZ,MAAM,CAAA,GAAA,wCAAO,EAAE;IACf,QAAQ,GAAG,CAAC,CAAA,GAAA,sCAAI,EAAE,KAAK,CAAC,CAAC,sBAAe,EAAE,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,yBAAyB,CAAC;IACxG,MAAM,CAAA,GAAA,wCAAO,EAAE;IACf,QAAQ,GAAG,CAAC,CAAA,GAAA,sCAAI,EAAE,OAAO,CAAC,KAAK,CAAC;IAChC,MAAM,CAAA,GAAA,wCAAO,EAAE;AACjB;AACO,SAAS;IACd;AACF;AACO,SAAS;IACd;AACF","sources":["src/index.ts","src/helper/waittime.ts","src/pages/askQuestions.ts","src/main/question.ts","src/pages/cssDownload.ts","src/main/file-downloader.ts","src/main/dir-checker.ts","src/pages/fontsDownload.ts","src/main/font-extractor.ts","src/pages/versionCheck.ts","src/json/fonts.json","src/pages/noticeOfficial.ts"],"sourcesContent":["import chalk from \"chalk\"\r\nimport waittime from \"./helper/waittime\"\r\nimport askQuestion from \"./pages/askQuestions\"\r\nimport cssDownload from \"./pages/cssDownload\"\r\nimport { downloadFonts, readFonts } from \"./pages/fontsDownload\"\r\nimport checkVersion from \"./pages/versionCheck\"\r\nimport unofficialNotice from \"./pages/noticeOfficial\"\r\n\r\nasync function startDownloader(): Promise<void> {\r\n await waittime(100)\r\n console.clear()\r\n const { isOk } = await unofficialNotice()\r\n if (!isOk) return\r\n const { useDir } = await askQuestion()\r\n const { fontlist, useVer, baseUrl } = await checkVersion()\r\n const cssUrls: string[] = await cssDownload(useVer, useDir, fontlist)\r\n const fontUrls: string[] = await readFonts(cssUrls, useDir)\r\n await downloadFonts(fontUrls, useDir, baseUrl)\r\n await waittime(2000)\r\n console.log(\"--------\")\r\n await waittime(1000)\r\n console.log(chalk.green(`✅ Font Awesome ${useVer.split(\".\")[0]} Pro v${useVer} Downloaded Successfully!`))\r\n await waittime(1000)\r\n console.log(chalk.bgGreen.black(\" --- DONE --- \"))\r\n await waittime(2000)\r\n}\r\nexport function getFontAwesomePro(): void {\r\n startDownloader()\r\n}\r\nexport function getFapro(): void {\r\n startDownloader()\r\n}\r\n","export default function waittime(ms: number = 500, n: number = 5): Promise<void> {\r\n return new Promise((resolve) => setTimeout(resolve, ms - n))\r\n}\r\n","import chalk from \"chalk\"\r\nimport { question } from \"../main/question\"\r\nimport waittime from \"../helper/waittime\"\r\n\r\nexport default async function askQuestion(): Promise<{ useDir: string }> {\r\n console.log(\"--------\")\r\n await waittime(1000)\r\n console.log(\" \")\r\n await waittime(100)\r\n console.log(`Set the ${chalk.cyan(\"Download Path\")}!`)\r\n await waittime(100)\r\n console.log(\"--------\")\r\n await waittime(100)\r\n console.log(\"Download path can be \" + chalk.cyan(\"`path/to/your/public/folder`\") + \" or \" + chalk.cyan(\"`anything`\") + \".\")\r\n await waittime(100)\r\n console.log(\"--------\")\r\n await waittime(100)\r\n console.log(\"if the path does not exist, it will be created automatically.\")\r\n await waittime(500)\r\n console.log(\"--------\")\r\n const dir = await question(`Enter download path: ${chalk.bold.cyan(\"(fapro)\")} `)\r\n const useDir = dir ? dir : \"fapro\"\r\n console.log(chalk.bold.cyan(`${useDir}`) + `${dir ? \"\" : \" (default)\"}`)\r\n console.log(\"--------\")\r\n await waittime(750)\r\n console.log(\" \")\r\n console.log(chalk.bgYellow.black(\" -- Preparing Downloader -- \"))\r\n await waittime(2250)\r\n console.log(\" \")\r\n return { useDir }\r\n}\r\n","import readline from \"readline\"\r\n\r\nexport function question(text: string): Promise<string> {\r\n return new Promise((resolve) => {\r\n const rl = readline.createInterface({\r\n input: process.stdin,\r\n output: process.stdout\r\n })\r\n rl.question(text, (anwer) => {\r\n resolve(anwer)\r\n rl.close()\r\n })\r\n })\r\n}\r\n","import chalk from \"chalk\"\r\nimport { downloadFile, getDownloaded } from \"../main/file-downloader\"\r\nimport waittime from \"../helper/waittime\"\r\n\r\nexport default async function cssDownload(useVer: string, useDir: string, fontlist: string[]): Promise<string[]> {\r\n console.log(\"--------\")\r\n console.log(`🕗 Downloading All Stylesheets`)\r\n await waittime(2000)\r\n\r\n const dir = `${useDir}/css`\r\n\r\n for (let i = 0; i < fontlist.length; i++) {\r\n const url = fontlist[i]\r\n const progress = `[${i + 1}/${fontlist.length}]`\r\n await downloadFile(url, dir, progress)\r\n }\r\n console.log(chalk.greenBright(\"✅ Stylesheets Downloaded\"))\r\n await waittime(2000)\r\n return getDownloaded()\r\n}\r\n","import { Downloader } from \"nodejs-file-downloader\"\r\nimport { addDir } from \"./dir-checker\"\r\nimport chalk from \"chalk\"\r\n\r\nlet filesDownloaded: string[] = []\r\n\r\nexport async function downloadFile(fileurl: string, filedir: string, progress: string | null = null): Promise<void> {\r\n await addDir(`${filedir}`)\r\n const downloader = new Downloader({\r\n url: fileurl,\r\n directory: `./${filedir}`,\r\n cloneFiles: false\r\n })\r\n try {\r\n await downloader.download()\r\n const fileorigin = fileurl.split(\"/\")\r\n const filename = fileorigin[fileorigin.length - 1]\r\n console.log(`🚀 ${progress ? chalk.yellow(progress) + \" \" : \"\"}${filename}`)\r\n filesDownloaded.push(filename)\r\n } catch (_error) {\r\n throw new Error(chalk.red(\"The version you wanted to download is not available. Please use other release version.\"))\r\n }\r\n}\r\nexport function getDownloaded(): string[] {\r\n const files: string[] = [...filesDownloaded]\r\n filesDownloaded = []\r\n return files\r\n}\r\n","import fs from \"fs\"\r\nimport waittime from \"../helper/waittime\"\r\n\r\nexport async function addDir(dirpath: string): Promise<void> {\r\n let curpath = \".\"\r\n const dirs: string[] = dirpath.split(\"/\")\r\n\r\n for (const dir of dirs) {\r\n curpath += `/${dir}`\r\n if (!fs.existsSync(curpath)) {\r\n fs.mkdirSync(curpath)\r\n await waittime(100)\r\n }\r\n }\r\n}\r\n","import { addDir } from \"../main/dir-checker\"\r\nimport waittime from \"../helper/waittime\"\r\nimport { extractFont, getFonts } from \"../main/font-extractor\"\r\nimport { downloadFile } from \"../main/file-downloader\"\r\nimport chalk from \"chalk\"\r\n\r\nexport async function readFonts(sheets: string[], useDir: string): Promise<string[]> {\r\n console.log(\"--------\")\r\n console.log(\"🕗 Reading Available Webfonts\")\r\n const dir = `${useDir}/css`\r\n for (const sheet of sheets) {\r\n await extractFont(sheet, dir)\r\n }\r\n const fonts = getFonts()\r\n console.log(\"✅ Found \" + chalk.green(fonts.length.toString()) + \" Webfonts\")\r\n await waittime(2000)\r\n return fonts\r\n}\r\nexport async function downloadFonts(fonts: string[], filedir: string, baseUrl: string): Promise<void> {\r\n const dir = `${filedir}/webfonts`\r\n await addDir(dir)\r\n const fonturl = baseUrl\r\n console.log(\"--------\")\r\n console.log(\"🕗 Downloading All Webfonts\")\r\n await waittime(2000)\r\n for (let i = 0; i < fonts.length; i++) {\r\n const font = fonts[i].replace(\"..\", \"\")\r\n const url = `${fonturl}${font}`\r\n const progress = `[${i + 1}/${fonts.length}]`\r\n await downloadFile(url, dir, progress)\r\n }\r\n console.log(chalk.greenBright(\"✅ Webfonts Downloaded\"))\r\n}\r\n","import fs from \"fs\"\r\nimport postcss from \"postcss\"\r\nimport safeParser from \"postcss-safe-parser\"\r\n\r\nlet fontUrls: string[] = []\r\n\r\nexport async function extractFont(filename: string, filedir: string): Promise<void> {\r\n const css = fs.readFileSync(`./${filedir}/${filename}`, \"utf8\")\r\n postcss()\r\n .process(css, { parser: safeParser, from: undefined })\r\n .then((result) => {\r\n result.root.walkAtRules(\"font-face\", (rule) => {\r\n rule.walkDecls(\"src\", (decl) => {\r\n const matches = decl.value.match(/url\\(([^)]+)\\)/g)\r\n if (matches) {\r\n matches.forEach((url) => {\r\n const cleanUrl = url.replace(/url\\([\"']?/, \"\").replace(/[\"']?\\)/, \"\")\r\n fontUrls.push(cleanUrl)\r\n })\r\n }\r\n })\r\n })\r\n })\r\n}\r\n\r\nexport function getFonts(): string[] {\r\n const fixedFonts: string[] = [...fontUrls]\r\n fontUrls = []\r\n return fixedFonts\r\n}\r\n","import { Ver } from \"./fa.types\"\r\nimport defVer from \"../json/fonts.json\"\r\nimport waittime from \"../helper/waittime\"\r\nimport chalk from \"chalk\"\r\n\r\nasync function getVersion(): Promise<Ver> {\r\n const url = `https://raw.githubusercontent.com/devanka761/webfont-awesome-pro/refs/heads/master/src/json/fonts.json?ts=${Date.now().toString(36)}`\r\n\r\n return await fetch(url, {\r\n method: \"GET\"\r\n })\r\n .then((res) => res.json())\r\n .then((res) => {\r\n console.log(`✅ Found: v${res.version}`)\r\n return res\r\n })\r\n .catch(() => {\r\n console.log(`⛔ Error getting the latest version!`)\r\n console.log(`⛔ Forced Using v${defVer.version}`)\r\n return defVer\r\n })\r\n}\r\n\r\nexport default async function checkVersion(): Promise<{ fontlist: string[]; useVer: string; baseUrl: string }> {\r\n console.log(\"--------\")\r\n console.log(\"🕗 Checking Latest Version\")\r\n await waittime(1000)\r\n const curFonts = await getVersion()\r\n await waittime(100)\r\n console.log(\"--------\")\r\n await waittime(1000)\r\n console.log(\" \")\r\n console.log(chalk.bgGreen.black(` -- Downloading Version ${curFonts.version} of Font Awesome ${curFonts.version.split(\".\")[0]} Pro -- `))\r\n await waittime(1000)\r\n console.log(\" \")\r\n console.log(\"--------\")\r\n await waittime(100)\r\n console.log(\"🕗 Reading Available Stylesheets\")\r\n await waittime(500)\r\n const fontlist = curFonts.css.map((file) => `${curFonts.root}/css/${file}`)\r\n console.log(\"✅ Found \" + chalk.green(fontlist.length.toString()) + \" Sytlesheets\")\r\n await waittime(2000)\r\n return { fontlist, useVer: curFonts.version, baseUrl: curFonts.root }\r\n}\r\n","{ \"version\": \"7.0.0\", \"root\": \"https://site-assets.fontawesome.com/releases/v7.0.0\", \"css\": [\"fontawesome.css\", \"whiteboard-semibold.css\", \"thumbprint-light.css\", \"slab-press-regular.css\", \"slab-regular.css\", \"sharp-duotone-thin.css\", \"sharp-duotone-solid.css\", \"sharp-duotone-regular.css\", \"sharp-duotone-light.css\", \"sharp-thin.css\", \"sharp-solid.css\", \"sharp-regular.css\", \"sharp-light.css\", \"notdog-duo-solid.css\", \"notdog-solid.css\", \"jelly-fill-regular.css\", \"jelly-duo-regular.css\", \"jelly-regular.css\", \"etch-solid.css\", \"duotone-thin.css\", \"duotone.css\", \"duotone-regular.css\", \"duotone-light.css\", \"thin.css\", \"solid.css\", \"regular.css\", \"light.css\", \"brands.css\", \"chisel-regular.css\"] }\r\n","import chalk from \"chalk\"\r\nimport waittime from \"../helper/waittime\"\r\nimport { question } from \"../main/question\"\r\n\r\nexport default async function unofficialNotice(): Promise<{ isOk: boolean }> {\r\n console.log(chalk.bgCyan.black(\" -- Font Awesome Pro Downloader | Devanka761 -- \"))\r\n await waittime(500)\r\n console.log(\"\")\r\n console.log(\"--------\")\r\n console.log(`Font Awesome Pro Downloader was made for ${chalk.yellow(\"educational purposes\")} only!`)\r\n await waittime(100)\r\n console.log(\"--------\")\r\n await waittime(100)\r\n console.log(`This downloader provides ${chalk.bold.green(\"Paid version\")} for the latest Official Package. It is intended for ${chalk.yellow(\"experimental\")} and ${chalk.yellow(\"personal use\")} only. It is ${chalk.red(\"not licensed\")} for commercial use.`)\r\n await waittime(100)\r\n console.log(\"--------\")\r\n await waittime(100)\r\n console.log(`To unlock commercial use and get an official product license, please consider to go to the ${chalk.green(\"Font Awesome\")} webiste: ${chalk.green(\"https://fontawesome.com/plans\")}`)\r\n await waittime(100)\r\n console.log(\"--------\")\r\n await waittime(500)\r\n let agree = await question(`Continue to download? (${chalk.cyan(\"Y\")}/n) `)\r\n agree = agree ? agree.toLowerCase() : \"y\"\r\n const notAgrees = [\"no\", \"n\", \"nope\"]\r\n const isOk = notAgrees.find((textNo) => textNo === agree) ? false : true\r\n console.log(chalk.cyan(isOk ? \"y\" : \"n\"))\r\n if (!isOk) {\r\n console.log(\"--------\")\r\n await waittime(1000)\r\n console.log(chalk.red(\"⛔ Font Awesome Pro Downloader Canceled\"))\r\n await waittime(1000)\r\n console.log(chalk.bgRed.black(\" --- DONE --- \"))\r\n }\r\n\r\n return { isOk }\r\n}\r\n"],"names":[],"version":3,"file":"index.cjs.map","sourceRoot":"../"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;ACAe,kDAAkB,KAAa,GAAG,EAAE,IAAY,CAAC;IAC9D,OAAO,IAAI,QAAQ,CAAC,UAAY,WAAW,SAAS,KAAK;AAC3D;;;;;AEAO,SAAS,0CAAS,IAAY;IACnC,OAAO,IAAI,QAAQ,CAAC;QAClB,MAAM,KAAK,CAAA,GAAA,yCAAO,EAAE,eAAe,CAAC;YAClC,OAAO,QAAQ,KAAK;YACpB,QAAQ,QAAQ,MAAM;QACxB;QACA,GAAG,QAAQ,CAAC,MAAM,CAAC;YACjB,QAAQ;YACR,GAAG,KAAK;QACV;IACF;AACF;;;;ADTe;IACb,QAAQ,GAAG,CAAC;IACZ,MAAM,CAAA,GAAA,wCAAO,EAAE;I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;AACO,SAAS;IACd;AACF;AACO,SAAS;IACd;AACF","sources":["src/index.ts","src/helper/waittime.ts","src/pages/askQuestions.ts","src/main/question.ts","src/pages/cssDownload.ts","src/main/file-downloader.ts","src/main/dir-checker.ts","src/pages/fontsDownload.ts","src/main/font-extractor.ts","src/pages/versionCheck.ts","src/json/fonts.json","src/pages/noticeOfficial.ts"],"sourcesContent":["import chalk from \"chalk\"\nimport waittime from \"./helper/waittime\"\nimport askQuestion from \"./pages/askQuestions\"\nimport cssDownload from \"./pages/cssDownload\"\nimport { downloadFonts, readFonts } from \"./pages/fontsDownload\"\nimport checkVersion from \"./pages/versionCheck\"\nimport unofficialNotice from \"./pages/noticeOfficial\"\n\nasync function startDownloader(): Promise<void> {\n await waittime(100)\n console.clear()\n const { isOk } = await unofficialNotice()\n if (!isOk) return\n const { useDir } = await askQuestion()\n const { fontlist, useVer, baseUrl } = await checkVersion()\n const cssUrls: string[] = await cssDownload(useVer, useDir, fontlist)\n const fontUrls: string[] = await readFonts(cssUrls, useDir)\n await downloadFonts(fontUrls, useDir, baseUrl)\n await waittime(2000)\n console.log(\"--------\")\n await waittime(1000)\n console.log(chalk.green(`✅ Font Awesome ${useVer.split(\".\")[0]} Pro Plus v${useVer} Downloaded Successfully!`))\n await waittime(1000)\n console.log(chalk.bgGreen.black(\" --- DONE --- \"))\n await waittime(2000)\n}\nexport function getFontAwesomePro(): void {\n startDownloader()\n}\nexport function getFapro(): void {\n startDownloader()\n}\n","export default function waittime(ms: number = 500, n: number = 5): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms - n))\n}\n","import chalk from \"chalk\"\nimport { question } from \"../main/question\"\nimport waittime from \"../helper/waittime\"\n\nexport default async function askQuestion(): Promise<{ useDir: string }> {\n console.log(\"--------\")\n await waittime(1000)\n console.log(\" \")\n await waittime(100)\n console.log(`Set the ${chalk.cyan(\"Download Path\")}!`)\n await waittime(100)\n console.log(\"--------\")\n await waittime(100)\n console.log(\"Download path can be \" + chalk.cyan(\"`path/to/your/public/folder`\") + \" or \" + chalk.cyan(\"`anything`\") + \".\")\n await waittime(100)\n console.log(\"--------\")\n await waittime(100)\n console.log(\"if the path does not exist, it will be created automatically.\")\n await waittime(500)\n console.log(\"--------\")\n const dir = await question(`Enter download path: ${chalk.bold.cyan(\"(fapro)\")} `)\n const useDir = dir ? dir : \"fapro\"\n console.log(chalk.bold.cyan(`${useDir}`) + `${dir ? \"\" : \" (default)\"}`)\n console.log(\"--------\")\n await waittime(750)\n console.log(\" \")\n console.log(chalk.bgYellow.black(\" -- Preparing Downloader -- \"))\n await waittime(2250)\n console.log(\" \")\n return { useDir }\n}\n","import readline from \"readline\"\n\nexport function question(text: string): Promise<string> {\n return new Promise((resolve) => {\n const rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n })\n rl.question(text, (anwer) => {\n resolve(anwer)\n rl.close()\n })\n })\n}\n","import chalk from \"chalk\"\nimport { downloadFile, getDownloaded } from \"../main/file-downloader\"\nimport waittime from \"../helper/waittime\"\n\nexport default async function cssDownload(useVer: string, useDir: string, fontlist: string[]): Promise<string[]> {\n console.log(\"--------\")\n console.log(`🕗 Downloading All Stylesheets`)\n await waittime(2000)\n\n const dir = `${useDir}/css`\n\n for (let i = 0; i < fontlist.length; i++) {\n const url = fontlist[i]\n const progress = `[${i + 1}/${fontlist.length}]`\n await downloadFile(url, dir, progress)\n }\n console.log(chalk.greenBright(\"✅ Stylesheets Downloaded\"))\n await waittime(2000)\n return getDownloaded()\n}\n","import { Downloader } from \"nodejs-file-downloader\"\nimport { addDir } from \"./dir-checker\"\nimport chalk from \"chalk\"\n\nlet filesDownloaded: string[] = []\n\nexport async function downloadFile(fileurl: string, filedir: string, progress: string | null = null): Promise<void> {\n await addDir(`${filedir}`)\n const downloader = new Downloader({\n url: fileurl,\n directory: `./${filedir}`,\n cloneFiles: false\n })\n try {\n await downloader.download()\n const fileorigin = fileurl.split(\"/\")\n const filename = fileorigin[fileorigin.length - 1]\n console.log(`🚀 ${progress ? chalk.yellow(progress) + \" \" : \"\"}${filename}`)\n filesDownloaded.push(filename)\n } catch (_error) {\n throw new Error(chalk.red(\"The version you wanted to download is not available. Please use other release version.\"))\n }\n}\nexport function getDownloaded(): string[] {\n const files: string[] = [...filesDownloaded]\n filesDownloaded = []\n return files\n}\n","import fs from \"fs\"\nimport waittime from \"../helper/waittime\"\n\nexport async function addDir(dirpath: string): Promise<void> {\n let curpath = \".\"\n const dirs: string[] = dirpath.split(\"/\")\n\n for (const dir of dirs) {\n curpath += `/${dir}`\n if (!fs.existsSync(curpath)) {\n fs.mkdirSync(curpath)\n await waittime(100)\n }\n }\n}\n","import { addDir } from \"../main/dir-checker\"\nimport waittime from \"../helper/waittime\"\nimport { extractFont, getFonts } from \"../main/font-extractor\"\nimport { downloadFile } from \"../main/file-downloader\"\nimport chalk from \"chalk\"\n\nexport async function readFonts(sheets: string[], useDir: string): Promise<string[]> {\n console.log(\"--------\")\n console.log(\"🕗 Reading Available Webfonts\")\n const dir = `${useDir}/css`\n for (const sheet of sheets) {\n await extractFont(sheet, dir)\n }\n const fonts = getFonts()\n console.log(\"✅ Found \" + chalk.green(fonts.length.toString()) + \" Webfonts\")\n await waittime(2000)\n return fonts\n}\nexport async function downloadFonts(fonts: string[], filedir: string, baseUrl: string): Promise<void> {\n const dir = `${filedir}/webfonts`\n await addDir(dir)\n const fonturl = baseUrl\n console.log(\"--------\")\n console.log(\"🕗 Downloading All Webfonts\")\n await waittime(2000)\n for (let i = 0; i < fonts.length; i++) {\n const font = fonts[i].replace(\"..\", \"\")\n const url = `${fonturl}${font}`\n const progress = `[${i + 1}/${fonts.length}]`\n await downloadFile(url, dir, progress)\n }\n console.log(chalk.greenBright(\"✅ Webfonts Downloaded\"))\n}\n","import fs from \"fs\"\nimport postcss from \"postcss\"\nimport safeParser from \"postcss-safe-parser\"\n\nlet fontUrls: string[] = []\n\nexport async function extractFont(filename: string, filedir: string): Promise<void> {\n const css = fs.readFileSync(`./${filedir}/${filename}`, \"utf8\")\n postcss()\n .process(css, { parser: safeParser, from: undefined })\n .then((result) => {\n result.root.walkAtRules(\"font-face\", (rule) => {\n rule.walkDecls(\"src\", (decl) => {\n const matches = decl.value.match(/url\\(([^)]+)\\)/g)\n if (matches) {\n matches.forEach((url) => {\n const cleanUrl = url.replace(/url\\([\"']?/, \"\").replace(/[\"']?\\)/, \"\")\n fontUrls.push(cleanUrl)\n })\n }\n })\n })\n })\n}\n\nexport function getFonts(): string[] {\n const fixedFonts: string[] = [...fontUrls]\n fontUrls = []\n return fixedFonts\n}\n","import { Ver } from \"./fa.types\"\nimport defVer from \"../json/fonts.json\"\nimport waittime from \"../helper/waittime\"\nimport chalk from \"chalk\"\n\nasync function getVersion(): Promise<Ver> {\n const url = `https://raw.githubusercontent.com/devanka761/webfont-awesome-pro/refs/heads/master/src/json/fonts.json?ts=${Date.now().toString(36)}`\n\n return await fetch(url, {\n method: \"GET\"\n })\n .then((res) => res.json())\n .then((res) => {\n console.log(`✅ Found: v${res.version}`)\n return res\n })\n .catch(() => {\n console.log(`⛔ Error getting the latest version!`)\n console.log(`⛔ Forced Using v${defVer.version}`)\n return defVer\n })\n}\n\nexport default async function checkVersion(): Promise<{ fontlist: string[]; useVer: string; baseUrl: string }> {\n console.log(\"--------\")\n console.log(\"🕗 Checking Latest Version\")\n await waittime(1000)\n const curFonts = await getVersion()\n await waittime(100)\n console.log(\"--------\")\n await waittime(1000)\n console.log(\" \")\n console.log(chalk.bgGreen.black(` -- Downloading Version ${curFonts.version} of Font Awesome ${curFonts.version.split(\".\")[0]} Pro Plus -- `))\n await waittime(1000)\n console.log(\" \")\n console.log(\"--------\")\n await waittime(100)\n console.log(\"🕗 Reading Available Stylesheets\")\n await waittime(500)\n const fontlist = curFonts.css.map((file) => `${curFonts.root}/css/${file}`)\n console.log(\"✅ Found \" + chalk.green(fontlist.length.toString()) + \" Sytlesheets\")\n await waittime(2000)\n return { fontlist, useVer: curFonts.version, baseUrl: curFonts.root }\n}\n","{ \"version\": \"7.0.0\", \"root\": \"https://site-assets.fontawesome.com/releases/v7.0.0\", \"css\": [\"fontawesome.css\", \"whiteboard-semibold.css\", \"thumbprint-light.css\", \"slab-press-regular.css\", \"slab-regular.css\", \"sharp-duotone-thin.css\", \"sharp-duotone-solid.css\", \"sharp-duotone-regular.css\", \"sharp-duotone-light.css\", \"sharp-thin.css\", \"sharp-solid.css\", \"sharp-regular.css\", \"sharp-light.css\", \"notdog-duo-solid.css\", \"notdog-solid.css\", \"jelly-fill-regular.css\", \"jelly-duo-regular.css\", \"jelly-regular.css\", \"etch-solid.css\", \"duotone-thin.css\", \"duotone.css\", \"duotone-regular.css\", \"duotone-light.css\", \"thin.css\", \"solid.css\", \"regular.css\", \"light.css\", \"brands.css\", \"chisel-regular.css\"] }\n","import chalk from \"chalk\"\nimport waittime from \"../helper/waittime\"\nimport { question } from \"../main/question\"\n\nexport default async function unofficialNotice(): Promise<{ isOk: boolean }> {\n console.log(chalk.bgCyan.black(\" -- Font Awesome Pro Plus Downloader | Devanka761 -- \"))\n await waittime(500)\n console.log(\"\")\n console.log(\"--------\")\n console.log(`Font Awesome Pro Plus Downloader was made for ${chalk.yellow(\"educational purposes\")} only!`)\n await waittime(100)\n console.log(\"--------\")\n await waittime(100)\n console.log(`This downloader provides ${chalk.bold.green(\"Paid (Pro Plus) Version\")} for the latest Official Package. It is intended for ${chalk.yellow(\"experimental\")} and ${chalk.yellow(\"personal use\")} only. It is ${chalk.red(\"licensed for commercial\")} use.`)\n await waittime(100)\n console.log(\"--------\")\n await waittime(100)\n console.log(`${chalk.red(\"DO NOT\")} use this downloader if you are not a ${chalk.bold.green(\"Creator\")} or you have never buy the official product from the official website.`)\n await waittime(100)\n console.log(\"--------\")\n await waittime(100)\n console.log(`To unlock commercial use for your own projects, and get an official product license, please consider to go to the ${chalk.green(\"Font Awesome\")} webiste: ${chalk.green(\"https://fontawesome.com/plans\")}`)\n await waittime(100)\n console.log(\"--------\")\n await waittime(500)\n let agree = await question(`Continue to download? (${chalk.cyan(\"Y\")}/n) `)\n agree = agree ? agree.toLowerCase() : \"y\"\n const notAgrees = [\"no\", \"n\", \"nope\"]\n const isOk = notAgrees.find((textNo) => textNo === agree) ? false : true\n console.log(chalk.cyan(isOk ? \"y\" : \"n\"))\n if (!isOk) {\n console.log(\"--------\")\n await waittime(1000)\n console.log(chalk.red(\"⛔ Font Awesome Pro Plus Downloader Canceled\"))\n await waittime(1000)\n console.log(chalk.bgRed.black(\" --- DONE --- \"))\n }\n\n return { isOk }\n}\n"],"names":[],"version":3,"file":"index.cjs.map","sourceRoot":"../"}
|
package/dist/module.mjs
CHANGED
|
@@ -214,7 +214,7 @@ async function $6057a7b12f1c52d2$export$2e2bcd8739ae039() {
|
|
|
214
214
|
console.log("--------");
|
|
215
215
|
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(1000);
|
|
216
216
|
console.log(" ");
|
|
217
|
-
console.log((0, $hSjDC$chalk).bgGreen.black(` -- Downloading Version ${curFonts.version} of Font Awesome ${curFonts.version.split(".")[0]} Pro -- `));
|
|
217
|
+
console.log((0, $hSjDC$chalk).bgGreen.black(` -- Downloading Version ${curFonts.version} of Font Awesome ${curFonts.version.split(".")[0]} Pro Plus -- `));
|
|
218
218
|
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(1000);
|
|
219
219
|
console.log(" ");
|
|
220
220
|
console.log("--------");
|
|
@@ -236,19 +236,23 @@ async function $6057a7b12f1c52d2$export$2e2bcd8739ae039() {
|
|
|
236
236
|
|
|
237
237
|
|
|
238
238
|
async function $763cbf9c5fe61a09$export$2e2bcd8739ae039() {
|
|
239
|
-
console.log((0, $hSjDC$chalk).bgCyan.black(" -- Font Awesome Pro Downloader | Devanka761 -- "));
|
|
239
|
+
console.log((0, $hSjDC$chalk).bgCyan.black(" -- Font Awesome Pro Plus Downloader | Devanka761 -- "));
|
|
240
240
|
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(500);
|
|
241
241
|
console.log("");
|
|
242
242
|
console.log("--------");
|
|
243
|
-
console.log(`Font Awesome Pro Downloader was made for ${(0, $hSjDC$chalk).yellow("educational purposes")} only!`);
|
|
243
|
+
console.log(`Font Awesome Pro Plus Downloader was made for ${(0, $hSjDC$chalk).yellow("educational purposes")} only!`);
|
|
244
244
|
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(100);
|
|
245
245
|
console.log("--------");
|
|
246
246
|
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(100);
|
|
247
|
-
console.log(`This downloader provides ${(0, $hSjDC$chalk).bold.green("Paid
|
|
247
|
+
console.log(`This downloader provides ${(0, $hSjDC$chalk).bold.green("Paid (Pro Plus) Version")} for the latest Official Package. It is intended for ${(0, $hSjDC$chalk).yellow("experimental")} and ${(0, $hSjDC$chalk).yellow("personal use")} only. It is ${(0, $hSjDC$chalk).red("licensed for commercial")} use.`);
|
|
248
248
|
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(100);
|
|
249
249
|
console.log("--------");
|
|
250
250
|
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(100);
|
|
251
|
-
console.log(
|
|
251
|
+
console.log(`${(0, $hSjDC$chalk).red("DO NOT")} use this downloader if you are not a ${(0, $hSjDC$chalk).bold.green("Creator")} or you have never buy the official product from the official website.`);
|
|
252
|
+
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(100);
|
|
253
|
+
console.log("--------");
|
|
254
|
+
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(100);
|
|
255
|
+
console.log(`To unlock commercial use for your own projects, and get an official product license, please consider to go to the ${(0, $hSjDC$chalk).green("Font Awesome")} webiste: ${(0, $hSjDC$chalk).green("https://fontawesome.com/plans")}`);
|
|
252
256
|
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(100);
|
|
253
257
|
console.log("--------");
|
|
254
258
|
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(500);
|
|
@@ -264,7 +268,7 @@ async function $763cbf9c5fe61a09$export$2e2bcd8739ae039() {
|
|
|
264
268
|
if (!isOk) {
|
|
265
269
|
console.log("--------");
|
|
266
270
|
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(1000);
|
|
267
|
-
console.log((0, $hSjDC$chalk).red("\u26D4 Font Awesome Pro Downloader Canceled"));
|
|
271
|
+
console.log((0, $hSjDC$chalk).red("\u26D4 Font Awesome Pro Plus Downloader Canceled"));
|
|
268
272
|
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(1000);
|
|
269
273
|
console.log((0, $hSjDC$chalk).bgRed.black(" --- DONE --- "));
|
|
270
274
|
}
|
|
@@ -287,7 +291,7 @@ async function $eb17f609fec572d7$var$startDownloader() {
|
|
|
287
291
|
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(2000);
|
|
288
292
|
console.log("--------");
|
|
289
293
|
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(1000);
|
|
290
|
-
console.log((0, $hSjDC$chalk).green(`\u{2705} Font Awesome ${useVer.split(".")[0]} Pro v${useVer} Downloaded Successfully!`));
|
|
294
|
+
console.log((0, $hSjDC$chalk).green(`\u{2705} Font Awesome ${useVer.split(".")[0]} Pro Plus v${useVer} Downloaded Successfully!`));
|
|
291
295
|
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(1000);
|
|
292
296
|
console.log((0, $hSjDC$chalk).bgGreen.black(" --- DONE --- "));
|
|
293
297
|
await (0, $a777439b98e3ff1b$export$2e2bcd8739ae039)(2000);
|
package/dist/module.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;ACAe,kDAAkB,KAAa,GAAG,EAAE,IAAY,CAAC;IAC9D,OAAO,IAAI,QAAQ,CAAC,UAAY,WAAW,SAAS,KAAK;AAC3D;;;;;AEAO,SAAS,0CAAS,IAAY;IACnC,OAAO,IAAI,QAAQ,CAAC;QAClB,MAAM,KAAK,CAAA,GAAA,eAAO,EAAE,eAAe,CAAC;YAClC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/main/question.ts","src/pages/cssDownload.ts","src/main/file-downloader.ts","src/main/dir-checker.ts","src/pages/fontsDownload.ts","src/main/font-extractor.ts","src/pages/versionCheck.ts","src/json/fonts.json","src/pages/noticeOfficial.ts"],"sourcesContent":["import chalk from \"chalk\"\r\nimport waittime from \"./helper/waittime\"\r\nimport askQuestion from \"./pages/askQuestions\"\r\nimport cssDownload from \"./pages/cssDownload\"\r\nimport { downloadFonts, readFonts } from \"./pages/fontsDownload\"\r\nimport checkVersion from \"./pages/versionCheck\"\r\nimport unofficialNotice from \"./pages/noticeOfficial\"\r\n\r\nasync function startDownloader(): Promise<void> {\r\n await waittime(100)\r\n console.clear()\r\n const { isOk } = await unofficialNotice()\r\n if (!isOk) return\r\n const { useDir } = await askQuestion()\r\n const { fontlist, useVer, baseUrl } = await checkVersion()\r\n const cssUrls: string[] = await cssDownload(useVer, useDir, fontlist)\r\n const fontUrls: string[] = await readFonts(cssUrls, useDir)\r\n await downloadFonts(fontUrls, useDir, baseUrl)\r\n await waittime(2000)\r\n console.log(\"--------\")\r\n await waittime(1000)\r\n console.log(chalk.green(`✅ Font Awesome ${useVer.split(\".\")[0]} Pro v${useVer} Downloaded Successfully!`))\r\n await waittime(1000)\r\n console.log(chalk.bgGreen.black(\" --- DONE --- \"))\r\n await waittime(2000)\r\n}\r\nexport function getFontAwesomePro(): void {\r\n startDownloader()\r\n}\r\nexport function getFapro(): void {\r\n startDownloader()\r\n}\r\n","export default function waittime(ms: number = 500, n: number = 5): Promise<void> {\r\n return new Promise((resolve) => setTimeout(resolve, ms - n))\r\n}\r\n","import chalk from \"chalk\"\r\nimport { question } from \"../main/question\"\r\nimport waittime from \"../helper/waittime\"\r\n\r\nexport default async function askQuestion(): Promise<{ useDir: string }> {\r\n console.log(\"--------\")\r\n await waittime(1000)\r\n console.log(\" \")\r\n await waittime(100)\r\n console.log(`Set the ${chalk.cyan(\"Download Path\")}!`)\r\n await waittime(100)\r\n console.log(\"--------\")\r\n await waittime(100)\r\n console.log(\"Download path can be \" + chalk.cyan(\"`path/to/your/public/folder`\") + \" or \" + chalk.cyan(\"`anything`\") + \".\")\r\n await waittime(100)\r\n console.log(\"--------\")\r\n await waittime(100)\r\n console.log(\"if the path does not exist, it will be created automatically.\")\r\n await waittime(500)\r\n console.log(\"--------\")\r\n const dir = await question(`Enter download path: ${chalk.bold.cyan(\"(fapro)\")} `)\r\n const useDir = dir ? dir : \"fapro\"\r\n console.log(chalk.bold.cyan(`${useDir}`) + `${dir ? \"\" : \" (default)\"}`)\r\n console.log(\"--------\")\r\n await waittime(750)\r\n console.log(\" \")\r\n console.log(chalk.bgYellow.black(\" -- Preparing Downloader -- \"))\r\n await waittime(2250)\r\n console.log(\" \")\r\n return { useDir }\r\n}\r\n","import readline from \"readline\"\r\n\r\nexport function question(text: string): Promise<string> {\r\n return new Promise((resolve) => {\r\n const rl = readline.createInterface({\r\n input: process.stdin,\r\n output: process.stdout\r\n })\r\n rl.question(text, (anwer) => {\r\n resolve(anwer)\r\n rl.close()\r\n })\r\n })\r\n}\r\n","import chalk from \"chalk\"\r\nimport { downloadFile, getDownloaded } from \"../main/file-downloader\"\r\nimport waittime from \"../helper/waittime\"\r\n\r\nexport default async function cssDownload(useVer: string, useDir: string, fontlist: string[]): Promise<string[]> {\r\n console.log(\"--------\")\r\n console.log(`🕗 Downloading All Stylesheets`)\r\n await waittime(2000)\r\n\r\n const dir = `${useDir}/css`\r\n\r\n for (let i = 0; i < fontlist.length; i++) {\r\n const url = fontlist[i]\r\n const progress = `[${i + 1}/${fontlist.length}]`\r\n await downloadFile(url, dir, progress)\r\n }\r\n console.log(chalk.greenBright(\"✅ Stylesheets Downloaded\"))\r\n await waittime(2000)\r\n return getDownloaded()\r\n}\r\n","import { Downloader } from \"nodejs-file-downloader\"\r\nimport { addDir } from \"./dir-checker\"\r\nimport chalk from \"chalk\"\r\n\r\nlet filesDownloaded: string[] = []\r\n\r\nexport async function downloadFile(fileurl: string, filedir: string, progress: string | null = null): Promise<void> {\r\n await addDir(`${filedir}`)\r\n const downloader = new Downloader({\r\n url: fileurl,\r\n directory: `./${filedir}`,\r\n cloneFiles: false\r\n })\r\n try {\r\n await downloader.download()\r\n const fileorigin = fileurl.split(\"/\")\r\n const filename = fileorigin[fileorigin.length - 1]\r\n console.log(`🚀 ${progress ? chalk.yellow(progress) + \" \" : \"\"}${filename}`)\r\n filesDownloaded.push(filename)\r\n } catch (_error) {\r\n throw new Error(chalk.red(\"The version you wanted to download is not available. Please use other release version.\"))\r\n }\r\n}\r\nexport function getDownloaded(): string[] {\r\n const files: string[] = [...filesDownloaded]\r\n filesDownloaded = []\r\n return files\r\n}\r\n","import fs from \"fs\"\r\nimport waittime from \"../helper/waittime\"\r\n\r\nexport async function addDir(dirpath: string): Promise<void> {\r\n let curpath = \".\"\r\n const dirs: string[] = dirpath.split(\"/\")\r\n\r\n for (const dir of dirs) {\r\n curpath += `/${dir}`\r\n if (!fs.existsSync(curpath)) {\r\n fs.mkdirSync(curpath)\r\n await waittime(100)\r\n }\r\n }\r\n}\r\n","import { addDir } from \"../main/dir-checker\"\r\nimport waittime from \"../helper/waittime\"\r\nimport { extractFont, getFonts } from \"../main/font-extractor\"\r\nimport { downloadFile } from \"../main/file-downloader\"\r\nimport chalk from \"chalk\"\r\n\r\nexport async function readFonts(sheets: string[], useDir: string): Promise<string[]> {\r\n console.log(\"--------\")\r\n console.log(\"🕗 Reading Available Webfonts\")\r\n const dir = `${useDir}/css`\r\n for (const sheet of sheets) {\r\n await extractFont(sheet, dir)\r\n }\r\n const fonts = getFonts()\r\n console.log(\"✅ Found \" + chalk.green(fonts.length.toString()) + \" Webfonts\")\r\n await waittime(2000)\r\n return fonts\r\n}\r\nexport async function downloadFonts(fonts: string[], filedir: string, baseUrl: string): Promise<void> {\r\n const dir = `${filedir}/webfonts`\r\n await addDir(dir)\r\n const fonturl = baseUrl\r\n console.log(\"--------\")\r\n console.log(\"🕗 Downloading All Webfonts\")\r\n await waittime(2000)\r\n for (let i = 0; i < fonts.length; i++) {\r\n const font = fonts[i].replace(\"..\", \"\")\r\n const url = `${fonturl}${font}`\r\n const progress = `[${i + 1}/${fonts.length}]`\r\n await downloadFile(url, dir, progress)\r\n }\r\n console.log(chalk.greenBright(\"✅ Webfonts Downloaded\"))\r\n}\r\n","import fs from \"fs\"\r\nimport postcss from \"postcss\"\r\nimport safeParser from \"postcss-safe-parser\"\r\n\r\nlet fontUrls: string[] = []\r\n\r\nexport async function extractFont(filename: string, filedir: string): Promise<void> {\r\n const css = fs.readFileSync(`./${filedir}/${filename}`, \"utf8\")\r\n postcss()\r\n .process(css, { parser: safeParser, from: undefined })\r\n .then((result) => {\r\n result.root.walkAtRules(\"font-face\", (rule) => {\r\n rule.walkDecls(\"src\", (decl) => {\r\n const matches = decl.value.match(/url\\(([^)]+)\\)/g)\r\n if (matches) {\r\n matches.forEach((url) => {\r\n const cleanUrl = url.replace(/url\\([\"']?/, \"\").replace(/[\"']?\\)/, \"\")\r\n fontUrls.push(cleanUrl)\r\n })\r\n }\r\n })\r\n })\r\n })\r\n}\r\n\r\nexport function getFonts(): string[] {\r\n const fixedFonts: string[] = [...fontUrls]\r\n fontUrls = []\r\n return fixedFonts\r\n}\r\n","import { Ver } from \"./fa.types\"\r\nimport defVer from \"../json/fonts.json\"\r\nimport waittime from \"../helper/waittime\"\r\nimport chalk from \"chalk\"\r\n\r\nasync function getVersion(): Promise<Ver> {\r\n const url = `https://raw.githubusercontent.com/devanka761/webfont-awesome-pro/refs/heads/master/src/json/fonts.json?ts=${Date.now().toString(36)}`\r\n\r\n return await fetch(url, {\r\n method: \"GET\"\r\n })\r\n .then((res) => res.json())\r\n .then((res) => {\r\n console.log(`✅ Found: v${res.version}`)\r\n return res\r\n })\r\n .catch(() => {\r\n console.log(`⛔ Error getting the latest version!`)\r\n console.log(`⛔ Forced Using v${defVer.version}`)\r\n return defVer\r\n })\r\n}\r\n\r\nexport default async function checkVersion(): Promise<{ fontlist: string[]; useVer: string; baseUrl: string }> {\r\n console.log(\"--------\")\r\n console.log(\"🕗 Checking Latest Version\")\r\n await waittime(1000)\r\n const curFonts = await getVersion()\r\n await waittime(100)\r\n console.log(\"--------\")\r\n await waittime(1000)\r\n console.log(\" \")\r\n console.log(chalk.bgGreen.black(` -- Downloading Version ${curFonts.version} of Font Awesome ${curFonts.version.split(\".\")[0]} Pro -- `))\r\n await waittime(1000)\r\n console.log(\" \")\r\n console.log(\"--------\")\r\n await waittime(100)\r\n console.log(\"🕗 Reading Available Stylesheets\")\r\n await waittime(500)\r\n const fontlist = curFonts.css.map((file) => `${curFonts.root}/css/${file}`)\r\n console.log(\"✅ Found \" + chalk.green(fontlist.length.toString()) + \" Sytlesheets\")\r\n await waittime(2000)\r\n return { fontlist, useVer: curFonts.version, baseUrl: curFonts.root }\r\n}\r\n","{ \"version\": \"7.0.0\", \"root\": \"https://site-assets.fontawesome.com/releases/v7.0.0\", \"css\": [\"fontawesome.css\", \"whiteboard-semibold.css\", \"thumbprint-light.css\", \"slab-press-regular.css\", \"slab-regular.css\", \"sharp-duotone-thin.css\", \"sharp-duotone-solid.css\", \"sharp-duotone-regular.css\", \"sharp-duotone-light.css\", \"sharp-thin.css\", \"sharp-solid.css\", \"sharp-regular.css\", \"sharp-light.css\", \"notdog-duo-solid.css\", \"notdog-solid.css\", \"jelly-fill-regular.css\", \"jelly-duo-regular.css\", \"jelly-regular.css\", \"etch-solid.css\", \"duotone-thin.css\", \"duotone.css\", \"duotone-regular.css\", \"duotone-light.css\", \"thin.css\", \"solid.css\", \"regular.css\", \"light.css\", \"brands.css\", \"chisel-regular.css\"] }\r\n","import chalk from \"chalk\"\r\nimport waittime from \"../helper/waittime\"\r\nimport { question } from \"../main/question\"\r\n\r\nexport default async function unofficialNotice(): Promise<{ isOk: boolean }> {\r\n console.log(chalk.bgCyan.black(\" -- Font Awesome Pro Downloader | Devanka761 -- \"))\r\n await waittime(500)\r\n console.log(\"\")\r\n console.log(\"--------\")\r\n console.log(`Font Awesome Pro Downloader was made for ${chalk.yellow(\"educational purposes\")} only!`)\r\n await waittime(100)\r\n console.log(\"--------\")\r\n await waittime(100)\r\n console.log(`This downloader provides ${chalk.bold.green(\"Paid version\")} for the latest Official Package. It is intended for ${chalk.yellow(\"experimental\")} and ${chalk.yellow(\"personal use\")} only. It is ${chalk.red(\"not licensed\")} for commercial use.`)\r\n await waittime(100)\r\n console.log(\"--------\")\r\n await waittime(100)\r\n console.log(`To unlock commercial use and get an official product license, please consider to go to the ${chalk.green(\"Font Awesome\")} webiste: ${chalk.green(\"https://fontawesome.com/plans\")}`)\r\n await waittime(100)\r\n console.log(\"--------\")\r\n await waittime(500)\r\n let agree = await question(`Continue to download? (${chalk.cyan(\"Y\")}/n) `)\r\n agree = agree ? agree.toLowerCase() : \"y\"\r\n const notAgrees = [\"no\", \"n\", \"nope\"]\r\n const isOk = notAgrees.find((textNo) => textNo === agree) ? false : true\r\n console.log(chalk.cyan(isOk ? \"y\" : \"n\"))\r\n if (!isOk) {\r\n console.log(\"--------\")\r\n await waittime(1000)\r\n console.log(chalk.red(\"⛔ Font Awesome Pro Downloader Canceled\"))\r\n await waittime(1000)\r\n console.log(chalk.bgRed.black(\" --- DONE --- \"))\r\n }\r\n\r\n return { isOk }\r\n}\r\n"],"names":[],"version":3,"file":"module.mjs.map","sourceRoot":"../"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;ACAe,kDAAkB,KAAa,GAAG,EAAE,IAAY,CAAC;IAC9D,OAAO,IAAI,QAAQ,CAAC,UAAY,WAAW,SAAS,KAAK;AAC3D;;;;;AEAO,SAAS,0CAAS,IAAY;IACnC,OAAO,IAAI,QAAQ,CAAC;QAClB,MAAM,KAAK,CAAA,GAAA,eAAO,EAAE,eAAe,CAAC;YAClC,OAAO,QAAQ,KAAK;YACpB,QAAQ,QAAQ,MAAM;QACxB;QACA,GAAG,QAAQ,CAAC,MAAM,CAAC;YACjB,QAAQ;YACR,GAAG,KAAK;QACV;IACF;AACF;;;;ADTe;IACb,QAAQ,GAAG,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AACjB;AACO,SAAS;IACd;AACF;AACO,SAAS;IACd;AACF","sources":["src/index.ts","src/helper/waittime.ts","src/pages/askQuestions.ts","src/main/question.ts","src/pages/cssDownload.ts","src/main/file-downloader.ts","src/main/dir-checker.ts","src/pages/fontsDownload.ts","src/main/font-extractor.ts","src/pages/versionCheck.ts","src/json/fonts.json","src/pages/noticeOfficial.ts"],"sourcesContent":["import chalk from \"chalk\"\nimport waittime from \"./helper/waittime\"\nimport askQuestion from \"./pages/askQuestions\"\nimport cssDownload from \"./pages/cssDownload\"\nimport { downloadFonts, readFonts } from \"./pages/fontsDownload\"\nimport checkVersion from \"./pages/versionCheck\"\nimport unofficialNotice from \"./pages/noticeOfficial\"\n\nasync function startDownloader(): Promise<void> {\n await waittime(100)\n console.clear()\n const { isOk } = await unofficialNotice()\n if (!isOk) return\n const { useDir } = await askQuestion()\n const { fontlist, useVer, baseUrl } = await checkVersion()\n const cssUrls: string[] = await cssDownload(useVer, useDir, fontlist)\n const fontUrls: string[] = await readFonts(cssUrls, useDir)\n await downloadFonts(fontUrls, useDir, baseUrl)\n await waittime(2000)\n console.log(\"--------\")\n await waittime(1000)\n console.log(chalk.green(`✅ Font Awesome ${useVer.split(\".\")[0]} Pro Plus v${useVer} Downloaded Successfully!`))\n await waittime(1000)\n console.log(chalk.bgGreen.black(\" --- DONE --- \"))\n await waittime(2000)\n}\nexport function getFontAwesomePro(): void {\n startDownloader()\n}\nexport function getFapro(): void {\n startDownloader()\n}\n","export default function waittime(ms: number = 500, n: number = 5): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms - n))\n}\n","import chalk from \"chalk\"\nimport { question } from \"../main/question\"\nimport waittime from \"../helper/waittime\"\n\nexport default async function askQuestion(): Promise<{ useDir: string }> {\n console.log(\"--------\")\n await waittime(1000)\n console.log(\" \")\n await waittime(100)\n console.log(`Set the ${chalk.cyan(\"Download Path\")}!`)\n await waittime(100)\n console.log(\"--------\")\n await waittime(100)\n console.log(\"Download path can be \" + chalk.cyan(\"`path/to/your/public/folder`\") + \" or \" + chalk.cyan(\"`anything`\") + \".\")\n await waittime(100)\n console.log(\"--------\")\n await waittime(100)\n console.log(\"if the path does not exist, it will be created automatically.\")\n await waittime(500)\n console.log(\"--------\")\n const dir = await question(`Enter download path: ${chalk.bold.cyan(\"(fapro)\")} `)\n const useDir = dir ? dir : \"fapro\"\n console.log(chalk.bold.cyan(`${useDir}`) + `${dir ? \"\" : \" (default)\"}`)\n console.log(\"--------\")\n await waittime(750)\n console.log(\" \")\n console.log(chalk.bgYellow.black(\" -- Preparing Downloader -- \"))\n await waittime(2250)\n console.log(\" \")\n return { useDir }\n}\n","import readline from \"readline\"\n\nexport function question(text: string): Promise<string> {\n return new Promise((resolve) => {\n const rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n })\n rl.question(text, (anwer) => {\n resolve(anwer)\n rl.close()\n })\n })\n}\n","import chalk from \"chalk\"\nimport { downloadFile, getDownloaded } from \"../main/file-downloader\"\nimport waittime from \"../helper/waittime\"\n\nexport default async function cssDownload(useVer: string, useDir: string, fontlist: string[]): Promise<string[]> {\n console.log(\"--------\")\n console.log(`🕗 Downloading All Stylesheets`)\n await waittime(2000)\n\n const dir = `${useDir}/css`\n\n for (let i = 0; i < fontlist.length; i++) {\n const url = fontlist[i]\n const progress = `[${i + 1}/${fontlist.length}]`\n await downloadFile(url, dir, progress)\n }\n console.log(chalk.greenBright(\"✅ Stylesheets Downloaded\"))\n await waittime(2000)\n return getDownloaded()\n}\n","import { Downloader } from \"nodejs-file-downloader\"\nimport { addDir } from \"./dir-checker\"\nimport chalk from \"chalk\"\n\nlet filesDownloaded: string[] = []\n\nexport async function downloadFile(fileurl: string, filedir: string, progress: string | null = null): Promise<void> {\n await addDir(`${filedir}`)\n const downloader = new Downloader({\n url: fileurl,\n directory: `./${filedir}`,\n cloneFiles: false\n })\n try {\n await downloader.download()\n const fileorigin = fileurl.split(\"/\")\n const filename = fileorigin[fileorigin.length - 1]\n console.log(`🚀 ${progress ? chalk.yellow(progress) + \" \" : \"\"}${filename}`)\n filesDownloaded.push(filename)\n } catch (_error) {\n throw new Error(chalk.red(\"The version you wanted to download is not available. Please use other release version.\"))\n }\n}\nexport function getDownloaded(): string[] {\n const files: string[] = [...filesDownloaded]\n filesDownloaded = []\n return files\n}\n","import fs from \"fs\"\nimport waittime from \"../helper/waittime\"\n\nexport async function addDir(dirpath: string): Promise<void> {\n let curpath = \".\"\n const dirs: string[] = dirpath.split(\"/\")\n\n for (const dir of dirs) {\n curpath += `/${dir}`\n if (!fs.existsSync(curpath)) {\n fs.mkdirSync(curpath)\n await waittime(100)\n }\n }\n}\n","import { addDir } from \"../main/dir-checker\"\nimport waittime from \"../helper/waittime\"\nimport { extractFont, getFonts } from \"../main/font-extractor\"\nimport { downloadFile } from \"../main/file-downloader\"\nimport chalk from \"chalk\"\n\nexport async function readFonts(sheets: string[], useDir: string): Promise<string[]> {\n console.log(\"--------\")\n console.log(\"🕗 Reading Available Webfonts\")\n const dir = `${useDir}/css`\n for (const sheet of sheets) {\n await extractFont(sheet, dir)\n }\n const fonts = getFonts()\n console.log(\"✅ Found \" + chalk.green(fonts.length.toString()) + \" Webfonts\")\n await waittime(2000)\n return fonts\n}\nexport async function downloadFonts(fonts: string[], filedir: string, baseUrl: string): Promise<void> {\n const dir = `${filedir}/webfonts`\n await addDir(dir)\n const fonturl = baseUrl\n console.log(\"--------\")\n console.log(\"🕗 Downloading All Webfonts\")\n await waittime(2000)\n for (let i = 0; i < fonts.length; i++) {\n const font = fonts[i].replace(\"..\", \"\")\n const url = `${fonturl}${font}`\n const progress = `[${i + 1}/${fonts.length}]`\n await downloadFile(url, dir, progress)\n }\n console.log(chalk.greenBright(\"✅ Webfonts Downloaded\"))\n}\n","import fs from \"fs\"\nimport postcss from \"postcss\"\nimport safeParser from \"postcss-safe-parser\"\n\nlet fontUrls: string[] = []\n\nexport async function extractFont(filename: string, filedir: string): Promise<void> {\n const css = fs.readFileSync(`./${filedir}/${filename}`, \"utf8\")\n postcss()\n .process(css, { parser: safeParser, from: undefined })\n .then((result) => {\n result.root.walkAtRules(\"font-face\", (rule) => {\n rule.walkDecls(\"src\", (decl) => {\n const matches = decl.value.match(/url\\(([^)]+)\\)/g)\n if (matches) {\n matches.forEach((url) => {\n const cleanUrl = url.replace(/url\\([\"']?/, \"\").replace(/[\"']?\\)/, \"\")\n fontUrls.push(cleanUrl)\n })\n }\n })\n })\n })\n}\n\nexport function getFonts(): string[] {\n const fixedFonts: string[] = [...fontUrls]\n fontUrls = []\n return fixedFonts\n}\n","import { Ver } from \"./fa.types\"\nimport defVer from \"../json/fonts.json\"\nimport waittime from \"../helper/waittime\"\nimport chalk from \"chalk\"\n\nasync function getVersion(): Promise<Ver> {\n const url = `https://raw.githubusercontent.com/devanka761/webfont-awesome-pro/refs/heads/master/src/json/fonts.json?ts=${Date.now().toString(36)}`\n\n return await fetch(url, {\n method: \"GET\"\n })\n .then((res) => res.json())\n .then((res) => {\n console.log(`✅ Found: v${res.version}`)\n return res\n })\n .catch(() => {\n console.log(`⛔ Error getting the latest version!`)\n console.log(`⛔ Forced Using v${defVer.version}`)\n return defVer\n })\n}\n\nexport default async function checkVersion(): Promise<{ fontlist: string[]; useVer: string; baseUrl: string }> {\n console.log(\"--------\")\n console.log(\"🕗 Checking Latest Version\")\n await waittime(1000)\n const curFonts = await getVersion()\n await waittime(100)\n console.log(\"--------\")\n await waittime(1000)\n console.log(\" \")\n console.log(chalk.bgGreen.black(` -- Downloading Version ${curFonts.version} of Font Awesome ${curFonts.version.split(\".\")[0]} Pro Plus -- `))\n await waittime(1000)\n console.log(\" \")\n console.log(\"--------\")\n await waittime(100)\n console.log(\"🕗 Reading Available Stylesheets\")\n await waittime(500)\n const fontlist = curFonts.css.map((file) => `${curFonts.root}/css/${file}`)\n console.log(\"✅ Found \" + chalk.green(fontlist.length.toString()) + \" Sytlesheets\")\n await waittime(2000)\n return { fontlist, useVer: curFonts.version, baseUrl: curFonts.root }\n}\n","{ \"version\": \"7.0.0\", \"root\": \"https://site-assets.fontawesome.com/releases/v7.0.0\", \"css\": [\"fontawesome.css\", \"whiteboard-semibold.css\", \"thumbprint-light.css\", \"slab-press-regular.css\", \"slab-regular.css\", \"sharp-duotone-thin.css\", \"sharp-duotone-solid.css\", \"sharp-duotone-regular.css\", \"sharp-duotone-light.css\", \"sharp-thin.css\", \"sharp-solid.css\", \"sharp-regular.css\", \"sharp-light.css\", \"notdog-duo-solid.css\", \"notdog-solid.css\", \"jelly-fill-regular.css\", \"jelly-duo-regular.css\", \"jelly-regular.css\", \"etch-solid.css\", \"duotone-thin.css\", \"duotone.css\", \"duotone-regular.css\", \"duotone-light.css\", \"thin.css\", \"solid.css\", \"regular.css\", \"light.css\", \"brands.css\", \"chisel-regular.css\"] }\n","import chalk from \"chalk\"\nimport waittime from \"../helper/waittime\"\nimport { question } from \"../main/question\"\n\nexport default async function unofficialNotice(): Promise<{ isOk: boolean }> {\n console.log(chalk.bgCyan.black(\" -- Font Awesome Pro Plus Downloader | Devanka761 -- \"))\n await waittime(500)\n console.log(\"\")\n console.log(\"--------\")\n console.log(`Font Awesome Pro Plus Downloader was made for ${chalk.yellow(\"educational purposes\")} only!`)\n await waittime(100)\n console.log(\"--------\")\n await waittime(100)\n console.log(`This downloader provides ${chalk.bold.green(\"Paid (Pro Plus) Version\")} for the latest Official Package. It is intended for ${chalk.yellow(\"experimental\")} and ${chalk.yellow(\"personal use\")} only. It is ${chalk.red(\"licensed for commercial\")} use.`)\n await waittime(100)\n console.log(\"--------\")\n await waittime(100)\n console.log(`${chalk.red(\"DO NOT\")} use this downloader if you are not a ${chalk.bold.green(\"Creator\")} or you have never buy the official product from the official website.`)\n await waittime(100)\n console.log(\"--------\")\n await waittime(100)\n console.log(`To unlock commercial use for your own projects, and get an official product license, please consider to go to the ${chalk.green(\"Font Awesome\")} webiste: ${chalk.green(\"https://fontawesome.com/plans\")}`)\n await waittime(100)\n console.log(\"--------\")\n await waittime(500)\n let agree = await question(`Continue to download? (${chalk.cyan(\"Y\")}/n) `)\n agree = agree ? agree.toLowerCase() : \"y\"\n const notAgrees = [\"no\", \"n\", \"nope\"]\n const isOk = notAgrees.find((textNo) => textNo === agree) ? false : true\n console.log(chalk.cyan(isOk ? \"y\" : \"n\"))\n if (!isOk) {\n console.log(\"--------\")\n await waittime(1000)\n console.log(chalk.red(\"⛔ Font Awesome Pro Plus Downloader Canceled\"))\n await waittime(1000)\n console.log(chalk.bgRed.black(\" --- DONE --- \"))\n }\n\n return { isOk }\n}\n"],"names":[],"version":3,"file":"module.mjs.map","sourceRoot":"../"}
|
package/dist/webfapro.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import o from"chalk";import e from"readline";import{Downloader as s}from"nodejs-file-downloader";import l from"fs";import t from"postcss";import n from"postcss-safe-parser";function a(o){return o&&o.__esModule?o.default:o}function r(o=500,e=5){return new Promise(s=>setTimeout(s,o-e))}function c(o){return new Promise(s=>{let l=e.createInterface({input:process.stdin,output:process.stdout});l.question(o,o=>{s(o),l.close()})})}async function i(){console.log("--------"),await r(1e3),console.log(" "),await r(100),console.log(`Set the ${o.cyan("Download Path")}!`),await r(100),console.log("--------"),await r(100),console.log("Download path can be "+o.cyan("`path/to/your/public/folder`")+" or "+o.cyan("`anything`")+"."),await r(100),console.log("--------"),await r(100),console.log("if the path does not exist, it will be created automatically."),await r(500),console.log("--------");let e=await c(`Enter download path: ${o.bold.cyan("(fapro)")} `),s=e||"fapro";return console.log(o.bold.cyan(`${s}`)+`${e?"":" (default)"}`),console.log("--------"),await r(750),console.log(" "),console.log(o.bgYellow.black(" -- Preparing Downloader -- ")),await r(2250),console.log(" "),{useDir:s}}async function u(o){let e=".";for(let s of o.split("/"))e+=`/${s}`,l.existsSync(e)||(l.mkdirSync(e),await r(100))}let g=[];async function w(e,l,t=null){await u(`${l}`);let n=new s({url:e,directory:`./${l}`,cloneFiles:!1});try{await n.download();let s=e.split("/"),l=s[s.length-1];console.log(`\u{1F680} ${t?o.yellow(t)+" ":""}${l}`),g.push(l)}catch(e){throw Error(o.red("The version you wanted to download is not available. Please use other release version."))}}async function d(e,s,l){console.log("--------"),console.log(`\u{1F557} Downloading All Stylesheets`),await r(2e3);let t=`${s}/css`;for(let o=0;o<l.length;o++){let e=l[o],s=`[${o+1}/${l.length}]`;await w(e,t,s)}console.log(o.greenBright("✅ Stylesheets Downloaded")),await r(2e3);let n=[...g];return g=[],n}let f=[];async function h(o,e){let s=l.readFileSync(`./${e}/${o}`,"utf8");t().process(s,{parser:n,from:void 0}).then(o=>{o.root.walkAtRules("font-face",o=>{o.walkDecls("src",o=>{let e=o.value.match(/url\(([^)]+)\)/g);e&&e.forEach(o=>{let e=o.replace(/url\(["']?/,"").replace(/["']?\)/,"");f.push(e)})})})})}async function p(e,s){console.log("--------"),console.log("\uD83D\uDD57 Reading Available Webfonts");let l=`${s}/css`;for(let o of e)await h(o,l);let t=function(){let o=[...f];return f=[],o}();return console.log("✅ Found "+o.green(t.length.toString())+" Webfonts"),await r(2e3),t}async function y(e,s,l){let t=`${s}/webfonts`;await u(t),console.log("--------"),console.log("\uD83D\uDD57 Downloading All Webfonts"),await r(2e3);for(let o=0;o<e.length;o++){let s=e[o].replace("..",""),n=`${l}${s}`,a=`[${o+1}/${e.length}]`;await w(n,t,a)}console.log(o.greenBright("✅ Webfonts Downloaded"))}var m={};async function b(){let o=`https://raw.githubusercontent.com/devanka761/webfont-awesome-pro/refs/heads/master/src/json/fonts.json?ts=${Date.now().toString(36)}`;return await fetch(o,{method:"GET"}).then(o=>o.json()).then(o=>(console.log(`\u{2705} Found: v${o.version}`),o)).catch(()=>(console.log(`\u{26D4} Error getting the latest version!`),console.log(`\u{26D4} Forced Using v${a(m).version}`),a(m)))}async function D(){console.log("--------"),console.log("\uD83D\uDD57 Checking Latest Version"),await r(1e3);let e=await b();await r(100),console.log("--------"),await r(1e3),console.log(" "),console.log(o.bgGreen.black(` -- Downloading Version ${e.version} of Font Awesome ${e.version.split(".")[0]} Pro Plus -- `)),await r(1e3),console.log(" "),console.log("--------"),await r(100),console.log("\uD83D\uDD57 Reading Available Stylesheets"),await r(500);let s=e.css.map(o=>`${e.root}/css/${o}`);return console.log("✅ Found "+o.green(s.length.toString())+" Sytlesheets"),await r(2e3),{fontlist:s,useVer:e.version,baseUrl:e.root}}async function $(){console.log(o.bgCyan.black(" -- Font Awesome Pro Plus Downloader | Devanka761 -- ")),await r(500),console.log(""),console.log("--------"),console.log(`Font Awesome Pro Plus Downloader was made for ${o.yellow("educational purposes")} only!`),await r(100),console.log("--------"),await r(100),console.log(`This downloader provides ${o.bold.green("Paid (Pro Plus) Version")} for the latest Official Package. It is intended for ${o.yellow("experimental")} and ${o.yellow("personal use")} only. It is ${o.red("licensed for commercial")} use.`),await r(100),console.log("--------"),await r(100),console.log(`${o.red("DO NOT")} use this downloader if you are not a ${o.bold.green("Creator")} or you have never buy the official product from the official website.`),await r(100),console.log("--------"),await r(100),console.log(`To unlock commercial use for your own projects, and get an official product license, please consider to go to the ${o.green("Font Awesome")} webiste: ${o.green("https://fontawesome.com/plans")}`),await r(100),console.log("--------"),await r(500);let e=await c(`Continue to download? (${o.cyan("Y")}/n) `);e=e?e.toLowerCase():"y";let s=!["no","n","nope"].find(o=>o===e);return console.log(o.cyan(s?"y":"n")),s||(console.log("--------"),await r(1e3),console.log(o.red("⛔ Font Awesome Pro Plus Downloader Canceled")),await r(1e3),console.log(o.bgRed.black(" --- DONE --- "))),{isOk:s}}async function v(){await r(100),console.clear();let{isOk:e}=await $();if(!e)return;let{useDir:s}=await i(),{fontlist:l,useVer:t,baseUrl:n}=await D(),a=await d(t,s,l),c=await p(a,s);await y(c,s,n),await r(2e3),console.log("--------"),await r(1e3),console.log(o.green(`\u{2705} Font Awesome ${t.split(".")[0]} Pro Plus v${t} Downloaded Successfully!`)),await r(1e3),console.log(o.bgGreen.black(" --- DONE --- ")),await r(2e3)}m=JSON.parse('{"version":"7.0.0","root":"https://site-assets.fontawesome.com/releases/v7.0.0","css":["fontawesome.css","whiteboard-semibold.css","thumbprint-light.css","slab-press-regular.css","slab-regular.css","sharp-duotone-thin.css","sharp-duotone-solid.css","sharp-duotone-regular.css","sharp-duotone-light.css","sharp-thin.css","sharp-solid.css","sharp-regular.css","sharp-light.css","notdog-duo-solid.css","notdog-solid.css","jelly-fill-regular.css","jelly-duo-regular.css","jelly-regular.css","etch-solid.css","duotone-thin.css","duotone.css","duotone-regular.css","duotone-light.css","thin.css","solid.css","regular.css","light.css","brands.css","chisel-regular.css"]}'),v();
|
|
3
|
+
//# sourceMappingURL=webfapro.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";A,O,M,O,A,Q,M,U,A,Q,c,C,K,wB,A,Q,M,I,A,Q,M,S,A,Q,M,qB,C,S,E,C,E,O,G,E,U,C,E,O,C,C,CGAe,SAAA,EAAkB,EAAa,GAAG,CAAE,EAAY,CAAC,EAC9D,OAAO,IAAI,QAAQ,AAAC,GAAY,WAAW,EAAS,EAAK,GAC3D,CEAO,SAAS,EAAS,CAAY,EACnC,OAAO,IAAI,QAAQ,AAAC,IAClB,IAAM,EAAK,AAAA,EAAS,eAAe,CAAC,CAClC,MAAO,QAAQ,KAAK,CACpB,OAAQ,QAAQ,MAAM,AACxB,GACA,EAAG,QAAQ,CAAC,EAAM,AAAC,IACjB,EAAQ,GACR,EAAG,KAAK,EACV,EACF,EACF,CDTe,eAAA,IACb,QAAQ,GAAG,CAAC,YACZ,MAAM,AAAA,EAAS,KACf,QAAQ,GAAG,CAAC,KACZ,MAAM,AAAA,EAAS,KACf,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,AAAA,EAAM,IAAI,CAAC,iBAAiB,CAAC,CAAC,EACrD,MAAM,AAAA,EAAS,KACf,QAAQ,GAAG,CAAC,YACZ,MAAM,AAAA,EAAS,KACf,QAAQ,GAAG,CAAC,wBAA0B,AAAA,EAAM,IAAI,CAAC,gCAAkC,OAAS,AAAA,EAAM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Q,GAAG,CAAC,YACZ,MAAM,AAAA,EAAS,KACf,QAAQ,GAAG,CAAC,AAAA,EAAM,GAAG,CAAC,gDACtB,MAAM,AAAA,EAAS,KACf,QAAQ,GAAG,CAAC,AAAA,EAAM,KAAK,CAAC,KAAK,CAAC,oBAGzB,CAAE,KAAA,CAAK,CAChB,CX/BA,eAAe,IACb,MAAM,AAAA,EAAS,KACf,QAAQ,KAAK,GACb,GAAM,CAAA,KAAE,CAAI,CAAE,CAAG,MAAM,AAAA,IACvB,GAAI,CAAC,EAAM,OACX,GAAM,CAAA,OAAE,CAAM,CAAE,CAAG,MAAM,AAAA,IACnB,CAAA,SAAE,CAAQ,CAAA,OAAE,CAAM,CAAA,QAAE,CAAO,CAAE,CAAG,MAAM,AAAA,IACtC,EAAoB,MAAM,AAAA,EAAY,EAAQ,EAAQ,GACtD,EAAqB,MAAM,AAAA,EAAU,EAAS,EACpD,OAAM,AAAA,EAAc,EAAU,EAAQ,GACtC,MAAM,AAAA,EAAS,KACf,QAAQ,GAAG,CAAC,YACZ,MAAM,AAAA,EAAS,KACf,QAAQ,GAAG,CAAC,AAAA,EAAM,KAAK,CAAC,CAAC,sBAAe,EAAE,EAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,EAAE,EAAO,yBAAyB,CAAC,GAC7G,MAAM,AAAA,EAAS,KACf,QAAQ,GAAG,CAAC,AAAA,EAAM,OAAO,CAAC,KAAK,CAAC,mBAChC,MAAM,AAAA,EAAS,IACjB,CUzBA,EAAiB,KAAK,KAAK,CAAC,2pBV8B1B","sources":["<anon>","src/webfapro.ts","src/index.ts","src/helper/waittime.ts","src/pages/askQuestions.ts","src/main/question.ts","src/pages/cssDownload.ts","src/main/file-downloader.ts","src/main/dir-checker.ts","src/pages/fontsDownload.ts","src/main/font-extractor.ts","src/pages/versionCheck.ts","src/json/fonts.json","src/pages/noticeOfficial.ts"],"sourcesContent":["#!/usr/bin/env node\nimport $4BjRV$chalk from \"chalk\";\nimport $4BjRV$readline from \"readline\";\nimport {Downloader as $4BjRV$Downloader} from \"nodejs-file-downloader\";\nimport $4BjRV$fs from \"fs\";\nimport $4BjRV$postcss from \"postcss\";\nimport $4BjRV$postcsssafeparser from \"postcss-safe-parser\";\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\nvar $1895f9d83a391aec$exports = {};\n\nfunction $574296b1a2de3654$export$2e2bcd8739ae039(ms = 500, n = 5) {\n return new Promise((resolve)=>setTimeout(resolve, ms - n));\n}\n\n\n\n\nfunction $c4dfc35b146d8b69$export$db9f06b5d27d15d8(text) {\n return new Promise((resolve)=>{\n const rl = (0, $4BjRV$readline).createInterface({\n input: process.stdin,\n output: process.stdout\n });\n rl.question(text, (anwer)=>{\n resolve(anwer);\n rl.close();\n });\n });\n}\n\n\n\nasync function $7133ad7cc212004a$export$2e2bcd8739ae039() {\n console.log(\"--------\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(1000);\n console.log(\" \");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n console.log(`Set the ${(0, $4BjRV$chalk).cyan(\"Download Path\")}!`);\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n console.log(\"--------\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n console.log(\"Download path can be \" + (0, $4BjRV$chalk).cyan(\"`path/to/your/public/folder`\") + \" or \" + (0, $4BjRV$chalk).cyan(\"`anything`\") + \".\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n console.log(\"--------\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n console.log(\"if the path does not exist, it will be created automatically.\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(500);\n console.log(\"--------\");\n const dir = await (0, $c4dfc35b146d8b69$export$db9f06b5d27d15d8)(`Enter download path: ${(0, $4BjRV$chalk).bold.cyan(\"(fapro)\")} `);\n const useDir = dir ? dir : \"fapro\";\n console.log((0, $4BjRV$chalk).bold.cyan(`${useDir}`) + `${dir ? \"\" : \" (default)\"}`);\n console.log(\"--------\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(750);\n console.log(\" \");\n console.log((0, $4BjRV$chalk).bgYellow.black(\" -- Preparing Downloader -- \"));\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(2250);\n console.log(\" \");\n return {\n useDir: useDir\n };\n}\n\n\n\n\n\n\nasync function $a088456a992e1b0b$export$75ad550fa5fe1d36(dirpath) {\n let curpath = \".\";\n const dirs = dirpath.split(\"/\");\n for (const dir of dirs){\n curpath += `/${dir}`;\n if (!(0, $4BjRV$fs).existsSync(curpath)) {\n (0, $4BjRV$fs).mkdirSync(curpath);\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n }\n }\n}\n\n\n\nlet $02b0a2fa6f6bedcc$var$filesDownloaded = [];\nasync function $02b0a2fa6f6bedcc$export$bb3b75778e3e272(fileurl, filedir, progress = null) {\n await (0, $a088456a992e1b0b$export$75ad550fa5fe1d36)(`${filedir}`);\n const downloader = new (0, $4BjRV$Downloader)({\n url: fileurl,\n directory: `./${filedir}`,\n cloneFiles: false\n });\n try {\n await downloader.download();\n const fileorigin = fileurl.split(\"/\");\n const filename = fileorigin[fileorigin.length - 1];\n console.log(`\\u{1F680} ${progress ? (0, $4BjRV$chalk).yellow(progress) + \" \" : \"\"}${filename}`);\n $02b0a2fa6f6bedcc$var$filesDownloaded.push(filename);\n } catch (_error) {\n throw new Error((0, $4BjRV$chalk).red(\"The version you wanted to download is not available. Please use other release version.\"));\n }\n}\nfunction $02b0a2fa6f6bedcc$export$8de8b92fd301c83e() {\n const files = [\n ...$02b0a2fa6f6bedcc$var$filesDownloaded\n ];\n $02b0a2fa6f6bedcc$var$filesDownloaded = [];\n return files;\n}\n\n\n\nasync function $50aa263ddf667332$export$2e2bcd8739ae039(useVer, useDir, fontlist) {\n console.log(\"--------\");\n console.log(`\\u{1F557} Downloading All Stylesheets`);\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(2000);\n const dir = `${useDir}/css`;\n for(let i = 0; i < fontlist.length; i++){\n const url = fontlist[i];\n const progress = `[${i + 1}/${fontlist.length}]`;\n await (0, $02b0a2fa6f6bedcc$export$bb3b75778e3e272)(url, dir, progress);\n }\n console.log((0, $4BjRV$chalk).greenBright(\"\\u2705 Stylesheets Downloaded\"));\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(2000);\n return (0, $02b0a2fa6f6bedcc$export$8de8b92fd301c83e)();\n}\n\n\n\n\n\n\n\nlet $4d4643fd90374c00$var$fontUrls = [];\nasync function $4d4643fd90374c00$export$85c953af022fd6f3(filename, filedir) {\n const css = (0, $4BjRV$fs).readFileSync(`./${filedir}/${filename}`, \"utf8\");\n (0, $4BjRV$postcss)().process(css, {\n parser: (0, $4BjRV$postcsssafeparser),\n from: undefined\n }).then((result)=>{\n result.root.walkAtRules(\"font-face\", (rule)=>{\n rule.walkDecls(\"src\", (decl)=>{\n const matches = decl.value.match(/url\\(([^)]+)\\)/g);\n if (matches) matches.forEach((url)=>{\n const cleanUrl = url.replace(/url\\([\"']?/, \"\").replace(/[\"']?\\)/, \"\");\n $4d4643fd90374c00$var$fontUrls.push(cleanUrl);\n });\n });\n });\n });\n}\nfunction $4d4643fd90374c00$export$cbcfe4007f417765() {\n const fixedFonts = [\n ...$4d4643fd90374c00$var$fontUrls\n ];\n $4d4643fd90374c00$var$fontUrls = [];\n return fixedFonts;\n}\n\n\n\n\nasync function $dc001fcbec17a266$export$ae70b50decb7cf58(sheets, useDir) {\n console.log(\"--------\");\n console.log(\"\\uD83D\\uDD57 Reading Available Webfonts\");\n const dir = `${useDir}/css`;\n for (const sheet of sheets)await (0, $4d4643fd90374c00$export$85c953af022fd6f3)(sheet, dir);\n const fonts = (0, $4d4643fd90374c00$export$cbcfe4007f417765)();\n console.log(\"\\u2705 Found \" + (0, $4BjRV$chalk).green(fonts.length.toString()) + \" Webfonts\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(2000);\n return fonts;\n}\nasync function $dc001fcbec17a266$export$6c18a7d4cf131851(fonts, filedir, baseUrl) {\n const dir = `${filedir}/webfonts`;\n await (0, $a088456a992e1b0b$export$75ad550fa5fe1d36)(dir);\n const fonturl = baseUrl;\n console.log(\"--------\");\n console.log(\"\\uD83D\\uDD57 Downloading All Webfonts\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(2000);\n for(let i = 0; i < fonts.length; i++){\n const font = fonts[i].replace(\"..\", \"\");\n const url = `${fonturl}${font}`;\n const progress = `[${i + 1}/${fonts.length}]`;\n await (0, $02b0a2fa6f6bedcc$export$bb3b75778e3e272)(url, dir, progress);\n }\n console.log((0, $4BjRV$chalk).greenBright(\"\\u2705 Webfonts Downloaded\"));\n}\n\n\nvar $eac82631717e0cdb$exports = {};\n$eac82631717e0cdb$exports = JSON.parse(\"{\\\"version\\\":\\\"7.0.0\\\",\\\"root\\\":\\\"https://site-assets.fontawesome.com/releases/v7.0.0\\\",\\\"css\\\":[\\\"fontawesome.css\\\",\\\"whiteboard-semibold.css\\\",\\\"thumbprint-light.css\\\",\\\"slab-press-regular.css\\\",\\\"slab-regular.css\\\",\\\"sharp-duotone-thin.css\\\",\\\"sharp-duotone-solid.css\\\",\\\"sharp-duotone-regular.css\\\",\\\"sharp-duotone-light.css\\\",\\\"sharp-thin.css\\\",\\\"sharp-solid.css\\\",\\\"sharp-regular.css\\\",\\\"sharp-light.css\\\",\\\"notdog-duo-solid.css\\\",\\\"notdog-solid.css\\\",\\\"jelly-fill-regular.css\\\",\\\"jelly-duo-regular.css\\\",\\\"jelly-regular.css\\\",\\\"etch-solid.css\\\",\\\"duotone-thin.css\\\",\\\"duotone.css\\\",\\\"duotone-regular.css\\\",\\\"duotone-light.css\\\",\\\"thin.css\\\",\\\"solid.css\\\",\\\"regular.css\\\",\\\"light.css\\\",\\\"brands.css\\\",\\\"chisel-regular.css\\\"]}\");\n\n\n\n\nasync function $0d221b5cfb1ba63a$var$getVersion() {\n const url = `https://raw.githubusercontent.com/devanka761/webfont-awesome-pro/refs/heads/master/src/json/fonts.json?ts=${Date.now().toString(36)}`;\n return await fetch(url, {\n method: \"GET\"\n }).then((res)=>res.json()).then((res)=>{\n console.log(`\\u{2705} Found: v${res.version}`);\n return res;\n }).catch(()=>{\n console.log(`\\u{26D4} Error getting the latest version!`);\n console.log(`\\u{26D4} Forced Using v${(0, (/*@__PURE__*/$parcel$interopDefault($eac82631717e0cdb$exports))).version}`);\n return 0, (/*@__PURE__*/$parcel$interopDefault($eac82631717e0cdb$exports));\n });\n}\nasync function $0d221b5cfb1ba63a$export$2e2bcd8739ae039() {\n console.log(\"--------\");\n console.log(\"\\uD83D\\uDD57 Checking Latest Version\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(1000);\n const curFonts = await $0d221b5cfb1ba63a$var$getVersion();\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n console.log(\"--------\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(1000);\n console.log(\" \");\n console.log((0, $4BjRV$chalk).bgGreen.black(` -- Downloading Version ${curFonts.version} of Font Awesome ${curFonts.version.split(\".\")[0]} Pro Plus -- `));\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(1000);\n console.log(\" \");\n console.log(\"--------\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n console.log(\"\\uD83D\\uDD57 Reading Available Stylesheets\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(500);\n const fontlist = curFonts.css.map((file)=>`${curFonts.root}/css/${file}`);\n console.log(\"\\u2705 Found \" + (0, $4BjRV$chalk).green(fontlist.length.toString()) + \" Sytlesheets\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(2000);\n return {\n fontlist: fontlist,\n useVer: curFonts.version,\n baseUrl: curFonts.root\n };\n}\n\n\n\n\n\nasync function $b58e88d9df26e0be$export$2e2bcd8739ae039() {\n console.log((0, $4BjRV$chalk).bgCyan.black(\" -- Font Awesome Pro Plus Downloader | Devanka761 -- \"));\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(500);\n console.log(\"\");\n console.log(\"--------\");\n console.log(`Font Awesome Pro Plus Downloader was made for ${(0, $4BjRV$chalk).yellow(\"educational purposes\")} only!`);\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n console.log(\"--------\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n console.log(`This downloader provides ${(0, $4BjRV$chalk).bold.green(\"Paid (Pro Plus) Version\")} for the latest Official Package. It is intended for ${(0, $4BjRV$chalk).yellow(\"experimental\")} and ${(0, $4BjRV$chalk).yellow(\"personal use\")} only. It is ${(0, $4BjRV$chalk).red(\"licensed for commercial\")} use.`);\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n console.log(\"--------\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n console.log(`${(0, $4BjRV$chalk).red(\"DO NOT\")} use this downloader if you are not a ${(0, $4BjRV$chalk).bold.green(\"Creator\")} or you have never buy the official product from the official website.`);\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n console.log(\"--------\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n console.log(`To unlock commercial use for your own projects, and get an official product license, please consider to go to the ${(0, $4BjRV$chalk).green(\"Font Awesome\")} webiste: ${(0, $4BjRV$chalk).green(\"https://fontawesome.com/plans\")}`);\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n console.log(\"--------\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(500);\n let agree = await (0, $c4dfc35b146d8b69$export$db9f06b5d27d15d8)(`Continue to download? (${(0, $4BjRV$chalk).cyan(\"Y\")}/n) `);\n agree = agree ? agree.toLowerCase() : \"y\";\n const notAgrees = [\n \"no\",\n \"n\",\n \"nope\"\n ];\n const isOk = notAgrees.find((textNo)=>textNo === agree) ? false : true;\n console.log((0, $4BjRV$chalk).cyan(isOk ? \"y\" : \"n\"));\n if (!isOk) {\n console.log(\"--------\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(1000);\n console.log((0, $4BjRV$chalk).red(\"\\u26D4 Font Awesome Pro Plus Downloader Canceled\"));\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(1000);\n console.log((0, $4BjRV$chalk).bgRed.black(\" --- DONE --- \"));\n }\n return {\n isOk: isOk\n };\n}\n\n\nasync function $0fe9c43b5c368182$var$startDownloader() {\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(100);\n console.clear();\n const { isOk: isOk } = await (0, $b58e88d9df26e0be$export$2e2bcd8739ae039)();\n if (!isOk) return;\n const { useDir: useDir } = await (0, $7133ad7cc212004a$export$2e2bcd8739ae039)();\n const { fontlist: fontlist, useVer: useVer, baseUrl: baseUrl } = await (0, $0d221b5cfb1ba63a$export$2e2bcd8739ae039)();\n const cssUrls = await (0, $50aa263ddf667332$export$2e2bcd8739ae039)(useVer, useDir, fontlist);\n const fontUrls = await (0, $dc001fcbec17a266$export$ae70b50decb7cf58)(cssUrls, useDir);\n await (0, $dc001fcbec17a266$export$6c18a7d4cf131851)(fontUrls, useDir, baseUrl);\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(2000);\n console.log(\"--------\");\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(1000);\n console.log((0, $4BjRV$chalk).green(`\\u{2705} Font Awesome ${useVer.split(\".\")[0]} Pro Plus v${useVer} Downloaded Successfully!`));\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(1000);\n console.log((0, $4BjRV$chalk).bgGreen.black(\" --- DONE --- \"));\n await (0, $574296b1a2de3654$export$2e2bcd8739ae039)(2000);\n}\nfunction $0fe9c43b5c368182$export$c0a0c3a161860b55() {\n $0fe9c43b5c368182$var$startDownloader();\n}\nfunction $0fe9c43b5c368182$export$89ae034f08762d55() {\n $0fe9c43b5c368182$var$startDownloader();\n}\n\n\n(0, $0fe9c43b5c368182$export$89ae034f08762d55)();\n\n\n//# sourceMappingURL=webfapro.js.map\n","#!/usr/bin/env node\nimport { getFapro } from \"./index\"\n\ngetFapro()\n","import chalk from \"chalk\"\nimport waittime from \"./helper/waittime\"\nimport askQuestion from \"./pages/askQuestions\"\nimport cssDownload from \"./pages/cssDownload\"\nimport { downloadFonts, readFonts } from \"./pages/fontsDownload\"\nimport checkVersion from \"./pages/versionCheck\"\nimport unofficialNotice from \"./pages/noticeOfficial\"\n\nasync function startDownloader(): Promise<void> {\n await waittime(100)\n console.clear()\n const { isOk } = await unofficialNotice()\n if (!isOk) return\n const { useDir } = await askQuestion()\n const { fontlist, useVer, baseUrl } = await checkVersion()\n const cssUrls: string[] = await cssDownload(useVer, useDir, fontlist)\n const fontUrls: string[] = await readFonts(cssUrls, useDir)\n await downloadFonts(fontUrls, useDir, baseUrl)\n await waittime(2000)\n console.log(\"--------\")\n await waittime(1000)\n console.log(chalk.green(`✅ Font Awesome ${useVer.split(\".\")[0]} Pro Plus v${useVer} Downloaded Successfully!`))\n await waittime(1000)\n console.log(chalk.bgGreen.black(\" --- DONE --- \"))\n await waittime(2000)\n}\nexport function getFontAwesomePro(): void {\n startDownloader()\n}\nexport function getFapro(): void {\n startDownloader()\n}\n","export default function waittime(ms: number = 500, n: number = 5): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms - n))\n}\n","import chalk from \"chalk\"\nimport { question } from \"../main/question\"\nimport waittime from \"../helper/waittime\"\n\nexport default async function askQuestion(): Promise<{ useDir: string }> {\n console.log(\"--------\")\n await waittime(1000)\n console.log(\" \")\n await waittime(100)\n console.log(`Set the ${chalk.cyan(\"Download Path\")}!`)\n await waittime(100)\n console.log(\"--------\")\n await waittime(100)\n console.log(\"Download path can be \" + chalk.cyan(\"`path/to/your/public/folder`\") + \" or \" + chalk.cyan(\"`anything`\") + \".\")\n await waittime(100)\n console.log(\"--------\")\n await waittime(100)\n console.log(\"if the path does not exist, it will be created automatically.\")\n await waittime(500)\n console.log(\"--------\")\n const dir = await question(`Enter download path: ${chalk.bold.cyan(\"(fapro)\")} `)\n const useDir = dir ? dir : \"fapro\"\n console.log(chalk.bold.cyan(`${useDir}`) + `${dir ? \"\" : \" (default)\"}`)\n console.log(\"--------\")\n await waittime(750)\n console.log(\" \")\n console.log(chalk.bgYellow.black(\" -- Preparing Downloader -- \"))\n await waittime(2250)\n console.log(\" \")\n return { useDir }\n}\n","import readline from \"readline\"\n\nexport function question(text: string): Promise<string> {\n return new Promise((resolve) => {\n const rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n })\n rl.question(text, (anwer) => {\n resolve(anwer)\n rl.close()\n })\n })\n}\n","import chalk from \"chalk\"\nimport { downloadFile, getDownloaded } from \"../main/file-downloader\"\nimport waittime from \"../helper/waittime\"\n\nexport default async function cssDownload(useVer: string, useDir: string, fontlist: string[]): Promise<string[]> {\n console.log(\"--------\")\n console.log(`🕗 Downloading All Stylesheets`)\n await waittime(2000)\n\n const dir = `${useDir}/css`\n\n for (let i = 0; i < fontlist.length; i++) {\n const url = fontlist[i]\n const progress = `[${i + 1}/${fontlist.length}]`\n await downloadFile(url, dir, progress)\n }\n console.log(chalk.greenBright(\"✅ Stylesheets Downloaded\"))\n await waittime(2000)\n return getDownloaded()\n}\n","import { Downloader } from \"nodejs-file-downloader\"\nimport { addDir } from \"./dir-checker\"\nimport chalk from \"chalk\"\n\nlet filesDownloaded: string[] = []\n\nexport async function downloadFile(fileurl: string, filedir: string, progress: string | null = null): Promise<void> {\n await addDir(`${filedir}`)\n const downloader = new Downloader({\n url: fileurl,\n directory: `./${filedir}`,\n cloneFiles: false\n })\n try {\n await downloader.download()\n const fileorigin = fileurl.split(\"/\")\n const filename = fileorigin[fileorigin.length - 1]\n console.log(`🚀 ${progress ? chalk.yellow(progress) + \" \" : \"\"}${filename}`)\n filesDownloaded.push(filename)\n } catch (_error) {\n throw new Error(chalk.red(\"The version you wanted to download is not available. Please use other release version.\"))\n }\n}\nexport function getDownloaded(): string[] {\n const files: string[] = [...filesDownloaded]\n filesDownloaded = []\n return files\n}\n","import fs from \"fs\"\nimport waittime from \"../helper/waittime\"\n\nexport async function addDir(dirpath: string): Promise<void> {\n let curpath = \".\"\n const dirs: string[] = dirpath.split(\"/\")\n\n for (const dir of dirs) {\n curpath += `/${dir}`\n if (!fs.existsSync(curpath)) {\n fs.mkdirSync(curpath)\n await waittime(100)\n }\n }\n}\n","import { addDir } from \"../main/dir-checker\"\nimport waittime from \"../helper/waittime\"\nimport { extractFont, getFonts } from \"../main/font-extractor\"\nimport { downloadFile } from \"../main/file-downloader\"\nimport chalk from \"chalk\"\n\nexport async function readFonts(sheets: string[], useDir: string): Promise<string[]> {\n console.log(\"--------\")\n console.log(\"🕗 Reading Available Webfonts\")\n const dir = `${useDir}/css`\n for (const sheet of sheets) {\n await extractFont(sheet, dir)\n }\n const fonts = getFonts()\n console.log(\"✅ Found \" + chalk.green(fonts.length.toString()) + \" Webfonts\")\n await waittime(2000)\n return fonts\n}\nexport async function downloadFonts(fonts: string[], filedir: string, baseUrl: string): Promise<void> {\n const dir = `${filedir}/webfonts`\n await addDir(dir)\n const fonturl = baseUrl\n console.log(\"--------\")\n console.log(\"🕗 Downloading All Webfonts\")\n await waittime(2000)\n for (let i = 0; i < fonts.length; i++) {\n const font = fonts[i].replace(\"..\", \"\")\n const url = `${fonturl}${font}`\n const progress = `[${i + 1}/${fonts.length}]`\n await downloadFile(url, dir, progress)\n }\n console.log(chalk.greenBright(\"✅ Webfonts Downloaded\"))\n}\n","import fs from \"fs\"\nimport postcss from \"postcss\"\nimport safeParser from \"postcss-safe-parser\"\n\nlet fontUrls: string[] = []\n\nexport async function extractFont(filename: string, filedir: string): Promise<void> {\n const css = fs.readFileSync(`./${filedir}/${filename}`, \"utf8\")\n postcss()\n .process(css, { parser: safeParser, from: undefined })\n .then((result) => {\n result.root.walkAtRules(\"font-face\", (rule) => {\n rule.walkDecls(\"src\", (decl) => {\n const matches = decl.value.match(/url\\(([^)]+)\\)/g)\n if (matches) {\n matches.forEach((url) => {\n const cleanUrl = url.replace(/url\\([\"']?/, \"\").replace(/[\"']?\\)/, \"\")\n fontUrls.push(cleanUrl)\n })\n }\n })\n })\n })\n}\n\nexport function getFonts(): string[] {\n const fixedFonts: string[] = [...fontUrls]\n fontUrls = []\n return fixedFonts\n}\n","import { Ver } from \"./fa.types\"\nimport defVer from \"../json/fonts.json\"\nimport waittime from \"../helper/waittime\"\nimport chalk from \"chalk\"\n\nasync function getVersion(): Promise<Ver> {\n const url = `https://raw.githubusercontent.com/devanka761/webfont-awesome-pro/refs/heads/master/src/json/fonts.json?ts=${Date.now().toString(36)}`\n\n return await fetch(url, {\n method: \"GET\"\n })\n .then((res) => res.json())\n .then((res) => {\n console.log(`✅ Found: v${res.version}`)\n return res\n })\n .catch(() => {\n console.log(`⛔ Error getting the latest version!`)\n console.log(`⛔ Forced Using v${defVer.version}`)\n return defVer\n })\n}\n\nexport default async function checkVersion(): Promise<{ fontlist: string[]; useVer: string; baseUrl: string }> {\n console.log(\"--------\")\n console.log(\"🕗 Checking Latest Version\")\n await waittime(1000)\n const curFonts = await getVersion()\n await waittime(100)\n console.log(\"--------\")\n await waittime(1000)\n console.log(\" \")\n console.log(chalk.bgGreen.black(` -- Downloading Version ${curFonts.version} of Font Awesome ${curFonts.version.split(\".\")[0]} Pro Plus -- `))\n await waittime(1000)\n console.log(\" \")\n console.log(\"--------\")\n await waittime(100)\n console.log(\"🕗 Reading Available Stylesheets\")\n await waittime(500)\n const fontlist = curFonts.css.map((file) => `${curFonts.root}/css/${file}`)\n console.log(\"✅ Found \" + chalk.green(fontlist.length.toString()) + \" Sytlesheets\")\n await waittime(2000)\n return { fontlist, useVer: curFonts.version, baseUrl: curFonts.root }\n}\n","{ \"version\": \"7.0.0\", \"root\": \"https://site-assets.fontawesome.com/releases/v7.0.0\", \"css\": [\"fontawesome.css\", \"whiteboard-semibold.css\", \"thumbprint-light.css\", \"slab-press-regular.css\", \"slab-regular.css\", \"sharp-duotone-thin.css\", \"sharp-duotone-solid.css\", \"sharp-duotone-regular.css\", \"sharp-duotone-light.css\", \"sharp-thin.css\", \"sharp-solid.css\", \"sharp-regular.css\", \"sharp-light.css\", \"notdog-duo-solid.css\", \"notdog-solid.css\", \"jelly-fill-regular.css\", \"jelly-duo-regular.css\", \"jelly-regular.css\", \"etch-solid.css\", \"duotone-thin.css\", \"duotone.css\", \"duotone-regular.css\", \"duotone-light.css\", \"thin.css\", \"solid.css\", \"regular.css\", \"light.css\", \"brands.css\", \"chisel-regular.css\"] }\n","import chalk from \"chalk\"\nimport waittime from \"../helper/waittime\"\nimport { question } from \"../main/question\"\n\nexport default async function unofficialNotice(): Promise<{ isOk: boolean }> {\n console.log(chalk.bgCyan.black(\" -- Font Awesome Pro Plus Downloader | Devanka761 -- \"))\n await waittime(500)\n console.log(\"\")\n console.log(\"--------\")\n console.log(`Font Awesome Pro Plus Downloader was made for ${chalk.yellow(\"educational purposes\")} only!`)\n await waittime(100)\n console.log(\"--------\")\n await waittime(100)\n console.log(`This downloader provides ${chalk.bold.green(\"Paid (Pro Plus) Version\")} for the latest Official Package. It is intended for ${chalk.yellow(\"experimental\")} and ${chalk.yellow(\"personal use\")} only. It is ${chalk.red(\"licensed for commercial\")} use.`)\n await waittime(100)\n console.log(\"--------\")\n await waittime(100)\n console.log(`${chalk.red(\"DO NOT\")} use this downloader if you are not a ${chalk.bold.green(\"Creator\")} or you have never buy the official product from the official website.`)\n await waittime(100)\n console.log(\"--------\")\n await waittime(100)\n console.log(`To unlock commercial use for your own projects, and get an official product license, please consider to go to the ${chalk.green(\"Font Awesome\")} webiste: ${chalk.green(\"https://fontawesome.com/plans\")}`)\n await waittime(100)\n console.log(\"--------\")\n await waittime(500)\n let agree = await question(`Continue to download? (${chalk.cyan(\"Y\")}/n) `)\n agree = agree ? agree.toLowerCase() : \"y\"\n const notAgrees = [\"no\", \"n\", \"nope\"]\n const isOk = notAgrees.find((textNo) => textNo === agree) ? false : true\n console.log(chalk.cyan(isOk ? \"y\" : \"n\"))\n if (!isOk) {\n console.log(\"--------\")\n await waittime(1000)\n console.log(chalk.red(\"⛔ Font Awesome Pro Plus Downloader Canceled\"))\n await waittime(1000)\n console.log(chalk.bgRed.black(\" --- DONE --- \"))\n }\n\n return { isOk }\n}\n"],"names":["$4BjRV$chalk","$4BjRV$readline","Downloader","$4BjRV$Downloader","$4BjRV$fs","$4BjRV$postcss","$4BjRV$postcsssafeparser","$parcel$interopDefault","a","__esModule","default","$574296b1a2de3654$export$2e2bcd8739ae039","ms","n","Promise","resolve","setTimeout","$c4dfc35b146d8b69$export$db9f06b5d27d15d8","text","rl","createInterface","input","process","stdin","output","stdout","question","anwer","close","$7133ad7cc212004a$export$2e2bcd8739ae039","console","log","cyan","dir","bold","useDir","bgYellow","black","$a088456a992e1b0b$export$75ad550fa5fe1d36","dirpath","curpath","split","existsSync","mkdirSync","$02b0a2fa6f6bedcc$var$filesDownloaded","$02b0a2fa6f6bedcc$export$bb3b75778e3e272","fileurl","filedir","progress","downloader","url","directory","cloneFiles","download","fileorigin","filename","length","yellow","push","_error","Error","red","$50aa263ddf667332$export$2e2bcd8739ae039","useVer","fontlist","i","greenBright","files","$4d4643fd90374c00$var$fontUrls","$4d4643fd90374c00$export$85c953af022fd6f3","css","readFileSync","parser","from","undefined","then","result","root","walkAtRules","rule","walkDecls","decl","matches","value","match","forEach","cleanUrl","replace","$dc001fcbec17a266$export$ae70b50decb7cf58","sheets","sheet","fonts","fixedFonts","green","toString","$dc001fcbec17a266$export$6c18a7d4cf131851","baseUrl","font","$eac82631717e0cdb$exports","$0d221b5cfb1ba63a$var$getVersion","Date","now","fetch","method","res","json","version","catch","$0d221b5cfb1ba63a$export$2e2bcd8739ae039","curFonts","bgGreen","map","file","$b58e88d9df26e0be$export$2e2bcd8739ae039","bgCyan","agree","toLowerCase","isOk","notAgrees","find","textNo","bgRed","$0fe9c43b5c368182$var$startDownloader","clear","cssUrls","fontUrls","JSON","parse"],"version":3,"file":"webfapro.js.map","sourceRoot":"../"}
|
package/package.json
CHANGED
|
@@ -1,72 +1,95 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "webfont-awesome-pro",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "(Webfont) Font Awesome Pro Downloader",
|
|
5
|
-
"author": "Devanka761 <contact@devanka.id> (https://devanka.id/)",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/devanka761/webfont-awesome-pro.git"
|
|
10
|
-
},
|
|
11
|
-
"bugs": {
|
|
12
|
-
"url": "https://github.com/devanka761/webfont-awesome-pro/issues"
|
|
13
|
-
},
|
|
14
|
-
"homepage": "https://github.com/devanka761/webfont-awesome-pro#readme",
|
|
15
|
-
"keywords": [
|
|
16
|
-
"font-awesome-pro",
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "webfont-awesome-pro",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "(Webfont) Font Awesome Pro Downloader",
|
|
5
|
+
"author": "Devanka761 <contact@devanka.id> (https://devanka.id/)",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/devanka761/webfont-awesome-pro.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/devanka761/webfont-awesome-pro/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/devanka761/webfont-awesome-pro#readme",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"font-awesome-pro",
|
|
17
|
+
"fontawesomepro",
|
|
18
|
+
"font-awesome",
|
|
19
|
+
"fontawesome",
|
|
20
|
+
"font-awesome-pro-downloader",
|
|
21
|
+
"font-awesome-downloader",
|
|
22
|
+
"font",
|
|
23
|
+
"webfont",
|
|
24
|
+
"font-face"
|
|
25
|
+
],
|
|
26
|
+
"type": "module",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"import": {
|
|
30
|
+
"types": "./dist/fapro.d.ts",
|
|
31
|
+
"default": "./dist/module.mjs"
|
|
32
|
+
},
|
|
33
|
+
"require": {
|
|
34
|
+
"types": "./dist/fapro.d.ts",
|
|
35
|
+
"default": "./dist/index.cjs"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"main": "dist/index.cjs",
|
|
40
|
+
"module": "dist/module.mjs",
|
|
41
|
+
"types": "dist/fapro.d.ts",
|
|
42
|
+
"files": [
|
|
43
|
+
"dist/"
|
|
44
|
+
],
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=14"
|
|
47
|
+
},
|
|
48
|
+
"targets": {
|
|
49
|
+
"main": {
|
|
50
|
+
"source": "src/index.ts"
|
|
51
|
+
},
|
|
52
|
+
"module": {
|
|
53
|
+
"source": "src/index.ts"
|
|
54
|
+
},
|
|
55
|
+
"types": {
|
|
56
|
+
"source": "src/index.ts"
|
|
57
|
+
},
|
|
58
|
+
"cli": {
|
|
59
|
+
"source": "src/webfapro.ts",
|
|
60
|
+
"outputFormat": "esmodule"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"type-check": "tsc -p . --pretty --noEmit",
|
|
65
|
+
"lint": "eslint --ext ts --ext tsx --ext js",
|
|
66
|
+
"format": "prettier --write .",
|
|
67
|
+
"check": "prettier --check .",
|
|
68
|
+
"start": "tsx ./src/webfapro.ts",
|
|
69
|
+
"clear": "rm -rf dist .parcel-cache",
|
|
70
|
+
"build": "npm run format && npm run lint && npm run type-check && rm -rf dist .parcel-cache && tsc --emitDeclarationOnly && parcel build",
|
|
71
|
+
"prepublishOnly": "npm run build",
|
|
72
|
+
"getfont": "npx webfapro"
|
|
73
|
+
},
|
|
74
|
+
"bin": {
|
|
75
|
+
"webfapro": "./dist/webfapro.js"
|
|
76
|
+
},
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"chalk": "^5.4.1",
|
|
79
|
+
"nodejs-file-downloader": "^4.13.0",
|
|
80
|
+
"postcss": "^8.5.5",
|
|
81
|
+
"postcss-safe-parser": "^7.0.1"
|
|
82
|
+
},
|
|
83
|
+
"devDependencies": {
|
|
84
|
+
"@eslint/js": "^9.28.0",
|
|
85
|
+
"@parcel/packager-ts": "^2.15.4",
|
|
86
|
+
"@parcel/transformer-typescript-types": "^2.15.4",
|
|
87
|
+
"@types/node": "^24.0.8",
|
|
88
|
+
"@types/postcss-safe-parser": "^5.0.4",
|
|
89
|
+
"parcel": "^2.15.4",
|
|
90
|
+
"prettier": "^3.5.3",
|
|
91
|
+
"tsx": "^4.20.2",
|
|
92
|
+
"typescript": "^5.8.3",
|
|
93
|
+
"typescript-eslint": "^8.34.0"
|
|
94
|
+
}
|
|
95
|
+
}
|