feat(core): Upgrade oclif (no-changelog) (#8381)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-01-22 18:25:36 +01:00
committed by GitHub
parent 2c146cca62
commit 913c8c6b0c
29 changed files with 234 additions and 677 deletions

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env node
require('@oclif/command').run()
.then(require('@oclif/command/flush'))
.catch(require('@oclif/errors/handle'));
(async () => {
const oclif = await import('@oclif/core');
await oclif.execute({});
})();

View File

@@ -1,6 +1,6 @@
import { Container } from 'typedi';
import { Command, Flags } from '@oclif/core';
import { InstanceSettings } from 'n8n-core';
import { Command, flags } from '@oclif/command';
import type { IBuildOptions } from '../src';
import { buildFiles } from '../src';
@@ -15,22 +15,21 @@ export class Build extends Command {
];
static flags = {
help: flags.help({ char: 'h' }),
destination: flags.string({
help: Flags.help({ char: 'h' }),
destination: Flags.string({
char: 'd',
description: `The path to copy the compiled files to [default: ${
Container.get(InstanceSettings).customExtensionDir
}]`,
}),
watch: flags.boolean({
watch: Flags.boolean({
description:
'Starts in watch mode and automatically builds and copies file whenever they change',
}),
};
async run() {
// eslint-disable-next-line @typescript-eslint/no-shadow
const { flags } = this.parse(Build);
const { flags } = await this.parse(Build);
this.log('\nBuild credentials and nodes');
this.log('=========================');

View File

@@ -2,10 +2,10 @@
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { Command } from '@oclif/core';
import * as changeCase from 'change-case';
import * as fs from 'fs';
import * as inquirer from 'inquirer';
import { Command } from '@oclif/command';
import { join } from 'path';
import { createTemplate } from '../src';

View File

@@ -26,8 +26,7 @@
"format": "prettier --write . --ignore-path ../../.prettierignore",
"lint": "eslint . --quiet",
"lintfix": "eslint . --fix",
"postpack": "rm -f oclif.manifest.json",
"prepack": "echo \"Building project...\" && rm -rf dist && tsc -b && oclif-dev manifest",
"prepack": "echo \"Building project...\" && rm -rf dist && tsc -b",
"watch": "tsc --watch"
},
"bin": {
@@ -43,16 +42,13 @@
"bin",
"dist",
"templates",
"oclif.manifest.json",
"src/tsconfig-build.json"
],
"devDependencies": {
"@oclif/dev-cli": "^1.22.2",
"@types/inquirer": "^6.5.0"
},
"dependencies": {
"@oclif/command": "^1.5.18",
"@oclif/errors": "^1.2.2",
"@oclif/core": "3.18.1",
"change-case": "^4.1.1",
"fast-glob": "^3.2.5",
"inquirer": "^7.0.1",