@awell-health/awell-extensions 2.1.164 → 2.1.166

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "2.1.164",
3
+ "version": "2.1.166",
4
4
  "packageManager": "yarn@4.5.3",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {
@@ -65,7 +65,6 @@
65
65
  "@types/nodemailer": "^6.4.24",
66
66
  "@types/react": "^19.2.18",
67
67
  "@types/sanitize-html": "^2.16.1",
68
- "@types/showdown": "^2.0.6",
69
68
  "@types/yargs": "^17.0.35",
70
69
  "@typescript-eslint/eslint-plugin": "^5.62.0",
71
70
  "algoliasearch": "^5.57.0",
@@ -136,7 +135,6 @@
136
135
  "openai": "^6.44.0",
137
136
  "qrcode": "^1.5.4",
138
137
  "sanitize-html": ">=2.17.0 <2.17.6",
139
- "showdown": "^2.1.0",
140
138
  "stripe": "^15.12.0",
141
139
  "twilio": "^5.13.1",
142
140
  "tzdata": "^1.0.50",
@@ -1,2 +0,0 @@
1
- export declare const getExtensionDocumentation: (extensionKey: string) => string;
2
- export declare const getExtensionChangelog: (extensionKey: string) => string;
@@ -1,54 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getExtensionChangelog = exports.getExtensionDocumentation = void 0;
7
- const fs_1 = __importDefault(require("fs"));
8
- const lodash_1 = require("lodash");
9
- const path_1 = __importDefault(require("path"));
10
- const showdown_1 = __importDefault(require("showdown"));
11
- const converter = new showdown_1.default.Converter({
12
- tables: true,
13
- emoji: true,
14
- underline: true,
15
- });
16
- const loadedDocumentations = {};
17
- const loadedChangelogs = {};
18
- const getAppRootDir = () => {
19
- let currentDir = __dirname;
20
- while (!fs_1.default.existsSync(path_1.default.join(currentDir, 'package.json'))) {
21
- currentDir = path_1.default.join(currentDir, '..');
22
- }
23
- return currentDir;
24
- };
25
- const getHtmlFromMarkdownFile = (filePath) => {
26
- try {
27
- const md = fs_1.default.readFileSync(filePath, 'utf-8');
28
- return converter.makeHtml(md);
29
- }
30
- catch (_a) {
31
- return '';
32
- }
33
- };
34
- const getExtensionDocumentation = (extensionKey) => {
35
- if ((0, lodash_1.has)(loadedDocumentations, extensionKey)) {
36
- return loadedDocumentations[extensionKey];
37
- }
38
- const extensionReadme = path_1.default.join(getAppRootDir(), 'extensions', extensionKey, 'README.md');
39
- const documentation = getHtmlFromMarkdownFile(extensionReadme);
40
- loadedDocumentations[extensionKey] = documentation;
41
- return documentation;
42
- };
43
- exports.getExtensionDocumentation = getExtensionDocumentation;
44
- const getExtensionChangelog = (extensionKey) => {
45
- if ((0, lodash_1.has)(loadedChangelogs, extensionKey)) {
46
- return loadedChangelogs[extensionKey];
47
- }
48
- const extensionChangelogPath = path_1.default.join(getAppRootDir(), 'extensions', extensionKey, 'CHANGELOG.md');
49
- const changelog = getHtmlFromMarkdownFile(extensionChangelogPath);
50
- loadedChangelogs[extensionKey] = changelog;
51
- return changelog;
52
- };
53
- exports.getExtensionChangelog = getExtensionChangelog;
54
- //# sourceMappingURL=documentation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"documentation.js","sourceRoot":"","sources":["../../src/documentation.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAmB;AACnB,mCAA4B;AAC5B,gDAAuB;AACvB,wDAA+B;AAE/B,MAAM,SAAS,GAAG,IAAI,kBAAQ,CAAC,SAAS,CAAC;IACvC,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,IAAI;CAChB,CAAC,CAAA;AACF,MAAM,oBAAoB,GAA2B,EAAE,CAAA;AACvD,MAAM,gBAAgB,GAA2B,EAAE,CAAA;AAEnD,MAAM,aAAa,GAAG,GAAW,EAAE;IACjC,IAAI,U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