diff --git a/config/jest.cjs b/config/jest.cjs index 761c52f1..79169a4e 100644 --- a/config/jest.cjs +++ b/config/jest.cjs @@ -60,8 +60,8 @@ const project = (package_name) => { // https://jestjs.io/docs/configuration#projects-arraystring--projectconfig const projects = [ - project('eleventy-plugin-text-to-speech'), - project('eleventy-telegram-plugin') + project('eleventy-plugin-telegram'), + project('eleventy-plugin-text-to-speech') ] const config = { diff --git a/package-lock.json b/package-lock.json index 19549d37..fde0420f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1272,12 +1272,12 @@ "resolved": "packages/demo-site", "link": true }, - "node_modules/@jackdbd/eleventy-plugin-text-to-speech": { - "resolved": "packages/eleventy-plugin-text-to-speech", + "node_modules/@jackdbd/eleventy-plugin-telegram": { + "resolved": "packages/eleventy-plugin-telegram", "link": true }, - "node_modules/@jackdbd/eleventy-telegram-plugin": { - "resolved": "packages/eleventy-telegram-plugin", + "node_modules/@jackdbd/eleventy-plugin-text-to-speech": { + "resolved": "packages/eleventy-plugin-text-to-speech", "link": true }, "node_modules/@jest/console": { @@ -2015,9 +2015,9 @@ } }, "node_modules/@octokit/openapi-types": { - "version": "12.6.1", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.6.1.tgz", - "integrity": "sha512-zirGmxkSQuZIQYsOLtCxNoKi7ByKLwGhrGhHz6YUI7h/c8xOES9bEoHOeq4z81uNf2AGAqNfPW9i3GOrpgKoJQ==", + "version": "12.8.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.8.0.tgz", + "integrity": "sha512-ydcKLs2KKcxlhpdWLzJxEBDEk/U5MUeqtqkXlrtAUXXFPs6vLl1PEGghFC/BbpleosB7iXs0Z4P2DGe7ZT5ZNg==", "dev": true }, "node_modules/@octokit/plugin-paginate-rest": { @@ -2042,12 +2042,12 @@ } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.1.tgz", - "integrity": "sha512-RMHD3aJZvOpjR2fGzD2an6eU7LG8MsknhUHvP+wRUnKdbt7eDdhTMLQsZ4xsHZcLNsxPO/K4DDIZPhI2s571Ag==", + "version": "5.16.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", + "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", "dev": true, "dependencies": { - "@octokit/types": "^6.38.2", + "@octokit/types": "^6.39.0", "deprecation": "^2.3.1" }, "peerDependencies": { @@ -2092,12 +2092,12 @@ } }, "node_modules/@octokit/types": { - "version": "6.38.2", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.38.2.tgz", - "integrity": "sha512-McFegRKQ1qaMSnDt8ScJzv26IFR1zhXveYaqx8wF7QEgiy4GHMrnX4xbP+Yl+kAr12DCplL3WJq4xkeD1VMfmw==", + "version": "6.39.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.39.0.tgz", + "integrity": "sha512-Mq4N9sOAYCitTsBtDdRVrBE80lIrMBhL9Jbrw0d+j96BAzlq4V+GLHFJbHokEsVvO/9tQupQdoFdgVYhD2C8UQ==", "dev": true, "dependencies": { - "@octokit/openapi-types": "^12.6.1" + "@octokit/openapi-types": "^12.7.0" } }, "node_modules/@panoply/11ty": { @@ -3129,14 +3129,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.4.tgz", - "integrity": "sha512-xjujQISAIa4HAaos8fcMZXmqkuZqMx6icdxkI88jMM/eNe4J8AuTLYnLK+zdm0mBYLyctdFf//UE4/xFCcQzYQ==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.5.tgz", + "integrity": "sha512-lftkqRoBvc28VFXEoRgyZuztyVUQ04JvUnATSPtIRFAccbXTWL6DEtXGYMcbg998kXw1NLUJm7rTQ9eUt+q6Ig==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.30.4", - "@typescript-eslint/type-utils": "5.30.4", - "@typescript-eslint/utils": "5.30.4", + "@typescript-eslint/scope-manager": "5.30.5", + "@typescript-eslint/type-utils": "5.30.5", + "@typescript-eslint/utils": "5.30.5", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -3162,15 +3162,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.4.tgz", - "integrity": "sha512-/ge1HtU63wVoED4VnlU2o+FPFmi017bPYpeSrCmd8Ycsti4VSxXrmcpXXm7JpI4GT0Aa7qviabv1PEp6L5bboQ==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.5.tgz", + "integrity": "sha512-zj251pcPXI8GO9NDKWWmygP6+UjwWmrdf9qMW/L/uQJBM/0XbU2inxe5io/234y/RCvwpKEYjZ6c1YrXERkK4Q==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.30.4", - "@typescript-eslint/types": "5.30.4", - "@typescript-eslint/typescript-estree": "5.30.4", + "@typescript-eslint/scope-manager": "5.30.5", + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/typescript-estree": "5.30.5", "debug": "^4.3.4" }, "engines": { @@ -3190,13 +3190,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.4.tgz", - "integrity": "sha512-DNzlQwGSiGefz71JwaHrpcaAX3zYkEcy8uVuan3YMKOa6qeW/y+7SaD8KIsIAruASwq6P+U4BjWBWtM2O+mwBQ==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.5.tgz", + "integrity": "sha512-NJ6F+YHHFT/30isRe2UTmIGGAiXKckCyMnIV58cE3JkHmaD6e5zyEYm5hBDv0Wbin+IC0T1FWJpD3YqHUG/Ydg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.30.4", - "@typescript-eslint/visitor-keys": "5.30.4" + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3207,12 +3207,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.4.tgz", - "integrity": "sha512-55cf1dZviwwv+unDB+mF8vZkfta5muTK6bppPvenWWCD7slZZ0DEsXUjZerqy7Rq8s3J4SXdg4rMIY8ngCtTmA==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.5.tgz", + "integrity": "sha512-k9+ejlv1GgwN1nN7XjVtyCgE0BTzhzT1YsQF0rv4Vfj2U9xnslBgMYYvcEYAFVdvhuEscELJsB7lDkN7WusErw==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.30.4", + "@typescript-eslint/utils": "5.30.5", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -3233,9 +3233,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.4.tgz", - "integrity": "sha512-NTEvqc+Vvu8Q6JeAKryHk2eqLKqsr2St3xhIjhOjQv5wQUBhaTuix4WOSacqj0ONWfKVU12Eug3LEAB95GBkMA==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.5.tgz", + "integrity": "sha512-kZ80w/M2AvsbRvOr3PjaNh6qEW1LFqs2pLdo2s5R38B2HYXG8Z0PP48/4+j1QHJFL3ssHIbJ4odPRS8PlHrFfw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3246,13 +3246,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.4.tgz", - "integrity": "sha512-V4VnEs6/J9/nNizaA12IeU4SAeEYaiKr7XndLNfV5+3zZSB4hIu6EhHJixTKhvIqA+EEHgBl6re8pivBMLLO1w==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.5.tgz", + "integrity": "sha512-qGTc7QZC801kbYjAr4AgdOfnokpwStqyhSbiQvqGBLixniAKyH+ib2qXIVo4P9NgGzwyfD9I0nlJN7D91E1VpQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.30.4", - "@typescript-eslint/visitor-keys": "5.30.4", + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3302,15 +3302,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.4.tgz", - "integrity": "sha512-a+GQrJzOUhn4WT1mUumXDyam+22Oo4c5K/jnZ+6r/4WTQF3q8e4CsC9PLHb4SnOClzOqo/5GLZWvkE1aa5UGKQ==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.5.tgz", + "integrity": "sha512-o4SSUH9IkuA7AYIfAvatldovurqTAHrfzPApOZvdUq01hHojZojCFXx06D/aFpKCgWbMPRdJBWAC3sWp3itwTA==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.30.4", - "@typescript-eslint/types": "5.30.4", - "@typescript-eslint/typescript-estree": "5.30.4", + "@typescript-eslint/scope-manager": "5.30.5", + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/typescript-estree": "5.30.5", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -3326,12 +3326,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.4.tgz", - "integrity": "sha512-ulKGse3mruSc8x6l8ORSc6+1ORyJzKmZeIaRTu/WpaF/jx3vHvEn5XZUKF9XaVg2710mFmTAUlLcLYLPp/Zf/Q==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.5.tgz", + "integrity": "sha512-D+xtGo9HUMELzWIUqcQc0p2PO4NyvTrgIOK/VnSH083+8sq0tiLozNRKuLarwHYGRuA6TVBQSuuLwJUDWd3aaA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.30.4", + "@typescript-eslint/types": "5.30.5", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -6123,9 +6123,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.177", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.177.tgz", - "integrity": "sha512-FYPir3NSBEGexSZUEeht81oVhHfLFl6mhUKSkjHN/iB/TwEIt/WHQrqVGfTLN5gQxwJCQkIJBe05eOXjI7omgg==", + "version": "1.4.179", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.179.tgz", + "integrity": "sha512-1XeTb/U/8Xgh2YgPOqhakLYsvCcU4U7jUjTMbEnhIJoIWd/Qt3yC8y0cbG+fHzn4zUNF99Ey1xiPf20bwgLO3Q==", "dev": true }, "node_modules/emittery": { @@ -7762,9 +7762,9 @@ } }, "node_modules/globals": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", - "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", + "version": "13.16.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.16.0.tgz", + "integrity": "sha512-A1lrQfpNF+McdPOnnFqY3kSN0AFTy485bTi1bkLk4mVPODIUEcSfhHgRqA+QdXPksrSTTztYXx37NFV+GpGk3Q==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -18699,38 +18699,17 @@ "version": "0.0.1", "devDependencies": { "@11ty/eleventy": "^1.0.1", - "@jackdbd/eleventy-plugin-text-to-speech": "*", - "@jackdbd/eleventy-telegram-plugin": "*" + "@jackdbd/eleventy-plugin-telegram": "*", + "@jackdbd/eleventy-plugin-text-to-speech": "*" }, "engines": { "node": ">=16.0.0" } }, - "packages/eleventy-plugin-text-to-speech": { - "name": "@jackdbd/eleventy-plugin-text-to-speech", + "packages/eleventy-plugin-telegram": { + "name": "@jackdbd/eleventy-plugin-telegram", "version": "0.0.1", "license": "MIT", - "dependencies": { - "@google-cloud/text-to-speech": "^4.0.0", - "html-to-text": "^8.2.0", - "joi": "^17.6.0", - "jsdom": "^20.0.0" - }, - "devDependencies": { - "@panoply/11ty": "^0.1.0" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "@11ty/eleventy": ">=1.0.0", - "debug": ">=4.0.0" - } - }, - "packages/eleventy-telegram-plugin": { - "name": "@jackdbd/eleventy-telegram-plugin", - "version": "1.0.0-alpha.1", - "license": "MIT", "dependencies": { "joi": "^17.6.0", "phin": "^3.6.1" @@ -18746,15 +18725,15 @@ "debug": ">=4.0.0" } }, - "packages/eleventy-text-to-speech-plugin": { - "name": "@jackdbd/eleventy-text-to-speech-plugin", - "version": "0.0.1", - "extraneous": true, + "packages/eleventy-plugin-text-to-speech": { + "name": "@jackdbd/eleventy-plugin-text-to-speech", + "version": "1.0.0-alpha.1", "license": "MIT", "dependencies": { "@google-cloud/text-to-speech": "^4.0.0", + "html-to-text": "^8.2.0", "joi": "^17.6.0", - "phin": "^3.6.1" + "jsdom": "^20.0.0" }, "devDependencies": { "@panoply/11ty": "^0.1.0" @@ -19725,26 +19704,26 @@ "version": "file:packages/demo-site", "requires": { "@11ty/eleventy": "^1.0.1", - "@jackdbd/eleventy-plugin-text-to-speech": "*", - "@jackdbd/eleventy-telegram-plugin": "*" + "@jackdbd/eleventy-plugin-telegram": "*", + "@jackdbd/eleventy-plugin-text-to-speech": "*" } }, - "@jackdbd/eleventy-plugin-text-to-speech": { - "version": "file:packages/eleventy-plugin-text-to-speech", + "@jackdbd/eleventy-plugin-telegram": { + "version": "file:packages/eleventy-plugin-telegram", "requires": { - "@google-cloud/text-to-speech": "^4.0.0", "@panoply/11ty": "^0.1.0", - "html-to-text": "^8.2.0", "joi": "^17.6.0", - "jsdom": "^20.0.0" + "phin": "^3.6.1" } }, - "@jackdbd/eleventy-telegram-plugin": { - "version": "file:packages/eleventy-telegram-plugin", + "@jackdbd/eleventy-plugin-text-to-speech": { + "version": "file:packages/eleventy-plugin-text-to-speech", "requires": { + "@google-cloud/text-to-speech": "^4.0.0", "@panoply/11ty": "^0.1.0", + "html-to-text": "^8.2.0", "joi": "^17.6.0", - "phin": "^3.6.1" + "jsdom": "^20.0.0" } }, "@jest/console": { @@ -20344,9 +20323,9 @@ } }, "@octokit/openapi-types": { - "version": "12.6.1", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.6.1.tgz", - "integrity": "sha512-zirGmxkSQuZIQYsOLtCxNoKi7ByKLwGhrGhHz6YUI7h/c8xOES9bEoHOeq4z81uNf2AGAqNfPW9i3GOrpgKoJQ==", + "version": "12.8.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.8.0.tgz", + "integrity": "sha512-ydcKLs2KKcxlhpdWLzJxEBDEk/U5MUeqtqkXlrtAUXXFPs6vLl1PEGghFC/BbpleosB7iXs0Z4P2DGe7ZT5ZNg==", "dev": true }, "@octokit/plugin-paginate-rest": { @@ -20366,12 +20345,12 @@ "requires": {} }, "@octokit/plugin-rest-endpoint-methods": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.1.tgz", - "integrity": "sha512-RMHD3aJZvOpjR2fGzD2an6eU7LG8MsknhUHvP+wRUnKdbt7eDdhTMLQsZ4xsHZcLNsxPO/K4DDIZPhI2s571Ag==", + "version": "5.16.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", + "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", "dev": true, "requires": { - "@octokit/types": "^6.38.2", + "@octokit/types": "^6.39.0", "deprecation": "^2.3.1" } }, @@ -20413,12 +20392,12 @@ } }, "@octokit/types": { - "version": "6.38.2", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.38.2.tgz", - "integrity": "sha512-McFegRKQ1qaMSnDt8ScJzv26IFR1zhXveYaqx8wF7QEgiy4GHMrnX4xbP+Yl+kAr12DCplL3WJq4xkeD1VMfmw==", + "version": "6.39.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.39.0.tgz", + "integrity": "sha512-Mq4N9sOAYCitTsBtDdRVrBE80lIrMBhL9Jbrw0d+j96BAzlq4V+GLHFJbHokEsVvO/9tQupQdoFdgVYhD2C8UQ==", "dev": true, "requires": { - "@octokit/openapi-types": "^12.6.1" + "@octokit/openapi-types": "^12.7.0" } }, "@panoply/11ty": { @@ -21291,14 +21270,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.4.tgz", - "integrity": "sha512-xjujQISAIa4HAaos8fcMZXmqkuZqMx6icdxkI88jMM/eNe4J8AuTLYnLK+zdm0mBYLyctdFf//UE4/xFCcQzYQ==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.5.tgz", + "integrity": "sha512-lftkqRoBvc28VFXEoRgyZuztyVUQ04JvUnATSPtIRFAccbXTWL6DEtXGYMcbg998kXw1NLUJm7rTQ9eUt+q6Ig==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.30.4", - "@typescript-eslint/type-utils": "5.30.4", - "@typescript-eslint/utils": "5.30.4", + "@typescript-eslint/scope-manager": "5.30.5", + "@typescript-eslint/type-utils": "5.30.5", + "@typescript-eslint/utils": "5.30.5", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -21308,53 +21287,53 @@ } }, "@typescript-eslint/parser": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.4.tgz", - "integrity": "sha512-/ge1HtU63wVoED4VnlU2o+FPFmi017bPYpeSrCmd8Ycsti4VSxXrmcpXXm7JpI4GT0Aa7qviabv1PEp6L5bboQ==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.5.tgz", + "integrity": "sha512-zj251pcPXI8GO9NDKWWmygP6+UjwWmrdf9qMW/L/uQJBM/0XbU2inxe5io/234y/RCvwpKEYjZ6c1YrXERkK4Q==", "dev": true, "peer": true, "requires": { - "@typescript-eslint/scope-manager": "5.30.4", - "@typescript-eslint/types": "5.30.4", - "@typescript-eslint/typescript-estree": "5.30.4", + "@typescript-eslint/scope-manager": "5.30.5", + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/typescript-estree": "5.30.5", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.4.tgz", - "integrity": "sha512-DNzlQwGSiGefz71JwaHrpcaAX3zYkEcy8uVuan3YMKOa6qeW/y+7SaD8KIsIAruASwq6P+U4BjWBWtM2O+mwBQ==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.5.tgz", + "integrity": "sha512-NJ6F+YHHFT/30isRe2UTmIGGAiXKckCyMnIV58cE3JkHmaD6e5zyEYm5hBDv0Wbin+IC0T1FWJpD3YqHUG/Ydg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.30.4", - "@typescript-eslint/visitor-keys": "5.30.4" + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5" } }, "@typescript-eslint/type-utils": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.4.tgz", - "integrity": "sha512-55cf1dZviwwv+unDB+mF8vZkfta5muTK6bppPvenWWCD7slZZ0DEsXUjZerqy7Rq8s3J4SXdg4rMIY8ngCtTmA==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.5.tgz", + "integrity": "sha512-k9+ejlv1GgwN1nN7XjVtyCgE0BTzhzT1YsQF0rv4Vfj2U9xnslBgMYYvcEYAFVdvhuEscELJsB7lDkN7WusErw==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.30.4", + "@typescript-eslint/utils": "5.30.5", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.4.tgz", - "integrity": "sha512-NTEvqc+Vvu8Q6JeAKryHk2eqLKqsr2St3xhIjhOjQv5wQUBhaTuix4WOSacqj0ONWfKVU12Eug3LEAB95GBkMA==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.5.tgz", + "integrity": "sha512-kZ80w/M2AvsbRvOr3PjaNh6qEW1LFqs2pLdo2s5R38B2HYXG8Z0PP48/4+j1QHJFL3ssHIbJ4odPRS8PlHrFfw==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.4.tgz", - "integrity": "sha512-V4VnEs6/J9/nNizaA12IeU4SAeEYaiKr7XndLNfV5+3zZSB4hIu6EhHJixTKhvIqA+EEHgBl6re8pivBMLLO1w==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.5.tgz", + "integrity": "sha512-qGTc7QZC801kbYjAr4AgdOfnokpwStqyhSbiQvqGBLixniAKyH+ib2qXIVo4P9NgGzwyfD9I0nlJN7D91E1VpQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.30.4", - "@typescript-eslint/visitor-keys": "5.30.4", + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -21385,26 +21364,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.4.tgz", - "integrity": "sha512-a+GQrJzOUhn4WT1mUumXDyam+22Oo4c5K/jnZ+6r/4WTQF3q8e4CsC9PLHb4SnOClzOqo/5GLZWvkE1aa5UGKQ==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.5.tgz", + "integrity": "sha512-o4SSUH9IkuA7AYIfAvatldovurqTAHrfzPApOZvdUq01hHojZojCFXx06D/aFpKCgWbMPRdJBWAC3sWp3itwTA==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.30.4", - "@typescript-eslint/types": "5.30.4", - "@typescript-eslint/typescript-estree": "5.30.4", + "@typescript-eslint/scope-manager": "5.30.5", + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/typescript-estree": "5.30.5", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.30.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.4.tgz", - "integrity": "sha512-ulKGse3mruSc8x6l8ORSc6+1ORyJzKmZeIaRTu/WpaF/jx3vHvEn5XZUKF9XaVg2710mFmTAUlLcLYLPp/Zf/Q==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.5.tgz", + "integrity": "sha512-D+xtGo9HUMELzWIUqcQc0p2PO4NyvTrgIOK/VnSH083+8sq0tiLozNRKuLarwHYGRuA6TVBQSuuLwJUDWd3aaA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.30.4", + "@typescript-eslint/types": "5.30.5", "eslint-visitor-keys": "^3.3.0" } }, @@ -23548,9 +23527,9 @@ } }, "electron-to-chromium": { - "version": "1.4.177", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.177.tgz", - "integrity": "sha512-FYPir3NSBEGexSZUEeht81oVhHfLFl6mhUKSkjHN/iB/TwEIt/WHQrqVGfTLN5gQxwJCQkIJBe05eOXjI7omgg==", + "version": "1.4.179", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.179.tgz", + "integrity": "sha512-1XeTb/U/8Xgh2YgPOqhakLYsvCcU4U7jUjTMbEnhIJoIWd/Qt3yC8y0cbG+fHzn4zUNF99Ey1xiPf20bwgLO3Q==", "dev": true }, "emittery": { @@ -24793,9 +24772,9 @@ } }, "globals": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", - "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", + "version": "13.16.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.16.0.tgz", + "integrity": "sha512-A1lrQfpNF+McdPOnnFqY3kSN0AFTy485bTi1bkLk4mVPODIUEcSfhHgRqA+QdXPksrSTTztYXx37NFV+GpGk3Q==", "dev": true, "requires": { "type-fest": "^0.20.2" diff --git a/packages/demo-site/config/eleventy.cjs b/packages/demo-site/config/eleventy.cjs index a180f324..d5622ae3 100644 --- a/packages/demo-site/config/eleventy.cjs +++ b/packages/demo-site/config/eleventy.cjs @@ -1,6 +1,6 @@ const path = require('node:path') const slugify = require('slugify') -const { telegramPlugin } = require('@jackdbd/eleventy-telegram-plugin') +const { telegramPlugin } = require('@jackdbd/eleventy-plugin-telegram') const { textToSpeechPlugin } = require('@jackdbd/eleventy-plugin-text-to-speech') @@ -36,7 +36,8 @@ module.exports = function (eleventyConfig) { eleventyConfig.addPlugin(telegramPlugin, { chatId, token, - textBeforeBuild: `demo-site build START` + textBeforeBuild: `demo-site build START`, + textAfterBuild: `demo-site build FINISHED` }) eleventyConfig.addPlugin(textToSpeechPlugin, { diff --git a/packages/demo-site/package.json b/packages/demo-site/package.json index a13ebcca..9db32007 100644 --- a/packages/demo-site/package.json +++ b/packages/demo-site/package.json @@ -31,7 +31,7 @@ "peerDependencies": {}, "devDependencies": { "@11ty/eleventy": "^1.0.1", - "@jackdbd/eleventy-telegram-plugin": "*", + "@jackdbd/eleventy-plugin-telegram": "*", "@jackdbd/eleventy-plugin-text-to-speech": "*" } } diff --git a/packages/eleventy-telegram-plugin/LICENSE b/packages/eleventy-plugin-telegram/LICENSE similarity index 100% rename from packages/eleventy-telegram-plugin/LICENSE rename to packages/eleventy-plugin-telegram/LICENSE diff --git a/packages/eleventy-plugin-telegram/README.md b/packages/eleventy-plugin-telegram/README.md new file mode 100644 index 00000000..d2533106 --- /dev/null +++ b/packages/eleventy-plugin-telegram/README.md @@ -0,0 +1,52 @@ +# @jackdbd/eleventy-plugin-telegram + +[![npm version](https://badge.fury.io/js/@jackdbd%2Feleventy-plugin-telegram.svg)](https://badge.fury.io/js/@jackdbd%2Feleventy-plugin-telegram) +![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@jackdbd%2Feleventy-plugin-telegram) + +Eleventy plugin that send messages to a Telegram chat of your choice. + +## Installation + +```sh +npm install --save-dev @jackdbd/eleventy-plugin-telegram +``` + + +## Usage + +```js +const { telegramPlugin } = require('@jackdbd/eleventy-plugin-telegram') + +module.exports = function (eleventyConfig) { + // some eleventy configuration... + + eleventyConfig.addPlugin(telegramPlugin, { + chatId: 'YOUR_TELEGRAM_CHAT_ID', + token: 'YOUR_TELEGRAM_BOT_TOKEN', + textBeforeBuild: '11ty have just started building my site', + textAfterBuild: '11ty has finished building my awesome site' + }) + + // some more eleventy configuration... +} +``` + +See Telegram [sendMessage](https://core.telegram.org/bots/api#sendmessage) API method for formatting options. + +## Configuration + +### Required parameters + +| Parameter | Explanation | +| --- | --- | +| `chatId` | Your Telegram chat ID. | +| `token` | Your Telegram Bot token. If you forgot the API token of a Telegram bot you created, you can retrieve it at any time using BotFather. Just go to `BotFather > bot list > API token`. | + +### Options + +| Option | Default | Explanation | +| --- | --- | --- | +| `textBeforeBuild` | `🏎️ 11ty has started building the site` | Text message to send when Eleventy starts building the site. | +| `textAfterBuild` | `🏁 11ty has finished building the site` | Text message to send when Eleventy finishes building the site. | + +> :information_source: a Telegram message can be 1-4096 characters long, after entities parsing. See [formatting options here](https://core.telegram.org/bots/api#formatting-options). diff --git a/packages/eleventy-telegram-plugin/__tests__/index.test.cjs b/packages/eleventy-plugin-telegram/__tests__/index.test.cjs similarity index 100% rename from packages/eleventy-telegram-plugin/__tests__/index.test.cjs rename to packages/eleventy-plugin-telegram/__tests__/index.test.cjs diff --git a/packages/eleventy-telegram-plugin/package.json b/packages/eleventy-plugin-telegram/package.json similarity index 89% rename from packages/eleventy-telegram-plugin/package.json rename to packages/eleventy-plugin-telegram/package.json index 5735464e..9b2bc042 100644 --- a/packages/eleventy-telegram-plugin/package.json +++ b/packages/eleventy-plugin-telegram/package.json @@ -1,6 +1,6 @@ { - "name": "@jackdbd/eleventy-telegram-plugin", - "version": "1.0.0-alpha.1", + "name": "@jackdbd/eleventy-plugin-telegram", + "version": "0.0.1", "description": "Eleventy plugin for Telegram", "author": { "name": "Giacomo Debidda", @@ -21,7 +21,7 @@ "type": "git", "url": "https://github.com/jackdbd/undici" }, - "homepage": "https://github.com/jackdbd/undici/tree/main/packages/eleventy-telegram-plugin#readme", + "homepage": "https://github.com/jackdbd/undici/tree/main/packages/eleventy-plugin-telegram#readme", "engines": { "node": ">=16.0.0" }, @@ -53,8 +53,8 @@ "nuke": "npm run clean && rimraf node_modules 'package-lock.json'", "precommit": "lint-staged --config ../../config/lint-staged.cjs", "size": "pkg-size ./lib --sort-by=brotli --ignore-files {*.d.ts,*.map}", - "test": "TELEGRAM=$(cat ../../secrets/telegram.json) jest --config ../../config/jest.cjs --rootDir ../../ --selectProjects eleventy-telegram-plugin", - "test:ci": "jest --config ../../config/jest.cjs --rootDir ../../ --ci --coverage --selectProjects eleventy-telegram-plugin" + "test": "TELEGRAM=$(cat ../../secrets/telegram.json) jest --config ../../config/jest.cjs --rootDir ../../ --selectProjects eleventy-plugin-telegram", + "test:ci": "jest --config ../../config/jest.cjs --rootDir ../../ --ci --coverage --selectProjects eleventy-plugin-telegram" }, "dependencies": { "joi": "^17.6.0", diff --git a/packages/eleventy-telegram-plugin/release.config.cjs b/packages/eleventy-plugin-telegram/release.config.cjs similarity index 91% rename from packages/eleventy-telegram-plugin/release.config.cjs rename to packages/eleventy-plugin-telegram/release.config.cjs index bd19a875..c4a952c2 100644 --- a/packages/eleventy-telegram-plugin/release.config.cjs +++ b/packages/eleventy-plugin-telegram/release.config.cjs @@ -5,7 +5,7 @@ const base_config = require('../../config/semantic-release.cjs') // The rest of the semantic-release configuration should stay the same. // https://github.com/semantic-release/git#message const message = - 'chore(eleventy-telegram-plugin): release v.${nextRelease.version} [skip ci]\n\n${nextRelease.notes}' + 'chore(eleventy-plugin-telegram): release v.${nextRelease.version} [skip ci]\n\n${nextRelease.notes}' //////////////////////////////////////////////////////////////////////////////// const git = [ diff --git a/packages/eleventy-telegram-plugin/src/constants.ts b/packages/eleventy-plugin-telegram/src/constants.ts similarity index 76% rename from packages/eleventy-telegram-plugin/src/constants.ts rename to packages/eleventy-plugin-telegram/src/constants.ts index a79300d4..de031760 100644 --- a/packages/eleventy-telegram-plugin/src/constants.ts +++ b/packages/eleventy-plugin-telegram/src/constants.ts @@ -1,4 +1,4 @@ -export const PREFIX = '[💬 11ty-telegram-plugin] ' +export const PREFIX = '[💬 11ty-plugin-telegram] ' export const DEFAULT = { TEXT_BEFORE_BUILD: `🏎️ 11ty has started building the site`, diff --git a/packages/eleventy-telegram-plugin/src/index.ts b/packages/eleventy-plugin-telegram/src/index.ts similarity index 97% rename from packages/eleventy-telegram-plugin/src/index.ts rename to packages/eleventy-plugin-telegram/src/index.ts index c9a479ab..57e37302 100644 --- a/packages/eleventy-telegram-plugin/src/index.ts +++ b/packages/eleventy-plugin-telegram/src/index.ts @@ -7,7 +7,7 @@ import { sendMessage } from './send-message.js' import type { SendMessageConfig } from './send-message.js' import type { ChatId } from './types.js' -const debug = makeDebug('eleventy-telegram-plugin/index') +const debug = makeDebug('eleventy-plugin-telegram/index') const makeEleventyEventHandler = ( _eleventyConfig: EleventyConfig, diff --git a/packages/eleventy-telegram-plugin/src/schemas.ts b/packages/eleventy-plugin-telegram/src/schemas.ts similarity index 100% rename from packages/eleventy-telegram-plugin/src/schemas.ts rename to packages/eleventy-plugin-telegram/src/schemas.ts diff --git a/packages/eleventy-telegram-plugin/src/send-message.ts b/packages/eleventy-plugin-telegram/src/send-message.ts similarity index 97% rename from packages/eleventy-telegram-plugin/src/send-message.ts rename to packages/eleventy-plugin-telegram/src/send-message.ts index 6c08d48d..c3c6a927 100644 --- a/packages/eleventy-telegram-plugin/src/send-message.ts +++ b/packages/eleventy-plugin-telegram/src/send-message.ts @@ -10,7 +10,7 @@ import type { TelegramAPISendMessageError } from './types.js' -const debug = makeDebug('eleventy-telegram-plugin/send-message') +const debug = makeDebug('eleventy-plugin-telegram/send-message') export interface SendMessageConfig { chatId: ChatId diff --git a/packages/eleventy-telegram-plugin/src/types.ts b/packages/eleventy-plugin-telegram/src/types.ts similarity index 100% rename from packages/eleventy-telegram-plugin/src/types.ts rename to packages/eleventy-plugin-telegram/src/types.ts diff --git a/packages/eleventy-telegram-plugin/tsconfig.json b/packages/eleventy-plugin-telegram/tsconfig.json similarity index 100% rename from packages/eleventy-telegram-plugin/tsconfig.json rename to packages/eleventy-plugin-telegram/tsconfig.json diff --git a/packages/eleventy-telegram-plugin/CHANGELOG.md b/packages/eleventy-telegram-plugin/CHANGELOG.md deleted file mode 100644 index f796c718..00000000 --- a/packages/eleventy-telegram-plugin/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -# CHANGELOG - -## @jackdbd/eleventy-telegram-plugin 1.0.0-alpha.1 (2022-07-04) - -* feat(eleventy-telegram-plugin): add package ([a519263](https://github.com/jackdbd/undici/commit/a519263)) diff --git a/packages/eleventy-telegram-plugin/README.md b/packages/eleventy-telegram-plugin/README.md deleted file mode 100644 index 39f52973..00000000 --- a/packages/eleventy-telegram-plugin/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# @jackdbd/eleventy-telegram-plugin - -[![npm version](https://badge.fury.io/js/@jackdbd%2Feleventy-telegram-plugin.svg)](https://badge.fury.io/js/@jackdbd%2Feleventy-telegram-plugin) -![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@jackdbd%2Feleventy-telegram-plugin) - -Eleventy plugin that send messages to a Telegram chat of your choice. - -## Installation - -```sh -npm install --save-dev @jackdbd/eleventy-telegram-plugin -``` - - -## Usage - -```js -const { telegramPlugin } = require('@jackdbd/eleventy-telegram-plugin') - -module.exports = function (eleventyConfig) { - // some eleventy configuration... - - eleventyConfig.addPlugin(telegramPlugin, { - chatId: 'YOUR_TELEGRAM_CHAT_ID', - token: 'YOUR_TELEGRAM_BOT_TOKEN', - textBeforeBuild: '11ty have just started building my site', - textAfterBuild: '11ty has finished building my awesome site' - }) - - // some more eleventy configuration... -} -``` - -See Telegram [sendMessage](https://core.telegram.org/bots/api#sendmessage) API method for formatting options. \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 8a63d3e6..53ab629d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "files": [], "references": [ { - "path": "./packages/eleventy-telegram-plugin/tsconfig.json" + "path": "./packages/eleventy-plugin-telegram/tsconfig.json" }, { "path": "./packages/eleventy-plugin-text-to-speech/tsconfig.json"