Skip to content

Commit

Permalink
move all Cron code to packages/workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy committed Aug 16, 2022
1 parent bf75c88 commit 98a3054
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
4 changes: 3 additions & 1 deletion packages/cli/test/integration/shared/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { URL } from 'url';
import bodyParser from 'body-parser';
import { set } from 'lodash';
import { CronJob } from 'cron';
import { BinaryDataManager, TriggerTime, triggerToCronExpression, UserSettings } from 'n8n-core';
import { BinaryDataManager, UserSettings } from 'n8n-core';
import {
ICredentialType,
IDataObject,
Expand All @@ -21,6 +21,8 @@ import {
ITriggerResponse,
LoggerProxy,
NodeHelpers,
TriggerTime,
triggerToCronExpression,
} from 'n8n-workflow';

import config from '../../../config';
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/ActiveWorkflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ import {
ITriggerResponse,
IWorkflowExecuteAdditionalData,
LoggerProxy as Logger,
TriggerTime,
triggerToCronExpression,
Workflow,
WorkflowActivateMode,
WorkflowActivationError,
WorkflowExecuteMode,
} from 'n8n-workflow';

import { TriggerTime, triggerToCronExpression } from './Cron';
// eslint-disable-next-line import/no-cycle
import { IWorkflowData } from '.';

Expand Down
1 change: 0 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export * from './ActiveWebhooks';
export * from './BinaryDataManager';
export * from './Constants';
export * from './Credentials';
export * from './Cron';
export * from './Interfaces';
export * from './LoadNodeParameterOptions';
export * from './NodeExecuteFunctions';
Expand Down
11 changes: 9 additions & 2 deletions packages/nodes-base/nodes/Cron/Cron.node.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { ITriggerFunctions, TriggerTime, triggerToCronExpression } from 'n8n-core';
import { INodeType, INodeTypeDescription, ITriggerResponse, NodeHelpers } from 'n8n-workflow';
import { ITriggerFunctions } from 'n8n-core';
import {
INodeType,
INodeTypeDescription,
ITriggerResponse,
NodeHelpers,
TriggerTime,
triggerToCronExpression,
} from 'n8n-workflow';

import { CronJob } from 'cron';

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions packages/workflow/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as LoggerProxy from './LoggerProxy';
import * as NodeHelpers from './NodeHelpers';
import * as ObservableObject from './ObservableObject';

export * from './Cron';
export * from './DeferredPromise';
export * from './Interfaces';
export * from './Expression';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { triggerToCronExpression } from "../src"
import { triggerToCronExpression } from "../src/Cron"

describe('Cron', () => {
describe('triggerToCronExpression', () => {
Expand Down

0 comments on commit 98a3054

Please sign in to comment.