diff --git a/.github/workflows/documentation-prod.yaml b/.github/workflows/documentation-prod.yaml index ed839d5..61c0ff3 100644 --- a/.github/workflows/documentation-prod.yaml +++ b/.github/workflows/documentation-prod.yaml @@ -60,7 +60,7 @@ jobs: - name: Extract package and semantic version from release tag if: ${{ github.ref_type == 'tag' }} id: extract-tag - uses: ./format-tag + uses: ./.github/workflows/format-tag with: tag: ${{ github.ref_name }} diff --git a/packages/create-wapi-app/package.json b/packages/create-wapi-app/package.json index 41b9f63..7b95206 100644 --- a/packages/create-wapi-app/package.json +++ b/packages/create-wapi-app/package.json @@ -1,6 +1,6 @@ { "name": "create-wapi-app", - "version": "0.0.2", + "version": "0.0.3", "description": "a utility to quickly initiate a whatsapp bot", "type": "module", "author": { diff --git a/packages/create-wapi-app/src/create-bot.ts b/packages/create-wapi-app/src/create-bot.ts index 4e054f7..86d0a86 100644 --- a/packages/create-wapi-app/src/create-bot.ts +++ b/packages/create-wapi-app/src/create-bot.ts @@ -10,11 +10,13 @@ import { import path from "node:path"; import process from "node:process"; import { URL } from "node:url"; -import { glob } from "fast-glob"; +import fastGlob from "fast-glob"; import chalk from "chalk"; -import { installPackages } from "./reusable-function"; +import { installPackages } from "./reusable-function.js"; import { PackageManagerEnum } from "./type.js"; +const glob = fastGlob.glob + export async function createWhatsappBot(options: { directory: string; doInstallPackage: boolean; @@ -55,12 +57,12 @@ export async function createWhatsappBot(options: { } console.log(`Creating ${directoryName} in ${chalk.green(root)}.`); + + // ! TODO: support DENO const deno = packageManagerInUse === PackageManagerEnum.Deno; await cp( new URL( - `../template/${ - deno ? "Deno" : isTypescriptEnabled ? "typeScript" : "javaScript" - }`, + path.resolve(`./template/${deno ? "Deno" : isTypescriptEnabled ? "typeScript" : 'javaScript'}`), import.meta.url, ), root, @@ -69,12 +71,12 @@ export async function createWhatsappBot(options: { }, ); + // ! TODO: support Bun const bun = packageManagerInUse === PackageManagerEnum.Bun; if (bun) { await cp( new URL( - `../template/Bun/${ - isTypescriptEnabled ? "typeScript" : "javaScript" + `../template/Bun/${isTypescriptEnabled ? "typeScript" : "javaScript" }/package.json`, import.meta.url, ), diff --git a/packages/create-wapi-app/tsconfig.json b/packages/create-wapi-app/tsconfig.json index ac33857..d110f64 100644 --- a/packages/create-wapi-app/tsconfig.json +++ b/packages/create-wapi-app/tsconfig.json @@ -1,10 +1,13 @@ { "extends": "@wapijs/typescript-config/node.base.json", - "include": ["src/", "*.ts", "./.eslintrc.js", "template", "bin"], + "include": ["src/", "*.ts", "./.eslintrc.js", "bin"], "exclude": ["template/"], "compilerOptions": { - "module": "ESNext", + "module": "NodeNext", + "moduleResolution": "NodeNext", "outDir": "dist", + "target": "ES2022", + "lib": ["ES2022"], "resolveJsonModule": true } } diff --git a/packages/wapi.js/package.json b/packages/wapi.js/package.json index 31bae6f..f16f3d1 100644 --- a/packages/wapi.js/package.json +++ b/packages/wapi.js/package.json @@ -1,6 +1,6 @@ { "name": "@wapijs/wapi.js", - "version": "0.0.6", + "version": "0.0.7", "description": "a typescript based client library to build whatsapp cloud api based chat bots", "main": "dist/cjs/index.js", "module": "dist/esm/index.js",