n8n-nodes-base 2.34.0 → 2.34.1
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/cjs/build.tsbuildinfo +1 -1
- package/dist/node-definitions/.nodes-hash +1 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/googleAnalytics/v2/resource_report/operation_get.ts +2 -2
- package/dist/node-definitions/nodes/n8n-nodes-base/graphql/v1.schema.js +1 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/graphql/v1.ts +1 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/graphql/v11.schema.js +1 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/graphql/v11.ts +1 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/microsoftOutlook/v2/resource_event/operation_create.ts +2 -2
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v1/resource_document/operation_aggregate.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v1/resource_document/operation_aggregate.ts +8 -2
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v1/resource_document/operation_delete.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v1/resource_document/operation_delete.ts +8 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v1/resource_document/operation_find.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v1/resource_document/operation_find.ts +8 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v11/resource_document/operation_aggregate.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v11/resource_document/operation_aggregate.ts +8 -2
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v11/resource_document/operation_delete.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v11/resource_document/operation_delete.ts +8 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v11/resource_document/operation_find.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v11/resource_document/operation_find.ts +8 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v12/resource_document/operation_aggregate.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v12/resource_document/operation_aggregate.ts +8 -2
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v12/resource_document/operation_delete.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v12/resource_document/operation_delete.ts +8 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v12/resource_document/operation_find.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v12/resource_document/operation_find.ts +8 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v13/resource_document/operation_aggregate.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v13/resource_document/operation_aggregate.ts +8 -2
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v13/resource_document/operation_delete.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v13/resource_document/operation_delete.ts +8 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v13/resource_document/operation_find.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v13/resource_document/operation_find.ts +8 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v14/resource_document/operation_aggregate.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v14/resource_document/operation_aggregate.ts +8 -2
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v14/resource_document/operation_delete.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v14/resource_document/operation_delete.ts +8 -1
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v14/resource_document/operation_find.schema.js +1 -0
- package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v14/resource_document/operation_find.ts +8 -1
- package/dist/nodes/EditImage/EditImage.node.d.ts.map +1 -1
- package/dist/nodes/EditImage/EditImage.node.js +45 -3
- package/dist/nodes/EditImage/EditImage.node.js.map +1 -1
- package/dist/nodes/Filter/V1/GenericFunctions.d.ts +1 -0
- package/dist/nodes/Filter/V1/GenericFunctions.d.ts.map +1 -1
- package/dist/nodes/Filter/V1/GenericFunctions.js +7 -28
- package/dist/nodes/Filter/V1/GenericFunctions.js.map +1 -1
- package/dist/nodes/Form/utils/formCompletionUtils.d.ts.map +1 -1
- package/dist/nodes/Form/utils/formCompletionUtils.js +3 -1
- package/dist/nodes/Form/utils/formCompletionUtils.js.map +1 -1
- package/dist/nodes/Git/Git.node.d.ts.map +1 -1
- package/dist/nodes/Git/Git.node.js +28 -4
- package/dist/nodes/Git/Git.node.js.map +1 -1
- package/dist/nodes/GraphQL/GraphQL.node.d.ts.map +1 -1
- package/dist/nodes/GraphQL/GraphQL.node.js +31 -45
- package/dist/nodes/GraphQL/GraphQL.node.js.map +1 -1
- package/dist/nodes/HttpRequest/V1/HttpRequestV1.node.d.ts.map +1 -1
- package/dist/nodes/HttpRequest/V1/HttpRequestV1.node.js +19 -21
- package/dist/nodes/HttpRequest/V1/HttpRequestV1.node.js.map +1 -1
- package/dist/nodes/If/V1/IfV1.node.d.ts +2 -1
- package/dist/nodes/If/V1/IfV1.node.d.ts.map +1 -1
- package/dist/nodes/If/V1/IfV1.node.js +7 -28
- package/dist/nodes/If/V1/IfV1.node.js.map +1 -1
- package/dist/nodes/KoBoToolbox/GenericFunctions.d.ts.map +1 -1
- package/dist/nodes/KoBoToolbox/GenericFunctions.js +1 -2
- package/dist/nodes/KoBoToolbox/GenericFunctions.js.map +1 -1
- package/dist/nodes/Microsoft/Sql/GenericFunctions.d.ts.map +1 -1
- package/dist/nodes/Microsoft/Sql/GenericFunctions.js +3 -3
- package/dist/nodes/Microsoft/Sql/GenericFunctions.js.map +1 -1
- package/dist/nodes/MongoDb/GenericFunctions.d.ts +1 -0
- package/dist/nodes/MongoDb/GenericFunctions.d.ts.map +1 -1
- package/dist/nodes/MongoDb/GenericFunctions.js +76 -8
- package/dist/nodes/MongoDb/GenericFunctions.js.map +1 -1
- package/dist/nodes/MongoDb/MongoDb.node.d.ts.map +1 -1
- package/dist/nodes/MongoDb/MongoDb.node.js +4 -3
- package/dist/nodes/MongoDb/MongoDb.node.js.map +1 -1
- package/dist/nodes/MongoDb/MongoDbProperties.d.ts.map +1 -1
- package/dist/nodes/MongoDb/MongoDbProperties.js +28 -7
- package/dist/nodes/MongoDb/MongoDbProperties.js.map +1 -1
- package/dist/nodes/Notion/shared/GenericFunctions.d.ts.map +1 -1
- package/dist/nodes/Notion/shared/GenericFunctions.js +1 -2
- package/dist/nodes/Notion/shared/GenericFunctions.js.map +1 -1
- package/dist/nodes/Oracle/Sql/helpers/utils.d.ts.map +1 -1
- package/dist/nodes/Oracle/Sql/helpers/utils.js +1 -3
- package/dist/nodes/Oracle/Sql/helpers/utils.js.map +1 -1
- package/dist/nodes/RenameKeys/RenameKeys.node.d.ts.map +1 -1
- package/dist/nodes/RenameKeys/RenameKeys.node.js +2 -3
- package/dist/nodes/RenameKeys/RenameKeys.node.js.map +1 -1
- package/dist/nodes/Snowflake/GenericFunctions.d.ts +3 -2
- package/dist/nodes/Snowflake/GenericFunctions.d.ts.map +1 -1
- package/dist/nodes/Snowflake/GenericFunctions.js +30 -2
- package/dist/nodes/Snowflake/GenericFunctions.js.map +1 -1
- package/dist/nodes/Snowflake/Snowflake.node.js +4 -4
- package/dist/nodes/Snowflake/Snowflake.node.js.map +1 -1
- package/dist/nodes/Supabase/GenericFunctions.d.ts +3 -7
- package/dist/nodes/Supabase/GenericFunctions.d.ts.map +1 -1
- package/dist/nodes/Supabase/GenericFunctions.js +38 -16
- package/dist/nodes/Supabase/GenericFunctions.js.map +1 -1
- package/dist/nodes/Supabase/Supabase.node.js +6 -6
- package/dist/nodes/Supabase/Supabase.node.js.map +1 -1
- package/dist/nodes/Switch/V1/SwitchV1.node.d.ts +2 -1
- package/dist/nodes/Switch/V1/SwitchV1.node.d.ts.map +1 -1
- package/dist/nodes/Switch/V1/SwitchV1.node.js +7 -28
- package/dist/nodes/Switch/V1/SwitchV1.node.js.map +1 -1
- package/dist/nodes/Switch/V2/SwitchV2.node.d.ts +2 -1
- package/dist/nodes/Switch/V2/SwitchV2.node.d.ts.map +1 -1
- package/dist/nodes/Switch/V2/SwitchV2.node.js +7 -28
- package/dist/nodes/Switch/V2/SwitchV2.node.js.map +1 -1
- package/dist/types/nodes.json +4 -4
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2363a8ffe98efbb0ec9bc4ab7d5f4d594a6746e7f15b8401ab85f240cf739652
|
|
@@ -34,13 +34,13 @@ export type GoogleAnalyticsV2ReportGetParams = {
|
|
|
34
34
|
/**
|
|
35
35
|
* Start
|
|
36
36
|
* @displayOptions.show { dateRange: ["custom"], propertyType: ["ga4"] }
|
|
37
|
-
* @default 2026-07-
|
|
37
|
+
* @default 2026-07-28T00:00:00.000+00:00
|
|
38
38
|
*/
|
|
39
39
|
startDate?: string | Expression<string>;
|
|
40
40
|
/**
|
|
41
41
|
* End
|
|
42
42
|
* @displayOptions.show { dateRange: ["custom"], propertyType: ["ga4"] }
|
|
43
|
-
* @default 2026-08-
|
|
43
|
+
* @default 2026-08-04T00:00:00.000+00:00
|
|
44
44
|
*/
|
|
45
45
|
endDate?: string | Expression<string>;
|
|
46
46
|
/**
|
|
@@ -14,7 +14,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
14
14
|
|
|
15
15
|
// Parameters schema
|
|
16
16
|
const parametersSchema = z.object({
|
|
17
|
-
authentication: z.union([z.literal('basicAuth'), z.literal('customAuth'), z.literal('digestAuth'), z.literal('headerAuth'), z.literal('none'), z.literal('oAuth1'), z.literal('oAuth2'), z.literal('queryAuth')
|
|
17
|
+
authentication: z.union([z.literal('basicAuth'), z.literal('customAuth'), z.literal('digestAuth'), z.literal('headerAuth'), z.literal('none'), z.literal('oAuth1'), z.literal('oAuth2'), z.literal('queryAuth')]).optional(),
|
|
18
18
|
requestMethod: z.union([z.literal('GET'), z.literal('POST'), expressionSchema]).optional(),
|
|
19
19
|
endpoint: stringOrExpression,
|
|
20
20
|
allowUnauthorizedCerts: booleanOrExpression.optional(),
|
|
@@ -9,7 +9,7 @@ export interface GraphqlV1Params {
|
|
|
9
9
|
* The way to authenticate
|
|
10
10
|
* @default none
|
|
11
11
|
*/
|
|
12
|
-
authentication?: 'basicAuth' | 'customAuth' | 'digestAuth' | 'headerAuth' | 'none' | 'oAuth1' | 'oAuth2' | 'queryAuth'
|
|
12
|
+
authentication?: 'basicAuth' | 'customAuth' | 'digestAuth' | 'headerAuth' | 'none' | 'oAuth1' | 'oAuth2' | 'queryAuth';
|
|
13
13
|
/**
|
|
14
14
|
* The underlying HTTP request method to use
|
|
15
15
|
* @default POST
|
|
@@ -14,7 +14,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
14
14
|
|
|
15
15
|
// Parameters schema
|
|
16
16
|
const parametersSchema = z.object({
|
|
17
|
-
authentication: z.union([z.literal('basicAuth'), z.literal('customAuth'), z.literal('digestAuth'), z.literal('headerAuth'), z.literal('none'), z.literal('oAuth1'), z.literal('oAuth2'), z.literal('queryAuth')
|
|
17
|
+
authentication: z.union([z.literal('basicAuth'), z.literal('customAuth'), z.literal('digestAuth'), z.literal('headerAuth'), z.literal('none'), z.literal('oAuth1'), z.literal('oAuth2'), z.literal('queryAuth')]).optional(),
|
|
18
18
|
requestMethod: z.union([z.literal('GET'), z.literal('POST'), expressionSchema]).optional(),
|
|
19
19
|
endpoint: stringOrExpression,
|
|
20
20
|
allowUnauthorizedCerts: booleanOrExpression.optional(),
|
|
@@ -9,7 +9,7 @@ export interface GraphqlV11Params {
|
|
|
9
9
|
* The way to authenticate
|
|
10
10
|
* @default none
|
|
11
11
|
*/
|
|
12
|
-
authentication?: 'basicAuth' | 'customAuth' | 'digestAuth' | 'headerAuth' | 'none' | 'oAuth1' | 'oAuth2' | 'queryAuth'
|
|
12
|
+
authentication?: 'basicAuth' | 'customAuth' | 'digestAuth' | 'headerAuth' | 'none' | 'oAuth1' | 'oAuth2' | 'queryAuth';
|
|
13
13
|
/**
|
|
14
14
|
* The underlying HTTP request method to use
|
|
15
15
|
* @default POST
|
|
@@ -33,12 +33,12 @@ export type MicrosoftOutlookV2EventCreateParams = {
|
|
|
33
33
|
subject: string | Expression<string>;
|
|
34
34
|
/**
|
|
35
35
|
* Start
|
|
36
|
-
* @default 2026-08-
|
|
36
|
+
* @default 2026-08-05T07:55:05.243+00:00
|
|
37
37
|
*/
|
|
38
38
|
startDateTime?: string | Expression<string>;
|
|
39
39
|
/**
|
|
40
40
|
* End
|
|
41
|
-
* @default 2026-08-
|
|
41
|
+
* @default 2026-08-05T08:25:05.243+00:00
|
|
42
42
|
*/
|
|
43
43
|
endDateTime?: string | Expression<string>;
|
|
44
44
|
/**
|
|
@@ -18,6 +18,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
18
18
|
operation: z.literal('aggregate'),
|
|
19
19
|
collection: stringOrExpression,
|
|
20
20
|
query: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
|
+
queryParameters: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
22
|
}).optional(),
|
|
22
23
|
});
|
|
23
24
|
};
|
|
@@ -17,10 +17,16 @@ export type MongoDbV1DocumentAggregateParams = {
|
|
|
17
17
|
*/
|
|
18
18
|
collection: string | Expression<string>;
|
|
19
19
|
/**
|
|
20
|
-
* MongoDB aggregation pipeline
|
|
21
|
-
* @hint
|
|
20
|
+
* MongoDB aggregation pipeline in JSON format. Use $1, $2, and so on as complete values to reference Query Parameters below.
|
|
21
|
+
* @hint Use query parameters for dynamic values instead of embedding expressions in the query. <a href="https://docs.mongodb.com/manual/core/aggregation-pipeline/" target="_blank">Learn more about aggregation pipelines</a>.
|
|
22
22
|
*/
|
|
23
23
|
query?: IDataObject | string | Expression<string>;
|
|
24
|
+
/**
|
|
25
|
+
* JSON array of values to use for $1, $2, and so on, in order. Values can be strings, numbers, booleans, null, or arrays of these values. You can also use an expression that returns an array.
|
|
26
|
+
* @hint For example, ["Alice", 30] replaces $1 with "Alice" and $2 with 30
|
|
27
|
+
* @default []
|
|
28
|
+
*/
|
|
29
|
+
queryParameters?: IDataObject | string | Expression<string>;
|
|
24
30
|
};
|
|
25
31
|
|
|
26
32
|
export type MongoDbV1DocumentAggregateNode = {
|
|
@@ -18,6 +18,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
18
18
|
operation: z.literal('delete'),
|
|
19
19
|
collection: stringOrExpression,
|
|
20
20
|
query: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
|
+
queryParameters: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
22
|
}).optional(),
|
|
22
23
|
});
|
|
23
24
|
};
|
package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v1/resource_document/operation_delete.ts
CHANGED
|
@@ -17,10 +17,17 @@ export type MongoDbV1DocumentDeleteParams = {
|
|
|
17
17
|
*/
|
|
18
18
|
collection: string | Expression<string>;
|
|
19
19
|
/**
|
|
20
|
-
* MongoDB
|
|
20
|
+
* MongoDB delete query in JSON format. Use $1, $2, and so on as complete values to reference Query Parameters below.
|
|
21
|
+
* @hint Use query parameters for dynamic values instead of embedding expressions in the query
|
|
21
22
|
* @default {}
|
|
22
23
|
*/
|
|
23
24
|
query?: IDataObject | string | Expression<string>;
|
|
25
|
+
/**
|
|
26
|
+
* JSON array of values to use for $1, $2, and so on, in order. Values can be strings, numbers, booleans, null, or arrays of these values. You can also use an expression that returns an array.
|
|
27
|
+
* @hint For example, ["Alice", 30] replaces $1 with "Alice" and $2 with 30
|
|
28
|
+
* @default []
|
|
29
|
+
*/
|
|
30
|
+
queryParameters?: IDataObject | string | Expression<string>;
|
|
24
31
|
};
|
|
25
32
|
|
|
26
33
|
export type MongoDbV1DocumentDeleteNode = {
|
|
@@ -19,6 +19,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
19
19
|
collection: stringOrExpression,
|
|
20
20
|
options: z.object({ limit: numberOrExpression.optional(), skip: numberOrExpression.optional(), sort: z.union([iDataObjectSchema, z.string()]).optional(), projection: z.union([iDataObjectSchema, z.string()]).optional() }).optional(),
|
|
21
21
|
query: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
22
|
+
queryParameters: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
22
23
|
}).optional(),
|
|
23
24
|
});
|
|
24
25
|
};
|
package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v1/resource_document/operation_find.ts
CHANGED
|
@@ -39,10 +39,17 @@ export type MongoDbV1DocumentFindParams = {
|
|
|
39
39
|
projection?: IDataObject | string | Expression<string>;
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
|
-
* MongoDB
|
|
42
|
+
* MongoDB find query in JSON format. Use $1, $2, and so on as complete values to reference Query Parameters below.
|
|
43
|
+
* @hint Use query parameters for dynamic values instead of embedding expressions in the query
|
|
43
44
|
* @default {}
|
|
44
45
|
*/
|
|
45
46
|
query?: IDataObject | string | Expression<string>;
|
|
47
|
+
/**
|
|
48
|
+
* JSON array of values to use for $1, $2, and so on, in order. Values can be strings, numbers, booleans, null, or arrays of these values. You can also use an expression that returns an array.
|
|
49
|
+
* @hint For example, ["Alice", 30] replaces $1 with "Alice" and $2 with 30
|
|
50
|
+
* @default []
|
|
51
|
+
*/
|
|
52
|
+
queryParameters?: IDataObject | string | Expression<string>;
|
|
46
53
|
};
|
|
47
54
|
|
|
48
55
|
export type MongoDbV1DocumentFindNode = {
|
|
@@ -18,6 +18,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
18
18
|
operation: z.literal('aggregate'),
|
|
19
19
|
collection: stringOrExpression,
|
|
20
20
|
query: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
|
+
queryParameters: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
22
|
}).optional(),
|
|
22
23
|
});
|
|
23
24
|
};
|
|
@@ -17,10 +17,16 @@ export type MongoDbV11DocumentAggregateParams = {
|
|
|
17
17
|
*/
|
|
18
18
|
collection: string | Expression<string>;
|
|
19
19
|
/**
|
|
20
|
-
* MongoDB aggregation pipeline
|
|
21
|
-
* @hint
|
|
20
|
+
* MongoDB aggregation pipeline in JSON format. Use $1, $2, and so on as complete values to reference Query Parameters below.
|
|
21
|
+
* @hint Use query parameters for dynamic values instead of embedding expressions in the query. <a href="https://docs.mongodb.com/manual/core/aggregation-pipeline/" target="_blank">Learn more about aggregation pipelines</a>.
|
|
22
22
|
*/
|
|
23
23
|
query?: IDataObject | string | Expression<string>;
|
|
24
|
+
/**
|
|
25
|
+
* JSON array of values to use for $1, $2, and so on, in order. Values can be strings, numbers, booleans, null, or arrays of these values. You can also use an expression that returns an array.
|
|
26
|
+
* @hint For example, ["Alice", 30] replaces $1 with "Alice" and $2 with 30
|
|
27
|
+
* @default []
|
|
28
|
+
*/
|
|
29
|
+
queryParameters?: IDataObject | string | Expression<string>;
|
|
24
30
|
};
|
|
25
31
|
|
|
26
32
|
export type MongoDbV11DocumentAggregateNode = {
|
|
@@ -18,6 +18,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
18
18
|
operation: z.literal('delete'),
|
|
19
19
|
collection: stringOrExpression,
|
|
20
20
|
query: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
|
+
queryParameters: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
22
|
}).optional(),
|
|
22
23
|
});
|
|
23
24
|
};
|
package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v11/resource_document/operation_delete.ts
CHANGED
|
@@ -17,10 +17,17 @@ export type MongoDbV11DocumentDeleteParams = {
|
|
|
17
17
|
*/
|
|
18
18
|
collection: string | Expression<string>;
|
|
19
19
|
/**
|
|
20
|
-
* MongoDB
|
|
20
|
+
* MongoDB delete query in JSON format. Use $1, $2, and so on as complete values to reference Query Parameters below.
|
|
21
|
+
* @hint Use query parameters for dynamic values instead of embedding expressions in the query
|
|
21
22
|
* @default {}
|
|
22
23
|
*/
|
|
23
24
|
query?: IDataObject | string | Expression<string>;
|
|
25
|
+
/**
|
|
26
|
+
* JSON array of values to use for $1, $2, and so on, in order. Values can be strings, numbers, booleans, null, or arrays of these values. You can also use an expression that returns an array.
|
|
27
|
+
* @hint For example, ["Alice", 30] replaces $1 with "Alice" and $2 with 30
|
|
28
|
+
* @default []
|
|
29
|
+
*/
|
|
30
|
+
queryParameters?: IDataObject | string | Expression<string>;
|
|
24
31
|
};
|
|
25
32
|
|
|
26
33
|
export type MongoDbV11DocumentDeleteNode = {
|
|
@@ -19,6 +19,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
19
19
|
collection: stringOrExpression,
|
|
20
20
|
options: z.object({ limit: numberOrExpression.optional(), skip: numberOrExpression.optional(), sort: z.union([iDataObjectSchema, z.string()]).optional(), projection: z.union([iDataObjectSchema, z.string()]).optional() }).optional(),
|
|
21
21
|
query: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
22
|
+
queryParameters: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
22
23
|
}).optional(),
|
|
23
24
|
});
|
|
24
25
|
};
|
package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v11/resource_document/operation_find.ts
CHANGED
|
@@ -39,10 +39,17 @@ export type MongoDbV11DocumentFindParams = {
|
|
|
39
39
|
projection?: IDataObject | string | Expression<string>;
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
|
-
* MongoDB
|
|
42
|
+
* MongoDB find query in JSON format. Use $1, $2, and so on as complete values to reference Query Parameters below.
|
|
43
|
+
* @hint Use query parameters for dynamic values instead of embedding expressions in the query
|
|
43
44
|
* @default {}
|
|
44
45
|
*/
|
|
45
46
|
query?: IDataObject | string | Expression<string>;
|
|
47
|
+
/**
|
|
48
|
+
* JSON array of values to use for $1, $2, and so on, in order. Values can be strings, numbers, booleans, null, or arrays of these values. You can also use an expression that returns an array.
|
|
49
|
+
* @hint For example, ["Alice", 30] replaces $1 with "Alice" and $2 with 30
|
|
50
|
+
* @default []
|
|
51
|
+
*/
|
|
52
|
+
queryParameters?: IDataObject | string | Expression<string>;
|
|
46
53
|
};
|
|
47
54
|
|
|
48
55
|
export type MongoDbV11DocumentFindNode = {
|
|
@@ -18,6 +18,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
18
18
|
operation: z.literal('aggregate'),
|
|
19
19
|
collection: stringOrExpression,
|
|
20
20
|
query: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
|
+
queryParameters: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
22
|
}).optional(),
|
|
22
23
|
});
|
|
23
24
|
};
|
|
@@ -17,10 +17,16 @@ export type MongoDbV12DocumentAggregateParams = {
|
|
|
17
17
|
*/
|
|
18
18
|
collection: string | Expression<string>;
|
|
19
19
|
/**
|
|
20
|
-
* MongoDB aggregation pipeline
|
|
21
|
-
* @hint
|
|
20
|
+
* MongoDB aggregation pipeline in JSON format. Use $1, $2, and so on as complete values to reference Query Parameters below.
|
|
21
|
+
* @hint Use query parameters for dynamic values instead of embedding expressions in the query. <a href="https://docs.mongodb.com/manual/core/aggregation-pipeline/" target="_blank">Learn more about aggregation pipelines</a>.
|
|
22
22
|
*/
|
|
23
23
|
query?: IDataObject | string | Expression<string>;
|
|
24
|
+
/**
|
|
25
|
+
* JSON array of values to use for $1, $2, and so on, in order. Values can be strings, numbers, booleans, null, or arrays of these values. You can also use an expression that returns an array.
|
|
26
|
+
* @hint For example, ["Alice", 30] replaces $1 with "Alice" and $2 with 30
|
|
27
|
+
* @default []
|
|
28
|
+
*/
|
|
29
|
+
queryParameters?: IDataObject | string | Expression<string>;
|
|
24
30
|
};
|
|
25
31
|
|
|
26
32
|
export type MongoDbV12DocumentAggregateNode = {
|
|
@@ -18,6 +18,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
18
18
|
operation: z.literal('delete'),
|
|
19
19
|
collection: stringOrExpression,
|
|
20
20
|
query: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
|
+
queryParameters: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
22
|
}).optional(),
|
|
22
23
|
});
|
|
23
24
|
};
|
package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v12/resource_document/operation_delete.ts
CHANGED
|
@@ -17,10 +17,17 @@ export type MongoDbV12DocumentDeleteParams = {
|
|
|
17
17
|
*/
|
|
18
18
|
collection: string | Expression<string>;
|
|
19
19
|
/**
|
|
20
|
-
* MongoDB
|
|
20
|
+
* MongoDB delete query in JSON format. Use $1, $2, and so on as complete values to reference Query Parameters below.
|
|
21
|
+
* @hint Use query parameters for dynamic values instead of embedding expressions in the query
|
|
21
22
|
* @default {}
|
|
22
23
|
*/
|
|
23
24
|
query?: IDataObject | string | Expression<string>;
|
|
25
|
+
/**
|
|
26
|
+
* JSON array of values to use for $1, $2, and so on, in order. Values can be strings, numbers, booleans, null, or arrays of these values. You can also use an expression that returns an array.
|
|
27
|
+
* @hint For example, ["Alice", 30] replaces $1 with "Alice" and $2 with 30
|
|
28
|
+
* @default []
|
|
29
|
+
*/
|
|
30
|
+
queryParameters?: IDataObject | string | Expression<string>;
|
|
24
31
|
};
|
|
25
32
|
|
|
26
33
|
export type MongoDbV12DocumentDeleteNode = {
|
|
@@ -19,6 +19,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
19
19
|
collection: stringOrExpression,
|
|
20
20
|
options: z.object({ limit: numberOrExpression.optional(), skip: numberOrExpression.optional(), sort: z.union([iDataObjectSchema, z.string()]).optional(), projection: z.union([iDataObjectSchema, z.string()]).optional() }).optional(),
|
|
21
21
|
query: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
22
|
+
queryParameters: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
22
23
|
}).optional(),
|
|
23
24
|
});
|
|
24
25
|
};
|
package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v12/resource_document/operation_find.ts
CHANGED
|
@@ -39,10 +39,17 @@ export type MongoDbV12DocumentFindParams = {
|
|
|
39
39
|
projection?: IDataObject | string | Expression<string>;
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
|
-
* MongoDB
|
|
42
|
+
* MongoDB find query in JSON format. Use $1, $2, and so on as complete values to reference Query Parameters below.
|
|
43
|
+
* @hint Use query parameters for dynamic values instead of embedding expressions in the query
|
|
43
44
|
* @default {}
|
|
44
45
|
*/
|
|
45
46
|
query?: IDataObject | string | Expression<string>;
|
|
47
|
+
/**
|
|
48
|
+
* JSON array of values to use for $1, $2, and so on, in order. Values can be strings, numbers, booleans, null, or arrays of these values. You can also use an expression that returns an array.
|
|
49
|
+
* @hint For example, ["Alice", 30] replaces $1 with "Alice" and $2 with 30
|
|
50
|
+
* @default []
|
|
51
|
+
*/
|
|
52
|
+
queryParameters?: IDataObject | string | Expression<string>;
|
|
46
53
|
};
|
|
47
54
|
|
|
48
55
|
export type MongoDbV12DocumentFindNode = {
|
|
@@ -18,6 +18,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
18
18
|
operation: z.literal('aggregate'),
|
|
19
19
|
collection: stringOrExpression,
|
|
20
20
|
query: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
|
+
queryParameters: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
22
|
}).optional(),
|
|
22
23
|
});
|
|
23
24
|
};
|
|
@@ -17,10 +17,16 @@ export type MongoDbV13DocumentAggregateParams = {
|
|
|
17
17
|
*/
|
|
18
18
|
collection: string | Expression<string>;
|
|
19
19
|
/**
|
|
20
|
-
* MongoDB aggregation pipeline
|
|
21
|
-
* @hint
|
|
20
|
+
* MongoDB aggregation pipeline in JSON format. Use $1, $2, and so on as complete values to reference Query Parameters below.
|
|
21
|
+
* @hint Use query parameters for dynamic values instead of embedding expressions in the query. <a href="https://docs.mongodb.com/manual/core/aggregation-pipeline/" target="_blank">Learn more about aggregation pipelines</a>.
|
|
22
22
|
*/
|
|
23
23
|
query?: IDataObject | string | Expression<string>;
|
|
24
|
+
/**
|
|
25
|
+
* JSON array of values to use for $1, $2, and so on, in order. Values can be strings, numbers, booleans, null, or arrays of these values. You can also use an expression that returns an array.
|
|
26
|
+
* @hint For example, ["Alice", 30] replaces $1 with "Alice" and $2 with 30
|
|
27
|
+
* @default []
|
|
28
|
+
*/
|
|
29
|
+
queryParameters?: IDataObject | string | Expression<string>;
|
|
24
30
|
};
|
|
25
31
|
|
|
26
32
|
export type MongoDbV13DocumentAggregateNode = {
|
|
@@ -18,6 +18,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
18
18
|
operation: z.literal('delete'),
|
|
19
19
|
collection: stringOrExpression,
|
|
20
20
|
query: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
|
+
queryParameters: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
22
|
}).optional(),
|
|
22
23
|
});
|
|
23
24
|
};
|
package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v13/resource_document/operation_delete.ts
CHANGED
|
@@ -17,10 +17,17 @@ export type MongoDbV13DocumentDeleteParams = {
|
|
|
17
17
|
*/
|
|
18
18
|
collection: string | Expression<string>;
|
|
19
19
|
/**
|
|
20
|
-
* MongoDB
|
|
20
|
+
* MongoDB delete query in JSON format. Use $1, $2, and so on as complete values to reference Query Parameters below.
|
|
21
|
+
* @hint Use query parameters for dynamic values instead of embedding expressions in the query
|
|
21
22
|
* @default {}
|
|
22
23
|
*/
|
|
23
24
|
query?: IDataObject | string | Expression<string>;
|
|
25
|
+
/**
|
|
26
|
+
* JSON array of values to use for $1, $2, and so on, in order. Values can be strings, numbers, booleans, null, or arrays of these values. You can also use an expression that returns an array.
|
|
27
|
+
* @hint For example, ["Alice", 30] replaces $1 with "Alice" and $2 with 30
|
|
28
|
+
* @default []
|
|
29
|
+
*/
|
|
30
|
+
queryParameters?: IDataObject | string | Expression<string>;
|
|
24
31
|
};
|
|
25
32
|
|
|
26
33
|
export type MongoDbV13DocumentDeleteNode = {
|
|
@@ -19,6 +19,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
19
19
|
collection: stringOrExpression,
|
|
20
20
|
options: z.object({ limit: numberOrExpression.optional(), skip: numberOrExpression.optional(), sort: z.union([iDataObjectSchema, z.string()]).optional(), projection: z.union([iDataObjectSchema, z.string()]).optional() }).optional(),
|
|
21
21
|
query: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
22
|
+
queryParameters: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
22
23
|
}).optional(),
|
|
23
24
|
});
|
|
24
25
|
};
|
package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v13/resource_document/operation_find.ts
CHANGED
|
@@ -39,10 +39,17 @@ export type MongoDbV13DocumentFindParams = {
|
|
|
39
39
|
projection?: IDataObject | string | Expression<string>;
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
|
-
* MongoDB
|
|
42
|
+
* MongoDB find query in JSON format. Use $1, $2, and so on as complete values to reference Query Parameters below.
|
|
43
|
+
* @hint Use query parameters for dynamic values instead of embedding expressions in the query
|
|
43
44
|
* @default {}
|
|
44
45
|
*/
|
|
45
46
|
query?: IDataObject | string | Expression<string>;
|
|
47
|
+
/**
|
|
48
|
+
* JSON array of values to use for $1, $2, and so on, in order. Values can be strings, numbers, booleans, null, or arrays of these values. You can also use an expression that returns an array.
|
|
49
|
+
* @hint For example, ["Alice", 30] replaces $1 with "Alice" and $2 with 30
|
|
50
|
+
* @default []
|
|
51
|
+
*/
|
|
52
|
+
queryParameters?: IDataObject | string | Expression<string>;
|
|
46
53
|
};
|
|
47
54
|
|
|
48
55
|
export type MongoDbV13DocumentFindNode = {
|
|
@@ -18,6 +18,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
18
18
|
operation: z.literal('aggregate'),
|
|
19
19
|
collection: stringOrExpression,
|
|
20
20
|
query: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
|
+
queryParameters: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
22
|
}).optional(),
|
|
22
23
|
});
|
|
23
24
|
};
|
|
@@ -17,10 +17,16 @@ export type MongoDbV14DocumentAggregateParams = {
|
|
|
17
17
|
*/
|
|
18
18
|
collection: string | Expression<string>;
|
|
19
19
|
/**
|
|
20
|
-
* MongoDB aggregation pipeline
|
|
21
|
-
* @hint
|
|
20
|
+
* MongoDB aggregation pipeline in JSON format. Use $1, $2, and so on as complete values to reference Query Parameters below.
|
|
21
|
+
* @hint Use query parameters for dynamic values instead of embedding expressions in the query. <a href="https://docs.mongodb.com/manual/core/aggregation-pipeline/" target="_blank">Learn more about aggregation pipelines</a>.
|
|
22
22
|
*/
|
|
23
23
|
query?: IDataObject | string | Expression<string>;
|
|
24
|
+
/**
|
|
25
|
+
* JSON array of values to use for $1, $2, and so on, in order. Values can be strings, numbers, booleans, null, or arrays of these values. You can also use an expression that returns an array.
|
|
26
|
+
* @hint For example, ["Alice", 30] replaces $1 with "Alice" and $2 with 30
|
|
27
|
+
* @default []
|
|
28
|
+
*/
|
|
29
|
+
queryParameters?: IDataObject | string | Expression<string>;
|
|
24
30
|
};
|
|
25
31
|
|
|
26
32
|
export type MongoDbV14DocumentAggregateNode = {
|
|
@@ -18,6 +18,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
18
18
|
operation: z.literal('delete'),
|
|
19
19
|
collection: stringOrExpression,
|
|
20
20
|
query: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
|
+
queryParameters: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
21
22
|
}).optional(),
|
|
22
23
|
});
|
|
23
24
|
};
|
package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v14/resource_document/operation_delete.ts
CHANGED
|
@@ -17,10 +17,17 @@ export type MongoDbV14DocumentDeleteParams = {
|
|
|
17
17
|
*/
|
|
18
18
|
collection: string | Expression<string>;
|
|
19
19
|
/**
|
|
20
|
-
* MongoDB
|
|
20
|
+
* MongoDB delete query in JSON format. Use $1, $2, and so on as complete values to reference Query Parameters below.
|
|
21
|
+
* @hint Use query parameters for dynamic values instead of embedding expressions in the query
|
|
21
22
|
* @default {}
|
|
22
23
|
*/
|
|
23
24
|
query?: IDataObject | string | Expression<string>;
|
|
25
|
+
/**
|
|
26
|
+
* JSON array of values to use for $1, $2, and so on, in order. Values can be strings, numbers, booleans, null, or arrays of these values. You can also use an expression that returns an array.
|
|
27
|
+
* @hint For example, ["Alice", 30] replaces $1 with "Alice" and $2 with 30
|
|
28
|
+
* @default []
|
|
29
|
+
*/
|
|
30
|
+
queryParameters?: IDataObject | string | Expression<string>;
|
|
24
31
|
};
|
|
25
32
|
|
|
26
33
|
export type MongoDbV14DocumentDeleteNode = {
|
|
@@ -19,6 +19,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
19
19
|
collection: stringOrExpression,
|
|
20
20
|
options: z.object({ limit: numberOrExpression.optional(), skip: numberOrExpression.optional(), sort: z.union([iDataObjectSchema, z.string()]).optional(), projection: z.union([iDataObjectSchema, z.string()]).optional() }).optional(),
|
|
21
21
|
query: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
22
|
+
queryParameters: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
22
23
|
}).optional(),
|
|
23
24
|
});
|
|
24
25
|
};
|
package/dist/node-definitions/nodes/n8n-nodes-base/mongoDb/v14/resource_document/operation_find.ts
CHANGED
|
@@ -39,10 +39,17 @@ export type MongoDbV14DocumentFindParams = {
|
|
|
39
39
|
projection?: IDataObject | string | Expression<string>;
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
|
-
* MongoDB
|
|
42
|
+
* MongoDB find query in JSON format. Use $1, $2, and so on as complete values to reference Query Parameters below.
|
|
43
|
+
* @hint Use query parameters for dynamic values instead of embedding expressions in the query
|
|
43
44
|
* @default {}
|
|
44
45
|
*/
|
|
45
46
|
query?: IDataObject | string | Expression<string>;
|
|
47
|
+
/**
|
|
48
|
+
* JSON array of values to use for $1, $2, and so on, in order. Values can be strings, numbers, booleans, null, or arrays of these values. You can also use an expression that returns an array.
|
|
49
|
+
* @hint For example, ["Alice", 30] replaces $1 with "Alice" and $2 with 30
|
|
50
|
+
* @default []
|
|
51
|
+
*/
|
|
52
|
+
queryParameters?: IDataObject | string | Expression<string>;
|
|
46
53
|
};
|
|
47
54
|
|
|
48
55
|
export type MongoDbV14DocumentFindNode = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditImage.node.d.ts","sourceRoot":"","sources":["../../../nodes/EditImage/EditImage.node.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGX,iBAAiB,EACjB,qBAAqB,EAErB,kBAAkB,EAElB,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"EditImage.node.d.ts","sourceRoot":"","sources":["../../../nodes/EditImage/EditImage.node.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGX,iBAAiB,EACjB,qBAAqB,EAErB,kBAAkB,EAElB,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,MAAM,cAAc,CAAC;AAwxBtB,qBAAa,SAAU,YAAW,SAAS;IAC1C,WAAW,EAAE,oBAAoB,CAwM/B;IAEF,OAAO;QACN,WAAW;YACJ,QAAQ,OAAO,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;;MA6B5E;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CA4XtE;CACD"}
|
|
@@ -10,6 +10,29 @@ const gm_1 = __importDefault(require("gm"));
|
|
|
10
10
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
11
11
|
const path_1 = require("path");
|
|
12
12
|
const tmp_promise_1 = require("tmp-promise");
|
|
13
|
+
const numericOperationParameters = {
|
|
14
|
+
blur: ['blur', 'sigma'],
|
|
15
|
+
border: ['borderWidth', 'borderHeight'],
|
|
16
|
+
composite: ['positionX', 'positionY'],
|
|
17
|
+
create: ['width', 'height'],
|
|
18
|
+
crop: ['width', 'height', 'positionX', 'positionY'],
|
|
19
|
+
draw: ['startPositionX', 'startPositionY', 'endPositionX', 'endPositionY', 'cornerRadius'],
|
|
20
|
+
resize: ['width', 'height'],
|
|
21
|
+
rotate: ['rotate'],
|
|
22
|
+
shear: ['degreesX', 'degreesY'],
|
|
23
|
+
text: ['fontSize', 'positionX', 'positionY', 'lineLength'],
|
|
24
|
+
};
|
|
25
|
+
function parseNumericParameter(value, parameterName, node) {
|
|
26
|
+
if ((typeof value !== 'number' && typeof value !== 'string') ||
|
|
27
|
+
(typeof value === 'string' && value.trim() === '')) {
|
|
28
|
+
throw new n8n_workflow_1.NodeOperationError(node, `The value of "${parameterName}" must be a number`);
|
|
29
|
+
}
|
|
30
|
+
const parsedValue = Number(value);
|
|
31
|
+
if (!Number.isFinite(parsedValue)) {
|
|
32
|
+
throw new n8n_workflow_1.NodeOperationError(node, `The value of "${parameterName}" must be a number`);
|
|
33
|
+
}
|
|
34
|
+
return parsedValue;
|
|
35
|
+
}
|
|
13
36
|
const VALID_IMAGE_FORMATS = new Set(['bmp', 'gif', 'jpeg', 'png', 'tiff', 'tif', 'webp']);
|
|
14
37
|
function validateImageFormat(format, node) {
|
|
15
38
|
if (typeof format === 'string' && VALID_IMAGE_FORMATS.has(format)) {
|
|
@@ -974,6 +997,7 @@ class EditImage {
|
|
|
974
997
|
for (let itemIndex = 0; itemIndex < length; itemIndex++) {
|
|
975
998
|
try {
|
|
976
999
|
item = items[itemIndex];
|
|
1000
|
+
const node = this.getNode();
|
|
977
1001
|
const operation = this.getNodeParameter('operation', itemIndex);
|
|
978
1002
|
const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex);
|
|
979
1003
|
const options = this.getNodeParameter('options', itemIndex, {});
|
|
@@ -1029,6 +1053,20 @@ class EditImage {
|
|
|
1029
1053
|
},
|
|
1030
1054
|
];
|
|
1031
1055
|
}
|
|
1056
|
+
for (const operationData of operations) {
|
|
1057
|
+
const operationName = operationData.operation;
|
|
1058
|
+
if (typeof operationName !== 'string')
|
|
1059
|
+
continue;
|
|
1060
|
+
for (const parameterName of numericOperationParameters[operationName] ?? []) {
|
|
1061
|
+
// 'cornerRadius' is applicable only when drawing a rectangle
|
|
1062
|
+
if (parameterName === 'cornerRadius' && operationData.primitive !== 'rectangle')
|
|
1063
|
+
continue;
|
|
1064
|
+
operationData[parameterName] = parseNumericParameter(operationData[parameterName], parameterName, node);
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
if (options.quality !== undefined) {
|
|
1068
|
+
options.quality = parseNumericParameter(options.quality, 'quality', node);
|
|
1069
|
+
}
|
|
1032
1070
|
if (operations[0].operation !== 'create') {
|
|
1033
1071
|
// "create" generates a new image so does not require any incoming data.
|
|
1034
1072
|
this.helpers.assertBinaryData(itemIndex, dataPropertyName);
|
|
@@ -1155,15 +1193,19 @@ class EditImage {
|
|
|
1155
1193
|
currentLine = '';
|
|
1156
1194
|
});
|
|
1157
1195
|
// Combine the lines to a single string
|
|
1158
|
-
|
|
1196
|
+
// gm escapes `"` internally, but doesn't do it for `\`
|
|
1197
|
+
const renderText = lines.join('\n').replaceAll('\\', '\\\\');
|
|
1198
|
+
const fonts = await (0, get_system_fonts_1.default)();
|
|
1159
1199
|
let font = (options.font || operationData.font);
|
|
1160
1200
|
if (!font) {
|
|
1161
|
-
|
|
1162
|
-
font = fonts.find((_font) => _font.includes('Arial.'));
|
|
1201
|
+
font = fonts.find((systemFont) => systemFont.includes('Arial.'));
|
|
1163
1202
|
}
|
|
1164
1203
|
if (!font) {
|
|
1165
1204
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Default font not found. Select a font from the options.');
|
|
1166
1205
|
}
|
|
1206
|
+
if (!fonts.includes(font)) {
|
|
1207
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The selected font is not available. Select a font from the options.');
|
|
1208
|
+
}
|
|
1167
1209
|
gmInstance = gmInstance
|
|
1168
1210
|
.fill(operationData.fontColor)
|
|
1169
1211
|
.fontSize(operationData.fontSize)
|