npm build successful
This commit is contained in:
parent
23179f4513
commit
9f6db09edf
|
|
@ -1,2 +1,4 @@
|
||||||
dist
|
dist
|
||||||
node_modules
|
node_modules
|
||||||
|
package-lock.json
|
||||||
|
.n8n/.env
|
||||||
|
|
@ -123,12 +123,7 @@ export class SecloreProtect implements INodeType {
|
||||||
const tenantSecret = credentials.tenantSecret as string;
|
const tenantSecret = credentials.tenantSecret as string;
|
||||||
|
|
||||||
// Initialize the file service
|
// Initialize the file service
|
||||||
const fileService = new SecloreDRMFileService(
|
const fileService = new SecloreDRMFileService(this, baseUrl, tenantId, tenantSecret);
|
||||||
this,
|
|
||||||
baseUrl,
|
|
||||||
tenantId,
|
|
||||||
tenantSecret
|
|
||||||
);
|
|
||||||
|
|
||||||
// Get node parameters
|
// Get node parameters
|
||||||
const operation = this.getNodeParameter('operation', 0) as string;
|
const operation = this.getNodeParameter('operation', 0) as string;
|
||||||
|
|
@ -139,7 +134,10 @@ export class SecloreProtect implements INodeType {
|
||||||
// Get parameters for this item
|
// Get parameters for this item
|
||||||
const hotfolderId = this.getNodeParameter('hotfolderId', i) as string;
|
const hotfolderId = this.getNodeParameter('hotfolderId', i) as string;
|
||||||
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string;
|
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string;
|
||||||
const outputBinaryPropertyName = this.getNodeParameter('outputBinaryPropertyName', i) as string;
|
const outputBinaryPropertyName = this.getNodeParameter(
|
||||||
|
'outputBinaryPropertyName',
|
||||||
|
i,
|
||||||
|
) as string;
|
||||||
const correlationId = this.getNodeParameter('correlationId', i) as string;
|
const correlationId = this.getNodeParameter('correlationId', i) as string;
|
||||||
const retryCount = this.getNodeParameter('retryCount', i) as number;
|
const retryCount = this.getNodeParameter('retryCount', i) as number;
|
||||||
|
|
||||||
|
|
@ -159,7 +157,7 @@ export class SecloreProtect implements INodeType {
|
||||||
new Uint8Array(fileBuffer),
|
new Uint8Array(fileBuffer),
|
||||||
binaryData.fileName || 'file',
|
binaryData.fileName || 'file',
|
||||||
correlationId || undefined,
|
correlationId || undefined,
|
||||||
retryCount
|
retryCount,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Protect the uploaded file with HotFolder
|
// Protect the uploaded file with HotFolder
|
||||||
|
|
@ -169,21 +167,21 @@ export class SecloreProtect implements INodeType {
|
||||||
fileStorageId: uploadResult.fileStorageId,
|
fileStorageId: uploadResult.fileStorageId,
|
||||||
},
|
},
|
||||||
correlationId || undefined,
|
correlationId || undefined,
|
||||||
retryCount
|
retryCount,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Download the protected file
|
// Download the protected file
|
||||||
const protectedFileData = await fileService.downloadFile(
|
const protectedFileData = await fileService.downloadFile(
|
||||||
protectResult.fileStorageId,
|
protectResult.fileStorageId,
|
||||||
correlationId || undefined,
|
correlationId || undefined,
|
||||||
retryCount
|
retryCount,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Create output binary data
|
// Create output binary data
|
||||||
const outputBinaryData = await this.helpers.prepareBinaryData(
|
const outputBinaryData = await this.helpers.prepareBinaryData(
|
||||||
protectedFileData.buffer,
|
Buffer.from(protectedFileData),
|
||||||
binaryData.fileName || 'protected_file',
|
binaryData.fileName || 'protected_file',
|
||||||
binaryData.mimeType
|
binaryData.mimeType,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Create return item with binary data and metadata
|
// Create return item with binary data and metadata
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
{
|
{
|
||||||
"name": "n8n-nodes-secloreprotect",
|
"name": "n8n-nodes-secloreprotect",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "",
|
"description": "n8n community node for Seclore Protect - secure file protection using DRM technology",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "",
|
"homepage": "",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"n8n-community-node-package"
|
"n8n-community-node-package"
|
||||||
],
|
],
|
||||||
"author": {
|
"author": {
|
||||||
"name": "",
|
"name": "Seclore Technology",
|
||||||
"email": ""
|
"email": "support@seclore.com"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
@ -39,6 +39,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@n8n/node-cli": "*",
|
"@n8n/node-cli": "*",
|
||||||
|
"@types/node": "^24.9.1",
|
||||||
"eslint": "9.32.0",
|
"eslint": "9.32.0",
|
||||||
"prettier": "3.6.2",
|
"prettier": "3.6.2",
|
||||||
"release-it": "^19.0.4",
|
"release-it": "^19.0.4",
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"outDir": "./dist/"
|
"outDir": "./dist/",
|
||||||
|
"types": ["node"]
|
||||||
},
|
},
|
||||||
"include": ["credentials/**/*", "nodes/**/*", "nodes/**/*.json", "package.json"]
|
"include": ["credentials/**/*", "nodes/**/*", "nodes/**/*.json", "package.json"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue