Update dependencies

Change-type: minor
This commit is contained in:
Pagan Gazzard 2020-01-24 22:20:39 +00:00
parent b38b5b0b61
commit 77931b314a
8 changed files with 1467 additions and 1273 deletions

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as _ocktokit from '@octokit/rest';
import * as Bluebird from 'bluebird';
import * as _ from 'lodash';
import * as semver from 'semver';
@ -59,17 +62,12 @@ export async function release() {
}
}
let cachedOctokit: any;
/** Return a cached Octokit instance, creating a new one as needed. */
function getOctokit(): any {
if (cachedOctokit) {
return cachedOctokit;
}
const Octokit = require('@octokit/rest').plugin(
const getOctokit = _.once(function() {
const Octokit = (require('@octokit/rest') as typeof _ocktokit).plugin(
require('@octokit/plugin-throttling'),
);
return (cachedOctokit = new Octokit({
return new Octokit({
auth: GITHUB_TOKEN,
throttle: {
onRateLimit: (retryAfter: number, options: any) => {
@ -89,8 +87,8 @@ function getOctokit(): any {
);
},
},
}));
}
});
});
/**
* Extract pagination information (current page, total pages, ordinal number)

View File

@ -29,10 +29,6 @@ interface FlagsDef {
verbose?: boolean;
}
interface DeviceTypeWithAliases extends SDK.DeviceType {
aliases?: string[];
}
export default class DevicesSupportedCmd extends Command {
public static description = stripIndent`
List the supported device types (like 'raspberrypi3' or 'intel-nuc').
@ -81,7 +77,7 @@ export default class DevicesSupportedCmd extends Command {
const { flags: options } = this.parse<FlagsDef, {}>(DevicesSupportedCmd);
const sdk = SDK.fromSharedOptions();
let deviceTypes: Array<Partial<
DeviceTypeWithAliases
SDK.DeviceType
>> = await sdk.models.config.getDeviceTypes();
if (!options.discontinued) {
deviceTypes = deviceTypes.filter(dt => dt.state !== 'DISCONTINUED');
@ -103,7 +99,7 @@ export default class DevicesSupportedCmd extends Command {
});
}
deviceTypes = _.sortBy(
deviceTypes.map(d => _.pick(d, fields) as Partial<DeviceTypeWithAliases>),
deviceTypes.map(d => _.pick(d, fields) as Partial<SDK.DeviceType>),
fields,
);
if (options.json) {

View File

@ -14,25 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { LogMessage } from 'balena-sdk';
import { CommandDefinition } from 'capitano';
import { stripIndent } from 'common-tags';
import { normalizeUuidProp } from '../utils/normalization';
import { validateDotLocalUrl } from '../utils/validation';
type CloudLog =
| {
isSystem: false;
serviceId: number;
timestamp: number;
message: string;
}
| {
isSystem: true;
timestamp: number;
message: string;
};
export const logs: CommandDefinition<
{
uuidOrDevice: string;
@ -117,7 +105,7 @@ export const logs: CommandDefinition<
: [options.service]
: undefined;
const displayCloudLog = async (line: CloudLog) => {
const displayCloudLog = async (line: LogMessage) => {
if (!line.isSystem) {
let serviceName = await serviceIdToName(balena, line.serviceId);
if (serviceName == null) {

View File

@ -99,7 +99,7 @@ exports.download =
]
action: (params, options, done) ->
Promise = require('bluebird')
unzip = require('unzip2')
unzip = require('node-unzip-2')
fs = require('fs')
rindle = require('rindle')
manager = require('balena-image-manager')

2597
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

View File

@ -90,19 +90,19 @@
}
},
"devDependencies": {
"@oclif/config": "^1.12.12",
"@oclif/config": "^1.13.3",
"@oclif/dev-cli": "1.22.0",
"@oclif/parser": "^3.7.3",
"@octokit/plugin-throttling": "^2.6.0",
"@octokit/rest": "^16.28.7",
"@oclif/parser": "^3.8.4",
"@octokit/plugin-throttling": "^2.7.1",
"@octokit/rest": "^16.38.1",
"@types/archiver": "2.1.2",
"@types/bluebird": "3.5.21",
"@types/chai": "^4.1.7",
"@types/bluebird": "^3.5.29",
"@types/chai": "^4.2.7",
"@types/chai-as-promised": "^7.1.1",
"@types/chokidar": "^1.7.5",
"@types/common-tags": "1.4.0",
"@types/common-tags": "^1.8.0",
"@types/dockerode": "2.5.6",
"@types/ejs": "^2.6.3",
"@types/ejs": "^3.0.0",
"@types/fs-extra": "7.0.0",
"@types/intercept-stdout": "^0.1.0",
"@types/is-root": "1.0.0",
@ -118,9 +118,9 @@
"@types/raven": "2.5.1",
"@types/request": "2.48.1",
"@types/rewire": "^2.5.28",
"@types/rimraf": "^2.0.2",
"@types/rimraf": "^2.0.3",
"@types/shell-escape": "^0.2.0",
"@types/sinon": "^7.0.13",
"@types/sinon": "^7.5.1",
"@types/stream-to-promise": "2.2.0",
"@types/tar-stream": "1.6.0",
"@types/through2": "2.0.33",
@ -129,28 +129,28 @@
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"ent": "^2.2.0",
"filehound": "^1.17.0",
"filehound": "^1.17.3",
"fs-extra": "^8.0.1",
"gulp": "^4.0.1",
"gulp-coffee": "^2.2.0",
"gulp-inline-source": "^2.1.0",
"gulp-shell": "^0.5.2",
"husky": "^3.0.9",
"husky": "^3.1.0",
"intercept-stdout": "^0.1.2",
"mocha": "^6.2.0",
"nock": "^11.0.7",
"mocha": "^6.2.2",
"nock": "^11.7.2",
"parse-link-header": "~1.0.1",
"pkg": "^4.4.0",
"pkg": "^4.4.2",
"prettier": "^1.19.1",
"publish-release": "^1.6.0",
"publish-release": "^1.6.1",
"resin-lint": "^3.1.1",
"rewire": "^3.0.2",
"sinon": "^7.4.1",
"ts-node": "^8.1.0",
"typescript": "^3.4.5"
"sinon": "^7.5.0",
"ts-node": "^8.6.2",
"typescript": "^3.7.5"
},
"dependencies": {
"@oclif/command": "^1.5.12",
"@oclif/command": "^1.5.19",
"@oclif/errors": "^1.2.2",
"@resin.io/valid-email": "^0.1.0",
"@zeit/dockerignore": "0.0.3",
@ -158,57 +158,59 @@
"ansi-escapes": "^2.0.0",
"any-promise": "^1.3.0",
"archiver": "^2.1.0",
"balena-config-json": "^2.1.0",
"balena-device-init": "^5.0.0",
"balena-device-status": "^3.1.2",
"balena-image-manager": "^6.1.0",
"balena-preload": "^8.2.1",
"balena-sdk": "^12.16.0",
"balena-settings-client": "^4.0.0",
"balena-sync": "^10.0.3",
"balena-config-json": "^2.1.1",
"balena-device-init": "^5.0.1",
"balena-device-status": "^3.2.0",
"balena-errors": "^4.2.1",
"balena-image-manager": "^6.1.1",
"balena-preload": "^8.3.0",
"balena-sdk": "^12.21.1",
"balena-settings-client": "^4.0.2",
"balena-sync": "^10.1.0",
"bash": "0.0.1",
"bluebird": "^3.5.4",
"bluebird": "^3.7.2",
"body-parser": "^1.19.0",
"capitano": "^1.9.0",
"capitano": "^1.9.1",
"chalk": "^2.3.0",
"chokidar": "^2.0.4",
"chokidar": "^2.1.8",
"cli-truncate": "^1.1.0",
"coffeescript": "^1.12.6",
"color-hash": "^1.0.3",
"columnify": "^1.5.2",
"common-tags": "^1.7.2",
"denymount": "^2.3.0",
"docker-modem": "^2.0.2",
"docker-modem": "^2.0.4",
"docker-progress": "^4.0.0",
"docker-qemu-transpose": "^1.0.2",
"docker-toolbelt": "^3.3.7",
"dockerode": "^2.5.8",
"ejs": "^2.5.7",
"etcher-sdk": "^2.0.14",
"ejs": "^3.0.1",
"etcher-sdk": "^2.0.16",
"event-stream": "3.3.4",
"express": "^4.13.3",
"fast-boot2": "^1.0.9",
"global-tunnel-ng": "^2.1.1",
"hasbin": "^1.2.3",
"humanize": "0.0.9",
"ignore": "^5.1.1",
"ignore": "^5.1.4",
"inquirer": "^3.1.1",
"is-elevated": "^3.0.0",
"is-root": "^2.1.0",
"js-yaml": "^3.13.1",
"klaw": "^3.0.0",
"livepush": "^2.0.6",
"lodash": "^4.17.4",
"lodash": "^4.17.15",
"minimatch": "^3.0.4",
"mixpanel": "^0.10.1",
"mixpanel": "^0.10.3",
"mkdirp": "^0.5.1",
"moment": "^2.24.0",
"moment-duration-format": "^2.2.2",
"moment-duration-format": "^2.3.2",
"mz": "^2.7.0",
"node-cleanup": "^2.1.2",
"oclif": "^1.13.1",
"node-unzip-2": "^0.2.8",
"oclif": "^1.15.2",
"opn": "^5.5.0",
"patch-package": "^6.1.2",
"patch-package": "^6.2.0",
"prettyjson": "^1.1.3",
"progress-stream": "^2.0.0",
"raven": "^2.5.0",
@ -217,15 +219,15 @@
"resin-cli-form": "^2.0.1",
"resin-cli-visuals": "^1.4.4",
"resin-compose-parse": "^2.1.0",
"resin-doodles": "0.0.1",
"resin-doodles": "^0.1.1",
"resin-image-fs": "^5.0.8",
"resin-multibuild": "^4.3.2",
"resin-multibuild": "^4.3.4",
"resin-release": "^1.2.0",
"resin-semver": "^1.6.0",
"resin-stream-logger": "^0.1.2",
"rimraf": "^2.4.3",
"rimraf": "^3.0.0",
"rindle": "^1.3.4",
"semver": "^5.7.0",
"semver": "^7.1.1",
"shell-escape": "^0.2.0",
"split": "^1.0.1",
"string-width": "^2.1.1",
@ -234,9 +236,8 @@
"tar-utils": "^2.0.0",
"through2": "^2.0.3",
"tmp": "0.0.31",
"typed-error": "^3.1.0",
"typed-error": "^3.2.0",
"umount": "^1.1.6",
"unzip2": "balena-io-library/node-unzip-2#v0.2.8",
"update-notifier": "^2.2.0",
"which": "^2.0.2",
"window-size": "^1.1.0"

View File

@ -1,5 +1,5 @@
diff --git a/node_modules/pkg/lib-es5/packer.js b/node_modules/pkg/lib-es5/packer.js
index 7295bb6..76805a3 100644
index 607c847..4e3fb55 100644
--- a/node_modules/pkg/lib-es5/packer.js
+++ b/node_modules/pkg/lib-es5/packer.js
@@ -128,6 +128,7 @@ function _default({
@ -11,7 +11,7 @@ index 7295bb6..76805a3 100644
stripes.push({
snap,
diff --git a/node_modules/pkg/prelude/bootstrap.js b/node_modules/pkg/prelude/bootstrap.js
index 216579e..4904726 100644
index 216579e..5cff8a8 100644
--- a/node_modules/pkg/prelude/bootstrap.js
+++ b/node_modules/pkg/prelude/bootstrap.js
@@ -866,8 +866,10 @@ function payloadFileSync (pointer) {

View File

@ -60,7 +60,7 @@ describe('balena devices supported', function() {
// Experimental devices should be listed as beta
expect(lines.some(l => l.includes('EXPERIMENTAL'))).to.be.false;
expect(lines.some(l => l.includes('BETA'))).to.be.true;
expect(lines.some(l => l.includes('NEW'))).to.be.true;
expect(err).to.eql([]);
});