@useparagon/cli 0.0.1-canary.39 → 0.0.1-canary.4
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/dist/apis/api.types.d.ts +8 -71
- package/dist/apis/auth.api.js +7 -5
- package/dist/apis/auth.api.js.map +1 -1
- package/dist/apis/base.api.d.ts +0 -3
- package/dist/apis/base.api.js +52 -51
- package/dist/apis/base.api.js.map +1 -1
- package/dist/apis/event.api.d.ts +2 -0
- package/dist/apis/event.api.js +10 -0
- package/dist/apis/event.api.js.map +1 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/apis/index.js.map +1 -1
- package/dist/apis/integration.api.d.ts +3 -3
- package/dist/apis/integration.api.js +10 -18
- package/dist/apis/integration.api.js.map +1 -1
- package/dist/apis/project.api.d.ts +1 -1
- package/dist/apis/project.api.js +17 -40
- package/dist/apis/project.api.js.map +1 -1
- package/dist/apis/workflow.api.d.ts +2 -0
- package/dist/apis/workflow.api.js +10 -0
- package/dist/apis/workflow.api.js.map +1 -0
- package/dist/codegen/codegen.types.d.ts +4 -12
- package/dist/codegen/codegen.utils.d.ts +1 -2
- package/dist/codegen/codegen.utils.js +28 -63
- package/dist/codegen/codegen.utils.js.map +1 -1
- package/dist/codegen/codegens/condition.codegen.js +35 -38
- package/dist/codegen/codegens/condition.codegen.js.map +1 -1
- package/dist/codegen/codegens/event.codegen.js +3 -4
- package/dist/codegen/codegens/event.codegen.js.map +1 -1
- package/dist/codegen/codegens/integration.codegen.d.ts +3 -3
- package/dist/codegen/codegens/integration.codegen.js +32 -138
- package/dist/codegen/codegens/integration.codegen.js.map +1 -1
- package/dist/codegen/codegens/source.codegen.d.ts +1 -3
- package/dist/codegen/codegens/source.codegen.js +31 -120
- package/dist/codegen/codegens/source.codegen.js.map +1 -1
- package/dist/codegen/codegens/workflow.codegen.js +111 -253
- package/dist/codegen/codegens/workflow.codegen.js.map +1 -1
- package/dist/commands/auth/login/login.action.js +31 -28
- package/dist/commands/auth/login/login.action.js.map +1 -1
- package/dist/commands/auth/login/login.command.js +4 -5
- package/dist/commands/auth/login/login.command.js.map +1 -1
- package/dist/commands/auth/login/login.utils.js +19 -26
- package/dist/commands/auth/login/login.utils.js.map +1 -1
- package/dist/commands/auth/logout/logout.action.js +5 -3
- package/dist/commands/auth/logout/logout.action.js.map +1 -1
- package/dist/commands/auth/logout/logout.command.js +3 -3
- package/dist/commands/auth/logout/logout.command.js.map +1 -1
- package/dist/commands/auth/me/me.action.js +6 -10
- package/dist/commands/auth/me/me.action.js.map +1 -1
- package/dist/commands/auth/me/me.command.js +3 -3
- package/dist/commands/auth/me/me.command.js.map +1 -1
- package/dist/commands/build/build.action.js +27 -27
- package/dist/commands/build/build.action.js.map +1 -1
- package/dist/commands/build/build.command.js +5 -9
- package/dist/commands/build/build.command.js.map +1 -1
- package/dist/commands/build/build.types.d.ts +0 -1
- package/dist/commands/build/build.utils.d.ts +1 -1
- package/dist/commands/build/build.utils.js +9 -11
- package/dist/commands/build/build.utils.js.map +1 -1
- package/dist/commands/command.loader.js +8 -10
- package/dist/commands/command.loader.js.map +1 -1
- package/dist/commands/init/init.action.d.ts +1 -1
- package/dist/commands/init/init.action.js +68 -93
- package/dist/commands/init/init.action.js.map +1 -1
- package/dist/commands/init/init.command.js +8 -14
- package/dist/commands/init/init.command.js.map +1 -1
- package/dist/commands/init/init.constants.js +23 -0
- package/dist/commands/init/init.constants.js.map +1 -0
- package/dist/commands/init/init.types.d.ts +0 -1
- package/dist/commands/init/init.utils.d.ts +11 -0
- package/dist/commands/init/init.utils.js +50 -0
- package/dist/commands/init/init.utils.js.map +1 -0
- package/dist/commands/push/push.action.js +11 -9
- package/dist/commands/push/push.action.js.map +1 -1
- package/dist/commands/push/push.command.js +4 -4
- package/dist/commands/push/push.command.js.map +1 -1
- package/dist/compiler/compiler.types.d.ts +2 -3
- package/dist/compiler/compiler.utils.d.ts +1 -1
- package/dist/compiler/compiler.utils.js +4 -8
- package/dist/compiler/compiler.utils.js.map +1 -1
- package/dist/compiler/compilers/events.compiler.js +28 -24
- package/dist/compiler/compilers/events.compiler.js.map +1 -1
- package/dist/compiler/compilers/integrations.compiler.js +52 -148
- package/dist/compiler/compilers/integrations.compiler.js.map +1 -1
- package/dist/compiler/compilers/persona.compiler.js +11 -4
- package/dist/compiler/compilers/persona.compiler.js.map +1 -1
- package/dist/compiler/compilers/project.compiler.d.ts +0 -1
- package/dist/compiler/compilers/project.compiler.js +23 -49
- package/dist/compiler/compilers/project.compiler.js.map +1 -1
- package/dist/compiler/compilers/workflows.compiler.js +33 -46
- package/dist/compiler/compilers/workflows.compiler.js.map +1 -1
- package/dist/compiler/ts.compiler.d.ts +3 -1
- package/dist/compiler/ts.compiler.js +18 -18
- package/dist/compiler/ts.compiler.js.map +1 -1
- package/dist/config/config.constants.d.ts +0 -1
- package/dist/config/config.constants.js +1 -2
- package/dist/config/config.constants.js.map +1 -1
- package/dist/config/config.types.d.ts +0 -4
- package/dist/config/config.utils.d.ts +3 -4
- package/dist/config/config.utils.js +37 -65
- package/dist/config/config.utils.js.map +1 -1
- package/dist/helpers/constants.d.ts +0 -1
- package/dist/helpers/constants.js +1 -2
- package/dist/helpers/constants.js.map +1 -1
- package/dist/helpers/file.d.ts +1 -3
- package/dist/helpers/file.js +15 -44
- package/dist/helpers/file.js.map +1 -1
- package/dist/helpers/strings.d.ts +0 -1
- package/dist/helpers/strings.js +1 -34
- package/dist/helpers/strings.js.map +1 -1
- package/dist/index.js +0 -10
- package/dist/index.js.map +1 -1
- package/dist/logger/logger.js +1 -5
- package/dist/logger/logger.js.map +1 -1
- package/dist/templates/configurations/typescript/tsconfig.json +2 -3
- package/dist/templates/javascript/src/events/hello-world.js +13 -0
- package/dist/templates/javascript/src/integrations/slack/config.js +11 -0
- package/dist/templates/javascript/src/integrations/slack/workflows/example-workflow.js +30 -0
- package/dist/templates/typescript/src/events/hello-world.ts +21 -0
- package/dist/templates/typescript/src/integrations/slack/config.ts +18 -0
- package/dist/templates/typescript/src/integrations/slack/workflows/example-workflow.ts +30 -0
- package/dist/templates/typescript/tsconfig.json +31 -0
- package/package.json +16 -20
- package/dist/codegen/codegens/intent.codegen.d.ts +0 -5
- package/dist/codegen/codegens/intent.codegen.js +0 -179
- package/dist/codegen/codegens/intent.codegen.js.map +0 -1
- package/dist/commands/install/index.d.ts +0 -1
- package/dist/commands/install/index.js +0 -5
- package/dist/commands/install/index.js.map +0 -1
- package/dist/commands/install/install.action.d.ts +0 -5
- package/dist/commands/install/install.action.js +0 -15
- package/dist/commands/install/install.action.js.map +0 -1
- package/dist/commands/install/install.command.d.ts +0 -8
- package/dist/commands/install/install.command.js +0 -24
- package/dist/commands/install/install.command.js.map +0 -1
- package/dist/commands/install/install.constants.js +0 -68
- package/dist/commands/install/install.constants.js.map +0 -1
- package/dist/commands/install/install.types.d.ts +0 -7
- package/dist/commands/install/install.types.js +0 -3
- package/dist/commands/install/install.types.js.map +0 -1
- package/dist/commands/install/install.utils.d.ts +0 -8
- package/dist/commands/install/install.utils.js +0 -130
- package/dist/commands/install/install.utils.js.map +0 -1
- package/dist/commands/new/index.d.ts +0 -1
- package/dist/commands/new/index.js +0 -5
- package/dist/commands/new/index.js.map +0 -1
- package/dist/commands/new/integration/index.d.ts +0 -1
- package/dist/commands/new/integration/index.js +0 -5
- package/dist/commands/new/integration/index.js.map +0 -1
- package/dist/commands/new/integration/integration.action.d.ts +0 -5
- package/dist/commands/new/integration/integration.action.js +0 -52
- package/dist/commands/new/integration/integration.action.js.map +0 -1
- package/dist/commands/new/integration/integration.command.d.ts +0 -8
- package/dist/commands/new/integration/integration.command.js +0 -26
- package/dist/commands/new/integration/integration.command.js.map +0 -1
- package/dist/commands/new/integration/integration.types.d.ts +0 -1
- package/dist/commands/new/integration/integration.types.js +0 -3
- package/dist/commands/new/integration/integration.types.js.map +0 -1
- package/dist/commands/new/new.command.d.ts +0 -5
- package/dist/commands/new/new.command.js +0 -16
- package/dist/commands/new/new.command.js.map +0 -1
- package/dist/commands/new/new.utils.d.ts +0 -1
- package/dist/commands/new/new.utils.js +0 -18
- package/dist/commands/new/new.utils.js.map +0 -1
- package/dist/commands/new/workflow/index.d.ts +0 -1
- package/dist/commands/new/workflow/index.js +0 -5
- package/dist/commands/new/workflow/index.js.map +0 -1
- package/dist/commands/new/workflow/workflow.action.d.ts +0 -5
- package/dist/commands/new/workflow/workflow.action.js +0 -94
- package/dist/commands/new/workflow/workflow.action.js.map +0 -1
- package/dist/commands/new/workflow/workflow.command.d.ts +0 -8
- package/dist/commands/new/workflow/workflow.command.js +0 -25
- package/dist/commands/new/workflow/workflow.command.js.map +0 -1
- package/dist/commands/new/workflow/workflow.types.d.ts +0 -3
- package/dist/commands/new/workflow/workflow.types.js +0 -3
- package/dist/commands/new/workflow/workflow.types.js.map +0 -1
- package/dist/helpers/sets.d.ts +0 -1
- package/dist/helpers/sets.js +0 -10
- package/dist/helpers/sets.js.map +0 -1
- /package/dist/commands/{install/install.constants.d.ts → init/init.constants.d.ts} +0 -0
package/dist/apis/api.types.d.ts
CHANGED
|
@@ -1,51 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IStep } from '@useparagon/core/';
|
|
2
2
|
import { IEvent } from '@useparagon/core/event';
|
|
3
|
-
import { InputSource, SerializedInput
|
|
3
|
+
import { InputSource, SerializedInput } from '@useparagon/core/inputs';
|
|
4
4
|
import { IPersona } from '@useparagon/core/persona';
|
|
5
|
-
import {
|
|
6
|
-
import { ISecret } from '@useparagon/core/secret';
|
|
7
|
-
import { RequestAuthorization } from '@useparagon/core/steps/library/request';
|
|
8
|
-
export type InputKeyVisibilityConfig = {
|
|
9
|
-
inputId: string;
|
|
10
|
-
path?: string[];
|
|
11
|
-
} | string;
|
|
12
|
-
export type GraphiteEnumInput = {
|
|
13
|
-
value: string;
|
|
14
|
-
dependentInputs?: IntentInputKeyConfig[];
|
|
15
|
-
} | string;
|
|
16
|
-
export type IntentInputKeyConfig = {
|
|
17
|
-
id: string;
|
|
18
|
-
title: string;
|
|
19
|
-
subtitle?: string;
|
|
20
|
-
placeholder?: string;
|
|
21
|
-
required?: boolean;
|
|
22
|
-
dependentInputs?: IntentInputKeyConfig[];
|
|
23
|
-
defaultValue?: unknown;
|
|
24
|
-
} & ({
|
|
25
|
-
type: SidebarInputType.TextArea | SidebarInputType.Switch | SidebarInputType.BooleanInput | SidebarInputType.Code | SidebarInputType.Text | SidebarInputType.ValueText | 'UNDEFINED';
|
|
26
|
-
} | {
|
|
27
|
-
type: SidebarInputType.Enum | SidebarInputType.EditableEnum;
|
|
28
|
-
values: GraphiteEnumInput[];
|
|
29
|
-
} | {
|
|
30
|
-
type: SidebarInputType.Conditional;
|
|
31
|
-
supportedOperators?: Operator[];
|
|
32
|
-
disableOrCondition?: boolean;
|
|
33
|
-
supportedKeys?: {
|
|
34
|
-
inputId: string;
|
|
35
|
-
visibleOnInputs?: Array<InputKeyVisibilityConfig | string>;
|
|
36
|
-
}[];
|
|
37
|
-
});
|
|
38
|
-
export type IntegrationIntent = {
|
|
39
|
-
name: string;
|
|
40
|
-
title: string;
|
|
41
|
-
inputs: IntentInputKeyConfig[];
|
|
42
|
-
output: any[];
|
|
43
|
-
};
|
|
44
|
-
export type IntegrationDependencies = {
|
|
45
|
-
inputs: InputSource[];
|
|
46
|
-
intents: IntegrationIntent[];
|
|
47
|
-
triggers: IntegrationIntent[];
|
|
48
|
-
};
|
|
5
|
+
import { OrConditions } from '@useparagon/core/resolvers';
|
|
49
6
|
export type IntegrationWorkflowMeta = {
|
|
50
7
|
id: string;
|
|
51
8
|
infoText?: string;
|
|
@@ -68,42 +25,23 @@ export type ModalConfig = {
|
|
|
68
25
|
inputs?: SerializedInput[];
|
|
69
26
|
};
|
|
70
27
|
};
|
|
71
|
-
export interface ICustomIntegration {
|
|
72
|
-
id: string;
|
|
73
|
-
name: string;
|
|
74
|
-
authenticationType?: AuthenticationScheme;
|
|
75
|
-
inputFields: SerializedInput[];
|
|
76
|
-
oauthAuthorizationUrl?: TokenizedSource<DataType.STRING>;
|
|
77
|
-
oauthAccessTokenUrl?: TokenizedSource<DataType.STRING>;
|
|
78
|
-
oauthScopes?: string;
|
|
79
|
-
oauthIncludeClientAuthorizationHeader?: boolean;
|
|
80
|
-
usePKCEInCodeExchange?: boolean;
|
|
81
|
-
apiBaseUrl?: TokenizedSource<DataType.STRING>;
|
|
82
|
-
testEndpointPath?: TokenizedSource<DataType.STRING>;
|
|
83
|
-
apiAuthorization?: RequestAuthorization;
|
|
84
|
-
isPublished?: boolean;
|
|
85
|
-
}
|
|
86
28
|
export interface WorkflowBuild {
|
|
87
29
|
id: string;
|
|
88
30
|
name: string;
|
|
89
31
|
steps: IStep[];
|
|
90
32
|
}
|
|
91
33
|
export interface IntegrationBuild {
|
|
92
|
-
id: string;
|
|
93
34
|
config: {
|
|
94
35
|
values: ModalConfig;
|
|
95
36
|
};
|
|
96
|
-
workflows: Record<string, WorkflowBuild
|
|
97
|
-
|
|
98
|
-
customIntegration?: ICustomIntegration;
|
|
37
|
+
workflows: Record<string, WorkflowBuild>;
|
|
38
|
+
inputs?: InputSource[];
|
|
99
39
|
}
|
|
100
40
|
export interface ProjectBuild {
|
|
101
41
|
projectId: string;
|
|
102
|
-
projectName?: string;
|
|
103
42
|
events: Record<string, IEvent>;
|
|
104
43
|
persona: IPersona;
|
|
105
|
-
integrations: Record<string, IntegrationBuild
|
|
106
|
-
secrets: ISecret[];
|
|
44
|
+
integrations: Record<string, IntegrationBuild>;
|
|
107
45
|
}
|
|
108
46
|
export type IUser = {
|
|
109
47
|
firstName: string;
|
|
@@ -111,7 +49,6 @@ export type IUser = {
|
|
|
111
49
|
lastName: string;
|
|
112
50
|
email: string;
|
|
113
51
|
};
|
|
114
|
-
export type
|
|
115
|
-
|
|
116
|
-
title: string;
|
|
52
|
+
export type IntegrationDependencies = {
|
|
53
|
+
inputSources: InputSource[];
|
|
117
54
|
};
|
package/dist/apis/auth.api.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getMe = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const logger_1 = tslib_1.__importDefault(require("../logger"));
|
|
4
6
|
const base_api_1 = require("./base.api");
|
|
5
|
-
const getMe =
|
|
7
|
+
const getMe = (overrideConfig) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
6
8
|
try {
|
|
7
|
-
return
|
|
9
|
+
return yield (0, base_api_1.get)('auth/me', overrideConfig);
|
|
8
10
|
}
|
|
9
|
-
catch (
|
|
10
|
-
|
|
11
|
+
catch (err) {
|
|
12
|
+
logger_1.default.fatal(`Error while getting user information : ${err}`);
|
|
11
13
|
}
|
|
12
|
-
};
|
|
14
|
+
});
|
|
13
15
|
exports.getMe = getMe;
|
|
14
16
|
//# sourceMappingURL=auth.api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.api.js","sourceRoot":"","sources":["../../src/apis/auth.api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.api.js","sourceRoot":"","sources":["../../src/apis/auth.api.ts"],"names":[],"mappings":";;;;AAAA,+DAA+B;AAE/B,yCAAiC;AAO1B,MAAM,KAAK,GAAG,CAAO,cAG3B,EAAkB,EAAE;IACnB,IAAI,CAAC;QACH,OAAO,MAAM,IAAA,cAAG,EAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAC9C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,gBAAM,CAAC,KAAK,CAAC,0CAA0C,GAAG,EAAE,CAAC,CAAC;IAChE,CAAC;AACH,CAAC,CAAA,CAAC;AATW,QAAA,KAAK,SAShB"}
|
package/dist/apis/base.api.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { IProfile } from '../config';
|
|
2
|
-
export declare const getProfile: () => Promise<IProfile>;
|
|
3
1
|
export declare const getToken: () => Promise<string>;
|
|
4
|
-
export declare const logApiError: (apiDescription: string, error: any) => never;
|
|
5
2
|
export declare const get: (path: string, options?: {
|
|
6
3
|
token: string;
|
|
7
4
|
baseUrl: string;
|
package/dist/apis/base.api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.put = exports.post = exports.get = exports.
|
|
3
|
+
exports.put = exports.post = exports.get = exports.getToken = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
6
6
|
const logger_1 = tslib_1.__importDefault(require("../logger"));
|
|
@@ -8,83 +8,84 @@ const config_1 = require("../config");
|
|
|
8
8
|
const http_1 = require("../helpers/http");
|
|
9
9
|
let _token;
|
|
10
10
|
let _baseUrl;
|
|
11
|
-
|
|
12
|
-
const getProfile = async () => {
|
|
13
|
-
if (_currentProfile) {
|
|
14
|
-
return _currentProfile;
|
|
15
|
-
}
|
|
16
|
-
const profileConfig = await (0, config_1.getConfigForProfile)(config_1.SystemFile.PROFILES, config_1.DEFAULT_PROFILE);
|
|
17
|
-
_currentProfile = profileConfig;
|
|
18
|
-
return _currentProfile;
|
|
19
|
-
};
|
|
20
|
-
exports.getProfile = getProfile;
|
|
21
|
-
const getBaseUrl = async () => {
|
|
11
|
+
const getBaseUrl = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
22
12
|
if (_baseUrl) {
|
|
23
13
|
return _baseUrl;
|
|
24
14
|
}
|
|
25
15
|
try {
|
|
26
|
-
const profileConfig =
|
|
16
|
+
const profileConfig = yield (0, config_1.getConfigForProfile)(config_1.SystemFile.PROFILES, config_1.DEFAULT_PROFILE);
|
|
27
17
|
if (!profileConfig.services[config_1.Service.ZEUS]) {
|
|
28
18
|
logger_1.default.fatal('Api url is not present in config.');
|
|
29
19
|
}
|
|
30
|
-
_currentProfile = profileConfig;
|
|
31
20
|
_baseUrl = (0, http_1.sanitizeUrl)(profileConfig.services[config_1.Service.ZEUS]);
|
|
32
21
|
return _baseUrl;
|
|
33
22
|
}
|
|
34
|
-
catch {
|
|
23
|
+
catch (_a) {
|
|
35
24
|
logger_1.default.fatal('User not logged in.');
|
|
36
25
|
}
|
|
37
|
-
};
|
|
38
|
-
const getToken =
|
|
26
|
+
});
|
|
27
|
+
const getToken = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
39
28
|
if (_token) {
|
|
40
29
|
return _token;
|
|
41
30
|
}
|
|
42
31
|
try {
|
|
43
|
-
const credential =
|
|
32
|
+
const credential = yield (0, config_1.getConfigForProfile)(config_1.SystemFile.CREDENTIALS, config_1.DEFAULT_PROFILE);
|
|
44
33
|
_token = credential.token;
|
|
45
34
|
if (!_token) {
|
|
46
35
|
logger_1.default.fatal('Token value not present in config.');
|
|
47
36
|
}
|
|
48
37
|
return _token;
|
|
49
38
|
}
|
|
50
|
-
catch {
|
|
39
|
+
catch (_b) {
|
|
51
40
|
logger_1.default.fatal('User not logged in.');
|
|
52
41
|
}
|
|
53
|
-
};
|
|
42
|
+
});
|
|
54
43
|
exports.getToken = getToken;
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
logger_1.default.fatal(`${apiDescription}
|
|
58
|
-
- Details: ${errorMessage}`);
|
|
59
|
-
};
|
|
60
|
-
exports.logApiError = logApiError;
|
|
61
|
-
const get = async (path, options) => {
|
|
62
|
-
const apiBaseUrl = options ? options.baseUrl : await getBaseUrl();
|
|
63
|
-
const token = options ? options.token : await (0, exports.getToken)();
|
|
64
|
-
const response = await axios_1.default.get(`${apiBaseUrl}/${path}`, {
|
|
65
|
-
headers: {
|
|
66
|
-
Authorization: `Bearer ${token}`,
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
return response.data;
|
|
44
|
+
const handleError = (error) => {
|
|
45
|
+
throw new Error(error.message);
|
|
70
46
|
};
|
|
47
|
+
const get = (path, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
48
|
+
const apiBaseUrl = options ? options.baseUrl : yield getBaseUrl();
|
|
49
|
+
const token = options ? options.token : yield (0, exports.getToken)();
|
|
50
|
+
try {
|
|
51
|
+
const response = yield axios_1.default.get(`${apiBaseUrl}/${path}`, {
|
|
52
|
+
headers: {
|
|
53
|
+
Authorization: `Bearer ${token}`,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
return response.data;
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
handleError(error);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
71
62
|
exports.get = get;
|
|
72
|
-
const post =
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
63
|
+
const post = (path, data) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
64
|
+
try {
|
|
65
|
+
const response = yield axios_1.default.post(`${yield getBaseUrl()}/${path}`, data, {
|
|
66
|
+
headers: {
|
|
67
|
+
Authorization: `Bearer ${yield (0, exports.getToken)()}`,
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
return response.data;
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
handleError(error);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
80
76
|
exports.post = post;
|
|
81
|
-
const put =
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
77
|
+
const put = (path, data) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
78
|
+
try {
|
|
79
|
+
const response = yield axios_1.default.put(`${yield getBaseUrl()}/${path}`, data, {
|
|
80
|
+
headers: {
|
|
81
|
+
Authorization: `Bearer ${yield (0, exports.getToken)()}`,
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
return response.data;
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
handleError(error);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
89
90
|
exports.put = put;
|
|
90
91
|
//# sourceMappingURL=base.api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.api.js","sourceRoot":"","sources":["../../src/apis/base.api.ts"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAE1B,+DAA+B;AAE/B,sCAOmB;AACnB,0CAA8C;AAM9C,IAAI,MAA0B,CAAC;AAC/B,IAAI,QAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"base.api.js","sourceRoot":"","sources":["../../src/apis/base.api.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEventsByProject = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const base_api_1 = require("./base.api");
|
|
6
|
+
const getEventsByProject = (projectId) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
7
|
+
return (0, base_api_1.get)(`projects/${projectId}/events`);
|
|
8
|
+
});
|
|
9
|
+
exports.getEventsByProject = getEventsByProject;
|
|
10
|
+
//# sourceMappingURL=event.api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.api.js","sourceRoot":"","sources":["../../src/apis/event.api.ts"],"names":[],"mappings":";;;;AAEA,yCAAiC;AAO1B,MAAM,kBAAkB,GAAG,CAChC,SAAiB,EACE,EAAE;IACrB,OAAO,IAAA,cAAG,EAAC,YAAY,SAAS,SAAS,CAAC,CAAC;AAC7C,CAAC,CAAA,CAAC;AAJW,QAAA,kBAAkB,sBAI7B"}
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./api.types"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./auth.api"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./event.api"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./integration.api"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./project.api"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./workflow.api"), exports);
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
package/dist/apis/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/apis/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,qDAA2B;AAC3B,4DAAkC;AAClC,wDAA8B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/apis/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,qDAA2B;AAC3B,sDAA4B;AAC5B,4DAAkC;AAClC,wDAA8B;AAC9B,yDAA+B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IntegrationDependencies
|
|
2
|
-
export declare const getIntegrationDependencies: (
|
|
3
|
-
export declare const getDefaultIntegrations: () => Promise<
|
|
1
|
+
import { IntegrationDependencies } from './api.types';
|
|
2
|
+
export declare const getIntegrationDependencies: (projectId: string, integration: string) => Promise<IntegrationDependencies>;
|
|
3
|
+
export declare const getDefaultIntegrations: (projectId: string) => Promise<string[]>;
|
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getDefaultIntegrations = exports.getIntegrationDependencies = void 0;
|
|
4
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const logger_1 = tslib_1.__importDefault(require("../logger"));
|
|
5
6
|
const base_api_1 = require("./base.api");
|
|
6
|
-
const getIntegrationDependencies =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const integrationTypes = await (0, base_api_1.post)('graphite/integrations', {
|
|
10
|
-
integrations: nativeIntegrations
|
|
11
|
-
});
|
|
12
|
-
return Object.fromEntries(nativeIntegrations.map((integration, index) => ([integration, integrationTypes[index]])));
|
|
13
|
-
}
|
|
14
|
-
catch (error) {
|
|
15
|
-
return (0, base_api_1.logApiError)('Failed to get integration data.', error);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
7
|
+
const getIntegrationDependencies = (projectId, integration) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
8
|
+
return (0, base_api_1.get)(`projects/${projectId}/integrations/${integration}/dependencies`);
|
|
9
|
+
});
|
|
18
10
|
exports.getIntegrationDependencies = getIntegrationDependencies;
|
|
19
|
-
const getDefaultIntegrations =
|
|
11
|
+
const getDefaultIntegrations = (projectId) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
20
12
|
try {
|
|
21
|
-
return
|
|
13
|
+
return yield (0, base_api_1.get)(`projects/${projectId}/integrations`);
|
|
22
14
|
}
|
|
23
|
-
catch (
|
|
24
|
-
|
|
15
|
+
catch (err) {
|
|
16
|
+
logger_1.default.fatal(`Could not get integrations list : ${err}`);
|
|
25
17
|
}
|
|
26
|
-
};
|
|
18
|
+
});
|
|
27
19
|
exports.getDefaultIntegrations = getDefaultIntegrations;
|
|
28
20
|
//# sourceMappingURL=integration.api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.api.js","sourceRoot":"","sources":["../../src/apis/integration.api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration.api.js","sourceRoot":"","sources":["../../src/apis/integration.api.ts"],"names":[],"mappings":";;;;AAAA,+DAA+B;AAE/B,yCAAiC;AAM1B,MAAM,0BAA0B,GAAG,CACxC,SAAiB,EACjB,WAAmB,EACe,EAAE;IACpC,OAAO,IAAA,cAAG,EAAC,YAAY,SAAS,iBAAiB,WAAW,eAAe,CAAC,CAAC;AAC/E,CAAC,CAAA,CAAC;AALW,QAAA,0BAA0B,8BAKrC;AAOK,MAAM,sBAAsB,GAAG,CACpC,SAAiB,EACE,EAAE;IACrB,IAAI,CAAC;QACH,OAAO,MAAM,IAAA,cAAG,EAAC,YAAY,SAAS,eAAe,CAAC,CAAC;IACzD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,gBAAM,CAAC,KAAK,CAAC,qCAAqC,GAAG,EAAE,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC,CAAA,CAAC;AARW,QAAA,sBAAsB,0BAQjC"}
|
|
@@ -4,4 +4,4 @@ export declare const getProjectList: () => Promise<{
|
|
|
4
4
|
id: string;
|
|
5
5
|
}[]>;
|
|
6
6
|
export declare const getProjectBuild: (projectId: string) => Promise<ProjectBuild>;
|
|
7
|
-
export declare const syncProject: (build: ProjectBuild) => Promise<void>;
|
|
7
|
+
export declare const syncProject: (projectId: string, build: ProjectBuild) => Promise<void>;
|
package/dist/apis/project.api.js
CHANGED
|
@@ -1,57 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.syncProject = exports.getProjectBuild = exports.getProjectList = void 0;
|
|
4
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const logger_1 = tslib_1.__importDefault(require("../logger"));
|
|
5
6
|
const base_api_1 = require("./base.api");
|
|
6
|
-
const
|
|
7
|
-
const getProjectList = async () => {
|
|
7
|
+
const getProjectList = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
8
8
|
try {
|
|
9
|
-
return
|
|
9
|
+
return yield (0, base_api_1.get)('graphite/projects');
|
|
10
10
|
}
|
|
11
|
-
catch (
|
|
12
|
-
|
|
11
|
+
catch (err) {
|
|
12
|
+
logger_1.default.fatal(`Error while getting projects list : ${err}`);
|
|
13
13
|
}
|
|
14
|
-
};
|
|
14
|
+
});
|
|
15
15
|
exports.getProjectList = getProjectList;
|
|
16
|
-
const getProjectBuild =
|
|
16
|
+
const getProjectBuild = (projectId) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
17
17
|
try {
|
|
18
|
-
|
|
19
|
-
const integrations = Object.keys(projectBuild.integrations);
|
|
20
|
-
const integrationDependencies = await (0, integration_api_1.getIntegrationDependencies)(integrations);
|
|
21
|
-
return {
|
|
22
|
-
...projectBuild,
|
|
23
|
-
integrations: Object.fromEntries(Object.entries(projectBuild.integrations).map(([integration, build]) => [
|
|
24
|
-
integration,
|
|
25
|
-
(0, core_1.isCustomIntegration)(integration) || !build
|
|
26
|
-
? build
|
|
27
|
-
: {
|
|
28
|
-
...build,
|
|
29
|
-
dependencies: integrationDependencies[integration],
|
|
30
|
-
},
|
|
31
|
-
])),
|
|
32
|
-
};
|
|
18
|
+
return yield (0, base_api_1.get)(`graphite/projects/${projectId}`);
|
|
33
19
|
}
|
|
34
|
-
catch (
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
projectId,
|
|
38
|
-
integrations: {},
|
|
39
|
-
events: {},
|
|
40
|
-
secrets: [],
|
|
41
|
-
persona: { meta: {} },
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
return (0, base_api_1.logApiError)('Failed to get project.', error);
|
|
20
|
+
catch (err) {
|
|
21
|
+
logger_1.default.fatal(`Error while getting project : ${err}`);
|
|
45
22
|
}
|
|
46
|
-
};
|
|
23
|
+
});
|
|
47
24
|
exports.getProjectBuild = getProjectBuild;
|
|
48
|
-
const syncProject =
|
|
25
|
+
const syncProject = (projectId, build) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
49
26
|
try {
|
|
50
|
-
|
|
27
|
+
yield (0, base_api_1.put)(`graphite/projects/${projectId}`, build);
|
|
51
28
|
}
|
|
52
|
-
catch (
|
|
53
|
-
|
|
29
|
+
catch (err) {
|
|
30
|
+
logger_1.default.fatal(`Error while syncing project : ${err}`);
|
|
54
31
|
}
|
|
55
|
-
};
|
|
32
|
+
});
|
|
56
33
|
exports.syncProject = syncProject;
|
|
57
34
|
//# sourceMappingURL=project.api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.api.js","sourceRoot":"","sources":["../../src/apis/project.api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"project.api.js","sourceRoot":"","sources":["../../src/apis/project.api.ts"],"names":[],"mappings":";;;;AAAA,+DAA+B;AAE/B,yCAAsC;AAM/B,MAAM,cAAc,GAAG,GAE5B,EAAE;IACF,IAAI,CAAC;QACH,OAAO,MAAM,IAAA,cAAG,EAAC,mBAAmB,CAAC,CAAC;IACxC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,gBAAM,CAAC,KAAK,CAAC,uCAAuC,GAAG,EAAE,CAAC,CAAC;IAC7D,CAAC;AACH,CAAC,CAAA,CAAC;AARW,QAAA,cAAc,kBAQzB;AAOK,MAAM,eAAe,GAAG,CAC7B,SAAiB,EACM,EAAE;IACzB,IAAI,CAAC;QACH,OAAO,MAAM,IAAA,cAAG,EAAC,qBAAqB,SAAS,EAAE,CAAC,CAAC;IACrD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,gBAAM,CAAC,KAAK,CAAC,iCAAiC,GAAG,EAAE,CAAC,CAAC;IACvD,CAAC;AACH,CAAC,CAAA,CAAC;AARW,QAAA,eAAe,mBAQ1B;AAMK,MAAM,WAAW,GAAG,CACzB,SAAiB,EACjB,KAAmB,EACJ,EAAE;IACjB,IAAI,CAAC;QACH,MAAM,IAAA,cAAG,EAAC,qBAAqB,SAAS,EAAE,EAAE,KAAK,CAAC,CAAC;IACrD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,gBAAM,CAAC,KAAK,CAAC,iCAAiC,GAAG,EAAE,CAAC,CAAC;IACvD,CAAC;AACH,CAAC,CAAA,CAAC;AATW,QAAA,WAAW,eAStB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWorkflowSteps = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const base_api_1 = require("./base.api");
|
|
6
|
+
const getWorkflowSteps = (projectId, workflowId) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
7
|
+
return (0, base_api_1.get)(`projects/${projectId}/workflows/${workflowId}/steps`);
|
|
8
|
+
});
|
|
9
|
+
exports.getWorkflowSteps = getWorkflowSteps;
|
|
10
|
+
//# sourceMappingURL=workflow.api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.api.js","sourceRoot":"","sources":["../../src/apis/workflow.api.ts"],"names":[],"mappings":";;;;AAEA,yCAAiC;AAQ1B,MAAM,gBAAgB,GAAG,CAC9B,SAAiB,EACjB,UAAkB,EACA,EAAE;IACpB,OAAO,IAAA,cAAG,EAAC,YAAY,SAAS,cAAc,UAAU,QAAQ,CAAC,CAAC;AACpE,CAAC,CAAA,CAAC;AALW,QAAA,gBAAgB,oBAK3B"}
|
|
@@ -1,29 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IEvent } from '@useparagon/core/event';
|
|
2
2
|
import { InputSource, SerializedInput } from '@useparagon/core/inputs';
|
|
3
|
-
import {
|
|
4
|
-
import { IntegrationDependencies, IntegrationWorkflowMeta } from '../apis/api.types';
|
|
3
|
+
import { IntegrationWorkflowMeta } from '../apis/api.types';
|
|
5
4
|
export type ProjectDependencies = {
|
|
6
|
-
|
|
7
|
-
secrets: ISecret[];
|
|
5
|
+
events: Record<string, IEvent>;
|
|
8
6
|
};
|
|
9
7
|
export type WorkflowDependencies = ProjectDependencies & {
|
|
10
8
|
integration: {
|
|
11
9
|
name: string;
|
|
12
|
-
dependencies?: IntegrationDependencies;
|
|
13
10
|
};
|
|
14
11
|
workflowMeta: IntegrationWorkflowMeta;
|
|
15
12
|
sharedInputs: SerializedInput[];
|
|
16
13
|
inputSources: InputSource[];
|
|
17
14
|
};
|
|
18
15
|
export type StepDependencies = {
|
|
19
|
-
integration: WorkflowDependencies['integration'];
|
|
20
16
|
sharedInputs: SerializedInput[];
|
|
21
17
|
inputs: SerializedInput[];
|
|
22
18
|
inputSources: InputSource[];
|
|
23
19
|
stepIdToVariableMap: Record<string, string>;
|
|
24
|
-
|
|
25
|
-
stepIdToStepMap: Record<string, IStep>;
|
|
26
|
-
secrets: ISecret[];
|
|
27
|
-
currentStepId?: string;
|
|
28
|
-
upstreamStepIds: Set<string>;
|
|
20
|
+
events: Record<string, IEvent>;
|
|
29
21
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IntegrationBuild,
|
|
1
|
+
import { IntegrationBuild, ProjectBuild } from '../apis/api.types';
|
|
2
2
|
import { ProjectDependencies } from '../compiler/compiler.types';
|
|
3
3
|
export declare const generateIntegrationFiles: (integrationName: string, integrationOutput: IntegrationBuild, projectDependencies: ProjectDependencies, projectRoot: string) => Promise<void>;
|
|
4
4
|
export declare const generateProjectFiles: (projectBuild: ProjectBuild, projectRoot: string) => Promise<void>;
|
|
5
|
-
export declare const getInputsForIntent: (intent: IntegrationIntent) => IntentInputKeyConfig[];
|