diff --git a/.changeset/wild-weeks-protect.md b/.changeset/wild-weeks-protect.md new file mode 100644 index 000000000..9a200059f --- /dev/null +++ b/.changeset/wild-weeks-protect.md @@ -0,0 +1,5 @@ +--- +'@graphprotocol/graph-cli': minor +--- + +Add warning for available CLI updates diff --git a/packages/cli/package.json b/packages/cli/package.json index 1bb35f56b..0d464daa4 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -32,6 +32,7 @@ "@oclif/core": "2.8.6", "@oclif/plugin-autocomplete": "^2.3.6", "@oclif/plugin-not-found": "^2.4.0", + "@oclif/plugin-warn-if-update-available": "^3.1.20", "@whatwg-node/fetch": "^0.8.4", "assemblyscript": "0.19.23", "binary-install-raw": "0.0.13", @@ -85,7 +86,12 @@ ], "plugins": [ "@oclif/plugin-not-found", - "@oclif/plugin-autocomplete" - ] + "@oclif/plugin-autocomplete", + "@oclif/plugin-warn-if-update-available" + ], + "warn-if-update-available": { + "timeoutInDays": 1, + "message": "<%= config.name %> update available from <%= chalk.yellowBright(config.version) %> to <%= chalk.greenBright(latest) %>." + } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 896ea418b..0c3d07a5b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -48,7 +48,7 @@ importers: dependencies: '@graphprotocol/graph-cli': specifier: 0.71.2 - version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.4.5) + version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13))(typescript@5.4.5) '@graphprotocol/graph-ts': specifier: ^0.32.0 version: 0.32.0 @@ -61,7 +61,7 @@ importers: devDependencies: '@graphprotocol/graph-cli': specifier: 0.71.2 - version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.4.5) + version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13))(typescript@5.4.5) '@graphprotocol/graph-ts': specifier: 0.35.1 version: 0.35.1 @@ -77,7 +77,7 @@ importers: devDependencies: '@graphprotocol/graph-cli': specifier: 0.71.2 - version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.4.5) + version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13))(typescript@5.4.5) '@graphprotocol/graph-ts': specifier: 0.35.1 version: 0.35.1 @@ -96,7 +96,7 @@ importers: devDependencies: '@graphprotocol/graph-cli': specifier: 0.71.2 - version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.4.5) + version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13))(typescript@5.4.5) '@graphprotocol/graph-ts': specifier: 0.35.1 version: 0.35.1 @@ -115,7 +115,7 @@ importers: devDependencies: '@graphprotocol/graph-cli': specifier: 0.71.2 - version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.4.5) + version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13))(typescript@5.4.5) '@graphprotocol/graph-ts': specifier: 0.35.1 version: 0.35.1 @@ -134,7 +134,7 @@ importers: devDependencies: '@graphprotocol/graph-cli': specifier: 0.71.2 - version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.4.5) + version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13))(typescript@5.4.5) '@graphprotocol/graph-ts': specifier: 0.35.1 version: 0.35.1 @@ -189,7 +189,7 @@ importers: devDependencies: '@graphprotocol/graph-cli': specifier: 0.71.2 - version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.0.4) + version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13))(typescript@5.0.4) '@graphprotocol/graph-ts': specifier: 0.35.1 version: 0.35.1 @@ -207,7 +207,7 @@ importers: devDependencies: '@graphprotocol/graph-cli': specifier: 0.71.2 - version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.4.5) + version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13))(typescript@5.4.5) '@graphprotocol/graph-ts': specifier: 0.35.1 version: 0.35.1 @@ -228,7 +228,7 @@ importers: dependencies: '@graphprotocol/graph-cli': specifier: 0.71.2 - version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.4.5) + version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13))(typescript@5.4.5) '@graphprotocol/graph-ts': specifier: 0.35.1 version: 0.35.1 @@ -241,7 +241,7 @@ importers: devDependencies: '@graphprotocol/graph-cli': specifier: 0.71.2 - version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.4.5) + version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13))(typescript@5.4.5) '@graphprotocol/graph-ts': specifier: 0.35.1 version: 0.35.1 @@ -250,7 +250,7 @@ importers: devDependencies: '@graphprotocol/graph-cli': specifier: 0.71.2 - version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.4.5) + version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13))(typescript@5.4.5) '@graphprotocol/graph-ts': specifier: 0.35.1 version: 0.35.1 @@ -259,7 +259,7 @@ importers: devDependencies: '@graphprotocol/graph-cli': specifier: 0.71.2 - version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.4.5) + version: 0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13))(typescript@5.4.5) packages/cli: dependencies: @@ -275,6 +275,9 @@ importers: '@oclif/plugin-not-found': specifier: ^2.4.0 version: 2.4.0(@types/node@20.12.11)(typescript@5.0.2) + '@oclif/plugin-warn-if-update-available': + specifier: ^3.1.20 + version: 3.1.20 '@whatwg-node/fetch': specifier: ^0.8.4 version: 0.8.4 @@ -2450,6 +2453,10 @@ packages: resolution: {integrity: sha512-1QlPaHMhOORySCXkQyzjsIsy2GYTilOw3LkjeHkCgsPJQjAT4IclVytJusWktPbYNys9O+O4V23J44yomQvnBQ==} engines: {node: '>=14.0.0'} + '@oclif/core@4.0.30': + resolution: {integrity: sha512-Ak3OUdOcoovIRWZOT6oC5JhZgyJD90uWX/7HjSofn+C4LEmHxxfiyu04a73dwnezfzqDu9jEXfd2mQOOC54KZw==} + engines: {node: '>=18.0.0'} + '@oclif/plugin-autocomplete@2.3.10': resolution: {integrity: sha512-Ow1AR8WtjzlyCtiWWPgzMyT8SbcDJFr47009riLioHa+MHX2BCDtVn2DVnN/E6b9JlPV5ptQpjefoRSNWBesmg==} engines: {node: '>=12.0.0'} @@ -2474,6 +2481,10 @@ packages: resolution: {integrity: sha512-Rq8/EZ8wQawvPWS6W59Zhf/zSz/umLc3q75I1ybi7pul6YMNwf/E1eDVHytSUEQ6yQV+p3cCs034IItz4CVdjw==} engines: {node: '>=12.0.0'} + '@oclif/plugin-warn-if-update-available@3.1.20': + resolution: {integrity: sha512-gvovUQXwWkQZzHG7WknLq+yoSe61Cbv45rEUooKbzo7tfRDChFnCyLQ+OCCldQOsSYvS/KTsiawyyCetSaCR1g==} + engines: {node: '>=18.0.0'} + '@octokit/auth-token@2.5.0': resolution: {integrity: sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==} @@ -2624,6 +2635,18 @@ packages: resolution: {integrity: sha512-wfzX8kc1PMyUILA+1Z/EqoE4UCXGy0iRGMhPwdfae1+f0OXlLqCk+By+aMzgJBzR9AzS4CDizioG6Ss1gvAFJw==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@pnpm/config.env-replace@1.1.0': + resolution: {integrity: sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==} + engines: {node: '>=12.22.0'} + + '@pnpm/network.ca-file@1.0.2': + resolution: {integrity: sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==} + engines: {node: '>=12.22.0'} + + '@pnpm/npm-conf@2.3.1': + resolution: {integrity: sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==} + engines: {node: '>=12'} + '@protobufjs/aspromise@1.1.2': resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} @@ -4182,6 +4205,10 @@ packages: ansicolors@0.3.2: resolution: {integrity: sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==} + ansis@3.3.2: + resolution: {integrity: sha512-cFthbBlt+Oi0i9Pv/j6YdVWJh54CtjGACaMPCIrEV4Ha7HWsIjXDwseYV79TIL0B4+KfSwD5S70PeQDkPUd1rA==} + engines: {node: '>=15'} + antlr4ts@0.5.0-alpha.4: resolution: {integrity: sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==} @@ -5097,6 +5124,9 @@ packages: confbox@0.1.7: resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} + config-chain@1.1.13: + resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} + connect@3.7.0: resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==} engines: {node: '>= 0.10.0'} @@ -5319,6 +5349,15 @@ packages: supports-color: optional: true + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + debuglog@1.0.1: resolution: {integrity: sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==} deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. @@ -5995,6 +6034,7 @@ packages: ethereum-bloom-filters@1.1.0: resolution: {integrity: sha512-J1gDRkLpuGNvWYzWslBQR9cDV4nd4kfvVTE/Wy4Kkm4yb3EYRSlyi0eB/inTsSTTVyA0+HyzHgbr95Fn/Z1fSw==} + deprecated: do not use this package use package versions above as this can miss some topics ethereum-cryptography@0.1.3: resolution: {integrity: sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==} @@ -7567,6 +7607,10 @@ packages: resolution: {integrity: sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==} engines: {node: '>=14'} + lilconfig@3.1.2: + resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} + engines: {node: '>=14'} + lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -8087,6 +8131,10 @@ packages: resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} engines: {node: '>=16 || 14 >=14.17'} + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + minimist-options@4.1.0: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} @@ -9065,6 +9113,9 @@ packages: prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + proto-list@1.2.4: + resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} + protobufjs@6.11.3: resolution: {integrity: sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==} hasBin: true @@ -9440,6 +9491,10 @@ packages: resolution: {integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==} engines: {node: '>=4'} + registry-auth-token@5.0.2: + resolution: {integrity: sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==} + engines: {node: '>=14'} + regjsparser@0.10.0: resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} hasBin: true @@ -9699,6 +9754,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + send@0.18.0: resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} engines: {node: '>= 0.8.0'} @@ -13016,7 +13076,7 @@ snapshots: graphql: 15.5.0 typescript: 5.4.5 - '@graphprotocol/graph-cli@0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.0.4)': + '@graphprotocol/graph-cli@0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13))(typescript@5.0.4)': dependencies: '@float-capital/float-subgraph-uncrashable': 0.0.0-internal-testing.5 '@oclif/core': 2.8.6(@types/node@20.12.11)(typescript@5.0.4) @@ -13056,7 +13116,7 @@ snapshots: - typescript - utf-8-validate - '@graphprotocol/graph-cli@0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.4.5)': + '@graphprotocol/graph-cli@0.71.2(@types/node@20.12.11)(bufferutil@4.0.8)(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13))(typescript@5.4.5)': dependencies: '@float-capital/float-subgraph-uncrashable': 0.0.0-internal-testing.5 '@oclif/core': 2.8.6(@types/node@20.12.11)(typescript@5.4.5) @@ -14154,6 +14214,27 @@ snapshots: - '@types/node' - typescript + '@oclif/core@4.0.30': + dependencies: + ansi-escapes: 4.3.2 + ansis: 3.3.2 + clean-stack: 3.0.1 + cli-spinners: 2.9.2 + debug: 4.3.7(supports-color@8.1.1) + ejs: 3.1.10 + get-package-type: 0.1.0 + globby: 11.1.0 + indent-string: 4.0.0 + is-wsl: 3.1.0 + lilconfig: 3.1.2 + minimatch: 9.0.5 + semver: 7.6.3 + string-width: 4.2.3 + supports-color: 8.1.1 + widest-line: 3.1.0 + wordwrap: 1.0.0 + wrap-ansi: 7.0.0 + '@oclif/plugin-autocomplete@2.3.10(@types/node@20.12.11)(typescript@5.0.4)': dependencies: '@oclif/core': 2.16.0(@types/node@20.12.11)(typescript@5.0.4) @@ -14249,6 +14330,17 @@ snapshots: - supports-color - typescript + '@oclif/plugin-warn-if-update-available@3.1.20': + dependencies: + '@oclif/core': 4.0.30 + ansis: 3.3.2 + debug: 4.3.7(supports-color@8.1.1) + http-call: 5.3.0 + lodash: 4.17.21 + registry-auth-token: 5.0.2 + transitivePeerDependencies: + - supports-color + '@octokit/auth-token@2.5.0': dependencies: '@octokit/types': 6.41.0 @@ -14431,6 +14523,18 @@ snapshots: tiny-glob: 0.2.9 tslib: 2.6.2 + '@pnpm/config.env-replace@1.1.0': {} + + '@pnpm/network.ca-file@1.0.2': + dependencies: + graceful-fs: 4.2.10 + + '@pnpm/npm-conf@2.3.1': + dependencies: + '@pnpm/config.env-replace': 1.1.0 + '@pnpm/network.ca-file': 1.0.2 + config-chain: 1.1.13 + '@protobufjs/aspromise@1.1.2': {} '@protobufjs/base64@1.1.2': {} @@ -16563,6 +16667,8 @@ snapshots: ansicolors@0.3.2: {} + ansis@3.3.2: {} + antlr4ts@0.5.0-alpha.4: {} any-promise@1.3.0: {} @@ -17716,6 +17822,11 @@ snapshots: confbox@0.1.7: {} + config-chain@1.1.13: + dependencies: + ini: 1.3.8 + proto-list: 1.2.4 + connect@3.7.0: dependencies: debug: 2.6.9 @@ -17961,6 +18072,12 @@ snapshots: optionalDependencies: supports-color: 8.1.1 + debug@4.3.7(supports-color@8.1.1): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 + debuglog@1.0.1: {} decamelize-keys@1.1.1: @@ -20910,6 +21027,8 @@ snapshots: lilconfig@3.1.1: {} + lilconfig@3.1.2: {} + lines-and-columns@1.2.4: {} lines-and-columns@2.0.4: {} @@ -21759,6 +21878,10 @@ snapshots: dependencies: brace-expansion: 2.0.1 + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.1 + minimist-options@4.1.0: dependencies: arrify: 1.0.1 @@ -22902,6 +23025,8 @@ snapshots: object-assign: 4.1.1 react-is: 16.13.1 + proto-list@1.2.4: {} + protobufjs@6.11.3: dependencies: '@protobufjs/aspromise': 1.1.2 @@ -23354,6 +23479,10 @@ snapshots: unicode-match-property-ecmascript: 2.0.0 unicode-match-property-value-ecmascript: 2.1.0 + registry-auth-token@5.0.2: + dependencies: + '@pnpm/npm-conf': 2.3.1 + regjsparser@0.10.0: dependencies: jsesc: 0.5.0 @@ -23660,6 +23789,8 @@ snapshots: semver@7.6.2: {} + semver@7.6.3: {} + send@0.18.0: dependencies: debug: 2.6.9