Skip to content

Commit 68f9a35

Browse files
committed
chore: it might work?
1 parent df71348 commit 68f9a35

File tree

14 files changed

+800
-626
lines changed

14 files changed

+800
-626
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"which": "^5.0.0",
109109
"widest-line": "^5.0.0",
110110
"wrap-ansi": "^9.0.0",
111-
"yargs": "^17.7.2"
111+
"yargs": "^18.0.0"
112112
},
113113
"devDependencies": {
114114
"@apify/eslint-config": "^1.0.0",
@@ -133,7 +133,6 @@
133133
"@types/node": "^22.0.0",
134134
"@types/semver": "^7.5.8",
135135
"@types/which": "^3.0.4",
136-
"@types/yargs": "^17.0.33",
137136
"@yarnpkg/core": "^4.1.2",
138137
"apify": "^3.2.4",
139138
"chai": "^4.4.1",

src/commands/_FlagTests.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { ApifyCommand } from '../lib/command-framework/apify-command.js';
2+
import { Flags } from '../lib/command-framework/flags.js';
3+
4+
export class FlagTest extends ApifyCommand<typeof FlagTest> {
5+
static override name = '_flag';
6+
7+
static override flags = {
8+
foo: Flags.string({
9+
description: 'Foo flag',
10+
required: true,
11+
}),
12+
bar: Flags.string({
13+
description: 'Bar flag',
14+
}),
15+
fooBar: Flags.string({
16+
description: 'Foo bar flag',
17+
// required: true,
18+
}),
19+
'spaced message': Flags.string({
20+
description: 'Spaced message flag',
21+
}),
22+
choice: Flags.string({
23+
description: 'Choices flag',
24+
aliases: ['alias1'],
25+
choices: ['1', '2', '3'],
26+
}),
27+
int: Flags.integer({
28+
default: 1,
29+
}),
30+
};
31+
32+
override async run() {
33+
console.log(this.flags);
34+
}
35+
}

src/commands/_register.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { BuiltApifyCommand } from '../lib/command-framework/apify-command.js';
2+
import { FlagTest } from './_FlagTests.js';
23
import { ActorIndexCommand } from './actor/_index.js';
34
import { ActorChargeCommand } from './actor/charge.js';
45
import { ActorGetInputCommand } from './actor/get-input.js';
@@ -57,6 +58,7 @@ export const apifyCommands = [
5758
RunCommand,
5859
ValidateInputSchemaCommand,
5960
HelpCommand,
61+
FlagTest,
6062
] as const satisfies (typeof BuiltApifyCommand)[];
6163

6264
export const actorCommands = [

src/commands/cli-management/upgrade.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ export class UpgradeCommand extends ApifyCommand<typeof UpgradeCommand> {
7777
const { installMethod } = useCLIMetadata();
7878

7979
if (!result.shouldUpdate || result.currentVersion === DEVELOPMENT_VERSION_MARKER) {
80+
cliDebugPrint('[upgrade] no update needed', {
81+
shouldUpdate: result.shouldUpdate,
82+
currentVersion: result.currentVersion,
83+
});
84+
8085
// Always print, unless the command was called automatically by the CLI for a version check
8186
if (!this.flags.internalAutomaticCall) {
8287
info({ message: `${this.cliName} is up to date 👍 \n` });

0 commit comments

Comments
 (0)