Skip to content

Commit

Permalink
chore: migrate CLI to latest commander library [ci:force]
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysVuika committed Mar 25, 2024
1 parent 6e67e6e commit bc3809a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cli/scripts/init-acs-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import { AlfrescoApi, SharedlinksApi, FavoritesApi, NodesApi, UploadApi, NodeEntry } from '@alfresco/js-api';
import { exit, argv } from 'node:process';
import { Command } from 'commander';
import * as fs from 'fs';
import { createReadStream } from 'fs';
import * as path from 'path';
import { logger } from './logger';

Expand Down Expand Up @@ -127,7 +127,7 @@ async function createFolder(folderName: string, parentId: string) {
*/
async function uploadFile(fileName: string, fileDestination: string): Promise<NodeEntry> {
const filePath = `../resources/content/${fileName}`;
const file = fs.createReadStream(path.join(__dirname, filePath));
const file = createReadStream(path.join(__dirname, filePath));
let uploadedFile: NodeEntry;
try {
uploadedFile = await new UploadApi(alfrescoJsApi).uploadFile(file, '', fileDestination, null, {
Expand Down

0 comments on commit bc3809a

Please sign in to comment.