@abyss-project/main 1.0.110 → 1.0.111
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/api/billing-account.admin.api.d.ts +10 -0
- package/dist/api/billing-account.admin.api.js +38 -0
- package/dist/api/billing-addon-template.admin.api.d.ts +7 -0
- package/dist/api/billing-addon-template.admin.api.js +26 -0
- package/dist/api/billing-plan.admin.api.d.ts +6 -0
- package/dist/api/billing-plan.admin.api.js +20 -0
- package/dist/api/billing-plan.api.d.ts +4 -0
- package/dist/api/billing-plan.api.js +12 -0
- package/dist/api/index.d.ts +7 -4
- package/dist/api/index.js +7 -4
- package/dist/api/organization-billing.api.d.ts +17 -0
- package/dist/api/organization-billing.api.js +64 -0
- package/dist/api/organization-member.api.d.ts +9 -6
- package/dist/api/organization-member.api.js +19 -7
- package/dist/api/organization.api.d.ts +3 -2
- package/dist/api/organization.api.js +5 -1
- package/dist/api/project-access.admin.api.d.ts +1 -3
- package/dist/api/project-access.admin.api.js +1 -9
- package/dist/api/project-access.api.d.ts +5 -3
- package/dist/api/project-access.api.js +17 -9
- package/dist/api/project-api-key.api.d.ts +8 -0
- package/dist/api/project-api-key.api.js +29 -0
- package/dist/api/project.api.d.ts +1 -5
- package/dist/api/project.api.js +1 -17
- package/dist/api/user-billing.api.d.ts +11 -0
- package/dist/api/user-billing.api.js +40 -0
- package/dist/api/user.api.d.ts +1 -4
- package/dist/api/user.api.js +1 -16
- package/dist/index.d.ts +1 -37
- package/dist/index.js +1 -37
- package/dist/permissions/ability.d.ts +12 -0
- package/dist/permissions/ability.js +134 -0
- package/dist/permissions/index.d.ts +1 -0
- package/dist/{workflow → permissions}/index.js +1 -1
- package/dist/types/enum/abyss-application-event.enum.d.ts +17 -1
- package/dist/types/enum/abyss-application-event.enum.js +16 -0
- package/dist/types/enum/index.d.ts +1 -4
- package/dist/types/enum/index.js +1 -4
- package/dist/types/enum/onboarding-steps.enum.d.ts +5 -3
- package/dist/types/enum/onboarding-steps.enum.js +5 -3
- package/dist/types/enum/organization-billing.enum.d.ts +70 -0
- package/dist/types/enum/organization-billing.enum.js +82 -0
- package/dist/types/enum/user-type.enum.d.ts +1 -0
- package/dist/types/enum/user-type.enum.js +1 -0
- package/dist/types/interface/api/index.d.ts +13 -8
- package/dist/types/interface/api/index.js +13 -8
- package/dist/types/interface/api/requests/billing-account.admin.request.d.ts +53 -0
- package/dist/types/interface/api/requests/billing-addon-template.request.d.ts +32 -0
- package/dist/types/interface/api/requests/billing-plan.request.d.ts +37 -0
- package/dist/types/interface/api/requests/organization-billing.request.d.ts +95 -0
- package/dist/types/interface/api/requests/organization-member.request.d.ts +13 -3
- package/dist/types/interface/api/requests/organization.request.d.ts +10 -0
- package/dist/types/interface/api/requests/project-access.admin.request.d.ts +1 -20
- package/dist/types/interface/api/requests/project-access.request.d.ts +16 -20
- package/dist/types/interface/api/requests/project-api-key.request.d.ts +39 -0
- package/dist/types/interface/api/requests/project.request.d.ts +2 -23
- package/dist/types/interface/api/requests/user-billing.request.d.ts +23 -0
- package/dist/types/interface/api/requests/user.request.d.ts +2 -8
- package/dist/types/interface/api/responses/billing-account.admin.response.d.ts +38 -0
- package/dist/types/interface/api/responses/billing-addon-template.response.d.ts +22 -0
- package/dist/types/interface/api/responses/billing-plan.response.d.ts +26 -0
- package/dist/types/interface/api/responses/gift-code.admin.response.d.ts +0 -1
- package/dist/types/interface/api/responses/gift-code.response.d.ts +0 -1
- package/dist/types/interface/api/responses/organization-billing.response.d.ts +82 -0
- package/dist/types/interface/api/responses/organization-member.response.d.ts +20 -8
- package/dist/types/interface/api/responses/project-access.admin.response.d.ts +0 -8
- package/dist/types/interface/api/responses/project-access.response.d.ts +16 -8
- package/dist/types/interface/api/responses/project-api-key.response.d.ts +26 -0
- package/dist/types/interface/api/responses/project.response.d.ts +0 -14
- package/dist/types/interface/api/responses/report.public.response.d.ts +0 -1
- package/dist/types/interface/api/responses/user-billing.response.d.ts +45 -0
- package/dist/types/interface/index.d.ts +13 -3
- package/dist/types/interface/index.js +13 -3
- package/dist/types/interface/models/application.model.d.ts +1 -1
- package/dist/types/interface/models/atlas-group.model.d.ts +2 -2
- package/dist/types/interface/models/atlas-page.model.d.ts +2 -2
- package/dist/types/interface/models/atlas.model.d.ts +8 -5
- package/dist/types/interface/models/billing-account.model.d.ts +40 -0
- package/dist/types/interface/models/billing-account.model.js +2 -0
- package/dist/types/interface/models/billing-addon-template.model.d.ts +15 -0
- package/dist/types/interface/models/billing-addon-template.model.js +2 -0
- package/dist/types/interface/models/board-card-checklist.model.d.ts +1 -1
- package/dist/types/interface/models/board-card.model.d.ts +6 -6
- package/dist/types/interface/models/board-column.model.d.ts +1 -1
- package/dist/types/interface/models/board.model.d.ts +7 -4
- package/dist/types/interface/models/credit-transaction.model.d.ts +22 -0
- package/dist/types/interface/models/credit-transaction.model.js +2 -0
- package/dist/types/interface/models/draw.model.d.ts +3 -0
- package/dist/types/interface/models/gift-code-activation.model.d.ts +4 -3
- package/dist/types/interface/models/gift-code.model.d.ts +1 -1
- package/dist/types/interface/models/invoice.model.d.ts +26 -0
- package/dist/types/interface/models/invoice.model.js +2 -0
- package/dist/types/interface/models/memo.model.d.ts +3 -0
- package/dist/types/interface/models/organization-billing.model.d.ts +37 -0
- package/dist/types/interface/models/organization-billing.model.js +2 -0
- package/dist/types/interface/models/organization-member.model.d.ts +0 -1
- package/dist/types/interface/models/organization-project-quota.model.d.ts +15 -0
- package/dist/types/interface/models/organization-project-quota.model.js +2 -0
- package/dist/types/interface/models/organization-quota-alert.model.d.ts +11 -0
- package/dist/types/interface/models/organization-quota-alert.model.js +2 -0
- package/dist/types/interface/models/organization-service-quota.model.d.ts +13 -0
- package/dist/types/interface/models/organization-service-quota.model.js +2 -0
- package/dist/types/interface/models/organization.model.d.ts +7 -0
- package/dist/types/interface/models/plan-template.model.d.ts +29 -0
- package/dist/types/interface/models/plan-template.model.js +2 -0
- package/dist/types/interface/models/project-access.model.d.ts +5 -6
- package/dist/types/interface/models/project-api-key-application-access.model.d.ts +13 -0
- package/dist/types/interface/models/project-api-key-application-access.model.js +2 -0
- package/dist/types/interface/models/project-api-key.model.d.ts +15 -0
- package/dist/types/interface/models/project-api-key.model.js +2 -0
- package/dist/types/interface/models/project.model.d.ts +8 -12
- package/dist/types/interface/models/quota-grant.model.d.ts +20 -0
- package/dist/types/interface/models/quota-grant.model.js +2 -0
- package/dist/types/interface/models/retrospective.model.d.ts +6 -3
- package/dist/types/interface/models/short-link.model.d.ts +4 -1
- package/dist/types/interface/models/team-project-access.model.d.ts +2 -0
- package/dist/types/interface/models/team-project-application-access.model.d.ts +13 -0
- package/dist/types/interface/models/team-project-application-access.model.js +2 -0
- package/dist/types/interface/models/team.model.d.ts +1 -1
- package/dist/types/interface/models/token-history.model.d.ts +2 -0
- package/dist/types/interface/models/usage-record.model.d.ts +24 -0
- package/dist/types/interface/models/usage-record.model.js +2 -0
- package/dist/types/interface/models/user-ticket-message.model.d.ts +1 -1
- package/dist/types/interface/models/user-ticket.model.d.ts +1 -1
- package/dist/types/interface/models/user.model.d.ts +16 -18
- package/dist/types/utils/onboarding.utils.d.ts +1 -6
- package/dist/types/utils/onboarding.utils.js +9 -5
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -1
- package/package.json +2 -1
- package/dist/api/user-credit-purchase.admin.api.d.ts +0 -7
- package/dist/api/user-credit-purchase.admin.api.js +0 -28
- package/dist/api/user-credit-purchase.api.d.ts +0 -3
- package/dist/api/user-credit-purchase.api.js +0 -14
- package/dist/api/user-transaction.admin.api.d.ts +0 -5
- package/dist/api/user-transaction.admin.api.js +0 -20
- package/dist/api/user-transaction.api.d.ts +0 -3
- package/dist/api/user-transaction.api.js +0 -14
- package/dist/expressions/index.d.ts +0 -5
- package/dist/expressions/index.js +0 -16
- package/dist/expressions/mapper.d.ts +0 -9
- package/dist/expressions/mapper.js +0 -90
- package/dist/expressions/parser.d.ts +0 -3
- package/dist/expressions/parser.js +0 -97
- package/dist/expressions/resolver.d.ts +0 -12
- package/dist/expressions/resolver.js +0 -88
- package/dist/expressions/types.d.ts +0 -36
- package/dist/types/enum/integration-type.enum.d.ts +0 -4
- package/dist/types/enum/integration-type.enum.js +0 -8
- package/dist/types/enum/invoice-status.enum.d.ts +0 -7
- package/dist/types/enum/invoice-status.enum.js +0 -11
- package/dist/types/enum/organization-role.enum.d.ts +0 -6
- package/dist/types/enum/organization-role.enum.js +0 -10
- package/dist/types/enum/organization-subscription-status.enum.d.ts +0 -7
- package/dist/types/enum/organization-subscription-status.enum.js +0 -11
- package/dist/types/enum/plan-billing-period.enum.d.ts +0 -4
- package/dist/types/enum/plan-billing-period.enum.js +0 -8
- package/dist/types/enum/plan-status.enum.d.ts +0 -4
- package/dist/types/enum/plan-status.enum.js +0 -8
- package/dist/types/enum/subscription-level.enum.d.ts +0 -72
- package/dist/types/enum/subscription-level.enum.js +0 -179
- package/dist/types/enum/usage-record-type.enum.d.ts +0 -8
- package/dist/types/enum/usage-record-type.enum.js +0 -12
- package/dist/types/enum/user-credit-purchase-payment-method.enum.d.ts +0 -3
- package/dist/types/enum/user-credit-purchase-payment-method.enum.js +0 -7
- package/dist/types/enum/user-credit-purchase-platform.enum.d.ts +0 -8
- package/dist/types/enum/user-credit-purchase-platform.enum.js +0 -12
- package/dist/types/enum/user-transaction-type.enum.d.ts +0 -14
- package/dist/types/enum/user-transaction-type.enum.js +0 -18
- package/dist/types/interface/api/requests/user-credit-purchase.admin.request.d.ts +0 -42
- package/dist/types/interface/api/requests/user-credit-purchase.request.d.ts +0 -9
- package/dist/types/interface/api/requests/user-transaction.admin.request.d.ts +0 -30
- package/dist/types/interface/api/requests/user-transaction.request.d.ts +0 -8
- package/dist/types/interface/api/responses/user-credit-purchase.admin.response.d.ts +0 -22
- package/dist/types/interface/api/responses/user-credit-purchase.response.d.ts +0 -8
- package/dist/types/interface/api/responses/user-transaction.admin.response.d.ts +0 -13
- package/dist/types/interface/api/responses/user-transaction.response.d.ts +0 -11
- package/dist/types/interface/models/subscription.model.d.ts +0 -16
- package/dist/types/interface/models/user-credit-purchase.model.d.ts +0 -22
- package/dist/types/interface/models/user-transaction.model.d.ts +0 -19
- package/dist/utils/organization-permission.utils.d.ts +0 -3
- package/dist/utils/organization-permission.utils.js +0 -36
- package/dist/utils/subscription.utils.d.ts +0 -6
- package/dist/utils/subscription.utils.js +0 -41
- package/dist/workflow/expression/expression-functions.utils.d.ts +0 -6
- package/dist/workflow/expression/expression-functions.utils.js +0 -61
- package/dist/workflow/expression/expression-mapper.d.ts +0 -11
- package/dist/workflow/expression/expression-mapper.js +0 -32
- package/dist/workflow/expression/expression-mapping.utils.d.ts +0 -4
- package/dist/workflow/expression/expression-mapping.utils.js +0 -43
- package/dist/workflow/expression/expression-resolver.utils.d.ts +0 -3
- package/dist/workflow/expression/expression-resolver.utils.js +0 -54
- package/dist/workflow/expression/expression-tokenizer.utils.d.ts +0 -4
- package/dist/workflow/expression/expression-tokenizer.utils.js +0 -123
- package/dist/workflow/expression/expression.types.d.ts +0 -33
- package/dist/workflow/expression/expression.types.js +0 -17
- package/dist/workflow/expression/index.d.ts +0 -10
- package/dist/workflow/expression/index.js +0 -40
- package/dist/workflow/expression/workflow-resolver.d.ts +0 -9
- package/dist/workflow/expression/workflow-resolver.js +0 -102
- package/dist/workflow/expressions/functions/array.d.ts +0 -2
- package/dist/workflow/expressions/functions/array.js +0 -252
- package/dist/workflow/expressions/functions/crypto.d.ts +0 -2
- package/dist/workflow/expressions/functions/crypto.js +0 -101
- package/dist/workflow/expressions/functions/datetime.d.ts +0 -2
- package/dist/workflow/expressions/functions/datetime.js +0 -256
- package/dist/workflow/expressions/functions/index.d.ts +0 -7
- package/dist/workflow/expressions/functions/index.js +0 -46
- package/dist/workflow/expressions/functions/math.d.ts +0 -2
- package/dist/workflow/expressions/functions/math.js +0 -174
- package/dist/workflow/expressions/functions/string.d.ts +0 -2
- package/dist/workflow/expressions/functions/string.js +0 -301
- package/dist/workflow/expressions/functions/utility.d.ts +0 -2
- package/dist/workflow/expressions/functions/utility.js +0 -230
- package/dist/workflow/expressions/helpers.d.ts +0 -26
- package/dist/workflow/expressions/helpers.js +0 -132
- package/dist/workflow/expressions/index.d.ts +0 -15
- package/dist/workflow/expressions/index.js +0 -61
- package/dist/workflow/expressions/parser.d.ts +0 -8
- package/dist/workflow/expressions/parser.js +0 -436
- package/dist/workflow/expressions/pipes/array-pipes.d.ts +0 -2
- package/dist/workflow/expressions/pipes/array-pipes.js +0 -248
- package/dist/workflow/expressions/pipes/index.d.ts +0 -8
- package/dist/workflow/expressions/pipes/index.js +0 -40
- package/dist/workflow/expressions/pipes/object-pipes.d.ts +0 -2
- package/dist/workflow/expressions/pipes/object-pipes.js +0 -243
- package/dist/workflow/expressions/pipes/string-pipes.d.ts +0 -9
- package/dist/workflow/expressions/pipes/string-pipes.js +0 -178
- package/dist/workflow/expressions/resolver.d.ts +0 -8
- package/dist/workflow/expressions/resolver.js +0 -263
- package/dist/workflow/expressions/types.d.ts +0 -144
- package/dist/workflow/expressions/types.js +0 -33
- package/dist/workflow/index.d.ts +0 -1
- /package/dist/{expressions/types.js → types/interface/api/requests/billing-account.admin.request.js} +0 -0
- /package/dist/types/interface/api/requests/{user-credit-purchase.admin.request.js → billing-addon-template.request.js} +0 -0
- /package/dist/types/interface/api/requests/{user-credit-purchase.request.js → billing-plan.request.js} +0 -0
- /package/dist/types/interface/api/requests/{user-transaction.admin.request.js → organization-billing.request.js} +0 -0
- /package/dist/types/interface/api/requests/{user-transaction.request.js → project-api-key.request.js} +0 -0
- /package/dist/types/interface/api/{responses/user-credit-purchase.admin.response.js → requests/user-billing.request.js} +0 -0
- /package/dist/types/interface/api/responses/{user-credit-purchase.response.js → billing-account.admin.response.js} +0 -0
- /package/dist/types/interface/api/responses/{user-transaction.admin.response.js → billing-addon-template.response.js} +0 -0
- /package/dist/types/interface/api/responses/{user-transaction.response.js → billing-plan.response.js} +0 -0
- /package/dist/types/interface/{models/subscription.model.js → api/responses/organization-billing.response.js} +0 -0
- /package/dist/types/interface/{models/user-credit-purchase.model.js → api/responses/project-api-key.response.js} +0 -0
- /package/dist/types/interface/{models/user-transaction.model.js → api/responses/user-billing.response.js} +0 -0
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export { DataSourceType, OPERATOR_PRECEDENCE } from './types';
|
|
2
|
-
export type { ParsedExpression, PathExpression, FunctionExpression, BinaryExpression, UnaryExpression, TernaryExpression, LiteralExpression, GroupExpression, BuiltInFunction, FunctionCategory, FunctionArg, PipeOperation, OperationCategory, WorkflowContext, StepExecution, WorkflowStep, ValidationResult, ValidationError, ValidationWarning, ExpressionToken, WorkflowResourceMapping, } from './types';
|
|
3
|
-
export { parseExpression, detectDataSource, parsePathSegments, tokenizeTemplate, } from './parser';
|
|
4
|
-
export { buildResolverContext, resolvePathValue, evaluateExpression, interpolateString, resolveExpression, } from './resolver';
|
|
5
|
-
export { BUILT_IN_FUNCTIONS, executeFunction, getFunctionsByCategory, getFunctionNames, hasFunction, getFunction, } from './functions';
|
|
6
|
-
export { PIPE_OPERATIONS, executePipeOperation, getPipesByCategory, getPipeNames, hasPipe, getPipe, } from './pipes';
|
|
7
|
-
export type { PipeDefinition } from './pipes/string-pipes';
|
|
8
|
-
import type { WorkflowContext } from './types';
|
|
9
|
-
export { buildExpressionString, buildReferenceString, hasExpressions, hasReferences, isInsideExpression, extractPaths, parseOperations, getCurrentExpressionContext, getValueType, } from './helpers';
|
|
10
|
-
export declare function evaluate(expression: string, workflowContext: WorkflowContext, secretsMap?: Map<string, string>): unknown;
|
|
11
|
-
export declare function interpolate(template: string, workflowContext: WorkflowContext, secretsMap?: Map<string, string>, options?: {
|
|
12
|
-
maskSecrets?: boolean;
|
|
13
|
-
}): string;
|
|
14
|
-
export declare function hasDynamicContent(str: string): boolean;
|
|
15
|
-
export declare function extractReferences(str: string): string[];
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.extractReferences = exports.hasDynamicContent = exports.interpolate = exports.evaluate = exports.getValueType = exports.getCurrentExpressionContext = exports.parseOperations = exports.extractPaths = exports.isInsideExpression = exports.hasReferences = exports.hasExpressions = exports.buildReferenceString = exports.buildExpressionString = exports.getPipe = exports.hasPipe = exports.getPipeNames = exports.getPipesByCategory = exports.executePipeOperation = exports.PIPE_OPERATIONS = exports.getFunction = exports.hasFunction = exports.getFunctionNames = exports.getFunctionsByCategory = exports.executeFunction = exports.BUILT_IN_FUNCTIONS = exports.resolveExpression = exports.interpolateString = exports.evaluateExpression = exports.resolvePathValue = exports.buildResolverContext = exports.tokenizeTemplate = exports.parsePathSegments = exports.detectDataSource = exports.parseExpression = exports.OPERATOR_PRECEDENCE = exports.DataSourceType = void 0;
|
|
4
|
-
var types_1 = require("./types");
|
|
5
|
-
Object.defineProperty(exports, "DataSourceType", { enumerable: true, get: function () { return types_1.DataSourceType; } });
|
|
6
|
-
Object.defineProperty(exports, "OPERATOR_PRECEDENCE", { enumerable: true, get: function () { return types_1.OPERATOR_PRECEDENCE; } });
|
|
7
|
-
var parser_1 = require("./parser");
|
|
8
|
-
Object.defineProperty(exports, "parseExpression", { enumerable: true, get: function () { return parser_1.parseExpression; } });
|
|
9
|
-
Object.defineProperty(exports, "detectDataSource", { enumerable: true, get: function () { return parser_1.detectDataSource; } });
|
|
10
|
-
Object.defineProperty(exports, "parsePathSegments", { enumerable: true, get: function () { return parser_1.parsePathSegments; } });
|
|
11
|
-
Object.defineProperty(exports, "tokenizeTemplate", { enumerable: true, get: function () { return parser_1.tokenizeTemplate; } });
|
|
12
|
-
var resolver_1 = require("./resolver");
|
|
13
|
-
Object.defineProperty(exports, "buildResolverContext", { enumerable: true, get: function () { return resolver_1.buildResolverContext; } });
|
|
14
|
-
Object.defineProperty(exports, "resolvePathValue", { enumerable: true, get: function () { return resolver_1.resolvePathValue; } });
|
|
15
|
-
Object.defineProperty(exports, "evaluateExpression", { enumerable: true, get: function () { return resolver_1.evaluateExpression; } });
|
|
16
|
-
Object.defineProperty(exports, "interpolateString", { enumerable: true, get: function () { return resolver_1.interpolateString; } });
|
|
17
|
-
Object.defineProperty(exports, "resolveExpression", { enumerable: true, get: function () { return resolver_1.resolveExpression; } });
|
|
18
|
-
var functions_1 = require("./functions");
|
|
19
|
-
Object.defineProperty(exports, "BUILT_IN_FUNCTIONS", { enumerable: true, get: function () { return functions_1.BUILT_IN_FUNCTIONS; } });
|
|
20
|
-
Object.defineProperty(exports, "executeFunction", { enumerable: true, get: function () { return functions_1.executeFunction; } });
|
|
21
|
-
Object.defineProperty(exports, "getFunctionsByCategory", { enumerable: true, get: function () { return functions_1.getFunctionsByCategory; } });
|
|
22
|
-
Object.defineProperty(exports, "getFunctionNames", { enumerable: true, get: function () { return functions_1.getFunctionNames; } });
|
|
23
|
-
Object.defineProperty(exports, "hasFunction", { enumerable: true, get: function () { return functions_1.hasFunction; } });
|
|
24
|
-
Object.defineProperty(exports, "getFunction", { enumerable: true, get: function () { return functions_1.getFunction; } });
|
|
25
|
-
var pipes_1 = require("./pipes");
|
|
26
|
-
Object.defineProperty(exports, "PIPE_OPERATIONS", { enumerable: true, get: function () { return pipes_1.PIPE_OPERATIONS; } });
|
|
27
|
-
Object.defineProperty(exports, "executePipeOperation", { enumerable: true, get: function () { return pipes_1.executePipeOperation; } });
|
|
28
|
-
Object.defineProperty(exports, "getPipesByCategory", { enumerable: true, get: function () { return pipes_1.getPipesByCategory; } });
|
|
29
|
-
Object.defineProperty(exports, "getPipeNames", { enumerable: true, get: function () { return pipes_1.getPipeNames; } });
|
|
30
|
-
Object.defineProperty(exports, "hasPipe", { enumerable: true, get: function () { return pipes_1.hasPipe; } });
|
|
31
|
-
Object.defineProperty(exports, "getPipe", { enumerable: true, get: function () { return pipes_1.getPipe; } });
|
|
32
|
-
const resolver_2 = require("./resolver");
|
|
33
|
-
var helpers_1 = require("./helpers");
|
|
34
|
-
Object.defineProperty(exports, "buildExpressionString", { enumerable: true, get: function () { return helpers_1.buildExpressionString; } });
|
|
35
|
-
Object.defineProperty(exports, "buildReferenceString", { enumerable: true, get: function () { return helpers_1.buildReferenceString; } });
|
|
36
|
-
Object.defineProperty(exports, "hasExpressions", { enumerable: true, get: function () { return helpers_1.hasExpressions; } });
|
|
37
|
-
Object.defineProperty(exports, "hasReferences", { enumerable: true, get: function () { return helpers_1.hasReferences; } });
|
|
38
|
-
Object.defineProperty(exports, "isInsideExpression", { enumerable: true, get: function () { return helpers_1.isInsideExpression; } });
|
|
39
|
-
Object.defineProperty(exports, "extractPaths", { enumerable: true, get: function () { return helpers_1.extractPaths; } });
|
|
40
|
-
Object.defineProperty(exports, "parseOperations", { enumerable: true, get: function () { return helpers_1.parseOperations; } });
|
|
41
|
-
Object.defineProperty(exports, "getCurrentExpressionContext", { enumerable: true, get: function () { return helpers_1.getCurrentExpressionContext; } });
|
|
42
|
-
Object.defineProperty(exports, "getValueType", { enumerable: true, get: function () { return helpers_1.getValueType; } });
|
|
43
|
-
function evaluate(expression, workflowContext, secretsMap) {
|
|
44
|
-
const context = (0, resolver_2.buildResolverContext)(workflowContext);
|
|
45
|
-
return (0, resolver_2.resolveExpression)(expression, context, secretsMap);
|
|
46
|
-
}
|
|
47
|
-
exports.evaluate = evaluate;
|
|
48
|
-
function interpolate(template, workflowContext, secretsMap, options) {
|
|
49
|
-
const context = (0, resolver_2.buildResolverContext)(workflowContext);
|
|
50
|
-
return (0, resolver_2.interpolateString)(template, context, secretsMap, options);
|
|
51
|
-
}
|
|
52
|
-
exports.interpolate = interpolate;
|
|
53
|
-
function hasDynamicContent(str) {
|
|
54
|
-
return /\{\{.+?\}\}/.test(str);
|
|
55
|
-
}
|
|
56
|
-
exports.hasDynamicContent = hasDynamicContent;
|
|
57
|
-
function extractReferences(str) {
|
|
58
|
-
const matches = str.matchAll(/\{\{(.+?)\}\}/g);
|
|
59
|
-
return Array.from(matches, (m) => m[1].trim());
|
|
60
|
-
}
|
|
61
|
-
exports.extractReferences = extractReferences;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ParsedExpression, DataSourceType } from './types';
|
|
2
|
-
export declare function detectDataSource(path: string): DataSourceType | null;
|
|
3
|
-
export declare function parsePathSegments(path: string): string[];
|
|
4
|
-
export declare function parseExpression(expression: string): ParsedExpression;
|
|
5
|
-
export declare function tokenizeTemplate(template: string): Array<{
|
|
6
|
-
type: 'text' | 'expression';
|
|
7
|
-
value: string;
|
|
8
|
-
}>;
|
|
@@ -1,436 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tokenizeTemplate = exports.parseExpression = exports.parsePathSegments = exports.detectDataSource = void 0;
|
|
4
|
-
const EXPRESSION_PATTERN = /\{\{(.+?)\}\}/g;
|
|
5
|
-
const FUNCTION_PATTERN = /^(?:fn\.)?(\w+)\((.*)\)$/s;
|
|
6
|
-
const PIPE_PATTERN = /\s*\|\s*(\w+)(?:\(([^)]*)\))?/g;
|
|
7
|
-
const DATA_SOURCE_PREFIXES = {
|
|
8
|
-
trigger: 'trigger',
|
|
9
|
-
triggerData: 'trigger',
|
|
10
|
-
steps: 'steps',
|
|
11
|
-
variables: 'variables',
|
|
12
|
-
secret: 'secret',
|
|
13
|
-
ipAddress: 'ipAddress',
|
|
14
|
-
domain: 'domain',
|
|
15
|
-
abyss: 'abyss',
|
|
16
|
-
app: 'app',
|
|
17
|
-
project: 'project',
|
|
18
|
-
env: 'env',
|
|
19
|
-
fn: 'fn',
|
|
20
|
-
};
|
|
21
|
-
function detectDataSource(path) {
|
|
22
|
-
const firstDot = path.indexOf('.');
|
|
23
|
-
const firstBracket = path.indexOf('[');
|
|
24
|
-
let prefix;
|
|
25
|
-
if (firstDot === -1 && firstBracket === -1) {
|
|
26
|
-
prefix = path;
|
|
27
|
-
}
|
|
28
|
-
else if (firstDot === -1) {
|
|
29
|
-
prefix = path.substring(0, firstBracket);
|
|
30
|
-
}
|
|
31
|
-
else if (firstBracket === -1) {
|
|
32
|
-
prefix = path.substring(0, firstDot);
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
prefix = path.substring(0, Math.min(firstDot, firstBracket));
|
|
36
|
-
}
|
|
37
|
-
return DATA_SOURCE_PREFIXES[prefix] || null;
|
|
38
|
-
}
|
|
39
|
-
exports.detectDataSource = detectDataSource;
|
|
40
|
-
function parsePathSegments(path) {
|
|
41
|
-
const segments = [];
|
|
42
|
-
let current = '';
|
|
43
|
-
let inBracket = false;
|
|
44
|
-
let bracketContent = '';
|
|
45
|
-
for (let i = 0; i < path.length; i++) {
|
|
46
|
-
const char = path[i];
|
|
47
|
-
if (char === '[') {
|
|
48
|
-
if (current) {
|
|
49
|
-
segments.push(current);
|
|
50
|
-
current = '';
|
|
51
|
-
}
|
|
52
|
-
inBracket = true;
|
|
53
|
-
bracketContent = '';
|
|
54
|
-
}
|
|
55
|
-
else if (char === ']' && inBracket) {
|
|
56
|
-
const cleaned = bracketContent.replace(/^["']|["']$/g, '');
|
|
57
|
-
segments.push(cleaned);
|
|
58
|
-
inBracket = false;
|
|
59
|
-
bracketContent = '';
|
|
60
|
-
}
|
|
61
|
-
else if (inBracket) {
|
|
62
|
-
bracketContent += char;
|
|
63
|
-
}
|
|
64
|
-
else if (char === '.') {
|
|
65
|
-
if (current) {
|
|
66
|
-
segments.push(current);
|
|
67
|
-
current = '';
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
current += char;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
if (current) {
|
|
75
|
-
segments.push(current);
|
|
76
|
-
}
|
|
77
|
-
return segments;
|
|
78
|
-
}
|
|
79
|
-
exports.parsePathSegments = parsePathSegments;
|
|
80
|
-
function parseExpression(expression) {
|
|
81
|
-
const trimmed = expression.trim();
|
|
82
|
-
if (!trimmed) {
|
|
83
|
-
return { type: 'literal', literalType: 'string', literalValue: '', isValid: false, error: 'Empty expression' };
|
|
84
|
-
}
|
|
85
|
-
try {
|
|
86
|
-
return parseExpressionAST(trimmed);
|
|
87
|
-
}
|
|
88
|
-
catch (error) {
|
|
89
|
-
return {
|
|
90
|
-
type: 'literal',
|
|
91
|
-
literalType: 'string',
|
|
92
|
-
literalValue: '',
|
|
93
|
-
isValid: false,
|
|
94
|
-
error: error instanceof Error ? error.message : 'Parse error',
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
exports.parseExpression = parseExpression;
|
|
99
|
-
function parseExpressionAST(expr) {
|
|
100
|
-
const trimmed = expr.trim();
|
|
101
|
-
const ternary = findTernaryOperator(trimmed);
|
|
102
|
-
if (ternary) {
|
|
103
|
-
return {
|
|
104
|
-
type: 'ternary',
|
|
105
|
-
condition: parseExpressionAST(ternary.condition),
|
|
106
|
-
consequent: parseExpressionAST(ternary.consequent),
|
|
107
|
-
alternate: parseExpressionAST(ternary.alternate),
|
|
108
|
-
isValid: true,
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
const binary = findBinaryOperator(trimmed);
|
|
112
|
-
if (binary) {
|
|
113
|
-
return {
|
|
114
|
-
type: 'binary',
|
|
115
|
-
operator: binary.operator,
|
|
116
|
-
left: parseExpressionAST(binary.left),
|
|
117
|
-
right: parseExpressionAST(binary.right),
|
|
118
|
-
isValid: true,
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
return parsePrimary(trimmed);
|
|
122
|
-
}
|
|
123
|
-
function parsePrimary(expr) {
|
|
124
|
-
const trimmed = expr.trim();
|
|
125
|
-
if (trimmed.startsWith('!') && !trimmed.startsWith('!=')) {
|
|
126
|
-
return {
|
|
127
|
-
type: 'unary',
|
|
128
|
-
operator: '!',
|
|
129
|
-
operand: parsePrimary(trimmed.substring(1)),
|
|
130
|
-
isValid: true,
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
if (trimmed.startsWith('(') && trimmed.endsWith(')')) {
|
|
134
|
-
const inner = trimmed.substring(1, trimmed.length - 1);
|
|
135
|
-
return {
|
|
136
|
-
type: 'group',
|
|
137
|
-
expression: parseExpressionAST(inner),
|
|
138
|
-
isValid: true,
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
if ((trimmed.startsWith('"') && trimmed.endsWith('"')) ||
|
|
142
|
-
(trimmed.startsWith("'") && trimmed.endsWith("'"))) {
|
|
143
|
-
return {
|
|
144
|
-
type: 'literal',
|
|
145
|
-
literalType: 'string',
|
|
146
|
-
literalValue: trimmed.slice(1, -1),
|
|
147
|
-
isValid: true,
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
if (/^-?\d+(\.\d+)?$/.test(trimmed)) {
|
|
151
|
-
return {
|
|
152
|
-
type: 'literal',
|
|
153
|
-
literalType: 'number',
|
|
154
|
-
literalValue: parseFloat(trimmed),
|
|
155
|
-
isValid: true,
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
if (trimmed === 'true' || trimmed === 'false') {
|
|
159
|
-
return {
|
|
160
|
-
type: 'literal',
|
|
161
|
-
literalType: 'boolean',
|
|
162
|
-
literalValue: trimmed === 'true',
|
|
163
|
-
isValid: true,
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
if (trimmed === 'null') {
|
|
167
|
-
return {
|
|
168
|
-
type: 'literal',
|
|
169
|
-
literalType: 'null',
|
|
170
|
-
literalValue: null,
|
|
171
|
-
isValid: true,
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
const funcMatch = trimmed.match(FUNCTION_PATTERN);
|
|
175
|
-
if (funcMatch) {
|
|
176
|
-
const [, funcName, argsStr] = funcMatch;
|
|
177
|
-
return {
|
|
178
|
-
type: 'function',
|
|
179
|
-
isFunction: true,
|
|
180
|
-
functionName: funcName,
|
|
181
|
-
functionArgs: parseArgs(argsStr),
|
|
182
|
-
isValid: true,
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
const pipeIndex = findFirstPipeIndex(trimmed);
|
|
186
|
-
if (pipeIndex !== -1) {
|
|
187
|
-
const pathPart = trimmed.substring(0, pipeIndex).trim();
|
|
188
|
-
const pipesPart = trimmed.substring(pipeIndex);
|
|
189
|
-
const operations = parsePipeOperations(pipesPart);
|
|
190
|
-
const source = detectDataSource(pathPart);
|
|
191
|
-
return {
|
|
192
|
-
type: 'path',
|
|
193
|
-
path: pathPart,
|
|
194
|
-
source,
|
|
195
|
-
operations,
|
|
196
|
-
isValid: true,
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
const source = detectDataSource(trimmed);
|
|
200
|
-
return {
|
|
201
|
-
type: 'path',
|
|
202
|
-
path: trimmed,
|
|
203
|
-
source,
|
|
204
|
-
isValid: true,
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
const OPERATOR_PRECEDENCE_MAP = {
|
|
208
|
-
'||': 1,
|
|
209
|
-
'&&': 2,
|
|
210
|
-
'==': 3,
|
|
211
|
-
'!=': 3,
|
|
212
|
-
'<': 4,
|
|
213
|
-
'>': 4,
|
|
214
|
-
'<=': 4,
|
|
215
|
-
'>=': 4,
|
|
216
|
-
'+': 5,
|
|
217
|
-
'-': 5,
|
|
218
|
-
'*': 6,
|
|
219
|
-
'/': 6,
|
|
220
|
-
'%': 6,
|
|
221
|
-
'**': 7,
|
|
222
|
-
};
|
|
223
|
-
function findTernaryOperator(expr) {
|
|
224
|
-
let depth = 0;
|
|
225
|
-
let questionIdx = -1;
|
|
226
|
-
let colonIdx = -1;
|
|
227
|
-
for (let i = 0; i < expr.length; i++) {
|
|
228
|
-
const char = expr[i];
|
|
229
|
-
if (char === '(' || char === '[' || char === '{') {
|
|
230
|
-
depth++;
|
|
231
|
-
}
|
|
232
|
-
if (char === ')' || char === ']' || char === '}') {
|
|
233
|
-
depth--;
|
|
234
|
-
}
|
|
235
|
-
if (depth === 0) {
|
|
236
|
-
if (char === '?' && questionIdx === -1) {
|
|
237
|
-
questionIdx = i;
|
|
238
|
-
}
|
|
239
|
-
else if (char === ':' && questionIdx !== -1 && colonIdx === -1) {
|
|
240
|
-
colonIdx = i;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
if (questionIdx !== -1 && colonIdx !== -1) {
|
|
245
|
-
return {
|
|
246
|
-
condition: expr.substring(0, questionIdx).trim(),
|
|
247
|
-
consequent: expr.substring(questionIdx + 1, colonIdx).trim(),
|
|
248
|
-
alternate: expr.substring(colonIdx + 1).trim(),
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
return null;
|
|
252
|
-
}
|
|
253
|
-
function findBinaryOperator(expr) {
|
|
254
|
-
const operators = [
|
|
255
|
-
'||', '&&', '===', '!==', '==', '!=', '>=', '<=', '>', '<',
|
|
256
|
-
'**', '+', '-', '*', '/', '%',
|
|
257
|
-
];
|
|
258
|
-
let depth = 0;
|
|
259
|
-
let inString = false;
|
|
260
|
-
let stringChar = '';
|
|
261
|
-
let bestOp = null;
|
|
262
|
-
for (let i = 0; i < expr.length; i++) {
|
|
263
|
-
const char = expr[i];
|
|
264
|
-
if ((char === '"' || char === "'") && (i === 0 || expr[i - 1] !== '\\')) {
|
|
265
|
-
if (!inString) {
|
|
266
|
-
inString = true;
|
|
267
|
-
stringChar = char;
|
|
268
|
-
}
|
|
269
|
-
else if (char === stringChar) {
|
|
270
|
-
inString = false;
|
|
271
|
-
}
|
|
272
|
-
continue;
|
|
273
|
-
}
|
|
274
|
-
if (inString) {
|
|
275
|
-
continue;
|
|
276
|
-
}
|
|
277
|
-
if (char === '(' || char === '[' || char === '{')
|
|
278
|
-
depth++;
|
|
279
|
-
if (char === ')' || char === ']' || char === '}')
|
|
280
|
-
depth--;
|
|
281
|
-
if (depth !== 0)
|
|
282
|
-
continue;
|
|
283
|
-
for (const op of operators) {
|
|
284
|
-
if (expr.substring(i, i + op.length) === op) {
|
|
285
|
-
if (i === 0)
|
|
286
|
-
continue;
|
|
287
|
-
const precedence = OPERATOR_PRECEDENCE_MAP[op] || 0;
|
|
288
|
-
if (!bestOp ||
|
|
289
|
-
precedence < bestOp.precedence ||
|
|
290
|
-
(precedence === bestOp.precedence && i > bestOp.index)) {
|
|
291
|
-
bestOp = { operator: op, index: i, precedence };
|
|
292
|
-
}
|
|
293
|
-
break;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
if (bestOp && bestOp.index > 0) {
|
|
298
|
-
return {
|
|
299
|
-
operator: bestOp.operator,
|
|
300
|
-
left: expr.substring(0, bestOp.index).trim(),
|
|
301
|
-
right: expr.substring(bestOp.index + bestOp.operator.length).trim(),
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
return null;
|
|
305
|
-
}
|
|
306
|
-
function findFirstPipeIndex(str) {
|
|
307
|
-
let depth = 0;
|
|
308
|
-
let inString = false;
|
|
309
|
-
let stringChar = '';
|
|
310
|
-
for (let i = 0; i < str.length; i++) {
|
|
311
|
-
const char = str[i];
|
|
312
|
-
const prevChar = i > 0 ? str[i - 1] : '';
|
|
313
|
-
if ((char === '"' || char === "'") && prevChar !== '\\') {
|
|
314
|
-
if (!inString) {
|
|
315
|
-
inString = true;
|
|
316
|
-
stringChar = char;
|
|
317
|
-
}
|
|
318
|
-
else if (char === stringChar) {
|
|
319
|
-
inString = false;
|
|
320
|
-
}
|
|
321
|
-
continue;
|
|
322
|
-
}
|
|
323
|
-
if (inString)
|
|
324
|
-
continue;
|
|
325
|
-
if (char === '(' || char === '[' || char === '{')
|
|
326
|
-
depth++;
|
|
327
|
-
if (char === ')' || char === ']' || char === '}')
|
|
328
|
-
depth--;
|
|
329
|
-
if (char === '|' && depth === 0 && str[i + 1] !== '|') {
|
|
330
|
-
return i;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
return -1;
|
|
334
|
-
}
|
|
335
|
-
function parseArgs(argsString) {
|
|
336
|
-
if (!argsString.trim()) {
|
|
337
|
-
return [];
|
|
338
|
-
}
|
|
339
|
-
const args = [];
|
|
340
|
-
let current = '';
|
|
341
|
-
let depth = 0;
|
|
342
|
-
let inString = false;
|
|
343
|
-
let stringChar = '';
|
|
344
|
-
for (let i = 0; i < argsString.length; i++) {
|
|
345
|
-
const char = argsString[i];
|
|
346
|
-
const prevChar = i > 0 ? argsString[i - 1] : '';
|
|
347
|
-
if ((char === '"' || char === "'") && prevChar !== '\\') {
|
|
348
|
-
if (!inString) {
|
|
349
|
-
inString = true;
|
|
350
|
-
stringChar = char;
|
|
351
|
-
}
|
|
352
|
-
else if (char === stringChar) {
|
|
353
|
-
inString = false;
|
|
354
|
-
}
|
|
355
|
-
current += char;
|
|
356
|
-
continue;
|
|
357
|
-
}
|
|
358
|
-
if (inString) {
|
|
359
|
-
current += char;
|
|
360
|
-
continue;
|
|
361
|
-
}
|
|
362
|
-
if (char === '(' || char === '[' || char === '{') {
|
|
363
|
-
depth++;
|
|
364
|
-
current += char;
|
|
365
|
-
continue;
|
|
366
|
-
}
|
|
367
|
-
if (char === ')' || char === ']' || char === '}') {
|
|
368
|
-
depth--;
|
|
369
|
-
current += char;
|
|
370
|
-
continue;
|
|
371
|
-
}
|
|
372
|
-
if (char === ',' && depth === 0) {
|
|
373
|
-
args.push(parseArgValue(current.trim()));
|
|
374
|
-
current = '';
|
|
375
|
-
continue;
|
|
376
|
-
}
|
|
377
|
-
current += char;
|
|
378
|
-
}
|
|
379
|
-
if (current.trim()) {
|
|
380
|
-
args.push(parseArgValue(current.trim()));
|
|
381
|
-
}
|
|
382
|
-
return args;
|
|
383
|
-
}
|
|
384
|
-
function parseArgValue(value) {
|
|
385
|
-
if ((value.startsWith('"') && value.endsWith('"')) ||
|
|
386
|
-
(value.startsWith("'") && value.endsWith("'"))) {
|
|
387
|
-
return value.slice(1, -1);
|
|
388
|
-
}
|
|
389
|
-
if (value === 'true')
|
|
390
|
-
return true;
|
|
391
|
-
if (value === 'false')
|
|
392
|
-
return false;
|
|
393
|
-
if (value === 'null')
|
|
394
|
-
return null;
|
|
395
|
-
if (/^-?\d+(\.\d+)?$/.test(value))
|
|
396
|
-
return parseFloat(value);
|
|
397
|
-
return value;
|
|
398
|
-
}
|
|
399
|
-
function parsePipeOperations(pipesStr) {
|
|
400
|
-
const operations = [];
|
|
401
|
-
const pipePattern = /\s*\|\s*(\w+)(?:\(([^)]*)\))?/g;
|
|
402
|
-
let match;
|
|
403
|
-
while ((match = pipePattern.exec(pipesStr)) !== null) {
|
|
404
|
-
const [, name, argsStr] = match;
|
|
405
|
-
const args = argsStr ? parseArgs(argsStr) : [];
|
|
406
|
-
operations.push({ name, args });
|
|
407
|
-
}
|
|
408
|
-
return operations;
|
|
409
|
-
}
|
|
410
|
-
function tokenizeTemplate(template) {
|
|
411
|
-
const tokens = [];
|
|
412
|
-
let lastIndex = 0;
|
|
413
|
-
const regex = new RegExp(EXPRESSION_PATTERN);
|
|
414
|
-
let match;
|
|
415
|
-
while ((match = regex.exec(template)) !== null) {
|
|
416
|
-
if (match.index > lastIndex) {
|
|
417
|
-
tokens.push({
|
|
418
|
-
type: 'text',
|
|
419
|
-
value: template.substring(lastIndex, match.index),
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
tokens.push({
|
|
423
|
-
type: 'expression',
|
|
424
|
-
value: match[1],
|
|
425
|
-
});
|
|
426
|
-
lastIndex = match.index + match[0].length;
|
|
427
|
-
}
|
|
428
|
-
if (lastIndex < template.length) {
|
|
429
|
-
tokens.push({
|
|
430
|
-
type: 'text',
|
|
431
|
-
value: template.substring(lastIndex),
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
|
-
return tokens;
|
|
435
|
-
}
|
|
436
|
-
exports.tokenizeTemplate = tokenizeTemplate;
|