Skip to content

Commit fc274d5

Browse files
committed
chore: update oclif deps
1 parent 061eaff commit fc274d5

19 files changed

Lines changed: 2202 additions & 687 deletions

File tree

package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"bl": "node ./lib/blessed.js",
4646
"lint": "eslint --fix src/**/*",
4747
"test:unit": "NODE_ENV=test jest --bail --testRegex=.unit.spec.ts$",
48-
"tsc": "tsc --noEmit -p tsconfig.json",
48+
"tsc": "tsc --noEmit",
4949
"pkg:build": "./bin/pkg-build.sh",
5050
"pkg:compress": "./bin/pkg-compress.sh",
5151
"upg": "npx npm-check-updates -u -i"
@@ -63,8 +63,8 @@
6363
"testEnvironment": "node"
6464
},
6565
"dependencies": {
66-
"@oclif/core": "^1.26.1",
67-
"@oclif/plugin-autocomplete": "^1.4.6",
66+
"@oclif/core": "^3.19.1",
67+
"@oclif/plugin-autocomplete": "^3.0.8",
6868
"@subsquid/commands": "^2.3.1",
6969
"@subsquid/manifest": "^0.0.1-beta.13",
7070
"@subsquid/manifest-expr": "^0.0.1",
@@ -76,17 +76,19 @@
7676
"chalk": "^4.1.2",
7777
"cli-select": "^1.1.2",
7878
"cross-spawn": "^7.0.3",
79+
"date-fns": "^3.3.1",
7980
"dotenv": "^16.4.2",
8081
"fast-levenshtein": "^3.0.0",
8182
"figlet": "^1.7.0",
8283
"form-data": "^4.0.0",
8384
"inquirer": "^8.2.5",
8485
"js-yaml": "^4.1.0",
85-
"lodash": "^4.17.21", "ms": "^2.1.3",
86+
"lodash": "^4.17.21",
87+
"ms": "^2.1.3",
8688
"neo-blessed": "^0.2.0",
8789
"node-fetch": "^2.6.7",
88-
"oclif": "^2.7.0",
89-
"query-string": "^7.1.2",
90+
"oclif": "^4.4.10",
91+
"qs": "^6.11.2",
9092
"reblessed": "^0.2.1",
9193
"simple-git": "^3.22.0",
9294
"split2": "^4.2.0",
@@ -107,6 +109,7 @@
107109
"@types/ms": "^0.7.34",
108110
"@types/node": "^20.11.17",
109111
"@types/node-fetch": "^2.6.11",
112+
"@types/qs": "^6.9.11",
110113
"@types/split2": "^3.2.1",
111114
"@typescript-eslint/eslint-plugin": "^6.21.0",
112115
"@typescript-eslint/eslint-plugin-tslint": "^6.21.0",

src/api/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from 'path';
33
import chalk from 'chalk';
44
import { pickBy } from 'lodash';
55
import fetch from 'node-fetch';
6-
import qs from 'query-string';
6+
import qs from 'qs';
77

88
import { getConfig } from '../config';
99

src/api/deploy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import queryString from 'query-string';
1+
import qs from 'qs';
22

33
import { api } from './api';
44
import { DeployResponse, HttpResponse } from './types';
@@ -15,7 +15,7 @@ export async function getDeploy(id: string): Promise<DeployResponse> {
1515
export async function getDeploys(query: { versionId: number }): Promise<DeployResponse[]> {
1616
const { body } = await api<HttpResponse<DeployResponse[]>>({
1717
method: 'get',
18-
path: `/deploys/?${queryString.stringify(query)}`,
18+
path: `/deploys/?${qs.stringify(query)}`,
1919
});
2020

2121
return body.payload;

src/commands/deploy.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fs from 'fs';
22
import path from 'path';
33
import { promisify } from 'util';
44

5-
import { CliUx, Flags } from '@oclif/core';
5+
import { Args, Flags, ux as CliUx } from '@oclif/core';
66
import { ManifestValue } from '@subsquid/manifest';
77
import chalk from 'chalk';
88
import inquirer from 'inquirer';
@@ -50,13 +50,14 @@ export function resolveManifest(
5050

5151
export default class Deploy extends DeployCommand {
5252
static description = 'Deploy new or update an existing squid in the Cloud';
53-
static args = [
54-
{
55-
name: 'source',
53+
54+
static args = {
55+
source: Args.string({
5656
description: SQUID_PATH_DESC.join('\n'),
5757
required: true,
58-
},
59-
];
58+
}),
59+
};
60+
6061
static flags = {
6162
manifest: Flags.string({
6263
char: 'm',

src/commands/init.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { promises as asyncFs } from 'fs';
22
import path from 'path';
33

4-
import { CliUx, Flags } from '@oclif/core';
4+
import { Args, ux as CliUx, Flags } from '@oclif/core';
55
import chalk from 'chalk';
66
import inquirer from 'inquirer';
77
import simpleGit from 'simple-git';
@@ -82,13 +82,9 @@ const SQUID_TEMPLATE_DESC = [
8282
export default class Init extends CliCommand {
8383
static description = 'Setup a new squid project from a template or github repo';
8484

85-
static args = [
86-
{
87-
name: 'name',
88-
description: SQUID_NAME_DESC.join('\n'),
89-
required: true,
90-
},
91-
];
85+
static args = {
86+
name: Args.string({ description: SQUID_NAME_DESC.join('\n'), required: true }),
87+
};
9288

9389
static flags = {
9490
template: Flags.string({

src/commands/logs.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CliUx, Flags } from '@oclif/core';
1+
import { Args, ux as CliUx, Flags } from '@oclif/core';
22
import ms from 'ms';
33

44
import { debugLog, streamSquidLogs, versionHistoryLogs } from '../api';
@@ -24,13 +24,13 @@ export default class Logs extends CliCommand {
2424
static aliases = ['squid:logs'];
2525

2626
static description = 'Fetch logs from a squid deployed to the Cloud';
27-
static args = [
28-
{
29-
name: 'name',
27+
static args = {
28+
name: Args.string({
3029
description: 'name@version',
3130
required: true,
32-
},
33-
];
31+
}),
32+
};
33+
3434
static flags = {
3535
container: Flags.string({
3636
char: 'c',

src/commands/ls.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CliUx, Flags } from '@oclif/core';
1+
import { ux as CliUx, Flags } from '@oclif/core';
22

33
import { getSquid, squidList } from '../api';
44
import { CliCommand } from '../command';

src/commands/prod.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import assert from 'assert';
22

3+
import { Args } from '@oclif/core';
34
import inquirer from 'inquirer';
45

56
import { getSquid, setProduction } from '../api';
@@ -10,13 +11,12 @@ export default class Prod extends DeployCommand {
1011
static aliases = ['squid:prod'];
1112

1213
static description = 'Assign the canonical production API alias for a squid deployed to the Cloud';
13-
static args = [
14-
{
15-
name: 'nameAndVersion',
14+
static args = {
15+
nameAndVersion: Args.string({
1616
description: 'name@version',
1717
required: true,
18-
},
19-
];
18+
}),
19+
};
2020

2121
async run(): Promise<void> {
2222
const { args } = await this.parse(Prod);

src/commands/restart.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
import { Flags } from '@oclif/core';
1+
import { Args, Flags } from '@oclif/core';
22

33
import { restartSquid } from '../api';
44
import { DeployCommand } from '../deploy-command';
5-
import { parseEnvs, parseNameAndVersion } from '../utils';
5+
import { parseNameAndVersion } from '../utils';
66

77
export default class Restart extends DeployCommand {
88
static aliases = ['squid:redeploy', 'redeploy'];
99

1010
static description = 'Restart a squid deployed to the Cloud';
11-
static args = [
12-
{
13-
name: 'nameAndVersion',
11+
static args = {
12+
nameAndVersion: Args.string({
1413
description: 'name@version',
1514
required: true,
16-
},
17-
];
15+
}),
16+
};
17+
1818
static flags = {
1919
env: Flags.string({
2020
char: 'e',
@@ -39,8 +39,8 @@ export default class Restart extends DeployCommand {
3939

4040
async run(): Promise<void> {
4141
const {
42-
flags,
43-
args: { nameAndVersion, 'no-stream-logs': disableStreamLogs },
42+
flags: { 'no-stream-logs': disableStreamLogs },
43+
args: { nameAndVersion },
4444
} = await this.parse(Restart);
4545
const { squidName, versionName } = parseNameAndVersion(nameAndVersion, this);
4646

src/commands/rm.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CliUx, Command, Flags } from '@oclif/core';
1+
import { Args, ux as CliUx, Command, Flags } from '@oclif/core';
22
import inquirer from 'inquirer';
33

44
import { destroySquid, destroyVersion } from '../api';
@@ -8,13 +8,14 @@ export default class Rm extends Command {
88
static aliases = ['squid:kill', 'kill'];
99

1010
static description = 'Remove a squid or a squid version deployed to the Cloud';
11-
static args = [
12-
{
13-
name: 'nameAndVersion',
11+
12+
static args = {
13+
nameAndVersion: Args.string({
1414
description: '<name> or <name@version>',
1515
required: true,
16-
},
17-
];
16+
}),
17+
};
18+
1819
static flags = {
1920
force: Flags.boolean({
2021
char: 'f',

0 commit comments

Comments
 (0)