@useparagon/core 1.0.21-canary.4 → 1.0.21
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.
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createConfigInputs = exports.CustomIntegration = void 0;
|
|
4
4
|
const execution_1 = require("../execution");
|
|
5
5
|
const inputs_1 = require("../inputs");
|
|
6
|
-
const integration_utils_1 = require("./integration.utils");
|
|
7
6
|
class CustomIntegration {
|
|
8
7
|
name;
|
|
9
8
|
constructor(name) {
|
|
@@ -16,7 +15,8 @@ const createConfigInputs = (inputs) => {
|
|
|
16
15
|
key,
|
|
17
16
|
{
|
|
18
17
|
...input,
|
|
19
|
-
type:
|
|
18
|
+
type: inputs_1.INPUT_NAME_TO_INPUT_TYPE_MAP[input.type] ||
|
|
19
|
+
inputs_1.SidebarInputType.ValueText,
|
|
20
20
|
required: true,
|
|
21
21
|
toString: () => {
|
|
22
22
|
return (0, execution_1.createProxyInputString)(execution_1.ProxyVariableSourceType.WORKFLOW_INPUT_REFERENCE, input.id, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom.integration.js","sourceRoot":"","sources":["../../src/integration/custom.integration.ts"],"names":[],"mappings":";;;AAAA,4CAA+E;AAC/E,
|
|
1
|
+
{"version":3,"file":"custom.integration.js","sourceRoot":"","sources":["../../src/integration/custom.integration.ts"],"names":[],"mappings":";;;AAAA,4CAA+E;AAC/E,sCAImB;AASnB,MAAa,iBAAiB;IACP;IAArB,YAAqB,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;IAAG,CAAC;CACtC;AAFD,8CAEC;AAOM,MAAM,kBAAkB,GAAG,CAChC,MAAyC,EACgB,EAAE;IAC3D,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,MAAgD,CAAC,CAAC,GAAG,CAClE,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;QAChB,GAAG;QACH;YACE,GAAG,KAAK;YACR,IAAI,EACF,qCAA4B,CAAC,KAAK,CAAC,IAAI,CAAC;gBACxC,yBAAgB,CAAC,SAAS;YAC5B,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,GAAG,EAAE;gBACb,OAAO,IAAA,kCAAsB,EAC3B,mCAAuB,CAAC,wBAAwB,EAChD,KAAK,CAAC,EAAE,EACR,EAAE,CACH,CAAC;YACJ,CAAC;SACF;KACF,CACF,CAC4B,CAAC;AAClC,CAAC,CAAC;AAxBW,QAAA,kBAAkB,sBAwB7B"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { SerializedInput
|
|
1
|
+
import { SerializedInput } from '../inputs';
|
|
2
2
|
import { ICustomIntegrationConfig, UserDefinedConfigInput } from './custom.integration.interface';
|
|
3
3
|
export declare const isCustomIntegration: (integration: string) => boolean;
|
|
4
|
-
export declare const sidebarToUserInputTypeMap: {
|
|
5
|
-
readonly TEXT_NO_VARS: "text";
|
|
6
|
-
readonly PASSWORD: "password";
|
|
7
|
-
};
|
|
8
|
-
export declare const userInputToSidebarTypeMap: Record<string, SidebarInputType>;
|
|
9
4
|
export declare const convertSerializedInputsToUserDefinedConfigInputs: (inputs: SerializedInput[]) => UserDefinedConfigInput[];
|
|
10
5
|
export declare function generateSlugForIntegration(customIntegration: ICustomIntegrationConfig): string;
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateSlugForIntegration = exports.convertSerializedInputsToUserDefinedConfigInputs = exports.
|
|
3
|
+
exports.generateSlugForIntegration = exports.convertSerializedInputsToUserDefinedConfigInputs = exports.isCustomIntegration = void 0;
|
|
4
4
|
const inputs_1 = require("../inputs");
|
|
5
5
|
const isCustomIntegration = (integration) => integration.startsWith('custom.') || integration === 'undefined';
|
|
6
6
|
exports.isCustomIntegration = isCustomIntegration;
|
|
7
|
-
exports.sidebarToUserInputTypeMap = {
|
|
8
|
-
[inputs_1.SidebarInputType.ValueText]: 'text',
|
|
9
|
-
[inputs_1.SidebarInputType.Password]: 'password',
|
|
10
|
-
};
|
|
11
|
-
exports.userInputToSidebarTypeMap = Object.fromEntries(Object.entries(exports.sidebarToUserInputTypeMap).map(([key, value]) => [value, key]));
|
|
12
7
|
const convertSerializedInputsToUserDefinedConfigInputs = (inputs) => {
|
|
13
8
|
return inputs.map((input) => ({
|
|
14
9
|
id: input.id,
|
|
15
|
-
type:
|
|
10
|
+
type: input.type === inputs_1.SidebarInputType.Password ? 'password' : 'text',
|
|
16
11
|
title: input.title,
|
|
17
12
|
subtitle: input.subtitle || '',
|
|
18
13
|
placeholder: input.placeholder || '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.utils.js","sourceRoot":"","sources":["../../src/integration/integration.utils.ts"],"names":[],"mappings":";;;AAAA,sCAA8D;AAWvD,MAAM,mBAAmB,GAAG,CAAC,WAAmB,EAAE,EAAE,CACzD,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,WAAW,KAAK,WAAW,CAAC;AADtD,QAAA,mBAAmB,uBACmC;
|
|
1
|
+
{"version":3,"file":"integration.utils.js","sourceRoot":"","sources":["../../src/integration/integration.utils.ts"],"names":[],"mappings":";;;AAAA,sCAA8D;AAWvD,MAAM,mBAAmB,GAAG,CAAC,WAAmB,EAAE,EAAE,CACzD,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,WAAW,KAAK,WAAW,CAAC;AADtD,QAAA,mBAAmB,uBACmC;AAO5D,MAAM,gDAAgD,GAAG,CAC9D,MAAyB,EACC,EAAE;IAC5B,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC5B,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,IAAI,EAAE,KAAK,CAAC,IAAI,KAAK,yBAAgB,CAAC,QAAQ,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