@awell-health/awell-extensions 2.0.146 → 2.0.147
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/extensions/epic/lib/api/auth/constructPrivateKey/constructPrivateKey.d.ts +6 -0
- package/dist/extensions/epic/lib/api/auth/constructPrivateKey/constructPrivateKey.js +15 -0
- package/dist/extensions/epic/lib/api/auth/constructPrivateKey/constructPrivateKey.js.map +1 -0
- package/dist/extensions/epic/lib/api/auth/constructPrivateKey/index.d.ts +1 -0
- package/dist/extensions/epic/lib/api/auth/constructPrivateKey/index.js +6 -0
- package/dist/extensions/epic/lib/api/auth/constructPrivateKey/index.js.map +1 -0
- package/dist/extensions/epic/settings.d.ts +6 -1
- package/dist/extensions/epic/settings.js +7 -1
- package/dist/extensions/epic/settings.js.map +1 -1
- package/package.json +1 -1
@@ -0,0 +1,6 @@
|
|
1
|
+
/**
|
2
|
+
* Transforms a single-line private key with explicit \n into a properly formatted private key.
|
3
|
+
* @param inputKey - The single-line private key string.
|
4
|
+
* @returns The correctly formatted private key string.
|
5
|
+
*/
|
6
|
+
export declare const constructPrivateKey: (privateKey: string) => string;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.constructPrivateKey = void 0;
|
4
|
+
/**
|
5
|
+
* Transforms a single-line private key with explicit \n into a properly formatted private key.
|
6
|
+
* @param inputKey - The single-line private key string.
|
7
|
+
* @returns The correctly formatted private key string.
|
8
|
+
*/
|
9
|
+
const constructPrivateKey = (privateKey) => {
|
10
|
+
// Replace explicit \n with actual newlines
|
11
|
+
const formattedKey = privateKey.replace(/\\n/g, '\n');
|
12
|
+
return formattedKey;
|
13
|
+
};
|
14
|
+
exports.constructPrivateKey = constructPrivateKey;
|
15
|
+
//# sourceMappingURL=constructPrivateKey.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constructPrivateKey.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/auth/constructPrivateKey/constructPrivateKey.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACI,MAAM,mBAAmB,GAAG,CAAC,UAAkB,EAAU,EAAE;IAChE,2CAA2C;IAC3C,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAErD,OAAO,YAAY,CAAA;AACrB,CAAC,CAAA;AALY,QAAA,mBAAmB,uBAK/B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { constructPrivateKey } from './constructPrivateKey';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.constructPrivateKey = void 0;
|
4
|
+
var constructPrivateKey_1 = require("./constructPrivateKey");
|
5
|
+
Object.defineProperty(exports, "constructPrivateKey", { enumerable: true, get: function () { return constructPrivateKey_1.constructPrivateKey; } });
|
6
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/epic/lib/api/auth/constructPrivateKey/index.ts"],"names":[],"mappings":";;;AAAA,6DAA2D;AAAlD,0HAAA,mBAAmB,OAAA"}
|
@@ -33,7 +33,12 @@ export declare const SettingsValidationSchema: z.ZodObject<{
|
|
33
33
|
baseUrl: z.ZodString;
|
34
34
|
authUrl: z.ZodString;
|
35
35
|
clientId: z.ZodString;
|
36
|
-
|
36
|
+
/**
|
37
|
+
* Private keys turn out to be sensitive to formatting (newlines, etc.)
|
38
|
+
* But in Studio, a user can only enter the value of a setting in a single line.
|
39
|
+
* So we need to transform the value to the correct format here.
|
40
|
+
*/
|
41
|
+
privateKey: z.ZodEffects<z.ZodString, string, string>;
|
37
42
|
}, "strip", z.ZodTypeAny, {
|
38
43
|
authUrl: string;
|
39
44
|
baseUrl: string;
|
@@ -2,6 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.SettingsValidationSchema = exports.settings = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
+
const constructPrivateKey_1 = require("./lib/api/auth/constructPrivateKey");
|
5
6
|
exports.settings = {
|
6
7
|
baseUrl: {
|
7
8
|
key: 'baseUrl',
|
@@ -36,6 +37,11 @@ exports.SettingsValidationSchema = zod_1.z.object({
|
|
36
37
|
baseUrl: zod_1.z.string().min(1),
|
37
38
|
authUrl: zod_1.z.string().min(1),
|
38
39
|
clientId: zod_1.z.string().min(1),
|
39
|
-
|
40
|
+
/**
|
41
|
+
* Private keys turn out to be sensitive to formatting (newlines, etc.)
|
42
|
+
* But in Studio, a user can only enter the value of a setting in a single line.
|
43
|
+
* So we need to transform the value to the correct format here.
|
44
|
+
*/
|
45
|
+
privateKey: zod_1.z.string().min(1).transform(constructPrivateKey_1.constructPrivateKey),
|
40
46
|
});
|
41
47
|
//# sourceMappingURL=settings.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/epic/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/epic/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AACxC,4EAAwE;AAE3D,QAAA,QAAQ,GAAG;IACtB,OAAO,EAAE;QACP,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,KAAK;QACjB,WAAW,EACT,uFAAuF;KAC1F;IACD,OAAO,EAAE;QACP,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,KAAK;QACjB,WAAW,EACT,gGAAgG;KACnG;IACD,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,KAAK,EAAE,WAAW;QAClB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,KAAK;QACjB,WAAW,EAAE,qDAAqD;KACnE;IACD,UAAU,EAAE;QACV,GAAG,EAAE,YAAY;QACjB,KAAK,EAAE,aAAa;QACpB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,uDAAuD;KACrE;CACgC,CAAA;AAEtB,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B;;;;OAIG;IACH,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,yCAAmB,CAAC;CACT,CAAC,CAAA"}
|