chore: Use ES modules for backend app
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"description": "The open source Zapier alternative. Build workflow automation without spending time and money.",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "ts-node-dev --watch 'src/graphql/schema.graphql' --exit-child src/server.ts",
|
||||
"dev": "nodemon --watch 'src/**/*.js' --exec 'node' src/server.js",
|
||||
"worker": "nodemon --watch 'src/**/*.js' --exec 'node' src/worker.js",
|
||||
"build": "tsc && yarn copy-statics",
|
||||
"build:watch": "nodemon --watch 'src/**/*.js' --watch 'bin/**/*.ts' --exec yarn build --ext ts",
|
||||
|
@@ -2,21 +2,21 @@ import createError from 'http-errors';
|
||||
import express from 'express';
|
||||
import cors from 'cors';
|
||||
|
||||
import appConfig from './config/app';
|
||||
import corsOptions from './config/cors-options';
|
||||
import morgan from './helpers/morgan';
|
||||
import * as Sentry from './helpers/sentry.ee';
|
||||
import appAssetsHandler from './helpers/app-assets-handler';
|
||||
import webUIHandler from './helpers/web-ui-handler';
|
||||
import errorHandler from './helpers/error-handler';
|
||||
import './config/orm';
|
||||
import appConfig from './config/app.js';
|
||||
import corsOptions from './config/cors-options.js';
|
||||
import morgan from './helpers/morgan.js';
|
||||
import * as Sentry from './helpers/sentry.ee.js';
|
||||
import appAssetsHandler from './helpers/app-assets-handler.js';
|
||||
import webUIHandler from './helpers/web-ui-handler.js';
|
||||
import errorHandler from './helpers/error-handler.js';
|
||||
import './config/orm.js';
|
||||
import {
|
||||
createBullBoardHandler,
|
||||
serverAdapter,
|
||||
} from './helpers/create-bull-board-handler';
|
||||
import injectBullBoardHandler from './helpers/inject-bull-board-handler';
|
||||
import router from './routes';
|
||||
import configurePassport from './helpers/passport';
|
||||
} from './helpers/create-bull-board-handler.js';
|
||||
import injectBullBoardHandler from './helpers/inject-bull-board-handler.js';
|
||||
import router from './routes/index.js';
|
||||
import configurePassport from './helpers/passport.js';
|
||||
|
||||
createBullBoardHandler(serverAdapter);
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import appConfig from './app';
|
||||
import appConfig from './app.js';
|
||||
|
||||
const corsOptions = {
|
||||
origin: appConfig.webAppUrl,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import crypto from 'crypto';
|
||||
import { serialize } from 'php-serialize';
|
||||
import Billing from '../../helpers/billing/index.ee';
|
||||
import appConfig from '../../config/app';
|
||||
import Billing from '../../helpers/billing/index.ee.js';
|
||||
import appConfig from '../../config/app.js';
|
||||
|
||||
export default async (request, response) => {
|
||||
if (!verifyWebhook(request)) {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import path from 'node:path';
|
||||
|
||||
import Connection from '../../models/connection';
|
||||
import logger from '../../helpers/logger';
|
||||
import handler from '../../helpers/webhook-handler';
|
||||
import Connection from '../../models/connection.js';
|
||||
import logger from '../../helpers/logger.js';
|
||||
import handler from '../../helpers/webhook-handler.js';
|
||||
|
||||
export default async (request, response) => {
|
||||
const computedRequestPayload = {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import Flow from '../../models/flow';
|
||||
import logger from '../../helpers/logger';
|
||||
import handler from '../../helpers/webhook-handler';
|
||||
import Flow from '../../models/flow.js';
|
||||
import logger from '../../helpers/logger.js';
|
||||
import handler from '../../helpers/webhook-handler.js';
|
||||
|
||||
export default async (request, response) => {
|
||||
const computedRequestPayload = {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import BaseError from './base';
|
||||
import BaseError from './base.js';
|
||||
|
||||
export default class QuotaExceededError extends BaseError {
|
||||
constructor(error = 'The allowed task quota has been exhausted!') {
|
||||
|
@@ -1,37 +1,37 @@
|
||||
import createAppAuthClient from './mutations/create-app-auth-client.ee';
|
||||
import createAppConfig from './mutations/create-app-config.ee';
|
||||
import createConnection from './mutations/create-connection';
|
||||
import createFlow from './mutations/create-flow';
|
||||
import createRole from './mutations/create-role.ee';
|
||||
import createStep from './mutations/create-step';
|
||||
import createUser from './mutations/create-user.ee';
|
||||
import deleteConnection from './mutations/delete-connection';
|
||||
import deleteCurrentUser from './mutations/delete-current-user.ee';
|
||||
import deleteFlow from './mutations/delete-flow';
|
||||
import deleteRole from './mutations/delete-role.ee';
|
||||
import deleteStep from './mutations/delete-step';
|
||||
import deleteUser from './mutations/delete-user.ee';
|
||||
import duplicateFlow from './mutations/duplicate-flow';
|
||||
import executeFlow from './mutations/execute-flow';
|
||||
import forgotPassword from './mutations/forgot-password.ee';
|
||||
import generateAuthUrl from './mutations/generate-auth-url';
|
||||
import login from './mutations/login';
|
||||
import registerUser from './mutations/register-user.ee';
|
||||
import resetConnection from './mutations/reset-connection';
|
||||
import resetPassword from './mutations/reset-password.ee';
|
||||
import updateAppAuthClient from './mutations/update-app-auth-client.ee';
|
||||
import updateAppConfig from './mutations/update-app-config.ee';
|
||||
import updateConfig from './mutations/update-config.ee';
|
||||
import updateConnection from './mutations/update-connection';
|
||||
import updateCurrentUser from './mutations/update-current-user';
|
||||
import updateFlow from './mutations/update-flow';
|
||||
import updateFlowStatus from './mutations/update-flow-status';
|
||||
import updateRole from './mutations/update-role.ee';
|
||||
import updateStep from './mutations/update-step';
|
||||
import updateUser from './mutations/update-user.ee';
|
||||
import upsertSamlAuthProvider from './mutations/upsert-saml-auth-provider.ee';
|
||||
import upsertSamlAuthProvidersRoleMappings from './mutations/upsert-saml-auth-providers-role-mappings.ee';
|
||||
import verifyConnection from './mutations/verify-connection';
|
||||
import createAppAuthClient from './mutations/create-app-auth-client.ee.js';
|
||||
import createAppConfig from './mutations/create-app-config.ee.js';
|
||||
import createConnection from './mutations/create-connection.js';
|
||||
import createFlow from './mutations/create-flow.js';
|
||||
import createRole from './mutations/create-role.ee.js';
|
||||
import createStep from './mutations/create-step.js';
|
||||
import createUser from './mutations/create-user.ee.js';
|
||||
import deleteConnection from './mutations/delete-connection.js';
|
||||
import deleteCurrentUser from './mutations/delete-current-user.ee.js';
|
||||
import deleteFlow from './mutations/delete-flow.js';
|
||||
import deleteRole from './mutations/delete-role.ee.js';
|
||||
import deleteStep from './mutations/delete-step.js';
|
||||
import deleteUser from './mutations/delete-user.ee.js';
|
||||
import duplicateFlow from './mutations/duplicate-flow.js';
|
||||
import executeFlow from './mutations/execute-flow.js';
|
||||
import forgotPassword from './mutations/forgot-password.ee.js';
|
||||
import generateAuthUrl from './mutations/generate-auth-url.js';
|
||||
import login from './mutations/login.js';
|
||||
import registerUser from './mutations/register-user.ee.js';
|
||||
import resetConnection from './mutations/reset-connection.js';
|
||||
import resetPassword from './mutations/reset-password.ee.js';
|
||||
import updateAppAuthClient from './mutations/update-app-auth-client.ee.js';
|
||||
import updateAppConfig from './mutations/update-app-config.ee.js';
|
||||
import updateConfig from './mutations/update-config.ee.js';
|
||||
import updateConnection from './mutations/update-connection.js';
|
||||
import updateCurrentUser from './mutations/update-current-user.js';
|
||||
import updateFlow from './mutations/update-flow.js';
|
||||
import updateFlowStatus from './mutations/update-flow-status.js';
|
||||
import updateRole from './mutations/update-role.ee.js';
|
||||
import updateStep from './mutations/update-step.js';
|
||||
import updateUser from './mutations/update-user.ee.js';
|
||||
import upsertSamlAuthProvider from './mutations/upsert-saml-auth-provider.ee.js';
|
||||
import upsertSamlAuthProvidersRoleMappings from './mutations/upsert-saml-auth-providers-role-mappings.ee.js';
|
||||
import verifyConnection from './mutations/verify-connection.js';
|
||||
|
||||
const mutationResolvers = {
|
||||
createAppAuthClient,
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import AppConfig from '../../models/app-config';
|
||||
import AppConfig from '../../models/app-config.js';
|
||||
|
||||
const createAppAuthClient = async (_parent, params, context) => {
|
||||
context.currentUser.can('update', 'App');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import App from '../../models/app';
|
||||
import AppConfig from '../../models/app-config';
|
||||
import App from '../../models/app.js';
|
||||
import AppConfig from '../../models/app-config.js';
|
||||
|
||||
const createAppConfig = async (_parent, params, context) => {
|
||||
context.currentUser.can('update', 'App');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import App from '../../models/app';
|
||||
import AppConfig from '../../models/app-config';
|
||||
import App from '../../models/app.js';
|
||||
import AppConfig from '../../models/app-config.js';
|
||||
|
||||
const createConnection = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'Connection');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import App from '../../models/app';
|
||||
import Step from '../../models/step';
|
||||
import App from '../../models/app.js';
|
||||
import Step from '../../models/step.js';
|
||||
|
||||
const createFlow = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'Flow');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import kebabCase from 'lodash/kebabCase';
|
||||
import Role from '../../models/role';
|
||||
import kebabCase from 'lodash/kebabCase.js';
|
||||
import Role from '../../models/role.js';
|
||||
|
||||
const createRole = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'Role');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import App from '../../models/app';
|
||||
import Flow from '../../models/flow';
|
||||
import App from '../../models/app.js';
|
||||
import Flow from '../../models/flow.js';
|
||||
|
||||
const createStep = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('update', 'Flow');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import User from '../../models/user';
|
||||
import Role from '../../models/role';
|
||||
import User from '../../models/user.js';
|
||||
import Role from '../../models/role.js';
|
||||
|
||||
const createUser = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'User');
|
||||
|
@@ -1,9 +1,9 @@
|
||||
import { Duration } from 'luxon';
|
||||
import deleteUserQueue from '../../queues/delete-user.ee';
|
||||
import flowQueue from '../../queues/flow';
|
||||
import Flow from '../../models/flow';
|
||||
import ExecutionStep from '../../models/execution-step';
|
||||
import appConfig from '../../config/app';
|
||||
import deleteUserQueue from '../../queues/delete-user.ee.js';
|
||||
import flowQueue from '../../queues/flow.js';
|
||||
import Flow from '../../models/flow.js';
|
||||
import ExecutionStep from '../../models/execution-step.js';
|
||||
import appConfig from '../../config/app.js';
|
||||
|
||||
const deleteCurrentUser = async (_parent, params, context) => {
|
||||
const id = context.currentUser.id;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import Flow from '../../models/flow';
|
||||
import ExecutionStep from '../../models/execution-step';
|
||||
import globalVariable from '../../helpers/global-variable';
|
||||
import logger from '../../helpers/logger';
|
||||
import Flow from '../../models/flow.js';
|
||||
import ExecutionStep from '../../models/execution-step.js';
|
||||
import globalVariable from '../../helpers/global-variable.js';
|
||||
import logger from '../../helpers/logger.js';
|
||||
|
||||
const deleteFlow = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('delete', 'Flow');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import Role from '../../models/role';
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee';
|
||||
import Role from '../../models/role.js';
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee.js';
|
||||
|
||||
const deleteRole = async (_parent, params, context) => {
|
||||
context.currentUser.can('delete', 'Role');
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { Duration } from 'luxon';
|
||||
import User from '../../models/user';
|
||||
import deleteUserQueue from '../../queues/delete-user.ee';
|
||||
import User from '../../models/user.js';
|
||||
import deleteUserQueue from '../../queues/delete-user.ee.js';
|
||||
|
||||
const deleteUser = async (_parent, params, context) => {
|
||||
context.currentUser.can('delete', 'User');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import testRun from '../../services/test-run';
|
||||
import Step from '../../models/step';
|
||||
import testRun from '../../services/test-run.js';
|
||||
import Step from '../../models/step.js';
|
||||
|
||||
const executeFlow = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('update', 'Flow');
|
||||
|
@@ -1,10 +1,10 @@
|
||||
import appConfig from '../../config/app';
|
||||
import User from '../../models/user';
|
||||
import emailQueue from '../../queues/email';
|
||||
import appConfig from '../../config/app.js';
|
||||
import User from '../../models/user.js';
|
||||
import emailQueue from '../../queues/email.js';
|
||||
import {
|
||||
REMOVE_AFTER_30_DAYS_OR_150_JOBS,
|
||||
REMOVE_AFTER_7_DAYS_OR_50_JOBS,
|
||||
} from '../../helpers/remove-job-configuration';
|
||||
} from '../../helpers/remove-job-configuration.js';
|
||||
|
||||
const forgotPassword = async (_parent, params) => {
|
||||
const { email } = params.input;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import globalVariable from '../../helpers/global-variable';
|
||||
import App from '../../models/app';
|
||||
import globalVariable from '../../helpers/global-variable.js';
|
||||
import App from '../../models/app.js';
|
||||
|
||||
const generateAuthUrl = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'Connection');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import User from '../../models/user';
|
||||
import createAuthTokenByUserId from '../../helpers/create-auth-token-by-user-id';
|
||||
import User from '../../models/user.js';
|
||||
import createAuthTokenByUserId from '../../helpers/create-auth-token-by-user-id.js';
|
||||
|
||||
const login = async (_parent, params) => {
|
||||
const user = await User.query().findOne({
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import User from '../../models/user';
|
||||
import Role from '../../models/role';
|
||||
import User from '../../models/user.js';
|
||||
import Role from '../../models/role.js';
|
||||
|
||||
const registerUser = async (_parent, params) => {
|
||||
const { fullName, email, password } = params.input;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import User from '../../models/user';
|
||||
import User from '../../models/user.js';
|
||||
|
||||
const resetPassword = async (_parent, params) => {
|
||||
const { token, password } = params.input;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import AppAuthClient from '../../models/app-auth-client';
|
||||
import AppAuthClient from '../../models/app-auth-client.js';
|
||||
|
||||
const updateAppAuthClient = async (_parent, params, context) => {
|
||||
context.currentUser.can('update', 'App');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import AppConfig from '../../models/app-config';
|
||||
import AppConfig from '../../models/app-config.js';
|
||||
|
||||
const updateAppConfig = async (_parent, params, context) => {
|
||||
context.currentUser.can('update', 'App');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Config from '../../models/config';
|
||||
import Config from '../../models/config.js';
|
||||
|
||||
const updateConfig = async (_parent, params, context) => {
|
||||
context.currentUser.can('update', 'Config');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import AppAuthClient from '../../models/app-auth-client';
|
||||
import AppAuthClient from '../../models/app-auth-client.js';
|
||||
|
||||
const updateConnection = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'Connection');
|
||||
|
@@ -1,10 +1,10 @@
|
||||
import Flow from '../../models/flow';
|
||||
import flowQueue from '../../queues/flow';
|
||||
import Flow from '../../models/flow.js';
|
||||
import flowQueue from '../../queues/flow.js';
|
||||
import {
|
||||
REMOVE_AFTER_30_DAYS_OR_150_JOBS,
|
||||
REMOVE_AFTER_7_DAYS_OR_50_JOBS,
|
||||
} from '../../helpers/remove-job-configuration';
|
||||
import globalVariable from '../../helpers/global-variable';
|
||||
} from '../../helpers/remove-job-configuration.js';
|
||||
import globalVariable from '../../helpers/global-variable.js';
|
||||
|
||||
const JOB_NAME = 'flow';
|
||||
const EVERY_15_MINUTES_CRON = '*/15 * * * *';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import Role from '../../models/role';
|
||||
import Permission from '../../models/permission';
|
||||
import permissionCatalog from '../../helpers/permission-catalog.ee';
|
||||
import Role from '../../models/role.js';
|
||||
import Permission from '../../models/permission.js';
|
||||
import permissionCatalog from '../../helpers/permission-catalog.ee.js';
|
||||
|
||||
const updateRole = async (_parent, params, context) => {
|
||||
context.currentUser.can('update', 'Role');
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import App from '../../models/app';
|
||||
import Step from '../../models/step';
|
||||
import Connection from '../../models/connection';
|
||||
import App from '../../models/app.js';
|
||||
import Step from '../../models/step.js';
|
||||
import Connection from '../../models/connection.js';
|
||||
|
||||
const updateStep = async (_parent, params, context) => {
|
||||
const { isCreator } = context.currentUser.can('update', 'Flow');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import User from '../../models/user';
|
||||
import User from '../../models/user.js';
|
||||
|
||||
const updateUser = async (_parent, params, context) => {
|
||||
context.currentUser.can('update', 'User');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee';
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee.js';
|
||||
|
||||
const upsertSamlAuthProvider = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'SamlAuthProvider');
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee';
|
||||
import SamlAuthProvidersRoleMapping from '../../models/saml-auth-providers-role-mapping.ee';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee.js';
|
||||
import SamlAuthProvidersRoleMapping from '../../models/saml-auth-providers-role-mapping.ee.js';
|
||||
import isEmpty from 'lodash/isEmpty.js';
|
||||
|
||||
const upsertSamlAuthProvidersRoleMappings = async (
|
||||
_parent,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import App from '../../models/app';
|
||||
import globalVariable from '../../helpers/global-variable';
|
||||
import App from '../../models/app.js';
|
||||
import globalVariable from '../../helpers/global-variable.js';
|
||||
|
||||
const verifyConnection = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'Connection');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import AppAuthClient from '../../models/app-auth-client';
|
||||
import AppAuthClient from '../../models/app-auth-client.js';
|
||||
|
||||
const getAppAuthClient = async (_parent, params, context) => {
|
||||
let canSeeAllClients = false;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import AppConfig from '../../models/app-config';
|
||||
import AppConfig from '../../models/app-config.js';
|
||||
|
||||
const getAppAuthClients = async (_parent, params, context) => {
|
||||
let canSeeAllClients = false;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import AppConfig from '../../models/app-config';
|
||||
import AppConfig from '../../models/app-config.js';
|
||||
|
||||
const getAppConfig = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'Connection');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import App from '../../models/app';
|
||||
import Connection from '../../models/connection';
|
||||
import App from '../../models/app.js';
|
||||
import Connection from '../../models/connection.js';
|
||||
|
||||
const getApp = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('read', 'Connection');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import App from '../../models/app';
|
||||
import App from '../../models/app.js';
|
||||
|
||||
const getApps = async (_parent, params) => {
|
||||
const apps = await App.findAll(params.name);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import appConfig from '../../config/app';
|
||||
import { getLicense } from '../../helpers/license.ee';
|
||||
import appConfig from '../../config/app.js';
|
||||
import { getLicense } from '../../helpers/license.ee.js';
|
||||
|
||||
const getAutomatischInfo = async () => {
|
||||
const license = await getLicense();
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { DateTime } from 'luxon';
|
||||
import Billing from '../../helpers/billing/index.ee';
|
||||
import ExecutionStep from '../../models/execution-step';
|
||||
import Billing from '../../helpers/billing/index.ee.js';
|
||||
import ExecutionStep from '../../models/execution-step.js';
|
||||
|
||||
const getBillingAndUsage = async (_parent, _params, context) => {
|
||||
const persistedSubscription = await context.currentUser.$relatedQuery(
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { hasValidLicense } from '../../helpers/license.ee';
|
||||
import Config from '../../models/config';
|
||||
import { hasValidLicense } from '../../helpers/license.ee.js';
|
||||
import Config from '../../models/config.js';
|
||||
|
||||
const getConfig = async (_parent, params) => {
|
||||
if (!(await hasValidLicense())) return {};
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import App from '../../models/app';
|
||||
import Flow from '../../models/flow';
|
||||
import Connection from '../../models/connection';
|
||||
import App from '../../models/app.js';
|
||||
import Flow from '../../models/flow.js';
|
||||
import Connection from '../../models/connection.js';
|
||||
|
||||
const getConnectedApps = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('read', 'Connection');
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import App from '../../models/app';
|
||||
import Step from '../../models/step';
|
||||
import ExecutionStep from '../../models/execution-step';
|
||||
import globalVariable from '../../helpers/global-variable';
|
||||
import computeParameters from '../../helpers/compute-parameters';
|
||||
import App from '../../models/app.js';
|
||||
import Step from '../../models/step.js';
|
||||
import ExecutionStep from '../../models/execution-step.js';
|
||||
import globalVariable from '../../helpers/global-variable.js';
|
||||
import computeParameters from '../../helpers/compute-parameters.js';
|
||||
|
||||
const getDynamicData = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('update', 'Flow');
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import App from '../../models/app';
|
||||
import Step from '../../models/step';
|
||||
import globalVariable from '../../helpers/global-variable';
|
||||
import App from '../../models/app.js';
|
||||
import Step from '../../models/step.js';
|
||||
import globalVariable from '../../helpers/global-variable.js';
|
||||
|
||||
const getDynamicFields = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('update', 'Flow');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import paginate from '../../helpers/pagination';
|
||||
import Execution from '../../models/execution';
|
||||
import paginate from '../../helpers/pagination.js';
|
||||
import Execution from '../../models/execution.js';
|
||||
|
||||
const getExecutionSteps = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('read', 'Execution');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Execution from '../../models/execution';
|
||||
import Execution from '../../models/execution.js';
|
||||
|
||||
const getExecution = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('read', 'Execution');
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { raw } from 'objection';
|
||||
import { DateTime } from 'luxon';
|
||||
import Execution from '../../models/execution';
|
||||
import paginate from '../../helpers/pagination';
|
||||
import Execution from '../../models/execution.js';
|
||||
import paginate from '../../helpers/pagination.js';
|
||||
|
||||
const getExecutions = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('read', 'Execution');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Flow from '../../models/flow';
|
||||
import Flow from '../../models/flow.js';
|
||||
|
||||
const getFlow = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('read', 'Flow');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import Flow from '../../models/flow';
|
||||
import paginate from '../../helpers/pagination';
|
||||
import Flow from '../../models/flow.js';
|
||||
import paginate from '../../helpers/pagination.js';
|
||||
|
||||
const getFlows = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('read', 'Flow');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Billing from '../../helpers/billing/index.ee';
|
||||
import Billing from '../../helpers/billing/index.ee.js';
|
||||
|
||||
const getInvoices = async (_parent, _params, context) => {
|
||||
const subscription = await context.currentUser.$relatedQuery(
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import axios from '../../helpers/axios-with-proxy';
|
||||
import axios from '../../helpers/axios-with-proxy.js';
|
||||
|
||||
const NOTIFICATIONS_URL = 'https://notifications.automatisch.io/notifications.json';
|
||||
const NOTIFICATIONS_URL =
|
||||
'https://notifications.automatisch.io/notifications.json';
|
||||
|
||||
const getNotifications = async () => {
|
||||
try {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import appConfig from '../../config/app';
|
||||
import Billing from '../../helpers/billing/index.ee';
|
||||
import appConfig from '../../config/app.js';
|
||||
import Billing from '../../helpers/billing/index.ee.js';
|
||||
|
||||
const getPaddleInfo = async () => {
|
||||
if (!appConfig.isCloud) return;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import appConfig from '../../config/app';
|
||||
import Billing from '../../helpers/billing/index.ee';
|
||||
import appConfig from '../../config/app.js';
|
||||
import Billing from '../../helpers/billing/index.ee.js';
|
||||
|
||||
const getPaymentPlans = async () => {
|
||||
if (!appConfig.isCloud) return;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import permissionCatalog from '../../helpers/permission-catalog.ee';
|
||||
import permissionCatalog from '../../helpers/permission-catalog.ee.js';
|
||||
|
||||
const getPermissionCatalog = async () => {
|
||||
return permissionCatalog;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Role from '../../models/role';
|
||||
import Role from '../../models/role.js';
|
||||
|
||||
const getRole = async (_parent, params, context) => {
|
||||
context.currentUser.can('read', 'Role');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Role from '../../models/role';
|
||||
import Role from '../../models/role.js';
|
||||
|
||||
const getRoles = async (_parent, params, context) => {
|
||||
context.currentUser.can('read', 'Role');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee';
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee.js';
|
||||
|
||||
const getSamlAuthProviderRoleMappings = async (_parent, params, context) => {
|
||||
context.currentUser.can('read', 'SamlAuthProvider');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee';
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee.js';
|
||||
|
||||
const getSamlAuthProvider = async (_parent, params, context) => {
|
||||
context.currentUser.can('read', 'SamlAuthProvider');
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { ref } from 'objection';
|
||||
import ExecutionStep from '../../models/execution-step';
|
||||
import Step from '../../models/step';
|
||||
import ExecutionStep from '../../models/execution-step.js';
|
||||
import Step from '../../models/step.js';
|
||||
|
||||
const getStepWithTestExecutions = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('update', 'Flow');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import appConfig from '../../config/app';
|
||||
import appConfig from '../../config/app.js';
|
||||
|
||||
const getSubscriptionStatus = async (_parent, _params, context) => {
|
||||
if (!appConfig.isCloud) return;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import appConfig from '../../config/app';
|
||||
import appConfig from '../../config/app.js';
|
||||
|
||||
const getTrialStatus = async (_parent, _params, context) => {
|
||||
if (!appConfig.isCloud) return;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import User from '../../models/user';
|
||||
import User from '../../models/user.js';
|
||||
|
||||
const getUser = async (_parent, params, context) => {
|
||||
context.currentUser.can('read', 'User');
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import paginate from '../../helpers/pagination';
|
||||
import User from '../../models/user';
|
||||
import paginate from '../../helpers/pagination.js';
|
||||
import User from '../../models/user.js';
|
||||
|
||||
const getUsers = async (_parent, params, context) => {
|
||||
context.currentUser.can('read', 'User');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import appConfig from '../../config/app';
|
||||
import appConfig from '../../config/app.js';
|
||||
|
||||
const healthcheck = () => {
|
||||
return {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee';
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee.js';
|
||||
|
||||
const listSamlAuthProviders = async () => {
|
||||
const providers = await SamlAuthProvider.query().where({ active: true });
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import App from '../../models/app';
|
||||
import Connection from '../../models/connection';
|
||||
import globalVariable from '../../helpers/global-variable';
|
||||
import App from '../../models/app.js';
|
||||
import Connection from '../../models/connection.js';
|
||||
import globalVariable from '../../helpers/global-variable.js';
|
||||
|
||||
const testConnection = async (_parent, params, context) => {
|
||||
const conditions = context.currentUser.can('update', 'Connection');
|
||||
|
@@ -1,37 +1,37 @@
|
||||
import getApp from './queries/get-app';
|
||||
import getAppAuthClient from './queries/get-app-auth-client.ee';
|
||||
import getAppAuthClients from './queries/get-app-auth-clients.ee';
|
||||
import getAppConfig from './queries/get-app-config.ee';
|
||||
import getApps from './queries/get-apps';
|
||||
import getAutomatischInfo from './queries/get-automatisch-info';
|
||||
import getBillingAndUsage from './queries/get-billing-and-usage.ee';
|
||||
import getConfig from './queries/get-config.ee';
|
||||
import getConnectedApps from './queries/get-connected-apps';
|
||||
import getCurrentUser from './queries/get-current-user';
|
||||
import getDynamicData from './queries/get-dynamic-data';
|
||||
import getDynamicFields from './queries/get-dynamic-fields';
|
||||
import getExecution from './queries/get-execution';
|
||||
import getExecutionSteps from './queries/get-execution-steps';
|
||||
import getExecutions from './queries/get-executions';
|
||||
import getFlow from './queries/get-flow';
|
||||
import getFlows from './queries/get-flows';
|
||||
import getInvoices from './queries/get-invoices.ee';
|
||||
import getNotifications from './queries/get-notifications';
|
||||
import getPaddleInfo from './queries/get-paddle-info.ee';
|
||||
import getPaymentPlans from './queries/get-payment-plans.ee';
|
||||
import getPermissionCatalog from './queries/get-permission-catalog.ee';
|
||||
import getRole from './queries/get-role.ee';
|
||||
import getRoles from './queries/get-roles.ee';
|
||||
import getSamlAuthProviderRoleMappings from './queries/get-saml-auth-provider-role-mappings.ee';
|
||||
import getSamlAuthProvider from './queries/get-saml-auth-provider.ee';
|
||||
import getStepWithTestExecutions from './queries/get-step-with-test-executions';
|
||||
import getSubscriptionStatus from './queries/get-subscription-status.ee';
|
||||
import getTrialStatus from './queries/get-trial-status.ee';
|
||||
import getUser from './queries/get-user';
|
||||
import getUsers from './queries/get-users';
|
||||
import healthcheck from './queries/healthcheck';
|
||||
import listSamlAuthProviders from './queries/list-saml-auth-providers.ee';
|
||||
import testConnection from './queries/test-connection';
|
||||
import getApp from './queries/get-app.js';
|
||||
import getAppAuthClient from './queries/get-app-auth-client.ee.js';
|
||||
import getAppAuthClients from './queries/get-app-auth-clients.ee.js';
|
||||
import getAppConfig from './queries/get-app-config.ee.js';
|
||||
import getApps from './queries/get-apps.js';
|
||||
import getAutomatischInfo from './queries/get-automatisch-info.js';
|
||||
import getBillingAndUsage from './queries/get-billing-and-usage.ee.js';
|
||||
import getConfig from './queries/get-config.ee.js';
|
||||
import getConnectedApps from './queries/get-connected-apps.js';
|
||||
import getCurrentUser from './queries/get-current-user.js';
|
||||
import getDynamicData from './queries/get-dynamic-data.js';
|
||||
import getDynamicFields from './queries/get-dynamic-fields.js';
|
||||
import getExecution from './queries/get-execution.js';
|
||||
import getExecutionSteps from './queries/get-execution-steps.js';
|
||||
import getExecutions from './queries/get-executions.js';
|
||||
import getFlow from './queries/get-flow.js';
|
||||
import getFlows from './queries/get-flows.js';
|
||||
import getInvoices from './queries/get-invoices.ee.js';
|
||||
import getNotifications from './queries/get-notifications.js';
|
||||
import getPaddleInfo from './queries/get-paddle-info.ee.js';
|
||||
import getPaymentPlans from './queries/get-payment-plans.ee.js';
|
||||
import getPermissionCatalog from './queries/get-permission-catalog.ee.js';
|
||||
import getRole from './queries/get-role.ee.js';
|
||||
import getRoles from './queries/get-roles.ee.js';
|
||||
import getSamlAuthProviderRoleMappings from './queries/get-saml-auth-provider-role-mappings.ee.js';
|
||||
import getSamlAuthProvider from './queries/get-saml-auth-provider.ee.js';
|
||||
import getStepWithTestExecutions from './queries/get-step-with-test-executions.js';
|
||||
import getSubscriptionStatus from './queries/get-subscription-status.ee.js';
|
||||
import getTrialStatus from './queries/get-trial-status.ee.js';
|
||||
import getUser from './queries/get-user.js';
|
||||
import getUsers from './queries/get-users.js';
|
||||
import healthcheck from './queries/healthcheck.js';
|
||||
import listSamlAuthProviders from './queries/list-saml-auth-providers.ee.js';
|
||||
import testConnection from './queries/test-connection.js';
|
||||
|
||||
const queryResolvers = {
|
||||
getApp,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import mutationResolvers from './mutation-resolvers';
|
||||
import queryResolvers from './query-resolvers';
|
||||
import mutationResolvers from './mutation-resolvers.js';
|
||||
import queryResolvers from './query-resolvers.js';
|
||||
|
||||
const resolvers = {
|
||||
Query: queryResolvers,
|
||||
|
@@ -1,4 +1,8 @@
|
||||
import express from 'express';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
const appAssetsHandler = async (app) => {
|
||||
app.use('/apps/:appKey/assets/favicon.svg', (req, res, next) => {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { allow, rule, shield } from 'graphql-shield';
|
||||
import jwt from 'jsonwebtoken';
|
||||
import appConfig from '../config/app';
|
||||
import User from '../models/user';
|
||||
import appConfig from '../config/app.js';
|
||||
import User from '../models/user.js';
|
||||
|
||||
const isAuthenticated = rule()(async (_parent, _args, req) => {
|
||||
const token = req.headers['authorization'];
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import appConfig from '../../config/app';
|
||||
import paddleClient from './paddle.ee';
|
||||
import paddlePlans from './plans.ee';
|
||||
import webhooks from './webhooks.ee';
|
||||
import appConfig from '../../config/app.js';
|
||||
import paddleClient from './paddle.ee.js';
|
||||
import paddlePlans from './plans.ee.js';
|
||||
import webhooks from './webhooks.ee.js';
|
||||
|
||||
const paddleInfo = {
|
||||
sandbox: appConfig.isProd ? false : true,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
// TODO: replace with axios-with-proxy when needed
|
||||
import axios from 'axios';
|
||||
import appConfig from '../../config/app';
|
||||
import appConfig from '../../config/app.js';
|
||||
import { DateTime } from 'luxon';
|
||||
|
||||
const PADDLE_VENDOR_URL = appConfig.isDev
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import Subscription from '../../models/subscription.ee';
|
||||
import Billing from './index.ee';
|
||||
import Subscription from '../../models/subscription.ee.js';
|
||||
import Billing from './index.ee.js';
|
||||
|
||||
const handleSubscriptionCreated = async (request) => {
|
||||
const subscription = await Subscription.query().insertAndFetch(
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import jwt from 'jsonwebtoken';
|
||||
import appConfig from '../config/app';
|
||||
import appConfig from '../config/app.js';
|
||||
|
||||
const TOKEN_EXPIRES_IN = '14d';
|
||||
|
||||
|
@@ -1,13 +1,13 @@
|
||||
import { ExpressAdapter } from '@bull-board/express';
|
||||
import { createBullBoard } from '@bull-board/api';
|
||||
import { BullMQAdapter } from '@bull-board/api/bullMQAdapter';
|
||||
import flowQueue from '../queues/flow';
|
||||
import triggerQueue from '../queues/trigger';
|
||||
import actionQueue from '../queues/action';
|
||||
import emailQueue from '../queues/email';
|
||||
import deleteUserQueue from '../queues/delete-user.ee';
|
||||
import removeCancelledSubscriptionsQueue from '../queues/remove-cancelled-subscriptions.ee';
|
||||
import appConfig from '../config/app';
|
||||
import { BullMQAdapter } from '@bull-board/api/bullMQAdapter.js';
|
||||
import flowQueue from '../queues/flow.js';
|
||||
import triggerQueue from '../queues/trigger.js';
|
||||
import actionQueue from '../queues/action.js';
|
||||
import emailQueue from '../queues/email.js';
|
||||
import deleteUserQueue from '../queues/delete-user.ee.js';
|
||||
import removeCancelledSubscriptionsQueue from '../queues/remove-cancelled-subscriptions.ee.js';
|
||||
import appConfig from '../config/app.js';
|
||||
|
||||
const serverAdapter = new ExpressAdapter();
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import logger from './logger';
|
||||
import logger from './logger.js';
|
||||
|
||||
// Do not remove `next` argument as the function signature will not fit for an error handler middleware
|
||||
const errorHandler = (err, req, res, next) => {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import User from '../models/user';
|
||||
import Identity from '../models/identity.ee';
|
||||
import User from '../models/user.js';
|
||||
import Identity from '../models/identity.ee.js';
|
||||
|
||||
const getUser = (user, providerConfig) => ({
|
||||
name: user[providerConfig.firstnameAttributeName],
|
||||
|
@@ -1,16 +1,19 @@
|
||||
import { join } from 'node:path';
|
||||
import path, { join } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { graphqlHTTP } from 'express-graphql';
|
||||
import { loadSchemaSync } from '@graphql-tools/load';
|
||||
import { GraphQLFileLoader } from '@graphql-tools/graphql-file-loader';
|
||||
import { addResolversToSchema } from '@graphql-tools/schema';
|
||||
import { applyMiddleware } from 'graphql-middleware';
|
||||
|
||||
import appConfig from '../config/app';
|
||||
import logger from './logger';
|
||||
import authentication from './authentication';
|
||||
import * as Sentry from './sentry.ee';
|
||||
import resolvers from '../graphql/resolvers';
|
||||
import HttpError from '../errors/http';
|
||||
import appConfig from '../config/app.js';
|
||||
import logger from './logger.js';
|
||||
import authentication from './authentication.js';
|
||||
import * as Sentry from './sentry.ee.js';
|
||||
import resolvers from '../graphql/resolvers.js';
|
||||
import HttpError from '../errors/http.js';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
const schema = loadSchemaSync(join(__dirname, '../graphql/schema.graphql'), {
|
||||
loaders: [new GraphQLFileLoader()],
|
||||
@@ -22,7 +25,10 @@ const schemaWithResolvers = addResolversToSchema({
|
||||
});
|
||||
|
||||
const graphQLInstance = graphqlHTTP({
|
||||
schema: applyMiddleware(schemaWithResolvers, authentication),
|
||||
schema: applyMiddleware(
|
||||
schemaWithResolvers,
|
||||
authentication.generate(schemaWithResolvers)
|
||||
),
|
||||
graphiql: appConfig.isDev,
|
||||
customFormatErrorFn: (error) => {
|
||||
logger.error(error.path + ' : ' + error.message + '\n' + error.stack);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import basicAuth from 'express-basic-auth';
|
||||
import appConfig from '../config/app';
|
||||
import appConfig from '../config/app.js';
|
||||
|
||||
const injectBullBoardHandler = async (app, serverAdapter) => {
|
||||
if (
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import morgan from 'morgan';
|
||||
import logger from './logger';
|
||||
import logger from './logger.js';
|
||||
|
||||
const stream = {
|
||||
write: (message) =>
|
||||
|
@@ -2,10 +2,10 @@ import { URL } from 'node:url';
|
||||
import { MultiSamlStrategy } from '@node-saml/passport-saml';
|
||||
import passport from 'passport';
|
||||
|
||||
import appConfig from '../config/app';
|
||||
import createAuthTokenByUserId from './create-auth-token-by-user-id';
|
||||
import SamlAuthProvider from '../models/saml-auth-provider.ee';
|
||||
import findOrCreateUserBySamlIdentity from './find-or-create-user-by-saml-identity.ee';
|
||||
import appConfig from '../config/app.js';
|
||||
import createAuthTokenByUserId from './create-auth-token-by-user-id.js';
|
||||
import SamlAuthProvider from '../models/saml-auth-provider.ee.js';
|
||||
import findOrCreateUserBySamlIdentity from './find-or-create-user-by-saml-identity.ee.js';
|
||||
|
||||
export default function configurePassport(app) {
|
||||
app.use(
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import express from 'express';
|
||||
import { dirname, join } from 'path';
|
||||
import appConfig from '../config/app';
|
||||
import appConfig from '../config/app.js';
|
||||
|
||||
const webUIHandler = async (app) => {
|
||||
if (appConfig.serveWebAppSeparately) return;
|
||||
|
@@ -1,14 +1,14 @@
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import isEmpty from 'lodash/isEmpty.js';
|
||||
|
||||
import Flow from '../models/flow';
|
||||
import { processTrigger } from '../services/trigger';
|
||||
import triggerQueue from '../queues/trigger';
|
||||
import globalVariable from './global-variable';
|
||||
import QuotaExceededError from '../errors/quote-exceeded';
|
||||
import Flow from '../models/flow.js';
|
||||
import { processTrigger } from '../services/trigger.js';
|
||||
import triggerQueue from '../queues/trigger.js';
|
||||
import globalVariable from './global-variable.js';
|
||||
import QuotaExceededError from '../errors/quote-exceeded.js';
|
||||
import {
|
||||
REMOVE_AFTER_30_DAYS_OR_150_JOBS,
|
||||
REMOVE_AFTER_7_DAYS_OR_50_JOBS,
|
||||
} from './remove-job-configuration';
|
||||
} from './remove-job-configuration.js';
|
||||
|
||||
export default async (flowId, request, response) => {
|
||||
const flow = await Flow.query().findById(flowId).throwIfNotFound();
|
||||
|
@@ -47,7 +47,7 @@ class AppAuthClient extends Base {
|
||||
if (!this.eligibleForDecryption()) return;
|
||||
|
||||
this.formattedAuthDefaults = JSON.parse(
|
||||
AES.decrypt(this.authDefaults, appConfig.encryptionKey).toString(enc.Utf8)
|
||||
AES.decrypt(this.authDefaults, appConfig.encryptionKey).toString(enc)
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import Base from './base';
|
||||
import Base from './base.js';
|
||||
|
||||
class Config extends Base {
|
||||
static tableName = 'config';
|
||||
|
@@ -109,7 +109,7 @@ class Connection extends Base {
|
||||
if (!this.eligibleForDecryption()) return;
|
||||
|
||||
this.formattedData = JSON.parse(
|
||||
AES.decrypt(this.data, appConfig.encryptionKey).toString(enc.Utf8)
|
||||
AES.decrypt(this.data, appConfig.encryptionKey).toString(enc)
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import process from 'process';
|
||||
import { Queue } from 'bullmq';
|
||||
import redisConfig from '../config/redis';
|
||||
import logger from '../helpers/logger';
|
||||
import redisConfig from '../config/redis.js';
|
||||
import logger from '../helpers/logger.js';
|
||||
|
||||
const CONNECTION_REFUSED = 'ECONNREFUSED';
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import process from 'process';
|
||||
import { Queue } from 'bullmq';
|
||||
import redisConfig from '../config/redis';
|
||||
import logger from '../helpers/logger';
|
||||
import redisConfig from '../config/redis.js';
|
||||
import logger from '../helpers/logger.js';
|
||||
|
||||
const CONNECTION_REFUSED = 'ECONNREFUSED';
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import process from 'process';
|
||||
import { Queue } from 'bullmq';
|
||||
import redisConfig from '../config/redis';
|
||||
import logger from '../helpers/logger';
|
||||
import redisConfig from '../config/redis.js';
|
||||
import logger from '../helpers/logger.js';
|
||||
|
||||
const CONNECTION_REFUSED = 'ECONNREFUSED';
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Router } from 'express';
|
||||
import graphQLInstance from '../helpers/graphql-instance';
|
||||
import webhooksRouter from './webhooks';
|
||||
import paddleRouter from './paddle.ee';
|
||||
import graphQLInstance from '../helpers/graphql-instance.js';
|
||||
import webhooksRouter from './webhooks.js';
|
||||
import paddleRouter from './paddle.ee.js';
|
||||
|
||||
const router = Router();
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Router } from 'express';
|
||||
import webhooksHandler from '../controllers/paddle/webhooks.ee';
|
||||
import webhooksHandler from '../controllers/paddle/webhooks.ee.js';
|
||||
|
||||
const router = Router();
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
import express, { Router } from 'express';
|
||||
import multer from 'multer';
|
||||
|
||||
import appConfig from '../config/app';
|
||||
import webhookHandlerByFlowId from '../controllers/webhooks/handler-by-flow-id';
|
||||
import webhookHandlerByConnectionIdAndRefValue from '../controllers/webhooks/handler-by-connection-id-and-ref-value';
|
||||
import appConfig from '../config/app.js';
|
||||
import webhookHandlerByFlowId from '../controllers/webhooks/handler-by-flow-id.js';
|
||||
import webhookHandlerByConnectionIdAndRefValue from '../controllers/webhooks/handler-by-connection-id-and-ref-value.js';
|
||||
|
||||
const router = Router();
|
||||
const upload = multer();
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import app from './app';
|
||||
import appConfig from './config/app';
|
||||
import logger from './helpers/logger';
|
||||
import telemetry from './helpers/telemetry';
|
||||
import app from './app.js';
|
||||
import appConfig from './config/app.js';
|
||||
import logger from './helpers/logger.js';
|
||||
import telemetry from './helpers/telemetry/index.js';
|
||||
|
||||
telemetry.setServiceType('main');
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import Step from '../models/step';
|
||||
import { processFlow } from './flow';
|
||||
import { processTrigger } from './trigger';
|
||||
import { processAction } from './action';
|
||||
import Step from '../models/step.js';
|
||||
import { processFlow } from './flow.js';
|
||||
import { processTrigger } from './trigger.js';
|
||||
import { processAction } from './action.js';
|
||||
|
||||
const testRun = async (options) => {
|
||||
const untilStep = await Step.query()
|
||||
|
Reference in New Issue
Block a user